Files
editor/assets/index-BwCCyr0-.js
2025-09-17 17:52:33 +00:00

993 lines
3.9 MiB
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function t(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=t(r);fetch(r.href,o)}})();function Wl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function ID(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var e=n.default;if(typeof e=="function"){var t=function i(){var r=!1;try{r=this instanceof i}catch{}return r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}),t}var G6={exports:{}},Yx={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ML;function Oae(){if(ML)return Yx;ML=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(i,r,o){var s=null;if(o!==void 0&&(s=""+o),r.key!==void 0&&(s=""+r.key),"key"in r){o={};for(var a in r)a!=="key"&&(o[a]=r[a])}else o=r;return r=o.ref,{$$typeof:n,type:i,key:s,ref:r!==void 0?r:null,props:o}}return Yx.Fragment=e,Yx.jsx=t,Yx.jsxs=t,Yx}var wL;function Bae(){return wL||(wL=1,G6.exports=Oae()),G6.exports}var ie=Bae(),W6={exports:{}},fo={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var SL;function Iae(){if(SL)return fo;SL=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),A=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.iterator;function x(ce){return ce===null||typeof ce!="object"?null:(ce=v&&ce[v]||ce["@@iterator"],typeof ce=="function"?ce:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,P={};function F(ce,Le,We){this.props=ce,this.context=Le,this.refs=P,this.updater=We||_}F.prototype.isReactComponent={},F.prototype.setState=function(ce,Le){if(typeof ce!="object"&&typeof ce!="function"&&ce!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,ce,Le,"setState")},F.prototype.forceUpdate=function(ce){this.updater.enqueueForceUpdate(this,ce,"forceUpdate")};function j(){}j.prototype=F.prototype;function Q(ce,Le,We){this.props=ce,this.context=Le,this.refs=P,this.updater=We||_}var V=Q.prototype=new j;V.constructor=Q,O(V,F.prototype),V.isPureReactComponent=!0;var H=Array.isArray,G={H:null,A:null,T:null,S:null,V:null},Y=Object.prototype.hasOwnProperty;function z(ce,Le,We,Me,dt,it){return We=it.ref,{$$typeof:n,type:ce,key:Le,ref:We!==void 0?We:null,props:it}}function se(ce,Le){return z(ce.type,Le,void 0,void 0,void 0,ce.props)}function le(ce){return typeof ce=="object"&&ce!==null&&ce.$$typeof===n}function me(ce){var Le={"=":"=0",":":"=2"};return"$"+ce.replace(/[=:]/g,function(We){return Le[We]})}var fe=/\/+/g;function _e(ce,Le){return typeof ce=="object"&&ce!==null&&ce.key!=null?me(""+ce.key):Le.toString(36)}function we(){}function ke(ce){switch(ce.status){case"fulfilled":return ce.value;case"rejected":throw ce.reason;default:switch(typeof ce.status=="string"?ce.then(we,we):(ce.status="pending",ce.then(function(Le){ce.status==="pending"&&(ce.status="fulfilled",ce.value=Le)},function(Le){ce.status==="pending"&&(ce.status="rejected",ce.reason=Le)})),ce.status){case"fulfilled":return ce.value;case"rejected":throw ce.reason}}throw ce}function je(ce,Le,We,Me,dt){var it=typeof ce;(it==="undefined"||it==="boolean")&&(ce=null);var vt=!1;if(ce===null)vt=!0;else switch(it){case"bigint":case"string":case"number":vt=!0;break;case"object":switch(ce.$$typeof){case n:case e:vt=!0;break;case m:return vt=ce._init,je(vt(ce._payload),Le,We,Me,dt)}}if(vt)return dt=dt(ce),vt=Me===""?"."+_e(ce,0):Me,H(dt)?(We="",vt!=null&&(We=vt.replace(fe,"$&/")+"/"),je(dt,Le,We,"",function(Te){return Te})):dt!=null&&(le(dt)&&(dt=se(dt,We+(dt.key==null||ce&&ce.key===dt.key?"":(""+dt.key).replace(fe,"$&/")+"/")+vt)),Le.push(dt)),1;vt=0;var Ut=Me===""?".":Me+":";if(H(ce))for(var Pe=0;Pe<ce.length;Pe++)Me=ce[Pe],it=Ut+_e(Me,Pe),vt+=je(Me,Le,We,it,dt);else if(Pe=x(ce),typeof Pe=="function")for(ce=Pe.call(ce),Pe=0;!(Me=ce.next()).done;)Me=Me.value,it=Ut+_e(Me,Pe++),vt+=je(Me,Le,We,it,dt);else if(it==="object"){if(typeof ce.then=="function")return je(ke(ce),Le,We,Me,dt);throw Le=String(ce),Error("Objects are not valid as a React child (found: "+(Le==="[object Object]"?"object with keys {"+Object.keys(ce).join(", ")+"}":Le)+"). If you meant to render a collection of children, use an array instead.")}return vt}function Ie(ce,Le,We){if(ce==null)return ce;var Me=[],dt=0;return je(ce,Me,"","",function(it){return Le.call(We,it,dt++)}),Me}function Qe(ce){if(ce._status===-1){var Le=ce._result;Le=Le(),Le.then(function(We){(ce._status===0||ce._status===-1)&&(ce._status=1,ce._result=We)},function(We){(ce._status===0||ce._status===-1)&&(ce._status=2,ce._result=We)}),ce._status===-1&&(ce._status=0,ce._result=Le)}if(ce._status===1)return ce._result.default;throw ce._result}var tt=typeof reportError=="function"?reportError:function(ce){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Le=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof ce=="object"&&ce!==null&&typeof ce.message=="string"?String(ce.message):String(ce),error:ce});if(!window.dispatchEvent(Le))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",ce);return}console.error(ce)};function ht(){}return fo.Children={map:Ie,forEach:function(ce,Le,We){Ie(ce,function(){Le.apply(this,arguments)},We)},count:function(ce){var Le=0;return Ie(ce,function(){Le++}),Le},toArray:function(ce){return Ie(ce,function(Le){return Le})||[]},only:function(ce){if(!le(ce))throw Error("React.Children.only expected to receive a single React element child.");return ce}},fo.Component=F,fo.Fragment=t,fo.Profiler=r,fo.PureComponent=Q,fo.StrictMode=i,fo.Suspense=c,fo.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,fo.__COMPILER_RUNTIME={__proto__:null,c:function(ce){return G.H.useMemoCache(ce)}},fo.cache=function(ce){return function(){return ce.apply(null,arguments)}},fo.cloneElement=function(ce,Le,We){if(ce==null)throw Error("The argument must be a React element, but you passed "+ce+".");var Me=O({},ce.props),dt=ce.key,it=void 0;if(Le!=null)for(vt in Le.ref!==void 0&&(it=void 0),Le.key!==void 0&&(dt=""+Le.key),Le)!Y.call(Le,vt)||vt==="key"||vt==="__self"||vt==="__source"||vt==="ref"&&Le.ref===void 0||(Me[vt]=Le[vt]);var vt=arguments.length-2;if(vt===1)Me.children=We;else if(1<vt){for(var Ut=Array(vt),Pe=0;Pe<vt;Pe++)Ut[Pe]=arguments[Pe+2];Me.children=Ut}return z(ce.type,dt,void 0,void 0,it,Me)},fo.createContext=function(ce){return ce={$$typeof:s,_currentValue:ce,_currentValue2:ce,_threadCount:0,Provider:null,Consumer:null},ce.Provider=ce,ce.Consumer={$$typeof:o,_context:ce},ce},fo.createElement=function(ce,Le,We){var Me,dt={},it=null;if(Le!=null)for(Me in Le.key!==void 0&&(it=""+Le.key),Le)Y.call(Le,Me)&&Me!=="key"&&Me!=="__self"&&Me!=="__source"&&(dt[Me]=Le[Me]);var vt=arguments.length-2;if(vt===1)dt.children=We;else if(1<vt){for(var Ut=Array(vt),Pe=0;Pe<vt;Pe++)Ut[Pe]=arguments[Pe+2];dt.children=Ut}if(ce&&ce.defaultProps)for(Me in vt=ce.defaultProps,vt)dt[Me]===void 0&&(dt[Me]=vt[Me]);return z(ce,it,void 0,void 0,null,dt)},fo.createRef=function(){return{current:null}},fo.forwardRef=function(ce){return{$$typeof:a,render:ce}},fo.isValidElement=le,fo.lazy=function(ce){return{$$typeof:m,_payload:{_status:-1,_result:ce},_init:Qe}},fo.memo=function(ce,Le){return{$$typeof:A,type:ce,compare:Le===void 0?null:Le}},fo.startTransition=function(ce){var Le=G.T,We={};G.T=We;try{var Me=ce(),dt=G.S;dt!==null&&dt(We,Me),typeof Me=="object"&&Me!==null&&typeof Me.then=="function"&&Me.then(ht,tt)}catch(it){tt(it)}finally{G.T=Le}},fo.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},fo.use=function(ce){return G.H.use(ce)},fo.useActionState=function(ce,Le,We){return G.H.useActionState(ce,Le,We)},fo.useCallback=function(ce,Le){return G.H.useCallback(ce,Le)},fo.useContext=function(ce){return G.H.useContext(ce)},fo.useDebugValue=function(){},fo.useDeferredValue=function(ce,Le){return G.H.useDeferredValue(ce,Le)},fo.useEffect=function(ce,Le,We){var Me=G.H;if(typeof We=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Me.useEffect(ce,Le)},fo.useId=function(){return G.H.useId()},fo.useImperativeHandle=function(ce,Le,We){return G.H.useImperativeHandle(ce,Le,We)},fo.useInsertionEffect=function(ce,Le){return G.H.useInsertionEffect(ce,Le)},fo.useLayoutEffect=function(ce,Le){return G.H.useLayoutEffect(ce,Le)},fo.useMemo=function(ce,Le){return G.H.useMemo(ce,Le)},fo.useOptimistic=function(ce,Le){return G.H.useOptimistic(ce,Le)},fo.useReducer=function(ce,Le,We){return G.H.useReducer(ce,Le,We)},fo.useRef=function(ce){return G.H.useRef(ce)},fo.useState=function(ce){return G.H.useState(ce)},fo.useSyncExternalStore=function(ce,Le,We){return G.H.useSyncExternalStore(ce,Le,We)},fo.useTransition=function(){return G.H.useTransition()},fo.version="19.1.1",fo}var EL;function La(){return EL||(EL=1,W6.exports=Iae()),W6.exports}var wt=La();const En=Wl(wt);var FH={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},H_=En.createContext&&En.createContext(FH),kae=["attr","size","title"];function Tae(n,e){if(n==null)return{};var t=Rae(n,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(t[i]=n[i])}return t}function Rae(n,e){if(n==null)return{};var t={};for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){if(e.indexOf(i)>=0)continue;t[i]=n[i]}return t}function vw(){return vw=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},vw.apply(this,arguments)}function OL(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function bw(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?OL(Object(t),!0).forEach(function(i){Dae(n,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):OL(Object(t)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(t,i))})}return n}function Dae(n,e,t){return e=Pae(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Pae(n){var e=Uae(n,"string");return typeof e=="symbol"?e:e+""}function Uae(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var i=t.call(n,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function zH(n){return n&&n.map((e,t)=>En.createElement(e.tag,bw({key:t},e.attr),zH(e.child)))}function Lo(n){return e=>En.createElement(Kae,vw({attr:bw({},n.attr)},e),zH(n.child))}function Kae(n){var e=t=>{var{attr:i,size:r,title:o}=n,s=Tae(n,kae),a=r||t.size||"1em",c;return t.className&&(c=t.className),n.className&&(c=(c?c+" ":"")+n.className),En.createElement("svg",vw({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,s,{className:c,style:bw(bw({color:n.color||t.color},t.style),n.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&En.createElement("title",null,o),n.children)};return H_!==void 0?En.createElement(H_.Consumer,null,t=>e(t)):e(FH)}var Q6={exports:{}},$x={},q6={exports:{}},Y6={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var BL;function Lae(){return BL||(BL=1,(function(n){function e(Ie,Qe){var tt=Ie.length;Ie.push(Qe);e:for(;0<tt;){var ht=tt-1>>>1,ce=Ie[ht];if(0<r(ce,Qe))Ie[ht]=Qe,Ie[tt]=ce,tt=ht;else break e}}function t(Ie){return Ie.length===0?null:Ie[0]}function i(Ie){if(Ie.length===0)return null;var Qe=Ie[0],tt=Ie.pop();if(tt!==Qe){Ie[0]=tt;e:for(var ht=0,ce=Ie.length,Le=ce>>>1;ht<Le;){var We=2*(ht+1)-1,Me=Ie[We],dt=We+1,it=Ie[dt];if(0>r(Me,tt))dt<ce&&0>r(it,Me)?(Ie[ht]=it,Ie[dt]=tt,ht=dt):(Ie[ht]=Me,Ie[We]=tt,ht=We);else if(dt<ce&&0>r(it,tt))Ie[ht]=it,Ie[dt]=tt,ht=dt;else break e}}return Qe}function r(Ie,Qe){var tt=Ie.sortIndex-Qe.sortIndex;return tt!==0?tt:Ie.id-Qe.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();n.unstable_now=function(){return s.now()-a}}var c=[],A=[],m=1,v=null,x=3,_=!1,O=!1,P=!1,F=!1,j=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function H(Ie){for(var Qe=t(A);Qe!==null;){if(Qe.callback===null)i(A);else if(Qe.startTime<=Ie)i(A),Qe.sortIndex=Qe.expirationTime,e(c,Qe);else break;Qe=t(A)}}function G(Ie){if(P=!1,H(Ie),!O)if(t(c)!==null)O=!0,Y||(Y=!0,_e());else{var Qe=t(A);Qe!==null&&je(G,Qe.startTime-Ie)}}var Y=!1,z=-1,se=5,le=-1;function me(){return F?!0:!(n.unstable_now()-le<se)}function fe(){if(F=!1,Y){var Ie=n.unstable_now();le=Ie;var Qe=!0;try{e:{O=!1,P&&(P=!1,Q(z),z=-1),_=!0;var tt=x;try{t:{for(H(Ie),v=t(c);v!==null&&!(v.expirationTime>Ie&&me());){var ht=v.callback;if(typeof ht=="function"){v.callback=null,x=v.priorityLevel;var ce=ht(v.expirationTime<=Ie);if(Ie=n.unstable_now(),typeof ce=="function"){v.callback=ce,H(Ie),Qe=!0;break t}v===t(c)&&i(c),H(Ie)}else i(c);v=t(c)}if(v!==null)Qe=!0;else{var Le=t(A);Le!==null&&je(G,Le.startTime-Ie),Qe=!1}}break e}finally{v=null,x=tt,_=!1}Qe=void 0}}finally{Qe?_e():Y=!1}}}var _e;if(typeof V=="function")_e=function(){V(fe)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,ke=we.port2;we.port1.onmessage=fe,_e=function(){ke.postMessage(null)}}else _e=function(){j(fe,0)};function je(Ie,Qe){z=j(function(){Ie(n.unstable_now())},Qe)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Ie){Ie.callback=null},n.unstable_forceFrameRate=function(Ie){0>Ie||125<Ie?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):se=0<Ie?Math.floor(1e3/Ie):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(Ie){switch(x){case 1:case 2:case 3:var Qe=3;break;default:Qe=x}var tt=x;x=Qe;try{return Ie()}finally{x=tt}},n.unstable_requestPaint=function(){F=!0},n.unstable_runWithPriority=function(Ie,Qe){switch(Ie){case 1:case 2:case 3:case 4:case 5:break;default:Ie=3}var tt=x;x=Ie;try{return Qe()}finally{x=tt}},n.unstable_scheduleCallback=function(Ie,Qe,tt){var ht=n.unstable_now();switch(typeof tt=="object"&&tt!==null?(tt=tt.delay,tt=typeof tt=="number"&&0<tt?ht+tt:ht):tt=ht,Ie){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=tt+ce,Ie={id:m++,callback:Qe,priorityLevel:Ie,startTime:tt,expirationTime:ce,sortIndex:-1},tt>ht?(Ie.sortIndex=tt,e(A,Ie),t(c)===null&&Ie===t(A)&&(P?(Q(z),z=-1):P=!0,je(G,tt-ht))):(Ie.sortIndex=ce,e(c,Ie),O||_||(O=!0,Y||(Y=!0,_e()))),Ie},n.unstable_shouldYield=me,n.unstable_wrapCallback=function(Ie){var Qe=x;return function(){var tt=x;x=Qe;try{return Ie.apply(this,arguments)}finally{x=tt}}}})(Y6)),Y6}var IL;function Fae(){return IL||(IL=1,q6.exports=Lae()),q6.exports}var $6={exports:{}},BA={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var kL;function zae(){if(kL)return BA;kL=1;var n=La();function e(c){var A="https://react.dev/errors/"+c;if(1<arguments.length){A+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)A+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+c+"; visit "+A+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var i={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},r=Symbol.for("react.portal");function o(c,A,m){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:v==null?null:""+v,children:c,containerInfo:A,implementation:m}}var s=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(c,A){if(c==="font")return"";if(typeof A=="string")return A==="use-credentials"?A:""}return BA.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,BA.createPortal=function(c,A){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!A||A.nodeType!==1&&A.nodeType!==9&&A.nodeType!==11)throw Error(e(299));return o(c,A,null,m)},BA.flushSync=function(c){var A=s.T,m=i.p;try{if(s.T=null,i.p=2,c)return c()}finally{s.T=A,i.p=m,i.d.f()}},BA.preconnect=function(c,A){typeof c=="string"&&(A?(A=A.crossOrigin,A=typeof A=="string"?A==="use-credentials"?A:"":void 0):A=null,i.d.C(c,A))},BA.prefetchDNS=function(c){typeof c=="string"&&i.d.D(c)},BA.preinit=function(c,A){if(typeof c=="string"&&A&&typeof A.as=="string"){var m=A.as,v=a(m,A.crossOrigin),x=typeof A.integrity=="string"?A.integrity:void 0,_=typeof A.fetchPriority=="string"?A.fetchPriority:void 0;m==="style"?i.d.S(c,typeof A.precedence=="string"?A.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:_}):m==="script"&&i.d.X(c,{crossOrigin:v,integrity:x,fetchPriority:_,nonce:typeof A.nonce=="string"?A.nonce:void 0})}},BA.preinitModule=function(c,A){if(typeof c=="string")if(typeof A=="object"&&A!==null){if(A.as==null||A.as==="script"){var m=a(A.as,A.crossOrigin);i.d.M(c,{crossOrigin:m,integrity:typeof A.integrity=="string"?A.integrity:void 0,nonce:typeof A.nonce=="string"?A.nonce:void 0})}}else A==null&&i.d.M(c)},BA.preload=function(c,A){if(typeof c=="string"&&typeof A=="object"&&A!==null&&typeof A.as=="string"){var m=A.as,v=a(m,A.crossOrigin);i.d.L(c,m,{crossOrigin:v,integrity:typeof A.integrity=="string"?A.integrity:void 0,nonce:typeof A.nonce=="string"?A.nonce:void 0,type:typeof A.type=="string"?A.type:void 0,fetchPriority:typeof A.fetchPriority=="string"?A.fetchPriority:void 0,referrerPolicy:typeof A.referrerPolicy=="string"?A.referrerPolicy:void 0,imageSrcSet:typeof A.imageSrcSet=="string"?A.imageSrcSet:void 0,imageSizes:typeof A.imageSizes=="string"?A.imageSizes:void 0,media:typeof A.media=="string"?A.media:void 0})}},BA.preloadModule=function(c,A){if(typeof c=="string")if(A){var m=a(A.as,A.crossOrigin);i.d.m(c,{as:typeof A.as=="string"&&A.as!=="script"?A.as:void 0,crossOrigin:m,integrity:typeof A.integrity=="string"?A.integrity:void 0})}else i.d.m(c)},BA.requestFormReset=function(c){i.d.r(c)},BA.unstable_batchedUpdates=function(c,A){return c(A)},BA.useFormState=function(c,A,m){return s.H.useFormState(c,A,m)},BA.useFormStatus=function(){return s.H.useHostTransitionStatus()},BA.version="19.1.1",BA}var TL;function kD(){if(TL)return $6.exports;TL=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),$6.exports=zae(),$6.exports}var RL;function jae(){if(RL)return $x;RL=1;/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var n=Fae(),e=La(),t=kD();function i(h){var g="https://react.dev/errors/"+h;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var M=2;M<arguments.length;M++)g+="&args[]="+encodeURIComponent(arguments[M])}return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)}function o(h){var g=h,M=h;if(h.alternate)for(;g.return;)g=g.return;else{h=g;do g=h,(g.flags&4098)!==0&&(M=g.return),h=g.return;while(h)}return g.tag===3?M:null}function s(h){if(h.tag===13){var g=h.memoizedState;if(g===null&&(h=h.alternate,h!==null&&(g=h.memoizedState)),g!==null)return g.dehydrated}return null}function a(h){if(o(h)!==h)throw Error(i(188))}function c(h){var g=h.alternate;if(!g){if(g=o(h),g===null)throw Error(i(188));return g!==h?null:h}for(var M=h,I=g;;){var N=M.return;if(N===null)break;var te=N.alternate;if(te===null){if(I=N.return,I!==null){M=I;continue}break}if(N.child===te.child){for(te=N.child;te;){if(te===M)return a(N),h;if(te===I)return a(N),g;te=te.sibling}throw Error(i(188))}if(M.return!==I.return)M=N,I=te;else{for(var Re=!1,Ye=N.child;Ye;){if(Ye===M){Re=!0,M=N,I=te;break}if(Ye===I){Re=!0,I=N,M=te;break}Ye=Ye.sibling}if(!Re){for(Ye=te.child;Ye;){if(Ye===M){Re=!0,M=te,I=N;break}if(Ye===I){Re=!0,I=te,M=N;break}Ye=Ye.sibling}if(!Re)throw Error(i(189))}}if(M.alternate!==I)throw Error(i(190))}if(M.tag!==3)throw Error(i(188));return M.stateNode.current===M?h:g}function A(h){var g=h.tag;if(g===5||g===26||g===27||g===6)return h;for(h=h.child;h!==null;){if(g=A(h),g!==null)return g;h=h.sibling}return null}var m=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),Q=Symbol.for("react.consumer"),V=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),me=Symbol.for("react.memo_cache_sentinel"),fe=Symbol.iterator;function _e(h){return h===null||typeof h!="object"?null:(h=fe&&h[fe]||h["@@iterator"],typeof h=="function"?h:null)}var we=Symbol.for("react.client.reference");function ke(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===we?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case O:return"Fragment";case F:return"Profiler";case P:return"StrictMode";case G:return"Suspense";case Y:return"SuspenseList";case le:return"Activity"}if(typeof h=="object")switch(h.$$typeof){case _:return"Portal";case V:return(h.displayName||"Context")+".Provider";case Q:return(h._context.displayName||"Context")+".Consumer";case H:var g=h.render;return h=h.displayName,h||(h=g.displayName||g.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case z:return g=h.displayName||null,g!==null?g:ke(h.type)||"Memo";case se:g=h._payload,h=h._init;try{return ke(h(g))}catch{}}return null}var je=Array.isArray,Ie=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Qe=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,tt={pending:!1,data:null,method:null,action:null},ht=[],ce=-1;function Le(h){return{current:h}}function We(h){0>ce||(h.current=ht[ce],ht[ce]=null,ce--)}function Me(h,g){ce++,ht[ce]=h.current,h.current=g}var dt=Le(null),it=Le(null),vt=Le(null),Ut=Le(null);function Pe(h,g){switch(Me(vt,g),Me(it,h),Me(dt,null),g.nodeType){case 9:case 11:h=(h=g.documentElement)&&(h=h.namespaceURI)?Es(h):0;break;default:if(h=g.tagName,g=g.namespaceURI)g=Es(g),h=fs(g,h);else switch(h){case"svg":h=1;break;case"math":h=2;break;default:h=0}}We(dt),Me(dt,h)}function Te(){We(dt),We(it),We(vt)}function Se(h){h.memoizedState!==null&&Me(Ut,h);var g=dt.current,M=fs(g,h.type);g!==M&&(Me(it,h),Me(dt,M))}function Ne(h){it.current===h&&(We(dt),We(it)),Ut.current===h&&(We(Ut),Oe._currentValue=tt)}var ut=Object.prototype.hasOwnProperty,rt=n.unstable_scheduleCallback,mt=n.unstable_cancelCallback,Rt=n.unstable_shouldYield,Bt=n.unstable_requestPaint,$t=n.unstable_now,Rn=n.unstable_getCurrentPriorityLevel,zn=n.unstable_ImmediatePriority,ai=n.unstable_UserBlockingPriority,_n=n.unstable_NormalPriority,Bn=n.unstable_LowPriority,dn=n.unstable_IdlePriority,li=n.log,In=n.unstable_setDisableYieldValue,It=null,xe=null;function oe(h){if(typeof li=="function"&&In(h),xe&&typeof xe.setStrictMode=="function")try{xe.setStrictMode(It,h)}catch{}}var J=Math.clz32?Math.clz32:Ce,ne=Math.log,ue=Math.LN2;function Ce(h){return h>>>=0,h===0?32:31-(ne(h)/ue|0)|0}var Ue=256,He=4194304;function lt(h){var g=h&42;if(g!==0)return g;switch(h&-h){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return h&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return h}}function be(h,g,M){var I=h.pendingLanes;if(I===0)return 0;var N=0,te=h.suspendedLanes,Re=h.pingedLanes;h=h.warmLanes;var Ye=I&134217727;return Ye!==0?(I=Ye&~te,I!==0?N=lt(I):(Re&=Ye,Re!==0?N=lt(Re):M||(M=Ye&~h,M!==0&&(N=lt(M))))):(Ye=I&~te,Ye!==0?N=lt(Ye):Re!==0?N=lt(Re):M||(M=I&~h,M!==0&&(N=lt(M)))),N===0?0:g!==0&&g!==N&&(g&te)===0&&(te=N&-N,M=g&-g,te>=M||te===32&&(M&4194048)!==0)?g:N}function Ee(h,g){return(h.pendingLanes&~(h.suspendedLanes&~h.pingedLanes)&g)===0}function y(h,g){switch(h){case 1:case 2:case 4:case 8:case 64:return g+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return g+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gt(){var h=Ue;return Ue<<=1,(Ue&4194048)===0&&(Ue=256),h}function Mt(){var h=He;return He<<=1,(He&62914560)===0&&(He=4194304),h}function Dt(h){for(var g=[],M=0;31>M;M++)g.push(h);return g}function ot(h,g){h.pendingLanes|=g,g!==268435456&&(h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0)}function bn(h,g,M,I,N,te){var Re=h.pendingLanes;h.pendingLanes=M,h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0,h.expiredLanes&=M,h.entangledLanes&=M,h.errorRecoveryDisabledLanes&=M,h.shellSuspendCounter=0;var Ye=h.entanglements,bt=h.expirationTimes,Gt=h.hiddenUpdates;for(M=Re&~M;0<M;){var an=31-J(M),fn=1<<an;Ye[an]=0,bt[an]=-1;var en=Gt[an];if(en!==null)for(Gt[an]=null,an=0;an<en.length;an++){var Yt=en[an];Yt!==null&&(Yt.lane&=-536870913)}M&=~fn}I!==0&&Gn(h,I,0),te!==0&&N===0&&h.tag!==0&&(h.suspendedLanes|=te&~(Re&~g))}function Gn(h,g,M){h.pendingLanes|=g,h.suspendedLanes&=~g;var I=31-J(g);h.entangledLanes|=g,h.entanglements[I]=h.entanglements[I]|1073741824|M&4194090}function yn(h,g){var M=h.entangledLanes|=g;for(h=h.entanglements;M;){var I=31-J(M),N=1<<I;N&g|h[I]&g&&(h[I]|=g),M&=~N}}function qn(h){switch(h){case 2:h=1;break;case 8:h=4;break;case 32:h=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:h=128;break;case 268435456:h=134217728;break;default:h=0}return h}function $n(h){return h&=-h,2<h?8<h?(h&134217727)!==0?32:268435456:8:2}function mi(){var h=Qe.p;return h!==0?h:(h=window.event,h===void 0?32:Ci(h.type))}function ir(h,g){var M=Qe.p;try{return Qe.p=h,g()}finally{Qe.p=M}}var di=Math.random().toString(36).slice(2),Vn="__reactFiber$"+di,Fn="__reactProps$"+di,Ti="__reactContainer$"+di,on="__reactEvents$"+di,qr="__reactListeners$"+di,Di="__reactHandles$"+di,js="__reactResources$"+di,ea="__reactMarker$"+di;function Pn(h){delete h[Vn],delete h[Fn],delete h[on],delete h[qr],delete h[Di]}function Gi(h){var g=h[Vn];if(g)return g;for(var M=h.parentNode;M;){if(g=M[Ti]||M[Vn]){if(M=g.alternate,g.child!==null||M!==null&&M.child!==null)for(h=S0(h);h!==null;){if(M=h[Vn])return M;h=S0(h)}return g}h=M,M=h.parentNode}return null}function Li(h){if(h=h[Vn]||h[Ti]){var g=h.tag;if(g===5||g===6||g===13||g===26||g===27||g===3)return h}return null}function Xi(h){var g=h.tag;if(g===5||g===26||g===27||g===6)return h.stateNode;throw Error(i(33))}function Oa(h){var g=h[js];return g||(g=h[js]={hoistableStyles:new Map,hoistableScripts:new Map}),g}function lo(h){h[ea]=!0}var Fi=new Set,Cl={};function ra(h,g){uo(h,g),uo(h+"Capture",g)}function uo(h,g){for(Cl[h]=g,h=0;h<g.length;h++)Fi.add(g[h])}var Fa=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Fu={},So={};function AA(h){return ut.call(So,h)?!0:ut.call(Fu,h)?!1:Fa.test(h)?So[h]=!0:(Fu[h]=!0,!1)}function ta(h,g,M){if(AA(g))if(M===null)h.removeAttribute(g);else{switch(typeof M){case"undefined":case"function":case"symbol":h.removeAttribute(g);return;case"boolean":var I=g.toLowerCase().slice(0,5);if(I!=="data-"&&I!=="aria-"){h.removeAttribute(g);return}}h.setAttribute(g,""+M)}}function xr(h,g,M){if(M===null)h.removeAttribute(g);else{switch(typeof M){case"undefined":case"function":case"symbol":case"boolean":h.removeAttribute(g);return}h.setAttribute(g,""+M)}}function Xa(h,g,M,I){if(I===null)h.removeAttribute(M);else{switch(typeof I){case"undefined":case"function":case"symbol":case"boolean":h.removeAttribute(M);return}h.setAttributeNS(g,M,""+I)}}var cl,Bs;function fa(h){if(cl===void 0)try{throw Error()}catch(M){var g=M.stack.trim().match(/\n( *(at )?)/);cl=g&&g[1]||"",Bs=-1<M.stack.indexOf(`
at`)?" (<anonymous>)":-1<M.stack.indexOf("@")?"@unknown:0:0":""}return`
`+cl+h+Bs}var _l=!1;function zc(h,g){if(!h||_l)return"";_l=!0;var M=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var I={DetermineComponentFrameRoot:function(){try{if(g){var fn=function(){throw Error()};if(Object.defineProperty(fn.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fn,[])}catch(Yt){var en=Yt}Reflect.construct(h,[],fn)}else{try{fn.call()}catch(Yt){en=Yt}h.call(fn.prototype)}}else{try{throw Error()}catch(Yt){en=Yt}(fn=h())&&typeof fn.catch=="function"&&fn.catch(function(){})}}catch(Yt){if(Yt&&en&&typeof Yt.stack=="string")return[Yt.stack,en.stack]}return[null,null]}};I.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var N=Object.getOwnPropertyDescriptor(I.DetermineComponentFrameRoot,"name");N&&N.configurable&&Object.defineProperty(I.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var te=I.DetermineComponentFrameRoot(),Re=te[0],Ye=te[1];if(Re&&Ye){var bt=Re.split(`
`),Gt=Ye.split(`
`);for(N=I=0;I<bt.length&&!bt[I].includes("DetermineComponentFrameRoot");)I++;for(;N<Gt.length&&!Gt[N].includes("DetermineComponentFrameRoot");)N++;if(I===bt.length||N===Gt.length)for(I=bt.length-1,N=Gt.length-1;1<=I&&0<=N&&bt[I]!==Gt[N];)N--;for(;1<=I&&0<=N;I--,N--)if(bt[I]!==Gt[N]){if(I!==1||N!==1)do if(I--,N--,0>N||bt[I]!==Gt[N]){var an=`
`+bt[I].replace(" at new "," at ");return h.displayName&&an.includes("<anonymous>")&&(an=an.replace("<anonymous>",h.displayName)),an}while(1<=I&&0<=N);break}}}finally{_l=!1,Error.prepareStackTrace=M}return(M=h?h.displayName||h.name:"")?fa(M):""}function Ah(h){switch(h.tag){case 26:case 27:case 5:return fa(h.type);case 16:return fa("Lazy");case 13:return fa("Suspense");case 19:return fa("SuspenseList");case 0:case 15:return zc(h.type,!1);case 11:return zc(h.type.render,!1);case 1:return zc(h.type,!0);case 31:return fa("Activity");default:return""}}function hA(h){try{var g="";do g+=Ah(h),h=h.return;while(h);return g}catch(M){return`
Error generating stack: `+M.message+`
`+M.stack}}function Ns(h){switch(typeof h){case"bigint":case"boolean":case"number":case"string":case"undefined":return h;case"object":return h;default:return""}}function xl(h){var g=h.type;return(h=h.nodeName)&&h.toLowerCase()==="input"&&(g==="checkbox"||g==="radio")}function jc(h){var g=xl(h)?"checked":"value",M=Object.getOwnPropertyDescriptor(h.constructor.prototype,g),I=""+h[g];if(!h.hasOwnProperty(g)&&typeof M<"u"&&typeof M.get=="function"&&typeof M.set=="function"){var N=M.get,te=M.set;return Object.defineProperty(h,g,{configurable:!0,get:function(){return N.call(this)},set:function(Re){I=""+Re,te.call(this,Re)}}),Object.defineProperty(h,g,{enumerable:M.enumerable}),{getValue:function(){return I},setValue:function(Re){I=""+Re},stopTracking:function(){h._valueTracker=null,delete h[g]}}}}function Ja(h){h._valueTracker||(h._valueTracker=jc(h))}function Nc(h){if(!h)return!1;var g=h._valueTracker;if(!g)return!0;var M=g.getValue(),I="";return h&&(I=xl(h)?h.checked?"true":"false":h.value),h=I,h!==M?(g.setValue(h),!0):!1}function Al(h){if(h=h||(typeof document<"u"?document:void 0),typeof h>"u")return null;try{return h.activeElement||h.body}catch{return h.body}}var zu=/[\n"\\]/g;function Ba(h){return h.replace(zu,function(g){return"\\"+g.charCodeAt(0).toString(16)+" "})}function lc(h,g,M,I,N,te,Re,Ye){h.name="",Re!=null&&typeof Re!="function"&&typeof Re!="symbol"&&typeof Re!="boolean"?h.type=Re:h.removeAttribute("type"),g!=null?Re==="number"?(g===0&&h.value===""||h.value!=g)&&(h.value=""+Ns(g)):h.value!==""+Ns(g)&&(h.value=""+Ns(g)):Re!=="submit"&&Re!=="reset"||h.removeAttribute("value"),g!=null?Ml(h,Re,Ns(g)):M!=null?Ml(h,Re,Ns(M)):I!=null&&h.removeAttribute("value"),N==null&&te!=null&&(h.defaultChecked=!!te),N!=null&&(h.checked=N&&typeof N!="function"&&typeof N!="symbol"),Ye!=null&&typeof Ye!="function"&&typeof Ye!="symbol"&&typeof Ye!="boolean"?h.name=""+Ns(Ye):h.removeAttribute("name")}function uu(h,g,M,I,N,te,Re,Ye){if(te!=null&&typeof te!="function"&&typeof te!="symbol"&&typeof te!="boolean"&&(h.type=te),g!=null||M!=null){if(!(te!=="submit"&&te!=="reset"||g!=null))return;M=M!=null?""+Ns(M):"",g=g!=null?""+Ns(g):M,Ye||g===h.value||(h.value=g),h.defaultValue=g}I=I??N,I=typeof I!="function"&&typeof I!="symbol"&&!!I,h.checked=Ye?h.checked:!!I,h.defaultChecked=!!I,Re!=null&&typeof Re!="function"&&typeof Re!="symbol"&&typeof Re!="boolean"&&(h.name=Re)}function Ml(h,g,M){g==="number"&&Al(h.ownerDocument)===h||h.defaultValue===""+M||(h.defaultValue=""+M)}function cu(h,g,M,I){if(h=h.options,g){g={};for(var N=0;N<M.length;N++)g["$"+M[N]]=!0;for(M=0;M<h.length;M++)N=g.hasOwnProperty("$"+h[M].value),h[M].selected!==N&&(h[M].selected=N),N&&I&&(h[M].defaultSelected=!0)}else{for(M=""+Ns(M),g=null,N=0;N<h.length;N++){if(h[N].value===M){h[N].selected=!0,I&&(h[N].defaultSelected=!0);return}g!==null||h[N].disabled||(g=h[N])}g!==null&&(g.selected=!0)}}function zA(h,g,M){if(g!=null&&(g=""+Ns(g),g!==h.value&&(h.value=g),M==null)){h.defaultValue!==g&&(h.defaultValue=g);return}h.defaultValue=M!=null?""+Ns(M):""}function Ia(h,g,M,I){if(g==null){if(I!=null){if(M!=null)throw Error(i(92));if(je(I)){if(1<I.length)throw Error(i(93));I=I[0]}M=I}M==null&&(M=""),g=M}M=Ns(g),h.defaultValue=M,I=h.textContent,I===M&&I!==""&&I!==null&&(h.value=I)}function jo(h,g){if(g){var M=h.firstChild;if(M&&M===h.lastChild&&M.nodeType===3){M.nodeValue=g;return}}h.textContent=g}var xo=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Wi(h,g,M){var I=g.indexOf("--")===0;M==null||typeof M=="boolean"||M===""?I?h.setProperty(g,""):g==="float"?h.cssFloat="":h[g]="":I?h.setProperty(g,M):typeof M!="number"||M===0||xo.has(g)?g==="float"?h.cssFloat=M:h[g]=(""+M).trim():h[g]=M+"px"}function Ql(h,g,M){if(g!=null&&typeof g!="object")throw Error(i(62));if(h=h.style,M!=null){for(var I in M)!M.hasOwnProperty(I)||g!=null&&g.hasOwnProperty(I)||(I.indexOf("--")===0?h.setProperty(I,""):I==="float"?h.cssFloat="":h[I]="");for(var N in g)I=g[N],g.hasOwnProperty(N)&&M[N]!==I&&Wi(h,N,I)}else for(var te in g)g.hasOwnProperty(te)&&Wi(h,te,g[te])}function Fo(h){if(h.indexOf("-")===-1)return!1;switch(h){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wl=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Au=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function er(h){return Au.test(""+h)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":h}var Sl=null;function ju(h){return h=h.target||h.srcElement||window,h.correspondingUseElement&&(h=h.correspondingUseElement),h.nodeType===3?h.parentNode:h}var Mo=null,es=null;function ls(h){var g=Li(h);if(g&&(h=g.stateNode)){var M=h[Fn]||null;e:switch(h=g.stateNode,g.type){case"input":if(lc(h,M.value,M.defaultValue,M.defaultValue,M.checked,M.defaultChecked,M.type,M.name),g=M.name,M.type==="radio"&&g!=null){for(M=h;M.parentNode;)M=M.parentNode;for(M=M.querySelectorAll('input[name="'+Ba(""+g)+'"][type="radio"]'),g=0;g<M.length;g++){var I=M[g];if(I!==h&&I.form===h.form){var N=I[Fn]||null;if(!N)throw Error(i(90));lc(I,N.value,N.defaultValue,N.defaultValue,N.checked,N.defaultChecked,N.type,N.name)}}for(g=0;g<M.length;g++)I=M[g],I.form===h.form&&Nc(I)}break e;case"textarea":zA(h,M.value,M.defaultValue);break e;case"select":g=M.value,g!=null&&cu(h,!!M.multiple,g,!1)}}}var No=!1;function Go(h,g,M){if(No)return h(g,M);No=!0;try{var I=h(g);return I}finally{if(No=!1,(Mo!==null||es!==null)&&(F1(),Mo&&(g=Mo,h=es,es=Mo=null,ls(g),h)))for(g=0;g<h.length;g++)ls(h[g])}}function Mr(h,g){var M=h.stateNode;if(M===null)return null;var I=M[Fn]||null;if(I===null)return null;M=I[g];e:switch(g){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(I=!I.disabled)||(h=h.type,I=!(h==="button"||h==="input"||h==="select"||h==="textarea")),h=!I;break e;default:h=!1}if(h)return null;if(M&&typeof M!="function")throw Error(i(231,g,typeof M));return M}var El=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),us=!1;if(El)try{var bs={};Object.defineProperty(bs,"passive",{get:function(){us=!0}}),window.addEventListener("test",bs,bs),window.removeEventListener("test",bs,bs)}catch{us=!1}var Ro=null,gr=null,el=null;function Si(){if(el)return el;var h,g=gr,M=g.length,I,N="value"in Ro?Ro.value:Ro.textContent,te=N.length;for(h=0;h<M&&g[h]===N[h];h++);var Re=M-h;for(I=1;I<=Re&&g[M-I]===N[te-I];I++);return el=N.slice(h,1<I?1-I:void 0)}function ti(h){var g=h.keyCode;return"charCode"in h?(h=h.charCode,h===0&&g===13&&(h=13)):h=g,h===10&&(h=13),32<=h||h===13?h:0}function wr(){return!0}function X(){return!1}function ve(h){function g(M,I,N,te,Re){this._reactName=M,this._targetInst=N,this.type=I,this.nativeEvent=te,this.target=Re,this.currentTarget=null;for(var Ye in h)h.hasOwnProperty(Ye)&&(M=h[Ye],this[Ye]=M?M(te):te[Ye]);return this.isDefaultPrevented=(te.defaultPrevented!=null?te.defaultPrevented:te.returnValue===!1)?wr:X,this.isPropagationStopped=X,this}return m(g.prototype,{preventDefault:function(){this.defaultPrevented=!0;var M=this.nativeEvent;M&&(M.preventDefault?M.preventDefault():typeof M.returnValue!="unknown"&&(M.returnValue=!1),this.isDefaultPrevented=wr)},stopPropagation:function(){var M=this.nativeEvent;M&&(M.stopPropagation?M.stopPropagation():typeof M.cancelBubble!="unknown"&&(M.cancelBubble=!0),this.isPropagationStopped=wr)},persist:function(){},isPersistent:wr}),g}var $e={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(h){return h.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},St=ve($e),ri=m({},$e,{view:0,detail:0}),kn=ve(ri),xi,Ki,Ri,Ei=m({},ri,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:du,button:0,buttons:0,relatedTarget:function(h){return h.relatedTarget===void 0?h.fromElement===h.srcElement?h.toElement:h.fromElement:h.relatedTarget},movementX:function(h){return"movementX"in h?h.movementX:(h!==Ri&&(Ri&&h.type==="mousemove"?(xi=h.screenX-Ri.screenX,Ki=h.screenY-Ri.screenY):Ki=xi=0,Ri=h),xi)},movementY:function(h){return"movementY"in h?h.movementY:Ki}}),Or=ve(Ei),zr=m({},Ei,{dataTransfer:0}),ji=ve(zr),Ar=m({},ri,{relatedTarget:0}),jr=ve(Ar),Cs=m({},$e,{animationName:0,elapsedTime:0,pseudoElement:0}),Sr=ve(Cs),za=m({},$e,{clipboardData:function(h){return"clipboardData"in h?h.clipboardData:window.clipboardData}}),uc=ve(za),hu=m({},$e,{data:0}),Gs=ve(hu),cf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ts={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},lp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gc(h){var g=this.nativeEvent;return g.getModifierState?g.getModifierState(h):(h=lp[h])?!!g[h]:!1}function du(){return Gc}var hh=m({},ri,{key:function(h){if(h.key){var g=cf[h.key]||h.key;if(g!=="Unidentified")return g}return h.type==="keypress"?(h=ti(h),h===13?"Enter":String.fromCharCode(h)):h.type==="keydown"||h.type==="keyup"?ts[h.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:du,charCode:function(h){return h.type==="keypress"?ti(h):0},keyCode:function(h){return h.type==="keydown"||h.type==="keyup"?h.keyCode:0},which:function(h){return h.type==="keypress"?ti(h):h.type==="keydown"||h.type==="keyup"?h.keyCode:0}}),ld=ve(hh),Nr=m({},Ei,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dA=ve(Nr),Af=m({},ri,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:du}),ov=ve(Af),up=m({},$e,{propertyName:0,elapsedTime:0,pseudoElement:0}),sv=ve(up),av=m({},Ei,{deltaX:function(h){return"deltaX"in h?h.deltaX:"wheelDeltaX"in h?-h.wheelDeltaX:0},deltaY:function(h){return"deltaY"in h?h.deltaY:"wheelDeltaY"in h?-h.wheelDeltaY:"wheelDelta"in h?-h.wheelDelta:0},deltaZ:0,deltaMode:0}),Mm=ve(av),wm=m({},$e,{newState:0,oldState:0}),fA=ve(wm),dh=[9,13,27,32],hf=El&&"CompositionEvent"in window,Ol=null;El&&"documentMode"in document&&(Ol=document.documentMode);var u1=El&&"TextEvent"in window&&!Ol,ud=El&&(!hf||Ol&&8<Ol&&11>=Ol),fh=" ",cd=!1;function c1(h,g){switch(h){case"keyup":return dh.indexOf(g.keyCode)!==-1;case"keydown":return g.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ad(h){return h=h.detail,typeof h=="object"&&"data"in h?h.data:null}var ph=!1;function hd(h,g){switch(h){case"compositionend":return Ad(g);case"keypress":return g.which!==32?null:(cd=!0,fh);case"textInput":return h=g.data,h===fh&&cd?null:h;default:return null}}function Hg(h,g){if(ph)return h==="compositionend"||!hf&&c1(h,g)?(h=Si(),el=gr=Ro=null,ph=!1,h):null;switch(h){case"paste":return null;case"keypress":if(!(g.ctrlKey||g.altKey||g.metaKey)||g.ctrlKey&&g.altKey){if(g.char&&1<g.char.length)return g.char;if(g.which)return String.fromCharCode(g.which)}return null;case"compositionend":return ud&&g.locale!=="ko"?null:g.data;default:return null}}var ql={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Sm(h){var g=h&&h.nodeName&&h.nodeName.toLowerCase();return g==="input"?!!ql[h.type]:g==="textarea"}function dd(h,g,M,I){Mo?es?es.push(I):es=[I]:Mo=I,g=tg(g,"onChange"),0<g.length&&(M=new St("onChange","change",null,M,I),h.push({event:M,listeners:g}))}var mh=null,fd=null;function Em(h){fC(h,0)}function cp(h){var g=Xi(h);if(Nc(g))return h}function Zg(h,g){if(h==="change")return g}var gh=!1;if(El){var Ap;if(El){var pA="oninput"in document;if(!pA){var df=document.createElement("div");df.setAttribute("oninput","return;"),pA=typeof df.oninput=="function"}Ap=pA}else Ap=!1;gh=Ap&&(!document.documentMode||9<document.documentMode)}function A1(){mh&&(mh.detachEvent("onpropertychange",yh),fd=mh=null)}function yh(h){if(h.propertyName==="value"&&cp(fd)){var g=[];dd(g,fd,h,ju(h)),Go(Em,g)}}function Xg(h,g,M){h==="focusin"?(A1(),mh=g,fd=M,mh.attachEvent("onpropertychange",yh)):h==="focusout"&&A1()}function vh(h){if(h==="selectionchange"||h==="keyup"||h==="keydown")return cp(fd)}function hp(h,g){if(h==="click")return cp(g)}function h1(h,g){if(h==="input"||h==="change")return cp(g)}function Jg(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var Yl=typeof Object.is=="function"?Object.is:Jg;function Wc(h,g){if(Yl(h,g))return!0;if(typeof h!="object"||h===null||typeof g!="object"||g===null)return!1;var M=Object.keys(h),I=Object.keys(g);if(M.length!==I.length)return!1;for(I=0;I<M.length;I++){var N=M[I];if(!ut.call(g,N)||!Yl(h[N],g[N]))return!1}return!0}function $l(h){for(;h&&h.firstChild;)h=h.firstChild;return h}function Qc(h,g){var M=$l(h);h=0;for(var I;M;){if(M.nodeType===3){if(I=h+M.textContent.length,h<=g&&I>=g)return{node:M,offset:g-h};h=I}e:{for(;M;){if(M.nextSibling){M=M.nextSibling;break e}M=M.parentNode}M=void 0}M=$l(M)}}function co(h,g){return h&&g?h===g?!0:h&&h.nodeType===3?!1:g&&g.nodeType===3?co(h,g.parentNode):"contains"in h?h.contains(g):h.compareDocumentPosition?!!(h.compareDocumentPosition(g)&16):!1:!1}function Om(h){h=h!=null&&h.ownerDocument!=null&&h.ownerDocument.defaultView!=null?h.ownerDocument.defaultView:window;for(var g=Al(h.document);g instanceof h.HTMLIFrameElement;){try{var M=typeof g.contentWindow.location.href=="string"}catch{M=!1}if(M)h=g.contentWindow;else break;g=Al(h.document)}return g}function dp(h){var g=h&&h.nodeName&&h.nodeName.toLowerCase();return g&&(g==="input"&&(h.type==="text"||h.type==="search"||h.type==="tel"||h.type==="url"||h.type==="password")||g==="textarea"||h.contentEditable==="true")}var d1=El&&"documentMode"in document&&11>=document.documentMode,bh=null,fu=null,Pt=null,sn=!1;function nn(h,g,M){var I=M.window===M?M.document:M.nodeType===9?M:M.ownerDocument;sn||bh==null||bh!==Al(I)||(I=bh,"selectionStart"in I&&dp(I)?I={start:I.selectionStart,end:I.selectionEnd}:(I=(I.ownerDocument&&I.ownerDocument.defaultView||window).getSelection(),I={anchorNode:I.anchorNode,anchorOffset:I.anchorOffset,focusNode:I.focusNode,focusOffset:I.focusOffset}),Pt&&Wc(Pt,I)||(Pt=I,I=tg(fu,"onSelect"),0<I.length&&(g=new St("onSelect","select",null,g,M),h.push({event:g,listeners:I}),g.target=bh)))}function ui(h,g){var M={};return M[h.toLowerCase()]=g.toLowerCase(),M["Webkit"+h]="webkit"+g,M["Moz"+h]="moz"+g,M}var rr={animationend:ui("Animation","AnimationEnd"),animationiteration:ui("Animation","AnimationIteration"),animationstart:ui("Animation","AnimationStart"),transitionrun:ui("Transition","TransitionRun"),transitionstart:ui("Transition","TransitionStart"),transitioncancel:ui("Transition","TransitionCancel"),transitionend:ui("Transition","TransitionEnd")},go={},ka={};El&&(ka=document.createElement("div").style,"AnimationEvent"in window||(delete rr.animationend.animation,delete rr.animationiteration.animation,delete rr.animationstart.animation),"TransitionEvent"in window||delete rr.transitionend.transition);function yo(h){if(go[h])return go[h];if(!rr[h])return h;var g=rr[h],M;for(M in g)if(g.hasOwnProperty(M)&&M in ka)return go[h]=g[M];return h}var pd=yo("animationend"),fp=yo("animationiteration"),Bl=yo("animationstart"),ff=yo("transitionrun"),md=yo("transitionstart"),mA=yo("transitioncancel"),gA=yo("transitionend"),Il=new Map,Eo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Eo.push("scrollEnd");function cc(h,g){Il.set(h,g),ra(g,[h])}var pp=new WeakMap;function pa(h,g){if(typeof h=="object"&&h!==null){var M=pp.get(h);return M!==void 0?M:(g={value:h,source:g,stack:hA(g)},pp.set(h,g),g)}return{value:h,source:g,stack:hA(g)}}var Vl=[],jA=0,gd=0;function yA(){for(var h=jA,g=gd=jA=0;g<h;){var M=Vl[g];Vl[g++]=null;var I=Vl[g];Vl[g++]=null;var N=Vl[g];Vl[g++]=null;var te=Vl[g];if(Vl[g++]=null,I!==null&&N!==null){var Re=I.pending;Re===null?N.next=N:(N.next=Re.next,Re.next=N),I.pending=N}te!==0&&pf(M,N,te)}}function Ac(h,g,M,I){Vl[jA++]=h,Vl[jA++]=g,Vl[jA++]=M,Vl[jA++]=I,gd|=I,h.lanes|=I,h=h.alternate,h!==null&&(h.lanes|=I)}function qc(h,g,M,I){return Ac(h,g,M,I),yd(h)}function pu(h,g){return Ac(h,null,null,g),yd(h)}function pf(h,g,M){h.lanes|=M;var I=h.alternate;I!==null&&(I.lanes|=M);for(var N=!1,te=h.return;te!==null;)te.childLanes|=M,I=te.alternate,I!==null&&(I.childLanes|=M),te.tag===22&&(h=te.stateNode,h===null||h._visibility&1||(N=!0)),h=te,te=te.return;return h.tag===3?(te=h.stateNode,N&&g!==null&&(N=31-J(M),h=te.hiddenUpdates,I=h[N],I===null?h[N]=[g]:I.push(g),g.lane=M|536870912),te):null}function yd(h){if(50<Vm)throw Vm=0,Lp=null,Error(i(185));for(var g=h.return;g!==null;)h=g,g=h.return;return h.tag===3?h.stateNode:null}var fr={};function Ch(h,g,M,I){this.tag=h,this.key=M,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=g,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=I,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mu(h,g,M,I){return new Ch(h,g,M,I)}function _h(h){return h=h.prototype,!(!h||!h.isReactComponent)}function oa(h,g){var M=h.alternate;return M===null?(M=mu(h.tag,g,h.key,h.mode),M.elementType=h.elementType,M.type=h.type,M.stateNode=h.stateNode,M.alternate=h,h.alternate=M):(M.pendingProps=g,M.type=h.type,M.flags=0,M.subtreeFlags=0,M.deletions=null),M.flags=h.flags&65011712,M.childLanes=h.childLanes,M.lanes=h.lanes,M.child=h.child,M.memoizedProps=h.memoizedProps,M.memoizedState=h.memoizedState,M.updateQueue=h.updateQueue,g=h.dependencies,M.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext},M.sibling=h.sibling,M.index=h.index,M.ref=h.ref,M.refCleanup=h.refCleanup,M}function mf(h,g){h.flags&=65011714;var M=h.alternate;return M===null?(h.childLanes=0,h.lanes=g,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=M.childLanes,h.lanes=M.lanes,h.child=M.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=M.memoizedProps,h.memoizedState=M.memoizedState,h.updateQueue=M.updateQueue,h.type=M.type,g=M.dependencies,h.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext}),h}function Bm(h,g,M,I,N,te){var Re=0;if(I=h,typeof h=="function")_h(h)&&(Re=1);else if(typeof h=="string")Re=d(h,M,dt.current)?26:h==="html"||h==="head"||h==="body"?27:5;else e:switch(h){case le:return h=mu(31,M,g,N),h.elementType=le,h.lanes=te,h;case O:return xh(M.children,N,te,g);case P:Re=8,N|=24;break;case F:return h=mu(12,M,g,N|2),h.elementType=F,h.lanes=te,h;case G:return h=mu(13,M,g,N),h.elementType=G,h.lanes=te,h;case Y:return h=mu(19,M,g,N),h.elementType=Y,h.lanes=te,h;default:if(typeof h=="object"&&h!==null)switch(h.$$typeof){case j:case V:Re=10;break e;case Q:Re=9;break e;case H:Re=11;break e;case z:Re=14;break e;case se:Re=16,I=null;break e}Re=29,M=Error(i(130,h===null?"null":typeof h,"")),I=null}return g=mu(Re,M,g,N),g.elementType=h,g.type=I,g.lanes=te,g}function xh(h,g,M,I){return h=mu(7,h,I,g),h.lanes=M,h}function e0(h,g,M){return h=mu(6,h,null,g),h.lanes=M,h}function Mh(h,g,M){return g=mu(4,h.children!==null?h.children:[],h.key,g),g.lanes=M,g.stateNode={containerInfo:h.containerInfo,pendingChildren:null,implementation:h.implementation},g}var hc=[],dc=0,wh=null,vd=0,Nu=[],kl=0,Wo=null,ns=1,fc="";function NA(h,g){hc[dc++]=vd,hc[dc++]=wh,wh=h,vd=g}function GA(h,g,M){Nu[kl++]=ns,Nu[kl++]=fc,Nu[kl++]=Wo,Wo=h;var I=ns;h=fc;var N=32-J(I)-1;I&=~(1<<N),M+=1;var te=32-J(g)+N;if(30<te){var Re=N-N%5;te=(I&(1<<Re)-1).toString(32),I>>=Re,N-=Re,ns=1<<32-J(g)+N|M<<N|I,fc=te+h}else ns=1<<te|M<<N|I,fc=h}function mp(h){h.return!==null&&(NA(h,1),GA(h,1,0))}function Sh(h){for(;h===wh;)wh=hc[--dc],hc[dc]=null,vd=hc[--dc],hc[dc]=null;for(;h===Wo;)Wo=Nu[--kl],Nu[kl]=null,fc=Nu[--kl],Nu[kl]=null,ns=Nu[--kl],Nu[kl]=null}var Is=null,_s=null,Vr=!1,pc=null,hl=!1,Eh=Error(i(519));function mc(h){var g=Error(i(418,""));throw gc(pa(g,h)),Eh}function Im(h){var g=h.stateNode,M=h.type,I=h.memoizedProps;switch(g[Vn]=h,g[Fn]=I,M){case"dialog":ho("cancel",g),ho("close",g);break;case"iframe":case"object":case"embed":ho("load",g);break;case"video":case"audio":for(M=0;M<Rf.length;M++)ho(Rf[M],g);break;case"source":ho("error",g);break;case"img":case"image":case"link":ho("error",g),ho("load",g);break;case"details":ho("toggle",g);break;case"input":ho("invalid",g),uu(g,I.value,I.defaultValue,I.checked,I.defaultChecked,I.type,I.name,!0),Ja(g);break;case"select":ho("invalid",g);break;case"textarea":ho("invalid",g),Ia(g,I.value,I.defaultValue,I.children),Ja(g)}M=I.children,typeof M!="string"&&typeof M!="number"&&typeof M!="bigint"||g.textContent===""+M||I.suppressHydrationWarning===!0||Iv(g.textContent,M)?(I.popover!=null&&(ho("beforetoggle",g),ho("toggle",g)),I.onScroll!=null&&ho("scroll",g),I.onScrollEnd!=null&&ho("scrollend",g),I.onClick!=null&&(g.onclick=ng),g=!0):g=!1,g||mc(h)}function Ws(h){for(Is=h.return;Is;)switch(Is.tag){case 5:case 13:hl=!1;return;case 27:case 3:hl=!0;return;default:Is=Is.return}}function gu(h){if(h!==Is)return!1;if(!Vr)return Ws(h),Vr=!0,!1;var g=h.tag,M;if((M=g!==3&&g!==27)&&((M=g===5)&&(M=h.type,M=!(M!=="form"&&M!=="button")||M0(h.type,h.memoizedProps)),M=!M),M&&_s&&mc(h),Ws(h),g===13){if(h=h.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));e:{for(h=h.nextSibling,g=0;h;){if(h.nodeType===8)if(M=h.data,M==="/$"){if(g===0){_s=kc(h.nextSibling);break e}g--}else M!=="$"&&M!=="$!"&&M!=="$?"||g++;h=h.nextSibling}_s=null}}else g===27?(g=_s,iA(h.type)?(h=ey,ey=null,_s=h):_s=g):_s=Is?kc(h.stateNode.nextSibling):null;return!0}function Tl(){_s=Is=null,Vr=!1}function gp(){var h=pc;return h!==null&&(Su===null?Su=h:Su.push.apply(Su,h),pc=null),h}function gc(h){pc===null?pc=[h]:pc.push(h)}var Oh=Le(null),yu=null,qe=null;function ma(h,g,M){Me(Oh,g._currentValue),g._currentValue=M}function vu(h){h._currentValue=Oh.current,We(Oh)}function Hl(h,g,M){for(;h!==null;){var I=h.alternate;if((h.childLanes&g)!==g?(h.childLanes|=g,I!==null&&(I.childLanes|=g)):I!==null&&(I.childLanes&g)!==g&&(I.childLanes|=g),h===M)break;h=h.return}}function Gr(h,g,M,I){var N=h.child;for(N!==null&&(N.return=h);N!==null;){var te=N.dependencies;if(te!==null){var Re=N.child;te=te.firstContext;e:for(;te!==null;){var Ye=te;te=N;for(var bt=0;bt<g.length;bt++)if(Ye.context===g[bt]){te.lanes|=M,Ye=te.alternate,Ye!==null&&(Ye.lanes|=M),Hl(te.return,M,h),I||(Re=null);break e}te=Ye.next}}else if(N.tag===18){if(Re=N.return,Re===null)throw Error(i(341));Re.lanes|=M,te=Re.alternate,te!==null&&(te.lanes|=M),Hl(Re,M,h),Re=null}else Re=N.child;if(Re!==null)Re.return=N;else for(Re=N;Re!==null;){if(Re===h){Re=null;break}if(N=Re.sibling,N!==null){N.return=Re.return,Re=N;break}Re=Re.return}N=Re}}function gf(h,g,M,I){h=null;for(var N=g,te=!1;N!==null;){if(!te){if((N.flags&524288)!==0)te=!0;else if((N.flags&262144)!==0)break}if(N.tag===10){var Re=N.alternate;if(Re===null)throw Error(i(387));if(Re=Re.memoizedProps,Re!==null){var Ye=N.type;Yl(N.pendingProps.value,Re.value)||(h!==null?h.push(Ye):h=[Ye])}}else if(N===Ut.current){if(Re=N.alternate,Re===null)throw Error(i(387));Re.memoizedState.memoizedState!==N.memoizedState.memoizedState&&(h!==null?h.push(Oe):h=[Oe])}N=N.return}h!==null&&Gr(g,h,M,I),g.flags|=262144}function yp(h){for(h=h.firstContext;h!==null;){if(!Yl(h.context._currentValue,h.memoizedValue))return!0;h=h.next}return!1}function Bh(h){yu=h,qe=null,h=h.dependencies,h!==null&&(h.firstContext=null)}function Oo(h){return Zl(yu,h)}function WA(h,g){return yu===null&&Bh(h),Zl(h,g)}function Zl(h,g){var M=g._currentValue;if(g={context:g,memoizedValue:M,next:null},qe===null){if(h===null)throw Error(i(308));qe=g,h.dependencies={lanes:0,firstContext:g},h.flags|=524288}else qe=qe.next=g;return M}var yf=typeof AbortController<"u"?AbortController:function(){var h=[],g=this.signal={aborted:!1,addEventListener:function(M,I){h.push(I)}};this.abort=function(){g.aborted=!0,h.forEach(function(M){return M()})}},t0=n.unstable_scheduleCallback,f1=n.unstable_NormalPriority,is={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ih(){return{controller:new yf,data:new Map,refCount:0}}function bd(h){h.refCount--,h.refCount===0&&t0(f1,function(){h.controller.abort()})}var vA=null,km=0,ja=0,Qs=null;function vf(h,g){if(vA===null){var M=vA=[];km=0,ja=Q1(),Qs={status:"pending",value:void 0,then:function(I){M.push(I)}}}return km++,g.then(yc,yc),g}function yc(){if(--km===0&&vA!==null){Qs!==null&&(Qs.status="fulfilled");var h=vA;vA=null,ja=0,Qs=null;for(var g=0;g<h.length;g++)(0,h[g])()}}function bf(h,g){var M=[],I={status:"pending",value:null,reason:null,then:function(N){M.push(N)}};return h.then(function(){I.status="fulfilled",I.value=g;for(var N=0;N<M.length;N++)(0,M[N])(g)},function(N){for(I.status="rejected",I.reason=N,N=0;N<M.length;N++)(0,M[N])(void 0)}),I}var p1=Ie.S;Ie.S=function(h,g){typeof g=="object"&&g!==null&&typeof g.then=="function"&&vf(h,g),p1!==null&&p1(h,g)};var Yc=Le(null);function QA(){var h=Yc.current;return h!==null?h:rs.pooledCache}function Tm(h,g){g===null?Me(Yc,Yc.current):Me(Yc,g.pool)}function Cf(){var h=QA();return h===null?null:{parent:is._currentValue,pool:h}}var Na=Error(i(460)),vc=Error(i(474)),Xn=Error(i(542)),vp={then:function(){}};function bp(h){return h=h.status,h==="fulfilled"||h==="rejected"}function _f(){}function kh(h,g,M){switch(M=h[M],M===void 0?h.push(g):M!==g&&(g.then(_f,_f),g=M),g.status){case"fulfilled":return g.value;case"rejected":throw h=g.reason,Ur(h),h;default:if(typeof g.status=="string")g.then(_f,_f);else{if(h=rs,h!==null&&100<h.shellSuspendCounter)throw Error(i(482));h=g,h.status="pending",h.then(function(I){if(g.status==="pending"){var N=g;N.status="fulfilled",N.value=I}},function(I){if(g.status==="pending"){var N=g;N.status="rejected",N.reason=I}})}switch(g.status){case"fulfilled":return g.value;case"rejected":throw h=g.reason,Ur(h),h}throw bc=g,Na}}var bc=null;function Cp(){if(bc===null)throw Error(i(459));var h=bc;return bc=null,h}function Ur(h){if(h===Na||h===Xn)throw Error(i(483))}var Gu=!1;function Cd(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qA(h,g){h=h.updateQueue,g.updateQueue===h&&(g.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,callbacks:null})}function Th(h){return{lane:h,tag:0,payload:null,callback:null,next:null}}function bA(h,g,M){var I=h.updateQueue;if(I===null)return null;if(I=I.shared,($o&2)!==0){var N=I.pending;return N===null?g.next=g:(g.next=N.next,N.next=g),I.pending=g,g=yd(h),pf(h,null,M),g}return Ac(h,I,g,M),yd(h)}function _d(h,g,M){if(g=g.updateQueue,g!==null&&(g=g.shared,(M&4194048)!==0)){var I=g.lanes;I&=h.pendingLanes,M|=I,g.lanes=M,yn(h,M)}}function Wu(h,g){var M=h.updateQueue,I=h.alternate;if(I!==null&&(I=I.updateQueue,M===I)){var N=null,te=null;if(M=M.firstBaseUpdate,M!==null){do{var Re={lane:M.lane,tag:M.tag,payload:M.payload,callback:null,next:null};te===null?N=te=Re:te=te.next=Re,M=M.next}while(M!==null);te===null?N=te=g:te=te.next=g}else N=te=g;M={baseState:I.baseState,firstBaseUpdate:N,lastBaseUpdate:te,shared:I.shared,callbacks:I.callbacks},h.updateQueue=M;return}h=M.lastBaseUpdate,h===null?M.firstBaseUpdate=g:h.next=g,M.lastBaseUpdate=g}var xf=!1;function Cc(){if(xf){var h=Qs;if(h!==null)throw h}}function tl(h,g,M,I){xf=!1;var N=h.updateQueue;Gu=!1;var te=N.firstBaseUpdate,Re=N.lastBaseUpdate,Ye=N.shared.pending;if(Ye!==null){N.shared.pending=null;var bt=Ye,Gt=bt.next;bt.next=null,Re===null?te=Gt:Re.next=Gt,Re=bt;var an=h.alternate;an!==null&&(an=an.updateQueue,Ye=an.lastBaseUpdate,Ye!==Re&&(Ye===null?an.firstBaseUpdate=Gt:Ye.next=Gt,an.lastBaseUpdate=bt))}if(te!==null){var fn=N.baseState;Re=0,an=Gt=bt=null,Ye=te;do{var en=Ye.lane&-536870913,Yt=en!==Ye.lane;if(Yt?(Io&en)===en:(I&en)===en){en!==0&&en===ja&&(xf=!0),an!==null&&(an=an.next={lane:0,tag:Ye.tag,payload:Ye.payload,callback:null,next:null});e:{var sr=h,nr=Ye;en=g;var os=M;switch(nr.tag){case 1:if(sr=nr.payload,typeof sr=="function"){fn=sr.call(os,fn,en);break e}fn=sr;break e;case 3:sr.flags=sr.flags&-65537|128;case 0:if(sr=nr.payload,en=typeof sr=="function"?sr.call(os,fn,en):sr,en==null)break e;fn=m({},fn,en);break e;case 2:Gu=!0}}en=Ye.callback,en!==null&&(h.flags|=64,Yt&&(h.flags|=8192),Yt=N.callbacks,Yt===null?N.callbacks=[en]:Yt.push(en))}else Yt={lane:en,tag:Ye.tag,payload:Ye.payload,callback:Ye.callback,next:null},an===null?(Gt=an=Yt,bt=fn):an=an.next=Yt,Re|=en;if(Ye=Ye.next,Ye===null){if(Ye=N.shared.pending,Ye===null)break;Yt=Ye,Ye=Yt.next,Yt.next=null,N.lastBaseUpdate=Yt,N.shared.pending=null}}while(!0);an===null&&(bt=fn),N.baseState=bt,N.firstBaseUpdate=Gt,N.lastBaseUpdate=an,te===null&&(N.shared.lanes=0),Bf|=Re,h.lanes=Re,h.memoizedState=fn}}function n0(h,g){if(typeof h!="function")throw Error(i(191,h));h.call(g)}function Rm(h,g){var M=h.callbacks;if(M!==null)for(h.callbacks=null,h=0;h<M.length;h++)n0(M[h],g)}var dl=Le(null),Ao=Le(0);function $c(h,g){h=tA,Me(Ao,h),Me(dl,g),tA=h|g.baseLanes}function xd(){Me(Ao,tA),Me(dl,dl.current)}function _p(){tA=Ao.current,We(dl),We(Ao)}var Qu=0,kr=null,Do=null,no=null,Xl=!1,CA=!1,Jn=!1,Pi=0,Rl=0,bu=null,xp=0;function or(){throw Error(i(321))}function Md(h,g){if(g===null)return!1;for(var M=0;M<g.length&&M<h.length;M++)if(!Yl(h[M],g[M]))return!1;return!0}function qu(h,g,M,I,N,te){return Qu=te,kr=g,g.memoizedState=null,g.updateQueue=null,g.lanes=0,Ie.H=h===null||h.memoizedState===null?Zc:Mc,Jn=!1,te=M(I,N),Jn=!1,CA&&(te=_c(g,M,I,N)),m1(h),te}function m1(h){Ie.H=pl;var g=Do!==null&&Do.next!==null;if(Qu=0,no=Do=kr=null,Xl=!1,Rl=0,bu=null,g)throw Error(i(300));h===null||Qa||(h=h.dependencies,h!==null&&yp(h)&&(Qa=!0))}function _c(h,g,M,I){kr=h;var N=0;do{if(CA&&(bu=null),Rl=0,CA=!1,25<=N)throw Error(i(301));if(N+=1,no=Do=null,h.updateQueue!=null){var te=h.updateQueue;te.lastEffect=null,te.events=null,te.stores=null,te.memoCache!=null&&(te.memoCache.index=0)}Ie.H=_u,te=g(M,I)}while(CA);return te}function xs(){var h=Ie.H,g=h.useState()[0];return g=typeof g.then=="function"?wd(g):g,h=h.useState()[0],(Do!==null?Do.memoizedState:null)!==h&&(kr.flags|=1024),g}function ks(){var h=Pi!==0;return Pi=0,h}function YA(h,g,M){g.updateQueue=h.updateQueue,g.flags&=-2053,h.lanes&=~M}function _A(h){if(Xl){for(h=h.memoizedState;h!==null;){var g=h.queue;g!==null&&(g.pending=null),h=h.next}Xl=!1}Qu=0,no=Do=kr=null,CA=!1,Rl=Pi=0,bu=null}function fl(){var h={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return no===null?kr.memoizedState=no=h:no=no.next=h,no}function Ts(){if(Do===null){var h=kr.alternate;h=h!==null?h.memoizedState:null}else h=Do.next;var g=no===null?kr.memoizedState:no.next;if(g!==null)no=g,Do=h;else{if(h===null)throw kr.alternate===null?Error(i(467)):Error(i(310));Do=h,h={memoizedState:Do.memoizedState,baseState:Do.baseState,baseQueue:Do.baseQueue,queue:Do.queue,next:null},no===null?kr.memoizedState=no=h:no=no.next=h}return no}function Yu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wd(h){var g=Rl;return Rl+=1,bu===null&&(bu=[]),h=kh(bu,h,g),g=kr,(no===null?g.memoizedState:no.next)===null&&(g=g.alternate,Ie.H=g===null||g.memoizedState===null?Zc:Mc),h}function $A(h){if(h!==null&&typeof h=="object"){if(typeof h.then=="function")return wd(h);if(h.$$typeof===V)return Oo(h)}throw Error(i(438,String(h)))}function Vc(h){var g=null,M=kr.updateQueue;if(M!==null&&(g=M.memoCache),g==null){var I=kr.alternate;I!==null&&(I=I.updateQueue,I!==null&&(I=I.memoCache,I!=null&&(g={data:I.data.map(function(N){return N.slice()}),index:0})))}if(g==null&&(g={data:[],index:0}),M===null&&(M=Yu(),kr.updateQueue=M),M.memoCache=g,M=g.data[g.index],M===void 0)for(M=g.data[g.index]=Array(h),I=0;I<h;I++)M[I]=me;return g.index++,M}function xc(h,g){return typeof g=="function"?g(h):g}function Mf(h){var g=Ts();return wf(g,Do,h)}function wf(h,g,M){var I=h.queue;if(I===null)throw Error(i(311));I.lastRenderedReducer=M;var N=h.baseQueue,te=I.pending;if(te!==null){if(N!==null){var Re=N.next;N.next=te.next,te.next=Re}g.baseQueue=N=te,I.pending=null}if(te=h.baseState,N===null)h.memoizedState=te;else{g=N.next;var Ye=Re=null,bt=null,Gt=g,an=!1;do{var fn=Gt.lane&-536870913;if(fn!==Gt.lane?(Io&fn)===fn:(Qu&fn)===fn){var en=Gt.revertLane;if(en===0)bt!==null&&(bt=bt.next={lane:0,revertLane:0,action:Gt.action,hasEagerState:Gt.hasEagerState,eagerState:Gt.eagerState,next:null}),fn===ja&&(an=!0);else if((Qu&en)===en){Gt=Gt.next,en===ja&&(an=!0);continue}else fn={lane:0,revertLane:Gt.revertLane,action:Gt.action,hasEagerState:Gt.hasEagerState,eagerState:Gt.eagerState,next:null},bt===null?(Ye=bt=fn,Re=te):bt=bt.next=fn,kr.lanes|=en,Bf|=en;fn=Gt.action,Jn&&M(te,fn),te=Gt.hasEagerState?Gt.eagerState:M(te,fn)}else en={lane:fn,revertLane:Gt.revertLane,action:Gt.action,hasEagerState:Gt.hasEagerState,eagerState:Gt.eagerState,next:null},bt===null?(Ye=bt=en,Re=te):bt=bt.next=en,kr.lanes|=fn,Bf|=fn;Gt=Gt.next}while(Gt!==null&&Gt!==g);if(bt===null?Re=te:bt.next=Ye,!Yl(te,h.memoizedState)&&(Qa=!0,an&&(M=Qs,M!==null)))throw M;h.memoizedState=te,h.baseState=Re,h.baseQueue=bt,I.lastRenderedState=te}return N===null&&(I.lanes=0),[h.memoizedState,I.dispatch]}function Mp(h){var g=Ts(),M=g.queue;if(M===null)throw Error(i(311));M.lastRenderedReducer=h;var I=M.dispatch,N=M.pending,te=g.memoizedState;if(N!==null){M.pending=null;var Re=N=N.next;do te=h(te,Re.action),Re=Re.next;while(Re!==N);Yl(te,g.memoizedState)||(Qa=!0),g.memoizedState=te,g.baseQueue===null&&(g.baseState=te),M.lastRenderedState=te}return[te,I]}function B(h,g,M){var I=kr,N=Ts(),te=Vr;if(te){if(M===void 0)throw Error(i(407));M=M()}else M=g();var Re=!Yl((Do||N).memoizedState,M);Re&&(N.memoizedState=M,Qa=!0),N=N.queue;var Ye=C.bind(null,I,N,h);if(Ot(2048,8,Ye,[h]),N.getSnapshot!==g||Re||no!==null&&no.memoizedState.tag&1){if(I.flags|=2048,ct(9,yt(),p.bind(null,I,N,M,g),null),rs===null)throw Error(i(349));te||(Qu&124)!==0||l(I,g,M)}return M}function l(h,g,M){h.flags|=16384,h={getSnapshot:g,value:M},g=kr.updateQueue,g===null?(g=Yu(),kr.updateQueue=g,g.stores=[h]):(M=g.stores,M===null?g.stores=[h]:M.push(h))}function p(h,g,M,I){g.value=M,g.getSnapshot=I,E(g)&&T(h)}function C(h,g,M){return M(function(){E(g)&&T(h)})}function E(h){var g=h.getSnapshot;h=h.value;try{var M=g();return!Yl(h,M)}catch{return!0}}function T(h){var g=pu(h,2);g!==null&&Bc(g,h,2)}function U(h){var g=fl();if(typeof h=="function"){var M=h;if(h=M(),Jn){oe(!0);try{M()}finally{oe(!1)}}}return g.memoizedState=g.baseState=h,g.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xc,lastRenderedState:h},g}function q(h,g,M,I){return h.baseState=M,wf(h,Do,typeof I=="function"?I:xc)}function Z(h,g,M,I,N){if(Sd(h))throw Error(i(485));if(h=g.action,h!==null){var te={payload:N,action:h,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(Re){te.listeners.push(Re)}};Ie.T!==null?M(!0):te.isTransition=!1,I(te),M=g.pending,M===null?(te.next=g.pending=te,ae(g,te)):(te.next=M.next,g.pending=M.next=te)}}function ae(h,g){var M=g.action,I=g.payload,N=h.state;if(g.isTransition){var te=Ie.T,Re={};Ie.T=Re;try{var Ye=M(N,I),bt=Ie.S;bt!==null&&bt(Re,Ye),Ae(h,g,Ye)}catch(Gt){pe(h,g,Gt)}finally{Ie.T=te}}else try{te=M(N,I),Ae(h,g,te)}catch(Gt){pe(h,g,Gt)}}function Ae(h,g,M){M!==null&&typeof M=="object"&&typeof M.then=="function"?M.then(function(I){ye(h,g,I)},function(I){return pe(h,g,I)}):ye(h,g,M)}function ye(h,g,M){g.status="fulfilled",g.value=M,Be(g),h.state=M,g=h.pending,g!==null&&(M=g.next,M===g?h.pending=null:(M=M.next,g.next=M,ae(h,M)))}function pe(h,g,M){var I=h.pending;if(h.pending=null,I!==null){I=I.next;do g.status="rejected",g.reason=M,Be(g),g=g.next;while(g!==I)}h.action=null}function Be(h){h=h.listeners;for(var g=0;g<h.length;g++)(0,h[g])()}function Fe(h,g){return g}function Xe(h,g){if(Vr){var M=rs.formState;if(M!==null){e:{var I=kr;if(Vr){if(_s){t:{for(var N=_s,te=hl;N.nodeType!==8;){if(!te){N=null;break t}if(N=kc(N.nextSibling),N===null){N=null;break t}}te=N.data,N=te==="F!"||te==="F"?N:null}if(N){_s=kc(N.nextSibling),I=N.data==="F!";break e}}mc(I)}I=!1}I&&(g=M[0])}}return M=fl(),M.memoizedState=M.baseState=g,I={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fe,lastRenderedState:g},M.queue=I,M=$u.bind(null,kr,I),I.dispatch=M,I=U(!1),te=HA.bind(null,kr,!1,I.queue),I=fl(),N={state:g,dispatch:null,action:h,pending:null},I.queue=N,M=Z.bind(null,kr,N,te,M),N.dispatch=M,I.memoizedState=h,[g,M,!1]}function Ze(h){var g=Ts();return et(g,Do,h)}function et(h,g,M){if(g=wf(h,g,Fe)[0],h=Mf(xc)[0],typeof g=="object"&&g!==null&&typeof g.then=="function")try{var I=wd(g)}catch(Re){throw Re===Na?Xn:Re}else I=g;g=Ts();var N=g.queue,te=N.dispatch;return M!==g.memoizedState&&(kr.flags|=2048,ct(9,yt(),st.bind(null,N,M),null)),[I,te,h]}function st(h,g){h.action=g}function nt(h){var g=Ts(),M=Do;if(M!==null)return et(g,M,h);Ts(),g=g.memoizedState,M=Ts();var I=M.queue.dispatch;return M.memoizedState=h,[g,I,!1]}function ct(h,g,M,I){return h={tag:h,create:M,deps:I,inst:g,next:null},g=kr.updateQueue,g===null&&(g=Yu(),kr.updateQueue=g),M=g.lastEffect,M===null?g.lastEffect=h.next=h:(I=M.next,M.next=h,h.next=I,g.lastEffect=h),h}function yt(){return{destroy:void 0,resource:void 0}}function xt(){return Ts().memoizedState}function At(h,g,M,I){var N=fl();I=I===void 0?null:I,kr.flags|=h,N.memoizedState=ct(1|g,yt(),M,I)}function Ot(h,g,M,I){var N=Ts();I=I===void 0?null:I;var te=N.memoizedState.inst;Do!==null&&I!==null&&Md(I,Do.memoizedState.deps)?N.memoizedState=ct(g,te,M,I):(kr.flags|=h,N.memoizedState=ct(1|g,te,M,I))}function Vt(h,g){At(8390656,8,h,g)}function Kt(h,g){Ot(2048,8,h,g)}function jt(h,g){return Ot(4,2,h,g)}function qt(h,g){return Ot(4,4,h,g)}function Kn(h,g){if(typeof g=="function"){h=h();var M=g(h);return function(){typeof M=="function"?M():g(null)}}if(g!=null)return h=h(),g.current=h,function(){g.current=null}}function On(h,g,M){M=M!=null?M.concat([h]):null,Ot(4,4,Kn.bind(null,g,h),M)}function un(){}function ei(h,g){var M=Ts();g=g===void 0?null:g;var I=M.memoizedState;return g!==null&&Md(g,I[1])?I[0]:(M.memoizedState=[h,g],h)}function Ji(h,g){var M=Ts();g=g===void 0?null:g;var I=M.memoizedState;if(g!==null&&Md(g,I[1]))return I[0];if(I=h(),Jn){oe(!0);try{h()}finally{oe(!1)}}return M.memoizedState=[I,g],I}function Yr(h,g,M){return M===void 0||(Qu&1073741824)!==0?h.memoizedState=g:(h.memoizedState=M,h=K1(),kr.lanes|=h,Bf|=h,M)}function Ms(h,g,M,I){return Yl(M,g)?M:dl.current!==null?(h=Yr(h,M,I),Yl(h,g)||(Qa=!0),h):(Qu&42)===0?(Qa=!0,h.memoizedState=M):(h=K1(),kr.lanes|=h,Bf|=h,g)}function Hr(h,g,M,I,N){var te=Qe.p;Qe.p=te!==0&&8>te?te:8;var Re=Ie.T,Ye={};Ie.T=Ye,HA(h,!1,g,M);try{var bt=N(),Gt=Ie.S;if(Gt!==null&&Gt(Ye,bt),bt!==null&&typeof bt=="object"&&typeof bt.then=="function"){var an=bf(bt,I);Cu(h,g,an,wo(h))}else Cu(h,g,I,wo(h))}catch(fn){Cu(h,g,{then:function(){},status:"rejected",reason:fn},wo())}finally{Qe.p=te,Ie.T=Re}}function cs(){}function As(h,g,M,I){if(h.tag!==5)throw Error(i(476));var N=Qo(h).queue;Hr(h,N,g,tt,M===null?cs:function(){return tr(h),M(I)})}function Qo(h){var g=h.memoizedState;if(g!==null)return g;g={memoizedState:tt,baseState:tt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xc,lastRenderedState:tt},next:null};var M={};return g.next={memoizedState:M,baseState:M,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xc,lastRenderedState:M},next:null},h.memoizedState=g,h=h.alternate,h!==null&&(h.memoizedState=g),g}function tr(h){var g=Qo(h).next.queue;Cu(h,g,{},wo())}function sa(){return Oo(Oe)}function qo(){return Ts().memoizedState}function Ga(){return Ts().memoizedState}function aa(h){for(var g=h.return;g!==null;){switch(g.tag){case 24:case 3:var M=wo();h=Th(M);var I=bA(g,h,M);I!==null&&(Bc(I,g,M),_d(I,g,M)),g={cache:Ih()},h.payload=g;return}g=g.return}}function VA(h,g,M){var I=wo();M={lane:I,revertLane:0,action:M,hasEagerState:!1,eagerState:null,next:null},Sd(h)?Ed(g,M):(M=qc(h,g,M,I),M!==null&&(Bc(M,h,I),Hc(M,g,I)))}function $u(h,g,M){var I=wo();Cu(h,g,M,I)}function Cu(h,g,M,I){var N={lane:I,revertLane:0,action:M,hasEagerState:!1,eagerState:null,next:null};if(Sd(h))Ed(g,N);else{var te=h.alternate;if(h.lanes===0&&(te===null||te.lanes===0)&&(te=g.lastRenderedReducer,te!==null))try{var Re=g.lastRenderedState,Ye=te(Re,M);if(N.hasEagerState=!0,N.eagerState=Ye,Yl(Ye,Re))return Ac(h,g,N,0),rs===null&&yA(),!1}catch{}finally{}if(M=qc(h,g,N,I),M!==null)return Bc(M,h,I),Hc(M,g,I),!0}return!1}function HA(h,g,M,I){if(I={lane:2,revertLane:Q1(),action:I,hasEagerState:!1,eagerState:null,next:null},Sd(h)){if(g)throw Error(i(479))}else g=qc(h,M,I,2),g!==null&&Bc(g,h,2)}function Sd(h){var g=h.alternate;return h===kr||g!==null&&g===kr}function Ed(h,g){CA=Xl=!0;var M=h.pending;M===null?g.next=g:(g.next=M.next,M.next=g),h.pending=g}function Hc(h,g,M){if((M&4194048)!==0){var I=g.lanes;I&=h.pendingLanes,M|=I,g.lanes=M,yn(h,M)}}var pl={readContext:Oo,use:$A,useCallback:or,useContext:or,useEffect:or,useImperativeHandle:or,useLayoutEffect:or,useInsertionEffect:or,useMemo:or,useReducer:or,useRef:or,useState:or,useDebugValue:or,useDeferredValue:or,useTransition:or,useSyncExternalStore:or,useId:or,useHostTransitionStatus:or,useFormState:or,useActionState:or,useOptimistic:or,useMemoCache:or,useCacheRefresh:or},Zc={readContext:Oo,use:$A,useCallback:function(h,g){return fl().memoizedState=[h,g===void 0?null:g],h},useContext:Oo,useEffect:Vt,useImperativeHandle:function(h,g,M){M=M!=null?M.concat([h]):null,At(4194308,4,Kn.bind(null,g,h),M)},useLayoutEffect:function(h,g){return At(4194308,4,h,g)},useInsertionEffect:function(h,g){At(4,2,h,g)},useMemo:function(h,g){var M=fl();g=g===void 0?null:g;var I=h();if(Jn){oe(!0);try{h()}finally{oe(!1)}}return M.memoizedState=[I,g],I},useReducer:function(h,g,M){var I=fl();if(M!==void 0){var N=M(g);if(Jn){oe(!0);try{M(g)}finally{oe(!1)}}}else N=g;return I.memoizedState=I.baseState=N,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:N},I.queue=h,h=h.dispatch=VA.bind(null,kr,h),[I.memoizedState,h]},useRef:function(h){var g=fl();return h={current:h},g.memoizedState=h},useState:function(h){h=U(h);var g=h.queue,M=$u.bind(null,kr,g);return g.dispatch=M,[h.memoizedState,M]},useDebugValue:un,useDeferredValue:function(h,g){var M=fl();return Yr(M,h,g)},useTransition:function(){var h=U(!1);return h=Hr.bind(null,kr,h.queue,!0,!1),fl().memoizedState=h,[!1,h]},useSyncExternalStore:function(h,g,M){var I=kr,N=fl();if(Vr){if(M===void 0)throw Error(i(407));M=M()}else{if(M=g(),rs===null)throw Error(i(349));(Io&124)!==0||l(I,g,M)}N.memoizedState=M;var te={value:M,getSnapshot:g};return N.queue=te,Vt(C.bind(null,I,te,h),[h]),I.flags|=2048,ct(9,yt(),p.bind(null,I,te,M,g),null),M},useId:function(){var h=fl(),g=rs.identifierPrefix;if(Vr){var M=fc,I=ns;M=(I&~(1<<32-J(I)-1)).toString(32)+M,g="«"+g+"R"+M,M=Pi++,0<M&&(g+="H"+M.toString(32)),g+="»"}else M=xp++,g="«"+g+"r"+M.toString(32)+"»";return h.memoizedState=g},useHostTransitionStatus:sa,useFormState:Xe,useActionState:Xe,useOptimistic:function(h){var g=fl();g.memoizedState=g.baseState=h;var M={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return g.queue=M,g=HA.bind(null,kr,!0,M),M.dispatch=g,[h,g]},useMemoCache:Vc,useCacheRefresh:function(){return fl().memoizedState=aa.bind(null,kr)}},Mc={readContext:Oo,use:$A,useCallback:ei,useContext:Oo,useEffect:Kt,useImperativeHandle:On,useInsertionEffect:jt,useLayoutEffect:qt,useMemo:Ji,useReducer:Mf,useRef:xt,useState:function(){return Mf(xc)},useDebugValue:un,useDeferredValue:function(h,g){var M=Ts();return Ms(M,Do.memoizedState,h,g)},useTransition:function(){var h=Mf(xc)[0],g=Ts().memoizedState;return[typeof h=="boolean"?h:wd(h),g]},useSyncExternalStore:B,useId:qo,useHostTransitionStatus:sa,useFormState:Ze,useActionState:Ze,useOptimistic:function(h,g){var M=Ts();return q(M,Do,h,g)},useMemoCache:Vc,useCacheRefresh:Ga},_u={readContext:Oo,use:$A,useCallback:ei,useContext:Oo,useEffect:Kt,useImperativeHandle:On,useInsertionEffect:jt,useLayoutEffect:qt,useMemo:Ji,useReducer:Mp,useRef:xt,useState:function(){return Mp(xc)},useDebugValue:un,useDeferredValue:function(h,g){var M=Ts();return Do===null?Yr(M,h,g):Ms(M,Do.memoizedState,h,g)},useTransition:function(){var h=Mp(xc)[0],g=Ts().memoizedState;return[typeof h=="boolean"?h:wd(h),g]},useSyncExternalStore:B,useId:qo,useHostTransitionStatus:sa,useFormState:nt,useActionState:nt,useOptimistic:function(h,g){var M=Ts();return Do!==null?q(M,Do,h,g):(M.baseState=h,[h,M.queue.dispatch])},useMemoCache:Vc,useCacheRefresh:Ga},Kr=null,Bo=0;function Dl(h){var g=Bo;return Bo+=1,Kr===null&&(Kr=[]),kh(Kr,h,g)}function la(h,g){g=g.props.ref,h.ref=g!==void 0?g:null}function ZA(h,g){throw g.$$typeof===v?Error(i(525)):(h=Object.prototype.toString.call(g),Error(i(31,h==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":h)))}function Xc(h){var g=h._init;return g(h._payload)}function Rh(h){function g(Lt,Et){if(h){var Wt=Lt.deletions;Wt===null?(Lt.deletions=[Et],Lt.flags|=16):Wt.push(Et)}}function M(Lt,Et){if(!h)return null;for(;Et!==null;)g(Lt,Et),Et=Et.sibling;return null}function I(Lt){for(var Et=new Map;Lt!==null;)Lt.key!==null?Et.set(Lt.key,Lt):Et.set(Lt.index,Lt),Lt=Lt.sibling;return Et}function N(Lt,Et){return Lt=oa(Lt,Et),Lt.index=0,Lt.sibling=null,Lt}function te(Lt,Et,Wt){return Lt.index=Wt,h?(Wt=Lt.alternate,Wt!==null?(Wt=Wt.index,Wt<Et?(Lt.flags|=67108866,Et):Wt):(Lt.flags|=67108866,Et)):(Lt.flags|=1048576,Et)}function Re(Lt){return h&&Lt.alternate===null&&(Lt.flags|=67108866),Lt}function Ye(Lt,Et,Wt,hn){return Et===null||Et.tag!==6?(Et=e0(Wt,Lt.mode,hn),Et.return=Lt,Et):(Et=N(Et,Wt),Et.return=Lt,Et)}function bt(Lt,Et,Wt,hn){var Oi=Wt.type;return Oi===O?an(Lt,Et,Wt.props.children,hn,Wt.key):Et!==null&&(Et.elementType===Oi||typeof Oi=="object"&&Oi!==null&&Oi.$$typeof===se&&Xc(Oi)===Et.type)?(Et=N(Et,Wt.props),la(Et,Wt),Et.return=Lt,Et):(Et=Bm(Wt.type,Wt.key,Wt.props,null,Lt.mode,hn),la(Et,Wt),Et.return=Lt,Et)}function Gt(Lt,Et,Wt,hn){return Et===null||Et.tag!==4||Et.stateNode.containerInfo!==Wt.containerInfo||Et.stateNode.implementation!==Wt.implementation?(Et=Mh(Wt,Lt.mode,hn),Et.return=Lt,Et):(Et=N(Et,Wt.children||[]),Et.return=Lt,Et)}function an(Lt,Et,Wt,hn,Oi){return Et===null||Et.tag!==7?(Et=xh(Wt,Lt.mode,hn,Oi),Et.return=Lt,Et):(Et=N(Et,Wt),Et.return=Lt,Et)}function fn(Lt,Et,Wt){if(typeof Et=="string"&&Et!==""||typeof Et=="number"||typeof Et=="bigint")return Et=e0(""+Et,Lt.mode,Wt),Et.return=Lt,Et;if(typeof Et=="object"&&Et!==null){switch(Et.$$typeof){case x:return Wt=Bm(Et.type,Et.key,Et.props,null,Lt.mode,Wt),la(Wt,Et),Wt.return=Lt,Wt;case _:return Et=Mh(Et,Lt.mode,Wt),Et.return=Lt,Et;case se:var hn=Et._init;return Et=hn(Et._payload),fn(Lt,Et,Wt)}if(je(Et)||_e(Et))return Et=xh(Et,Lt.mode,Wt,null),Et.return=Lt,Et;if(typeof Et.then=="function")return fn(Lt,Dl(Et),Wt);if(Et.$$typeof===V)return fn(Lt,WA(Lt,Et),Wt);ZA(Lt,Et)}return null}function en(Lt,Et,Wt,hn){var Oi=Et!==null?Et.key:null;if(typeof Wt=="string"&&Wt!==""||typeof Wt=="number"||typeof Wt=="bigint")return Oi!==null?null:Ye(Lt,Et,""+Wt,hn);if(typeof Wt=="object"&&Wt!==null){switch(Wt.$$typeof){case x:return Wt.key===Oi?bt(Lt,Et,Wt,hn):null;case _:return Wt.key===Oi?Gt(Lt,Et,Wt,hn):null;case se:return Oi=Wt._init,Wt=Oi(Wt._payload),en(Lt,Et,Wt,hn)}if(je(Wt)||_e(Wt))return Oi!==null?null:an(Lt,Et,Wt,hn,null);if(typeof Wt.then=="function")return en(Lt,Et,Dl(Wt),hn);if(Wt.$$typeof===V)return en(Lt,Et,WA(Lt,Wt),hn);ZA(Lt,Wt)}return null}function Yt(Lt,Et,Wt,hn,Oi){if(typeof hn=="string"&&hn!==""||typeof hn=="number"||typeof hn=="bigint")return Lt=Lt.get(Wt)||null,Ye(Et,Lt,""+hn,Oi);if(typeof hn=="object"&&hn!==null){switch(hn.$$typeof){case x:return Lt=Lt.get(hn.key===null?Wt:hn.key)||null,bt(Et,Lt,hn,Oi);case _:return Lt=Lt.get(hn.key===null?Wt:hn.key)||null,Gt(Et,Lt,hn,Oi);case se:var io=hn._init;return hn=io(hn._payload),Yt(Lt,Et,Wt,hn,Oi)}if(je(hn)||_e(hn))return Lt=Lt.get(Wt)||null,an(Et,Lt,hn,Oi,null);if(typeof hn.then=="function")return Yt(Lt,Et,Wt,Dl(hn),Oi);if(hn.$$typeof===V)return Yt(Lt,Et,Wt,WA(Et,hn),Oi);ZA(Et,hn)}return null}function sr(Lt,Et,Wt,hn){for(var Oi=null,io=null,qi=Et,ur=Et=0,Fl=null;qi!==null&&ur<Wt.length;ur++){qi.index>ur?(Fl=qi,qi=null):Fl=qi.sibling;var Po=en(Lt,qi,Wt[ur],hn);if(Po===null){qi===null&&(qi=Fl);break}h&&qi&&Po.alternate===null&&g(Lt,qi),Et=te(Po,Et,ur),io===null?Oi=Po:io.sibling=Po,io=Po,qi=Fl}if(ur===Wt.length)return M(Lt,qi),Vr&&NA(Lt,ur),Oi;if(qi===null){for(;ur<Wt.length;ur++)qi=fn(Lt,Wt[ur],hn),qi!==null&&(Et=te(qi,Et,ur),io===null?Oi=qi:io.sibling=qi,io=qi);return Vr&&NA(Lt,ur),Oi}for(qi=I(qi);ur<Wt.length;ur++)Fl=Yt(qi,Lt,ur,Wt[ur],hn),Fl!==null&&(h&&Fl.alternate!==null&&qi.delete(Fl.key===null?ur:Fl.key),Et=te(Fl,Et,ur),io===null?Oi=Fl:io.sibling=Fl,io=Fl);return h&&qi.forEach(function(Lf){return g(Lt,Lf)}),Vr&&NA(Lt,ur),Oi}function nr(Lt,Et,Wt,hn){if(Wt==null)throw Error(i(151));for(var Oi=null,io=null,qi=Et,ur=Et=0,Fl=null,Po=Wt.next();qi!==null&&!Po.done;ur++,Po=Wt.next()){qi.index>ur?(Fl=qi,qi=null):Fl=qi.sibling;var Lf=en(Lt,qi,Po.value,hn);if(Lf===null){qi===null&&(qi=Fl);break}h&&qi&&Lf.alternate===null&&g(Lt,qi),Et=te(Lf,Et,ur),io===null?Oi=Lf:io.sibling=Lf,io=Lf,qi=Fl}if(Po.done)return M(Lt,qi),Vr&&NA(Lt,ur),Oi;if(qi===null){for(;!Po.done;ur++,Po=Wt.next())Po=fn(Lt,Po.value,hn),Po!==null&&(Et=te(Po,Et,ur),io===null?Oi=Po:io.sibling=Po,io=Po);return Vr&&NA(Lt,ur),Oi}for(qi=I(qi);!Po.done;ur++,Po=Wt.next())Po=Yt(qi,Lt,ur,Po.value,hn),Po!==null&&(h&&Po.alternate!==null&&qi.delete(Po.key===null?ur:Po.key),Et=te(Po,Et,ur),io===null?Oi=Po:io.sibling=Po,io=Po);return h&&qi.forEach(function(qx){return g(Lt,qx)}),Vr&&NA(Lt,ur),Oi}function os(Lt,Et,Wt,hn){if(typeof Wt=="object"&&Wt!==null&&Wt.type===O&&Wt.key===null&&(Wt=Wt.props.children),typeof Wt=="object"&&Wt!==null){switch(Wt.$$typeof){case x:e:{for(var Oi=Wt.key;Et!==null;){if(Et.key===Oi){if(Oi=Wt.type,Oi===O){if(Et.tag===7){M(Lt,Et.sibling),hn=N(Et,Wt.props.children),hn.return=Lt,Lt=hn;break e}}else if(Et.elementType===Oi||typeof Oi=="object"&&Oi!==null&&Oi.$$typeof===se&&Xc(Oi)===Et.type){M(Lt,Et.sibling),hn=N(Et,Wt.props),la(hn,Wt),hn.return=Lt,Lt=hn;break e}M(Lt,Et);break}else g(Lt,Et);Et=Et.sibling}Wt.type===O?(hn=xh(Wt.props.children,Lt.mode,hn,Wt.key),hn.return=Lt,Lt=hn):(hn=Bm(Wt.type,Wt.key,Wt.props,null,Lt.mode,hn),la(hn,Wt),hn.return=Lt,Lt=hn)}return Re(Lt);case _:e:{for(Oi=Wt.key;Et!==null;){if(Et.key===Oi)if(Et.tag===4&&Et.stateNode.containerInfo===Wt.containerInfo&&Et.stateNode.implementation===Wt.implementation){M(Lt,Et.sibling),hn=N(Et,Wt.children||[]),hn.return=Lt,Lt=hn;break e}else{M(Lt,Et);break}else g(Lt,Et);Et=Et.sibling}hn=Mh(Wt,Lt.mode,hn),hn.return=Lt,Lt=hn}return Re(Lt);case se:return Oi=Wt._init,Wt=Oi(Wt._payload),os(Lt,Et,Wt,hn)}if(je(Wt))return sr(Lt,Et,Wt,hn);if(_e(Wt)){if(Oi=_e(Wt),typeof Oi!="function")throw Error(i(150));return Wt=Oi.call(Wt),nr(Lt,Et,Wt,hn)}if(typeof Wt.then=="function")return os(Lt,Et,Dl(Wt),hn);if(Wt.$$typeof===V)return os(Lt,Et,WA(Lt,Wt),hn);ZA(Lt,Wt)}return typeof Wt=="string"&&Wt!==""||typeof Wt=="number"||typeof Wt=="bigint"?(Wt=""+Wt,Et!==null&&Et.tag===6?(M(Lt,Et.sibling),hn=N(Et,Wt),hn.return=Lt,Lt=hn):(M(Lt,Et),hn=e0(Wt,Lt.mode,hn),hn.return=Lt,Lt=hn),Re(Lt)):M(Lt,Et)}return function(Lt,Et,Wt,hn){try{Bo=0;var Oi=os(Lt,Et,Wt,hn);return Kr=null,Oi}catch(qi){if(qi===Na||qi===Xn)throw qi;var io=mu(29,qi,null,Lt.mode);return io.lanes=hn,io.return=Lt,io}finally{}}}var Jl=Rh(!0),wc=Rh(!1),Ta=Le(null),ua=null;function Wa(h){var g=h.alternate;Me(qs,qs.current&1),Me(Ta,h),ua===null&&(g===null||dl.current!==null||g.memoizedState!==null)&&(ua=h)}function i0(h){if(h.tag===22){if(Me(qs,qs.current),Me(Ta,h),ua===null){var g=h.alternate;g!==null&&g.memoizedState!==null&&(ua=h)}}else Jc()}function Jc(){Me(qs,qs.current),Me(Ta,Ta.current)}function xu(h){We(Ta),ua===h&&(ua=null),We(qs)}var qs=Le(0);function Vu(h){for(var g=h;g!==null;){if(g.tag===13){var M=g.memoizedState;if(M!==null&&(M=M.dehydrated,M===null||M.data==="$?"||Ou(M)))return g}else if(g.tag===19&&g.memoizedProps.revealOrder!==void 0){if((g.flags&128)!==0)return g}else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===h)break;for(;g.sibling===null;){if(g.return===null||g.return===h)return null;g=g.return}g.sibling.return=g.return,g=g.sibling}return null}function xA(h,g,M,I){g=h.memoizedState,M=M(I,g),M=M==null?g:m({},g,M),h.memoizedState=M,h.lanes===0&&(h.updateQueue.baseState=M)}var Dm={enqueueSetState:function(h,g,M){h=h._reactInternals;var I=wo(),N=Th(I);N.payload=g,M!=null&&(N.callback=M),g=bA(h,N,I),g!==null&&(Bc(g,h,I),_d(g,h,I))},enqueueReplaceState:function(h,g,M){h=h._reactInternals;var I=wo(),N=Th(I);N.tag=1,N.payload=g,M!=null&&(N.callback=M),g=bA(h,N,I),g!==null&&(Bc(g,h,I),_d(g,h,I))},enqueueForceUpdate:function(h,g){h=h._reactInternals;var M=wo(),I=Th(M);I.tag=2,g!=null&&(I.callback=g),g=bA(h,I,M),g!==null&&(Bc(g,h,M),_d(g,h,M))}};function r0(h,g,M,I,N,te,Re){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(I,te,Re):g.prototype&&g.prototype.isPureReactComponent?!Wc(M,I)||!Wc(N,te):!0}function g1(h,g,M,I){h=g.state,typeof g.componentWillReceiveProps=="function"&&g.componentWillReceiveProps(M,I),typeof g.UNSAFE_componentWillReceiveProps=="function"&&g.UNSAFE_componentWillReceiveProps(M,I),g.state!==h&&Dm.enqueueReplaceState(g,g.state,null)}function Od(h,g){var M=g;if("ref"in g){M={};for(var I in g)I!=="ref"&&(M[I]=g[I])}if(h=h.defaultProps){M===g&&(M=m({},M));for(var N in h)M[N]===void 0&&(M[N]=h[N])}return M}var Dh=typeof reportError=="function"?reportError:function(h){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var g=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h),error:h});if(!window.dispatchEvent(g))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",h);return}console.error(h)};function y1(h){Dh(h)}function v1(h){console.error(h)}function b1(h){Dh(h)}function o0(h,g){try{var M=h.onUncaughtError;M(g.value,{componentStack:g.stack})}catch(I){setTimeout(function(){throw I})}}function MA(h,g,M){try{var I=h.onCaughtError;I(M.value,{componentStack:M.stack,errorBoundary:g.tag===1?g.stateNode:null})}catch(N){setTimeout(function(){throw N})}}function s0(h,g,M){return M=Th(M),M.tag=3,M.payload={element:null},M.callback=function(){o0(h,g)},M}function C1(h){return h=Th(h),h.tag=3,h}function wp(h,g,M,I){var N=M.type.getDerivedStateFromError;if(typeof N=="function"){var te=I.value;h.payload=function(){return N(te)},h.callback=function(){MA(g,M,I)}}var Re=M.stateNode;Re!==null&&typeof Re.componentDidCatch=="function"&&(h.callback=function(){MA(g,M,I),typeof N!="function"&&(JA===null?JA=new Set([this]):JA.add(this));var Ye=I.stack;this.componentDidCatch(I.value,{componentStack:Ye!==null?Ye:""})})}function $b(h,g,M,I,N){if(M.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){if(g=M.alternate,g!==null&&gf(g,M,N,!0),M=Ta.current,M!==null){switch(M.tag){case 13:return ua===null?bv():M.alternate===null&&ga===0&&(ga=3),M.flags&=-257,M.flags|=65536,M.lanes=N,I===vp?M.flags|=16384:(g=M.updateQueue,g===null?M.updateQueue=new Set([I]):g.add(I),j1(h,I,N)),!1;case 22:return M.flags|=65536,I===vp?M.flags|=16384:(g=M.updateQueue,g===null?(g={transitions:null,markerInstances:null,retryQueue:new Set([I])},M.updateQueue=g):(M=g.retryQueue,M===null?g.retryQueue=new Set([I]):M.add(I)),j1(h,I,N)),!1}throw Error(i(435,M.tag))}return j1(h,I,N),bv(),!1}if(Vr)return g=Ta.current,g!==null?((g.flags&65536)===0&&(g.flags|=256),g.flags|=65536,g.lanes=N,I!==Eh&&(h=Error(i(422),{cause:I}),gc(pa(h,M)))):(I!==Eh&&(g=Error(i(423),{cause:I}),gc(pa(g,M))),h=h.current.alternate,h.flags|=65536,N&=-N,h.lanes|=N,I=pa(I,M),N=s0(h.stateNode,I,N),Wu(h,N),ga!==4&&(ga=2)),!1;var te=Error(i(520),{cause:I});if(te=pa(te,M),qm===null?qm=[te]:qm.push(te),ga!==4&&(ga=2),g===null)return!0;I=pa(I,M),M=g;do{switch(M.tag){case 3:return M.flags|=65536,h=N&-N,M.lanes|=h,h=s0(M.stateNode,I,h),Wu(M,h),!1;case 1:if(g=M.type,te=M.stateNode,(M.flags&128)===0&&(typeof g.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(JA===null||!JA.has(te))))return M.flags|=65536,N&=-N,M.lanes|=N,N=C1(N),wp(N,h,M,I),Wu(M,N),!1}M=M.return}while(M!==null);return!1}var Sp=Error(i(461)),Qa=!1;function ws(h,g,M,I){g.child=h===null?wc(g,null,M,I):Jl(g,h.child,M,I)}function _1(h,g,M,I,N){M=M.render;var te=g.ref;if("ref"in I){var Re={};for(var Ye in I)Ye!=="ref"&&(Re[Ye]=I[Ye])}else Re=I;return Bh(g),I=qu(h,g,M,Re,te,N),Ye=ks(),h!==null&&!Qa?(YA(h,g,N),Bd(h,g,N)):(Vr&&Ye&&mp(g),g.flags|=1,ws(h,g,I,N),g.child)}function x1(h,g,M,I,N){if(h===null){var te=M.type;return typeof te=="function"&&!_h(te)&&te.defaultProps===void 0&&M.compare===null?(g.tag=15,g.type=te,M1(h,g,te,I,N)):(h=Bm(M.type,null,I,g,g.mode,N),h.ref=g.ref,h.return=g,g.child=h)}if(te=h.child,!wA(h,N)){var Re=te.memoizedProps;if(M=M.compare,M=M!==null?M:Wc,M(Re,I)&&h.ref===g.ref)return Bd(h,g,N)}return g.flags|=1,h=oa(te,I),h.ref=g.ref,h.return=g,g.child=h}function M1(h,g,M,I,N){if(h!==null){var te=h.memoizedProps;if(Wc(te,I)&&h.ref===g.ref)if(Qa=!1,g.pendingProps=I=te,wA(h,N))(h.flags&131072)!==0&&(Qa=!0);else return g.lanes=h.lanes,Bd(h,g,N)}return Ep(h,g,M,I,N)}function a0(h,g,M){var I=g.pendingProps,N=I.children,te=h!==null?h.memoizedState:null;if(I.mode==="hidden"){if((g.flags&128)!==0){if(I=te!==null?te.baseLanes|M:M,h!==null){for(N=g.child=h.child,te=0;N!==null;)te=te|N.lanes|N.childLanes,N=N.sibling;g.childLanes=te&~I}else g.childLanes=0,g.child=null;return Sf(h,g,I,M)}if((M&536870912)!==0)g.memoizedState={baseLanes:0,cachePool:null},h!==null&&Tm(g,te!==null?te.cachePool:null),te!==null?$c(g,te):xd(),i0(g);else return g.lanes=g.childLanes=536870912,Sf(h,g,te!==null?te.baseLanes|M:M,M)}else te!==null?(Tm(g,te.cachePool),$c(g,te),Jc(),g.memoizedState=null):(h!==null&&Tm(g,null),xd(),Jc());return ws(h,g,N,M),g.child}function Sf(h,g,M,I){var N=QA();return N=N===null?null:{parent:is._currentValue,pool:N},g.memoizedState={baseLanes:M,cachePool:N},h!==null&&Tm(g,null),xd(),i0(g),h!==null&&gf(h,g,I,!0),null}function Hi(h,g){var M=g.ref;if(M===null)h!==null&&h.ref!==null&&(g.flags|=4194816);else{if(typeof M!="function"&&typeof M!="object")throw Error(i(284));(h===null||h.ref!==M)&&(g.flags|=4194816)}}function Ep(h,g,M,I,N){return Bh(g),M=qu(h,g,M,I,void 0,N),I=ks(),h!==null&&!Qa?(YA(h,g,N),Bd(h,g,N)):(Vr&&I&&mp(g),g.flags|=1,ws(h,g,M,N),g.child)}function l0(h,g,M,I,N,te){return Bh(g),g.updateQueue=null,M=_c(g,I,M,N),m1(h),I=ks(),h!==null&&!Qa?(YA(h,g,te),Bd(h,g,te)):(Vr&&I&&mp(g),g.flags|=1,ws(h,g,M,te),g.child)}function Ef(h,g,M,I,N){if(Bh(g),g.stateNode===null){var te=fr,Re=M.contextType;typeof Re=="object"&&Re!==null&&(te=Oo(Re)),te=new M(I,te),g.memoizedState=te.state!==null&&te.state!==void 0?te.state:null,te.updater=Dm,g.stateNode=te,te._reactInternals=g,te=g.stateNode,te.props=I,te.state=g.memoizedState,te.refs={},Cd(g),Re=M.contextType,te.context=typeof Re=="object"&&Re!==null?Oo(Re):fr,te.state=g.memoizedState,Re=M.getDerivedStateFromProps,typeof Re=="function"&&(xA(g,M,Re,I),te.state=g.memoizedState),typeof M.getDerivedStateFromProps=="function"||typeof te.getSnapshotBeforeUpdate=="function"||typeof te.UNSAFE_componentWillMount!="function"&&typeof te.componentWillMount!="function"||(Re=te.state,typeof te.componentWillMount=="function"&&te.componentWillMount(),typeof te.UNSAFE_componentWillMount=="function"&&te.UNSAFE_componentWillMount(),Re!==te.state&&Dm.enqueueReplaceState(te,te.state,null),tl(g,I,te,N),Cc(),te.state=g.memoizedState),typeof te.componentDidMount=="function"&&(g.flags|=4194308),I=!0}else if(h===null){te=g.stateNode;var Ye=g.memoizedProps,bt=Od(M,Ye);te.props=bt;var Gt=te.context,an=M.contextType;Re=fr,typeof an=="object"&&an!==null&&(Re=Oo(an));var fn=M.getDerivedStateFromProps;an=typeof fn=="function"||typeof te.getSnapshotBeforeUpdate=="function",Ye=g.pendingProps!==Ye,an||typeof te.UNSAFE_componentWillReceiveProps!="function"&&typeof te.componentWillReceiveProps!="function"||(Ye||Gt!==Re)&&g1(g,te,I,Re),Gu=!1;var en=g.memoizedState;te.state=en,tl(g,I,te,N),Cc(),Gt=g.memoizedState,Ye||en!==Gt||Gu?(typeof fn=="function"&&(xA(g,M,fn,I),Gt=g.memoizedState),(bt=Gu||r0(g,M,bt,I,en,Gt,Re))?(an||typeof te.UNSAFE_componentWillMount!="function"&&typeof te.componentWillMount!="function"||(typeof te.componentWillMount=="function"&&te.componentWillMount(),typeof te.UNSAFE_componentWillMount=="function"&&te.UNSAFE_componentWillMount()),typeof te.componentDidMount=="function"&&(g.flags|=4194308)):(typeof te.componentDidMount=="function"&&(g.flags|=4194308),g.memoizedProps=I,g.memoizedState=Gt),te.props=I,te.state=Gt,te.context=Re,I=bt):(typeof te.componentDidMount=="function"&&(g.flags|=4194308),I=!1)}else{te=g.stateNode,qA(h,g),Re=g.memoizedProps,an=Od(M,Re),te.props=an,fn=g.pendingProps,en=te.context,Gt=M.contextType,bt=fr,typeof Gt=="object"&&Gt!==null&&(bt=Oo(Gt)),Ye=M.getDerivedStateFromProps,(Gt=typeof Ye=="function"||typeof te.getSnapshotBeforeUpdate=="function")||typeof te.UNSAFE_componentWillReceiveProps!="function"&&typeof te.componentWillReceiveProps!="function"||(Re!==fn||en!==bt)&&g1(g,te,I,bt),Gu=!1,en=g.memoizedState,te.state=en,tl(g,I,te,N),Cc();var Yt=g.memoizedState;Re!==fn||en!==Yt||Gu||h!==null&&h.dependencies!==null&&yp(h.dependencies)?(typeof Ye=="function"&&(xA(g,M,Ye,I),Yt=g.memoizedState),(an=Gu||r0(g,M,an,I,en,Yt,bt)||h!==null&&h.dependencies!==null&&yp(h.dependencies))?(Gt||typeof te.UNSAFE_componentWillUpdate!="function"&&typeof te.componentWillUpdate!="function"||(typeof te.componentWillUpdate=="function"&&te.componentWillUpdate(I,Yt,bt),typeof te.UNSAFE_componentWillUpdate=="function"&&te.UNSAFE_componentWillUpdate(I,Yt,bt)),typeof te.componentDidUpdate=="function"&&(g.flags|=4),typeof te.getSnapshotBeforeUpdate=="function"&&(g.flags|=1024)):(typeof te.componentDidUpdate!="function"||Re===h.memoizedProps&&en===h.memoizedState||(g.flags|=4),typeof te.getSnapshotBeforeUpdate!="function"||Re===h.memoizedProps&&en===h.memoizedState||(g.flags|=1024),g.memoizedProps=I,g.memoizedState=Yt),te.props=I,te.state=Yt,te.context=bt,I=an):(typeof te.componentDidUpdate!="function"||Re===h.memoizedProps&&en===h.memoizedState||(g.flags|=4),typeof te.getSnapshotBeforeUpdate!="function"||Re===h.memoizedProps&&en===h.memoizedState||(g.flags|=1024),I=!1)}return te=I,Hi(h,g),I=(g.flags&128)!==0,te||I?(te=g.stateNode,M=I&&typeof M.getDerivedStateFromError!="function"?null:te.render(),g.flags|=1,h!==null&&I?(g.child=Jl(g,h.child,null,N),g.child=Jl(g,null,M,N)):ws(h,g,M,N),g.memoizedState=te.state,h=g.child):h=Bd(h,g,N),h}function Vb(h,g,M,I){return Tl(),g.flags|=256,ws(h,g,M,I),g.child}var Pm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function u0(h){return{baseLanes:h,cachePool:Cf()}}function Pl(h,g,M){return h=h!==null?h.childLanes&~M:0,g&&(h|=SA),h}function w1(h,g,M){var I=g.pendingProps,N=!1,te=(g.flags&128)!==0,Re;if((Re=te)||(Re=h!==null&&h.memoizedState===null?!1:(qs.current&2)!==0),Re&&(N=!0,g.flags&=-129),Re=(g.flags&32)!==0,g.flags&=-33,h===null){if(Vr){if(N?Wa(g):Jc(),Vr){var Ye=_s,bt;if(bt=Ye){e:{for(bt=Ye,Ye=hl;bt.nodeType!==8;){if(!Ye){Ye=null;break e}if(bt=kc(bt.nextSibling),bt===null){Ye=null;break e}}Ye=bt}Ye!==null?(g.memoizedState={dehydrated:Ye,treeContext:Wo!==null?{id:ns,overflow:fc}:null,retryLane:536870912,hydrationErrors:null},bt=mu(18,null,null,0),bt.stateNode=Ye,bt.return=g,g.child=bt,Is=g,_s=null,bt=!0):bt=!1}bt||mc(g)}if(Ye=g.memoizedState,Ye!==null&&(Ye=Ye.dehydrated,Ye!==null))return Ou(Ye)?g.lanes=32:g.lanes=536870912,null;xu(g)}return Ye=I.children,I=I.fallback,N?(Jc(),N=g.mode,Ye=Op({mode:"hidden",children:Ye},N),I=xh(I,N,M,null),Ye.return=g,I.return=g,Ye.sibling=I,g.child=Ye,N=g.child,N.memoizedState=u0(M),N.childLanes=Pl(h,Re,M),g.memoizedState=Pm,I):(Wa(g),S1(g,Ye))}if(bt=h.memoizedState,bt!==null&&(Ye=bt.dehydrated,Ye!==null)){if(te)g.flags&256?(Wa(g),g.flags&=-257,g=Bp(h,g,M)):g.memoizedState!==null?(Jc(),g.child=h.child,g.flags|=128,g=null):(Jc(),N=I.fallback,Ye=g.mode,I=Op({mode:"visible",children:I.children},Ye),N=xh(N,Ye,M,null),N.flags|=2,I.return=g,N.return=g,I.sibling=N,g.child=I,Jl(g,h.child,null,M),I=g.child,I.memoizedState=u0(M),I.childLanes=Pl(h,Re,M),g.memoizedState=Pm,g=N);else if(Wa(g),Ou(Ye)){if(Re=Ye.nextSibling&&Ye.nextSibling.dataset,Re)var Gt=Re.dgst;Re=Gt,I=Error(i(419)),I.stack="",I.digest=Re,gc({value:I,source:null,stack:null}),g=Bp(h,g,M)}else if(Qa||gf(h,g,M,!1),Re=(M&h.childLanes)!==0,Qa||Re){if(Re=rs,Re!==null&&(I=M&-M,I=(I&42)!==0?1:qn(I),I=(I&(Re.suspendedLanes|M))!==0?0:I,I!==0&&I!==bt.retryLane))throw bt.retryLane=I,pu(h,I),Bc(Re,h,I),Sp;Ye.data==="$?"||bv(),g=Bp(h,g,M)}else Ye.data==="$?"?(g.flags|=192,g.child=h.child,g=null):(h=bt.treeContext,_s=kc(Ye.nextSibling),Is=g,Vr=!0,pc=null,hl=!1,h!==null&&(Nu[kl++]=ns,Nu[kl++]=fc,Nu[kl++]=Wo,ns=h.id,fc=h.overflow,Wo=g),g=S1(g,I.children),g.flags|=4096);return g}return N?(Jc(),N=I.fallback,Ye=g.mode,bt=h.child,Gt=bt.sibling,I=oa(bt,{mode:"hidden",children:I.children}),I.subtreeFlags=bt.subtreeFlags&65011712,Gt!==null?N=oa(Gt,N):(N=xh(N,Ye,M,null),N.flags|=2),N.return=g,I.return=g,I.sibling=N,g.child=I,I=N,N=g.child,Ye=h.child.memoizedState,Ye===null?Ye=u0(M):(bt=Ye.cachePool,bt!==null?(Gt=is._currentValue,bt=bt.parent!==Gt?{parent:Gt,pool:Gt}:bt):bt=Cf(),Ye={baseLanes:Ye.baseLanes|M,cachePool:bt}),N.memoizedState=Ye,N.childLanes=Pl(h,Re,M),g.memoizedState=Pm,I):(Wa(g),M=h.child,h=M.sibling,M=oa(M,{mode:"visible",children:I.children}),M.return=g,M.sibling=null,h!==null&&(Re=g.deletions,Re===null?(g.deletions=[h],g.flags|=16):Re.push(h)),g.child=M,g.memoizedState=null,M)}function S1(h,g){return g=Op({mode:"visible",children:g},h.mode),g.return=h,h.child=g}function Op(h,g){return h=mu(22,h,null,g),h.lanes=0,h.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},h}function Bp(h,g,M){return Jl(g,h.child,null,M),h=S1(g,g.pendingProps.children),h.flags|=2,g.memoizedState=null,h}function eu(h,g,M){h.lanes|=g;var I=h.alternate;I!==null&&(I.lanes|=g),Hl(h.return,g,M)}function E1(h,g,M,I,N){var te=h.memoizedState;te===null?h.memoizedState={isBackwards:g,rendering:null,renderingStartTime:0,last:I,tail:M,tailMode:N}:(te.isBackwards=g,te.rendering=null,te.renderingStartTime=0,te.last=I,te.tail=M,te.tailMode=N)}function O1(h,g,M){var I=g.pendingProps,N=I.revealOrder,te=I.tail;if(ws(h,g,I.children,M),I=qs.current,(I&2)!==0)I=I&1|2,g.flags|=128;else{if(h!==null&&(h.flags&128)!==0)e:for(h=g.child;h!==null;){if(h.tag===13)h.memoizedState!==null&&eu(h,M,g);else if(h.tag===19)eu(h,M,g);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===g)break e;for(;h.sibling===null;){if(h.return===null||h.return===g)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}I&=1}switch(Me(qs,I),N){case"forwards":for(M=g.child,N=null;M!==null;)h=M.alternate,h!==null&&Vu(h)===null&&(N=M),M=M.sibling;M=N,M===null?(N=g.child,g.child=null):(N=M.sibling,M.sibling=null),E1(g,!1,N,M,te);break;case"backwards":for(M=null,N=g.child,g.child=null;N!==null;){if(h=N.alternate,h!==null&&Vu(h)===null){g.child=N;break}h=N.sibling,N.sibling=M,M=N,N=h}E1(g,!0,M,null,te);break;case"together":E1(g,!1,null,null,void 0);break;default:g.memoizedState=null}return g.child}function Bd(h,g,M){if(h!==null&&(g.dependencies=h.dependencies),Bf|=g.lanes,(M&g.childLanes)===0)if(h!==null){if(gf(h,g,M,!1),(M&g.childLanes)===0)return null}else return null;if(h!==null&&g.child!==h.child)throw Error(i(153));if(g.child!==null){for(h=g.child,M=oa(h,h.pendingProps),g.child=M,M.return=g;h.sibling!==null;)h=h.sibling,M=M.sibling=oa(h,h.pendingProps),M.return=g;M.sibling=null}return g.child}function wA(h,g){return(h.lanes&g)!==0?!0:(h=h.dependencies,!!(h!==null&&yp(h)))}function Hu(h,g,M){switch(g.tag){case 3:Pe(g,g.stateNode.containerInfo),ma(g,is,h.memoizedState.cache),Tl();break;case 27:case 5:Se(g);break;case 4:Pe(g,g.stateNode.containerInfo);break;case 10:ma(g,g.type,g.memoizedProps.value);break;case 13:var I=g.memoizedState;if(I!==null)return I.dehydrated!==null?(Wa(g),g.flags|=128,null):(M&g.child.childLanes)!==0?w1(h,g,M):(Wa(g),h=Bd(h,g,M),h!==null?h.sibling:null);Wa(g);break;case 19:var N=(h.flags&128)!==0;if(I=(M&g.childLanes)!==0,I||(gf(h,g,M,!1),I=(M&g.childLanes)!==0),N){if(I)return O1(h,g,M);g.flags|=128}if(N=g.memoizedState,N!==null&&(N.rendering=null,N.tail=null,N.lastEffect=null),Me(qs,qs.current),I)break;return null;case 22:case 23:return g.lanes=0,a0(h,g,M);case 24:ma(g,is,h.memoizedState.cache)}return Bd(h,g,M)}function B1(h,g,M){if(h!==null)if(h.memoizedProps!==g.pendingProps)Qa=!0;else{if(!wA(h,M)&&(g.flags&128)===0)return Qa=!1,Hu(h,g,M);Qa=(h.flags&131072)!==0}else Qa=!1,Vr&&(g.flags&1048576)!==0&&GA(g,vd,g.index);switch(g.lanes=0,g.tag){case 16:e:{h=g.pendingProps;var I=g.elementType,N=I._init;if(I=N(I._payload),g.type=I,typeof I=="function")_h(I)?(h=Od(I,h),g.tag=1,g=Ef(null,g,I,h,M)):(g.tag=0,g=Ep(null,g,I,h,M));else{if(I!=null){if(N=I.$$typeof,N===H){g.tag=11,g=_1(null,g,I,h,M);break e}else if(N===z){g.tag=14,g=x1(null,g,I,h,M);break e}}throw g=ke(I)||I,Error(i(306,g,""))}}return g;case 0:return Ep(h,g,g.type,g.pendingProps,M);case 1:return I=g.type,N=Od(I,g.pendingProps),Ef(h,g,I,N,M);case 3:e:{if(Pe(g,g.stateNode.containerInfo),h===null)throw Error(i(387));I=g.pendingProps;var te=g.memoizedState;N=te.element,qA(h,g),tl(g,I,null,M);var Re=g.memoizedState;if(I=Re.cache,ma(g,is,I),I!==te.cache&&Gr(g,[is],M,!0),Cc(),I=Re.element,te.isDehydrated)if(te={element:I,isDehydrated:!1,cache:Re.cache},g.updateQueue.baseState=te,g.memoizedState=te,g.flags&256){g=Vb(h,g,I,M);break e}else if(I!==N){N=pa(Error(i(424)),g),gc(N),g=Vb(h,g,I,M);break e}else{switch(h=g.stateNode.containerInfo,h.nodeType){case 9:h=h.body;break;default:h=h.nodeName==="HTML"?h.ownerDocument.body:h}for(_s=kc(h.firstChild),Is=g,Vr=!0,pc=null,hl=!0,M=wc(g,null,I,M),g.child=M;M;)M.flags=M.flags&-3|4096,M=M.sibling}else{if(Tl(),I===N){g=Bd(h,g,M);break e}ws(h,g,I,M)}g=g.child}return g;case 26:return Hi(h,g),h===null?(M=ny(g.type,null,g.pendingProps,null))?g.memoizedState=M:Vr||(M=g.type,h=g.pendingProps,I=OA(vt.current).createElement(M),I[Vn]=g,I[Fn]=h,nl(I,M,h),lo(I),g.stateNode=I):g.memoizedState=ny(g.type,h.memoizedProps,g.pendingProps,h.memoizedState),null;case 27:return Se(g),h===null&&Vr&&(I=g.stateNode=E0(g.type,g.pendingProps,vt.current),Is=g,hl=!0,N=_s,iA(g.type)?(ey=N,_s=kc(I.firstChild)):_s=N),ws(h,g,g.pendingProps.children,M),Hi(h,g),h===null&&(g.flags|=4194304),g.child;case 5:return h===null&&Vr&&((N=I=_s)&&(I=yC(I,g.type,g.pendingProps,hl),I!==null?(g.stateNode=I,Is=g,_s=kc(I.firstChild),hl=!1,N=!0):N=!1),N||mc(g)),Se(g),N=g.type,te=g.pendingProps,Re=h!==null?h.memoizedProps:null,I=te.children,M0(N,te)?I=null:Re!==null&&M0(N,Re)&&(g.flags|=32),g.memoizedState!==null&&(N=qu(h,g,xs,null,null,M),Oe._currentValue=N),Hi(h,g),ws(h,g,I,M),g.child;case 6:return h===null&&Vr&&((h=M=_s)&&(M=J1(M,g.pendingProps,hl),M!==null?(g.stateNode=M,Is=g,_s=null,h=!0):h=!1),h||mc(g)),null;case 13:return w1(h,g,M);case 4:return Pe(g,g.stateNode.containerInfo),I=g.pendingProps,h===null?g.child=Jl(g,null,I,M):ws(h,g,I,M),g.child;case 11:return _1(h,g,g.type,g.pendingProps,M);case 7:return ws(h,g,g.pendingProps,M),g.child;case 8:return ws(h,g,g.pendingProps.children,M),g.child;case 12:return ws(h,g,g.pendingProps.children,M),g.child;case 10:return I=g.pendingProps,ma(g,g.type,I.value),ws(h,g,I.children,M),g.child;case 9:return N=g.type._context,I=g.pendingProps.children,Bh(g),N=Oo(N),I=I(N),g.flags|=1,ws(h,g,I,M),g.child;case 14:return x1(h,g,g.type,g.pendingProps,M);case 15:return M1(h,g,g.type,g.pendingProps,M);case 19:return O1(h,g,M);case 31:return I=g.pendingProps,M=g.mode,I={mode:I.mode,children:I.children},h===null?(M=Op(I,M),M.ref=g.ref,g.child=M,M.return=g,g=M):(M=oa(h.child,I),M.ref=g.ref,g.child=M,M.return=g,g=M),g;case 22:return a0(h,g,M);case 24:return Bh(g),I=Oo(is),h===null?(N=QA(),N===null&&(N=rs,te=Ih(),N.pooledCache=te,te.refCount++,te!==null&&(N.pooledCacheLanes|=M),N=te),g.memoizedState={parent:I,cache:N},Cd(g),ma(g,is,N)):((h.lanes&M)!==0&&(qA(h,g),tl(g,null,null,M),Cc()),N=h.memoizedState,te=g.memoizedState,N.parent!==I?(N={parent:I,cache:I},g.memoizedState=N,g.lanes===0&&(g.memoizedState=g.updateQueue.baseState=N),ma(g,is,I)):(I=te.cache,ma(g,is,I),I!==N.cache&&Gr(g,[is],M,!0))),ws(h,g,g.pendingProps.children,M),g.child;case 29:throw g.pendingProps}throw Error(i(156,g.tag))}function Ph(h){h.flags|=4}function I1(h,g){if(g.type!=="stylesheet"||(g.state.loading&4)!==0)h.flags&=-16777217;else if(h.flags|=16777216,!b(g)){if(g=Ta.current,g!==null&&((Io&4194048)===Io?ua!==null:(Io&62914560)!==Io&&(Io&536870912)===0||g!==ua))throw bc=vp,vc;h.flags|=8192}}function Um(h,g){g!==null&&(h.flags|=4),h.flags&16384&&(g=h.tag!==22?Mt():536870912,h.lanes|=g,Qm|=g)}function Km(h,g){if(!Vr)switch(h.tailMode){case"hidden":g=h.tail;for(var M=null;g!==null;)g.alternate!==null&&(M=g),g=g.sibling;M===null?h.tail=null:M.sibling=null;break;case"collapsed":M=h.tail;for(var I=null;M!==null;)M.alternate!==null&&(I=M),M=M.sibling;I===null?g||h.tail===null?h.tail=null:h.tail.sibling=null:I.sibling=null}}function Ss(h){var g=h.alternate!==null&&h.alternate.child===h.child,M=0,I=0;if(g)for(var N=h.child;N!==null;)M|=N.lanes|N.childLanes,I|=N.subtreeFlags&65011712,I|=N.flags&65011712,N.return=h,N=N.sibling;else for(N=h.child;N!==null;)M|=N.lanes|N.childLanes,I|=N.subtreeFlags,I|=N.flags,N.return=h,N=N.sibling;return h.subtreeFlags|=I,h.childLanes=M,g}function Hb(h,g,M){var I=g.pendingProps;switch(Sh(g),g.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ss(g),null;case 1:return Ss(g),null;case 3:return M=g.stateNode,I=null,h!==null&&(I=h.memoizedState.cache),g.memoizedState.cache!==I&&(g.flags|=2048),vu(is),Te(),M.pendingContext&&(M.context=M.pendingContext,M.pendingContext=null),(h===null||h.child===null)&&(gu(g)?Ph(g):h===null||h.memoizedState.isDehydrated&&(g.flags&256)===0||(g.flags|=1024,gp())),Ss(g),null;case 26:return M=g.memoizedState,h===null?(Ph(g),M!==null?(Ss(g),I1(g,M)):(Ss(g),g.flags&=-16777217)):M?M!==h.memoizedState?(Ph(g),Ss(g),I1(g,M)):(Ss(g),g.flags&=-16777217):(h.memoizedProps!==I&&Ph(g),Ss(g),g.flags&=-16777217),null;case 27:Ne(g),M=vt.current;var N=g.type;if(h!==null&&g.stateNode!=null)h.memoizedProps!==I&&Ph(g);else{if(!I){if(g.stateNode===null)throw Error(i(166));return Ss(g),null}h=dt.current,gu(g)?Im(g):(h=E0(N,I,M),g.stateNode=h,Ph(g))}return Ss(g),null;case 5:if(Ne(g),M=g.type,h!==null&&g.stateNode!=null)h.memoizedProps!==I&&Ph(g);else{if(!I){if(g.stateNode===null)throw Error(i(166));return Ss(g),null}if(h=dt.current,gu(g))Im(g);else{switch(N=OA(vt.current),h){case 1:h=N.createElementNS("http://www.w3.org/2000/svg",M);break;case 2:h=N.createElementNS("http://www.w3.org/1998/Math/MathML",M);break;default:switch(M){case"svg":h=N.createElementNS("http://www.w3.org/2000/svg",M);break;case"math":h=N.createElementNS("http://www.w3.org/1998/Math/MathML",M);break;case"script":h=N.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof I.is=="string"?N.createElement("select",{is:I.is}):N.createElement("select"),I.multiple?h.multiple=!0:I.size&&(h.size=I.size);break;default:h=typeof I.is=="string"?N.createElement(M,{is:I.is}):N.createElement(M)}}h[Vn]=g,h[Fn]=I;e:for(N=g.child;N!==null;){if(N.tag===5||N.tag===6)h.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===g)break e;for(;N.sibling===null;){if(N.return===null||N.return===g)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}g.stateNode=h;e:switch(nl(h,M,I),M){case"button":case"input":case"select":case"textarea":h=!!I.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&Ph(g)}}return Ss(g),g.flags&=-16777217,null;case 6:if(h&&g.stateNode!=null)h.memoizedProps!==I&&Ph(g);else{if(typeof I!="string"&&g.stateNode===null)throw Error(i(166));if(h=vt.current,gu(g)){if(h=g.stateNode,M=g.memoizedProps,I=null,N=Is,N!==null)switch(N.tag){case 27:case 5:I=N.memoizedProps}h[Vn]=g,h=!!(h.nodeValue===M||I!==null&&I.suppressHydrationWarning===!0||Iv(h.nodeValue,M)),h||mc(g)}else h=OA(h).createTextNode(I),h[Vn]=g,g.stateNode=h}return Ss(g),null;case 13:if(I=g.memoizedState,h===null||h.memoizedState!==null&&h.memoizedState.dehydrated!==null){if(N=gu(g),I!==null&&I.dehydrated!==null){if(h===null){if(!N)throw Error(i(318));if(N=g.memoizedState,N=N!==null?N.dehydrated:null,!N)throw Error(i(317));N[Vn]=g}else Tl(),(g.flags&128)===0&&(g.memoizedState=null),g.flags|=4;Ss(g),N=!1}else N=gp(),h!==null&&h.memoizedState!==null&&(h.memoizedState.hydrationErrors=N),N=!0;if(!N)return g.flags&256?(xu(g),g):(xu(g),null)}if(xu(g),(g.flags&128)!==0)return g.lanes=M,g;if(M=I!==null,h=h!==null&&h.memoizedState!==null,M){I=g.child,N=null,I.alternate!==null&&I.alternate.memoizedState!==null&&I.alternate.memoizedState.cachePool!==null&&(N=I.alternate.memoizedState.cachePool.pool);var te=null;I.memoizedState!==null&&I.memoizedState.cachePool!==null&&(te=I.memoizedState.cachePool.pool),te!==N&&(I.flags|=2048)}return M!==h&&M&&(g.child.flags|=8192),Um(g,g.updateQueue),Ss(g),null;case 4:return Te(),h===null&&Ov(g.stateNode.containerInfo),Ss(g),null;case 10:return vu(g.type),Ss(g),null;case 19:if(We(qs),N=g.memoizedState,N===null)return Ss(g),null;if(I=(g.flags&128)!==0,te=N.rendering,te===null)if(I)Km(N,!1);else{if(ga!==0||h!==null&&(h.flags&128)!==0)for(h=g.child;h!==null;){if(te=Vu(h),te!==null){for(g.flags|=128,Km(N,!1),h=te.updateQueue,g.updateQueue=h,Um(g,h),g.subtreeFlags=0,h=M,M=g.child;M!==null;)mf(M,h),M=M.sibling;return Me(qs,qs.current&1|2),g.child}h=h.sibling}N.tail!==null&&$t()>Kp&&(g.flags|=128,I=!0,Km(N,!1),g.lanes=4194304)}else{if(!I)if(h=Vu(te),h!==null){if(g.flags|=128,I=!0,h=h.updateQueue,g.updateQueue=h,Um(g,h),Km(N,!0),N.tail===null&&N.tailMode==="hidden"&&!te.alternate&&!Vr)return Ss(g),null}else 2*$t()-N.renderingStartTime>Kp&&M!==536870912&&(g.flags|=128,I=!0,Km(N,!1),g.lanes=4194304);N.isBackwards?(te.sibling=g.child,g.child=te):(h=N.last,h!==null?h.sibling=te:g.child=te,N.last=te)}return N.tail!==null?(g=N.tail,N.rendering=g,N.tail=g.sibling,N.renderingStartTime=$t(),g.sibling=null,h=qs.current,Me(qs,I?h&1|2:h&1),g):(Ss(g),null);case 22:case 23:return xu(g),_p(),I=g.memoizedState!==null,h!==null?h.memoizedState!==null!==I&&(g.flags|=8192):I&&(g.flags|=8192),I?(M&536870912)!==0&&(g.flags&128)===0&&(Ss(g),g.subtreeFlags&6&&(g.flags|=8192)):Ss(g),M=g.updateQueue,M!==null&&Um(g,M.retryQueue),M=null,h!==null&&h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(M=h.memoizedState.cachePool.pool),I=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(I=g.memoizedState.cachePool.pool),I!==M&&(g.flags|=2048),h!==null&&We(Yc),null;case 24:return M=null,h!==null&&(M=h.memoizedState.cache),g.memoizedState.cache!==M&&(g.flags|=2048),vu(is),Ss(g),null;case 25:return null;case 30:return null}throw Error(i(156,g.tag))}function Zb(h,g){switch(Sh(g),g.tag){case 1:return h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 3:return vu(is),Te(),h=g.flags,(h&65536)!==0&&(h&128)===0?(g.flags=h&-65537|128,g):null;case 26:case 27:case 5:return Ne(g),null;case 13:if(xu(g),h=g.memoizedState,h!==null&&h.dehydrated!==null){if(g.alternate===null)throw Error(i(340));Tl()}return h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 19:return We(qs),null;case 4:return Te(),null;case 10:return vu(g.type),null;case 22:case 23:return xu(g),_p(),h!==null&&We(Yc),h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 24:return vu(is),null;case 25:return null;default:return null}}function Xb(h,g){switch(Sh(g),g.tag){case 3:vu(is),Te();break;case 26:case 27:case 5:Ne(g);break;case 4:Te();break;case 13:xu(g);break;case 19:We(qs);break;case 10:vu(g.type);break;case 22:case 23:xu(g),_p(),h!==null&&We(Yc);break;case 24:vu(is)}}function Ip(h,g){try{var M=g.updateQueue,I=M!==null?M.lastEffect:null;if(I!==null){var N=I.next;M=N;do{if((M.tag&h)===h){I=void 0;var te=M.create,Re=M.inst;I=te(),Re.destroy=I}M=M.next}while(M!==N)}}catch(Ye){Ds(g,g.return,Ye)}}function Uh(h,g,M){try{var I=g.updateQueue,N=I!==null?I.lastEffect:null;if(N!==null){var te=N.next;I=te;do{if((I.tag&h)===h){var Re=I.inst,Ye=Re.destroy;if(Ye!==void 0){Re.destroy=void 0,N=g;var bt=M,Gt=Ye;try{Gt()}catch(an){Ds(N,bt,an)}}}I=I.next}while(I!==te)}}catch(an){Ds(g,g.return,an)}}function lv(h){var g=h.updateQueue;if(g!==null){var M=h.stateNode;try{Rm(g,M)}catch(I){Ds(h,h.return,I)}}}function Id(h,g,M){M.props=Od(h.type,h.memoizedProps),M.state=h.memoizedState;try{M.componentWillUnmount()}catch(I){Ds(h,g,I)}}function Kh(h,g){try{var M=h.ref;if(M!==null){switch(h.tag){case 26:case 27:case 5:var I=h.stateNode;break;case 30:I=h.stateNode;break;default:I=h.stateNode}typeof M=="function"?h.refCleanup=M(I):M.current=I}}catch(N){Ds(h,g,N)}}function Lh(h,g){var M=h.ref,I=h.refCleanup;if(M!==null)if(typeof I=="function")try{I()}catch(N){Ds(h,g,N)}finally{h.refCleanup=null,h=h.alternate,h!=null&&(h.refCleanup=null)}else if(typeof M=="function")try{M(null)}catch(N){Ds(h,g,N)}else M.current=null}function k1(h){var g=h.type,M=h.memoizedProps,I=h.stateNode;try{e:switch(g){case"button":case"input":case"select":case"textarea":M.autoFocus&&I.focus();break e;case"img":M.src?I.src=M.src:M.srcSet&&(I.srcset=M.srcSet)}}catch(N){Ds(h,h.return,N)}}function T1(h,g,M){try{var I=h.stateNode;kv(I,h.type,M,g),I[Fn]=g}catch(N){Ds(h,h.return,N)}}function Lm(h){return h.tag===5||h.tag===3||h.tag===26||h.tag===27&&iA(h.type)||h.tag===4}function c0(h){e:for(;;){for(;h.sibling===null;){if(h.return===null||Lm(h.return))return null;h=h.return}for(h.sibling.return=h.return,h=h.sibling;h.tag!==5&&h.tag!==6&&h.tag!==18;){if(h.tag===27&&iA(h.type)||h.flags&2||h.child===null||h.tag===4)continue e;h.child.return=h,h=h.child}if(!(h.flags&2))return h.stateNode}}function R1(h,g,M){var I=h.tag;if(I===5||I===6)h=h.stateNode,g?(M.nodeType===9?M.body:M.nodeName==="HTML"?M.ownerDocument.body:M).insertBefore(h,g):(g=M.nodeType===9?M.body:M.nodeName==="HTML"?M.ownerDocument.body:M,g.appendChild(h),M=M._reactRootContainer,M!=null||g.onclick!==null||(g.onclick=ng));else if(I!==4&&(I===27&&iA(h.type)&&(M=h.stateNode,g=null),h=h.child,h!==null))for(R1(h,g,M),h=h.sibling;h!==null;)R1(h,g,M),h=h.sibling}function A0(h,g,M){var I=h.tag;if(I===5||I===6)h=h.stateNode,g?M.insertBefore(h,g):M.appendChild(h);else if(I!==4&&(I===27&&iA(h.type)&&(M=h.stateNode),h=h.child,h!==null))for(A0(h,g,M),h=h.sibling;h!==null;)A0(h,g,M),h=h.sibling}function kp(h){var g=h.stateNode,M=h.memoizedProps;try{for(var I=h.type,N=g.attributes;N.length;)g.removeAttributeNode(N[0]);nl(g,I,M),g[Vn]=h,g[Fn]=M}catch(te){Ds(h,h.return,te)}}var Fh=!1,Yo=!1,eA=!1,Jb=typeof WeakSet=="function"?WeakSet:Set,Wr=null;function Fm(h,g){if(h=h.containerInfo,EA=_t,h=Om(h),dp(h)){if("selectionStart"in h)var M={start:h.selectionStart,end:h.selectionEnd};else e:{M=(M=h.ownerDocument)&&M.defaultView||window;var I=M.getSelection&&M.getSelection();if(I&&I.rangeCount!==0){M=I.anchorNode;var N=I.anchorOffset,te=I.focusNode;I=I.focusOffset;try{M.nodeType,te.nodeType}catch{M=null;break e}var Re=0,Ye=-1,bt=-1,Gt=0,an=0,fn=h,en=null;t:for(;;){for(var Yt;fn!==M||N!==0&&fn.nodeType!==3||(Ye=Re+N),fn!==te||I!==0&&fn.nodeType!==3||(bt=Re+I),fn.nodeType===3&&(Re+=fn.nodeValue.length),(Yt=fn.firstChild)!==null;)en=fn,fn=Yt;for(;;){if(fn===h)break t;if(en===M&&++Gt===N&&(Ye=Re),en===te&&++an===I&&(bt=Re),(Yt=fn.nextSibling)!==null)break;fn=en,en=fn.parentNode}fn=Yt}M=Ye===-1||bt===-1?null:{start:Ye,end:bt}}else M=null}M=M||{start:0,end:0}}else M=null;for(Eu={focusedElem:h,selectionRange:M},_t=!1,Wr=g;Wr!==null;)if(g=Wr,h=g.child,(g.subtreeFlags&1024)!==0&&h!==null)h.return=g,Wr=h;else for(;Wr!==null;){switch(g=Wr,te=g.alternate,h=g.flags,g.tag){case 0:break;case 11:case 15:break;case 1:if((h&1024)!==0&&te!==null){h=void 0,M=g,N=te.memoizedProps,te=te.memoizedState,I=M.stateNode;try{var sr=Od(M.type,N,M.elementType===M.type);h=I.getSnapshotBeforeUpdate(sr,te),I.__reactInternalSnapshotBeforeUpdate=h}catch(nr){Ds(M,M.return,nr)}}break;case 3:if((h&1024)!==0){if(h=g.stateNode.containerInfo,M=h.nodeType,M===9)X1(h);else if(M===1)switch(h.nodeName){case"HEAD":case"HTML":case"BODY":X1(h);break;default:h.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((h&1024)!==0)throw Error(i(163))}if(h=g.sibling,h!==null){h.return=g.return,Wr=h;break}Wr=g.return}}function uv(h,g,M){var I=M.flags;switch(M.tag){case 0:case 11:case 15:Ec(h,M),I&4&&Ip(5,M);break;case 1:if(Ec(h,M),I&4)if(h=M.stateNode,g===null)try{h.componentDidMount()}catch(Re){Ds(M,M.return,Re)}else{var N=Od(M.type,g.memoizedProps);g=g.memoizedState;try{h.componentDidUpdate(N,g,h.__reactInternalSnapshotBeforeUpdate)}catch(Re){Ds(M,M.return,Re)}}I&64&&lv(M),I&512&&Kh(M,M.return);break;case 3:if(Ec(h,M),I&64&&(h=M.updateQueue,h!==null)){if(g=null,M.child!==null)switch(M.child.tag){case 27:case 5:g=M.child.stateNode;break;case 1:g=M.child.stateNode}try{Rm(h,g)}catch(Re){Ds(M,M.return,Re)}}break;case 27:g===null&&I&4&&kp(M);case 26:case 5:Ec(h,M),g===null&&I&4&&k1(M),I&512&&Kh(M,M.return);break;case 12:Ec(h,M);break;case 13:Ec(h,M),I&4&&zm(h,M),I&64&&(h=M.memoizedState,h!==null&&(h=h.dehydrated,h!==null&&(M=Xm.bind(null,M),Np(h,M))));break;case 22:if(I=M.memoizedState!==null||Fh,!I){g=g!==null&&g.memoizedState!==null||Yo,N=Fh;var te=Yo;Fh=I,(Yo=g)&&!te?jh(h,M,(M.subtreeFlags&8772)!==0):Ec(h,M),Fh=N,Yo=te}break;case 30:break;default:Ec(h,M)}}function h0(h){var g=h.alternate;g!==null&&(h.alternate=null,h0(g)),h.child=null,h.deletions=null,h.sibling=null,h.tag===5&&(g=h.stateNode,g!==null&&Pn(g)),h.stateNode=null,h.return=null,h.dependencies=null,h.memoizedProps=null,h.memoizedState=null,h.pendingProps=null,h.stateNode=null,h.updateQueue=null}var Rs=null,Ul=!1;function zh(h,g,M){for(M=M.child;M!==null;)cv(h,g,M),M=M.sibling}function cv(h,g,M){if(xe&&typeof xe.onCommitFiberUnmount=="function")try{xe.onCommitFiberUnmount(It,M)}catch{}switch(M.tag){case 26:Yo||Lh(M,g),zh(h,g,M),M.memoizedState?M.memoizedState.count--:M.stateNode&&(M=M.stateNode,M.parentNode.removeChild(M));break;case 27:Yo||Lh(M,g);var I=Rs,N=Ul;iA(M.type)&&(Rs=M.stateNode,Ul=!1),zh(h,g,M),Pf(M.stateNode),Rs=I,Ul=N;break;case 5:Yo||Lh(M,g);case 6:if(I=Rs,N=Ul,Rs=null,zh(h,g,M),Rs=I,Ul=N,Rs!==null)if(Ul)try{(Rs.nodeType===9?Rs.body:Rs.nodeName==="HTML"?Rs.ownerDocument.body:Rs).removeChild(M.stateNode)}catch(te){Ds(M,g,te)}else try{Rs.removeChild(M.stateNode)}catch(te){Ds(M,g,te)}break;case 18:Rs!==null&&(Ul?(h=Rs,w0(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,M.stateNode),ol(h)):w0(Rs,M.stateNode));break;case 4:I=Rs,N=Ul,Rs=M.stateNode.containerInfo,Ul=!0,zh(h,g,M),Rs=I,Ul=N;break;case 0:case 11:case 14:case 15:Yo||Uh(2,M,g),Yo||Uh(4,M,g),zh(h,g,M);break;case 1:Yo||(Lh(M,g),I=M.stateNode,typeof I.componentWillUnmount=="function"&&Id(M,g,I)),zh(h,g,M);break;case 21:zh(h,g,M);break;case 22:Yo=(I=Yo)||M.memoizedState!==null,zh(h,g,M),Yo=I;break;default:zh(h,g,M)}}function zm(h,g){if(g.memoizedState===null&&(h=g.alternate,h!==null&&(h=h.memoizedState,h!==null&&(h=h.dehydrated,h!==null))))try{ol(h)}catch(M){Ds(g,g.return,M)}}function Av(h){switch(h.tag){case 13:case 19:var g=h.stateNode;return g===null&&(g=h.stateNode=new Jb),g;case 22:return h=h.stateNode,g=h._retryCache,g===null&&(g=h._retryCache=new Jb),g;default:throw Error(i(435,h.tag))}}function Of(h,g){var M=Av(h);g.forEach(function(I){var N=Gx.bind(null,h,I);M.has(I)||(M.add(I),I.then(N,N))})}function Mu(h,g){var M=g.deletions;if(M!==null)for(var I=0;I<M.length;I++){var N=M[I],te=h,Re=g,Ye=Re;e:for(;Ye!==null;){switch(Ye.tag){case 27:if(iA(Ye.type)){Rs=Ye.stateNode,Ul=!1;break e}break;case 5:Rs=Ye.stateNode,Ul=!1;break e;case 3:case 4:Rs=Ye.stateNode.containerInfo,Ul=!0;break e}Ye=Ye.return}if(Rs===null)throw Error(i(160));cv(te,Re,N),Rs=null,Ul=!1,te=N.alternate,te!==null&&(te.return=null),N.return=null}if(g.subtreeFlags&13878)for(g=g.child;g!==null;)Tp(g,h),g=g.sibling}var tu=null;function Tp(h,g){var M=h.alternate,I=h.flags;switch(h.tag){case 0:case 11:case 14:case 15:Mu(g,h),Sc(h),I&4&&(Uh(3,h,h.return),Ip(3,h),Uh(5,h,h.return));break;case 1:Mu(g,h),Sc(h),I&512&&(Yo||M===null||Lh(M,M.return)),I&64&&Fh&&(h=h.updateQueue,h!==null&&(I=h.callbacks,I!==null&&(M=h.shared.hiddenCallbacks,h.shared.hiddenCallbacks=M===null?I:M.concat(I))));break;case 26:var N=tu;if(Mu(g,h),Sc(h),I&512&&(Yo||M===null||Lh(M,M.return)),I&4){var te=M!==null?M.memoizedState:null;if(I=h.memoizedState,M===null)if(I===null)if(h.stateNode===null){e:{I=h.type,M=h.memoizedProps,N=N.ownerDocument||N;t:switch(I){case"title":te=N.getElementsByTagName("title")[0],(!te||te[ea]||te[Vn]||te.namespaceURI==="http://www.w3.org/2000/svg"||te.hasAttribute("itemprop"))&&(te=N.createElement(I),N.head.insertBefore(te,N.querySelector("head > title"))),nl(te,I,M),te[Vn]=h,lo(te),I=te;break e;case"link":var Re=f("link","href",N).get(I+(M.href||""));if(Re){for(var Ye=0;Ye<Re.length;Ye++)if(te=Re[Ye],te.getAttribute("href")===(M.href==null||M.href===""?null:M.href)&&te.getAttribute("rel")===(M.rel==null?null:M.rel)&&te.getAttribute("title")===(M.title==null?null:M.title)&&te.getAttribute("crossorigin")===(M.crossOrigin==null?null:M.crossOrigin)){Re.splice(Ye,1);break t}}te=N.createElement(I),nl(te,I,M),N.head.appendChild(te);break;case"meta":if(Re=f("meta","content",N).get(I+(M.content||""))){for(Ye=0;Ye<Re.length;Ye++)if(te=Re[Ye],te.getAttribute("content")===(M.content==null?null:""+M.content)&&te.getAttribute("name")===(M.name==null?null:M.name)&&te.getAttribute("property")===(M.property==null?null:M.property)&&te.getAttribute("http-equiv")===(M.httpEquiv==null?null:M.httpEquiv)&&te.getAttribute("charset")===(M.charSet==null?null:M.charSet)){Re.splice(Ye,1);break t}}te=N.createElement(I),nl(te,I,M),N.head.appendChild(te);break;default:throw Error(i(468,I))}te[Vn]=h,lo(te),I=te}h.stateNode=I}else u(N,h.type,h.stateNode);else h.stateNode=ig(N,I,h.memoizedProps);else te!==I?(te===null?M.stateNode!==null&&(M=M.stateNode,M.parentNode.removeChild(M)):te.count--,I===null?u(N,h.type,h.stateNode):ig(N,I,h.memoizedProps)):I===null&&h.stateNode!==null&&T1(h,h.memoizedProps,M.memoizedProps)}break;case 27:Mu(g,h),Sc(h),I&512&&(Yo||M===null||Lh(M,M.return)),M!==null&&I&4&&T1(h,h.memoizedProps,M.memoizedProps);break;case 5:if(Mu(g,h),Sc(h),I&512&&(Yo||M===null||Lh(M,M.return)),h.flags&32){N=h.stateNode;try{jo(N,"")}catch(Yt){Ds(h,h.return,Yt)}}I&4&&h.stateNode!=null&&(N=h.memoizedProps,T1(h,N,M!==null?M.memoizedProps:N)),I&1024&&(eA=!0);break;case 6:if(Mu(g,h),Sc(h),I&4){if(h.stateNode===null)throw Error(i(162));I=h.memoizedProps,M=h.stateNode;try{M.nodeValue=I}catch(Yt){Ds(h,h.return,Yt)}}break;case 3:if(og=null,N=tu,tu=Br(g.containerInfo),Mu(g,h),tu=N,Sc(h),I&4&&M!==null&&M.memoizedState.isDehydrated)try{ol(g.containerInfo)}catch(Yt){Ds(h,h.return,Yt)}eA&&(eA=!1,hv(h));break;case 4:I=tu,tu=Br(h.stateNode.containerInfo),Mu(g,h),Sc(h),tu=I;break;case 12:Mu(g,h),Sc(h);break;case 13:Mu(g,h),Sc(h),h.child.flags&8192&&h.memoizedState!==null!=(M!==null&&M.memoizedState!==null)&&(P1=$t()),I&4&&(I=h.updateQueue,I!==null&&(h.updateQueue=null,Of(h,I)));break;case 22:N=h.memoizedState!==null;var bt=M!==null&&M.memoizedState!==null,Gt=Fh,an=Yo;if(Fh=Gt||N,Yo=an||bt,Mu(g,h),Yo=an,Fh=Gt,Sc(h),I&8192)e:for(g=h.stateNode,g._visibility=N?g._visibility&-2:g._visibility|1,N&&(M===null||bt||Fh||Yo||Rp(h)),M=null,g=h;;){if(g.tag===5||g.tag===26){if(M===null){bt=M=g;try{if(te=bt.stateNode,N)Re=te.style,typeof Re.setProperty=="function"?Re.setProperty("display","none","important"):Re.display="none";else{Ye=bt.stateNode;var fn=bt.memoizedProps.style,en=fn!=null&&fn.hasOwnProperty("display")?fn.display:null;Ye.style.display=en==null||typeof en=="boolean"?"":(""+en).trim()}}catch(Yt){Ds(bt,bt.return,Yt)}}}else if(g.tag===6){if(M===null){bt=g;try{bt.stateNode.nodeValue=N?"":bt.memoizedProps}catch(Yt){Ds(bt,bt.return,Yt)}}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===h)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===h)break e;for(;g.sibling===null;){if(g.return===null||g.return===h)break e;M===g&&(M=null),g=g.return}M===g&&(M=null),g.sibling.return=g.return,g=g.sibling}I&4&&(I=h.updateQueue,I!==null&&(M=I.retryQueue,M!==null&&(I.retryQueue=null,Of(h,M))));break;case 19:Mu(g,h),Sc(h),I&4&&(I=h.updateQueue,I!==null&&(h.updateQueue=null,Of(h,I)));break;case 30:break;case 21:break;default:Mu(g,h),Sc(h)}}function Sc(h){var g=h.flags;if(g&2){try{for(var M,I=h.return;I!==null;){if(Lm(I)){M=I;break}I=I.return}if(M==null)throw Error(i(160));switch(M.tag){case 27:var N=M.stateNode,te=c0(h);A0(h,te,N);break;case 5:var Re=M.stateNode;M.flags&32&&(jo(Re,""),M.flags&=-33);var Ye=c0(h);A0(h,Ye,Re);break;case 3:case 4:var bt=M.stateNode.containerInfo,Gt=c0(h);R1(h,Gt,bt);break;default:throw Error(i(161))}}catch(an){Ds(h,h.return,an)}h.flags&=-3}g&4096&&(h.flags&=-4097)}function hv(h){if(h.subtreeFlags&1024)for(h=h.child;h!==null;){var g=h;hv(g),g.tag===5&&g.flags&1024&&g.stateNode.reset(),h=h.sibling}}function Ec(h,g){if(g.subtreeFlags&8772)for(g=g.child;g!==null;)uv(h,g.alternate,g),g=g.sibling}function Rp(h){for(h=h.child;h!==null;){var g=h;switch(g.tag){case 0:case 11:case 14:case 15:Uh(4,g,g.return),Rp(g);break;case 1:Lh(g,g.return);var M=g.stateNode;typeof M.componentWillUnmount=="function"&&Id(g,g.return,M),Rp(g);break;case 27:Pf(g.stateNode);case 26:case 5:Lh(g,g.return),Rp(g);break;case 22:g.memoizedState===null&&Rp(g);break;case 30:Rp(g);break;default:Rp(g)}h=h.sibling}}function jh(h,g,M){for(M=M&&(g.subtreeFlags&8772)!==0,g=g.child;g!==null;){var I=g.alternate,N=h,te=g,Re=te.flags;switch(te.tag){case 0:case 11:case 15:jh(N,te,M),Ip(4,te);break;case 1:if(jh(N,te,M),I=te,N=I.stateNode,typeof N.componentDidMount=="function")try{N.componentDidMount()}catch(Gt){Ds(I,I.return,Gt)}if(I=te,N=I.updateQueue,N!==null){var Ye=I.stateNode;try{var bt=N.shared.hiddenCallbacks;if(bt!==null)for(N.shared.hiddenCallbacks=null,N=0;N<bt.length;N++)n0(bt[N],Ye)}catch(Gt){Ds(I,I.return,Gt)}}M&&Re&64&&lv(te),Kh(te,te.return);break;case 27:kp(te);case 26:case 5:jh(N,te,M),M&&I===null&&Re&4&&k1(te),Kh(te,te.return);break;case 12:jh(N,te,M);break;case 13:jh(N,te,M),M&&Re&4&&zm(N,te);break;case 22:te.memoizedState===null&&jh(N,te,M),Kh(te,te.return);break;case 30:break;default:jh(N,te,M)}g=g.sibling}}function Dp(h,g){var M=null;h!==null&&h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(M=h.memoizedState.cachePool.pool),h=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(h=g.memoizedState.cachePool.pool),h!==M&&(h!=null&&h.refCount++,M!=null&&bd(M))}function d0(h,g){h=null,g.alternate!==null&&(h=g.alternate.memoizedState.cache),g=g.memoizedState.cache,g!==h&&(g.refCount++,h!=null&&bd(h))}function XA(h,g,M,I){if(g.subtreeFlags&10256)for(g=g.child;g!==null;)dv(h,g,M,I),g=g.sibling}function dv(h,g,M,I){var N=g.flags;switch(g.tag){case 0:case 11:case 15:XA(h,g,M,I),N&2048&&Ip(9,g);break;case 1:XA(h,g,M,I);break;case 3:XA(h,g,M,I),N&2048&&(h=null,g.alternate!==null&&(h=g.alternate.memoizedState.cache),g=g.memoizedState.cache,g!==h&&(g.refCount++,h!=null&&bd(h)));break;case 12:if(N&2048){XA(h,g,M,I),h=g.stateNode;try{var te=g.memoizedProps,Re=te.id,Ye=te.onPostCommit;typeof Ye=="function"&&Ye(Re,g.alternate===null?"mount":"update",h.passiveEffectDuration,-0)}catch(bt){Ds(g,g.return,bt)}}else XA(h,g,M,I);break;case 13:XA(h,g,M,I);break;case 23:break;case 22:te=g.stateNode,Re=g.alternate,g.memoizedState!==null?te._visibility&2?XA(h,g,M,I):f0(h,g):te._visibility&2?XA(h,g,M,I):(te._visibility|=2,jm(h,g,M,I,(g.subtreeFlags&10256)!==0)),N&2048&&Dp(Re,g);break;case 24:XA(h,g,M,I),N&2048&&d0(g.alternate,g);break;default:XA(h,g,M,I)}}function jm(h,g,M,I,N){for(N=N&&(g.subtreeFlags&10256)!==0,g=g.child;g!==null;){var te=h,Re=g,Ye=M,bt=I,Gt=Re.flags;switch(Re.tag){case 0:case 11:case 15:jm(te,Re,Ye,bt,N),Ip(8,Re);break;case 23:break;case 22:var an=Re.stateNode;Re.memoizedState!==null?an._visibility&2?jm(te,Re,Ye,bt,N):f0(te,Re):(an._visibility|=2,jm(te,Re,Ye,bt,N)),N&&Gt&2048&&Dp(Re.alternate,Re);break;case 24:jm(te,Re,Ye,bt,N),N&&Gt&2048&&d0(Re.alternate,Re);break;default:jm(te,Re,Ye,bt,N)}g=g.sibling}}function f0(h,g){if(g.subtreeFlags&10256)for(g=g.child;g!==null;){var M=h,I=g,N=I.flags;switch(I.tag){case 22:f0(M,I),N&2048&&Dp(I.alternate,I);break;case 24:f0(M,I),N&2048&&d0(I.alternate,I);break;default:f0(M,I)}g=g.sibling}}var wu=8192;function Nm(h){if(h.subtreeFlags&wu)for(h=h.child;h!==null;)eC(h),h=h.sibling}function eC(h){switch(h.tag){case 26:Nm(h),h.flags&wu&&h.memoizedState!==null&&D(tu,h.memoizedState,h.memoizedProps);break;case 5:Nm(h);break;case 3:case 4:var g=tu;tu=Br(h.stateNode.containerInfo),Nm(h),tu=g;break;case 22:h.memoizedState===null&&(g=h.alternate,g!==null&&g.memoizedState!==null?(g=wu,wu=16777216,Nm(h),wu=g):Nm(h));break;default:Nm(h)}}function Pp(h){var g=h.alternate;if(g!==null&&(h=g.child,h!==null)){g.child=null;do g=h.sibling,h.sibling=null,h=g;while(h!==null)}}function Gm(h){var g=h.deletions;if((h.flags&16)!==0){if(g!==null)for(var M=0;M<g.length;M++){var I=g[M];Wr=I,nC(I,h)}Pp(h)}if(h.subtreeFlags&10256)for(h=h.child;h!==null;)tC(h),h=h.sibling}function tC(h){switch(h.tag){case 0:case 11:case 15:Gm(h),h.flags&2048&&Uh(9,h,h.return);break;case 3:Gm(h);break;case 12:Gm(h);break;case 22:var g=h.stateNode;h.memoizedState!==null&&g._visibility&2&&(h.return===null||h.return.tag!==13)?(g._visibility&=-3,p0(h)):Gm(h);break;default:Gm(h)}}function p0(h){var g=h.deletions;if((h.flags&16)!==0){if(g!==null)for(var M=0;M<g.length;M++){var I=g[M];Wr=I,nC(I,h)}Pp(h)}for(h=h.child;h!==null;){switch(g=h,g.tag){case 0:case 11:case 15:Uh(8,g,g.return),p0(g);break;case 22:M=g.stateNode,M._visibility&2&&(M._visibility&=-3,p0(g));break;default:p0(g)}h=h.sibling}}function nC(h,g){for(;Wr!==null;){var M=Wr;switch(M.tag){case 0:case 11:case 15:Uh(8,M,g);break;case 23:case 22:if(M.memoizedState!==null&&M.memoizedState.cachePool!==null){var I=M.memoizedState.cachePool.pool;I!=null&&I.refCount++}break;case 24:bd(M.memoizedState.cache)}if(I=M.child,I!==null)I.return=M,Wr=I;else e:for(M=h;Wr!==null;){I=Wr;var N=I.sibling,te=I.return;if(h0(I),I===M){Wr=null;break e}if(N!==null){N.return=te,Wr=N;break e}Wr=te}}}var iC={getCacheForType:function(h){var g=Oo(is),M=g.data.get(h);return M===void 0&&(M=h(),g.data.set(h,M)),M}},fv=typeof WeakMap=="function"?WeakMap:Map,$o=0,rs=null,Zr=null,Io=0,hs=0,Oc=null,kd=!1,Wm=!1,pv=!1,tA=0,ga=0,Bf=0,Up=0,mv=0,SA=0,Qm=0,qm=null,Su=null,D1=!1,P1=0,Kp=1/0,m0=null,JA=null,nu=0,Td=null,Ym=null,$m=0,gv=0,U1=null,rC=null,Vm=0,Lp=null;function wo(){if(($o&2)!==0&&Io!==0)return Io&-Io;if(Ie.T!==null){var h=ja;return h!==0?h:Q1()}return mi()}function K1(){SA===0&&(SA=(Io&536870912)===0||Vr?gt():536870912);var h=Ta.current;return h!==null&&(h.flags|=32),SA}function Bc(h,g,M){(h===rs&&(hs===2||hs===9)||h.cancelPendingCommit!==null)&&(Zm(h,0),Rd(h,Io,SA,!1)),ot(h,M),(($o&2)===0||h!==rs)&&(h===rs&&(($o&2)===0&&(Up|=M),ga===4&&Rd(h,Io,SA,!1)),eh(h))}function yv(h,g,M){if(($o&6)!==0)throw Error(i(327));var I=!M&&(g&124)===0&&(g&h.expiredLanes)===0||Ee(h,g),N=I?Nx(h,g):Cv(h,g,!0),te=I;do{if(N===0){Wm&&!I&&Rd(h,g,0,!1);break}else{if(M=h.current.alternate,te&&!Hm(M)){N=Cv(h,g,!1),te=!1;continue}if(N===2){if(te=g,h.errorRecoveryDisabledLanes&te)var Re=0;else Re=h.pendingLanes&-536870913,Re=Re!==0?Re:Re&536870912?536870912:0;if(Re!==0){g=Re;e:{var Ye=h;N=qm;var bt=Ye.current.memoizedState.isDehydrated;if(bt&&(Zm(Ye,Re).flags|=256),Re=Cv(Ye,Re,!1),Re!==2){if(pv&&!bt){Ye.errorRecoveryDisabledLanes|=te,Up|=te,N=4;break e}te=Su,Su=N,te!==null&&(Su===null?Su=te:Su.push.apply(Su,te))}N=Re}if(te=!1,N!==2)continue}}if(N===1){Zm(h,0),Rd(h,g,0,!0);break}e:{switch(I=h,te=N,te){case 0:case 1:throw Error(i(345));case 4:if((g&4194048)!==g)break;case 6:Rd(I,g,SA,!kd);break e;case 2:Su=null;break;case 3:case 5:break;default:throw Error(i(329))}if((g&62914560)===g&&(N=P1+300-$t(),10<N)){if(Rd(I,g,SA,!kd),be(I,0,!0)!==0)break e;I.timeoutHandle=Tv(L1.bind(null,I,M,Su,m0,D1,g,SA,Up,Qm,kd,te,2,-0,0),N);break e}L1(I,M,Su,m0,D1,g,SA,Up,Qm,kd,te,0,-0,0)}}break}while(!0);eh(h)}function L1(h,g,M,I,N,te,Re,Ye,bt,Gt,an,fn,en,Yt){if(h.timeoutHandle=-1,fn=g.subtreeFlags,(fn&8192||(fn&16785408)===16785408)&&(S={stylesheets:null,count:0,unsuspend:k},eC(g),fn=K(),fn!==null)){h.cancelPendingCommit=fn(Pd.bind(null,h,g,te,M,I,N,Re,Ye,bt,an,1,en,Yt)),Rd(h,te,Re,!Gt);return}Pd(h,g,te,M,I,N,Re,Ye,bt)}function Hm(h){for(var g=h;;){var M=g.tag;if((M===0||M===11||M===15)&&g.flags&16384&&(M=g.updateQueue,M!==null&&(M=M.stores,M!==null)))for(var I=0;I<M.length;I++){var N=M[I],te=N.getSnapshot;N=N.value;try{if(!Yl(te(),N))return!1}catch{return!1}}if(M=g.child,g.subtreeFlags&16384&&M!==null)M.return=g,g=M;else{if(g===h)break;for(;g.sibling===null;){if(g.return===null||g.return===h)return!0;g=g.return}g.sibling.return=g.return,g=g.sibling}}return!0}function Rd(h,g,M,I){g&=~mv,g&=~Up,h.suspendedLanes|=g,h.pingedLanes&=~g,I&&(h.warmLanes|=g),I=h.expirationTimes;for(var N=g;0<N;){var te=31-J(N),Re=1<<te;I[te]=-1,N&=~Re}M!==0&&Gn(h,M,g)}function F1(){return($o&6)===0?(nA(0),!1):!0}function vv(){if(Zr!==null){if(hs===0)var h=Zr.return;else h=Zr,qe=yu=null,_A(h),Kr=null,Bo=0,h=Zr;for(;h!==null;)Xb(h.alternate,h),h=h.return;Zr=null}}function Zm(h,g){var M=h.timeoutHandle;M!==-1&&(h.timeoutHandle=-1,Wx(M)),M=h.cancelPendingCommit,M!==null&&(h.cancelPendingCommit=null,M()),vv(),rs=h,Zr=M=oa(h.current,null),Io=g,hs=0,Oc=null,kd=!1,Wm=Ee(h,g),pv=!1,Qm=SA=mv=Up=Bf=ga=0,Su=qm=null,D1=!1,(g&8)!==0&&(g|=g&32);var I=h.entangledLanes;if(I!==0)for(h=h.entanglements,I&=g;0<I;){var N=31-J(I),te=1<<N;g|=h[N],I&=~te}return tA=g,yA(),M}function oC(h,g){kr=null,Ie.H=pl,g===Na||g===Xn?(g=Cp(),hs=3):g===vc?(g=Cp(),hs=4):hs=g===Sp?8:g!==null&&typeof g=="object"&&typeof g.then=="function"?6:1,Oc=g,Zr===null&&(ga=1,o0(h,pa(g,h.current)))}function sC(){var h=Ie.H;return Ie.H=pl,h===null?pl:h}function aC(){var h=Ie.A;return Ie.A=iC,h}function bv(){ga=4,kd||(Io&4194048)!==Io&&Ta.current!==null||(Wm=!0),(Bf&134217727)===0&&(Up&134217727)===0||rs===null||Rd(rs,Io,SA,!1)}function Cv(h,g,M){var I=$o;$o|=2;var N=sC(),te=aC();(rs!==h||Io!==g)&&(m0=null,Zm(h,g)),g=!1;var Re=ga;e:do try{if(hs!==0&&Zr!==null){var Ye=Zr,bt=Oc;switch(hs){case 8:vv(),Re=6;break e;case 3:case 2:case 9:case 6:Ta.current===null&&(g=!0);var Gt=hs;if(hs=0,Oc=null,If(h,Ye,bt,Gt),M&&Wm){Re=0;break e}break;default:Gt=hs,hs=0,Oc=null,If(h,Ye,bt,Gt)}}jx(),Re=ga;break}catch(an){oC(h,an)}while(!0);return g&&h.shellSuspendCounter++,qe=yu=null,$o=I,Ie.H=N,Ie.A=te,Zr===null&&(rs=null,Io=0,yA()),Re}function jx(){for(;Zr!==null;)_v(Zr)}function Nx(h,g){var M=$o;$o|=2;var I=sC(),N=aC();rs!==h||Io!==g?(m0=null,Kp=$t()+500,Zm(h,g)):Wm=Ee(h,g);e:do try{if(hs!==0&&Zr!==null){g=Zr;var te=Oc;t:switch(hs){case 1:hs=0,Oc=null,If(h,g,te,1);break;case 2:case 9:if(bp(te)){hs=0,Oc=null,xv(g);break}g=function(){hs!==2&&hs!==9||rs!==h||(hs=7),eh(h)},te.then(g,g);break e;case 3:hs=7;break e;case 4:hs=5;break e;case 7:bp(te)?(hs=0,Oc=null,xv(g)):(hs=0,Oc=null,If(h,g,te,7));break;case 5:var Re=null;switch(Zr.tag){case 26:Re=Zr.memoizedState;case 5:case 27:var Ye=Zr;if(!Re||b(Re)){hs=0,Oc=null;var bt=Ye.sibling;if(bt!==null)Zr=bt;else{var Gt=Ye.return;Gt!==null?(Zr=Gt,g0(Gt)):Zr=null}break t}}hs=0,Oc=null,If(h,g,te,5);break;case 6:hs=0,Oc=null,If(h,g,te,6);break;case 8:vv(),ga=6;break e;default:throw Error(i(462))}}lC();break}catch(an){oC(h,an)}while(!0);return qe=yu=null,Ie.H=I,Ie.A=N,$o=M,Zr!==null?0:(rs=null,Io=0,yA(),ga)}function lC(){for(;Zr!==null&&!Rt();)_v(Zr)}function _v(h){var g=B1(h.alternate,h,tA);h.memoizedProps=h.pendingProps,g===null?g0(h):Zr=g}function xv(h){var g=h,M=g.alternate;switch(g.tag){case 15:case 0:g=l0(M,g,g.pendingProps,g.type,void 0,Io);break;case 11:g=l0(M,g,g.pendingProps,g.type.render,g.ref,Io);break;case 5:_A(g);default:Xb(M,g),g=Zr=mf(g,tA),g=B1(M,g,tA)}h.memoizedProps=h.pendingProps,g===null?g0(h):Zr=g}function If(h,g,M,I){qe=yu=null,_A(g),Kr=null,Bo=0;var N=g.return;try{if($b(h,N,g,M,Io)){ga=1,o0(h,pa(M,h.current)),Zr=null;return}}catch(te){if(N!==null)throw Zr=N,te;ga=1,o0(h,pa(M,h.current)),Zr=null;return}g.flags&32768?(Vr||I===1?h=!0:Wm||(Io&536870912)!==0?h=!1:(kd=h=!0,(I===2||I===9||I===3||I===6)&&(I=Ta.current,I!==null&&I.tag===13&&(I.flags|=16384))),Dd(g,h)):g0(g)}function g0(h){var g=h;do{if((g.flags&32768)!==0){Dd(g,kd);return}h=g.return;var M=Hb(g.alternate,g,tA);if(M!==null){Zr=M;return}if(g=g.sibling,g!==null){Zr=g;return}Zr=g=h}while(g!==null);ga===0&&(ga=5)}function Dd(h,g){do{var M=Zb(h.alternate,h);if(M!==null){M.flags&=32767,Zr=M;return}if(M=h.return,M!==null&&(M.flags|=32768,M.subtreeFlags=0,M.deletions=null),!g&&(h=h.sibling,h!==null)){Zr=h;return}Zr=h=M}while(h!==null);ga=6,Zr=null}function Pd(h,g,M,I,N,te,Re,Ye,bt){h.cancelPendingCommit=null;do z1();while(nu!==0);if(($o&6)!==0)throw Error(i(327));if(g!==null){if(g===h.current)throw Error(i(177));if(te=g.lanes|g.childLanes,te|=gd,bn(h,M,te,Re,Ye,bt),h===rs&&(Zr=rs=null,Io=0),Ym=g,Td=h,$m=M,gv=te,U1=N,rC=I,(g.subtreeFlags&10256)!==0||(g.flags&10256)!==0?(h.callbackNode=null,h.callbackPriority=0,Sv(_n,function(){return Mv(),null})):(h.callbackNode=null,h.callbackPriority=0),I=(g.flags&13878)!==0,(g.subtreeFlags&13878)!==0||I){I=Ie.T,Ie.T=null,N=Qe.p,Qe.p=2,Re=$o,$o|=4;try{Fm(h,g,M)}finally{$o=Re,Qe.p=N,Ie.T=I}}nu=1,Fp(),y0(),v0()}}function Fp(){if(nu===1){nu=0;var h=Td,g=Ym,M=(g.flags&13878)!==0;if((g.subtreeFlags&13878)!==0||M){M=Ie.T,Ie.T=null;var I=Qe.p;Qe.p=2;var N=$o;$o|=4;try{Tp(g,h);var te=Eu,Re=Om(h.containerInfo),Ye=te.focusedElem,bt=te.selectionRange;if(Re!==Ye&&Ye&&Ye.ownerDocument&&co(Ye.ownerDocument.documentElement,Ye)){if(bt!==null&&dp(Ye)){var Gt=bt.start,an=bt.end;if(an===void 0&&(an=Gt),"selectionStart"in Ye)Ye.selectionStart=Gt,Ye.selectionEnd=Math.min(an,Ye.value.length);else{var fn=Ye.ownerDocument||document,en=fn&&fn.defaultView||window;if(en.getSelection){var Yt=en.getSelection(),sr=Ye.textContent.length,nr=Math.min(bt.start,sr),os=bt.end===void 0?nr:Math.min(bt.end,sr);!Yt.extend&&nr>os&&(Re=os,os=nr,nr=Re);var Lt=Qc(Ye,nr),Et=Qc(Ye,os);if(Lt&&Et&&(Yt.rangeCount!==1||Yt.anchorNode!==Lt.node||Yt.anchorOffset!==Lt.offset||Yt.focusNode!==Et.node||Yt.focusOffset!==Et.offset)){var Wt=fn.createRange();Wt.setStart(Lt.node,Lt.offset),Yt.removeAllRanges(),nr>os?(Yt.addRange(Wt),Yt.extend(Et.node,Et.offset)):(Wt.setEnd(Et.node,Et.offset),Yt.addRange(Wt))}}}}for(fn=[],Yt=Ye;Yt=Yt.parentNode;)Yt.nodeType===1&&fn.push({element:Yt,left:Yt.scrollLeft,top:Yt.scrollTop});for(typeof Ye.focus=="function"&&Ye.focus(),Ye=0;Ye<fn.length;Ye++){var hn=fn[Ye];hn.element.scrollLeft=hn.left,hn.element.scrollTop=hn.top}}_t=!!EA,Eu=EA=null}finally{$o=N,Qe.p=I,Ie.T=M}}h.current=g,nu=2}}function y0(){if(nu===2){nu=0;var h=Td,g=Ym,M=(g.flags&8772)!==0;if((g.subtreeFlags&8772)!==0||M){M=Ie.T,Ie.T=null;var I=Qe.p;Qe.p=2;var N=$o;$o|=4;try{uv(h,g.alternate,g)}finally{$o=N,Qe.p=I,Ie.T=M}}nu=3}}function v0(){if(nu===4||nu===3){nu=0,Bt();var h=Td,g=Ym,M=$m,I=rC;(g.subtreeFlags&10256)!==0||(g.flags&10256)!==0?nu=5:(nu=0,Ym=Td=null,uC(h,h.pendingLanes));var N=h.pendingLanes;if(N===0&&(JA=null),$n(M),g=g.stateNode,xe&&typeof xe.onCommitFiberRoot=="function")try{xe.onCommitFiberRoot(It,g,void 0,(g.current.flags&128)===128)}catch{}if(I!==null){g=Ie.T,N=Qe.p,Qe.p=2,Ie.T=null;try{for(var te=h.onRecoverableError,Re=0;Re<I.length;Re++){var Ye=I[Re];te(Ye.value,{componentStack:Ye.stack})}}finally{Ie.T=g,Qe.p=N}}($m&3)!==0&&z1(),eh(h),N=h.pendingLanes,(M&4194090)!==0&&(N&42)!==0?h===Lp?Vm++:(Vm=0,Lp=h):Vm=0,nA(0)}}function uC(h,g){(h.pooledCacheLanes&=g)===0&&(g=h.pooledCache,g!=null&&(h.pooledCache=null,bd(g)))}function z1(h){return Fp(),y0(),v0(),Mv()}function Mv(){if(nu!==5)return!1;var h=Td,g=gv;gv=0;var M=$n($m),I=Ie.T,N=Qe.p;try{Qe.p=32>M?32:M,Ie.T=null,M=U1,U1=null;var te=Td,Re=$m;if(nu=0,Ym=Td=null,$m=0,($o&6)!==0)throw Error(i(331));var Ye=$o;if($o|=4,tC(te.current),dv(te,te.current,Re,M),$o=Ye,nA(0,!1),xe&&typeof xe.onPostCommitFiberRoot=="function")try{xe.onPostCommitFiberRoot(It,te)}catch{}return!0}finally{Qe.p=N,Ie.T=I,uC(h,g)}}function wv(h,g,M){g=pa(M,g),g=s0(h.stateNode,g,2),h=bA(h,g,2),h!==null&&(ot(h,2),eh(h))}function Ds(h,g,M){if(h.tag===3)wv(h,h,M);else for(;g!==null;){if(g.tag===3){wv(g,h,M);break}else if(g.tag===1){var I=g.stateNode;if(typeof g.type.getDerivedStateFromError=="function"||typeof I.componentDidCatch=="function"&&(JA===null||!JA.has(I))){h=pa(M,h),M=C1(2),I=bA(g,M,2),I!==null&&(wp(M,I,g,h),ot(I,2),eh(I));break}}g=g.return}}function j1(h,g,M){var I=h.pingCache;if(I===null){I=h.pingCache=new fv;var N=new Set;I.set(g,N)}else N=I.get(g),N===void 0&&(N=new Set,I.set(g,N));N.has(M)||(pv=!0,N.add(M),h=cC.bind(null,h,g,M),g.then(h,h))}function cC(h,g,M){var I=h.pingCache;I!==null&&I.delete(g),h.pingedLanes|=h.suspendedLanes&M,h.warmLanes&=~M,rs===h&&(Io&M)===M&&(ga===4||ga===3&&(Io&62914560)===Io&&300>$t()-P1?($o&2)===0&&Zm(h,0):mv|=M,Qm===Io&&(Qm=0)),eh(h)}function N1(h,g){g===0&&(g=Mt()),h=pu(h,g),h!==null&&(ot(h,g),eh(h))}function Xm(h){var g=h.memoizedState,M=0;g!==null&&(M=g.retryLane),N1(h,M)}function Gx(h,g){var M=0;switch(h.tag){case 13:var I=h.stateNode,N=h.memoizedState;N!==null&&(M=N.retryLane);break;case 19:I=h.stateNode;break;case 22:I=h.stateNode._retryCache;break;default:throw Error(i(314))}I!==null&&I.delete(g),N1(h,M)}function Sv(h,g){return rt(h,g)}var b0=null,kf=null,G1=!1,C0=!1,W1=!1,Ud=0;function eh(h){h!==kf&&h.next===null&&(kf===null?b0=kf=h:kf=kf.next=h),C0=!0,G1||(G1=!0,x0())}function nA(h,g){if(!W1&&C0){W1=!0;do for(var M=!1,I=b0;I!==null;){if(h!==0){var N=I.pendingLanes;if(N===0)var te=0;else{var Re=I.suspendedLanes,Ye=I.pingedLanes;te=(1<<31-J(42|h)+1)-1,te&=N&~(Re&~Ye),te=te&201326741?te&201326741|1:te?te|2:0}te!==0&&(M=!0,_0(I,te))}else te=Io,te=be(I,I===rs?te:0,I.cancelPendingCommit!==null||I.timeoutHandle!==-1),(te&3)===0||Ee(I,te)||(M=!0,_0(I,te));I=I.next}while(M);W1=!1}}function Tf(){Jm()}function Jm(){C0=G1=!1;var h=0;Ud!==0&&(gC()&&(h=Ud),Ud=0);for(var g=$t(),M=null,I=b0;I!==null;){var N=I.next,te=zp(I,g);te===0?(I.next=null,M===null?b0=N:M.next=N,N===null&&(kf=M)):(M=I,(h!==0||(te&3)!==0)&&(C0=!0)),I=N}nA(h)}function zp(h,g){for(var M=h.suspendedLanes,I=h.pingedLanes,N=h.expirationTimes,te=h.pendingLanes&-62914561;0<te;){var Re=31-J(te),Ye=1<<Re,bt=N[Re];bt===-1?((Ye&M)===0||(Ye&I)!==0)&&(N[Re]=y(Ye,g)):bt<=g&&(h.expiredLanes|=Ye),te&=~Ye}if(g=rs,M=Io,M=be(h,h===g?M:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),I=h.callbackNode,M===0||h===g&&(hs===2||hs===9)||h.cancelPendingCommit!==null)return I!==null&&I!==null&&mt(I),h.callbackNode=null,h.callbackPriority=0;if((M&3)===0||Ee(h,M)){if(g=M&-M,g===h.callbackPriority)return g;switch(I!==null&&mt(I),$n(M)){case 2:case 8:M=ai;break;case 32:M=_n;break;case 268435456:M=dn;break;default:M=_n}return I=AC.bind(null,h),M=rt(M,I),h.callbackPriority=g,h.callbackNode=M,g}return I!==null&&I!==null&&mt(I),h.callbackPriority=2,h.callbackNode=null,2}function AC(h,g){if(nu!==0&&nu!==5)return h.callbackNode=null,h.callbackPriority=0,null;var M=h.callbackNode;if(z1()&&h.callbackNode!==M)return null;var I=Io;return I=be(h,h===rs?I:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),I===0?null:(yv(h,I,g),zp(h,$t()),h.callbackNode!=null&&h.callbackNode===M?AC.bind(null,h):null)}function _0(h,g){if(z1())return null;yv(h,g,!0)}function x0(){Df(function(){($o&6)!==0?rt(zn,Tf):Jm()})}function Q1(){return Ud===0&&(Ud=gt()),Ud}function q1(h){return h==null||typeof h=="symbol"||typeof h=="boolean"?null:typeof h=="function"?h:er(""+h)}function Y1(h,g){var M=g.ownerDocument.createElement("input");return M.name=g.name,M.value=g.value,h.id&&M.setAttribute("form",h.id),g.parentNode.insertBefore(M,g),h=new FormData(h),M.parentNode.removeChild(M),h}function eg(h,g,M,I,N){if(g==="submit"&&M&&M.stateNode===N){var te=q1((N[Fn]||null).action),Re=I.submitter;Re&&(g=(g=Re[Fn]||null)?q1(g.formAction):Re.getAttribute("formAction"),g!==null&&(te=g,Re=null));var Ye=new St("action","action",null,I,N);h.push({event:Ye,listeners:[{instance:null,listener:function(){if(I.defaultPrevented){if(Ud!==0){var bt=Re?Y1(N,Re):new FormData(N);As(M,{pending:!0,data:bt,method:N.method,action:te},null,bt)}}else typeof te=="function"&&(Ye.preventDefault(),bt=Re?Y1(N,Re):new FormData(N),As(M,{pending:!0,data:bt,method:N.method,action:te},te,bt))},currentTarget:N}]})}}for(var $1=0;$1<Eo.length;$1++){var V1=Eo[$1],Ev=V1.toLowerCase(),hC=V1[0].toUpperCase()+V1.slice(1);cc(Ev,"on"+hC)}cc(pd,"onAnimationEnd"),cc(fp,"onAnimationIteration"),cc(Bl,"onAnimationStart"),cc("dblclick","onDoubleClick"),cc("focusin","onFocus"),cc("focusout","onBlur"),cc(ff,"onTransitionRun"),cc(md,"onTransitionStart"),cc(mA,"onTransitionCancel"),cc(gA,"onTransitionEnd"),uo("onMouseEnter",["mouseout","mouseover"]),uo("onMouseLeave",["mouseout","mouseover"]),uo("onPointerEnter",["pointerout","pointerover"]),uo("onPointerLeave",["pointerout","pointerover"]),ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ra("onBeforeInput",["compositionend","keypress","textInput","paste"]),ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),dC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rf));function fC(h,g){g=(g&4)!==0;for(var M=0;M<h.length;M++){var I=h[M],N=I.event;I=I.listeners;e:{var te=void 0;if(g)for(var Re=I.length-1;0<=Re;Re--){var Ye=I[Re],bt=Ye.instance,Gt=Ye.currentTarget;if(Ye=Ye.listener,bt!==te&&N.isPropagationStopped())break e;te=Ye,N.currentTarget=Gt;try{te(N)}catch(an){Dh(an)}N.currentTarget=null,te=bt}else for(Re=0;Re<I.length;Re++){if(Ye=I[Re],bt=Ye.instance,Gt=Ye.currentTarget,Ye=Ye.listener,bt!==te&&N.isPropagationStopped())break e;te=Ye,N.currentTarget=Gt;try{te(N)}catch(an){Dh(an)}N.currentTarget=null,te=bt}}}}function ho(h,g){var M=g[on];M===void 0&&(M=g[on]=new Set);var I=h+"__bubble";M.has(I)||(pC(g,h,2,!1),M.add(I))}function H1(h,g,M){var I=0;g&&(I|=4),pC(M,h,I,g)}var Ic="_reactListening"+Math.random().toString(36).slice(2);function Ov(h){if(!h[Ic]){h[Ic]=!0,Fi.forEach(function(M){M!=="selectionchange"&&(dC.has(M)||H1(M,!1,h),H1(M,!0,h))});var g=h.nodeType===9?h:h.ownerDocument;g===null||g[Ic]||(g[Ic]=!0,H1("selectionchange",!1,g))}}function pC(h,g,M,I){switch(Ci(g)){case 2:var N=Nt;break;case 8:N=Jt;break;default:N=An}M=N.bind(null,g,M,h),N=void 0,!us||g!=="touchstart"&&g!=="touchmove"&&g!=="wheel"||(N=!0),I?N!==void 0?h.addEventListener(g,M,{capture:!0,passive:N}):h.addEventListener(g,M,!0):N!==void 0?h.addEventListener(g,M,{passive:N}):h.addEventListener(g,M,!1)}function Kd(h,g,M,I,N){var te=I;if((g&1)===0&&(g&2)===0&&I!==null)e:for(;;){if(I===null)return;var Re=I.tag;if(Re===3||Re===4){var Ye=I.stateNode.containerInfo;if(Ye===N)break;if(Re===4)for(Re=I.return;Re!==null;){var bt=Re.tag;if((bt===3||bt===4)&&Re.stateNode.containerInfo===N)return;Re=Re.return}for(;Ye!==null;){if(Re=Gi(Ye),Re===null)return;if(bt=Re.tag,bt===5||bt===6||bt===26||bt===27){I=te=Re;continue e}Ye=Ye.parentNode}}I=I.return}Go(function(){var Gt=te,an=ju(M),fn=[];e:{var en=Il.get(h);if(en!==void 0){var Yt=St,sr=h;switch(h){case"keypress":if(ti(M)===0)break e;case"keydown":case"keyup":Yt=ld;break;case"focusin":sr="focus",Yt=jr;break;case"focusout":sr="blur",Yt=jr;break;case"beforeblur":case"afterblur":Yt=jr;break;case"click":if(M.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Yt=Or;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Yt=ji;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Yt=ov;break;case pd:case fp:case Bl:Yt=Sr;break;case gA:Yt=sv;break;case"scroll":case"scrollend":Yt=kn;break;case"wheel":Yt=Mm;break;case"copy":case"cut":case"paste":Yt=uc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Yt=dA;break;case"toggle":case"beforetoggle":Yt=fA}var nr=(g&4)!==0,os=!nr&&(h==="scroll"||h==="scrollend"),Lt=nr?en!==null?en+"Capture":null:en;nr=[];for(var Et=Gt,Wt;Et!==null;){var hn=Et;if(Wt=hn.stateNode,hn=hn.tag,hn!==5&&hn!==26&&hn!==27||Wt===null||Lt===null||(hn=Mr(Et,Lt),hn!=null&&nr.push(yr(Et,hn,Wt))),os)break;Et=Et.return}0<nr.length&&(en=new Yt(en,sr,null,M,an),fn.push({event:en,listeners:nr}))}}if((g&7)===0){e:{if(en=h==="mouseover"||h==="pointerover",Yt=h==="mouseout"||h==="pointerout",en&&M!==Sl&&(sr=M.relatedTarget||M.fromElement)&&(Gi(sr)||sr[Ti]))break e;if((Yt||en)&&(en=an.window===an?an:(en=an.ownerDocument)?en.defaultView||en.parentWindow:window,Yt?(sr=M.relatedTarget||M.toElement,Yt=Gt,sr=sr?Gi(sr):null,sr!==null&&(os=o(sr),nr=sr.tag,sr!==os||nr!==5&&nr!==27&&nr!==6)&&(sr=null)):(Yt=null,sr=Gt),Yt!==sr)){if(nr=Or,hn="onMouseLeave",Lt="onMouseEnter",Et="mouse",(h==="pointerout"||h==="pointerover")&&(nr=dA,hn="onPointerLeave",Lt="onPointerEnter",Et="pointer"),os=Yt==null?en:Xi(Yt),Wt=sr==null?en:Xi(sr),en=new nr(hn,Et+"leave",Yt,M,an),en.target=os,en.relatedTarget=Wt,hn=null,Gi(an)===Gt&&(nr=new nr(Lt,Et+"enter",sr,M,an),nr.target=Wt,nr.relatedTarget=os,hn=nr),os=hn,Yt&&sr)t:{for(nr=Yt,Lt=sr,Et=0,Wt=nr;Wt;Wt=Ys(Wt))Et++;for(Wt=0,hn=Lt;hn;hn=Ys(hn))Wt++;for(;0<Et-Wt;)nr=Ys(nr),Et--;for(;0<Wt-Et;)Lt=Ys(Lt),Wt--;for(;Et--;){if(nr===Lt||Lt!==null&&nr===Lt.alternate)break t;nr=Ys(nr),Lt=Ys(Lt)}nr=null}else nr=null;Yt!==null&&ya(fn,en,Yt,nr,!1),sr!==null&&os!==null&&ya(fn,os,sr,nr,!0)}}e:{if(en=Gt?Xi(Gt):window,Yt=en.nodeName&&en.nodeName.toLowerCase(),Yt==="select"||Yt==="input"&&en.type==="file")var Oi=Zg;else if(Sm(en))if(gh)Oi=h1;else{Oi=vh;var io=Xg}else Yt=en.nodeName,!Yt||Yt.toLowerCase()!=="input"||en.type!=="checkbox"&&en.type!=="radio"?Gt&&Fo(Gt.elementType)&&(Oi=Zg):Oi=hp;if(Oi&&(Oi=Oi(h,Gt))){dd(fn,Oi,M,an);break e}io&&io(h,en,Gt),h==="focusout"&&Gt&&en.type==="number"&&Gt.memoizedProps.value!=null&&Ml(en,"number",en.value)}switch(io=Gt?Xi(Gt):window,h){case"focusin":(Sm(io)||io.contentEditable==="true")&&(bh=io,fu=Gt,Pt=null);break;case"focusout":Pt=fu=bh=null;break;case"mousedown":sn=!0;break;case"contextmenu":case"mouseup":case"dragend":sn=!1,nn(fn,M,an);break;case"selectionchange":if(d1)break;case"keydown":case"keyup":nn(fn,M,an)}var qi;if(hf)e:{switch(h){case"compositionstart":var ur="onCompositionStart";break e;case"compositionend":ur="onCompositionEnd";break e;case"compositionupdate":ur="onCompositionUpdate";break e}ur=void 0}else ph?c1(h,M)&&(ur="onCompositionEnd"):h==="keydown"&&M.keyCode===229&&(ur="onCompositionStart");ur&&(ud&&M.locale!=="ko"&&(ph||ur!=="onCompositionStart"?ur==="onCompositionEnd"&&ph&&(qi=Si()):(Ro=an,gr="value"in Ro?Ro.value:Ro.textContent,ph=!0)),io=tg(Gt,ur),0<io.length&&(ur=new Gs(ur,h,null,M,an),fn.push({event:ur,listeners:io}),qi?ur.data=qi:(qi=Ad(M),qi!==null&&(ur.data=qi)))),(qi=u1?hd(h,M):Hg(h,M))&&(ur=tg(Gt,"onBeforeInput"),0<ur.length&&(io=new Gs("onBeforeInput","beforeinput",null,M,an),fn.push({event:io,listeners:ur}),io.data=qi)),eg(fn,h,Gt,M,an)}fC(fn,g)})}function yr(h,g,M){return{instance:h,listener:g,currentTarget:M}}function tg(h,g){for(var M=g+"Capture",I=[];h!==null;){var N=h,te=N.stateNode;if(N=N.tag,N!==5&&N!==26&&N!==27||te===null||(N=Mr(h,M),N!=null&&I.unshift(yr(h,N,te)),N=Mr(h,g),N!=null&&I.push(yr(h,N,te))),h.tag===3)return I;h=h.return}return[]}function Ys(h){if(h===null)return null;do h=h.return;while(h&&h.tag!==5&&h.tag!==27);return h||null}function ya(h,g,M,I,N){for(var te=g._reactName,Re=[];M!==null&&M!==I;){var Ye=M,bt=Ye.alternate,Gt=Ye.stateNode;if(Ye=Ye.tag,bt!==null&&bt===I)break;Ye!==5&&Ye!==26&&Ye!==27||Gt===null||(bt=Gt,N?(Gt=Mr(M,te),Gt!=null&&Re.unshift(yr(M,Gt,bt))):N||(Gt=Mr(M,te),Gt!=null&&Re.push(yr(M,Gt,bt)))),M=M.return}Re.length!==0&&h.push({event:g,listeners:Re})}var mC=/\r\n?/g,Ld=/\u0000|\uFFFD/g;function Bv(h){return(typeof h=="string"?h:""+h).replace(mC,`
`).replace(Ld,"")}function Iv(h,g){return g=Bv(g),Bv(h)===g}function ng(){}function ds(h,g,M,I,N,te){switch(M){case"children":typeof I=="string"?g==="body"||g==="textarea"&&I===""||jo(h,I):(typeof I=="number"||typeof I=="bigint")&&g!=="body"&&jo(h,""+I);break;case"className":xr(h,"class",I);break;case"tabIndex":xr(h,"tabindex",I);break;case"dir":case"role":case"viewBox":case"width":case"height":xr(h,M,I);break;case"style":Ql(h,I,te);break;case"data":if(g!=="object"){xr(h,"data",I);break}case"src":case"href":if(I===""&&(g!=="a"||M!=="href")){h.removeAttribute(M);break}if(I==null||typeof I=="function"||typeof I=="symbol"||typeof I=="boolean"){h.removeAttribute(M);break}I=er(""+I),h.setAttribute(M,I);break;case"action":case"formAction":if(typeof I=="function"){h.setAttribute(M,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof te=="function"&&(M==="formAction"?(g!=="input"&&ds(h,g,"name",N.name,N,null),ds(h,g,"formEncType",N.formEncType,N,null),ds(h,g,"formMethod",N.formMethod,N,null),ds(h,g,"formTarget",N.formTarget,N,null)):(ds(h,g,"encType",N.encType,N,null),ds(h,g,"method",N.method,N,null),ds(h,g,"target",N.target,N,null)));if(I==null||typeof I=="symbol"||typeof I=="boolean"){h.removeAttribute(M);break}I=er(""+I),h.setAttribute(M,I);break;case"onClick":I!=null&&(h.onclick=ng);break;case"onScroll":I!=null&&ho("scroll",h);break;case"onScrollEnd":I!=null&&ho("scrollend",h);break;case"dangerouslySetInnerHTML":if(I!=null){if(typeof I!="object"||!("__html"in I))throw Error(i(61));if(M=I.__html,M!=null){if(N.children!=null)throw Error(i(60));h.innerHTML=M}}break;case"multiple":h.multiple=I&&typeof I!="function"&&typeof I!="symbol";break;case"muted":h.muted=I&&typeof I!="function"&&typeof I!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(I==null||typeof I=="function"||typeof I=="boolean"||typeof I=="symbol"){h.removeAttribute("xlink:href");break}M=er(""+I),h.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",M);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":I!=null&&typeof I!="function"&&typeof I!="symbol"?h.setAttribute(M,""+I):h.removeAttribute(M);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":I&&typeof I!="function"&&typeof I!="symbol"?h.setAttribute(M,""):h.removeAttribute(M);break;case"capture":case"download":I===!0?h.setAttribute(M,""):I!==!1&&I!=null&&typeof I!="function"&&typeof I!="symbol"?h.setAttribute(M,I):h.removeAttribute(M);break;case"cols":case"rows":case"size":case"span":I!=null&&typeof I!="function"&&typeof I!="symbol"&&!isNaN(I)&&1<=I?h.setAttribute(M,I):h.removeAttribute(M);break;case"rowSpan":case"start":I==null||typeof I=="function"||typeof I=="symbol"||isNaN(I)?h.removeAttribute(M):h.setAttribute(M,I);break;case"popover":ho("beforetoggle",h),ho("toggle",h),ta(h,"popover",I);break;case"xlinkActuate":Xa(h,"http://www.w3.org/1999/xlink","xlink:actuate",I);break;case"xlinkArcrole":Xa(h,"http://www.w3.org/1999/xlink","xlink:arcrole",I);break;case"xlinkRole":Xa(h,"http://www.w3.org/1999/xlink","xlink:role",I);break;case"xlinkShow":Xa(h,"http://www.w3.org/1999/xlink","xlink:show",I);break;case"xlinkTitle":Xa(h,"http://www.w3.org/1999/xlink","xlink:title",I);break;case"xlinkType":Xa(h,"http://www.w3.org/1999/xlink","xlink:type",I);break;case"xmlBase":Xa(h,"http://www.w3.org/XML/1998/namespace","xml:base",I);break;case"xmlLang":Xa(h,"http://www.w3.org/XML/1998/namespace","xml:lang",I);break;case"xmlSpace":Xa(h,"http://www.w3.org/XML/1998/namespace","xml:space",I);break;case"is":ta(h,"is",I);break;case"innerText":case"textContent":break;default:(!(2<M.length)||M[0]!=="o"&&M[0]!=="O"||M[1]!=="n"&&M[1]!=="N")&&(M=wl.get(M)||M,ta(h,M,I))}}function jp(h,g,M,I,N,te){switch(M){case"style":Ql(h,I,te);break;case"dangerouslySetInnerHTML":if(I!=null){if(typeof I!="object"||!("__html"in I))throw Error(i(61));if(M=I.__html,M!=null){if(N.children!=null)throw Error(i(60));h.innerHTML=M}}break;case"children":typeof I=="string"?jo(h,I):(typeof I=="number"||typeof I=="bigint")&&jo(h,""+I);break;case"onScroll":I!=null&&ho("scroll",h);break;case"onScrollEnd":I!=null&&ho("scrollend",h);break;case"onClick":I!=null&&(h.onclick=ng);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Cl.hasOwnProperty(M))e:{if(M[0]==="o"&&M[1]==="n"&&(N=M.endsWith("Capture"),g=M.slice(2,N?M.length-7:void 0),te=h[Fn]||null,te=te!=null?te[M]:null,typeof te=="function"&&h.removeEventListener(g,te,N),typeof I=="function")){typeof te!="function"&&te!==null&&(M in h?h[M]=null:h.hasAttribute(M)&&h.removeAttribute(M)),h.addEventListener(g,I,N);break e}M in h?h[M]=I:I===!0?h.setAttribute(M,""):ta(h,M,I)}}}function nl(h,g,M){switch(g){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ho("error",h),ho("load",h);var I=!1,N=!1,te;for(te in M)if(M.hasOwnProperty(te)){var Re=M[te];if(Re!=null)switch(te){case"src":I=!0;break;case"srcSet":N=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,g));default:ds(h,g,te,Re,M,null)}}N&&ds(h,g,"srcSet",M.srcSet,M,null),I&&ds(h,g,"src",M.src,M,null);return;case"input":ho("invalid",h);var Ye=te=Re=N=null,bt=null,Gt=null;for(I in M)if(M.hasOwnProperty(I)){var an=M[I];if(an!=null)switch(I){case"name":N=an;break;case"type":Re=an;break;case"checked":bt=an;break;case"defaultChecked":Gt=an;break;case"value":te=an;break;case"defaultValue":Ye=an;break;case"children":case"dangerouslySetInnerHTML":if(an!=null)throw Error(i(137,g));break;default:ds(h,g,I,an,M,null)}}uu(h,te,Ye,bt,Gt,Re,N,!1),Ja(h);return;case"select":ho("invalid",h),I=Re=te=null;for(N in M)if(M.hasOwnProperty(N)&&(Ye=M[N],Ye!=null))switch(N){case"value":te=Ye;break;case"defaultValue":Re=Ye;break;case"multiple":I=Ye;default:ds(h,g,N,Ye,M,null)}g=te,M=Re,h.multiple=!!I,g!=null?cu(h,!!I,g,!1):M!=null&&cu(h,!!I,M,!0);return;case"textarea":ho("invalid",h),te=N=I=null;for(Re in M)if(M.hasOwnProperty(Re)&&(Ye=M[Re],Ye!=null))switch(Re){case"value":I=Ye;break;case"defaultValue":N=Ye;break;case"children":te=Ye;break;case"dangerouslySetInnerHTML":if(Ye!=null)throw Error(i(91));break;default:ds(h,g,Re,Ye,M,null)}Ia(h,I,N,te),Ja(h);return;case"option":for(bt in M)if(M.hasOwnProperty(bt)&&(I=M[bt],I!=null))switch(bt){case"selected":h.selected=I&&typeof I!="function"&&typeof I!="symbol";break;default:ds(h,g,bt,I,M,null)}return;case"dialog":ho("beforetoggle",h),ho("toggle",h),ho("cancel",h),ho("close",h);break;case"iframe":case"object":ho("load",h);break;case"video":case"audio":for(I=0;I<Rf.length;I++)ho(Rf[I],h);break;case"image":ho("error",h),ho("load",h);break;case"details":ho("toggle",h);break;case"embed":case"source":case"link":ho("error",h),ho("load",h);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Gt in M)if(M.hasOwnProperty(Gt)&&(I=M[Gt],I!=null))switch(Gt){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,g));default:ds(h,g,Gt,I,M,null)}return;default:if(Fo(g)){for(an in M)M.hasOwnProperty(an)&&(I=M[an],I!==void 0&&jp(h,g,an,I,M,void 0));return}}for(Ye in M)M.hasOwnProperty(Ye)&&(I=M[Ye],I!=null&&ds(h,g,Ye,I,M,null))}function kv(h,g,M,I){switch(g){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var N=null,te=null,Re=null,Ye=null,bt=null,Gt=null,an=null;for(Yt in M){var fn=M[Yt];if(M.hasOwnProperty(Yt)&&fn!=null)switch(Yt){case"checked":break;case"value":break;case"defaultValue":bt=fn;default:I.hasOwnProperty(Yt)||ds(h,g,Yt,null,I,fn)}}for(var en in I){var Yt=I[en];if(fn=M[en],I.hasOwnProperty(en)&&(Yt!=null||fn!=null))switch(en){case"type":te=Yt;break;case"name":N=Yt;break;case"checked":Gt=Yt;break;case"defaultChecked":an=Yt;break;case"value":Re=Yt;break;case"defaultValue":Ye=Yt;break;case"children":case"dangerouslySetInnerHTML":if(Yt!=null)throw Error(i(137,g));break;default:Yt!==fn&&ds(h,g,en,Yt,I,fn)}}lc(h,Re,Ye,bt,Gt,an,te,N);return;case"select":Yt=Re=Ye=en=null;for(te in M)if(bt=M[te],M.hasOwnProperty(te)&&bt!=null)switch(te){case"value":break;case"multiple":Yt=bt;default:I.hasOwnProperty(te)||ds(h,g,te,null,I,bt)}for(N in I)if(te=I[N],bt=M[N],I.hasOwnProperty(N)&&(te!=null||bt!=null))switch(N){case"value":en=te;break;case"defaultValue":Ye=te;break;case"multiple":Re=te;default:te!==bt&&ds(h,g,N,te,I,bt)}g=Ye,M=Re,I=Yt,en!=null?cu(h,!!M,en,!1):!!I!=!!M&&(g!=null?cu(h,!!M,g,!0):cu(h,!!M,M?[]:"",!1));return;case"textarea":Yt=en=null;for(Ye in M)if(N=M[Ye],M.hasOwnProperty(Ye)&&N!=null&&!I.hasOwnProperty(Ye))switch(Ye){case"value":break;case"children":break;default:ds(h,g,Ye,null,I,N)}for(Re in I)if(N=I[Re],te=M[Re],I.hasOwnProperty(Re)&&(N!=null||te!=null))switch(Re){case"value":en=N;break;case"defaultValue":Yt=N;break;case"children":break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(i(91));break;default:N!==te&&ds(h,g,Re,N,I,te)}zA(h,en,Yt);return;case"option":for(var sr in M)if(en=M[sr],M.hasOwnProperty(sr)&&en!=null&&!I.hasOwnProperty(sr))switch(sr){case"selected":h.selected=!1;break;default:ds(h,g,sr,null,I,en)}for(bt in I)if(en=I[bt],Yt=M[bt],I.hasOwnProperty(bt)&&en!==Yt&&(en!=null||Yt!=null))switch(bt){case"selected":h.selected=en&&typeof en!="function"&&typeof en!="symbol";break;default:ds(h,g,bt,en,I,Yt)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var nr in M)en=M[nr],M.hasOwnProperty(nr)&&en!=null&&!I.hasOwnProperty(nr)&&ds(h,g,nr,null,I,en);for(Gt in I)if(en=I[Gt],Yt=M[Gt],I.hasOwnProperty(Gt)&&en!==Yt&&(en!=null||Yt!=null))switch(Gt){case"children":case"dangerouslySetInnerHTML":if(en!=null)throw Error(i(137,g));break;default:ds(h,g,Gt,en,I,Yt)}return;default:if(Fo(g)){for(var os in M)en=M[os],M.hasOwnProperty(os)&&en!==void 0&&!I.hasOwnProperty(os)&&jp(h,g,os,void 0,I,en);for(an in I)en=I[an],Yt=M[an],!I.hasOwnProperty(an)||en===Yt||en===void 0&&Yt===void 0||jp(h,g,an,en,I,Yt);return}}for(var Lt in M)en=M[Lt],M.hasOwnProperty(Lt)&&en!=null&&!I.hasOwnProperty(Lt)&&ds(h,g,Lt,null,I,en);for(fn in I)en=I[fn],Yt=M[fn],!I.hasOwnProperty(fn)||en===Yt||en==null&&Yt==null||ds(h,g,fn,en,I,Yt)}var EA=null,Eu=null;function OA(h){return h.nodeType===9?h:h.ownerDocument}function Es(h){switch(h){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function fs(h,g){if(h===0)switch(g){case"svg":return 1;case"math":return 2;default:return 0}return h===1&&g==="foreignObject"?0:h}function M0(h,g){return h==="textarea"||h==="noscript"||typeof g.children=="string"||typeof g.children=="number"||typeof g.children=="bigint"||typeof g.dangerouslySetInnerHTML=="object"&&g.dangerouslySetInnerHTML!==null&&g.dangerouslySetInnerHTML.__html!=null}var Z1=null;function gC(){var h=window.event;return h&&h.type==="popstate"?h===Z1?!1:(Z1=h,!0):(Z1=null,!1)}var Tv=typeof setTimeout=="function"?setTimeout:void 0,Wx=typeof clearTimeout=="function"?clearTimeout:void 0,Rv=typeof Promise=="function"?Promise:void 0,Df=typeof queueMicrotask=="function"?queueMicrotask:typeof Rv<"u"?function(h){return Rv.resolve(null).then(h).catch(Dv)}:Tv;function Dv(h){setTimeout(function(){throw h})}function iA(h){return h==="head"}function w0(h,g){var M=g,I=0,N=0;do{var te=M.nextSibling;if(h.removeChild(M),te&&te.nodeType===8)if(M=te.data,M==="/$"){if(0<I&&8>I){M=I;var Re=h.ownerDocument;if(M&1&&Pf(Re.documentElement),M&2&&Pf(Re.body),M&4)for(M=Re.head,Pf(M),Re=M.firstChild;Re;){var Ye=Re.nextSibling,bt=Re.nodeName;Re[ea]||bt==="SCRIPT"||bt==="STYLE"||bt==="LINK"&&Re.rel.toLowerCase()==="stylesheet"||M.removeChild(Re),Re=Ye}}if(N===0){h.removeChild(te),ol(g);return}N--}else M==="$"||M==="$?"||M==="$!"?N++:I=M.charCodeAt(0)-48;else I=0;M=te}while(M);ol(g)}function X1(h){var g=h.firstChild;for(g&&g.nodeType===10&&(g=g.nextSibling);g;){var M=g;switch(g=g.nextSibling,M.nodeName){case"HTML":case"HEAD":case"BODY":X1(M),Pn(M);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(M.rel.toLowerCase()==="stylesheet")continue}h.removeChild(M)}}function yC(h,g,M,I){for(;h.nodeType===1;){var N=M;if(h.nodeName.toLowerCase()!==g.toLowerCase()){if(!I&&(h.nodeName!=="INPUT"||h.type!=="hidden"))break}else if(I){if(!h[ea])switch(g){case"meta":if(!h.hasAttribute("itemprop"))break;return h;case"link":if(te=h.getAttribute("rel"),te==="stylesheet"&&h.hasAttribute("data-precedence"))break;if(te!==N.rel||h.getAttribute("href")!==(N.href==null||N.href===""?null:N.href)||h.getAttribute("crossorigin")!==(N.crossOrigin==null?null:N.crossOrigin)||h.getAttribute("title")!==(N.title==null?null:N.title))break;return h;case"style":if(h.hasAttribute("data-precedence"))break;return h;case"script":if(te=h.getAttribute("src"),(te!==(N.src==null?null:N.src)||h.getAttribute("type")!==(N.type==null?null:N.type)||h.getAttribute("crossorigin")!==(N.crossOrigin==null?null:N.crossOrigin))&&te&&h.hasAttribute("async")&&!h.hasAttribute("itemprop"))break;return h;default:return h}}else if(g==="input"&&h.type==="hidden"){var te=N.name==null?null:""+N.name;if(N.type==="hidden"&&h.getAttribute("name")===te)return h}else return h;if(h=kc(h.nextSibling),h===null)break}return null}function J1(h,g,M){if(g==="")return null;for(;h.nodeType!==3;)if((h.nodeType!==1||h.nodeName!=="INPUT"||h.type!=="hidden")&&!M||(h=kc(h.nextSibling),h===null))return null;return h}function Ou(h){return h.data==="$!"||h.data==="$?"&&h.ownerDocument.readyState==="complete"}function Np(h,g){var M=h.ownerDocument;if(h.data!=="$?"||M.readyState==="complete")g();else{var I=function(){g(),M.removeEventListener("DOMContentLoaded",I)};M.addEventListener("DOMContentLoaded",I),h._reactRetry=I}}function kc(h){for(;h!=null;h=h.nextSibling){var g=h.nodeType;if(g===1||g===3)break;if(g===8){if(g=h.data,g==="$"||g==="$!"||g==="$?"||g==="F!"||g==="F")break;if(g==="/$")return null}}return h}var ey=null;function S0(h){h=h.previousSibling;for(var g=0;h;){if(h.nodeType===8){var M=h.data;if(M==="$"||M==="$!"||M==="$?"){if(g===0)return h;g--}else M==="/$"&&g++}h=h.previousSibling}return null}function E0(h,g,M){switch(g=OA(M),h){case"html":if(h=g.documentElement,!h)throw Error(i(452));return h;case"head":if(h=g.head,!h)throw Error(i(453));return h;case"body":if(h=g.body,!h)throw Error(i(454));return h;default:throw Error(i(451))}}function Pf(h){for(var g=h.attributes;g.length;)h.removeAttributeNode(g[0]);Pn(h)}var rA=new Map,Nh=new Set;function Br(h){return typeof h.getRootNode=="function"?h.getRootNode():h.nodeType===9?h:h.ownerDocument}var Zu=Qe.d;Qe.d={f:ps,r:ty,D:Pv,C:vC,L:O0,m:bC,X:CC,S:Qx,M:Uv};function ps(){var h=Zu.f(),g=F1();return h||g}function ty(h){var g=Li(h);g!==null&&g.tag===5&&g.type==="form"?tr(g):Zu.r(h)}var Gp=typeof document>"u"?null:document;function zo(h,g,M){var I=Gp;if(I&&typeof g=="string"&&g){var N=Ba(g);N='link[rel="'+h+'"][href="'+N+'"]',typeof M=="string"&&(N+='[crossorigin="'+M+'"]'),Nh.has(N)||(Nh.add(N),h={rel:h,crossOrigin:M,href:g},I.querySelector(N)===null&&(g=I.createElement("link"),nl(g,"link",h),lo(g),I.head.appendChild(g)))}}function Pv(h){Zu.D(h),zo("dns-prefetch",h,null)}function vC(h,g){Zu.C(h,g),zo("preconnect",h,g)}function O0(h,g,M){Zu.L(h,g,M);var I=Gp;if(I&&h&&g){var N='link[rel="preload"][as="'+Ba(g)+'"]';g==="image"&&M&&M.imageSrcSet?(N+='[imagesrcset="'+Ba(M.imageSrcSet)+'"]',typeof M.imageSizes=="string"&&(N+='[imagesizes="'+Ba(M.imageSizes)+'"]')):N+='[href="'+Ba(h)+'"]';var te=N;switch(g){case"style":te=Wp(h);break;case"script":te=Uf(h)}rA.has(te)||(h=m({rel:"preload",href:g==="image"&&M&&M.imageSrcSet?void 0:h,as:g},M),rA.set(te,h),I.querySelector(N)!==null||g==="style"&&I.querySelector(Fd(te))||g==="script"&&I.querySelector(Kf(te))||(g=I.createElement("link"),nl(g,"link",h),lo(g),I.head.appendChild(g)))}}function bC(h,g){Zu.m(h,g);var M=Gp;if(M&&h){var I=g&&typeof g.as=="string"?g.as:"script",N='link[rel="modulepreload"][as="'+Ba(I)+'"][href="'+Ba(h)+'"]',te=N;switch(I){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":te=Uf(h)}if(!rA.has(te)&&(h=m({rel:"modulepreload",href:h},g),rA.set(te,h),M.querySelector(N)===null)){switch(I){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(M.querySelector(Kf(te)))return}I=M.createElement("link"),nl(I,"link",h),lo(I),M.head.appendChild(I)}}}function Qx(h,g,M){Zu.S(h,g,M);var I=Gp;if(I&&h){var N=Oa(I).hoistableStyles,te=Wp(h);g=g||"default";var Re=N.get(te);if(!Re){var Ye={loading:0,preload:null};if(Re=I.querySelector(Fd(te)))Ye.loading=5;else{h=m({rel:"stylesheet",href:h,"data-precedence":g},M),(M=rA.get(te))&&Qp(h,M);var bt=Re=I.createElement("link");lo(bt),nl(bt,"link",h),bt._p=new Promise(function(Gt,an){bt.onload=Gt,bt.onerror=an}),bt.addEventListener("load",function(){Ye.loading|=1}),bt.addEventListener("error",function(){Ye.loading|=2}),Ye.loading|=4,rg(Re,g,I)}Re={type:"stylesheet",instance:Re,count:1,state:Ye},N.set(te,Re)}}}function CC(h,g){Zu.X(h,g);var M=Gp;if(M&&h){var I=Oa(M).hoistableScripts,N=Uf(h),te=I.get(N);te||(te=M.querySelector(Kf(N)),te||(h=m({src:h,async:!0},g),(g=rA.get(N))&&B0(h,g),te=M.createElement("script"),lo(te),nl(te,"link",h),M.head.appendChild(te)),te={type:"script",instance:te,count:1,state:null},I.set(N,te))}}function Uv(h,g){Zu.M(h,g);var M=Gp;if(M&&h){var I=Oa(M).hoistableScripts,N=Uf(h),te=I.get(N);te||(te=M.querySelector(Kf(N)),te||(h=m({src:h,async:!0,type:"module"},g),(g=rA.get(N))&&B0(h,g),te=M.createElement("script"),lo(te),nl(te,"link",h),M.head.appendChild(te)),te={type:"script",instance:te,count:1,state:null},I.set(N,te))}}function ny(h,g,M,I){var N=(N=vt.current)?Br(N):null;if(!N)throw Error(i(446));switch(h){case"meta":case"title":return null;case"style":return typeof M.precedence=="string"&&typeof M.href=="string"?(g=Wp(M.href),M=Oa(N).hoistableStyles,I=M.get(g),I||(I={type:"style",instance:null,count:0,state:null},M.set(g,I)),I):{type:"void",instance:null,count:0,state:null};case"link":if(M.rel==="stylesheet"&&typeof M.href=="string"&&typeof M.precedence=="string"){h=Wp(M.href);var te=Oa(N).hoistableStyles,Re=te.get(h);if(Re||(N=N.ownerDocument||N,Re={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},te.set(h,Re),(te=N.querySelector(Fd(h)))&&!te._p&&(Re.instance=te,Re.state.loading=5),rA.has(h)||(M={rel:"preload",as:"style",href:M.href,crossOrigin:M.crossOrigin,integrity:M.integrity,media:M.media,hrefLang:M.hrefLang,referrerPolicy:M.referrerPolicy},rA.set(h,M),te||_C(N,h,M,Re.state))),g&&I===null)throw Error(i(528,""));return Re}if(g&&I!==null)throw Error(i(529,""));return null;case"script":return g=M.async,M=M.src,typeof M=="string"&&g&&typeof g!="function"&&typeof g!="symbol"?(g=Uf(M),M=Oa(N).hoistableScripts,I=M.get(g),I||(I={type:"script",instance:null,count:0,state:null},M.set(g,I)),I):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,h))}}function Wp(h){return'href="'+Ba(h)+'"'}function Fd(h){return'link[rel="stylesheet"]['+h+"]"}function iy(h){return m({},h,{"data-precedence":h.precedence,precedence:null})}function _C(h,g,M,I){h.querySelector('link[rel="preload"][as="style"]['+g+"]")?I.loading=1:(g=h.createElement("link"),I.preload=g,g.addEventListener("load",function(){return I.loading|=1}),g.addEventListener("error",function(){return I.loading|=2}),nl(g,"link",M),lo(g),h.head.appendChild(g))}function Uf(h){return'[src="'+Ba(h)+'"]'}function Kf(h){return"script[async]"+h}function ig(h,g,M){if(g.count++,g.instance===null)switch(g.type){case"style":var I=h.querySelector('style[data-href~="'+Ba(M.href)+'"]');if(I)return g.instance=I,lo(I),I;var N=m({},M,{"data-href":M.href,"data-precedence":M.precedence,href:null,precedence:null});return I=(h.ownerDocument||h).createElement("style"),lo(I),nl(I,"style",N),rg(I,M.precedence,h),g.instance=I;case"stylesheet":N=Wp(M.href);var te=h.querySelector(Fd(N));if(te)return g.state.loading|=4,g.instance=te,lo(te),te;I=iy(M),(N=rA.get(N))&&Qp(I,N),te=(h.ownerDocument||h).createElement("link"),lo(te);var Re=te;return Re._p=new Promise(function(Ye,bt){Re.onload=Ye,Re.onerror=bt}),nl(te,"link",I),g.state.loading|=4,rg(te,M.precedence,h),g.instance=te;case"script":return te=Uf(M.src),(N=h.querySelector(Kf(te)))?(g.instance=N,lo(N),N):(I=M,(N=rA.get(te))&&(I=m({},M),B0(I,N)),h=h.ownerDocument||h,N=h.createElement("script"),lo(N),nl(N,"link",I),h.head.appendChild(N),g.instance=N);case"void":return null;default:throw Error(i(443,g.type))}else g.type==="stylesheet"&&(g.state.loading&4)===0&&(I=g.instance,g.state.loading|=4,rg(I,M.precedence,h));return g.instance}function rg(h,g,M){for(var I=M.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),N=I.length?I[I.length-1]:null,te=N,Re=0;Re<I.length;Re++){var Ye=I[Re];if(Ye.dataset.precedence===g)te=Ye;else if(te!==N)break}te?te.parentNode.insertBefore(h,te.nextSibling):(g=M.nodeType===9?M.head:M,g.insertBefore(h,g.firstChild))}function Qp(h,g){h.crossOrigin==null&&(h.crossOrigin=g.crossOrigin),h.referrerPolicy==null&&(h.referrerPolicy=g.referrerPolicy),h.title==null&&(h.title=g.title)}function B0(h,g){h.crossOrigin==null&&(h.crossOrigin=g.crossOrigin),h.referrerPolicy==null&&(h.referrerPolicy=g.referrerPolicy),h.integrity==null&&(h.integrity=g.integrity)}var og=null;function f(h,g,M){if(og===null){var I=new Map,N=og=new Map;N.set(M,I)}else N=og,I=N.get(M),I||(I=new Map,N.set(M,I));if(I.has(h))return I;for(I.set(h,null),M=M.getElementsByTagName(h),N=0;N<M.length;N++){var te=M[N];if(!(te[ea]||te[Vn]||h==="link"&&te.getAttribute("rel")==="stylesheet")&&te.namespaceURI!=="http://www.w3.org/2000/svg"){var Re=te.getAttribute(g)||"";Re=h+Re;var Ye=I.get(Re);Ye?Ye.push(te):I.set(Re,[te])}}return I}function u(h,g,M){h=h.ownerDocument||h,h.head.insertBefore(M,g==="title"?h.querySelector("head > title"):null)}function d(h,g,M){if(M===1||g.itemProp!=null)return!1;switch(h){case"meta":case"title":return!0;case"style":if(typeof g.precedence!="string"||typeof g.href!="string"||g.href==="")break;return!0;case"link":if(typeof g.rel!="string"||typeof g.href!="string"||g.href===""||g.onLoad||g.onError)break;switch(g.rel){case"stylesheet":return h=g.disabled,typeof g.precedence=="string"&&h==null;default:return!0}case"script":if(g.async&&typeof g.async!="function"&&typeof g.async!="symbol"&&!g.onLoad&&!g.onError&&g.src&&typeof g.src=="string")return!0}return!1}function b(h){return!(h.type==="stylesheet"&&(h.state.loading&3)===0)}var S=null;function k(){}function D(h,g,M){if(S===null)throw Error(i(475));var I=S;if(g.type==="stylesheet"&&(typeof M.media!="string"||matchMedia(M.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var N=Wp(M.href),te=h.querySelector(Fd(N));if(te){h=te._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(I.count++,I=W.bind(I),h.then(I,I)),g.state.loading|=4,g.instance=te,lo(te);return}te=h.ownerDocument||h,M=iy(M),(N=rA.get(N))&&Qp(M,N),te=te.createElement("link"),lo(te);var Re=te;Re._p=new Promise(function(Ye,bt){Re.onload=Ye,Re.onerror=bt}),nl(te,"link",M),g.instance=te}I.stylesheets===null&&(I.stylesheets=new Map),I.stylesheets.set(g,h),(h=g.state.preload)&&(g.state.loading&3)===0&&(I.count++,g=W.bind(I),h.addEventListener("load",g),h.addEventListener("error",g))}}function K(){if(S===null)throw Error(i(475));var h=S;return h.stylesheets&&h.count===0&&re(h,h.stylesheets),0<h.count?function(g){var M=setTimeout(function(){if(h.stylesheets&&re(h,h.stylesheets),h.unsuspend){var I=h.unsuspend;h.unsuspend=null,I()}},6e4);return h.unsuspend=g,function(){h.unsuspend=null,clearTimeout(M)}}:null}function W(){if(this.count--,this.count===0){if(this.stylesheets)re(this,this.stylesheets);else if(this.unsuspend){var h=this.unsuspend;this.unsuspend=null,h()}}}var ee=null;function re(h,g){h.stylesheets=null,h.unsuspend!==null&&(h.count++,ee=new Map,g.forEach(he,h),ee=null,W.call(h))}function he(h,g){if(!(g.state.loading&4)){var M=ee.get(h);if(M)var I=M.get(null);else{M=new Map,ee.set(h,M);for(var N=h.querySelectorAll("link[data-precedence],style[data-precedence]"),te=0;te<N.length;te++){var Re=N[te];(Re.nodeName==="LINK"||Re.getAttribute("media")!=="not all")&&(M.set(Re.dataset.precedence,Re),I=Re)}I&&M.set(null,I)}N=g.instance,Re=N.getAttribute("data-precedence"),te=M.get(Re)||I,te===I&&M.set(null,N),M.set(Re,N),this.count++,I=W.bind(this),N.addEventListener("load",I),N.addEventListener("error",I),te?te.parentNode.insertBefore(N,te.nextSibling):(h=h.nodeType===9?h.head:h,h.insertBefore(N,h.firstChild)),g.state.loading|=4}}var Oe={$$typeof:V,Provider:null,Consumer:null,_currentValue:tt,_currentValue2:tt,_threadCount:0};function De(h,g,M,I,N,te,Re,Ye){this.tag=1,this.containerInfo=h,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Dt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dt(0),this.hiddenUpdates=Dt(null),this.identifierPrefix=I,this.onUncaughtError=N,this.onCaughtError=te,this.onRecoverableError=Re,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Ye,this.incompleteTransitions=new Map}function Ke(h,g,M,I,N,te,Re,Ye,bt,Gt,an,fn){return h=new De(h,g,M,Re,Ye,bt,Gt,fn),g=1,te===!0&&(g|=24),te=mu(3,null,null,g),h.current=te,te.stateNode=h,g=Ih(),g.refCount++,h.pooledCache=g,g.refCount++,te.memoizedState={element:I,isDehydrated:M,cache:g},Cd(te),h}function Ge(h){return h?(h=fr,h):fr}function Ve(h,g,M,I,N,te){N=Ge(N),I.context===null?I.context=N:I.pendingContext=N,I=Th(g),I.payload={element:M},te=te===void 0?null:te,te!==null&&(I.callback=te),M=bA(h,I,g),M!==null&&(Bc(M,h,g),_d(M,h,g))}function at(h,g){if(h=h.memoizedState,h!==null&&h.dehydrated!==null){var M=h.retryLane;h.retryLane=M!==0&&M<g?M:g}}function Tt(h,g){at(h,g),(h=h.alternate)&&at(h,g)}function ft(h){if(h.tag===13){var g=pu(h,67108864);g!==null&&Bc(g,h,67108864),Tt(h,67108864)}}var _t=!0;function Nt(h,g,M,I){var N=Ie.T;Ie.T=null;var te=Qe.p;try{Qe.p=2,An(h,g,M,I)}finally{Qe.p=te,Ie.T=N}}function Jt(h,g,M,I){var N=Ie.T;Ie.T=null;var te=Qe.p;try{Qe.p=8,An(h,g,M,I)}finally{Qe.p=te,Ie.T=N}}function An(h,g,M,I){if(_t){var N=Wn(I);if(N===null)Kd(h,g,I,Dn,M),$s(h,I);else if(Kl(N,h,g,M,I))I.stopPropagation();else if($s(h,I),g&4&&-1<Qr.indexOf(h)){for(;N!==null;){var te=Li(N);if(te!==null)switch(te.tag){case 3:if(te=te.stateNode,te.current.memoizedState.isDehydrated){var Re=lt(te.pendingLanes);if(Re!==0){var Ye=te;for(Ye.pendingLanes|=2,Ye.entangledLanes|=2;Re;){var bt=1<<31-J(Re);Ye.entanglements[1]|=bt,Re&=~bt}eh(te),($o&6)===0&&(Kp=$t()+500,nA(0))}}break;case 13:Ye=pu(te,2),Ye!==null&&Bc(Ye,te,2),F1(),Tt(te,2)}if(te=Wn(I),te===null&&Kd(h,g,I,Dn,M),te===N)break;N=te}N!==null&&I.stopPropagation()}else Kd(h,g,I,null,M)}}function Wn(h){return h=ju(h),Nn(h)}var Dn=null;function Nn(h){if(Dn=null,h=Gi(h),h!==null){var g=o(h);if(g===null)h=null;else{var M=g.tag;if(M===13){if(h=s(g),h!==null)return h;h=null}else if(M===3){if(g.stateNode.current.memoizedState.isDehydrated)return g.tag===3?g.stateNode.containerInfo:null;h=null}else g!==h&&(h=null)}}return Dn=h,null}function Ci(h){switch(h){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Rn()){case zn:return 2;case ai:return 8;case _n:case Bn:return 32;case dn:return 268435456;default:return 32}default:return 32}}var jn=!1,Un=null,rn=null,Ui=null,Qi=new Map,Mi=new Map,oi=[],Qr="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function $s(h,g){switch(h){case"focusin":case"focusout":Un=null;break;case"dragenter":case"dragleave":rn=null;break;case"mouseover":case"mouseout":Ui=null;break;case"pointerover":case"pointerout":Qi.delete(g.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mi.delete(g.pointerId)}}function na(h,g,M,I,N,te){return h===null||h.nativeEvent!==te?(h={blockedOn:g,domEventName:M,eventSystemFlags:I,nativeEvent:te,targetContainers:[N]},g!==null&&(g=Li(g),g!==null&&ft(g)),h):(h.eventSystemFlags|=I,g=h.targetContainers,N!==null&&g.indexOf(N)===-1&&g.push(N),h)}function Kl(h,g,M,I,N){switch(g){case"focusin":return Un=na(Un,h,g,M,I,N),!0;case"dragenter":return rn=na(rn,h,g,M,I,N),!0;case"mouseover":return Ui=na(Ui,h,g,M,I,N),!0;case"pointerover":var te=N.pointerId;return Qi.set(te,na(Qi.get(te)||null,h,g,M,I,N)),!0;case"gotpointercapture":return te=N.pointerId,Mi.set(te,na(Mi.get(te)||null,h,g,M,I,N)),!0}return!1}function Tc(h){var g=Gi(h.target);if(g!==null){var M=o(g);if(M!==null){if(g=M.tag,g===13){if(g=s(M),g!==null){h.blockedOn=g,ir(h.priority,function(){if(M.tag===13){var I=wo();I=qn(I);var N=pu(M,I);N!==null&&Bc(N,M,I),Tt(M,I)}});return}}else if(g===3&&M.stateNode.current.memoizedState.isDehydrated){h.blockedOn=M.tag===3?M.stateNode.containerInfo:null;return}}}h.blockedOn=null}function Ll(h){if(h.blockedOn!==null)return!1;for(var g=h.targetContainers;0<g.length;){var M=Wn(h.nativeEvent);if(M===null){M=h.nativeEvent;var I=new M.constructor(M.type,M);Sl=I,M.target.dispatchEvent(I),Sl=null}else return g=Li(M),g!==null&&ft(g),h.blockedOn=M,!1;g.shift()}return!0}function il(h,g,M){Ll(h)&&M.delete(g)}function Vs(){jn=!1,Un!==null&&Ll(Un)&&(Un=null),rn!==null&&Ll(rn)&&(rn=null),Ui!==null&&Ll(Ui)&&(Ui=null),Qi.forEach(il),Mi.forEach(il)}function va(h,g){h.blockedOn===g&&(h.blockedOn=null,jn||(jn=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Vs)))}var Ra=null;function rl(h){Ra!==h&&(Ra=h,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ra===h&&(Ra=null);for(var g=0;g<h.length;g+=3){var M=h[g],I=h[g+1],N=h[g+2];if(typeof I!="function"){if(Nn(I||M)===null)continue;break}var te=Li(M);te!==null&&(h.splice(g,3),g-=3,As(te,{pending:!0,data:N,method:M.method,action:I},I,N))}}))}function ol(h){function g(bt){return va(bt,h)}Un!==null&&va(Un,h),rn!==null&&va(rn,h),Ui!==null&&va(Ui,h),Qi.forEach(g),Mi.forEach(g);for(var M=0;M<oi.length;M++){var I=oi[M];I.blockedOn===h&&(I.blockedOn=null)}for(;0<oi.length&&(M=oi[0],M.blockedOn===null);)Tc(M),M.blockedOn===null&&oi.shift();if(M=(h.ownerDocument||h).$$reactFormReplay,M!=null)for(I=0;I<M.length;I+=3){var N=M[I],te=M[I+1],Re=N[Fn]||null;if(typeof te=="function")Re||rl(M);else if(Re){var Ye=null;if(te&&te.hasAttribute("formAction")){if(N=te,Re=te[Fn]||null)Ye=Re.formAction;else if(Nn(N)!==null)continue}else Ye=Re.action;typeof Ye=="function"?M[I+1]=Ye:(M.splice(I,3),I-=3),rl(M)}}}function Xu(h){this._internalRoot=h}ba.prototype.render=Xu.prototype.render=function(h){var g=this._internalRoot;if(g===null)throw Error(i(409));var M=g.current,I=wo();Ve(M,I,h,g,null,null)},ba.prototype.unmount=Xu.prototype.unmount=function(){var h=this._internalRoot;if(h!==null){this._internalRoot=null;var g=h.containerInfo;Ve(h.current,2,null,h,null,null),F1(),g[Ti]=null}};function ba(h){this._internalRoot=h}ba.prototype.unstable_scheduleHydration=function(h){if(h){var g=mi();h={blockedOn:null,target:h,priority:g};for(var M=0;M<oi.length&&g!==0&&g<oi[M].priority;M++);oi.splice(M,0,h),M===0&&Tc(h)}};var Bu=e.version;if(Bu!=="19.1.1")throw Error(i(527,Bu,"19.1.1"));Qe.findDOMNode=function(h){var g=h._reactInternals;if(g===void 0)throw typeof h.render=="function"?Error(i(188)):(h=Object.keys(h).join(","),Error(i(268,h)));return h=c(g),h=h!==null?A(h):null,h=h===null?null:h.stateNode,h};var qa={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:Ie,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ca=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ca.isDisabled&&Ca.supportsFiber)try{It=Ca.inject(qa),xe=Ca}catch{}}return $x.createRoot=function(h,g){if(!r(h))throw Error(i(299));var M=!1,I="",N=y1,te=v1,Re=b1,Ye=null;return g!=null&&(g.unstable_strictMode===!0&&(M=!0),g.identifierPrefix!==void 0&&(I=g.identifierPrefix),g.onUncaughtError!==void 0&&(N=g.onUncaughtError),g.onCaughtError!==void 0&&(te=g.onCaughtError),g.onRecoverableError!==void 0&&(Re=g.onRecoverableError),g.unstable_transitionCallbacks!==void 0&&(Ye=g.unstable_transitionCallbacks)),g=Ke(h,1,!1,null,null,M,I,N,te,Re,Ye,null),h[Ti]=g.current,Ov(h),new Xu(g)},$x.hydrateRoot=function(h,g,M){if(!r(h))throw Error(i(299));var I=!1,N="",te=y1,Re=v1,Ye=b1,bt=null,Gt=null;return M!=null&&(M.unstable_strictMode===!0&&(I=!0),M.identifierPrefix!==void 0&&(N=M.identifierPrefix),M.onUncaughtError!==void 0&&(te=M.onUncaughtError),M.onCaughtError!==void 0&&(Re=M.onCaughtError),M.onRecoverableError!==void 0&&(Ye=M.onRecoverableError),M.unstable_transitionCallbacks!==void 0&&(bt=M.unstable_transitionCallbacks),M.formState!==void 0&&(Gt=M.formState)),g=Ke(h,1,!0,g,M??null,I,N,te,Re,Ye,bt,Gt),g.context=Ge(null),M=g.current,I=wo(),I=qn(I),N=Th(I),N.callback=null,bA(M,N,I),M=I,g.current.lanes=M,ot(g,M),eh(g),h[Ti]=g.current,Ov(h),new ba(g)},$x.version="19.1.1",$x}var DL;function Nae(){if(DL)return Q6.exports;DL=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Q6.exports=jae(),Q6.exports}var jH=Nae();const Gae="modulepreload",Wae=function(n){return"/maputnik/"+n},PL={},MC=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0){let A=function(m){return Promise.all(m.map(v=>Promise.resolve(v).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};var s=A;document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=a?.nonce||a?.getAttribute("nonce");r=A(t.map(m=>{if(m=Wae(m),m in PL)return;PL[m]=!0;const v=m.endsWith(".css"),x=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const _=document.createElement("link");if(_.rel=v?"stylesheet":Gae,v||(_.as="script"),_.crossOrigin="",_.href=m,c&&_.setAttribute("nonce",c),document.head.appendChild(_),v)return new Promise((O,P)=>{_.addEventListener("load",O),_.addEventListener("error",()=>P(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return r.then(a=>{for(const c of a||[])c.status==="rejected"&&o(c.reason);return e().catch(o)})},Qae=(n,e,t)=>{const i=n[e];return i?typeof i=="function"?i():Promise.resolve(i):new Promise((r,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==t?". Note that variables only represent file names one level deep.":""))))})},Fr=n=>typeof n=="string",Vx=()=>{let n,e;const t=new Promise((i,r)=>{n=i,e=r});return t.resolve=n,t.reject=e,t},UL=n=>n==null?"":""+n,qae=(n,e,t)=>{n.forEach(i=>{e[i]&&(t[i]=e[i])})},Yae=/###/g,KL=n=>n&&n.indexOf("###")>-1?n.replace(Yae,"."):n,LL=n=>!n||Fr(n),q2=(n,e,t)=>{const i=Fr(e)?e.split("."):e;let r=0;for(;r<i.length-1;){if(LL(n))return{};const o=KL(i[r]);!n[o]&&t&&(n[o]=new t),Object.prototype.hasOwnProperty.call(n,o)?n=n[o]:n={},++r}return LL(n)?{}:{obj:n,k:KL(i[r])}},FL=(n,e,t)=>{const{obj:i,k:r}=q2(n,e,Object);if(i!==void 0||e.length===1){i[r]=t;return}let o=e[e.length-1],s=e.slice(0,e.length-1),a=q2(n,s,Object);for(;a.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=q2(n,s,Object),a?.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=t},$ae=(n,e,t,i)=>{const{obj:r,k:o}=q2(n,e,Object);r[o]=r[o]||[],r[o].push(t)},Cw=(n,e)=>{const{obj:t,k:i}=q2(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,i))return t[i]},Vae=(n,e,t)=>{const i=Cw(n,t);return i!==void 0?i:Cw(e,t)},NH=(n,e,t)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in n?Fr(n[i])||n[i]instanceof String||Fr(e[i])||e[i]instanceof String?t&&(n[i]=e[i]):NH(n[i],e[i],t):n[i]=e[i]);return n},wC=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Hae={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Zae=n=>Fr(n)?n.replace(/[&<>"'\/]/g,e=>Hae[e]):n;class Xae{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const Jae=[" ",",","?","!",";"],ele=new Xae(20),tle=(n,e,t)=>{e=e||"",t=t||"";const i=Jae.filter(s=>e.indexOf(s)<0&&t.indexOf(s)<0);if(i.length===0)return!0;const r=ele.getRegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!r.test(n);if(!o){const s=n.indexOf(t);s>0&&!r.test(n.substring(0,s))&&(o=!0)}return o},NT=(n,e,t=".")=>{if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const i=e.split(t);let r=n;for(let o=0;o<i.length;){if(!r||typeof r!="object")return;let s,a="";for(let c=o;c<i.length;++c)if(c!==o&&(a+=t),a+=i[c],s=r[a],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&c<i.length-1)continue;o+=c-o+1;break}r=s}return r},b3=n=>n?.replace("_","-"),nle={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console?.[n]?.apply?.(console,e)}};class _w{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||nle,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,r){return r&&!this.debug?null:(Fr(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new _w(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new _w(this.logger,e)}}var Cg=new _w;class qS{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(t)||0;this.observers[i].set(t,r+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([r,o])=>{for(let s=0;s<o;s++)r(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,o])=>{for(let s=0;s<o;s++)r.apply(r,[e,...t])})}}class zL extends qS{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i,r={}){const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,s=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],i&&(Array.isArray(i)?a.push(...i):Fr(i)&&o?a.push(...i.split(o)):a.push(i)));const c=Cw(this.data,a);return!c&&!t&&!i&&e.indexOf(".")>-1&&(e=a[0],t=a[1],i=a.slice(2).join(".")),c||!s||!Fr(i)?c:NT(this.data?.[e]?.[t],i,o)}addResource(e,t,i,r,o={silent:!1}){const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[e,t];i&&(a=a.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),FL(this.data,a,r),o.silent||this.emit("added",e,t,i,r)}addResources(e,t,i,r={silent:!1}){for(const o in i)(Fr(i[o])||Array.isArray(i[o]))&&this.addResource(e,t,o,i[o],{silent:!0});r.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,r,o,s={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=i,i=t,t=a[1]),this.addNamespaces(t);let c=Cw(this.data,a)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?NH(c,i,o):c={...c,...i},FL(this.data,a,c),s.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(r=>t[r]&&Object.keys(t[r]).length>0)}toJSON(){return this.data}}var GH={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,i,r){return n.forEach(o=>{e=this.processors[o]?.process(e,t,i,r)??e}),e}};const WH=Symbol("i18next/PATH_KEY");function ile(){const n=[],e=Object.create(null);let t;return e.get=(i,r)=>(t?.revoke?.(),r===WH?n:(n.push(r),t=Proxy.revocable(i,e),t.proxy)),Proxy.revocable(Object.create(null),e).proxy}function GT(n,e){const{[WH]:t}=n(ile());return t.join(e?.keySeparator??".")}const jL={},NL=n=>!Fr(n)&&typeof n!="boolean"&&typeof n!="number";class xw extends qS{constructor(e,t={}){super(),qae(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Cg.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const i={...t};return e==null?!1:this.resolve(e,i)?.res!==void 0}extractFromKey(e,t){let i=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!tle(e,i,r);if(s&&!a){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:Fr(o)?[o]:o};const A=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(A[0])>-1)&&(o=A.shift()),e=A.join(r)}return{key:e,namespaces:Fr(o)?[o]:o}}translate(e,t,i){let r=typeof t=="object"?{...t}:t;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";typeof e=="function"&&(e=GT(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const o=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:a,namespaces:c}=this.extractFromKey(e[e.length-1],r),A=c[c.length-1];let m=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;m===void 0&&(m=":");const v=r.lng||this.language,x=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v?.toLowerCase()==="cimode")return x?o?{res:`${A}${m}${a}`,usedKey:a,exactUsedKey:a,usedLng:v,usedNS:A,usedParams:this.getUsedParamsDetails(r)}:`${A}${m}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:v,usedNS:A,usedParams:this.getUsedParamsDetails(r)}:a;const _=this.resolve(e,r);let O=_?.res;const P=_?.usedKey||a,F=_?.exactUsedKey||a,j=["[object Number]","[object Function]","[object RegExp]"],Q=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,V=!this.i18nFormat||this.i18nFormat.handleAsObject,H=r.count!==void 0&&!Fr(r.count),G=xw.hasDefaultValue(r),Y=H?this.pluralResolver.getSuffix(v,r.count,r):"",z=r.ordinal&&H?this.pluralResolver.getSuffix(v,r.count,{ordinal:!1}):"",se=H&&!r.ordinal&&r.count===0,le=se&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${Y}`]||r[`defaultValue${z}`]||r.defaultValue;let me=O;V&&!O&&G&&(me=le);const fe=NL(me),_e=Object.prototype.toString.apply(me);if(V&&me&&fe&&j.indexOf(_e)<0&&!(Fr(Q)&&Array.isArray(me))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const we=this.options.returnedObjectHandler?this.options.returnedObjectHandler(P,me,{...r,ns:c}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(_.res=we,_.usedParams=this.getUsedParamsDetails(r),_):we}if(s){const we=Array.isArray(me),ke=we?[]:{},je=we?F:P;for(const Ie in me)if(Object.prototype.hasOwnProperty.call(me,Ie)){const Qe=`${je}${s}${Ie}`;G&&!O?ke[Ie]=this.translate(Qe,{...r,defaultValue:NL(le)?le[Ie]:void 0,joinArrays:!1,ns:c}):ke[Ie]=this.translate(Qe,{...r,joinArrays:!1,ns:c}),ke[Ie]===Qe&&(ke[Ie]=me[Ie])}O=ke}}else if(V&&Fr(Q)&&Array.isArray(O))O=O.join(Q),O&&(O=this.extendTranslation(O,e,r,i));else{let we=!1,ke=!1;!this.isValidLookup(O)&&G&&(we=!0,O=le),this.isValidLookup(O)||(ke=!0,O=a);const Ie=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ke?void 0:O,Qe=G&&le!==O&&this.options.updateMissing;if(ke||we||Qe){if(this.logger.log(Qe?"updateKey":"missingKey",v,A,a,Qe?le:O),s){const Le=this.resolve(a,{...r,keySeparator:!1});Le&&Le.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let tt=[];const ht=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ht&&ht[0])for(let Le=0;Le<ht.length;Le++)tt.push(ht[Le]);else this.options.saveMissingTo==="all"?tt=this.languageUtils.toResolveHierarchy(r.lng||this.language):tt.push(r.lng||this.language);const ce=(Le,We,Me)=>{const dt=G&&Me!==O?Me:Ie;this.options.missingKeyHandler?this.options.missingKeyHandler(Le,A,We,dt,Qe,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(Le,A,We,dt,Qe,r),this.emit("missingKey",Le,A,We,O)};this.options.saveMissing&&(this.options.saveMissingPlurals&&H?tt.forEach(Le=>{const We=this.pluralResolver.getSuffixes(Le,r);se&&r[`defaultValue${this.options.pluralSeparator}zero`]&&We.indexOf(`${this.options.pluralSeparator}zero`)<0&&We.push(`${this.options.pluralSeparator}zero`),We.forEach(Me=>{ce([Le],a+Me,r[`defaultValue${Me}`]||le)})}):ce(tt,a,le))}O=this.extendTranslation(O,e,r,_,i),ke&&O===a&&this.options.appendNamespaceToMissingKey&&(O=`${A}${m}${a}`),(ke||we)&&this.options.parseMissingKeyHandler&&(O=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${A}${m}${a}`:a,we?O:void 0,r))}return o?(_.res=O,_.usedParams=this.getUsedParamsDetails(r),_):O}extendTranslation(e,t,i,r,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const c=Fr(e)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let A;if(c){const v=e.match(this.interpolator.nestingRegexp);A=v&&v.length}let m=i.replace&&!Fr(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),e=this.interpolator.interpolate(e,m,i.lng||this.language||r.usedLng,i),c){const v=e.match(this.interpolator.nestingRegexp),x=v&&v.length;A<x&&(i.nest=!1)}!i.lng&&r&&r.res&&(i.lng=this.language||r.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,(...v)=>o?.[0]===v[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${t[0]}`),null):this.translate(...v,t),i)),i.interpolation&&this.interpolator.reset()}const s=i.postProcess||this.options.postProcess,a=Fr(s)?[s]:s;return e!=null&&a?.length&&i.applyPostProcessor!==!1&&(e=GH.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,t={}){let i,r,o,s,a;return Fr(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(i))return;const A=this.extractFromKey(c,t),m=A.key;r=m;let v=A.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const x=t.count!==void 0&&!Fr(t.count),_=x&&!t.ordinal&&t.count===0,O=t.context!==void 0&&(Fr(t.context)||typeof t.context=="number")&&t.context!=="",P=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);v.forEach(F=>{this.isValidLookup(i)||(a=F,!jL[`${P[0]}-${F}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(jL[`${P[0]}-${F}`]=!0,this.logger.warn(`key "${r}" for languages "${P.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),P.forEach(j=>{if(this.isValidLookup(i))return;s=j;const Q=[m];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(Q,m,j,F,t);else{let H;x&&(H=this.pluralResolver.getSuffix(j,t.count,t));const G=`${this.options.pluralSeparator}zero`,Y=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(t.ordinal&&H.indexOf(Y)===0&&Q.push(m+H.replace(Y,this.options.pluralSeparator)),Q.push(m+H),_&&Q.push(m+G)),O){const z=`${m}${this.options.contextSeparator||"_"}${t.context}`;Q.push(z),x&&(t.ordinal&&H.indexOf(Y)===0&&Q.push(z+H.replace(Y,this.options.pluralSeparator)),Q.push(z+H),_&&Q.push(z+G))}}let V;for(;V=Q.pop();)this.isValidLookup(i)||(o=V,i=this.getResource(j,F,V,t))}))})}),{res:i,usedKey:r,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,i,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,i,r):this.resourceStore.getResource(e,t,i,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!Fr(e.replace);let r=i?e.replace:e;if(i&&typeof e.count<"u"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const o of t)delete r[o]}return r}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&e[i]!==void 0)return!0;return!1}}class GL{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Cg.create("languageUtils")}getScriptPartFromCode(e){if(e=b3(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=b3(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Fr(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(i=>{if(t)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;const r=this.getScriptPartFromCode(i);if(this.isSupportedCode(r))return t=r;const o=this.getLanguagePartFromCode(i);if(this.isSupportedCode(o))return t=o;t=this.options.supportedLngs.find(s=>{if(s===o)return s;if(!(s.indexOf("-")<0&&o.indexOf("-")<0)&&(s.indexOf("-")>0&&o.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===o||s.indexOf(o)===0&&o.length>1))return s})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),Fr(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],o=s=>{s&&(this.isSupportedCode(s)?r.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return Fr(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):Fr(e)&&o(this.formatLanguageCode(e)),i.forEach(s=>{r.indexOf(s)<0&&o(this.formatLanguageCode(s))}),r}}const WL={zero:0,one:1,two:2,few:3,many:4,other:5},QL={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class rle{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Cg.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const i=b3(e==="dev"?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:i,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(i,{type:r})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),QL;if(!e.match(/-|_/))return QL;const c=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(c,t)}return this.pluralRulesCache[o]=s,s}needsPlural(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(r=>`${t}${r}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((r,o)=>WL[r]-WL[o]).map(r=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(e,t,i={}){const r=this.getRule(e,i);return r?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}const qL=(n,e,t,i=".",r=!0)=>{let o=Vae(n,e,t);return!o&&r&&Fr(t)&&(o=NT(n,t,i),o===void 0&&(o=NT(e,t,i))),o},V6=n=>n.replace(/\$/g,"$$$$");class ole{constructor(e={}){this.logger=Cg.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:r,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:c,formatSeparator:A,unescapeSuffix:m,unescapePrefix:v,nestingPrefix:x,nestingPrefixEscaped:_,nestingSuffix:O,nestingSuffixEscaped:P,nestingOptionsSeparator:F,maxReplaces:j,alwaysFormat:Q}=e.interpolation;this.escape=t!==void 0?t:Zae,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=o?wC(o):s||"{{",this.suffix=a?wC(a):c||"}}",this.formatSeparator=A||",",this.unescapePrefix=m?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=x?wC(x):_||wC("$t("),this.nestingSuffix=O?wC(O):P||wC(")"),this.nestingOptionsSeparator=F||",",this.maxReplaces=j||1e3,this.alwaysFormat=Q!==void 0?Q:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,i)=>t?.source===i?(t.lastIndex=0,t):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,i,r){let o,s,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},A=_=>{if(_.indexOf(this.formatSeparator)<0){const j=qL(t,c,_,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(j,void 0,i,{...r,...t,interpolationkey:_}):j}const O=_.split(this.formatSeparator),P=O.shift().trim(),F=O.join(this.formatSeparator).trim();return this.format(qL(t,c,P,this.options.keySeparator,this.options.ignoreJSONStructure),F,i,{...r,...t,interpolationkey:P})};this.resetRegExp();const m=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,v=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:_=>V6(_)},{regex:this.regexp,safeValue:_=>this.escapeValue?V6(this.escape(_)):V6(_)}].forEach(_=>{for(a=0;o=_.regex.exec(e);){const O=o[1].trim();if(s=A(O),s===void 0)if(typeof m=="function"){const F=m(e,o,r);s=Fr(F)?F:""}else if(r&&Object.prototype.hasOwnProperty.call(r,O))s="";else if(v){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${e}`),s="";else!Fr(s)&&!this.useRawValueToEscape&&(s=UL(s));const P=_.safeValue(s);if(e=e.replace(o[0],P),v?(_.regex.lastIndex+=s.length,_.regex.lastIndex-=o[0].length):_.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,i={}){let r,o,s;const a=(c,A)=>{const m=this.nestingOptionsSeparator;if(c.indexOf(m)<0)return c;const v=c.split(new RegExp(`${m}[ ]*{`));let x=`{${v[1]}`;c=v[0],x=this.interpolate(x,s);const _=x.match(/'/g),O=x.match(/"/g);((_?.length??0)%2===0&&!O||O.length%2!==0)&&(x=x.replace(/'/g,'"'));try{s=JSON.parse(x),A&&(s={...A,...s})}catch(P){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,P),`${c}${m}${x}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,c};for(;r=this.nestingRegexp.exec(e);){let c=[];s={...i},s=s.replace&&!Fr(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const A=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(A!==-1&&(c=r[1].slice(A).split(this.formatSeparator).map(m=>m.trim()).filter(Boolean),r[1]=r[1].slice(0,A)),o=t(a.call(this,r[1].trim(),s),s),o&&r[0]===e&&!Fr(o))return o;Fr(o)||(o=UL(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),c.length&&(o=c.reduce((m,v)=>this.format(m,v,i.lng,{...i,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}const sle=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const i=n.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?t.currency||(t.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?t.range||(t.range=r.trim()):r.split(";").forEach(s=>{if(s){const[a,...c]=s.split(":"),A=c.join(":").trim().replace(/^'+|'+$/g,""),m=a.trim();t[m]||(t[m]=A),A==="false"&&(t[m]=!1),A==="true"&&(t[m]=!0),isNaN(A)||(t[m]=parseInt(A,10))}})}return{formatName:e,formatOptions:t}},YL=n=>{const e={};return(t,i,r)=>{let o=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(o={...o,[r.interpolationkey]:void 0});const s=i+JSON.stringify(o);let a=e[s];return a||(a=n(b3(i),r),e[s]=a),a(t)}},ale=n=>(e,t,i)=>n(b3(t),i)(e);class lle{constructor(e={}){this.logger=Cg.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const i=t.cacheInBuiltFormats?YL:ale;this.formats={number:i((r,o)=>{const s=new Intl.NumberFormat(r,{...o});return a=>s.format(a)}),currency:i((r,o)=>{const s=new Intl.NumberFormat(r,{...o,style:"currency"});return a=>s.format(a)}),datetime:i((r,o)=>{const s=new Intl.DateTimeFormat(r,{...o});return a=>s.format(a)}),relativetime:i((r,o)=>{const s=new Intl.RelativeTimeFormat(r,{...o});return a=>s.format(a,o.range||"day")}),list:i((r,o)=>{const s=new Intl.ListFormat(r,{...o});return a=>s.format(a)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=YL(t)}format(e,t,i,r={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,c)=>{const{formatName:A,formatOptions:m}=sle(c);if(this.formats[A]){let v=a;try{const x=r?.formatParams?.[r.interpolationkey]||{},_=x.locale||x.lng||r.locale||r.lng||i;v=this.formats[A](a,_,{...m,...r,...x})}catch(x){this.logger.warn(x)}return v}else this.logger.warn(`there was no format function for ${A}`);return a},e)}}const ule=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class cle extends qS{constructor(e,t,i,r={}){super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=Cg.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,r.backend,r)}queueLoad(e,t,i,r){const o={},s={},a={},c={};return e.forEach(A=>{let m=!0;t.forEach(v=>{const x=`${A}|${v}`;!i.reload&&this.store.hasResourceBundle(A,v)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?s[x]===void 0&&(s[x]=!0):(this.state[x]=1,m=!1,s[x]===void 0&&(s[x]=!0),o[x]===void 0&&(o[x]=!0),c[v]===void 0&&(c[v]=!0)))}),m||(a[A]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(e,t,i){const r=e.split("|"),o=r[0],s=r[1];t&&this.emit("failedLoading",o,s,t),!t&&i&&this.store.addResourceBundle(o,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const a={};this.queue.forEach(c=>{$ae(c.loaded,[o],s),ule(c,e),t&&c.errors.push(t),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(A=>{a[A]||(a[A]={});const m=c.loaded[A];m.length&&m.forEach(v=>{a[A][v]===void 0&&(a[A][v]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(e,t,i,r=0,o=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:i,tried:r,wait:o,callback:s});return}this.readingCalls++;const a=(A,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(A&&m&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,i,r+1,o*2,s)},o);return}s(A,m)},c=this.backend[i].bind(this.backend);if(c.length===2){try{const A=c(e,t);A&&typeof A.then=="function"?A.then(m=>a(null,m)).catch(a):a(null,A)}catch(A){a(A)}return}return c(e,t,a)}prepareLoading(e,t,i={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Fr(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Fr(t)&&(t=[t]);const o=this.queueLoad(e,t,i,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){const i=e.split("|"),r=i[0],o=i[1];this.read(r,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,s),!s&&a&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,a),this.loaded(e,s,a)})}saveMissing(e,t,i,r,o,s={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend?.create){const c={...s,isUpdate:o},A=this.backend.create.bind(this.backend);if(A.length<6)try{let m;A.length===5?m=A(e,t,i,r,c):m=A(e,t,i,r),m&&typeof m.then=="function"?m.then(v=>a(null,v)).catch(a):a(null,m)}catch(m){a(m)}else A(e,t,i,r,a,c)}!e||!e[0]||this.store.addResource(e[0],t,i,r)}}}const $L=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),Fr(n[1])&&(e.defaultValue=n[1]),Fr(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(i=>{e[i]=t[i]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),VL=n=>(Fr(n.ns)&&(n.ns=[n.ns]),Fr(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Fr(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),_M=()=>{},Ale=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class C3 extends qS{constructor(e={},t){if(super(),this.options=VL(e),this.services={},this.logger=Cg,this.modules={external:[]},Ale(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(Fr(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=$L();this.options={...i,...this.options,...VL(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=A=>A?typeof A=="function"?new A:A:null;if(!this.options.isClone){this.modules.logger?Cg.init(r(this.modules.logger),this.options):Cg.init(null,this.options);let A;this.modules.formatter?A=this.modules.formatter:A=lle;const m=new GL(this.options);this.store=new zL(this.options.resources,this.options);const v=this.services;v.logger=Cg,v.resourceStore=this.store,v.languageUtils=m,v.pluralResolver=new rle(m,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),A&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(v.formatter=r(A),v.formatter.init&&v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new ole(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new cle(r(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",(_,...O)=>{this.emit(_,...O)}),this.modules.languageDetector&&(v.languageDetector=r(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=r(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new xw(this.services,this.options),this.translator.on("*",(_,...O)=>{this.emit(_,...O)}),this.modules.external.forEach(_=>{_.init&&_.init(this)})}if(this.format=this.options.interpolation.format,t||(t=_M),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const A=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);A.length>0&&A[0]!=="dev"&&(this.options.lng=A[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(A=>{this[A]=(...m)=>this.store[A](...m)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(A=>{this[A]=(...m)=>(this.store[A](...m),this)});const a=Vx(),c=()=>{const A=(m,v)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(v),t(m,v)};if(this.languages&&!this.isInitialized)return A(null,this.t.bind(this));this.changeLanguage(this.options.lng,A)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),a}loadResources(e,t=_M){let i=t;const r=Fr(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(A=>{A!=="cimode"&&o.indexOf(A)<0&&o.push(A)})};r?s(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>s(c)),this.options.preload?.forEach?.(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(a)})}else i(null)}reloadResources(e,t,i){const r=Vx();return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=_M),this.services.backendConnector.reload(e,t,o=>{r.resolve(),i(o)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&GH.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const i=Vx();this.emit("languageChanging",e);const r=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},o=(a,c)=>{c?this.isLanguageChangingTo===e&&(r(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve((...A)=>this.t(...A)),t&&t(a,(...A)=>this.t(...A))},s=a=>{!e&&!a&&this.services.languageDetector&&(a=[]);const c=Fr(a)?a:a&&a[0],A=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(Fr(a)?[a]:a);A&&(this.language||r(A),this.translator.language||this.translator.changeLanguage(A),this.services.languageDetector?.cacheUserLanguage?.(A)),this.loadResources(A,m=>{o(m,A)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,t,i){const r=(o,s,...a)=>{let c;typeof s!="object"?c=this.options.overloadTranslationOptionHandler([o,s].concat(a)):c={...s},c.lng=c.lng||r.lng,c.lngs=c.lngs||r.lngs,c.ns=c.ns||r.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||i||r.keyPrefix);const A=this.options.keySeparator||".";let m;return c.keyPrefix&&Array.isArray(o)?m=o.map(v=>(typeof v=="function"&&(v=GT(v,{...this.options,...s})),`${c.keyPrefix}${A}${v}`)):(typeof o=="function"&&(o=GT(o,{...this.options,...s})),m=c.keyPrefix?`${c.keyPrefix}${A}${o}`:o),this.t(m,c)};return Fr(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=i,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(a,c)=>{const A=this.services.backendConnector.state[`${a}|${c}`];return A===-1||A===0||A===2};if(t.precheck){const a=t.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!r||s(o,e)))}loadNamespaces(e,t){const i=Vx();return this.options.ns?(Fr(e)&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),t&&t(r)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=Vx();Fr(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(s=>r.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=r.concat(o),this.loadResources(s=>{i.resolve(),t&&t(s)}),i):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const r=new Intl.Locale(e);if(r&&r.getTextInfo){const o=r.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services?.languageUtils||new GL($L());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new C3(e,t)}cloneInstance(e={},t=_M){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new C3(r);if((e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},i){const a=Object.keys(this.store.data).reduce((c,A)=>(c[A]={...this.store.data[A]},c[A]=Object.keys(c[A]).reduce((m,v)=>(m[v]={...c[A][v]},m),c[A]),c),{});o.store=new zL(a,r),o.services.resourceStore=o.store}return o.translator=new xw(o.services,r),o.translator.on("*",(a,...c)=>{o.emit(a,...c)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const cA=C3.createInstance();cA.createInstance=C3.createInstance;cA.createInstance;cA.dir;cA.init;cA.loadResources;cA.reloadResources;cA.use;cA.changeLanguage;cA.getFixedT;cA.t;cA.exists;cA.setDefaultNamespace;cA.hasLoadedNamespace;cA.loadNamespaces;cA.loadLanguages;const{slice:hle,forEach:dle}=[];function fle(n){return dle.call(hle.call(arguments,1),e=>{if(e)for(const t in e)n[t]===void 0&&(n[t]=e[t])}),n}function ple(n){return typeof n!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(n))}const HL=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,mle=function(n,e){const i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},r=encodeURIComponent(e);let o=`${n}=${r}`;if(i.maxAge>0){const s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(s)}`}if(i.domain){if(!HL.test(i.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${i.domain}`}if(i.path){if(!HL.test(i.path))throw new TypeError("option path is invalid");o+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(o+="; HttpOnly"),i.secure&&(o+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(o+="; Partitioned"),o},ZL={create(n,e,t,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+t*60*1e3)),i&&(r.domain=i),document.cookie=mle(n,e,r)},read(n){const e=`${n}=`,t=document.cookie.split(";");for(let i=0;i<t.length;i++){let r=t[i];for(;r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return r.substring(e.length,r.length)}return null},remove(n,e){this.create(n,"",-1,e)}};var gle={name:"cookie",lookup(n){let{lookupCookie:e}=n;if(e&&typeof document<"u")return ZL.read(e)||void 0},cacheUserLanguage(n,e){let{lookupCookie:t,cookieMinutes:i,cookieDomain:r,cookieOptions:o}=e;t&&typeof document<"u"&&ZL.create(t,n,i,r,o)}},yle={name:"querystring",lookup(n){let{lookupQuerystring:e}=n,t;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let s=0;s<o.length;s++){const a=o[s].indexOf("=");a>0&&o[s].substring(0,a)===e&&(t=o[s].substring(a+1))}}return t}},vle={name:"hash",lookup(n){let{lookupHash:e,lookupFromHashIndex:t}=n,i;if(typeof window<"u"){const{hash:r}=window.location;if(r&&r.length>2){const o=r.substring(1);if(e){const s=o.split("&");for(let a=0;a<s.length;a++){const c=s[a].indexOf("=");c>0&&s[a].substring(0,c)===e&&(i=s[a].substring(c+1))}}if(i)return i;if(!i&&t>-1){const s=r.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof t=="number"?t:0]?.replace("/",""):void 0}}}return i}};let SC=null;const XL=()=>{if(SC!==null)return SC;try{if(SC=typeof window<"u"&&window.localStorage!==null,!SC)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{SC=!1}return SC};var ble={name:"localStorage",lookup(n){let{lookupLocalStorage:e}=n;if(e&&XL())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(n,e){let{lookupLocalStorage:t}=e;t&&XL()&&window.localStorage.setItem(t,n)}};let EC=null;const JL=()=>{if(EC!==null)return EC;try{if(EC=typeof window<"u"&&window.sessionStorage!==null,!EC)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{EC=!1}return EC};var Cle={name:"sessionStorage",lookup(n){let{lookupSessionStorage:e}=n;if(e&&JL())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(n,e){let{lookupSessionStorage:t}=e;t&&JL()&&window.sessionStorage.setItem(t,n)}},_le={name:"navigator",lookup(n){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:i,language:r}=navigator;if(t)for(let o=0;o<t.length;o++)e.push(t[o]);i&&e.push(i),r&&e.push(r)}return e.length>0?e:void 0}},xle={name:"htmlTag",lookup(n){let{htmlTag:e}=n,t;const i=e||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(t=i.getAttribute("lang")),t}},Mle={name:"path",lookup(n){let{lookupFromPathIndex:e}=n;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof e=="number"?e:0]?.replace("/",""):void 0}},wle={name:"subdomain",lookup(n){let{lookupFromSubdomainIndex:e}=n;const t=typeof e=="number"?e+1:1,i=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[t]}};let QH=!1;try{document.cookie,QH=!0}catch{}const qH=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];QH||qH.splice(1,1);const Sle=()=>({order:qH,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class YH{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=fle(t,this.options||{},Sle()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(gle),this.addDetector(yle),this.addDetector(ble),this.addDetector(Cle),this.addDetector(_le),this.addDetector(xle),this.addDetector(Mle),this.addDetector(wle),this.addDetector(vle)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(i=>{if(this.detectors[i]){let r=this.detectors[i].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(t=t.concat(r))}}),t=t.filter(i=>i!=null&&!ple(i)).map(i=>this.options.convertDetectedLanguage(i)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(e,this.options)}))}}YH.type="languageDetector";var Ele=function(e){return{type:"backend",init:function(i,r,o){},read:function(i,r,o){if(typeof e=="function"){if(e.length<3){try{var s=e(i,r);s&&typeof s.then=="function"?s.then(function(a){return o(null,a&&a.default||a)}).catch(o):o(null,s)}catch(a){o(a)}return}e(i,r,o);return}o(null,e&&e[i]&&e[i][r])}}},H6,eF;function Ole(){return eF||(eF=1,H6={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),H6}var Ble=Ole();const Ile=Wl(Ble);var kle=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function tF(n){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=n.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(e.name=t[1],(Ile[t[1]]||n.charAt(n.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var i=n.indexOf("-->");return{type:"comment",comment:i!==-1?n.slice(4,i):""}}for(var r=new RegExp(kle),o=null;(o=r.exec(n))!==null;)if(o[0].trim())if(o[1]){var s=o[1].trim(),a=[s,""];s.indexOf("=")>-1&&(a=s.split("=")),e.attrs[a[0]]=a[1],r.lastIndex--}else o[2]&&(e.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return e}var Tle=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Rle=/^\s*$/,Dle=Object.create(null);function $H(n,e){switch(e.type){case"text":return n+e.content;case"tag":return n+="<"+e.name+(e.attrs?(function(t){var i=[];for(var r in t)i.push(r+'="'+t[r]+'"');return i.length?" "+i.join(" "):""})(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?n:n+e.children.reduce($H,"")+"</"+e.name+">";case"comment":return n+"<!--"+e.comment+"-->"}}var Ple={parse:function(n,e){e||(e={}),e.components||(e.components=Dle);var t,i=[],r=[],o=-1,s=!1;if(n.indexOf("<")!==0){var a=n.indexOf("<");i.push({type:"text",content:a===-1?n:n.substring(0,a)})}return n.replace(Tle,function(c,A){if(s){if(c!=="</"+t.name+">")return;s=!1}var m,v=c.charAt(1)!=="/",x=c.startsWith("<!--"),_=A+c.length,O=n.charAt(_);if(x){var P=tF(c);return o<0?(i.push(P),i):((m=r[o]).children.push(P),i)}if(v&&(o++,(t=tF(c)).type==="tag"&&e.components[t.name]&&(t.type="component",s=!0),t.voidElement||s||!O||O==="<"||t.children.push({type:"text",content:n.slice(_,n.indexOf("<",_))}),o===0&&i.push(t),(m=r[o-1])&&m.children.push(t),r[o]=t),(!v||t.voidElement)&&(o>-1&&(t.voidElement||t.name===c.slice(2,-1))&&(o--,t=o===-1?i:r[o]),!s&&O!=="<"&&O)){m=o===-1?i:r[o].children;var F=n.indexOf("<",_),j=n.slice(_,F===-1?void 0:F);Rle.test(j)&&(j=" "),(F>-1&&o+m.length>=0||j!==" ")&&m.push({type:"text",content:j})}}),i},stringify:function(n){return n.reduce(function(e,t){return e+$H("",t)},"")}};const z5=(n,e,t,i)=>{const r=[t,{code:e,...i||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(r,"warn","react-i18next::",!0);sf(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...r):console?.warn&&console.warn(...r)},nF={},_3=(n,e,t,i)=>{sf(t)&&nF[t]||(sf(t)&&(nF[t]=new Date),z5(n,e,t,i))},VH=(n,e)=>()=>{if(n.isInitialized)e();else{const t=()=>{setTimeout(()=>{n.off("initialized",t)},0),e()};n.on("initialized",t)}},WT=(n,e,t)=>{n.loadNamespaces(e,VH(n,t))},iF=(n,e,t,i)=>{if(sf(t)&&(t=[t]),n.options.preload&&n.options.preload.indexOf(e)>-1)return WT(n,t,i);t.forEach(r=>{n.options.ns.indexOf(r)<0&&n.options.ns.push(r)}),n.loadLanguages(e,VH(n,i))},Ule=(n,e,t={})=>!e.languages||!e.languages.length?(_3(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(n,{lng:t.lng,precheck:(i,r)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!r(i.isLanguageChangingTo,n))return!1}}),Kle=n=>n.displayName||n.name||(sf(n)&&n.length>0?n:"Unknown"),sf=n=>typeof n=="string",Sy=n=>typeof n=="object"&&n!==null,Lle=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Fle={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},zle=n=>Fle[n],jle=n=>n.replace(Lle,zle);let QT={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:jle};const Nle=(n={})=>{QT={...QT,...n}},HH=()=>QT;let ZH;const Gle=n=>{ZH=n},TD=()=>ZH,Z6=(n,e)=>{if(!n)return!1;const t=n.props?.children??n.children;return e?t.length>0:!!t},X6=n=>{if(!n)return[];const e=n.props?.children??n.children;return n.props?.i18nIsDynamicList?m_(e):e},Wle=n=>Array.isArray(n)&&n.every(wt.isValidElement),m_=n=>Array.isArray(n)?n:[n],Qle=(n,e)=>{const t={...e};return t.props=Object.assign(n.props,e.props),t},XH=(n,e,t,i)=>{if(!n)return"";let r="";const o=m_(n),s=e?.transSupportBasicHtmlNodes?e.transKeepBasicHtmlNodesFor??[]:[];return o.forEach((a,c)=>{if(sf(a)){r+=`${a}`;return}if(wt.isValidElement(a)){const{props:A,type:m}=a,v=Object.keys(A).length,x=s.indexOf(m)>-1,_=A.children;if(!_&&x&&!v){r+=`<${m}/>`;return}if(!_&&(!x||v)||A.i18nIsDynamicList){r+=`<${c}></${c}>`;return}if(x&&v===1&&sf(_)){r+=`<${m}>${_}</${m}>`;return}const O=XH(_,e,t,i);r+=`<${c}>${O}</${c}>`;return}if(a===null){z5(t,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:i});return}if(Sy(a)){const{format:A,...m}=a,v=Object.keys(m);if(v.length===1){const x=A?`${v[0]}, ${A}`:v[0];r+=`{{${x}}}`;return}z5(t,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:i,child:a});return}z5(t,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:i,child:a})}),r},qle=(n,e,t,i,r,o,s)=>{if(t==="")return[];const a=r.transKeepBasicHtmlNodesFor||[],c=t&&new RegExp(a.map(j=>`<${j}`).join("|")).test(t);if(!n&&!e&&!c&&!s)return[t];const A=e??{},m=j=>{m_(j).forEach(V=>{sf(V)||(Z6(V)?m(X6(V)):Sy(V)&&!wt.isValidElement(V)&&Object.assign(A,V))})};m(n);const v=Ple.parse(`<0>${t}</0>`),x={...A,...o},_=(j,Q,V)=>{const H=X6(j),G=P(H,Q.children,V);return Wle(H)&&G.length===0||j.props?.i18nIsDynamicList?H:G},O=(j,Q,V,H,G)=>{j.dummy?(j.children=Q,V.push(wt.cloneElement(j,{key:H},G?void 0:Q))):V.push(...wt.Children.map([j],Y=>{const z={...Y.props};return delete z.i18nIsDynamicList,wt.createElement(Y.type,{...z,key:H,ref:Y.props.ref??Y.ref},G?null:Q)}))},P=(j,Q,V)=>{const H=m_(j);return m_(Q).reduce((Y,z,se)=>{const le=z.children?.[0]?.content&&i.services.interpolator.interpolate(z.children[0].content,x,i.language);if(z.type==="tag"){let me=H[parseInt(z.name,10)];!me&&e&&(me=e[z.name]),V.length===1&&!me&&(me=V[0][z.name]),me||(me={});const fe=Object.keys(z.attrs).length!==0?Qle({props:z.attrs},me):me,_e=wt.isValidElement(fe),we=_e&&Z6(z,!0)&&!z.voidElement,ke=c&&Sy(fe)&&fe.dummy&&!_e,je=Sy(e)&&Object.hasOwnProperty.call(e,z.name);if(sf(fe)){const Ie=i.services.interpolator.interpolate(fe,x,i.language);Y.push(Ie)}else if(Z6(fe)||we){const Ie=_(fe,z,V);O(fe,Ie,Y,se)}else if(ke){const Ie=P(H,z.children,V);O(fe,Ie,Y,se)}else if(Number.isNaN(parseFloat(z.name)))if(je){const Ie=_(fe,z,V);O(fe,Ie,Y,se,z.voidElement)}else if(r.transSupportBasicHtmlNodes&&a.indexOf(z.name)>-1)if(z.voidElement)Y.push(wt.createElement(z.name,{key:`${z.name}-${se}`}));else{const Ie=P(H,z.children,V);Y.push(wt.createElement(z.name,{key:`${z.name}-${se}`},Ie))}else if(z.voidElement)Y.push(`<${z.name} />`);else{const Ie=P(H,z.children,V);Y.push(`<${z.name}>${Ie}</${z.name}>`)}else if(Sy(fe)&&!_e){const Ie=z.children[0]?le:null;Ie&&Y.push(Ie)}else O(fe,le,Y,se,z.children.length!==1||!le)}else if(z.type==="text"){const me=r.transWrapTextNodes,fe=s?r.unescape(i.services.interpolator.interpolate(z.content,x,i.language)):i.services.interpolator.interpolate(z.content,x,i.language);me?Y.push(wt.createElement(me,{key:`${z.name}-${se}`},fe)):Y.push(fe)}return Y},[])},F=P([{dummy:!0,children:n||[]}],v,m_(n||[]));return X6(F[0])},JH=(n,e,t)=>{const i=n.key||e,r=wt.cloneElement(n,{key:i});if(!r.props||!r.props.children||t.indexOf(`${e}/>`)<0&&t.indexOf(`${e} />`)<0)return r;function o(){return wt.createElement(wt.Fragment,null,r)}return wt.createElement(o,{key:i})},Yle=(n,e)=>n.map((t,i)=>JH(t,i,e)),$le=(n,e)=>{const t={};return Object.keys(n).forEach(i=>{Object.assign(t,{[i]:JH(n[i],i,e)})}),t},Vle=(n,e,t,i)=>n?Array.isArray(n)?Yle(n,e):Sy(n)?$le(n,e):(_3(t,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:i}),null):null,Hle=n=>!Sy(n)||Array.isArray(n)?!1:Object.keys(n).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function Zle({children:n,count:e,parent:t,i18nKey:i,context:r,tOptions:o={},values:s,defaults:a,components:c,ns:A,i18n:m,t:v,shouldUnescape:x,..._}){const O=m||TD();if(!O)return _3(O,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:i}),n;const P=v||O.t.bind(O)||(ke=>ke),F={...HH(),...O.options?.react};let j=A||P.ns||O.options?.defaultNS;j=sf(j)?[j]:j||["translation"];const Q=XH(n,F,O,i),V=a||Q||F.transEmptyNodeValue||i,{hashTransKey:H}=F,G=i||(H?H(Q||V):Q||V);O.options?.interpolation?.defaultVariables&&(s=s&&Object.keys(s).length>0?{...s,...O.options.interpolation.defaultVariables}:{...O.options.interpolation.defaultVariables});const Y=s||e!==void 0&&!O.options?.interpolation?.alwaysFormat||!n?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},z={...o,context:r||o.context,count:e,...s,...Y,defaultValue:V,ns:j},se=G?P(G,z):V,le=Vle(c,se,O,i);let me=le||n,fe=null;Hle(le)&&(fe=le,me=n);const _e=qle(me,fe,se,O,F,z,x),we=t??F.defaultTransParent;return we?wt.createElement(we,_,_e):_e}const Xle={type:"3rdParty",init(n){Nle(n.options.react),Gle(n)}},eZ=wt.createContext();class Jle{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function lb({children:n,count:e,parent:t,i18nKey:i,context:r,tOptions:o={},values:s,defaults:a,components:c,ns:A,i18n:m,t:v,shouldUnescape:x,..._}){const{i18n:O,defaultNS:P}=wt.useContext(eZ)||{},F=m||O||TD(),j=v||F?.t.bind(F);return Zle({children:n,count:e,parent:t,i18nKey:i,context:r,tOptions:o,values:s,defaults:a,components:c,ns:A||j?.ns||P||F?.options?.defaultNS,i18n:F,t:v,shouldUnescape:x,..._})}const eue=(n,e)=>{const t=wt.useRef();return wt.useEffect(()=>{t.current=n},[n,e]),t.current},tZ=(n,e,t,i)=>n.getFixedT(e,t,i),tue=(n,e,t,i)=>wt.useCallback(tZ(n,e,t,i),[n,e,t,i]),nue=(n,e={})=>{const{i18n:t}=e,{i18n:i,defaultNS:r}=wt.useContext(eZ)||{},o=t||i||TD();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Jle),!o){_3(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const H=(Y,z)=>sf(z)?z:Sy(z)&&sf(z.defaultValue)?z.defaultValue:Array.isArray(Y)?Y[Y.length-1]:Y,G=[H,{},!1];return G.t=H,G.i18n={},G.ready=!1,G}o.options.react?.wait&&_3(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...HH(),...o.options.react,...e},{useSuspense:a,keyPrefix:c}=s;let A=r||o.options?.defaultNS;A=sf(A)?[A]:A||["translation"],o.reportNamespaces.addUsedNamespaces?.(A);const m=(o.isInitialized||o.initializedStoreOnce)&&A.every(H=>Ule(H,o,s)),v=tue(o,e.lng||null,s.nsMode==="fallback"?A:A[0],c),x=()=>v,_=()=>tZ(o,e.lng||null,s.nsMode==="fallback"?A:A[0],c),[O,P]=wt.useState(x);let F=A.join();e.lng&&(F=`${e.lng}${F}`);const j=eue(F),Q=wt.useRef(!0);wt.useEffect(()=>{const{bindI18n:H,bindI18nStore:G}=s;Q.current=!0,!m&&!a&&(e.lng?iF(o,e.lng,A,()=>{Q.current&&P(_)}):WT(o,A,()=>{Q.current&&P(_)})),m&&j&&j!==F&&Q.current&&P(_);const Y=()=>{Q.current&&P(_)};return H&&o?.on(H,Y),G&&o?.store.on(G,Y),()=>{Q.current=!1,o&&H&&H?.split(" ").forEach(z=>o.off(z,Y)),G&&o&&G.split(" ").forEach(z=>o.store.off(z,Y))}},[o,F]),wt.useEffect(()=>{Q.current&&m&&P(x)},[o,c,m]);const V=[O,o,m];if(V.t=O,V.i18n=o,V.ready=m,m||!m&&!a)return V;throw new Promise(H=>{e.lng?iF(o,e.lng,A,()=>H()):WT(o,A,()=>H())})},Jo=(n,e={})=>function(i){function r({forwardedRef:s,...a}){const[c,A,m]=nue(n,{...a,keyPrefix:e.keyPrefix}),v={...a,t:c,i18n:A,tReady:m};return e.withRef&&s?v.ref=s:!e.withRef&&s&&(v.forwardedRef=s),wt.createElement(i,v)}r.displayName=`withI18nextTranslation(${Kle(i)})`,r.WrappedComponent=i;const o=(s,a)=>wt.createElement(r,Object.assign({},s,{forwardedRef:a}));return e.withRef?wt.forwardRef(o):r};function Aa(){var n="/home/runner/work/maputnik/maputnik/src/i18n.ts",e="529ee327821ff95d86675c5d3e41229f0d9cb0df",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/i18n.ts",statementMap:{0:{start:{line:5,column:34},end:{line:13,column:1}},1:{start:{line:14,column:0},end:{line:40,column:3}},2:{start:{line:16,column:4},end:{line:18,column:5}},3:{start:{line:17,column:6},end:{line:17,column:16}},4:{start:{line:19,column:4},end:{line:19,column:593}},5:{start:{line:19,column:119},end:{line:19,column:158}},6:{start:{line:19,column:198},end:{line:19,column:237}},7:{start:{line:19,column:277},end:{line:19,column:316}},8:{start:{line:19,column:356},end:{line:19,column:395}},9:{start:{line:19,column:435},end:{line:19,column:474}},10:{start:{line:19,column:514},end:{line:19,column:553}},11:{start:{line:35,column:4},end:{line:37,column:5}},12:{start:{line:36,column:6},end:{line:36,column:13}},13:{start:{line:38,column:4},end:{line:38,column:77}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:15,column:21},end:{line:15,column:22}},loc:{start:{line:15,column:35},end:{line:20,column:3}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:19,column:113},end:{line:19,column:114}},loc:{start:{line:19,column:119},end:{line:19,column:158}},line:19},2:{name:"(anonymous_2)",decl:{start:{line:19,column:192},end:{line:19,column:193}},loc:{start:{line:19,column:198},end:{line:19,column:237}},line:19},3:{name:"(anonymous_3)",decl:{start:{line:19,column:271},end:{line:19,column:272}},loc:{start:{line:19,column:277},end:{line:19,column:316}},line:19},4:{name:"(anonymous_4)",decl:{start:{line:19,column:350},end:{line:19,column:351}},loc:{start:{line:19,column:356},end:{line:19,column:395}},line:19},5:{name:"(anonymous_5)",decl:{start:{line:19,column:429},end:{line:19,column:430}},loc:{start:{line:19,column:435},end:{line:19,column:474}},line:19},6:{name:"(anonymous_6)",decl:{start:{line:19,column:508},end:{line:19,column:509}},loc:{start:{line:19,column:514},end:{line:19,column:553}},line:19},7:{name:"(anonymous_7)",decl:{start:{line:34,column:21},end:{line:34,column:22}},loc:{start:{line:34,column:41},end:{line:39,column:3}},line:34}},branchMap:{0:{loc:{start:{line:16,column:4},end:{line:18,column:5}},type:"if",locations:[{start:{line:16,column:4},end:{line:18,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:16},1:{loc:{start:{line:35,column:4},end:{line:37,column:5}},type:"if",locations:[{start:{line:35,column:4},end:{line:37,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:35}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/i18n.ts"],names:[],mappings:"AAAA,MAAA,CAAA,oCAAA,CAAA,IAAA,CAAA,CAAA,CAAA,IAAA,CAAA,OAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,CAAA,CAAA,MAAA,CAAO,IAAA,CAAA,IAAA,CAAU,CAAA,OAAA,CAAA;AACjB,MAAA,CAAO,QAAA,CAAA,IAAA,CAAc,CAAA,OAAA,CAAA,OAAA,CAAA,gBAAA,CAAA;AACrB,MAAA,CAAO,kBAAA,CAAA,IAAA,CAAwB,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,CAAA,OAAA,CAAA;AAC/B,MAAA,CAAA,CAAA,CAAS,gBAAA,CAAA,CAAA,CAAA,IAAA,CAAwB,CAAA,KAAA,CAAA,OAAA,CAAA;AAE1B,MAAA,CAAA,KAAA,CAAM,kBAAA,CAAA,CAAA,CAAqB;AAAA,CAAA,CAChC,CAAA,EAAA,CAAA,CAAA,CAAM,CAAA,OAAA,CAAA;AAAA,CAAA,CACN,CAAA,EAAA,CAAA,CAAA,CAAM,CAAA,OAAA,CAAA;AAAA,CAAA,CACN,CAAA,EAAA,CAAA,CAAA,CAAM,CAAA,IAAA,CAAA,GAAA,CAAA;AAAA,CAAA,CACN,CAAA,EAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACN,CAAA,EAAA,CAAA,CAAA,CAAM,CAAA,QAAA,CAAA;AAAA,CAAA,CACN,CAAA,EAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACN,CAAA,EAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA;AACR,CAAA;AAEA,IAAA,CACG,GAAA,CAAI,QAAQ,CAAA,CACZ,GAAA;AAAA,CAAA,CACC,kBAAA,CAAmB,CAAC,IAAA,CAAA,CAAc,EAAA,CAAA,CAAA,CAAA,CAAA,CAAe;AAC/C,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAI,SAAS,CAAA,EAAA,CAAA,CAAA,CAAM;AAEjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAO,CAAC,CAAA;AAAA,CAAA,CAAA,CAAA,CACV;AACA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAO,oCAAA,CAAA,CAAA,0fAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAA8B;AAAA,CAAA,CACvC,CAAC;AACH,CAAA,CACC,GAAA,CAAI,gBAAgB,CAAA,CACpB,IAAA,CAAK;AAAA,CAAA,CACJ,aAAA,CAAA,CAAe,MAAA,CAAO,IAAA,CAAK,kBAAkB,CAAA;AAAA,CAAA,CAC7C,YAAA,CAAA,CAAc,KAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,GAAA,CAAA,GAAA,CAAA,IAAA,CAAA,EAAA,CAAA,IAAA,CAAA,QAAA,CAAA;AAAA,CAAA,CACd,WAAA,CAAA,CAAa,KAAA;AAAA,CAAA,CACb,aAAA,CAAA,CAAe;AAAA,CAAA,CAAA,CAAA,CACb,WAAA,CAAA,CAAa;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,OAAA,CAAA,OAAA,CAAA,GAAA,CAAA;AAAA,CAAA,CACf,CAAA;AAAA,CAAA,CACA,WAAA,CAAA,CAAa,IAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA,GAAA,CAAA,GAAA,CAAA,iBAAA,CAAA,EAAA,CAAA;AAAA,CAAA,CACb,WAAA,CAAA,CAAa,KAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,GAAA,CAAA,GAAA,CAAA,QAAA,CAAA,EAAA,CAAA,KAAA,CAAA,EAAA,CAAA,EAAA,CAAA,GAAA,CAAA,GAAA,CAAA,GAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,CAAA,GAAA,CAAA;AAAA,CAAA,CACb,iBAAA,CAAA,CAAmB,CAAC,IAAA,CAAA,CAAM,GAAA,CAAA,CAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAQ;AACrC,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAI,IAAA,CAAK,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,EAAA,CAAA,CAAA,CAAM;AAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAA;AAAA,CAAA,CAAA,CAAA,CAAQ;AAChC,CAAA,CAAA,CAAA,CAAA,OAAA,CAAQ,IAAA,CAAK,4BAA4B,GAAG,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAS,KAAK,IAAA,CAAK,CAAA,CAAA,CAAA,CAAI,CAAC,CAAA,CAAA,CAAG,CAAA;AAAA,CAAA,CACzE;AACF,CAAC,CAAA;AAEH,MAAA,CAAA,OAAA,CAAe,IAAA;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"529ee327821ff95d86675c5d3e41229f0d9cb0df"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Aa=function(){return s},s}Aa();const nZ=(Aa().s[0]++,{de:"Deutsch",en:"English",fr:"Français",he:"עברית",it:"Italiano",ja:"日本語",zh:"简体中文"});Aa().s[1]++;cA.use(YH).use(Ele((n,e)=>(Aa().f[0]++,Aa().s[2]++,n==="en"?(Aa().b[0][0]++,Aa().s[3]++,{}):(Aa().b[0][1]++,Aa().s[4]++,Qae(Object.assign({"./locales/de/translation.json":()=>(Aa().f[1]++,Aa().s[5]++,MC(()=>import("./translation-CRxWnD_j.js"),[])),"./locales/fr/translation.json":()=>(Aa().f[2]++,Aa().s[6]++,MC(()=>import("./translation-BaeB9Rbd.js"),[])),"./locales/he/translation.json":()=>(Aa().f[3]++,Aa().s[7]++,MC(()=>import("./translation-CrS6NMoR.js"),[])),"./locales/it/translation.json":()=>(Aa().f[4]++,Aa().s[8]++,MC(()=>import("./translation-CuNUfALR.js"),[])),"./locales/ja/translation.json":()=>(Aa().f[5]++,Aa().s[9]++,MC(()=>import("./translation-CbzrM2xj.js"),[])),"./locales/zh/translation.json":()=>(Aa().f[6]++,Aa().s[10]++,MC(()=>import("./translation-NsbRMhaL.js"),[]))}),`./locales/${n}/${e}.json`,4))))).use(Xle).init({supportedLngs:Object.keys(nZ),keySeparator:!1,nsSeparator:!1,interpolation:{escapeValue:!1},saveMissing:!0,fallbackLng:!1,missingKeyHandler:(n,e,t)=>{if(Aa().f[7]++,Aa().s[11]++,n[0]==="en"){Aa().b[1][0]++,Aa().s[12]++;return}else Aa().b[1][1]++;Aa().s[13]++,console.warn(`Missing translation for "${t}" in "${n.join(", ")}"`)}});var b2={exports:{}};b2.exports;var rF;function iue(){return rF||(rF=1,(function(n,e){var t=200,i="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",s="[object Array]",a="[object Boolean]",c="[object Date]",A="[object Error]",m="[object Function]",v="[object GeneratorFunction]",x="[object Map]",_="[object Number]",O="[object Object]",P="[object Promise]",F="[object RegExp]",j="[object Set]",Q="[object String]",V="[object Symbol]",H="[object WeakMap]",G="[object ArrayBuffer]",Y="[object DataView]",z="[object Float32Array]",se="[object Float64Array]",le="[object Int8Array]",me="[object Int16Array]",fe="[object Int32Array]",_e="[object Uint8Array]",we="[object Uint8ClampedArray]",ke="[object Uint16Array]",je="[object Uint32Array]",Ie=/[\\^$.*+?()[\]{}|]/g,Qe=/\w*$/,tt=/^\[object .+?Constructor\]$/,ht=/^(?:0|[1-9]\d*)$/,ce={};ce[o]=ce[s]=ce[G]=ce[Y]=ce[a]=ce[c]=ce[z]=ce[se]=ce[le]=ce[me]=ce[fe]=ce[x]=ce[_]=ce[O]=ce[F]=ce[j]=ce[Q]=ce[V]=ce[_e]=ce[we]=ce[ke]=ce[je]=!0,ce[A]=ce[m]=ce[H]=!1;var Le=typeof window=="object"&&window&&window.Object===Object&&window,We=typeof self=="object"&&self&&self.Object===Object&&self,Me=Le||We||Function("return this")(),dt=e&&!e.nodeType&&e,it=dt&&!0&&n&&!n.nodeType&&n,vt=it&&it.exports===dt;function Ut(X,ve){return X.set(ve[0],ve[1]),X}function Pe(X,ve){return X.add(ve),X}function Te(X,ve){for(var $e=-1,St=X?X.length:0;++$e<St&&ve(X[$e],$e,X)!==!1;);return X}function Se(X,ve){for(var $e=-1,St=ve.length,ri=X.length;++$e<St;)X[ri+$e]=ve[$e];return X}function Ne(X,ve,$e,St){for(var ri=-1,kn=X?X.length:0;++ri<kn;)$e=ve($e,X[ri],ri,X);return $e}function ut(X,ve){for(var $e=-1,St=Array(X);++$e<X;)St[$e]=ve($e);return St}function rt(X,ve){return X?.[ve]}function mt(X){var ve=!1;if(X!=null&&typeof X.toString!="function")try{ve=!!(X+"")}catch{}return ve}function Rt(X){var ve=-1,$e=Array(X.size);return X.forEach(function(St,ri){$e[++ve]=[ri,St]}),$e}function Bt(X,ve){return function($e){return X(ve($e))}}function $t(X){var ve=-1,$e=Array(X.size);return X.forEach(function(St){$e[++ve]=St}),$e}var Rn=Array.prototype,zn=Function.prototype,ai=Object.prototype,_n=Me["__core-js_shared__"],Bn=(function(){var X=/[^.]+$/.exec(_n&&_n.keys&&_n.keys.IE_PROTO||"");return X?"Symbol(src)_1."+X:""})(),dn=zn.toString,li=ai.hasOwnProperty,In=ai.toString,It=RegExp("^"+dn.call(li).replace(Ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xe=vt?Me.Buffer:void 0,oe=Me.Symbol,J=Me.Uint8Array,ne=Bt(Object.getPrototypeOf,Object),ue=Object.create,Ce=ai.propertyIsEnumerable,Ue=Rn.splice,He=Object.getOwnPropertySymbols,lt=xe?xe.isBuffer:void 0,be=Bt(Object.keys,Object),Ee=jo(Me,"DataView"),y=jo(Me,"Map"),gt=jo(Me,"Promise"),Mt=jo(Me,"Set"),Dt=jo(Me,"WeakMap"),ot=jo(Object,"create"),bn=Mo(Ee),Gn=Mo(y),yn=Mo(gt),qn=Mo(Mt),$n=Mo(Dt),mi=oe?oe.prototype:void 0,ir=mi?mi.valueOf:void 0;function di(X){var ve=-1,$e=X?X.length:0;for(this.clear();++ve<$e;){var St=X[ve];this.set(St[0],St[1])}}function Vn(){this.__data__=ot?ot(null):{}}function Fn(X){return this.has(X)&&delete this.__data__[X]}function Ti(X){var ve=this.__data__;if(ot){var $e=ve[X];return $e===i?void 0:$e}return li.call(ve,X)?ve[X]:void 0}function on(X){var ve=this.__data__;return ot?ve[X]!==void 0:li.call(ve,X)}function qr(X,ve){var $e=this.__data__;return $e[X]=ot&&ve===void 0?i:ve,this}di.prototype.clear=Vn,di.prototype.delete=Fn,di.prototype.get=Ti,di.prototype.has=on,di.prototype.set=qr;function Di(X){var ve=-1,$e=X?X.length:0;for(this.clear();++ve<$e;){var St=X[ve];this.set(St[0],St[1])}}function js(){this.__data__=[]}function ea(X){var ve=this.__data__,$e=cl(ve,X);if($e<0)return!1;var St=ve.length-1;return $e==St?ve.pop():Ue.call(ve,$e,1),!0}function Pn(X){var ve=this.__data__,$e=cl(ve,X);return $e<0?void 0:ve[$e][1]}function Gi(X){return cl(this.__data__,X)>-1}function Li(X,ve){var $e=this.__data__,St=cl($e,X);return St<0?$e.push([X,ve]):$e[St][1]=ve,this}Di.prototype.clear=js,Di.prototype.delete=ea,Di.prototype.get=Pn,Di.prototype.has=Gi,Di.prototype.set=Li;function Xi(X){var ve=-1,$e=X?X.length:0;for(this.clear();++ve<$e;){var St=X[ve];this.set(St[0],St[1])}}function Oa(){this.__data__={hash:new di,map:new(y||Di),string:new di}}function lo(X){return Ia(this,X).delete(X)}function Fi(X){return Ia(this,X).get(X)}function Cl(X){return Ia(this,X).has(X)}function ra(X,ve){return Ia(this,X).set(X,ve),this}Xi.prototype.clear=Oa,Xi.prototype.delete=lo,Xi.prototype.get=Fi,Xi.prototype.has=Cl,Xi.prototype.set=ra;function uo(X){this.__data__=new Di(X)}function Fa(){this.__data__=new Di}function Fu(X){return this.__data__.delete(X)}function So(X){return this.__data__.get(X)}function AA(X){return this.__data__.has(X)}function ta(X,ve){var $e=this.__data__;if($e instanceof Di){var St=$e.__data__;if(!y||St.length<t-1)return St.push([X,ve]),this;$e=this.__data__=new Xi(St)}return $e.set(X,ve),this}uo.prototype.clear=Fa,uo.prototype.delete=Fu,uo.prototype.get=So,uo.prototype.has=AA,uo.prototype.set=ta;function xr(X,ve){var $e=Go(X)||No(X)?ut(X.length,String):[],St=$e.length,ri=!!St;for(var kn in X)li.call(X,kn)&&!(ri&&(kn=="length"||Au(kn,St)))&&$e.push(kn);return $e}function Xa(X,ve,$e){var St=X[ve];(!(li.call(X,ve)&&ls(St,$e))||$e===void 0&&!(ve in X))&&(X[ve]=$e)}function cl(X,ve){for(var $e=X.length;$e--;)if(ls(X[$e][0],ve))return $e;return-1}function Bs(X,ve){return X&&Ml(ve,Si(ve),X)}function fa(X,ve,$e,St,ri,kn,xi){var Ki;if(St&&(Ki=kn?St(X,ri,kn,xi):St(X)),Ki!==void 0)return Ki;if(!gr(X))return X;var Ri=Go(X);if(Ri){if(Ki=Ql(X),!ve)return uu(X,Ki)}else{var Ei=Wi(X),Or=Ei==m||Ei==v;if(us(X))return xl(X,ve);if(Ei==O||Ei==o||Or&&!kn){if(mt(X))return kn?X:{};if(Ki=Fo(Or?{}:X),!ve)return cu(X,Bs(Ki,X))}else{if(!ce[Ei])return kn?X:{};Ki=wl(X,Ei,fa,ve)}}xi||(xi=new uo);var zr=xi.get(X);if(zr)return zr;if(xi.set(X,Ki),!Ri)var ji=$e?zA(X):Si(X);return Te(ji||X,function(Ar,jr){ji&&(jr=Ar,Ar=X[jr]),Xa(Ki,jr,fa(Ar,ve,$e,St,jr,X,xi))}),Ki}function _l(X){return gr(X)?ue(X):{}}function zc(X,ve,$e){var St=ve(X);return Go(X)?St:Se(St,$e(X))}function Ah(X){return In.call(X)}function hA(X){if(!gr(X)||Sl(X))return!1;var ve=bs(X)||mt(X)?It:tt;return ve.test(Mo(X))}function Ns(X){if(!ju(X))return be(X);var ve=[];for(var $e in Object(X))li.call(X,$e)&&$e!="constructor"&&ve.push($e);return ve}function xl(X,ve){if(ve)return X.slice();var $e=new X.constructor(X.length);return X.copy($e),$e}function jc(X){var ve=new X.constructor(X.byteLength);return new J(ve).set(new J(X)),ve}function Ja(X,ve){var $e=ve?jc(X.buffer):X.buffer;return new X.constructor($e,X.byteOffset,X.byteLength)}function Nc(X,ve,$e){var St=ve?$e(Rt(X),!0):Rt(X);return Ne(St,Ut,new X.constructor)}function Al(X){var ve=new X.constructor(X.source,Qe.exec(X));return ve.lastIndex=X.lastIndex,ve}function zu(X,ve,$e){var St=ve?$e($t(X),!0):$t(X);return Ne(St,Pe,new X.constructor)}function Ba(X){return ir?Object(ir.call(X)):{}}function lc(X,ve){var $e=ve?jc(X.buffer):X.buffer;return new X.constructor($e,X.byteOffset,X.length)}function uu(X,ve){var $e=-1,St=X.length;for(ve||(ve=Array(St));++$e<St;)ve[$e]=X[$e];return ve}function Ml(X,ve,$e,St){$e||($e={});for(var ri=-1,kn=ve.length;++ri<kn;){var xi=ve[ri],Ki=void 0;Xa($e,xi,Ki===void 0?X[xi]:Ki)}return $e}function cu(X,ve){return Ml(X,xo(X),ve)}function zA(X){return zc(X,Si,xo)}function Ia(X,ve){var $e=X.__data__;return er(ve)?$e[typeof ve=="string"?"string":"hash"]:$e.map}function jo(X,ve){var $e=rt(X,ve);return hA($e)?$e:void 0}var xo=He?Bt(He,Object):ti,Wi=Ah;(Ee&&Wi(new Ee(new ArrayBuffer(1)))!=Y||y&&Wi(new y)!=x||gt&&Wi(gt.resolve())!=P||Mt&&Wi(new Mt)!=j||Dt&&Wi(new Dt)!=H)&&(Wi=function(X){var ve=In.call(X),$e=ve==O?X.constructor:void 0,St=$e?Mo($e):void 0;if(St)switch(St){case bn:return Y;case Gn:return x;case yn:return P;case qn:return j;case $n:return H}return ve});function Ql(X){var ve=X.length,$e=X.constructor(ve);return ve&&typeof X[0]=="string"&&li.call(X,"index")&&($e.index=X.index,$e.input=X.input),$e}function Fo(X){return typeof X.constructor=="function"&&!ju(X)?_l(ne(X)):{}}function wl(X,ve,$e,St){var ri=X.constructor;switch(ve){case G:return jc(X);case a:case c:return new ri(+X);case Y:return Ja(X,St);case z:case se:case le:case me:case fe:case _e:case we:case ke:case je:return lc(X,St);case x:return Nc(X,St,$e);case _:case Q:return new ri(X);case F:return Al(X);case j:return zu(X,St,$e);case V:return Ba(X)}}function Au(X,ve){return ve=ve??r,!!ve&&(typeof X=="number"||ht.test(X))&&X>-1&&X%1==0&&X<ve}function er(X){var ve=typeof X;return ve=="string"||ve=="number"||ve=="symbol"||ve=="boolean"?X!=="__proto__":X===null}function Sl(X){return!!Bn&&Bn in X}function ju(X){var ve=X&&X.constructor,$e=typeof ve=="function"&&ve.prototype||ai;return X===$e}function Mo(X){if(X!=null){try{return dn.call(X)}catch{}try{return X+""}catch{}}return""}function es(X){return fa(X,!0,!0)}function ls(X,ve){return X===ve||X!==X&&ve!==ve}function No(X){return El(X)&&li.call(X,"callee")&&(!Ce.call(X,"callee")||In.call(X)==o)}var Go=Array.isArray;function Mr(X){return X!=null&&Ro(X.length)&&!bs(X)}function El(X){return el(X)&&Mr(X)}var us=lt||wr;function bs(X){var ve=gr(X)?In.call(X):"";return ve==m||ve==v}function Ro(X){return typeof X=="number"&&X>-1&&X%1==0&&X<=r}function gr(X){var ve=typeof X;return!!X&&(ve=="object"||ve=="function")}function el(X){return!!X&&typeof X=="object"}function Si(X){return Mr(X)?xr(X):Ns(X)}function ti(){return[]}function wr(){return!1}n.exports=es})(b2,b2.exports)),b2.exports}var rue=iue();const oF=Wl(rue);var J6,sF;function oue(){if(sF)return J6;sF=1;var n=NaN,e="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,a=Object.prototype,c=a.toString;function A(P,F,j){return P===P&&(j!==void 0&&(P=P<=j?P:j),F!==void 0&&(P=P>=F?P:F)),P}function m(P){var F=typeof P;return!!P&&(F=="object"||F=="function")}function v(P){return!!P&&typeof P=="object"}function x(P){return typeof P=="symbol"||v(P)&&c.call(P)==e}function _(P){if(typeof P=="number")return P;if(x(P))return n;if(m(P)){var F=typeof P.valueOf=="function"?P.valueOf():P;P=m(F)?F+"":F}if(typeof P!="string")return P===0?P:+P;P=P.replace(t,"");var j=r.test(P);return j||o.test(P)?s(P.slice(2),j?2:8):i.test(P)?n:+P}function O(P,F,j){return j===void 0&&(j=F,F=void 0),j!==void 0&&(j=_(j),j=j===j?j:0),F!==void 0&&(F=_(F),F=F===F?F:0),A(_(P),F,j)}return J6=O,J6}var sue=oue();const aF=Wl(sue);var eO={},Hx={},lF;function aue(){if(lF)return Hx;lF=1,Hx.byteLength=a,Hx.toByteArray=A,Hx.fromByteArray=x;for(var n=[],e=[],t=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,o=i.length;r<o;++r)n[r]=i[r],e[i.charCodeAt(r)]=r;e[45]=62,e[95]=63;function s(_){var O=_.length;if(O%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var P=_.indexOf("=");P===-1&&(P=O);var F=P===O?0:4-P%4;return[P,F]}function a(_){var O=s(_),P=O[0],F=O[1];return(P+F)*3/4-F}function c(_,O,P){return(O+P)*3/4-P}function A(_){var O,P=s(_),F=P[0],j=P[1],Q=new t(c(_,F,j)),V=0,H=j>0?F-4:F,G;for(G=0;G<H;G+=4)O=e[_.charCodeAt(G)]<<18|e[_.charCodeAt(G+1)]<<12|e[_.charCodeAt(G+2)]<<6|e[_.charCodeAt(G+3)],Q[V++]=O>>16&255,Q[V++]=O>>8&255,Q[V++]=O&255;return j===2&&(O=e[_.charCodeAt(G)]<<2|e[_.charCodeAt(G+1)]>>4,Q[V++]=O&255),j===1&&(O=e[_.charCodeAt(G)]<<10|e[_.charCodeAt(G+1)]<<4|e[_.charCodeAt(G+2)]>>2,Q[V++]=O>>8&255,Q[V++]=O&255),Q}function m(_){return n[_>>18&63]+n[_>>12&63]+n[_>>6&63]+n[_&63]}function v(_,O,P){for(var F,j=[],Q=O;Q<P;Q+=3)F=(_[Q]<<16&16711680)+(_[Q+1]<<8&65280)+(_[Q+2]&255),j.push(m(F));return j.join("")}function x(_){for(var O,P=_.length,F=P%3,j=[],Q=16383,V=0,H=P-F;V<H;V+=Q)j.push(v(_,V,V+Q>H?H:V+Q));return F===1?(O=_[P-1],j.push(n[O>>2]+n[O<<4&63]+"==")):F===2&&(O=(_[P-2]<<8)+_[P-1],j.push(n[O>>10]+n[O>>4&63]+n[O<<2&63]+"=")),j.join("")}return Hx}var xM={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var uF;function lue(){return uF||(uF=1,xM.read=function(n,e,t,i,r){var o,s,a=r*8-i-1,c=(1<<a)-1,A=c>>1,m=-7,v=t?r-1:0,x=t?-1:1,_=n[e+v];for(v+=x,o=_&(1<<-m)-1,_>>=-m,m+=a;m>0;o=o*256+n[e+v],v+=x,m-=8);for(s=o&(1<<-m)-1,o>>=-m,m+=i;m>0;s=s*256+n[e+v],v+=x,m-=8);if(o===0)o=1-A;else{if(o===c)return s?NaN:(_?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-A}return(_?-1:1)*s*Math.pow(2,o-i)},xM.write=function(n,e,t,i,r,o){var s,a,c,A=o*8-r-1,m=(1<<A)-1,v=m>>1,x=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=i?0:o-1,O=i?1:-1,P=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=m):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+v>=1?e+=x/c:e+=x*Math.pow(2,1-v),e*c>=2&&(s++,c/=2),s+v>=m?(a=0,s=m):s+v>=1?(a=(e*c-1)*Math.pow(2,r),s=s+v):(a=e*Math.pow(2,v-1)*Math.pow(2,r),s=0));r>=8;n[t+_]=a&255,_+=O,a/=256,r-=8);for(s=s<<r|a,A+=r;A>0;n[t+_]=s&255,_+=O,s/=256,A-=8);n[t+_-O]|=P*128}),xM}/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var cF;function uue(){return cF||(cF=1,(function(n){const e=aue(),t=lue(),i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=a,n.SlowBuffer=Q,n.INSPECT_MAX_BYTES=50;const r=2147483647;n.kMaxLength=r,a.TYPED_ARRAY_SUPPORT=o(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const xe=new Uint8Array(1),oe={foo:function(){return 42}};return Object.setPrototypeOf(oe,Uint8Array.prototype),Object.setPrototypeOf(xe,oe),xe.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(xe){if(xe>r)throw new RangeError('The value "'+xe+'" is invalid for option "size"');const oe=new Uint8Array(xe);return Object.setPrototypeOf(oe,a.prototype),oe}function a(xe,oe,J){if(typeof xe=="number"){if(typeof oe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(xe)}return c(xe,oe,J)}a.poolSize=8192;function c(xe,oe,J){if(typeof xe=="string")return x(xe,oe);if(ArrayBuffer.isView(xe))return O(xe);if(xe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof xe);if(Bn(xe,ArrayBuffer)||xe&&Bn(xe.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Bn(xe,SharedArrayBuffer)||xe&&Bn(xe.buffer,SharedArrayBuffer)))return P(xe,oe,J);if(typeof xe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ne=xe.valueOf&&xe.valueOf();if(ne!=null&&ne!==xe)return a.from(ne,oe,J);const ue=F(xe);if(ue)return ue;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof xe[Symbol.toPrimitive]=="function")return a.from(xe[Symbol.toPrimitive]("string"),oe,J);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof xe)}a.from=function(xe,oe,J){return c(xe,oe,J)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function A(xe){if(typeof xe!="number")throw new TypeError('"size" argument must be of type number');if(xe<0)throw new RangeError('The value "'+xe+'" is invalid for option "size"')}function m(xe,oe,J){return A(xe),xe<=0?s(xe):oe!==void 0?typeof J=="string"?s(xe).fill(oe,J):s(xe).fill(oe):s(xe)}a.alloc=function(xe,oe,J){return m(xe,oe,J)};function v(xe){return A(xe),s(xe<0?0:j(xe)|0)}a.allocUnsafe=function(xe){return v(xe)},a.allocUnsafeSlow=function(xe){return v(xe)};function x(xe,oe){if((typeof oe!="string"||oe==="")&&(oe="utf8"),!a.isEncoding(oe))throw new TypeError("Unknown encoding: "+oe);const J=V(xe,oe)|0;let ne=s(J);const ue=ne.write(xe,oe);return ue!==J&&(ne=ne.slice(0,ue)),ne}function _(xe){const oe=xe.length<0?0:j(xe.length)|0,J=s(oe);for(let ne=0;ne<oe;ne+=1)J[ne]=xe[ne]&255;return J}function O(xe){if(Bn(xe,Uint8Array)){const oe=new Uint8Array(xe);return P(oe.buffer,oe.byteOffset,oe.byteLength)}return _(xe)}function P(xe,oe,J){if(oe<0||xe.byteLength<oe)throw new RangeError('"offset" is outside of buffer bounds');if(xe.byteLength<oe+(J||0))throw new RangeError('"length" is outside of buffer bounds');let ne;return oe===void 0&&J===void 0?ne=new Uint8Array(xe):J===void 0?ne=new Uint8Array(xe,oe):ne=new Uint8Array(xe,oe,J),Object.setPrototypeOf(ne,a.prototype),ne}function F(xe){if(a.isBuffer(xe)){const oe=j(xe.length)|0,J=s(oe);return J.length===0||xe.copy(J,0,0,oe),J}if(xe.length!==void 0)return typeof xe.length!="number"||dn(xe.length)?s(0):_(xe);if(xe.type==="Buffer"&&Array.isArray(xe.data))return _(xe.data)}function j(xe){if(xe>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return xe|0}function Q(xe){return+xe!=xe&&(xe=0),a.alloc(+xe)}a.isBuffer=function(oe){return oe!=null&&oe._isBuffer===!0&&oe!==a.prototype},a.compare=function(oe,J){if(Bn(oe,Uint8Array)&&(oe=a.from(oe,oe.offset,oe.byteLength)),Bn(J,Uint8Array)&&(J=a.from(J,J.offset,J.byteLength)),!a.isBuffer(oe)||!a.isBuffer(J))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(oe===J)return 0;let ne=oe.length,ue=J.length;for(let Ce=0,Ue=Math.min(ne,ue);Ce<Ue;++Ce)if(oe[Ce]!==J[Ce]){ne=oe[Ce],ue=J[Ce];break}return ne<ue?-1:ue<ne?1:0},a.isEncoding=function(oe){switch(String(oe).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(oe,J){if(!Array.isArray(oe))throw new TypeError('"list" argument must be an Array of Buffers');if(oe.length===0)return a.alloc(0);let ne;if(J===void 0)for(J=0,ne=0;ne<oe.length;++ne)J+=oe[ne].length;const ue=a.allocUnsafe(J);let Ce=0;for(ne=0;ne<oe.length;++ne){let Ue=oe[ne];if(Bn(Ue,Uint8Array))Ce+Ue.length>ue.length?(a.isBuffer(Ue)||(Ue=a.from(Ue)),Ue.copy(ue,Ce)):Uint8Array.prototype.set.call(ue,Ue,Ce);else if(a.isBuffer(Ue))Ue.copy(ue,Ce);else throw new TypeError('"list" argument must be an Array of Buffers');Ce+=Ue.length}return ue};function V(xe,oe){if(a.isBuffer(xe))return xe.length;if(ArrayBuffer.isView(xe)||Bn(xe,ArrayBuffer))return xe.byteLength;if(typeof xe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof xe);const J=xe.length,ne=arguments.length>2&&arguments[2]===!0;if(!ne&&J===0)return 0;let ue=!1;for(;;)switch(oe){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":return $t(xe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J*2;case"hex":return J>>>1;case"base64":return ai(xe).length;default:if(ue)return ne?-1:$t(xe).length;oe=(""+oe).toLowerCase(),ue=!0}}a.byteLength=V;function H(xe,oe,J){let ne=!1;if((oe===void 0||oe<0)&&(oe=0),oe>this.length||((J===void 0||J>this.length)&&(J=this.length),J<=0)||(J>>>=0,oe>>>=0,J<=oe))return"";for(xe||(xe="utf8");;)switch(xe){case"hex":return ht(this,oe,J);case"utf8":case"utf-8":return ke(this,oe,J);case"ascii":return Qe(this,oe,J);case"latin1":case"binary":return tt(this,oe,J);case"base64":return we(this,oe,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,oe,J);default:if(ne)throw new TypeError("Unknown encoding: "+xe);xe=(xe+"").toLowerCase(),ne=!0}}a.prototype._isBuffer=!0;function G(xe,oe,J){const ne=xe[oe];xe[oe]=xe[J],xe[J]=ne}a.prototype.swap16=function(){const oe=this.length;if(oe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let J=0;J<oe;J+=2)G(this,J,J+1);return this},a.prototype.swap32=function(){const oe=this.length;if(oe%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let J=0;J<oe;J+=4)G(this,J,J+3),G(this,J+1,J+2);return this},a.prototype.swap64=function(){const oe=this.length;if(oe%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let J=0;J<oe;J+=8)G(this,J,J+7),G(this,J+1,J+6),G(this,J+2,J+5),G(this,J+3,J+4);return this},a.prototype.toString=function(){const oe=this.length;return oe===0?"":arguments.length===0?ke(this,0,oe):H.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(oe){if(!a.isBuffer(oe))throw new TypeError("Argument must be a Buffer");return this===oe?!0:a.compare(this,oe)===0},a.prototype.inspect=function(){let oe="";const J=n.INSPECT_MAX_BYTES;return oe=this.toString("hex",0,J).replace(/(.{2})/g,"$1 ").trim(),this.length>J&&(oe+=" ... "),"<Buffer "+oe+">"},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(oe,J,ne,ue,Ce){if(Bn(oe,Uint8Array)&&(oe=a.from(oe,oe.offset,oe.byteLength)),!a.isBuffer(oe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof oe);if(J===void 0&&(J=0),ne===void 0&&(ne=oe?oe.length:0),ue===void 0&&(ue=0),Ce===void 0&&(Ce=this.length),J<0||ne>oe.length||ue<0||Ce>this.length)throw new RangeError("out of range index");if(ue>=Ce&&J>=ne)return 0;if(ue>=Ce)return-1;if(J>=ne)return 1;if(J>>>=0,ne>>>=0,ue>>>=0,Ce>>>=0,this===oe)return 0;let Ue=Ce-ue,He=ne-J;const lt=Math.min(Ue,He),be=this.slice(ue,Ce),Ee=oe.slice(J,ne);for(let y=0;y<lt;++y)if(be[y]!==Ee[y]){Ue=be[y],He=Ee[y];break}return Ue<He?-1:He<Ue?1:0};function Y(xe,oe,J,ne,ue){if(xe.length===0)return-1;if(typeof J=="string"?(ne=J,J=0):J>2147483647?J=2147483647:J<-2147483648&&(J=-2147483648),J=+J,dn(J)&&(J=ue?0:xe.length-1),J<0&&(J=xe.length+J),J>=xe.length){if(ue)return-1;J=xe.length-1}else if(J<0)if(ue)J=0;else return-1;if(typeof oe=="string"&&(oe=a.from(oe,ne)),a.isBuffer(oe))return oe.length===0?-1:z(xe,oe,J,ne,ue);if(typeof oe=="number")return oe=oe&255,typeof Uint8Array.prototype.indexOf=="function"?ue?Uint8Array.prototype.indexOf.call(xe,oe,J):Uint8Array.prototype.lastIndexOf.call(xe,oe,J):z(xe,[oe],J,ne,ue);throw new TypeError("val must be string, number or Buffer")}function z(xe,oe,J,ne,ue){let Ce=1,Ue=xe.length,He=oe.length;if(ne!==void 0&&(ne=String(ne).toLowerCase(),ne==="ucs2"||ne==="ucs-2"||ne==="utf16le"||ne==="utf-16le")){if(xe.length<2||oe.length<2)return-1;Ce=2,Ue/=2,He/=2,J/=2}function lt(Ee,y){return Ce===1?Ee[y]:Ee.readUInt16BE(y*Ce)}let be;if(ue){let Ee=-1;for(be=J;be<Ue;be++)if(lt(xe,be)===lt(oe,Ee===-1?0:be-Ee)){if(Ee===-1&&(Ee=be),be-Ee+1===He)return Ee*Ce}else Ee!==-1&&(be-=be-Ee),Ee=-1}else for(J+He>Ue&&(J=Ue-He),be=J;be>=0;be--){let Ee=!0;for(let y=0;y<He;y++)if(lt(xe,be+y)!==lt(oe,y)){Ee=!1;break}if(Ee)return be}return-1}a.prototype.includes=function(oe,J,ne){return this.indexOf(oe,J,ne)!==-1},a.prototype.indexOf=function(oe,J,ne){return Y(this,oe,J,ne,!0)},a.prototype.lastIndexOf=function(oe,J,ne){return Y(this,oe,J,ne,!1)};function se(xe,oe,J,ne){J=Number(J)||0;const ue=xe.length-J;ne?(ne=Number(ne),ne>ue&&(ne=ue)):ne=ue;const Ce=oe.length;ne>Ce/2&&(ne=Ce/2);let Ue;for(Ue=0;Ue<ne;++Ue){const He=parseInt(oe.substr(Ue*2,2),16);if(dn(He))return Ue;xe[J+Ue]=He}return Ue}function le(xe,oe,J,ne){return _n($t(oe,xe.length-J),xe,J,ne)}function me(xe,oe,J,ne){return _n(Rn(oe),xe,J,ne)}function fe(xe,oe,J,ne){return _n(ai(oe),xe,J,ne)}function _e(xe,oe,J,ne){return _n(zn(oe,xe.length-J),xe,J,ne)}a.prototype.write=function(oe,J,ne,ue){if(J===void 0)ue="utf8",ne=this.length,J=0;else if(ne===void 0&&typeof J=="string")ue=J,ne=this.length,J=0;else if(isFinite(J))J=J>>>0,isFinite(ne)?(ne=ne>>>0,ue===void 0&&(ue="utf8")):(ue=ne,ne=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Ce=this.length-J;if((ne===void 0||ne>Ce)&&(ne=Ce),oe.length>0&&(ne<0||J<0)||J>this.length)throw new RangeError("Attempt to write outside buffer bounds");ue||(ue="utf8");let Ue=!1;for(;;)switch(ue){case"hex":return se(this,oe,J,ne);case"utf8":case"utf-8":return le(this,oe,J,ne);case"ascii":case"latin1":case"binary":return me(this,oe,J,ne);case"base64":return fe(this,oe,J,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,oe,J,ne);default:if(Ue)throw new TypeError("Unknown encoding: "+ue);ue=(""+ue).toLowerCase(),Ue=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function we(xe,oe,J){return oe===0&&J===xe.length?e.fromByteArray(xe):e.fromByteArray(xe.slice(oe,J))}function ke(xe,oe,J){J=Math.min(xe.length,J);const ne=[];let ue=oe;for(;ue<J;){const Ce=xe[ue];let Ue=null,He=Ce>239?4:Ce>223?3:Ce>191?2:1;if(ue+He<=J){let lt,be,Ee,y;switch(He){case 1:Ce<128&&(Ue=Ce);break;case 2:lt=xe[ue+1],(lt&192)===128&&(y=(Ce&31)<<6|lt&63,y>127&&(Ue=y));break;case 3:lt=xe[ue+1],be=xe[ue+2],(lt&192)===128&&(be&192)===128&&(y=(Ce&15)<<12|(lt&63)<<6|be&63,y>2047&&(y<55296||y>57343)&&(Ue=y));break;case 4:lt=xe[ue+1],be=xe[ue+2],Ee=xe[ue+3],(lt&192)===128&&(be&192)===128&&(Ee&192)===128&&(y=(Ce&15)<<18|(lt&63)<<12|(be&63)<<6|Ee&63,y>65535&&y<1114112&&(Ue=y))}}Ue===null?(Ue=65533,He=1):Ue>65535&&(Ue-=65536,ne.push(Ue>>>10&1023|55296),Ue=56320|Ue&1023),ne.push(Ue),ue+=He}return Ie(ne)}const je=4096;function Ie(xe){const oe=xe.length;if(oe<=je)return String.fromCharCode.apply(String,xe);let J="",ne=0;for(;ne<oe;)J+=String.fromCharCode.apply(String,xe.slice(ne,ne+=je));return J}function Qe(xe,oe,J){let ne="";J=Math.min(xe.length,J);for(let ue=oe;ue<J;++ue)ne+=String.fromCharCode(xe[ue]&127);return ne}function tt(xe,oe,J){let ne="";J=Math.min(xe.length,J);for(let ue=oe;ue<J;++ue)ne+=String.fromCharCode(xe[ue]);return ne}function ht(xe,oe,J){const ne=xe.length;(!oe||oe<0)&&(oe=0),(!J||J<0||J>ne)&&(J=ne);let ue="";for(let Ce=oe;Ce<J;++Ce)ue+=li[xe[Ce]];return ue}function ce(xe,oe,J){const ne=xe.slice(oe,J);let ue="";for(let Ce=0;Ce<ne.length-1;Ce+=2)ue+=String.fromCharCode(ne[Ce]+ne[Ce+1]*256);return ue}a.prototype.slice=function(oe,J){const ne=this.length;oe=~~oe,J=J===void 0?ne:~~J,oe<0?(oe+=ne,oe<0&&(oe=0)):oe>ne&&(oe=ne),J<0?(J+=ne,J<0&&(J=0)):J>ne&&(J=ne),J<oe&&(J=oe);const ue=this.subarray(oe,J);return Object.setPrototypeOf(ue,a.prototype),ue};function Le(xe,oe,J){if(xe%1!==0||xe<0)throw new RangeError("offset is not uint");if(xe+oe>J)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(oe,J,ne){oe=oe>>>0,J=J>>>0,ne||Le(oe,J,this.length);let ue=this[oe],Ce=1,Ue=0;for(;++Ue<J&&(Ce*=256);)ue+=this[oe+Ue]*Ce;return ue},a.prototype.readUintBE=a.prototype.readUIntBE=function(oe,J,ne){oe=oe>>>0,J=J>>>0,ne||Le(oe,J,this.length);let ue=this[oe+--J],Ce=1;for(;J>0&&(Ce*=256);)ue+=this[oe+--J]*Ce;return ue},a.prototype.readUint8=a.prototype.readUInt8=function(oe,J){return oe=oe>>>0,J||Le(oe,1,this.length),this[oe]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(oe,J){return oe=oe>>>0,J||Le(oe,2,this.length),this[oe]|this[oe+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(oe,J){return oe=oe>>>0,J||Le(oe,2,this.length),this[oe]<<8|this[oe+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(oe,J){return oe=oe>>>0,J||Le(oe,4,this.length),(this[oe]|this[oe+1]<<8|this[oe+2]<<16)+this[oe+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(oe,J){return oe=oe>>>0,J||Le(oe,4,this.length),this[oe]*16777216+(this[oe+1]<<16|this[oe+2]<<8|this[oe+3])},a.prototype.readBigUInt64LE=In(function(oe){oe=oe>>>0,rt(oe,"offset");const J=this[oe],ne=this[oe+7];(J===void 0||ne===void 0)&&mt(oe,this.length-8);const ue=J+this[++oe]*2**8+this[++oe]*2**16+this[++oe]*2**24,Ce=this[++oe]+this[++oe]*2**8+this[++oe]*2**16+ne*2**24;return BigInt(ue)+(BigInt(Ce)<<BigInt(32))}),a.prototype.readBigUInt64BE=In(function(oe){oe=oe>>>0,rt(oe,"offset");const J=this[oe],ne=this[oe+7];(J===void 0||ne===void 0)&&mt(oe,this.length-8);const ue=J*2**24+this[++oe]*2**16+this[++oe]*2**8+this[++oe],Ce=this[++oe]*2**24+this[++oe]*2**16+this[++oe]*2**8+ne;return(BigInt(ue)<<BigInt(32))+BigInt(Ce)}),a.prototype.readIntLE=function(oe,J,ne){oe=oe>>>0,J=J>>>0,ne||Le(oe,J,this.length);let ue=this[oe],Ce=1,Ue=0;for(;++Ue<J&&(Ce*=256);)ue+=this[oe+Ue]*Ce;return Ce*=128,ue>=Ce&&(ue-=Math.pow(2,8*J)),ue},a.prototype.readIntBE=function(oe,J,ne){oe=oe>>>0,J=J>>>0,ne||Le(oe,J,this.length);let ue=J,Ce=1,Ue=this[oe+--ue];for(;ue>0&&(Ce*=256);)Ue+=this[oe+--ue]*Ce;return Ce*=128,Ue>=Ce&&(Ue-=Math.pow(2,8*J)),Ue},a.prototype.readInt8=function(oe,J){return oe=oe>>>0,J||Le(oe,1,this.length),this[oe]&128?(255-this[oe]+1)*-1:this[oe]},a.prototype.readInt16LE=function(oe,J){oe=oe>>>0,J||Le(oe,2,this.length);const ne=this[oe]|this[oe+1]<<8;return ne&32768?ne|4294901760:ne},a.prototype.readInt16BE=function(oe,J){oe=oe>>>0,J||Le(oe,2,this.length);const ne=this[oe+1]|this[oe]<<8;return ne&32768?ne|4294901760:ne},a.prototype.readInt32LE=function(oe,J){return oe=oe>>>0,J||Le(oe,4,this.length),this[oe]|this[oe+1]<<8|this[oe+2]<<16|this[oe+3]<<24},a.prototype.readInt32BE=function(oe,J){return oe=oe>>>0,J||Le(oe,4,this.length),this[oe]<<24|this[oe+1]<<16|this[oe+2]<<8|this[oe+3]},a.prototype.readBigInt64LE=In(function(oe){oe=oe>>>0,rt(oe,"offset");const J=this[oe],ne=this[oe+7];(J===void 0||ne===void 0)&&mt(oe,this.length-8);const ue=this[oe+4]+this[oe+5]*2**8+this[oe+6]*2**16+(ne<<24);return(BigInt(ue)<<BigInt(32))+BigInt(J+this[++oe]*2**8+this[++oe]*2**16+this[++oe]*2**24)}),a.prototype.readBigInt64BE=In(function(oe){oe=oe>>>0,rt(oe,"offset");const J=this[oe],ne=this[oe+7];(J===void 0||ne===void 0)&&mt(oe,this.length-8);const ue=(J<<24)+this[++oe]*2**16+this[++oe]*2**8+this[++oe];return(BigInt(ue)<<BigInt(32))+BigInt(this[++oe]*2**24+this[++oe]*2**16+this[++oe]*2**8+ne)}),a.prototype.readFloatLE=function(oe,J){return oe=oe>>>0,J||Le(oe,4,this.length),t.read(this,oe,!0,23,4)},a.prototype.readFloatBE=function(oe,J){return oe=oe>>>0,J||Le(oe,4,this.length),t.read(this,oe,!1,23,4)},a.prototype.readDoubleLE=function(oe,J){return oe=oe>>>0,J||Le(oe,8,this.length),t.read(this,oe,!0,52,8)},a.prototype.readDoubleBE=function(oe,J){return oe=oe>>>0,J||Le(oe,8,this.length),t.read(this,oe,!1,52,8)};function We(xe,oe,J,ne,ue,Ce){if(!a.isBuffer(xe))throw new TypeError('"buffer" argument must be a Buffer instance');if(oe>ue||oe<Ce)throw new RangeError('"value" argument is out of bounds');if(J+ne>xe.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(oe,J,ne,ue){if(oe=+oe,J=J>>>0,ne=ne>>>0,!ue){const He=Math.pow(2,8*ne)-1;We(this,oe,J,ne,He,0)}let Ce=1,Ue=0;for(this[J]=oe&255;++Ue<ne&&(Ce*=256);)this[J+Ue]=oe/Ce&255;return J+ne},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(oe,J,ne,ue){if(oe=+oe,J=J>>>0,ne=ne>>>0,!ue){const He=Math.pow(2,8*ne)-1;We(this,oe,J,ne,He,0)}let Ce=ne-1,Ue=1;for(this[J+Ce]=oe&255;--Ce>=0&&(Ue*=256);)this[J+Ce]=oe/Ue&255;return J+ne},a.prototype.writeUint8=a.prototype.writeUInt8=function(oe,J,ne){return oe=+oe,J=J>>>0,ne||We(this,oe,J,1,255,0),this[J]=oe&255,J+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(oe,J,ne){return oe=+oe,J=J>>>0,ne||We(this,oe,J,2,65535,0),this[J]=oe&255,this[J+1]=oe>>>8,J+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(oe,J,ne){return oe=+oe,J=J>>>0,ne||We(this,oe,J,2,65535,0),this[J]=oe>>>8,this[J+1]=oe&255,J+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(oe,J,ne){return oe=+oe,J=J>>>0,ne||We(this,oe,J,4,4294967295,0),this[J+3]=oe>>>24,this[J+2]=oe>>>16,this[J+1]=oe>>>8,this[J]=oe&255,J+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(oe,J,ne){return oe=+oe,J=J>>>0,ne||We(this,oe,J,4,4294967295,0),this[J]=oe>>>24,this[J+1]=oe>>>16,this[J+2]=oe>>>8,this[J+3]=oe&255,J+4};function Me(xe,oe,J,ne,ue){ut(oe,ne,ue,xe,J,7);let Ce=Number(oe&BigInt(4294967295));xe[J++]=Ce,Ce=Ce>>8,xe[J++]=Ce,Ce=Ce>>8,xe[J++]=Ce,Ce=Ce>>8,xe[J++]=Ce;let Ue=Number(oe>>BigInt(32)&BigInt(4294967295));return xe[J++]=Ue,Ue=Ue>>8,xe[J++]=Ue,Ue=Ue>>8,xe[J++]=Ue,Ue=Ue>>8,xe[J++]=Ue,J}function dt(xe,oe,J,ne,ue){ut(oe,ne,ue,xe,J,7);let Ce=Number(oe&BigInt(4294967295));xe[J+7]=Ce,Ce=Ce>>8,xe[J+6]=Ce,Ce=Ce>>8,xe[J+5]=Ce,Ce=Ce>>8,xe[J+4]=Ce;let Ue=Number(oe>>BigInt(32)&BigInt(4294967295));return xe[J+3]=Ue,Ue=Ue>>8,xe[J+2]=Ue,Ue=Ue>>8,xe[J+1]=Ue,Ue=Ue>>8,xe[J]=Ue,J+8}a.prototype.writeBigUInt64LE=In(function(oe,J=0){return Me(this,oe,J,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=In(function(oe,J=0){return dt(this,oe,J,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(oe,J,ne,ue){if(oe=+oe,J=J>>>0,!ue){const lt=Math.pow(2,8*ne-1);We(this,oe,J,ne,lt-1,-lt)}let Ce=0,Ue=1,He=0;for(this[J]=oe&255;++Ce<ne&&(Ue*=256);)oe<0&&He===0&&this[J+Ce-1]!==0&&(He=1),this[J+Ce]=(oe/Ue>>0)-He&255;return J+ne},a.prototype.writeIntBE=function(oe,J,ne,ue){if(oe=+oe,J=J>>>0,!ue){const lt=Math.pow(2,8*ne-1);We(this,oe,J,ne,lt-1,-lt)}let Ce=ne-1,Ue=1,He=0;for(this[J+Ce]=oe&255;--Ce>=0&&(Ue*=256);)oe<0&&He===0&&this[J+Ce+1]!==0&&(He=1),this[J+Ce]=(oe/Ue>>0)-He&255;return J+ne},a.prototype.writeInt8=function(oe,J,ne){return oe=+oe,J=J>>>0,ne||We(this,oe,J,1,127,-128),oe<0&&(oe=255+oe+1),this[J]=oe&255,J+1},a.prototype.writeInt16LE=function(oe,J,ne){return oe=+oe,J=J>>>0,ne||We(this,oe,J,2,32767,-32768),this[J]=oe&255,this[J+1]=oe>>>8,J+2},a.prototype.writeInt16BE=function(oe,J,ne){return oe=+oe,J=J>>>0,ne||We(this,oe,J,2,32767,-32768),this[J]=oe>>>8,this[J+1]=oe&255,J+2},a.prototype.writeInt32LE=function(oe,J,ne){return oe=+oe,J=J>>>0,ne||We(this,oe,J,4,2147483647,-2147483648),this[J]=oe&255,this[J+1]=oe>>>8,this[J+2]=oe>>>16,this[J+3]=oe>>>24,J+4},a.prototype.writeInt32BE=function(oe,J,ne){return oe=+oe,J=J>>>0,ne||We(this,oe,J,4,2147483647,-2147483648),oe<0&&(oe=4294967295+oe+1),this[J]=oe>>>24,this[J+1]=oe>>>16,this[J+2]=oe>>>8,this[J+3]=oe&255,J+4},a.prototype.writeBigInt64LE=In(function(oe,J=0){return Me(this,oe,J,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=In(function(oe,J=0){return dt(this,oe,J,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function it(xe,oe,J,ne,ue,Ce){if(J+ne>xe.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("Index out of range")}function vt(xe,oe,J,ne,ue){return oe=+oe,J=J>>>0,ue||it(xe,oe,J,4),t.write(xe,oe,J,ne,23,4),J+4}a.prototype.writeFloatLE=function(oe,J,ne){return vt(this,oe,J,!0,ne)},a.prototype.writeFloatBE=function(oe,J,ne){return vt(this,oe,J,!1,ne)};function Ut(xe,oe,J,ne,ue){return oe=+oe,J=J>>>0,ue||it(xe,oe,J,8),t.write(xe,oe,J,ne,52,8),J+8}a.prototype.writeDoubleLE=function(oe,J,ne){return Ut(this,oe,J,!0,ne)},a.prototype.writeDoubleBE=function(oe,J,ne){return Ut(this,oe,J,!1,ne)},a.prototype.copy=function(oe,J,ne,ue){if(!a.isBuffer(oe))throw new TypeError("argument should be a Buffer");if(ne||(ne=0),!ue&&ue!==0&&(ue=this.length),J>=oe.length&&(J=oe.length),J||(J=0),ue>0&&ue<ne&&(ue=ne),ue===ne||oe.length===0||this.length===0)return 0;if(J<0)throw new RangeError("targetStart out of bounds");if(ne<0||ne>=this.length)throw new RangeError("Index out of range");if(ue<0)throw new RangeError("sourceEnd out of bounds");ue>this.length&&(ue=this.length),oe.length-J<ue-ne&&(ue=oe.length-J+ne);const Ce=ue-ne;return this===oe&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(J,ne,ue):Uint8Array.prototype.set.call(oe,this.subarray(ne,ue),J),Ce},a.prototype.fill=function(oe,J,ne,ue){if(typeof oe=="string"){if(typeof J=="string"?(ue=J,J=0,ne=this.length):typeof ne=="string"&&(ue=ne,ne=this.length),ue!==void 0&&typeof ue!="string")throw new TypeError("encoding must be a string");if(typeof ue=="string"&&!a.isEncoding(ue))throw new TypeError("Unknown encoding: "+ue);if(oe.length===1){const Ue=oe.charCodeAt(0);(ue==="utf8"&&Ue<128||ue==="latin1")&&(oe=Ue)}}else typeof oe=="number"?oe=oe&255:typeof oe=="boolean"&&(oe=Number(oe));if(J<0||this.length<J||this.length<ne)throw new RangeError("Out of range index");if(ne<=J)return this;J=J>>>0,ne=ne===void 0?this.length:ne>>>0,oe||(oe=0);let Ce;if(typeof oe=="number")for(Ce=J;Ce<ne;++Ce)this[Ce]=oe;else{const Ue=a.isBuffer(oe)?oe:a.from(oe,ue),He=Ue.length;if(He===0)throw new TypeError('The value "'+oe+'" is invalid for argument "value"');for(Ce=0;Ce<ne-J;++Ce)this[Ce+J]=Ue[Ce%He]}return this};const Pe={};function Te(xe,oe,J){Pe[xe]=class extends J{constructor(){super(),Object.defineProperty(this,"message",{value:oe.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${xe}]`,this.stack,delete this.name}get code(){return xe}set code(ue){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ue,writable:!0})}toString(){return`${this.name} [${xe}]: ${this.message}`}}}Te("ERR_BUFFER_OUT_OF_BOUNDS",function(xe){return xe?`${xe} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Te("ERR_INVALID_ARG_TYPE",function(xe,oe){return`The "${xe}" argument must be of type number. Received type ${typeof oe}`},TypeError),Te("ERR_OUT_OF_RANGE",function(xe,oe,J){let ne=`The value of "${xe}" is out of range.`,ue=J;return Number.isInteger(J)&&Math.abs(J)>2**32?ue=Se(String(J)):typeof J=="bigint"&&(ue=String(J),(J>BigInt(2)**BigInt(32)||J<-(BigInt(2)**BigInt(32)))&&(ue=Se(ue)),ue+="n"),ne+=` It must be ${oe}. Received ${ue}`,ne},RangeError);function Se(xe){let oe="",J=xe.length;const ne=xe[0]==="-"?1:0;for(;J>=ne+4;J-=3)oe=`_${xe.slice(J-3,J)}${oe}`;return`${xe.slice(0,J)}${oe}`}function Ne(xe,oe,J){rt(oe,"offset"),(xe[oe]===void 0||xe[oe+J]===void 0)&&mt(oe,xe.length-(J+1))}function ut(xe,oe,J,ne,ue,Ce){if(xe>J||xe<oe){const Ue=typeof oe=="bigint"?"n":"";let He;throw oe===0||oe===BigInt(0)?He=`>= 0${Ue} and < 2${Ue} ** ${(Ce+1)*8}${Ue}`:He=`>= -(2${Ue} ** ${(Ce+1)*8-1}${Ue}) and < 2 ** ${(Ce+1)*8-1}${Ue}`,new Pe.ERR_OUT_OF_RANGE("value",He,xe)}Ne(ne,ue,Ce)}function rt(xe,oe){if(typeof xe!="number")throw new Pe.ERR_INVALID_ARG_TYPE(oe,"number",xe)}function mt(xe,oe,J){throw Math.floor(xe)!==xe?(rt(xe,J),new Pe.ERR_OUT_OF_RANGE("offset","an integer",xe)):oe<0?new Pe.ERR_BUFFER_OUT_OF_BOUNDS:new Pe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${oe}`,xe)}const Rt=/[^+/0-9A-Za-z-_]/g;function Bt(xe){if(xe=xe.split("=")[0],xe=xe.trim().replace(Rt,""),xe.length<2)return"";for(;xe.length%4!==0;)xe=xe+"=";return xe}function $t(xe,oe){oe=oe||1/0;let J;const ne=xe.length;let ue=null;const Ce=[];for(let Ue=0;Ue<ne;++Ue){if(J=xe.charCodeAt(Ue),J>55295&&J<57344){if(!ue){if(J>56319){(oe-=3)>-1&&Ce.push(239,191,189);continue}else if(Ue+1===ne){(oe-=3)>-1&&Ce.push(239,191,189);continue}ue=J;continue}if(J<56320){(oe-=3)>-1&&Ce.push(239,191,189),ue=J;continue}J=(ue-55296<<10|J-56320)+65536}else ue&&(oe-=3)>-1&&Ce.push(239,191,189);if(ue=null,J<128){if((oe-=1)<0)break;Ce.push(J)}else if(J<2048){if((oe-=2)<0)break;Ce.push(J>>6|192,J&63|128)}else if(J<65536){if((oe-=3)<0)break;Ce.push(J>>12|224,J>>6&63|128,J&63|128)}else if(J<1114112){if((oe-=4)<0)break;Ce.push(J>>18|240,J>>12&63|128,J>>6&63|128,J&63|128)}else throw new Error("Invalid code point")}return Ce}function Rn(xe){const oe=[];for(let J=0;J<xe.length;++J)oe.push(xe.charCodeAt(J)&255);return oe}function zn(xe,oe){let J,ne,ue;const Ce=[];for(let Ue=0;Ue<xe.length&&!((oe-=2)<0);++Ue)J=xe.charCodeAt(Ue),ne=J>>8,ue=J%256,Ce.push(ue),Ce.push(ne);return Ce}function ai(xe){return e.toByteArray(Bt(xe))}function _n(xe,oe,J,ne){let ue;for(ue=0;ue<ne&&!(ue+J>=oe.length||ue>=xe.length);++ue)oe[ue+J]=xe[ue];return ue}function Bn(xe,oe){return xe instanceof oe||xe!=null&&xe.constructor!=null&&xe.constructor.name!=null&&xe.constructor.name===oe.name}function dn(xe){return xe!==xe}const li=(function(){const xe="0123456789abcdef",oe=new Array(256);for(let J=0;J<16;++J){const ne=J*16;for(let ue=0;ue<16;++ue)oe[ne+ue]=xe[J]+xe[ue]}return oe})();function In(xe){return typeof BigInt>"u"?It:xe}function It(){throw new Error("BigInt not supported")}})(eO)),eO}var cue=uue();const Aue=Wl(cue);var tO,AF;function hue(){if(AF)return tO;AF=1;var n="Expected a function",e="__lodash_hash_undefined__",t="[object Function]",i="[object GeneratorFunction]",r="[object Symbol]",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,a=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A=/[\\^$.*+?()[\]{}|]/g,m=/\\(\\)?/g,v=/^\[object .+?Constructor\]$/,x=typeof window=="object"&&window&&window.Object===Object&&window,_=typeof self=="object"&&self&&self.Object===Object&&self,O=x||_||Function("return this")();function P(be,Ee){return be?.[Ee]}function F(be){var Ee=!1;if(be!=null&&typeof be.toString!="function")try{Ee=!!(be+"")}catch{}return Ee}var j=Array.prototype,Q=Function.prototype,V=Object.prototype,H=O["__core-js_shared__"],G=(function(){var be=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||"");return be?"Symbol(src)_1."+be:""})(),Y=Q.toString,z=V.hasOwnProperty,se=V.toString,le=RegExp("^"+Y.call(z).replace(A,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me=O.Symbol,fe=j.splice,_e=ai(O,"Map"),we=ai(Object,"create"),ke=me?me.prototype:void 0,je=ke?ke.toString:void 0;function Ie(be){var Ee=-1,y=be?be.length:0;for(this.clear();++Ee<y;){var gt=be[Ee];this.set(gt[0],gt[1])}}function Qe(){this.__data__=we?we(null):{}}function tt(be){return this.has(be)&&delete this.__data__[be]}function ht(be){var Ee=this.__data__;if(we){var y=Ee[be];return y===e?void 0:y}return z.call(Ee,be)?Ee[be]:void 0}function ce(be){var Ee=this.__data__;return we?Ee[be]!==void 0:z.call(Ee,be)}function Le(be,Ee){var y=this.__data__;return y[be]=we&&Ee===void 0?e:Ee,this}Ie.prototype.clear=Qe,Ie.prototype.delete=tt,Ie.prototype.get=ht,Ie.prototype.has=ce,Ie.prototype.set=Le;function We(be){var Ee=-1,y=be?be.length:0;for(this.clear();++Ee<y;){var gt=be[Ee];this.set(gt[0],gt[1])}}function Me(){this.__data__=[]}function dt(be){var Ee=this.__data__,y=mt(Ee,be);if(y<0)return!1;var gt=Ee.length-1;return y==gt?Ee.pop():fe.call(Ee,y,1),!0}function it(be){var Ee=this.__data__,y=mt(Ee,be);return y<0?void 0:Ee[y][1]}function vt(be){return mt(this.__data__,be)>-1}function Ut(be,Ee){var y=this.__data__,gt=mt(y,be);return gt<0?y.push([be,Ee]):y[gt][1]=Ee,this}We.prototype.clear=Me,We.prototype.delete=dt,We.prototype.get=it,We.prototype.has=vt,We.prototype.set=Ut;function Pe(be){var Ee=-1,y=be?be.length:0;for(this.clear();++Ee<y;){var gt=be[Ee];this.set(gt[0],gt[1])}}function Te(){this.__data__={hash:new Ie,map:new(_e||We),string:new Ie}}function Se(be){return zn(this,be).delete(be)}function Ne(be){return zn(this,be).get(be)}function ut(be){return zn(this,be).has(be)}function rt(be,Ee){return zn(this,be).set(be,Ee),this}Pe.prototype.clear=Te,Pe.prototype.delete=Se,Pe.prototype.get=Ne,Pe.prototype.has=ut,Pe.prototype.set=rt;function mt(be,Ee){for(var y=be.length;y--;)if(oe(be[y][0],Ee))return y;return-1}function Rt(be,Ee){Ee=_n(Ee,be)?[Ee]:Rn(Ee);for(var y=0,gt=Ee.length;be!=null&&y<gt;)be=be[In(Ee[y++])];return y&&y==gt?be:void 0}function Bt(be){if(!ue(be)||dn(be))return!1;var Ee=ne(be)||F(be)?le:v;return Ee.test(It(be))}function $t(be){if(typeof be=="string")return be;if(Ue(be))return je?je.call(be):"";var Ee=be+"";return Ee=="0"&&1/be==-1/0?"-0":Ee}function Rn(be){return J(be)?be:li(be)}function zn(be,Ee){var y=be.__data__;return Bn(Ee)?y[typeof Ee=="string"?"string":"hash"]:y.map}function ai(be,Ee){var y=P(be,Ee);return Bt(y)?y:void 0}function _n(be,Ee){if(J(be))return!1;var y=typeof be;return y=="number"||y=="symbol"||y=="boolean"||be==null||Ue(be)?!0:s.test(be)||!o.test(be)||Ee!=null&&be in Object(Ee)}function Bn(be){var Ee=typeof be;return Ee=="string"||Ee=="number"||Ee=="symbol"||Ee=="boolean"?be!=="__proto__":be===null}function dn(be){return!!G&&G in be}var li=xe(function(be){be=He(be);var Ee=[];return a.test(be)&&Ee.push(""),be.replace(c,function(y,gt,Mt,Dt){Ee.push(Mt?Dt.replace(m,"$1"):gt||y)}),Ee});function In(be){if(typeof be=="string"||Ue(be))return be;var Ee=be+"";return Ee=="0"&&1/be==-1/0?"-0":Ee}function It(be){if(be!=null){try{return Y.call(be)}catch{}try{return be+""}catch{}}return""}function xe(be,Ee){if(typeof be!="function"||Ee&&typeof Ee!="function")throw new TypeError(n);var y=function(){var gt=arguments,Mt=Ee?Ee.apply(this,gt):gt[0],Dt=y.cache;if(Dt.has(Mt))return Dt.get(Mt);var ot=be.apply(this,gt);return y.cache=Dt.set(Mt,ot),ot};return y.cache=new(xe.Cache||Pe),y}xe.Cache=Pe;function oe(be,Ee){return be===Ee||be!==be&&Ee!==Ee}var J=Array.isArray;function ne(be){var Ee=ue(be)?se.call(be):"";return Ee==t||Ee==i}function ue(be){var Ee=typeof be;return!!be&&(Ee=="object"||Ee=="function")}function Ce(be){return!!be&&typeof be=="object"}function Ue(be){return typeof be=="symbol"||Ce(be)&&se.call(be)==r}function He(be){return be==null?"":$t(be)}function lt(be,Ee,y){var gt=be==null?void 0:Rt(be,Ee);return gt===void 0?y:gt}return tO=lt,tO}var due=hue();const fue=Wl(due);var C2={exports:{}};/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/var pue=C2.exports,hF;function mue(){return hF||(hF=1,(function(n,e){(function(){var t,i="4.17.21",r=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",A=500,m="__lodash_placeholder__",v=1,x=2,_=4,O=1,P=2,F=1,j=2,Q=4,V=8,H=16,G=32,Y=64,z=128,se=256,le=512,me=30,fe="...",_e=800,we=16,ke=1,je=2,Ie=3,Qe=1/0,tt=9007199254740991,ht=17976931348623157e292,ce=NaN,Le=4294967295,We=Le-1,Me=Le>>>1,dt=[["ary",z],["bind",F],["bindKey",j],["curry",V],["curryRight",H],["flip",le],["partial",G],["partialRight",Y],["rearg",se]],it="[object Arguments]",vt="[object Array]",Ut="[object AsyncFunction]",Pe="[object Boolean]",Te="[object Date]",Se="[object DOMException]",Ne="[object Error]",ut="[object Function]",rt="[object GeneratorFunction]",mt="[object Map]",Rt="[object Number]",Bt="[object Null]",$t="[object Object]",Rn="[object Promise]",zn="[object Proxy]",ai="[object RegExp]",_n="[object Set]",Bn="[object String]",dn="[object Symbol]",li="[object Undefined]",In="[object WeakMap]",It="[object WeakSet]",xe="[object ArrayBuffer]",oe="[object DataView]",J="[object Float32Array]",ne="[object Float64Array]",ue="[object Int8Array]",Ce="[object Int16Array]",Ue="[object Int32Array]",He="[object Uint8Array]",lt="[object Uint8ClampedArray]",be="[object Uint16Array]",Ee="[object Uint32Array]",y=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,Mt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Dt=/&(?:amp|lt|gt|quot|#39);/g,ot=/[&<>"']/g,bn=RegExp(Dt.source),Gn=RegExp(ot.source),yn=/<%-([\s\S]+?)%>/g,qn=/<%([\s\S]+?)%>/g,$n=/<%=([\s\S]+?)%>/g,mi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ir=/^\w*$/,di=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vn=/[\\^$.*+?()[\]{}|]/g,Fn=RegExp(Vn.source),Ti=/^\s+/,on=/\s/,qr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Di=/\{\n\/\* \[wrapped with (.+)\] \*/,js=/,? & /,ea=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Pn=/[()=,{}\[\]\/\s]/,Gi=/\\(\\)?/g,Li=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xi=/\w*$/,Oa=/^[-+]0x[0-9a-f]+$/i,lo=/^0b[01]+$/i,Fi=/^\[object .+?Constructor\]$/,Cl=/^0o[0-7]+$/i,ra=/^(?:0|[1-9]\d*)$/,uo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Fa=/($^)/,Fu=/['\n\r\u2028\u2029\\]/g,So="\\ud800-\\udfff",AA="\\u0300-\\u036f",ta="\\ufe20-\\ufe2f",xr="\\u20d0-\\u20ff",Xa=AA+ta+xr,cl="\\u2700-\\u27bf",Bs="a-z\\xdf-\\xf6\\xf8-\\xff",fa="\\xac\\xb1\\xd7\\xf7",_l="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",zc="\\u2000-\\u206f",Ah=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",hA="A-Z\\xc0-\\xd6\\xd8-\\xde",Ns="\\ufe0e\\ufe0f",xl=fa+_l+zc+Ah,jc="[']",Ja="["+So+"]",Nc="["+xl+"]",Al="["+Xa+"]",zu="\\d+",Ba="["+cl+"]",lc="["+Bs+"]",uu="[^"+So+xl+zu+cl+Bs+hA+"]",Ml="\\ud83c[\\udffb-\\udfff]",cu="(?:"+Al+"|"+Ml+")",zA="[^"+So+"]",Ia="(?:\\ud83c[\\udde6-\\uddff]){2}",jo="[\\ud800-\\udbff][\\udc00-\\udfff]",xo="["+hA+"]",Wi="\\u200d",Ql="(?:"+lc+"|"+uu+")",Fo="(?:"+xo+"|"+uu+")",wl="(?:"+jc+"(?:d|ll|m|re|s|t|ve))?",Au="(?:"+jc+"(?:D|LL|M|RE|S|T|VE))?",er=cu+"?",Sl="["+Ns+"]?",ju="(?:"+Wi+"(?:"+[zA,Ia,jo].join("|")+")"+Sl+er+")*",Mo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",es="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ls=Sl+er+ju,No="(?:"+[Ba,Ia,jo].join("|")+")"+ls,Go="(?:"+[zA+Al+"?",Al,Ia,jo,Ja].join("|")+")",Mr=RegExp(jc,"g"),El=RegExp(Al,"g"),us=RegExp(Ml+"(?="+Ml+")|"+Go+ls,"g"),bs=RegExp([xo+"?"+lc+"+"+wl+"(?="+[Nc,xo,"$"].join("|")+")",Fo+"+"+Au+"(?="+[Nc,xo+Ql,"$"].join("|")+")",xo+"?"+Ql+"+"+wl,xo+"+"+Au,es,Mo,zu,No].join("|"),"g"),Ro=RegExp("["+Wi+So+Xa+Ns+"]"),gr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,el=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Si=-1,ti={};ti[J]=ti[ne]=ti[ue]=ti[Ce]=ti[Ue]=ti[He]=ti[lt]=ti[be]=ti[Ee]=!0,ti[it]=ti[vt]=ti[xe]=ti[Pe]=ti[oe]=ti[Te]=ti[Ne]=ti[ut]=ti[mt]=ti[Rt]=ti[$t]=ti[ai]=ti[_n]=ti[Bn]=ti[In]=!1;var wr={};wr[it]=wr[vt]=wr[xe]=wr[oe]=wr[Pe]=wr[Te]=wr[J]=wr[ne]=wr[ue]=wr[Ce]=wr[Ue]=wr[mt]=wr[Rt]=wr[$t]=wr[ai]=wr[_n]=wr[Bn]=wr[dn]=wr[He]=wr[lt]=wr[be]=wr[Ee]=!0,wr[Ne]=wr[ut]=wr[In]=!1;var X={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ve={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$e={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},St={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ri=parseFloat,kn=parseInt,xi=typeof window=="object"&&window&&window.Object===Object&&window,Ki=typeof self=="object"&&self&&self.Object===Object&&self,Ri=xi||Ki||Function("return this")(),Ei=e&&!e.nodeType&&e,Or=Ei&&!0&&n&&!n.nodeType&&n,zr=Or&&Or.exports===Ei,ji=zr&&xi.process,Ar=(function(){try{var Pt=Or&&Or.require&&Or.require("util").types;return Pt||ji&&ji.binding&&ji.binding("util")}catch{}})(),jr=Ar&&Ar.isArrayBuffer,Cs=Ar&&Ar.isDate,Sr=Ar&&Ar.isMap,za=Ar&&Ar.isRegExp,uc=Ar&&Ar.isSet,hu=Ar&&Ar.isTypedArray;function Gs(Pt,sn,nn){switch(nn.length){case 0:return Pt.call(sn);case 1:return Pt.call(sn,nn[0]);case 2:return Pt.call(sn,nn[0],nn[1]);case 3:return Pt.call(sn,nn[0],nn[1],nn[2])}return Pt.apply(sn,nn)}function cf(Pt,sn,nn,ui){for(var rr=-1,go=Pt==null?0:Pt.length;++rr<go;){var ka=Pt[rr];sn(ui,ka,nn(ka),Pt)}return ui}function ts(Pt,sn){for(var nn=-1,ui=Pt==null?0:Pt.length;++nn<ui&&sn(Pt[nn],nn,Pt)!==!1;);return Pt}function lp(Pt,sn){for(var nn=Pt==null?0:Pt.length;nn--&&sn(Pt[nn],nn,Pt)!==!1;);return Pt}function Gc(Pt,sn){for(var nn=-1,ui=Pt==null?0:Pt.length;++nn<ui;)if(!sn(Pt[nn],nn,Pt))return!1;return!0}function du(Pt,sn){for(var nn=-1,ui=Pt==null?0:Pt.length,rr=0,go=[];++nn<ui;){var ka=Pt[nn];sn(ka,nn,Pt)&&(go[rr++]=ka)}return go}function hh(Pt,sn){var nn=Pt==null?0:Pt.length;return!!nn&&dh(Pt,sn,0)>-1}function ld(Pt,sn,nn){for(var ui=-1,rr=Pt==null?0:Pt.length;++ui<rr;)if(nn(sn,Pt[ui]))return!0;return!1}function Nr(Pt,sn){for(var nn=-1,ui=Pt==null?0:Pt.length,rr=Array(ui);++nn<ui;)rr[nn]=sn(Pt[nn],nn,Pt);return rr}function dA(Pt,sn){for(var nn=-1,ui=sn.length,rr=Pt.length;++nn<ui;)Pt[rr+nn]=sn[nn];return Pt}function Af(Pt,sn,nn,ui){var rr=-1,go=Pt==null?0:Pt.length;for(ui&&go&&(nn=Pt[++rr]);++rr<go;)nn=sn(nn,Pt[rr],rr,Pt);return nn}function ov(Pt,sn,nn,ui){var rr=Pt==null?0:Pt.length;for(ui&&rr&&(nn=Pt[--rr]);rr--;)nn=sn(nn,Pt[rr],rr,Pt);return nn}function up(Pt,sn){for(var nn=-1,ui=Pt==null?0:Pt.length;++nn<ui;)if(sn(Pt[nn],nn,Pt))return!0;return!1}var sv=ud("length");function av(Pt){return Pt.split("")}function Mm(Pt){return Pt.match(ea)||[]}function wm(Pt,sn,nn){var ui;return nn(Pt,function(rr,go,ka){if(sn(rr,go,ka))return ui=go,!1}),ui}function fA(Pt,sn,nn,ui){for(var rr=Pt.length,go=nn+(ui?1:-1);ui?go--:++go<rr;)if(sn(Pt[go],go,Pt))return go;return-1}function dh(Pt,sn,nn){return sn===sn?Jg(Pt,sn,nn):fA(Pt,Ol,nn)}function hf(Pt,sn,nn,ui){for(var rr=nn-1,go=Pt.length;++rr<go;)if(ui(Pt[rr],sn))return rr;return-1}function Ol(Pt){return Pt!==Pt}function u1(Pt,sn){var nn=Pt==null?0:Pt.length;return nn?Ad(Pt,sn)/nn:ce}function ud(Pt){return function(sn){return sn==null?t:sn[Pt]}}function fh(Pt){return function(sn){return Pt==null?t:Pt[sn]}}function cd(Pt,sn,nn,ui,rr){return rr(Pt,function(go,ka,yo){nn=ui?(ui=!1,go):sn(nn,go,ka,yo)}),nn}function c1(Pt,sn){var nn=Pt.length;for(Pt.sort(sn);nn--;)Pt[nn]=Pt[nn].value;return Pt}function Ad(Pt,sn){for(var nn,ui=-1,rr=Pt.length;++ui<rr;){var go=sn(Pt[ui]);go!==t&&(nn=nn===t?go:nn+go)}return nn}function ph(Pt,sn){for(var nn=-1,ui=Array(Pt);++nn<Pt;)ui[nn]=sn(nn);return ui}function hd(Pt,sn){return Nr(sn,function(nn){return[nn,Pt[nn]]})}function Hg(Pt){return Pt&&Pt.slice(0,Qc(Pt)+1).replace(Ti,"")}function ql(Pt){return function(sn){return Pt(sn)}}function Sm(Pt,sn){return Nr(sn,function(nn){return Pt[nn]})}function dd(Pt,sn){return Pt.has(sn)}function mh(Pt,sn){for(var nn=-1,ui=Pt.length;++nn<ui&&dh(sn,Pt[nn],0)>-1;);return nn}function fd(Pt,sn){for(var nn=Pt.length;nn--&&dh(sn,Pt[nn],0)>-1;);return nn}function Em(Pt,sn){for(var nn=Pt.length,ui=0;nn--;)Pt[nn]===sn&&++ui;return ui}var cp=fh(X),Zg=fh(ve);function gh(Pt){return"\\"+St[Pt]}function Ap(Pt,sn){return Pt==null?t:Pt[sn]}function pA(Pt){return Ro.test(Pt)}function df(Pt){return gr.test(Pt)}function A1(Pt){for(var sn,nn=[];!(sn=Pt.next()).done;)nn.push(sn.value);return nn}function yh(Pt){var sn=-1,nn=Array(Pt.size);return Pt.forEach(function(ui,rr){nn[++sn]=[rr,ui]}),nn}function Xg(Pt,sn){return function(nn){return Pt(sn(nn))}}function vh(Pt,sn){for(var nn=-1,ui=Pt.length,rr=0,go=[];++nn<ui;){var ka=Pt[nn];(ka===sn||ka===m)&&(Pt[nn]=m,go[rr++]=nn)}return go}function hp(Pt){var sn=-1,nn=Array(Pt.size);return Pt.forEach(function(ui){nn[++sn]=ui}),nn}function h1(Pt){var sn=-1,nn=Array(Pt.size);return Pt.forEach(function(ui){nn[++sn]=[ui,ui]}),nn}function Jg(Pt,sn,nn){for(var ui=nn-1,rr=Pt.length;++ui<rr;)if(Pt[ui]===sn)return ui;return-1}function Yl(Pt,sn,nn){for(var ui=nn+1;ui--;)if(Pt[ui]===sn)return ui;return ui}function Wc(Pt){return pA(Pt)?Om(Pt):sv(Pt)}function $l(Pt){return pA(Pt)?dp(Pt):av(Pt)}function Qc(Pt){for(var sn=Pt.length;sn--&&on.test(Pt.charAt(sn)););return sn}var co=fh($e);function Om(Pt){for(var sn=us.lastIndex=0;us.test(Pt);)++sn;return sn}function dp(Pt){return Pt.match(us)||[]}function d1(Pt){return Pt.match(bs)||[]}var bh=(function Pt(sn){sn=sn==null?Ri:fu.defaults(Ri.Object(),sn,fu.pick(Ri,el));var nn=sn.Array,ui=sn.Date,rr=sn.Error,go=sn.Function,ka=sn.Math,yo=sn.Object,pd=sn.RegExp,fp=sn.String,Bl=sn.TypeError,ff=nn.prototype,md=go.prototype,mA=yo.prototype,gA=sn["__core-js_shared__"],Il=md.toString,Eo=mA.hasOwnProperty,cc=0,pp=(function(){var w=/[^.]+$/.exec(gA&&gA.keys&&gA.keys.IE_PROTO||"");return w?"Symbol(src)_1."+w:""})(),pa=mA.toString,Vl=Il.call(yo),jA=Ri._,gd=pd("^"+Il.call(Eo).replace(Vn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yA=zr?sn.Buffer:t,Ac=sn.Symbol,qc=sn.Uint8Array,pu=yA?yA.allocUnsafe:t,pf=Xg(yo.getPrototypeOf,yo),yd=yo.create,fr=mA.propertyIsEnumerable,Ch=ff.splice,mu=Ac?Ac.isConcatSpreadable:t,_h=Ac?Ac.iterator:t,oa=Ac?Ac.toStringTag:t,mf=(function(){try{var w=Ef(yo,"defineProperty");return w({},"",{}),w}catch{}})(),Bm=sn.clearTimeout!==Ri.clearTimeout&&sn.clearTimeout,xh=ui&&ui.now!==Ri.Date.now&&ui.now,e0=sn.setTimeout!==Ri.setTimeout&&sn.setTimeout,Mh=ka.ceil,hc=ka.floor,dc=yo.getOwnPropertySymbols,wh=yA?yA.isBuffer:t,vd=sn.isFinite,Nu=ff.join,kl=Xg(yo.keys,yo),Wo=ka.max,ns=ka.min,fc=ui.now,NA=sn.parseInt,GA=ka.random,mp=ff.reverse,Sh=Ef(sn,"DataView"),Is=Ef(sn,"Map"),_s=Ef(sn,"Promise"),Vr=Ef(sn,"Set"),pc=Ef(sn,"WeakMap"),hl=Ef(yo,"create"),Eh=pc&&new pc,mc={},Im=eA(Sh),Ws=eA(Is),gu=eA(_s),Tl=eA(Vr),gp=eA(pc),gc=Ac?Ac.prototype:t,Oh=gc?gc.valueOf:t,yu=gc?gc.toString:t;function qe(w){if(fs(w)&&!yr(w)&&!(w instanceof Gr)){if(w instanceof Hl)return w;if(Eo.call(w,"__wrapped__"))return Wr(w)}return new Hl(w)}var ma=(function(){function w(){}return function(R){if(!Es(R))return{};if(yd)return yd(R);w.prototype=R;var $=new w;return w.prototype=t,$}})();function vu(){}function Hl(w,R){this.__wrapped__=w,this.__actions__=[],this.__chain__=!!R,this.__index__=0,this.__values__=t}qe.templateSettings={escape:yn,evaluate:qn,interpolate:$n,variable:"",imports:{_:qe}},qe.prototype=vu.prototype,qe.prototype.constructor=qe,Hl.prototype=ma(vu.prototype),Hl.prototype.constructor=Hl;function Gr(w){this.__wrapped__=w,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Le,this.__views__=[]}function gf(){var w=new Gr(this.__wrapped__);return w.__actions__=Kr(this.__actions__),w.__dir__=this.__dir__,w.__filtered__=this.__filtered__,w.__iteratees__=Kr(this.__iteratees__),w.__takeCount__=this.__takeCount__,w.__views__=Kr(this.__views__),w}function yp(){if(this.__filtered__){var w=new Gr(this);w.__dir__=-1,w.__filtered__=!0}else w=this.clone(),w.__dir__*=-1;return w}function Bh(){var w=this.__wrapped__.value(),R=this.__dir__,$=yr(w),de=R<0,ze=$?w.length:0,Je=w1(0,ze,this.__views__),Ct=Je.start,kt=Je.end,zt=kt-Ct,Cn=de?kt:Ct-1,xn=this.__iteratees__,Ln=xn.length,gi=0,Zi=ns(zt,this.__takeCount__);if(!$||!de&&ze==zt&&Zi==zt)return cs(w,this.__actions__);var vr=[];e:for(;zt--&&gi<Zi;){Cn+=R;for(var vo=-1,br=w[Cn];++vo<Ln;){var Uo=xn[vo],Vo=Uo.iteratee,Nd=Uo.type,nh=Vo(br);if(Nd==je)br=nh;else if(!nh){if(Nd==ke)continue e;break e}}vr[gi++]=br}return vr}Gr.prototype=ma(vu.prototype),Gr.prototype.constructor=Gr;function Oo(w){var R=-1,$=w==null?0:w.length;for(this.clear();++R<$;){var de=w[R];this.set(de[0],de[1])}}function WA(){this.__data__=hl?hl(null):{},this.size=0}function Zl(w){var R=this.has(w)&&delete this.__data__[w];return this.size-=R?1:0,R}function yf(w){var R=this.__data__;if(hl){var $=R[w];return $===c?t:$}return Eo.call(R,w)?R[w]:t}function t0(w){var R=this.__data__;return hl?R[w]!==t:Eo.call(R,w)}function f1(w,R){var $=this.__data__;return this.size+=this.has(w)?0:1,$[w]=hl&&R===t?c:R,this}Oo.prototype.clear=WA,Oo.prototype.delete=Zl,Oo.prototype.get=yf,Oo.prototype.has=t0,Oo.prototype.set=f1;function is(w){var R=-1,$=w==null?0:w.length;for(this.clear();++R<$;){var de=w[R];this.set(de[0],de[1])}}function Ih(){this.__data__=[],this.size=0}function bd(w){var R=this.__data__,$=qA(R,w);if($<0)return!1;var de=R.length-1;return $==de?R.pop():Ch.call(R,$,1),--this.size,!0}function vA(w){var R=this.__data__,$=qA(R,w);return $<0?t:R[$][1]}function km(w){return qA(this.__data__,w)>-1}function ja(w,R){var $=this.__data__,de=qA($,w);return de<0?(++this.size,$.push([w,R])):$[de][1]=R,this}is.prototype.clear=Ih,is.prototype.delete=bd,is.prototype.get=vA,is.prototype.has=km,is.prototype.set=ja;function Qs(w){var R=-1,$=w==null?0:w.length;for(this.clear();++R<$;){var de=w[R];this.set(de[0],de[1])}}function vf(){this.size=0,this.__data__={hash:new Oo,map:new(Is||is),string:new Oo}}function yc(w){var R=Ep(this,w).delete(w);return this.size-=R?1:0,R}function bf(w){return Ep(this,w).get(w)}function p1(w){return Ep(this,w).has(w)}function Yc(w,R){var $=Ep(this,w),de=$.size;return $.set(w,R),this.size+=$.size==de?0:1,this}Qs.prototype.clear=vf,Qs.prototype.delete=yc,Qs.prototype.get=bf,Qs.prototype.has=p1,Qs.prototype.set=Yc;function QA(w){var R=-1,$=w==null?0:w.length;for(this.__data__=new Qs;++R<$;)this.add(w[R])}function Tm(w){return this.__data__.set(w,c),this}function Cf(w){return this.__data__.has(w)}QA.prototype.add=QA.prototype.push=Tm,QA.prototype.has=Cf;function Na(w){var R=this.__data__=new is(w);this.size=R.size}function vc(){this.__data__=new is,this.size=0}function Xn(w){var R=this.__data__,$=R.delete(w);return this.size=R.size,$}function vp(w){return this.__data__.get(w)}function bp(w){return this.__data__.has(w)}function _f(w,R){var $=this.__data__;if($ instanceof is){var de=$.__data__;if(!Is||de.length<r-1)return de.push([w,R]),this.size=++$.size,this;$=this.__data__=new Qs(de)}return $.set(w,R),this.size=$.size,this}Na.prototype.clear=vc,Na.prototype.delete=Xn,Na.prototype.get=vp,Na.prototype.has=bp,Na.prototype.set=_f;function kh(w,R){var $=yr(w),de=!$&&Kd(w),ze=!$&&!de&&Ld(w),Je=!$&&!de&&!ze&&Np(w),Ct=$||de||ze||Je,kt=Ct?ph(w.length,fp):[],zt=kt.length;for(var Cn in w)(R||Eo.call(w,Cn))&&!(Ct&&(Cn=="length"||ze&&(Cn=="offset"||Cn=="parent")||Je&&(Cn=="buffer"||Cn=="byteLength"||Cn=="byteOffset")||wA(Cn,zt)))&&kt.push(Cn);return kt}function bc(w){var R=w.length;return R?w[Ze(0,R-1)]:t}function Cp(w,R){return kp(Kr(w),Cc(R,0,w.length))}function Ur(w){return kp(Kr(w))}function Gu(w,R,$){($!==t&&!Ic(w[R],$)||$===t&&!(R in w))&&Wu(w,R,$)}function Cd(w,R,$){var de=w[R];(!(Eo.call(w,R)&&Ic(de,$))||$===t&&!(R in w))&&Wu(w,R,$)}function qA(w,R){for(var $=w.length;$--;)if(Ic(w[$][0],R))return $;return-1}function Th(w,R,$,de){return $c(w,function(ze,Je,Ct){R(de,ze,$(ze),Ct)}),de}function bA(w,R){return w&&Bo(R,b(R),w)}function _d(w,R){return w&&Bo(R,S(R),w)}function Wu(w,R,$){R=="__proto__"&&mf?mf(w,R,{configurable:!0,enumerable:!0,value:$,writable:!0}):w[R]=$}function xf(w,R){for(var $=-1,de=R.length,ze=nn(de),Je=w==null;++$<de;)ze[$]=Je?t:Qp(w,R[$]);return ze}function Cc(w,R,$){return w===w&&($!==t&&(w=w<=$?w:$),R!==t&&(w=w>=R?w:R)),w}function tl(w,R,$,de,ze,Je){var Ct,kt=R&v,zt=R&x,Cn=R&_;if($&&(Ct=ze?$(w,de,ze,Je):$(w)),Ct!==t)return Ct;if(!Es(w))return w;var xn=yr(w);if(xn){if(Ct=Bp(w),!kt)return Kr(w,Ct)}else{var Ln=Pl(w),gi=Ln==ut||Ln==rt;if(Ld(w))return $u(w,kt);if(Ln==$t||Ln==it||gi&&!ze){if(Ct=zt||gi?{}:eu(w),!kt)return zt?la(w,_d(Ct,w)):Dl(w,bA(Ct,w))}else{if(!wr[Ln])return ze?w:{};Ct=E1(w,Ln,kt)}}Je||(Je=new Na);var Zi=Je.get(w);if(Zi)return Zi;Je.set(w,Ct),yC(w)?w.forEach(function(br){Ct.add(tl(br,R,$,br,w,Je))}):M0(w)&&w.forEach(function(br,Uo){Ct.set(Uo,tl(br,R,$,Uo,w,Je))});var vr=Cn?zt?x1:_1:zt?S:b,vo=xn?t:vr(w);return ts(vo||w,function(br,Uo){vo&&(Uo=br,br=w[Uo]),Cd(Ct,Uo,tl(br,R,$,Uo,w,Je))}),Ct}function n0(w){var R=b(w);return function($){return Rm($,w,R)}}function Rm(w,R,$){var de=$.length;if(w==null)return!de;for(w=yo(w);de--;){var ze=$[de],Je=R[ze],Ct=w[ze];if(Ct===t&&!(ze in w)||!Je(Ct))return!1}return!0}function dl(w,R,$){if(typeof w!="function")throw new Bl(s);return Lm(function(){w.apply(t,$)},R)}function Ao(w,R,$,de){var ze=-1,Je=hh,Ct=!0,kt=w.length,zt=[],Cn=R.length;if(!kt)return zt;$&&(R=Nr(R,ql($))),de?(Je=ld,Ct=!1):R.length>=r&&(Je=dd,Ct=!1,R=new QA(R));e:for(;++ze<kt;){var xn=w[ze],Ln=$==null?xn:$(xn);if(xn=de||xn!==0?xn:0,Ct&&Ln===Ln){for(var gi=Cn;gi--;)if(R[gi]===Ln)continue e;zt.push(xn)}else Je(R,Ln,de)||zt.push(xn)}return zt}var $c=Rh(Jn),xd=Rh(Pi,!0);function _p(w,R){var $=!0;return $c(w,function(de,ze,Je){return $=!!R(de,ze,Je),$}),$}function Qu(w,R,$){for(var de=-1,ze=w.length;++de<ze;){var Je=w[de],Ct=R(Je);if(Ct!=null&&(kt===t?Ct===Ct&&!Ou(Ct):$(Ct,kt)))var kt=Ct,zt=Je}return zt}function kr(w,R,$,de){var ze=w.length;for($=Br($),$<0&&($=-$>ze?0:ze+$),de=de===t||de>ze?ze:Br(de),de<0&&(de+=ze),de=$>de?0:Zu(de);$<de;)w[$++]=R;return w}function Do(w,R){var $=[];return $c(w,function(de,ze,Je){R(de,ze,Je)&&$.push(de)}),$}function no(w,R,$,de,ze){var Je=-1,Ct=w.length;for($||($=Bd),ze||(ze=[]);++Je<Ct;){var kt=w[Je];R>0&&$(kt)?R>1?no(kt,R-1,$,de,ze):dA(ze,kt):de||(ze[ze.length]=kt)}return ze}var Xl=Jl(),CA=Jl(!0);function Jn(w,R){return w&&Xl(w,R,b)}function Pi(w,R){return w&&CA(w,R,b)}function Rl(w,R){return du(R,function($){return EA(w[$])})}function bu(w,R){R=qo(R,w);for(var $=0,de=R.length;w!=null&&$<de;)w=w[Yo(R[$++])];return $&&$==de?w:t}function xp(w,R,$){var de=R(w);return yr(w)?de:dA(de,$(w))}function or(w){return w==null?w===t?li:Bt:oa&&oa in yo(w)?Vb(w):lv(w)}function Md(w,R){return w>R}function qu(w,R){return w!=null&&Eo.call(w,R)}function m1(w,R){return w!=null&&R in yo(w)}function _c(w,R,$){return w>=ns(R,$)&&w<Wo(R,$)}function xs(w,R,$){for(var de=$?ld:hh,ze=w[0].length,Je=w.length,Ct=Je,kt=nn(Je),zt=1/0,Cn=[];Ct--;){var xn=w[Ct];Ct&&R&&(xn=Nr(xn,ql(R))),zt=ns(xn.length,zt),kt[Ct]=!$&&(R||ze>=120&&xn.length>=120)?new QA(Ct&&xn):t}xn=w[0];var Ln=-1,gi=kt[0];e:for(;++Ln<ze&&Cn.length<zt;){var Zi=xn[Ln],vr=R?R(Zi):Zi;if(Zi=$||Zi!==0?Zi:0,!(gi?dd(gi,vr):de(Cn,vr,$))){for(Ct=Je;--Ct;){var vo=kt[Ct];if(!(vo?dd(vo,vr):de(w[Ct],vr,$)))continue e}gi&&gi.push(vr),Cn.push(Zi)}}return Cn}function ks(w,R,$,de){return Jn(w,function(ze,Je,Ct){R(de,$(ze),Je,Ct)}),de}function YA(w,R,$){R=qo(R,w),w=Kh(w,R);var de=w==null?w:w[Yo(wu(R))];return de==null?t:Gs(de,w,$)}function _A(w){return fs(w)&&or(w)==it}function fl(w){return fs(w)&&or(w)==xe}function Ts(w){return fs(w)&&or(w)==Te}function Yu(w,R,$,de,ze){return w===R?!0:w==null||R==null||!fs(w)&&!fs(R)?w!==w&&R!==R:wd(w,R,$,de,Yu,ze)}function wd(w,R,$,de,ze,Je){var Ct=yr(w),kt=yr(R),zt=Ct?vt:Pl(w),Cn=kt?vt:Pl(R);zt=zt==it?$t:zt,Cn=Cn==it?$t:Cn;var xn=zt==$t,Ln=Cn==$t,gi=zt==Cn;if(gi&&Ld(w)){if(!Ld(R))return!1;Ct=!0,xn=!1}if(gi&&!xn)return Je||(Je=new Na),Ct||Np(w)?$b(w,R,$,de,ze,Je):Sp(w,R,zt,$,de,ze,Je);if(!($&O)){var Zi=xn&&Eo.call(w,"__wrapped__"),vr=Ln&&Eo.call(R,"__wrapped__");if(Zi||vr){var vo=Zi?w.value():w,br=vr?R.value():R;return Je||(Je=new Na),ze(vo,br,$,de,Je)}}return gi?(Je||(Je=new Na),Qa(w,R,$,de,ze,Je)):!1}function $A(w){return fs(w)&&Pl(w)==mt}function Vc(w,R,$,de){var ze=$.length,Je=ze,Ct=!de;if(w==null)return!Je;for(w=yo(w);ze--;){var kt=$[ze];if(Ct&&kt[2]?kt[1]!==w[kt[0]]:!(kt[0]in w))return!1}for(;++ze<Je;){kt=$[ze];var zt=kt[0],Cn=w[zt],xn=kt[1];if(Ct&&kt[2]){if(Cn===t&&!(zt in w))return!1}else{var Ln=new Na;if(de)var gi=de(Cn,xn,zt,w,R,Ln);if(!(gi===t?Yu(xn,Cn,O|P,de,Ln):gi))return!1}}return!0}function xc(w){if(!Es(w)||Um(w))return!1;var R=EA(w)?gd:Fi;return R.test(eA(w))}function Mf(w){return fs(w)&&or(w)==ai}function wf(w){return fs(w)&&Pl(w)==_n}function Mp(w){return fs(w)&&OA(w.length)&&!!ti[or(w)]}function B(w){return typeof w=="function"?w:w==null?Yt:typeof w=="object"?yr(w)?U(w[0],w[1]):T(w):Po(w)}function l(w){if(!Ss(w))return kl(w);var R=[];for(var $ in yo(w))Eo.call(w,$)&&$!="constructor"&&R.push($);return R}function p(w){if(!Es(w))return Uh(w);var R=Ss(w),$=[];for(var de in w)de=="constructor"&&(R||!Eo.call(w,de))||$.push(de);return $}function C(w,R){return w<R}function E(w,R){var $=-1,de=Ys(w)?nn(w.length):[];return $c(w,function(ze,Je,Ct){de[++$]=R(ze,Je,Ct)}),de}function T(w){var R=l0(w);return R.length==1&&R[0][2]?Zb(R[0][0],R[0][1]):function($){return $===w||Vc($,w,R)}}function U(w,R){return B1(w)&&Hb(R)?Zb(Yo(w),R):function($){var de=Qp($,w);return de===t&&de===R?og($,w):Yu(R,de,O|P)}}function q(w,R,$,de,ze){w!==R&&Xl(R,function(Je,Ct){if(ze||(ze=new Na),Es(Je))Z(w,R,Ct,$,q,de,ze);else{var kt=de?de(k1(w,Ct),Je,Ct+"",w,R,ze):t;kt===t&&(kt=Je),Gu(w,Ct,kt)}},S)}function Z(w,R,$,de,ze,Je,Ct){var kt=k1(w,$),zt=k1(R,$),Cn=Ct.get(zt);if(Cn){Gu(w,$,Cn);return}var xn=Je?Je(kt,zt,$+"",w,R,Ct):t,Ln=xn===t;if(Ln){var gi=yr(zt),Zi=!gi&&Ld(zt),vr=!gi&&!Zi&&Np(zt);xn=zt,gi||Zi||vr?yr(kt)?xn=kt:ya(kt)?xn=Kr(kt):Zi?(Ln=!1,xn=$u(zt,!0)):vr?(Ln=!1,xn=Hc(zt,!0)):xn=[]:iA(zt)||Kd(zt)?(xn=kt,Kd(kt)?xn=ty(kt):(!Es(kt)||EA(kt))&&(xn=eu(zt))):Ln=!1}Ln&&(Ct.set(zt,xn),ze(xn,zt,de,Je,Ct),Ct.delete(zt)),Gu(w,$,xn)}function ae(w,R){var $=w.length;if($)return R+=R<0?$:0,wA(R,$)?w[R]:t}function Ae(w,R,$){R.length?R=Nr(R,function(Je){return yr(Je)?function(Ct){return bu(Ct,Je.length===1?Je[0]:Je)}:Je}):R=[Yt];var de=-1;R=Nr(R,ql(Hi()));var ze=E(w,function(Je,Ct,kt){var zt=Nr(R,function(Cn){return Cn(Je)});return{criteria:zt,index:++de,value:Je}});return c1(ze,function(Je,Ct){return Zc(Je,Ct,$)})}function ye(w,R){return pe(w,R,function($,de){return og(w,de)})}function pe(w,R,$){for(var de=-1,ze=R.length,Je={};++de<ze;){var Ct=R[de],kt=bu(w,Ct);$(kt,Ct)&&xt(Je,qo(Ct,w),kt)}return Je}function Be(w){return function(R){return bu(R,w)}}function Fe(w,R,$,de){var ze=de?hf:dh,Je=-1,Ct=R.length,kt=w;for(w===R&&(R=Kr(R)),$&&(kt=Nr(w,ql($)));++Je<Ct;)for(var zt=0,Cn=R[Je],xn=$?$(Cn):Cn;(zt=ze(kt,xn,zt,de))>-1;)kt!==w&&Ch.call(kt,zt,1),Ch.call(w,zt,1);return w}function Xe(w,R){for(var $=w?R.length:0,de=$-1;$--;){var ze=R[$];if($==de||ze!==Je){var Je=ze;wA(ze)?Ch.call(w,ze,1):Yr(w,ze)}}return w}function Ze(w,R){return w+hc(GA()*(R-w+1))}function et(w,R,$,de){for(var ze=-1,Je=Wo(Mh((R-w)/($||1)),0),Ct=nn(Je);Je--;)Ct[de?Je:++ze]=w,w+=$;return Ct}function st(w,R){var $="";if(!w||R<1||R>tt)return $;do R%2&&($+=w),R=hc(R/2),R&&(w+=w);while(R);return $}function nt(w,R){return c0(Id(w,R,Yt),w+"")}function ct(w){return bc(Jt(w))}function yt(w,R){var $=Jt(w);return kp($,Cc(R,0,$.length))}function xt(w,R,$,de){if(!Es(w))return w;R=qo(R,w);for(var ze=-1,Je=R.length,Ct=Je-1,kt=w;kt!=null&&++ze<Je;){var zt=Yo(R[ze]),Cn=$;if(zt==="__proto__"||zt==="constructor"||zt==="prototype")return w;if(ze!=Ct){var xn=kt[zt];Cn=de?de(xn,zt,kt):t,Cn===t&&(Cn=Es(xn)?xn:wA(R[ze+1])?[]:{})}Cd(kt,zt,Cn),kt=kt[zt]}return w}var At=Eh?function(w,R){return Eh.set(w,R),w}:Yt,Ot=mf?function(w,R){return mf(w,"toString",{configurable:!0,enumerable:!1,value:Gt(R),writable:!0})}:Yt;function Vt(w){return kp(Jt(w))}function Kt(w,R,$){var de=-1,ze=w.length;R<0&&(R=-R>ze?0:ze+R),$=$>ze?ze:$,$<0&&($+=ze),ze=R>$?0:$-R>>>0,R>>>=0;for(var Je=nn(ze);++de<ze;)Je[de]=w[de+R];return Je}function jt(w,R){var $;return $c(w,function(de,ze,Je){return $=R(de,ze,Je),!$}),!!$}function qt(w,R,$){var de=0,ze=w==null?de:w.length;if(typeof R=="number"&&R===R&&ze<=Me){for(;de<ze;){var Je=de+ze>>>1,Ct=w[Je];Ct!==null&&!Ou(Ct)&&($?Ct<=R:Ct<R)?de=Je+1:ze=Je}return ze}return Kn(w,R,Yt,$)}function Kn(w,R,$,de){var ze=0,Je=w==null?0:w.length;if(Je===0)return 0;R=$(R);for(var Ct=R!==R,kt=R===null,zt=Ou(R),Cn=R===t;ze<Je;){var xn=hc((ze+Je)/2),Ln=$(w[xn]),gi=Ln!==t,Zi=Ln===null,vr=Ln===Ln,vo=Ou(Ln);if(Ct)var br=de||vr;else Cn?br=vr&&(de||gi):kt?br=vr&&gi&&(de||!Zi):zt?br=vr&&gi&&!Zi&&(de||!vo):Zi||vo?br=!1:br=de?Ln<=R:Ln<R;br?ze=xn+1:Je=xn}return ns(Je,We)}function On(w,R){for(var $=-1,de=w.length,ze=0,Je=[];++$<de;){var Ct=w[$],kt=R?R(Ct):Ct;if(!$||!Ic(kt,zt)){var zt=kt;Je[ze++]=Ct===0?0:Ct}}return Je}function un(w){return typeof w=="number"?w:Ou(w)?ce:+w}function ei(w){if(typeof w=="string")return w;if(yr(w))return Nr(w,ei)+"";if(Ou(w))return yu?yu.call(w):"";var R=w+"";return R=="0"&&1/w==-Qe?"-0":R}function Ji(w,R,$){var de=-1,ze=hh,Je=w.length,Ct=!0,kt=[],zt=kt;if($)Ct=!1,ze=ld;else if(Je>=r){var Cn=R?null:b1(w);if(Cn)return hp(Cn);Ct=!1,ze=dd,zt=new QA}else zt=R?[]:kt;e:for(;++de<Je;){var xn=w[de],Ln=R?R(xn):xn;if(xn=$||xn!==0?xn:0,Ct&&Ln===Ln){for(var gi=zt.length;gi--;)if(zt[gi]===Ln)continue e;R&&zt.push(Ln),kt.push(xn)}else ze(zt,Ln,$)||(zt!==kt&&zt.push(Ln),kt.push(xn))}return kt}function Yr(w,R){return R=qo(R,w),w=Kh(w,R),w==null||delete w[Yo(wu(R))]}function Ms(w,R,$,de){return xt(w,R,$(bu(w,R)),de)}function Hr(w,R,$,de){for(var ze=w.length,Je=de?ze:-1;(de?Je--:++Je<ze)&&R(w[Je],Je,w););return $?Kt(w,de?0:Je,de?Je+1:ze):Kt(w,de?Je+1:0,de?ze:Je)}function cs(w,R){var $=w;return $ instanceof Gr&&($=$.value()),Af(R,function(de,ze){return ze.func.apply(ze.thisArg,dA([de],ze.args))},$)}function As(w,R,$){var de=w.length;if(de<2)return de?Ji(w[0]):[];for(var ze=-1,Je=nn(de);++ze<de;)for(var Ct=w[ze],kt=-1;++kt<de;)kt!=ze&&(Je[ze]=Ao(Je[ze]||Ct,w[kt],R,$));return Ji(no(Je,1),R,$)}function Qo(w,R,$){for(var de=-1,ze=w.length,Je=R.length,Ct={};++de<ze;){var kt=de<Je?R[de]:t;$(Ct,w[de],kt)}return Ct}function tr(w){return ya(w)?w:[]}function sa(w){return typeof w=="function"?w:Yt}function qo(w,R){return yr(w)?w:B1(w,R)?[w]:Fh(zo(w))}var Ga=nt;function aa(w,R,$){var de=w.length;return $=$===t?de:$,!R&&$>=de?w:Kt(w,R,$)}var VA=Bm||function(w){return Ri.clearTimeout(w)};function $u(w,R){if(R)return w.slice();var $=w.length,de=pu?pu($):new w.constructor($);return w.copy(de),de}function Cu(w){var R=new w.constructor(w.byteLength);return new qc(R).set(new qc(w)),R}function HA(w,R){var $=R?Cu(w.buffer):w.buffer;return new w.constructor($,w.byteOffset,w.byteLength)}function Sd(w){var R=new w.constructor(w.source,Xi.exec(w));return R.lastIndex=w.lastIndex,R}function Ed(w){return Oh?yo(Oh.call(w)):{}}function Hc(w,R){var $=R?Cu(w.buffer):w.buffer;return new w.constructor($,w.byteOffset,w.length)}function pl(w,R){if(w!==R){var $=w!==t,de=w===null,ze=w===w,Je=Ou(w),Ct=R!==t,kt=R===null,zt=R===R,Cn=Ou(R);if(!kt&&!Cn&&!Je&&w>R||Je&&Ct&&zt&&!kt&&!Cn||de&&Ct&&zt||!$&&zt||!ze)return 1;if(!de&&!Je&&!Cn&&w<R||Cn&&$&&ze&&!de&&!Je||kt&&$&&ze||!Ct&&ze||!zt)return-1}return 0}function Zc(w,R,$){for(var de=-1,ze=w.criteria,Je=R.criteria,Ct=ze.length,kt=$.length;++de<Ct;){var zt=pl(ze[de],Je[de]);if(zt){if(de>=kt)return zt;var Cn=$[de];return zt*(Cn=="desc"?-1:1)}}return w.index-R.index}function Mc(w,R,$,de){for(var ze=-1,Je=w.length,Ct=$.length,kt=-1,zt=R.length,Cn=Wo(Je-Ct,0),xn=nn(zt+Cn),Ln=!de;++kt<zt;)xn[kt]=R[kt];for(;++ze<Ct;)(Ln||ze<Je)&&(xn[$[ze]]=w[ze]);for(;Cn--;)xn[kt++]=w[ze++];return xn}function _u(w,R,$,de){for(var ze=-1,Je=w.length,Ct=-1,kt=$.length,zt=-1,Cn=R.length,xn=Wo(Je-kt,0),Ln=nn(xn+Cn),gi=!de;++ze<xn;)Ln[ze]=w[ze];for(var Zi=ze;++zt<Cn;)Ln[Zi+zt]=R[zt];for(;++Ct<kt;)(gi||ze<Je)&&(Ln[Zi+$[Ct]]=w[ze++]);return Ln}function Kr(w,R){var $=-1,de=w.length;for(R||(R=nn(de));++$<de;)R[$]=w[$];return R}function Bo(w,R,$,de){var ze=!$;$||($={});for(var Je=-1,Ct=R.length;++Je<Ct;){var kt=R[Je],zt=de?de($[kt],w[kt],kt,$,w):t;zt===t&&(zt=w[kt]),ze?Wu($,kt,zt):Cd($,kt,zt)}return $}function Dl(w,R){return Bo(w,Pm(w),R)}function la(w,R){return Bo(w,u0(w),R)}function ZA(w,R){return function($,de){var ze=yr($)?cf:Th,Je=R?R():{};return ze($,w,Hi(de,2),Je)}}function Xc(w){return nt(function(R,$){var de=-1,ze=$.length,Je=ze>1?$[ze-1]:t,Ct=ze>2?$[2]:t;for(Je=w.length>3&&typeof Je=="function"?(ze--,Je):t,Ct&&Hu($[0],$[1],Ct)&&(Je=ze<3?t:Je,ze=1),R=yo(R);++de<ze;){var kt=$[de];kt&&w(R,kt,de,Je)}return R})}function Rh(w,R){return function($,de){if($==null)return $;if(!Ys($))return w($,de);for(var ze=$.length,Je=R?ze:-1,Ct=yo($);(R?Je--:++Je<ze)&&de(Ct[Je],Je,Ct)!==!1;);return $}}function Jl(w){return function(R,$,de){for(var ze=-1,Je=yo(R),Ct=de(R),kt=Ct.length;kt--;){var zt=Ct[w?kt:++ze];if($(Je[zt],zt,Je)===!1)break}return R}}function wc(w,R,$){var de=R&F,ze=Wa(w);function Je(){var Ct=this&&this!==Ri&&this instanceof Je?ze:w;return Ct.apply(de?$:this,arguments)}return Je}function Ta(w){return function(R){R=zo(R);var $=pA(R)?$l(R):t,de=$?$[0]:R.charAt(0),ze=$?aa($,1).join(""):R.slice(1);return de[w]()+ze}}function ua(w){return function(R){return Af(N(Un(R).replace(Mr,"")),w,"")}}function Wa(w){return function(){var R=arguments;switch(R.length){case 0:return new w;case 1:return new w(R[0]);case 2:return new w(R[0],R[1]);case 3:return new w(R[0],R[1],R[2]);case 4:return new w(R[0],R[1],R[2],R[3]);case 5:return new w(R[0],R[1],R[2],R[3],R[4]);case 6:return new w(R[0],R[1],R[2],R[3],R[4],R[5]);case 7:return new w(R[0],R[1],R[2],R[3],R[4],R[5],R[6])}var $=ma(w.prototype),de=w.apply($,R);return Es(de)?de:$}}function i0(w,R,$){var de=Wa(w);function ze(){for(var Je=arguments.length,Ct=nn(Je),kt=Je,zt=Sf(ze);kt--;)Ct[kt]=arguments[kt];var Cn=Je<3&&Ct[0]!==zt&&Ct[Je-1]!==zt?[]:vh(Ct,zt);if(Je-=Cn.length,Je<$)return y1(w,R,qs,ze.placeholder,t,Ct,Cn,t,t,$-Je);var xn=this&&this!==Ri&&this instanceof ze?de:w;return Gs(xn,this,Ct)}return ze}function Jc(w){return function(R,$,de){var ze=yo(R);if(!Ys(R)){var Je=Hi($,3);R=b(R),$=function(kt){return Je(ze[kt],kt,ze)}}var Ct=w(R,$,de);return Ct>-1?ze[Je?R[Ct]:Ct]:t}}function xu(w){return ws(function(R){var $=R.length,de=$,ze=Hl.prototype.thru;for(w&&R.reverse();de--;){var Je=R[de];if(typeof Je!="function")throw new Bl(s);if(ze&&!Ct&&a0(Je)=="wrapper")var Ct=new Hl([],!0)}for(de=Ct?de:$;++de<$;){Je=R[de];var kt=a0(Je),zt=kt=="wrapper"?M1(Je):t;zt&&I1(zt[0])&&zt[1]==(z|V|G|se)&&!zt[4].length&&zt[9]==1?Ct=Ct[a0(zt[0])].apply(Ct,zt[3]):Ct=Je.length==1&&I1(Je)?Ct[kt]():Ct.thru(Je)}return function(){var Cn=arguments,xn=Cn[0];if(Ct&&Cn.length==1&&yr(xn))return Ct.plant(xn).value();for(var Ln=0,gi=$?R[Ln].apply(this,Cn):xn;++Ln<$;)gi=R[Ln].call(this,gi);return gi}})}function qs(w,R,$,de,ze,Je,Ct,kt,zt,Cn){var xn=R&z,Ln=R&F,gi=R&j,Zi=R&(V|H),vr=R&le,vo=gi?t:Wa(w);function br(){for(var Uo=arguments.length,Vo=nn(Uo),Nd=Uo;Nd--;)Vo[Nd]=arguments[Nd];if(Zi)var nh=Sf(br),Gd=Em(Vo,nh);if(de&&(Vo=Mc(Vo,de,ze,Zi)),Je&&(Vo=_u(Vo,Je,Ct,Zi)),Uo-=Gd,Zi&&Uo<Cn){var iu=vh(Vo,nh);return y1(w,R,qs,br.placeholder,$,Vo,iu,kt,zt,Cn-Uo)}var qp=Ln?$:this,T0=gi?qp[w]:w;return Uo=Vo.length,kt?Vo=Lh(Vo,kt):vr&&Uo>1&&Vo.reverse(),xn&&zt<Uo&&(Vo.length=zt),this&&this!==Ri&&this instanceof br&&(T0=vo||Wa(T0)),T0.apply(qp,Vo)}return br}function Vu(w,R){return function($,de){return ks($,w,R(de),{})}}function xA(w,R){return function($,de){var ze;if($===t&&de===t)return R;if($!==t&&(ze=$),de!==t){if(ze===t)return de;typeof $=="string"||typeof de=="string"?($=ei($),de=ei(de)):($=un($),de=un(de)),ze=w($,de)}return ze}}function Dm(w){return ws(function(R){return R=Nr(R,ql(Hi())),nt(function($){var de=this;return w(R,function(ze){return Gs(ze,de,$)})})})}function r0(w,R){R=R===t?" ":ei(R);var $=R.length;if($<2)return $?st(R,w):R;var de=st(R,Mh(w/Wc(R)));return pA(R)?aa($l(de),0,w).join(""):de.slice(0,w)}function g1(w,R,$,de){var ze=R&F,Je=Wa(w);function Ct(){for(var kt=-1,zt=arguments.length,Cn=-1,xn=de.length,Ln=nn(xn+zt),gi=this&&this!==Ri&&this instanceof Ct?Je:w;++Cn<xn;)Ln[Cn]=de[Cn];for(;zt--;)Ln[Cn++]=arguments[++kt];return Gs(gi,ze?$:this,Ln)}return Ct}function Od(w){return function(R,$,de){return de&&typeof de!="number"&&Hu(R,$,de)&&($=de=t),R=Nh(R),$===t?($=R,R=0):$=Nh($),de=de===t?R<$?1:-1:Nh(de),et(R,$,de,w)}}function Dh(w){return function(R,$){return typeof R=="string"&&typeof $=="string"||(R=ps(R),$=ps($)),w(R,$)}}function y1(w,R,$,de,ze,Je,Ct,kt,zt,Cn){var xn=R&V,Ln=xn?Ct:t,gi=xn?t:Ct,Zi=xn?Je:t,vr=xn?t:Je;R|=xn?G:Y,R&=~(xn?Y:G),R&Q||(R&=-4);var vo=[w,R,ze,Zi,Ln,vr,gi,kt,zt,Cn],br=$.apply(t,vo);return I1(w)&&T1(br,vo),br.placeholder=de,R1(br,w,R)}function v1(w){var R=ka[w];return function($,de){if($=ps($),de=de==null?0:ns(Br(de),292),de&&vd($)){var ze=(zo($)+"e").split("e"),Je=R(ze[0]+"e"+(+ze[1]+de));return ze=(zo(Je)+"e").split("e"),+(ze[0]+"e"+(+ze[1]-de))}return R($)}}var b1=Vr&&1/hp(new Vr([,-0]))[1]==Qe?function(w){return new Vr(w)}:Oi;function o0(w){return function(R){var $=Pl(R);return $==mt?yh(R):$==_n?h1(R):hd(R,w(R))}}function MA(w,R,$,de,ze,Je,Ct,kt){var zt=R&j;if(!zt&&typeof w!="function")throw new Bl(s);var Cn=de?de.length:0;if(Cn||(R&=-97,de=ze=t),Ct=Ct===t?Ct:Wo(Br(Ct),0),kt=kt===t?kt:Br(kt),Cn-=ze?ze.length:0,R&Y){var xn=de,Ln=ze;de=ze=t}var gi=zt?t:M1(w),Zi=[w,R,$,de,ze,xn,Ln,Je,Ct,kt];if(gi&&Ip(Zi,gi),w=Zi[0],R=Zi[1],$=Zi[2],de=Zi[3],ze=Zi[4],kt=Zi[9]=Zi[9]===t?zt?0:w.length:Wo(Zi[9]-Cn,0),!kt&&R&(V|H)&&(R&=-25),!R||R==F)var vr=wc(w,R,$);else R==V||R==H?vr=i0(w,R,kt):(R==G||R==(F|G))&&!ze.length?vr=g1(w,R,$,de):vr=qs.apply(t,Zi);var vo=gi?At:T1;return R1(vo(vr,Zi),w,R)}function s0(w,R,$,de){return w===t||Ic(w,mA[$])&&!Eo.call(de,$)?R:w}function C1(w,R,$,de,ze,Je){return Es(w)&&Es(R)&&(Je.set(R,w),q(w,R,t,C1,Je),Je.delete(R)),w}function wp(w){return iA(w)?t:w}function $b(w,R,$,de,ze,Je){var Ct=$&O,kt=w.length,zt=R.length;if(kt!=zt&&!(Ct&&zt>kt))return!1;var Cn=Je.get(w),xn=Je.get(R);if(Cn&&xn)return Cn==R&&xn==w;var Ln=-1,gi=!0,Zi=$&P?new QA:t;for(Je.set(w,R),Je.set(R,w);++Ln<kt;){var vr=w[Ln],vo=R[Ln];if(de)var br=Ct?de(vo,vr,Ln,R,w,Je):de(vr,vo,Ln,w,R,Je);if(br!==t){if(br)continue;gi=!1;break}if(Zi){if(!up(R,function(Uo,Vo){if(!dd(Zi,Vo)&&(vr===Uo||ze(vr,Uo,$,de,Je)))return Zi.push(Vo)})){gi=!1;break}}else if(!(vr===vo||ze(vr,vo,$,de,Je))){gi=!1;break}}return Je.delete(w),Je.delete(R),gi}function Sp(w,R,$,de,ze,Je,Ct){switch($){case oe:if(w.byteLength!=R.byteLength||w.byteOffset!=R.byteOffset)return!1;w=w.buffer,R=R.buffer;case xe:return!(w.byteLength!=R.byteLength||!Je(new qc(w),new qc(R)));case Pe:case Te:case Rt:return Ic(+w,+R);case Ne:return w.name==R.name&&w.message==R.message;case ai:case Bn:return w==R+"";case mt:var kt=yh;case _n:var zt=de&O;if(kt||(kt=hp),w.size!=R.size&&!zt)return!1;var Cn=Ct.get(w);if(Cn)return Cn==R;de|=P,Ct.set(w,R);var xn=$b(kt(w),kt(R),de,ze,Je,Ct);return Ct.delete(w),xn;case dn:if(Oh)return Oh.call(w)==Oh.call(R)}return!1}function Qa(w,R,$,de,ze,Je){var Ct=$&O,kt=_1(w),zt=kt.length,Cn=_1(R),xn=Cn.length;if(zt!=xn&&!Ct)return!1;for(var Ln=zt;Ln--;){var gi=kt[Ln];if(!(Ct?gi in R:Eo.call(R,gi)))return!1}var Zi=Je.get(w),vr=Je.get(R);if(Zi&&vr)return Zi==R&&vr==w;var vo=!0;Je.set(w,R),Je.set(R,w);for(var br=Ct;++Ln<zt;){gi=kt[Ln];var Uo=w[gi],Vo=R[gi];if(de)var Nd=Ct?de(Vo,Uo,gi,R,w,Je):de(Uo,Vo,gi,w,R,Je);if(!(Nd===t?Uo===Vo||ze(Uo,Vo,$,de,Je):Nd)){vo=!1;break}br||(br=gi=="constructor")}if(vo&&!br){var nh=w.constructor,Gd=R.constructor;nh!=Gd&&"constructor"in w&&"constructor"in R&&!(typeof nh=="function"&&nh instanceof nh&&typeof Gd=="function"&&Gd instanceof Gd)&&(vo=!1)}return Je.delete(w),Je.delete(R),vo}function ws(w){return c0(Id(w,t,Sc),w+"")}function _1(w){return xp(w,b,Pm)}function x1(w){return xp(w,S,u0)}var M1=Eh?function(w){return Eh.get(w)}:Oi;function a0(w){for(var R=w.name+"",$=mc[R],de=Eo.call(mc,R)?$.length:0;de--;){var ze=$[de],Je=ze.func;if(Je==null||Je==w)return ze.name}return R}function Sf(w){var R=Eo.call(qe,"placeholder")?qe:w;return R.placeholder}function Hi(){var w=qe.iteratee||sr;return w=w===sr?B:w,arguments.length?w(arguments[0],arguments[1]):w}function Ep(w,R){var $=w.__data__;return Ph(R)?$[typeof R=="string"?"string":"hash"]:$.map}function l0(w){for(var R=b(w),$=R.length;$--;){var de=R[$],ze=w[de];R[$]=[de,ze,Hb(ze)]}return R}function Ef(w,R){var $=Ap(w,R);return xc($)?$:t}function Vb(w){var R=Eo.call(w,oa),$=w[oa];try{w[oa]=t;var de=!0}catch{}var ze=pa.call(w);return de&&(R?w[oa]=$:delete w[oa]),ze}var Pm=dc?function(w){return w==null?[]:(w=yo(w),du(dc(w),function(R){return fr.call(w,R)}))}:ry,u0=dc?function(w){for(var R=[];w;)dA(R,Pm(w)),w=pf(w);return R}:ry,Pl=or;(Sh&&Pl(new Sh(new ArrayBuffer(1)))!=oe||Is&&Pl(new Is)!=mt||_s&&Pl(_s.resolve())!=Rn||Vr&&Pl(new Vr)!=_n||pc&&Pl(new pc)!=In)&&(Pl=function(w){var R=or(w),$=R==$t?w.constructor:t,de=$?eA($):"";if(de)switch(de){case Im:return oe;case Ws:return mt;case gu:return Rn;case Tl:return _n;case gp:return In}return R});function w1(w,R,$){for(var de=-1,ze=$.length;++de<ze;){var Je=$[de],Ct=Je.size;switch(Je.type){case"drop":w+=Ct;break;case"dropRight":R-=Ct;break;case"take":R=ns(R,w+Ct);break;case"takeRight":w=Wo(w,R-Ct);break}}return{start:w,end:R}}function S1(w){var R=w.match(Di);return R?R[1].split(js):[]}function Op(w,R,$){R=qo(R,w);for(var de=-1,ze=R.length,Je=!1;++de<ze;){var Ct=Yo(R[de]);if(!(Je=w!=null&&$(w,Ct)))break;w=w[Ct]}return Je||++de!=ze?Je:(ze=w==null?0:w.length,!!ze&&OA(ze)&&wA(Ct,ze)&&(yr(w)||Kd(w)))}function Bp(w){var R=w.length,$=new w.constructor(R);return R&&typeof w[0]=="string"&&Eo.call(w,"index")&&($.index=w.index,$.input=w.input),$}function eu(w){return typeof w.constructor=="function"&&!Ss(w)?ma(pf(w)):{}}function E1(w,R,$){var de=w.constructor;switch(R){case xe:return Cu(w);case Pe:case Te:return new de(+w);case oe:return HA(w,$);case J:case ne:case ue:case Ce:case Ue:case He:case lt:case be:case Ee:return Hc(w,$);case mt:return new de;case Rt:case Bn:return new de(w);case ai:return Sd(w);case _n:return new de;case dn:return Ed(w)}}function O1(w,R){var $=R.length;if(!$)return w;var de=$-1;return R[de]=($>1?"& ":"")+R[de],R=R.join($>2?", ":" "),w.replace(qr,`{
/* [wrapped with `+R+`] */
`)}function Bd(w){return yr(w)||Kd(w)||!!(mu&&w&&w[mu])}function wA(w,R){var $=typeof w;return R=R??tt,!!R&&($=="number"||$!="symbol"&&ra.test(w))&&w>-1&&w%1==0&&w<R}function Hu(w,R,$){if(!Es($))return!1;var de=typeof R;return(de=="number"?Ys($)&&wA(R,$.length):de=="string"&&R in $)?Ic($[R],w):!1}function B1(w,R){if(yr(w))return!1;var $=typeof w;return $=="number"||$=="symbol"||$=="boolean"||w==null||Ou(w)?!0:ir.test(w)||!mi.test(w)||R!=null&&w in yo(R)}function Ph(w){var R=typeof w;return R=="string"||R=="number"||R=="symbol"||R=="boolean"?w!=="__proto__":w===null}function I1(w){var R=a0(w),$=qe[R];if(typeof $!="function"||!(R in Gr.prototype))return!1;if(w===$)return!0;var de=M1($);return!!de&&w===de[0]}function Um(w){return!!pp&&pp in w}var Km=gA?EA:xC;function Ss(w){var R=w&&w.constructor,$=typeof R=="function"&&R.prototype||mA;return w===$}function Hb(w){return w===w&&!Es(w)}function Zb(w,R){return function($){return $==null?!1:$[w]===R&&(R!==t||w in yo($))}}function Xb(w){var R=Jm(w,function(de){return $.size===A&&$.clear(),de}),$=R.cache;return R}function Ip(w,R){var $=w[1],de=R[1],ze=$|de,Je=ze<(F|j|z),Ct=de==z&&$==V||de==z&&$==se&&w[7].length<=R[8]||de==(z|se)&&R[7].length<=R[8]&&$==V;if(!(Je||Ct))return w;de&F&&(w[2]=R[2],ze|=$&F?0:Q);var kt=R[3];if(kt){var zt=w[3];w[3]=zt?Mc(zt,kt,R[4]):kt,w[4]=zt?vh(w[3],m):R[4]}return kt=R[5],kt&&(zt=w[5],w[5]=zt?_u(zt,kt,R[6]):kt,w[6]=zt?vh(w[5],m):R[6]),kt=R[7],kt&&(w[7]=kt),de&z&&(w[8]=w[8]==null?R[8]:ns(w[8],R[8])),w[9]==null&&(w[9]=R[9]),w[0]=R[0],w[1]=ze,w}function Uh(w){var R=[];if(w!=null)for(var $ in yo(w))R.push($);return R}function lv(w){return pa.call(w)}function Id(w,R,$){return R=Wo(R===t?w.length-1:R,0),function(){for(var de=arguments,ze=-1,Je=Wo(de.length-R,0),Ct=nn(Je);++ze<Je;)Ct[ze]=de[R+ze];ze=-1;for(var kt=nn(R+1);++ze<R;)kt[ze]=de[ze];return kt[R]=$(Ct),Gs(w,this,kt)}}function Kh(w,R){return R.length<2?w:bu(w,Kt(R,0,-1))}function Lh(w,R){for(var $=w.length,de=ns(R.length,$),ze=Kr(w);de--;){var Je=R[de];w[de]=wA(Je,$)?ze[Je]:t}return w}function k1(w,R){if(!(R==="constructor"&&typeof w[R]=="function")&&R!="__proto__")return w[R]}var T1=A0(At),Lm=e0||function(w,R){return Ri.setTimeout(w,R)},c0=A0(Ot);function R1(w,R,$){var de=R+"";return c0(w,O1(de,Jb(S1(de),$)))}function A0(w){var R=0,$=0;return function(){var de=fc(),ze=we-(de-$);if($=de,ze>0){if(++R>=_e)return arguments[0]}else R=0;return w.apply(t,arguments)}}function kp(w,R){var $=-1,de=w.length,ze=de-1;for(R=R===t?de:R;++$<R;){var Je=Ze($,ze),Ct=w[Je];w[Je]=w[$],w[$]=Ct}return w.length=R,w}var Fh=Xb(function(w){var R=[];return w.charCodeAt(0)===46&&R.push(""),w.replace(di,function($,de,ze,Je){R.push(ze?Je.replace(Gi,"$1"):de||$)}),R});function Yo(w){if(typeof w=="string"||Ou(w))return w;var R=w+"";return R=="0"&&1/w==-Qe?"-0":R}function eA(w){if(w!=null){try{return Il.call(w)}catch{}try{return w+""}catch{}}return""}function Jb(w,R){return ts(dt,function($){var de="_."+$[0];R&$[1]&&!hh(w,de)&&w.push(de)}),w.sort()}function Wr(w){if(w instanceof Gr)return w.clone();var R=new Hl(w.__wrapped__,w.__chain__);return R.__actions__=Kr(w.__actions__),R.__index__=w.__index__,R.__values__=w.__values__,R}function Fm(w,R,$){($?Hu(w,R,$):R===t)?R=1:R=Wo(Br(R),0);var de=w==null?0:w.length;if(!de||R<1)return[];for(var ze=0,Je=0,Ct=nn(Mh(de/R));ze<de;)Ct[Je++]=Kt(w,ze,ze+=R);return Ct}function uv(w){for(var R=-1,$=w==null?0:w.length,de=0,ze=[];++R<$;){var Je=w[R];Je&&(ze[de++]=Je)}return ze}function h0(){var w=arguments.length;if(!w)return[];for(var R=nn(w-1),$=arguments[0],de=w;de--;)R[de-1]=arguments[de];return dA(yr($)?Kr($):[$],no(R,1))}var Rs=nt(function(w,R){return ya(w)?Ao(w,no(R,1,ya,!0)):[]}),Ul=nt(function(w,R){var $=wu(R);return ya($)&&($=t),ya(w)?Ao(w,no(R,1,ya,!0),Hi($,2)):[]}),zh=nt(function(w,R){var $=wu(R);return ya($)&&($=t),ya(w)?Ao(w,no(R,1,ya,!0),t,$):[]});function cv(w,R,$){var de=w==null?0:w.length;return de?(R=$||R===t?1:Br(R),Kt(w,R<0?0:R,de)):[]}function zm(w,R,$){var de=w==null?0:w.length;return de?(R=$||R===t?1:Br(R),R=de-R,Kt(w,0,R<0?0:R)):[]}function Av(w,R){return w&&w.length?Hr(w,Hi(R,3),!0,!0):[]}function Of(w,R){return w&&w.length?Hr(w,Hi(R,3),!0):[]}function Mu(w,R,$,de){var ze=w==null?0:w.length;return ze?($&&typeof $!="number"&&Hu(w,R,$)&&($=0,de=ze),kr(w,R,$,de)):[]}function tu(w,R,$){var de=w==null?0:w.length;if(!de)return-1;var ze=$==null?0:Br($);return ze<0&&(ze=Wo(de+ze,0)),fA(w,Hi(R,3),ze)}function Tp(w,R,$){var de=w==null?0:w.length;if(!de)return-1;var ze=de-1;return $!==t&&(ze=Br($),ze=$<0?Wo(de+ze,0):ns(ze,de-1)),fA(w,Hi(R,3),ze,!0)}function Sc(w){var R=w==null?0:w.length;return R?no(w,1):[]}function hv(w){var R=w==null?0:w.length;return R?no(w,Qe):[]}function Ec(w,R){var $=w==null?0:w.length;return $?(R=R===t?1:Br(R),no(w,R)):[]}function Rp(w){for(var R=-1,$=w==null?0:w.length,de={};++R<$;){var ze=w[R];de[ze[0]]=ze[1]}return de}function jh(w){return w&&w.length?w[0]:t}function Dp(w,R,$){var de=w==null?0:w.length;if(!de)return-1;var ze=$==null?0:Br($);return ze<0&&(ze=Wo(de+ze,0)),dh(w,R,ze)}function d0(w){var R=w==null?0:w.length;return R?Kt(w,0,-1):[]}var XA=nt(function(w){var R=Nr(w,tr);return R.length&&R[0]===w[0]?xs(R):[]}),dv=nt(function(w){var R=wu(w),$=Nr(w,tr);return R===wu($)?R=t:$.pop(),$.length&&$[0]===w[0]?xs($,Hi(R,2)):[]}),jm=nt(function(w){var R=wu(w),$=Nr(w,tr);return R=typeof R=="function"?R:t,R&&$.pop(),$.length&&$[0]===w[0]?xs($,t,R):[]});function f0(w,R){return w==null?"":Nu.call(w,R)}function wu(w){var R=w==null?0:w.length;return R?w[R-1]:t}function Nm(w,R,$){var de=w==null?0:w.length;if(!de)return-1;var ze=de;return $!==t&&(ze=Br($),ze=ze<0?Wo(de+ze,0):ns(ze,de-1)),R===R?Yl(w,R,ze):fA(w,Ol,ze,!0)}function eC(w,R){return w&&w.length?ae(w,Br(R)):t}var Pp=nt(Gm);function Gm(w,R){return w&&w.length&&R&&R.length?Fe(w,R):w}function tC(w,R,$){return w&&w.length&&R&&R.length?Fe(w,R,Hi($,2)):w}function p0(w,R,$){return w&&w.length&&R&&R.length?Fe(w,R,t,$):w}var nC=ws(function(w,R){var $=w==null?0:w.length,de=xf(w,R);return Xe(w,Nr(R,function(ze){return wA(ze,$)?+ze:ze}).sort(pl)),de});function iC(w,R){var $=[];if(!(w&&w.length))return $;var de=-1,ze=[],Je=w.length;for(R=Hi(R,3);++de<Je;){var Ct=w[de];R(Ct,de,w)&&($.push(Ct),ze.push(de))}return Xe(w,ze),$}function fv(w){return w==null?w:mp.call(w)}function $o(w,R,$){var de=w==null?0:w.length;return de?($&&typeof $!="number"&&Hu(w,R,$)?(R=0,$=de):(R=R==null?0:Br(R),$=$===t?de:Br($)),Kt(w,R,$)):[]}function rs(w,R){return qt(w,R)}function Zr(w,R,$){return Kn(w,R,Hi($,2))}function Io(w,R){var $=w==null?0:w.length;if($){var de=qt(w,R);if(de<$&&Ic(w[de],R))return de}return-1}function hs(w,R){return qt(w,R,!0)}function Oc(w,R,$){return Kn(w,R,Hi($,2),!0)}function kd(w,R){var $=w==null?0:w.length;if($){var de=qt(w,R,!0)-1;if(Ic(w[de],R))return de}return-1}function Wm(w){return w&&w.length?On(w):[]}function pv(w,R){return w&&w.length?On(w,Hi(R,2)):[]}function tA(w){var R=w==null?0:w.length;return R?Kt(w,1,R):[]}function ga(w,R,$){return w&&w.length?(R=$||R===t?1:Br(R),Kt(w,0,R<0?0:R)):[]}function Bf(w,R,$){var de=w==null?0:w.length;return de?(R=$||R===t?1:Br(R),R=de-R,Kt(w,R<0?0:R,de)):[]}function Up(w,R){return w&&w.length?Hr(w,Hi(R,3),!1,!0):[]}function mv(w,R){return w&&w.length?Hr(w,Hi(R,3)):[]}var SA=nt(function(w){return Ji(no(w,1,ya,!0))}),Qm=nt(function(w){var R=wu(w);return ya(R)&&(R=t),Ji(no(w,1,ya,!0),Hi(R,2))}),qm=nt(function(w){var R=wu(w);return R=typeof R=="function"?R:t,Ji(no(w,1,ya,!0),t,R)});function Su(w){return w&&w.length?Ji(w):[]}function D1(w,R){return w&&w.length?Ji(w,Hi(R,2)):[]}function P1(w,R){return R=typeof R=="function"?R:t,w&&w.length?Ji(w,t,R):[]}function Kp(w){if(!(w&&w.length))return[];var R=0;return w=du(w,function($){if(ya($))return R=Wo($.length,R),!0}),ph(R,function($){return Nr(w,ud($))})}function m0(w,R){if(!(w&&w.length))return[];var $=Kp(w);return R==null?$:Nr($,function(de){return Gs(R,t,de)})}var JA=nt(function(w,R){return ya(w)?Ao(w,R):[]}),nu=nt(function(w){return As(du(w,ya))}),Td=nt(function(w){var R=wu(w);return ya(R)&&(R=t),As(du(w,ya),Hi(R,2))}),Ym=nt(function(w){var R=wu(w);return R=typeof R=="function"?R:t,As(du(w,ya),t,R)}),$m=nt(Kp);function gv(w,R){return Qo(w||[],R||[],Cd)}function U1(w,R){return Qo(w||[],R||[],xt)}var rC=nt(function(w){var R=w.length,$=R>1?w[R-1]:t;return $=typeof $=="function"?(w.pop(),$):t,m0(w,$)});function Vm(w){var R=qe(w);return R.__chain__=!0,R}function Lp(w,R){return R(w),w}function wo(w,R){return R(w)}var K1=ws(function(w){var R=w.length,$=R?w[0]:0,de=this.__wrapped__,ze=function(Je){return xf(Je,w)};return R>1||this.__actions__.length||!(de instanceof Gr)||!wA($)?this.thru(ze):(de=de.slice($,+$+(R?1:0)),de.__actions__.push({func:wo,args:[ze],thisArg:t}),new Hl(de,this.__chain__).thru(function(Je){return R&&!Je.length&&Je.push(t),Je}))});function Bc(){return Vm(this)}function yv(){return new Hl(this.value(),this.__chain__)}function L1(){this.__values__===t&&(this.__values__=rA(this.value()));var w=this.__index__>=this.__values__.length,R=w?t:this.__values__[this.__index__++];return{done:w,value:R}}function Hm(){return this}function Rd(w){for(var R,$=this;$ instanceof vu;){var de=Wr($);de.__index__=0,de.__values__=t,R?ze.__wrapped__=de:R=de;var ze=de;$=$.__wrapped__}return ze.__wrapped__=w,R}function F1(){var w=this.__wrapped__;if(w instanceof Gr){var R=w;return this.__actions__.length&&(R=new Gr(this)),R=R.reverse(),R.__actions__.push({func:wo,args:[fv],thisArg:t}),new Hl(R,this.__chain__)}return this.thru(fv)}function vv(){return cs(this.__wrapped__,this.__actions__)}var Zm=ZA(function(w,R,$){Eo.call(w,$)?++w[$]:Wu(w,$,1)});function oC(w,R,$){var de=yr(w)?Gc:_p;return $&&Hu(w,R,$)&&(R=t),de(w,Hi(R,3))}function sC(w,R){var $=yr(w)?du:Do;return $(w,Hi(R,3))}var aC=Jc(tu),bv=Jc(Tp);function Cv(w,R){return no(Pd(w,R),1)}function jx(w,R){return no(Pd(w,R),Qe)}function Nx(w,R,$){return $=$===t?1:Br($),no(Pd(w,R),$)}function lC(w,R){var $=yr(w)?ts:$c;return $(w,Hi(R,3))}function _v(w,R){var $=yr(w)?lp:xd;return $(w,Hi(R,3))}var xv=ZA(function(w,R,$){Eo.call(w,$)?w[$].push(R):Wu(w,$,[R])});function If(w,R,$,de){w=Ys(w)?w:Jt(w),$=$&&!de?Br($):0;var ze=w.length;return $<0&&($=Wo(ze+$,0)),J1(w)?$<=ze&&w.indexOf(R,$)>-1:!!ze&&dh(w,R,$)>-1}var g0=nt(function(w,R,$){var de=-1,ze=typeof R=="function",Je=Ys(w)?nn(w.length):[];return $c(w,function(Ct){Je[++de]=ze?Gs(R,Ct,$):YA(Ct,R,$)}),Je}),Dd=ZA(function(w,R,$){Wu(w,$,R)});function Pd(w,R){var $=yr(w)?Nr:E;return $(w,Hi(R,3))}function Fp(w,R,$,de){return w==null?[]:(yr(R)||(R=R==null?[]:[R]),$=de?t:$,yr($)||($=$==null?[]:[$]),Ae(w,R,$))}var y0=ZA(function(w,R,$){w[$?0:1].push(R)},function(){return[[],[]]});function v0(w,R,$){var de=yr(w)?Af:cd,ze=arguments.length<3;return de(w,Hi(R,4),$,ze,$c)}function uC(w,R,$){var de=yr(w)?ov:cd,ze=arguments.length<3;return de(w,Hi(R,4),$,ze,xd)}function z1(w,R){var $=yr(w)?du:Do;return $(w,zp(Hi(R,3)))}function Mv(w){var R=yr(w)?bc:ct;return R(w)}function wv(w,R,$){($?Hu(w,R,$):R===t)?R=1:R=Br(R);var de=yr(w)?Cp:yt;return de(w,R)}function Ds(w){var R=yr(w)?Ur:Vt;return R(w)}function j1(w){if(w==null)return 0;if(Ys(w))return J1(w)?Wc(w):w.length;var R=Pl(w);return R==mt||R==_n?w.size:l(w).length}function cC(w,R,$){var de=yr(w)?up:jt;return $&&Hu(w,R,$)&&(R=t),de(w,Hi(R,3))}var N1=nt(function(w,R){if(w==null)return[];var $=R.length;return $>1&&Hu(w,R[0],R[1])?R=[]:$>2&&Hu(R[0],R[1],R[2])&&(R=[R[0]]),Ae(w,no(R,1),[])}),Xm=xh||function(){return Ri.Date.now()};function Gx(w,R){if(typeof R!="function")throw new Bl(s);return w=Br(w),function(){if(--w<1)return R.apply(this,arguments)}}function Sv(w,R,$){return R=$?t:R,R=w&&R==null?w.length:R,MA(w,z,t,t,t,t,R)}function b0(w,R){var $;if(typeof R!="function")throw new Bl(s);return w=Br(w),function(){return--w>0&&($=R.apply(this,arguments)),w<=1&&(R=t),$}}var kf=nt(function(w,R,$){var de=F;if($.length){var ze=vh($,Sf(kf));de|=G}return MA(w,de,R,$,ze)}),G1=nt(function(w,R,$){var de=F|j;if($.length){var ze=vh($,Sf(G1));de|=G}return MA(R,de,w,$,ze)});function C0(w,R,$){R=$?t:R;var de=MA(w,V,t,t,t,t,t,R);return de.placeholder=C0.placeholder,de}function W1(w,R,$){R=$?t:R;var de=MA(w,H,t,t,t,t,t,R);return de.placeholder=W1.placeholder,de}function Ud(w,R,$){var de,ze,Je,Ct,kt,zt,Cn=0,xn=!1,Ln=!1,gi=!0;if(typeof w!="function")throw new Bl(s);R=ps(R)||0,Es($)&&(xn=!!$.leading,Ln="maxWait"in $,Je=Ln?Wo(ps($.maxWait)||0,R):Je,gi="trailing"in $?!!$.trailing:gi);function Zi(iu){var qp=de,T0=ze;return de=ze=t,Cn=iu,Ct=w.apply(T0,qp),Ct}function vr(iu){return Cn=iu,kt=Lm(Uo,R),xn?Zi(iu):Ct}function vo(iu){var qp=iu-zt,T0=iu-Cn,xL=R-qp;return Ln?ns(xL,Je-T0):xL}function br(iu){var qp=iu-zt,T0=iu-Cn;return zt===t||qp>=R||qp<0||Ln&&T0>=Je}function Uo(){var iu=Xm();if(br(iu))return Vo(iu);kt=Lm(Uo,vo(iu))}function Vo(iu){return kt=t,gi&&de?Zi(iu):(de=ze=t,Ct)}function Nd(){kt!==t&&VA(kt),Cn=0,de=zt=ze=kt=t}function nh(){return kt===t?Ct:Vo(Xm())}function Gd(){var iu=Xm(),qp=br(iu);if(de=arguments,ze=this,zt=iu,qp){if(kt===t)return vr(zt);if(Ln)return VA(kt),kt=Lm(Uo,R),Zi(zt)}return kt===t&&(kt=Lm(Uo,R)),Ct}return Gd.cancel=Nd,Gd.flush=nh,Gd}var eh=nt(function(w,R){return dl(w,1,R)}),nA=nt(function(w,R,$){return dl(w,ps(R)||0,$)});function Tf(w){return MA(w,le)}function Jm(w,R){if(typeof w!="function"||R!=null&&typeof R!="function")throw new Bl(s);var $=function(){var de=arguments,ze=R?R.apply(this,de):de[0],Je=$.cache;if(Je.has(ze))return Je.get(ze);var Ct=w.apply(this,de);return $.cache=Je.set(ze,Ct)||Je,Ct};return $.cache=new(Jm.Cache||Qs),$}Jm.Cache=Qs;function zp(w){if(typeof w!="function")throw new Bl(s);return function(){var R=arguments;switch(R.length){case 0:return!w.call(this);case 1:return!w.call(this,R[0]);case 2:return!w.call(this,R[0],R[1]);case 3:return!w.call(this,R[0],R[1],R[2])}return!w.apply(this,R)}}function AC(w){return b0(2,w)}var _0=Ga(function(w,R){R=R.length==1&&yr(R[0])?Nr(R[0],ql(Hi())):Nr(no(R,1),ql(Hi()));var $=R.length;return nt(function(de){for(var ze=-1,Je=ns(de.length,$);++ze<Je;)de[ze]=R[ze].call(this,de[ze]);return Gs(w,this,de)})}),x0=nt(function(w,R){var $=vh(R,Sf(x0));return MA(w,G,t,R,$)}),Q1=nt(function(w,R){var $=vh(R,Sf(Q1));return MA(w,Y,t,R,$)}),q1=ws(function(w,R){return MA(w,se,t,t,t,R)});function Y1(w,R){if(typeof w!="function")throw new Bl(s);return R=R===t?R:Br(R),nt(w,R)}function eg(w,R){if(typeof w!="function")throw new Bl(s);return R=R==null?0:Wo(Br(R),0),nt(function($){var de=$[R],ze=aa($,0,R);return de&&dA(ze,de),Gs(w,this,ze)})}function $1(w,R,$){var de=!0,ze=!0;if(typeof w!="function")throw new Bl(s);return Es($)&&(de="leading"in $?!!$.leading:de,ze="trailing"in $?!!$.trailing:ze),Ud(w,R,{leading:de,maxWait:R,trailing:ze})}function V1(w){return Sv(w,1)}function Ev(w,R){return x0(sa(R),w)}function hC(){if(!arguments.length)return[];var w=arguments[0];return yr(w)?w:[w]}function Rf(w){return tl(w,_)}function dC(w,R){return R=typeof R=="function"?R:t,tl(w,_,R)}function fC(w){return tl(w,v|_)}function ho(w,R){return R=typeof R=="function"?R:t,tl(w,v|_,R)}function H1(w,R){return R==null||Rm(w,R,b(R))}function Ic(w,R){return w===R||w!==w&&R!==R}var Ov=Dh(Md),pC=Dh(function(w,R){return w>=R}),Kd=_A((function(){return arguments})())?_A:function(w){return fs(w)&&Eo.call(w,"callee")&&!fr.call(w,"callee")},yr=nn.isArray,tg=jr?ql(jr):fl;function Ys(w){return w!=null&&OA(w.length)&&!EA(w)}function ya(w){return fs(w)&&Ys(w)}function mC(w){return w===!0||w===!1||fs(w)&&or(w)==Pe}var Ld=wh||xC,Bv=Cs?ql(Cs):Ts;function Iv(w){return fs(w)&&w.nodeType===1&&!iA(w)}function ng(w){if(w==null)return!0;if(Ys(w)&&(yr(w)||typeof w=="string"||typeof w.splice=="function"||Ld(w)||Np(w)||Kd(w)))return!w.length;var R=Pl(w);if(R==mt||R==_n)return!w.size;if(Ss(w))return!l(w).length;for(var $ in w)if(Eo.call(w,$))return!1;return!0}function ds(w,R){return Yu(w,R)}function jp(w,R,$){$=typeof $=="function"?$:t;var de=$?$(w,R):t;return de===t?Yu(w,R,t,$):!!de}function nl(w){if(!fs(w))return!1;var R=or(w);return R==Ne||R==Se||typeof w.message=="string"&&typeof w.name=="string"&&!iA(w)}function kv(w){return typeof w=="number"&&vd(w)}function EA(w){if(!Es(w))return!1;var R=or(w);return R==ut||R==rt||R==Ut||R==zn}function Eu(w){return typeof w=="number"&&w==Br(w)}function OA(w){return typeof w=="number"&&w>-1&&w%1==0&&w<=tt}function Es(w){var R=typeof w;return w!=null&&(R=="object"||R=="function")}function fs(w){return w!=null&&typeof w=="object"}var M0=Sr?ql(Sr):$A;function Z1(w,R){return w===R||Vc(w,R,l0(R))}function gC(w,R,$){return $=typeof $=="function"?$:t,Vc(w,R,l0(R),$)}function Tv(w){return Dv(w)&&w!=+w}function Wx(w){if(Km(w))throw new rr(o);return xc(w)}function Rv(w){return w===null}function Df(w){return w==null}function Dv(w){return typeof w=="number"||fs(w)&&or(w)==Rt}function iA(w){if(!fs(w)||or(w)!=$t)return!1;var R=pf(w);if(R===null)return!0;var $=Eo.call(R,"constructor")&&R.constructor;return typeof $=="function"&&$ instanceof $&&Il.call($)==Vl}var w0=za?ql(za):Mf;function X1(w){return Eu(w)&&w>=-tt&&w<=tt}var yC=uc?ql(uc):wf;function J1(w){return typeof w=="string"||!yr(w)&&fs(w)&&or(w)==Bn}function Ou(w){return typeof w=="symbol"||fs(w)&&or(w)==dn}var Np=hu?ql(hu):Mp;function kc(w){return w===t}function ey(w){return fs(w)&&Pl(w)==In}function S0(w){return fs(w)&&or(w)==It}var E0=Dh(C),Pf=Dh(function(w,R){return w<=R});function rA(w){if(!w)return[];if(Ys(w))return J1(w)?$l(w):Kr(w);if(_h&&w[_h])return A1(w[_h]());var R=Pl(w),$=R==mt?yh:R==_n?hp:Jt;return $(w)}function Nh(w){if(!w)return w===0?w:0;if(w=ps(w),w===Qe||w===-Qe){var R=w<0?-1:1;return R*ht}return w===w?w:0}function Br(w){var R=Nh(w),$=R%1;return R===R?$?R-$:R:0}function Zu(w){return w?Cc(Br(w),0,Le):0}function ps(w){if(typeof w=="number")return w;if(Ou(w))return ce;if(Es(w)){var R=typeof w.valueOf=="function"?w.valueOf():w;w=Es(R)?R+"":R}if(typeof w!="string")return w===0?w:+w;w=Hg(w);var $=lo.test(w);return $||Cl.test(w)?kn(w.slice(2),$?2:8):Oa.test(w)?ce:+w}function ty(w){return Bo(w,S(w))}function Gp(w){return w?Cc(Br(w),-tt,tt):w===0?w:0}function zo(w){return w==null?"":ei(w)}var Pv=Xc(function(w,R){if(Ss(R)||Ys(R)){Bo(R,b(R),w);return}for(var $ in R)Eo.call(R,$)&&Cd(w,$,R[$])}),vC=Xc(function(w,R){Bo(R,S(R),w)}),O0=Xc(function(w,R,$,de){Bo(R,S(R),w,de)}),bC=Xc(function(w,R,$,de){Bo(R,b(R),w,de)}),Qx=ws(xf);function CC(w,R){var $=ma(w);return R==null?$:bA($,R)}var Uv=nt(function(w,R){w=yo(w);var $=-1,de=R.length,ze=de>2?R[2]:t;for(ze&&Hu(R[0],R[1],ze)&&(de=1);++$<de;)for(var Je=R[$],Ct=S(Je),kt=-1,zt=Ct.length;++kt<zt;){var Cn=Ct[kt],xn=w[Cn];(xn===t||Ic(xn,mA[Cn])&&!Eo.call(w,Cn))&&(w[Cn]=Je[Cn])}return w}),ny=nt(function(w){return w.push(t,C1),Gs(W,t,w)});function Wp(w,R){return wm(w,Hi(R,3),Jn)}function Fd(w,R){return wm(w,Hi(R,3),Pi)}function iy(w,R){return w==null?w:Xl(w,Hi(R,3),S)}function _C(w,R){return w==null?w:CA(w,Hi(R,3),S)}function Uf(w,R){return w&&Jn(w,Hi(R,3))}function Kf(w,R){return w&&Pi(w,Hi(R,3))}function ig(w){return w==null?[]:Rl(w,b(w))}function rg(w){return w==null?[]:Rl(w,S(w))}function Qp(w,R,$){var de=w==null?t:bu(w,R);return de===t?$:de}function B0(w,R){return w!=null&&Op(w,R,qu)}function og(w,R){return w!=null&&Op(w,R,m1)}var f=Vu(function(w,R,$){R!=null&&typeof R.toString!="function"&&(R=pa.call(R)),w[R]=$},Gt(Yt)),u=Vu(function(w,R,$){R!=null&&typeof R.toString!="function"&&(R=pa.call(R)),Eo.call(w,R)?w[R].push($):w[R]=[$]},Hi),d=nt(YA);function b(w){return Ys(w)?kh(w):l(w)}function S(w){return Ys(w)?kh(w,!0):p(w)}function k(w,R){var $={};return R=Hi(R,3),Jn(w,function(de,ze,Je){Wu($,R(de,ze,Je),de)}),$}function D(w,R){var $={};return R=Hi(R,3),Jn(w,function(de,ze,Je){Wu($,ze,R(de,ze,Je))}),$}var K=Xc(function(w,R,$){q(w,R,$)}),W=Xc(function(w,R,$,de){q(w,R,$,de)}),ee=ws(function(w,R){var $={};if(w==null)return $;var de=!1;R=Nr(R,function(Je){return Je=qo(Je,w),de||(de=Je.length>1),Je}),Bo(w,x1(w),$),de&&($=tl($,v|x|_,wp));for(var ze=R.length;ze--;)Yr($,R[ze]);return $});function re(w,R){return Oe(w,zp(Hi(R)))}var he=ws(function(w,R){return w==null?{}:ye(w,R)});function Oe(w,R){if(w==null)return{};var $=Nr(x1(w),function(de){return[de]});return R=Hi(R),pe(w,$,function(de,ze){return R(de,ze[0])})}function De(w,R,$){R=qo(R,w);var de=-1,ze=R.length;for(ze||(ze=1,w=t);++de<ze;){var Je=w==null?t:w[Yo(R[de])];Je===t&&(de=ze,Je=$),w=EA(Je)?Je.call(w):Je}return w}function Ke(w,R,$){return w==null?w:xt(w,R,$)}function Ge(w,R,$,de){return de=typeof de=="function"?de:t,w==null?w:xt(w,R,$,de)}var Ve=o0(b),at=o0(S);function Tt(w,R,$){var de=yr(w),ze=de||Ld(w)||Np(w);if(R=Hi(R,4),$==null){var Je=w&&w.constructor;ze?$=de?new Je:[]:Es(w)?$=EA(Je)?ma(pf(w)):{}:$={}}return(ze?ts:Jn)(w,function(Ct,kt,zt){return R($,Ct,kt,zt)}),$}function ft(w,R){return w==null?!0:Yr(w,R)}function _t(w,R,$){return w==null?w:Ms(w,R,sa($))}function Nt(w,R,$,de){return de=typeof de=="function"?de:t,w==null?w:Ms(w,R,sa($),de)}function Jt(w){return w==null?[]:Sm(w,b(w))}function An(w){return w==null?[]:Sm(w,S(w))}function Wn(w,R,$){return $===t&&($=R,R=t),$!==t&&($=ps($),$=$===$?$:0),R!==t&&(R=ps(R),R=R===R?R:0),Cc(ps(w),R,$)}function Dn(w,R,$){return R=Nh(R),$===t?($=R,R=0):$=Nh($),w=ps(w),_c(w,R,$)}function Nn(w,R,$){if($&&typeof $!="boolean"&&Hu(w,R,$)&&(R=$=t),$===t&&(typeof R=="boolean"?($=R,R=t):typeof w=="boolean"&&($=w,w=t)),w===t&&R===t?(w=0,R=1):(w=Nh(w),R===t?(R=w,w=0):R=Nh(R)),w>R){var de=w;w=R,R=de}if($||w%1||R%1){var ze=GA();return ns(w+ze*(R-w+ri("1e-"+((ze+"").length-1))),R)}return Ze(w,R)}var Ci=ua(function(w,R,$){return R=R.toLowerCase(),w+($?jn(R):R)});function jn(w){return I(zo(w).toLowerCase())}function Un(w){return w=zo(w),w&&w.replace(uo,cp).replace(El,"")}function rn(w,R,$){w=zo(w),R=ei(R);var de=w.length;$=$===t?de:Cc(Br($),0,de);var ze=$;return $-=R.length,$>=0&&w.slice($,ze)==R}function Ui(w){return w=zo(w),w&&Gn.test(w)?w.replace(ot,Zg):w}function Qi(w){return w=zo(w),w&&Fn.test(w)?w.replace(Vn,"\\$&"):w}var Mi=ua(function(w,R,$){return w+($?"-":"")+R.toLowerCase()}),oi=ua(function(w,R,$){return w+($?" ":"")+R.toLowerCase()}),Qr=Ta("toLowerCase");function $s(w,R,$){w=zo(w),R=Br(R);var de=R?Wc(w):0;if(!R||de>=R)return w;var ze=(R-de)/2;return r0(hc(ze),$)+w+r0(Mh(ze),$)}function na(w,R,$){w=zo(w),R=Br(R);var de=R?Wc(w):0;return R&&de<R?w+r0(R-de,$):w}function Kl(w,R,$){w=zo(w),R=Br(R);var de=R?Wc(w):0;return R&&de<R?r0(R-de,$)+w:w}function Tc(w,R,$){return $||R==null?R=0:R&&(R=+R),NA(zo(w).replace(Ti,""),R||0)}function Ll(w,R,$){return($?Hu(w,R,$):R===t)?R=1:R=Br(R),st(zo(w),R)}function il(){var w=arguments,R=zo(w[0]);return w.length<3?R:R.replace(w[1],w[2])}var Vs=ua(function(w,R,$){return w+($?"_":"")+R.toLowerCase()});function va(w,R,$){return $&&typeof $!="number"&&Hu(w,R,$)&&(R=$=t),$=$===t?Le:$>>>0,$?(w=zo(w),w&&(typeof R=="string"||R!=null&&!w0(R))&&(R=ei(R),!R&&pA(w))?aa($l(w),0,$):w.split(R,$)):[]}var Ra=ua(function(w,R,$){return w+($?" ":"")+I(R)});function rl(w,R,$){return w=zo(w),$=$==null?0:Cc(Br($),0,w.length),R=ei(R),w.slice($,$+R.length)==R}function ol(w,R,$){var de=qe.templateSettings;$&&Hu(w,R,$)&&(R=t),w=zo(w),R=O0({},R,de,s0);var ze=O0({},R.imports,de.imports,s0),Je=b(ze),Ct=Sm(ze,Je),kt,zt,Cn=0,xn=R.interpolate||Fa,Ln="__p += '",gi=pd((R.escape||Fa).source+"|"+xn.source+"|"+(xn===$n?Li:Fa).source+"|"+(R.evaluate||Fa).source+"|$","g"),Zi="//# sourceURL="+(Eo.call(R,"sourceURL")?(R.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Si+"]")+`
`;w.replace(gi,function(br,Uo,Vo,Nd,nh,Gd){return Vo||(Vo=Nd),Ln+=w.slice(Cn,Gd).replace(Fu,gh),Uo&&(kt=!0,Ln+=`' +
__e(`+Uo+`) +
'`),nh&&(zt=!0,Ln+=`';
`+nh+`;
__p += '`),Vo&&(Ln+=`' +
((__t = (`+Vo+`)) == null ? '' : __t) +
'`),Cn=Gd+br.length,br}),Ln+=`';
`;var vr=Eo.call(R,"variable")&&R.variable;if(!vr)Ln=`with (obj) {
`+Ln+`
}
`;else if(Pn.test(vr))throw new rr(a);Ln=(zt?Ln.replace(y,""):Ln).replace(gt,"$1").replace(Mt,"$1;"),Ln="function("+(vr||"obj")+`) {
`+(vr?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(kt?", __e = _.escape":"")+(zt?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Ln+`return __p
}`;var vo=te(function(){return go(Je,Zi+"return "+Ln).apply(t,Ct)});if(vo.source=Ln,nl(vo))throw vo;return vo}function Xu(w){return zo(w).toLowerCase()}function ba(w){return zo(w).toUpperCase()}function Bu(w,R,$){if(w=zo(w),w&&($||R===t))return Hg(w);if(!w||!(R=ei(R)))return w;var de=$l(w),ze=$l(R),Je=mh(de,ze),Ct=fd(de,ze)+1;return aa(de,Je,Ct).join("")}function qa(w,R,$){if(w=zo(w),w&&($||R===t))return w.slice(0,Qc(w)+1);if(!w||!(R=ei(R)))return w;var de=$l(w),ze=fd(de,$l(R))+1;return aa(de,0,ze).join("")}function Ca(w,R,$){if(w=zo(w),w&&($||R===t))return w.replace(Ti,"");if(!w||!(R=ei(R)))return w;var de=$l(w),ze=mh(de,$l(R));return aa(de,ze).join("")}function h(w,R){var $=me,de=fe;if(Es(R)){var ze="separator"in R?R.separator:ze;$="length"in R?Br(R.length):$,de="omission"in R?ei(R.omission):de}w=zo(w);var Je=w.length;if(pA(w)){var Ct=$l(w);Je=Ct.length}if($>=Je)return w;var kt=$-Wc(de);if(kt<1)return de;var zt=Ct?aa(Ct,0,kt).join(""):w.slice(0,kt);if(ze===t)return zt+de;if(Ct&&(kt+=zt.length-kt),w0(ze)){if(w.slice(kt).search(ze)){var Cn,xn=zt;for(ze.global||(ze=pd(ze.source,zo(Xi.exec(ze))+"g")),ze.lastIndex=0;Cn=ze.exec(xn);)var Ln=Cn.index;zt=zt.slice(0,Ln===t?kt:Ln)}}else if(w.indexOf(ei(ze),kt)!=kt){var gi=zt.lastIndexOf(ze);gi>-1&&(zt=zt.slice(0,gi))}return zt+de}function g(w){return w=zo(w),w&&bn.test(w)?w.replace(Dt,co):w}var M=ua(function(w,R,$){return w+($?" ":"")+R.toUpperCase()}),I=Ta("toUpperCase");function N(w,R,$){return w=zo(w),R=$?t:R,R===t?df(w)?d1(w):Mm(w):w.match(R)||[]}var te=nt(function(w,R){try{return Gs(w,t,R)}catch($){return nl($)?$:new rr($)}}),Re=ws(function(w,R){return ts(R,function($){$=Yo($),Wu(w,$,kf(w[$],w))}),w});function Ye(w){var R=w==null?0:w.length,$=Hi();return w=R?Nr(w,function(de){if(typeof de[1]!="function")throw new Bl(s);return[$(de[0]),de[1]]}):[],nt(function(de){for(var ze=-1;++ze<R;){var Je=w[ze];if(Gs(Je[0],this,de))return Gs(Je[1],this,de)}})}function bt(w){return n0(tl(w,v))}function Gt(w){return function(){return w}}function an(w,R){return w==null||w!==w?R:w}var fn=xu(),en=xu(!0);function Yt(w){return w}function sr(w){return B(typeof w=="function"?w:tl(w,v))}function nr(w){return T(tl(w,v))}function os(w,R){return U(w,tl(R,v))}var Lt=nt(function(w,R){return function($){return YA($,w,R)}}),Et=nt(function(w,R){return function($){return YA(w,$,R)}});function Wt(w,R,$){var de=b(R),ze=Rl(R,de);$==null&&!(Es(R)&&(ze.length||!de.length))&&($=R,R=w,w=this,ze=Rl(R,b(R)));var Je=!(Es($)&&"chain"in $)||!!$.chain,Ct=EA(w);return ts(ze,function(kt){var zt=R[kt];w[kt]=zt,Ct&&(w.prototype[kt]=function(){var Cn=this.__chain__;if(Je||Cn){var xn=w(this.__wrapped__),Ln=xn.__actions__=Kr(this.__actions__);return Ln.push({func:zt,args:arguments,thisArg:w}),xn.__chain__=Cn,xn}return zt.apply(w,dA([this.value()],arguments))})}),w}function hn(){return Ri._===this&&(Ri._=jA),this}function Oi(){}function io(w){return w=Br(w),nt(function(R){return ae(R,w)})}var qi=Dm(Nr),ur=Dm(Gc),Fl=Dm(up);function Po(w){return B1(w)?ud(Yo(w)):Be(w)}function Lf(w){return function(R){return w==null?t:bu(w,R)}}var qx=Od(),zd=Od(!0);function ry(){return[]}function xC(){return!1}function z6(){return{}}function j6(){return""}function N6(){return!0}function Ju(w,R){if(w=Br(w),w<1||w>tt)return[];var $=Le,de=ns(w,Le);R=Hi(R),w-=Le;for(var ze=ph(de,R);++$<w;)R($);return ze}function th(w){return yr(w)?Nr(w,Yo):Ou(w)?[w]:Kr(Fh(zo(w)))}function I0(w){var R=++cc;return zo(w)+R}var jd=xA(function(w,R){return w+R},0),k0=v1("ceil"),Ff=xA(function(w,R){return w/R},1),mae=v1("floor");function gae(w){return w&&w.length?Qu(w,Yt,Md):t}function yae(w,R){return w&&w.length?Qu(w,Hi(R,2),Md):t}function vae(w){return u1(w,Yt)}function bae(w,R){return u1(w,Hi(R,2))}function Cae(w){return w&&w.length?Qu(w,Yt,C):t}function _ae(w,R){return w&&w.length?Qu(w,Hi(R,2),C):t}var xae=xA(function(w,R){return w*R},1),Mae=v1("round"),wae=xA(function(w,R){return w-R},0);function Sae(w){return w&&w.length?Ad(w,Yt):0}function Eae(w,R){return w&&w.length?Ad(w,Hi(R,2)):0}return qe.after=Gx,qe.ary=Sv,qe.assign=Pv,qe.assignIn=vC,qe.assignInWith=O0,qe.assignWith=bC,qe.at=Qx,qe.before=b0,qe.bind=kf,qe.bindAll=Re,qe.bindKey=G1,qe.castArray=hC,qe.chain=Vm,qe.chunk=Fm,qe.compact=uv,qe.concat=h0,qe.cond=Ye,qe.conforms=bt,qe.constant=Gt,qe.countBy=Zm,qe.create=CC,qe.curry=C0,qe.curryRight=W1,qe.debounce=Ud,qe.defaults=Uv,qe.defaultsDeep=ny,qe.defer=eh,qe.delay=nA,qe.difference=Rs,qe.differenceBy=Ul,qe.differenceWith=zh,qe.drop=cv,qe.dropRight=zm,qe.dropRightWhile=Av,qe.dropWhile=Of,qe.fill=Mu,qe.filter=sC,qe.flatMap=Cv,qe.flatMapDeep=jx,qe.flatMapDepth=Nx,qe.flatten=Sc,qe.flattenDeep=hv,qe.flattenDepth=Ec,qe.flip=Tf,qe.flow=fn,qe.flowRight=en,qe.fromPairs=Rp,qe.functions=ig,qe.functionsIn=rg,qe.groupBy=xv,qe.initial=d0,qe.intersection=XA,qe.intersectionBy=dv,qe.intersectionWith=jm,qe.invert=f,qe.invertBy=u,qe.invokeMap=g0,qe.iteratee=sr,qe.keyBy=Dd,qe.keys=b,qe.keysIn=S,qe.map=Pd,qe.mapKeys=k,qe.mapValues=D,qe.matches=nr,qe.matchesProperty=os,qe.memoize=Jm,qe.merge=K,qe.mergeWith=W,qe.method=Lt,qe.methodOf=Et,qe.mixin=Wt,qe.negate=zp,qe.nthArg=io,qe.omit=ee,qe.omitBy=re,qe.once=AC,qe.orderBy=Fp,qe.over=qi,qe.overArgs=_0,qe.overEvery=ur,qe.overSome=Fl,qe.partial=x0,qe.partialRight=Q1,qe.partition=y0,qe.pick=he,qe.pickBy=Oe,qe.property=Po,qe.propertyOf=Lf,qe.pull=Pp,qe.pullAll=Gm,qe.pullAllBy=tC,qe.pullAllWith=p0,qe.pullAt=nC,qe.range=qx,qe.rangeRight=zd,qe.rearg=q1,qe.reject=z1,qe.remove=iC,qe.rest=Y1,qe.reverse=fv,qe.sampleSize=wv,qe.set=Ke,qe.setWith=Ge,qe.shuffle=Ds,qe.slice=$o,qe.sortBy=N1,qe.sortedUniq=Wm,qe.sortedUniqBy=pv,qe.split=va,qe.spread=eg,qe.tail=tA,qe.take=ga,qe.takeRight=Bf,qe.takeRightWhile=Up,qe.takeWhile=mv,qe.tap=Lp,qe.throttle=$1,qe.thru=wo,qe.toArray=rA,qe.toPairs=Ve,qe.toPairsIn=at,qe.toPath=th,qe.toPlainObject=ty,qe.transform=Tt,qe.unary=V1,qe.union=SA,qe.unionBy=Qm,qe.unionWith=qm,qe.uniq=Su,qe.uniqBy=D1,qe.uniqWith=P1,qe.unset=ft,qe.unzip=Kp,qe.unzipWith=m0,qe.update=_t,qe.updateWith=Nt,qe.values=Jt,qe.valuesIn=An,qe.without=JA,qe.words=N,qe.wrap=Ev,qe.xor=nu,qe.xorBy=Td,qe.xorWith=Ym,qe.zip=$m,qe.zipObject=gv,qe.zipObjectDeep=U1,qe.zipWith=rC,qe.entries=Ve,qe.entriesIn=at,qe.extend=vC,qe.extendWith=O0,Wt(qe,qe),qe.add=jd,qe.attempt=te,qe.camelCase=Ci,qe.capitalize=jn,qe.ceil=k0,qe.clamp=Wn,qe.clone=Rf,qe.cloneDeep=fC,qe.cloneDeepWith=ho,qe.cloneWith=dC,qe.conformsTo=H1,qe.deburr=Un,qe.defaultTo=an,qe.divide=Ff,qe.endsWith=rn,qe.eq=Ic,qe.escape=Ui,qe.escapeRegExp=Qi,qe.every=oC,qe.find=aC,qe.findIndex=tu,qe.findKey=Wp,qe.findLast=bv,qe.findLastIndex=Tp,qe.findLastKey=Fd,qe.floor=mae,qe.forEach=lC,qe.forEachRight=_v,qe.forIn=iy,qe.forInRight=_C,qe.forOwn=Uf,qe.forOwnRight=Kf,qe.get=Qp,qe.gt=Ov,qe.gte=pC,qe.has=B0,qe.hasIn=og,qe.head=jh,qe.identity=Yt,qe.includes=If,qe.indexOf=Dp,qe.inRange=Dn,qe.invoke=d,qe.isArguments=Kd,qe.isArray=yr,qe.isArrayBuffer=tg,qe.isArrayLike=Ys,qe.isArrayLikeObject=ya,qe.isBoolean=mC,qe.isBuffer=Ld,qe.isDate=Bv,qe.isElement=Iv,qe.isEmpty=ng,qe.isEqual=ds,qe.isEqualWith=jp,qe.isError=nl,qe.isFinite=kv,qe.isFunction=EA,qe.isInteger=Eu,qe.isLength=OA,qe.isMap=M0,qe.isMatch=Z1,qe.isMatchWith=gC,qe.isNaN=Tv,qe.isNative=Wx,qe.isNil=Df,qe.isNull=Rv,qe.isNumber=Dv,qe.isObject=Es,qe.isObjectLike=fs,qe.isPlainObject=iA,qe.isRegExp=w0,qe.isSafeInteger=X1,qe.isSet=yC,qe.isString=J1,qe.isSymbol=Ou,qe.isTypedArray=Np,qe.isUndefined=kc,qe.isWeakMap=ey,qe.isWeakSet=S0,qe.join=f0,qe.kebabCase=Mi,qe.last=wu,qe.lastIndexOf=Nm,qe.lowerCase=oi,qe.lowerFirst=Qr,qe.lt=E0,qe.lte=Pf,qe.max=gae,qe.maxBy=yae,qe.mean=vae,qe.meanBy=bae,qe.min=Cae,qe.minBy=_ae,qe.stubArray=ry,qe.stubFalse=xC,qe.stubObject=z6,qe.stubString=j6,qe.stubTrue=N6,qe.multiply=xae,qe.nth=eC,qe.noConflict=hn,qe.noop=Oi,qe.now=Xm,qe.pad=$s,qe.padEnd=na,qe.padStart=Kl,qe.parseInt=Tc,qe.random=Nn,qe.reduce=v0,qe.reduceRight=uC,qe.repeat=Ll,qe.replace=il,qe.result=De,qe.round=Mae,qe.runInContext=Pt,qe.sample=Mv,qe.size=j1,qe.snakeCase=Vs,qe.some=cC,qe.sortedIndex=rs,qe.sortedIndexBy=Zr,qe.sortedIndexOf=Io,qe.sortedLastIndex=hs,qe.sortedLastIndexBy=Oc,qe.sortedLastIndexOf=kd,qe.startCase=Ra,qe.startsWith=rl,qe.subtract=wae,qe.sum=Sae,qe.sumBy=Eae,qe.template=ol,qe.times=Ju,qe.toFinite=Nh,qe.toInteger=Br,qe.toLength=Zu,qe.toLower=Xu,qe.toNumber=ps,qe.toSafeInteger=Gp,qe.toString=zo,qe.toUpper=ba,qe.trim=Bu,qe.trimEnd=qa,qe.trimStart=Ca,qe.truncate=h,qe.unescape=g,qe.uniqueId=I0,qe.upperCase=M,qe.upperFirst=I,qe.each=lC,qe.eachRight=_v,qe.first=jh,Wt(qe,(function(){var w={};return Jn(qe,function(R,$){Eo.call(qe.prototype,$)||(w[$]=R)}),w})(),{chain:!1}),qe.VERSION=i,ts(["bind","bindKey","curry","curryRight","partial","partialRight"],function(w){qe[w].placeholder=qe}),ts(["drop","take"],function(w,R){Gr.prototype[w]=function($){$=$===t?1:Wo(Br($),0);var de=this.__filtered__&&!R?new Gr(this):this.clone();return de.__filtered__?de.__takeCount__=ns($,de.__takeCount__):de.__views__.push({size:ns($,Le),type:w+(de.__dir__<0?"Right":"")}),de},Gr.prototype[w+"Right"]=function($){return this.reverse()[w]($).reverse()}}),ts(["filter","map","takeWhile"],function(w,R){var $=R+1,de=$==ke||$==Ie;Gr.prototype[w]=function(ze){var Je=this.clone();return Je.__iteratees__.push({iteratee:Hi(ze,3),type:$}),Je.__filtered__=Je.__filtered__||de,Je}}),ts(["head","last"],function(w,R){var $="take"+(R?"Right":"");Gr.prototype[w]=function(){return this[$](1).value()[0]}}),ts(["initial","tail"],function(w,R){var $="drop"+(R?"":"Right");Gr.prototype[w]=function(){return this.__filtered__?new Gr(this):this[$](1)}}),Gr.prototype.compact=function(){return this.filter(Yt)},Gr.prototype.find=function(w){return this.filter(w).head()},Gr.prototype.findLast=function(w){return this.reverse().find(w)},Gr.prototype.invokeMap=nt(function(w,R){return typeof w=="function"?new Gr(this):this.map(function($){return YA($,w,R)})}),Gr.prototype.reject=function(w){return this.filter(zp(Hi(w)))},Gr.prototype.slice=function(w,R){w=Br(w);var $=this;return $.__filtered__&&(w>0||R<0)?new Gr($):(w<0?$=$.takeRight(-w):w&&($=$.drop(w)),R!==t&&(R=Br(R),$=R<0?$.dropRight(-R):$.take(R-w)),$)},Gr.prototype.takeRightWhile=function(w){return this.reverse().takeWhile(w).reverse()},Gr.prototype.toArray=function(){return this.take(Le)},Jn(Gr.prototype,function(w,R){var $=/^(?:filter|find|map|reject)|While$/.test(R),de=/^(?:head|last)$/.test(R),ze=qe[de?"take"+(R=="last"?"Right":""):R],Je=de||/^find/.test(R);ze&&(qe.prototype[R]=function(){var Ct=this.__wrapped__,kt=de?[1]:arguments,zt=Ct instanceof Gr,Cn=kt[0],xn=zt||yr(Ct),Ln=function(Uo){var Vo=ze.apply(qe,dA([Uo],kt));return de&&gi?Vo[0]:Vo};xn&&$&&typeof Cn=="function"&&Cn.length!=1&&(zt=xn=!1);var gi=this.__chain__,Zi=!!this.__actions__.length,vr=Je&&!gi,vo=zt&&!Zi;if(!Je&&xn){Ct=vo?Ct:new Gr(this);var br=w.apply(Ct,kt);return br.__actions__.push({func:wo,args:[Ln],thisArg:t}),new Hl(br,gi)}return vr&&vo?w.apply(this,kt):(br=this.thru(Ln),vr?de?br.value()[0]:br.value():br)})}),ts(["pop","push","shift","sort","splice","unshift"],function(w){var R=ff[w],$=/^(?:push|sort|unshift)$/.test(w)?"tap":"thru",de=/^(?:pop|shift)$/.test(w);qe.prototype[w]=function(){var ze=arguments;if(de&&!this.__chain__){var Je=this.value();return R.apply(yr(Je)?Je:[],ze)}return this[$](function(Ct){return R.apply(yr(Ct)?Ct:[],ze)})}}),Jn(Gr.prototype,function(w,R){var $=qe[R];if($){var de=$.name+"";Eo.call(mc,de)||(mc[de]=[]),mc[de].push({name:R,func:$})}}),mc[qs(t,j).name]=[{name:"wrapper",func:t}],Gr.prototype.clone=gf,Gr.prototype.reverse=yp,Gr.prototype.value=Bh,qe.prototype.at=K1,qe.prototype.chain=Bc,qe.prototype.commit=yv,qe.prototype.next=L1,qe.prototype.plant=Rd,qe.prototype.reverse=F1,qe.prototype.toJSON=qe.prototype.valueOf=qe.prototype.value=vv,qe.prototype.first=qe.prototype.head,_h&&(qe.prototype[_h]=Hm),qe}),fu=bh();Or?((Or.exports=fu)._=fu,Ei._=fu):Ri._=fu}).call(pue)})(C2,C2.exports)),C2.exports}var T4=mue();const qT=Wl(T4);function gue(n,e,t){const i=e<0?n.length+e:e;if(i>=0&&i<n.length){const r=t<0?n.length+t:t,[o]=n.splice(e,1);n.splice(r,0,o)}}var nO,dF;function yue(){if(dF)return nO;dF=1;function n(e){for(var t=5381,i=e.length;i;)t=t*33^e.charCodeAt(--i);return t>>>0}return nO=n,nO}var vue=yue();const fF=Wl(vue);var Zd=Uint8Array,g_=Uint16Array,bue=Int32Array,iZ=new Zd([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),rZ=new Zd([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Cue=new Zd([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),oZ=function(n,e){for(var t=new g_(31),i=0;i<31;++i)t[i]=e+=1<<n[i-1];for(var r=new bue(t[30]),i=1;i<30;++i)for(var o=t[i];o<t[i+1];++o)r[o]=o-t[i]<<5|i;return{b:t,r}},sZ=oZ(iZ,2),aZ=sZ.b,_ue=sZ.r;aZ[28]=258,_ue[258]=28;var xue=oZ(rZ,0),Mue=xue.b,YT=new g_(32768);for(var Ha=0;Ha<32768;++Ha){var oy=(Ha&43690)>>1|(Ha&21845)<<1;oy=(oy&52428)>>2|(oy&13107)<<2,oy=(oy&61680)>>4|(oy&3855)<<4,YT[Ha]=((oy&65280)>>8|(oy&255)<<8)>>1}var Y2=(function(n,e,t){for(var i=n.length,r=0,o=new g_(e);r<i;++r)n[r]&&++o[n[r]-1];var s=new g_(e);for(r=1;r<e;++r)s[r]=s[r-1]+o[r-1]<<1;var a;if(t){a=new g_(1<<e);var c=15-e;for(r=0;r<i;++r)if(n[r])for(var A=r<<4|n[r],m=e-n[r],v=s[n[r]-1]++<<m,x=v|(1<<m)-1;v<=x;++v)a[YT[v]>>c]=A}else for(a=new g_(i),r=0;r<i;++r)n[r]&&(a[r]=YT[s[n[r]-1]++]>>15-n[r]);return a}),R4=new Zd(288);for(var Ha=0;Ha<144;++Ha)R4[Ha]=8;for(var Ha=144;Ha<256;++Ha)R4[Ha]=9;for(var Ha=256;Ha<280;++Ha)R4[Ha]=7;for(var Ha=280;Ha<288;++Ha)R4[Ha]=8;var lZ=new Zd(32);for(var Ha=0;Ha<32;++Ha)lZ[Ha]=5;var wue=Y2(R4,9,1),Sue=Y2(lZ,5,1),iO=function(n){for(var e=n[0],t=1;t<n.length;++t)n[t]>e&&(e=n[t]);return e},Yp=function(n,e,t){var i=e/8|0;return(n[i]|n[i+1]<<8)>>(e&7)&t},rO=function(n,e){var t=e/8|0;return(n[t]|n[t+1]<<8|n[t+2]<<16)>>(e&7)},Eue=function(n){return(n+7)/8|0},Oue=function(n,e,t){return(t==null||t>n.length)&&(t=n.length),new Zd(n.subarray(e,t))},Bue=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Yd=function(n,e,t){var i=new Error(e||Bue[n]);if(i.code=n,Error.captureStackTrace&&Error.captureStackTrace(i,Yd),!t)throw i;return i},RD=function(n,e,t,i){var r=n.length,o=0;if(!r||e.f&&!e.l)return t||new Zd(0);var s=!t,a=s||e.i!=2,c=e.i;s&&(t=new Zd(r*3));var A=function(Ne){var ut=t.length;if(Ne>ut){var rt=new Zd(Math.max(ut*2,Ne));rt.set(t),t=rt}},m=e.f||0,v=e.p||0,x=e.b||0,_=e.l,O=e.d,P=e.m,F=e.n,j=r*8;do{if(!_){m=Yp(n,v,1);var Q=Yp(n,v+1,3);if(v+=3,Q)if(Q==1)_=wue,O=Sue,P=9,F=5;else if(Q==2){var Y=Yp(n,v,31)+257,z=Yp(n,v+10,15)+4,se=Y+Yp(n,v+5,31)+1;v+=14;for(var le=new Zd(se),me=new Zd(19),fe=0;fe<z;++fe)me[Cue[fe]]=Yp(n,v+fe*3,7);v+=z*3;for(var _e=iO(me),we=(1<<_e)-1,ke=Y2(me,_e,1),fe=0;fe<se;){var je=ke[Yp(n,v,we)];v+=je&15;var V=je>>4;if(V<16)le[fe++]=V;else{var Ie=0,Qe=0;for(V==16?(Qe=3+Yp(n,v,3),v+=2,Ie=le[fe-1]):V==17?(Qe=3+Yp(n,v,7),v+=3):V==18&&(Qe=11+Yp(n,v,127),v+=7);Qe--;)le[fe++]=Ie}}var tt=le.subarray(0,Y),ht=le.subarray(Y);P=iO(tt),F=iO(ht),_=Y2(tt,P,1),O=Y2(ht,F,1)}else Yd(1);else{var V=Eue(v)+4,H=n[V-4]|n[V-3]<<8,G=V+H;if(G>r){c&&Yd(0);break}a&&A(x+H),t.set(n.subarray(V,G),x),e.b=x+=H,e.p=v=G*8,e.f=m;continue}if(v>j){c&&Yd(0);break}}a&&A(x+131072);for(var ce=(1<<P)-1,Le=(1<<F)-1,We=v;;We=v){var Ie=_[rO(n,v)&ce],Me=Ie>>4;if(v+=Ie&15,v>j){c&&Yd(0);break}if(Ie||Yd(2),Me<256)t[x++]=Me;else if(Me==256){We=v,_=null;break}else{var dt=Me-254;if(Me>264){var fe=Me-257,it=iZ[fe];dt=Yp(n,v,(1<<it)-1)+aZ[fe],v+=it}var vt=O[rO(n,v)&Le],Ut=vt>>4;vt||Yd(3),v+=vt&15;var ht=Mue[Ut];if(Ut>3){var it=rZ[Ut];ht+=rO(n,v)&(1<<it)-1,v+=it}if(v>j){c&&Yd(0);break}a&&A(x+131072);var Pe=x+dt;if(x<ht){var Te=o-ht,Se=Math.min(ht,Pe);for(Te+x<0&&Yd(3);x<Se;++x)t[x]=i[Te+x]}for(;x<Pe;++x)t[x]=t[x-ht]}}e.l=_,e.p=We,e.b=x,e.f=m,_&&(m=1,e.m=P,e.d=O,e.n=F)}while(!m);return x!=t.length&&s?Oue(t,0,x):t.subarray(0,x)},Iue=new Zd(0),kue=function(n){(n[0]!=31||n[1]!=139||n[2]!=8)&&Yd(6,"invalid gzip data");var e=n[3],t=10;e&4&&(t+=(n[10]|n[11]<<8)+2);for(var i=(e>>3&1)+(e>>4&1);i>0;i-=!n[t++]);return t+(e&2)},Tue=function(n){var e=n.length;return(n[e-4]|n[e-3]<<8|n[e-2]<<16|n[e-1]<<24)>>>0},Rue=function(n,e){return((n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31)&&Yd(6,"invalid zlib data"),(n[1]>>5&1)==1&&Yd(6,"invalid zlib data: "+(n[1]&32?"need":"unexpected")+" dictionary"),(n[1]>>3&4)+2};function Due(n,e){return RD(n,{i:2},e,e)}function Pue(n,e){var t=kue(n);return t+8>n.length&&Yd(6,"invalid gzip data"),RD(n.subarray(t,-8),{i:2},new Zd(Tue(n)),e)}function Uue(n,e){return RD(n.subarray(Rue(n),-4),{i:2},e,e)}function Kue(n,e){return n[0]==31&&n[1]==139&&n[2]==8?Pue(n,e):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?Due(n,e):Uue(n,e)}var Lue=typeof TextDecoder<"u"&&new TextDecoder,Fue=0;try{Lue.decode(Iue,{stream:!0}),Fue=1}catch{}var zue=Object.defineProperty,$2=Math.pow,ha=(n,e)=>zue(n,"name",{value:e,configurable:!0}),Uc=(n,e,t)=>new Promise((i,r)=>{var o=c=>{try{a(t.next(c))}catch(A){r(A)}},s=c=>{try{a(t.throw(c))}catch(A){r(A)}},a=c=>c.done?i(c.value):Promise.resolve(c.value).then(o,s);a((t=t.apply(n,e)).next())});ha((n,e)=>{let t=!1,i="",r=L.GridLayer.extend({createTile:ha((o,s)=>{let a=document.createElement("img"),c=new AbortController,A=c.signal;return a.cancel=()=>{c.abort()},t||(n.getHeader().then(m=>{m.tileType===1?console.error("Error: archive contains MVT vector tiles, but leafletRasterLayer is for displaying raster tiles. See https://github.com/protomaps/PMTiles/tree/main/js for details."):m.tileType===2?i="image/png":m.tileType===3?i="image/jpeg":m.tileType===4?i="image/webp":m.tileType===5&&(i="image/avif")}),t=!0),n.getZxy(o.z,o.x,o.y,A).then(m=>{if(m){let v=new Blob([m.data],{type:i}),x=window.URL.createObjectURL(v);a.src=x,a.cancel=void 0,s(void 0,a)}}).catch(m=>{if(m.name!=="AbortError")throw m}),a},"createTile"),_removeTile:ha(function(o){let s=this._tiles[o];s&&(s.el.cancel&&s.el.cancel(),s.el.width=0,s.el.height=0,s.el.deleted=!0,L.DomUtil.remove(s.el),delete this._tiles[o],this.fire("tileunload",{tile:s.el,coords:this._keyToTileCoords(o)}))},"_removeTile")});return new r(e)},"leafletRasterLayer");var jue=ha(n=>(e,t)=>{if(t instanceof AbortController)return n(e,t);let i=new AbortController;return n(e,i).then(r=>t(void 0,r.data,r.cacheControl||"",r.expires||""),r=>t(r)).catch(r=>t(r)),{cancel:ha(()=>i.abort(),"cancel")}},"v3compat"),uZ=class{constructor(e){this.tilev4=ha((t,i)=>Uc(this,null,function*(){if(t.type==="json"){let _=t.url.substr(10),O=this.tiles.get(_);if(O||(O=new VT(_),this.tiles.set(_,O)),this.metadata)return{data:yield O.getTileJson(t.url)};let P=yield O.getHeader();return(P.minLon>=P.maxLon||P.minLat>=P.maxLat)&&console.error(`Bounds of PMTiles archive ${P.minLon},${P.minLat},${P.maxLon},${P.maxLat} are not valid.`),{data:{tiles:[`${t.url}/{z}/{x}/{y}`],minzoom:P.minZoom,maxzoom:P.maxZoom,bounds:[P.minLon,P.minLat,P.maxLon,P.maxLat]}}}let r=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),o=t.url.match(r);if(!o)throw new Error("Invalid PMTiles protocol URL");let s=o[1],a=this.tiles.get(s);a||(a=new VT(s),this.tiles.set(s,a));let c=o[2],A=o[3],m=o[4],v=yield a.getHeader(),x=yield a?.getZxy(+c,+A,+m,i.signal);if(x)return{data:new Uint8Array(x.data),cacheControl:x.cacheControl,expires:x.expires};if(v.tileType===1){if(this.errorOnMissingTile)throw new Error("Tile not found.");return{data:new Uint8Array}}return{data:null}}),"tilev4"),this.tile=jue(this.tilev4),this.tiles=new Map,this.metadata=e?.metadata||!1,this.errorOnMissingTile=e?.errorOnMissingTile||!1}add(e){this.tiles.set(e.source.getKey(),e)}get(e){return this.tiles.get(e)}};ha(uZ,"Protocol");var Nue=uZ;function cZ(n,e){return(e>>>0)*4294967296+(n>>>0)}ha(cZ,"toNum");function AZ(n,e){let t=e.buf,i=t[e.pos++],r=(i&112)>>4;if(i<128||(i=t[e.pos++],r|=(i&127)<<3,i<128)||(i=t[e.pos++],r|=(i&127)<<10,i<128)||(i=t[e.pos++],r|=(i&127)<<17,i<128)||(i=t[e.pos++],r|=(i&127)<<24,i<128)||(i=t[e.pos++],r|=(i&1)<<31,i<128))return cZ(n,r);throw new Error("Expected varint not more than 10 bytes")}ha(AZ,"readVarintRemainder");function i_(n){let e=n.buf,t=e[n.pos++],i=t&127;return t<128||(t=e[n.pos++],i|=(t&127)<<7,t<128)||(t=e[n.pos++],i|=(t&127)<<14,t<128)||(t=e[n.pos++],i|=(t&127)<<21,t<128)?i:(t=e[n.pos],i|=(t&15)<<28,AZ(i,n))}ha(i_,"readVarint");function DD(n,e,t,i){if(i===0){t===1&&(e[0]=n-1-e[0],e[1]=n-1-e[1]);let r=e[0];e[0]=e[1],e[1]=r}}ha(DD,"rotate");function hZ(n,e){let t=$2(2,n),i=e,r=e,o=e,s=[0,0],a=1;for(;a<t;)i=1&o/2,r=1&(o^i),DD(a,s,i,r),s[0]+=a*i,s[1]+=a*r,o=o/4,a*=2;return[n,s[0],s[1]]}ha(hZ,"idOnLevel");var Gue=[0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,0x5555555555555];function dZ(n,e,t){if(n>26)throw new Error("Tile zoom level exceeds max safe number limit (26)");if(e>$2(2,n)-1||t>$2(2,n)-1)throw new Error("tile x/y outside zoom level bounds");let i=Gue[n],r=$2(2,n),o=0,s=0,a=0,c=[e,t],A=r/2;for(;A>0;)o=(c[0]&A)>0?1:0,s=(c[1]&A)>0?1:0,a+=A*A*(3*o^s),DD(A,c,o,s),A=A/2;return i+a}ha(dZ,"zxyToTileId");function Wue(n){let e=0;for(let t=0;t<27;t++){let i=(1<<t)*(1<<t);if(e+i>n)return hZ(t,n-e);e+=i}throw new Error("Tile zoom level exceeds max safe number limit (26)")}ha(Wue,"tileIdToZxy");var Que=(n=>(n[n.Unknown=0]="Unknown",n[n.None=1]="None",n[n.Gzip=2]="Gzip",n[n.Brotli=3]="Brotli",n[n.Zstd=4]="Zstd",n))(Que||{});function YS(n,e){return Uc(this,null,function*(){if(e===1||e===0)return n;if(e===2){if(typeof globalThis.DecompressionStream>"u")return Kue(new Uint8Array(n));let t=new Response(n).body;if(!t)throw new Error("Failed to read response stream");let i=t.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(i).arrayBuffer()}throw new Error("Compression method not supported")})}ha(YS,"defaultDecompress");var que=(n=>(n[n.Unknown=0]="Unknown",n[n.Mvt=1]="Mvt",n[n.Png=2]="Png",n[n.Jpeg=3]="Jpeg",n[n.Webp=4]="Webp",n[n.Avif=5]="Avif",n))(que||{});function fZ(n){return n===1?".mvt":n===2?".png":n===3?".jpg":n===4?".webp":n===5?".avif":""}ha(fZ,"tileTypeExt");var Yue=127;function pZ(n,e){let t=0,i=n.length-1;for(;t<=i;){let r=i+t>>1,o=e-n[r].tileId;if(o>0)t=r+1;else if(o<0)i=r-1;else return n[r]}return i>=0&&(n[i].runLength===0||e-n[i].tileId<n[i].runLength)?n[i]:null}ha(pZ,"findTile");var $ue=class{constructor(e){this.file=e}getKey(){return this.file.name}getBytes(e,t){return Uc(this,null,function*(){return{data:yield this.file.slice(e,e+t).arrayBuffer()}})}};ha($ue,"FileSource");var mZ=class{constructor(e,t=new Headers){this.url=e,this.customHeaders=t,this.mustReload=!1;let i="";"navigator"in globalThis&&(i=globalThis.navigator.userAgent||"");let r=i.indexOf("Windows")>-1,o=/Chrome|Chromium|Edg|OPR|Brave/.test(i);this.chromeWindowsNoCache=!1,r&&o&&(this.chromeWindowsNoCache=!0)}getKey(){return this.url}setHeaders(e){this.customHeaders=e}getBytes(e,t,i,r){return Uc(this,null,function*(){let o,s;i?s=i:(o=new AbortController,s=o.signal);let a=new Headers(this.customHeaders);a.set("range",`bytes=${e}-${e+t-1}`);let c;this.mustReload?c="reload":this.chromeWindowsNoCache&&(c="no-store");let A=yield fetch(this.url,{signal:s,cache:c,headers:a});if(e===0&&A.status===416){let x=A.headers.get("Content-Range");if(!x||!x.startsWith("bytes */"))throw new Error("Missing content-length on 416 response");let _=+x.substr(8);A=yield fetch(this.url,{signal:s,cache:"reload",headers:{range:`bytes=0-${_-1}`}})}let m=A.headers.get("Etag");if(m!=null&&m.startsWith("W/")&&(m=null),A.status===416||r&&m&&m!==r)throw this.mustReload=!0,new $T(`Server returned non-matching ETag ${r} after one retry. Check browser extensions and servers for issues that may affect correct ETag headers.`);if(A.status>=300)throw new Error(`Bad response code: ${A.status}`);let v=A.headers.get("Content-Length");if(A.status===200&&(!v||+v>t))throw o&&o.abort(),new Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield A.arrayBuffer(),etag:m||void 0,cacheControl:A.headers.get("Cache-Control")||void 0,expires:A.headers.get("Expires")||void 0}})}};ha(mZ,"FetchSource");var Vue=mZ;function jf(n,e){let t=n.getUint32(e+4,!0),i=n.getUint32(e+0,!0);return t*$2(2,32)+i}ha(jf,"getUint64");function gZ(n,e){let t=new DataView(n),i=t.getUint8(7);if(i>3)throw new Error(`Archive is spec version ${i} but this library supports up to spec version 3`);return{specVersion:i,rootDirectoryOffset:jf(t,8),rootDirectoryLength:jf(t,16),jsonMetadataOffset:jf(t,24),jsonMetadataLength:jf(t,32),leafDirectoryOffset:jf(t,40),leafDirectoryLength:jf(t,48),tileDataOffset:jf(t,56),tileDataLength:jf(t,64),numAddressedTiles:jf(t,72),numTileEntries:jf(t,80),numTileContents:jf(t,88),clustered:t.getUint8(96)===1,internalCompression:t.getUint8(97),tileCompression:t.getUint8(98),tileType:t.getUint8(99),minZoom:t.getUint8(100),maxZoom:t.getUint8(101),minLon:t.getInt32(102,!0)/1e7,minLat:t.getInt32(106,!0)/1e7,maxLon:t.getInt32(110,!0)/1e7,maxLat:t.getInt32(114,!0)/1e7,centerZoom:t.getUint8(118),centerLon:t.getInt32(119,!0)/1e7,centerLat:t.getInt32(123,!0)/1e7,etag:e}}ha(gZ,"bytesToHeader");function PD(n){let e={buf:new Uint8Array(n),pos:0},t=i_(e),i=[],r=0;for(let o=0;o<t;o++){let s=i_(e);i.push({tileId:r+s,offset:0,length:0,runLength:1}),r+=s}for(let o=0;o<t;o++)i[o].runLength=i_(e);for(let o=0;o<t;o++)i[o].length=i_(e);for(let o=0;o<t;o++){let s=i_(e);s===0&&o>0?i[o].offset=i[o-1].offset+i[o-1].length:i[o].offset=s-1}return i}ha(PD,"deserializeIndex");var yZ=class extends Error{};ha(yZ,"EtagMismatch");var $T=yZ;function UD(n,e){return Uc(this,null,function*(){let t=yield n.getBytes(0,16384);if(new DataView(t.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic number for PMTiles archive");let i=t.data.slice(0,Yue),r=gZ(i,t.etag),o=t.data.slice(r.rootDirectoryOffset,r.rootDirectoryOffset+r.rootDirectoryLength),s=`${n.getKey()}|${r.etag||""}|${r.rootDirectoryOffset}|${r.rootDirectoryLength}`,a=PD(yield e(o,r.internalCompression));return[r,[s,a.length,a]]})}ha(UD,"getHeaderAndRoot");function KD(n,e,t,i,r){return Uc(this,null,function*(){let o=yield n.getBytes(t,i,void 0,r.etag),s=yield e(o.data,r.internalCompression),a=PD(s);if(a.length===0)throw new Error("Empty directory is invalid");return a})}ha(KD,"getDirectory");var Hue=class{constructor(e=100,t=!0,i=YS){this.cache=new Map,this.maxCacheEntries=e,this.counter=1,this.decompress=i}getHeader(e){return Uc(this,null,function*(){let t=e.getKey(),i=this.cache.get(t);if(i)return i.lastUsed=this.counter++,i.data;let r=yield UD(e,this.decompress);return r[1]&&this.cache.set(r[1][0],{lastUsed:this.counter++,data:r[1][2]}),this.cache.set(t,{lastUsed:this.counter++,data:r[0]}),this.prune(),r[0]})}getDirectory(e,t,i,r){return Uc(this,null,function*(){let o=`${e.getKey()}|${r.etag||""}|${t}|${i}`,s=this.cache.get(o);if(s)return s.lastUsed=this.counter++,s.data;let a=yield KD(e,this.decompress,t,i,r);return this.cache.set(o,{lastUsed:this.counter++,data:a}),this.prune(),a})}prune(){if(this.cache.size>this.maxCacheEntries){let e=1/0,t;this.cache.forEach((i,r)=>{i.lastUsed<e&&(e=i.lastUsed,t=r)}),t&&this.cache.delete(t)}}invalidate(e){return Uc(this,null,function*(){this.cache.delete(e.getKey())})}};ha(Hue,"ResolvedValueCache");var vZ=class{constructor(e=100,t=!0,i=YS){this.cache=new Map,this.invalidations=new Map,this.maxCacheEntries=e,this.counter=1,this.decompress=i}getHeader(e){return Uc(this,null,function*(){let t=e.getKey(),i=this.cache.get(t);if(i)return i.lastUsed=this.counter++,yield i.data;let r=new Promise((o,s)=>{UD(e,this.decompress).then(a=>{a[1]&&this.cache.set(a[1][0],{lastUsed:this.counter++,data:Promise.resolve(a[1][2])}),o(a[0]),this.prune()}).catch(a=>{s(a)})});return this.cache.set(t,{lastUsed:this.counter++,data:r}),r})}getDirectory(e,t,i,r){return Uc(this,null,function*(){let o=`${e.getKey()}|${r.etag||""}|${t}|${i}`,s=this.cache.get(o);if(s)return s.lastUsed=this.counter++,yield s.data;let a=new Promise((c,A)=>{KD(e,this.decompress,t,i,r).then(m=>{c(m),this.prune()}).catch(m=>{A(m)})});return this.cache.set(o,{lastUsed:this.counter++,data:a}),a})}prune(){if(this.cache.size>=this.maxCacheEntries){let e=1/0,t;this.cache.forEach((i,r)=>{i.lastUsed<e&&(e=i.lastUsed,t=r)}),t&&this.cache.delete(t)}}invalidate(e){return Uc(this,null,function*(){let t=e.getKey();if(this.invalidations.get(t))return yield this.invalidations.get(t);this.cache.delete(e.getKey());let i=new Promise((r,o)=>{this.getHeader(e).then(s=>{r(),this.invalidations.delete(t)}).catch(s=>{o(s)})});this.invalidations.set(t,i)})}};ha(vZ,"SharedPromiseCache");var Zue=vZ,bZ=class{constructor(e,t,i){typeof e=="string"?this.source=new Vue(e):this.source=e,i?this.decompress=i:this.decompress=YS,t?this.cache=t:this.cache=new Zue}getHeader(){return Uc(this,null,function*(){return yield this.cache.getHeader(this.source)})}getZxyAttempt(e,t,i,r){return Uc(this,null,function*(){let o=dZ(e,t,i),s=yield this.cache.getHeader(this.source);if(e<s.minZoom||e>s.maxZoom)return;let a=s.rootDirectoryOffset,c=s.rootDirectoryLength;for(let A=0;A<=3;A++){let m=yield this.cache.getDirectory(this.source,a,c,s),v=pZ(m,o);if(v){if(v.runLength>0){let x=yield this.source.getBytes(s.tileDataOffset+v.offset,v.length,r,s.etag);return{data:yield this.decompress(x.data,s.tileCompression),cacheControl:x.cacheControl,expires:x.expires}}a=s.leafDirectoryOffset+v.offset,c=v.length}else return}throw new Error("Maximum directory depth exceeded")})}getZxy(e,t,i,r){return Uc(this,null,function*(){try{return yield this.getZxyAttempt(e,t,i,r)}catch(o){if(o instanceof $T)return this.cache.invalidate(this.source),yield this.getZxyAttempt(e,t,i,r);throw o}})}getMetadataAttempt(){return Uc(this,null,function*(){let e=yield this.cache.getHeader(this.source),t=yield this.source.getBytes(e.jsonMetadataOffset,e.jsonMetadataLength,void 0,e.etag),i=yield this.decompress(t.data,e.internalCompression),r=new TextDecoder("utf-8");return JSON.parse(r.decode(i))})}getMetadata(){return Uc(this,null,function*(){try{return yield this.getMetadataAttempt()}catch(e){if(e instanceof $T)return this.cache.invalidate(this.source),yield this.getMetadataAttempt();throw e}})}getTileJson(e){return Uc(this,null,function*(){let t=yield this.getHeader(),i=yield this.getMetadata(),r=fZ(t.tileType);return{tilejson:"3.0.0",scheme:"xyz",tiles:[`${e}/{z}/{x}/{y}${r}`],vector_layers:i.vector_layers,attribution:i.attribution,description:i.description,name:i.name,version:i.version,bounds:[t.minLon,t.minLat,t.maxLon,t.maxLat],center:[t.centerLon,t.centerLat,t.centerZoom],minzoom:t.minZoom,maxzoom:t.maxZoom}})}};ha(bZ,"PMTiles");var VT=bZ,Xue=8,Jue={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"},"font-faces":{type:"array",value:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},ece={"*":{type:"source"}},tce=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],nce={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:"*"}},ice={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:"*"}},rce={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:"*"}},oce={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"}},sce={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"}}},ace={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"}}},lce={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},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"}},uce=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],cce={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ace={"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"}},hce={"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"}},dce={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},fce={"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"}},pce={"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"}},mce={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},gce={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},yce={type:"array",value:"*"},vce={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},bce={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Cce={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},_ce={type:"array",value:"*",minimum:1},xce={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}},Mce={"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}},wce={source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},Sce={type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},Ece=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],Oce={"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"}},Bce={"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"}},Ice={"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"}},kce={"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"}},Tce={"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"}},Rce={"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"}},Dce={"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"}},Pce={"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"}},Uce={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Kce={"*":{type:"string"}},ss={$version:Xue,$root:Jue,sources:ece,source:tce,source_vector:nce,source_raster:ice,source_raster_dem:rce,source_geojson:oce,source_video:sce,source_image:ace,layer:lce,layout:uce,layout_background:cce,layout_fill:Ace,layout_circle:hce,layout_heatmap:dce,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:fce,layout_symbol:pce,layout_raster:mce,layout_hillshade:gce,"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:yce,filter_operator:vce,geometry_type:bce,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:Cce,expression:_ce,light:xce,sky:Mce,terrain:wce,projection:Sce,paint:Ece,paint_fill:Oce,"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:Bce,paint_circle:Ice,paint_heatmap:kce,paint_symbol:Tce,paint_raster:Rce,paint_hillshade:Dce,"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"}},paint_background:Pce,transition:Uce,"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:Kce};const Lce=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Fce(n,e){const t={};for(const i in n)i!=="ref"&&(t[i]=n[i]);return Lce.forEach(i=>{i in e&&(t[i]=e[i])}),t}function zce(n){n=n.slice();const e=Object.create(null);for(let t=0;t<n.length;t++)e[n[t].id]=n[t];for(let t=0;t<n.length;t++)"ref"in n[t]&&(n[t]=Fce(n[t],e[n[t].ref]));return n}function Ks(n,e){if(Array.isArray(n)){if(!Array.isArray(e)||n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(!Ks(n[t],e[t]))return!1;return!0}if(typeof n=="object"&&n!==null&&e!==null){if(typeof e!="object"||Object.keys(n).length!==Object.keys(e).length)return!1;for(const i in n)if(!Ks(n[i],e[i]))return!1;return!0}return n===e}function Gf(n,e){n.push(e)}function CZ(n,e,t){Gf(t,{command:"addSource",args:[n,e[n]]})}function _Z(n,e,t){Gf(e,{command:"removeSource",args:[n]}),t[n]=!0}function jce(n,e,t,i){_Z(n,t,i),CZ(n,e,t)}function Nce(n,e,t){let i;for(i in n[t])if(Object.prototype.hasOwnProperty.call(n[t],i)&&i!=="data"&&!Ks(n[t][i],e[t][i]))return!1;for(i in e[t])if(Object.prototype.hasOwnProperty.call(e[t],i)&&i!=="data"&&!Ks(n[t][i],e[t][i]))return!1;return!0}function Gce(n,e,t,i){n=n||{},e=e||{};let r;for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(Object.prototype.hasOwnProperty.call(e,r)||_Z(r,t,i));for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Object.prototype.hasOwnProperty.call(n,r)?Ks(n[r],e[r])||(n[r].type==="geojson"&&e[r].type==="geojson"&&Nce(n,e,r)?Gf(t,{command:"setGeoJSONSourceData",args:[r,e[r].data]}):jce(r,e,t,i)):CZ(r,e,t))}function MM(n,e,t,i,r,o){n=n||{},e=e||{};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(Ks(n[s],e[s])||t.push({command:o,args:[i,s,e[s],r]}));for(const s in e)!Object.prototype.hasOwnProperty.call(e,s)||Object.prototype.hasOwnProperty.call(n,s)||Ks(n[s],e[s])||t.push({command:o,args:[i,s,e[s],r]})}function pF(n){return n.id}function mF(n,e){return n[e.id]=e,n}function Wce(n,e,t){n=n||[],e=e||[];const i=n.map(pF),r=e.map(pF),o=n.reduce(mF,{}),s=e.reduce(mF,{}),a=i.slice(),c=Object.create(null);let A,m,v,x,_;for(let O=0,P=0;O<i.length;O++)A=i[O],Object.prototype.hasOwnProperty.call(s,A)?P++:(Gf(t,{command:"removeLayer",args:[A]}),a.splice(a.indexOf(A,P),1));for(let O=0,P=0;O<r.length;O++)A=r[r.length-1-O],a[a.length-1-O]!==A&&(Object.prototype.hasOwnProperty.call(o,A)?(Gf(t,{command:"removeLayer",args:[A]}),a.splice(a.lastIndexOf(A,a.length-P),1)):P++,x=a[a.length-O],Gf(t,{command:"addLayer",args:[s[A],x]}),a.splice(a.length-O,0,A),c[A]=!0);for(let O=0;O<r.length;O++)if(A=r[O],m=o[A],v=s[A],!(c[A]||Ks(m,v))){if(!Ks(m.source,v.source)||!Ks(m["source-layer"],v["source-layer"])||!Ks(m.type,v.type)){Gf(t,{command:"removeLayer",args:[A]}),x=a[a.lastIndexOf(A)+1],Gf(t,{command:"addLayer",args:[v,x]});continue}MM(m.layout,v.layout,t,A,null,"setLayoutProperty"),MM(m.paint,v.paint,t,A,null,"setPaintProperty"),Ks(m.filter,v.filter)||Gf(t,{command:"setFilter",args:[A,v.filter]}),(!Ks(m.minzoom,v.minzoom)||!Ks(m.maxzoom,v.maxzoom))&&Gf(t,{command:"setLayerZoomRange",args:[A,v.minzoom,v.maxzoom]});for(_ in m)Object.prototype.hasOwnProperty.call(m,_)&&(_==="layout"||_==="paint"||_==="filter"||_==="metadata"||_==="minzoom"||_==="maxzoom"||(_.indexOf("paint.")===0?MM(m[_],v[_],t,A,_.slice(6),"setPaintProperty"):Ks(m[_],v[_])||Gf(t,{command:"setLayerProperty",args:[A,_,v[_]]})));for(_ in v)!Object.prototype.hasOwnProperty.call(v,_)||Object.prototype.hasOwnProperty.call(m,_)||_==="layout"||_==="paint"||_==="filter"||_==="metadata"||_==="minzoom"||_==="maxzoom"||(_.indexOf("paint.")===0?MM(m[_],v[_],t,A,_.slice(6),"setPaintProperty"):Ks(m[_],v[_])||Gf(t,{command:"setLayerProperty",args:[A,_,v[_]]}))}}function Qce(n,e){if(!n)return[{command:"setStyle",args:[e]}];let t=[];try{if(!Ks(n.version,e.version))return[{command:"setStyle",args:[e]}];Ks(n.center,e.center)||t.push({command:"setCenter",args:[e.center]}),Ks(n.state,e.state)||t.push({command:"setGlobalState",args:[e.state]}),Ks(n.centerAltitude,e.centerAltitude)||t.push({command:"setCenterAltitude",args:[e.centerAltitude]}),Ks(n.zoom,e.zoom)||t.push({command:"setZoom",args:[e.zoom]}),Ks(n.bearing,e.bearing)||t.push({command:"setBearing",args:[e.bearing]}),Ks(n.pitch,e.pitch)||t.push({command:"setPitch",args:[e.pitch]}),Ks(n.roll,e.roll)||t.push({command:"setRoll",args:[e.roll]}),Ks(n.sprite,e.sprite)||t.push({command:"setSprite",args:[e.sprite]}),Ks(n.glyphs,e.glyphs)||t.push({command:"setGlyphs",args:[e.glyphs]}),Ks(n.transition,e.transition)||t.push({command:"setTransition",args:[e.transition]}),Ks(n.light,e.light)||t.push({command:"setLight",args:[e.light]}),Ks(n.terrain,e.terrain)||t.push({command:"setTerrain",args:[e.terrain]}),Ks(n.sky,e.sky)||t.push({command:"setSky",args:[e.sky]}),Ks(n.projection,e.projection)||t.push({command:"setProjection",args:[e.projection]});const i={},r=[];Gce(n.sources,e.sources,r,i);const o=[];n.layers&&n.layers.forEach(s=>{"source"in s&&i[s.source]?t.push({command:"removeLayer",args:[s.id]}):o.push(s)}),t=t.concat(r),Wce(o,e.layers,t)}catch(i){console.warn("Unable to compute style diff:",i),t=[{command:"setStyle",args:[e]}]}return t}class Yn{constructor(e,t,i,r){this.message=(e?`${e}: `:"")+i,r&&(this.identifier=r),t!=null&&t.__line__&&(this.line=t.__line__)}}function Z_(n,...e){for(const t of e)for(const i in t)n[i]=t[i];return n}let pg=class extends Error{constructor(e,t){super(t),this.message=t,this.key=e}},qce=class xZ{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[i,r]of t)this.bindings[i]=r}concat(e){return new xZ(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1}};const $S={kind:"null"},ni={kind:"number"},bo={kind:"string"},oo={kind:"boolean"},Bg={kind:"color"},VS={kind:"projectionDefinition"},ub={kind:"object"},eo={kind:"value"},Yce={kind:"error"},HS={kind:"collator"},ZS={kind:"formatted"},XS={kind:"padding"},x3={kind:"colorArray"},JS={kind:"numberArray"},D4={kind:"resolvedImage"},eE={kind:"variableAnchorOffsetCollection"};function Xd(n,e){return{kind:"array",itemType:n,N:e}}function al(n){if(n.kind==="array"){const e=al(n.itemType);return typeof n.N=="number"?`array<${e}, ${n.N}>`:n.itemType.kind==="value"?"array":`array<${e}>`}else return n.kind}const $ce=[$S,ni,bo,oo,Bg,VS,ZS,ub,Xd(eo),XS,JS,x3,D4,eE];function M3(n,e){if(e.kind==="error")return null;if(n.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!M3(n.itemType,e.itemType))&&(typeof n.N!="number"||n.N===e.N))return null}else{if(n.kind===e.kind)return null;if(n.kind==="value"){for(const t of $ce)if(!M3(t,e))return null}}return`Expected ${al(n)} but found ${al(e)} instead.`}function LD(n,e){return e.some(t=>t.kind===n.kind)}function cb(n,e){return e.some(t=>t==="null"?n===null:t==="array"?Array.isArray(n):t==="object"?n&&!Array.isArray(n)&&typeof n=="object":t===typeof n)}function sy(n,e){return n.kind==="array"&&e.kind==="array"?n.itemType.kind===e.itemType.kind&&typeof n.N=="number":n.kind===e.kind}const MZ=.96422,wZ=1,SZ=.82521,EZ=4/29,O_=6/29,OZ=3*O_*O_,Vce=O_*O_*O_,Hce=Math.PI/180,Zce=180/Math.PI;function BZ(n){return n=n%360,n<0&&(n+=360),n}function IZ([n,e,t,i]){n=oO(n),e=oO(e),t=oO(t);let r,o;const s=sO((.2225045*n+.7168786*e+.0606169*t)/wZ);n===e&&e===t?r=o=s:(r=sO((.4360747*n+.3850649*e+.1430804*t)/MZ),o=sO((.0139322*n+.0971045*e+.7141733*t)/SZ));const a=116*s-16;return[a<0?0:a,500*(r-s),200*(s-o),i]}function oO(n){return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function sO(n){return n>Vce?Math.pow(n,1/3):n/OZ+EZ}function kZ([n,e,t,i]){let r=(n+16)/116,o=isNaN(e)?r:r+e/500,s=isNaN(t)?r:r-t/200;return r=wZ*lO(r),o=MZ*lO(o),s=SZ*lO(s),[aO(3.1338561*o-1.6168667*r-.4906146*s),aO(-.9787684*o+1.9161415*r+.033454*s),aO(.0719453*o-.2289914*r+1.4052427*s),i]}function aO(n){return n=n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055,n<0?0:n>1?1:n}function lO(n){return n>O_?n*n*n:OZ*(n-EZ)}function Xce(n){const[e,t,i,r]=IZ(n),o=Math.sqrt(t*t+i*i);return[Math.round(o*1e4)?BZ(Math.atan2(i,t)*Zce):NaN,o,e,r]}function Jce([n,e,t,i]){return n=isNaN(n)?0:n*Hce,kZ([t,Math.cos(n)*e,Math.sin(n)*e,i])}function eAe([n,e,t,i]){n=BZ(n),e/=100,t/=100;function r(o){const s=(o+n/30)%12,a=e*Math.min(t,1-t);return t-a*Math.max(-1,Math.min(s-3,9-s,1))}return[r(0),r(8),r(4),i]}const tAe=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function V2(n,e){return tAe(n,e)?n[e]:void 0}function nAe(n){if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];const e=V2(iAe,n);if(e){const[r,o,s]=e;return[r/255,o/255,s/255,1]}if(n.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(n)){const o=n.length<6?1:2;let s=1;return[wM(n.slice(s,s+=o)),wM(n.slice(s,s+=o)),wM(n.slice(s,s+=o)),wM(n.slice(s,s+o)||"ff")]}if(n.startsWith("rgb")){const r=/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,o=n.match(r);if(o){const[s,a,c,A,m,v,x,_,O,P,F,j]=o,Q=[A||" ",x||" ",P].join("");if(Q===" "||Q===" /"||Q===",,"||Q===",,,"){const V=[c,v,O].join(""),H=V==="%%%"?100:V===""?255:0;if(H){const G=[r_(+a/H,0,1),r_(+m/H,0,1),r_(+_/H,0,1),F?gF(+F,j):1];if(yF(G))return G}}return}}const t=/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,i=n.match(t);if(i){const[r,o,s,a,c,A,m,v,x]=i,_=[s||" ",c||" ",m].join("");if(_===" "||_===" /"||_===",,"||_===",,,"){const O=[+o,r_(+a,0,100),r_(+A,0,100),v?gF(+v,x):1];if(yF(O))return eAe(O)}}}function wM(n){return parseInt(n.padEnd(2,n),16)/255}function gF(n,e){return r_(e?n/100:n,0,1)}function r_(n,e,t){return Math.min(Math.max(e,n),t)}function yF(n){return!n.some(Number.isNaN)}const iAe={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 Ly(n,e,t){return n+t*(e-n)}function X_(n,e,t){return n.map((i,r)=>Ly(i,e[r],t))}function rAe(n){return n==="rgb"||n==="hcl"||n==="lab"}let da=class o_{constructor(e,t,i,r=1,o=!0){this.r=e,this.g=t,this.b=i,this.a=r,o||(this.r*=r,this.g*=r,this.b*=r,r||this.overwriteGetter("rgb",[e,t,i,r]))}static parse(e){if(e instanceof o_)return e;if(typeof e!="string")return;const t=nAe(e);if(t)return new o_(...t,!1)}get rgb(){const{r:e,g:t,b:i,a:r}=this,o=r||1/0;return this.overwriteGetter("rgb",[e/o,t/o,i/o,r])}get hcl(){return this.overwriteGetter("hcl",Xce(this.rgb))}get lab(){return this.overwriteGetter("lab",IZ(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){const[e,t,i,r]=this.rgb;return`rgba(${[e,t,i].map(o=>Math.round(o*255)).join(",")},${r})`}static interpolate(e,t,i,r="rgb"){switch(r){case"rgb":{const[o,s,a,c]=X_(e.rgb,t.rgb,i);return new o_(o,s,a,c,!1)}case"hcl":{const[o,s,a,c]=e.hcl,[A,m,v,x]=t.hcl;let _,O;if(!isNaN(o)&&!isNaN(A)){let V=A-o;A>o&&V>180?V-=360:A<o&&o-A>180&&(V+=360),_=o+i*V}else isNaN(o)?isNaN(A)?_=NaN:(_=A,(a===1||a===0)&&(O=m)):(_=o,(v===1||v===0)&&(O=s));const[P,F,j,Q]=Jce([_,O??Ly(s,m,i),Ly(a,v,i),Ly(c,x,i)]);return new o_(P,F,j,Q,!1)}case"lab":{const[o,s,a,c]=kZ(X_(e.lab,t.lab,i));return new o_(o,s,a,c,!1)}}}};da.black=new da(0,0,0,1);da.white=new da(1,1,1,1);da.transparent=new da(0,0,0,0);da.red=new da(1,0,0,1);let FD=class{constructor(e,t,i){e?this.sensitivity=t?"variant":"case":this.sensitivity=t?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}};const oAe=["bottom","center","top"];let HT=class{constructor(e,t,i,r,o,s){this.text=e,this.image=t,this.scale=i,this.fontStack=r,this.textColor=o,this.verticalAlign=s}},vx=class j5{constructor(e){this.sections=e}static fromString(e){return new j5([new HT(e,null,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof j5?e:j5.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}},Qg=class _2{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof _2)return e;if(typeof e=="number")return new _2([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const t of e)if(typeof t!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]];break}return new _2(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,i){return new _2(X_(e.values,t.values,i))}},qg=class x2{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof x2)return e;if(typeof e=="number")return new x2([e]);if(Array.isArray(e)){for(const t of e)if(typeof t!="number")return;return new x2(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,i){return new x2(X_(e.values,t.values,i))}},ep=class M2{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof M2)return e;if(typeof e=="string"){const i=da.parse(e);return i?new M2([i]):void 0}if(!Array.isArray(e))return;const t=[];for(const i of e){if(typeof i!="string")return;const r=da.parse(i);if(!r)return;t.push(r)}return new M2(t)}toString(){return JSON.stringify(this.values)}static interpolate(e,t,i,r="rgb"){const o=[];if(e.values.length!=t.values.length)throw new Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${t.values.length}), cannot interpolate.`);for(let s=0;s<e.values.length;s++)o.push(da.interpolate(e.values[s],t.values[s],i,r));return new M2(o)}},gl=class extends Error{constructor(e){super(e),this.name="RuntimeError"}toJSON(){return this.message}};const sAe=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);let Jy=class N5{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof N5)return e;if(!(!Array.isArray(e)||e.length<1||e.length%2!==0)){for(let t=0;t<e.length;t+=2){const i=e[t],r=e[t+1];if(typeof i!="string"||!sAe.has(i)||!Array.isArray(r)||r.length!==2||typeof r[0]!="number"||typeof r[1]!="number")return}return new N5(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,i){const r=e.values,o=t.values;if(r.length!==o.length)throw new gl(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);const s=[];for(let a=0;a<r.length;a+=2){if(r[a]!==o[a])throw new gl(`Cannot interpolate values containing mismatched anchors. from[${a}]: ${r[a]}, to[${a}]: ${o[a]}`);s.push(r[a]);const[c,A]=r[a+1],[m,v]=o[a+1];s.push([Ly(c,m,i),Ly(A,v,i)])}return new N5(s)}},Ub=class TZ{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new TZ({name:e,available:!1}):null}},bx=class s_{constructor(e,t,i){this.from=e,this.to=t,this.transition=i}static interpolate(e,t,i){return new s_(e,t,i)}static parse(e){if(e instanceof s_)return e;if(Array.isArray(e)&&e.length===3&&typeof e[0]=="string"&&typeof e[1]=="string"&&typeof e[2]=="number")return new s_(e[0],e[1],e[2]);if(typeof e=="object"&&typeof e.from=="string"&&typeof e.to=="string"&&typeof e.transition=="number")return new s_(e.from,e.to,e.transition);if(typeof e=="string")return new s_(e,e,1)}};function RZ(n,e,t,i){return typeof n=="number"&&n>=0&&n<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255?typeof i>"u"||typeof i=="number"&&i>=0&&i<=1?null:`Invalid rgba value [${[n,e,t,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof i=="number"?[n,e,t,i]:[n,e,t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function w3(n){if(n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number"||n instanceof bx||n instanceof da||n instanceof FD||n instanceof vx||n instanceof Qg||n instanceof qg||n instanceof ep||n instanceof Jy||n instanceof Ub)return!0;if(Array.isArray(n)){for(const e of n)if(!w3(e))return!1;return!0}else if(typeof n=="object"){for(const e in n)if(!w3(n[e]))return!1;return!0}else return!1}function Pu(n){if(n===null)return $S;if(typeof n=="string")return bo;if(typeof n=="boolean")return oo;if(typeof n=="number")return ni;if(n instanceof da)return Bg;if(n instanceof bx)return VS;if(n instanceof FD)return HS;if(n instanceof vx)return ZS;if(n instanceof Qg)return XS;if(n instanceof qg)return JS;if(n instanceof ep)return x3;if(n instanceof Jy)return eE;if(n instanceof Ub)return D4;if(Array.isArray(n)){const e=n.length;let t;for(const i of n){const r=Pu(i);if(!t)t=r;else{if(t===r)continue;t=eo;break}}return Xd(t||eo,e)}else return ub}function H2(n){const e=typeof n;return n===null?"":e==="string"||e==="number"||e==="boolean"?String(n):n instanceof da||n instanceof bx||n instanceof vx||n instanceof Qg||n instanceof qg||n instanceof ep||n instanceof Jy||n instanceof Ub?n.toString():JSON.stringify(n)}let Mw=class DZ{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(e.length!==2)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!w3(e[1]))return t.error("invalid value");const i=e[1];let r=Pu(i);const o=t.expectedType;return r.kind==="array"&&r.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(r=o),new DZ(r,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}};const SM={string:bo,number:ni,boolean:oo,object:ub};let j0=class PZ{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let i=1,r;const o=e[0];if(o==="array"){let a;if(e.length>2){const A=e[1];if(typeof A!="string"||!(A in SM)||A==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);a=SM[A],i++}else a=eo;let c;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);c=e[2],i++}r=Xd(a,c)}else{if(!SM[o])throw new Error(`Types doesn't contain name = ${o}`);r=SM[o]}const s=[];for(;i<e.length;i++){const a=t.parse(e[i],i,eo);if(!a)return null;s.push(a)}return new PZ(r,s)}evaluate(e){for(let t=0;t<this.args.length;t++){const i=this.args[t].evaluate(e);if(M3(this.type,Pu(i))){if(t===this.args.length-1)throw new gl(`Expected value to be of type ${al(this.type)}, but found ${al(Pu(i))} instead.`)}else return i}throw new Error}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};const vF={"to-boolean":oo,"to-color":Bg,"to-number":ni,"to-string":bo};let y_=class UZ{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const i=e[0];if(!vF[i])throw new Error(`Can't parse ${i} as it is not part of the known types`);if((i==="to-boolean"||i==="to-string")&&e.length!==2)return t.error("Expected one argument.");const r=vF[i],o=[];for(let s=1;s<e.length;s++){const a=t.parse(e[s],s,eo);if(!a)return null;o.push(a)}return new UZ(r,o)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let t,i;for(const r of this.args){if(t=r.evaluate(e),i=null,t instanceof da)return t;if(typeof t=="string"){const o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&(t.length<3||t.length>4?i=`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:i=RZ(t[0],t[1],t[2],t[3]),!i))return new da(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new gl(i||`Could not parse color from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"padding":{let t;for(const i of this.args){t=i.evaluate(e);const r=Qg.parse(t);if(r)return r}throw new gl(`Could not parse padding from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"numberArray":{let t;for(const i of this.args){t=i.evaluate(e);const r=qg.parse(t);if(r)return r}throw new gl(`Could not parse numberArray from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"colorArray":{let t;for(const i of this.args){t=i.evaluate(e);const r=ep.parse(t);if(r)return r}throw new gl(`Could not parse colorArray from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(const i of this.args){t=i.evaluate(e);const r=Jy.parse(t);if(r)return r}throw new gl(`Could not parse variableAnchorOffsetCollection from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(const i of this.args){if(t=i.evaluate(e),t===null)return 0;const r=Number(t);if(!isNaN(r))return r}throw new gl(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return vx.fromString(H2(this.args[0].evaluate(e)));case"resolvedImage":return Ub.fromString(H2(this.args[0].evaluate(e)));case"projectionDefinition":return this.args[0].evaluate(e);default:return H2(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};const aAe=["Unknown","Point","LineString","Polygon"];let KZ=class{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"?aAe[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache.get(e);return t||(t=da.parse(e),this._parseColorCache.set(e,t)),t}},LZ=class FZ{constructor(e,t,i=[],r,o=new qce,s=[]){this.registry=e,this.path=i,this.key=i.map(a=>`[${a}]`).join(""),this.scope=o,this.errors=s,this.expectedType=r,this._isConstant=t}parse(e,t,i,r,o={}){return t?this.concat(t,i,r)._parse(e,o):this._parse(e,o)}_parse(e,t){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);function i(r,o,s){return s==="assert"?new j0(o,[r]):s==="coerce"?new y_(o,[r]):r}if(Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const r=e[0];if(typeof r!="string")return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const o=this.registry[r];if(o){let s=o.parse(e,this);if(!s)return null;if(this.expectedType){const a=this.expectedType,c=s.type;if((a.kind==="string"||a.kind==="number"||a.kind==="boolean"||a.kind==="object"||a.kind==="array")&&c.kind==="value")s=i(s,a,t.typeAnnotation||"assert");else if(a.kind==="projectionDefinition"&&["string","array"].includes(c.kind)||["color","formatted","resolvedImage"].includes(a.kind)&&["value","string"].includes(c.kind)||["padding","numberArray"].includes(a.kind)&&["value","number","array"].includes(c.kind)||a.kind==="colorArray"&&["value","string","array"].includes(c.kind)||a.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(c.kind))s=i(s,a,t.typeAnnotation||"coerce");else if(this.checkSubtype(a,c))return null}if(!(s instanceof Mw)&&s.type.kind!=="resolvedImage"&&this._isConstant(s)){const a=new KZ;try{s=new Mw(s.type,s.evaluate(a))}catch(c){return this.error(c.message),null}}return s}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):typeof e=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,t,i){const r=typeof e=="number"?this.path.concat(e):this.path,o=i?this.scope.concat(i):this.scope;return new FZ(this.registry,this._isConstant,r,t||null,o,this.errors)}error(e,...t){const i=`${this.key}${t.map(r=>`[${r}]`).join("")}`;this.errors.push(new pg(i,e))}checkSubtype(e,t){const i=M3(e,t);return i&&this.error(i),i}},zZ=class jZ{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const i=[];for(let o=1;o<e.length-1;o+=2){const s=e[o];if(typeof s!="string")return t.error(`Expected string, but found ${typeof s} instead.`,o);if(/[^a-zA-Z0-9_]/.test(s))return t.error("Variable names must contain only alphanumeric characters or '_'.",o);const a=t.parse(e[o+1],o+1);if(!a)return null;i.push([s,a])}const r=t.parse(e[e.length-1],e.length-1,t.expectedType,i);return r?new jZ(i,r):null}outputDefined(){return this.result.outputDefined()}},NZ=class GZ{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(e.length!==2||typeof e[1]!="string")return t.error("'var' expression requires exactly one string literal argument.");const i=e[1];return t.scope.has(i)?new GZ(i,t.scope.get(i)):t.error(`Unknown variable "${i}". Make sure "${i}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}},lAe=class WZ{constructor(e,t,i){this.type=e,this.index=t,this.input=i}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const i=t.parse(e[1],1,ni),r=t.parse(e[2],2,Xd(t.expectedType||eo));if(!i||!r)return null;const o=r.type;return new WZ(o.itemType,i,r)}evaluate(e){const t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new gl(`Array index out of bounds: ${t} < 0.`);if(t>=i.length)throw new gl(`Array index out of bounds: ${t} > ${i.length-1}.`);if(t!==Math.floor(t))throw new gl(`Array index must be an integer, but found ${t} instead.`);return i[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},uAe=class QZ{constructor(e,t){this.type=oo,this.needle=e,this.haystack=t}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const i=t.parse(e[1],1,eo),r=t.parse(e[2],2,eo);return!i||!r?null:LD(i.type,[oo,bo,ni,$S,eo])?new QZ(i,r):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${al(i.type)} instead`)}evaluate(e){const t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!i)return!1;if(!cb(t,["boolean","string","number","null"]))throw new gl(`Expected first argument to be of type boolean, string, number or null, but found ${al(Pu(t))} instead.`);if(!cb(i,["string","array"]))throw new gl(`Expected second argument to be of type array or string, but found ${al(Pu(i))} instead.`);return i.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},cAe=class ZT{constructor(e,t,i){this.type=ni,this.needle=e,this.haystack=t,this.fromIndex=i}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);const i=t.parse(e[1],1,eo),r=t.parse(e[2],2,eo);if(!i||!r)return null;if(!LD(i.type,[oo,bo,ni,$S,eo]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${al(i.type)} instead`);if(e.length===4){const o=t.parse(e[3],3,ni);return o?new ZT(i,r,o):null}else return new ZT(i,r)}evaluate(e){const t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!cb(t,["boolean","string","number","null"]))throw new gl(`Expected first argument to be of type boolean, string, number or null, but found ${al(Pu(t))} instead.`);let r;if(this.fromIndex&&(r=this.fromIndex.evaluate(e)),cb(i,["string"])){const o=i.indexOf(t,r);return o===-1?-1:[...i.slice(0,o)].length}else{if(cb(i,["array"]))return i.indexOf(t,r);throw new gl(`Expected second argument to be of type array or string, but found ${al(Pu(i))} instead.`)}}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},AAe=class qZ{constructor(e,t,i,r,o,s){this.inputType=e,this.type=t,this.input=i,this.cases=r,this.outputs=o,this.otherwise=s}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!==1)return t.error("Expected an even number of arguments.");let i,r;t.expectedType&&t.expectedType.kind!=="value"&&(r=t.expectedType);const o={},s=[];for(let A=2;A<e.length-1;A+=2){let m=e[A];const v=e[A+1];Array.isArray(m)||(m=[m]);const x=t.concat(A);if(m.length===0)return x.error("Expected at least one branch label.");for(const O of m){if(typeof O!="number"&&typeof O!="string")return x.error("Branch labels must be numbers or strings.");if(typeof O=="number"&&Math.abs(O)>Number.MAX_SAFE_INTEGER)return x.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof O=="number"&&Math.floor(O)!==O)return x.error("Numeric branch labels must be integer values.");if(!i)i=Pu(O);else if(x.checkSubtype(i,Pu(O)))return null;if(typeof o[String(O)]<"u")return x.error("Branch labels must be unique.");o[String(O)]=s.length}const _=t.parse(v,A,r);if(!_)return null;r=r||_.type,s.push(_)}const a=t.parse(e[1],1,eo);if(!a)return null;const c=t.parse(e[e.length-1],e.length-1,r);return!c||a.type.kind!=="value"&&t.concat(1).checkSubtype(i,a.type)?null:new qZ(i,r,a,o,s,c)}evaluate(e){const t=this.input.evaluate(e);return(Pu(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},hAe=class YZ{constructor(e,t,i){this.type=e,this.branches=t,this.otherwise=i}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!==0)return t.error("Expected an odd number of arguments.");let i;t.expectedType&&t.expectedType.kind!=="value"&&(i=t.expectedType);const r=[];for(let s=1;s<e.length-1;s+=2){const a=t.parse(e[s],s,oo);if(!a)return null;const c=t.parse(e[s+1],s+1,i);if(!c)return null;r.push([a,c]),i=i||c.type}const o=t.parse(e[e.length-1],e.length-1,i);if(!o)return null;if(!i)throw new Error("Can't infer output type");return new YZ(i,r,o)}evaluate(e){for(const[t,i]of this.branches)if(t.evaluate(e))return i.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[t,i]of this.branches)e(t),e(i);e(this.otherwise)}outputDefined(){return this.branches.every(([e,t])=>t.outputDefined())&&this.otherwise.outputDefined()}},dAe=class XT{constructor(e,t,i,r){this.type=e,this.input=t,this.beginIndex=i,this.endIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);const i=t.parse(e[1],1,eo),r=t.parse(e[2],2,ni);if(!i||!r)return null;if(!LD(i.type,[Xd(eo),bo,eo]))return t.error(`Expected first argument to be of type array or string, but found ${al(i.type)} instead`);if(e.length===4){const o=t.parse(e[3],3,ni);return o?new XT(i.type,i,r,o):null}else return new XT(i.type,i,r)}evaluate(e){const t=this.input.evaluate(e),i=this.beginIndex.evaluate(e);let r;if(this.endIndex&&(r=this.endIndex.evaluate(e)),cb(t,["string"]))return[...t].slice(i,r).join("");if(cb(t,["array"]))return t.slice(i,r);throw new gl(`Expected first argument to be of type array or string, but found ${al(Pu(t))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}};function tE(n,e){const t=n.length-1;let i=0,r=t,o=0,s,a;for(;i<=r;)if(o=Math.floor((i+r)/2),s=n[o],a=n[o+1],s<=e){if(o===t||e<a)return o;i=o+1}else if(s>e)r=o-1;else throw new gl("Input is not a number.");return 0}let $Z=class VZ{constructor(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[r,o]of i)this.labels.push(r),this.outputs.push(o)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");const i=t.parse(e[1],1,ni);if(!i)return null;const r=[];let o=null;t.expectedType&&t.expectedType.kind!=="value"&&(o=t.expectedType);for(let s=1;s<e.length;s+=2){const a=s===1?-1/0:e[s],c=e[s+1],A=s,m=s+1;if(typeof a!="number")return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',A);if(r.length&&r[r.length-1][0]>=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',A);const v=t.parse(c,m,o);if(!v)return null;o=o||v.type,r.push([a,v])}return new VZ(o,i,r)}evaluate(e){const t=this.labels,i=this.outputs;if(t.length===1)return i[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return i[0].evaluate(e);const o=t.length;if(r>=t[o-1])return i[o-1].evaluate(e);const s=tE(t,r);return i[s].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function fAe(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var uO,bF;function pAe(){if(bF)return uO;bF=1,uO=n;function n(e,t,i,r){this.cx=3*e,this.bx=3*(i-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(r-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=i,this.p2y=r}return n.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(t===void 0&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var i=e,r=0;r<8;r++){var o=this.sampleCurveX(i)-e;if(Math.abs(o)<t)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i=i-o/s}var a=0,c=1;for(i=e,r=0;r<20&&(o=this.sampleCurveX(i),!(Math.abs(o-e)<t));r++)e>o?a=i:c=i,i=(c-a)*.5+a;return i},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},uO}var mAe=pAe(),gAe=fAe(mAe);let W0=class JT{constructor(e,t,i,r,o){this.type=e,this.operator=t,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[];for(const[s,a]of o)this.labels.push(s),this.outputs.push(a)}static interpolationFactor(e,t,i,r){let o=0;if(e.name==="exponential")o=cO(t,e.base,i,r);else if(e.name==="linear")o=cO(t,1,i,r);else if(e.name==="cubic-bezier"){const s=e.controlPoints;o=new gAe(s[0],s[1],s[2],s[3]).solve(cO(t,1,i,r))}return o}static parse(e,t){let[i,r,o,...s]=e;if(!Array.isArray(r)||r.length===0)return t.error("Expected an interpolation type expression.",1);if(r[0]==="linear")r={name:"linear"};else if(r[0]==="exponential"){const A=r[1];if(typeof A!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:A}}else if(r[0]==="cubic-bezier"){const A=r.slice(1);if(A.length!==4||A.some(m=>typeof m!="number"||m<0||m>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:A}}else return t.error(`Unknown interpolation type ${String(r[0])}`,1,0);if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(o=t.parse(o,2,ni),!o)return null;const a=[];let c=null;(i==="interpolate-hcl"||i==="interpolate-lab")&&t.expectedType!=x3?c=Bg:t.expectedType&&t.expectedType.kind!=="value"&&(c=t.expectedType);for(let A=0;A<s.length;A+=2){const m=s[A],v=s[A+1],x=A+3,_=A+4;if(typeof m!="number")return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',x);if(a.length&&a[a.length-1][0]>=m)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',x);const O=t.parse(v,_,c);if(!O)return null;c=c||O.type,a.push([m,O])}return!sy(c,ni)&&!sy(c,VS)&&!sy(c,Bg)&&!sy(c,XS)&&!sy(c,JS)&&!sy(c,x3)&&!sy(c,eE)&&!sy(c,Xd(ni))?t.error(`Type ${al(c)} is not interpolatable.`):new JT(c,i,r,o,a)}evaluate(e){const t=this.labels,i=this.outputs;if(t.length===1)return i[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return i[0].evaluate(e);const o=t.length;if(r>=t[o-1])return i[o-1].evaluate(e);const s=tE(t,r),a=t[s],c=t[s+1],A=JT.interpolationFactor(this.interpolation,r,a,c),m=i[s].evaluate(e),v=i[s+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Ly(m,v,A);case"color":return da.interpolate(m,v,A);case"padding":return Qg.interpolate(m,v,A);case"colorArray":return ep.interpolate(m,v,A);case"numberArray":return qg.interpolate(m,v,A);case"variableAnchorOffsetCollection":return Jy.interpolate(m,v,A);case"array":return X_(m,v,A);case"projectionDefinition":return bx.interpolate(m,v,A)}case"interpolate-hcl":switch(this.type.kind){case"color":return da.interpolate(m,v,A,"hcl");case"colorArray":return ep.interpolate(m,v,A,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return da.interpolate(m,v,A,"lab");case"colorArray":return ep.interpolate(m,v,A,"lab")}}}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function cO(n,e,t,i){const r=i-t,o=n-t;return r===0?0:e===1?o/r:(Math.pow(e,o)-1)/(Math.pow(e,r)-1)}const yAe={color:da.interpolate,number:Ly,padding:Qg.interpolate,numberArray:qg.interpolate,colorArray:ep.interpolate,variableAnchorOffsetCollection:Jy.interpolate,array:X_};let HZ=class e9{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let i=null;const r=t.expectedType;r&&r.kind!=="value"&&(i=r);const o=[];for(const a of e.slice(1)){const c=t.parse(a,1+o.length,i,void 0,{typeAnnotation:"omit"});if(!c)return null;i=i||c.type,o.push(c)}if(!i)throw new Error("No output type");return r&&o.some(a=>M3(r,a.type))?new e9(eo,o):new e9(i,o)}evaluate(e){let t=null,i=0,r;for(const o of this.args)if(i++,t=o.evaluate(e),t&&t instanceof Ub&&!t.available&&(r||(r=t.name),t=null,i===this.args.length&&(t=r)),t!==null)break;return t}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};function CF(n,e){return n==="=="||n==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function vAe(n,e,t){return e===t}function bAe(n,e,t){return e!==t}function CAe(n,e,t){return e<t}function _Ae(n,e,t){return e>t}function xAe(n,e,t){return e<=t}function MAe(n,e,t){return e>=t}function ZZ(n,e,t,i){return i.compare(e,t)===0}function wAe(n,e,t,i){return!ZZ(n,e,t,i)}function SAe(n,e,t,i){return i.compare(e,t)<0}function EAe(n,e,t,i){return i.compare(e,t)>0}function OAe(n,e,t,i){return i.compare(e,t)<=0}function BAe(n,e,t,i){return i.compare(e,t)>=0}function Cx(n,e,t){const i=n!=="=="&&n!=="!=";return class XZ{constructor(o,s,a){this.type=oo,this.lhs=o,this.rhs=s,this.collator=a,this.hasUntypedArgument=o.type.kind==="value"||s.type.kind==="value"}static parse(o,s){if(o.length!==3&&o.length!==4)return s.error("Expected two or three arguments.");const a=o[0];let c=s.parse(o[1],1,eo);if(!c)return null;if(!CF(a,c.type))return s.concat(1).error(`"${a}" comparisons are not supported for type '${al(c.type)}'.`);let A=s.parse(o[2],2,eo);if(!A)return null;if(!CF(a,A.type))return s.concat(2).error(`"${a}" comparisons are not supported for type '${al(A.type)}'.`);if(c.type.kind!==A.type.kind&&c.type.kind!=="value"&&A.type.kind!=="value")return s.error(`Cannot compare types '${al(c.type)}' and '${al(A.type)}'.`);i&&(c.type.kind==="value"&&A.type.kind!=="value"?c=new j0(A.type,[c]):c.type.kind!=="value"&&A.type.kind==="value"&&(A=new j0(c.type,[A])));let m=null;if(o.length===4){if(c.type.kind!=="string"&&A.type.kind!=="string"&&c.type.kind!=="value"&&A.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(m=s.parse(o[3],3,HS),!m)return null}return new XZ(c,A,m)}evaluate(o){const s=this.lhs.evaluate(o),a=this.rhs.evaluate(o);if(i&&this.hasUntypedArgument){const c=Pu(s),A=Pu(a);if(c.kind!==A.kind||!(c.kind==="string"||c.kind==="number"))throw new gl(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${c.kind}, ${A.kind}) instead.`)}if(this.collator&&!i&&this.hasUntypedArgument){const c=Pu(s),A=Pu(a);if(c.kind!=="string"||A.kind!=="string")return e(o,s,a)}return this.collator?t(o,s,a,this.collator.evaluate(o)):e(o,s,a)}eachChild(o){o(this.lhs),o(this.rhs),this.collator&&o(this.collator)}outputDefined(){return!0}}}const IAe=Cx("==",vAe,ZZ),kAe=Cx("!=",bAe,wAe),TAe=Cx("<",CAe,SAe),RAe=Cx(">",_Ae,EAe),DAe=Cx("<=",xAe,OAe),PAe=Cx(">=",MAe,BAe);let JZ=class eX{constructor(e,t,i){this.type=HS,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(e.length!==2)return t.error("Expected one argument.");const i=e[1];if(typeof i!="object"||Array.isArray(i))return t.error("Collator options argument must be an object.");const r=t.parse(i["case-sensitive"]===void 0?!1:i["case-sensitive"],1,oo);if(!r)return null;const o=t.parse(i["diacritic-sensitive"]===void 0?!1:i["diacritic-sensitive"],1,oo);if(!o)return null;let s=null;return i.locale&&(s=t.parse(i.locale,1,bo),!s)?null:new eX(r,o,s)}evaluate(e){return new FD(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}},UAe=class tX{constructor(e,t,i,r,o){this.type=bo,this.number=e,this.locale=t,this.currency=i,this.minFractionDigits=r,this.maxFractionDigits=o}static parse(e,t){if(e.length!==3)return t.error("Expected two arguments.");const i=t.parse(e[1],1,ni);if(!i)return null;const r=e[2];if(typeof r!="object"||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");let o=null;if(r.locale&&(o=t.parse(r.locale,1,bo),!o))return null;let s=null;if(r.currency&&(s=t.parse(r.currency,1,bo),!s))return null;let a=null;if(r["min-fraction-digits"]&&(a=t.parse(r["min-fraction-digits"],1,ni),!a))return null;let c=null;return r["max-fraction-digits"]&&(c=t.parse(r["max-fraction-digits"],1,ni),!c)?null:new tX(i,o,s,a,c)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}},KAe=class nX{constructor(e){this.type=ZS,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const i=e[1];if(!Array.isArray(i)&&typeof i=="object")return t.error("First argument must be an image or text section.");const r=[];let o=!1;for(let s=1;s<=e.length-1;++s){const a=e[s];if(o&&typeof a=="object"&&!Array.isArray(a)){o=!1;let c=null;if(a["font-scale"]&&(c=t.parse(a["font-scale"],1,ni),!c))return null;let A=null;if(a["text-font"]&&(A=t.parse(a["text-font"],1,Xd(bo)),!A))return null;let m=null;if(a["text-color"]&&(m=t.parse(a["text-color"],1,Bg),!m))return null;let v=null;if(a["vertical-align"]){if(typeof a["vertical-align"]=="string"&&!oAe.includes(a["vertical-align"]))return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${a["vertical-align"]}' instead.`);if(v=t.parse(a["vertical-align"],1,bo),!v)return null}const x=r[r.length-1];x.scale=c,x.font=A,x.textColor=m,x.verticalAlign=v}else{const c=t.parse(e[s],1,eo);if(!c)return null;const A=c.type.kind;if(A!=="string"&&A!=="value"&&A!=="null"&&A!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,r.push({content:c,scale:null,font:null,textColor:null,verticalAlign:null})}}return new nX(r)}evaluate(e){const t=i=>{const r=i.content.evaluate(e);return Pu(r)===D4?new HT("",r,null,null,null,i.verticalAlign?i.verticalAlign.evaluate(e):null):new HT(H2(r),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null,i.verticalAlign?i.verticalAlign.evaluate(e):null)};return new vx(this.sections.map(t))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor),t.verticalAlign&&e(t.verticalAlign)}outputDefined(){return!1}},LAe=class iX{constructor(e){this.type=D4,this.input=e}static parse(e,t){if(e.length!==2)return t.error("Expected two arguments.");const i=t.parse(e[1],1,bo);return i?new iX(i):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),i=Ub.fromString(t);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(t)>-1),i}eachChild(e){e(this.input)}outputDefined(){return!1}},FAe=class rX{constructor(e){this.type=ni,this.input=e}static parse(e,t){if(e.length!==2)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const i=t.parse(e[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?t.error(`Expected argument of type string or array, but found ${al(i.type)} instead.`):new rX(i):null}evaluate(e){const t=this.input.evaluate(e);if(typeof t=="string")return[...t].length;if(Array.isArray(t))return t.length;throw new gl(`Expected value to be of type string or array, but found ${al(Pu(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}};const Ig=8192;function zAe(n,e){const t=jAe(n[0]),i=GAe(n[1]),r=Math.pow(2,e.z);return[Math.round(t*r*Ig),Math.round(i*r*Ig)]}function zD(n,e){const t=Math.pow(2,e.z),i=(n[0]/Ig+e.x)/t,r=(n[1]/Ig+e.y)/t;return[NAe(i),WAe(r)]}function jAe(n){return(180+n)/360}function NAe(n){return n*360-180}function GAe(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function WAe(n){return 360/Math.PI*Math.atan(Math.exp((180-n*360)*Math.PI/180))-90}function P4(n,e){n[0]=Math.min(n[0],e[0]),n[1]=Math.min(n[1],e[1]),n[2]=Math.max(n[2],e[0]),n[3]=Math.max(n[3],e[1])}function S3(n,e){return!(n[0]<=e[0]||n[2]>=e[2]||n[1]<=e[1]||n[3]>=e[3])}function QAe(n,e,t){return e[1]>n[1]!=t[1]>n[1]&&n[0]<(t[0]-e[0])*(n[1]-e[1])/(t[1]-e[1])+e[0]}function qAe(n,e,t){const i=n[0]-e[0],r=n[1]-e[1],o=n[0]-t[0],s=n[1]-t[1];return i*s-o*r===0&&i*o<=0&&r*s<=0}function nE(n,e,t,i){const r=[e[0]-n[0],e[1]-n[1]],o=[i[0]-t[0],i[1]-t[1]];return HAe(o,r)===0?!1:!!(_F(n,e,t,i)&&_F(t,i,n,e))}function YAe(n,e,t){for(const i of t)for(let r=0;r<i.length-1;++r)if(nE(n,e,i[r],i[r+1]))return!0;return!1}function _x(n,e,t=!1){let i=!1;for(const r of e)for(let o=0;o<r.length-1;o++){if(qAe(n,r[o],r[o+1]))return t;QAe(n,r[o],r[o+1])&&(i=!i)}return i}function $Ae(n,e){for(const t of e)if(_x(n,t))return!0;return!1}function oX(n,e){for(const t of n)if(!_x(t,e))return!1;for(let t=0;t<n.length-1;++t)if(YAe(n[t],n[t+1],e))return!1;return!0}function VAe(n,e){for(const t of e)if(oX(n,t))return!0;return!1}function HAe(n,e){return n[0]*e[1]-n[1]*e[0]}function _F(n,e,t,i){const r=n[0]-t[0],o=n[1]-t[1],s=e[0]-t[0],a=e[1]-t[1],c=i[0]-t[0],A=i[1]-t[1],m=r*A-c*o,v=s*A-c*a;return m>0&&v<0||m<0&&v>0}function jD(n,e,t){const i=[];for(let r=0;r<n.length;r++){const o=[];for(let s=0;s<n[r].length;s++){const a=zAe(n[r][s],t);P4(e,a),o.push(a)}i.push(o)}return i}function sX(n,e,t){const i=[];for(let r=0;r<n.length;r++){const o=jD(n[r],e,t);i.push(o)}return i}function aX(n,e,t,i){if(n[0]<t[0]||n[0]>t[2]){const r=i*.5;let o=n[0]-t[0]>r?-i:t[0]-n[0]>r?i:0;o===0&&(o=n[0]-t[2]>r?-i:t[2]-n[0]>r?i:0),n[0]+=o}P4(e,n)}function ZAe(n){n[0]=n[1]=1/0,n[2]=n[3]=-1/0}function xF(n,e,t,i){const r=Math.pow(2,i.z)*Ig,o=[i.x*Ig,i.y*Ig],s=[];for(const a of n)for(const c of a){const A=[c.x+o[0],c.y+o[1]];aX(A,e,t,r),s.push(A)}return s}function MF(n,e,t,i){const r=Math.pow(2,i.z)*Ig,o=[i.x*Ig,i.y*Ig],s=[];for(const a of n){const c=[];for(const A of a){const m=[A.x+o[0],A.y+o[1]];P4(e,m),c.push(m)}s.push(c)}if(e[2]-e[0]<=r/2){ZAe(e);for(const a of s)for(const c of a)aX(c,e,t,r)}return s}function XAe(n,e){const t=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],r=n.canonicalID();if(e.type==="Polygon"){const o=jD(e.coordinates,i,r),s=xF(n.geometry(),t,i,r);if(!S3(t,i))return!1;for(const a of s)if(!_x(a,o))return!1}if(e.type==="MultiPolygon"){const o=sX(e.coordinates,i,r),s=xF(n.geometry(),t,i,r);if(!S3(t,i))return!1;for(const a of s)if(!$Ae(a,o))return!1}return!0}function JAe(n,e){const t=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],r=n.canonicalID();if(e.type==="Polygon"){const o=jD(e.coordinates,i,r),s=MF(n.geometry(),t,i,r);if(!S3(t,i))return!1;for(const a of s)if(!oX(a,o))return!1}if(e.type==="MultiPolygon"){const o=sX(e.coordinates,i,r),s=MF(n.geometry(),t,i,r);if(!S3(t,i))return!1;for(const a of s)if(!VAe(a,o))return!1}return!0}let ND=class G5{constructor(e,t){this.type=oo,this.geojson=e,this.geometries=t}static parse(e,t){if(e.length!==2)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(w3(e[1])){const i=e[1];if(i.type==="FeatureCollection"){const r=[];for(const o of i.features){const{type:s,coordinates:a}=o.geometry;s==="Polygon"&&r.push(a),s==="MultiPolygon"&&r.push(...a)}if(r.length){const o={type:"MultiPolygon",coordinates:r};return new G5(i,o)}}else if(i.type==="Feature"){const r=i.geometry.type;if(r==="Polygon"||r==="MultiPolygon")return new G5(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new G5(i,i)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return XAe(e,this.geometries);if(e.geometryType()==="LineString")return JAe(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},lX=class{constructor(e=[],t=(i,r)=>i<r?-1:i>r?1:0){if(this.data=e,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(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;const e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:i}=this,r=t[e];for(;e>0;){const o=e-1>>1,s=t[o];if(i(r,s)>=0)break;t[e]=s,e=o}t[e]=r}_down(e){const{data:t,compare:i}=this,r=this.length>>1,o=t[e];for(;e<r;){let s=(e<<1)+1;const a=s+1;if(a<this.length&&i(t[a],t[s])<0&&(s=a),i(t[s],o)>=0)break;t[e]=t[s],e=s}t[e]=o}};function ehe(n,e){if(n.length<=1)return[n];const i=[];let r,o;for(const s of n){const a=the(s);a!==0&&(s.area=Math.abs(a),o===void 0&&(o=a<0),o===a<0?(r&&i.push(r),r=[s]):r.push(s))}return r&&i.push(r),i}function the(n){let e=0;for(let t=0,i=n.length,r=i-1,o,s;t<i;r=t++)o=n[t],s=n[r],e+=(s.x-o.x)*(o.y+s.y);return e}const nhe=6378.137,wF=1/298.257223563,SF=wF*(2-wF),EF=Math.PI/180;let GD=class{constructor(e){const t=EF*nhe*1e3,i=Math.cos(e*EF),r=1/(1-SF*(1-i*i)),o=Math.sqrt(r);this.kx=t*o*i,this.ky=t*o*r*(1-SF)}distance(e,t){const i=this.wrap(e[0]-t[0])*this.kx,r=(e[1]-t[1])*this.ky;return Math.sqrt(i*i+r*r)}pointOnLine(e,t){let i=1/0,r,o,s,a;for(let c=0;c<e.length-1;c++){let A=e[c][0],m=e[c][1],v=this.wrap(e[c+1][0]-A)*this.kx,x=(e[c+1][1]-m)*this.ky,_=0;(v!==0||x!==0)&&(_=(this.wrap(t[0]-A)*this.kx*v+(t[1]-m)*this.ky*x)/(v*v+x*x),_>1?(A=e[c+1][0],m=e[c+1][1]):_>0&&(A+=v/this.kx*_,m+=x/this.ky*_)),v=this.wrap(t[0]-A)*this.kx,x=(t[1]-m)*this.ky;const O=v*v+x*x;O<i&&(i=O,r=A,o=m,s=c,a=_)}return{point:[r,o],index:s,t:Math.max(0,Math.min(1,a))}}wrap(e){for(;e<-180;)e+=360;for(;e>180;)e-=360;return e}};const t9=100,n9=50;function uX(n,e){return e[0]-n[0]}function ww(n){return n[1]-n[0]+1}function H0(n,e){return n[1]>=n[0]&&n[1]<e}function i9(n,e){if(n[0]>n[1])return[null,null];const t=ww(n);if(e){if(t===2)return[n,null];const r=Math.floor(t/2);return[[n[0],n[0]+r],[n[0]+r,n[1]]]}if(t===1)return[n,null];const i=Math.floor(t/2)-1;return[[n[0],n[0]+i],[n[0]+i+1,n[1]]]}function r9(n,e){if(!H0(e,n.length))return[1/0,1/0,-1/0,-1/0];const t=[1/0,1/0,-1/0,-1/0];for(let i=e[0];i<=e[1];++i)P4(t,n[i]);return t}function o9(n){const e=[1/0,1/0,-1/0,-1/0];for(const t of n)for(const i of t)P4(e,i);return e}function OF(n){return n[0]!==-1/0&&n[1]!==-1/0&&n[2]!==1/0&&n[3]!==1/0}function WD(n,e,t){if(!OF(n)||!OF(e))return NaN;let i=0,r=0;return n[2]<e[0]&&(i=e[0]-n[2]),n[0]>e[2]&&(i=n[0]-e[2]),n[1]>e[3]&&(r=n[1]-e[3]),n[3]<e[1]&&(r=e[1]-n[3]),t.distance([0,0],[i,r])}function Jv(n,e,t){const i=t.pointOnLine(e,n);return t.distance(n,i.point)}function QD(n,e,t,i,r){const o=Math.min(Jv(n,[t,i],r),Jv(e,[t,i],r)),s=Math.min(Jv(t,[n,e],r),Jv(i,[n,e],r));return Math.min(o,s)}function ihe(n,e,t,i,r){if(!(H0(e,n.length)&&H0(i,t.length)))return 1/0;let s=1/0;for(let a=e[0];a<e[1];++a){const c=n[a],A=n[a+1];for(let m=i[0];m<i[1];++m){const v=t[m],x=t[m+1];if(nE(c,A,v,x))return 0;s=Math.min(s,QD(c,A,v,x,r))}}return s}function rhe(n,e,t,i,r){if(!(H0(e,n.length)&&H0(i,t.length)))return NaN;let s=1/0;for(let a=e[0];a<=e[1];++a)for(let c=i[0];c<=i[1];++c)if(s=Math.min(s,r.distance(n[a],t[c])),s===0)return s;return s}function ohe(n,e,t){if(_x(n,e,!0))return 0;let i=1/0;for(const r of e){const o=r[0],s=r[r.length-1];if(o!==s&&(i=Math.min(i,Jv(n,[s,o],t)),i===0))return i;const a=t.pointOnLine(r,n);if(i=Math.min(i,t.distance(n,a.point)),i===0)return i}return i}function she(n,e,t,i){if(!H0(e,n.length))return NaN;for(let o=e[0];o<=e[1];++o)if(_x(n[o],t,!0))return 0;let r=1/0;for(let o=e[0];o<e[1];++o){const s=n[o],a=n[o+1];for(const c of t)for(let A=0,m=c.length,v=m-1;A<m;v=A++){const x=c[v],_=c[A];if(nE(s,a,x,_))return 0;r=Math.min(r,QD(s,a,x,_,i))}}return r}function BF(n,e){for(const t of n)for(const i of t)if(_x(i,e,!0))return!0;return!1}function ahe(n,e,t,i=1/0){const r=o9(n),o=o9(e);if(i!==1/0&&WD(r,o,t)>=i)return i;if(S3(r,o)){if(BF(n,e))return 0}else if(BF(e,n))return 0;let s=1/0;for(const a of n)for(let c=0,A=a.length,m=A-1;c<A;m=c++){const v=a[m],x=a[c];for(const _ of e)for(let O=0,P=_.length,F=P-1;O<P;F=O++){const j=_[F],Q=_[O];if(nE(v,x,j,Q))return 0;s=Math.min(s,QD(v,x,j,Q,t))}}return s}function IF(n,e,t,i,r,o){if(!o)return;const s=WD(r9(i,o),r,t);s<e&&n.push([s,o,[0,0]])}function EM(n,e,t,i,r,o,s){if(!o||!s)return;const a=WD(r9(i,o),r9(r,s),t);a<e&&n.push([a,o,s])}function Sw(n,e,t,i,r=1/0){let o=Math.min(i.distance(n[0],t[0][0]),r);if(o===0)return o;const s=new lX([[0,[0,n.length-1],[0,0]]],uX),a=o9(t);for(;s.length>0;){const c=s.pop();if(c[0]>=o)continue;const A=c[1],m=e?n9:t9;if(ww(A)<=m){if(!H0(A,n.length))return NaN;if(e){const v=she(n,A,t,i);if(isNaN(v)||v===0)return v;o=Math.min(o,v)}else for(let v=A[0];v<=A[1];++v){const x=ohe(n[v],t,i);if(o=Math.min(o,x),o===0)return 0}}else{const v=i9(A,e);IF(s,o,i,n,a,v[0]),IF(s,o,i,n,a,v[1])}}return o}function Ew(n,e,t,i,r,o=1/0){let s=Math.min(o,r.distance(n[0],t[0]));if(s===0)return s;const a=new lX([[0,[0,n.length-1],[0,t.length-1]]],uX);for(;a.length>0;){const c=a.pop();if(c[0]>=s)continue;const A=c[1],m=c[2],v=e?n9:t9,x=i?n9:t9;if(ww(A)<=v&&ww(m)<=x){if(!H0(A,n.length)&&H0(m,t.length))return NaN;let _;if(e&&i)_=ihe(n,A,t,m,r),s=Math.min(s,_);else if(e&&!i){const O=n.slice(A[0],A[1]+1);for(let P=m[0];P<=m[1];++P)if(_=Jv(t[P],O,r),s=Math.min(s,_),s===0)return s}else if(!e&&i){const O=t.slice(m[0],m[1]+1);for(let P=A[0];P<=A[1];++P)if(_=Jv(n[P],O,r),s=Math.min(s,_),s===0)return s}else _=rhe(n,A,t,m,r),s=Math.min(s,_)}else{const _=i9(A,e),O=i9(m,i);EM(a,s,r,n,t,_[0],O[0]),EM(a,s,r,n,t,_[0],O[1]),EM(a,s,r,n,t,_[1],O[0]),EM(a,s,r,n,t,_[1],O[1])}}return s}function lhe(n,e){const t=n.geometry(),i=t.flat().map(s=>zD([s.x,s.y],n.canonical));if(t.length===0)return NaN;const r=new GD(i[0][1]);let o=1/0;for(const s of e){switch(s.type){case"Point":o=Math.min(o,Ew(i,!1,[s.coordinates],!1,r,o));break;case"LineString":o=Math.min(o,Ew(i,!1,s.coordinates,!0,r,o));break;case"Polygon":o=Math.min(o,Sw(i,!1,s.coordinates,r,o));break}if(o===0)return o}return o}function uhe(n,e){const t=n.geometry(),i=t.flat().map(s=>zD([s.x,s.y],n.canonical));if(t.length===0)return NaN;const r=new GD(i[0][1]);let o=1/0;for(const s of e){switch(s.type){case"Point":o=Math.min(o,Ew(i,!0,[s.coordinates],!1,r,o));break;case"LineString":o=Math.min(o,Ew(i,!0,s.coordinates,!0,r,o));break;case"Polygon":o=Math.min(o,Sw(i,!0,s.coordinates,r,o));break}if(o===0)return o}return o}function che(n,e){const t=n.geometry();if(t.length===0||t[0].length===0)return NaN;const i=ehe(t).map(s=>s.map(a=>a.map(c=>zD([c.x,c.y],n.canonical)))),r=new GD(i[0][0][0][1]);let o=1/0;for(const s of e)for(const a of i){switch(s.type){case"Point":o=Math.min(o,Sw([s.coordinates],!1,a,r,o));break;case"LineString":o=Math.min(o,Sw(s.coordinates,!0,a,r,o));break;case"Polygon":o=Math.min(o,ahe(a,s.coordinates,r,o));break}if(o===0)return o}return o}function AO(n){return n.type==="MultiPolygon"?n.coordinates.map(e=>({type:"Polygon",coordinates:e})):n.type==="MultiLineString"?n.coordinates.map(e=>({type:"LineString",coordinates:e})):n.type==="MultiPoint"?n.coordinates.map(e=>({type:"Point",coordinates:e})):[n]}let qD=class W5{constructor(e,t){this.type=ni,this.geojson=e,this.geometries=t}static parse(e,t){if(e.length!==2)return t.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(w3(e[1])){const i=e[1];if(i.type==="FeatureCollection")return new W5(i,i.features.map(r=>AO(r.geometry)).flat());if(i.type==="Feature")return new W5(i,AO(i.geometry));if("type"in i&&"coordinates"in i)return new W5(i,AO(i))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return lhe(e,this.geometries);if(e.geometryType()==="LineString")return uhe(e,this.geometries);if(e.geometryType()==="Polygon")return che(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},YD=class cX{constructor(e){this.type=eo,this.key=e}static parse(e,t){if(e.length!==2)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const i=e[1];return i==null?t.error("Global state property must be defined."):typeof i!="string"?t.error(`Global state property must be string, but found ${typeof e[1]} instead.`):new cX(i)}evaluate(e){var t;const i=(t=e.globals)===null||t===void 0?void 0:t.globalState;return!i||Object.keys(i).length===0?null:V2(i,this.key)}eachChild(){}outputDefined(){return!1}};const $D={"==":IAe,"!=":kAe,">":RAe,"<":TAe,">=":PAe,"<=":DAe,array:j0,at:lAe,boolean:j0,case:hAe,coalesce:HZ,collator:JZ,format:KAe,image:LAe,in:uAe,"index-of":cAe,interpolate:W0,"interpolate-hcl":W0,"interpolate-lab":W0,length:FAe,let:zZ,literal:Mw,match:AAe,number:j0,"number-format":UAe,object:j0,slice:dAe,step:$Z,string:j0,"to-boolean":y_,"to-color":y_,"to-number":y_,"to-string":y_,var:NZ,within:ND,distance:qD,"global-state":YD};let xx=class w2{constructor(e,t,i,r){this.name=e,this.type=t,this._evaluate=i,this.args=r}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){const i=e[0],r=w2.definitions[i];if(!r)return t.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(r)?r[0]:r.type,s=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=s.filter(([A])=>!Array.isArray(A)||A.length===e.length-1);let c=null;for(const[A,m]of a){c=new LZ(t.registry,Ow,t.path,null,t.scope);const v=[];let x=!1;for(let _=1;_<e.length;_++){const O=e[_],P=Array.isArray(A)?A[_-1]:A.type,F=c.parse(O,1+v.length,P);if(!F){x=!0;break}v.push(F)}if(!x){if(Array.isArray(A)&&A.length!==v.length){c.error(`Expected ${A.length} arguments, but found ${v.length} instead.`);continue}for(let _=0;_<v.length;_++){const O=Array.isArray(A)?A[_]:A.type,P=v[_];c.concat(_+1).checkSubtype(O,P.type)}if(c.errors.length===0)return new w2(i,o,m,v)}}if(a.length===1)t.errors.push(...c.errors);else{const m=(a.length?a:s).map(([x])=>hhe(x)).join(" | "),v=[];for(let x=1;x<e.length;x++){const _=t.parse(e[x],1+v.length);if(!_)return null;v.push(al(_.type))}t.error(`Expected arguments of type ${m}, but found (${v.join(", ")}) instead.`)}return null}static register(e,t){w2.definitions=t;for(const i in t)e[i]=w2}};function kF(n,[e,t,i,r]){e=e.evaluate(n),t=t.evaluate(n),i=i.evaluate(n);const o=r?r.evaluate(n):1,s=RZ(e,t,i,o);if(s)throw new gl(s);return new da(e/255,t/255,i/255,o,!1)}function TF(n,e){return n in e}function hO(n,e){const t=e[n];return typeof t>"u"?null:t}function Ahe(n,e,t,i){for(;t<=i;){const r=t+i>>1;if(e[r]===n)return!0;e[r]>n?i=r-1:t=r+1}return!1}function Kv(n){return{type:n}}xx.register($D,{error:[Yce,[bo],(n,[e])=>{throw new gl(e.evaluate(n))}],typeof:[bo,[eo],(n,[e])=>al(Pu(e.evaluate(n)))],"to-rgba":[Xd(ni,4),[Bg],(n,[e])=>{const[t,i,r,o]=e.evaluate(n).rgb;return[t*255,i*255,r*255,o]}],rgb:[Bg,[ni,ni,ni],kF],rgba:[Bg,[ni,ni,ni,ni],kF],has:{type:oo,overloads:[[[bo],(n,[e])=>TF(e.evaluate(n),n.properties())],[[bo,ub],(n,[e,t])=>TF(e.evaluate(n),t.evaluate(n))]]},get:{type:eo,overloads:[[[bo],(n,[e])=>hO(e.evaluate(n),n.properties())],[[bo,ub],(n,[e,t])=>hO(e.evaluate(n),t.evaluate(n))]]},"feature-state":[eo,[bo],(n,[e])=>hO(e.evaluate(n),n.featureState||{})],properties:[ub,[],n=>n.properties()],"geometry-type":[bo,[],n=>n.geometryType()],id:[eo,[],n=>n.id()],zoom:[ni,[],n=>n.globals.zoom],"heatmap-density":[ni,[],n=>n.globals.heatmapDensity||0],elevation:[ni,[],n=>n.globals.elevation||0],"line-progress":[ni,[],n=>n.globals.lineProgress||0],accumulated:[eo,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[ni,Kv(ni),(n,e)=>{let t=0;for(const i of e)t+=i.evaluate(n);return t}],"*":[ni,Kv(ni),(n,e)=>{let t=1;for(const i of e)t*=i.evaluate(n);return t}],"-":{type:ni,overloads:[[[ni,ni],(n,[e,t])=>e.evaluate(n)-t.evaluate(n)],[[ni],(n,[e])=>-e.evaluate(n)]]},"/":[ni,[ni,ni],(n,[e,t])=>e.evaluate(n)/t.evaluate(n)],"%":[ni,[ni,ni],(n,[e,t])=>e.evaluate(n)%t.evaluate(n)],ln2:[ni,[],()=>Math.LN2],pi:[ni,[],()=>Math.PI],e:[ni,[],()=>Math.E],"^":[ni,[ni,ni],(n,[e,t])=>Math.pow(e.evaluate(n),t.evaluate(n))],sqrt:[ni,[ni],(n,[e])=>Math.sqrt(e.evaluate(n))],log10:[ni,[ni],(n,[e])=>Math.log(e.evaluate(n))/Math.LN10],ln:[ni,[ni],(n,[e])=>Math.log(e.evaluate(n))],log2:[ni,[ni],(n,[e])=>Math.log(e.evaluate(n))/Math.LN2],sin:[ni,[ni],(n,[e])=>Math.sin(e.evaluate(n))],cos:[ni,[ni],(n,[e])=>Math.cos(e.evaluate(n))],tan:[ni,[ni],(n,[e])=>Math.tan(e.evaluate(n))],asin:[ni,[ni],(n,[e])=>Math.asin(e.evaluate(n))],acos:[ni,[ni],(n,[e])=>Math.acos(e.evaluate(n))],atan:[ni,[ni],(n,[e])=>Math.atan(e.evaluate(n))],min:[ni,Kv(ni),(n,e)=>Math.min(...e.map(t=>t.evaluate(n)))],max:[ni,Kv(ni),(n,e)=>Math.max(...e.map(t=>t.evaluate(n)))],abs:[ni,[ni],(n,[e])=>Math.abs(e.evaluate(n))],round:[ni,[ni],(n,[e])=>{const t=e.evaluate(n);return t<0?-Math.round(-t):Math.round(t)}],floor:[ni,[ni],(n,[e])=>Math.floor(e.evaluate(n))],ceil:[ni,[ni],(n,[e])=>Math.ceil(e.evaluate(n))],"filter-==":[oo,[bo,eo],(n,[e,t])=>n.properties()[e.value]===t.value],"filter-id-==":[oo,[eo],(n,[e])=>n.id()===e.value],"filter-type-==":[oo,[bo],(n,[e])=>n.geometryType()===e.value],"filter-<":[oo,[bo,eo],(n,[e,t])=>{const i=n.properties()[e.value],r=t.value;return typeof i==typeof r&&i<r}],"filter-id-<":[oo,[eo],(n,[e])=>{const t=n.id(),i=e.value;return typeof t==typeof i&&t<i}],"filter->":[oo,[bo,eo],(n,[e,t])=>{const i=n.properties()[e.value],r=t.value;return typeof i==typeof r&&i>r}],"filter-id->":[oo,[eo],(n,[e])=>{const t=n.id(),i=e.value;return typeof t==typeof i&&t>i}],"filter-<=":[oo,[bo,eo],(n,[e,t])=>{const i=n.properties()[e.value],r=t.value;return typeof i==typeof r&&i<=r}],"filter-id-<=":[oo,[eo],(n,[e])=>{const t=n.id(),i=e.value;return typeof t==typeof i&&t<=i}],"filter->=":[oo,[bo,eo],(n,[e,t])=>{const i=n.properties()[e.value],r=t.value;return typeof i==typeof r&&i>=r}],"filter-id->=":[oo,[eo],(n,[e])=>{const t=n.id(),i=e.value;return typeof t==typeof i&&t>=i}],"filter-has":[oo,[eo],(n,[e])=>e.value in n.properties()],"filter-has-id":[oo,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[oo,[Xd(bo)],(n,[e])=>e.value.indexOf(n.geometryType())>=0],"filter-id-in":[oo,[Xd(eo)],(n,[e])=>e.value.indexOf(n.id())>=0],"filter-in-small":[oo,[bo,Xd(eo)],(n,[e,t])=>t.value.indexOf(n.properties()[e.value])>=0],"filter-in-large":[oo,[bo,Xd(eo)],(n,[e,t])=>Ahe(n.properties()[e.value],t.value,0,t.value.length-1)],all:{type:oo,overloads:[[[oo,oo],(n,[e,t])=>e.evaluate(n)&&t.evaluate(n)],[Kv(oo),(n,e)=>{for(const t of e)if(!t.evaluate(n))return!1;return!0}]]},any:{type:oo,overloads:[[[oo,oo],(n,[e,t])=>e.evaluate(n)||t.evaluate(n)],[Kv(oo),(n,e)=>{for(const t of e)if(t.evaluate(n))return!0;return!1}]]},"!":[oo,[oo],(n,[e])=>!e.evaluate(n)],"is-supported-script":[oo,[bo],(n,[e])=>{const t=n.globals&&n.globals.isSupportedScript;return t?t(e.evaluate(n)):!0}],upcase:[bo,[bo],(n,[e])=>e.evaluate(n).toUpperCase()],downcase:[bo,[bo],(n,[e])=>e.evaluate(n).toLowerCase()],concat:[bo,Kv(eo),(n,e)=>e.map(t=>H2(t.evaluate(n))).join("")],"resolved-locale":[bo,[HS],(n,[e])=>e.evaluate(n).resolvedLocale()]});function hhe(n){return Array.isArray(n)?`(${n.map(al).join(", ")})`:`(${al(n.type)}...)`}function Ow(n){if(n instanceof NZ)return Ow(n.boundExpression);if(n instanceof xx&&n.name==="error")return!1;if(n instanceof JZ)return!1;if(n instanceof ND)return!1;if(n instanceof qD)return!1;if(n instanceof YD)return!1;const e=n instanceof y_||n instanceof j0;let t=!0;return n.eachChild(i=>{e?t=t&&Ow(i):t=t&&i instanceof Mw}),t?iE(n)&&rE(n,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function iE(n){if(n instanceof xx){if(n.name==="get"&&n.args.length===1)return!1;if(n.name==="feature-state")return!1;if(n.name==="has"&&n.args.length===1)return!1;if(n.name==="properties"||n.name==="geometry-type"||n.name==="id")return!1;if(/^filter-/.test(n.name))return!1}if(n instanceof ND||n instanceof qD)return!1;let e=!0;return n.eachChild(t=>{e&&!iE(t)&&(e=!1)}),e}function E3(n){if(n instanceof xx&&n.name==="feature-state")return!1;let e=!0;return n.eachChild(t=>{e&&!E3(t)&&(e=!1)}),e}function rE(n,e){if(n instanceof xx&&e.indexOf(n.name)>=0)return!1;let t=!0;return n.eachChild(i=>{t&&!rE(i,e)&&(t=!1)}),t}function s9(n){return{result:"success",value:n}}function a_(n){return{result:"error",value:n}}function Bw(n){return n["property-type"]==="data-driven"||n["property-type"]==="cross-faded-data-driven"}function AX(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function VD(n){return!!n.expression&&n.expression.interpolated}function _o(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function U4(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&Pu(n)===ub}function dhe(n){return n}function fhe(n){switch(n.type){case"color":return da.parse;case"padding":return Qg.parse;case"numberArray":return qg.parse;case"colorArray":return ep.parse;default:return null}}function phe(n){switch(n){case"exponential":return hX;case"interval":return ghe;case"categorical":return mhe;case"identity":return yhe;default:throw new Error(`Unknown function type "${n}"`)}}function HD(n,e){const t=n.stops&&typeof n.stops[0][0]=="object",i=t||n.property!==void 0,r=t||!i,o=n.type||(VD(e)?"exponential":"interval"),s=fhe(e);if(s&&(n=Z_({},n),n.stops&&(n.stops=n.stops.map(m=>[m[0],s(m[1])])),n.default?n.default=s(n.default):n.default=s(e.default)),n.colorSpace&&!rAe(n.colorSpace))throw new Error(`Unknown color space: "${n.colorSpace}"`);const a=phe(o);let c,A;if(o==="categorical"){c=Object.create(null);for(const m of n.stops)c[m[0]]=m[1];A=typeof n.stops[0][0]}if(t){const m={},v=[];for(let O=0;O<n.stops.length;O++){const P=n.stops[O],F=P[0].zoom;m[F]===void 0&&(m[F]={zoom:F,type:n.type,property:n.property,default:n.default,stops:[]},v.push(F)),m[F].stops.push([P[0].value,P[1]])}const x=[];for(const O of v)x.push([m[O].zoom,HD(m[O],e)]);const _={name:"linear"};return{kind:"composite",interpolationType:_,interpolationFactor:W0.interpolationFactor.bind(void 0,_),zoomStops:x.map(O=>O[0]),evaluate({zoom:O},P){return hX({stops:x,base:n.base},e,O).evaluate(O,P)}}}else if(r){const m=o==="exponential"?{name:"exponential",base:n.base!==void 0?n.base:1}:null;return{kind:"camera",interpolationType:m,interpolationFactor:W0.interpolationFactor.bind(void 0,m),zoomStops:n.stops.map(v=>v[0]),evaluate:({zoom:v})=>a(n,e,v,c,A)}}else return{kind:"source",evaluate(m,v){const x=v&&v.properties?v.properties[n.property]:void 0;return x===void 0?K4(n.default,e.default):a(n,e,x,c,A)}}}function K4(n,e,t){if(n!==void 0)return n;if(e!==void 0)return e;if(t!==void 0)return t}function mhe(n,e,t,i,r){const o=typeof t===r?i[t]:void 0;return K4(o,n.default,e.default)}function ghe(n,e,t){if(_o(t)!=="number")return K4(n.default,e.default);const i=n.stops.length;if(i===1||t<=n.stops[0][0])return n.stops[0][1];if(t>=n.stops[i-1][0])return n.stops[i-1][1];const r=tE(n.stops.map(o=>o[0]),t);return n.stops[r][1]}function hX(n,e,t){const i=n.base!==void 0?n.base:1;if(_o(t)!=="number")return K4(n.default,e.default);const r=n.stops.length;if(r===1||t<=n.stops[0][0])return n.stops[0][1];if(t>=n.stops[r-1][0])return n.stops[r-1][1];const o=tE(n.stops.map(m=>m[0]),t),s=vhe(t,i,n.stops[o][0],n.stops[o+1][0]),a=n.stops[o][1],c=n.stops[o+1][1],A=yAe[e.type]||dhe;return typeof a.evaluate=="function"?{evaluate(...m){const v=a.evaluate.apply(void 0,m),x=c.evaluate.apply(void 0,m);if(!(v===void 0||x===void 0))return A(v,x,s,n.colorSpace)}}:A(a,c,s,n.colorSpace)}function yhe(n,e,t){switch(e.type){case"color":t=da.parse(t);break;case"formatted":t=vx.fromString(t.toString());break;case"resolvedImage":t=Ub.fromString(t.toString());break;case"padding":t=Qg.parse(t);break;case"colorArray":t=ep.parse(t);break;case"numberArray":t=qg.parse(t);break;default:_o(t)!==e.type&&(e.type!=="enum"||!e.values[t])&&(t=void 0)}return K4(t,n.default,e.default)}function vhe(n,e,t,i){const r=i-t,o=n-t;return r===0?0:e===1?o/r:(Math.pow(e,o)-1)/(Math.pow(e,r)-1)}let dX=class{constructor(e,t,i){this.expression=e,this._warningHistory={},this._evaluator=new KZ,this._defaultValue=t?xhe(t):null,this._enumValues=t&&t.type==="enum"?t.values:null,this._globalState=i}evaluateWithoutErrorHandling(e,t,i,r,o,s){return this._globalState&&(e={...e,globalState:this._globalState}),this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.canonical=r,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s,this.expression.evaluate(this._evaluator)}evaluate(e,t,i,r,o,s){this._globalState&&(e={...e,globalState:this._globalState}),this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=i||null,this._evaluator.canonical=r,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s||null;try{const a=this.expression.evaluate(this._evaluator);if(a==null||typeof a=="number"&&a!==a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new gl(`Expected value to be one of ${Object.keys(this._enumValues).map(c=>JSON.stringify(c)).join(", ")}, but found ${JSON.stringify(a)} instead.`);return a}catch(a){return this._warningHistory[a.message]||(this._warningHistory[a.message]=!0,typeof console<"u"&&console.warn(a.message)),this._defaultValue}}};function L4(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in $D}function ZD(n,e,t){const i=new LZ($D,Ow,[],e?_he(e):void 0),r=i.parse(n,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return r?s9(new dX(r,e,t)):a_(i.errors)}let a9=class{constructor(e,t,i){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!E3(t.expression),this.globalStateRefs=JD(t.expression),this._globalState=i}evaluateWithoutErrorHandling(e,t,i,r,o,s){return this._globalState&&(e={...e,globalState:this._globalState}),this._styleExpression.evaluateWithoutErrorHandling(e,t,i,r,o,s)}evaluate(e,t,i,r,o,s){return this._globalState&&(e={...e,globalState:this._globalState}),this._styleExpression.evaluate(e,t,i,r,o,s)}},l9=class{constructor(e,t,i,r,o){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!E3(t.expression),this.globalStateRefs=JD(t.expression),this.interpolationType=r,this._globalState=o}evaluateWithoutErrorHandling(e,t,i,r,o,s){return this._globalState&&(e={...e,globalState:this._globalState}),this._styleExpression.evaluateWithoutErrorHandling(e,t,i,r,o,s)}evaluate(e,t,i,r,o,s){return this._globalState&&(e={...e,globalState:this._globalState}),this._styleExpression.evaluate(e,t,i,r,o,s)}interpolationFactor(e,t,i){return this.interpolationType?W0.interpolationFactor(this.interpolationType,e,t,i):0}};function bhe(n){return n._styleExpression!==void 0}function XD(n,e,t){const i=ZD(n,e,t);if(i.result==="error")return i;const r=i.value.expression,o=iE(r);if(!o&&!Bw(e))return a_([new pg("","data expressions not supported")]);const s=rE(r,["zoom"]);if(!s&&!AX(e))return a_([new pg("","zoom expressions not supported")]);const a=Q5(r);if(!a&&!s)return a_([new pg("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof pg)return a_([a]);if(a instanceof W0&&!VD(e))return a_([new pg("",'"interpolate" expressions cannot be used with this property')]);if(!a)return s9(o?new a9("constant",i.value,t):new a9("source",i.value,t));const c=a instanceof W0?a.interpolation:void 0;return s9(o?new l9("camera",i.value,a.labels,c,t):new l9("composite",i.value,a.labels,c,t))}class oE{constructor(e,t){this._parameters=e,this._specification=t,Z_(this,HD(this._parameters,this._specification))}static deserialize(e){return new oE(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Che(n,e,t){if(U4(n))return new oE(n,e);if(L4(n)){const i=XD(n,e,t);if(i.result==="error")throw new Error(i.value.map(r=>`${r.key}: ${r.message}`).join(", "));return i.value}else{let i=n;return e.type==="color"&&typeof n=="string"?i=da.parse(n):e.type==="padding"&&(typeof n=="number"||Array.isArray(n))?i=Qg.parse(n):e.type==="numberArray"&&(typeof n=="number"||Array.isArray(n))?i=qg.parse(n):e.type==="colorArray"&&(typeof n=="string"||Array.isArray(n))?i=ep.parse(n):e.type==="variableAnchorOffsetCollection"&&Array.isArray(n)?i=Jy.parse(n):e.type==="projectionDefinition"&&typeof n=="string"&&(i=bx.parse(n)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>i}}}function Q5(n){let e=null;if(n instanceof zZ)e=Q5(n.result);else if(n instanceof HZ){for(const t of n.args)if(e=Q5(t),e)break}else(n instanceof $Z||n instanceof W0)&&n.input instanceof xx&&n.input.name==="zoom"&&(e=n);return e instanceof pg||n.eachChild(t=>{const i=Q5(t);i instanceof pg?e=i:!e&&i?e=new pg("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&i&&e!==i&&(e=new pg("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function JD(n,e=new Set){return n instanceof YD&&e.add(n.key),n.eachChild(t=>{JD(t,e)}),e}function _he(n){const e={color:Bg,string:bo,number:ni,enum:bo,boolean:oo,formatted:ZS,padding:XS,numberArray:JS,colorArray:x3,projectionDefinition:VS,resolvedImage:D4,variableAnchorOffsetCollection:eE};return n.type==="array"?Xd(e[n.value]||eo,n.length):e[n.type]}function xhe(n){if(n.type==="color"&&U4(n.default))return new da(0,0,0,0);switch(n.type){case"color":return da.parse(n.default)||null;case"padding":return Qg.parse(n.default)||null;case"numberArray":return qg.parse(n.default)||null;case"colorArray":return ep.parse(n.default)||null;case"variableAnchorOffsetCollection":return Jy.parse(n.default)||null;case"projectionDefinition":return bx.parse(n.default)||null;default:return n.default===void 0?null:n.default}}function sE(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 e of n.slice(1))if(!sE(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function Z2(n,e={}){if(sE(n))return n;if(!n)return!0;const t=n,i=t[0];if(n.length<=1)return i!=="any";switch(i){case"==":case"!=":case"<":case">":case"<=":case">=":{const[,r,o]=n;return whe(r,o,i,e)}case"any":{const[,...r]=t;return["any",...r.map(s=>{const a={},c=Z2(s,a),A=Mhe(a);return A===!0?c:["case",A,c,!1]})]}case"all":{const[,...r]=t,o=r.map(s=>Z2(s,e));return o.length>1?["all",...o]:o[0]}case"none":{const[,...r]=t;return["!",Z2(["any",...r],{})]}case"in":{const[,r,...o]=t;return RF(r,o)}case"!in":{const[,r,...o]=t;return RF(r,o,!0)}case"has":return DF(t[1]);case"!has":return["!",DF(t[1])];default:return!0}}function Mhe(n){const e=[];for(const t in n){const i=t==="$id"?["id"]:["get",t];e.push(["==",["typeof",i],n[t]])}return e.length===0?!0:e.length===1?e[0]:["all",...e]}function whe(n,e,t,i){let r;if(n==="$type")return[t,["geometry-type"],e];if(n==="$id"?r=["id"]:r=["get",n],i&&e!==null){const o=typeof e;i[n]=o}return t==="=="&&n!=="$id"&&e===null?["all",["has",n],["==",r,null]]:t==="!="&&n!=="$id"&&e===null?["any",["!",["has",n]],["!=",r,null]]:[t,r,e]}function RF(n,e,t=!1){if(e.length===0)return t;let i;n==="$type"?i=["geometry-type"]:n==="$id"?i=["id"]:i=["get",n];let r=!0;const o=typeof e[0];for(const s of e)if(typeof s!==o){r=!1;break}if(r&&(o==="string"||o==="number")){const s=e.sort().filter((a,c)=>c===0||e[c-1]!==a);return["match",i,s,!t,t]}return t?["all",...e.map(s=>["!=",i,s])]:["any",...e.map(s=>["==",i,s])]}function DF(n){return n==="$type"?!0:n==="$id"?["!=",["id"],null]:["has",n]}function O3(n){return typeof n=="object"?["literal",n]:n}function fX(n,e){let t=n.stops;if(!t)return She(n,e);const i=t&&typeof t[0][0]=="object",r=i||n.property!==void 0,o=i||!r;return t=t.map(s=>!r&&e.tokens&&typeof s[1]=="string"?[s[0],pX(s[1])]:[s[0],O3(s[1])]),i?Ehe(n,e,t):o?Bhe(n,e,t):u9(n,e,t)}function She(n,e){const t=["get",n.property];if(n.default===void 0)return e.type==="string"?["string",t]:t;if(e.type==="enum")return["match",t,Object.keys(e.values),t,n.default];{const i=[e.type==="color"?"to-color":e.type,t,O3(n.default)];return e.type==="array"&&i.splice(1,0,e.value,e.length||null),i}}function eP(n){switch(n.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Ehe(n,e,t){const i={},r={},o=[];for(let a=0;a<t.length;a++){const c=t[a],A=c[0].zoom;i[A]===void 0&&(i[A]={zoom:A,type:n.type,property:n.property,default:n.default},r[A]=[],o.push(A)),r[A].push([c[0].value,c[1]])}if(nP({},e)==="exponential"){const a=[eP(n),["linear"],["zoom"]];for(const c of o){const A=u9(i[c],e,r[c]);B_(a,c,A,!1)}return a}else{const a=["step",["zoom"]];for(const c of o){const A=u9(i[c],e,r[c]);B_(a,c,A,!0)}return tP(a),a}}function Ohe(n,e){if(n!==void 0)return n;if(e!==void 0)return e}function PF(n,e){const t=O3(Ohe(n.default,e.default));return t===void 0&&e.type==="resolvedImage"?"":t}function u9(n,e,t){const i=nP(n,e),r=["get",n.property];if(i==="categorical"&&typeof t[0][0]=="boolean"){const o=["case"];for(const s of t)o.push(["==",r,s[0]],s[1]);return o.push(PF(n,e)),o}else if(i==="categorical"){const o=["match",r];for(const s of t)B_(o,s[0],s[1],!1);return o.push(PF(n,e)),o}else if(i==="interval"){const o=["step",["number",r]];for(const s of t)B_(o,s[0],s[1],!0);return tP(o),n.default===void 0?o:["case",["==",["typeof",r],"number"],o,O3(n.default)]}else if(i==="exponential"){const o=n.base!==void 0?n.base:1,s=[eP(n),o===1?["linear"]:["exponential",o],["number",r]];for(const a of t)B_(s,a[0],a[1],!1);return n.default===void 0?s:["case",["==",["typeof",r],"number"],s,O3(n.default)]}else throw new Error(`Unknown property function type ${i}`)}function Bhe(n,e,t,i=["zoom"]){const r=nP(n,e);let o,s=!1;if(r==="interval")o=["step",i],s=!0;else if(r==="exponential"){const a=n.base!==void 0?n.base:1;o=[eP(n),a===1?["linear"]:["exponential",a],i]}else throw new Error(`Unknown zoom function type "${r}"`);for(const a of t)B_(o,a[0],a[1],s);return tP(o),o}function tP(n){n[0]==="step"&&n.length===3&&(n.push(0),n.push(n[3]))}function B_(n,e,t,i){n.length>3&&e===n[n.length-2]||(i&&n.length===2||n.push(e),n.push(t))}function nP(n,e){return n.type?n.type:e.expression.interpolated?"exponential":"interval"}function pX(n){const e=["concat"],t=/{([^{}]+)}/g;let i=0;for(let r=t.exec(n);r!==null;r=t.exec(n)){const o=n.slice(i,t.lastIndex-r[0].length);i=t.lastIndex,o.length>0&&e.push(o),e.push(["get",r[1]])}if(e.length===1)return n;if(i<n.length)e.push(n.slice(i));else if(e.length===2)return["to-string",e[1]];return e}function Ihe(n){for(let e=0;e<ss.layout.length;e++)for(const t in ss[ss.layout[e]])if(t===n)return ss[ss.layout[e]][t];for(let e=0;e<ss.paint.length;e++)for(const t in ss[ss.paint[e]])if(t===n)return ss[ss.paint[e]][t];return null}function khe(n,e){for(const t in n.sources)e(n.sources[t])}function X2(n,e){for(const t of n.layers)e(t)}function iP(n,e,t){function i(r,o){const s=r[o];s&&Object.keys(s).forEach(a=>{t({path:[r.id,o,a],key:a,value:s[a],reference:Ihe(a),set(c){s[a]=c}})})}X2(n,r=>{e.paint&&i(r,"paint"),e.layout&&i(r,"layout")})}function mX(n){const e=n.key,t=n.value;return t?[new Yn(e,t,"constants have been deprecated as of v8")]:[]}function Nl(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function xb(n){if(Array.isArray(n))return n.map(xb);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){const e={};for(const t in n)e[t]=xb(n[t]);return e}return Nl(n)}function Vf(n){const e=n.key,t=n.value,i=n.valueSpec||{},r=n.objectElementValidators||{},o=n.style,s=n.styleSpec,a=n.validateSpec;let c=[];const A=_o(t);if(A!=="object")return[new Yn(e,t,`object expected, ${A} found`)];for(const m in t){const v=m.split(".")[0],x=V2(i,v)||i["*"];let _;if(V2(r,v))_=r[v];else if(V2(i,v))_=a;else if(r["*"])_=r["*"];else if(i["*"])_=a;else{c.push(new Yn(e,t[m],`unknown property "${m}"`));continue}c=c.concat(_({key:(e&&`${e}.`)+m,value:t[m],valueSpec:x,style:o,styleSpec:s,object:t,objectKey:m,validateSpec:a},t))}for(const m in i)r[m]||i[m].required&&i[m].default===void 0&&t[m]===void 0&&c.push(new Yn(e,t,`missing required property "${m}"`));return c}function rP(n){const e=n.value,t=n.valueSpec,i=n.validateSpec,r=n.style,o=n.styleSpec,s=n.key,a=n.arrayElementValidator||i;if(_o(e)!=="array")return[new Yn(s,e,`array expected, ${_o(e)} found`)];if(t.length&&e.length!==t.length)return[new Yn(s,e,`array length ${t.length} expected, length ${e.length} found`)];if(t["min-length"]&&e.length<t["min-length"])return[new Yn(s,e,`array length at least ${t["min-length"]} expected, length ${e.length} found`)];let c={type:t.value,values:t.values};o.$version<7&&(c.function=t.function),_o(t.value)==="object"&&(c=t.value);let A=[];for(let m=0;m<e.length;m++)A=A.concat(a({array:e,arrayIndex:m,value:e[m],valueSpec:c,validateSpec:n.validateSpec,style:r,styleSpec:o,key:`${s}[${m}]`}));return A}function aE(n){const e=n.key,t=n.value,i=n.valueSpec;let r=_o(t);return r==="number"&&t!==t&&(r="NaN"),r!=="number"?[new Yn(e,t,`number expected, ${r} found`)]:"minimum"in i&&t<i.minimum?[new Yn(e,t,`${t} is less than the minimum value ${i.minimum}`)]:"maximum"in i&&t>i.maximum?[new Yn(e,t,`${t} is greater than the maximum value ${i.maximum}`)]:[]}function gX(n){const e=n.valueSpec,t=Nl(n.value.type);let i,r={},o,s;const a=t!=="categorical"&&n.value.property===void 0,c=!a,A=_o(n.value.stops)==="array"&&_o(n.value.stops[0])==="array"&&_o(n.value.stops[0][0])==="object",m=Vf({key:n.key,value:n.value,valueSpec:n.styleSpec.function,validateSpec:n.validateSpec,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:v,default:O}});return t==="identity"&&a&&m.push(new Yn(n.key,n.value,'missing required property "property"')),t!=="identity"&&!n.value.stops&&m.push(new Yn(n.key,n.value,'missing required property "stops"')),t==="exponential"&&n.valueSpec.expression&&!VD(n.valueSpec)&&m.push(new Yn(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(c&&!Bw(n.valueSpec)?m.push(new Yn(n.key,n.value,"property functions not supported")):a&&!AX(n.valueSpec)&&m.push(new Yn(n.key,n.value,"zoom functions not supported"))),(t==="categorical"||A)&&n.value.property===void 0&&m.push(new Yn(n.key,n.value,'"property" property is required')),m;function v(P){if(t==="identity")return[new Yn(P.key,P.value,'identity function may not have a "stops" property')];let F=[];const j=P.value;return F=F.concat(rP({key:P.key,value:j,valueSpec:P.valueSpec,validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec,arrayElementValidator:x})),_o(j)==="array"&&j.length===0&&F.push(new Yn(P.key,j,"array must have at least one stop")),F}function x(P){let F=[];const j=P.value,Q=P.key;if(_o(j)!=="array")return[new Yn(Q,j,`array expected, ${_o(j)} found`)];if(j.length!==2)return[new Yn(Q,j,`array length 2 expected, length ${j.length} found`)];if(A){if(_o(j[0])!=="object")return[new Yn(Q,j,`object expected, ${_o(j[0])} found`)];if(j[0].zoom===void 0)return[new Yn(Q,j,"object stop key must have zoom")];if(j[0].value===void 0)return[new Yn(Q,j,"object stop key must have value")];if(s&&s>Nl(j[0].zoom))return[new Yn(Q,j[0].zoom,"stop zoom values must appear in ascending order")];Nl(j[0].zoom)!==s&&(s=Nl(j[0].zoom),o=void 0,r={}),F=F.concat(Vf({key:`${Q}[0]`,value:j[0],valueSpec:{zoom:{}},validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec,objectElementValidators:{zoom:aE,value:_}}))}else F=F.concat(_({key:`${Q}[0]`,value:j[0],validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec},j));return L4(xb(j[1]))?F.concat([new Yn(`${Q}[1]`,j[1],"expressions are not allowed in function stops.")]):F.concat(P.validateSpec({key:`${Q}[1]`,value:j[1],valueSpec:e,validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec}))}function _(P,F){const j=_o(P.value),Q=Nl(P.value),V=P.value!==null?P.value:F;if(!i)i=j;else if(j!==i)return[new Yn(P.key,V,`${j} stop domain type must match previous stop domain type ${i}`)];if(j!=="number"&&j!=="string"&&j!=="boolean")return[new Yn(P.key,V,"stop domain value must be a number, string, or boolean")];if(j!=="number"&&t!=="categorical"){let H=`number expected, ${j} found`;return Bw(e)&&t===void 0&&(H+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Yn(P.key,V,H)]}return t==="categorical"&&j==="number"&&(!isFinite(Q)||Math.floor(Q)!==Q)?[new Yn(P.key,V,`integer expected, found ${Q}`)]:t!=="categorical"&&j==="number"&&o!==void 0&&Q<o?[new Yn(P.key,V,"stop domain values must appear in ascending order")]:(o=Q,t==="categorical"&&Q in r?[new Yn(P.key,V,"stop domain values must be unique")]:(r[Q]=!0,[]))}function O(P){return P.validateSpec({key:P.key,value:P.value,valueSpec:e,validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec})}}function J_(n){const e=(n.expressionContext==="property"?XD:ZD)(xb(n.value),n.valueSpec);if(e.result==="error")return e.value.map(i=>new Yn(`${n.key}${i.key}`,n.value,i.message));const t=e.value.expression||e.value._styleExpression.expression;if(n.expressionContext==="property"&&n.propertyKey==="text-font"&&!t.outputDefined())return[new Yn(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"&&!E3(t))return[new Yn(n.key,n.value,'"feature-state" data expressions are not supported with layout properties.')];if(n.expressionContext==="filter"&&!E3(t))return[new Yn(n.key,n.value,'"feature-state" data expressions are not supported with filters.')];if(n.expressionContext&&n.expressionContext.indexOf("cluster")===0){if(!rE(t,["zoom","feature-state"]))return[new Yn(n.key,n.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(n.expressionContext==="cluster-initial"&&!iE(t))return[new Yn(n.key,n.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function The(n){const e=n.value,t=n.key,i=_o(e);return i!=="boolean"?[new Yn(t,e,`boolean expected, ${i} found`)]:[]}function c9(n){const e=n.key,t=n.value,i=_o(t);return i!=="string"?[new Yn(e,t,`color expected, ${i} found`)]:da.parse(String(t))?[]:[new Yn(e,t,`color expected, "${t}" found`)]}function B3(n){const e=n.key,t=n.value,i=n.valueSpec,r=[];return Array.isArray(i.values)?i.values.indexOf(Nl(t))===-1&&r.push(new Yn(e,t,`expected one of [${i.values.join(", ")}], ${JSON.stringify(t)} found`)):Object.keys(i.values).indexOf(Nl(t))===-1&&r.push(new Yn(e,t,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(t)} found`)),r}function oP(n){return sE(xb(n.value))?J_(Z_({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):yX(n)}function yX(n){const e=n.value,t=n.key;if(_o(e)!=="array")return[new Yn(t,e,`array expected, ${_o(e)} found`)];const i=n.styleSpec;let r,o=[];if(e.length<1)return[new Yn(t,e,"filter array must have at least 1 element")];switch(o=o.concat(B3({key:`${t}[0]`,value:e[0],valueSpec:i.filter_operator,style:n.style,styleSpec:n.styleSpec})),Nl(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&Nl(e[1])==="$type"&&o.push(new Yn(t,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&o.push(new Yn(t,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(r=_o(e[1]),r!=="string"&&o.push(new Yn(`${t}[1]`,e[1],`string expected, ${r} found`)));for(let s=2;s<e.length;s++)r=_o(e[s]),Nl(e[1])==="$type"?o=o.concat(B3({key:`${t}[${s}]`,value:e[s],valueSpec:i.geometry_type,style:n.style,styleSpec:n.styleSpec})):r!=="string"&&r!=="number"&&r!=="boolean"&&o.push(new Yn(`${t}[${s}]`,e[s],`string, number, or boolean expected, ${r} found`));break;case"any":case"all":case"none":for(let s=1;s<e.length;s++)o=o.concat(yX({key:`${t}[${s}]`,value:e[s],style:n.style,styleSpec:n.styleSpec}));break;case"has":case"!has":r=_o(e[1]),e.length!==2?o.push(new Yn(t,e,`filter array for "${e[0]}" operator must have 2 elements`)):r!=="string"&&o.push(new Yn(`${t}[1]`,e[1],`string expected, ${r} found`));break}return o}function vX(n,e){const t=n.key,i=n.validateSpec,r=n.style,o=n.styleSpec,s=n.value,a=n.objectKey,c=o[`${e}_${n.layerType}`];if(!c)return[];const A=a.match(/^(.*)-transition$/);if(e==="paint"&&A&&c[A[1]]&&c[A[1]].transition)return i({key:t,value:s,valueSpec:o.transition,style:r,styleSpec:o});const m=n.valueSpec||c[a];if(!m)return[new Yn(t,s,`unknown property "${a}"`)];let v;if(_o(s)==="string"&&Bw(m)&&!m.tokens&&(v=/^{([^}]+)}$/.exec(s)))return[new Yn(t,s,`"${a}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(v[1])} }\`.`)];const x=[];return n.layerType==="symbol"&&(a==="text-field"&&r&&!r.glyphs&&x.push(new Yn(t,s,'use of "text-field" requires a style "glyphs" property')),a==="text-font"&&U4(xb(s))&&Nl(s.type)==="identity"&&x.push(new Yn(t,s,'"text-font" does not support identity functions'))),x.concat(i({key:n.key,value:s,valueSpec:m,style:r,styleSpec:o,expressionContext:"property",propertyType:e,propertyKey:a}))}function bX(n){return vX(n,"paint")}function CX(n){return vX(n,"layout")}function _X(n){let e=[];const t=n.value,i=n.key,r=n.style,o=n.styleSpec;if(_o(t)!=="object")return[new Yn(i,t,`object expected, ${_o(t)} found`)];!t.type&&!t.ref&&e.push(new Yn(i,t,'either "type" or "ref" is required'));let s=Nl(t.type);const a=Nl(t.ref);if(t.id){const c=Nl(t.id);for(let A=0;A<n.arrayIndex;A++){const m=r.layers[A];Nl(m.id)===c&&e.push(new Yn(i,t.id,`duplicate layer id "${t.id}", previously used at line ${m.id.__line__}`))}}if("ref"in t){["type","source","source-layer","filter","layout"].forEach(A=>{A in t&&e.push(new Yn(i,t[A],`"${A}" is prohibited for ref layers`))});let c;r.layers.forEach(A=>{Nl(A.id)===a&&(c=A)}),c?c.ref?e.push(new Yn(i,t.ref,"ref cannot reference another ref layer")):s=Nl(c.type):e.push(new Yn(i,t.ref,`ref layer "${a}" not found`))}else if(s!=="background")if(!t.source)e.push(new Yn(i,t,'missing required property "source"'));else{const c=r.sources&&r.sources[t.source],A=c&&Nl(c.type);c?A==="vector"&&s==="raster"?e.push(new Yn(i,t.source,`layer "${t.id}" requires a raster source`)):A!=="raster-dem"&&s==="hillshade"?e.push(new Yn(i,t.source,`layer "${t.id}" requires a raster-dem source`)):A!=="raster-dem"&&s==="color-relief"?e.push(new Yn(i,t.source,`layer "${t.id}" requires a raster-dem source`)):A==="raster"&&s!=="raster"?e.push(new Yn(i,t.source,`layer "${t.id}" requires a vector source`)):A==="vector"&&!t["source-layer"]?e.push(new Yn(i,t,`layer "${t.id}" must specify a "source-layer"`)):A==="raster-dem"&&s!=="hillshade"&&s!=="color-relief"?e.push(new Yn(i,t.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):s==="line"&&t.paint&&t.paint["line-gradient"]&&(A!=="geojson"||!c.lineMetrics)&&e.push(new Yn(i,t,`layer "${t.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new Yn(i,t.source,`source "${t.source}" not found`))}return e=e.concat(Vf({key:i,value:t,valueSpec:o.layer,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,objectElementValidators:{"*"(){return[]},type(){return n.validateSpec({key:`${i}.type`,value:t.type,valueSpec:o.layer.type,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,object:t,objectKey:"type"})},filter:oP,layout(c){return Vf({layer:t,key:c.key,value:c.value,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*"(A){return CX(Z_({layerType:s},A))}}})},paint(c){return Vf({layer:t,key:c.key,value:c.value,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*"(A){return bX(Z_({layerType:s},A))}}})}}})),e}function Mb(n){const e=n.value,t=n.key,i=_o(e);return i!=="string"?[new Yn(t,e,`string expected, ${i} found`)]:[]}function Rhe(n){var e;const t=(e=n.sourceName)!==null&&e!==void 0?e:"",i=n.value,r=n.styleSpec,o=r.source_raster_dem,s=n.style;let a=[];const c=_o(i);if(i===void 0)return a;if(c!=="object")return a.push(new Yn("source_raster_dem",i,`object expected, ${c} found`)),a;const m=Nl(i.encoding)==="custom",v=["redFactor","greenFactor","blueFactor","baseShift"],x=n.value.encoding?`"${n.value.encoding}"`:"Default";for(const _ in i)!m&&v.includes(_)?a.push(new Yn(_,i[_],`In "${t}": "${_}" is only valid when "encoding" is set to "custom". ${x} encoding found`)):o[_]?a=a.concat(n.validateSpec({key:_,value:i[_],valueSpec:o[_],validateSpec:n.validateSpec,style:s,styleSpec:r})):a.push(new Yn(_,i[_],`unknown property "${_}"`));return a}const UF={promoteId:Dhe};function xX(n){const e=n.value,t=n.key,i=n.styleSpec,r=n.style,o=n.validateSpec;if(!e.type)return[new Yn(t,e,'"type" is required')];const s=Nl(e.type);let a;switch(s){case"vector":case"raster":return a=Vf({key:t,value:e,valueSpec:i[`source_${s.replace("-","_")}`],style:n.style,styleSpec:i,objectElementValidators:UF,validateSpec:o}),a;case"raster-dem":return a=Rhe({sourceName:t,value:e,style:n.style,styleSpec:i,validateSpec:o}),a;case"geojson":if(a=Vf({key:t,value:e,valueSpec:i.source_geojson,style:r,styleSpec:i,validateSpec:o,objectElementValidators:UF}),e.cluster)for(const c in e.clusterProperties){const[A,m]=e.clusterProperties[c],v=typeof A=="string"?[A,["accumulated"],["get",c]]:A;a.push(...J_({key:`${t}.${c}.map`,value:m,expressionContext:"cluster-map"})),a.push(...J_({key:`${t}.${c}.reduce`,value:v,expressionContext:"cluster-reduce"}))}return a;case"video":return Vf({key:t,value:e,valueSpec:i.source_video,style:r,validateSpec:o,styleSpec:i});case"image":return Vf({key:t,value:e,valueSpec:i.source_image,style:r,validateSpec:o,styleSpec:i});case"canvas":return[new Yn(t,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return B3({key:`${t}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Dhe({key:n,value:e}){if(_o(e)==="string")return Mb({key:n,value:e});{const t=[];for(const i in e)t.push(...Mb({key:`${n}.${i}`,value:e[i]}));return t}}function MX(n){const e=n.value,t=n.styleSpec,i=t.light,r=n.style;let o=[];const s=_o(e);if(e===void 0)return o;if(s!=="object")return o=o.concat([new Yn("light",e,`object expected, ${s} found`)]),o;for(const a in e){const c=a.match(/^(.*)-transition$/);c&&i[c[1]]&&i[c[1]].transition?o=o.concat(n.validateSpec({key:a,value:e[a],valueSpec:t.transition,validateSpec:n.validateSpec,style:r,styleSpec:t})):i[a]?o=o.concat(n.validateSpec({key:a,value:e[a],valueSpec:i[a],validateSpec:n.validateSpec,style:r,styleSpec:t})):o=o.concat([new Yn(a,e[a],`unknown property "${a}"`)])}return o}function wX(n){const e=n.value,t=n.styleSpec,i=t.sky,r=n.style,o=_o(e);if(e===void 0)return[];if(o!=="object")return[new Yn("sky",e,`object expected, ${o} found`)];let s=[];for(const a in e)i[a]?s=s.concat(n.validateSpec({key:a,value:e[a],valueSpec:i[a],style:r,styleSpec:t})):s=s.concat([new Yn(a,e[a],`unknown property "${a}"`)]);return s}function SX(n){const e=n.value,t=n.styleSpec,i=t.terrain,r=n.style;let o=[];const s=_o(e);if(e===void 0)return o;if(s!=="object")return o=o.concat([new Yn("terrain",e,`object expected, ${s} found`)]),o;for(const a in e)i[a]?o=o.concat(n.validateSpec({key:a,value:e[a],valueSpec:i[a],validateSpec:n.validateSpec,style:r,styleSpec:t})):o=o.concat([new Yn(a,e[a],`unknown property "${a}"`)]);return o}function Phe(n){return Mb(n).length===0?[]:J_(n)}function Uhe(n){return Mb(n).length===0?[]:J_(n)}function Khe(n){const e=n.key,t=n.value;if(_o(t)==="array"){if(t.length<1||t.length>4)return[new Yn(e,t,`padding requires 1 to 4 values; ${t.length} values found`)];const r={type:"number"};let o=[];for(let s=0;s<t.length;s++)o=o.concat(n.validateSpec({key:`${e}[${s}]`,value:t[s],validateSpec:n.validateSpec,valueSpec:r}));return o}else return aE({key:e,value:t,valueSpec:{}})}function Lhe(n){const e=n.key,t=n.value;if(_o(t)==="array"){const r={type:"number"};if(t.length<1)return[new Yn(e,t,"array length at least 1 expected, length 0 found")];let o=[];for(let s=0;s<t.length;s++)o=o.concat(n.validateSpec({key:`${e}[${s}]`,value:t[s],validateSpec:n.validateSpec,valueSpec:r}));return o}else return aE({key:e,value:t,valueSpec:{}})}function Fhe(n){const e=n.key,t=n.value;if(_o(t)==="array"){if(t.length<1)return[new Yn(e,t,"array length at least 1 expected, length 0 found")];let r=[];for(let o=0;o<t.length;o++)r=r.concat(c9({key:`${e}[${o}]`,value:t[o]}));return r}else return c9({key:e,value:t})}function zhe(n){const e=n.key,t=n.value,i=_o(t),r=n.styleSpec;if(i!=="array"||t.length<1||t.length%2!==0)return[new Yn(e,t,"variableAnchorOffsetCollection requires a non-empty array of even length")];let o=[];for(let s=0;s<t.length;s+=2)o=o.concat(B3({key:`${e}[${s}]`,value:t[s],valueSpec:r.layout_symbol["text-anchor"]})),o=o.concat(rP({key:`${e}[${s+1}]`,value:t[s+1],valueSpec:{length:2,value:"number"},validateSpec:n.validateSpec,style:n.style,styleSpec:r}));return o}function EX(n){let e=[];const t=n.value,i=n.key;if(Array.isArray(t)){const r=[],o=[];for(const s in t){t[s].id&&r.includes(t[s].id)&&e.push(new Yn(i,t,`all the sprites' ids must be unique, but ${t[s].id} is duplicated`)),r.push(t[s].id),t[s].url&&o.includes(t[s].url)&&e.push(new Yn(i,t,`all the sprites' URLs must be unique, but ${t[s].url} is duplicated`)),o.push(t[s].url);const a={id:{type:"string",required:!0},url:{type:"string",required:!0}};e=e.concat(Vf({key:`${i}[${s}]`,value:t[s],valueSpec:a,validateSpec:n.validateSpec}))}return e}else return Mb({key:i,value:t})}function jhe(n){const e=n.value,t=n.styleSpec,i=t.projection,r=n.style,o=_o(e);if(e===void 0)return[];if(o!=="object")return[new Yn("projection",e,`object expected, ${o} found`)];let s=[];for(const a in e)i[a]?s=s.concat(n.validateSpec({key:a,value:e[a],valueSpec:i[a],style:r,styleSpec:t})):s=s.concat([new Yn(a,e[a],`unknown property "${a}"`)]);return s}function Nhe(n){const e=n.key;let t=n.value;t=t instanceof String?t.valueOf():t;const i=_o(t);return i==="array"&&!Whe(t)&&!Ghe(t)?[new Yn(e,t,`projection expected, invalid array ${JSON.stringify(t)} found`)]:["array","string"].includes(i)?[]:[new Yn(e,t,`projection expected, invalid type "${i}" found`)]}function Ghe(n){return!!["interpolate","step","literal"].includes(n[0])}function Whe(n){return Array.isArray(n)&&n.length===3&&typeof n[0]=="string"&&typeof n[1]=="string"&&typeof n[2]=="number"}function Qhe(n){return!!n&&n.constructor===Object}function OX(n){return Qhe(n.value)?[]:[new Yn(n.key,n.value,`object expected, ${_o(n.value)} found`)]}const KF={"*"(){return[]},array:rP,boolean:The,number:aE,color:c9,constants:mX,enum:B3,filter:oP,function:gX,layer:_X,object:Vf,source:xX,light:MX,sky:wX,terrain:SX,projection:jhe,projectionDefinition:Nhe,string:Mb,formatted:Phe,resolvedImage:Uhe,padding:Khe,numberArray:Lhe,colorArray:Fhe,variableAnchorOffsetCollection:zhe,sprite:EX,state:OX};function Iw(n){const e=n.value,t=n.valueSpec,i=n.styleSpec;return n.validateSpec=Iw,t.expression&&U4(Nl(e))?gX(n):t.expression&&L4(xb(e))?J_(n):t.type&&KF[t.type]?KF[t.type](n):Vf(Z_({},n,{valueSpec:t.type?i[t.type]:t}))}function BX(n){const e=n.value,t=n.key,i=Mb(n);return i.length||(e.indexOf("{fontstack}")===-1&&i.push(new Yn(t,e,'"glyphs" url must include a "{fontstack}" token')),e.indexOf("{range}")===-1&&i.push(new Yn(t,e,'"glyphs" url must include a "{range}" token'))),i}function od(n,e=ss){let t=[];return t=t.concat(Iw({key:"",value:n,valueSpec:e.$root,styleSpec:e,style:n,validateSpec:Iw,objectElementValidators:{glyphs:BX,"*"(){return[]}}})),n.constants&&(t=t.concat(mX({key:"constants",value:n.constants}))),IX(t)}od.source=gm(mm(xX));od.sprite=gm(mm(EX));od.glyphs=gm(mm(BX));od.light=gm(mm(MX));od.sky=gm(mm(wX));od.terrain=gm(mm(SX));od.state=gm(mm(OX));od.layer=gm(mm(_X));od.filter=gm(mm(oP));od.paintProperty=gm(mm(bX));od.layoutProperty=gm(mm(CX));function mm(n){return function(e){return n({...e,validateSpec:Iw})}}function IX(n){return[].concat(n).sort((e,t)=>e.line-t.line)}function gm(n){return function(...e){return IX(n.apply(this,e))}}const qhe=/("(?:[^\\"]|\\.)*")|[:,]/g;function Yhe(n,e={}){const t=JSON.stringify([1],void 0,e.indent===void 0?2:e.indent).slice(2,-3),i=t===""?1/0:e.maxLength===void 0?80:e.maxLength;let{replacer:r}=e;return(function o(s,a,c){s&&typeof s.toJSON=="function"&&(s=s.toJSON());const A=JSON.stringify(s,r);if(A===void 0)return A;const m=i-a.length-c;if(A.length<=m){const v=A.replace(qhe,(x,_)=>_||`${x} `);if(v.length<=m)return v}if(r!=null&&(s=JSON.parse(A),r=void 0),typeof s=="object"&&s!==null){const v=a+t,x=[];let _=0,O,P;if(Array.isArray(s)){O="[",P="]";const{length:F}=s;for(;_<F;_++)x.push(o(s[_],v,_===F-1?0:1)||"null")}else{O="{",P="}";const F=Object.keys(s),{length:j}=F;for(;_<j;_++){const Q=F[_],V=`${JSON.stringify(Q)}: `,H=o(s[Q],v,V.length+(_===j-1?0:1));H!==void 0&&x.push(V+H)}}if(x.length>0)return[O,t+x.join(`,
${v}`),P].join(`
${a}`)}return A})(n,"",0)}function LF(n,e){const t={};for(const i in e)n[i]!==void 0&&(t[i]=n[i]);for(const i in n)t[i]===void 0&&(t[i]=n[i]);return t}function $he(n,e=2){return n=LF(n,ss.$root),n.layers&&(n.layers=n.layers.map(t=>LF(t,ss.layer))),Yhe(n,{indent:e})}function dO(n,e){for(const t in n)t.indexOf("layout")===0&&e(n[t],t)}function FF(n,e){for(const t in n)t.indexOf("paint")===0&&e(n[t],t)}function A9(n,e){return typeof e=="string"&&e[0]==="@"?A9(n,n.constants[e]):e}function Vhe(n){return Array.isArray(n.stops)}function Zx(n,e,t){n[t]=n[e],delete n[e]}function Hhe(n){n.version=8,khe(n,r=>{r.type==="video"&&r.url!==void 0&&Zx(r,"url","urls"),r.type==="video"&&r.coordinates.forEach(o=>o.reverse())}),X2(n,r=>{dO(r,o=>{o["symbol-min-distance"]!==void 0&&Zx(o,"symbol-min-distance","symbol-spacing")}),FF(r,o=>{o["background-image"]!==void 0&&Zx(o,"background-image","background-pattern"),o["line-image"]!==void 0&&Zx(o,"line-image","line-pattern"),o["fill-image"]!==void 0&&Zx(o,"fill-image","fill-pattern")})}),iP(n,{paint:!0,layout:!0},r=>{const o=A9(n,r.value);Vhe(o)&&o.stops.forEach(s=>{s[1]=A9(n,s[1])}),r.set(o)}),delete n.constants,X2(n,r=>{dO(r,o=>{delete o["text-max-size"],delete o["icon-max-size"]}),FF(r,o=>{o["text-size"]&&(r.layout||(r.layout={}),r.layout["text-size"]=o["text-size"],delete o["text-size"]),o["icon-size"]&&(r.layout||(r.layout={}),r.layout["icon-size"]=o["icon-size"],delete o["icon-size"])})});function e(r){function o(s){return s.split(",").map(a=>a.trim())}if(Array.isArray(r))return r;if(typeof r=="string")return o(r);if(typeof r=="object")return r.stops.forEach(s=>{s[1]=o(s[1])}),r;throw new Error("unexpected font value")}X2(n,r=>{dO(r,o=>{o["text-font"]&&(o["text-font"]=e(o["text-font"]))})});let t=0;for(let r=n.layers.length-1;r>=0;r--)if(n.layers[r].type!=="symbol"){t=r+1;break}const i=n.layers.splice(t);return i.reverse(),n.layers=n.layers.concat(i),n}function Zhe(n){const e=[];return X2(n,t=>{t.filter&&(t.filter=Z2(t.filter))}),iP(n,{paint:!0,layout:!0},({path:t,key:i,value:r,reference:o,set:s})=>{L4(r)||i.endsWith("-transition")||o===null||(typeof r=="object"&&!Array.isArray(r)?(s(fX(r,o)),e.push(t.join("."))):o.tokens&&typeof r=="string"&&s(pX(r)))}),n}function Xhe(n){return JSON.parse(Jhe(JSON.stringify(n)))}function Jhe(n){return n.replace(/"hsla?\((.+?)\)"/gi,(e,t)=>{const i=t.match(/^(.+?)\s*,\s*(.+?)\s*,\s*(.+?)(?:\s*,\s*(.+))?$/i);if(i){let[r,o,s,a]=i.slice(1);return[o,s]=[o,s].map(c=>c.endsWith("%")?c:`${parseFloat(c)*100}%`),`"hsl${typeof a=="string"?"a":""}(${[r,o,s,a].filter(Boolean).join(",")})"`}return e})}function ede(n){let e=!1;if(n.version===7&&(n=Hhe(n),e=!0),n.version===8&&(e=!!Zhe(n),e=!0),iP(n,{paint:!0,layout:!0},({value:t,reference:i,set:r})=>{i?.type==="color"&&r(Xhe(t))}),!e)throw new Error(`Cannot migrate from ${n.version}`);return n}const $f=ss,tde={StyleExpression:dX,StylePropertyFunction:oE,ZoomConstantExpression:a9,ZoomDependentExpression:l9,createExpression:ZD,createPropertyExpression:XD,isExpression:L4,isExpressionFilter:sE,isZoomExpression:bhe,normalizePropertyExpression:Che},nde={convertFunction:fX,createFunction:HD,isFunction:U4},ide=8,rde=JSON.parse('{"version":{"required":true,"type":"enum","values":[8],"doc":"Style specification version number. Must be 8.","example":8},"name":{"type":"string","doc":"A human-readable name for the style.","example":"Bright"},"metadata":{"type":"*","doc":"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like \'maplibre:\'.","example":{"styleeditor:slimmode":true,"styleeditor:comment":"Style generated 1677776383","styleeditor:version":"3.14.159265","example:object":{"String":"one","Number":2,"Boolean":false}}},"center":{"type":"array","value":"number","doc":"Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).","example":[-73.9749,40.7736]},"centerAltitude":{"type":"number","doc":"Default map center altitude in meters above sea level. The style center altitude defines the altitude where the camera is looking at and will be used only if the map has not been positioned by other means (e.g. map options or user interaction).","example":123.4,"sdk-support":{"basic functionality":{"js":"5.0.0","android":"https://github.com/maplibre/maplibre-native/issues/2980","ios":"https://github.com/maplibre/maplibre-native/issues/2980"}}},"zoom":{"type":"number","doc":"Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).","example":12.5},"bearing":{"type":"number","default":0,"period":360,"units":"degrees","doc":"Default bearing, in degrees. The bearing is the compass direction that is \\"up\\"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).","example":29},"pitch":{"type":"number","default":0,"units":"degrees","doc":"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).","example":50,"sdk-support":{"0-60 degrees":{"js":"0.8.0","android":"1.0.0","ios":"1.0.0"},"0-85 degrees":{"js":"2.0.0","android":"https://github.com/maplibre/maplibre-native/issues/1909","ios":"https://github.com/maplibre/maplibre-native/issues/1909"},"0-180 degrees":{"js":"5.0.0","android":"https://github.com/maplibre/maplibre-native/issues/1909","ios":"https://github.com/maplibre/maplibre-native/issues/1909"}}},"roll":{"type":"number","default":0,"units":"degrees","doc":"Default roll, in degrees. The roll angle is measured counterclockwise about the camera boresight. The style roll will be used only if the map has not been positioned by other means (e.g. map options or user interaction).","example":45,"sdk-support":{"basic functionality":{"js":"5.0.0","android":"https://github.com/maplibre/maplibre-native/issues/2941","ios":"https://github.com/maplibre/maplibre-native/issues/2941"}}},"state":{"type":"state","default":{},"doc":"An object used to define default values when using the [`global-state`](https://maplibre.org/maplibre-style-spec/expressions/#global-state) expression.","example":{"chargerType":{"default":["CCS","CHAdeMO","Type2"]},"minPreferredChargingSpeed":{"default":50}},"sdk-support":{"basic functionality":{"js":"5.6.0","android":"https://github.com/maplibre/maplibre-native/issues/3302","ios":"https://github.com/maplibre/maplibre-native/issues/3302"}}},"light":{"type":"light","doc":"The global light source.","example":{"anchor":"viewport","color":"white","intensity":0.4}},"sky":{"type":"sky","doc":"The map\'s sky configuration. **Note:** this definition is still experimental and is under development in maplibre-gl-js.","example":{"sky-color":"#199EF3","sky-horizon-blend":0.5,"horizon-color":"#ffffff","horizon-fog-blend":0.5,"fog-color":"#0000ff","fog-ground-blend":0.5,"atmosphere-blend":["interpolate",["linear"],["zoom"],0,1,10,1,12,0]}},"projection":{"type":"projection","doc":"The projection configuration","example":{"type":["interpolate",["linear"],["zoom"],10,"vertical-perspective",12,"mercator"]}},"terrain":{"type":"terrain","doc":"The terrain configuration.","example":{"source":"raster-dem-source","exaggeration":0.5}},"sources":{"required":true,"type":"sources","doc":"Sources state which data the map should display. Specify the type of source with the `type` property. Adding a source isn\'t enough to make data appear on the map because sources don\'t contain styling details like color or width. Layers refer to a source and give it a visual representation. This makes it possible to style the same source in different ways, like differentiating between types of roads in a highways layer.\\n\\nTiled sources (vector and raster) must specify their details according to the [TileJSON specification](https://github.com/mapbox/tilejson-spec).","example":{"maplibre-demotiles":{"type":"vector","url":"https://demotiles.maplibre.org/tiles/tiles.json"},"maplibre-tilejson":{"type":"vector","url":"http://api.example.com/tilejson.json"},"maplibre-streets":{"type":"vector","tiles":["http://a.example.com/tiles/{z}/{x}/{y}.pbf","http://b.example.com/tiles/{z}/{x}/{y}.pbf"],"maxzoom":14},"wms-imagery":{"type":"raster","tiles":["http://a.example.com/wms?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&width=256&height=256&layers=example"],"tileSize":256}}},"sprite":{"type":"sprite","doc":"An array of `{id: \'my-sprite\', url: \'https://example.com/sprite\'}` objects. Each object should represent a unique URL to load a sprite from and and a unique ID to use as a prefix when referencing images from that sprite (i.e. \'my-sprite:image\'). All the URLs are internally extended to load both .json and .png files. If the `id` field is equal to \'default\', the prefix is omitted (just \'image\' instead of \'default:image\'). All the IDs and URLs must be unique. For backwards compatibility, instead of an array, one can also provide a single string that represent a URL to load the sprite from. The images in this case won\'t be prefixed.","example":"https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprite"},"glyphs":{"type":"string","doc":"A URL template for loading signed-distance-field glyph sets in PBF format.\\n\\nIf this property is set, any text in the `text-field` layout property is displayed in the font stack named by the `text-font` layout property based on glyphs located at the URL specified by this property. Otherwise, font faces will be determined by the `text-font` property based on the local environment.\\n\\nThe URL must include:\\n\\n - `{fontstack}` - When requesting glyphs, this token is replaced with a comma separated list of fonts from a font stack specified in the `text-font` property of a symbol layer. \\n\\n - `{range}` - When requesting glyphs, this token is replaced with a range of 256 Unicode code points. For example, to load glyphs for the Unicode Basic Latin and Basic Latin-1 Supplement blocks, the range would be 0-255. The actual ranges that are loaded are determined at runtime based on what text needs to be displayed.\\n\\nThe URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).","example":"https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf","sdk-support":{"basic functionality":{"js":"0.0.16","android":"0.1.1","ios":"0.1.0"},"omit to use local fonts":{"js":"https://github.com/maplibre/maplibre-gl-js/issues/3302","android":"https://github.com/maplibre/maplibre-native/issues/165","ios":"https://github.com/maplibre/maplibre-native/issues/165"}}},"font-faces":{"type":"array","value":"fontFaces","doc":"The `font-faces` property can be used to specify what font files to use for rendering text. Font faces contain information needed to render complex texts such as [Devanagari](https://en.wikipedia.org/wiki/Devanagari), [Khmer](https://en.wikipedia.org/wiki/Khmer_script) among many others.<h2>Unicode range</h2>The optional `unicode-range` property can be used to only use a particular font file for characters within the specified unicode range(s). Its value should be an array of strings, each indicating a start and end of a unicode range, similar to the [CSS descriptor with the same name](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range). This allows specifying multiple non-consecutive unicode ranges. When not specified, the default value is `U+0-10FFFF`, meaning the font file will be used for all unicode characters.\\n\\nRefer to the [Unicode Character Code Charts](https://www.unicode.org/charts/) to see ranges for scripts supported by Unicode. To see what unicode code-points are available in a font, use a tool like [FontDrop](https://fontdrop.info/).\\n\\n<h2>Font Resolution</h2>For every name in a symbol layers [`text-font`](./layers.md/#text-font) array, characters are matched if they are covered one of the by the font files in the corresponding entry of the `font-faces` map. Any still-unmatched characters then fall back to the [`glyphs`](./glyphs.md) URL if provided.\\n\\n<h2>Supported Fonts</h2>What type of fonts are supported is implementation-defined. Unsupported fonts are ignored.","example":{"Noto Sans Regular":[{"url":"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansKhmer/hinted/ttf/NotoSansKhmer-Regular.ttf","unicode-range":["U+1780-17FF"]},{"url":"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansDevanagari/hinted/ttf/NotoSansDevanagari-Regular.ttf","unicode-range":["U+0900-097F"]},{"url":"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansMyanmar/hinted/ttf/NotoSansMyanmar-Regular.ttf","unicode-range":["U+1000-109F"]},{"url":"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansEthiopic/hinted/ttf/NotoSansEthiopic-Regular.ttf","unicode-range":["U+1200-137F"]}],"Unifont":"https://ftp.gnu.org/gnu/unifont/unifont-15.0.01/unifont-15.0.01.ttf"},"sdk-support":{"basic functionality":{"js":"https://github.com/maplibre/maplibre-gl-js/issues/50","android":"11.13.0","ios":"6.18.0"}}},"transition":{"type":"transition","doc":"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style\'s `transition` property.","example":{"duration":300,"delay":0}},"layers":{"required":true,"type":"array","value":"layer","doc":"A style\'s `layers` property lists all the layers available in that style. The type of layer is specified by the `type` property, and must be one of `background`, `fill`, `line`, `symbol`, `raster`, `circle`, `fill-extrusion`, `heatmap`, `hillshade`, `color-relief`.\\n\\nExcept for layers of the `background` type, each layer needs to refer to a source. Layers take the data that they get from a source, optionally filter features, and then define how those features are styled.","example":[{"id":"coastline","source":"maplibre","source-layer":"countries","type":"line","paint":{"line-color":"#198EC8"}}]}}'),ode={"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},sde=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],ade={type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0",js:"wontfix"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},lde={type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0",js:"wontfix"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},ude={type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."},custom:{doc:"Decodes tiles using the redFactor, blueFactor, greenFactor, baseShift parameters."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default.","sdk-support":{"mapbox, terrarium":{js:"0.43.0",ios:"6.0.0",android:"6.0.0"},custom:{js:"3.4.0",ios:"https://github.com/maplibre/maplibre-native/issues/2783",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},redFactor:{type:"number",default:1,doc:"Value that will be multiplied by the red channel value when decoding. Only used on custom encodings.","sdk-support":{"basic functionality":{js:"3.4.0",ios:"https://github.com/maplibre/maplibre-native/issues/2783",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},blueFactor:{type:"number",default:1,doc:"Value that will be multiplied by the blue channel value when decoding. Only used on custom encodings.","sdk-support":{"basic functionality":{js:"3.4.0",ios:"https://github.com/maplibre/maplibre-native/issues/2783",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},greenFactor:{type:"number",default:1,doc:"Value that will be multiplied by the green channel value when decoding. Only used on custom encodings.","sdk-support":{"basic functionality":{js:"3.4.0",ios:"https://github.com/maplibre/maplibre-native/issues/2358",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},baseShift:{type:"number",default:0,doc:"Value that will be added to the encoding mix when decoding. Only used on custom encodings.","sdk-support":{"basic functionality":{js:"3.4.0",ios:"https://github.com/maplibre/maplibre-native/issues/2783",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0",js:"wontfix"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},cde={type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{required:!0,type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n\n * `cluster` Is `true` if the point is a cluster \n\n * `cluster_id` A unique id for the cluster to be used in conjunction with the [cluster inspection methods](https://maplibre.org/maplibre-gl-js/docs/API/classes/GeoJSONSource/#getclusterexpansionzoom)\n\n * `point_count` Number of original points grouped into this cluster\n\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},Ade={type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},hde={type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},dde={id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. The implementation supports Mapbox Terrain RGB, Mapzen Terrarium tiles and custom encodings.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"},"additional methods":{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"}}},"color-relief":{doc:"Client-side elevation coloring based on DEM data. The implementation supports Mapbox Terrain RGB, Mapzen Terrarium tiles and custom encodings.","sdk-support":{"basic functionality":{js:"5.6.0",android:"https://github.com/maplibre/maplibre-native/issues/3408",ios:"https://github.com/maplibre/maplibre-native/issues/3408"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'maplibre:'.",example:{"source:comment":"Hydrology FCCODE 460 - Narrow wash"}},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},fde=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],pde={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},"property-type":"constant"}},mde={"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},"property-type":"constant"}},gde={"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},"property-type":"constant"}},yde={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}},"property-type":"constant"}},vde={"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},"property-type":"constant"}},bde=JSON.parse('{"symbol-placement":{"type":"enum","values":{"point":{"doc":"The label is placed at the point where the geometry is located."},"line":{"doc":"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{"doc":"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},"default":"point","doc":"Label placement relative to its geometry.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"`line-center` value":{"js":"0.47.0","android":"6.4.0","ios":"4.3.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","doc":"Distance between two symbol anchors.","requires":[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"doc":"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don\'t have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like MapLibre GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","doc":"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{"js":"0.53.0","android":"7.4.0","ios":"4.11.0"},"data-driven styling":{"js":"0.53.0","android":"7.4.0","ios":"4.11.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{"doc":"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{"doc":"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"source":{"doc":"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},"default":"auto","doc":"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{"js":"0.49.0","android":"6.6.0","ios":"4.5.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"doc":"If true, the icon will be visible even if it collides with other previously drawn symbols.","requires":["icon-image",{"!":"icon-overlap"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-overlap":{"type":"enum","values":{"never":{"doc":"The icon will be hidden if it collides with any other previously drawn symbol."},"always":{"doc":"The icon will be visible even if it collides with any other previously drawn symbol."},"cooperative":{"doc":"If the icon collides with another previously drawn symbol, the overlap mode for that symbol is checked. If the previous symbol was placed using `never` overlap mode, the new icon is hidden. If the previous symbol was placed using `always` or `cooperative` overlap mode, the new icon is visible."}},"doc":"Allows for control over whether to show an icon when it overlaps other symbols on the map. If `icon-overlap` is not set, `icon-allow-overlap` is used instead.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"2.1.0","android":"https://github.com/maplibre/maplibre-native/issues/251","ios":"https://github.com/maplibre/maplibre-native/issues/251"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"doc":"If true, other symbols can be visible even if they collide with the icon.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"doc":"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.","requires":["icon-image","text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{"doc":"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},"viewport":{"doc":"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},"auto":{"doc":"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},"default":"auto","doc":"In combination with `symbol-placement`, determines the rotation behavior of icons.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"`auto` value":{"js":"0.25.0","android":"4.2.0","ios":"3.4.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor of the original icon size","doc":"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":{"doc":"The icon is displayed at its intrinsic aspect ratio."},"width":{"doc":"The icon is scaled in the x-dimension to fit the width of the text."},"height":{"doc":"The icon is scaled in the y-dimension to fit the height of the text."},"both":{"doc":"The icon is scaled in both x- and y-dimensions."}},"default":"none","doc":"Scales the icon to fit around the associated text.","requires":["icon-image","text-field"],"sdk-support":{"basic functionality":{"js":"0.21.0","android":"4.2.0","ios":"3.4.0"},"stretchable icons":{"js":"1.6.0","android":"9.2.0","ios":"5.8.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","doc":"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.","requires":["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{"js":"0.21.0","android":"4.2.0","ios":"3.4.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","doc":"Name of image in sprite to use for drawing an image background.","tokens":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","doc":"Rotates the icon clockwise.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.21.0","android":"5.0.0","ios":"3.5.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"padding","default":[2],"units":"pixels","doc":"Size of additional area round the icon bounding box used for detecting symbol collisions.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"2.2.0","android":"https://github.com/maplibre/maplibre-native/issues/2754","ios":"https://github.com/maplibre/maplibre-native/issues/2754"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{"type":"boolean","default":false,"doc":"If true, the icon may be flipped to prevent it from being rendered upside-down.","requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"doc":"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.29.0","android":"5.0.0","ios":"3.5.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{"doc":"The center of the icon is placed closest to the anchor."},"left":{"doc":"The left side of the icon is placed closest to the anchor."},"right":{"doc":"The right side of the icon is placed closest to the anchor."},"top":{"doc":"The top of the icon is placed closest to the anchor."},"bottom":{"doc":"The bottom of the icon is placed closest to the anchor."},"top-left":{"doc":"The top left corner of the icon is placed closest to the anchor."},"top-right":{"doc":"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{"doc":"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{"doc":"The bottom right corner of the icon is placed closest to the anchor."}},"default":"center","doc":"Part of the icon placed closest to the anchor.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.40.0","android":"5.2.0","ios":"3.7.0"},"data-driven styling":{"js":"0.40.0","android":"5.2.0","ios":"3.7.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{"doc":"The icon is aligned to the plane of the map."},"viewport":{"doc":"The icon is aligned to the plane of the viewport."},"auto":{"doc":"Automatically matches the value of `icon-rotation-alignment`."}},"default":"auto","doc":"Orientation of icon when map is pitched.","requires":["icon-image"],"sdk-support":{"basic functionality":{"js":"0.39.0","android":"5.2.0","ios":"3.7.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{"doc":"The text is aligned to the plane of the map."},"viewport":{"doc":"The text is aligned to the plane of the viewport."},"auto":{"doc":"Automatically matches the value of `text-rotation-alignment`."}},"default":"auto","doc":"Orientation of text when map is pitched.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.21.0","android":"4.2.0","ios":"3.4.0"},"`auto` value":{"js":"0.25.0","android":"4.2.0","ios":"3.4.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{"doc":"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},"viewport":{"doc":"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},"viewport-glyph":{"doc":"When `symbol-placement` is set to `point`, aligns text to the x-axis of the viewport. When `symbol-placement` is set to `line` or `line-center`, aligns glyphs to the x-axis of the viewport and places them along the line."},"auto":{"doc":"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},"default":"auto","doc":"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"`auto` value":{"js":"0.25.0","android":"4.2.0","ios":"3.4.0"},"`viewport-glyph` value":{"js":"2.1.8","android":"https://github.com/maplibre/maplibre-native/issues/250","ios":"https://github.com/maplibre/maplibre-native/issues/250"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"doc":"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"doc":"Fonts to use for displaying text. If the `glyphs` root property is specified, this array is joined together and interpreted as a font stack name. Otherwise, it is interpreted as a cascading fallback list of local font names.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0"},"local fonts":{"js":"https://github.com/maplibre/maplibre-gl-js/issues/3302","android":"https://github.com/maplibre/maplibre-native/issues/165","ios":"https://github.com/maplibre/maplibre-native/issues/165"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","doc":"Font size.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","doc":"The maximum line width for text wrapping.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.40.0","android":"5.2.0","ios":"3.7.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","doc":"Text leading value for multi-line text.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","doc":"Text tracking amount.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.40.0","android":"5.2.0","ios":"3.7.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{"doc":"The text is aligned towards the anchor position."},"left":{"doc":"The text is aligned to the left."},"center":{"doc":"The text is centered."},"right":{"doc":"The text is aligned to the right."}},"default":"center","doc":"Text justification options.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.39.0","android":"5.2.0","ios":"3.7.0"},"auto":{"js":"0.54.0","android":"7.4.0","ios":"4.10.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","units":"ems","default":0,"doc":"Radial offset of text, in the direction of the symbol\'s anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{"js":"0.54.0","android":"7.4.0","ios":"4.10.0"},"data-driven styling":{"js":"0.54.0","android":"7.4.0","ios":"4.10.0"}},"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":{"doc":"The center of the text is placed closest to the anchor."},"left":{"doc":"The left side of the text is placed closest to the anchor."},"right":{"doc":"The right side of the text is placed closest to the anchor."},"top":{"doc":"The top of the text is placed closest to the anchor."},"bottom":{"doc":"The bottom of the text is placed closest to the anchor."},"top-left":{"doc":"The top left corner of the text is placed closest to the anchor."},"top-right":{"doc":"The top right corner of the text is placed closest to the anchor."},"bottom-left":{"doc":"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{"doc":"The bottom right corner of the text is placed closest to the anchor."}},"requires":["text-field",{"symbol-placement":["point"]}],"doc":"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{"js":"0.54.0","android":"7.4.0","ios":"4.10.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{"type":"variableAnchorOffsetCollection","requires":["text-field",{"symbol-placement":["point"]}],"doc":"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations, each paired with an offset value. The renderer will attempt to place the label at each location, in order, before moving on to the next location+offset. Use `text-justify: auto` to choose justification based on anchor position. \\n\\n The length of the array must be even, and must alternate between enum and point entries. i.e., each anchor location must be accompanied by a point, and that point defines the offset when the corresponding anchor location is used. Positive offset values indicate right and down, while negative values indicate left and up. Anchor locations may repeat, allowing the renderer to try multiple offsets to try and place a label using the same anchor. \\n\\n When present, this property takes precedence over `text-anchor`, `text-variable-anchor`, `text-offset`, and `text-radial-offset`. \\n\\n ```json \\n\\n { \\"text-variable-anchor-offset\\": [\\"top\\", [0, 4], \\"left\\", [3,0], \\"bottom\\", [1, 1]] } \\n\\n ``` \\n\\n When the renderer chooses the `top` anchor, `[0, 4]` will be used for `text-offset`; the text will be shifted down by 4 ems. \\n\\n When the renderer chooses the `left` anchor, `[3, 0]` will be used for `text-offset`; the text will be shifted right by 3 ems.","sdk-support":{"basic functionality":{"js":"3.3.0","ios":"6.8.0","android":"11.6.0"},"data-driven styling":{"js":"3.3.0","ios":"https://github.com/maplibre/maplibre-native/issues/2358","android":"https://github.com/maplibre/maplibre-native/issues/2358"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{"type":"enum","values":{"center":{"doc":"The center of the text is placed closest to the anchor."},"left":{"doc":"The left side of the text is placed closest to the anchor."},"right":{"doc":"The right side of the text is placed closest to the anchor."},"top":{"doc":"The top of the text is placed closest to the anchor."},"bottom":{"doc":"The bottom of the text is placed closest to the anchor."},"top-left":{"doc":"The top left corner of the text is placed closest to the anchor."},"top-right":{"doc":"The top right corner of the text is placed closest to the anchor."},"bottom-left":{"doc":"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{"doc":"The bottom right corner of the text is placed closest to the anchor."}},"default":"center","doc":"Part of the text placed closest to the anchor.","requires":["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.39.0","android":"5.2.0","ios":"3.7.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"units":"degrees","doc":"Maximum angle change between adjacent characters.","requires":["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{"doc":"If a text\'s language supports horizontal writing mode, symbols with point placement would be laid out horizontally."},"vertical":{"doc":"If a text\'s language supports vertical writing mode, symbols with point placement would be laid out vertically."}},"doc":"The property allows control over a symbol\'s orientation. Note that the property values act as a hint, so that a symbol whose language doesnt support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single \'vertical\' enum value. The order of elements in an array define priority order for the placement of an orientation variant.","requires":["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{"js":"1.3.0","android":"8.3.0","ios":"5.3.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","doc":"Rotates the text clockwise.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","doc":"Size of the additional area around the text bounding box used for detecting symbol collisions.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"doc":"If true, the text may be flipped vertically to prevent it from being rendered upside-down.","requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{"doc":"The text is not altered."},"uppercase":{"doc":"Forces all letters to be displayed in uppercase."},"lowercase":{"doc":"Forces all letters to be displayed in lowercase."}},"default":"none","doc":"Specifies how to capitalize text, similar to the CSS `text-transform` property.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.33.0","android":"5.0.0","ios":"3.5.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","doc":"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.","value":"number","units":"ems","length":2,"default":[0,0],"requires":["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"},"data-driven styling":{"js":"0.35.0","android":"5.1.0","ios":"3.6.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"doc":"If true, the text will be visible even if it collides with other previously drawn symbols.","requires":["text-field",{"!":"text-overlap"}],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-overlap":{"type":"enum","values":{"never":{"doc":"The text will be hidden if it collides with any other previously drawn symbol."},"always":{"doc":"The text will be visible even if it collides with any other previously drawn symbol."},"cooperative":{"doc":"If the text collides with another previously drawn symbol, the overlap mode for that symbol is checked. If the previous symbol was placed using `never` overlap mode, the new text is hidden. If the previous symbol was placed using `always` or `cooperative` overlap mode, the new text is visible."}},"doc":"Allows for control over whether to show symbol text when it overlaps other symbols on the map. If `text-overlap` is not set, `text-allow-overlap` is used instead","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"2.1.0","android":"https://github.com/maplibre/maplibre-native/issues/251","ios":"https://github.com/maplibre/maplibre-native/issues/251"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"doc":"If true, other symbols can be visible even if they collide with the text.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"doc":"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.","requires":["text-field","icon-image"],"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":{"doc":"The layer is shown."},"none":{"doc":"The layer is not shown."}},"default":"visible","doc":"Whether this layer is displayed.","sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0"}},"property-type":"constant"}}'),Cde={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},"property-type":"constant"}},_de={visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"}},"property-type":"constant"}},xde={type:"array",value:"*",doc:"A filter selects specific features from a layer."},Mde={type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ... fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'}},doc:"The filter operator."},wde={type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},Sde={type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},Ede={type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},Ode=JSON.parse('{"doc":"","type":"enum","values":{"let":{"doc":"Binds expressions to named variables, which can then be referenced in the result expression using `[\\"var\\", \\"variable_name\\"]`.\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)","syntax":{"overloads":[{"parameters":["var_1_name","var_1_value","...","var_n_name","var_n_value","expression"],"output-type":"any"}],"parameters":[{"name":"var_i_name","type":"string literal","description":"The name of the i-th variable."},{"name":"var_i_value","type":"any","description":"The value of the i-th variable."},{"name":"expression","type":"any","description":"The expression within which the named variables can be referenced."}]},"example":["let","someNumber",500,["interpolate",["linear"],["var","someNumber"],274,"#edf8e9",1551,"#006d2c"]],"group":"Variable binding","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"var":{"doc":"References variable bound using `let`.\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)","syntax":{"overloads":[{"parameters":["var_name"],"output-type":"any"}],"parameters":[{"name":"var_name","type":"string literal","description":"The name of the variable bound using `let`."}]},"example":["var","density"],"group":"Variable binding","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"literal":{"doc":"Provides a literal array or object value.\\n\\n - [Display and style rich text labels](https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/)","syntax":{"overloads":[{"parameters":["json_object"],"output-type":"object"},{"parameters":["json_array"],"output-type":"array"}],"parameters":[{"name":"json_object","type":"JSON object"},{"name":"json_array","type":"JSON array"}]},"example":["literal",["DIN Offc Pro Italic","Arial Unicode MS Regular"]],"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"array":{"doc":"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type or length, then this assertion will cause the whole expression to be aborted.","syntax":{"overloads":[{"parameters":["value"],"output-type":"array"},{"parameters":["type","value"],"output-type":"array<type>"},{"parameters":["type","length","value"],"output-type":"array<type, length>"}],"parameters":[{"name":"value","type":"any"},{"name":"type","type":"\\"string\\" | \\"number\\" | \\"boolean\\"","description":"The asserted type of the input array."},{"name":"length","type":"number literal","description":"The asserted length of the input array."}]},"example":["array","string",3,["literal",["a","b","c"]]],"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"at":{"doc":"Retrieves an item from an array.","syntax":{"overloads":[{"parameters":["index","array"],"output-type":"T"}],"parameters":[{"name":"index","type":"number","description":"The index into `array`."},{"name":"array","type":"array<T>","description":"The array of items to retrieve the specified item from."}]},"example":["at",1,["literal",["a","b","c"]]],"group":"Lookup","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"in":{"doc":"Determines whether an item exists in an array or a substring exists in a string.\\n\\n - [Measure distances](https://maplibre.org/maplibre-gl-js/docs/examples/measure-distances/)","syntax":{"overloads":[{"parameters":["item","array"],"output-type":"boolean"},{"parameters":["substring","string"],"output-type":"boolean"}],"parameters":[{"name":"item","type":"T","description":"The needle to search for within `array`."},{"name":"array","type":"array<T>","description":"The haystack through which to search for `item`."},{"name":"substring","type":"string","description":"The needle to search for within `string`."},{"name":"string","type":"string","description":"The haystack through which to search for `substring`."}]},"example":["in","$type","Point"],"group":"Lookup","sdk-support":{"basic functionality":{"js":"1.6.0","android":"9.1.0","ios":"5.8.0"}}},"index-of":{"doc":"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search. In a string, a UTF-16 surrogate pair counts as a single position.","syntax":{"overloads":[{"parameters":["item","array","from_index?"],"output-type":"number"},{"parameters":["substring","string","from_index?"],"output-type":"number"}],"parameters":[{"name":"item","type":"T","description":"The needle to search for within `array`."},{"name":"array","type":"array<T>","description":"The haystack through which to search for `item`."},{"name":"substring","type":"string","description":"The needle to search for within `string`."},{"name":"string","type":"string","description":"The haystack through which to search for `substring`."},{"name":"from_index","type":"number","description":"The index from where to begin the search."}]},"example":["index-of","foo",["baz","bar","hello","foo","world"]],"group":"Lookup","sdk-support":{"basic functionality":{"js":"1.10.0","android":"10.3.0","ios":"6.0.0"}}},"slice":{"doc":"Returns a subarray from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index. In a string, a UTF-16 surrogate pair counts as a single position.","syntax":{"overloads":[{"parameters":["array","start_index","end_index?"],"output-type":"array<T>"},{"parameters":["string","start_index","end_index?"],"output-type":"string"}],"parameters":[{"name":"array","type":"array<T>","description":"The original array from which to extract the subarray."},{"name":"string","type":"string","description":"The original string from which to extract the substring."},{"name":"start_index","type":"number","description":"The inclusive index from which `slice` extracts items or characters from the subarray or substring."},{"name":"end_index","type":"number","description":"The non-inclusive index up to which `slice` extracts items or characters from the subarray or substring."}]},"example":["slice",["get","name"],0,3],"group":"Lookup","sdk-support":{"basic functionality":{"js":"1.10.0","android":"10.3.0","ios":"6.0.0"}}},"case":{"doc":"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.\\n\\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)","syntax":{"overloads":[{"parameters":["condition_1","output_1","...","condition_n","output_n","fallback"],"output-type":"any"}],"parameters":[{"name":"condition_i","type":"boolean"},{"name":"output_i","type":"any"},{"name":"fallback","type":"any","description":"The result when no condition evaluates to true."}]},"example":["case",["boolean",["feature-state","hover"],false],1,0.5],"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"match":{"doc":"Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `[\\"get\\", \\"building_type\\"]`). Each label must be either:\\n\\n - a single literal value; or\\n\\n - an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `[\\"c\\", \\"b\\"]`). The input matches if any of the values in the array matches, similar to the `\\"in\\"` operator.\\n\\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.","syntax":{"overloads":[{"parameters":["input","label_1","output_1","...","label_n","output_n","fallback"],"output-type":"any"}],"parameters":[{"name":"input","type":"string | number","description":"Any expression."},{"name":"label_i","type":"string literal | number literal | array<string literal> | array<number literal>","description":"The i-th literal value or array of literal values to match the input against."},{"name":"output_i","type":"any","description":"The result when the i-th label is the first label to match the input."},{"name":"fallback","type":"any","description":"The result when no label matches the input."}]},"example":["match",["get","building_type"],"residential","#f00","commercial","#0f0","#000"],"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"coalesce":{"doc":"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.\\n\\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/use-a-fallback-image/)","syntax":{"overloads":[{"parameters":["expression_1","...","expression_n"],"output-type":"any"}],"parameters":[{"name":"expression_i","type":"any"}]},"example":["coalesce",["image",["concat",["get","icon"],"_15"]],["image","marker_15"]],"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"step":{"doc":"Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\\"stops\\"). The `input` may be any numeric expression (e.g., `[\\"get\\", \\"population\\"]`). Stop inputs must be numeric literals in strictly ascending order.\\n\\nReturns the output value of the stop just less than the input, or the first output if the input is less than the first stop.\\n\\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/create-and-style-clusters/)","syntax":{"overloads":[{"parameters":["input","output_0","stop_1_input","stop_1_output","...","stop_n_input","stop_n_output"],"output-type":"any"}],"parameters":[{"name":"input","type":"number","description":"Any numeric expression."},{"name":"output_0","type":"any","description":"The result when the `input` is less than the first stop."},{"name":"stop_i_input","type":"number literal","description":"The value of the i-th stop against which the `input` is compared."},{"name":"stop_i_output","type":"any","description":"The result when the i-th stop is the last stop less than the `input`."}]},"example":["step",["get","point_count"],20,100,30,750,40],"group":"Ramps, scales, curves","sdk-support":{"basic functionality":{"js":"0.42.0","android":"6.0.0","ios":"4.0.0"}}},"interpolate":{"doc":"Produces continuous, smooth results by interpolating between pairs of input and output values (\\"stops\\"). The `input` may be any numeric expression (e.g., `[\\"get\\", \\"population\\"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, `color`, `array<color>`, or `projection`.\\n\\nInterpolation types:\\n\\n- `[\\"linear\\"]`, or an expression returning one of those types: Interpolates linearly between the pair of stops just less than and just greater than the input.\\n\\n- `[\\"exponential\\", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\\n\\n- `[\\"cubic-bezier\\", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.\\n\\n - [Animate map camera around a point](https://maplibre.org/maplibre-gl-js/docs/examples/animate-camera-around-point/)\\n\\n - [Change building color based on zoom level](https://maplibre.org/maplibre-gl-js/docs/examples/change-building-color-based-on-zoom-level/)\\n\\n - [Create a heatmap layer](https://maplibre.org/maplibre-gl-js/docs/examples/heatmap-layer/)\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)","syntax":{"overloads":[{"parameters":["interpolation_type","input","stop_1_input","stop_1_output","...","stop_n_input","stop_n_output"],"output-type":"number | array<number> | color | array<color> | projection"}],"parameters":[{"name":"interpolation_type","type":"[\\"linear\\"] | [\\"exponential\\", base] | [\\"cubic-bezier\\", x1, y1, x2, y2]","description":"The interpolation type."},{"name":"input","type":"number","description":"Any numeric expression."},{"name":"stop_i_input","type":"number literal","description":"The value of the i-th stop against which the `input` is compared."},{"name":"stop_i_output","type":"number | array<number> | color | array<color> | projection","description":"The output value corresponding to the i-th stop."}]},"example":["interpolate",["linear"],["zoom"],15,0,15.05,["get","height"]],"group":"Ramps, scales, curves","sdk-support":{"basic functionality":{"js":"0.42.0","android":"6.0.0","ios":"4.0.0"}}},"interpolate-hcl":{"doc":"Produces continuous, smooth results by interpolating between pairs of input and output values (\\"stops\\"). Works like `interpolate`, but the output type must be `color` or `array<color>`, and the interpolation is performed in the Hue-Chroma-Luminance color space.","syntax":{"overloads":[{"parameters":["interpolation_type","input","stop_1_input","stop_1_output","...","stop_n_input","stop_n_output"],"output-type":"color | array<color>"}],"parameters":[{"name":"interpolation_type","type":"[\\"linear\\"] | [\\"exponential\\", base] | [\\"cubic-bezier\\", x1, y1, x2, y2]"},{"name":"input","type":"number"},{"name":"stop_i_input","type":"number literal"},{"name":"stop_i_output","type":"color | array<color>"}]},"example":["interpolate-hcl",["linear"],["zoom"],15,"#f00",15.05,"#00f"],"group":"Ramps, scales, curves","sdk-support":{"basic functionality":{"js":"0.49.0","ios":"https://github.com/maplibre/maplibre-native/issues/2784","android":"https://github.com/maplibre/maplibre-native/issues/2784"}}},"interpolate-lab":{"doc":"Produces continuous, smooth results by interpolating between pairs of input and output values (\\"stops\\"). Works like `interpolate`, but the output type must be `color` or `array<color>`, and the interpolation is performed in the CIELAB color space.","syntax":{"overloads":[{"parameters":["interpolation_type","input","stop_1_input","stop_1_output","...","stop_n_input","stop_n_output"],"output-type":"color | array<color>"}],"parameters":[{"name":"interpolation_type","type":"[\\"linear\\"] | [\\"exponential\\", base] | [\\"cubic-bezier\\", x1, y1, x2, y2]"},{"name":"input","type":"number"},{"name":"stop_i_input","type":"number literal"},{"name":"stop_i_output","type":"color | array<color>"}]},"example":["interpolate-lab",["linear"],["zoom"],15,"#f00",15.05,"#00f"],"group":"Ramps, scales, curves","sdk-support":{"basic functionality":{"js":"0.49.0","ios":"https://github.com/maplibre/maplibre-native/issues/2784","android":"https://github.com/maplibre/maplibre-native/issues/2784"}}},"ln2":{"doc":"Returns the mathematical constant ln(2).","syntax":{"overloads":[{"parameters":[],"output-type":"number"}]},"example":["ln2"],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"pi":{"doc":"Returns the mathematical constant pi.","syntax":{"overloads":[{"parameters":[],"output-type":"number"}]},"example":["pi"],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"e":{"doc":"Returns the mathematical constant e.","syntax":{"overloads":[{"parameters":[],"output-type":"number"}]},"example":["e"],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"typeof":{"doc":"Returns a string describing the type of the given value.","syntax":{"overloads":[{"parameters":["value"],"output-type":"string"}],"parameters":[{"name":"value","type":"any"}]},"example":["typeof",["get","name"]],"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"string":{"doc":"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.","syntax":{"overloads":[{"parameters":["value_1","...","value_n"],"output-type":"string"}],"parameters":[{"name":"value_i","type":"any"}]},"example":["string",["get","name"]],"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"number":{"doc":"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.","syntax":{"overloads":[{"parameters":["value_1","...","value_n"],"output-type":"number"}],"parameters":[{"name":"value_i","type":"any"}]},"example":["number",["get","population"]],"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"boolean":{"doc":"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.\\n\\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)","syntax":{"overloads":[{"parameters":["value_1","...","value_n"],"output-type":"boolean"}],"parameters":[{"name":"value_i","type":"any"}]},"example":["boolean",["feature-state","hover"],false],"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"object":{"doc":"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.","syntax":{"overloads":[{"parameters":["value_1","...","value_n"],"output-type":"object"}],"parameters":[{"name":"value_i","type":"any"}]},"example":["object",["get","some-property"]],"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"collator":{"doc":"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.","syntax":{"overloads":[{"parameters":["options"],"output-type":"collator"}],"parameters":[{"name":"options","type":"{ \\"case-sensitive\\"?: boolean, \\"diacritic-sensitive\\"?: boolean, \\"locale\\"?: string }"}]},"example":["collator",{"case-sensitive":true,"diacritic-sensitive":true,"locale":"fr"}],"group":"Types","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0"}}},"format":{"doc":"Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#image) expression. Strings may be followed by a style override object that supports the following properties:\\n\\n- `\\"text-font\\"`: Overrides the font stack specified by the root layout property.\\n\\n- `\\"text-color\\"`: Overrides the color specified by the root paint property.\\n\\n- `\\"font-scale\\"`: Applies a scaling factor on `text-size` as specified by the root layout property.\\n\\n- `\\"vertical-align\\"`: Aligns vertically text section or image in relation to the row it belongs to. Possible values are: \\n\\t- `\\"bottom\\"` *default*: align the bottom of this section with the bottom of other sections.\\n<img alt=\\"Visual representation of bottom alignment\\" src=\\"https://github.com/user-attachments/assets/0474a2fd-a4b2-417c-9187-7a13a28695bc\\"/>\\n\\t- `\\"center\\"`: align the center of this section with the center of other sections.\\n<img alt=\\"Visual representation of center alignment\\" src=\\"https://github.com/user-attachments/assets/92237455-be6d-4c5d-b8f6-8127effc1950\\"/>\\n\\t- `\\"top\\"`: align the top of this section with the top of other sections.\\n<img alt=\\"Visual representation of top alignment\\" src=\\"https://github.com/user-attachments/assets/45dccb28-d977-4abb-a006-4ea9792b7c53\\"/>\\n\\t- Refer to [the design proposal](https://github.com/maplibre/maplibre-style-spec/issues/832) for more details.\\n\\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\\n\\n - [Display and style rich text labels](https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/)","syntax":{"overloads":[{"parameters":["input_1","style_overrides_1?","...","input_n","style_overrides_n?"],"output-type":"formatted"}],"parameters":[{"name":"input_i","type":"string | image"},{"name":"style_overrides_i","type":"{ \\"text-font\\"?: string, \\"text-color\\"?: color, \\"font-scale\\"?: number, \\"vertical-align\\"?: \\"bottom\\" | \\"center\\" | \\"top\\" }"}]},"example":["format",["upcase",["get","FacilityName"]],{"font-scale":0.8},"\\n\\n",{},["downcase",["get","Comments"]],{"font-scale":0.6,"vertical-align":"center"}],"group":"Types","sdk-support":{"basic functionality":{"js":"0.48.0","android":"6.7.0","ios":"4.6.0"},"text-font":{"js":"0.48.0","android":"6.7.0","ios":"4.6.0"},"font-scale":{"js":"0.48.0","android":"6.7.0","ios":"4.6.0"},"text-color":{"js":"1.3.0","android":"7.3.0","ios":"4.10.0"},"vertical-align":{"js":"5.1.0","android":"https://github.com/maplibre/maplibre-native/issues/3055","ios":"https://github.com/maplibre/maplibre-native/issues/3055"},"image":{"js":"1.6.0","android":"8.6.0","ios":"5.7.0"}}},"image":{"doc":"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.\\n\\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/use-a-fallback-image/)","syntax":{"overloads":[{"parameters":["image_name"],"output-type":"image"}],"parameters":[{"name":"image_name","type":"string"}]},"example":["image","marker_15"],"group":"Types","sdk-support":{"basic functionality":{"js":"1.4.0","android":"8.6.0","ios":"5.7.0"}}},"global-state":{"doc":"Retrieves a property value from global state that can be set with platform-specific APIs. Defaults can be provided using the [`state`](https://maplibre.org/maplibre-style-spec/root/#state) root property. Returns `null` if no value nor default value is set for the retrieved property.","group":"Lookup","syntax":{"overloads":[{"parameters":["property_name"],"output-type":"any"}],"parameters":[{"name":"property_name","type":"string literal","description":"The name of the global state property to retrieve."}]},"example":["global-state","someProperty"],"sdk-support":{"basic functionality":{"js":"https://github.com/maplibre/maplibre-gl-js/issues/4964","android":"https://github.com/maplibre/maplibre-native/issues/3302","ios":"https://github.com/maplibre/maplibre-native/issues/3302"}}},"number-format":{"doc":"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)","syntax":{"overloads":[{"parameters":["input","format_options"],"output-type":"string"}],"parameters":[{"name":"input","type":"number"},{"name":"format_options","type":"{ \\"locale\\"?: string, \\"currency\\"?: string, \\"min-fraction-digits\\"?: number, \\"max-fraction-digits\\"?: number }"}]},"example":["number-format",["get","mag"],{"min-fraction-digits":1,"max-fraction-digits":1}],"group":"Types","sdk-support":{"basic functionality":{"js":"0.54.0","android":"8.4.0","ios":"supported"}}},"to-string":{"doc":"Converts the input value to a string. If the input is `null`, the result is `\\"\\"`. If the input is a boolean, the result is `\\"true\\"` or `\\"false\\"`. If the input is a number, it is converted to a string as specified by the [\\"NumberToString\\" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `\\"rgba(r,g,b,a)\\"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.\\n\\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-time-slider/)","syntax":{"overloads":[{"parameters":["value"],"output-type":"string"}],"parameters":[{"name":"value","type":"any"}]},"example":["to-string",["get","mag"]],"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"to-number":{"doc":"Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the [\\"ToNumber Applied to the String Type\\" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.","syntax":{"overloads":[{"parameters":["value_1","...","value_n"],"output-type":"number"}],"parameters":[{"name":"value_i","type":"any"}]},"example":["to-number","someProperty"],"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"to-boolean":{"doc":"Converts the input value to a boolean. The result is `false` when the input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.","syntax":{"overloads":[{"parameters":["value"],"output-type":"boolean"}],"parameters":[{"name":"value","type":"any"}]},"example":["to-boolean","someProperty"],"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"to-rgba":{"doc":"Returns a four-element array containing the input color\'s red, green, blue, and alpha components, in that order.","syntax":{"overloads":[{"parameters":["color"],"output-type":"array"}],"parameters":[{"name":"color","type":"color"}]},"example":["to-rgba","#ff0000"],"group":"Color","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"to-color":{"doc":"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)","syntax":{"overloads":[{"parameters":["value_1","...","value_n"],"output-type":"color"}],"parameters":[{"name":"value_i","type":"any"}]},"example":["to-color","#edf8e9"],"group":"Types","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"rgb":{"doc":"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.","syntax":{"overloads":[{"parameters":["red","green","blue"],"output-type":"color"}],"parameters":[{"name":"red","type":"number"},{"name":"green","type":"number"},{"name":"blue","type":"number"}]},"example":["rgb",255,0,0],"group":"Color","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"rgba":{"doc":"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.","syntax":{"overloads":[{"parameters":["red","green","blue","alpha"],"output-type":"color"}],"parameters":[{"name":"red","type":"number"},{"name":"green","type":"number"},{"name":"blue","type":"number"},{"name":"alpha","type":"number"}]},"example":["rgba",255,0,0,1],"group":"Color","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"get":{"doc":"Retrieves a property value from the current feature\'s properties, or from another object if a second argument is provided. Returns null if the requested property is missing.\\n\\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)\\n\\n - [Extrude polygons for 3D indoor mapping](https://maplibre.org/maplibre-gl-js/docs/examples/extrude-polygons-for-3d-indoor-mapping/)","syntax":{"overloads":[{"parameters":["property_name","object?"],"output-type":"any"}],"parameters":[{"name":"property_name","type":"string","description":"The name of the property to retrieve the value of."},{"name":"object","type":"object","description":"The object to retrieve the value from."}]},"example":["get","someProperty"],"group":"Lookup","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"has":{"doc":"Tests for the presence of a property value in the current feature\'s properties, or from another object if a second argument is provided.\\n\\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/create-and-style-clusters/)","syntax":{"overloads":[{"parameters":["property_name","object?"],"output-type":"boolean"}],"parameters":[{"name":"property_name","type":"string","description":"The name of the property to test for the presence of."},{"name":"object","type":"object","description":"The object in which to test for the presence of the `property_name` property."}]},"example":["has","someProperty"],"group":"Lookup","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"length":{"doc":"Gets the length of an array or string. In a string, a UTF-16 surrogate pair counts as a single position.","syntax":{"overloads":[{"parameters":["array_or_string"],"output-type":"number"}],"parameters":[{"name":"array_or_string","type":"array | string"}]},"example":["length",["get","myArray"]],"group":"Lookup","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"properties":{"doc":"Gets the feature properties object. Note that in some cases, it may be more efficient to use [\\"get\\", \\"property_name\\"] directly.","syntax":{"overloads":[{"parameters":[],"output-type":"object"}]},"example":["properties"],"group":"Feature data","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"feature-state":{"doc":"Retrieves a property value from the current feature\'s state. Returns null if the requested property is not present on the feature\'s state. A feature\'s state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. When `source.promoteId` is not provided, features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. When `source.promoteId` is provided, features are identified by their `promoteId` property, which may be a number, string, or any primitive data type. Note that [\\"feature-state\\"] can only be used with paint properties that support data-driven styling.\\n\\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)","syntax":{"overloads":[{"parameters":["property_name"],"output-type":"any"}],"parameters":[{"name":"property_name","type":"string"}]},"example":["feature-state","hover"],"group":"Feature data","sdk-support":{"basic functionality":{"js":"0.46.0","ios":"https://github.com/maplibre/maplibre-native/issues/1698","android":"https://github.com/maplibre/maplibre-native/issues/1698"}}},"geometry-type":{"doc":"Returns the feature\'s simple geometry type: `Point`, `LineString`, or `Polygon`. `MultiPoint`, `MultiLineString`, and `MultiPolygon` are returned as `Point`, `LineString`, and `Polygon`, respectively.","syntax":{"overloads":[{"parameters":[],"output-type":"string"}]},"example":["==",["geometry-type"],"Polygon"],"group":"Feature data","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"id":{"doc":"Gets the feature\'s id, if it has one.","syntax":{"overloads":[{"parameters":[],"output-type":"any"}]},"example":["id"],"group":"Feature data","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"zoom":{"doc":"Gets the current zoom level. Note that in style layout and paint properties, [\\"zoom\\"] may only appear as the input to a top-level \\"step\\" or \\"interpolate\\" expression.","syntax":{"overloads":[{"parameters":[],"output-type":"number"}]},"example":["interpolate",["linear"],["zoom"],15,0,15.05,["get","height"]],"group":"Zoom","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"heatmap-density":{"doc":"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.","syntax":{"overloads":[{"parameters":[],"output-type":"number"}]},"example":["heatmap-density"],"group":"Heatmap","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"elevation":{"doc":"Gets the elevation of a pixel (in meters above the vertical datum reference of the `raster-dem` tiles) from a `raster-dem` source. Can only be used in the `color-relief-color` property of a `color-relief` layer.","syntax":{"overloads":[{"parameters":[],"output-type":"number"}]},"example":["elevation"],"group":"Color Relief","sdk-support":{"basic functionality":{"js":"5.6.0","android":"https://github.com/maplibre/maplibre-native/issues/3408","ios":"https://github.com/maplibre/maplibre-native/issues/3408"}}},"line-progress":{"doc":"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.","syntax":{"overloads":[{"parameters":[],"output-type":"number"}]},"example":["line-progress"],"group":"Feature data","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.5.0","ios":"4.6.0"}}},"accumulated":{"doc":"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.","syntax":{"overloads":[{"parameters":[],"output-type":"any"}]},"example":["accumulated"],"group":"Feature data","sdk-support":{"basic functionality":{"js":"0.53.0","ios":"supported","android":"supported"}}},"+":{"doc":"Returns the sum of the inputs.","syntax":{"overloads":[{"parameters":["input_1","...","input_n"],"output-type":"number"}],"parameters":[{"name":"input_i","type":"number"}]},"example":["+",2,3],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"*":{"doc":"Returns the product of the inputs.","syntax":{"overloads":[{"parameters":["input_1","...","input_n"],"output-type":"number"}],"parameters":[{"name":"input_i","type":"number"}]},"example":["*",2,3],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"-":{"doc":"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.","syntax":{"overloads":[{"parameters":["input_1","input_2"],"output-type":"number"},{"parameters":["single_input"],"output-type":"number"}],"parameters":[{"name":"input_1","type":"number","description":"The number from which to subtract `input_2`."},{"name":"input_2","type":"number","description":"The number to subtract from `input_1`."},{"name":"single_input","type":"number","description":"The number to subtract from 0."}]},"example":["-",10],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"/":{"doc":"Returns the result of floating point division of the first input by the second.\\n\\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)","syntax":{"overloads":[{"parameters":["input_1","input_2"],"output-type":"number"}],"parameters":[{"name":"input_1","type":"number","description":"The dividend."},{"name":"input_2","type":"number","description":"The divisor."}]},"example":["/",["get","population"],["get","sq-km"]],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"%":{"doc":"Returns the remainder after integer division of the first input by the second.","syntax":{"overloads":[{"parameters":["input_1","input_2"],"output-type":"number"}],"parameters":[{"name":"input_1","type":"number","description":"The dividend."},{"name":"input_2","type":"number","description":"The divisor."}]},"example":["%",10,3],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"^":{"doc":"Returns the result of raising the first input to the power specified by the second.","syntax":{"overloads":[{"parameters":["input_1","input_2"],"output-type":"number"}],"parameters":[{"name":"input_1","type":"number","description":"The base."},{"name":"input_2","type":"number","description":"The exponent."}]},"example":["^",2,3],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"sqrt":{"doc":"Returns the square root of the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number","description":"The radicand."}]},"example":["sqrt",9],"group":"Math","sdk-support":{"basic functionality":{"js":"0.42.0","android":"6.0.0","ios":"4.0.0"}}},"log10":{"doc":"Returns the base-ten logarithm of the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["log10",8],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"ln":{"doc":"Returns the natural logarithm of the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["ln",8],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"log2":{"doc":"Returns the base-two logarithm of the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["log2",8],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"sin":{"doc":"Returns the sine of the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["sin",1],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"cos":{"doc":"Returns the cosine of the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["cos",1],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"tan":{"doc":"Returns the tangent of the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["tan",1],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"asin":{"doc":"Returns the arcsine of the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["asin",1],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"acos":{"doc":"Returns the arccosine of the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["acos",1],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"atan":{"doc":"Returns the arctangent of the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["atan",1],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"min":{"doc":"Returns the minimum value of the inputs.","syntax":{"overloads":[{"parameters":["input_1","...","input_n"],"output-type":"number"}],"parameters":[{"name":"input_i","type":"number"}]},"example":["min",1,2],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"max":{"doc":"Returns the maximum value of the inputs.","syntax":{"overloads":[{"parameters":["input_1","...","input_n"],"output-type":"number"}],"parameters":[{"name":"input_i","type":"number"}]},"example":["max",1,2],"group":"Math","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"round":{"doc":"Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `[\\"round\\", -1.5]` evaluates to -2.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["round",1.5],"group":"Math","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.0.0","ios":"4.0.0"}}},"abs":{"doc":"Returns the absolute value of the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["abs",-1.5],"group":"Math","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.0.0","ios":"4.0.0"}}},"ceil":{"doc":"Returns the smallest integer that is greater than or equal to the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["ceil",1.5],"group":"Math","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.0.0","ios":"4.0.0"}}},"floor":{"doc":"Returns the largest integer that is less than or equal to the input.","syntax":{"overloads":[{"parameters":["input"],"output-type":"number"}],"parameters":[{"name":"input","type":"number"}]},"example":["floor",1.5],"group":"Math","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.0.0","ios":"4.0.0"}}},"distance":{"doc":"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.","syntax":{"overloads":[{"parameters":["geojson"],"output-type":"number"}],"parameters":[{"name":"geojson","type":"GeoJSON object"}]},"example":["distance",{"type":"Point","coordinates":[0,0]}],"group":"Math","sdk-support":{"basic functionality":{"js":"4.2.0","android":"9.2.0","ios":"5.9.0"}}},"==":{"doc":"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\\n\\n - [Add multiple geometries from one GeoJSON source](https://maplibre.org/maplibre-gl-js/docs/examples/multiple-geometries/)\\n\\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/timeline-animation/)\\n\\n - [Display buildings in 3D](https://maplibre.org/maplibre-gl-js/docs/examples/display-buildings-in-3d/)\\n\\n - [Filter symbols by toggling a list](https://maplibre.org/maplibre-gl-js/docs/examples/filter-symbols-by-toggling-a-list/)","syntax":{"overloads":[{"parameters":["input_1","input_2","collator?"],"output-type":"boolean"}],"parameters":[{"name":"input_1","type":"any"},{"name":"input_2","type":"any"},{"name":"collator","type":"collator","description":"Options for locale-dependent comparison."}]},"example":["==","$type","Polygon"],"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0"}}},"!=":{"doc":"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)","syntax":{"overloads":[{"parameters":["input_1","input_2","collator?"],"output-type":"boolean"}],"parameters":[{"name":"input_1","type":"any"},{"name":"input_2","type":"any"},{"name":"collator","type":"collator","description":"Options for locale-dependent comparison."}]},"example":["!=","cluster",true],"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0"}}},">":{"doc":"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.","syntax":{"overloads":[{"parameters":["string_1","string_2","collator?"],"output-type":"boolean"},{"parameters":["number_1","number_2","collator?"],"output-type":"boolean"}],"parameters":[{"name":"string_i","type":"string"},{"name":"number_i","type":"number"},{"name":"collator","type":"collator","description":"Options for locale-dependent comparison."}]},"example":[">",["get","mag"],2],"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0"}}},"<":{"doc":"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)","syntax":{"overloads":[{"parameters":["string_1","string_2","collator?"],"output-type":"boolean"},{"parameters":["number_1","number_2","collator?"],"output-type":"boolean"}],"parameters":[{"name":"string_i","type":"string"},{"name":"number_i","type":"number"},{"name":"collator","type":"collator","description":"Options for locale-dependent comparison."}]},"example":["<",["get","mag"],2],"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0"}}},">=":{"doc":"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)","syntax":{"overloads":[{"parameters":["string_1","string_2","collator?"],"output-type":"boolean"},{"parameters":["number_1","number_2","collator?"],"output-type":"boolean"}],"parameters":[{"name":"string_i","type":"string"},{"name":"number_i","type":"number"},{"name":"collator","type":"collator","description":"Options for locale-dependent comparison."}]},"example":[">=",["get","mag"],6],"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0"}}},"<=":{"doc":"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.","syntax":{"overloads":[{"parameters":["string_1","string_2","collator?"],"output-type":"boolean"},{"parameters":["number_1","number_2","collator?"],"output-type":"boolean"}],"parameters":[{"name":"string_i","type":"string"},{"name":"number_i","type":"number"},{"name":"collator","type":"collator","description":"Options for locale-dependent comparison."}]},"example":["<=",["get","mag"],6],"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"},"collator":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0"}}},"all":{"doc":"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.\\n\\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)","syntax":{"overloads":[{"parameters":["input_1","...","input_n"],"output-type":"boolean"}],"parameters":[{"name":"input_i","type":"boolean"}]},"example":["all",[">=",["get","mag"],4],["<",["get","mag"],5]],"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"any":{"doc":"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.","syntax":{"overloads":[{"parameters":["input_1","...","input_n"],"output-type":"boolean"}],"parameters":[{"name":"input_i","type":"boolean"}]},"example":["any",[">=",["get","mag"],4],["<",["get","mag"],5]],"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"!":{"doc":"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.\\n\\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/create-and-style-clusters/)","syntax":{"overloads":[{"parameters":["input"],"output-type":"boolean"}],"parameters":[{"name":"input","type":"boolean"}]},"example":["!",["has","point_count"]],"group":"Decision","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"within":{"doc":"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\\n\\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\\n\\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line\'s endpoint is on the boundary.","syntax":{"overloads":[{"parameters":["geojson"],"output-type":"boolean"}],"parameters":[{"name":"geojson","type":"GeoJSON object"}]},"example":["within",{"type":"Polygon","coordinates":[[[0,0],[0,5],[5,5],[5,0],[0,0]]]}],"group":"Decision","sdk-support":{"basic functionality":{"js":"1.9.0","android":"9.1.0","ios":"5.8.0"}}},"is-supported-script":{"doc":"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the `mapbox-gl-rtl-text` plugin is not in use in MapLibre GL JS).","syntax":{"overloads":[{"parameters":["input"],"output-type":"boolean"}],"parameters":[{"name":"input","type":"string"}]},"example":["is-supported-script","दिल्ली"],"group":"String","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.6.0","ios":"supported"}}},"upcase":{"doc":"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\\n\\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)","syntax":{"overloads":[{"parameters":["input"],"output-type":"string"}],"parameters":[{"name":"input","type":"string"}]},"example":["upcase",["get","name"]],"group":"String","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"downcase":{"doc":"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\\n\\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)","syntax":{"overloads":[{"parameters":["input"],"output-type":"string"}],"parameters":[{"name":"input","type":"string"}]},"example":["downcase",["get","name"]],"group":"String","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"concat":{"doc":"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.\\n\\n - [Add a generated icon to the map](https://maplibre.org/maplibre-gl-js/docs/examples/add-a-generated-icon-to-the-map/)\\n\\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-time-slider/)\\n\\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/fallback-image/)\\n\\n - [Variable label placement](https://maplibre.org/maplibre-gl-js/docs/examples/variable-label-placement/)","syntax":{"overloads":[{"parameters":["input_1","...","input_n"],"output-type":"string"}],"parameters":[{"name":"input_i","type":"any"}]},"example":["concat","square-rgb-",["get","color"]],"group":"String","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0"}}},"resolved-locale":{"doc":"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.","syntax":{"overloads":[{"parameters":["collator"],"output-type":"string"}],"parameters":[{"name":"collator","type":"collator"}]},"example":["resolved-locale",["collator",{"case-sensitive":true,"diacritic-sensitive":false,"locale":"de"}]],"group":"String","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0"}}}}}'),Bde={anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}}}},Ide={"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The base color for the sky."},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The base color at the horizon."},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The base color for the fog. Requires 3D terrain."},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"How to blend the fog over the 3D terrain. Where 0 is the map center and 1 is the horizon."},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"How to blend the fog color and the horizon color. Where 0 is using the horizon color only and 1 is using the fog color only."},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"How to blend the sky color and the horizon color. Where 1 is blending the color at the middle of the sky and 0 is not blending at all and using the sky color only."},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"How to blend the atmosphere. Where 1 is visible atmosphere and 0 is hidden. It is best to interpolate this expression when using globe projection."}},kde={source:{type:"string",doc:"The source for the terrain data.",required:!0,"sdk-support":{"basic functionality":{js:"2.2.0",ios:"https://github.com/maplibre/maplibre-native/issues/252",android:"https://github.com/maplibre/maplibre-native/issues/252"}}},exaggeration:{type:"number",minimum:0,doc:"The exaggeration of the terrain - how high it will look.",default:1,"sdk-support":{"basic functionality":{js:"2.2.0",ios:"https://github.com/maplibre/maplibre-native/issues/252",android:"https://github.com/maplibre/maplibre-native/issues/252"}}}},Tde={type:{type:"projectionDefinition",doc:"The projection definition type. Can be specified as a string, a transition state, or an expression.",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},Rde=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],Dde={"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},Pde={"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0"}},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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"https://github.com/maplibre/maplibre-gl-js/issues/1235",ios:"https://github.com/maplibre/maplibre-native/issues/744",android:"https://github.com/maplibre/maplibre-native/issues/744"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Ude={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},Kde={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.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"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Lde={"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},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,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},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",doc:"Distance of halo to the icon outline. \n\nThe unit is in pixels only for SDF sprites that were created with a blur radius of 8, multiplied by the display density. I.e., the radius needs to be 16 for `@2x` sprites, etc.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},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",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},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",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},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,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},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",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},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",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},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",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},Fde={"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added, or when a video is started or its coordinates are updated.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},zde={"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,doc:"The direction of the light source(s) used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`. Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"},multidirectional:{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,doc:"The altitude of the light source(s) used to generate the hillshading with 0 as sunset and 90 as noon. Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.",transition:!1,"sdk-support":{"basic functionality":{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"},multidirectional:{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",doc:"The shading color of areas that face away from the light source(s). Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"},multidirectional:{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source(s). Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"},multidirectional:{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{doc:"The legacy hillshade method."},basic:{doc:"Basic hillshade. Uses a simple physics model where the reflected light intensity is proportional to the cosine of the angle between the incident light and the surface normal. Similar to GDAL's `gdaldem` default algorithm."},combined:{doc:"Hillshade algorithm whose intensity scales with slope. Similar to GDAL's `gdaldem` with `-combined` option."},igor:{doc:"Hillshade algorithm which tries to minimize effects on other map features beneath. Similar to GDAL's `gdaldem` with `-igor` option."},multidirectional:{doc:"Hillshade with multiple illumination directions. Uses the basic hillshade model with multiple independent light sources."}},default:"standard",doc:"The hillshade algorithm to use, one of `standard`, `basic`, `combined`, `igor`, or `multidirectional`. ![image](assets/hillshade_methods.png)","sdk-support":{"basic functionality":{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},jde={"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Nde={duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},Gde={"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}},Jr={$version:ide,$root:rde,sources:ode,source:sde,source_vector:ade,source_raster:lde,source_raster_dem:ude,source_geojson:cde,source_video:Ade,source_image:hde,layer:dde,layout:fde,layout_background:pde,layout_fill:mde,layout_circle:gde,layout_heatmap:yde,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},"property-type":"constant"}},layout_line:vde,layout_symbol:bde,layout_raster:Cde,layout_hillshade:_de,"layout_color-relief":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{}},"property-type":"constant"}},filter:xde,filter_operator:Mde,geometry_type:wde,function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:`A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:
* In categorical functions, when the feature value does not match any of the stop domain values.
* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.
* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a \`circle-color\` property but the feature property value is not a string or not a valid color).
* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.
If no default is provided, the style property's default is used in these circumstances.`}},function_stop:Sde,expression:Ede,expression_name:Ode,light:Bde,sky:Ide,terrain:kde,projection:Tde,paint:Rde,paint_fill:Dde,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",android:"7.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:Pde,paint_circle:Ude,paint_heatmap:Kde,paint_symbol:Lde,paint_raster:Fde,paint_hillshade:zde,"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the color-relief will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"5.6.0",android:"https://github.com/maplibre/maplibre-native/issues/3408",ios:"https://github.com/maplibre/maplibre-native/issues/3408"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",doc:'Defines the color of each pixel based on its elevation. Should be an expression that uses `["elevation"]` as input.',example:["interpolate",["linear"],["elevation"],0,"black",8849,"white"],transition:!1,"sdk-support":{"basic functionality":{js:"5.6.0",android:"https://github.com/maplibre/maplibre-native/issues/3408",ios:"https://github.com/maplibre/maplibre-native/issues/3408"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"}},paint_background:jde,transition:Nde,"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:Gde};var q5={exports:{}};/**
* MapLibre GL JS
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.7.2/LICENSE.txt
*/var Wde=q5.exports,zF;function Qde(){return zF||(zF=1,(function(n,e){(function(t,i){n.exports=i()})(Wde,(function(){var t={},i={};function r(s,a,c){if(i[s]=c,s==="index"){var A="var sharedModule = {}; ("+i.shared+")(sharedModule); ("+i.worker+")(sharedModule);",m={};return i.shared(m),i.index(t,m),typeof window<"u"&&t.setWorkerUrl(window.URL.createObjectURL(new Blob([A],{type:"text/javascript"}))),t}}r("shared",["exports"],(function(s){function a(f,u,d,b){return new(d||(d=Promise))((function(S,k){function D(ee){try{W(b.next(ee))}catch(re){k(re)}}function K(ee){try{W(b.throw(ee))}catch(re){k(re)}}function W(ee){var re;ee.done?S(ee.value):(re=ee.value,re instanceof d?re:new d((function(he){he(re)}))).then(D,K)}W((b=b.apply(f,u||[])).next())}))}function c(f,u){this.x=f,this.y=u}function A(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var m,v;typeof SuppressedError=="function"&&SuppressedError,c.prototype={clone(){return new c(this.x,this.y)},add(f){return this.clone()._add(f)},sub(f){return this.clone()._sub(f)},multByPoint(f){return this.clone()._multByPoint(f)},divByPoint(f){return this.clone()._divByPoint(f)},mult(f){return this.clone()._mult(f)},div(f){return this.clone()._div(f)},rotate(f){return this.clone()._rotate(f)},rotateAround(f,u){return this.clone()._rotateAround(f,u)},matMult(f){return this.clone()._matMult(f)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(f){return this.x===f.x&&this.y===f.y},dist(f){return Math.sqrt(this.distSqr(f))},distSqr(f){const u=f.x-this.x,d=f.y-this.y;return u*u+d*d},angle(){return Math.atan2(this.y,this.x)},angleTo(f){return Math.atan2(this.y-f.y,this.x-f.x)},angleWith(f){return this.angleWithSep(f.x,f.y)},angleWithSep(f,u){return Math.atan2(this.x*u-this.y*f,this.x*f+this.y*u)},_matMult(f){const u=f[2]*this.x+f[3]*this.y;return this.x=f[0]*this.x+f[1]*this.y,this.y=u,this},_add(f){return this.x+=f.x,this.y+=f.y,this},_sub(f){return this.x-=f.x,this.y-=f.y,this},_mult(f){return this.x*=f,this.y*=f,this},_div(f){return this.x/=f,this.y/=f,this},_multByPoint(f){return this.x*=f.x,this.y*=f.y,this},_divByPoint(f){return this.x/=f.x,this.y/=f.y,this},_unit(){return this._div(this.mag()),this},_perp(){const f=this.y;return this.y=this.x,this.x=-f,this},_rotate(f){const u=Math.cos(f),d=Math.sin(f),b=d*this.x+u*this.y;return this.x=u*this.x-d*this.y,this.y=b,this},_rotateAround(f,u){const d=Math.cos(f),b=Math.sin(f),S=u.y+b*(this.x-u.x)+d*(this.y-u.y);return this.x=u.x+d*(this.x-u.x)-b*(this.y-u.y),this.y=S,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:c},c.convert=function(f){if(f instanceof c)return f;if(Array.isArray(f))return new c(+f[0],+f[1]);if(f.x!==void 0&&f.y!==void 0)return new c(+f.x,+f.y);throw new Error("Expected [x, y] or {x, y} point format")};var x=(function(){if(v)return m;function f(u,d,b,S){this.cx=3*u,this.bx=3*(b-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*d,this.by=3*(S-d)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=d,this.p2x=b,this.p2y=S}return v=1,m=f,f.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,d){if(d===void 0&&(d=1e-6),u<0)return 0;if(u>1)return 1;for(var b=u,S=0;S<8;S++){var k=this.sampleCurveX(b)-u;if(Math.abs(k)<d)return b;var D=this.sampleCurveDerivativeX(b);if(Math.abs(D)<1e-6)break;b-=k/D}var K=0,W=1;for(b=u,S=0;S<20&&(k=this.sampleCurveX(b),!(Math.abs(k-u)<d));S++)u>k?K=b:W=b,b=.5*(W-K)+K;return b},solve:function(u,d){return this.sampleCurveY(this.solveCurveX(u,d))}},m})(),_=A(x);let O,P;function F(){return O==null&&(O=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),O}function j(){if(P==null&&(P=!1,F())){const u=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(u){for(let b=0;b<25;b++){const S=4*b;u.fillStyle=`rgb(${S},${S+1},${S+2})`,u.fillRect(b%5,Math.floor(b/5),1,1)}const d=u.getImageData(0,0,5,5).data;for(let b=0;b<100;b++)if(b%4!=3&&d[b]!==b){P=!0;break}}}return P||!1}var Q=1e-6,V=typeof Float32Array<"u"?Float32Array:Array;function H(){var f=new V(9);return V!=Float32Array&&(f[1]=0,f[2]=0,f[3]=0,f[5]=0,f[6]=0,f[7]=0),f[0]=1,f[4]=1,f[8]=1,f}function G(f){return f[0]=1,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=1,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=1,f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,f}function Y(){var f=new V(3);return V!=Float32Array&&(f[0]=0,f[1]=0,f[2]=0),f}function z(f){var u=f[0],d=f[1],b=f[2];return Math.sqrt(u*u+d*d+b*b)}function se(f,u,d){var b=new V(3);return b[0]=f,b[1]=u,b[2]=d,b}function le(f,u,d){return f[0]=u[0]+d[0],f[1]=u[1]+d[1],f[2]=u[2]+d[2],f}function me(f,u,d){return f[0]=u[0]*d,f[1]=u[1]*d,f[2]=u[2]*d,f}function fe(f,u,d){var b=u[0],S=u[1],k=u[2],D=d[0],K=d[1],W=d[2];return f[0]=S*W-k*K,f[1]=k*D-b*W,f[2]=b*K-S*D,f}var _e,we=z;function ke(f,u,d){var b=u[0],S=u[1],k=u[2],D=u[3];return f[0]=d[0]*b+d[4]*S+d[8]*k+d[12]*D,f[1]=d[1]*b+d[5]*S+d[9]*k+d[13]*D,f[2]=d[2]*b+d[6]*S+d[10]*k+d[14]*D,f[3]=d[3]*b+d[7]*S+d[11]*k+d[15]*D,f}function je(){var f=new V(4);return V!=Float32Array&&(f[0]=0,f[1]=0,f[2]=0),f[3]=1,f}function Ie(f,u,d,b){var S=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",k=Math.PI/360;u*=k,b*=k,d*=k;var D=Math.sin(u),K=Math.cos(u),W=Math.sin(d),ee=Math.cos(d),re=Math.sin(b),he=Math.cos(b);switch(S){case"xyz":f[0]=D*ee*he+K*W*re,f[1]=K*W*he-D*ee*re,f[2]=K*ee*re+D*W*he,f[3]=K*ee*he-D*W*re;break;case"xzy":f[0]=D*ee*he-K*W*re,f[1]=K*W*he-D*ee*re,f[2]=K*ee*re+D*W*he,f[3]=K*ee*he+D*W*re;break;case"yxz":f[0]=D*ee*he+K*W*re,f[1]=K*W*he-D*ee*re,f[2]=K*ee*re-D*W*he,f[3]=K*ee*he+D*W*re;break;case"yzx":f[0]=D*ee*he+K*W*re,f[1]=K*W*he+D*ee*re,f[2]=K*ee*re-D*W*he,f[3]=K*ee*he-D*W*re;break;case"zxy":f[0]=D*ee*he-K*W*re,f[1]=K*W*he+D*ee*re,f[2]=K*ee*re+D*W*he,f[3]=K*ee*he-D*W*re;break;case"zyx":f[0]=D*ee*he-K*W*re,f[1]=K*W*he+D*ee*re,f[2]=K*ee*re-D*W*he,f[3]=K*ee*he+D*W*re;break;default:throw new Error("Unknown angle order "+S)}return f}function Qe(){var f=new V(2);return V!=Float32Array&&(f[0]=0,f[1]=0),f}function tt(f,u){var d=new V(2);return d[0]=f,d[1]=u,d}Y(),_e=new V(4),V!=Float32Array&&(_e[0]=0,_e[1]=0,_e[2]=0,_e[3]=0),Y(),se(1,0,0),se(0,1,0),je(),je(),H(),Qe();const ht=8192;function ce(f,u,d){return u*(ht/(f.tileSize*Math.pow(2,d-f.tileID.overscaledZ)))}function Le(f,u){return(f%u+u)%u}function We(f,u,d){return f*(1-d)+u*d}function Me(f){if(f<=0)return 0;if(f>=1)return 1;const u=f*f,d=u*f;return 4*(f<.5?d:3*(f-u)+d-.75)}function dt(f,u,d,b){const S=new _(f,u,d,b);return k=>S.solve(k)}const it=dt(.25,.1,.25,1);function vt(f,u,d){return Math.min(d,Math.max(u,f))}function Ut(f,u,d){const b=d-u,S=((f-u)%b+b)%b+u;return S===u?d:S}function Pe(f,...u){for(const d of u)for(const b in d)f[b]=d[b];return f}let Te=1;function Se(f,u,d){const b={};for(const S in f)b[S]=u.call(this,f[S],S,f);return b}function Ne(f,u,d){const b={};for(const S in f)u.call(this,f[S],S,f)&&(b[S]=f[S]);return b}function ut(f){return Array.isArray(f)?f.map(ut):typeof f=="object"&&f?Se(f,ut):f}const rt={};function mt(f){rt[f]||(typeof console<"u"&&console.warn(f),rt[f]=!0)}function Rt(f,u,d){return(d.y-f.y)*(u.x-f.x)>(u.y-f.y)*(d.x-f.x)}function Bt(f){return typeof WorkerGlobalScope<"u"&&f!==void 0&&f instanceof WorkerGlobalScope}let $t=null;function Rn(f){return typeof ImageBitmap<"u"&&f instanceof ImageBitmap}const zn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ai(f,u,d,b,S){return a(this,void 0,void 0,(function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const k=new VideoFrame(f,{timestamp:0});try{const D=k?.format;if(!D||!D.startsWith("BGR")&&!D.startsWith("RGB"))throw new Error(`Unrecognized format ${D}`);const K=D.startsWith("BGR"),W=new Uint8ClampedArray(b*S*4);if(yield k.copyTo(W,(function(ee,re,he,Oe,De){const Ke=4*Math.max(-re,0),Ge=(Math.max(0,he)-he)*Oe*4+Ke,Ve=4*Oe,at=Math.max(0,re),Tt=Math.max(0,he);return{rect:{x:at,y:Tt,width:Math.min(ee.width,re+Oe)-at,height:Math.min(ee.height,he+De)-Tt},layout:[{offset:Ge,stride:Ve}]}})(f,u,d,b,S)),K)for(let ee=0;ee<W.length;ee+=4){const re=W[ee];W[ee]=W[ee+2],W[ee+2]=re}return W}finally{k.close()}}))}let _n,Bn;function dn(f,u,d,b){return f.addEventListener(u,d,b),{unsubscribe:()=>{f.removeEventListener(u,d,b)}}}function li(f){return f*Math.PI/180}function In(f){return f/Math.PI*180}const It={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},xe={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},oe="AbortError";function J(){return new Error(oe)}const ne={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function ue(f){return ne.REGISTERED_PROTOCOLS[f.substring(0,f.indexOf("://"))]}const Ce="global-dispatcher";class Ue extends Error{constructor(u,d,b,S){super(`AJAXError: ${d} (${u}): ${b}`),this.status=u,this.statusText=d,this.url=b,this.body=S}}const He=()=>Bt(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,lt=function(f,u){if(/:\/\//.test(f.url)&&!/^https?:|^file:/.test(f.url)){const b=ue(f.url);if(b)return b(f,u);if(Bt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:f,targetMapId:Ce},u)}if(!(/^file:/.test(d=f.url)||/^file:/.test(He())&&!/^\w+:/.test(d))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return(function(b,S){return a(this,void 0,void 0,(function*(){const k=new Request(b.url,{method:b.method||"GET",body:b.body,credentials:b.credentials,headers:b.headers,cache:b.cache,referrer:He(),signal:S.signal});let D,K;b.type!=="json"||k.headers.has("Accept")||k.headers.set("Accept","application/json");try{D=yield fetch(k)}catch(ee){throw new Ue(0,ee.message,b.url,new Blob)}if(!D.ok){const ee=yield D.blob();throw new Ue(D.status,D.statusText,b.url,ee)}K=b.type==="arrayBuffer"||b.type==="image"?D.arrayBuffer():b.type==="json"?D.json():D.text();const W=yield K;if(S.signal.aborted)throw J();return{data:W,cacheControl:D.headers.get("Cache-Control"),expires:D.headers.get("Expires")}}))})(f,u);if(Bt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:f,mustQueue:!0,targetMapId:Ce},u)}var d;return(function(b,S){return new Promise(((k,D)=>{var K;const W=new XMLHttpRequest;W.open(b.method||"GET",b.url,!0),b.type!=="arrayBuffer"&&b.type!=="image"||(W.responseType="arraybuffer");for(const ee in b.headers)W.setRequestHeader(ee,b.headers[ee]);b.type==="json"&&(W.responseType="text",!((K=b.headers)===null||K===void 0)&&K.Accept||W.setRequestHeader("Accept","application/json")),W.withCredentials=b.credentials==="include",W.onerror=()=>{D(new Error(W.statusText))},W.onload=()=>{if(!S.signal.aborted)if((W.status>=200&&W.status<300||W.status===0)&&W.response!==null){let ee=W.response;if(b.type==="json")try{ee=JSON.parse(W.response)}catch(re){return void D(re)}k({data:ee,cacheControl:W.getResponseHeader("Cache-Control"),expires:W.getResponseHeader("Expires")})}else{const ee=new Blob([W.response],{type:W.getResponseHeader("Content-Type")});D(new Ue(W.status,W.statusText,b.url,ee))}},S.signal.addEventListener("abort",(()=>{W.abort(),D(J())})),W.send(b.body)}))})(f,u)};function be(f){if(!f||f.indexOf("://")<=0||f.indexOf("data:image/")===0||f.indexOf("blob:")===0)return!0;const u=new URL(f),d=window.location;return u.protocol===d.protocol&&u.host===d.host}function Ee(f,u,d){d[f]&&d[f].indexOf(u)!==-1||(d[f]=d[f]||[],d[f].push(u))}function y(f,u,d){if(d&&d[f]){const b=d[f].indexOf(u);b!==-1&&d[f].splice(b,1)}}class gt{constructor(u,d={}){Pe(this,d),this.type=u}}class Mt extends gt{constructor(u,d={}){super("error",Pe({error:u},d))}}class Dt{on(u,d){return this._listeners=this._listeners||{},Ee(u,d,this._listeners),{unsubscribe:()=>{this.off(u,d)}}}off(u,d){return y(u,d,this._listeners),y(u,d,this._oneTimeListeners),this}once(u,d){return d?(this._oneTimeListeners=this._oneTimeListeners||{},Ee(u,d,this._oneTimeListeners),this):new Promise((b=>this.once(u,b)))}fire(u,d){typeof u=="string"&&(u=new gt(u,d||{}));const b=u.type;if(this.listens(b)){u.target=this;const S=this._listeners&&this._listeners[b]?this._listeners[b].slice():[];for(const K of S)K.call(this,u);const k=this._oneTimeListeners&&this._oneTimeListeners[b]?this._oneTimeListeners[b].slice():[];for(const K of k)y(b,K,this._oneTimeListeners),K.call(this,u);const D=this._eventedParent;D&&(Pe(u,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),D.fire(u))}else u instanceof Mt&&console.error(u.error);return this}listens(u){return this._listeners&&this._listeners[u]&&this._listeners[u].length>0||this._oneTimeListeners&&this._oneTimeListeners[u]&&this._oneTimeListeners[u].length>0||this._eventedParent&&this._eventedParent.listens(u)}setEventedParent(u,d){return this._eventedParent=u,this._eventedParentData=d,this}}var ot={$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"},"font-faces":{type:"array",value:"fontFaces"},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:{},"color-relief":{},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_color-relief","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"}},"layout_color-relief":{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_color-relief","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_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"}},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 bn=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Gn(f,u){const d={};for(const b in f)b!=="ref"&&(d[b]=f[b]);return bn.forEach((b=>{b in u&&(d[b]=u[b])})),d}function yn(f,u){if(Array.isArray(f)){if(!Array.isArray(u)||f.length!==u.length)return!1;for(let d=0;d<f.length;d++)if(!yn(f[d],u[d]))return!1;return!0}if(typeof f=="object"&&f!==null&&u!==null){if(typeof u!="object"||Object.keys(f).length!==Object.keys(u).length)return!1;for(const d in f)if(!yn(f[d],u[d]))return!1;return!0}return f===u}function qn(f,u){f.push(u)}function $n(f,u,d){qn(d,{command:"addSource",args:[f,u[f]]})}function mi(f,u,d){qn(u,{command:"removeSource",args:[f]}),d[f]=!0}function ir(f,u,d,b){mi(f,d,b),$n(f,u,d)}function di(f,u,d){let b;for(b in f[d])if(Object.prototype.hasOwnProperty.call(f[d],b)&&b!=="data"&&!yn(f[d][b],u[d][b]))return!1;for(b in u[d])if(Object.prototype.hasOwnProperty.call(u[d],b)&&b!=="data"&&!yn(f[d][b],u[d][b]))return!1;return!0}function Vn(f,u,d,b,S,k){f=f||{},u=u||{};for(const D in f)Object.prototype.hasOwnProperty.call(f,D)&&(yn(f[D],u[D])||d.push({command:k,args:[b,D,u[D],S]}));for(const D in u)Object.prototype.hasOwnProperty.call(u,D)&&!Object.prototype.hasOwnProperty.call(f,D)&&(yn(f[D],u[D])||d.push({command:k,args:[b,D,u[D],S]}))}function Fn(f){return f.id}function Ti(f,u){return f[u.id]=u,f}class on{constructor(u,d,b,S){this.message=(u?`${u}: `:"")+b,S&&(this.identifier=S),d!=null&&d.__line__&&(this.line=d.__line__)}}function qr(f,...u){for(const d of u)for(const b in d)f[b]=d[b];return f}class Di extends Error{constructor(u,d){super(d),this.message=d,this.key=u}}class js{constructor(u,d=[]){this.parent=u,this.bindings={};for(const[b,S]of d)this.bindings[b]=S}concat(u){return new js(this,u)}get(u){if(this.bindings[u])return this.bindings[u];if(this.parent)return this.parent.get(u);throw new Error(`${u} not found in scope.`)}has(u){return!!this.bindings[u]||!!this.parent&&this.parent.has(u)}}const ea={kind:"null"},Pn={kind:"number"},Gi={kind:"string"},Li={kind:"boolean"},Xi={kind:"color"},Oa={kind:"projectionDefinition"},lo={kind:"object"},Fi={kind:"value"},Cl={kind:"collator"},ra={kind:"formatted"},uo={kind:"padding"},Fa={kind:"colorArray"},Fu={kind:"numberArray"},So={kind:"resolvedImage"},AA={kind:"variableAnchorOffsetCollection"};function ta(f,u){return{kind:"array",itemType:f,N:u}}function xr(f){if(f.kind==="array"){const u=xr(f.itemType);return typeof f.N=="number"?`array<${u}, ${f.N}>`:f.itemType.kind==="value"?"array":`array<${u}>`}return f.kind}const Xa=[ea,Pn,Gi,Li,Xi,Oa,ra,lo,ta(Fi),uo,Fu,Fa,So,AA];function cl(f,u){if(u.kind==="error")return null;if(f.kind==="array"){if(u.kind==="array"&&(u.N===0&&u.itemType.kind==="value"||!cl(f.itemType,u.itemType))&&(typeof f.N!="number"||f.N===u.N))return null}else{if(f.kind===u.kind)return null;if(f.kind==="value"){for(const d of Xa)if(!cl(d,u))return null}}return`Expected ${xr(f)} but found ${xr(u)} instead.`}function Bs(f,u){return u.some((d=>d.kind===f.kind))}function fa(f,u){return u.some((d=>d==="null"?f===null:d==="array"?Array.isArray(f):d==="object"?f&&!Array.isArray(f)&&typeof f=="object":d===typeof f))}function _l(f,u){return f.kind==="array"&&u.kind==="array"?f.itemType.kind===u.itemType.kind&&typeof f.N=="number":f.kind===u.kind}const zc=.96422,Ah=.82521,hA=4/29,Ns=6/29,xl=3*Ns*Ns,jc=Ns*Ns*Ns,Ja=Math.PI/180,Nc=180/Math.PI;function Al(f){return(f%=360)<0&&(f+=360),f}function zu([f,u,d,b]){let S,k;const D=lc((.2225045*(f=Ba(f))+.7168786*(u=Ba(u))+.0606169*(d=Ba(d)))/1);f===u&&u===d?S=k=D:(S=lc((.4360747*f+.3850649*u+.1430804*d)/zc),k=lc((.0139322*f+.0971045*u+.7141733*d)/Ah));const K=116*D-16;return[K<0?0:K,500*(S-D),200*(D-k),b]}function Ba(f){return f<=.04045?f/12.92:Math.pow((f+.055)/1.055,2.4)}function lc(f){return f>jc?Math.pow(f,1/3):f/xl+hA}function uu([f,u,d,b]){let S=(f+16)/116,k=isNaN(u)?S:S+u/500,D=isNaN(d)?S:S-d/200;return S=1*cu(S),k=zc*cu(k),D=Ah*cu(D),[Ml(3.1338561*k-1.6168667*S-.4906146*D),Ml(-.9787684*k+1.9161415*S+.033454*D),Ml(.0719453*k-.2289914*S+1.4052427*D),b]}function Ml(f){return(f=f<=.00304?12.92*f:1.055*Math.pow(f,1/2.4)-.055)<0?0:f>1?1:f}function cu(f){return f>Ns?f*f*f:xl*(f-hA)}const zA=Object.hasOwn||function(f,u){return Object.prototype.hasOwnProperty.call(f,u)};function Ia(f,u){return zA(f,u)?f[u]:void 0}function jo(f){return parseInt(f.padEnd(2,f),16)/255}function xo(f,u){return Wi(u?f/100:f,0,1)}function Wi(f,u,d){return Math.min(Math.max(u,f),d)}function Ql(f){return!f.some(Number.isNaN)}const Fo={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 wl(f,u,d){return f+d*(u-f)}function Au(f,u,d){return f.map(((b,S)=>wl(b,u[S],d)))}class er{constructor(u,d,b,S=1,k=!0){this.r=u,this.g=d,this.b=b,this.a=S,k||(this.r*=S,this.g*=S,this.b*=S,S||this.overwriteGetter("rgb",[u,d,b,S]))}static parse(u){if(u instanceof er)return u;if(typeof u!="string")return;const d=(function(b){if((b=b.toLowerCase().trim())==="transparent")return[0,0,0,0];const S=Ia(Fo,b);if(S){const[D,K,W]=S;return[D/255,K/255,W/255,1]}if(b.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(b)){const D=b.length<6?1:2;let K=1;return[jo(b.slice(K,K+=D)),jo(b.slice(K,K+=D)),jo(b.slice(K,K+=D)),jo(b.slice(K,K+D)||"ff")]}if(b.startsWith("rgb")){const D=b.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(D){const[K,W,ee,re,he,Oe,De,Ke,Ge,Ve,at,Tt]=D,ft=[re||" ",De||" ",Ve].join("");if(ft===" "||ft===" /"||ft===",,"||ft===",,,"){const _t=[ee,Oe,Ge].join(""),Nt=_t==="%%%"?100:_t===""?255:0;if(Nt){const Jt=[Wi(+W/Nt,0,1),Wi(+he/Nt,0,1),Wi(+Ke/Nt,0,1),at?xo(+at,Tt):1];if(Ql(Jt))return Jt}}return}}const k=b.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(k){const[D,K,W,ee,re,he,Oe,De,Ke]=k,Ge=[W||" ",re||" ",Oe].join("");if(Ge===" "||Ge===" /"||Ge===",,"||Ge===",,,"){const Ve=[+K,Wi(+ee,0,100),Wi(+he,0,100),De?xo(+De,Ke):1];if(Ql(Ve))return(function([at,Tt,ft,_t]){function Nt(Jt){const An=(Jt+at/30)%12,Wn=Tt*Math.min(ft,1-ft);return ft-Wn*Math.max(-1,Math.min(An-3,9-An,1))}return at=Al(at),Tt/=100,ft/=100,[Nt(0),Nt(8),Nt(4),_t]})(Ve)}}})(u);return d?new er(...d,!1):void 0}get rgb(){const{r:u,g:d,b,a:S}=this,k=S||1/0;return this.overwriteGetter("rgb",[u/k,d/k,b/k,S])}get hcl(){return this.overwriteGetter("hcl",(function(u){const[d,b,S,k]=zu(u),D=Math.sqrt(b*b+S*S);return[Math.round(1e4*D)?Al(Math.atan2(S,b)*Nc):NaN,D,d,k]})(this.rgb))}get lab(){return this.overwriteGetter("lab",zu(this.rgb))}overwriteGetter(u,d){return Object.defineProperty(this,u,{value:d}),d}toString(){const[u,d,b,S]=this.rgb;return`rgba(${[u,d,b].map((k=>Math.round(255*k))).join(",")},${S})`}static interpolate(u,d,b,S="rgb"){switch(S){case"rgb":{const[k,D,K,W]=Au(u.rgb,d.rgb,b);return new er(k,D,K,W,!1)}case"hcl":{const[k,D,K,W]=u.hcl,[ee,re,he,Oe]=d.hcl;let De,Ke;if(isNaN(k)||isNaN(ee))isNaN(k)?isNaN(ee)?De=NaN:(De=ee,K!==1&&K!==0||(Ke=re)):(De=k,he!==1&&he!==0||(Ke=D));else{let ft=ee-k;ee>k&&ft>180?ft-=360:ee<k&&k-ee>180&&(ft+=360),De=k+b*ft}const[Ge,Ve,at,Tt]=(function([ft,_t,Nt,Jt]){return ft=isNaN(ft)?0:ft*Ja,uu([Nt,Math.cos(ft)*_t,Math.sin(ft)*_t,Jt])})([De,Ke??wl(D,re,b),wl(K,he,b),wl(W,Oe,b)]);return new er(Ge,Ve,at,Tt,!1)}case"lab":{const[k,D,K,W]=uu(Au(u.lab,d.lab,b));return new er(k,D,K,W,!1)}}}}er.black=new er(0,0,0,1),er.white=new er(1,1,1,1),er.transparent=new er(0,0,0,0),er.red=new er(1,0,0,1);class Sl{constructor(u,d,b){this.sensitivity=u?d?"variant":"case":d?"accent":"base",this.locale=b,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(u,d){return this.collator.compare(u,d)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const ju=["bottom","center","top"];class Mo{constructor(u,d,b,S,k,D){this.text=u,this.image=d,this.scale=b,this.fontStack=S,this.textColor=k,this.verticalAlign=D}}class es{constructor(u){this.sections=u}static fromString(u){return new es([new Mo(u,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some((u=>u.text.length!==0||u.image&&u.image.name.length!==0))}static factory(u){return u instanceof es?u:es.fromString(u)}toString(){return this.sections.length===0?"":this.sections.map((u=>u.text)).join("")}}class ls{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof ls)return u;if(typeof u=="number")return new ls([u,u,u,u]);if(Array.isArray(u)&&!(u.length<1||u.length>4)){for(const d of u)if(typeof d!="number")return;switch(u.length){case 1:u=[u[0],u[0],u[0],u[0]];break;case 2:u=[u[0],u[1],u[0],u[1]];break;case 3:u=[u[0],u[1],u[2],u[1]]}return new ls(u)}}toString(){return JSON.stringify(this.values)}static interpolate(u,d,b){return new ls(Au(u.values,d.values,b))}}class No{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof No)return u;if(typeof u=="number")return new No([u]);if(Array.isArray(u)){for(const d of u)if(typeof d!="number")return;return new No(u)}}toString(){return JSON.stringify(this.values)}static interpolate(u,d,b){return new No(Au(u.values,d.values,b))}}class Go{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof Go)return u;if(typeof u=="string"){const b=er.parse(u);return b?new Go([b]):void 0}if(!Array.isArray(u))return;const d=[];for(const b of u){if(typeof b!="string")return;const S=er.parse(b);if(!S)return;d.push(S)}return new Go(d)}toString(){return JSON.stringify(this.values)}static interpolate(u,d,b,S="rgb"){const k=[];if(u.values.length!=d.values.length)throw new Error(`colorArray: Arrays have mismatched length (${u.values.length} vs. ${d.values.length}), cannot interpolate.`);for(let D=0;D<u.values.length;D++)k.push(er.interpolate(u.values[D],d.values[D],b,S));return new Go(k)}}class Mr extends Error{constructor(u){super(u),this.name="RuntimeError"}toJSON(){return this.message}}const El=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class us{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof us)return u;if(Array.isArray(u)&&!(u.length<1)&&u.length%2==0){for(let d=0;d<u.length;d+=2){const b=u[d],S=u[d+1];if(typeof b!="string"||!El.has(b)||!Array.isArray(S)||S.length!==2||typeof S[0]!="number"||typeof S[1]!="number")return}return new us(u)}}toString(){return JSON.stringify(this.values)}static interpolate(u,d,b){const S=u.values,k=d.values;if(S.length!==k.length)throw new Mr(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${d.toString()}`);const D=[];for(let K=0;K<S.length;K+=2){if(S[K]!==k[K])throw new Mr(`Cannot interpolate values containing mismatched anchors. from[${K}]: ${S[K]}, to[${K}]: ${k[K]}`);D.push(S[K]);const[W,ee]=S[K+1],[re,he]=k[K+1];D.push([wl(W,re,b),wl(ee,he,b)])}return new us(D)}}class bs{constructor(u){this.name=u.name,this.available=u.available}toString(){return this.name}static fromString(u){return u?new bs({name:u,available:!1}):null}}class Ro{constructor(u,d,b){this.from=u,this.to=d,this.transition=b}static interpolate(u,d,b){return new Ro(u,d,b)}static parse(u){return u instanceof Ro?u:Array.isArray(u)&&u.length===3&&typeof u[0]=="string"&&typeof u[1]=="string"&&typeof u[2]=="number"?new Ro(u[0],u[1],u[2]):typeof u=="object"&&typeof u.from=="string"&&typeof u.to=="string"&&typeof u.transition=="number"?new Ro(u.from,u.to,u.transition):typeof u=="string"?new Ro(u,u,1):void 0}}function gr(f,u,d,b){return typeof f=="number"&&f>=0&&f<=255&&typeof u=="number"&&u>=0&&u<=255&&typeof d=="number"&&d>=0&&d<=255?b===void 0||typeof b=="number"&&b>=0&&b<=1?null:`Invalid rgba value [${[f,u,d,b].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof b=="number"?[f,u,d,b]:[f,u,d]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function el(f){if(f===null||typeof f=="string"||typeof f=="boolean"||typeof f=="number"||f instanceof Ro||f instanceof er||f instanceof Sl||f instanceof es||f instanceof ls||f instanceof No||f instanceof Go||f instanceof us||f instanceof bs)return!0;if(Array.isArray(f)){for(const u of f)if(!el(u))return!1;return!0}if(typeof f=="object"){for(const u in f)if(!el(f[u]))return!1;return!0}return!1}function Si(f){if(f===null)return ea;if(typeof f=="string")return Gi;if(typeof f=="boolean")return Li;if(typeof f=="number")return Pn;if(f instanceof er)return Xi;if(f instanceof Ro)return Oa;if(f instanceof Sl)return Cl;if(f instanceof es)return ra;if(f instanceof ls)return uo;if(f instanceof No)return Fu;if(f instanceof Go)return Fa;if(f instanceof us)return AA;if(f instanceof bs)return So;if(Array.isArray(f)){const u=f.length;let d;for(const b of f){const S=Si(b);if(d){if(d===S)continue;d=Fi;break}d=S}return ta(d||Fi,u)}return lo}function ti(f){const u=typeof f;return f===null?"":u==="string"||u==="number"||u==="boolean"?String(f):f instanceof er||f instanceof Ro||f instanceof es||f instanceof ls||f instanceof No||f instanceof Go||f instanceof us||f instanceof bs?f.toString():JSON.stringify(f)}class wr{constructor(u,d){this.type=u,this.value=d}static parse(u,d){if(u.length!==2)return d.error(`'literal' expression requires exactly one argument, but found ${u.length-1} instead.`);if(!el(u[1]))return d.error("invalid value");const b=u[1];let S=Si(b);const k=d.expectedType;return S.kind!=="array"||S.N!==0||!k||k.kind!=="array"||typeof k.N=="number"&&k.N!==0||(S=k),new wr(S,b)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const X={string:Gi,number:Pn,boolean:Li,object:lo};class ve{constructor(u,d){this.type=u,this.args=d}static parse(u,d){if(u.length<2)return d.error("Expected at least one argument.");let b,S=1;const k=u[0];if(k==="array"){let K,W;if(u.length>2){const ee=u[1];if(typeof ee!="string"||!(ee in X)||ee==="object")return d.error('The item type argument of "array" must be one of string, number, boolean',1);K=X[ee],S++}else K=Fi;if(u.length>3){if(u[2]!==null&&(typeof u[2]!="number"||u[2]<0||u[2]!==Math.floor(u[2])))return d.error('The length argument to "array" must be a positive integer literal',2);W=u[2],S++}b=ta(K,W)}else{if(!X[k])throw new Error(`Types doesn't contain name = ${k}`);b=X[k]}const D=[];for(;S<u.length;S++){const K=d.parse(u[S],S,Fi);if(!K)return null;D.push(K)}return new ve(b,D)}evaluate(u){for(let d=0;d<this.args.length;d++){const b=this.args[d].evaluate(u);if(!cl(this.type,Si(b)))return b;if(d===this.args.length-1)throw new Mr(`Expected value to be of type ${xr(this.type)}, but found ${xr(Si(b))} instead.`)}throw new Error}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}const $e={"to-boolean":Li,"to-color":Xi,"to-number":Pn,"to-string":Gi};class St{constructor(u,d){this.type=u,this.args=d}static parse(u,d){if(u.length<2)return d.error("Expected at least one argument.");const b=u[0];if(!$e[b])throw new Error(`Can't parse ${b} as it is not part of the known types`);if((b==="to-boolean"||b==="to-string")&&u.length!==2)return d.error("Expected one argument.");const S=$e[b],k=[];for(let D=1;D<u.length;D++){const K=d.parse(u[D],D,Fi);if(!K)return null;k.push(K)}return new St(S,k)}evaluate(u){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(u);case"color":{let d,b;for(const S of this.args){if(d=S.evaluate(u),b=null,d instanceof er)return d;if(typeof d=="string"){const k=u.parseColor(d);if(k)return k}else if(Array.isArray(d)&&(b=d.length<3||d.length>4?`Invalid rgba value ${JSON.stringify(d)}: expected an array containing either three or four numeric values.`:gr(d[0],d[1],d[2],d[3]),!b))return new er(d[0]/255,d[1]/255,d[2]/255,d[3])}throw new Mr(b||`Could not parse color from value '${typeof d=="string"?d:JSON.stringify(d)}'`)}case"padding":{let d;for(const b of this.args){d=b.evaluate(u);const S=ls.parse(d);if(S)return S}throw new Mr(`Could not parse padding from value '${typeof d=="string"?d:JSON.stringify(d)}'`)}case"numberArray":{let d;for(const b of this.args){d=b.evaluate(u);const S=No.parse(d);if(S)return S}throw new Mr(`Could not parse numberArray from value '${typeof d=="string"?d:JSON.stringify(d)}'`)}case"colorArray":{let d;for(const b of this.args){d=b.evaluate(u);const S=Go.parse(d);if(S)return S}throw new Mr(`Could not parse colorArray from value '${typeof d=="string"?d:JSON.stringify(d)}'`)}case"variableAnchorOffsetCollection":{let d;for(const b of this.args){d=b.evaluate(u);const S=us.parse(d);if(S)return S}throw new Mr(`Could not parse variableAnchorOffsetCollection from value '${typeof d=="string"?d:JSON.stringify(d)}'`)}case"number":{let d=null;for(const b of this.args){if(d=b.evaluate(u),d===null)return 0;const S=Number(d);if(!isNaN(S))return S}throw new Mr(`Could not convert ${JSON.stringify(d)} to number.`)}case"formatted":return es.fromString(ti(this.args[0].evaluate(u)));case"resolvedImage":return bs.fromString(ti(this.args[0].evaluate(u)));case"projectionDefinition":return this.args[0].evaluate(u);default:return ti(this.args[0].evaluate(u))}}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}const ri=["Unknown","Point","LineString","Polygon"];class kn{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"?ri[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(u){let d=this._parseColorCache.get(u);return d||(d=er.parse(u),this._parseColorCache.set(u,d)),d}}class xi{constructor(u,d,b=[],S,k=new js,D=[]){this.registry=u,this.path=b,this.key=b.map((K=>`[${K}]`)).join(""),this.scope=k,this.errors=D,this.expectedType=S,this._isConstant=d}parse(u,d,b,S,k={}){return d?this.concat(d,b,S)._parse(u,k):this._parse(u,k)}_parse(u,d){function b(S,k,D){return D==="assert"?new ve(k,[S]):D==="coerce"?new St(k,[S]):S}if(u!==null&&typeof u!="string"&&typeof u!="boolean"&&typeof u!="number"||(u=["literal",u]),Array.isArray(u)){if(u.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const S=u[0];if(typeof S!="string")return this.error(`Expression name must be a string, but found ${typeof S} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const k=this.registry[S];if(k){let D=k.parse(u,this);if(!D)return null;if(this.expectedType){const K=this.expectedType,W=D.type;if(K.kind!=="string"&&K.kind!=="number"&&K.kind!=="boolean"&&K.kind!=="object"&&K.kind!=="array"||W.kind!=="value"){if(K.kind==="projectionDefinition"&&["string","array"].includes(W.kind)||["color","formatted","resolvedImage"].includes(K.kind)&&["value","string"].includes(W.kind)||["padding","numberArray"].includes(K.kind)&&["value","number","array"].includes(W.kind)||K.kind==="colorArray"&&["value","string","array"].includes(W.kind)||K.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(W.kind))D=b(D,K,d.typeAnnotation||"coerce");else if(this.checkSubtype(K,W))return null}else D=b(D,K,d.typeAnnotation||"assert")}if(!(D instanceof wr)&&D.type.kind!=="resolvedImage"&&this._isConstant(D)){const K=new kn;try{D=new wr(D.type,D.evaluate(K))}catch(W){return this.error(W.message),null}}return D}return this.error(`Unknown expression "${S}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(u===void 0?"'undefined' value invalid. Use null instead.":typeof u=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof u} instead.`)}concat(u,d,b){const S=typeof u=="number"?this.path.concat(u):this.path,k=b?this.scope.concat(b):this.scope;return new xi(this.registry,this._isConstant,S,d||null,k,this.errors)}error(u,...d){const b=`${this.key}${d.map((S=>`[${S}]`)).join("")}`;this.errors.push(new Di(b,u))}checkSubtype(u,d){const b=cl(u,d);return b&&this.error(b),b}}class Ki{constructor(u,d){this.type=d.type,this.bindings=[].concat(u),this.result=d}evaluate(u){return this.result.evaluate(u)}eachChild(u){for(const d of this.bindings)u(d[1]);u(this.result)}static parse(u,d){if(u.length<4)return d.error(`Expected at least 3 arguments, but found ${u.length-1} instead.`);const b=[];for(let k=1;k<u.length-1;k+=2){const D=u[k];if(typeof D!="string")return d.error(`Expected string, but found ${typeof D} instead.`,k);if(/[^a-zA-Z0-9_]/.test(D))return d.error("Variable names must contain only alphanumeric characters or '_'.",k);const K=d.parse(u[k+1],k+1);if(!K)return null;b.push([D,K])}const S=d.parse(u[u.length-1],u.length-1,d.expectedType,b);return S?new Ki(b,S):null}outputDefined(){return this.result.outputDefined()}}class Ri{constructor(u,d){this.type=d.type,this.name=u,this.boundExpression=d}static parse(u,d){if(u.length!==2||typeof u[1]!="string")return d.error("'var' expression requires exactly one string literal argument.");const b=u[1];return d.scope.has(b)?new Ri(b,d.scope.get(b)):d.error(`Unknown variable "${b}". Make sure "${b}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(u){return this.boundExpression.evaluate(u)}eachChild(){}outputDefined(){return!1}}class Ei{constructor(u,d,b){this.type=u,this.index=d,this.input=b}static parse(u,d){if(u.length!==3)return d.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const b=d.parse(u[1],1,Pn),S=d.parse(u[2],2,ta(d.expectedType||Fi));return b&&S?new Ei(S.type.itemType,b,S):null}evaluate(u){const d=this.index.evaluate(u),b=this.input.evaluate(u);if(d<0)throw new Mr(`Array index out of bounds: ${d} < 0.`);if(d>=b.length)throw new Mr(`Array index out of bounds: ${d} > ${b.length-1}.`);if(d!==Math.floor(d))throw new Mr(`Array index must be an integer, but found ${d} instead.`);return b[d]}eachChild(u){u(this.index),u(this.input)}outputDefined(){return!1}}class Or{constructor(u,d){this.type=Li,this.needle=u,this.haystack=d}static parse(u,d){if(u.length!==3)return d.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const b=d.parse(u[1],1,Fi),S=d.parse(u[2],2,Fi);return b&&S?Bs(b.type,[Li,Gi,Pn,ea,Fi])?new Or(b,S):d.error(`Expected first argument to be of type boolean, string, number or null, but found ${xr(b.type)} instead`):null}evaluate(u){const d=this.needle.evaluate(u),b=this.haystack.evaluate(u);if(!b)return!1;if(!fa(d,["boolean","string","number","null"]))throw new Mr(`Expected first argument to be of type boolean, string, number or null, but found ${xr(Si(d))} instead.`);if(!fa(b,["string","array"]))throw new Mr(`Expected second argument to be of type array or string, but found ${xr(Si(b))} instead.`);return b.indexOf(d)>=0}eachChild(u){u(this.needle),u(this.haystack)}outputDefined(){return!0}}class zr{constructor(u,d,b){this.type=Pn,this.needle=u,this.haystack=d,this.fromIndex=b}static parse(u,d){if(u.length<=2||u.length>=5)return d.error(`Expected 2 or 3 arguments, but found ${u.length-1} instead.`);const b=d.parse(u[1],1,Fi),S=d.parse(u[2],2,Fi);if(!b||!S)return null;if(!Bs(b.type,[Li,Gi,Pn,ea,Fi]))return d.error(`Expected first argument to be of type boolean, string, number or null, but found ${xr(b.type)} instead`);if(u.length===4){const k=d.parse(u[3],3,Pn);return k?new zr(b,S,k):null}return new zr(b,S)}evaluate(u){const d=this.needle.evaluate(u),b=this.haystack.evaluate(u);if(!fa(d,["boolean","string","number","null"]))throw new Mr(`Expected first argument to be of type boolean, string, number or null, but found ${xr(Si(d))} instead.`);let S;if(this.fromIndex&&(S=this.fromIndex.evaluate(u)),fa(b,["string"])){const k=b.indexOf(d,S);return k===-1?-1:[...b.slice(0,k)].length}if(fa(b,["array"]))return b.indexOf(d,S);throw new Mr(`Expected second argument to be of type array or string, but found ${xr(Si(b))} instead.`)}eachChild(u){u(this.needle),u(this.haystack),this.fromIndex&&u(this.fromIndex)}outputDefined(){return!1}}class ji{constructor(u,d,b,S,k,D){this.inputType=u,this.type=d,this.input=b,this.cases=S,this.outputs=k,this.otherwise=D}static parse(u,d){if(u.length<5)return d.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if(u.length%2!=1)return d.error("Expected an even number of arguments.");let b,S;d.expectedType&&d.expectedType.kind!=="value"&&(S=d.expectedType);const k={},D=[];for(let ee=2;ee<u.length-1;ee+=2){let re=u[ee];const he=u[ee+1];Array.isArray(re)||(re=[re]);const Oe=d.concat(ee);if(re.length===0)return Oe.error("Expected at least one branch label.");for(const Ke of re){if(typeof Ke!="number"&&typeof Ke!="string")return Oe.error("Branch labels must be numbers or strings.");if(typeof Ke=="number"&&Math.abs(Ke)>Number.MAX_SAFE_INTEGER)return Oe.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Ke=="number"&&Math.floor(Ke)!==Ke)return Oe.error("Numeric branch labels must be integer values.");if(b){if(Oe.checkSubtype(b,Si(Ke)))return null}else b=Si(Ke);if(k[String(Ke)]!==void 0)return Oe.error("Branch labels must be unique.");k[String(Ke)]=D.length}const De=d.parse(he,ee,S);if(!De)return null;S=S||De.type,D.push(De)}const K=d.parse(u[1],1,Fi);if(!K)return null;const W=d.parse(u[u.length-1],u.length-1,S);return W?K.type.kind!=="value"&&d.concat(1).checkSubtype(b,K.type)?null:new ji(b,S,K,k,D,W):null}evaluate(u){const d=this.input.evaluate(u);return(Si(d)===this.inputType&&this.outputs[this.cases[d]]||this.otherwise).evaluate(u)}eachChild(u){u(this.input),this.outputs.forEach(u),u(this.otherwise)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))&&this.otherwise.outputDefined()}}class Ar{constructor(u,d,b){this.type=u,this.branches=d,this.otherwise=b}static parse(u,d){if(u.length<4)return d.error(`Expected at least 3 arguments, but found only ${u.length-1}.`);if(u.length%2!=0)return d.error("Expected an odd number of arguments.");let b;d.expectedType&&d.expectedType.kind!=="value"&&(b=d.expectedType);const S=[];for(let D=1;D<u.length-1;D+=2){const K=d.parse(u[D],D,Li);if(!K)return null;const W=d.parse(u[D+1],D+1,b);if(!W)return null;S.push([K,W]),b=b||W.type}const k=d.parse(u[u.length-1],u.length-1,b);if(!k)return null;if(!b)throw new Error("Can't infer output type");return new Ar(b,S,k)}evaluate(u){for(const[d,b]of this.branches)if(d.evaluate(u))return b.evaluate(u);return this.otherwise.evaluate(u)}eachChild(u){for(const[d,b]of this.branches)u(d),u(b);u(this.otherwise)}outputDefined(){return this.branches.every((([u,d])=>d.outputDefined()))&&this.otherwise.outputDefined()}}class jr{constructor(u,d,b,S){this.type=u,this.input=d,this.beginIndex=b,this.endIndex=S}static parse(u,d){if(u.length<=2||u.length>=5)return d.error(`Expected 2 or 3 arguments, but found ${u.length-1} instead.`);const b=d.parse(u[1],1,Fi),S=d.parse(u[2],2,Pn);if(!b||!S)return null;if(!Bs(b.type,[ta(Fi),Gi,Fi]))return d.error(`Expected first argument to be of type array or string, but found ${xr(b.type)} instead`);if(u.length===4){const k=d.parse(u[3],3,Pn);return k?new jr(b.type,b,S,k):null}return new jr(b.type,b,S)}evaluate(u){const d=this.input.evaluate(u),b=this.beginIndex.evaluate(u);let S;if(this.endIndex&&(S=this.endIndex.evaluate(u)),fa(d,["string"]))return[...d].slice(b,S).join("");if(fa(d,["array"]))return d.slice(b,S);throw new Mr(`Expected first argument to be of type array or string, but found ${xr(Si(d))} instead.`)}eachChild(u){u(this.input),u(this.beginIndex),this.endIndex&&u(this.endIndex)}outputDefined(){return!1}}function Cs(f,u){const d=f.length-1;let b,S,k=0,D=d,K=0;for(;k<=D;)if(K=Math.floor((k+D)/2),b=f[K],S=f[K+1],b<=u){if(K===d||u<S)return K;k=K+1}else{if(!(b>u))throw new Mr("Input is not a number.");D=K-1}return 0}class Sr{constructor(u,d,b){this.type=u,this.input=d,this.labels=[],this.outputs=[];for(const[S,k]of b)this.labels.push(S),this.outputs.push(k)}static parse(u,d){if(u.length-1<4)return d.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return d.error("Expected an even number of arguments.");const b=d.parse(u[1],1,Pn);if(!b)return null;const S=[];let k=null;d.expectedType&&d.expectedType.kind!=="value"&&(k=d.expectedType);for(let D=1;D<u.length;D+=2){const K=D===1?-1/0:u[D],W=u[D+1],ee=D,re=D+1;if(typeof K!="number")return d.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ee);if(S.length&&S[S.length-1][0]>=K)return d.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ee);const he=d.parse(W,re,k);if(!he)return null;k=k||he.type,S.push([K,he])}return new Sr(k,b,S)}evaluate(u){const d=this.labels,b=this.outputs;if(d.length===1)return b[0].evaluate(u);const S=this.input.evaluate(u);if(S<=d[0])return b[0].evaluate(u);const k=d.length;return S>=d[k-1]?b[k-1].evaluate(u):b[Cs(d,S)].evaluate(u)}eachChild(u){u(this.input);for(const d of this.outputs)u(d)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))}}function za(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var uc,hu,Gs=(function(){if(hu)return uc;function f(u,d,b,S){this.cx=3*u,this.bx=3*(b-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*d,this.by=3*(S-d)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=d,this.p2x=b,this.p2y=S}return hu=1,uc=f,f.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,d){if(d===void 0&&(d=1e-6),u<0)return 0;if(u>1)return 1;for(var b=u,S=0;S<8;S++){var k=this.sampleCurveX(b)-u;if(Math.abs(k)<d)return b;var D=this.sampleCurveDerivativeX(b);if(Math.abs(D)<1e-6)break;b-=k/D}var K=0,W=1;for(b=u,S=0;S<20&&(k=this.sampleCurveX(b),!(Math.abs(k-u)<d));S++)u>k?K=b:W=b,b=.5*(W-K)+K;return b},solve:function(u,d){return this.sampleCurveY(this.solveCurveX(u,d))}},uc})(),cf=za(Gs);class ts{constructor(u,d,b,S,k){this.type=u,this.operator=d,this.interpolation=b,this.input=S,this.labels=[],this.outputs=[];for(const[D,K]of k)this.labels.push(D),this.outputs.push(K)}static interpolationFactor(u,d,b,S){let k=0;if(u.name==="exponential")k=lp(d,u.base,b,S);else if(u.name==="linear")k=lp(d,1,b,S);else if(u.name==="cubic-bezier"){const D=u.controlPoints;k=new cf(D[0],D[1],D[2],D[3]).solve(lp(d,1,b,S))}return k}static parse(u,d){let[b,S,k,...D]=u;if(!Array.isArray(S)||S.length===0)return d.error("Expected an interpolation type expression.",1);if(S[0]==="linear")S={name:"linear"};else if(S[0]==="exponential"){const ee=S[1];if(typeof ee!="number")return d.error("Exponential interpolation requires a numeric base.",1,1);S={name:"exponential",base:ee}}else{if(S[0]!=="cubic-bezier")return d.error(`Unknown interpolation type ${String(S[0])}`,1,0);{const ee=S.slice(1);if(ee.length!==4||ee.some((re=>typeof re!="number"||re<0||re>1)))return d.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);S={name:"cubic-bezier",controlPoints:ee}}}if(u.length-1<4)return d.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return d.error("Expected an even number of arguments.");if(k=d.parse(k,2,Pn),!k)return null;const K=[];let W=null;b!=="interpolate-hcl"&&b!=="interpolate-lab"||d.expectedType==Fa?d.expectedType&&d.expectedType.kind!=="value"&&(W=d.expectedType):W=Xi;for(let ee=0;ee<D.length;ee+=2){const re=D[ee],he=D[ee+1],Oe=ee+3,De=ee+4;if(typeof re!="number")return d.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Oe);if(K.length&&K[K.length-1][0]>=re)return d.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Oe);const Ke=d.parse(he,De,W);if(!Ke)return null;W=W||Ke.type,K.push([re,Ke])}return _l(W,Pn)||_l(W,Oa)||_l(W,Xi)||_l(W,uo)||_l(W,Fu)||_l(W,Fa)||_l(W,AA)||_l(W,ta(Pn))?new ts(W,b,S,k,K):d.error(`Type ${xr(W)} is not interpolatable.`)}evaluate(u){const d=this.labels,b=this.outputs;if(d.length===1)return b[0].evaluate(u);const S=this.input.evaluate(u);if(S<=d[0])return b[0].evaluate(u);const k=d.length;if(S>=d[k-1])return b[k-1].evaluate(u);const D=Cs(d,S),K=ts.interpolationFactor(this.interpolation,S,d[D],d[D+1]),W=b[D].evaluate(u),ee=b[D+1].evaluate(u);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return wl(W,ee,K);case"color":return er.interpolate(W,ee,K);case"padding":return ls.interpolate(W,ee,K);case"colorArray":return Go.interpolate(W,ee,K);case"numberArray":return No.interpolate(W,ee,K);case"variableAnchorOffsetCollection":return us.interpolate(W,ee,K);case"array":return Au(W,ee,K);case"projectionDefinition":return Ro.interpolate(W,ee,K)}case"interpolate-hcl":switch(this.type.kind){case"color":return er.interpolate(W,ee,K,"hcl");case"colorArray":return Go.interpolate(W,ee,K,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return er.interpolate(W,ee,K,"lab");case"colorArray":return Go.interpolate(W,ee,K,"lab")}}}eachChild(u){u(this.input);for(const d of this.outputs)u(d)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))}}function lp(f,u,d,b){const S=b-d,k=f-d;return S===0?0:u===1?k/S:(Math.pow(u,k)-1)/(Math.pow(u,S)-1)}const Gc={color:er.interpolate,number:wl,padding:ls.interpolate,numberArray:No.interpolate,colorArray:Go.interpolate,variableAnchorOffsetCollection:us.interpolate,array:Au};class du{constructor(u,d){this.type=u,this.args=d}static parse(u,d){if(u.length<2)return d.error("Expected at least one argument.");let b=null;const S=d.expectedType;S&&S.kind!=="value"&&(b=S);const k=[];for(const K of u.slice(1)){const W=d.parse(K,1+k.length,b,void 0,{typeAnnotation:"omit"});if(!W)return null;b=b||W.type,k.push(W)}if(!b)throw new Error("No output type");const D=S&&k.some((K=>cl(S,K.type)));return new du(D?Fi:b,k)}evaluate(u){let d,b=null,S=0;for(const k of this.args)if(S++,b=k.evaluate(u),b&&b instanceof bs&&!b.available&&(d||(d=b.name),b=null,S===this.args.length&&(b=d)),b!==null)break;return b}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}function hh(f,u){return f==="=="||f==="!="?u.kind==="boolean"||u.kind==="string"||u.kind==="number"||u.kind==="null"||u.kind==="value":u.kind==="string"||u.kind==="number"||u.kind==="value"}function ld(f,u,d,b){return b.compare(u,d)===0}function Nr(f,u,d){const b=f!=="=="&&f!=="!=";return class kX{constructor(k,D,K){this.type=Li,this.lhs=k,this.rhs=D,this.collator=K,this.hasUntypedArgument=k.type.kind==="value"||D.type.kind==="value"}static parse(k,D){if(k.length!==3&&k.length!==4)return D.error("Expected two or three arguments.");const K=k[0];let W=D.parse(k[1],1,Fi);if(!W)return null;if(!hh(K,W.type))return D.concat(1).error(`"${K}" comparisons are not supported for type '${xr(W.type)}'.`);let ee=D.parse(k[2],2,Fi);if(!ee)return null;if(!hh(K,ee.type))return D.concat(2).error(`"${K}" comparisons are not supported for type '${xr(ee.type)}'.`);if(W.type.kind!==ee.type.kind&&W.type.kind!=="value"&&ee.type.kind!=="value")return D.error(`Cannot compare types '${xr(W.type)}' and '${xr(ee.type)}'.`);b&&(W.type.kind==="value"&&ee.type.kind!=="value"?W=new ve(ee.type,[W]):W.type.kind!=="value"&&ee.type.kind==="value"&&(ee=new ve(W.type,[ee])));let re=null;if(k.length===4){if(W.type.kind!=="string"&&ee.type.kind!=="string"&&W.type.kind!=="value"&&ee.type.kind!=="value")return D.error("Cannot use collator to compare non-string types.");if(re=D.parse(k[3],3,Cl),!re)return null}return new kX(W,ee,re)}evaluate(k){const D=this.lhs.evaluate(k),K=this.rhs.evaluate(k);if(b&&this.hasUntypedArgument){const W=Si(D),ee=Si(K);if(W.kind!==ee.kind||W.kind!=="string"&&W.kind!=="number")throw new Mr(`Expected arguments for "${f}" to be (string, string) or (number, number), but found (${W.kind}, ${ee.kind}) instead.`)}if(this.collator&&!b&&this.hasUntypedArgument){const W=Si(D),ee=Si(K);if(W.kind!=="string"||ee.kind!=="string")return u(k,D,K)}return this.collator?d(k,D,K,this.collator.evaluate(k)):u(k,D,K)}eachChild(k){k(this.lhs),k(this.rhs),this.collator&&k(this.collator)}outputDefined(){return!0}}}const dA=Nr("==",(function(f,u,d){return u===d}),ld),Af=Nr("!=",(function(f,u,d){return u!==d}),(function(f,u,d,b){return!ld(0,u,d,b)})),ov=Nr("<",(function(f,u,d){return u<d}),(function(f,u,d,b){return b.compare(u,d)<0})),up=Nr(">",(function(f,u,d){return u>d}),(function(f,u,d,b){return b.compare(u,d)>0})),sv=Nr("<=",(function(f,u,d){return u<=d}),(function(f,u,d,b){return b.compare(u,d)<=0})),av=Nr(">=",(function(f,u,d){return u>=d}),(function(f,u,d,b){return b.compare(u,d)>=0}));class Mm{constructor(u,d,b){this.type=Cl,this.locale=b,this.caseSensitive=u,this.diacriticSensitive=d}static parse(u,d){if(u.length!==2)return d.error("Expected one argument.");const b=u[1];if(typeof b!="object"||Array.isArray(b))return d.error("Collator options argument must be an object.");const S=d.parse(b["case-sensitive"]!==void 0&&b["case-sensitive"],1,Li);if(!S)return null;const k=d.parse(b["diacritic-sensitive"]!==void 0&&b["diacritic-sensitive"],1,Li);if(!k)return null;let D=null;return b.locale&&(D=d.parse(b.locale,1,Gi),!D)?null:new Mm(S,k,D)}evaluate(u){return new Sl(this.caseSensitive.evaluate(u),this.diacriticSensitive.evaluate(u),this.locale?this.locale.evaluate(u):null)}eachChild(u){u(this.caseSensitive),u(this.diacriticSensitive),this.locale&&u(this.locale)}outputDefined(){return!1}}class wm{constructor(u,d,b,S,k){this.type=Gi,this.number=u,this.locale=d,this.currency=b,this.minFractionDigits=S,this.maxFractionDigits=k}static parse(u,d){if(u.length!==3)return d.error("Expected two arguments.");const b=d.parse(u[1],1,Pn);if(!b)return null;const S=u[2];if(typeof S!="object"||Array.isArray(S))return d.error("NumberFormat options argument must be an object.");let k=null;if(S.locale&&(k=d.parse(S.locale,1,Gi),!k))return null;let D=null;if(S.currency&&(D=d.parse(S.currency,1,Gi),!D))return null;let K=null;if(S["min-fraction-digits"]&&(K=d.parse(S["min-fraction-digits"],1,Pn),!K))return null;let W=null;return S["max-fraction-digits"]&&(W=d.parse(S["max-fraction-digits"],1,Pn),!W)?null:new wm(b,k,D,K,W)}evaluate(u){return new Intl.NumberFormat(this.locale?this.locale.evaluate(u):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(u):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(u):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(u):void 0}).format(this.number.evaluate(u))}eachChild(u){u(this.number),this.locale&&u(this.locale),this.currency&&u(this.currency),this.minFractionDigits&&u(this.minFractionDigits),this.maxFractionDigits&&u(this.maxFractionDigits)}outputDefined(){return!1}}class fA{constructor(u){this.type=ra,this.sections=u}static parse(u,d){if(u.length<2)return d.error("Expected at least one argument.");const b=u[1];if(!Array.isArray(b)&&typeof b=="object")return d.error("First argument must be an image or text section.");const S=[];let k=!1;for(let D=1;D<=u.length-1;++D){const K=u[D];if(k&&typeof K=="object"&&!Array.isArray(K)){k=!1;let W=null;if(K["font-scale"]&&(W=d.parse(K["font-scale"],1,Pn),!W))return null;let ee=null;if(K["text-font"]&&(ee=d.parse(K["text-font"],1,ta(Gi)),!ee))return null;let re=null;if(K["text-color"]&&(re=d.parse(K["text-color"],1,Xi),!re))return null;let he=null;if(K["vertical-align"]){if(typeof K["vertical-align"]=="string"&&!ju.includes(K["vertical-align"]))return d.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${K["vertical-align"]}' instead.`);if(he=d.parse(K["vertical-align"],1,Gi),!he)return null}const Oe=S[S.length-1];Oe.scale=W,Oe.font=ee,Oe.textColor=re,Oe.verticalAlign=he}else{const W=d.parse(u[D],1,Fi);if(!W)return null;const ee=W.type.kind;if(ee!=="string"&&ee!=="value"&&ee!=="null"&&ee!=="resolvedImage")return d.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");k=!0,S.push({content:W,scale:null,font:null,textColor:null,verticalAlign:null})}}return new fA(S)}evaluate(u){return new es(this.sections.map((d=>{const b=d.content.evaluate(u);return Si(b)===So?new Mo("",b,null,null,null,d.verticalAlign?d.verticalAlign.evaluate(u):null):new Mo(ti(b),null,d.scale?d.scale.evaluate(u):null,d.font?d.font.evaluate(u).join(","):null,d.textColor?d.textColor.evaluate(u):null,d.verticalAlign?d.verticalAlign.evaluate(u):null)})))}eachChild(u){for(const d of this.sections)u(d.content),d.scale&&u(d.scale),d.font&&u(d.font),d.textColor&&u(d.textColor),d.verticalAlign&&u(d.verticalAlign)}outputDefined(){return!1}}class dh{constructor(u){this.type=So,this.input=u}static parse(u,d){if(u.length!==2)return d.error("Expected two arguments.");const b=d.parse(u[1],1,Gi);return b?new dh(b):d.error("No image name provided.")}evaluate(u){const d=this.input.evaluate(u),b=bs.fromString(d);return b&&u.availableImages&&(b.available=u.availableImages.indexOf(d)>-1),b}eachChild(u){u(this.input)}outputDefined(){return!1}}class hf{constructor(u){this.type=Pn,this.input=u}static parse(u,d){if(u.length!==2)return d.error(`Expected 1 argument, but found ${u.length-1} instead.`);const b=d.parse(u[1],1);return b?b.type.kind!=="array"&&b.type.kind!=="string"&&b.type.kind!=="value"?d.error(`Expected argument of type string or array, but found ${xr(b.type)} instead.`):new hf(b):null}evaluate(u){const d=this.input.evaluate(u);if(typeof d=="string")return[...d].length;if(Array.isArray(d))return d.length;throw new Mr(`Expected value to be of type string or array, but found ${xr(Si(d))} instead.`)}eachChild(u){u(this.input)}outputDefined(){return!1}}const Ol=8192;function u1(f,u){const d=(180+f[0])/360,b=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+f[1]*Math.PI/360)))/360,S=Math.pow(2,u.z);return[Math.round(d*S*Ol),Math.round(b*S*Ol)]}function ud(f,u){const d=Math.pow(2,u.z);return[(S=(f[0]/Ol+u.x)/d,360*S-180),(b=(f[1]/Ol+u.y)/d,360/Math.PI*Math.atan(Math.exp((180-360*b)*Math.PI/180))-90)];var b,S}function fh(f,u){f[0]=Math.min(f[0],u[0]),f[1]=Math.min(f[1],u[1]),f[2]=Math.max(f[2],u[0]),f[3]=Math.max(f[3],u[1])}function cd(f,u){return!(f[0]<=u[0]||f[2]>=u[2]||f[1]<=u[1]||f[3]>=u[3])}function c1(f,u,d){const b=f[0]-u[0],S=f[1]-u[1],k=f[0]-d[0],D=f[1]-d[1];return b*D-k*S==0&&b*k<=0&&S*D<=0}function Ad(f,u,d,b){return(S=[b[0]-d[0],b[1]-d[1]])[0]*(k=[u[0]-f[0],u[1]-f[1]])[1]-S[1]*k[0]!=0&&!(!dd(f,u,d,b)||!dd(d,b,f,u));var S,k}function ph(f,u,d){for(const b of d)for(let S=0;S<b.length-1;++S)if(Ad(f,u,b[S],b[S+1]))return!0;return!1}function hd(f,u,d=!1){let b=!1;for(const K of u)for(let W=0;W<K.length-1;W++){if(c1(f,K[W],K[W+1]))return d;(k=K[W])[1]>(S=f)[1]!=(D=K[W+1])[1]>S[1]&&S[0]<(D[0]-k[0])*(S[1]-k[1])/(D[1]-k[1])+k[0]&&(b=!b)}var S,k,D;return b}function Hg(f,u){for(const d of u)if(hd(f,d))return!0;return!1}function ql(f,u){for(const d of f)if(!hd(d,u))return!1;for(let d=0;d<f.length-1;++d)if(ph(f[d],f[d+1],u))return!1;return!0}function Sm(f,u){for(const d of u)if(ql(f,d))return!0;return!1}function dd(f,u,d,b){const S=b[0]-d[0],k=b[1]-d[1],D=(f[0]-d[0])*k-S*(f[1]-d[1]),K=(u[0]-d[0])*k-S*(u[1]-d[1]);return D>0&&K<0||D<0&&K>0}function mh(f,u,d){const b=[];for(let S=0;S<f.length;S++){const k=[];for(let D=0;D<f[S].length;D++){const K=u1(f[S][D],d);fh(u,K),k.push(K)}b.push(k)}return b}function fd(f,u,d){const b=[];for(let S=0;S<f.length;S++){const k=mh(f[S],u,d);b.push(k)}return b}function Em(f,u,d,b){if(f[0]<d[0]||f[0]>d[2]){const S=.5*b;let k=f[0]-d[0]>S?-b:d[0]-f[0]>S?b:0;k===0&&(k=f[0]-d[2]>S?-b:d[2]-f[0]>S?b:0),f[0]+=k}fh(u,f)}function cp(f,u,d,b){const S=Math.pow(2,b.z)*Ol,k=[b.x*Ol,b.y*Ol],D=[];for(const K of f)for(const W of K){const ee=[W.x+k[0],W.y+k[1]];Em(ee,u,d,S),D.push(ee)}return D}function Zg(f,u,d,b){const S=Math.pow(2,b.z)*Ol,k=[b.x*Ol,b.y*Ol],D=[];for(const W of f){const ee=[];for(const re of W){const he=[re.x+k[0],re.y+k[1]];fh(u,he),ee.push(he)}D.push(ee)}if(u[2]-u[0]<=S/2){(K=u)[0]=K[1]=1/0,K[2]=K[3]=-1/0;for(const W of D)for(const ee of W)Em(ee,u,d,S)}var K;return D}class gh{constructor(u,d){this.type=Li,this.geojson=u,this.geometries=d}static parse(u,d){if(u.length!==2)return d.error(`'within' expression requires exactly one argument, but found ${u.length-1} instead.`);if(el(u[1])){const b=u[1];if(b.type==="FeatureCollection"){const S=[];for(const k of b.features){const{type:D,coordinates:K}=k.geometry;D==="Polygon"&&S.push(K),D==="MultiPolygon"&&S.push(...K)}if(S.length)return new gh(b,{type:"MultiPolygon",coordinates:S})}else if(b.type==="Feature"){const S=b.geometry.type;if(S==="Polygon"||S==="MultiPolygon")return new gh(b,b.geometry)}else if(b.type==="Polygon"||b.type==="MultiPolygon")return new gh(b,b)}return d.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(u){if(u.geometry()!=null&&u.canonicalID()!=null){if(u.geometryType()==="Point")return(function(d,b){const S=[1/0,1/0,-1/0,-1/0],k=[1/0,1/0,-1/0,-1/0],D=d.canonicalID();if(b.type==="Polygon"){const K=mh(b.coordinates,k,D),W=cp(d.geometry(),S,k,D);if(!cd(S,k))return!1;for(const ee of W)if(!hd(ee,K))return!1}if(b.type==="MultiPolygon"){const K=fd(b.coordinates,k,D),W=cp(d.geometry(),S,k,D);if(!cd(S,k))return!1;for(const ee of W)if(!Hg(ee,K))return!1}return!0})(u,this.geometries);if(u.geometryType()==="LineString")return(function(d,b){const S=[1/0,1/0,-1/0,-1/0],k=[1/0,1/0,-1/0,-1/0],D=d.canonicalID();if(b.type==="Polygon"){const K=mh(b.coordinates,k,D),W=Zg(d.geometry(),S,k,D);if(!cd(S,k))return!1;for(const ee of W)if(!ql(ee,K))return!1}if(b.type==="MultiPolygon"){const K=fd(b.coordinates,k,D),W=Zg(d.geometry(),S,k,D);if(!cd(S,k))return!1;for(const ee of W)if(!Sm(ee,K))return!1}return!0})(u,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Ap=class{constructor(f=[],u=(d,b)=>d<b?-1:d>b?1:0){if(this.data=f,this.length=this.data.length,this.compare=u,this.length>0)for(let d=(this.length>>1)-1;d>=0;d--)this._down(d)}push(f){this.data.push(f),this._up(this.length++)}pop(){if(this.length===0)return;const f=this.data[0],u=this.data.pop();return--this.length>0&&(this.data[0]=u,this._down(0)),f}peek(){return this.data[0]}_up(f){const{data:u,compare:d}=this,b=u[f];for(;f>0;){const S=f-1>>1,k=u[S];if(d(b,k)>=0)break;u[f]=k,f=S}u[f]=b}_down(f){const{data:u,compare:d}=this,b=this.length>>1,S=u[f];for(;f<b;){let k=1+(f<<1);const D=k+1;if(D<this.length&&d(u[D],u[k])<0&&(k=D),d(u[k],S)>=0)break;u[f]=u[k],f=k}u[f]=S}};function pA(f,u,d=0,b=f.length-1,S=A1){for(;b>d;){if(b-d>600){const W=b-d+1,ee=u-d+1,re=Math.log(W),he=.5*Math.exp(2*re/3),Oe=.5*Math.sqrt(re*he*(W-he)/W)*(ee-W/2<0?-1:1);pA(f,u,Math.max(d,Math.floor(u-ee*he/W+Oe)),Math.min(b,Math.floor(u+(W-ee)*he/W+Oe)),S)}const k=f[u];let D=d,K=b;for(df(f,d,u),S(f[b],k)>0&&df(f,d,b);D<K;){for(df(f,D,K),D++,K--;S(f[D],k)<0;)D++;for(;S(f[K],k)>0;)K--}S(f[d],k)===0?df(f,d,K):(K++,df(f,K,b)),K<=u&&(d=K+1),u<=K&&(b=K-1)}}function df(f,u,d){const b=f[u];f[u]=f[d],f[d]=b}function A1(f,u){return f<u?-1:f>u?1:0}function yh(f,u){if(f.length<=1)return[f];const d=[];let b,S;for(const k of f){const D=vh(k);D!==0&&(k.area=Math.abs(D),S===void 0&&(S=D<0),S===D<0?(b&&d.push(b),b=[k]):b.push(k))}if(b&&d.push(b),u>1)for(let k=0;k<d.length;k++)d[k].length<=u||(pA(d[k],u,1,d[k].length-1,Xg),d[k]=d[k].slice(0,u));return d}function Xg(f,u){return u.area-f.area}function vh(f){let u=0;for(let d,b,S=0,k=f.length,D=k-1;S<k;D=S++)d=f[S],b=f[D],u+=(b.x-d.x)*(d.y+b.y);return u}const hp=1/298.257223563,h1=hp*(2-hp),Jg=Math.PI/180;class Yl{constructor(u){const d=6378.137*Jg*1e3,b=Math.cos(u*Jg),S=1/(1-h1*(1-b*b)),k=Math.sqrt(S);this.kx=d*k*b,this.ky=d*k*S*(1-h1)}distance(u,d){const b=this.wrap(u[0]-d[0])*this.kx,S=(u[1]-d[1])*this.ky;return Math.sqrt(b*b+S*S)}pointOnLine(u,d){let b,S,k,D,K=1/0;for(let W=0;W<u.length-1;W++){let ee=u[W][0],re=u[W][1],he=this.wrap(u[W+1][0]-ee)*this.kx,Oe=(u[W+1][1]-re)*this.ky,De=0;he===0&&Oe===0||(De=(this.wrap(d[0]-ee)*this.kx*he+(d[1]-re)*this.ky*Oe)/(he*he+Oe*Oe),De>1?(ee=u[W+1][0],re=u[W+1][1]):De>0&&(ee+=he/this.kx*De,re+=Oe/this.ky*De)),he=this.wrap(d[0]-ee)*this.kx,Oe=(d[1]-re)*this.ky;const Ke=he*he+Oe*Oe;Ke<K&&(K=Ke,b=ee,S=re,k=W,D=De)}return{point:[b,S],index:k,t:Math.max(0,Math.min(1,D))}}wrap(u){for(;u<-180;)u+=360;for(;u>180;)u-=360;return u}}function Wc(f,u){return u[0]-f[0]}function $l(f){return f[1]-f[0]+1}function Qc(f,u){return f[1]>=f[0]&&f[1]<u}function co(f,u){if(f[0]>f[1])return[null,null];const d=$l(f);if(u){if(d===2)return[f,null];const S=Math.floor(d/2);return[[f[0],f[0]+S],[f[0]+S,f[1]]]}if(d===1)return[f,null];const b=Math.floor(d/2)-1;return[[f[0],f[0]+b],[f[0]+b+1,f[1]]]}function Om(f,u){if(!Qc(u,f.length))return[1/0,1/0,-1/0,-1/0];const d=[1/0,1/0,-1/0,-1/0];for(let b=u[0];b<=u[1];++b)fh(d,f[b]);return d}function dp(f){const u=[1/0,1/0,-1/0,-1/0];for(const d of f)for(const b of d)fh(u,b);return u}function d1(f){return f[0]!==-1/0&&f[1]!==-1/0&&f[2]!==1/0&&f[3]!==1/0}function bh(f,u,d){if(!d1(f)||!d1(u))return NaN;let b=0,S=0;return f[2]<u[0]&&(b=u[0]-f[2]),f[0]>u[2]&&(b=f[0]-u[2]),f[1]>u[3]&&(S=f[1]-u[3]),f[3]<u[1]&&(S=u[1]-f[3]),d.distance([0,0],[b,S])}function fu(f,u,d){const b=d.pointOnLine(u,f);return d.distance(f,b.point)}function Pt(f,u,d,b,S){const k=Math.min(fu(f,[d,b],S),fu(u,[d,b],S)),D=Math.min(fu(d,[f,u],S),fu(b,[f,u],S));return Math.min(k,D)}function sn(f,u,d,b,S){if(!Qc(u,f.length)||!Qc(b,d.length))return 1/0;let k=1/0;for(let D=u[0];D<u[1];++D){const K=f[D],W=f[D+1];for(let ee=b[0];ee<b[1];++ee){const re=d[ee],he=d[ee+1];if(Ad(K,W,re,he))return 0;k=Math.min(k,Pt(K,W,re,he,S))}}return k}function nn(f,u,d,b,S){if(!Qc(u,f.length)||!Qc(b,d.length))return NaN;let k=1/0;for(let D=u[0];D<=u[1];++D)for(let K=b[0];K<=b[1];++K)if(k=Math.min(k,S.distance(f[D],d[K])),k===0)return k;return k}function ui(f,u,d){if(hd(f,u,!0))return 0;let b=1/0;for(const S of u){const k=S[0],D=S[S.length-1];if(k!==D&&(b=Math.min(b,fu(f,[D,k],d)),b===0))return b;const K=d.pointOnLine(S,f);if(b=Math.min(b,d.distance(f,K.point)),b===0)return b}return b}function rr(f,u,d,b){if(!Qc(u,f.length))return NaN;for(let k=u[0];k<=u[1];++k)if(hd(f[k],d,!0))return 0;let S=1/0;for(let k=u[0];k<u[1];++k){const D=f[k],K=f[k+1];for(const W of d)for(let ee=0,re=W.length,he=re-1;ee<re;he=ee++){const Oe=W[he],De=W[ee];if(Ad(D,K,Oe,De))return 0;S=Math.min(S,Pt(D,K,Oe,De,b))}}return S}function go(f,u){for(const d of f)for(const b of d)if(hd(b,u,!0))return!0;return!1}function ka(f,u,d,b=1/0){const S=dp(f),k=dp(u);if(b!==1/0&&bh(S,k,d)>=b)return b;if(cd(S,k)){if(go(f,u))return 0}else if(go(u,f))return 0;let D=1/0;for(const K of f)for(let W=0,ee=K.length,re=ee-1;W<ee;re=W++){const he=K[re],Oe=K[W];for(const De of u)for(let Ke=0,Ge=De.length,Ve=Ge-1;Ke<Ge;Ve=Ke++){const at=De[Ve],Tt=De[Ke];if(Ad(he,Oe,at,Tt))return 0;D=Math.min(D,Pt(he,Oe,at,Tt,d))}}return D}function yo(f,u,d,b,S,k){if(!k)return;const D=bh(Om(b,k),S,d);D<u&&f.push([D,k,[0,0]])}function pd(f,u,d,b,S,k,D){if(!k||!D)return;const K=bh(Om(b,k),Om(S,D),d);K<u&&f.push([K,k,D])}function fp(f,u,d,b,S=1/0){let k=Math.min(b.distance(f[0],d[0][0]),S);if(k===0)return k;const D=new Ap([[0,[0,f.length-1],[0,0]]],Wc),K=dp(d);for(;D.length>0;){const W=D.pop();if(W[0]>=k)continue;const ee=W[1],re=u?50:100;if($l(ee)<=re){if(!Qc(ee,f.length))return NaN;if(u){const he=rr(f,ee,d,b);if(isNaN(he)||he===0)return he;k=Math.min(k,he)}else for(let he=ee[0];he<=ee[1];++he){const Oe=ui(f[he],d,b);if(k=Math.min(k,Oe),k===0)return 0}}else{const he=co(ee,u);yo(D,k,b,f,K,he[0]),yo(D,k,b,f,K,he[1])}}return k}function Bl(f,u,d,b,S,k=1/0){let D=Math.min(k,S.distance(f[0],d[0]));if(D===0)return D;const K=new Ap([[0,[0,f.length-1],[0,d.length-1]]],Wc);for(;K.length>0;){const W=K.pop();if(W[0]>=D)continue;const ee=W[1],re=W[2],he=u?50:100,Oe=b?50:100;if($l(ee)<=he&&$l(re)<=Oe){if(!Qc(ee,f.length)&&Qc(re,d.length))return NaN;let De;if(u&&b)De=sn(f,ee,d,re,S),D=Math.min(D,De);else if(u&&!b){const Ke=f.slice(ee[0],ee[1]+1);for(let Ge=re[0];Ge<=re[1];++Ge)if(De=fu(d[Ge],Ke,S),D=Math.min(D,De),D===0)return D}else if(!u&&b){const Ke=d.slice(re[0],re[1]+1);for(let Ge=ee[0];Ge<=ee[1];++Ge)if(De=fu(f[Ge],Ke,S),D=Math.min(D,De),D===0)return D}else De=nn(f,ee,d,re,S),D=Math.min(D,De)}else{const De=co(ee,u),Ke=co(re,b);pd(K,D,S,f,d,De[0],Ke[0]),pd(K,D,S,f,d,De[0],Ke[1]),pd(K,D,S,f,d,De[1],Ke[0]),pd(K,D,S,f,d,De[1],Ke[1])}}return D}function ff(f){return f.type==="MultiPolygon"?f.coordinates.map((u=>({type:"Polygon",coordinates:u}))):f.type==="MultiLineString"?f.coordinates.map((u=>({type:"LineString",coordinates:u}))):f.type==="MultiPoint"?f.coordinates.map((u=>({type:"Point",coordinates:u}))):[f]}class md{constructor(u,d){this.type=Pn,this.geojson=u,this.geometries=d}static parse(u,d){if(u.length!==2)return d.error(`'distance' expression requires exactly one argument, but found ${u.length-1} instead.`);if(el(u[1])){const b=u[1];if(b.type==="FeatureCollection")return new md(b,b.features.map((S=>ff(S.geometry))).flat());if(b.type==="Feature")return new md(b,ff(b.geometry));if("type"in b&&"coordinates"in b)return new md(b,ff(b))}return d.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(u){if(u.geometry()!=null&&u.canonicalID()!=null){if(u.geometryType()==="Point")return(function(d,b){const S=d.geometry(),k=S.flat().map((W=>ud([W.x,W.y],d.canonical)));if(S.length===0)return NaN;const D=new Yl(k[0][1]);let K=1/0;for(const W of b){switch(W.type){case"Point":K=Math.min(K,Bl(k,!1,[W.coordinates],!1,D,K));break;case"LineString":K=Math.min(K,Bl(k,!1,W.coordinates,!0,D,K));break;case"Polygon":K=Math.min(K,fp(k,!1,W.coordinates,D,K))}if(K===0)return K}return K})(u,this.geometries);if(u.geometryType()==="LineString")return(function(d,b){const S=d.geometry(),k=S.flat().map((W=>ud([W.x,W.y],d.canonical)));if(S.length===0)return NaN;const D=new Yl(k[0][1]);let K=1/0;for(const W of b){switch(W.type){case"Point":K=Math.min(K,Bl(k,!0,[W.coordinates],!1,D,K));break;case"LineString":K=Math.min(K,Bl(k,!0,W.coordinates,!0,D,K));break;case"Polygon":K=Math.min(K,fp(k,!0,W.coordinates,D,K))}if(K===0)return K}return K})(u,this.geometries);if(u.geometryType()==="Polygon")return(function(d,b){const S=d.geometry();if(S.length===0||S[0].length===0)return NaN;const k=yh(S,0).map((W=>W.map((ee=>ee.map((re=>ud([re.x,re.y],d.canonical))))))),D=new Yl(k[0][0][0][1]);let K=1/0;for(const W of b)for(const ee of k){switch(W.type){case"Point":K=Math.min(K,fp([W.coordinates],!1,ee,D,K));break;case"LineString":K=Math.min(K,fp(W.coordinates,!0,ee,D,K));break;case"Polygon":K=Math.min(K,ka(ee,W.coordinates,D,K))}if(K===0)return K}return K})(u,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class mA{constructor(u){this.type=Fi,this.key=u}static parse(u,d){if(u.length!==2)return d.error(`Expected 1 argument, but found ${u.length-1} instead.`);const b=u[1];return b==null?d.error("Global state property must be defined."):typeof b!="string"?d.error(`Global state property must be string, but found ${typeof u[1]} instead.`):new mA(b)}evaluate(u){var d;const b=(d=u.globals)===null||d===void 0?void 0:d.globalState;return b&&Object.keys(b).length!==0?Ia(b,this.key):null}eachChild(){}outputDefined(){return!1}}const gA={"==":dA,"!=":Af,">":up,"<":ov,">=":av,"<=":sv,array:ve,at:Ei,boolean:ve,case:Ar,coalesce:du,collator:Mm,format:fA,image:dh,in:Or,"index-of":zr,interpolate:ts,"interpolate-hcl":ts,"interpolate-lab":ts,length:hf,let:Ki,literal:wr,match:ji,number:ve,"number-format":wm,object:ve,slice:jr,step:Sr,string:ve,"to-boolean":St,"to-color":St,"to-number":St,"to-string":St,var:Ri,within:gh,distance:md,"global-state":mA};class Il{constructor(u,d,b,S){this.name=u,this.type=d,this._evaluate=b,this.args=S}evaluate(u){return this._evaluate(u,this.args)}eachChild(u){this.args.forEach(u)}outputDefined(){return!1}static parse(u,d){const b=u[0],S=Il.definitions[b];if(!S)return d.error(`Unknown expression "${b}". If you wanted a literal array, use ["literal", [...]].`,0);const k=Array.isArray(S)?S[0]:S.type,D=Array.isArray(S)?[[S[1],S[2]]]:S.overloads,K=D.filter((([ee])=>!Array.isArray(ee)||ee.length===u.length-1));let W=null;for(const[ee,re]of K){W=new xi(d.registry,Vl,d.path,null,d.scope);const he=[];let Oe=!1;for(let De=1;De<u.length;De++){const Ke=u[De],Ge=Array.isArray(ee)?ee[De-1]:ee.type,Ve=W.parse(Ke,1+he.length,Ge);if(!Ve){Oe=!0;break}he.push(Ve)}if(!Oe)if(Array.isArray(ee)&&ee.length!==he.length)W.error(`Expected ${ee.length} arguments, but found ${he.length} instead.`);else{for(let De=0;De<he.length;De++){const Ke=Array.isArray(ee)?ee[De]:ee.type,Ge=he[De];W.concat(De+1).checkSubtype(Ke,Ge.type)}if(W.errors.length===0)return new Il(b,k,re,he)}}if(K.length===1)d.errors.push(...W.errors);else{const ee=(K.length?K:D).map((([he])=>{return Oe=he,Array.isArray(Oe)?`(${Oe.map(xr).join(", ")})`:`(${xr(Oe.type)}...)`;var Oe})).join(" | "),re=[];for(let he=1;he<u.length;he++){const Oe=d.parse(u[he],1+re.length);if(!Oe)return null;re.push(xr(Oe.type))}d.error(`Expected arguments of type ${ee}, but found (${re.join(", ")}) instead.`)}return null}static register(u,d){Il.definitions=d;for(const b in d)u[b]=Il}}function Eo(f,[u,d,b,S]){u=u.evaluate(f),d=d.evaluate(f),b=b.evaluate(f);const k=S?S.evaluate(f):1,D=gr(u,d,b,k);if(D)throw new Mr(D);return new er(u/255,d/255,b/255,k,!1)}function cc(f,u){return f in u}function pp(f,u){const d=u[f];return d===void 0?null:d}function pa(f){return{type:f}}function Vl(f){if(f instanceof Ri)return Vl(f.boundExpression);if(f instanceof Il&&f.name==="error"||f instanceof Mm||f instanceof gh||f instanceof md||f instanceof mA)return!1;const u=f instanceof St||f instanceof ve;let d=!0;return f.eachChild((b=>{d=u?d&&Vl(b):d&&b instanceof wr})),!!d&&jA(f)&&yA(f,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function jA(f){if(f instanceof Il&&(f.name==="get"&&f.args.length===1||f.name==="feature-state"||f.name==="has"&&f.args.length===1||f.name==="properties"||f.name==="geometry-type"||f.name==="id"||/^filter-/.test(f.name))||f instanceof gh||f instanceof md)return!1;let u=!0;return f.eachChild((d=>{u&&!jA(d)&&(u=!1)})),u}function gd(f){if(f instanceof Il&&f.name==="feature-state")return!1;let u=!0;return f.eachChild((d=>{u&&!gd(d)&&(u=!1)})),u}function yA(f,u){if(f instanceof Il&&u.indexOf(f.name)>=0)return!1;let d=!0;return f.eachChild((b=>{d&&!yA(b,u)&&(d=!1)})),d}function Ac(f){return{result:"success",value:f}}function qc(f){return{result:"error",value:f}}function pu(f){return f["property-type"]==="data-driven"||f["property-type"]==="cross-faded-data-driven"}function pf(f){return!!f.expression&&f.expression.parameters.indexOf("zoom")>-1}function yd(f){return!!f.expression&&f.expression.interpolated}function fr(f){return f instanceof Number?"number":f instanceof String?"string":f instanceof Boolean?"boolean":Array.isArray(f)?"array":f===null?"null":typeof f}function Ch(f){return typeof f=="object"&&f!==null&&!Array.isArray(f)&&Si(f)===lo}function mu(f){return f}function _h(f,u){const d=f.stops&&typeof f.stops[0][0]=="object",b=d||!(d||f.property!==void 0),S=f.type||(yd(u)?"exponential":"interval"),k=(function(re){switch(re.type){case"color":return er.parse;case"padding":return ls.parse;case"numberArray":return No.parse;case"colorArray":return Go.parse;default:return null}})(u);if(k&&((f=qr({},f)).stops&&(f.stops=f.stops.map((re=>[re[0],k(re[1])]))),f.default=k(f.default?f.default:u.default)),f.colorSpace&&(D=f.colorSpace)!=="rgb"&&D!=="hcl"&&D!=="lab")throw new Error(`Unknown color space: "${f.colorSpace}"`);var D;const K=(function(re){switch(re){case"exponential":return xh;case"interval":return Bm;case"categorical":return mf;case"identity":return e0;default:throw new Error(`Unknown function type "${re}"`)}})(S);let W,ee;if(S==="categorical"){W=Object.create(null);for(const re of f.stops)W[re[0]]=re[1];ee=typeof f.stops[0][0]}if(d){const re={},he=[];for(let Ke=0;Ke<f.stops.length;Ke++){const Ge=f.stops[Ke],Ve=Ge[0].zoom;re[Ve]===void 0&&(re[Ve]={zoom:Ve,type:f.type,property:f.property,default:f.default,stops:[]},he.push(Ve)),re[Ve].stops.push([Ge[0].value,Ge[1]])}const Oe=[];for(const Ke of he)Oe.push([re[Ke].zoom,_h(re[Ke],u)]);const De={name:"linear"};return{kind:"composite",interpolationType:De,interpolationFactor:ts.interpolationFactor.bind(void 0,De),zoomStops:Oe.map((Ke=>Ke[0])),evaluate:({zoom:Ke},Ge)=>xh({stops:Oe,base:f.base},u,Ke).evaluate(Ke,Ge)}}if(b){const re=S==="exponential"?{name:"exponential",base:f.base!==void 0?f.base:1}:null;return{kind:"camera",interpolationType:re,interpolationFactor:ts.interpolationFactor.bind(void 0,re),zoomStops:f.stops.map((he=>he[0])),evaluate:({zoom:he})=>K(f,u,he,W,ee)}}return{kind:"source",evaluate(re,he){const Oe=he&&he.properties?he.properties[f.property]:void 0;return Oe===void 0?oa(f.default,u.default):K(f,u,Oe,W,ee)}}}function oa(f,u,d){return f!==void 0?f:u!==void 0?u:d!==void 0?d:void 0}function mf(f,u,d,b,S){return oa(typeof d===S?b[d]:void 0,f.default,u.default)}function Bm(f,u,d){if(fr(d)!=="number")return oa(f.default,u.default);const b=f.stops.length;if(b===1||d<=f.stops[0][0])return f.stops[0][1];if(d>=f.stops[b-1][0])return f.stops[b-1][1];const S=Cs(f.stops.map((k=>k[0])),d);return f.stops[S][1]}function xh(f,u,d){const b=f.base!==void 0?f.base:1;if(fr(d)!=="number")return oa(f.default,u.default);const S=f.stops.length;if(S===1||d<=f.stops[0][0])return f.stops[0][1];if(d>=f.stops[S-1][0])return f.stops[S-1][1];const k=Cs(f.stops.map((re=>re[0])),d),D=(function(re,he,Oe,De){const Ke=De-Oe,Ge=re-Oe;return Ke===0?0:he===1?Ge/Ke:(Math.pow(he,Ge)-1)/(Math.pow(he,Ke)-1)})(d,b,f.stops[k][0],f.stops[k+1][0]),K=f.stops[k][1],W=f.stops[k+1][1],ee=Gc[u.type]||mu;return typeof K.evaluate=="function"?{evaluate(...re){const he=K.evaluate.apply(void 0,re),Oe=W.evaluate.apply(void 0,re);if(he!==void 0&&Oe!==void 0)return ee(he,Oe,D,f.colorSpace)}}:ee(K,W,D,f.colorSpace)}function e0(f,u,d){switch(u.type){case"color":d=er.parse(d);break;case"formatted":d=es.fromString(d.toString());break;case"resolvedImage":d=bs.fromString(d.toString());break;case"padding":d=ls.parse(d);break;case"colorArray":d=Go.parse(d);break;case"numberArray":d=No.parse(d);break;default:fr(d)===u.type||u.type==="enum"&&u.values[d]||(d=void 0)}return oa(d,f.default,u.default)}Il.register(gA,{error:[{kind:"error"},[Gi],(f,[u])=>{throw new Mr(u.evaluate(f))}],typeof:[Gi,[Fi],(f,[u])=>xr(Si(u.evaluate(f)))],"to-rgba":[ta(Pn,4),[Xi],(f,[u])=>{const[d,b,S,k]=u.evaluate(f).rgb;return[255*d,255*b,255*S,k]}],rgb:[Xi,[Pn,Pn,Pn],Eo],rgba:[Xi,[Pn,Pn,Pn,Pn],Eo],has:{type:Li,overloads:[[[Gi],(f,[u])=>cc(u.evaluate(f),f.properties())],[[Gi,lo],(f,[u,d])=>cc(u.evaluate(f),d.evaluate(f))]]},get:{type:Fi,overloads:[[[Gi],(f,[u])=>pp(u.evaluate(f),f.properties())],[[Gi,lo],(f,[u,d])=>pp(u.evaluate(f),d.evaluate(f))]]},"feature-state":[Fi,[Gi],(f,[u])=>pp(u.evaluate(f),f.featureState||{})],properties:[lo,[],f=>f.properties()],"geometry-type":[Gi,[],f=>f.geometryType()],id:[Fi,[],f=>f.id()],zoom:[Pn,[],f=>f.globals.zoom],"heatmap-density":[Pn,[],f=>f.globals.heatmapDensity||0],elevation:[Pn,[],f=>f.globals.elevation||0],"line-progress":[Pn,[],f=>f.globals.lineProgress||0],accumulated:[Fi,[],f=>f.globals.accumulated===void 0?null:f.globals.accumulated],"+":[Pn,pa(Pn),(f,u)=>{let d=0;for(const b of u)d+=b.evaluate(f);return d}],"*":[Pn,pa(Pn),(f,u)=>{let d=1;for(const b of u)d*=b.evaluate(f);return d}],"-":{type:Pn,overloads:[[[Pn,Pn],(f,[u,d])=>u.evaluate(f)-d.evaluate(f)],[[Pn],(f,[u])=>-u.evaluate(f)]]},"/":[Pn,[Pn,Pn],(f,[u,d])=>u.evaluate(f)/d.evaluate(f)],"%":[Pn,[Pn,Pn],(f,[u,d])=>u.evaluate(f)%d.evaluate(f)],ln2:[Pn,[],()=>Math.LN2],pi:[Pn,[],()=>Math.PI],e:[Pn,[],()=>Math.E],"^":[Pn,[Pn,Pn],(f,[u,d])=>Math.pow(u.evaluate(f),d.evaluate(f))],sqrt:[Pn,[Pn],(f,[u])=>Math.sqrt(u.evaluate(f))],log10:[Pn,[Pn],(f,[u])=>Math.log(u.evaluate(f))/Math.LN10],ln:[Pn,[Pn],(f,[u])=>Math.log(u.evaluate(f))],log2:[Pn,[Pn],(f,[u])=>Math.log(u.evaluate(f))/Math.LN2],sin:[Pn,[Pn],(f,[u])=>Math.sin(u.evaluate(f))],cos:[Pn,[Pn],(f,[u])=>Math.cos(u.evaluate(f))],tan:[Pn,[Pn],(f,[u])=>Math.tan(u.evaluate(f))],asin:[Pn,[Pn],(f,[u])=>Math.asin(u.evaluate(f))],acos:[Pn,[Pn],(f,[u])=>Math.acos(u.evaluate(f))],atan:[Pn,[Pn],(f,[u])=>Math.atan(u.evaluate(f))],min:[Pn,pa(Pn),(f,u)=>Math.min(...u.map((d=>d.evaluate(f))))],max:[Pn,pa(Pn),(f,u)=>Math.max(...u.map((d=>d.evaluate(f))))],abs:[Pn,[Pn],(f,[u])=>Math.abs(u.evaluate(f))],round:[Pn,[Pn],(f,[u])=>{const d=u.evaluate(f);return d<0?-Math.round(-d):Math.round(d)}],floor:[Pn,[Pn],(f,[u])=>Math.floor(u.evaluate(f))],ceil:[Pn,[Pn],(f,[u])=>Math.ceil(u.evaluate(f))],"filter-==":[Li,[Gi,Fi],(f,[u,d])=>f.properties()[u.value]===d.value],"filter-id-==":[Li,[Fi],(f,[u])=>f.id()===u.value],"filter-type-==":[Li,[Gi],(f,[u])=>f.geometryType()===u.value],"filter-<":[Li,[Gi,Fi],(f,[u,d])=>{const b=f.properties()[u.value],S=d.value;return typeof b==typeof S&&b<S}],"filter-id-<":[Li,[Fi],(f,[u])=>{const d=f.id(),b=u.value;return typeof d==typeof b&&d<b}],"filter->":[Li,[Gi,Fi],(f,[u,d])=>{const b=f.properties()[u.value],S=d.value;return typeof b==typeof S&&b>S}],"filter-id->":[Li,[Fi],(f,[u])=>{const d=f.id(),b=u.value;return typeof d==typeof b&&d>b}],"filter-<=":[Li,[Gi,Fi],(f,[u,d])=>{const b=f.properties()[u.value],S=d.value;return typeof b==typeof S&&b<=S}],"filter-id-<=":[Li,[Fi],(f,[u])=>{const d=f.id(),b=u.value;return typeof d==typeof b&&d<=b}],"filter->=":[Li,[Gi,Fi],(f,[u,d])=>{const b=f.properties()[u.value],S=d.value;return typeof b==typeof S&&b>=S}],"filter-id->=":[Li,[Fi],(f,[u])=>{const d=f.id(),b=u.value;return typeof d==typeof b&&d>=b}],"filter-has":[Li,[Fi],(f,[u])=>u.value in f.properties()],"filter-has-id":[Li,[],f=>f.id()!==null&&f.id()!==void 0],"filter-type-in":[Li,[ta(Gi)],(f,[u])=>u.value.indexOf(f.geometryType())>=0],"filter-id-in":[Li,[ta(Fi)],(f,[u])=>u.value.indexOf(f.id())>=0],"filter-in-small":[Li,[Gi,ta(Fi)],(f,[u,d])=>d.value.indexOf(f.properties()[u.value])>=0],"filter-in-large":[Li,[Gi,ta(Fi)],(f,[u,d])=>(function(b,S,k,D){for(;k<=D;){const K=k+D>>1;if(S[K]===b)return!0;S[K]>b?D=K-1:k=K+1}return!1})(f.properties()[u.value],d.value,0,d.value.length-1)],all:{type:Li,overloads:[[[Li,Li],(f,[u,d])=>u.evaluate(f)&&d.evaluate(f)],[pa(Li),(f,u)=>{for(const d of u)if(!d.evaluate(f))return!1;return!0}]]},any:{type:Li,overloads:[[[Li,Li],(f,[u,d])=>u.evaluate(f)||d.evaluate(f)],[pa(Li),(f,u)=>{for(const d of u)if(d.evaluate(f))return!0;return!1}]]},"!":[Li,[Li],(f,[u])=>!u.evaluate(f)],"is-supported-script":[Li,[Gi],(f,[u])=>{const d=f.globals&&f.globals.isSupportedScript;return!d||d(u.evaluate(f))}],upcase:[Gi,[Gi],(f,[u])=>u.evaluate(f).toUpperCase()],downcase:[Gi,[Gi],(f,[u])=>u.evaluate(f).toLowerCase()],concat:[Gi,pa(Fi),(f,u)=>u.map((d=>ti(d.evaluate(f)))).join("")],"resolved-locale":[Gi,[Cl],(f,[u])=>u.evaluate(f).resolvedLocale()]});class Mh{constructor(u,d,b){this.expression=u,this._warningHistory={},this._evaluator=new kn,this._defaultValue=d?(function(S){if(S.type==="color"&&Ch(S.default))return new er(0,0,0,0);switch(S.type){case"color":return er.parse(S.default)||null;case"padding":return ls.parse(S.default)||null;case"numberArray":return No.parse(S.default)||null;case"colorArray":return Go.parse(S.default)||null;case"variableAnchorOffsetCollection":return us.parse(S.default)||null;case"projectionDefinition":return Ro.parse(S.default)||null;default:return S.default===void 0?null:S.default}})(d):null,this._enumValues=d&&d.type==="enum"?d.values:null,this._globalState=b}evaluateWithoutErrorHandling(u,d,b,S,k,D){return this._globalState&&(u={...u,globalState:this._globalState}),this._evaluator.globals=u,this._evaluator.feature=d,this._evaluator.featureState=b,this._evaluator.canonical=S,this._evaluator.availableImages=k||null,this._evaluator.formattedSection=D,this.expression.evaluate(this._evaluator)}evaluate(u,d,b,S,k,D){this._globalState&&(u={...u,globalState:this._globalState}),this._evaluator.globals=u,this._evaluator.feature=d||null,this._evaluator.featureState=b||null,this._evaluator.canonical=S,this._evaluator.availableImages=k||null,this._evaluator.formattedSection=D||null;try{const K=this.expression.evaluate(this._evaluator);if(K==null||typeof K=="number"&&K!=K)return this._defaultValue;if(this._enumValues&&!(K in this._enumValues))throw new Mr(`Expected value to be one of ${Object.keys(this._enumValues).map((W=>JSON.stringify(W))).join(", ")}, but found ${JSON.stringify(K)} instead.`);return K}catch(K){return this._warningHistory[K.message]||(this._warningHistory[K.message]=!0,typeof console<"u"&&console.warn(K.message)),this._defaultValue}}}function hc(f){return Array.isArray(f)&&f.length>0&&typeof f[0]=="string"&&f[0]in gA}function dc(f,u,d){const b=new xi(gA,Vl,[],u?(function(k){const D={color:Xi,string:Gi,number:Pn,enum:Gi,boolean:Li,formatted:ra,padding:uo,numberArray:Fu,colorArray:Fa,projectionDefinition:Oa,resolvedImage:So,variableAnchorOffsetCollection:AA};return k.type==="array"?ta(D[k.value]||Fi,k.length):D[k.type]})(u):void 0),S=b.parse(f,void 0,void 0,void 0,u&&u.type==="string"?{typeAnnotation:"coerce"}:void 0);return S?Ac(new Mh(S,u,d)):qc(b.errors)}class wh{constructor(u,d,b){this.kind=u,this._styleExpression=d,this.isStateDependent=u!=="constant"&&!gd(d.expression),this.globalStateRefs=ns(d.expression),this._globalState=b}evaluateWithoutErrorHandling(u,d,b,S,k,D){return this._globalState&&(u={...u,globalState:this._globalState}),this._styleExpression.evaluateWithoutErrorHandling(u,d,b,S,k,D)}evaluate(u,d,b,S,k,D){return this._globalState&&(u={...u,globalState:this._globalState}),this._styleExpression.evaluate(u,d,b,S,k,D)}}class vd{constructor(u,d,b,S,k){this.kind=u,this.zoomStops=b,this._styleExpression=d,this.isStateDependent=u!=="camera"&&!gd(d.expression),this.globalStateRefs=ns(d.expression),this.interpolationType=S,this._globalState=k}evaluateWithoutErrorHandling(u,d,b,S,k,D){return this._globalState&&(u={...u,globalState:this._globalState}),this._styleExpression.evaluateWithoutErrorHandling(u,d,b,S,k,D)}evaluate(u,d,b,S,k,D){return this._globalState&&(u={...u,globalState:this._globalState}),this._styleExpression.evaluate(u,d,b,S,k,D)}interpolationFactor(u,d,b){return this.interpolationType?ts.interpolationFactor(this.interpolationType,u,d,b):0}}function Nu(f,u,d){const b=dc(f,u,d);if(b.result==="error")return b;const S=b.value.expression,k=jA(S);if(!k&&!pu(u))return qc([new Di("","data expressions not supported")]);const D=yA(S,["zoom"]);if(!D&&!pf(u))return qc([new Di("","zoom expressions not supported")]);const K=Wo(S);return K||D?K instanceof Di?qc([K]):K instanceof ts&&!yd(u)?qc([new Di("",'"interpolate" expressions cannot be used with this property')]):Ac(K?new vd(k?"camera":"composite",b.value,K.labels,K instanceof ts?K.interpolation:void 0,d):new wh(k?"constant":"source",b.value,d)):qc([new Di("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class kl{constructor(u,d){this._parameters=u,this._specification=d,qr(this,_h(this._parameters,this._specification))}static deserialize(u){return new kl(u._parameters,u._specification)}static serialize(u){return{_parameters:u._parameters,_specification:u._specification}}}function Wo(f){let u=null;if(f instanceof Ki)u=Wo(f.result);else if(f instanceof du){for(const d of f.args)if(u=Wo(d),u)break}else(f instanceof Sr||f instanceof ts)&&f.input instanceof Il&&f.input.name==="zoom"&&(u=f);return u instanceof Di||f.eachChild((d=>{const b=Wo(d);b instanceof Di?u=b:!u&&b?u=new Di("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):u&&b&&u!==b&&(u=new Di("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),u}function ns(f,u=new Set){return f instanceof mA&&u.add(f.key),f.eachChild((d=>{ns(d,u)})),u}function fc(f){if(f===!0||f===!1)return!0;if(!Array.isArray(f)||f.length===0)return!1;switch(f[0]){case"has":return f.length>=2&&f[1]!=="$id"&&f[1]!=="$type";case"in":return f.length>=3&&(typeof f[1]!="string"||Array.isArray(f[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return f.length!==3||Array.isArray(f[1])||Array.isArray(f[2]);case"any":case"all":for(const u of f.slice(1))if(!fc(u)&&typeof u!="boolean")return!1;return!0;default:return!0}}const NA={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function GA(f,u){if(f==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};fc(f)||(f=Is(f));const d=dc(f,NA,u);if(d.result==="error")throw new Error(d.value.map((b=>`${b.key}: ${b.message}`)).join(", "));return{filter:(b,S,k)=>d.value.evaluate(b,S,{},k),needGeometry:Sh(f),getGlobalStateRefs:()=>ns(d.value.expression)}}function mp(f,u){return f<u?-1:f>u?1:0}function Sh(f){if(!Array.isArray(f))return!1;if(f[0]==="within"||f[0]==="distance")return!0;for(let u=1;u<f.length;u++)if(Sh(f[u]))return!0;return!1}function Is(f){if(!f)return!0;const u=f[0];return f.length<=1?u!=="any":u==="=="?_s(f[1],f[2],"=="):u==="!="?hl(_s(f[1],f[2],"==")):u==="<"||u===">"||u==="<="||u===">="?_s(f[1],f[2],u):u==="any"?(d=f.slice(1),["any"].concat(d.map(Is))):u==="all"?["all"].concat(f.slice(1).map(Is)):u==="none"?["all"].concat(f.slice(1).map(Is).map(hl)):u==="in"?Vr(f[1],f.slice(2)):u==="!in"?hl(Vr(f[1],f.slice(2))):u==="has"?pc(f[1]):u!=="!has"||hl(pc(f[1]));var d}function _s(f,u,d){switch(f){case"$type":return[`filter-type-${d}`,u];case"$id":return[`filter-id-${d}`,u];default:return[`filter-${d}`,f,u]}}function Vr(f,u){if(u.length===0)return!1;switch(f){case"$type":return["filter-type-in",["literal",u]];case"$id":return["filter-id-in",["literal",u]];default:return u.length>200&&!u.some((d=>typeof d!=typeof u[0]))?["filter-in-large",f,["literal",u.sort(mp)]]:["filter-in-small",f,["literal",u]]}}function pc(f){switch(f){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",f]}}function hl(f){return["!",f]}function Eh(f){const u=typeof f;if(u==="number"||u==="boolean"||u==="string"||f==null)return JSON.stringify(f);if(Array.isArray(f)){let S="[";for(const k of f)S+=`${Eh(k)},`;return`${S}]`}const d=Object.keys(f).sort();let b="{";for(let S=0;S<d.length;S++)b+=`${JSON.stringify(d[S])}:${Eh(f[d[S]])},`;return`${b}}`}function mc(f){let u="";for(const d of bn)u+=`/${Eh(f[d])}`;return u}function Im(f){const u=f.value;return u?[new on(f.key,u,"constants have been deprecated as of v8")]:[]}function Ws(f){return f instanceof Number||f instanceof String||f instanceof Boolean?f.valueOf():f}function gu(f){if(Array.isArray(f))return f.map(gu);if(f instanceof Object&&!(f instanceof Number||f instanceof String||f instanceof Boolean)){const u={};for(const d in f)u[d]=gu(f[d]);return u}return Ws(f)}function Tl(f){const u=f.key,d=f.value,b=f.valueSpec||{},S=f.objectElementValidators||{},k=f.style,D=f.styleSpec,K=f.validateSpec;let W=[];const ee=fr(d);if(ee!=="object")return[new on(u,d,`object expected, ${ee} found`)];for(const re in d){const he=re.split(".")[0],Oe=Ia(b,he)||b["*"];let De;if(Ia(S,he))De=S[he];else if(Ia(b,he))De=K;else if(S["*"])De=S["*"];else{if(!b["*"]){W.push(new on(u,d[re],`unknown property "${re}"`));continue}De=K}W=W.concat(De({key:(u&&`${u}.`)+re,value:d[re],valueSpec:Oe,style:k,styleSpec:D,object:d,objectKey:re,validateSpec:K},d))}for(const re in b)S[re]||b[re].required&&b[re].default===void 0&&d[re]===void 0&&W.push(new on(u,d,`missing required property "${re}"`));return W}function gp(f){const u=f.value,d=f.valueSpec,b=f.style,S=f.styleSpec,k=f.key,D=f.arrayElementValidator||f.validateSpec;if(fr(u)!=="array")return[new on(k,u,`array expected, ${fr(u)} found`)];if(d.length&&u.length!==d.length)return[new on(k,u,`array length ${d.length} expected, length ${u.length} found`)];if(d["min-length"]&&u.length<d["min-length"])return[new on(k,u,`array length at least ${d["min-length"]} expected, length ${u.length} found`)];let K={type:d.value,values:d.values};S.$version<7&&(K.function=d.function),fr(d.value)==="object"&&(K=d.value);let W=[];for(let ee=0;ee<u.length;ee++)W=W.concat(D({array:u,arrayIndex:ee,value:u[ee],valueSpec:K,validateSpec:f.validateSpec,style:b,styleSpec:S,key:`${k}[${ee}]`}));return W}function gc(f){const u=f.key,d=f.value,b=f.valueSpec;let S=fr(d);return S==="number"&&d!=d&&(S="NaN"),S!=="number"?[new on(u,d,`number expected, ${S} found`)]:"minimum"in b&&d<b.minimum?[new on(u,d,`${d} is less than the minimum value ${b.minimum}`)]:"maximum"in b&&d>b.maximum?[new on(u,d,`${d} is greater than the maximum value ${b.maximum}`)]:[]}function Oh(f){const u=f.valueSpec,d=Ws(f.value.type);let b,S,k,D={};const K=d!=="categorical"&&f.value.property===void 0,W=!K,ee=fr(f.value.stops)==="array"&&fr(f.value.stops[0])==="array"&&fr(f.value.stops[0][0])==="object",re=Tl({key:f.key,value:f.value,valueSpec:f.styleSpec.function,validateSpec:f.validateSpec,style:f.style,styleSpec:f.styleSpec,objectElementValidators:{stops:function(De){if(d==="identity")return[new on(De.key,De.value,'identity function may not have a "stops" property')];let Ke=[];const Ge=De.value;return Ke=Ke.concat(gp({key:De.key,value:Ge,valueSpec:De.valueSpec,validateSpec:De.validateSpec,style:De.style,styleSpec:De.styleSpec,arrayElementValidator:he})),fr(Ge)==="array"&&Ge.length===0&&Ke.push(new on(De.key,Ge,"array must have at least one stop")),Ke},default:function(De){return De.validateSpec({key:De.key,value:De.value,valueSpec:u,validateSpec:De.validateSpec,style:De.style,styleSpec:De.styleSpec})}}});return d==="identity"&&K&&re.push(new on(f.key,f.value,'missing required property "property"')),d==="identity"||f.value.stops||re.push(new on(f.key,f.value,'missing required property "stops"')),d==="exponential"&&f.valueSpec.expression&&!yd(f.valueSpec)&&re.push(new on(f.key,f.value,"exponential functions not supported")),f.styleSpec.$version>=8&&(W&&!pu(f.valueSpec)?re.push(new on(f.key,f.value,"property functions not supported")):K&&!pf(f.valueSpec)&&re.push(new on(f.key,f.value,"zoom functions not supported"))),d!=="categorical"&&!ee||f.value.property!==void 0||re.push(new on(f.key,f.value,'"property" property is required')),re;function he(De){let Ke=[];const Ge=De.value,Ve=De.key;if(fr(Ge)!=="array")return[new on(Ve,Ge,`array expected, ${fr(Ge)} found`)];if(Ge.length!==2)return[new on(Ve,Ge,`array length 2 expected, length ${Ge.length} found`)];if(ee){if(fr(Ge[0])!=="object")return[new on(Ve,Ge,`object expected, ${fr(Ge[0])} found`)];if(Ge[0].zoom===void 0)return[new on(Ve,Ge,"object stop key must have zoom")];if(Ge[0].value===void 0)return[new on(Ve,Ge,"object stop key must have value")];if(k&&k>Ws(Ge[0].zoom))return[new on(Ve,Ge[0].zoom,"stop zoom values must appear in ascending order")];Ws(Ge[0].zoom)!==k&&(k=Ws(Ge[0].zoom),S=void 0,D={}),Ke=Ke.concat(Tl({key:`${Ve}[0]`,value:Ge[0],valueSpec:{zoom:{}},validateSpec:De.validateSpec,style:De.style,styleSpec:De.styleSpec,objectElementValidators:{zoom:gc,value:Oe}}))}else Ke=Ke.concat(Oe({key:`${Ve}[0]`,value:Ge[0],validateSpec:De.validateSpec,style:De.style,styleSpec:De.styleSpec},Ge));return hc(gu(Ge[1]))?Ke.concat([new on(`${Ve}[1]`,Ge[1],"expressions are not allowed in function stops.")]):Ke.concat(De.validateSpec({key:`${Ve}[1]`,value:Ge[1],valueSpec:u,validateSpec:De.validateSpec,style:De.style,styleSpec:De.styleSpec}))}function Oe(De,Ke){const Ge=fr(De.value),Ve=Ws(De.value),at=De.value!==null?De.value:Ke;if(b){if(Ge!==b)return[new on(De.key,at,`${Ge} stop domain type must match previous stop domain type ${b}`)]}else b=Ge;if(Ge!=="number"&&Ge!=="string"&&Ge!=="boolean")return[new on(De.key,at,"stop domain value must be a number, string, or boolean")];if(Ge!=="number"&&d!=="categorical"){let Tt=`number expected, ${Ge} found`;return pu(u)&&d===void 0&&(Tt+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new on(De.key,at,Tt)]}return d!=="categorical"||Ge!=="number"||isFinite(Ve)&&Math.floor(Ve)===Ve?d!=="categorical"&&Ge==="number"&&S!==void 0&&Ve<S?[new on(De.key,at,"stop domain values must appear in ascending order")]:(S=Ve,d==="categorical"&&Ve in D?[new on(De.key,at,"stop domain values must be unique")]:(D[Ve]=!0,[])):[new on(De.key,at,`integer expected, found ${Ve}`)]}}function yu(f){const u=(f.expressionContext==="property"?Nu:dc)(gu(f.value),f.valueSpec);if(u.result==="error")return u.value.map((b=>new on(`${f.key}${b.key}`,f.value,b.message)));const d=u.value.expression||u.value._styleExpression.expression;if(f.expressionContext==="property"&&f.propertyKey==="text-font"&&!d.outputDefined())return[new on(f.key,f.value,`Invalid data expression for "${f.propertyKey}". Output values must be contained as literals within the expression.`)];if(f.expressionContext==="property"&&f.propertyType==="layout"&&!gd(d))return[new on(f.key,f.value,'"feature-state" data expressions are not supported with layout properties.')];if(f.expressionContext==="filter"&&!gd(d))return[new on(f.key,f.value,'"feature-state" data expressions are not supported with filters.')];if(f.expressionContext&&f.expressionContext.indexOf("cluster")===0){if(!yA(d,["zoom","feature-state"]))return[new on(f.key,f.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(f.expressionContext==="cluster-initial"&&!jA(d))return[new on(f.key,f.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function qe(f){const u=f.key,d=f.value,b=fr(d);return b!=="string"?[new on(u,d,`color expected, ${b} found`)]:er.parse(String(d))?[]:[new on(u,d,`color expected, "${d}" found`)]}function ma(f){const u=f.key,d=f.value,b=f.valueSpec,S=[];return Array.isArray(b.values)?b.values.indexOf(Ws(d))===-1&&S.push(new on(u,d,`expected one of [${b.values.join(", ")}], ${JSON.stringify(d)} found`)):Object.keys(b.values).indexOf(Ws(d))===-1&&S.push(new on(u,d,`expected one of [${Object.keys(b.values).join(", ")}], ${JSON.stringify(d)} found`)),S}function vu(f){return fc(gu(f.value))?yu(qr({},f,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Hl(f)}function Hl(f){const u=f.value,d=f.key;if(fr(u)!=="array")return[new on(d,u,`array expected, ${fr(u)} found`)];const b=f.styleSpec;let S,k=[];if(u.length<1)return[new on(d,u,"filter array must have at least 1 element")];switch(k=k.concat(ma({key:`${d}[0]`,value:u[0],valueSpec:b.filter_operator,style:f.style,styleSpec:f.styleSpec})),Ws(u[0])){case"<":case"<=":case">":case">=":u.length>=2&&Ws(u[1])==="$type"&&k.push(new on(d,u,`"$type" cannot be use with operator "${u[0]}"`));case"==":case"!=":u.length!==3&&k.push(new on(d,u,`filter array for operator "${u[0]}" must have 3 elements`));case"in":case"!in":u.length>=2&&(S=fr(u[1]),S!=="string"&&k.push(new on(`${d}[1]`,u[1],`string expected, ${S} found`)));for(let D=2;D<u.length;D++)S=fr(u[D]),Ws(u[1])==="$type"?k=k.concat(ma({key:`${d}[${D}]`,value:u[D],valueSpec:b.geometry_type,style:f.style,styleSpec:f.styleSpec})):S!=="string"&&S!=="number"&&S!=="boolean"&&k.push(new on(`${d}[${D}]`,u[D],`string, number, or boolean expected, ${S} found`));break;case"any":case"all":case"none":for(let D=1;D<u.length;D++)k=k.concat(Hl({key:`${d}[${D}]`,value:u[D],style:f.style,styleSpec:f.styleSpec}));break;case"has":case"!has":S=fr(u[1]),u.length!==2?k.push(new on(d,u,`filter array for "${u[0]}" operator must have 2 elements`)):S!=="string"&&k.push(new on(`${d}[1]`,u[1],`string expected, ${S} found`))}return k}function Gr(f,u){const d=f.key,b=f.validateSpec,S=f.style,k=f.styleSpec,D=f.value,K=f.objectKey,W=k[`${u}_${f.layerType}`];if(!W)return[];const ee=K.match(/^(.*)-transition$/);if(u==="paint"&&ee&&W[ee[1]]&&W[ee[1]].transition)return b({key:d,value:D,valueSpec:k.transition,style:S,styleSpec:k});const re=f.valueSpec||W[K];if(!re)return[new on(d,D,`unknown property "${K}"`)];let he;if(fr(D)==="string"&&pu(re)&&!re.tokens&&(he=/^{([^}]+)}$/.exec(D)))return[new on(d,D,`"${K}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(he[1])} }\`.`)];const Oe=[];return f.layerType==="symbol"&&(K==="text-field"&&S&&!S.glyphs&&Oe.push(new on(d,D,'use of "text-field" requires a style "glyphs" property')),K==="text-font"&&Ch(gu(D))&&Ws(D.type)==="identity"&&Oe.push(new on(d,D,'"text-font" does not support identity functions'))),Oe.concat(b({key:f.key,value:D,valueSpec:re,style:S,styleSpec:k,expressionContext:"property",propertyType:u,propertyKey:K}))}function gf(f){return Gr(f,"paint")}function yp(f){return Gr(f,"layout")}function Bh(f){let u=[];const d=f.value,b=f.key,S=f.style,k=f.styleSpec;if(fr(d)!=="object")return[new on(b,d,`object expected, ${fr(d)} found`)];d.type||d.ref||u.push(new on(b,d,'either "type" or "ref" is required'));let D=Ws(d.type);const K=Ws(d.ref);if(d.id){const W=Ws(d.id);for(let ee=0;ee<f.arrayIndex;ee++){const re=S.layers[ee];Ws(re.id)===W&&u.push(new on(b,d.id,`duplicate layer id "${d.id}", previously used at line ${re.id.__line__}`))}}if("ref"in d){let W;["type","source","source-layer","filter","layout"].forEach((ee=>{ee in d&&u.push(new on(b,d[ee],`"${ee}" is prohibited for ref layers`))})),S.layers.forEach((ee=>{Ws(ee.id)===K&&(W=ee)})),W?W.ref?u.push(new on(b,d.ref,"ref cannot reference another ref layer")):D=Ws(W.type):u.push(new on(b,d.ref,`ref layer "${K}" not found`))}else if(D!=="background")if(d.source){const W=S.sources&&S.sources[d.source],ee=W&&Ws(W.type);W?ee==="vector"&&D==="raster"?u.push(new on(b,d.source,`layer "${d.id}" requires a raster source`)):ee!=="raster-dem"&&D==="hillshade"||ee!=="raster-dem"&&D==="color-relief"?u.push(new on(b,d.source,`layer "${d.id}" requires a raster-dem source`)):ee==="raster"&&D!=="raster"?u.push(new on(b,d.source,`layer "${d.id}" requires a vector source`)):ee!=="vector"||d["source-layer"]?ee==="raster-dem"&&D!=="hillshade"&&D!=="color-relief"?u.push(new on(b,d.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):D!=="line"||!d.paint||!d.paint["line-gradient"]||ee==="geojson"&&W.lineMetrics||u.push(new on(b,d,`layer "${d.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):u.push(new on(b,d,`layer "${d.id}" must specify a "source-layer"`)):u.push(new on(b,d.source,`source "${d.source}" not found`))}else u.push(new on(b,d,'missing required property "source"'));return u=u.concat(Tl({key:b,value:d,valueSpec:k.layer,style:f.style,styleSpec:f.styleSpec,validateSpec:f.validateSpec,objectElementValidators:{"*":()=>[],type:()=>f.validateSpec({key:`${b}.type`,value:d.type,valueSpec:k.layer.type,style:f.style,styleSpec:f.styleSpec,validateSpec:f.validateSpec,object:d,objectKey:"type"}),filter:vu,layout:W=>Tl({layer:d,key:W.key,value:W.value,style:W.style,styleSpec:W.styleSpec,validateSpec:W.validateSpec,objectElementValidators:{"*":ee=>yp(qr({layerType:D},ee))}}),paint:W=>Tl({layer:d,key:W.key,value:W.value,style:W.style,styleSpec:W.styleSpec,validateSpec:W.validateSpec,objectElementValidators:{"*":ee=>gf(qr({layerType:D},ee))}})}})),u}function Oo(f){const u=f.value,d=f.key,b=fr(u);return b!=="string"?[new on(d,u,`string expected, ${b} found`)]:[]}const WA={promoteId:function({key:f,value:u}){if(fr(u)==="string")return Oo({key:f,value:u});{const d=[];for(const b in u)d.push(...Oo({key:`${f}.${b}`,value:u[b]}));return d}}};function Zl(f){const u=f.value,d=f.key,b=f.styleSpec,S=f.style,k=f.validateSpec;if(!u.type)return[new on(d,u,'"type" is required')];const D=Ws(u.type);let K;switch(D){case"vector":case"raster":return K=Tl({key:d,value:u,valueSpec:b[`source_${D.replace("-","_")}`],style:f.style,styleSpec:b,objectElementValidators:WA,validateSpec:k}),K;case"raster-dem":return K=(function(W){var ee;const re=(ee=W.sourceName)!==null&&ee!==void 0?ee:"",he=W.value,Oe=W.styleSpec,De=Oe.source_raster_dem,Ke=W.style;let Ge=[];const Ve=fr(he);if(he===void 0)return Ge;if(Ve!=="object")return Ge.push(new on("source_raster_dem",he,`object expected, ${Ve} found`)),Ge;const at=Ws(he.encoding)==="custom",Tt=["redFactor","greenFactor","blueFactor","baseShift"],ft=W.value.encoding?`"${W.value.encoding}"`:"Default";for(const _t in he)!at&&Tt.includes(_t)?Ge.push(new on(_t,he[_t],`In "${re}": "${_t}" is only valid when "encoding" is set to "custom". ${ft} encoding found`)):De[_t]?Ge=Ge.concat(W.validateSpec({key:_t,value:he[_t],valueSpec:De[_t],validateSpec:W.validateSpec,style:Ke,styleSpec:Oe})):Ge.push(new on(_t,he[_t],`unknown property "${_t}"`));return Ge})({sourceName:d,value:u,style:f.style,styleSpec:b,validateSpec:k}),K;case"geojson":if(K=Tl({key:d,value:u,valueSpec:b.source_geojson,style:S,styleSpec:b,validateSpec:k,objectElementValidators:WA}),u.cluster)for(const W in u.clusterProperties){const[ee,re]=u.clusterProperties[W],he=typeof ee=="string"?[ee,["accumulated"],["get",W]]:ee;K.push(...yu({key:`${d}.${W}.map`,value:re,expressionContext:"cluster-map"})),K.push(...yu({key:`${d}.${W}.reduce`,value:he,expressionContext:"cluster-reduce"}))}return K;case"video":return Tl({key:d,value:u,valueSpec:b.source_video,style:S,validateSpec:k,styleSpec:b});case"image":return Tl({key:d,value:u,valueSpec:b.source_image,style:S,validateSpec:k,styleSpec:b});case"canvas":return[new on(d,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ma({key:`${d}.type`,value:u.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function yf(f){const u=f.value,d=f.styleSpec,b=d.light,S=f.style;let k=[];const D=fr(u);if(u===void 0)return k;if(D!=="object")return k=k.concat([new on("light",u,`object expected, ${D} found`)]),k;for(const K in u){const W=K.match(/^(.*)-transition$/);k=k.concat(W&&b[W[1]]&&b[W[1]].transition?f.validateSpec({key:K,value:u[K],valueSpec:d.transition,validateSpec:f.validateSpec,style:S,styleSpec:d}):b[K]?f.validateSpec({key:K,value:u[K],valueSpec:b[K],validateSpec:f.validateSpec,style:S,styleSpec:d}):[new on(K,u[K],`unknown property "${K}"`)])}return k}function t0(f){const u=f.value,d=f.styleSpec,b=d.sky,S=f.style,k=fr(u);if(u===void 0)return[];if(k!=="object")return[new on("sky",u,`object expected, ${k} found`)];let D=[];for(const K in u)D=D.concat(b[K]?f.validateSpec({key:K,value:u[K],valueSpec:b[K],style:S,styleSpec:d}):[new on(K,u[K],`unknown property "${K}"`)]);return D}function f1(f){const u=f.value,d=f.styleSpec,b=d.terrain,S=f.style;let k=[];const D=fr(u);if(u===void 0)return k;if(D!=="object")return k=k.concat([new on("terrain",u,`object expected, ${D} found`)]),k;for(const K in u)k=k.concat(b[K]?f.validateSpec({key:K,value:u[K],valueSpec:b[K],validateSpec:f.validateSpec,style:S,styleSpec:d}):[new on(K,u[K],`unknown property "${K}"`)]);return k}function is(f){let u=[];const d=f.value,b=f.key;if(Array.isArray(d)){const S=[],k=[];for(const D in d)d[D].id&&S.includes(d[D].id)&&u.push(new on(b,d,`all the sprites' ids must be unique, but ${d[D].id} is duplicated`)),S.push(d[D].id),d[D].url&&k.includes(d[D].url)&&u.push(new on(b,d,`all the sprites' URLs must be unique, but ${d[D].url} is duplicated`)),k.push(d[D].url),u=u.concat(Tl({key:`${b}[${D}]`,value:d[D],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:f.validateSpec}));return u}return Oo({key:b,value:d})}function Ih(f){return u=f.value,u&&u.constructor===Object?[]:[new on(f.key,f.value,`object expected, ${fr(f.value)} found`)];var u}const bd={"*":()=>[],array:gp,boolean:function(f){const u=f.value,d=f.key,b=fr(u);return b!=="boolean"?[new on(d,u,`boolean expected, ${b} found`)]:[]},number:gc,color:qe,constants:Im,enum:ma,filter:vu,function:Oh,layer:Bh,object:Tl,source:Zl,light:yf,sky:t0,terrain:f1,projection:function(f){const u=f.value,d=f.styleSpec,b=d.projection,S=f.style,k=fr(u);if(u===void 0)return[];if(k!=="object")return[new on("projection",u,`object expected, ${k} found`)];let D=[];for(const K in u)D=D.concat(b[K]?f.validateSpec({key:K,value:u[K],valueSpec:b[K],style:S,styleSpec:d}):[new on(K,u[K],`unknown property "${K}"`)]);return D},projectionDefinition:function(f){const u=f.key;let d=f.value;d=d instanceof String?d.valueOf():d;const b=fr(d);return b!=="array"||(function(S){return Array.isArray(S)&&S.length===3&&typeof S[0]=="string"&&typeof S[1]=="string"&&typeof S[2]=="number"})(d)||(function(S){return!!["interpolate","step","literal"].includes(S[0])})(d)?["array","string"].includes(b)?[]:[new on(u,d,`projection expected, invalid type "${b}" found`)]:[new on(u,d,`projection expected, invalid array ${JSON.stringify(d)} found`)]},string:Oo,formatted:function(f){return Oo(f).length===0?[]:yu(f)},resolvedImage:function(f){return Oo(f).length===0?[]:yu(f)},padding:function(f){const u=f.key,d=f.value;if(fr(d)==="array"){if(d.length<1||d.length>4)return[new on(u,d,`padding requires 1 to 4 values; ${d.length} values found`)];const b={type:"number"};let S=[];for(let k=0;k<d.length;k++)S=S.concat(f.validateSpec({key:`${u}[${k}]`,value:d[k],validateSpec:f.validateSpec,valueSpec:b}));return S}return gc({key:u,value:d,valueSpec:{}})},numberArray:function(f){const u=f.key,d=f.value;if(fr(d)==="array"){const b={type:"number"};if(d.length<1)return[new on(u,d,"array length at least 1 expected, length 0 found")];let S=[];for(let k=0;k<d.length;k++)S=S.concat(f.validateSpec({key:`${u}[${k}]`,value:d[k],validateSpec:f.validateSpec,valueSpec:b}));return S}return gc({key:u,value:d,valueSpec:{}})},colorArray:function(f){const u=f.key,d=f.value;if(fr(d)==="array"){if(d.length<1)return[new on(u,d,"array length at least 1 expected, length 0 found")];let b=[];for(let S=0;S<d.length;S++)b=b.concat(qe({key:`${u}[${S}]`,value:d[S]}));return b}return qe({key:u,value:d})},variableAnchorOffsetCollection:function(f){const u=f.key,d=f.value,b=fr(d),S=f.styleSpec;if(b!=="array"||d.length<1||d.length%2!=0)return[new on(u,d,"variableAnchorOffsetCollection requires a non-empty array of even length")];let k=[];for(let D=0;D<d.length;D+=2)k=k.concat(ma({key:`${u}[${D}]`,value:d[D],valueSpec:S.layout_symbol["text-anchor"]})),k=k.concat(gp({key:`${u}[${D+1}]`,value:d[D+1],valueSpec:{length:2,value:"number"},validateSpec:f.validateSpec,style:f.style,styleSpec:S}));return k},sprite:is,state:Ih};function vA(f){const u=f.value,d=f.valueSpec,b=f.styleSpec;return f.validateSpec=vA,d.expression&&Ch(Ws(u))?Oh(f):d.expression&&hc(gu(u))?yu(f):d.type&&bd[d.type]?bd[d.type](f):Tl(qr({},f,{valueSpec:d.type?b[d.type]:d}))}function km(f){const u=f.value,d=f.key,b=Oo(f);return b.length||(u.indexOf("{fontstack}")===-1&&b.push(new on(d,u,'"glyphs" url must include a "{fontstack}" token')),u.indexOf("{range}")===-1&&b.push(new on(d,u,'"glyphs" url must include a "{range}" token'))),b}function ja(f,u=ot){let d=[];return d=d.concat(vA({key:"",value:f,valueSpec:u.$root,styleSpec:u,style:f,validateSpec:vA,objectElementValidators:{glyphs:km,"*":()=>[]}})),f.constants&&(d=d.concat(Im({key:"constants",value:f.constants}))),vf(d)}function Qs(f){return function(u){return f({...u,validateSpec:vA})}}function vf(f){return[].concat(f).sort(((u,d)=>u.line-d.line))}function yc(f){return function(...u){return vf(f.apply(this,u))}}ja.source=yc(Qs(Zl)),ja.sprite=yc(Qs(is)),ja.glyphs=yc(Qs(km)),ja.light=yc(Qs(yf)),ja.sky=yc(Qs(t0)),ja.terrain=yc(Qs(f1)),ja.state=yc(Qs(Ih)),ja.layer=yc(Qs(Bh)),ja.filter=yc(Qs(vu)),ja.paintProperty=yc(Qs(gf)),ja.layoutProperty=yc(Qs(yp));const bf=ja,p1=bf.light,Yc=bf.sky,QA=bf.paintProperty,Tm=bf.layoutProperty;function Cf(f,u){let d=!1;if(u&&u.length)for(const b of u)f.fire(new Mt(new Error(b.message))),d=!0;return d}class Na{constructor(u,d,b){const S=this.cells=[];if(u instanceof ArrayBuffer){this.arrayBuffer=u;const D=new Int32Array(this.arrayBuffer);u=D[0],this.d=(d=D[1])+2*(b=D[2]);for(let W=0;W<this.d*this.d;W++){const ee=D[3+W],re=D[3+W+1];S.push(ee===re?null:D.subarray(ee,re))}const K=D[3+S.length+1];this.keys=D.subarray(D[3+S.length],K),this.bboxes=D.subarray(K),this.insert=this._insertReadonly}else{this.d=d+2*b;for(let D=0;D<this.d*this.d;D++)S.push([]);this.keys=[],this.bboxes=[]}this.n=d,this.extent=u,this.padding=b,this.scale=d/u,this.uid=0;const k=b/d*u;this.min=-k,this.max=u+k}insert(u,d,b,S,k){this._forEachCell(d,b,S,k,this._insertCell,this.uid++,void 0,void 0),this.keys.push(u),this.bboxes.push(d),this.bboxes.push(b),this.bboxes.push(S),this.bboxes.push(k)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(u,d,b,S,k,D){this.cells[k].push(D)}query(u,d,b,S,k){const D=this.min,K=this.max;if(u<=D&&d<=D&&K<=b&&K<=S&&!k)return Array.prototype.slice.call(this.keys);{const W=[];return this._forEachCell(u,d,b,S,this._queryCell,W,{},k),W}}_queryCell(u,d,b,S,k,D,K,W){const ee=this.cells[k];if(ee!==null){const re=this.keys,he=this.bboxes;for(let Oe=0;Oe<ee.length;Oe++){const De=ee[Oe];if(K[De]===void 0){const Ke=4*De;(W?W(he[Ke+0],he[Ke+1],he[Ke+2],he[Ke+3]):u<=he[Ke+2]&&d<=he[Ke+3]&&b>=he[Ke+0]&&S>=he[Ke+1])?(K[De]=!0,D.push(re[De])):K[De]=!1}}}}_forEachCell(u,d,b,S,k,D,K,W){const ee=this._convertToCellCoord(u),re=this._convertToCellCoord(d),he=this._convertToCellCoord(b),Oe=this._convertToCellCoord(S);for(let De=ee;De<=he;De++)for(let Ke=re;Ke<=Oe;Ke++){const Ge=this.d*Ke+De;if((!W||W(this._convertFromCellCoord(De),this._convertFromCellCoord(Ke),this._convertFromCellCoord(De+1),this._convertFromCellCoord(Ke+1)))&&k.call(this,u,d,b,S,Ge,D,K,W))return}}_convertFromCellCoord(u){return(u-this.padding)/this.scale}_convertToCellCoord(u){return Math.max(0,Math.min(this.d-1,Math.floor(u*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const u=this.cells,d=3+this.cells.length+1+1;let b=0;for(let D=0;D<this.cells.length;D++)b+=this.cells[D].length;const S=new Int32Array(d+b+this.keys.length+this.bboxes.length);S[0]=this.extent,S[1]=this.n,S[2]=this.padding;let k=d;for(let D=0;D<u.length;D++){const K=u[D];S[3+D]=k,S.set(K,k),k+=K.length}return S[3+u.length]=k,S.set(this.keys,k),k+=this.keys.length,S[3+u.length+1]=k,S.set(this.bboxes,k),k+=this.bboxes.length,S.buffer}static serialize(u,d){const b=u.toArrayBuffer();return d&&d.push(b),{buffer:b}}static deserialize(u){return new Na(u.buffer)}}const vc={};function Xn(f,u,d={}){if(vc[f])throw new Error(`${f} is already registered.`);Object.defineProperty(u,"_classRegistryKey",{value:f,writeable:!1}),vc[f]={klass:u,omit:d.omit||[],shallow:d.shallow||[]}}Xn("Object",Object),Xn("Set",Set),Xn("TransferableGridIndex",Na),Xn("Color",er),Xn("Error",Error),Xn("AJAXError",Ue),Xn("ResolvedImage",bs),Xn("StylePropertyFunction",kl),Xn("StyleExpression",Mh,{omit:["_evaluator"]}),Xn("ZoomDependentExpression",vd),Xn("ZoomConstantExpression",wh),Xn("CompoundExpression",Il,{omit:["_evaluate"]});for(const f in gA)gA[f]._classRegistryKey||Xn(`Expression_${f}`,gA[f]);function vp(f){return f&&typeof ArrayBuffer<"u"&&(f instanceof ArrayBuffer||f.constructor&&f.constructor.name==="ArrayBuffer")}function bp(f){return f.$name||f.constructor._classRegistryKey}function _f(f){return!(function(u){if(u===null||typeof u!="object")return!1;const d=bp(u);return!(!d||d==="Object")})(f)&&(f==null||typeof f=="boolean"||typeof f=="number"||typeof f=="string"||f instanceof Boolean||f instanceof Number||f instanceof String||f instanceof Date||f instanceof RegExp||f instanceof Blob||f instanceof Error||vp(f)||Rn(f)||ArrayBuffer.isView(f)||f instanceof ImageData)}function kh(f,u){if(_f(f))return(vp(f)||Rn(f))&&u&&u.push(f),ArrayBuffer.isView(f)&&u&&u.push(f.buffer),f instanceof ImageData&&u&&u.push(f.data.buffer),f;if(Array.isArray(f)){const k=[];for(const D of f)k.push(kh(D,u));return k}if(typeof f!="object")throw new Error("can't serialize object of type "+typeof f);const d=bp(f);if(!d)throw new Error(`can't serialize object of unregistered class ${f.constructor.name}`);if(!vc[d])throw new Error(`${d} is not registered.`);const{klass:b}=vc[d],S=b.serialize?b.serialize(f,u):{};if(b.serialize){if(u&&S===u[u.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const k in f){if(!f.hasOwnProperty(k)||vc[d].omit.indexOf(k)>=0)continue;const D=f[k];S[k]=vc[d].shallow.indexOf(k)>=0?D:kh(D,u)}f instanceof Error&&(S.message=f.message)}if(S.$name)throw new Error("$name property is reserved for worker serialization logic.");return d!=="Object"&&(S.$name=d),S}function bc(f){if(_f(f))return f;if(Array.isArray(f))return f.map(bc);if(typeof f!="object")throw new Error("can't deserialize object of type "+typeof f);const u=bp(f)||"Object";if(!vc[u])throw new Error(`can't deserialize unregistered class ${u}`);const{klass:d}=vc[u];if(!d)throw new Error(`can't deserialize unregistered class ${u}`);if(d.deserialize)return d.deserialize(f);const b=Object.create(d.prototype);for(const S of Object.keys(f)){if(S==="$name")continue;const k=f[S];b[S]=vc[u].shallow.indexOf(S)>=0?k:bc(k)}return b}class Cp{constructor(){this.first=!0}update(u,d){const b=Math.floor(u);return this.first?(this.first=!1,this.lastIntegerZoom=b,this.lastIntegerZoomTime=0,this.lastZoom=u,this.lastFloorZoom=b,!0):(this.lastFloorZoom>b?(this.lastIntegerZoom=b+1,this.lastIntegerZoomTime=d):this.lastFloorZoom<b&&(this.lastIntegerZoom=b,this.lastIntegerZoomTime=d),u!==this.lastZoom&&(this.lastZoom=u,this.lastFloorZoom=b,!0))}}const Ur={"Latin-1 Supplement":f=>f>=128&&f<=255,"Hangul Jamo":f=>f>=4352&&f<=4607,Khmer:f=>f>=6016&&f<=6143,"General Punctuation":f=>f>=8192&&f<=8303,"Letterlike Symbols":f=>f>=8448&&f<=8527,"Number Forms":f=>f>=8528&&f<=8591,"Miscellaneous Technical":f=>f>=8960&&f<=9215,"Control Pictures":f=>f>=9216&&f<=9279,"Optical Character Recognition":f=>f>=9280&&f<=9311,"Enclosed Alphanumerics":f=>f>=9312&&f<=9471,"Geometric Shapes":f=>f>=9632&&f<=9727,"Miscellaneous Symbols":f=>f>=9728&&f<=9983,"Miscellaneous Symbols and Arrows":f=>f>=11008&&f<=11263,"Ideographic Description Characters":f=>f>=12272&&f<=12287,"CJK Symbols and Punctuation":f=>f>=12288&&f<=12351,Hiragana:f=>f>=12352&&f<=12447,Katakana:f=>f>=12448&&f<=12543,Kanbun:f=>f>=12688&&f<=12703,"CJK Strokes":f=>f>=12736&&f<=12783,"Enclosed CJK Letters and Months":f=>f>=12800&&f<=13055,"CJK Compatibility":f=>f>=13056&&f<=13311,"Yijing Hexagram Symbols":f=>f>=19904&&f<=19967,"CJK Unified Ideographs":f=>f>=19968&&f<=40959,"Hangul Syllables":f=>f>=44032&&f<=55215,"Private Use Area":f=>f>=57344&&f<=63743,"Vertical Forms":f=>f>=65040&&f<=65055,"CJK Compatibility Forms":f=>f>=65072&&f<=65103,"Small Form Variants":f=>f>=65104&&f<=65135,"Halfwidth and Fullwidth Forms":f=>f>=65280&&f<=65519};function Gu(f){for(const u of f)if(Wu(u.charCodeAt(0)))return!0;return!1}function Cd(f){for(const u of f)if(!bA(u.charCodeAt(0)))return!1;return!0}function qA(f){const u=f.map((d=>{try{return new RegExp(`\\p{sc=${d}}`,"u").source}catch{return null}})).filter((d=>d));return new RegExp(u.join("|"),"u")}const Th=qA(["Arab","Dupl","Mong","Ougr","Syrc"]);function bA(f){return!Th.test(String.fromCodePoint(f))}const _d=qA(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Wu(f){return!(f!==746&&f!==747&&(f<4352||!(Ur["CJK Compatibility Forms"](f)&&!(f>=65097&&f<=65103)||Ur["CJK Compatibility"](f)||Ur["CJK Strokes"](f)||!(!Ur["CJK Symbols and Punctuation"](f)||f>=12296&&f<=12305||f>=12308&&f<=12319||f===12336)||Ur["Enclosed CJK Letters and Months"](f)||Ur["Ideographic Description Characters"](f)||Ur.Kanbun(f)||Ur.Katakana(f)&&f!==12540||!(!Ur["Halfwidth and Fullwidth Forms"](f)||f===65288||f===65289||f===65293||f>=65306&&f<=65310||f===65339||f===65341||f===65343||f>=65371&&f<=65503||f===65507||f>=65512&&f<=65519)||!(!Ur["Small Form Variants"](f)||f>=65112&&f<=65118||f>=65123&&f<=65126)||Ur["Vertical Forms"](f)||Ur["Yijing Hexagram Symbols"](f)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(f))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(f))||_d.test(String.fromCodePoint(f)))))}function xf(f){return!(Wu(f)||(function(u){return!!(Ur["Latin-1 Supplement"](u)&&(u===167||u===169||u===174||u===177||u===188||u===189||u===190||u===215||u===247)||Ur["General Punctuation"](u)&&(u===8214||u===8224||u===8225||u===8240||u===8241||u===8251||u===8252||u===8258||u===8263||u===8264||u===8265||u===8273)||Ur["Letterlike Symbols"](u)||Ur["Number Forms"](u)||Ur["Miscellaneous Technical"](u)&&(u>=8960&&u<=8967||u>=8972&&u<=8991||u>=8996&&u<=9e3||u===9003||u>=9085&&u<=9114||u>=9150&&u<=9165||u===9167||u>=9169&&u<=9179||u>=9186&&u<=9215)||Ur["Control Pictures"](u)&&u!==9251||Ur["Optical Character Recognition"](u)||Ur["Enclosed Alphanumerics"](u)||Ur["Geometric Shapes"](u)||Ur["Miscellaneous Symbols"](u)&&!(u>=9754&&u<=9759)||Ur["Miscellaneous Symbols and Arrows"](u)&&(u>=11026&&u<=11055||u>=11088&&u<=11097||u>=11192&&u<=11243)||Ur["CJK Symbols and Punctuation"](u)||Ur.Katakana(u)||Ur["Private Use Area"](u)||Ur["CJK Compatibility Forms"](u)||Ur["Small Form Variants"](u)||Ur["Halfwidth and Fullwidth Forms"](u)||u===8734||u===8756||u===8757||u>=9984&&u<=10087||u>=10102&&u<=10131||u===65532||u===65533)})(f))}const Cc=qA(["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 tl(f){return Cc.test(String.fromCodePoint(f))}function n0(f,u){return!(!u&&tl(f)||f>=2304&&f<=3583||f>=3840&&f<=4255||Ur.Khmer(f))}function Rm(f){for(const u of f)if(tl(u.charCodeAt(0)))return!0;return!1}const dl=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(f){this.pluginStatus=f.pluginStatus,this.pluginURL=f.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(f){if(dl.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=f.applyArabicShaping,this.processBidirectionalText=f.processBidirectionalText,this.processStyledBidirectionalText=f.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(f,u){return a(this,void 0,void 0,(function*(){if(this.isParsed())return this.getState();if(f.pluginStatus!=="loading")return this.setState(f),f;const d=f.pluginURL,b=new Promise((k=>{this.loadScriptResolve=k}));u(d);const S=new Promise((k=>setTimeout((()=>k()),this.TIMEOUT)));if(yield Promise.race([b,S]),this.isParsed()){const k={pluginStatus:"loaded",pluginURL:d};return this.setState(k),k}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${d}`)}))}};class Ao{constructor(u,d){this.isSupportedScript=$c,this.zoom=u,d?(this.now=d.now||0,this.fadeDuration=d.fadeDuration||0,this.zoomHistory=d.zoomHistory||new Cp,this.transition=d.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Cp,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const u=this.zoom,d=u-Math.floor(u),b=this.crossFadingFactor();return u>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:d+(1-d)*b}:{fromScale:.5,toScale:1,t:1-(1-b)*d}}}function $c(f){return(function(u,d){for(const b of u)if(!n0(b.charCodeAt(0),d))return!1;return!0})(f,dl.getRTLTextPluginStatus()==="loaded")}class xd{constructor(u,d,b){this.property=u,this.value=d,this.expression=(function(S,k,D){if(Ch(S))return new kl(S,k);if(hc(S)){const K=Nu(S,k,D);if(K.result==="error")throw new Error(K.value.map((W=>`${W.key}: ${W.message}`)).join(", "));return K.value}{let K=S;return k.type==="color"&&typeof S=="string"?K=er.parse(S):k.type!=="padding"||typeof S!="number"&&!Array.isArray(S)?k.type!=="numberArray"||typeof S!="number"&&!Array.isArray(S)?k.type!=="colorArray"||typeof S!="string"&&!Array.isArray(S)?k.type==="variableAnchorOffsetCollection"&&Array.isArray(S)?K=us.parse(S):k.type==="projectionDefinition"&&typeof S=="string"&&(K=Ro.parse(S)):K=Go.parse(S):K=No.parse(S):K=ls.parse(S),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>K}}})(d===void 0?u.specification.default:d,u.specification,b)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(u,d,b){return this.property.possiblyEvaluate(this,u,d,b)}}class _p{constructor(u,d){this.property=u,this.value=new xd(u,void 0,d)}transitioned(u,d){return new kr(this.property,this.value,d,Pe({},u.transition,this.transition),u.now)}untransitioned(){return new kr(this.property,this.value,null,{},0)}}class Qu{constructor(u,d){this._properties=u,this._values=Object.create(u.defaultTransitionablePropertyValues),this._globalState=d}getValue(u){return ut(this._values[u].value.value)}setValue(u,d){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new _p(this._values[u].property,this._globalState)),this._values[u].value=new xd(this._values[u].property,d===null?void 0:ut(d),this._globalState)}getTransition(u){return ut(this._values[u].transition)}setTransition(u,d){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new _p(this._values[u].property,this._globalState)),this._values[u].transition=ut(d)||void 0}serialize(){const u={};for(const d of Object.keys(this._values)){const b=this.getValue(d);b!==void 0&&(u[d]=b);const S=this.getTransition(d);S!==void 0&&(u[`${d}-transition`]=S)}return u}transitioned(u,d){const b=new Do(this._properties);for(const S of Object.keys(this._values))b._values[S]=this._values[S].transitioned(u,d._values[S]);return b}untransitioned(){const u=new Do(this._properties);for(const d of Object.keys(this._values))u._values[d]=this._values[d].untransitioned();return u}}class kr{constructor(u,d,b,S,k){this.property=u,this.value=d,this.begin=k+S.delay||0,this.end=this.begin+S.duration||0,u.specification.transition&&(S.delay||S.duration)&&(this.prior=b)}possiblyEvaluate(u,d,b){const S=u.now||0,k=this.value.possiblyEvaluate(u,d,b),D=this.prior;if(D){if(S>this.end)return this.prior=null,k;if(this.value.isDataDriven())return this.prior=null,k;if(S<this.begin)return D.possiblyEvaluate(u,d,b);{const K=(S-this.begin)/(this.end-this.begin);return this.property.interpolate(D.possiblyEvaluate(u,d,b),k,Me(K))}}return k}}class Do{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitioningPropertyValues)}possiblyEvaluate(u,d,b){const S=new CA(this._properties);for(const k of Object.keys(this._values))S._values[k]=this._values[k].possiblyEvaluate(u,d,b);return S}hasTransition(){for(const u of Object.keys(this._values))if(this._values[u].prior)return!0;return!1}}class no{constructor(u,d){this._properties=u,this._values=Object.create(u.defaultPropertyValues),this._globalState=d}hasValue(u){return this._values[u].value!==void 0}getValue(u){return ut(this._values[u].value)}setValue(u,d){this._values[u]=new xd(this._values[u].property,d===null?void 0:ut(d),this._globalState)}serialize(){const u={};for(const d of Object.keys(this._values)){const b=this.getValue(d);b!==void 0&&(u[d]=b)}return u}possiblyEvaluate(u,d,b){const S=new CA(this._properties);for(const k of Object.keys(this._values))S._values[k]=this._values[k].possiblyEvaluate(u,d,b);return S}}class Xl{constructor(u,d,b){this.property=u,this.value=d,this.parameters=b}isConstant(){return this.value.kind==="constant"}constantOr(u){return this.value.kind==="constant"?this.value.value:u}evaluate(u,d,b,S){return this.property.evaluate(this.value,this.parameters,u,d,b,S)}}class CA{constructor(u){this._properties=u,this._values=Object.create(u.defaultPossiblyEvaluatedValues)}get(u){return this._values[u]}}class Jn{constructor(u){this.specification=u}possiblyEvaluate(u,d){if(u.isDataDriven())throw new Error("Value should not be data driven");return u.expression.evaluate(d)}interpolate(u,d,b){const S=Gc[this.specification.type];return S?S(u,d,b):u}}class Pi{constructor(u,d){this.specification=u,this.overrides=d}possiblyEvaluate(u,d,b,S){return new Xl(this,u.expression.kind==="constant"||u.expression.kind==="camera"?{kind:"constant",value:u.expression.evaluate(d,null,{},b,S)}:u.expression,d)}interpolate(u,d,b){if(u.value.kind!=="constant"||d.value.kind!=="constant")return u;if(u.value.value===void 0||d.value.value===void 0)return new Xl(this,{kind:"constant",value:void 0},u.parameters);const S=Gc[this.specification.type];if(S){const k=S(u.value.value,d.value.value,b);return new Xl(this,{kind:"constant",value:k},u.parameters)}return u}evaluate(u,d,b,S,k,D){return u.kind==="constant"?u.value:u.evaluate(d,b,S,k,D)}}class Rl extends Pi{possiblyEvaluate(u,d,b,S){if(u.value===void 0)return new Xl(this,{kind:"constant",value:void 0},d);if(u.expression.kind==="constant"){const k=u.expression.evaluate(d,null,{},b,S),D=u.property.specification.type==="resolvedImage"&&typeof k!="string"?k.name:k,K=this._calculate(D,D,D,d);return new Xl(this,{kind:"constant",value:K},d)}if(u.expression.kind==="camera"){const k=this._calculate(u.expression.evaluate({zoom:d.zoom-1}),u.expression.evaluate({zoom:d.zoom}),u.expression.evaluate({zoom:d.zoom+1}),d);return new Xl(this,{kind:"constant",value:k},d)}return new Xl(this,u.expression,d)}evaluate(u,d,b,S,k,D){if(u.kind==="source"){const K=u.evaluate(d,b,S,k,D);return this._calculate(K,K,K,d)}return u.kind==="composite"?this._calculate(u.evaluate({zoom:Math.floor(d.zoom)-1},b,S),u.evaluate({zoom:Math.floor(d.zoom)},b,S),u.evaluate({zoom:Math.floor(d.zoom)+1},b,S),d):u.value}_calculate(u,d,b,S){return S.zoom>S.zoomHistory.lastIntegerZoom?{from:u,to:d}:{from:b,to:d}}interpolate(u){return u}}class bu{constructor(u){this.specification=u}possiblyEvaluate(u,d,b,S){if(u.value!==void 0){if(u.expression.kind==="constant"){const k=u.expression.evaluate(d,null,{},b,S);return this._calculate(k,k,k,d)}return this._calculate(u.expression.evaluate(new Ao(Math.floor(d.zoom-1),d)),u.expression.evaluate(new Ao(Math.floor(d.zoom),d)),u.expression.evaluate(new Ao(Math.floor(d.zoom+1),d)),d)}}_calculate(u,d,b,S){return S.zoom>S.zoomHistory.lastIntegerZoom?{from:u,to:d}:{from:b,to:d}}interpolate(u){return u}}class xp{constructor(u){this.specification=u}possiblyEvaluate(u,d,b,S){return!!u.expression.evaluate(d,null,{},b,S)}interpolate(){return!1}}class or{constructor(u){this.properties=u,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const d in u){const b=u[d];b.specification.overridable&&this.overridableProperties.push(d);const S=this.defaultPropertyValues[d]=new xd(b,void 0,void 0),k=this.defaultTransitionablePropertyValues[d]=new _p(b,void 0);this.defaultTransitioningPropertyValues[d]=k.untransitioned(),this.defaultPossiblyEvaluatedValues[d]=S.possiblyEvaluate({})}}}Xn("DataDrivenProperty",Pi),Xn("DataConstantProperty",Jn),Xn("CrossFadedDataDrivenProperty",Rl),Xn("CrossFadedProperty",bu),Xn("ColorRampProperty",xp);const Md="-transition";class qu extends Dt{constructor(u,d,b){if(super(),this.id=u.id,this.type=u.type,this._globalState=b,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},u.type!=="custom"&&(this.metadata=u.metadata,this.minzoom=u.minzoom,this.maxzoom=u.maxzoom,u.type!=="background"&&(this.source=u.source,this.sourceLayer=u["source-layer"],this.filter=u.filter,this._featureFilter=GA(u.filter,b)),d.layout&&(this._unevaluatedLayout=new no(d.layout,b)),d.paint)){this._transitionablePaint=new Qu(d.paint,b);for(const S in u.paint)this.setPaintProperty(S,u.paint[S],{validate:!1});for(const S in u.layout)this.setLayoutProperty(S,u.layout[S],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new CA(d.paint)}}setFilter(u){this.filter=u,this._featureFilter=GA(u,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(u){return u==="visibility"?this.visibility:this._unevaluatedLayout.getValue(u)}getLayoutAffectingGlobalStateRefs(){const u=new Set;if(this._unevaluatedLayout)for(const d in this._unevaluatedLayout._values){const b=this._unevaluatedLayout._values[d];for(const S of b.getGlobalStateRefs())u.add(S)}for(const d of this._featureFilter.getGlobalStateRefs())u.add(d);return u}getPaintAffectingGlobalStateRefs(){var u;const d=new globalThis.Map;if(this._transitionablePaint)for(const b in this._transitionablePaint._values){const S=this._transitionablePaint._values[b].value;for(const k of S.getGlobalStateRefs()){const D=(u=d.get(k))!==null&&u!==void 0?u:[];D.push({name:b,value:S.value}),d.set(k,D)}}return d}setLayoutProperty(u,d,b={}){d!=null&&this._validate(Tm,`layers.${this.id}.layout.${u}`,u,d,b)||(u!=="visibility"?this._unevaluatedLayout.setValue(u,d):this.visibility=d)}getPaintProperty(u){return u.endsWith(Md)?this._transitionablePaint.getTransition(u.slice(0,-11)):this._transitionablePaint.getValue(u)}setPaintProperty(u,d,b={}){if(d!=null&&this._validate(QA,`layers.${this.id}.paint.${u}`,u,d,b))return!1;if(u.endsWith(Md))return this._transitionablePaint.setTransition(u.slice(0,-11),d||void 0),!1;{const S=this._transitionablePaint._values[u],k=S.property.specification["property-type"]==="cross-faded-data-driven",D=S.value.isDataDriven(),K=S.value;this._transitionablePaint.setValue(u,d),this._handleSpecialPaintPropertyUpdate(u);const W=this._transitionablePaint._values[u].value;return W.isDataDriven()||D||k||this._handleOverridablePaintPropertyUpdate(u,K,W)}}_handleSpecialPaintPropertyUpdate(u){}_handleOverridablePaintPropertyUpdate(u,d,b){return!1}isHidden(u){return!!(this.minzoom&&u<this.minzoom)||!!(this.maxzoom&&u>=this.maxzoom)||this.visibility==="none"}updateTransitions(u){this._transitioningPaint=this._transitionablePaint.transitioned(u,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(u,d){u.getCrossfadeParameters&&(this._crossfadeParameters=u.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(u,void 0,d)),this.paint=this._transitioningPaint.possiblyEvaluate(u,void 0,d)}serialize(){const u={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&&(u.layout=u.layout||{},u.layout.visibility=this.visibility),Ne(u,((d,b)=>!(d===void 0||b==="layout"&&!Object.keys(d).length||b==="paint"&&!Object.keys(d).length)))}_validate(u,d,b,S,k={}){return(!k||k.validate!==!1)&&Cf(this,u.call(bf,{key:d,layerType:this.type,objectKey:b,value:S,styleSpec:ot,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const u in this.paint._values){const d=this.paint.get(u);if(d instanceof Xl&&pu(d.property.specification)&&(d.value.kind==="source"||d.value.kind==="composite")&&d.value.isStateDependent)return!0}return!1}}const m1={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class _c{constructor(u,d){this._structArray=u,this._pos1=d*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class xs{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(u,d){return u._trim(),d&&(u.isTransferred=!0,d.push(u.arrayBuffer)),{length:u.length,arrayBuffer:u.arrayBuffer}}static deserialize(u){const d=Object.create(this.prototype);return d.arrayBuffer=u.arrayBuffer,d.length=u.length,d.capacity=u.arrayBuffer.byteLength/d.bytesPerElement,d._refreshViews(),d}_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(u){this.reserve(u),this.length=u}reserve(u){if(u>this.capacity){this.capacity=Math.max(u,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const d=this.uint8;this._refreshViews(),d&&this.uint8.set(d)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ks(f,u=1){let d=0,b=0;return{members:f.map((S=>{const k=m1[S.type].BYTES_PER_ELEMENT,D=d=YA(d,Math.max(u,k)),K=S.components||1;return b=Math.max(b,k),d+=k*K,{name:S.name,type:S.type,components:K,offset:D}})),size:YA(d,Math.max(b,u)),alignment:u}}function YA(f,u){return Math.ceil(f/u)*u}class _A extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d){const b=this.length;return this.resize(b+1),this.emplace(b,u,d)}emplace(u,d,b){const S=2*u;return this.int16[S+0]=d,this.int16[S+1]=b,u}}_A.prototype.bytesPerElement=4,Xn("StructArrayLayout2i4",_A);class fl extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,b){const S=this.length;return this.resize(S+1),this.emplace(S,u,d,b)}emplace(u,d,b,S){const k=3*u;return this.int16[k+0]=d,this.int16[k+1]=b,this.int16[k+2]=S,u}}fl.prototype.bytesPerElement=6,Xn("StructArrayLayout3i6",fl);class Ts extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,b,S){const k=this.length;return this.resize(k+1),this.emplace(k,u,d,b,S)}emplace(u,d,b,S,k){const D=4*u;return this.int16[D+0]=d,this.int16[D+1]=b,this.int16[D+2]=S,this.int16[D+3]=k,u}}Ts.prototype.bytesPerElement=8,Xn("StructArrayLayout4i8",Ts);class Yu extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,b,S,k,D){const K=this.length;return this.resize(K+1),this.emplace(K,u,d,b,S,k,D)}emplace(u,d,b,S,k,D,K){const W=6*u;return this.int16[W+0]=d,this.int16[W+1]=b,this.int16[W+2]=S,this.int16[W+3]=k,this.int16[W+4]=D,this.int16[W+5]=K,u}}Yu.prototype.bytesPerElement=12,Xn("StructArrayLayout2i4i12",Yu);class wd extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,b,S,k,D){const K=this.length;return this.resize(K+1),this.emplace(K,u,d,b,S,k,D)}emplace(u,d,b,S,k,D,K){const W=4*u,ee=8*u;return this.int16[W+0]=d,this.int16[W+1]=b,this.uint8[ee+4]=S,this.uint8[ee+5]=k,this.uint8[ee+6]=D,this.uint8[ee+7]=K,u}}wd.prototype.bytesPerElement=8,Xn("StructArrayLayout2i4ub8",wd);class $A extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,d){const b=this.length;return this.resize(b+1),this.emplace(b,u,d)}emplace(u,d,b){const S=2*u;return this.float32[S+0]=d,this.float32[S+1]=b,u}}$A.prototype.bytesPerElement=8,Xn("StructArrayLayout2f8",$A);class Vc extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,d,b,S,k,D,K,W,ee,re){const he=this.length;return this.resize(he+1),this.emplace(he,u,d,b,S,k,D,K,W,ee,re)}emplace(u,d,b,S,k,D,K,W,ee,re,he){const Oe=10*u;return this.uint16[Oe+0]=d,this.uint16[Oe+1]=b,this.uint16[Oe+2]=S,this.uint16[Oe+3]=k,this.uint16[Oe+4]=D,this.uint16[Oe+5]=K,this.uint16[Oe+6]=W,this.uint16[Oe+7]=ee,this.uint16[Oe+8]=re,this.uint16[Oe+9]=he,u}}Vc.prototype.bytesPerElement=20,Xn("StructArrayLayout10ui20",Vc);class xc extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,d,b,S,k,D,K,W,ee,re,he,Oe){const De=this.length;return this.resize(De+1),this.emplace(De,u,d,b,S,k,D,K,W,ee,re,he,Oe)}emplace(u,d,b,S,k,D,K,W,ee,re,he,Oe,De){const Ke=12*u;return this.int16[Ke+0]=d,this.int16[Ke+1]=b,this.int16[Ke+2]=S,this.int16[Ke+3]=k,this.uint16[Ke+4]=D,this.uint16[Ke+5]=K,this.uint16[Ke+6]=W,this.uint16[Ke+7]=ee,this.int16[Ke+8]=re,this.int16[Ke+9]=he,this.int16[Ke+10]=Oe,this.int16[Ke+11]=De,u}}xc.prototype.bytesPerElement=24,Xn("StructArrayLayout4i4ui4i24",xc);class Mf extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,d,b){const S=this.length;return this.resize(S+1),this.emplace(S,u,d,b)}emplace(u,d,b,S){const k=3*u;return this.float32[k+0]=d,this.float32[k+1]=b,this.float32[k+2]=S,u}}Mf.prototype.bytesPerElement=12,Xn("StructArrayLayout3f12",Mf);class wf extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(u){const d=this.length;return this.resize(d+1),this.emplace(d,u)}emplace(u,d){return this.uint32[1*u+0]=d,u}}wf.prototype.bytesPerElement=4,Xn("StructArrayLayout1ul4",wf);class Mp extends xs{_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(u,d,b,S,k,D,K,W,ee){const re=this.length;return this.resize(re+1),this.emplace(re,u,d,b,S,k,D,K,W,ee)}emplace(u,d,b,S,k,D,K,W,ee,re){const he=10*u,Oe=5*u;return this.int16[he+0]=d,this.int16[he+1]=b,this.int16[he+2]=S,this.int16[he+3]=k,this.int16[he+4]=D,this.int16[he+5]=K,this.uint32[Oe+3]=W,this.uint16[he+8]=ee,this.uint16[he+9]=re,u}}Mp.prototype.bytesPerElement=20,Xn("StructArrayLayout6i1ul2ui20",Mp);class B extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,b,S,k,D){const K=this.length;return this.resize(K+1),this.emplace(K,u,d,b,S,k,D)}emplace(u,d,b,S,k,D,K){const W=6*u;return this.int16[W+0]=d,this.int16[W+1]=b,this.int16[W+2]=S,this.int16[W+3]=k,this.int16[W+4]=D,this.int16[W+5]=K,u}}B.prototype.bytesPerElement=12,Xn("StructArrayLayout2i2i2i12",B);class l extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,b,S,k){const D=this.length;return this.resize(D+1),this.emplace(D,u,d,b,S,k)}emplace(u,d,b,S,k,D){const K=4*u,W=8*u;return this.float32[K+0]=d,this.float32[K+1]=b,this.float32[K+2]=S,this.int16[W+6]=k,this.int16[W+7]=D,u}}l.prototype.bytesPerElement=16,Xn("StructArrayLayout2f1f2i16",l);class p extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,d,b,S,k,D){const K=this.length;return this.resize(K+1),this.emplace(K,u,d,b,S,k,D)}emplace(u,d,b,S,k,D,K){const W=16*u,ee=4*u,re=8*u;return this.uint8[W+0]=d,this.uint8[W+1]=b,this.float32[ee+1]=S,this.float32[ee+2]=k,this.int16[re+6]=D,this.int16[re+7]=K,u}}p.prototype.bytesPerElement=16,Xn("StructArrayLayout2ub2f2i16",p);class C extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,d,b){const S=this.length;return this.resize(S+1),this.emplace(S,u,d,b)}emplace(u,d,b,S){const k=3*u;return this.uint16[k+0]=d,this.uint16[k+1]=b,this.uint16[k+2]=S,u}}C.prototype.bytesPerElement=6,Xn("StructArrayLayout3ui6",C);class E extends xs{_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(u,d,b,S,k,D,K,W,ee,re,he,Oe,De,Ke,Ge,Ve,at){const Tt=this.length;return this.resize(Tt+1),this.emplace(Tt,u,d,b,S,k,D,K,W,ee,re,he,Oe,De,Ke,Ge,Ve,at)}emplace(u,d,b,S,k,D,K,W,ee,re,he,Oe,De,Ke,Ge,Ve,at,Tt){const ft=24*u,_t=12*u,Nt=48*u;return this.int16[ft+0]=d,this.int16[ft+1]=b,this.uint16[ft+2]=S,this.uint16[ft+3]=k,this.uint32[_t+2]=D,this.uint32[_t+3]=K,this.uint32[_t+4]=W,this.uint16[ft+10]=ee,this.uint16[ft+11]=re,this.uint16[ft+12]=he,this.float32[_t+7]=Oe,this.float32[_t+8]=De,this.uint8[Nt+36]=Ke,this.uint8[Nt+37]=Ge,this.uint8[Nt+38]=Ve,this.uint32[_t+10]=at,this.int16[ft+22]=Tt,u}}E.prototype.bytesPerElement=48,Xn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",E);class T extends xs{_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(u,d,b,S,k,D,K,W,ee,re,he,Oe,De,Ke,Ge,Ve,at,Tt,ft,_t,Nt,Jt,An,Wn,Dn,Nn,Ci,jn){const Un=this.length;return this.resize(Un+1),this.emplace(Un,u,d,b,S,k,D,K,W,ee,re,he,Oe,De,Ke,Ge,Ve,at,Tt,ft,_t,Nt,Jt,An,Wn,Dn,Nn,Ci,jn)}emplace(u,d,b,S,k,D,K,W,ee,re,he,Oe,De,Ke,Ge,Ve,at,Tt,ft,_t,Nt,Jt,An,Wn,Dn,Nn,Ci,jn,Un){const rn=32*u,Ui=16*u;return this.int16[rn+0]=d,this.int16[rn+1]=b,this.int16[rn+2]=S,this.int16[rn+3]=k,this.int16[rn+4]=D,this.int16[rn+5]=K,this.int16[rn+6]=W,this.int16[rn+7]=ee,this.uint16[rn+8]=re,this.uint16[rn+9]=he,this.uint16[rn+10]=Oe,this.uint16[rn+11]=De,this.uint16[rn+12]=Ke,this.uint16[rn+13]=Ge,this.uint16[rn+14]=Ve,this.uint16[rn+15]=at,this.uint16[rn+16]=Tt,this.uint16[rn+17]=ft,this.uint16[rn+18]=_t,this.uint16[rn+19]=Nt,this.uint16[rn+20]=Jt,this.uint16[rn+21]=An,this.uint16[rn+22]=Wn,this.uint32[Ui+12]=Dn,this.float32[Ui+13]=Nn,this.float32[Ui+14]=Ci,this.uint16[rn+30]=jn,this.uint16[rn+31]=Un,u}}T.prototype.bytesPerElement=64,Xn("StructArrayLayout8i15ui1ul2f2ui64",T);class U extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u){const d=this.length;return this.resize(d+1),this.emplace(d,u)}emplace(u,d){return this.float32[1*u+0]=d,u}}U.prototype.bytesPerElement=4,Xn("StructArrayLayout1f4",U);class q extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,d,b){const S=this.length;return this.resize(S+1),this.emplace(S,u,d,b)}emplace(u,d,b,S){const k=3*u;return this.uint16[6*u+0]=d,this.float32[k+1]=b,this.float32[k+2]=S,u}}q.prototype.bytesPerElement=12,Xn("StructArrayLayout1ui2f12",q);class Z extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,d,b){const S=this.length;return this.resize(S+1),this.emplace(S,u,d,b)}emplace(u,d,b,S){const k=4*u;return this.uint32[2*u+0]=d,this.uint16[k+2]=b,this.uint16[k+3]=S,u}}Z.prototype.bytesPerElement=8,Xn("StructArrayLayout1ul2ui8",Z);class ae extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,d){const b=this.length;return this.resize(b+1),this.emplace(b,u,d)}emplace(u,d,b){const S=2*u;return this.uint16[S+0]=d,this.uint16[S+1]=b,u}}ae.prototype.bytesPerElement=4,Xn("StructArrayLayout2ui4",ae);class Ae extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u){const d=this.length;return this.resize(d+1),this.emplace(d,u)}emplace(u,d){return this.uint16[1*u+0]=d,u}}Ae.prototype.bytesPerElement=2,Xn("StructArrayLayout1ui2",Ae);class ye extends xs{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,d,b,S){const k=this.length;return this.resize(k+1),this.emplace(k,u,d,b,S)}emplace(u,d,b,S,k){const D=4*u;return this.float32[D+0]=d,this.float32[D+1]=b,this.float32[D+2]=S,this.float32[D+3]=k,u}}ye.prototype.bytesPerElement=16,Xn("StructArrayLayout4f16",ye);class pe extends _c{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 c(this.anchorPointX,this.anchorPointY)}}pe.prototype.size=20;class Be extends Mp{get(u){return new pe(this,u)}}Xn("CollisionBoxArray",Be);class Fe extends _c{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(u){this._structArray.uint8[this._pos1+37]=u}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(u){this._structArray.uint8[this._pos1+38]=u}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(u){this._structArray.uint32[this._pos4+10]=u}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Fe.prototype.size=48;class Xe extends E{get(u){return new Fe(this,u)}}Xn("PlacedSymbolArray",Xe);class Ze extends _c{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(u){this._structArray.uint32[this._pos4+12]=u}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]}}Ze.prototype.size=64;class et extends T{get(u){return new Ze(this,u)}}Xn("SymbolInstanceArray",et);class st extends U{getoffsetX(u){return this.float32[1*u+0]}}Xn("GlyphOffsetArray",st);class nt extends fl{getx(u){return this.int16[3*u+0]}gety(u){return this.int16[3*u+1]}gettileUnitDistanceFromAnchor(u){return this.int16[3*u+2]}}Xn("SymbolLineVertexArray",nt);class ct extends _c{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]}}ct.prototype.size=12;class yt extends q{get(u){return new ct(this,u)}}Xn("TextAnchorOffsetArray",yt);class xt extends _c{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]}}xt.prototype.size=8;class At extends Z{get(u){return new xt(this,u)}}Xn("FeatureIndexArray",At);class Ot extends _A{}class Vt extends _A{}class Kt extends _A{}class jt extends Yu{}class qt extends wd{}class Kn extends $A{}class On extends Vc{}class un extends xc{}class ei extends Mf{}class Ji extends wf{}class Yr extends B{}class Ms extends p{}class Hr extends C{}class cs extends ae{}const As=ks([{name:"a_pos",components:2,type:"Int16"}],4),{members:Qo}=As;class tr{constructor(u=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=u}prepareSegment(u,d,b,S){const k=this.segments[this.segments.length-1];return u>tr.MAX_VERTEX_ARRAY_LENGTH&&mt(`Max vertices per segment is ${tr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${u}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${tr.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!k||k.vertexLength+u>tr.MAX_VERTEX_ARRAY_LENGTH||k.sortKey!==S?this.createNewSegment(d,b,S):k}createNewSegment(u,d,b){const S={vertexOffset:u.length,primitiveOffset:d.length,vertexLength:0,primitiveLength:0,vaos:{}};return b!==void 0&&(S.sortKey=b),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(S),S}getOrCreateLatestSegment(u,d,b){return this.prepareSegment(0,u,d,b)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const u of this.segments)for(const d in u.vaos)u.vaos[d].destroy()}static simpleSegment(u,d,b,S){return new tr([{vertexOffset:u,primitiveOffset:d,vertexLength:b,primitiveLength:S,vaos:{},sortKey:0}])}}function sa(f,u){return 256*(f=vt(Math.floor(f),0,255))+vt(Math.floor(u),0,255)}tr.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Xn("SegmentVector",tr);const qo=ks([{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 Ga,aa,VA,$u={exports:{}},Cu={exports:{}},HA={exports:{}},Sd=(function(){if(VA)return $u.exports;VA=1;var f=(Ga||(Ga=1,Cu.exports=function(d,b){var S,k,D,K,W,ee,re,he;for(k=d.length-(S=3&d.length),D=b,W=3432918353,ee=461845907,he=0;he<k;)re=255&d.charCodeAt(he)|(255&d.charCodeAt(++he))<<8|(255&d.charCodeAt(++he))<<16|(255&d.charCodeAt(++he))<<24,++he,D=27492+(65535&(K=5*(65535&(D=(D^=re=(65535&(re=(re=(65535&re)*W+(((re>>>16)*W&65535)<<16)&4294967295)<<15|re>>>17))*ee+(((re>>>16)*ee&65535)<<16)&4294967295)<<13|D>>>19))+((5*(D>>>16)&65535)<<16)&4294967295))+((58964+(K>>>16)&65535)<<16);switch(re=0,S){case 3:re^=(255&d.charCodeAt(he+2))<<16;case 2:re^=(255&d.charCodeAt(he+1))<<8;case 1:D^=re=(65535&(re=(re=(65535&(re^=255&d.charCodeAt(he)))*W+(((re>>>16)*W&65535)<<16)&4294967295)<<15|re>>>17))*ee+(((re>>>16)*ee&65535)<<16)&4294967295}return D^=d.length,D=2246822507*(65535&(D^=D>>>16))+((2246822507*(D>>>16)&65535)<<16)&4294967295,D=3266489909*(65535&(D^=D>>>13))+((3266489909*(D>>>16)&65535)<<16)&4294967295,(D^=D>>>16)>>>0}),Cu.exports),u=(aa||(aa=1,HA.exports=function(d,b){for(var S,k=d.length,D=b^k,K=0;k>=4;)S=1540483477*(65535&(S=255&d.charCodeAt(K)|(255&d.charCodeAt(++K))<<8|(255&d.charCodeAt(++K))<<16|(255&d.charCodeAt(++K))<<24))+((1540483477*(S>>>16)&65535)<<16),D=1540483477*(65535&D)+((1540483477*(D>>>16)&65535)<<16)^(S=1540483477*(65535&(S^=S>>>24))+((1540483477*(S>>>16)&65535)<<16)),k-=4,++K;switch(k){case 3:D^=(255&d.charCodeAt(K+2))<<16;case 2:D^=(255&d.charCodeAt(K+1))<<8;case 1:D=1540483477*(65535&(D^=255&d.charCodeAt(K)))+((1540483477*(D>>>16)&65535)<<16)}return D=1540483477*(65535&(D^=D>>>13))+((1540483477*(D>>>16)&65535)<<16),(D^=D>>>15)>>>0}),HA.exports);return $u.exports=f,$u.exports.murmur3=f,$u.exports.murmur2=u,$u.exports})(),Ed=A(Sd);class Hc{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(u,d,b,S){this.ids.push(pl(u)),this.positions.push(d,b,S)}getPositions(u){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const d=pl(u);let b=0,S=this.ids.length-1;for(;b<S;){const D=b+S>>1;this.ids[D]>=d?S=D:b=D+1}const k=[];for(;this.ids[b]===d;)k.push({index:this.positions[3*b],start:this.positions[3*b+1],end:this.positions[3*b+2]}),b++;return k}static serialize(u,d){const b=new Float64Array(u.ids),S=new Uint32Array(u.positions);return Zc(b,S,0,b.length-1),d&&d.push(b.buffer,S.buffer),{ids:b,positions:S}}static deserialize(u){const d=new Hc;return d.ids=u.ids,d.positions=u.positions,d.indexed=!0,d}}function pl(f){const u=+f;return!isNaN(u)&&u<=Number.MAX_SAFE_INTEGER?u:Ed(String(f))}function Zc(f,u,d,b){for(;d<b;){const S=f[d+b>>1];let k=d-1,D=b+1;for(;;){do k++;while(f[k]<S);do D--;while(f[D]>S);if(k>=D)break;Mc(f,k,D),Mc(u,3*k,3*D),Mc(u,3*k+1,3*D+1),Mc(u,3*k+2,3*D+2)}D-d<b-D?(Zc(f,u,d,D),d=D+1):(Zc(f,u,D+1,b),b=D)}}function Mc(f,u,d){const b=f[u];f[u]=f[d],f[d]=b}Xn("FeaturePositionMap",Hc);class _u{constructor(u,d){this.gl=u.gl,this.location=d}}class Kr extends _u{constructor(u,d){super(u,d),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1f(this.location,u))}}class Bo extends _u{constructor(u,d){super(u,d),this.current=[0,0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]&&u[3]===this.current[3]||(this.current=u,this.gl.uniform4f(this.location,u[0],u[1],u[2],u[3]))}}class Dl extends _u{constructor(u,d){super(u,d),this.current=er.transparent}set(u){u.r===this.current.r&&u.g===this.current.g&&u.b===this.current.b&&u.a===this.current.a||(this.current=u,this.gl.uniform4f(this.location,u.r,u.g,u.b,u.a))}}const la=new Float32Array(16);function ZA(f){return[sa(255*f.r,255*f.g),sa(255*f.b,255*f.a)]}class Xc{constructor(u,d,b){this.value=u,this.uniformNames=d.map((S=>`u_${S}`)),this.type=b}setUniform(u,d,b){u.set(b.constantOr(this.value))}getBinding(u,d,b){return this.type==="color"?new Dl(u,d):new Kr(u,d)}}class Rh{constructor(u,d){this.uniformNames=d.map((b=>`u_${b}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(u,d){this.pixelRatioFrom=d.pixelRatio,this.pixelRatioTo=u.pixelRatio,this.patternFrom=d.tlbr,this.patternTo=u.tlbr}setUniform(u,d,b,S){const k=S==="u_pattern_to"?this.patternTo:S==="u_pattern_from"?this.patternFrom:S==="u_pixel_ratio_to"?this.pixelRatioTo:S==="u_pixel_ratio_from"?this.pixelRatioFrom:null;k&&u.set(k)}getBinding(u,d,b){return b.substr(0,9)==="u_pattern"?new Bo(u,d):new Kr(u,d)}}class Jl{constructor(u,d,b,S){this.expression=u,this.type=b,this.maxValue=0,this.paintVertexAttributes=d.map((k=>({name:`a_${k}`,type:"Float32",components:b==="color"?2:1,offset:0}))),this.paintVertexArray=new S}populatePaintArray(u,d,b){const S=this.paintVertexArray.length,k=this.expression.evaluate(new Ao(0,b),d,{},b.canonical,[],b.formattedSection);this.paintVertexArray.resize(u),this._setPaintValue(S,u,k)}updatePaintArray(u,d,b,S,k){const D=this.expression.evaluate(new Ao(0,k),b,S);this._setPaintValue(u,d,D)}_setPaintValue(u,d,b){if(this.type==="color"){const S=ZA(b);for(let k=u;k<d;k++)this.paintVertexArray.emplace(k,S[0],S[1])}else{for(let S=u;S<d;S++)this.paintVertexArray.emplace(S,b);this.maxValue=Math.max(this.maxValue,Math.abs(b))}}upload(u){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=u.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class wc{constructor(u,d,b,S,k,D){this.expression=u,this.uniformNames=d.map((K=>`u_${K}_t`)),this.type=b,this.useIntegerZoom=S,this.zoom=k,this.maxValue=0,this.paintVertexAttributes=d.map((K=>({name:`a_${K}`,type:"Float32",components:b==="color"?4:2,offset:0}))),this.paintVertexArray=new D}populatePaintArray(u,d,b){const S=this.expression.evaluate(new Ao(this.zoom,b),d,{},b.canonical,[],b.formattedSection),k=this.expression.evaluate(new Ao(this.zoom+1,b),d,{},b.canonical,[],b.formattedSection),D=this.paintVertexArray.length;this.paintVertexArray.resize(u),this._setPaintValue(D,u,S,k)}updatePaintArray(u,d,b,S,k){const D=this.expression.evaluate(new Ao(this.zoom,k),b,S),K=this.expression.evaluate(new Ao(this.zoom+1,k),b,S);this._setPaintValue(u,d,D,K)}_setPaintValue(u,d,b,S){if(this.type==="color"){const k=ZA(b),D=ZA(S);for(let K=u;K<d;K++)this.paintVertexArray.emplace(K,k[0],k[1],D[0],D[1])}else{for(let k=u;k<d;k++)this.paintVertexArray.emplace(k,b,S);this.maxValue=Math.max(this.maxValue,Math.abs(b),Math.abs(S))}}upload(u){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=u.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(u,d){const b=this.useIntegerZoom?Math.floor(d.zoom):d.zoom,S=vt(this.expression.interpolationFactor(b,this.zoom,this.zoom+1),0,1);u.set(S)}getBinding(u,d,b){return new Kr(u,d)}}class Ta{constructor(u,d,b,S,k,D){this.expression=u,this.type=d,this.useIntegerZoom=b,this.zoom=S,this.layerId=D,this.zoomInPaintVertexArray=new k,this.zoomOutPaintVertexArray=new k}populatePaintArray(u,d,b){const S=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(u),this.zoomOutPaintVertexArray.resize(u),this._setPaintValues(S,u,d.patterns&&d.patterns[this.layerId],b.imagePositions)}updatePaintArray(u,d,b,S,k){this._setPaintValues(u,d,b.patterns&&b.patterns[this.layerId],k.imagePositions)}_setPaintValues(u,d,b,S){if(!S||!b)return;const{min:k,mid:D,max:K}=b,W=S[k],ee=S[D],re=S[K];if(W&&ee&&re)for(let he=u;he<d;he++)this.zoomInPaintVertexArray.emplace(he,ee.tl[0],ee.tl[1],ee.br[0],ee.br[1],W.tl[0],W.tl[1],W.br[0],W.br[1],ee.pixelRatio,W.pixelRatio),this.zoomOutPaintVertexArray.emplace(he,ee.tl[0],ee.tl[1],ee.br[0],ee.br[1],re.tl[0],re.tl[1],re.br[0],re.br[1],ee.pixelRatio,re.pixelRatio)}upload(u){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=u.createVertexBuffer(this.zoomInPaintVertexArray,qo.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=u.createVertexBuffer(this.zoomOutPaintVertexArray,qo.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class ua{constructor(u,d,b){this.binders={},this._buffers=[];const S=[];for(const k in u.paint._values){if(!b(k))continue;const D=u.paint.get(k);if(!(D instanceof Xl&&pu(D.property.specification)))continue;const K=i0(k,u.type),W=D.value,ee=D.property.specification.type,re=D.property.useIntegerZoom,he=D.property.specification["property-type"],Oe=he==="cross-faded"||he==="cross-faded-data-driven";if(W.kind==="constant")this.binders[k]=Oe?new Rh(W.value,K):new Xc(W.value,K,ee),S.push(`/u_${k}`);else if(W.kind==="source"||Oe){const De=Jc(k,ee,"source");this.binders[k]=Oe?new Ta(W,ee,re,d,De,u.id):new Jl(W,K,ee,De),S.push(`/a_${k}`)}else{const De=Jc(k,ee,"composite");this.binders[k]=new wc(W,K,ee,re,d,De),S.push(`/z_${k}`)}}this.cacheKey=S.sort().join("")}getMaxValue(u){const d=this.binders[u];return d instanceof Jl||d instanceof wc?d.maxValue:0}populatePaintArrays(u,d,b){for(const S in this.binders){const k=this.binders[S];(k instanceof Jl||k instanceof wc||k instanceof Ta)&&k.populatePaintArray(u,d,b)}}setConstantPatternPositions(u,d){for(const b in this.binders){const S=this.binders[b];S instanceof Rh&&S.setConstantPatternPositions(u,d)}}updatePaintArrays(u,d,b,S,k){let D=!1;for(const K in u){const W=d.getPositions(K);for(const ee of W){const re=b.feature(ee.index);for(const he in this.binders){const Oe=this.binders[he];if((Oe instanceof Jl||Oe instanceof wc||Oe instanceof Ta)&&Oe.expression.isStateDependent===!0){const De=S.paint.get(he);Oe.expression=De.value,Oe.updatePaintArray(ee.start,ee.end,re,u[K],k),D=!0}}}}return D}defines(){const u=[];for(const d in this.binders){const b=this.binders[d];(b instanceof Xc||b instanceof Rh)&&u.push(...b.uniformNames.map((S=>`#define HAS_UNIFORM_${S}`)))}return u}getBinderAttributes(){const u=[];for(const d in this.binders){const b=this.binders[d];if(b instanceof Jl||b instanceof wc)for(let S=0;S<b.paintVertexAttributes.length;S++)u.push(b.paintVertexAttributes[S].name);else if(b instanceof Ta)for(let S=0;S<qo.members.length;S++)u.push(qo.members[S].name)}return u}getBinderUniforms(){const u=[];for(const d in this.binders){const b=this.binders[d];if(b instanceof Xc||b instanceof Rh||b instanceof wc)for(const S of b.uniformNames)u.push(S)}return u}getPaintVertexBuffers(){return this._buffers}getUniforms(u,d){const b=[];for(const S in this.binders){const k=this.binders[S];if(k instanceof Xc||k instanceof Rh||k instanceof wc){for(const D of k.uniformNames)if(d[D]){const K=k.getBinding(u,d[D],D);b.push({name:D,property:S,binding:K})}}}return b}setUniforms(u,d,b,S){for(const{name:k,property:D,binding:K}of d)this.binders[D].setUniform(K,S,b.get(D),k)}updatePaintBuffers(u){this._buffers=[];for(const d in this.binders){const b=this.binders[d];if(u&&b instanceof Ta){const S=u.fromScale===2?b.zoomInPaintVertexBuffer:b.zoomOutPaintVertexBuffer;S&&this._buffers.push(S)}else(b instanceof Jl||b instanceof wc)&&b.paintVertexBuffer&&this._buffers.push(b.paintVertexBuffer)}}upload(u){for(const d in this.binders){const b=this.binders[d];(b instanceof Jl||b instanceof wc||b instanceof Ta)&&b.upload(u)}this.updatePaintBuffers()}destroy(){for(const u in this.binders){const d=this.binders[u];(d instanceof Jl||d instanceof wc||d instanceof Ta)&&d.destroy()}}}class Wa{constructor(u,d,b=()=>!0){this.programConfigurations={};for(const S of u)this.programConfigurations[S.id]=new ua(S,d,b);this.needsUpload=!1,this._featureMap=new Hc,this._bufferOffset=0}populatePaintArrays(u,d,b,S){for(const k in this.programConfigurations)this.programConfigurations[k].populatePaintArrays(u,d,S);d.id!==void 0&&this._featureMap.add(d.id,b,this._bufferOffset,u),this._bufferOffset=u,this.needsUpload=!0}updatePaintArrays(u,d,b,S){for(const k of b)this.needsUpload=this.programConfigurations[k.id].updatePaintArrays(u,this._featureMap,d,k,S)||this.needsUpload}get(u){return this.programConfigurations[u]}upload(u){if(this.needsUpload){for(const d in this.programConfigurations)this.programConfigurations[d].upload(u);this.needsUpload=!1}}destroy(){for(const u in this.programConfigurations)this.programConfigurations[u].destroy()}}function i0(f,u){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"]}[f]||[f.replace(`${u}-`,"").replace(/-/g,"_")]}function Jc(f,u,d){const b={color:{source:$A,composite:ye},number:{source:U,composite:$A}},S=(function(k){return{"line-pattern":{source:On,composite:On},"fill-pattern":{source:On,composite:On},"fill-extrusion-pattern":{source:On,composite:On}}[k]})(f);return S&&S[d]||b[u][d]}Xn("ConstantBinder",Xc),Xn("CrossFadedConstantBinder",Rh),Xn("SourceExpressionBinder",Jl),Xn("CrossFadedCompositeBinder",Ta),Xn("CompositeExpressionBinder",wc),Xn("ProgramConfiguration",ua,{omit:["_buffers"]}),Xn("ProgramConfigurationSet",Wa);const xu=Math.pow(2,14)-1,qs=-xu-1;function Vu(f){const u=ht/f.extent,d=f.loadGeometry();for(let b=0;b<d.length;b++){const S=d[b];for(let k=0;k<S.length;k++){const D=S[k],K=Math.round(D.x*u),W=Math.round(D.y*u);D.x=vt(K,qs,xu),D.y=vt(W,qs,xu),(K<D.x||K>D.x+1||W<D.y||W>D.y+1)&&mt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return d}function xA(f,u){return{type:f.type,id:f.id,properties:f.properties,geometry:u?Vu(f):[]}}const Dm=-32768;function r0(f,u,d,b,S){f.emplaceBack(Dm+8*u+b,Dm+8*d+S)}class g1{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((d=>d.id)),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new Vt,this.indexArray=new Hr,this.segments=new tr,this.programConfigurations=new Wa(u.layers,u.zoom),this.stateDependentLayerIds=this.layers.filter((d=>d.isStateDependent())).map((d=>d.id))}populate(u,d,b){const S=this.layers[0],k=[];let D=null,K=!1,W=S.type==="heatmap";if(S.type==="circle"){const re=S;D=re.layout.get("circle-sort-key"),K=!D.isConstant(),W=W||re.paint.get("circle-pitch-alignment")==="map"}const ee=W?d.subdivisionGranularity.circle:1;for(const{feature:re,id:he,index:Oe,sourceLayerIndex:De}of u){const Ke=this.layers[0]._featureFilter.needGeometry,Ge=xA(re,Ke);if(!this.layers[0]._featureFilter.filter(new Ao(this.zoom),Ge,b))continue;const Ve=K?D.evaluate(Ge,{},b):void 0,at={id:he,properties:re.properties,type:re.type,sourceLayerIndex:De,index:Oe,geometry:Ke?Ge.geometry:Vu(re),patterns:{},sortKey:Ve};k.push(at)}K&&k.sort(((re,he)=>re.sortKey-he.sortKey));for(const re of k){const{geometry:he,index:Oe,sourceLayerIndex:De}=re,Ke=u[Oe].feature;this.addFeature(re,he,Oe,b,ee),d.featureIndex.insert(Ke,he,Oe,De,this.index)}}update(u,d,b){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,d,this.stateDependentLayers,{imagePositions:b})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Qo),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(u,d,b,S,k=1){let D;switch(k){case 1:D=[0,7];break;case 3:D=[0,2,5,7];break;case 5:D=[0,1,3,4,6,7];break;case 7:D=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${k}; valid values are 1, 3, 5, 7.`)}const K=D.length;for(const W of d)for(const ee of W){const re=ee.x,he=ee.y;if(re<0||re>=ht||he<0||he>=ht)continue;const Oe=this.segments.prepareSegment(K*K,this.layoutVertexArray,this.indexArray,u.sortKey),De=Oe.vertexLength;for(let Ke=0;Ke<K;Ke++)for(let Ge=0;Ge<K;Ge++)r0(this.layoutVertexArray,re,he,D[Ge],D[Ke]);for(let Ke=0;Ke<K-1;Ke++)for(let Ge=0;Ge<K-1;Ge++){const Ve=De+Ke*K+Ge,at=De+(Ke+1)*K+Ge;this.indexArray.emplaceBack(Ve,at+1,Ve+1),this.indexArray.emplaceBack(Ve,at,at+1)}Oe.vertexLength+=K*K,Oe.primitiveLength+=(K-1)*(K-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,b,{imagePositions:{},canonical:S})}}function Od(f,u){for(let d=0;d<f.length;d++)if(wp(u,f[d]))return!0;for(let d=0;d<u.length;d++)if(wp(f,u[d]))return!0;return!!b1(f,u)}function Dh(f,u,d){return!!wp(f,u)||!!MA(u,f,d)}function y1(f,u){if(f.length===1)return C1(u,f[0]);for(let d=0;d<u.length;d++){const b=u[d];for(let S=0;S<b.length;S++)if(wp(f,b[S]))return!0}for(let d=0;d<f.length;d++)if(C1(u,f[d]))return!0;for(let d=0;d<u.length;d++)if(b1(f,u[d]))return!0;return!1}function v1(f,u,d){if(f.length>1){if(b1(f,u))return!0;for(let b=0;b<u.length;b++)if(MA(u[b],f,d))return!0}for(let b=0;b<f.length;b++)if(MA(f[b],u,d))return!0;return!1}function b1(f,u){if(f.length===0||u.length===0)return!1;for(let d=0;d<f.length-1;d++){const b=f[d],S=f[d+1];for(let k=0;k<u.length-1;k++)if(o0(b,S,u[k],u[k+1]))return!0}return!1}function o0(f,u,d,b){return Rt(f,d,b)!==Rt(u,d,b)&&Rt(f,u,d)!==Rt(f,u,b)}function MA(f,u,d){const b=d*d;if(u.length===1)return f.distSqr(u[0])<b;for(let S=1;S<u.length;S++)if(s0(f,u[S-1],u[S])<b)return!0;return!1}function s0(f,u,d){const b=u.distSqr(d);if(b===0)return f.distSqr(u);const S=((f.x-u.x)*(d.x-u.x)+(f.y-u.y)*(d.y-u.y))/b;return f.distSqr(S<0?u:S>1?d:d.sub(u)._mult(S)._add(u))}function C1(f,u){let d,b,S,k=!1;for(let D=0;D<f.length;D++){d=f[D];for(let K=0,W=d.length-1;K<d.length;W=K++)b=d[K],S=d[W],b.y>u.y!=S.y>u.y&&u.x<(S.x-b.x)*(u.y-b.y)/(S.y-b.y)+b.x&&(k=!k)}return k}function wp(f,u){let d=!1;for(let b=0,S=f.length-1;b<f.length;S=b++){const k=f[b],D=f[S];k.y>u.y!=D.y>u.y&&u.x<(D.x-k.x)*(u.y-k.y)/(D.y-k.y)+k.x&&(d=!d)}return d}function $b(f,u,d){const b=d[0],S=d[2];if(f.x<b.x&&u.x<b.x||f.x>S.x&&u.x>S.x||f.y<b.y&&u.y<b.y||f.y>S.y&&u.y>S.y)return!1;const k=Rt(f,u,d[0]);return k!==Rt(f,u,d[1])||k!==Rt(f,u,d[2])||k!==Rt(f,u,d[3])}function Sp(f,u,d){const b=u.paint.get(f).value;return b.kind==="constant"?b.value:d.programConfigurations.get(u.id).getMaxValue(f)}function Qa(f){return Math.sqrt(f[0]*f[0]+f[1]*f[1])}function ws(f,u,d,b,S){if(!u[0]&&!u[1])return f;const k=c.convert(u)._mult(S);d==="viewport"&&k._rotate(-b);const D=[];for(let K=0;K<f.length;K++)D.push(f[K].sub(k));return D}function _1({queryGeometry:f,size:u},d){return Dh(f,d,u)}function x1({queryGeometry:f,size:u,transform:d,unwrappedTileID:b,getElevation:S},k){return Dh(f,k,u*(d.projectTileCoordinates(k.x,k.y,b,S).signedDistanceFromCamera/d.cameraToCenterDistance))}function M1({queryGeometry:f,size:u,transform:d,unwrappedTileID:b,getElevation:S},k){const D=d.projectTileCoordinates(k.x,k.y,b,S).signedDistanceFromCamera,K=u*(d.cameraToCenterDistance/D);return Dh(f,Hi(k,d,b,S),K)}function a0({queryGeometry:f,size:u,transform:d,unwrappedTileID:b,getElevation:S},k){return Dh(f,Hi(k,d,b,S),u)}function Sf({queryGeometry:f,size:u,transform:d,unwrappedTileID:b,getElevation:S,pitchAlignment:k="map",pitchScale:D="map"},K){const W=k==="map"?D==="map"?_1:x1:D==="map"?M1:a0,ee={queryGeometry:f,size:u,transform:d,unwrappedTileID:b,getElevation:S};for(const re of K)for(const he of re)if(W(ee,he))return!0;return!1}function Hi(f,u,d,b){const S=u.projectTileCoordinates(f.x,f.y,d,b).point;return new c((.5*S.x+.5)*u.width,(.5*-S.y+.5)*u.height)}let Ep,l0;Xn("CircleBucket",g1,{omit:["layers"]});var Ef={get paint(){return l0=l0||new or({"circle-radius":new Pi(ot.paint_circle["circle-radius"]),"circle-color":new Pi(ot.paint_circle["circle-color"]),"circle-blur":new Pi(ot.paint_circle["circle-blur"]),"circle-opacity":new Pi(ot.paint_circle["circle-opacity"]),"circle-translate":new Jn(ot.paint_circle["circle-translate"]),"circle-translate-anchor":new Jn(ot.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Jn(ot.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Jn(ot.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Pi(ot.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Pi(ot.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Pi(ot.paint_circle["circle-stroke-opacity"])})},get layout(){return Ep=Ep||new or({"circle-sort-key":new Pi(ot.layout_circle["circle-sort-key"])})}};class Vb extends qu{constructor(u,d){super(u,Ef,d)}createBucket(u){return new g1(u)}queryRadius(u){const d=u;return Sp("circle-radius",this,d)+Sp("circle-stroke-width",this,d)+Qa(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:u,feature:d,featureState:b,geometry:S,transform:k,pixelsToTileUnits:D,unwrappedTileID:K,getElevation:W}){const ee=ws(u,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-k.bearingInRadians,D),re=this.paint.get("circle-radius").evaluate(d,b)+this.paint.get("circle-stroke-width").evaluate(d,b),he=this.paint.get("circle-pitch-scale"),Oe=this.paint.get("circle-pitch-alignment");let De,Ke;return Oe==="map"?(De=ee,Ke=re*D):(De=(function(Ge,Ve,at,Tt){return Ge.map((ft=>Hi(ft,Ve,at,Tt)))})(ee,k,K,W),Ke=re),Sf({queryGeometry:De,size:Ke,transform:k,unwrappedTileID:K,getElevation:W,pitchAlignment:Oe,pitchScale:he},S)}}class Pm extends g1{}let u0;Xn("HeatmapBucket",Pm,{omit:["layers"]});var Pl={get paint(){return u0=u0||new or({"heatmap-radius":new Pi(ot.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Pi(ot.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Jn(ot.paint_heatmap["heatmap-intensity"]),"heatmap-color":new xp(ot.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Jn(ot.paint_heatmap["heatmap-opacity"])})}};function w1(f,{width:u,height:d},b,S){if(S){if(S instanceof Uint8ClampedArray)S=new Uint8Array(S.buffer);else if(S.length!==u*d*b)throw new RangeError(`mismatched image size. expected: ${S.length} but got: ${u*d*b}`)}else S=new Uint8Array(u*d*b);return f.width=u,f.height=d,f.data=S,f}function S1(f,{width:u,height:d},b){if(u===f.width&&d===f.height)return;const S=w1({},{width:u,height:d},b);Op(f,S,{x:0,y:0},{x:0,y:0},{width:Math.min(f.width,u),height:Math.min(f.height,d)},b),f.width=u,f.height=d,f.data=S.data}function Op(f,u,d,b,S,k){if(S.width===0||S.height===0)return u;if(S.width>f.width||S.height>f.height||d.x>f.width-S.width||d.y>f.height-S.height)throw new RangeError("out of range source coordinates for image copy");if(S.width>u.width||S.height>u.height||b.x>u.width-S.width||b.y>u.height-S.height)throw new RangeError("out of range destination coordinates for image copy");const D=f.data,K=u.data;if(D===K)throw new Error("srcData equals dstData, so image is already copied");for(let W=0;W<S.height;W++){const ee=((d.y+W)*f.width+d.x)*k,re=((b.y+W)*u.width+b.x)*k;for(let he=0;he<S.width*k;he++)K[re+he]=D[ee+he]}return u}class Bp{constructor(u,d){w1(this,u,1,d)}resize(u){S1(this,u,1)}clone(){return new Bp({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,d,b,S,k){Op(u,d,b,S,k,1)}}class eu{constructor(u,d){w1(this,u,4,d)}resize(u){S1(this,u,4)}replace(u,d){d?this.data.set(u):this.data=u instanceof Uint8ClampedArray?new Uint8Array(u.buffer):u}clone(){return new eu({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,d,b,S,k){Op(u,d,b,S,k,4)}setPixel(u,d,b){const S=4*(u*this.width+d);this.data[S+0]=Math.round(255*b.r/b.a),this.data[S+1]=Math.round(255*b.g/b.a),this.data[S+2]=Math.round(255*b.b/b.a),this.data[S+3]=Math.round(255*b.a)}}function E1(f){const u={},d=f.resolution||256,b=f.clips?f.clips.length:1,S=f.image||new eu({width:d,height:b});if(Math.log(d)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${d}`);const k=(D,K,W)=>{u[f.evaluationKey]=W;const ee=f.expression.evaluate(u);S.setPixel(D/4/d,K/4,ee)};if(f.clips)for(let D=0,K=0;D<b;++D,K+=4*d)for(let W=0,ee=0;W<d;W++,ee+=4){const re=W/(d-1),{start:he,end:Oe}=f.clips[D];k(K,ee,he*(1-re)+Oe*re)}else for(let D=0,K=0;D<d;D++,K+=4)k(0,K,D/(d-1));return S}Xn("AlphaImage",Bp),Xn("RGBAImage",eu);const O1="big-fb";class Bd extends qu{createBucket(u){return new Pm(u)}constructor(u,d){super(u,Pl,d),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(u){u==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=E1({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(O1)&&this.heatmapFbos.delete(O1)}queryRadius(u){return Sp("heatmap-radius",this,u)}queryIntersectsFeature({queryGeometry:u,feature:d,featureState:b,geometry:S,transform:k,pixelsToTileUnits:D,unwrappedTileID:K,getElevation:W}){return Sf({queryGeometry:u,size:this.paint.get("heatmap-radius").evaluate(d,b)*D,transform:k,unwrappedTileID:K,getElevation:W},S)}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let wA;var Hu={get paint(){return wA=wA||new or({"hillshade-illumination-direction":new Jn(ot.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-altitude":new Jn(ot.paint_hillshade["hillshade-illumination-altitude"]),"hillshade-illumination-anchor":new Jn(ot.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Jn(ot.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Jn(ot.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Jn(ot.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Jn(ot.paint_hillshade["hillshade-accent-color"]),"hillshade-method":new Jn(ot.paint_hillshade["hillshade-method"])})}};class B1 extends qu{constructor(u,d){super(u,Hu,d),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let u=this.paint.get("hillshade-illumination-direction").values,d=this.paint.get("hillshade-illumination-altitude").values,b=this.paint.get("hillshade-highlight-color").values,S=this.paint.get("hillshade-shadow-color").values;const k=Math.max(u.length,d.length,b.length,S.length);u=u.concat(Array(k-u.length).fill(u.at(-1))),d=d.concat(Array(k-d.length).fill(d.at(-1))),b=b.concat(Array(k-b.length).fill(b.at(-1))),S=S.concat(Array(k-S.length).fill(S.at(-1)));const D=d.map(li);return{directionRadians:u.map(li),altitudeRadians:D,shadowColor:S,highlightColor:b}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}let Ph;var I1={get paint(){return Ph=Ph||new or({"color-relief-opacity":new Jn(ot["paint_color-relief"]["color-relief-opacity"]),"color-relief-color":new xp(ot["paint_color-relief"]["color-relief-color"])})}};class Um{constructor(u,d,b,S){this.context=u,this.format=b,this.texture=u.gl.createTexture(),this.update(d,S)}update(u,d,b){const{width:S,height:k}=u,D=!(this.size&&this.size[0]===S&&this.size[1]===k||b),{context:K}=this,{gl:W}=K;if(this.useMipmap=!!(d&&d.useMipmap),W.bindTexture(W.TEXTURE_2D,this.texture),K.pixelStoreUnpackFlipY.set(!1),K.pixelStoreUnpack.set(1),K.pixelStoreUnpackPremultiplyAlpha.set(this.format===W.RGBA&&(!d||d.premultiply!==!1)),D)this.size=[S,k],u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||Rn(u)?W.texImage2D(W.TEXTURE_2D,0,this.format,this.format,W.UNSIGNED_BYTE,u):W.texImage2D(W.TEXTURE_2D,0,this.format,S,k,0,this.format,W.UNSIGNED_BYTE,u.data);else{const{x:ee,y:re}=b||{x:0,y:0};u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||Rn(u)?W.texSubImage2D(W.TEXTURE_2D,0,ee,re,W.RGBA,W.UNSIGNED_BYTE,u):W.texSubImage2D(W.TEXTURE_2D,0,ee,re,S,k,W.RGBA,W.UNSIGNED_BYTE,u.data)}this.useMipmap&&this.isSizePowerOfTwo()&&W.generateMipmap(W.TEXTURE_2D),K.pixelStoreUnpackFlipY.setDefault(),K.pixelStoreUnpack.setDefault(),K.pixelStoreUnpackPremultiplyAlpha.setDefault()}bind(u,d,b){const{context:S}=this,{gl:k}=S;k.bindTexture(k.TEXTURE_2D,this.texture),b!==k.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(b=k.LINEAR),u!==this.filter&&(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,u),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,b||u),this.filter=u),d!==this.wrap&&(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,d),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,d),this.wrap=d)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:u}=this.context;u.deleteTexture(this.texture),this.texture=null}}class Km{constructor(u,d,b,S=1,k=1,D=1,K=0){if(this.uid=u,d.height!==d.width)throw new RangeError("DEM tiles must be square");if(b&&!["mapbox","terrarium","custom"].includes(b))return void mt(`"${b}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=d.height;const W=this.dim=d.height-2;switch(this.data=new Uint32Array(d.data.buffer),b){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=S,this.greenFactor=k,this.blueFactor=D,this.baseShift=K;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let ee=0;ee<W;ee++)this.data[this._idx(-1,ee)]=this.data[this._idx(0,ee)],this.data[this._idx(W,ee)]=this.data[this._idx(W-1,ee)],this.data[this._idx(ee,-1)]=this.data[this._idx(ee,0)],this.data[this._idx(ee,W)]=this.data[this._idx(ee,W-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(W,-1)]=this.data[this._idx(W-1,0)],this.data[this._idx(-1,W)]=this.data[this._idx(0,W-1)],this.data[this._idx(W,W)]=this.data[this._idx(W-1,W-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let ee=0;ee<W;ee++)for(let re=0;re<W;re++){const he=this.get(ee,re);he>this.max&&(this.max=he),he<this.min&&(this.min=he)}}get(u,d){const b=new Uint8Array(this.data.buffer),S=4*this._idx(u,d);return this.unpack(b[S],b[S+1],b[S+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(u,d){if(u<-1||u>=this.dim+1||d<-1||d>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(d+1)*this.stride+(u+1)}unpack(u,d,b){return u*this.redFactor+d*this.greenFactor+b*this.blueFactor-this.baseShift}pack(u){return Ss(u,this.getUnpackVector())}getPixels(){return new eu({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(u,d,b){if(this.dim!==u.dim)throw new Error("dem dimension mismatch");let S=d*this.dim,k=d*this.dim+this.dim,D=b*this.dim,K=b*this.dim+this.dim;switch(d){case-1:S=k-1;break;case 1:k=S+1}switch(b){case-1:D=K-1;break;case 1:K=D+1}const W=-d*this.dim,ee=-b*this.dim;for(let re=D;re<K;re++)for(let he=S;he<k;he++)this.data[this._idx(he,re)]=u.data[this._idx(he+W,re+ee)]}}function Ss(f,u){const d=u[0],b=u[1],S=u[2],k=u[3],D=Math.min(d,b,S),K=Math.round((f+k)/D);return{r:Math.floor(K*D/d)%256,g:Math.floor(K*D/b)%256,b:Math.floor(K*D/S)%256}}Xn("DEMData",Km);class Hb extends qu{constructor(u,d){super(u,I1,d)}_createColorRamp(u){const d={elevationStops:[],colorStops:[]},b=this._transitionablePaint._values["color-relief-color"].value.expression;if(b instanceof wh&&b._styleExpression.expression instanceof ts){this.colorRampExpression=b;const D=b._styleExpression.expression;d.elevationStops=D.labels,d.colorStops=[];for(const K of d.elevationStops)d.colorStops.push(D.evaluate({globals:{elevation:K}}))}if(d.elevationStops.length<1&&(d.elevationStops=[0],d.colorStops=[er.transparent]),d.elevationStops.length<2&&(d.elevationStops.push(d.elevationStops[0]+1),d.colorStops.push(d.colorStops[0])),d.elevationStops.length<=u)return d;const S={elevationStops:[],colorStops:[]},k=(d.elevationStops.length-1)/(u-1);for(let D=0;D<d.elevationStops.length-.5;D+=k)S.elevationStops.push(d.elevationStops[Math.round(D)]),S.colorStops.push(d.colorStops[Math.round(D)]);return mt(`Too many colors in specification of ${this.id} color-relief layer, may not render properly.`),S}_colorRampChanged(){return this.colorRampExpression!=this._transitionablePaint._values["color-relief-color"].value.expression}getColorRampTextures(u,d,b){if(this.colorRampTextures&&!this._colorRampChanged())return this.colorRampTextures;const S=this._createColorRamp(d),k=new eu({width:S.colorStops.length,height:1}),D=new eu({width:S.colorStops.length,height:1});for(let K=0;K<S.elevationStops.length;K++){const W=Ss(S.elevationStops[K],b);D.setPixel(0,K,new er(W.r/255,W.g/255,W.b/255,1)),k.setPixel(0,K,S.colorStops[K])}return this.colorRampTextures={elevationTexture:new Um(u,D,u.gl.RGBA),colorTexture:new Um(u,k,u.gl.RGBA)},this.colorRampTextures}hasOffscreenPass(){return this.visibility!=="none"&&!!this.colorRampTextures}}const Zb=ks([{name:"a_pos",components:2,type:"Int16"}],4),{members:Xb}=Zb;function Ip(f,u,d){const b=d.patternDependencies;let S=!1;for(const k of u){const D=k.paint.get(`${f}-pattern`);D.isConstant()||(S=!0);const K=D.constantOr(null);K&&(S=!0,b[K.to]=!0,b[K.from]=!0)}return S}function Uh(f,u,d,b,S){const{zoom:k}=b,D=S.patternDependencies;for(const K of u){const W=K.paint.get(`${f}-pattern`).value;if(W.kind!=="constant"){let ee=W.evaluate({zoom:k-1},d,{},S.availableImages),re=W.evaluate({zoom:k},d,{},S.availableImages),he=W.evaluate({zoom:k+1},d,{},S.availableImages);ee=ee&&ee.name?ee.name:ee,re=re&&re.name?re.name:re,he=he&&he.name?he.name:he,D[ee]=!0,D[re]=!0,D[he]=!0,d.patterns[K.id]={min:ee,mid:re,max:he}}}return d}function lv(f,u,d,b,S){let k;if(S===(function(D,K,W,ee){let re=0;for(let he=K,Oe=W-ee;he<W;he+=ee)re+=(D[Oe]-D[he])*(D[he+1]+D[Oe+1]),Oe=he;return re})(f,u,d,b)>0)for(let D=u;D<d;D+=b)k=cv(D/b|0,f[D],f[D+1],k);else for(let D=d-b;D>=u;D-=b)k=cv(D/b|0,f[D],f[D+1],k);return k&&Fm(k,k.next)&&(zm(k),k=k.next),k}function Id(f,u){if(!f)return f;u||(u=f);let d,b=f;do if(d=!1,b.steiner||!Fm(b,b.next)&&Wr(b.prev,b,b.next)!==0)b=b.next;else{if(zm(b),b=u=b.prev,b===b.next)break;d=!0}while(d||b!==u);return u}function Kh(f,u,d,b,S,k,D){if(!f)return;!D&&k&&(function(W,ee,re,he){let Oe=W;do Oe.z===0&&(Oe.z=kp(Oe.x,Oe.y,ee,re,he)),Oe.prevZ=Oe.prev,Oe.nextZ=Oe.next,Oe=Oe.next;while(Oe!==W);Oe.prevZ.nextZ=null,Oe.prevZ=null,(function(De){let Ke,Ge=1;do{let Ve,at=De;De=null;let Tt=null;for(Ke=0;at;){Ke++;let ft=at,_t=0;for(let Jt=0;Jt<Ge&&(_t++,ft=ft.nextZ,ft);Jt++);let Nt=Ge;for(;_t>0||Nt>0&&ft;)_t!==0&&(Nt===0||!ft||at.z<=ft.z)?(Ve=at,at=at.nextZ,_t--):(Ve=ft,ft=ft.nextZ,Nt--),Tt?Tt.nextZ=Ve:De=Ve,Ve.prevZ=Tt,Tt=Ve;at=ft}Tt.nextZ=null,Ge*=2}while(Ke>1)})(Oe)})(f,b,S,k);let K=f;for(;f.prev!==f.next;){const W=f.prev,ee=f.next;if(k?k1(f,b,S,k):Lh(f))u.push(W.i,f.i,ee.i),zm(f),f=ee.next,K=ee.next;else if((f=ee)===K){D?D===1?Kh(f=T1(Id(f),u),u,d,b,S,k,2):D===2&&Lm(f,u,d,b,S,k):Kh(Id(f),u,d,b,S,k,1);break}}}function Lh(f){const u=f.prev,d=f,b=f.next;if(Wr(u,d,b)>=0)return!1;const S=u.x,k=d.x,D=b.x,K=u.y,W=d.y,ee=b.y,re=Math.min(S,k,D),he=Math.min(K,W,ee),Oe=Math.max(S,k,D),De=Math.max(K,W,ee);let Ke=b.next;for(;Ke!==u;){if(Ke.x>=re&&Ke.x<=Oe&&Ke.y>=he&&Ke.y<=De&&eA(S,K,k,W,D,ee,Ke.x,Ke.y)&&Wr(Ke.prev,Ke,Ke.next)>=0)return!1;Ke=Ke.next}return!0}function k1(f,u,d,b){const S=f.prev,k=f,D=f.next;if(Wr(S,k,D)>=0)return!1;const K=S.x,W=k.x,ee=D.x,re=S.y,he=k.y,Oe=D.y,De=Math.min(K,W,ee),Ke=Math.min(re,he,Oe),Ge=Math.max(K,W,ee),Ve=Math.max(re,he,Oe),at=kp(De,Ke,u,d,b),Tt=kp(Ge,Ve,u,d,b);let ft=f.prevZ,_t=f.nextZ;for(;ft&&ft.z>=at&&_t&&_t.z<=Tt;){if(ft.x>=De&&ft.x<=Ge&&ft.y>=Ke&&ft.y<=Ve&&ft!==S&&ft!==D&&eA(K,re,W,he,ee,Oe,ft.x,ft.y)&&Wr(ft.prev,ft,ft.next)>=0||(ft=ft.prevZ,_t.x>=De&&_t.x<=Ge&&_t.y>=Ke&&_t.y<=Ve&&_t!==S&&_t!==D&&eA(K,re,W,he,ee,Oe,_t.x,_t.y)&&Wr(_t.prev,_t,_t.next)>=0))return!1;_t=_t.nextZ}for(;ft&&ft.z>=at;){if(ft.x>=De&&ft.x<=Ge&&ft.y>=Ke&&ft.y<=Ve&&ft!==S&&ft!==D&&eA(K,re,W,he,ee,Oe,ft.x,ft.y)&&Wr(ft.prev,ft,ft.next)>=0)return!1;ft=ft.prevZ}for(;_t&&_t.z<=Tt;){if(_t.x>=De&&_t.x<=Ge&&_t.y>=Ke&&_t.y<=Ve&&_t!==S&&_t!==D&&eA(K,re,W,he,ee,Oe,_t.x,_t.y)&&Wr(_t.prev,_t,_t.next)>=0)return!1;_t=_t.nextZ}return!0}function T1(f,u){let d=f;do{const b=d.prev,S=d.next.next;!Fm(b,S)&&uv(b,d,d.next,S)&&Ul(b,S)&&Ul(S,b)&&(u.push(b.i,d.i,S.i),zm(d),zm(d.next),d=f=S),d=d.next}while(d!==f);return Id(d)}function Lm(f,u,d,b,S,k){let D=f;do{let K=D.next.next;for(;K!==D.prev;){if(D.i!==K.i&&Jb(D,K)){let W=zh(D,K);return D=Id(D,D.next),W=Id(W,W.next),Kh(D,u,d,b,S,k,0),void Kh(W,u,d,b,S,k,0)}K=K.next}D=D.next}while(D!==f)}function c0(f,u){let d=f.x-u.x;return d===0&&(d=f.y-u.y,d===0)&&(d=(f.next.y-f.y)/(f.next.x-f.x)-(u.next.y-u.y)/(u.next.x-u.x)),d}function R1(f,u){const d=(function(S,k){let D=k;const K=S.x,W=S.y;let ee,re=-1/0;if(Fm(S,D))return D;do{if(Fm(S,D.next))return D.next;if(W<=D.y&&W>=D.next.y&&D.next.y!==D.y){const Ge=D.x+(W-D.y)*(D.next.x-D.x)/(D.next.y-D.y);if(Ge<=K&&Ge>re&&(re=Ge,ee=D.x<D.next.x?D:D.next,Ge===K))return ee}D=D.next}while(D!==k);if(!ee)return null;const he=ee,Oe=ee.x,De=ee.y;let Ke=1/0;D=ee;do{if(K>=D.x&&D.x>=Oe&&K!==D.x&&Yo(W<De?K:re,W,Oe,De,W<De?re:K,W,D.x,D.y)){const Ge=Math.abs(W-D.y)/(K-D.x);Ul(D,S)&&(Ge<Ke||Ge===Ke&&(D.x>ee.x||D.x===ee.x&&A0(ee,D)))&&(ee=D,Ke=Ge)}D=D.next}while(D!==he);return ee})(f,u);if(!d)return u;const b=zh(d,f);return Id(b,b.next),Id(d,d.next)}function A0(f,u){return Wr(f.prev,f,u.prev)<0&&Wr(u.next,f,f.next)<0}function kp(f,u,d,b,S){return(f=1431655765&((f=858993459&((f=252645135&((f=16711935&((f=(f-d)*S|0)|f<<8))|f<<4))|f<<2))|f<<1))|(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-b)*S|0)|u<<8))|u<<4))|u<<2))|u<<1))<<1}function Fh(f){let u=f,d=f;do(u.x<d.x||u.x===d.x&&u.y<d.y)&&(d=u),u=u.next;while(u!==f);return d}function Yo(f,u,d,b,S,k,D,K){return(S-D)*(u-K)>=(f-D)*(k-K)&&(f-D)*(b-K)>=(d-D)*(u-K)&&(d-D)*(k-K)>=(S-D)*(b-K)}function eA(f,u,d,b,S,k,D,K){return!(f===D&&u===K)&&Yo(f,u,d,b,S,k,D,K)}function Jb(f,u){return f.next.i!==u.i&&f.prev.i!==u.i&&!(function(d,b){let S=d;do{if(S.i!==d.i&&S.next.i!==d.i&&S.i!==b.i&&S.next.i!==b.i&&uv(S,S.next,d,b))return!0;S=S.next}while(S!==d);return!1})(f,u)&&(Ul(f,u)&&Ul(u,f)&&(function(d,b){let S=d,k=!1;const D=(d.x+b.x)/2,K=(d.y+b.y)/2;do S.y>K!=S.next.y>K&&S.next.y!==S.y&&D<(S.next.x-S.x)*(K-S.y)/(S.next.y-S.y)+S.x&&(k=!k),S=S.next;while(S!==d);return k})(f,u)&&(Wr(f.prev,f,u.prev)||Wr(f,u.prev,u))||Fm(f,u)&&Wr(f.prev,f,f.next)>0&&Wr(u.prev,u,u.next)>0)}function Wr(f,u,d){return(u.y-f.y)*(d.x-u.x)-(u.x-f.x)*(d.y-u.y)}function Fm(f,u){return f.x===u.x&&f.y===u.y}function uv(f,u,d,b){const S=Rs(Wr(f,u,d)),k=Rs(Wr(f,u,b)),D=Rs(Wr(d,b,f)),K=Rs(Wr(d,b,u));return S!==k&&D!==K||!(S!==0||!h0(f,d,u))||!(k!==0||!h0(f,b,u))||!(D!==0||!h0(d,f,b))||!(K!==0||!h0(d,u,b))}function h0(f,u,d){return u.x<=Math.max(f.x,d.x)&&u.x>=Math.min(f.x,d.x)&&u.y<=Math.max(f.y,d.y)&&u.y>=Math.min(f.y,d.y)}function Rs(f){return f>0?1:f<0?-1:0}function Ul(f,u){return Wr(f.prev,f,f.next)<0?Wr(f,u,f.next)>=0&&Wr(f,f.prev,u)>=0:Wr(f,u,f.prev)<0||Wr(f,f.next,u)<0}function zh(f,u){const d=Av(f.i,f.x,f.y),b=Av(u.i,u.x,u.y),S=f.next,k=u.prev;return f.next=u,u.prev=f,d.next=S,S.prev=d,b.next=d,d.prev=b,k.next=b,b.prev=k,b}function cv(f,u,d,b){const S=Av(f,u,d);return b?(S.next=b.next,S.prev=b,b.next.prev=S,b.next=S):(S.prev=S,S.next=S),S}function zm(f){f.next.prev=f.prev,f.prev.next=f.next,f.prevZ&&(f.prevZ.nextZ=f.nextZ),f.nextZ&&(f.nextZ.prevZ=f.prevZ)}function Av(f,u,d){return{i:f,x:u,y:d,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Of{constructor(u,d){if(d>u)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=u,this._minGranularity=d}getGranularityForZoomLevel(u){return Math.max(Math.floor(this._baseZoomGranularity/(1<<u)),this._minGranularity,1)}}class Mu{constructor(u){this.fill=u.fill,this.line=u.line,this.tile=u.tile,this.stencil=u.stencil,this.circle=u.circle}}Mu.noSubdivision=new Mu({fill:new Of(0,0),line:new Of(0,0),tile:new Of(0,0),stencil:new Of(0,0),circle:1}),Xn("SubdivisionGranularityExpression",Of),Xn("SubdivisionGranularitySetting",Mu);const tu=-32768,Tp=32767;class Sc{constructor(u,d){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=u,this._granularityCellSize=ht/u,this._canonical=d}_getKey(u,d){return(u+=32768)<<16|d+32768}_vertexToIndex(u,d){if(u<-32768||d<-32768||u>32767||d>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const b=0|Math.round(u),S=0|Math.round(d),k=this._getKey(b,S);if(this._vertexDictionary.has(k))return this._vertexDictionary.get(k);const D=this._vertexBuffer.length/2;return this._vertexDictionary.set(k,D),this._vertexBuffer.push(b,S),D}_subdivideTrianglesScanline(u){if(this._granularity<2)return(function(S,k){const D=[];for(let K=0;K<k.length;K+=3){const W=k[K],ee=k[K+1],re=k[K+2],he=S[2*W],Oe=S[2*W+1];(S[2*ee]-he)*(S[2*re+1]-Oe)-(S[2*ee+1]-Oe)*(S[2*re]-he)>0?(D.push(W),D.push(re),D.push(ee)):(D.push(W),D.push(ee),D.push(re))}return D})(this._vertexBuffer,u);const d=[],b=u.length;for(let S=0;S<b;S+=3){const k=[u[S+0],u[S+1],u[S+2]],D=[this._vertexBuffer[2*u[S+0]+0],this._vertexBuffer[2*u[S+0]+1],this._vertexBuffer[2*u[S+1]+0],this._vertexBuffer[2*u[S+1]+1],this._vertexBuffer[2*u[S+2]+0],this._vertexBuffer[2*u[S+2]+1]];let K=1/0,W=1/0,ee=-1/0,re=-1/0;for(let Ge=0;Ge<3;Ge++){const Ve=D[2*Ge],at=D[2*Ge+1];K=Math.min(K,Ve),ee=Math.max(ee,Ve),W=Math.min(W,at),re=Math.max(re,at)}if(K===ee||W===re)continue;const he=Math.floor(K/this._granularityCellSize),Oe=Math.ceil(ee/this._granularityCellSize),De=Math.floor(W/this._granularityCellSize),Ke=Math.ceil(re/this._granularityCellSize);if(he!==Oe||De!==Ke)for(let Ge=De;Ge<Ke;Ge++){const Ve=this._scanlineGenerateVertexRingForCellRow(Ge,D,k);Rp(this._vertexBuffer,Ve,d)}else d.push(...k)}return d}_scanlineGenerateVertexRingForCellRow(u,d,b){const S=u*this._granularityCellSize,k=S+this._granularityCellSize,D=[];for(let K=0;K<3;K++){const W=d[2*K],ee=d[2*K+1],re=d[2*(K+1)%6],he=d[(2*(K+1)+1)%6],Oe=d[2*(K+2)%6],De=d[(2*(K+2)+1)%6],Ke=re-W,Ge=he-ee,Ve=Ke===0,at=Ge===0,Tt=(S-ee)/Ge,ft=(k-ee)/Ge,_t=Math.min(Tt,ft),Nt=Math.max(Tt,ft);if(!at&&(_t>=1||Nt<=0)||at&&(ee<S||ee>k)){he>=S&&he<=k&&D.push(b[(K+1)%3]);continue}!at&&_t>0&&D.push(this._vertexToIndex(W+Ke*_t,ee+Ge*_t));const Jt=W+Ke*Math.max(_t,0),An=W+Ke*Math.min(Nt,1);Ve||this._generateIntraEdgeVertices(D,W,ee,re,he,Jt,An),!at&&Nt<1&&D.push(this._vertexToIndex(W+Ke*Nt,ee+Ge*Nt)),(at||he>=S&&he<=k)&&D.push(b[(K+1)%3]),!at&&(he<=S||he>=k)&&this._generateInterEdgeVertices(D,W,ee,re,he,Oe,De,An,S,k)}return D}_generateIntraEdgeVertices(u,d,b,S,k,D,K){const W=S-d,ee=k-b,re=ee===0,he=re?Math.min(d,S):Math.min(D,K),Oe=re?Math.max(d,S):Math.max(D,K),De=Math.floor(he/this._granularityCellSize)+1,Ke=Math.ceil(Oe/this._granularityCellSize)-1;if(re?d<S:D<K)for(let Ge=De;Ge<=Ke;Ge++){const Ve=Ge*this._granularityCellSize;u.push(this._vertexToIndex(Ve,b+ee*(Ve-d)/W))}else for(let Ge=Ke;Ge>=De;Ge--){const Ve=Ge*this._granularityCellSize;u.push(this._vertexToIndex(Ve,b+ee*(Ve-d)/W))}}_generateInterEdgeVertices(u,d,b,S,k,D,K,W,ee,re){const he=k-b,Oe=D-S,De=K-k,Ke=(ee-k)/De,Ge=(re-k)/De,Ve=Math.min(Ke,Ge),at=Math.max(Ke,Ge),Tt=S+Oe*Ve;let ft=Math.floor(Math.min(Tt,W)/this._granularityCellSize)+1,_t=Math.ceil(Math.max(Tt,W)/this._granularityCellSize)-1,Nt=W<Tt;const Jt=De===0;if(Jt&&(K===ee||K===re))return;if(Jt||Ve>=1||at<=0){const Wn=b-K,Dn=D+(d-D)*Math.min((ee-K)/Wn,(re-K)/Wn);ft=Math.floor(Math.min(Dn,W)/this._granularityCellSize)+1,_t=Math.ceil(Math.max(Dn,W)/this._granularityCellSize)-1,Nt=W<Dn}const An=he>0?re:ee;if(Nt)for(let Wn=ft;Wn<=_t;Wn++)u.push(this._vertexToIndex(Wn*this._granularityCellSize,An));else for(let Wn=_t;Wn>=ft;Wn--)u.push(this._vertexToIndex(Wn*this._granularityCellSize,An))}_generateOutline(u){const d=[];for(const b of u){const S=Ec(b,this._granularity,!0),k=this._pointArrayToIndices(S),D=[];for(let K=1;K<k.length;K++)D.push(k[K-1]),D.push(k[K]);d.push(D)}return d}_handlePoles(u){let d=!1,b=!1;this._canonical&&(this._canonical.y===0&&(d=!0),this._canonical.y===(1<<this._canonical.z)-1&&(b=!0)),(d||b)&&this._fillPoles(u,d,b)}_ensureNoPoleVertices(){const u=this._vertexBuffer;for(let d=0;d<u.length;d+=2){const b=u[d+1];b===tu&&(u[d+1]=-32767),b===Tp&&(u[d+1]=32766)}}_generatePoleQuad(u,d,b,S,k,D){S>k!=(D===tu)?(u.push(d),u.push(b),u.push(this._vertexToIndex(S,D)),u.push(b),u.push(this._vertexToIndex(k,D)),u.push(this._vertexToIndex(S,D))):(u.push(b),u.push(d),u.push(this._vertexToIndex(S,D)),u.push(this._vertexToIndex(k,D)),u.push(b),u.push(this._vertexToIndex(S,D)))}_fillPoles(u,d,b){const S=this._vertexBuffer,k=ht,D=u.length;for(let K=2;K<D;K+=3){const W=u[K-2],ee=u[K-1],re=u[K],he=S[2*W],Oe=S[2*W+1],De=S[2*ee],Ke=S[2*ee+1],Ge=S[2*re],Ve=S[2*re+1];d&&(Oe===0&&Ke===0&&this._generatePoleQuad(u,W,ee,he,De,tu),Ke===0&&Ve===0&&this._generatePoleQuad(u,ee,re,De,Ge,tu),Ve===0&&Oe===0&&this._generatePoleQuad(u,re,W,Ge,he,tu)),b&&(Oe===k&&Ke===k&&this._generatePoleQuad(u,W,ee,he,De,Tp),Ke===k&&Ve===k&&this._generatePoleQuad(u,ee,re,De,Ge,Tp),Ve===k&&Oe===k&&this._generatePoleQuad(u,re,W,Ge,he,Tp))}}_initializeVertices(u){for(let d=0;d<u.length;d+=2)this._vertexToIndex(u[d],u[d+1])}subdividePolygonInternal(u,d){if(this._used)throw new Error("Subdivision: multiple use not allowed.");this._used=!0;const{flattened:b,holeIndices:S}=(function(K){const W=[],ee=[];for(const re of K)if(re.length!==0){re!==K[0]&&W.push(ee.length/2);for(let he=0;he<re.length;he++)ee.push(re[he].x),ee.push(re[he].y)}return{flattened:ee,holeIndices:W}})(u);let k;this._initializeVertices(b);try{const K=(function(ee,re,he=2){const Oe=re&&re.length,De=Oe?re[0]*he:ee.length;let Ke=lv(ee,0,De,he,!0);const Ge=[];if(!Ke||Ke.next===Ke.prev)return Ge;let Ve,at,Tt;if(Oe&&(Ke=(function(ft,_t,Nt,Jt){const An=[];for(let Wn=0,Dn=_t.length;Wn<Dn;Wn++){const Nn=lv(ft,_t[Wn]*Jt,Wn<Dn-1?_t[Wn+1]*Jt:ft.length,Jt,!1);Nn===Nn.next&&(Nn.steiner=!0),An.push(Fh(Nn))}An.sort(c0);for(let Wn=0;Wn<An.length;Wn++)Nt=R1(An[Wn],Nt);return Nt})(ee,re,Ke,he)),ee.length>80*he){Ve=ee[0],at=ee[1];let ft=Ve,_t=at;for(let Nt=he;Nt<De;Nt+=he){const Jt=ee[Nt],An=ee[Nt+1];Jt<Ve&&(Ve=Jt),An<at&&(at=An),Jt>ft&&(ft=Jt),An>_t&&(_t=An)}Tt=Math.max(ft-Ve,_t-at),Tt=Tt!==0?32767/Tt:0}return Kh(Ke,Ge,he,Ve,at,Tt,0),Ge})(b,S),W=this._convertIndices(b,K);k=this._subdivideTrianglesScanline(W)}catch(K){console.error(K)}let D=[];return d&&(D=this._generateOutline(u)),this._ensureNoPoleVertices(),this._handlePoles(k),{verticesFlattened:this._vertexBuffer,indicesTriangles:k,indicesLineList:D}}_convertIndices(u,d){const b=[];for(let S=0;S<d.length;S++)b.push(this._vertexToIndex(u[2*d[S]],u[2*d[S]+1]));return b}_pointArrayToIndices(u){const d=[];for(let b=0;b<u.length;b++){const S=u[b];d.push(this._vertexToIndex(S.x,S.y))}return d}}function hv(f,u,d,b=!0){return new Sc(d,u).subdividePolygonInternal(f,b)}function Ec(f,u,d=!1){if(!f||f.length<1)return[];if(f.length<2)return[];const b=f[0],S=f[f.length-1],k=d&&(b.x!==S.x||b.y!==S.y);if(u<2)return k?[...f,f[0]]:[...f];const D=Math.floor(ht/u),K=[];K.push(new c(f[0].x,f[0].y));const W=f.length,ee=k?W:W-1;for(let re=0;re<ee;re++){const he=f[re],Oe=re<W-1?f[re+1]:f[0],De=he.x,Ke=he.y,Ge=Oe.x,Ve=Oe.y,at=De!==Ge,Tt=Ke!==Ve;if(!at&&!Tt)continue;const ft=Ge-De,_t=Ve-Ke,Nt=Math.abs(ft),Jt=Math.abs(_t);let An=De,Wn=Ke;for(;;){const Nn=ft>0?(Math.floor(An/D)+1)*D:(Math.ceil(An/D)-1)*D,Ci=_t>0?(Math.floor(Wn/D)+1)*D:(Math.ceil(Wn/D)-1)*D,jn=Math.abs(An-Nn),Un=Math.abs(Wn-Ci),rn=Math.abs(An-Ge),Ui=Math.abs(Wn-Ve),Qi=at?jn/Nt:Number.POSITIVE_INFINITY,Mi=Tt?Un/Jt:Number.POSITIVE_INFINITY;if((rn<=jn||!at)&&(Ui<=Un||!Tt))break;if(Qi<Mi&&at||!Tt){An=Nn,Wn+=_t*Qi;const oi=new c(An,Math.round(Wn));K[K.length-1].x===oi.x&&K[K.length-1].y===oi.y||K.push(oi)}else{An+=ft*Mi,Wn=Ci;const oi=new c(Math.round(An),Wn);K[K.length-1].x===oi.x&&K[K.length-1].y===oi.y||K.push(oi)}}const Dn=new c(Ge,Ve);K[K.length-1].x===Dn.x&&K[K.length-1].y===Dn.y||K.push(Dn)}return K}function Rp(f,u,d){if(u.length===0)throw new Error("Subdivision vertex ring is empty.");let b=0,S=f[2*u[0]];for(let W=1;W<u.length;W++){const ee=f[2*u[W]];ee<S&&(S=ee,b=W)}const k=u.length;let D=b,K=(D+1)%k;for(;;){const W=D-1>=0?D-1:k-1,ee=(K+1)%k,re=f[2*u[W]],he=f[2*u[ee]],Oe=f[2*u[D]],De=f[2*u[D]+1],Ke=f[2*u[K]+1];let Ge=!1;if(re<he)Ge=!0;else if(re>he)Ge=!1;else{const Ve=Ke-De,at=-(f[2*u[K]]-Oe),Tt=De<Ke?1:-1;((re-Oe)*Ve+(f[2*u[W]+1]-De)*at)*Tt>((he-Oe)*Ve+(f[2*u[ee]+1]-De)*at)*Tt&&(Ge=!0)}if(Ge){const Ve=u[W],at=u[D],Tt=u[K];Ve!==at&&Ve!==Tt&&at!==Tt&&d.push(Tt,at,Ve),D--,D<0&&(D=k-1)}else{const Ve=u[ee],at=u[D],Tt=u[K];Ve!==at&&Ve!==Tt&&at!==Tt&&d.push(Tt,at,Ve),K++,K>=k&&(K=0)}if(W===ee)break}}function jh(f,u,d,b,S,k,D,K,W){const ee=S.length/2,re=D&&K&&W;if(ee<tr.MAX_VERTEX_ARRAY_LENGTH){const he=u.prepareSegment(ee,d,b),Oe=he.vertexLength;for(let Ge=0;Ge<k.length;Ge+=3)b.emplaceBack(Oe+k[Ge],Oe+k[Ge+1],Oe+k[Ge+2]);let De,Ke;he.vertexLength+=ee,he.primitiveLength+=k.length/3,re&&(Ke=D.prepareSegment(ee,d,K),De=Ke.vertexLength,Ke.vertexLength+=ee);for(let Ge=0;Ge<S.length;Ge+=2)f(S[Ge],S[Ge+1]);if(re)for(let Ge=0;Ge<W.length;Ge++){const Ve=W[Ge];for(let at=1;at<Ve.length;at+=2)K.emplaceBack(De+Ve[at-1],De+Ve[at]);Ke.primitiveLength+=Ve.length/2}}else(function(he,Oe,De,Ke,Ge,Ve){const at=[];for(let Jt=0;Jt<Ke.length/2;Jt++)at.push(-1);const Tt={count:0};let ft=0,_t=he.getOrCreateLatestSegment(Oe,De),Nt=_t.vertexLength;for(let Jt=2;Jt<Ge.length;Jt+=3){const An=Ge[Jt-2],Wn=Ge[Jt-1],Dn=Ge[Jt];let Nn=at[An]<ft,Ci=at[Wn]<ft,jn=at[Dn]<ft;_t.vertexLength+((Nn?1:0)+(Ci?1:0)+(jn?1:0))>tr.MAX_VERTEX_ARRAY_LENGTH&&(_t=he.createNewSegment(Oe,De),ft=Tt.count,Nn=!0,Ci=!0,jn=!0,Nt=0);const Un=Dp(at,Ke,Ve,Tt,An,Nn,_t),rn=Dp(at,Ke,Ve,Tt,Wn,Ci,_t),Ui=Dp(at,Ke,Ve,Tt,Dn,jn,_t);De.emplaceBack(Nt+Un-ft,Nt+rn-ft,Nt+Ui-ft),_t.primitiveLength++}})(u,d,b,S,k,f),re&&(function(he,Oe,De,Ke,Ge,Ve){const at=[];for(let Jt=0;Jt<Ke.length/2;Jt++)at.push(-1);const Tt={count:0};let ft=0,_t=he.getOrCreateLatestSegment(Oe,De),Nt=_t.vertexLength;for(let Jt=0;Jt<Ge.length;Jt++){const An=Ge[Jt];for(let Wn=1;Wn<Ge[Jt].length;Wn+=2){const Dn=An[Wn-1],Nn=An[Wn];let Ci=at[Dn]<ft,jn=at[Nn]<ft;_t.vertexLength+((Ci?1:0)+(jn?1:0))>tr.MAX_VERTEX_ARRAY_LENGTH&&(_t=he.createNewSegment(Oe,De),ft=Tt.count,Ci=!0,jn=!0,Nt=0);const Un=Dp(at,Ke,Ve,Tt,Dn,Ci,_t),rn=Dp(at,Ke,Ve,Tt,Nn,jn,_t);De.emplaceBack(Nt+Un-ft,Nt+rn-ft),_t.primitiveLength++}}})(D,d,K,S,W,f),u.forceNewSegmentOnNextPrepare(),D?.forceNewSegmentOnNextPrepare()}function Dp(f,u,d,b,S,k,D){if(k){const K=b.count;return d(u[2*S],u[2*S+1]),f[S]=b.count,b.count++,D.vertexLength++,K}return f[S]}class d0{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((d=>d.id)),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Kt,this.indexArray=new Hr,this.indexArray2=new cs,this.programConfigurations=new Wa(u.layers,u.zoom),this.segments=new tr,this.segments2=new tr,this.stateDependentLayerIds=this.layers.filter((d=>d.isStateDependent())).map((d=>d.id))}populate(u,d,b){this.hasPattern=Ip("fill",this.layers,d);const S=this.layers[0].layout.get("fill-sort-key"),k=!S.isConstant(),D=[];for(const{feature:K,id:W,index:ee,sourceLayerIndex:re}of u){const he=this.layers[0]._featureFilter.needGeometry,Oe=xA(K,he);if(!this.layers[0]._featureFilter.filter(new Ao(this.zoom),Oe,b))continue;const De=k?S.evaluate(Oe,{},b,d.availableImages):void 0,Ke={id:W,properties:K.properties,type:K.type,sourceLayerIndex:re,index:ee,geometry:he?Oe.geometry:Vu(K),patterns:{},sortKey:De};D.push(Ke)}k&&D.sort(((K,W)=>K.sortKey-W.sortKey));for(const K of D){const{geometry:W,index:ee,sourceLayerIndex:re}=K;if(this.hasPattern){const he=Uh("fill",this.layers,K,{zoom:this.zoom},d);this.patternFeatures.push(he)}else this.addFeature(K,W,ee,b,{},d.subdivisionGranularity);d.featureIndex.insert(u[ee].feature,W,ee,re,this.index)}}update(u,d,b){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,d,this.stateDependentLayers,{imagePositions:b})}addFeatures(u,d,b){for(const S of this.patternFeatures)this.addFeature(S,S.geometry,S.index,d,b,u.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Xb),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.indexBuffer2=u.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(u),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(u,d,b,S,k,D){for(const K of yh(d,500)){const W=hv(K,S,D.fill.getGranularityForZoomLevel(S.z)),ee=this.layoutVertexArray;jh(((re,he)=>{ee.emplaceBack(re,he)}),this.segments,this.layoutVertexArray,this.indexArray,W.verticesFlattened,W.indicesTriangles,this.segments2,this.indexArray2,W.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,b,{imagePositions:k,canonical:S})}}let XA,dv;Xn("FillBucket",d0,{omit:["layers","patternFeatures"]});var jm={get paint(){return dv=dv||new or({"fill-antialias":new Jn(ot.paint_fill["fill-antialias"]),"fill-opacity":new Pi(ot.paint_fill["fill-opacity"]),"fill-color":new Pi(ot.paint_fill["fill-color"]),"fill-outline-color":new Pi(ot.paint_fill["fill-outline-color"]),"fill-translate":new Jn(ot.paint_fill["fill-translate"]),"fill-translate-anchor":new Jn(ot.paint_fill["fill-translate-anchor"]),"fill-pattern":new Rl(ot.paint_fill["fill-pattern"])})},get layout(){return XA=XA||new or({"fill-sort-key":new Pi(ot.layout_fill["fill-sort-key"])})}};class f0 extends qu{constructor(u,d){super(u,jm,d)}recalculate(u,d){super.recalculate(u,d);const b=this.paint._values["fill-outline-color"];b.value.kind==="constant"&&b.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(u){return new d0(u)}queryRadius(){return Qa(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:u,geometry:d,transform:b,pixelsToTileUnits:S}){return y1(ws(u,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-b.bearingInRadians,S),d)}isTileClipped(){return!0}}const wu=ks([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Nm=ks([{name:"a_centroid",components:2,type:"Int16"}],4),{members:eC}=wu;class Pp{constructor(u,d,b,S,k){this.properties={},this.extent=b,this.type=0,this.id=void 0,this._pbf=u,this._geometry=-1,this._keys=S,this._values=k,u.readFields(Gm,this,d)}loadGeometry(){const u=this._pbf;u.pos=this._geometry;const d=u.readVarint()+u.pos,b=[];let S,k=1,D=0,K=0,W=0;for(;u.pos<d;){if(D<=0){const ee=u.readVarint();k=7&ee,D=ee>>3}if(D--,k===1||k===2)K+=u.readSVarint(),W+=u.readSVarint(),k===1&&(S&&b.push(S),S=[]),S&&S.push(new c(K,W));else{if(k!==7)throw new Error(`unknown command ${k}`);S&&S.push(S[0].clone())}}return S&&b.push(S),b}bbox(){const u=this._pbf;u.pos=this._geometry;const d=u.readVarint()+u.pos;let b=1,S=0,k=0,D=0,K=1/0,W=-1/0,ee=1/0,re=-1/0;for(;u.pos<d;){if(S<=0){const he=u.readVarint();b=7&he,S=he>>3}if(S--,b===1||b===2)k+=u.readSVarint(),D+=u.readSVarint(),k<K&&(K=k),k>W&&(W=k),D<ee&&(ee=D),D>re&&(re=D);else if(b!==7)throw new Error(`unknown command ${b}`)}return[K,ee,W,re]}toGeoJSON(u,d,b){const S=this.extent*Math.pow(2,b),k=this.extent*u,D=this.extent*d,K=this.loadGeometry();function W(Oe){return[360*(Oe.x+k)/S-180,360/Math.PI*Math.atan(Math.exp((1-2*(Oe.y+D)/S)*Math.PI))-90]}function ee(Oe){return Oe.map(W)}let re;if(this.type===1){const Oe=[];for(const Ke of K)Oe.push(Ke[0]);const De=ee(Oe);re=Oe.length===1?{type:"Point",coordinates:De[0]}:{type:"MultiPoint",coordinates:De}}else if(this.type===2){const Oe=K.map(ee);re=Oe.length===1?{type:"LineString",coordinates:Oe[0]}:{type:"MultiLineString",coordinates:Oe}}else{if(this.type!==3)throw new Error("unknown feature type");{const Oe=(function(Ke){const Ge=Ke.length;if(Ge<=1)return[Ke];const Ve=[];let at,Tt;for(let ft=0;ft<Ge;ft++){const _t=tC(Ke[ft]);_t!==0&&(Tt===void 0&&(Tt=_t<0),Tt===_t<0?(at&&Ve.push(at),at=[Ke[ft]]):at&&at.push(Ke[ft]))}return at&&Ve.push(at),Ve})(K),De=[];for(const Ke of Oe)De.push(Ke.map(ee));re=De.length===1?{type:"Polygon",coordinates:De[0]}:{type:"MultiPolygon",coordinates:De}}}const he={type:"Feature",geometry:re,properties:this.properties};return this.id!=null&&(he.id=this.id),he}}function Gm(f,u,d){f===1?u.id=d.readVarint():f===2?(function(b,S){const k=b.readVarint()+b.pos;for(;b.pos<k;){const D=S._keys[b.readVarint()],K=S._values[b.readVarint()];S.properties[D]=K}})(d,u):f===3?u.type=d.readVarint():f===4&&(u._geometry=d.pos)}function tC(f){let u=0;for(let d,b,S=0,k=f.length,D=k-1;S<k;D=S++)d=f[S],b=f[D],u+=(b.x-d.x)*(d.y+b.y);return u}Pp.types=["Unknown","Point","LineString","Polygon"];class p0{constructor(u,d){this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=u,this._keys=[],this._values=[],this._features=[],u.readFields(nC,this,d),this.length=this._features.length}feature(u){if(u<0||u>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[u];const d=this._pbf.readVarint()+this._pbf.pos;return new Pp(this._pbf,d,this.extent,this._keys,this._values)}}function nC(f,u,d){f===15?u.version=d.readVarint():f===1?u.name=d.readString():f===5?u.extent=d.readVarint():f===2?u._features.push(d.pos):f===3?u._keys.push(d.readString()):f===4&&u._values.push((function(b){let S=null;const k=b.readVarint()+b.pos;for(;b.pos<k;){const D=b.readVarint()>>3;S=D===1?b.readString():D===2?b.readFloat():D===3?b.readDouble():D===4?b.readVarint64():D===5?b.readVarint():D===6?b.readSVarint():D===7?b.readBoolean():null}if(S==null)throw new Error("unknown feature value");return S})(d))}class iC{constructor(u,d){this.layers=u.readFields(fv,{},d)}}function fv(f,u,d){if(f===3){const b=new p0(d,d.readVarint()+d.pos);b.length&&(u[b.name]=b)}}const $o=Math.pow(2,13);function rs(f,u,d,b,S,k,D,K){f.emplaceBack(u,d,2*Math.floor(b*$o)+D,S*$o*2,k*$o*2,Math.round(K))}class Zr{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((d=>d.id)),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new jt,this.centroidVertexArray=new Ot,this.indexArray=new Hr,this.programConfigurations=new Wa(u.layers,u.zoom),this.segments=new tr,this.stateDependentLayerIds=this.layers.filter((d=>d.isStateDependent())).map((d=>d.id))}populate(u,d,b){this.features=[],this.hasPattern=Ip("fill-extrusion",this.layers,d);for(const{feature:S,id:k,index:D,sourceLayerIndex:K}of u){const W=this.layers[0]._featureFilter.needGeometry,ee=xA(S,W);if(!this.layers[0]._featureFilter.filter(new Ao(this.zoom),ee,b))continue;const re={id:k,sourceLayerIndex:K,index:D,geometry:W?ee.geometry:Vu(S),properties:S.properties,type:S.type,patterns:{}};this.hasPattern?this.features.push(Uh("fill-extrusion",this.layers,re,{zoom:this.zoom},d)):this.addFeature(re,re.geometry,D,b,{},d.subdivisionGranularity),d.featureIndex.insert(S,re.geometry,D,K,this.index,!0)}}addFeatures(u,d,b){for(const S of this.features){const{geometry:k}=S;this.addFeature(S,k,S.index,d,b,u.subdivisionGranularity)}}update(u,d,b){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,d,this.stateDependentLayers,{imagePositions:b})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,eC),this.centroidVertexBuffer=u.createVertexBuffer(this.centroidVertexArray,Nm.members,!0),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(u,d,b,S,k,D){for(const K of yh(d,500)){const W={x:0,y:0,sampleCount:0},ee=this.layoutVertexArray.length;this.processPolygon(W,S,u,K,D);const re=this.layoutVertexArray.length-ee,he=Math.floor(W.x/W.sampleCount),Oe=Math.floor(W.y/W.sampleCount);for(let De=0;De<re;De++)this.centroidVertexArray.emplaceBack(he,Oe)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,b,{imagePositions:k,canonical:S})}processPolygon(u,d,b,S,k){if(S.length<1||Oc(S[0]))return;for(const he of S)he.length!==0&&Io(u,he);const D={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},K=k.fill.getGranularityForZoomLevel(d.z),W=Pp.types[b.type]==="Polygon";for(const he of S){if(he.length===0||Oc(he))continue;const Oe=Ec(he,K,W);this._generateSideFaces(Oe,D)}if(!W)return;const ee=hv(S,d,K,!1),re=this.layoutVertexArray;jh(((he,Oe)=>{rs(re,he,Oe,0,0,1,1,0)}),this.segments,this.layoutVertexArray,this.indexArray,ee.verticesFlattened,ee.indicesTriangles)}_generateSideFaces(u,d){let b=0;for(let S=1;S<u.length;S++){const k=u[S],D=u[S-1];if(hs(k,D))continue;d.segment.vertexLength+4>tr.MAX_VERTEX_ARRAY_LENGTH&&(d.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const K=k.sub(D)._perp()._unit(),W=D.dist(k);b+W>32768&&(b=0),rs(this.layoutVertexArray,k.x,k.y,K.x,K.y,0,0,b),rs(this.layoutVertexArray,k.x,k.y,K.x,K.y,0,1,b),b+=W,rs(this.layoutVertexArray,D.x,D.y,K.x,K.y,0,0,b),rs(this.layoutVertexArray,D.x,D.y,K.x,K.y,0,1,b);const ee=d.segment.vertexLength;this.indexArray.emplaceBack(ee,ee+2,ee+1),this.indexArray.emplaceBack(ee+1,ee+2,ee+3),d.segment.vertexLength+=4,d.segment.primitiveLength+=2}}}function Io(f,u){for(let d=0;d<u.length;d++){const b=u[d];d===u.length-1&&u[0].x===b.x&&u[0].y===b.y||(f.x+=b.x,f.y+=b.y,f.sampleCount++)}}function hs(f,u){return f.x===u.x&&(f.x<0||f.x>ht)||f.y===u.y&&(f.y<0||f.y>ht)}function Oc(f){return f.every((u=>u.x<0))||f.every((u=>u.x>ht))||f.every((u=>u.y<0))||f.every((u=>u.y>ht))}let kd;Xn("FillExtrusionBucket",Zr,{omit:["layers","features"]});var Wm={get paint(){return kd=kd||new or({"fill-extrusion-opacity":new Jn(ot["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Pi(ot["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Jn(ot["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Jn(ot["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Rl(ot["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Pi(ot["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Pi(ot["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Jn(ot["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class pv extends qu{constructor(u,d){super(u,Wm,d)}createBucket(u){return new Zr(u)}queryRadius(){return Qa(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:u,feature:d,featureState:b,geometry:S,transform:k,pixelsToTileUnits:D,pixelPosMatrix:K}){const W=ws(u,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-k.bearingInRadians,D),ee=this.paint.get("fill-extrusion-height").evaluate(d,b),re=this.paint.get("fill-extrusion-base").evaluate(d,b),he=(function(De,Ke){const Ge=[];for(const Ve of De){const at=[Ve.x,Ve.y,0,1];ke(at,at,Ke),Ge.push(new c(at[0]/at[3],at[1]/at[3]))}return Ge})(W,K),Oe=(function(De,Ke,Ge,Ve){const at=[],Tt=[],ft=Ve[8]*Ke,_t=Ve[9]*Ke,Nt=Ve[10]*Ke,Jt=Ve[11]*Ke,An=Ve[8]*Ge,Wn=Ve[9]*Ge,Dn=Ve[10]*Ge,Nn=Ve[11]*Ge;for(const Ci of De){const jn=[],Un=[];for(const rn of Ci){const Ui=rn.x,Qi=rn.y,Mi=Ve[0]*Ui+Ve[4]*Qi+Ve[12],oi=Ve[1]*Ui+Ve[5]*Qi+Ve[13],Qr=Ve[2]*Ui+Ve[6]*Qi+Ve[14],$s=Ve[3]*Ui+Ve[7]*Qi+Ve[15],na=Qr+Nt,Kl=$s+Jt,Tc=Mi+An,Ll=oi+Wn,il=Qr+Dn,Vs=$s+Nn,va=new c((Mi+ft)/Kl,(oi+_t)/Kl);va.z=na/Kl,jn.push(va);const Ra=new c(Tc/Vs,Ll/Vs);Ra.z=il/Vs,Un.push(Ra)}at.push(jn),Tt.push(Un)}return[at,Tt]})(S,re,ee,K);return(function(De,Ke,Ge){let Ve=1/0;y1(Ge,Ke)&&(Ve=ga(Ge,Ke[0]));for(let at=0;at<Ke.length;at++){const Tt=Ke[at],ft=De[at];for(let _t=0;_t<Tt.length-1;_t++){const Nt=Tt[_t],Jt=[Nt,Tt[_t+1],ft[_t+1],ft[_t],Nt];Od(Ge,Jt)&&(Ve=Math.min(Ve,ga(Ge,Jt)))}}return Ve!==1/0&&Ve})(Oe[0],Oe[1],he)}}function tA(f,u){return f.x*u.x+f.y*u.y}function ga(f,u){if(f.length===1){let d=0;const b=u[d++];let S;for(;!S||b.equals(S);)if(S=u[d++],!S)return 1/0;for(;d<u.length;d++){const k=u[d],D=f[0],K=S.sub(b),W=k.sub(b),ee=D.sub(b),re=tA(K,K),he=tA(K,W),Oe=tA(W,W),De=tA(ee,K),Ke=tA(ee,W),Ge=re*Oe-he*he,Ve=(Oe*De-he*Ke)/Ge,at=(re*Ke-he*De)/Ge,Tt=b.z*(1-Ve-at)+S.z*Ve+k.z*at;if(isFinite(Tt))return Tt}return 1/0}{let d=1/0;for(const b of u)d=Math.min(d,b.z);return d}}const Bf=ks([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:Up}=Bf,mv=ks([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:SA}=mv,Qm=Math.cos(Math.PI/180*37.5),qm=Math.pow(2,14)/.5;class Su{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((d=>d.id)),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((d=>{this.gradients[d.id]={}})),this.layoutVertexArray=new qt,this.layoutVertexArray2=new Kn,this.indexArray=new Hr,this.programConfigurations=new Wa(u.layers,u.zoom),this.segments=new tr,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((d=>d.isStateDependent())).map((d=>d.id))}populate(u,d,b){this.hasPattern=Ip("line",this.layers,d);const S=this.layers[0].layout.get("line-sort-key"),k=!S.isConstant(),D=[];for(const{feature:K,id:W,index:ee,sourceLayerIndex:re}of u){const he=this.layers[0]._featureFilter.needGeometry,Oe=xA(K,he);if(!this.layers[0]._featureFilter.filter(new Ao(this.zoom),Oe,b))continue;const De=k?S.evaluate(Oe,{},b):void 0,Ke={id:W,properties:K.properties,type:K.type,sourceLayerIndex:re,index:ee,geometry:he?Oe.geometry:Vu(K),patterns:{},sortKey:De};D.push(Ke)}k&&D.sort(((K,W)=>K.sortKey-W.sortKey));for(const K of D){const{geometry:W,index:ee,sourceLayerIndex:re}=K;if(this.hasPattern){const he=Uh("line",this.layers,K,{zoom:this.zoom},d);this.patternFeatures.push(he)}else this.addFeature(K,W,ee,b,{},d.subdivisionGranularity);d.featureIndex.insert(u[ee].feature,W,ee,re,this.index)}}update(u,d,b){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,d,this.stateDependentLayers,{imagePositions:b})}addFeatures(u,d,b){for(const S of this.patternFeatures)this.addFeature(S,S.geometry,S.index,d,b,u.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=u.createVertexBuffer(this.layoutVertexArray2,SA)),this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Up),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(u){if(u.properties&&Object.prototype.hasOwnProperty.call(u.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(u.properties,"mapbox_clip_end"))return{start:+u.properties.mapbox_clip_start,end:+u.properties.mapbox_clip_end}}addFeature(u,d,b,S,k,D){const K=this.layers[0].layout,W=K.get("line-join").evaluate(u,{}),ee=K.get("line-cap"),re=K.get("line-miter-limit"),he=K.get("line-round-limit");this.lineClips=this.lineFeatureClips(u);for(const Oe of d)this.addLine(Oe,u,W,ee,re,he,S,D);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,b,{imagePositions:k,canonical:S})}addLine(u,d,b,S,k,D,K,W){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,u=Ec(u,K?W.line.getGranularityForZoomLevel(K.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ft=0;ft<u.length-1;ft++)this.totalDistance+=u[ft].dist(u[ft+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const ee=Pp.types[d.type]==="Polygon";let re=u.length;for(;re>=2&&u[re-1].equals(u[re-2]);)re--;let he=0;for(;he<re-1&&u[he].equals(u[he+1]);)he++;if(re<(ee?3:2))return;b==="bevel"&&(k=1.05);const Oe=this.overscaling<=16?122880/(512*this.overscaling):0,De=this.segments.prepareSegment(10*re,this.layoutVertexArray,this.indexArray);let Ke,Ge,Ve,at,Tt;this.e1=this.e2=-1,ee&&(Ke=u[re-2],Tt=u[he].sub(Ke)._unit()._perp());for(let ft=he;ft<re;ft++){if(Ve=ft===re-1?ee?u[he+1]:void 0:u[ft+1],Ve&&u[ft].equals(Ve))continue;Tt&&(at=Tt),Ke&&(Ge=Ke),Ke=u[ft],Tt=Ve?Ve.sub(Ke)._unit()._perp():at,at=at||Tt;let _t=at.add(Tt);_t.x===0&&_t.y===0||_t._unit();const Nt=at.x*Tt.x+at.y*Tt.y,Jt=_t.x*Tt.x+_t.y*Tt.y,An=Jt!==0?1/Jt:1/0,Wn=2*Math.sqrt(2-2*Jt),Dn=Jt<Qm&&Ge&&Ve,Nn=at.x*Tt.y-at.y*Tt.x>0;if(Dn&&ft>he){const Un=Ke.dist(Ge);if(Un>2*Oe){const rn=Ke.sub(Ke.sub(Ge)._mult(Oe/Un)._round());this.updateDistance(Ge,rn),this.addCurrentVertex(rn,at,0,0,De),Ge=rn}}const Ci=Ge&&Ve;let jn=Ci?b:ee?"butt":S;if(Ci&&jn==="round"&&(An<D?jn="miter":An<=2&&(jn="fakeround")),jn==="miter"&&An>k&&(jn="bevel"),jn==="bevel"&&(An>2&&(jn="flipbevel"),An<k&&(jn="miter")),Ge&&this.updateDistance(Ge,Ke),jn==="miter")_t._mult(An),this.addCurrentVertex(Ke,_t,0,0,De);else if(jn==="flipbevel"){if(An>100)_t=Tt.mult(-1);else{const Un=An*at.add(Tt).mag()/at.sub(Tt).mag();_t._perp()._mult(Un*(Nn?-1:1))}this.addCurrentVertex(Ke,_t,0,0,De),this.addCurrentVertex(Ke,_t.mult(-1),0,0,De)}else if(jn==="bevel"||jn==="fakeround"){const Un=-Math.sqrt(An*An-1),rn=Nn?Un:0,Ui=Nn?0:Un;if(Ge&&this.addCurrentVertex(Ke,at,rn,Ui,De),jn==="fakeround"){const Qi=Math.round(180*Wn/Math.PI/20);for(let Mi=1;Mi<Qi;Mi++){let oi=Mi/Qi;if(oi!==.5){const $s=oi-.5;oi+=oi*$s*(oi-1)*((1.0904+Nt*(Nt*(3.55645-1.43519*Nt)-3.2452))*$s*$s+(.848013+Nt*(.215638*Nt-1.06021)))}const Qr=Tt.sub(at)._mult(oi)._add(at)._unit()._mult(Nn?-1:1);this.addHalfVertex(Ke,Qr.x,Qr.y,!1,Nn,0,De)}}Ve&&this.addCurrentVertex(Ke,Tt,-rn,-Ui,De)}else if(jn==="butt")this.addCurrentVertex(Ke,_t,0,0,De);else if(jn==="square"){const Un=Ge?1:-1;this.addCurrentVertex(Ke,_t,Un,Un,De)}else jn==="round"&&(Ge&&(this.addCurrentVertex(Ke,at,0,0,De),this.addCurrentVertex(Ke,at,1,1,De,!0)),Ve&&(this.addCurrentVertex(Ke,Tt,-1,-1,De,!0),this.addCurrentVertex(Ke,Tt,0,0,De)));if(Dn&&ft<re-1){const Un=Ke.dist(Ve);if(Un>2*Oe){const rn=Ke.add(Ve.sub(Ke)._mult(Oe/Un)._round());this.updateDistance(Ke,rn),this.addCurrentVertex(rn,Tt,0,0,De),Ke=rn}}}}addCurrentVertex(u,d,b,S,k,D=!1){const K=d.y*S-d.x,W=-d.y-d.x*S;this.addHalfVertex(u,d.x+d.y*b,d.y-d.x*b,D,!1,b,k),this.addHalfVertex(u,K,W,D,!0,-S,k),this.distance>qm/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(u,d,b,S,k,D))}addHalfVertex({x:u,y:d},b,S,k,D,K,W){const ee=.5*(this.lineClips?this.scaledDistance*(qm-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((u<<1)+(k?1:0),(d<<1)+(D?1:0),Math.round(63*b)+128,Math.round(63*S)+128,1+(K===0?0:K<0?-1:1)|(63&ee)<<2,ee>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const re=W.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,re,this.e2),W.primitiveLength++),D?this.e2=re:this.e1=re}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(u,d){this.distance+=u.dist(d),this.updateScaledDistance()}}let D1,P1;Xn("LineBucket",Su,{omit:["layers","patternFeatures"]});var Kp={get paint(){return P1=P1||new or({"line-opacity":new Pi(ot.paint_line["line-opacity"]),"line-color":new Pi(ot.paint_line["line-color"]),"line-translate":new Jn(ot.paint_line["line-translate"]),"line-translate-anchor":new Jn(ot.paint_line["line-translate-anchor"]),"line-width":new Pi(ot.paint_line["line-width"]),"line-gap-width":new Pi(ot.paint_line["line-gap-width"]),"line-offset":new Pi(ot.paint_line["line-offset"]),"line-blur":new Pi(ot.paint_line["line-blur"]),"line-dasharray":new bu(ot.paint_line["line-dasharray"]),"line-pattern":new Rl(ot.paint_line["line-pattern"]),"line-gradient":new xp(ot.paint_line["line-gradient"])})},get layout(){return D1=D1||new or({"line-cap":new Jn(ot.layout_line["line-cap"]),"line-join":new Pi(ot.layout_line["line-join"]),"line-miter-limit":new Jn(ot.layout_line["line-miter-limit"]),"line-round-limit":new Jn(ot.layout_line["line-round-limit"]),"line-sort-key":new Pi(ot.layout_line["line-sort-key"])})}};class m0 extends Pi{possiblyEvaluate(u,d){return d=new Ao(Math.floor(d.zoom),{now:d.now,fadeDuration:d.fadeDuration,zoomHistory:d.zoomHistory,transition:d.transition}),super.possiblyEvaluate(u,d)}evaluate(u,d,b,S){return d=Pe({},d,{zoom:Math.floor(d.zoom)}),super.evaluate(u,d,b,S)}}let JA;class nu extends qu{constructor(u,d){super(u,Kp,d),this.gradientVersion=0,JA||(JA=new m0(Kp.paint.properties["line-width"].specification),JA.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(u){if(u==="line-gradient"){const d=this.gradientExpression();this.stepInterpolant=!!(function(b){return b._styleExpression!==void 0})(d)&&d._styleExpression.expression instanceof Sr,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(u,d){super.recalculate(u,d),this.paint._values["line-floorwidth"]=JA.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,u)}createBucket(u){return new Su(u)}queryRadius(u){const d=u,b=Td(Sp("line-width",this,d),Sp("line-gap-width",this,d)),S=Sp("line-offset",this,d);return b/2+Math.abs(S)+Qa(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:u,feature:d,featureState:b,geometry:S,transform:k,pixelsToTileUnits:D}){const K=ws(u,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-k.bearingInRadians,D),W=D/2*Td(this.paint.get("line-width").evaluate(d,b),this.paint.get("line-gap-width").evaluate(d,b)),ee=this.paint.get("line-offset").evaluate(d,b);return ee&&(S=(function(re,he){const Oe=[];for(let De=0;De<re.length;De++){const Ke=re[De],Ge=[];for(let Ve=0;Ve<Ke.length;Ve++){const at=Ke[Ve-1],Tt=Ke[Ve],ft=Ke[Ve+1],_t=Ve===0?new c(0,0):Tt.sub(at)._unit()._perp(),Nt=Ve===Ke.length-1?new c(0,0):ft.sub(Tt)._unit()._perp(),Jt=_t._add(Nt)._unit(),An=Jt.x*Nt.x+Jt.y*Nt.y;An!==0&&Jt._mult(1/An),Ge.push(Jt._mult(he)._add(Tt))}Oe.push(Ge)}return Oe})(S,ee*D)),(function(re,he,Oe){for(let De=0;De<he.length;De++){const Ke=he[De];if(re.length>=3){for(let Ge=0;Ge<Ke.length;Ge++)if(wp(re,Ke[Ge]))return!0}if(v1(re,Ke,Oe))return!0}return!1})(K,S,W)}isTileClipped(){return!0}}function Td(f,u){return u>0?u+2*f:f}const Ym=ks([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),$m=ks([{name:"a_projected_pos",components:3,type:"Float32"}],4);ks([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const gv=ks([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ks([{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 U1=ks([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),rC=ks([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Vm(f,u,d){return f.sections.forEach((b=>{b.text=(function(S,k,D){const K=k.layout.get("text-transform").evaluate(D,{});return K==="uppercase"?S=S.toLocaleUpperCase():K==="lowercase"&&(S=S.toLocaleLowerCase()),dl.applyArabicShaping&&(S=dl.applyArabicShaping(S)),S})(b.text,u,d)})),f}ks([{name:"triangle",components:3,type:"Uint16"}]),ks([{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"}]),ks([{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"}]),ks([{type:"Float32",name:"offsetX"}]),ks([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ks([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Lp={"!":"︕","#":"",$:"","%":"","&":"","(":"︵",")":"︶","*":"","+":"",",":"︐","-":"︲",".":"・","/":"",":":"︓",";":"︔","<":"︿","=":"",">":"﹀","?":"︖","@":"","[":"﹇","\\":"","]":"﹈","^":"",_:"︳","`":"","{":"︷","|":"―","}":"︸","~":"","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","":"︲","—":"︱","":"﹃","":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","":"︹","":"︺","〖":"︗","〗":"︘","":"︕","":"︵","":"︶","":"︐","":"︲","":"・","":"︓","":"︔","":"︿","":"﹀","":"︖","":"﹇","":"﹈","_":"︳","":"︷","":"―","":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var wo=24;const K1=4294967296,Bc=1/K1,yv=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class L1{constructor(u=new Uint8Array(16)){this.buf=ArrayBuffer.isView(u)?u:new Uint8Array(u),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(u,d,b=this.length){for(;this.pos<b;){const S=this.readVarint(),k=S>>3,D=this.pos;this.type=7&S,u(k,d,this),this.pos===D&&this.skip(S)}return d}readMessage(u,d){return this.readFields(u,d,this.readVarint()+this.pos)}readFixed32(){const u=this.dataView.getUint32(this.pos,!0);return this.pos+=4,u}readSFixed32(){const u=this.dataView.getInt32(this.pos,!0);return this.pos+=4,u}readFixed64(){const u=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*K1;return this.pos+=8,u}readSFixed64(){const u=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*K1;return this.pos+=8,u}readFloat(){const u=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,u}readDouble(){const u=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,u}readVarint(u){const d=this.buf;let b,S;return S=d[this.pos++],b=127&S,S<128?b:(S=d[this.pos++],b|=(127&S)<<7,S<128?b:(S=d[this.pos++],b|=(127&S)<<14,S<128?b:(S=d[this.pos++],b|=(127&S)<<21,S<128?b:(S=d[this.pos],b|=(15&S)<<28,(function(k,D,K){const W=K.buf;let ee,re;if(re=W[K.pos++],ee=(112&re)>>4,re<128||(re=W[K.pos++],ee|=(127&re)<<3,re<128)||(re=W[K.pos++],ee|=(127&re)<<10,re<128)||(re=W[K.pos++],ee|=(127&re)<<17,re<128)||(re=W[K.pos++],ee|=(127&re)<<24,re<128)||(re=W[K.pos++],ee|=(1&re)<<31,re<128))return Hm(k,ee,D);throw new Error("Expected varint not more than 10 bytes")})(b,u,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){const u=this.readVarint();return u%2==1?(u+1)/-2:u/2}readBoolean(){return!!this.readVarint()}readString(){const u=this.readVarint()+this.pos,d=this.pos;return this.pos=u,u-d>=12&&yv?yv.decode(this.buf.subarray(d,u)):(function(b,S,k){let D="",K=S;for(;K<k;){const W=b[K];let ee,re,he,Oe=null,De=W>239?4:W>223?3:W>191?2:1;if(K+De>k)break;De===1?W<128&&(Oe=W):De===2?(ee=b[K+1],(192&ee)==128&&(Oe=(31&W)<<6|63&ee,Oe<=127&&(Oe=null))):De===3?(ee=b[K+1],re=b[K+2],(192&ee)==128&&(192&re)==128&&(Oe=(15&W)<<12|(63&ee)<<6|63&re,(Oe<=2047||Oe>=55296&&Oe<=57343)&&(Oe=null))):De===4&&(ee=b[K+1],re=b[K+2],he=b[K+3],(192&ee)==128&&(192&re)==128&&(192&he)==128&&(Oe=(15&W)<<18|(63&ee)<<12|(63&re)<<6|63&he,(Oe<=65535||Oe>=1114112)&&(Oe=null))),Oe===null?(Oe=65533,De=1):Oe>65535&&(Oe-=65536,D+=String.fromCharCode(Oe>>>10&1023|55296),Oe=56320|1023&Oe),D+=String.fromCharCode(Oe),K+=De}return D})(this.buf,d,u)}readBytes(){const u=this.readVarint()+this.pos,d=this.buf.subarray(this.pos,u);return this.pos=u,d}readPackedVarint(u=[],d){const b=this.readPackedEnd();for(;this.pos<b;)u.push(this.readVarint(d));return u}readPackedSVarint(u=[]){const d=this.readPackedEnd();for(;this.pos<d;)u.push(this.readSVarint());return u}readPackedBoolean(u=[]){const d=this.readPackedEnd();for(;this.pos<d;)u.push(this.readBoolean());return u}readPackedFloat(u=[]){const d=this.readPackedEnd();for(;this.pos<d;)u.push(this.readFloat());return u}readPackedDouble(u=[]){const d=this.readPackedEnd();for(;this.pos<d;)u.push(this.readDouble());return u}readPackedFixed32(u=[]){const d=this.readPackedEnd();for(;this.pos<d;)u.push(this.readFixed32());return u}readPackedSFixed32(u=[]){const d=this.readPackedEnd();for(;this.pos<d;)u.push(this.readSFixed32());return u}readPackedFixed64(u=[]){const d=this.readPackedEnd();for(;this.pos<d;)u.push(this.readFixed64());return u}readPackedSFixed64(u=[]){const d=this.readPackedEnd();for(;this.pos<d;)u.push(this.readSFixed64());return u}readPackedEnd(){return this.type===2?this.readVarint()+this.pos:this.pos+1}skip(u){const d=7&u;if(d===0)for(;this.buf[this.pos++]>127;);else if(d===2)this.pos=this.readVarint()+this.pos;else if(d===5)this.pos+=4;else{if(d!==1)throw new Error(`Unimplemented type: ${d}`);this.pos+=8}}writeTag(u,d){this.writeVarint(u<<3|d)}realloc(u){let d=this.length||16;for(;d<this.pos+u;)d*=2;if(d!==this.length){const b=new Uint8Array(d);b.set(this.buf),this.buf=b,this.dataView=new DataView(b.buffer),this.length=d}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(u){this.realloc(4),this.dataView.setInt32(this.pos,u,!0),this.pos+=4}writeSFixed32(u){this.realloc(4),this.dataView.setInt32(this.pos,u,!0),this.pos+=4}writeFixed64(u){this.realloc(8),this.dataView.setInt32(this.pos,-1&u,!0),this.dataView.setInt32(this.pos+4,Math.floor(u*Bc),!0),this.pos+=8}writeSFixed64(u){this.realloc(8),this.dataView.setInt32(this.pos,-1&u,!0),this.dataView.setInt32(this.pos+4,Math.floor(u*Bc),!0),this.pos+=8}writeVarint(u){(u=+u||0)>268435455||u<0?(function(d,b){let S,k;if(d>=0?(S=d%4294967296|0,k=d/4294967296|0):(S=~(-d%4294967296),k=~(-d/4294967296),4294967295^S?S=S+1|0:(S=0,k=k+1|0)),d>=18446744073709552e3||d<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");b.realloc(10),(function(D,K,W){W.buf[W.pos++]=127&D|128,D>>>=7,W.buf[W.pos++]=127&D|128,D>>>=7,W.buf[W.pos++]=127&D|128,D>>>=7,W.buf[W.pos++]=127&D|128,W.buf[W.pos]=127&(D>>>=7)})(S,0,b),(function(D,K){const W=(7&D)<<4;K.buf[K.pos++]|=W|((D>>>=3)?128:0),D&&(K.buf[K.pos++]=127&D|((D>>>=7)?128:0),D&&(K.buf[K.pos++]=127&D|((D>>>=7)?128:0),D&&(K.buf[K.pos++]=127&D|((D>>>=7)?128:0),D&&(K.buf[K.pos++]=127&D|((D>>>=7)?128:0),D&&(K.buf[K.pos++]=127&D)))))})(k,b)})(u,this):(this.realloc(4),this.buf[this.pos++]=127&u|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=u>>>7&127))))}writeSVarint(u){this.writeVarint(u<0?2*-u-1:2*u)}writeBoolean(u){this.writeVarint(+u)}writeString(u){u=String(u),this.realloc(4*u.length),this.pos++;const d=this.pos;this.pos=(function(S,k,D){for(let K,W,ee=0;ee<k.length;ee++){if(K=k.charCodeAt(ee),K>55295&&K<57344){if(!W){K>56319||ee+1===k.length?(S[D++]=239,S[D++]=191,S[D++]=189):W=K;continue}if(K<56320){S[D++]=239,S[D++]=191,S[D++]=189,W=K;continue}K=W-55296<<10|K-56320|65536,W=null}else W&&(S[D++]=239,S[D++]=191,S[D++]=189,W=null);K<128?S[D++]=K:(K<2048?S[D++]=K>>6|192:(K<65536?S[D++]=K>>12|224:(S[D++]=K>>18|240,S[D++]=K>>12&63|128),S[D++]=K>>6&63|128),S[D++]=63&K|128)}return D})(this.buf,u,this.pos);const b=this.pos-d;b>=128&&Rd(d,b,this),this.pos=d-1,this.writeVarint(b),this.pos+=b}writeFloat(u){this.realloc(4),this.dataView.setFloat32(this.pos,u,!0),this.pos+=4}writeDouble(u){this.realloc(8),this.dataView.setFloat64(this.pos,u,!0),this.pos+=8}writeBytes(u){const d=u.length;this.writeVarint(d),this.realloc(d);for(let b=0;b<d;b++)this.buf[this.pos++]=u[b]}writeRawMessage(u,d){this.pos++;const b=this.pos;u(d,this);const S=this.pos-b;S>=128&&Rd(b,S,this),this.pos=b-1,this.writeVarint(S),this.pos+=S}writeMessage(u,d,b){this.writeTag(u,2),this.writeRawMessage(d,b)}writePackedVarint(u,d){d.length&&this.writeMessage(u,F1,d)}writePackedSVarint(u,d){d.length&&this.writeMessage(u,vv,d)}writePackedBoolean(u,d){d.length&&this.writeMessage(u,sC,d)}writePackedFloat(u,d){d.length&&this.writeMessage(u,Zm,d)}writePackedDouble(u,d){d.length&&this.writeMessage(u,oC,d)}writePackedFixed32(u,d){d.length&&this.writeMessage(u,aC,d)}writePackedSFixed32(u,d){d.length&&this.writeMessage(u,bv,d)}writePackedFixed64(u,d){d.length&&this.writeMessage(u,Cv,d)}writePackedSFixed64(u,d){d.length&&this.writeMessage(u,jx,d)}writeBytesField(u,d){this.writeTag(u,2),this.writeBytes(d)}writeFixed32Field(u,d){this.writeTag(u,5),this.writeFixed32(d)}writeSFixed32Field(u,d){this.writeTag(u,5),this.writeSFixed32(d)}writeFixed64Field(u,d){this.writeTag(u,1),this.writeFixed64(d)}writeSFixed64Field(u,d){this.writeTag(u,1),this.writeSFixed64(d)}writeVarintField(u,d){this.writeTag(u,0),this.writeVarint(d)}writeSVarintField(u,d){this.writeTag(u,0),this.writeSVarint(d)}writeStringField(u,d){this.writeTag(u,2),this.writeString(d)}writeFloatField(u,d){this.writeTag(u,5),this.writeFloat(d)}writeDoubleField(u,d){this.writeTag(u,1),this.writeDouble(d)}writeBooleanField(u,d){this.writeVarintField(u,+d)}}function Hm(f,u,d){return d?4294967296*u+(f>>>0):4294967296*(u>>>0)+(f>>>0)}function Rd(f,u,d){const b=u<=16383?1:u<=2097151?2:u<=268435455?3:Math.floor(Math.log(u)/(7*Math.LN2));d.realloc(b);for(let S=d.pos-1;S>=f;S--)d.buf[S+b]=d.buf[S]}function F1(f,u){for(let d=0;d<f.length;d++)u.writeVarint(f[d])}function vv(f,u){for(let d=0;d<f.length;d++)u.writeSVarint(f[d])}function Zm(f,u){for(let d=0;d<f.length;d++)u.writeFloat(f[d])}function oC(f,u){for(let d=0;d<f.length;d++)u.writeDouble(f[d])}function sC(f,u){for(let d=0;d<f.length;d++)u.writeBoolean(f[d])}function aC(f,u){for(let d=0;d<f.length;d++)u.writeFixed32(f[d])}function bv(f,u){for(let d=0;d<f.length;d++)u.writeSFixed32(f[d])}function Cv(f,u){for(let d=0;d<f.length;d++)u.writeFixed64(f[d])}function jx(f,u){for(let d=0;d<f.length;d++)u.writeSFixed64(f[d])}function Nx(f,u,d){f===1&&d.readMessage(lC,u)}function lC(f,u,d){if(f===3){const{id:b,bitmap:S,width:k,height:D,left:K,top:W,advance:ee}=d.readMessage(_v,{});u.push({id:b,bitmap:new Bp({width:k+6,height:D+6},S),metrics:{width:k,height:D,left:K,top:W,advance:ee}})}}function _v(f,u,d){f===1?u.id=d.readVarint():f===2?u.bitmap=d.readBytes():f===3?u.width=d.readVarint():f===4?u.height=d.readVarint():f===5?u.left=d.readSVarint():f===6?u.top=d.readSVarint():f===7&&(u.advance=d.readVarint())}function xv(f){let u=0,d=0;for(const D of f)u+=D.w*D.h,d=Math.max(d,D.w);f.sort(((D,K)=>K.h-D.h));const b=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(u/.95)),d),h:1/0}];let S=0,k=0;for(const D of f)for(let K=b.length-1;K>=0;K--){const W=b[K];if(!(D.w>W.w||D.h>W.h)){if(D.x=W.x,D.y=W.y,k=Math.max(k,D.y+D.h),S=Math.max(S,D.x+D.w),D.w===W.w&&D.h===W.h){const ee=b.pop();ee&&K<b.length&&(b[K]=ee)}else D.h===W.h?(W.x+=D.w,W.w-=D.w):D.w===W.w?(W.y+=D.h,W.h-=D.h):(b.push({x:W.x+D.w,y:W.y,w:W.w-D.w,h:D.h}),W.y+=D.h,W.h-=D.h);break}}return{w:S,h:k,fill:u/(S*k)||0}}class If{constructor(u,{pixelRatio:d,version:b,stretchX:S,stretchY:k,content:D,textFitWidth:K,textFitHeight:W}){this.paddedRect=u,this.pixelRatio=d,this.stretchX=S,this.stretchY=k,this.content=D,this.version=b,this.textFitWidth=K,this.textFitHeight=W}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class g0{constructor(u,d){const b={},S={};this.haveRenderCallbacks=[];const k=[];this.addImages(u,b,k),this.addImages(d,S,k);const{w:D,h:K}=xv(k),W=new eu({width:D||1,height:K||1});for(const ee in u){const re=u[ee],he=b[ee].paddedRect;eu.copy(re.data,W,{x:0,y:0},{x:he.x+1,y:he.y+1},re.data)}for(const ee in d){const re=d[ee],he=S[ee].paddedRect,Oe=he.x+1,De=he.y+1,Ke=re.data.width,Ge=re.data.height;eu.copy(re.data,W,{x:0,y:0},{x:Oe,y:De},re.data),eu.copy(re.data,W,{x:0,y:Ge-1},{x:Oe,y:De-1},{width:Ke,height:1}),eu.copy(re.data,W,{x:0,y:0},{x:Oe,y:De+Ge},{width:Ke,height:1}),eu.copy(re.data,W,{x:Ke-1,y:0},{x:Oe-1,y:De},{width:1,height:Ge}),eu.copy(re.data,W,{x:0,y:0},{x:Oe+Ke,y:De},{width:1,height:Ge})}this.image=W,this.iconPositions=b,this.patternPositions=S}addImages(u,d,b){for(const S in u){const k=u[S],D={x:0,y:0,w:k.data.width+2,h:k.data.height+2};b.push(D),d[S]=new If(D,k),k.hasRenderCallback&&this.haveRenderCallbacks.push(S)}}patchUpdatedImages(u,d){u.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const b in u.updatedImages)this.patchUpdatedImage(this.iconPositions[b],u.getImage(b),d),this.patchUpdatedImage(this.patternPositions[b],u.getImage(b),d)}patchUpdatedImage(u,d,b){if(!u||!d||u.version===d.version)return;u.version=d.version;const[S,k]=u.tl;b.update(d.data,void 0,{x:S,y:k})}}var Dd;Xn("ImagePosition",If),Xn("ImageAtlas",g0),s.ao=void 0,(Dd=s.ao||(s.ao={}))[Dd.none=0]="none",Dd[Dd.horizontal=1]="horizontal",Dd[Dd.vertical=2]="vertical",Dd[Dd.horizontalOnly=3]="horizontalOnly";class Pd{constructor(){this.scale=1,this.fontStack="",this.imageName=null,this.verticalAlign="bottom"}static forText(u,d,b){const S=new Pd;return S.scale=u||1,S.fontStack=d,S.verticalAlign=b||"bottom",S}static forImage(u,d){const b=new Pd;return b.imageName=u,b.verticalAlign=d||"bottom",b}}class Fp{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(u,d){const b=new Fp;for(let S=0;S<u.sections.length;S++){const k=u.sections[S];k.image?b.addImageSection(k):b.addTextSection(k,d)}return b}length(){return this.text.length}getSection(u){return this.sections[this.sectionIndex[u]]}getSectionIndex(u){return this.sectionIndex[u]}getCharCode(u){return this.text.charCodeAt(u)}verticalizePunctuation(){this.text=(function(u){let d="";for(let b=0;b<u.length;b++){const S=u.charCodeAt(b+1)||null,k=u.charCodeAt(b-1)||null;d+=S&&xf(S)&&!Lp[u[b+1]]||k&&xf(k)&&!Lp[u[b-1]]||!Lp[u[b]]?u[b]:Lp[u[b]]}return d})(this.text)}trim(){let u=0;for(let b=0;b<this.text.length&&v0[this.text.charCodeAt(b)];b++)u++;let d=this.text.length;for(let b=this.text.length-1;b>=0&&b>=u&&v0[this.text.charCodeAt(b)];b--)d--;this.text=this.text.substring(u,d),this.sectionIndex=this.sectionIndex.slice(u,d)}substring(u,d){const b=new Fp;return b.text=this.text.substring(u,d),b.sectionIndex=this.sectionIndex.slice(u,d),b.sections=this.sections,b}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((u,d)=>Math.max(u,this.sections[d].scale)),0)}getMaxImageSize(u){let d=0,b=0;for(let S=0;S<this.length();S++){const k=this.getSection(S);if(k.imageName){const D=u[k.imageName];if(!D)continue;const K=D.displaySize;d=Math.max(d,K[0]),b=Math.max(b,K[1])}}return{maxImageWidth:d,maxImageHeight:b}}addTextSection(u,d){this.text+=u.text,this.sections.push(Pd.forText(u.scale,u.fontStack||d,u.verticalAlign));const b=this.sections.length-1;for(let S=0;S<u.text.length;++S)this.sectionIndex.push(b)}addImageSection(u){const d=u.image?u.image.name:"";if(d.length===0)return void mt("Can't add FormattedSection with an empty image.");const b=this.getNextImageSectionCharCode();b?(this.text+=String.fromCharCode(b),this.sections.push(Pd.forImage(d,u.verticalAlign)),this.sectionIndex.push(this.sections.length-1)):mt("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function y0(f,u,d,b,S,k,D,K,W,ee,re,he,Oe,De,Ke){const Ge=Fp.fromFeature(f,S);let Ve;he===s.ao.vertical&&Ge.verticalizePunctuation();const{processBidirectionalText:at,processStyledBidirectionalText:Tt}=dl;if(at&&Ge.sections.length===1){Ve=[];const Nt=at(Ge.toString(),N1(Ge,ee,k,u,b,De));for(const Jt of Nt){const An=new Fp;An.text=Jt,An.sections=Ge.sections;for(let Wn=0;Wn<Jt.length;Wn++)An.sectionIndex.push(0);Ve.push(An)}}else if(Tt){Ve=[];const Nt=Tt(Ge.text,Ge.sectionIndex,N1(Ge,ee,k,u,b,De));for(const Jt of Nt){const An=new Fp;An.text=Jt[0],An.sectionIndex=Jt[1],An.sections=Ge.sections,Ve.push(An)}}else Ve=(function(Nt,Jt){const An=[],Wn=Nt.text;let Dn=0;for(const Nn of Jt)An.push(Nt.substring(Dn,Nn)),Dn=Nn;return Dn<Wn.length&&An.push(Nt.substring(Dn,Wn.length)),An})(Ge,N1(Ge,ee,k,u,b,De));const ft=[],_t={positionedLines:ft,text:Ge.toString(),top:re[1],bottom:re[1],left:re[0],right:re[0],writingMode:he,iconsInText:!1,verticalizable:!1};return(function(Nt,Jt,An,Wn,Dn,Nn,Ci,jn,Un,rn,Ui,Qi){let Mi=0,oi=0,Qr=0,$s=0;const na=jn==="right"?1:jn==="left"?0:.5,Kl=wo/Qi;let Tc=0;for(const Vs of Dn){Vs.trim();const va=Vs.getMaxScale(),Ra={positionedGlyphs:[],lineOffset:0};Nt.positionedLines[Tc]=Ra;const rl=Ra.positionedGlyphs;let ol=0;if(!Vs.length()){oi+=Nn,++Tc;continue}const Xu=Gx(Wn,Vs,Kl);for(let Bu=0;Bu<Vs.length();Bu++){const qa=Vs.getSection(Bu),Ca=Vs.getSectionIndex(Bu),h=Vs.getCharCode(Bu),g=b0(Un,Ui,h);let M;if(qa.imageName){if(Nt.iconsInText=!0,qa.scale=qa.scale*Kl,M=G1(qa,g,va,Xu,Wn),!M)continue;ol=Math.max(ol,M.imageOffset)}else if(M=kf(qa,h,g,Xu,Jt,An),!M)continue;const{rect:I,metrics:N,baselineOffset:te}=M;rl.push({glyph:h,imageName:qa.imageName,x:Mi,y:oi+te+-17,vertical:g,scale:qa.scale,fontStack:qa.fontStack,sectionIndex:Ca,metrics:N,rect:I}),g?(Nt.verticalizable=!0,Mi+=(qa.imageName?N.advance:wo)*qa.scale+rn):Mi+=N.advance*qa.scale+rn}rl.length!==0&&(Qr=Math.max(Mi-rn,Qr),C0(rl,0,rl.length-1,na)),Mi=0,Ra.lineOffset=Math.max(ol,(va-1)*wo);const ba=Nn*va+ol;oi+=ba,$s=Math.max(ba,$s),++Tc}const{horizontalAlign:Ll,verticalAlign:il}=Xm(Ci);(function(Vs,va,Ra,rl,ol,Xu,ba,Bu,qa){const Ca=(va-Ra)*ol;let h=0;h=Xu!==ba?-Bu*rl- -17:-rl*qa*ba+.5*ba;for(const g of Vs)for(const M of g.positionedGlyphs)M.x+=Ca,M.y+=h})(Nt.positionedLines,na,Ll,il,Qr,$s,Nn,oi,Dn.length),Nt.top+=-il*oi,Nt.bottom=Nt.top+oi,Nt.left+=-Ll*Qr,Nt.right=Nt.left+Qr})(_t,u,d,b,Ve,D,K,W,he,ee,Oe,Ke),!(function(Nt){for(const Jt of Nt)if(Jt.positionedGlyphs.length!==0)return!1;return!0})(ft)&&_t}const v0={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},uC={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},z1={40:!0};function Mv(f,u,d,b,S,k){if(u.imageName){const D=b[u.imageName];return D?D.displaySize[0]*u.scale*wo/k+S:0}{const D=d[u.fontStack],K=D&&D[f];return K?K.metrics.advance*u.scale+S:0}}function wv(f,u,d,b){const S=Math.pow(f-u,2);return b?f<u?S/2:2*S:S+Math.abs(d)*d}function Ds(f,u,d){let b=0;return f===10&&(b-=1e4),d&&(b+=150),f!==40&&f!==65288||(b+=50),u!==41&&u!==65289||(b+=50),b}function j1(f,u,d,b,S,k){let D=null,K=wv(u,d,S,k);for(const W of b){const ee=wv(u-W.x,d,S,k)+W.badness;ee<=K&&(D=W,K=ee)}return{index:f,x:u,priorBreak:D,badness:K}}function cC(f){return f?cC(f.priorBreak).concat(f.index):[]}function N1(f,u,d,b,S,k){if(!f)return[];const D=[],K=(function(he,Oe,De,Ke,Ge,Ve){let at=0;for(let Tt=0;Tt<he.length();Tt++){const ft=he.getSection(Tt);at+=Mv(he.getCharCode(Tt),ft,Ke,Ge,Oe,Ve)}return at/Math.max(1,Math.ceil(at/De))})(f,u,d,b,S,k),W=f.text.indexOf("")>=0;let ee=0;for(let he=0;he<f.length();he++){const Oe=f.getSection(he),De=f.getCharCode(he);if(v0[De]||(ee+=Mv(De,Oe,b,S,u,k)),he<f.length()-1){const Ke=!((re=De)<11904)&&(!!Ur["CJK Compatibility Forms"](re)||!!Ur["CJK Compatibility"](re)||!!Ur["CJK Strokes"](re)||!!Ur["CJK Symbols and Punctuation"](re)||!!Ur["Enclosed CJK Letters and Months"](re)||!!Ur["Halfwidth and Fullwidth Forms"](re)||!!Ur["Ideographic Description Characters"](re)||!!Ur["Vertical Forms"](re)||_d.test(String.fromCodePoint(re)));(uC[De]||Ke||Oe.imageName||he!==f.length()-2&&z1[f.getCharCode(he+1)])&&D.push(j1(he+1,ee,K,D,Ds(De,f.getCharCode(he+1),Ke&&W),!1))}}var re;return cC(j1(f.length(),ee,K,D,0,!0))}function Xm(f){let u=.5,d=.5;switch(f){case"right":case"top-right":case"bottom-right":u=1;break;case"left":case"top-left":case"bottom-left":u=0}switch(f){case"bottom":case"bottom-right":case"bottom-left":d=1;break;case"top":case"top-right":case"top-left":d=0}return{horizontalAlign:u,verticalAlign:d}}function Gx(f,u,d){const b=u.getMaxScale()*wo,{maxImageWidth:S,maxImageHeight:k}=u.getMaxImageSize(f),D=Math.max(b,k*d);return{verticalLineContentWidth:Math.max(b,S*d),horizontalLineContentHeight:D}}function Sv(f){switch(f){case"top":return 0;case"center":return .5;default:return 1}}function b0(f,u,d){return!(f===s.ao.horizontal||!u&&!Wu(d)||u&&(v0[d]||(b=d,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(b)))));var b}function kf(f,u,d,b,S,k){const D=k[f.fontStack],K=(function(ee,re,he,Oe){if(ee&&ee.rect)return ee;const De=re[he.fontStack],Ke=De&&De[Oe];return Ke?{rect:null,metrics:Ke.metrics}:null})(D&&D[u],S,f,u);if(K===null)return null;let W;if(d)W=b.verticalLineContentWidth-f.scale*wo;else{const ee=Sv(f.verticalAlign);W=(b.horizontalLineContentHeight-f.scale*wo)*ee}return{rect:K.rect,metrics:K.metrics,baselineOffset:W}}function G1(f,u,d,b,S){const k=S[f.imageName];if(!k)return null;const D=k.paddedRect,K=k.displaySize,W={width:K[0],height:K[1],left:1,top:-3,advance:u?K[1]:K[0]};let ee;if(u)ee=b.verticalLineContentWidth-K[1]*f.scale;else{const re=Sv(f.verticalAlign);ee=(b.horizontalLineContentHeight-K[1]*f.scale)*re}return{rect:D,metrics:W,baselineOffset:ee,imageOffset:(u?K[0]:K[1])*f.scale-wo*d}}function C0(f,u,d,b){if(b===0)return;const S=f[d],k=(f[d].x+S.metrics.advance*S.scale)*b;for(let D=u;D<=d;D++)f[D].x-=k}function W1(f,u,d){const{horizontalAlign:b,verticalAlign:S}=Xm(d),k=u[0]-f.displaySize[0]*b,D=u[1]-f.displaySize[1]*S;return{image:f,top:D,bottom:D+f.displaySize[1],left:k,right:k+f.displaySize[0]}}function Ud(f){var u,d;let b=f.left,S=f.top,k=f.right-b,D=f.bottom-S;const K=(u=f.image.textFitWidth)!==null&&u!==void 0?u:"stretchOrShrink",W=(d=f.image.textFitHeight)!==null&&d!==void 0?d:"stretchOrShrink",ee=(f.image.content[2]-f.image.content[0])/(f.image.content[3]-f.image.content[1]);if(W==="proportional"){if(K==="stretchOnly"&&k/D<ee||K==="proportional"){const re=Math.ceil(D*ee);b*=re/k,k=re}}else if(K==="proportional"&&W==="stretchOnly"&&ee!==0&&k/D>ee){const re=Math.ceil(k/ee);S*=re/D,D=re}return{x1:b,y1:S,x2:b+k,y2:S+D}}function eh(f,u,d,b,S,k){const D=f.image;let K;if(D.content){const Ve=D.content,at=D.pixelRatio||1;K=[Ve[0]/at,Ve[1]/at,D.displaySize[0]-Ve[2]/at,D.displaySize[1]-Ve[3]/at]}const W=u.left*k,ee=u.right*k;let re,he,Oe,De;d==="width"||d==="both"?(De=S[0]+W-b[3],he=S[0]+ee+b[1]):(De=S[0]+(W+ee-D.displaySize[0])/2,he=De+D.displaySize[0]);const Ke=u.top*k,Ge=u.bottom*k;return d==="height"||d==="both"?(re=S[1]+Ke-b[0],Oe=S[1]+Ge+b[2]):(re=S[1]+(Ke+Ge-D.displaySize[1])/2,Oe=re+D.displaySize[1]),{image:D,top:re,right:he,bottom:Oe,left:De,collisionPadding:K}}const nA=128,Tf=32640;function Jm(f,u){const{expression:d}=u;if(d.kind==="constant")return{kind:"constant",layoutSize:d.evaluate(new Ao(f+1))};if(d.kind==="source")return{kind:"source"};{const{zoomStops:b,interpolationType:S}=d;let k=0;for(;k<b.length&&b[k]<=f;)k++;k=Math.max(0,k-1);let D=k;for(;D<b.length&&b[D]<f+1;)D++;D=Math.min(b.length-1,D);const K=b[k],W=b[D];return d.kind==="composite"?{kind:"composite",minZoom:K,maxZoom:W,interpolationType:S}:{kind:"camera",minZoom:K,maxZoom:W,minSize:d.evaluate(new Ao(K)),maxSize:d.evaluate(new Ao(W)),interpolationType:S}}}function zp(f,u,d){let b="never";const S=f.get(u);return S?b=S:f.get(d)&&(b="always"),b}const AC=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function _0(f,u,d,b,S,k,D,K,W,ee,re,he,Oe){const De=K?Math.min(Tf,Math.round(K[0])):0,Ke=K?Math.min(Tf,Math.round(K[1])):0;f.emplaceBack(u,d,Math.round(32*b),Math.round(32*S),k,D,(De<<1)+(W?1:0),Ke,16*ee,16*re,256*he,256*Oe)}function x0(f,u,d){f.emplaceBack(u.x,u.y,d),f.emplaceBack(u.x,u.y,d),f.emplaceBack(u.x,u.y,d),f.emplaceBack(u.x,u.y,d)}function Q1(f){for(const u of f.sections)if(Rm(u.text))return!0;return!1}class q1{constructor(u){this.layoutVertexArray=new un,this.indexArray=new Hr,this.programConfigurations=u,this.segments=new tr,this.dynamicLayoutVertexArray=new ei,this.opacityVertexArray=new Ji,this.hasVisibleVertices=!1,this.placedSymbolArray=new Xe}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(u,d,b,S){this.isEmpty()||(b&&(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Ym.members),this.indexBuffer=u.createIndexBuffer(this.indexArray,d),this.dynamicLayoutVertexBuffer=u.createVertexBuffer(this.dynamicLayoutVertexArray,$m.members,!0),this.opacityVertexBuffer=u.createVertexBuffer(this.opacityVertexArray,AC,!0),this.opacityVertexBuffer.itemSize=1),(b||S)&&this.programConfigurations.upload(u))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}Xn("SymbolBuffers",q1);class Y1{constructor(u,d,b){this.layoutVertexArray=new u,this.layoutAttributes=d,this.indexArray=new b,this.segments=new tr,this.collisionVertexArray=new Ms}upload(u){this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=u.createVertexBuffer(this.collisionVertexArray,gv.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}Xn("CollisionBuffers",Y1);class eg{constructor(u){this.collisionBoxArray=u.collisionBoxArray,this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((D=>D.id)),this.index=u.index,this.pixelRatio=u.pixelRatio,this.sourceLayerIndex=u.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const d=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Jm(this.zoom,d["text-size"]),this.iconSizeData=Jm(this.zoom,d["icon-size"]);const b=this.layers[0].layout,S=b.get("symbol-sort-key"),k=b.get("symbol-z-order");this.canOverlap=zp(b,"text-overlap","text-allow-overlap")!=="never"||zp(b,"icon-overlap","icon-allow-overlap")!=="never"||b.get("text-ignore-placement")||b.get("icon-ignore-placement"),this.sortFeaturesByKey=k!=="viewport-y"&&!S.isConstant(),this.sortFeaturesByY=(k==="viewport-y"||k==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,b.get("symbol-placement")==="point"&&(this.writingModes=b.get("text-writing-mode").map((D=>s.ao[D]))),this.stateDependentLayerIds=this.layers.filter((D=>D.isStateDependent())).map((D=>D.id)),this.sourceID=u.sourceID}createArrays(){this.text=new q1(new Wa(this.layers,this.zoom,(u=>/^text/.test(u)))),this.icon=new q1(new Wa(this.layers,this.zoom,(u=>/^icon/.test(u)))),this.glyphOffsetArray=new st,this.lineVertexArray=new nt,this.symbolInstances=new et,this.textAnchorOffsets=new yt}calculateGlyphDependencies(u,d,b,S,k){for(let D=0;D<u.length;D++)if(d[u.charCodeAt(D)]=!0,(b||S)&&k){const K=Lp[u.charAt(D)];K&&(d[K.charCodeAt(0)]=!0)}}populate(u,d,b){const S=this.layers[0],k=S.layout,D=k.get("text-font"),K=k.get("text-field"),W=k.get("icon-image"),ee=(K.value.kind!=="constant"||K.value.value instanceof es&&!K.value.value.isEmpty()||K.value.value.toString().length>0)&&(D.value.kind!=="constant"||D.value.value.length>0),re=W.value.kind!=="constant"||!!W.value.value||Object.keys(W.parameters).length>0,he=k.get("symbol-sort-key");if(this.features=[],!ee&&!re)return;const Oe=d.iconDependencies,De=d.glyphDependencies,Ke=d.availableImages,Ge=new Ao(this.zoom);for(const{feature:Ve,id:at,index:Tt,sourceLayerIndex:ft}of u){const _t=S._featureFilter.needGeometry,Nt=xA(Ve,_t);if(!S._featureFilter.filter(Ge,Nt,b))continue;let Jt,An;if(_t||(Nt.geometry=Vu(Ve)),ee){const Dn=S.getValueAndResolveTokens("text-field",Nt,b,Ke),Nn=es.factory(Dn),Ci=this.hasRTLText=this.hasRTLText||Q1(Nn);(!Ci||dl.getRTLTextPluginStatus()==="unavailable"||Ci&&dl.isParsed())&&(Jt=Vm(Nn,S,Nt))}if(re){const Dn=S.getValueAndResolveTokens("icon-image",Nt,b,Ke);An=Dn instanceof bs?Dn:bs.fromString(Dn)}if(!Jt&&!An)continue;const Wn=this.sortFeaturesByKey?he.evaluate(Nt,{},b):void 0;if(this.features.push({id:at,text:Jt,icon:An,index:Tt,sourceLayerIndex:ft,geometry:Nt.geometry,properties:Ve.properties,type:Pp.types[Ve.type],sortKey:Wn}),An&&(Oe[An.name]=!0),Jt){const Dn=D.evaluate(Nt,{},b).join(","),Nn=k.get("text-rotation-alignment")!=="viewport"&&k.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(s.ao.vertical)>=0;for(const Ci of Jt.sections)if(Ci.image)Oe[Ci.image.name]=!0;else{const jn=Gu(Jt.toString()),Un=Ci.fontStack||Dn,rn=De[Un]=De[Un]||{};this.calculateGlyphDependencies(Ci.text,rn,Nn,this.allowVerticalPlacement,jn)}}}k.get("symbol-placement")==="line"&&(this.features=(function(Ve){const at={},Tt={},ft=[];let _t=0;function Nt(Dn){ft.push(Ve[Dn]),_t++}function Jt(Dn,Nn,Ci){const jn=Tt[Dn];return delete Tt[Dn],Tt[Nn]=jn,ft[jn].geometry[0].pop(),ft[jn].geometry[0]=ft[jn].geometry[0].concat(Ci[0]),jn}function An(Dn,Nn,Ci){const jn=at[Nn];return delete at[Nn],at[Dn]=jn,ft[jn].geometry[0].shift(),ft[jn].geometry[0]=Ci[0].concat(ft[jn].geometry[0]),jn}function Wn(Dn,Nn,Ci){const jn=Ci?Nn[0][Nn[0].length-1]:Nn[0][0];return`${Dn}:${jn.x}:${jn.y}`}for(let Dn=0;Dn<Ve.length;Dn++){const Nn=Ve[Dn],Ci=Nn.geometry,jn=Nn.text?Nn.text.toString():null;if(!jn){Nt(Dn);continue}const Un=Wn(jn,Ci),rn=Wn(jn,Ci,!0);if(Un in Tt&&rn in at&&Tt[Un]!==at[rn]){const Ui=An(Un,rn,Ci),Qi=Jt(Un,rn,ft[Ui].geometry);delete at[Un],delete Tt[rn],Tt[Wn(jn,ft[Qi].geometry,!0)]=Qi,ft[Ui].geometry=null}else Un in Tt?Jt(Un,rn,Ci):rn in at?An(Un,rn,Ci):(Nt(Dn),at[Un]=_t-1,Tt[rn]=_t-1)}return ft.filter((Dn=>Dn.geometry))})(this.features)),this.sortFeaturesByKey&&this.features.sort(((Ve,at)=>Ve.sortKey-at.sortKey))}update(u,d,b){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(u,d,this.layers,{imagePositions:b}),this.icon.programConfigurations.updatePaintArrays(u,d,this.layers,{imagePositions:b}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(u){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(u),this.iconCollisionBox.upload(u)),this.text.upload(u,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(u,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(u,d){const b=this.lineVertexArray.length;if(u.segment!==void 0){let S=u.dist(d[u.segment+1]),k=u.dist(d[u.segment]);const D={};for(let K=u.segment+1;K<d.length;K++)D[K]={x:d[K].x,y:d[K].y,tileUnitDistanceFromAnchor:S},K<d.length-1&&(S+=d[K+1].dist(d[K]));for(let K=u.segment||0;K>=0;K--)D[K]={x:d[K].x,y:d[K].y,tileUnitDistanceFromAnchor:k},K>0&&(k+=d[K-1].dist(d[K]));for(let K=0;K<d.length;K++){const W=D[K];this.lineVertexArray.emplaceBack(W.x,W.y,W.tileUnitDistanceFromAnchor)}}return{lineStartIndex:b,lineLength:this.lineVertexArray.length-b}}addSymbols(u,d,b,S,k,D,K,W,ee,re,he,Oe){const De=u.indexArray,Ke=u.layoutVertexArray,Ge=u.segments.prepareSegment(4*d.length,Ke,De,this.canOverlap?D.sortKey:void 0),Ve=this.glyphOffsetArray.length,at=Ge.vertexLength,Tt=this.allowVerticalPlacement&&K===s.ao.vertical?Math.PI/2:0,ft=D.text&&D.text.sections;for(let _t=0;_t<d.length;_t++){const{tl:Nt,tr:Jt,bl:An,br:Wn,tex:Dn,pixelOffsetTL:Nn,pixelOffsetBR:Ci,minFontScaleX:jn,minFontScaleY:Un,glyphOffset:rn,isSDF:Ui,sectionIndex:Qi}=d[_t],Mi=Ge.vertexLength,oi=rn[1];_0(Ke,W.x,W.y,Nt.x,oi+Nt.y,Dn.x,Dn.y,b,Ui,Nn.x,Nn.y,jn,Un),_0(Ke,W.x,W.y,Jt.x,oi+Jt.y,Dn.x+Dn.w,Dn.y,b,Ui,Ci.x,Nn.y,jn,Un),_0(Ke,W.x,W.y,An.x,oi+An.y,Dn.x,Dn.y+Dn.h,b,Ui,Nn.x,Ci.y,jn,Un),_0(Ke,W.x,W.y,Wn.x,oi+Wn.y,Dn.x+Dn.w,Dn.y+Dn.h,b,Ui,Ci.x,Ci.y,jn,Un),x0(u.dynamicLayoutVertexArray,W,Tt),De.emplaceBack(Mi,Mi+2,Mi+1),De.emplaceBack(Mi+1,Mi+2,Mi+3),Ge.vertexLength+=4,Ge.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(rn[0]),_t!==d.length-1&&Qi===d[_t+1].sectionIndex||u.programConfigurations.populatePaintArrays(Ke.length,D,D.index,{imagePositions:{},canonical:Oe,formattedSection:ft&&ft[Qi]})}u.placedSymbolArray.emplaceBack(W.x,W.y,Ve,this.glyphOffsetArray.length-Ve,at,ee,re,W.segment,b?b[0]:0,b?b[1]:0,S[0],S[1],K,0,!1,0,he)}_addCollisionDebugVertex(u,d,b,S,k,D){return d.emplaceBack(0,0),u.emplaceBack(b.x,b.y,S,k,Math.round(D.x),Math.round(D.y))}addCollisionDebugVertices(u,d,b,S,k,D,K){const W=k.segments.prepareSegment(4,k.layoutVertexArray,k.indexArray),ee=W.vertexLength,re=k.layoutVertexArray,he=k.collisionVertexArray,Oe=K.anchorX,De=K.anchorY;this._addCollisionDebugVertex(re,he,D,Oe,De,new c(u,d)),this._addCollisionDebugVertex(re,he,D,Oe,De,new c(b,d)),this._addCollisionDebugVertex(re,he,D,Oe,De,new c(b,S)),this._addCollisionDebugVertex(re,he,D,Oe,De,new c(u,S)),W.vertexLength+=4;const Ke=k.indexArray;Ke.emplaceBack(ee,ee+1),Ke.emplaceBack(ee+1,ee+2),Ke.emplaceBack(ee+2,ee+3),Ke.emplaceBack(ee+3,ee),W.primitiveLength+=4}addDebugCollisionBoxes(u,d,b,S){for(let k=u;k<d;k++){const D=this.collisionBoxArray.get(k);this.addCollisionDebugVertices(D.x1,D.y1,D.x2,D.y2,S?this.textCollisionBox:this.iconCollisionBox,D.anchorPoint,b)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Y1(Yr,U1.members,cs),this.iconCollisionBox=new Y1(Yr,U1.members,cs);for(let u=0;u<this.symbolInstances.length;u++){const d=this.symbolInstances.get(u);this.addDebugCollisionBoxes(d.textBoxStartIndex,d.textBoxEndIndex,d,!0),this.addDebugCollisionBoxes(d.verticalTextBoxStartIndex,d.verticalTextBoxEndIndex,d,!0),this.addDebugCollisionBoxes(d.iconBoxStartIndex,d.iconBoxEndIndex,d,!1),this.addDebugCollisionBoxes(d.verticalIconBoxStartIndex,d.verticalIconBoxEndIndex,d,!1)}}_deserializeCollisionBoxesForSymbol(u,d,b,S,k,D,K,W,ee){const re={};for(let he=d;he<b;he++){const Oe=u.get(he);re.textBox={x1:Oe.x1,y1:Oe.y1,x2:Oe.x2,y2:Oe.y2,anchorPointX:Oe.anchorPointX,anchorPointY:Oe.anchorPointY},re.textFeatureIndex=Oe.featureIndex;break}for(let he=S;he<k;he++){const Oe=u.get(he);re.verticalTextBox={x1:Oe.x1,y1:Oe.y1,x2:Oe.x2,y2:Oe.y2,anchorPointX:Oe.anchorPointX,anchorPointY:Oe.anchorPointY},re.verticalTextFeatureIndex=Oe.featureIndex;break}for(let he=D;he<K;he++){const Oe=u.get(he);re.iconBox={x1:Oe.x1,y1:Oe.y1,x2:Oe.x2,y2:Oe.y2,anchorPointX:Oe.anchorPointX,anchorPointY:Oe.anchorPointY},re.iconFeatureIndex=Oe.featureIndex;break}for(let he=W;he<ee;he++){const Oe=u.get(he);re.verticalIconBox={x1:Oe.x1,y1:Oe.y1,x2:Oe.x2,y2:Oe.y2,anchorPointX:Oe.anchorPointX,anchorPointY:Oe.anchorPointY},re.verticalIconFeatureIndex=Oe.featureIndex;break}return re}deserializeCollisionBoxes(u){this.collisionArrays=[];for(let d=0;d<this.symbolInstances.length;d++){const b=this.symbolInstances.get(d);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(u,b.textBoxStartIndex,b.textBoxEndIndex,b.verticalTextBoxStartIndex,b.verticalTextBoxEndIndex,b.iconBoxStartIndex,b.iconBoxEndIndex,b.verticalIconBoxStartIndex,b.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(u,d){const b=u.placedSymbolArray.get(d),S=b.vertexStartIndex+4*b.numGlyphs;for(let k=b.vertexStartIndex;k<S;k+=4)u.indexArray.emplaceBack(k,k+2,k+1),u.indexArray.emplaceBack(k+1,k+2,k+3)}getSortedSymbolIndexes(u){if(this.sortedAngle===u&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const d=Math.sin(u),b=Math.cos(u),S=[],k=[],D=[];for(let K=0;K<this.symbolInstances.length;++K){D.push(K);const W=this.symbolInstances.get(K);S.push(0|Math.round(d*W.anchorX+b*W.anchorY)),k.push(W.featureIndex)}return D.sort(((K,W)=>S[K]-S[W]||k[W]-k[K])),D}addToSortKeyRanges(u,d){const b=this.sortKeyRanges[this.sortKeyRanges.length-1];b&&b.sortKey===d?b.symbolInstanceEnd=u+1:this.sortKeyRanges.push({sortKey:d,symbolInstanceStart:u,symbolInstanceEnd:u+1})}sortFeatures(u){if(this.sortFeaturesByY&&this.sortedAngle!==u&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(u),this.sortedAngle=u,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const d of this.symbolInstanceIndexes){const b=this.symbolInstances.get(d);this.featureSortOrder.push(b.featureIndex),[b.rightJustifiedTextSymbolIndex,b.centerJustifiedTextSymbolIndex,b.leftJustifiedTextSymbolIndex].forEach(((S,k,D)=>{S>=0&&D.indexOf(S)===k&&this.addIndicesForPlacedSymbol(this.text,S)})),b.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,b.verticalPlacedTextSymbolIndex),b.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,b.placedIconSymbolIndex),b.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,b.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let $1,V1;Xn("SymbolBucket",eg,{omit:["layers","collisionBoxArray","features","compareText"]}),eg.MAX_GLYPHS=65535,eg.addDynamicAttributes=x0;var Ev={get paint(){return V1=V1||new or({"icon-opacity":new Pi(ot.paint_symbol["icon-opacity"]),"icon-color":new Pi(ot.paint_symbol["icon-color"]),"icon-halo-color":new Pi(ot.paint_symbol["icon-halo-color"]),"icon-halo-width":new Pi(ot.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Pi(ot.paint_symbol["icon-halo-blur"]),"icon-translate":new Jn(ot.paint_symbol["icon-translate"]),"icon-translate-anchor":new Jn(ot.paint_symbol["icon-translate-anchor"]),"text-opacity":new Pi(ot.paint_symbol["text-opacity"]),"text-color":new Pi(ot.paint_symbol["text-color"],{runtimeType:Xi,getOverride:f=>f.textColor,hasOverride:f=>!!f.textColor}),"text-halo-color":new Pi(ot.paint_symbol["text-halo-color"]),"text-halo-width":new Pi(ot.paint_symbol["text-halo-width"]),"text-halo-blur":new Pi(ot.paint_symbol["text-halo-blur"]),"text-translate":new Jn(ot.paint_symbol["text-translate"]),"text-translate-anchor":new Jn(ot.paint_symbol["text-translate-anchor"])})},get layout(){return $1=$1||new or({"symbol-placement":new Jn(ot.layout_symbol["symbol-placement"]),"symbol-spacing":new Jn(ot.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Jn(ot.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Pi(ot.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Jn(ot.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Jn(ot.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Jn(ot.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Jn(ot.layout_symbol["icon-ignore-placement"]),"icon-optional":new Jn(ot.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Jn(ot.layout_symbol["icon-rotation-alignment"]),"icon-size":new Pi(ot.layout_symbol["icon-size"]),"icon-text-fit":new Jn(ot.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Jn(ot.layout_symbol["icon-text-fit-padding"]),"icon-image":new Pi(ot.layout_symbol["icon-image"]),"icon-rotate":new Pi(ot.layout_symbol["icon-rotate"]),"icon-padding":new Pi(ot.layout_symbol["icon-padding"]),"icon-keep-upright":new Jn(ot.layout_symbol["icon-keep-upright"]),"icon-offset":new Pi(ot.layout_symbol["icon-offset"]),"icon-anchor":new Pi(ot.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Jn(ot.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Jn(ot.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Jn(ot.layout_symbol["text-rotation-alignment"]),"text-field":new Pi(ot.layout_symbol["text-field"]),"text-font":new Pi(ot.layout_symbol["text-font"]),"text-size":new Pi(ot.layout_symbol["text-size"]),"text-max-width":new Pi(ot.layout_symbol["text-max-width"]),"text-line-height":new Jn(ot.layout_symbol["text-line-height"]),"text-letter-spacing":new Pi(ot.layout_symbol["text-letter-spacing"]),"text-justify":new Pi(ot.layout_symbol["text-justify"]),"text-radial-offset":new Pi(ot.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Jn(ot.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Pi(ot.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Pi(ot.layout_symbol["text-anchor"]),"text-max-angle":new Jn(ot.layout_symbol["text-max-angle"]),"text-writing-mode":new Jn(ot.layout_symbol["text-writing-mode"]),"text-rotate":new Pi(ot.layout_symbol["text-rotate"]),"text-padding":new Jn(ot.layout_symbol["text-padding"]),"text-keep-upright":new Jn(ot.layout_symbol["text-keep-upright"]),"text-transform":new Pi(ot.layout_symbol["text-transform"]),"text-offset":new Pi(ot.layout_symbol["text-offset"]),"text-allow-overlap":new Jn(ot.layout_symbol["text-allow-overlap"]),"text-overlap":new Jn(ot.layout_symbol["text-overlap"]),"text-ignore-placement":new Jn(ot.layout_symbol["text-ignore-placement"]),"text-optional":new Jn(ot.layout_symbol["text-optional"])})}};class hC{constructor(u){if(u.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=u.property.overrides?u.property.overrides.runtimeType:ea,this.defaultValue=u}evaluate(u){if(u.formattedSection){const d=this.defaultValue.property.overrides;if(d&&d.hasOverride(u.formattedSection))return d.getOverride(u.formattedSection)}return u.feature&&u.featureState?this.defaultValue.evaluate(u.feature,u.featureState):this.defaultValue.property.specification.default}eachChild(u){this.defaultValue.isConstant()||u(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Xn("FormatSectionOverride",hC,{omit:["defaultValue"]});class Rf extends qu{constructor(u,d){super(u,Ev,d)}recalculate(u,d){if(super.recalculate(u,d),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 b=this.layout.get("text-writing-mode");if(b){const S=[];for(const k of b)S.indexOf(k)<0&&S.push(k);this.layout._values["text-writing-mode"]=S}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(u,d,b,S){const k=this.layout.get(u).evaluate(d,{},b,S),D=this._unevaluatedLayout._values[u];return D.isDataDriven()||hc(D.value)||!k?k:(function(K,W){return W.replace(/{([^{}]+)}/g,((ee,re)=>K&&re in K?String(K[re]):""))})(d.properties,k)}createBucket(u){return new eg(u)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const u of Ev.paint.overridableProperties){if(!Rf.hasPaintOverride(this.layout,u))continue;const d=this.paint.get(u),b=new hC(d),S=new Mh(b,d.property.specification);let k=null;k=d.value.kind==="constant"||d.value.kind==="source"?new wh("source",S):new vd("composite",S,d.value.zoomStops),this.paint._values[u]=new Xl(d.property,k,d.parameters)}}_handleOverridablePaintPropertyUpdate(u,d,b){return!(!this.layout||d.isDataDriven()||b.isDataDriven())&&Rf.hasPaintOverride(this.layout,u)}static hasPaintOverride(u,d){const b=u.get("text-field"),S=Ev.paint.properties[d];let k=!1;const D=K=>{for(const W of K)if(S.overrides&&S.overrides.hasOverride(W))return void(k=!0)};if(b.value.kind==="constant"&&b.value.value instanceof es)D(b.value.value.sections);else if(b.value.kind==="source"||b.value.kind==="composite"){const K=ee=>{k||(ee instanceof wr&&Si(ee.value)===ra?D(ee.value.sections):ee instanceof fA?D(ee.sections):ee.eachChild(K))},W=b.value;W._styleExpression&&K(W._styleExpression.expression)}return k}}let dC;var fC={get paint(){return dC=dC||new or({"background-color":new Jn(ot.paint_background["background-color"]),"background-pattern":new bu(ot.paint_background["background-pattern"]),"background-opacity":new Jn(ot.paint_background["background-opacity"])})}};class ho extends qu{constructor(u,d){super(u,fC,d)}}let H1;var Ic={get paint(){return H1=H1||new or({"raster-opacity":new Jn(ot.paint_raster["raster-opacity"]),"raster-hue-rotate":new Jn(ot.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Jn(ot.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Jn(ot.paint_raster["raster-brightness-max"]),"raster-saturation":new Jn(ot.paint_raster["raster-saturation"]),"raster-contrast":new Jn(ot.paint_raster["raster-contrast"]),"raster-resampling":new Jn(ot.paint_raster["raster-resampling"]),"raster-fade-duration":new Jn(ot.paint_raster["raster-fade-duration"])})}};class Ov extends qu{constructor(u,d){super(u,Ic,d)}}class pC extends qu{constructor(u,d){super(u,{},d),this.onAdd=b=>{this.implementation.onAdd&&this.implementation.onAdd(b,b.painter.context.gl)},this.onRemove=b=>{this.implementation.onRemove&&this.implementation.onRemove(b,b.painter.context.gl)},this.implementation=u}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 Kd{constructor(u){this._methodToThrottle=u,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 yr={once:!0},tg=63710088e-1;class Ys{constructor(u,d){if(isNaN(u)||isNaN(d))throw new Error(`Invalid LngLat object: (${u}, ${d})`);if(this.lng=+u,this.lat=+d,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Ys(Ut(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(u){const d=Math.PI/180,b=this.lat*d,S=u.lat*d,k=Math.sin(b)*Math.sin(S)+Math.cos(b)*Math.cos(S)*Math.cos((u.lng-this.lng)*d);return tg*Math.acos(Math.min(k,1))}static convert(u){if(u instanceof Ys)return u;if(Array.isArray(u)&&(u.length===2||u.length===3))return new Ys(Number(u[0]),Number(u[1]));if(!Array.isArray(u)&&typeof u=="object"&&u!==null)return new Ys(Number("lng"in u?u.lng:u.lon),Number(u.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 ya=2*Math.PI*tg;function mC(f){return ya*Math.cos(f*Math.PI/180)}function Ld(f){return(180+f)/360}function Bv(f){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+f*Math.PI/360)))/360}function Iv(f,u){return f/mC(u)}function ng(f){return 360/Math.PI*Math.atan(Math.exp((180-360*f)*Math.PI/180))-90}function ds(f,u){return f*mC(ng(u))}class jp{constructor(u,d,b=0){this.x=+u,this.y=+d,this.z=+b}static fromLngLat(u,d=0){const b=Ys.convert(u);return new jp(Ld(b.lng),Bv(b.lat),Iv(d,b.lat))}toLngLat(){return new Ys(360*this.x-180,ng(this.y))}toAltitude(){return ds(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/ya*(u=ng(this.y),1/Math.cos(u*Math.PI/180));var u}}function nl(f,u,d){var b=2*Math.PI*6378137/256/Math.pow(2,d);return[f*b-2*Math.PI*6378137/2,u*b-2*Math.PI*6378137/2]}class kv{constructor(u,d,b){if(!(function(S,k,D){return!(S<0||S>25||D<0||D>=Math.pow(2,S)||k<0||k>=Math.pow(2,S))})(u,d,b))throw new Error(`x=${d}, y=${b}, z=${u} outside of bounds. 0<=x<${Math.pow(2,u)}, 0<=y<${Math.pow(2,u)} 0<=z<=25 `);this.z=u,this.x=d,this.y=b,this.key=OA(0,u,u,d,b)}equals(u){return this.z===u.z&&this.x===u.x&&this.y===u.y}url(u,d,b){const S=(D=this.y,K=this.z,W=nl(256*(k=this.x),256*(D=Math.pow(2,K)-D-1),K),ee=nl(256*(k+1),256*(D+1),K),W[0]+","+W[1]+","+ee[0]+","+ee[1]);var k,D,K,W,ee;const re=(function(he,Oe,De){let Ke,Ge="";for(let Ve=he;Ve>0;Ve--)Ke=1<<Ve-1,Ge+=(Oe&Ke?1:0)+(De&Ke?2:0);return Ge})(this.z,this.x,this.y);return u[(this.x+this.y)%u.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(b==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,d>1?"@2x":"").replace(/{quadkey}/g,re).replace(/{bbox-epsg-3857}/g,S)}isChildOf(u){const d=this.z-u.z;return d>0&&u.x===this.x>>d&&u.y===this.y>>d}getTilePoint(u){const d=Math.pow(2,this.z);return new c((u.x*d-this.x)*ht,(u.y*d-this.y)*ht)}toString(){return`${this.z}/${this.x}/${this.y}`}}class EA{constructor(u,d){this.wrap=u,this.canonical=d,this.key=OA(u,d.z,d.z,d.x,d.y)}}class Eu{constructor(u,d,b,S,k){if(this.terrainRttPosMatrix32f=null,u<b)throw new Error(`overscaledZ should be >= z; overscaledZ = ${u}; z = ${b}`);this.overscaledZ=u,this.wrap=d,this.canonical=new kv(b,+S,+k),this.key=OA(d,u,b,S,k)}clone(){return new Eu(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(u){return this.overscaledZ===u.overscaledZ&&this.wrap===u.wrap&&this.canonical.equals(u.canonical)}scaledTo(u){if(u>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${u}; overscaledZ = ${this.overscaledZ}`);const d=this.canonical.z-u;return u>this.canonical.z?new Eu(u,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Eu(u,this.wrap,u,this.canonical.x>>d,this.canonical.y>>d)}calculateScaledKey(u,d){if(u>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${u}; overscaledZ = ${this.overscaledZ}`);const b=this.canonical.z-u;return u>this.canonical.z?OA(this.wrap*+d,u,this.canonical.z,this.canonical.x,this.canonical.y):OA(this.wrap*+d,u,u,this.canonical.x>>b,this.canonical.y>>b)}isChildOf(u){if(u.wrap!==this.wrap)return!1;const d=this.canonical.z-u.canonical.z;return u.overscaledZ===0||u.overscaledZ<this.overscaledZ&&u.canonical.x===this.canonical.x>>d&&u.canonical.y===this.canonical.y>>d}children(u){if(this.overscaledZ>=u)return[new Eu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const d=this.canonical.z+1,b=2*this.canonical.x,S=2*this.canonical.y;return[new Eu(d,this.wrap,d,b,S),new Eu(d,this.wrap,d,b+1,S),new Eu(d,this.wrap,d,b,S+1),new Eu(d,this.wrap,d,b+1,S+1)]}isLessThan(u){return this.wrap<u.wrap||!(this.wrap>u.wrap)&&(this.overscaledZ<u.overscaledZ||!(this.overscaledZ>u.overscaledZ)&&(this.canonical.x<u.canonical.x||!(this.canonical.x>u.canonical.x)&&this.canonical.y<u.canonical.y))}wrapped(){return new Eu(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(u){return new Eu(this.overscaledZ,u,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new EA(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(u){return this.canonical.getTilePoint(new jp(u.x-this.wrap,u.y))}}function OA(f,u,d,b,S){(f*=2)<0&&(f=-1*f-1);const k=1<<d;return(k*k*f+k*S+b).toString(36)+d.toString(36)+u.toString(36)}function Es(f,u){return u?f.properties[u]:f.id}Xn("CanonicalTileID",kv),Xn("OverscaledTileID",Eu,{omit:["terrainRttPosMatrix32f"]});class fs{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(u){return this.minX=Math.min(this.minX,u.x),this.minY=Math.min(this.minY,u.y),this.maxX=Math.max(this.maxX,u.x),this.maxY=Math.max(this.maxY,u.y),this}expandBy(u){return this.minX-=u,this.minY-=u,this.maxX+=u,this.maxY+=u,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(u){return this.expandBy(-u)}map(u){const d=new fs;return d.extend(u(new c(this.minX,this.minY))),d.extend(u(new c(this.maxX,this.minY))),d.extend(u(new c(this.minX,this.maxY))),d.extend(u(new c(this.maxX,this.maxY))),d}static fromPoints(u){const d=new fs;for(const b of u)d.extend(b);return d}contains(u){return u.x>=this.minX&&u.x<=this.maxX&&u.y>=this.minY&&u.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(u){return!this.empty()&&!u.empty()&&u.minX>=this.minX&&u.maxX<=this.maxX&&u.minY>=this.minY&&u.maxY<=this.maxY}intersects(u){return!this.empty()&&!u.empty()&&u.minX<=this.maxX&&u.maxX>=this.minX&&u.minY<=this.maxY&&u.maxY>=this.minY}}class M0{constructor(u){this._stringToNumber={},this._numberToString=[];for(let d=0;d<u.length;d++){const b=u[d];this._stringToNumber[b]=d,this._numberToString[d]=b}}encode(u){return this._stringToNumber[u]}decode(u){if(u>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${u} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[u]}}class Z1{constructor(u,d,b,S,k){this.type="Feature",this._vectorTileFeature=u,u._z=d,u._x=b,u._y=S,this.properties=u.properties,this.id=k}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(u){this._geometry=u}toJSON(){const u={geometry:this.geometry};for(const d in this)d!=="_geometry"&&d!=="_vectorTileFeature"&&(u[d]=this[d]);return u}}class gC{constructor(u,d){this.tileID=u,this.x=u.canonical.x,this.y=u.canonical.y,this.z=u.canonical.z,this.grid=new Na(ht,16,0),this.grid3D=new Na(ht,16,0),this.featureIndexArray=new At,this.promoteId=d}insert(u,d,b,S,k,D){const K=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(b,S,k);const W=D?this.grid3D:this.grid;for(let ee=0;ee<d.length;ee++){const re=d[ee],he=[1/0,1/0,-1/0,-1/0];for(let Oe=0;Oe<re.length;Oe++){const De=re[Oe];he[0]=Math.min(he[0],De.x),he[1]=Math.min(he[1],De.y),he[2]=Math.max(he[2],De.x),he[3]=Math.max(he[3],De.y)}he[0]<ht&&he[1]<ht&&he[2]>=0&&he[3]>=0&&W.insert(K,he[0],he[1],he[2],he[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new iC(new L1(this.rawTileData)).layers,this.sourceLayerCoder=new M0(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(u,d,b,S){this.loadVTLayers();const k=u.params,D=ht/u.tileSize/u.scale,K=GA(k.filter,k.globalState),W=u.queryGeometry,ee=u.queryPadding*D,re=fs.fromPoints(W),he=this.grid.query(re.minX-ee,re.minY-ee,re.maxX+ee,re.maxY+ee),Oe=fs.fromPoints(u.cameraQueryGeometry).expandBy(ee),De=this.grid3D.query(Oe.minX,Oe.minY,Oe.maxX,Oe.maxY,((Ve,at,Tt,ft)=>(function(_t,Nt,Jt,An,Wn){for(const Nn of _t)if(Nt<=Nn.x&&Jt<=Nn.y&&An>=Nn.x&&Wn>=Nn.y)return!0;const Dn=[new c(Nt,Jt),new c(Nt,Wn),new c(An,Wn),new c(An,Jt)];if(_t.length>2){for(const Nn of Dn)if(wp(_t,Nn))return!0}for(let Nn=0;Nn<_t.length-1;Nn++)if($b(_t[Nn],_t[Nn+1],Dn))return!0;return!1})(u.cameraQueryGeometry,Ve-ee,at-ee,Tt+ee,ft+ee)));for(const Ve of De)he.push(Ve);he.sort(Wx);const Ke={};let Ge;for(let Ve=0;Ve<he.length;Ve++){const at=he[Ve];if(at===Ge)continue;Ge=at;const Tt=this.featureIndexArray.get(at);let ft=null;this.loadMatchingFeature(Ke,Tt.bucketIndex,Tt.sourceLayerIndex,Tt.featureIndex,K,k.layers,k.availableImages,d,b,S,((_t,Nt,Jt)=>(ft||(ft=Vu(_t)),Nt.queryIntersectsFeature({queryGeometry:W,feature:_t,featureState:Jt,geometry:ft,zoom:this.z,transform:u.transform,pixelsToTileUnits:D,pixelPosMatrix:u.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:u.getElevation}))))}return Ke}loadMatchingFeature(u,d,b,S,k,D,K,W,ee,re,he){const Oe=this.bucketLayerIDs[d];if(D&&!Oe.some((Ve=>D.has(Ve))))return;const De=this.sourceLayerCoder.decode(b),Ke=this.vtLayers[De].feature(S);if(k.needGeometry){const Ve=xA(Ke,!0);if(!k.filter(new Ao(this.tileID.overscaledZ),Ve,this.tileID.canonical))return}else if(!k.filter(new Ao(this.tileID.overscaledZ),Ke))return;const Ge=this.getId(Ke,De);for(let Ve=0;Ve<Oe.length;Ve++){const at=Oe[Ve];if(D&&!D.has(at))continue;const Tt=W[at];if(!Tt)continue;let ft={};Ge&&re&&(ft=re.getState(Tt.sourceLayer||"_geojsonTileLayer",Ge));const _t=Pe({},ee[at]);_t.paint=Tv(_t.paint,Tt.paint,Ke,ft,K),_t.layout=Tv(_t.layout,Tt.layout,Ke,ft,K);const Nt=!he||he(Ke,Tt,ft);if(!Nt)continue;const Jt=new Z1(Ke,this.z,this.x,this.y,Ge);Jt.layer=_t;let An=u[at];An===void 0&&(An=u[at]=[]),An.push({featureIndex:S,feature:Jt,intersectionZ:Nt})}}lookupSymbolFeatures(u,d,b,S,k,D,K,W){const ee={};this.loadVTLayers();const re=GA(k.filterSpec,k.globalState);for(const he of u)this.loadMatchingFeature(ee,b,S,he,re,D,K,W,d);return ee}hasLayer(u){for(const d of this.bucketLayerIDs)for(const b of d)if(u===b)return!0;return!1}getId(u,d){var b;let S=u.id;return this.promoteId&&(S=u.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[d]],typeof S=="boolean"&&(S=Number(S)),S===void 0&&(!((b=u.properties)===null||b===void 0)&&b.cluster)&&this.promoteId&&(S=Number(u.properties.cluster_id))),S}}function Tv(f,u,d,b,S){return Se(f,((k,D)=>{const K=u instanceof CA?u.get(D):null;return K&&K.evaluate?K.evaluate(d,b,S):K}))}function Wx(f,u){return u-f}function Rv(f,u,d,b,S){const k=[];for(let D=0;D<f.length;D++){const K=f[D];let W;for(let ee=0;ee<K.length-1;ee++){let re=K[ee],he=K[ee+1];re.x<u&&he.x<u||(re.x<u?re=new c(u,re.y+(u-re.x)/(he.x-re.x)*(he.y-re.y))._round():he.x<u&&(he=new c(u,re.y+(u-re.x)/(he.x-re.x)*(he.y-re.y))._round()),re.y<d&&he.y<d||(re.y<d?re=new c(re.x+(d-re.y)/(he.y-re.y)*(he.x-re.x),d)._round():he.y<d&&(he=new c(re.x+(d-re.y)/(he.y-re.y)*(he.x-re.x),d)._round()),re.x>=b&&he.x>=b||(re.x>=b?re=new c(b,re.y+(b-re.x)/(he.x-re.x)*(he.y-re.y))._round():he.x>=b&&(he=new c(b,re.y+(b-re.x)/(he.x-re.x)*(he.y-re.y))._round()),re.y>=S&&he.y>=S||(re.y>=S?re=new c(re.x+(S-re.y)/(he.y-re.y)*(he.x-re.x),S)._round():he.y>=S&&(he=new c(re.x+(S-re.y)/(he.y-re.y)*(he.x-re.x),S)._round()),W&&re.equals(W[W.length-1])||(W=[re],k.push(W)),W.push(he)))))}}return k}Xn("FeatureIndex",gC,{omit:["rawTileData","sourceLayerCoder"]});class Df extends c{constructor(u,d,b,S){super(u,d),this.angle=b,S!==void 0&&(this.segment=S)}clone(){return new Df(this.x,this.y,this.angle,this.segment)}}function Dv(f,u,d,b,S){if(u.segment===void 0||d===0)return!0;let k=u,D=u.segment+1,K=0;for(;K>-d/2;){if(D--,D<0)return!1;K-=f[D].dist(k),k=f[D]}K+=f[D].dist(f[D+1]),D++;const W=[];let ee=0;for(;K<d/2;){const re=f[D],he=f[D+1];if(!he)return!1;let Oe=f[D-1].angleTo(re)-re.angleTo(he);for(Oe=Math.abs((Oe+3*Math.PI)%(2*Math.PI)-Math.PI),W.push({distance:K,angleDelta:Oe}),ee+=Oe;K-W[0].distance>b;)ee-=W.shift().angleDelta;if(ee>S)return!1;D++,K+=re.dist(he)}return!0}function iA(f){let u=0;for(let d=0;d<f.length-1;d++)u+=f[d].dist(f[d+1]);return u}function w0(f,u,d){return f?.6*u*d:0}function X1(f,u){return Math.max(f?f.right-f.left:0,u?u.right-u.left:0)}function yC(f,u,d,b,S,k){const D=w0(d,S,k),K=X1(d,b)*k;let W=0;const ee=iA(f)/2;for(let re=0;re<f.length-1;re++){const he=f[re],Oe=f[re+1],De=he.dist(Oe);if(W+De>ee){const Ke=(ee-W)/De,Ge=Gc.number(he.x,Oe.x,Ke),Ve=Gc.number(he.y,Oe.y,Ke),at=new Df(Ge,Ve,Oe.angleTo(he),re);return at._round(),!D||Dv(f,at,K,D,u)?at:void 0}W+=De}}function J1(f,u,d,b,S,k,D,K,W){const ee=w0(b,k,D),re=X1(b,S),he=re*D,Oe=f[0].x===0||f[0].x===W||f[0].y===0||f[0].y===W;return u-he<u/4&&(u=he+u/4),Ou(f,Oe?u/2*K%u:(re/2+2*k)*D*K%u,u,ee,d,he,Oe,!1,W)}function Ou(f,u,d,b,S,k,D,K,W){const ee=k/2,re=iA(f);let he=0,Oe=u-d,De=[];for(let Ke=0;Ke<f.length-1;Ke++){const Ge=f[Ke],Ve=f[Ke+1],at=Ge.dist(Ve),Tt=Ve.angleTo(Ge);for(;Oe+d<he+at;){Oe+=d;const ft=(Oe-he)/at,_t=Gc.number(Ge.x,Ve.x,ft),Nt=Gc.number(Ge.y,Ve.y,ft);if(_t>=0&&_t<W&&Nt>=0&&Nt<W&&Oe-ee>=0&&Oe+ee<=re){const Jt=new Df(_t,Nt,Tt,Ke);Jt._round(),b&&!Dv(f,Jt,k,b,S)||De.push(Jt)}}he+=at}return K||De.length||D||(De=Ou(f,he/2,d,b,S,k,D,!0,W)),De}function Np(f,u,d,b){const S=[],k=f.image,D=k.pixelRatio,K=k.paddedRect.w-2,W=k.paddedRect.h-2;let ee={x1:f.left,y1:f.top,x2:f.right,y2:f.bottom};const re=k.stretchX||[[0,K]],he=k.stretchY||[[0,W]],Oe=(rn,Ui)=>rn+Ui[1]-Ui[0],De=re.reduce(Oe,0),Ke=he.reduce(Oe,0),Ge=K-De,Ve=W-Ke;let at=0,Tt=De,ft=0,_t=Ke,Nt=0,Jt=Ge,An=0,Wn=Ve;if(k.content&&b){const rn=k.content,Ui=rn[2]-rn[0],Qi=rn[3]-rn[1];(k.textFitWidth||k.textFitHeight)&&(ee=Ud(f)),at=kc(re,0,rn[0]),ft=kc(he,0,rn[1]),Tt=kc(re,rn[0],rn[2]),_t=kc(he,rn[1],rn[3]),Nt=rn[0]-at,An=rn[1]-ft,Jt=Ui-Tt,Wn=Qi-_t}const Dn=ee.x1,Nn=ee.y1,Ci=ee.x2-Dn,jn=ee.y2-Nn,Un=(rn,Ui,Qi,Mi)=>{const oi=S0(rn.stretch-at,Tt,Ci,Dn),Qr=E0(rn.fixed-Nt,Jt,rn.stretch,De),$s=S0(Ui.stretch-ft,_t,jn,Nn),na=E0(Ui.fixed-An,Wn,Ui.stretch,Ke),Kl=S0(Qi.stretch-at,Tt,Ci,Dn),Tc=E0(Qi.fixed-Nt,Jt,Qi.stretch,De),Ll=S0(Mi.stretch-ft,_t,jn,Nn),il=E0(Mi.fixed-An,Wn,Mi.stretch,Ke),Vs=new c(oi,$s),va=new c(Kl,$s),Ra=new c(Kl,Ll),rl=new c(oi,Ll),ol=new c(Qr/D,na/D),Xu=new c(Tc/D,il/D),ba=u*Math.PI/180;if(ba){const Ca=Math.sin(ba),h=Math.cos(ba),g=[h,-Ca,Ca,h];Vs._matMult(g),va._matMult(g),rl._matMult(g),Ra._matMult(g)}const Bu=rn.stretch+rn.fixed,qa=Ui.stretch+Ui.fixed;return{tl:Vs,tr:va,bl:rl,br:Ra,tex:{x:k.paddedRect.x+1+Bu,y:k.paddedRect.y+1+qa,w:Qi.stretch+Qi.fixed-Bu,h:Mi.stretch+Mi.fixed-qa},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ol,pixelOffsetBR:Xu,minFontScaleX:Jt/D/Ci,minFontScaleY:Wn/D/jn,isSDF:d}};if(b&&(k.stretchX||k.stretchY)){const rn=ey(re,Ge,De),Ui=ey(he,Ve,Ke);for(let Qi=0;Qi<rn.length-1;Qi++){const Mi=rn[Qi],oi=rn[Qi+1];for(let Qr=0;Qr<Ui.length-1;Qr++)S.push(Un(Mi,Ui[Qr],oi,Ui[Qr+1]))}}else S.push(Un({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:K+1},{fixed:0,stretch:W+1}));return S}function kc(f,u,d){let b=0;for(const S of f)b+=Math.max(u,Math.min(d,S[1]))-Math.max(u,Math.min(d,S[0]));return b}function ey(f,u,d){const b=[{fixed:-1,stretch:0}];for(const[S,k]of f){const D=b[b.length-1];b.push({fixed:S-D.stretch,stretch:D.stretch}),b.push({fixed:S-D.stretch,stretch:D.stretch+(k-S)})}return b.push({fixed:u+1,stretch:d}),b}function S0(f,u,d,b){return f/u*d+b}function E0(f,u,d,b){return f-u*d/b}Xn("Anchor",Df);class Pf{constructor(u,d,b,S,k,D,K,W,ee,re){var he;if(this.boxStartIndex=u.length,ee){let Oe=D.top,De=D.bottom;const Ke=D.collisionPadding;Ke&&(Oe-=Ke[1],De+=Ke[3]);let Ge=De-Oe;Ge>0&&(Ge=Math.max(10,Ge),this.circleDiameter=Ge)}else{const Oe=!((he=D.image)===null||he===void 0)&&he.content&&(D.image.textFitWidth||D.image.textFitHeight)?Ud(D):{x1:D.left,y1:D.top,x2:D.right,y2:D.bottom};Oe.y1=Oe.y1*K-W[0],Oe.y2=Oe.y2*K+W[2],Oe.x1=Oe.x1*K-W[3],Oe.x2=Oe.x2*K+W[1];const De=D.collisionPadding;if(De&&(Oe.x1-=De[0]*K,Oe.y1-=De[1]*K,Oe.x2+=De[2]*K,Oe.y2+=De[3]*K),re){const Ke=new c(Oe.x1,Oe.y1),Ge=new c(Oe.x2,Oe.y1),Ve=new c(Oe.x1,Oe.y2),at=new c(Oe.x2,Oe.y2),Tt=re*Math.PI/180;Ke._rotate(Tt),Ge._rotate(Tt),Ve._rotate(Tt),at._rotate(Tt),Oe.x1=Math.min(Ke.x,Ge.x,Ve.x,at.x),Oe.x2=Math.max(Ke.x,Ge.x,Ve.x,at.x),Oe.y1=Math.min(Ke.y,Ge.y,Ve.y,at.y),Oe.y2=Math.max(Ke.y,Ge.y,Ve.y,at.y)}u.emplaceBack(d.x,d.y,Oe.x1,Oe.y1,Oe.x2,Oe.y2,b,S,k)}this.boxEndIndex=u.length}}class rA{constructor(u=[],d=(b,S)=>b<S?-1:b>S?1:0){if(this.data=u,this.length=this.data.length,this.compare=d,this.length>0)for(let b=(this.length>>1)-1;b>=0;b--)this._down(b)}push(u){this.data.push(u),this._up(this.length++)}pop(){if(this.length===0)return;const u=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:d,compare:b}=this,S=d[u];for(;u>0;){const k=u-1>>1,D=d[k];if(b(S,D)>=0)break;d[u]=D,u=k}d[u]=S}_down(u){const{data:d,compare:b}=this,S=this.length>>1,k=d[u];for(;u<S;){let D=1+(u<<1);const K=D+1;if(K<this.length&&b(d[K],d[D])<0&&(D=K),b(d[D],k)>=0)break;d[u]=d[D],u=D}d[u]=k}}function Nh(f,u=1,d=!1){const b=fs.fromPoints(f[0]),S=Math.min(b.width(),b.height());let k=S/2;const D=new rA([],Br),{minX:K,minY:W,maxX:ee,maxY:re}=b;if(S===0)return new c(K,W);for(let De=K;De<ee;De+=S)for(let Ke=W;Ke<re;Ke+=S)D.push(new Zu(De+k,Ke+k,k,f));let he=(function(De){let Ke=0,Ge=0,Ve=0;const at=De[0];for(let Tt=0,ft=at.length,_t=ft-1;Tt<ft;_t=Tt++){const Nt=at[Tt],Jt=at[_t],An=Nt.x*Jt.y-Jt.x*Nt.y;Ge+=(Nt.x+Jt.x)*An,Ve+=(Nt.y+Jt.y)*An,Ke+=3*An}return new Zu(Ge/Ke,Ve/Ke,0,De)})(f),Oe=D.length;for(;D.length;){const De=D.pop();(De.d>he.d||!he.d)&&(he=De,d&&console.log("found best %d after %d probes",Math.round(1e4*De.d)/1e4,Oe)),De.max-he.d<=u||(k=De.h/2,D.push(new Zu(De.p.x-k,De.p.y-k,k,f)),D.push(new Zu(De.p.x+k,De.p.y-k,k,f)),D.push(new Zu(De.p.x-k,De.p.y+k,k,f)),D.push(new Zu(De.p.x+k,De.p.y+k,k,f)),Oe+=4)}return d&&(console.log(`num probes: ${Oe}`),console.log(`best distance: ${he.d}`)),he.p}function Br(f,u){return u.max-f.max}function Zu(f,u,d,b){this.p=new c(f,u),this.h=d,this.d=(function(S,k){let D=!1,K=1/0;for(let W=0;W<k.length;W++){const ee=k[W];for(let re=0,he=ee.length,Oe=he-1;re<he;Oe=re++){const De=ee[re],Ke=ee[Oe];De.y>S.y!=Ke.y>S.y&&S.x<(Ke.x-De.x)*(S.y-De.y)/(Ke.y-De.y)+De.x&&(D=!D),K=Math.min(K,s0(S,De,Ke))}}return(D?1:-1)*Math.sqrt(K)})(this.p,b),this.max=this.d+this.h*Math.SQRT2}var ps;s.aE=void 0,(ps=s.aE||(s.aE={}))[ps.center=1]="center",ps[ps.left=2]="left",ps[ps.right=3]="right",ps[ps.top=4]="top",ps[ps.bottom=5]="bottom",ps[ps["top-left"]=6]="top-left",ps[ps["top-right"]=7]="top-right",ps[ps["bottom-left"]=8]="bottom-left",ps[ps["bottom-right"]=9]="bottom-right";const ty=Number.POSITIVE_INFINITY;function Gp(f,u){return u[1]!==ty?(function(d,b,S){let k=0,D=0;switch(b=Math.abs(b),S=Math.abs(S),d){case"top-right":case"top-left":case"top":D=S-7;break;case"bottom-right":case"bottom-left":case"bottom":D=7-S}switch(d){case"top-right":case"bottom-right":case"right":k=-b;break;case"top-left":case"bottom-left":case"left":k=b}return[k,D]})(f,u[0],u[1]):(function(d,b){let S=0,k=0;b<0&&(b=0);const D=b/Math.SQRT2;switch(d){case"top-right":case"top-left":k=D-7;break;case"bottom-right":case"bottom-left":k=7-D;break;case"bottom":k=7-b;break;case"top":k=b-7}switch(d){case"top-right":case"bottom-right":S=-D;break;case"top-left":case"bottom-left":S=D;break;case"left":S=b;break;case"right":S=-b}return[S,k]})(f,u[0])}function zo(f,u,d){var b;const S=f.layout,k=(b=S.get("text-variable-anchor-offset"))===null||b===void 0?void 0:b.evaluate(u,{},d);if(k){const K=k.values,W=[];for(let ee=0;ee<K.length;ee+=2){const re=W[ee]=K[ee],he=K[ee+1].map((Oe=>Oe*wo));re.startsWith("top")?he[1]-=7:re.startsWith("bottom")&&(he[1]+=7),W[ee+1]=he}return new us(W)}const D=S.get("text-variable-anchor");if(D){let K;K=f._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[S.get("text-radial-offset").evaluate(u,{},d)*wo,ty]:S.get("text-offset").evaluate(u,{},d).map((ee=>ee*wo));const W=[];for(const ee of D)W.push(ee,Gp(ee,K));return new us(W)}return null}function Pv(f){switch(f){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function vC(f,u,d,b,S,k,D,K,W,ee,re,he){let Oe=k.textMaxSize.evaluate(u,{});Oe===void 0&&(Oe=D);const De=f.layers[0].layout,Ke=De.get("icon-offset").evaluate(u,{},re),Ge=bC(d.horizontal),Ve=D/24,at=f.tilePixelRatio*Ve,Tt=f.tilePixelRatio*Oe/24,ft=f.tilePixelRatio*K,_t=f.tilePixelRatio*De.get("symbol-spacing"),Nt=De.get("text-padding")*f.tilePixelRatio,Jt=(function(Qi,Mi,oi,Qr=1){const $s=Qi.get("icon-padding").evaluate(Mi,{},oi),na=$s&&$s.values;return[na[0]*Qr,na[1]*Qr,na[2]*Qr,na[3]*Qr]})(De,u,re,f.tilePixelRatio),An=De.get("text-max-angle")/180*Math.PI,Wn=De.get("text-rotation-alignment")!=="viewport"&&De.get("symbol-placement")!=="point",Dn=De.get("icon-rotation-alignment")==="map"&&De.get("symbol-placement")!=="point",Nn=De.get("symbol-placement"),Ci=_t/2,jn=De.get("icon-text-fit");let Un;b&&jn!=="none"&&(f.allowVerticalPlacement&&d.vertical&&(Un=eh(b,d.vertical,jn,De.get("icon-text-fit-padding"),Ke,Ve)),Ge&&(b=eh(b,Ge,jn,De.get("icon-text-fit-padding"),Ke,Ve)));const rn=re?he.line.getGranularityForZoomLevel(re.z):1,Ui=(Qi,Mi)=>{Mi.x<0||Mi.x>=ht||Mi.y<0||Mi.y>=ht||(function(oi,Qr,$s,na,Kl,Tc,Ll,il,Vs,va,Ra,rl,ol,Xu,ba,Bu,qa,Ca,h,g,M,I,N,te,Re){const Ye=oi.addToLineVertexArray(Qr,$s);let bt,Gt,an,fn,en=0,Yt=0,sr=0,nr=0,os=-1,Lt=-1;const Et={};let Wt=Ed("");if(oi.allowVerticalPlacement&&na.vertical){const Ju=il.layout.get("text-rotate").evaluate(M,{},te)+90;an=new Pf(Vs,Qr,va,Ra,rl,na.vertical,ol,Xu,ba,Ju),Ll&&(fn=new Pf(Vs,Qr,va,Ra,rl,Ll,qa,Ca,ba,Ju))}if(Kl){const Ju=il.layout.get("icon-rotate").evaluate(M,{}),th=il.layout.get("icon-text-fit")!=="none",I0=Np(Kl,Ju,N,th),jd=Ll?Np(Ll,Ju,N,th):void 0;Gt=new Pf(Vs,Qr,va,Ra,rl,Kl,qa,Ca,!1,Ju),en=4*I0.length;const k0=oi.iconSizeData;let Ff=null;k0.kind==="source"?(Ff=[nA*il.layout.get("icon-size").evaluate(M,{})],Ff[0]>Tf&&mt(`${oi.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):k0.kind==="composite"&&(Ff=[nA*I.compositeIconSizes[0].evaluate(M,{},te),nA*I.compositeIconSizes[1].evaluate(M,{},te)],(Ff[0]>Tf||Ff[1]>Tf)&&mt(`${oi.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),oi.addSymbols(oi.icon,I0,Ff,g,h,M,s.ao.none,Qr,Ye.lineStartIndex,Ye.lineLength,-1,te),os=oi.icon.placedSymbolArray.length-1,jd&&(Yt=4*jd.length,oi.addSymbols(oi.icon,jd,Ff,g,h,M,s.ao.vertical,Qr,Ye.lineStartIndex,Ye.lineLength,-1,te),Lt=oi.icon.placedSymbolArray.length-1)}const hn=Object.keys(na.horizontal);for(const Ju of hn){const th=na.horizontal[Ju];if(!bt){Wt=Ed(th.text);const jd=il.layout.get("text-rotate").evaluate(M,{},te);bt=new Pf(Vs,Qr,va,Ra,rl,th,ol,Xu,ba,jd)}const I0=th.positionedLines.length===1;if(sr+=O0(oi,Qr,th,Tc,il,ba,M,Bu,Ye,na.vertical?s.ao.horizontal:s.ao.horizontalOnly,I0?hn:[Ju],Et,os,I,te),I0)break}na.vertical&&(nr+=O0(oi,Qr,na.vertical,Tc,il,ba,M,Bu,Ye,s.ao.vertical,["vertical"],Et,Lt,I,te));const Oi=bt?bt.boxStartIndex:oi.collisionBoxArray.length,io=bt?bt.boxEndIndex:oi.collisionBoxArray.length,qi=an?an.boxStartIndex:oi.collisionBoxArray.length,ur=an?an.boxEndIndex:oi.collisionBoxArray.length,Fl=Gt?Gt.boxStartIndex:oi.collisionBoxArray.length,Po=Gt?Gt.boxEndIndex:oi.collisionBoxArray.length,Lf=fn?fn.boxStartIndex:oi.collisionBoxArray.length,qx=fn?fn.boxEndIndex:oi.collisionBoxArray.length;let zd=-1;const ry=(Ju,th)=>Ju&&Ju.circleDiameter?Math.max(Ju.circleDiameter,th):th;zd=ry(bt,zd),zd=ry(an,zd),zd=ry(Gt,zd),zd=ry(fn,zd);const xC=zd>-1?1:0;xC&&(zd*=Re/wo),oi.glyphOffsetArray.length>=eg.MAX_GLYPHS&&mt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),M.sortKey!==void 0&&oi.addToSortKeyRanges(oi.symbolInstances.length,M.sortKey);const z6=zo(il,M,te),[j6,N6]=(function(Ju,th){const I0=Ju.length,jd=th?.values;if(jd?.length>0)for(let k0=0;k0<jd.length;k0+=2){const Ff=jd[k0+1];Ju.emplaceBack(s.aE[jd[k0]],Ff[0],Ff[1])}return[I0,Ju.length]})(oi.textAnchorOffsets,z6);oi.symbolInstances.emplaceBack(Qr.x,Qr.y,Et.right>=0?Et.right:-1,Et.center>=0?Et.center:-1,Et.left>=0?Et.left:-1,Et.vertical||-1,os,Lt,Wt,Oi,io,qi,ur,Fl,Po,Lf,qx,va,sr,nr,en,Yt,xC,0,ol,zd,j6,N6)})(f,Mi,Qi,d,b,S,Un,f.layers[0],f.collisionBoxArray,u.index,u.sourceLayerIndex,f.index,at,[Nt,Nt,Nt,Nt],Wn,W,ft,Jt,Dn,Ke,u,k,ee,re,D)};if(Nn==="line")for(const Qi of Rv(u.geometry,0,0,ht,ht)){const Mi=Ec(Qi,rn),oi=J1(Mi,_t,An,d.vertical||Ge,b,24,Tt,f.overscaling,ht);for(const Qr of oi)Ge&&Qx(f,Ge.text,Ci,Qr)||Ui(Mi,Qr)}else if(Nn==="line-center"){for(const Qi of u.geometry)if(Qi.length>1){const Mi=Ec(Qi,rn),oi=yC(Mi,An,d.vertical||Ge,b,24,Tt);oi&&Ui(Mi,oi)}}else if(u.type==="Polygon")for(const Qi of yh(u.geometry,0)){const Mi=Nh(Qi,16);Ui(Ec(Qi[0],rn,!0),new Df(Mi.x,Mi.y,0))}else if(u.type==="LineString")for(const Qi of u.geometry){const Mi=Ec(Qi,rn);Ui(Mi,new Df(Mi[0].x,Mi[0].y,0))}else if(u.type==="Point")for(const Qi of u.geometry)for(const Mi of Qi)Ui([Mi],new Df(Mi.x,Mi.y,0))}function O0(f,u,d,b,S,k,D,K,W,ee,re,he,Oe,De,Ke){const Ge=(function(Tt,ft,_t,Nt,Jt,An,Wn,Dn){const Nn=Nt.layout.get("text-rotate").evaluate(An,{})*Math.PI/180,Ci=[];for(const jn of ft.positionedLines)for(const Un of jn.positionedGlyphs){if(!Un.rect)continue;const rn=Un.rect||{};let Ui=4,Qi=!0,Mi=1,oi=0;const Qr=(Jt||Dn)&&Un.vertical,$s=Un.metrics.advance*Un.scale/2;if(Dn&&ft.verticalizable&&(oi=jn.lineOffset/2-(Un.imageName?-(wo-Un.metrics.width*Un.scale)/2:(Un.scale-1)*wo)),Un.imageName){const Ca=Wn[Un.imageName];Qi=Ca.sdf,Mi=Ca.pixelRatio,Ui=1/Mi}const na=Jt?[Un.x+$s,Un.y]:[0,0];let Kl=Jt?[0,0]:[Un.x+$s+_t[0],Un.y+_t[1]-oi],Tc=[0,0];Qr&&(Tc=Kl,Kl=[0,0]);const Ll=Un.metrics.isDoubleResolution?2:1,il=(Un.metrics.left-Ui)*Un.scale-$s+Kl[0],Vs=(-Un.metrics.top-Ui)*Un.scale+Kl[1],va=il+rn.w/Ll*Un.scale/Mi,Ra=Vs+rn.h/Ll*Un.scale/Mi,rl=new c(il,Vs),ol=new c(va,Vs),Xu=new c(il,Ra),ba=new c(va,Ra);if(Qr){const Ca=new c(-$s,$s- -17),h=-Math.PI/2,g=12-$s,M=new c(22-g,-(Un.imageName?g:0)),I=new c(...Tc);rl._rotateAround(h,Ca)._add(M)._add(I),ol._rotateAround(h,Ca)._add(M)._add(I),Xu._rotateAround(h,Ca)._add(M)._add(I),ba._rotateAround(h,Ca)._add(M)._add(I)}if(Nn){const Ca=Math.sin(Nn),h=Math.cos(Nn),g=[h,-Ca,Ca,h];rl._matMult(g),ol._matMult(g),Xu._matMult(g),ba._matMult(g)}const Bu=new c(0,0),qa=new c(0,0);Ci.push({tl:rl,tr:ol,bl:Xu,br:ba,tex:rn,writingMode:ft.writingMode,glyphOffset:na,sectionIndex:Un.sectionIndex,isSDF:Qi,pixelOffsetTL:Bu,pixelOffsetBR:qa,minFontScaleX:0,minFontScaleY:0})}return Ci})(0,d,K,S,k,D,b,f.allowVerticalPlacement),Ve=f.textSizeData;let at=null;Ve.kind==="source"?(at=[nA*S.layout.get("text-size").evaluate(D,{})],at[0]>Tf&&mt(`${f.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):Ve.kind==="composite"&&(at=[nA*De.compositeTextSizes[0].evaluate(D,{},Ke),nA*De.compositeTextSizes[1].evaluate(D,{},Ke)],(at[0]>Tf||at[1]>Tf)&&mt(`${f.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),f.addSymbols(f.text,Ge,at,K,k,D,ee,u,W.lineStartIndex,W.lineLength,Oe,Ke);for(const Tt of re)he[Tt]=f.text.placedSymbolArray.length-1;return 4*Ge.length}function bC(f){for(const u in f)return f[u];return null}function Qx(f,u,d,b){const S=f.compareText;if(u in S){const k=S[u];for(let D=k.length-1;D>=0;D--)if(b.dist(k[D])<d)return!0}else S[u]=[];return S[u].push(b),!1}const CC=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Uv{static from(u){if(!(u instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[d,b]=new Uint8Array(u,0,2);if(d!==219)throw new Error("Data does not appear to be in a KDBush format.");const S=b>>4;if(S!==1)throw new Error(`Got v${S} data when expected v1.`);const k=CC[15&b];if(!k)throw new Error("Unrecognized array type.");const[D]=new Uint16Array(u,2,1),[K]=new Uint32Array(u,4,1);return new Uv(K,D,k,u)}constructor(u,d=64,b=Float64Array,S){if(isNaN(u)||u<0)throw new Error(`Unpexpected numItems value: ${u}.`);this.numItems=+u,this.nodeSize=Math.min(Math.max(+d,2),65535),this.ArrayType=b,this.IndexArrayType=u<65536?Uint16Array:Uint32Array;const k=CC.indexOf(this.ArrayType),D=2*u*this.ArrayType.BYTES_PER_ELEMENT,K=u*this.IndexArrayType.BYTES_PER_ELEMENT,W=(8-K%8)%8;if(k<0)throw new Error(`Unexpected typed array class: ${b}.`);S&&S instanceof ArrayBuffer?(this.data=S,this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+K+W,2*u),this._pos=2*u,this._finished=!0):(this.data=new ArrayBuffer(8+D+K+W),this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+K+W,2*u),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+k]),new Uint16Array(this.data,2,1)[0]=d,new Uint32Array(this.data,4,1)[0]=u)}add(u,d){const b=this._pos>>1;return this.ids[b]=b,this.coords[this._pos++]=u,this.coords[this._pos++]=d,b}finish(){const u=this._pos>>1;if(u!==this.numItems)throw new Error(`Added ${u} items when expected ${this.numItems}.`);return ny(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(u,d,b,S){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:k,coords:D,nodeSize:K}=this,W=[0,k.length-1,0],ee=[];for(;W.length;){const re=W.pop()||0,he=W.pop()||0,Oe=W.pop()||0;if(he-Oe<=K){for(let Ve=Oe;Ve<=he;Ve++){const at=D[2*Ve],Tt=D[2*Ve+1];at>=u&&at<=b&&Tt>=d&&Tt<=S&&ee.push(k[Ve])}continue}const De=Oe+he>>1,Ke=D[2*De],Ge=D[2*De+1];Ke>=u&&Ke<=b&&Ge>=d&&Ge<=S&&ee.push(k[De]),(re===0?u<=Ke:d<=Ge)&&(W.push(Oe),W.push(De-1),W.push(1-re)),(re===0?b>=Ke:S>=Ge)&&(W.push(De+1),W.push(he),W.push(1-re))}return ee}within(u,d,b){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:S,coords:k,nodeSize:D}=this,K=[0,S.length-1,0],W=[],ee=b*b;for(;K.length;){const re=K.pop()||0,he=K.pop()||0,Oe=K.pop()||0;if(he-Oe<=D){for(let Ve=Oe;Ve<=he;Ve++)_C(k[2*Ve],k[2*Ve+1],u,d)<=ee&&W.push(S[Ve]);continue}const De=Oe+he>>1,Ke=k[2*De],Ge=k[2*De+1];_C(Ke,Ge,u,d)<=ee&&W.push(S[De]),(re===0?u-b<=Ke:d-b<=Ge)&&(K.push(Oe),K.push(De-1),K.push(1-re)),(re===0?u+b>=Ke:d+b>=Ge)&&(K.push(De+1),K.push(he),K.push(1-re))}return W}}function ny(f,u,d,b,S,k){if(S-b<=d)return;const D=b+S>>1;Wp(f,u,D,b,S,k),ny(f,u,d,b,D-1,1-k),ny(f,u,d,D+1,S,1-k)}function Wp(f,u,d,b,S,k){for(;S>b;){if(S-b>600){const ee=S-b+1,re=d-b+1,he=Math.log(ee),Oe=.5*Math.exp(2*he/3),De=.5*Math.sqrt(he*Oe*(ee-Oe)/ee)*(re-ee/2<0?-1:1);Wp(f,u,d,Math.max(b,Math.floor(d-re*Oe/ee+De)),Math.min(S,Math.floor(d+(ee-re)*Oe/ee+De)),k)}const D=u[2*d+k];let K=b,W=S;for(Fd(f,u,b,d),u[2*S+k]>D&&Fd(f,u,b,S);K<W;){for(Fd(f,u,K,W),K++,W--;u[2*K+k]<D;)K++;for(;u[2*W+k]>D;)W--}u[2*b+k]===D?Fd(f,u,b,W):(W++,Fd(f,u,W,S)),W<=d&&(b=W+1),d<=W&&(S=W-1)}}function Fd(f,u,d,b){iy(f,d,b),iy(u,2*d,2*b),iy(u,2*d+1,2*b+1)}function iy(f,u,d){const b=f[u];f[u]=f[d],f[d]=b}function _C(f,u,d,b){const S=f-d,k=u-b;return S*S+k*k}var Uf;s.cx=void 0,(Uf=s.cx||(s.cx={})).create="create",Uf.load="load",Uf.fullLoad="fullLoad";let Kf=null,ig=[];const rg=1e3/60,Qp="loadTime",B0="fullLoadTime",og={mark(f){performance.mark(f)},frame(f){const u=f;Kf!=null&&ig.push(u-Kf),Kf=u},clearMetrics(){Kf=null,ig=[],performance.clearMeasures(Qp),performance.clearMeasures(B0);for(const f in s.cx)performance.clearMarks(s.cx[f])},getPerformanceMetrics(){performance.measure(Qp,s.cx.create,s.cx.load),performance.measure(B0,s.cx.create,s.cx.fullLoad);const f=performance.getEntriesByName(Qp)[0].duration,u=performance.getEntriesByName(B0)[0].duration,d=ig.length,b=1/(ig.reduce(((k,D)=>k+D),0)/d/1e3),S=ig.filter((k=>k>rg)).reduce(((k,D)=>k+(D-rg)/rg),0);return{loadTime:f,fullLoadTime:u,fps:b,percentDroppedFrames:S/(d+S)*100,totalFrames:d}}};s.$=ht,s.A=V,s.B=function([f,u,d]){return u+=90,u*=Math.PI/180,d*=Math.PI/180,{x:f*Math.cos(u)*Math.sin(d),y:f*Math.sin(u)*Math.sin(d),z:f*Math.cos(d)}},s.C=Gc,s.D=Jn,s.E=Dt,s.F=Ao,s.G=Yc,s.H=function(f){if($t==null){const u=f.navigator?f.navigator.userAgent:null;$t=!!f.safari||!(!u||!(/\b(iPad|iPhone|iPod)\b/.test(u)||u.match("Safari")&&!u.match("Chrome")))}return $t},s.I=If,s.J=class{constructor(f,u){this.target=f,this.mapId=u,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Kd((()=>this.process())),this.subscription=dn(this.target,"message",(d=>this.receive(d)),!1),this.globalScope=Bt(self)?f:window}registerMessageHandler(f,u){this.messageHandlers[f]=u}sendAsync(f,u){return new Promise(((d,b)=>{const S=Math.round(1e18*Math.random()).toString(36).substring(0,10),k=u?dn(u.signal,"abort",(()=>{k?.unsubscribe(),delete this.resolveRejects[S];const W={id:S,type:"<cancel>",origin:location.origin,targetMapId:f.targetMapId,sourceMapId:this.mapId};this.target.postMessage(W)}),yr):null;this.resolveRejects[S]={resolve:W=>{k?.unsubscribe(),d(W)},reject:W=>{k?.unsubscribe(),b(W)}};const D=[],K=Object.assign(Object.assign({},f),{id:S,sourceMapId:this.mapId,origin:location.origin,data:kh(f.data,D)});this.target.postMessage(K,{transfer:D})}))}receive(f){const u=f.data,d=u.id;if(!(u.origin!=="file://"&&location.origin!=="file://"&&u.origin!=="resource://android"&&location.origin!=="resource://android"&&u.origin!==location.origin||u.targetMapId&&this.mapId!==u.targetMapId)){if(u.type==="<cancel>"){delete this.tasks[d];const b=this.abortControllers[d];return delete this.abortControllers[d],void(b&&b.abort())}if(Bt(self)||u.mustQueue)return this.tasks[d]=u,this.taskQueue.push(d),void this.invoker.trigger();this.processTask(d,u)}}process(){if(this.taskQueue.length===0)return;const f=this.taskQueue.shift(),u=this.tasks[f];delete this.tasks[f],this.taskQueue.length>0&&this.invoker.trigger(),u&&this.processTask(f,u)}processTask(f,u){return a(this,void 0,void 0,(function*(){if(u.type==="<response>"){const S=this.resolveRejects[f];return delete this.resolveRejects[f],S?void(u.error?S.reject(bc(u.error)):S.resolve(bc(u.data))):void 0}if(!this.messageHandlers[u.type])return void this.completeTask(f,new Error(`Could not find a registered handler for ${u.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const d=bc(u.data),b=new AbortController;this.abortControllers[f]=b;try{const S=yield this.messageHandlers[u.type](u.sourceMapId,d,b);this.completeTask(f,null,S)}catch(S){this.completeTask(f,S)}}))}completeTask(f,u,d){const b=[];delete this.abortControllers[f];const S={id:f,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:u?kh(u):null,data:kh(d,b)};this.target.postMessage(S,{transfer:b})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},s.K=Ce,s.L=function(){var f=new V(16);return V!=Float32Array&&(f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[11]=0,f[12]=0,f[13]=0,f[14]=0),f[0]=1,f[5]=1,f[10]=1,f[15]=1,f},s.M=function(f,u,d){var b,S,k,D,K,W,ee,re,he,Oe,De,Ke,Ge=d[0],Ve=d[1],at=d[2];return u===f?(f[12]=u[0]*Ge+u[4]*Ve+u[8]*at+u[12],f[13]=u[1]*Ge+u[5]*Ve+u[9]*at+u[13],f[14]=u[2]*Ge+u[6]*Ve+u[10]*at+u[14],f[15]=u[3]*Ge+u[7]*Ve+u[11]*at+u[15]):(S=u[1],k=u[2],D=u[3],K=u[4],W=u[5],ee=u[6],re=u[7],he=u[8],Oe=u[9],De=u[10],Ke=u[11],f[0]=b=u[0],f[1]=S,f[2]=k,f[3]=D,f[4]=K,f[5]=W,f[6]=ee,f[7]=re,f[8]=he,f[9]=Oe,f[10]=De,f[11]=Ke,f[12]=b*Ge+K*Ve+he*at+u[12],f[13]=S*Ge+W*Ve+Oe*at+u[13],f[14]=k*Ge+ee*Ve+De*at+u[14],f[15]=D*Ge+re*Ve+Ke*at+u[15]),f},s.N=function(f,u,d){var b=d[0],S=d[1],k=d[2];return f[0]=u[0]*b,f[1]=u[1]*b,f[2]=u[2]*b,f[3]=u[3]*b,f[4]=u[4]*S,f[5]=u[5]*S,f[6]=u[6]*S,f[7]=u[7]*S,f[8]=u[8]*k,f[9]=u[9]*k,f[10]=u[10]*k,f[11]=u[11]*k,f[12]=u[12],f[13]=u[13],f[14]=u[14],f[15]=u[15],f},s.O=function(f,u,d){var b=u[0],S=u[1],k=u[2],D=u[3],K=u[4],W=u[5],ee=u[6],re=u[7],he=u[8],Oe=u[9],De=u[10],Ke=u[11],Ge=u[12],Ve=u[13],at=u[14],Tt=u[15],ft=d[0],_t=d[1],Nt=d[2],Jt=d[3];return f[0]=ft*b+_t*K+Nt*he+Jt*Ge,f[1]=ft*S+_t*W+Nt*Oe+Jt*Ve,f[2]=ft*k+_t*ee+Nt*De+Jt*at,f[3]=ft*D+_t*re+Nt*Ke+Jt*Tt,f[4]=(ft=d[4])*b+(_t=d[5])*K+(Nt=d[6])*he+(Jt=d[7])*Ge,f[5]=ft*S+_t*W+Nt*Oe+Jt*Ve,f[6]=ft*k+_t*ee+Nt*De+Jt*at,f[7]=ft*D+_t*re+Nt*Ke+Jt*Tt,f[8]=(ft=d[8])*b+(_t=d[9])*K+(Nt=d[10])*he+(Jt=d[11])*Ge,f[9]=ft*S+_t*W+Nt*Oe+Jt*Ve,f[10]=ft*k+_t*ee+Nt*De+Jt*at,f[11]=ft*D+_t*re+Nt*Ke+Jt*Tt,f[12]=(ft=d[12])*b+(_t=d[13])*K+(Nt=d[14])*he+(Jt=d[15])*Ge,f[13]=ft*S+_t*W+Nt*Oe+Jt*Ve,f[14]=ft*k+_t*ee+Nt*De+Jt*at,f[15]=ft*D+_t*re+Nt*Ke+Jt*Tt,f},s.P=c,s.Q=function(f,u){const d={};for(let b=0;b<u.length;b++){const S=u[b];S in f&&(d[S]=f[S])}return d},s.R=eu,s.S=Ys,s.T=Um,s.U=Bv,s.V=Ld,s.W=F,s.X=j,s.Y=ai,s.Z=Eu,s._=a,s.a=ne,s.a$=we,s.a0=function(f,u){var d,b,S,k,D;if(!f)return u??{};if(!u)return f;let K=Object.assign({},f);if(u.removeAll&&(K={removeAll:!0}),u.remove){const W=new Set(u.remove);K.add&&(K.add=K.add.filter((re=>!W.has(re.id)))),K.update&&(K.update=K.update.filter((re=>!W.has(re.id))));const ee=new Set(((d=f.add)!==null&&d!==void 0?d:[]).map((re=>re.id)));u.remove=u.remove.filter((re=>!ee.has(re)))}if(u.remove){const W=new Set(K.remove?K.remove.concat(u.remove):u.remove);K.remove=Array.from(W.values())}if(u.add){const W=K.add?K.add.concat(u.add):u.add,ee=new Map(W.map((re=>[re.id,re])));K.add=Array.from(ee.values())}if(u.update){const W=new Map((b=K.update)===null||b===void 0?void 0:b.map((ee=>[ee.id,ee])));for(const ee of u.update){const re=(S=W.get(ee.id))!==null&&S!==void 0?S:{id:ee.id};ee.newGeometry&&(re.newGeometry=ee.newGeometry),ee.addOrUpdateProperties&&(re.addOrUpdateProperties=((k=re.addOrUpdateProperties)!==null&&k!==void 0?k:[]).concat(ee.addOrUpdateProperties)),ee.removeProperties&&(re.removeProperties=((D=re.removeProperties)!==null&&D!==void 0?D:[]).concat(ee.removeProperties)),ee.removeAllProperties&&(re.removeAllProperties=!0),W.set(ee.id,re)}K.update=Array.from(W.values())}return K.remove&&K.add&&(K.remove=K.remove.filter((W=>K.add.findIndex((ee=>ee.id===W))===-1))),K},s.a1=jp,s.a2=fs,s.a3=25,s.a4=kv,s.a5=f=>{const u=window.document.createElement("video");return u.muted=!0,new Promise((d=>{u.onloadstart=()=>{d(u)};for(const b of f){const S=window.document.createElement("source");be(b)||(u.crossOrigin="Anonymous"),S.src=b,u.appendChild(S)}}))},s.a6=on,s.a7=function(){return Te++},s.a8=Be,s.a9=eg,s.aA=function(f){let u=1/0,d=1/0,b=-1/0,S=-1/0;for(const k of f)u=Math.min(u,k.x),d=Math.min(d,k.y),b=Math.max(b,k.x),S=Math.max(S,k.y);return[u,d,b,S]},s.aB=wo,s.aC=ce,s.aD=function(f,u,d,b,S=!1){if(!d[0]&&!d[1])return[0,0];const k=S?b==="map"?-f.bearingInRadians:0:b==="viewport"?f.bearingInRadians:0;if(k){const D=Math.sin(k),K=Math.cos(k);d=[d[0]*K-d[1]*D,d[0]*D+d[1]*K]}return[S?d[0]:ce(u,d[0],f.zoom),S?d[1]:ce(u,d[1],f.zoom)]},s.aF=zp,s.aG=Pv,s.aH=Xm,s.aI=Uv,s.aJ=ks,s.aK=Mu,s.aL=Ot,s.aM=tr,s.aN=Hr,s.aO=Ut,s.aP=In,s.aQ=ds,s.aR=me,s.aS=le,s.aT=function(f){var u=new V(3);return u[0]=f[0],u[1]=f[1],u[2]=f[2],u},s.aU=function(f,u,d){return f[0]=u[0]-d[0],f[1]=u[1]-d[1],f[2]=u[2]-d[2],f},s.aV=function(f,u){var d=u[0],b=u[1],S=u[2],k=d*d+b*b+S*S;return k>0&&(k=1/Math.sqrt(k)),f[0]=u[0]*k,f[1]=u[1]*k,f[2]=u[2]*k,f},s.aW=fe,s.aX=function(f,u){return f[0]*u[0]+f[1]*u[1]+f[2]*u[2]},s.aY=function(f,u,d){return f[0]=u[0]*d[0],f[1]=u[1]*d[1],f[2]=u[2]*d[2],f[3]=u[3]*d[3],f},s.aZ=z,s.a_=function(f,u,d){const b=u[0]*d[0]+u[1]*d[1]+u[2]*d[2];return b===0?null:(-(f[0]*d[0]+f[1]*d[1]+f[2]*d[2])-d[3])/b},s.aa=GA,s.ab=xA,s.ac=Z1,s.ad=function(f){const u={};if(f.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((d,b,S,k)=>{const D=S||k;return u[b]=!D||D.toLowerCase(),""})),u["max-age"]){const d=parseInt(u["max-age"],10);isNaN(d)?delete u["max-age"]:u["max-age"]=d}return u},s.ae=li,s.af=function(f){return Math.pow(2,f)},s.ag=G,s.ah=vt,s.ai=85.051129,s.aj=Iv,s.ak=function(f){return Math.log(f)/Math.LN2},s.al=function(f){var u=f[0],d=f[1];return u*u+d*d},s.am=function(f,u){const d=[];for(const b in f)b in u||d.push(b);return d},s.an=function(f,u){let d=0,b=0;if(f.kind==="constant")b=f.layoutSize;else if(f.kind!=="source"){const{interpolationType:S,minZoom:k,maxZoom:D}=f,K=S?vt(ts.interpolationFactor(S,u,k,D),0,1):0;f.kind==="camera"?b=Gc.number(f.minSize,f.maxSize,K):d=K}return{uSizeT:d,uSize:b}},s.ap=function(f,{uSize:u,uSizeT:d},{lowerSize:b,upperSize:S}){return f.kind==="source"?b/nA:f.kind==="composite"?Gc.number(b/nA,S/nA,d):u},s.aq=function(f,u){var d=u[0],b=u[1],S=u[2],k=u[3],D=u[4],K=u[5],W=u[6],ee=u[7],re=u[8],he=u[9],Oe=u[10],De=u[11],Ke=u[12],Ge=u[13],Ve=u[14],at=u[15],Tt=d*K-b*D,ft=d*W-S*D,_t=d*ee-k*D,Nt=b*W-S*K,Jt=b*ee-k*K,An=S*ee-k*W,Wn=re*Ge-he*Ke,Dn=re*Ve-Oe*Ke,Nn=re*at-De*Ke,Ci=he*Ve-Oe*Ge,jn=he*at-De*Ge,Un=Oe*at-De*Ve,rn=Tt*Un-ft*jn+_t*Ci+Nt*Nn-Jt*Dn+An*Wn;return rn?(f[0]=(K*Un-W*jn+ee*Ci)*(rn=1/rn),f[1]=(S*jn-b*Un-k*Ci)*rn,f[2]=(Ge*An-Ve*Jt+at*Nt)*rn,f[3]=(Oe*Jt-he*An-De*Nt)*rn,f[4]=(W*Nn-D*Un-ee*Dn)*rn,f[5]=(d*Un-S*Nn+k*Dn)*rn,f[6]=(Ve*_t-Ke*An-at*ft)*rn,f[7]=(re*An-Oe*_t+De*ft)*rn,f[8]=(D*jn-K*Nn+ee*Wn)*rn,f[9]=(b*Nn-d*jn-k*Wn)*rn,f[10]=(Ke*Jt-Ge*_t+at*Tt)*rn,f[11]=(he*_t-re*Jt-De*Tt)*rn,f[12]=(K*Dn-D*Ci-W*Wn)*rn,f[13]=(d*Ci-b*Dn+S*Wn)*rn,f[14]=(Ge*ft-Ke*Nt-Ve*Tt)*rn,f[15]=(re*Nt-he*ft+Oe*Tt)*rn,f):null},s.ar=Qe,s.as=function(f){var u=f[0],d=f[1];return Math.sqrt(u*u+d*d)},s.at=function(f){return f[0]=0,f[1]=0,f},s.au=function(f,u,d){return f[0]=u[0]*d,f[1]=u[1]*d,f},s.av=x0,s.aw=ke,s.ax=function(f,u,d,b){const S=u.y-f.y,k=u.x-f.x,D=b.y-d.y,K=b.x-d.x,W=D*k-K*S;if(W===0)return null;const ee=(K*(f.y-d.y)-D*(f.x-d.x))/W;return new c(f.x+ee*k,f.y+ee*S)},s.ay=Rv,s.az=Od,s.b=Rn,s.b$=class extends l{},s.b0=function(f,u,d){return f[0]=u[0]*d,f[1]=u[1]*d,f[2]=u[2]*d,f[3]=u[3]*d,f},s.b1=function(f,u){return f[0]*u[0]+f[1]*u[1]+f[2]*u[2]+f[3]},s.b2=EA,s.b3=OA,s.b4=function(f,u,d,b,S){var k=1/Math.tan(u/2);if(f[0]=k/d,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=k,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[11]=-1,f[12]=0,f[13]=0,f[15]=0,S!=null&&S!==1/0){var D=1/(b-S);f[10]=(S+b)*D,f[14]=2*S*b*D}else f[10]=-1,f[14]=-2*b;return f},s.b5=function(f){var u=new V(16);return u[0]=f[0],u[1]=f[1],u[2]=f[2],u[3]=f[3],u[4]=f[4],u[5]=f[5],u[6]=f[6],u[7]=f[7],u[8]=f[8],u[9]=f[9],u[10]=f[10],u[11]=f[11],u[12]=f[12],u[13]=f[13],u[14]=f[14],u[15]=f[15],u},s.b6=function(f,u,d){var b=Math.sin(d),S=Math.cos(d),k=u[0],D=u[1],K=u[2],W=u[3],ee=u[4],re=u[5],he=u[6],Oe=u[7];return u!==f&&(f[8]=u[8],f[9]=u[9],f[10]=u[10],f[11]=u[11],f[12]=u[12],f[13]=u[13],f[14]=u[14],f[15]=u[15]),f[0]=k*S+ee*b,f[1]=D*S+re*b,f[2]=K*S+he*b,f[3]=W*S+Oe*b,f[4]=ee*S-k*b,f[5]=re*S-D*b,f[6]=he*S-K*b,f[7]=Oe*S-W*b,f},s.b7=function(f,u,d){var b=Math.sin(d),S=Math.cos(d),k=u[4],D=u[5],K=u[6],W=u[7],ee=u[8],re=u[9],he=u[10],Oe=u[11];return u!==f&&(f[0]=u[0],f[1]=u[1],f[2]=u[2],f[3]=u[3],f[12]=u[12],f[13]=u[13],f[14]=u[14],f[15]=u[15]),f[4]=k*S+ee*b,f[5]=D*S+re*b,f[6]=K*S+he*b,f[7]=W*S+Oe*b,f[8]=ee*S-k*b,f[9]=re*S-D*b,f[10]=he*S-K*b,f[11]=Oe*S-W*b,f},s.b8=function(){const f=new Float32Array(16);return G(f),f},s.b9=function(){const f=new Float64Array(16);return G(f),f},s.bA=function(f,u){const d=Le(f,360),b=Le(u,360),S=b-d,k=b>d?S-360:S+360;return Math.abs(S)<Math.abs(k)?S:k},s.bB=function(f){return f[0]=0,f[1]=0,f[2]=0,f},s.bC=function(f,u,d,b){const S=Math.sqrt(f*f+u*u),k=Math.sqrt(d*d+b*b);f/=S,u/=S,d/=k,b/=k;const D=Math.acos(f*d+u*b);return-u*d+f*b>0?D:-D},s.bD=function(f,u){const d=Le(f,2*Math.PI),b=Le(u,2*Math.PI);return Math.min(Math.abs(d-b),Math.abs(d-b+2*Math.PI),Math.abs(d-b-2*Math.PI))},s.bE=function(){const f={},u=ot.$version;for(const d in ot.$root){const b=ot.$root[d];if(b.required){let S=null;S=d==="version"?u:b.type==="array"?[]:{},S!=null&&(f[d]=S)}}return f},s.bF=Cp,s.bG=He,s.bH=function f(u,d){if(Array.isArray(u)){if(!Array.isArray(d)||u.length!==d.length)return!1;for(let b=0;b<u.length;b++)if(!f(u[b],d[b]))return!1;return!0}if(typeof u=="object"&&u!==null&&d!==null){if(typeof d!="object"||Object.keys(u).length!==Object.keys(d).length)return!1;for(const b in u)if(!f(u[b],d[b]))return!1;return!0}return u===d},s.bI=function(f){f=f.slice();const u=Object.create(null);for(let d=0;d<f.length;d++)u[f[d].id]=f[d];for(let d=0;d<f.length;d++)"ref"in f[d]&&(f[d]=Gn(f[d],u[f[d].ref]));return f},s.bJ=function(f,u){if(f.type==="custom")return new pC(f,u);switch(f.type){case"background":return new ho(f,u);case"circle":return new Vb(f,u);case"color-relief":return new Hb(f,u);case"fill":return new f0(f,u);case"fill-extrusion":return new pv(f,u);case"heatmap":return new Bd(f,u);case"hillshade":return new B1(f,u);case"line":return new nu(f,u);case"raster":return new Ov(f,u);case"symbol":return new Rf(f,u)}},s.bK=ut,s.bL=function(f,u){if(!f)return[{command:"setStyle",args:[u]}];let d=[];try{if(!yn(f.version,u.version))return[{command:"setStyle",args:[u]}];yn(f.center,u.center)||d.push({command:"setCenter",args:[u.center]}),yn(f.state,u.state)||d.push({command:"setGlobalState",args:[u.state]}),yn(f.centerAltitude,u.centerAltitude)||d.push({command:"setCenterAltitude",args:[u.centerAltitude]}),yn(f.zoom,u.zoom)||d.push({command:"setZoom",args:[u.zoom]}),yn(f.bearing,u.bearing)||d.push({command:"setBearing",args:[u.bearing]}),yn(f.pitch,u.pitch)||d.push({command:"setPitch",args:[u.pitch]}),yn(f.roll,u.roll)||d.push({command:"setRoll",args:[u.roll]}),yn(f.sprite,u.sprite)||d.push({command:"setSprite",args:[u.sprite]}),yn(f.glyphs,u.glyphs)||d.push({command:"setGlyphs",args:[u.glyphs]}),yn(f.transition,u.transition)||d.push({command:"setTransition",args:[u.transition]}),yn(f.light,u.light)||d.push({command:"setLight",args:[u.light]}),yn(f.terrain,u.terrain)||d.push({command:"setTerrain",args:[u.terrain]}),yn(f.sky,u.sky)||d.push({command:"setSky",args:[u.sky]}),yn(f.projection,u.projection)||d.push({command:"setProjection",args:[u.projection]});const b={},S=[];(function(D,K,W,ee){let re;for(re in K=K||{},D=D||{})Object.prototype.hasOwnProperty.call(D,re)&&(Object.prototype.hasOwnProperty.call(K,re)||mi(re,W,ee));for(re in K)Object.prototype.hasOwnProperty.call(K,re)&&(Object.prototype.hasOwnProperty.call(D,re)?yn(D[re],K[re])||(D[re].type==="geojson"&&K[re].type==="geojson"&&di(D,K,re)?qn(W,{command:"setGeoJSONSourceData",args:[re,K[re].data]}):ir(re,K,W,ee)):$n(re,K,W))})(f.sources,u.sources,S,b);const k=[];f.layers&&f.layers.forEach((D=>{"source"in D&&b[D.source]?d.push({command:"removeLayer",args:[D.id]}):k.push(D)})),d=d.concat(S),(function(D,K,W){K=K||[];const ee=(D=D||[]).map(Fn),re=K.map(Fn),he=D.reduce(Ti,{}),Oe=K.reduce(Ti,{}),De=ee.slice(),Ke=Object.create(null);let Ge,Ve,at,Tt,ft;for(let _t=0,Nt=0;_t<ee.length;_t++)Ge=ee[_t],Object.prototype.hasOwnProperty.call(Oe,Ge)?Nt++:(qn(W,{command:"removeLayer",args:[Ge]}),De.splice(De.indexOf(Ge,Nt),1));for(let _t=0,Nt=0;_t<re.length;_t++)Ge=re[re.length-1-_t],De[De.length-1-_t]!==Ge&&(Object.prototype.hasOwnProperty.call(he,Ge)?(qn(W,{command:"removeLayer",args:[Ge]}),De.splice(De.lastIndexOf(Ge,De.length-Nt),1)):Nt++,Tt=De[De.length-_t],qn(W,{command:"addLayer",args:[Oe[Ge],Tt]}),De.splice(De.length-_t,0,Ge),Ke[Ge]=!0);for(let _t=0;_t<re.length;_t++)if(Ge=re[_t],Ve=he[Ge],at=Oe[Ge],!Ke[Ge]&&!yn(Ve,at))if(yn(Ve.source,at.source)&&yn(Ve["source-layer"],at["source-layer"])&&yn(Ve.type,at.type)){for(ft in Vn(Ve.layout,at.layout,W,Ge,null,"setLayoutProperty"),Vn(Ve.paint,at.paint,W,Ge,null,"setPaintProperty"),yn(Ve.filter,at.filter)||qn(W,{command:"setFilter",args:[Ge,at.filter]}),yn(Ve.minzoom,at.minzoom)&&yn(Ve.maxzoom,at.maxzoom)||qn(W,{command:"setLayerZoomRange",args:[Ge,at.minzoom,at.maxzoom]}),Ve)Object.prototype.hasOwnProperty.call(Ve,ft)&&ft!=="layout"&&ft!=="paint"&&ft!=="filter"&&ft!=="metadata"&&ft!=="minzoom"&&ft!=="maxzoom"&&(ft.indexOf("paint.")===0?Vn(Ve[ft],at[ft],W,Ge,ft.slice(6),"setPaintProperty"):yn(Ve[ft],at[ft])||qn(W,{command:"setLayerProperty",args:[Ge,ft,at[ft]]}));for(ft in at)Object.prototype.hasOwnProperty.call(at,ft)&&!Object.prototype.hasOwnProperty.call(Ve,ft)&&ft!=="layout"&&ft!=="paint"&&ft!=="filter"&&ft!=="metadata"&&ft!=="minzoom"&&ft!=="maxzoom"&&(ft.indexOf("paint.")===0?Vn(Ve[ft],at[ft],W,Ge,ft.slice(6),"setPaintProperty"):yn(Ve[ft],at[ft])||qn(W,{command:"setLayerProperty",args:[Ge,ft,at[ft]]}))}else qn(W,{command:"removeLayer",args:[Ge]}),Tt=De[De.lastIndexOf(Ge)+1],qn(W,{command:"addLayer",args:[at,Tt]})})(k,u.layers,d)}catch(b){console.warn("Unable to compute style diff:",b),d=[{command:"setStyle",args:[u]}]}return d},s.bM=function(f){const u=[],d=f.id;return d===void 0&&u.push({message:`layers.${d}: missing required property "id"`}),f.render===void 0&&u.push({message:`layers.${d}: missing required method "render"`}),f.renderingMode&&f.renderingMode!=="2d"&&f.renderingMode!=="3d"&&u.push({message:`layers.${d}: property "renderingMode" must be either "2d" or "3d"`}),u},s.bN=Se,s.bO=Ne,s.bP=class extends _u{constructor(f,u){super(f,u),this.current=0}set(f){this.current!==f&&(this.current=f,this.gl.uniform1i(this.location,f))}},s.bQ=Dl,s.bR=class extends _u{constructor(f,u){super(f,u),this.current=la}set(f){if(f[12]!==this.current[12]||f[0]!==this.current[0])return this.current=f,void this.gl.uniformMatrix4fv(this.location,!1,f);for(let u=1;u<16;u++)if(f[u]!==this.current[u]){this.current=f,this.gl.uniformMatrix4fv(this.location,!1,f);break}}},s.bS=Bo,s.bT=class extends _u{constructor(f,u){super(f,u),this.current=[0,0,0]}set(f){f[0]===this.current[0]&&f[1]===this.current[1]&&f[2]===this.current[2]||(this.current=f,this.gl.uniform3f(this.location,f[0],f[1],f[2]))}},s.bU=class extends _u{constructor(f,u){super(f,u),this.current=[0,0]}set(f){f[0]===this.current[0]&&f[1]===this.current[1]||(this.current=f,this.gl.uniform2f(this.location,f[0],f[1]))}},s.bV=H,s.bW=function(f,u){var d=Math.sin(u),b=Math.cos(u);return f[0]=b,f[1]=d,f[2]=0,f[3]=-d,f[4]=b,f[5]=0,f[6]=0,f[7]=0,f[8]=1,f},s.bX=function(f,u,d){var b=u[0],S=u[1],k=u[2];return f[0]=b*d[0]+S*d[3]+k*d[6],f[1]=b*d[1]+S*d[4]+k*d[7],f[2]=b*d[2]+S*d[5]+k*d[8],f},s.bY=function(f,u,d,b,S,k,D){var K=1/(u-d),W=1/(b-S),ee=1/(k-D);return f[0]=-2*K,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=-2*W,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=2*ee,f[11]=0,f[12]=(u+d)*K,f[13]=(S+b)*W,f[14]=(D+k)*ee,f[15]=1,f},s.bZ=class extends _u{constructor(f,u){super(f,u),this.current=new Array}set(f){if(f!=this.current){this.current=f;const u=new Float32Array(4*f.length);for(let d=0;d<f.length;d++)u[4*d]=f[d].r,u[4*d+1]=f[d].g,u[4*d+2]=f[d].b,u[4*d+3]=f[d].a;this.gl.uniform4fv(this.location,u)}}},s.b_=class extends _u{constructor(f,u){super(f,u),this.current=new Array}set(f){if(f!=this.current){this.current=f;const u=new Float32Array(f);this.gl.uniform1fv(this.location,u)}}},s.ba=function(){return new Float64Array(16)},s.bb=function(f,u,d){const b=new Float64Array(4);return Ie(b,f,u-90,d),b},s.bc=function(f,u,d,b){var S,k,D,K,W,ee=u[0],re=u[1],he=u[2],Oe=u[3],De=d[0],Ke=d[1],Ge=d[2],Ve=d[3];return(k=ee*De+re*Ke+he*Ge+Oe*Ve)<0&&(k=-k,De=-De,Ke=-Ke,Ge=-Ge,Ve=-Ve),1-k>Q?(S=Math.acos(k),D=Math.sin(S),K=Math.sin((1-b)*S)/D,W=Math.sin(b*S)/D):(K=1-b,W=b),f[0]=K*ee+W*De,f[1]=K*re+W*Ke,f[2]=K*he+W*Ge,f[3]=K*Oe+W*Ve,f},s.bd=function(f){const u=new Float64Array(9);var d,b,S,k,D,K,W,ee,re,he,Oe,De,Ke,Ge,Ve,at,Tt,ft;he=(S=(b=f)[0])*(W=S+S),Oe=(k=b[1])*W,Ke=(D=b[2])*W,Ge=D*(ee=k+k),at=(K=b[3])*W,Tt=K*ee,ft=K*(re=D+D),(d=u)[0]=1-(De=k*ee)-(Ve=D*re),d[3]=Oe-ft,d[6]=Ke+Tt,d[1]=Oe+ft,d[4]=1-he-Ve,d[7]=Ge-at,d[2]=Ke-Tt,d[5]=Ge+at,d[8]=1-he-De;const _t=In(-Math.asin(vt(u[2],-1,1)));let Nt,Jt;return Math.hypot(u[5],u[8])<.001?(Nt=0,Jt=-In(Math.atan2(u[3],u[4]))):(Nt=In(u[5]===0&&u[8]===0?0:Math.atan2(u[5],u[8])),Jt=In(u[1]===0&&u[0]===0?0:Math.atan2(u[1],u[0]))),{roll:Nt,pitch:_t+90,bearing:Jt}},s.be=function(f,u){return f.roll==u.roll&&f.pitch==u.pitch&&f.bearing==u.bearing},s.bf=er,s.bg=Kr,s.bh=tu,s.bi=Tp,s.bj=Of,s.bk=We,s.bl=Me,s.bm=Ro,s.bn=function(f,u,d,b,S){return We(b,S,vt((f-u)/(d-u),0,1))},s.bo=Le,s.bp=function(){return new Float64Array(3)},s.bq=function(f,u,d,b){return f[0]=u[0]+d[0]*b,f[1]=u[1]+d[1]*b,f[2]=u[2]+d[2]*b,f},s.br=Ie,s.bs=function(f,u,d){var b=d[0],S=d[1],k=d[2],D=d[3],K=u[0],W=u[1],ee=u[2],re=S*ee-k*W,he=k*K-b*ee,Oe=b*W-S*K;return f[0]=K+D*(re+=re)+S*(Oe+=Oe)-k*(he+=he),f[1]=W+D*he+k*re-b*Oe,f[2]=ee+D*Oe+b*he-S*re,f},s.bt=function(f,u,d){const b=(S=[f[0],f[1],f[2],u[0],u[1],u[2],d[0],d[1],d[2]])[0]*((re=S[8])*(D=S[4])-(K=S[5])*(ee=S[7]))+S[1]*(-re*(k=S[3])+K*(W=S[6]))+S[2]*(ee*k-D*W);var S,k,D,K,W,ee,re;if(b===0)return null;const he=fe([],[u[0],u[1],u[2]],[d[0],d[1],d[2]]),Oe=fe([],[d[0],d[1],d[2]],[f[0],f[1],f[2]]),De=fe([],[f[0],f[1],f[2]],[u[0],u[1],u[2]]),Ke=me([],he,-f[3]);return le(Ke,Ke,me([],Oe,-u[3])),le(Ke,Ke,me([],De,-d[3])),me(Ke,Ke,1/b),Ke},s.bu=tg,s.bv=function(){return new Float64Array(4)},s.bw=function(f,u,d,b){var S=[],k=[];return S[0]=u[0]-d[0],S[1]=u[1]-d[1],S[2]=u[2]-d[2],k[0]=S[0]*Math.cos(b)-S[1]*Math.sin(b),k[1]=S[0]*Math.sin(b)+S[1]*Math.cos(b),k[2]=S[2],f[0]=k[0]+d[0],f[1]=k[1]+d[1],f[2]=k[2]+d[2],f},s.bx=function(f,u,d,b){var S=[],k=[];return S[0]=u[0]-d[0],S[1]=u[1]-d[1],S[2]=u[2]-d[2],k[0]=S[0],k[1]=S[1]*Math.cos(b)-S[2]*Math.sin(b),k[2]=S[1]*Math.sin(b)+S[2]*Math.cos(b),f[0]=k[0]+d[0],f[1]=k[1]+d[1],f[2]=k[2]+d[2],f},s.by=function(f,u,d,b){var S=[],k=[];return S[0]=u[0]-d[0],S[1]=u[1]-d[1],S[2]=u[2]-d[2],k[0]=S[2]*Math.sin(b)+S[0]*Math.cos(b),k[1]=S[1],k[2]=S[2]*Math.cos(b)-S[0]*Math.sin(b),f[0]=k[0]+d[0],f[1]=k[1]+d[1],f[2]=k[2]+d[2],f},s.bz=function(f,u,d){var b=Math.sin(d),S=Math.cos(d),k=u[0],D=u[1],K=u[2],W=u[3],ee=u[8],re=u[9],he=u[10],Oe=u[11];return u!==f&&(f[4]=u[4],f[5]=u[5],f[6]=u[6],f[7]=u[7],f[12]=u[12],f[13]=u[13],f[14]=u[14],f[15]=u[15]),f[0]=k*S-ee*b,f[1]=D*S-re*b,f[2]=K*S-he*b,f[3]=W*S-Oe*b,f[8]=k*b+ee*S,f[9]=D*b+re*S,f[10]=K*b+he*S,f[11]=W*b+Oe*S,f},s.c=J,s.c0=rC,s.c1=class extends C{},s.c2=O1,s.c3=function(f){return f<=1?1:Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))},s.c4=E1,s.c5=function(f,u,d){var b=u[0],S=u[1],k=u[2],D=d[3]*b+d[7]*S+d[11]*k+d[15];return f[0]=(d[0]*b+d[4]*S+d[8]*k+d[12])/(D=D||1),f[1]=(d[1]*b+d[5]*S+d[9]*k+d[13])/D,f[2]=(d[2]*b+d[6]*S+d[10]*k+d[14])/D,f},s.c6=class extends Ts{},s.c7=class extends Ae{},s.c8=function(f,u){return f[0]===u[0]&&f[1]===u[1]&&f[2]===u[2]&&f[3]===u[3]&&f[4]===u[4]&&f[5]===u[5]&&f[6]===u[6]&&f[7]===u[7]&&f[8]===u[8]&&f[9]===u[9]&&f[10]===u[10]&&f[11]===u[11]&&f[12]===u[12]&&f[13]===u[13]&&f[14]===u[14]&&f[15]===u[15]},s.c9=function(f,u){var d=f[0],b=f[1],S=f[2],k=f[3],D=f[4],K=f[5],W=f[6],ee=f[7],re=f[8],he=f[9],Oe=f[10],De=f[11],Ke=f[12],Ge=f[13],Ve=f[14],at=f[15],Tt=u[0],ft=u[1],_t=u[2],Nt=u[3],Jt=u[4],An=u[5],Wn=u[6],Dn=u[7],Nn=u[8],Ci=u[9],jn=u[10],Un=u[11],rn=u[12],Ui=u[13],Qi=u[14],Mi=u[15];return Math.abs(d-Tt)<=Q*Math.max(1,Math.abs(d),Math.abs(Tt))&&Math.abs(b-ft)<=Q*Math.max(1,Math.abs(b),Math.abs(ft))&&Math.abs(S-_t)<=Q*Math.max(1,Math.abs(S),Math.abs(_t))&&Math.abs(k-Nt)<=Q*Math.max(1,Math.abs(k),Math.abs(Nt))&&Math.abs(D-Jt)<=Q*Math.max(1,Math.abs(D),Math.abs(Jt))&&Math.abs(K-An)<=Q*Math.max(1,Math.abs(K),Math.abs(An))&&Math.abs(W-Wn)<=Q*Math.max(1,Math.abs(W),Math.abs(Wn))&&Math.abs(ee-Dn)<=Q*Math.max(1,Math.abs(ee),Math.abs(Dn))&&Math.abs(re-Nn)<=Q*Math.max(1,Math.abs(re),Math.abs(Nn))&&Math.abs(he-Ci)<=Q*Math.max(1,Math.abs(he),Math.abs(Ci))&&Math.abs(Oe-jn)<=Q*Math.max(1,Math.abs(Oe),Math.abs(jn))&&Math.abs(De-Un)<=Q*Math.max(1,Math.abs(De),Math.abs(Un))&&Math.abs(Ke-rn)<=Q*Math.max(1,Math.abs(Ke),Math.abs(rn))&&Math.abs(Ge-Ui)<=Q*Math.max(1,Math.abs(Ge),Math.abs(Ui))&&Math.abs(Ve-Qi)<=Q*Math.max(1,Math.abs(Ve),Math.abs(Qi))&&Math.abs(at-Mi)<=Q*Math.max(1,Math.abs(at),Math.abs(Mi))},s.cA=function(f,u){ne.REGISTERED_PROTOCOLS[f]=u},s.cB=function(f){delete ne.REGISTERED_PROTOCOLS[f]},s.cC=function(f,u){const d={};for(let S=0;S<f.length;S++){const k=u&&u[f[S].id]||mc(f[S]);u&&(u[f[S].id]=k);let D=d[k];D||(D=d[k]=[]),D.push(f[S])}const b=[];for(const S in d)b.push(d[S]);return b},s.cD=Xn,s.cE=M0,s.cF=gC,s.cG=g0,s.cH=function(f){f.bucket.createArrays(),f.bucket.tilePixelRatio=ht/(512*f.bucket.overscaling),f.bucket.compareText={},f.bucket.iconsNeedLinear=!1;const u=f.bucket.layers[0],d=u.layout,b=u._unevaluatedLayout._values,S={layoutIconSize:b["icon-size"].possiblyEvaluate(new Ao(f.bucket.zoom+1),f.canonical),layoutTextSize:b["text-size"].possiblyEvaluate(new Ao(f.bucket.zoom+1),f.canonical),textMaxSize:b["text-size"].possiblyEvaluate(new Ao(18))};if(f.bucket.textSizeData.kind==="composite"){const{minZoom:ee,maxZoom:re}=f.bucket.textSizeData;S.compositeTextSizes=[b["text-size"].possiblyEvaluate(new Ao(ee),f.canonical),b["text-size"].possiblyEvaluate(new Ao(re),f.canonical)]}if(f.bucket.iconSizeData.kind==="composite"){const{minZoom:ee,maxZoom:re}=f.bucket.iconSizeData;S.compositeIconSizes=[b["icon-size"].possiblyEvaluate(new Ao(ee),f.canonical),b["icon-size"].possiblyEvaluate(new Ao(re),f.canonical)]}const k=d.get("text-line-height")*wo,D=d.get("text-rotation-alignment")!=="viewport"&&d.get("symbol-placement")!=="point",K=d.get("text-keep-upright"),W=d.get("text-size");for(const ee of f.bucket.features){const re=d.get("text-font").evaluate(ee,{},f.canonical).join(","),he=W.evaluate(ee,{},f.canonical),Oe=S.layoutTextSize.evaluate(ee,{},f.canonical),De=S.layoutIconSize.evaluate(ee,{},f.canonical),Ke={horizontal:{},vertical:void 0},Ge=ee.text;let Ve,at=[0,0];if(Ge){const _t=Ge.toString(),Nt=d.get("text-letter-spacing").evaluate(ee,{},f.canonical)*wo,Jt=Cd(_t)?Nt:0,An=d.get("text-anchor").evaluate(ee,{},f.canonical),Wn=zo(u,ee,f.canonical);if(!Wn){const jn=d.get("text-radial-offset").evaluate(ee,{},f.canonical);at=jn?Gp(An,[jn*wo,ty]):d.get("text-offset").evaluate(ee,{},f.canonical).map((Un=>Un*wo))}let Dn=D?"center":d.get("text-justify").evaluate(ee,{},f.canonical);const Nn=d.get("symbol-placement")==="point"?d.get("text-max-width").evaluate(ee,{},f.canonical)*wo:1/0,Ci=()=>{f.bucket.allowVerticalPlacement&&Gu(_t)&&(Ke.vertical=y0(Ge,f.glyphMap,f.glyphPositions,f.imagePositions,re,Nn,k,An,"left",Jt,at,s.ao.vertical,!0,Oe,he))};if(!D&&Wn){const jn=new Set;if(Dn==="auto")for(let rn=0;rn<Wn.values.length;rn+=2)jn.add(Pv(Wn.values[rn]));else jn.add(Dn);let Un=!1;for(const rn of jn)if(!Ke.horizontal[rn])if(Un)Ke.horizontal[rn]=Ke.horizontal[0];else{const Ui=y0(Ge,f.glyphMap,f.glyphPositions,f.imagePositions,re,Nn,k,"center",rn,Jt,at,s.ao.horizontal,!1,Oe,he);Ui&&(Ke.horizontal[rn]=Ui,Un=Ui.positionedLines.length===1)}Ci()}else{Dn==="auto"&&(Dn=Pv(An));const jn=y0(Ge,f.glyphMap,f.glyphPositions,f.imagePositions,re,Nn,k,An,Dn,Jt,at,s.ao.horizontal,!1,Oe,he);jn&&(Ke.horizontal[Dn]=jn),Ci(),Gu(_t)&&D&&K&&(Ke.vertical=y0(Ge,f.glyphMap,f.glyphPositions,f.imagePositions,re,Nn,k,An,Dn,Jt,at,s.ao.vertical,!1,Oe,he))}}let Tt=!1;if(ee.icon&&ee.icon.name){const _t=f.imageMap[ee.icon.name];_t&&(Ve=W1(f.imagePositions[ee.icon.name],d.get("icon-offset").evaluate(ee,{},f.canonical),d.get("icon-anchor").evaluate(ee,{},f.canonical)),Tt=!!_t.sdf,f.bucket.sdfIcons===void 0?f.bucket.sdfIcons=Tt:f.bucket.sdfIcons!==Tt&&mt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(_t.pixelRatio!==f.bucket.pixelRatio||d.get("icon-rotate").constantOr(1)!==0)&&(f.bucket.iconsNeedLinear=!0))}const ft=bC(Ke.horizontal)||Ke.vertical;f.bucket.iconsInText=!!ft&&ft.iconsInText,(ft||Ve)&&vC(f.bucket,ee,Ke,Ve,f.imageMap,S,Oe,De,at,Tt,f.canonical,f.subdivisionGranularity)}f.showCollisionBoxes&&f.bucket.generateCollisionDebugBuffers()},s.cI=Su,s.cJ=d0,s.cK=Zr,s.cL=iC,s.cM=L1,s.cN=class{constructor(f){this._marks={start:[f.url,"start"].join("#"),end:[f.url,"end"].join("#"),measure:f.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let f=performance.getEntriesByName(this._marks.measure);return f.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),f=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),f}},s.cO=function(f,u,d,b,S){return a(this,void 0,void 0,(function*(){if(j())try{return yield ai(f,u,d,b,S)}catch{}return(function(k,D,K,W,ee){const re=k.width,he=k.height;_n&&Bn||(_n=new OffscreenCanvas(re,he),Bn=_n.getContext("2d",{willReadFrequently:!0})),_n.width=re,_n.height=he,Bn.drawImage(k,0,0,re,he);const Oe=Bn.getImageData(D,K,W,ee);return Bn.clearRect(0,0,re,he),Oe.data})(f,u,d,b,S)}))},s.cP=Km,s.cQ=A,s.cR=p0,s.cS=Pp,s.cT=dc,s.cU=function(f,u){const d=new Map;if(f!=null)if(f.type==="Feature")d.set(Es(f,u),f);else for(const b of f.features)d.set(Es(b,u),b);return d},s.cV=function(f,u){if(f==null)return!0;if(f.type==="Feature")return Es(f,u)!=null;if(f.type==="FeatureCollection"){const d=new Set;for(const b of f.features){const S=Es(b,u);if(S==null||d.has(S))return!1;d.add(S)}return!0}return!1},s.cW=function(f,u,d){var b,S,k,D;if(u.removeAll&&f.clear(),u.remove)for(const K of u.remove)f.delete(K);if(u.add)for(const K of u.add){const W=Es(K,d);W!=null&&f.set(W,K)}if(u.update)for(const K of u.update){let W=f.get(K.id);if(W==null)continue;const ee=!K.removeAllProperties&&(((b=K.removeProperties)===null||b===void 0?void 0:b.length)>0||((S=K.addOrUpdateProperties)===null||S===void 0?void 0:S.length)>0);if((K.newGeometry||K.removeAllProperties||ee)&&(W=Object.assign({},W),f.set(K.id,W),ee&&(W.properties=Object.assign({},W.properties))),K.newGeometry&&(W.geometry=K.newGeometry),K.removeAllProperties)W.properties={};else if(((k=K.removeProperties)===null||k===void 0?void 0:k.length)>0)for(const re of K.removeProperties)Object.prototype.hasOwnProperty.call(W.properties,re)&&delete W.properties[re];if(((D=K.addOrUpdateProperties)===null||D===void 0?void 0:D.length)>0)for(const{key:re,value:he}of K.addOrUpdateProperties)W.properties[re]=he}},s.cX=dl,s.ca=function(f,u){return f[0]=u[0],f[1]=u[1],f[2]=u[2],f[3]=u[3],f[4]=u[4],f[5]=u[5],f[6]=u[6],f[7]=u[7],f[8]=u[8],f[9]=u[9],f[10]=u[10],f[11]=u[11],f[12]=u[12],f[13]=u[13],f[14]=u[14],f[15]=u[15],f},s.cb=f=>f.type==="symbol",s.cc=f=>f.type==="circle",s.cd=f=>f.type==="heatmap",s.ce=f=>f.type==="line",s.cf=f=>f.type==="fill",s.cg=f=>f.type==="fill-extrusion",s.ch=f=>f.type==="hillshade",s.ci=f=>f.type==="color-relief",s.cj=f=>f.type==="raster",s.ck=f=>f.type==="background",s.cl=f=>f.type==="custom",s.cm=dt,s.cn=function(f,u,d){const b=tt(u.x-d.x,u.y-d.y),S=tt(f.x-d.x,f.y-d.y);var k,D;return In(Math.atan2(b[0]*S[1]-b[1]*S[0],(k=b)[0]*(D=S)[0]+k[1]*D[1]))},s.co=it,s.cp=function(f,u){return xe[u]&&(f instanceof MouseEvent||f instanceof WheelEvent)},s.cq=function(f,u){return It[u]&&"touches"in f},s.cr=function(f){return It[f]||xe[f]},s.cs=function(f,u,d){var b=u[0],S=u[1];return f[0]=d[0]*b+d[4]*S+d[12],f[1]=d[1]*b+d[5]*S+d[13],f},s.ct=function(f,u){const{x:d,y:b}=jp.fromLngLat(u);return!(f<0||f>25||b<0||b>=1||d<0||d>=1)},s.cu=function(f,u){return f[0]=u[0],f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=u[1],f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=u[2],f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,f},s.cv=class extends fl{},s.cw=og,s.cy=function(f){return f.message===oe},s.cz=Ue,s.d=be,s.e=Pe,s.f=f=>a(void 0,void 0,void 0,(function*(){if(f.byteLength===0)return createImageBitmap(new ImageData(1,1));const u=new Blob([new Uint8Array(f)],{type:"image/png"});try{return createImageBitmap(u)}catch(d){throw new Error(`Could not load image because of ${d.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),s.g=ue,s.h=f=>new Promise(((u,d)=>{const b=new Image;b.onload=()=>{u(b),URL.revokeObjectURL(b.src),b.onload=null,window.requestAnimationFrame((()=>{b.src=zn}))},b.onerror=()=>d(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 S=new Blob([new Uint8Array(f)],{type:"image/png"});b.src=f.byteLength?URL.createObjectURL(S):zn})),s.i=Bt,s.j=(f,u)=>lt(Pe(f,{type:"json"}),u),s.k=Mt,s.l=gt,s.m=lt,s.n=(f,u)=>lt(Pe(f,{type:"arrayBuffer"}),u),s.o=function(f){return new L1(f).readFields(Nx,[])},s.p=xv,s.q=Bp,s.r=or,s.s=dn,s.t=Qu,s.u=Ur,s.v=ot,s.w=mt,s.x=p1,s.y=Cf,s.z=bf})),r("worker",["./shared"],(function(s){class a{constructor(ne,ue){this.keyCache={},ne&&this.replace(ne,ue)}replace(ne,ue){this._layerConfigs={},this._layers={},this.update(ne,[],ue)}update(ne,ue,Ce){for(const He of ne){this._layerConfigs[He.id]=He;const lt=this._layers[He.id]=s.bJ(He,Ce);lt._featureFilter=s.aa(lt.filter,Ce),this.keyCache[He.id]&&delete this.keyCache[He.id]}for(const He of ue)delete this.keyCache[He],delete this._layerConfigs[He],delete this._layers[He];this.familiesBySource={};const Ue=s.cC(Object.values(this._layerConfigs),this.keyCache);for(const He of Ue){const lt=He.map((Dt=>this._layers[Dt.id])),be=lt[0];if(be.visibility==="none")continue;const Ee=be.source||"";let y=this.familiesBySource[Ee];y||(y=this.familiesBySource[Ee]={});const gt=be.sourceLayer||"_geojsonTileLayer";let Mt=y[gt];Mt||(Mt=y[gt]=[]),Mt.push(lt)}}}class c{constructor(ne){const ue={},Ce=[];for(const be in ne){const Ee=ne[be],y=ue[be]={};for(const gt in Ee){const Mt=Ee[+gt];if(!Mt||Mt.bitmap.width===0||Mt.bitmap.height===0)continue;const Dt={x:0,y:0,w:Mt.bitmap.width+2,h:Mt.bitmap.height+2};Ce.push(Dt),y[gt]={rect:Dt,metrics:Mt.metrics}}}const{w:Ue,h:He}=s.p(Ce),lt=new s.q({width:Ue||1,height:He||1});for(const be in ne){const Ee=ne[be];for(const y in Ee){const gt=Ee[+y];if(!gt||gt.bitmap.width===0||gt.bitmap.height===0)continue;const Mt=ue[be][y].rect;s.q.copy(gt.bitmap,lt,{x:0,y:0},{x:Mt.x+1,y:Mt.y+1},gt.bitmap)}}this.image=lt,this.positions=ue}}s.cD("GlyphAtlas",c);class A{constructor(ne){this.tileID=new s.Z(ne.tileID.overscaledZ,ne.tileID.wrap,ne.tileID.canonical.z,ne.tileID.canonical.x,ne.tileID.canonical.y),this.uid=ne.uid,this.zoom=ne.zoom,this.pixelRatio=ne.pixelRatio,this.tileSize=ne.tileSize,this.source=ne.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=ne.showCollisionBoxes,this.collectResourceTiming=!!ne.collectResourceTiming,this.returnDependencies=!!ne.returnDependencies,this.promoteId=ne.promoteId,this.inFlightDependencies=[]}parse(ne,ue,Ce,Ue,He){return s._(this,void 0,void 0,(function*(){this.status="parsing",this.data=ne,this.collisionBoxArray=new s.a8;const lt=new s.cE(Object.keys(ne.layers).sort()),be=new s.cF(this.tileID,this.promoteId);be.bucketLayerIDs=[];const Ee={},y={featureIndex:be,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ce,subdivisionGranularity:He},gt=ue.familiesBySource[this.source];for(const Vn in gt){const Fn=ne.layers[Vn];if(!Fn)continue;Fn.version===1&&s.w(`Vector tile source "${this.source}" layer "${Vn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Ti=lt.encode(Vn),on=[];for(let qr=0;qr<Fn.length;qr++){const Di=Fn.feature(qr),js=be.getId(Di,Vn);on.push({feature:Di,id:js,index:qr,sourceLayerIndex:Ti})}for(const qr of gt[Vn]){const Di=qr[0];Di.source!==this.source&&s.w(`layer.source = ${Di.source} does not equal this.source = ${this.source}`),Di.minzoom&&this.zoom<Math.floor(Di.minzoom)||Di.maxzoom&&this.zoom>=Di.maxzoom||Di.visibility!=="none"&&(m(qr,this.zoom,Ce),(Ee[Di.id]=Di.createBucket({index:be.bucketLayerIDs.length,layers:qr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ti,sourceID:this.source})).populate(on,y,this.tileID.canonical),be.bucketLayerIDs.push(qr.map((js=>js.id))))}}const Mt=s.bN(y.glyphDependencies,(Vn=>Object.keys(Vn).map(Number)));this.inFlightDependencies.forEach((Vn=>Vn?.abort())),this.inFlightDependencies=[];let Dt=Promise.resolve({});if(Object.keys(Mt).length){const Vn=new AbortController;this.inFlightDependencies.push(Vn),Dt=Ue.sendAsync({type:"GG",data:{stacks:Mt,source:this.source,tileID:this.tileID,type:"glyphs"}},Vn)}const ot=Object.keys(y.iconDependencies);let bn=Promise.resolve({});if(ot.length){const Vn=new AbortController;this.inFlightDependencies.push(Vn),bn=Ue.sendAsync({type:"GI",data:{icons:ot,source:this.source,tileID:this.tileID,type:"icons"}},Vn)}const Gn=Object.keys(y.patternDependencies);let yn=Promise.resolve({});if(Gn.length){const Vn=new AbortController;this.inFlightDependencies.push(Vn),yn=Ue.sendAsync({type:"GI",data:{icons:Gn,source:this.source,tileID:this.tileID,type:"patterns"}},Vn)}const[qn,$n,mi]=yield Promise.all([Dt,bn,yn]),ir=new c(qn),di=new s.cG($n,mi);for(const Vn in Ee){const Fn=Ee[Vn];Fn instanceof s.a9?(m(Fn.layers,this.zoom,Ce),s.cH({bucket:Fn,glyphMap:qn,glyphPositions:ir.positions,imageMap:$n,imagePositions:di.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:y.subdivisionGranularity})):Fn.hasPattern&&(Fn instanceof s.cI||Fn instanceof s.cJ||Fn instanceof s.cK)&&(m(Fn.layers,this.zoom,Ce),Fn.addFeatures(y,this.tileID.canonical,di.patternPositions))}return this.status="done",{buckets:Object.values(Ee).filter((Vn=>!Vn.isEmpty())),featureIndex:be,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ir.image,imageAtlas:di,glyphMap:this.returnDependencies?qn:null,iconMap:this.returnDependencies?$n:null,glyphPositions:this.returnDependencies?ir.positions:null}}))}}function m(J,ne,ue){const Ce=new s.F(ne);for(const Ue of J)Ue.recalculate(Ce,ue)}class v{constructor(ne,ue,Ce){this.actor=ne,this.layerIndex=ue,this.availableImages=Ce,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(ne,ue){return s._(this,void 0,void 0,(function*(){const Ce=yield s.n(ne.request,ue);try{return{vectorTile:new s.cL(new s.cM(Ce.data)),rawData:Ce.data,cacheControl:Ce.cacheControl,expires:Ce.expires}}catch(Ue){const He=new Uint8Array(Ce.data);let lt=`Unable to parse the tile at ${ne.request.url}, `;throw lt+=He[0]===31&&He[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Ue.message}`,new Error(lt)}}))}loadTile(ne){return s._(this,void 0,void 0,(function*(){const ue=ne.uid,Ce=!!(ne&&ne.request&&ne.request.collectResourceTiming)&&new s.cN(ne.request),Ue=new A(ne);this.loading[ue]=Ue;const He=new AbortController;Ue.abort=He;try{const lt=yield this.loadVectorTile(ne,He);if(delete this.loading[ue],!lt)return null;const be=lt.rawData,Ee={};lt.expires&&(Ee.expires=lt.expires),lt.cacheControl&&(Ee.cacheControl=lt.cacheControl);const y={};if(Ce){const Mt=Ce.finish();Mt&&(y.resourceTiming=JSON.parse(JSON.stringify(Mt)))}Ue.vectorTile=lt.vectorTile;const gt=Ue.parse(lt.vectorTile,this.layerIndex,this.availableImages,this.actor,ne.subdivisionGranularity);this.loaded[ue]=Ue,this.fetching[ue]={rawTileData:be,cacheControl:Ee,resourceTiming:y};try{const Mt=yield gt;return s.e({rawTileData:be.slice(0)},Mt,Ee,y)}finally{delete this.fetching[ue]}}catch(lt){throw delete this.loading[ue],Ue.status="done",this.loaded[ue]=Ue,lt}}))}reloadTile(ne){return s._(this,void 0,void 0,(function*(){const ue=ne.uid;if(!this.loaded||!this.loaded[ue])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const Ce=this.loaded[ue];if(Ce.showCollisionBoxes=ne.showCollisionBoxes,Ce.status==="parsing"){const Ue=yield Ce.parse(Ce.vectorTile,this.layerIndex,this.availableImages,this.actor,ne.subdivisionGranularity);let He;if(this.fetching[ue]){const{rawTileData:lt,cacheControl:be,resourceTiming:Ee}=this.fetching[ue];delete this.fetching[ue],He=s.e({rawTileData:lt.slice(0)},Ue,be,Ee)}else He=Ue;return He}if(Ce.status==="done"&&Ce.vectorTile)return Ce.parse(Ce.vectorTile,this.layerIndex,this.availableImages,this.actor,ne.subdivisionGranularity)}))}abortTile(ne){return s._(this,void 0,void 0,(function*(){const ue=this.loading,Ce=ne.uid;ue&&ue[Ce]&&ue[Ce].abort&&(ue[Ce].abort.abort(),delete ue[Ce])}))}removeTile(ne){return s._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[ne.uid]&&delete this.loaded[ne.uid]}))}}class x{constructor(){this.loaded={}}loadTile(ne){return s._(this,void 0,void 0,(function*(){const{uid:ue,encoding:Ce,rawImageData:Ue,redFactor:He,greenFactor:lt,blueFactor:be,baseShift:Ee}=ne,y=Ue.width+2,gt=Ue.height+2,Mt=s.b(Ue)?new s.R({width:y,height:gt},yield s.cO(Ue,-1,-1,y,gt)):Ue,Dt=new s.cP(ue,Mt,Ce,He,lt,be,Ee);return this.loaded=this.loaded||{},this.loaded[ue]=Dt,Dt}))}removeTile(ne){const ue=this.loaded,Ce=ne.uid;ue&&ue[Ce]&&delete ue[Ce]}}var _,O,P=(function(){if(O)return _;function J(ue,Ce){if(ue.length!==0){ne(ue[0],Ce);for(var Ue=1;Ue<ue.length;Ue++)ne(ue[Ue],!Ce)}}function ne(ue,Ce){for(var Ue=0,He=0,lt=0,be=ue.length,Ee=be-1;lt<be;Ee=lt++){var y=(ue[lt][0]-ue[Ee][0])*(ue[Ee][1]+ue[lt][1]),gt=Ue+y;He+=Math.abs(Ue)>=Math.abs(y)?Ue-gt+y:y-gt+Ue,Ue=gt}Ue+He>=0!=!!Ce&&ue.reverse()}return O=1,_=function ue(Ce,Ue){var He,lt=Ce&&Ce.type;if(lt==="FeatureCollection")for(He=0;He<Ce.features.length;He++)ue(Ce.features[He],Ue);else if(lt==="GeometryCollection")for(He=0;He<Ce.geometries.length;He++)ue(Ce.geometries[He],Ue);else if(lt==="Feature")ue(Ce.geometry,Ue);else if(lt==="Polygon")J(Ce.coordinates,Ue);else if(lt==="MultiPolygon")for(He=0;He<Ce.coordinates.length;He++)J(Ce.coordinates[He],Ue);return Ce}})(),F=s.cQ(P);class j extends s.cS{constructor(ne,ue){super(new s.cM,0,ue,[],[]),this.feature=ne,this.type=ne.type,this.properties=ne.tags?ne.tags:{},"id"in ne&&(typeof ne.id=="string"?this.id=parseInt(ne.id,10):typeof ne.id!="number"||isNaN(ne.id)||(this.id=ne.id))}loadGeometry(){const ne=[],ue=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(const Ce of ue){const Ue=[];for(const He of Ce)Ue.push(new s.P(He[0],He[1]));ne.push(Ue)}return ne}}class Q extends s.cR{constructor(ne,ue){super(new s.cM),this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.version=ue?ue.version:1,this.extent=ue?ue.extent:4096,this.length=ne.length,this.features=ne}feature(ne){return new j(this.features[ne],this.extent)}}function V(J,ne){ne.writeVarintField(15,J.version||1),ne.writeStringField(1,J.name||""),ne.writeVarintField(5,J.extent||4096);const ue={keys:[],values:[],keycache:{},valuecache:{}};for(let He=0;He<J.length;He++)ue.feature=J.feature(He),ne.writeMessage(2,H,ue);const Ce=ue.keys;for(const He of Ce)ne.writeStringField(3,He);const Ue=ue.values;for(const He of Ue)ne.writeMessage(4,le,He)}function H(J,ne){if(!J.feature)return;const ue=J.feature;ue.id!==void 0&&ne.writeVarintField(1,ue.id),ne.writeMessage(2,G,J),ne.writeVarintField(3,ue.type),ne.writeMessage(4,se,ue)}function G(J,ne){for(const ue in J.feature?.properties){let Ce=J.feature.properties[ue],Ue=J.keycache[ue];if(Ce===null)continue;Ue===void 0&&(J.keys.push(ue),Ue=J.keys.length-1,J.keycache[ue]=Ue),ne.writeVarint(Ue),typeof Ce!="string"&&typeof Ce!="boolean"&&typeof Ce!="number"&&(Ce=JSON.stringify(Ce));const He=typeof Ce+":"+Ce;let lt=J.valuecache[He];lt===void 0&&(J.values.push(Ce),lt=J.values.length-1,J.valuecache[He]=lt),ne.writeVarint(lt)}}function Y(J,ne){return(ne<<3)+(7&J)}function z(J){return J<<1^J>>31}function se(J,ne){const ue=J.loadGeometry(),Ce=J.type;let Ue=0,He=0;for(const lt of ue){let be=1;Ce===1&&(be=lt.length),ne.writeVarint(Y(1,be));const Ee=Ce===3?lt.length-1:lt.length;for(let y=0;y<Ee;y++){y===1&&Ce!==1&&ne.writeVarint(Y(2,Ee-1));const gt=lt[y].x-Ue,Mt=lt[y].y-He;ne.writeVarint(z(gt)),ne.writeVarint(z(Mt)),Ue+=gt,He+=Mt}J.type===3&&ne.writeVarint(Y(7,1))}}function le(J,ne){const ue=typeof J;ue==="string"?ne.writeStringField(1,J):ue==="boolean"?ne.writeBooleanField(7,J):ue==="number"&&(J%1!=0?ne.writeDoubleField(3,J):J<0?ne.writeSVarintField(6,J):ne.writeVarintField(5,J))}const me={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:J=>J},fe=Math.fround||(_e=new Float32Array(1),J=>(_e[0]=+J,_e[0]));var _e;class we{constructor(ne){this.options=Object.assign(Object.create(me),ne),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(ne){const{log:ue,minZoom:Ce,maxZoom:Ue}=this.options;ue&&console.time("total time");const He=`prepare ${ne.length} points`;ue&&console.time(He),this.points=ne;const lt=[];for(let Ee=0;Ee<ne.length;Ee++){const y=ne[Ee];if(!y.geometry)continue;const[gt,Mt]=y.geometry.coordinates,Dt=fe(Ie(gt)),ot=fe(Qe(Mt));lt.push(Dt,ot,1/0,Ee,-1,1),this.options.reduce&&lt.push(0)}let be=this.trees[Ue+1]=this._createTree(lt);ue&&console.timeEnd(He);for(let Ee=Ue;Ee>=Ce;Ee--){const y=+Date.now();be=this.trees[Ee]=this._createTree(this._cluster(be,Ee)),ue&&console.log("z%d: %d clusters in %dms",Ee,be.numItems,+Date.now()-y)}return ue&&console.timeEnd("total time"),this}getClusters(ne,ue){let Ce=((ne[0]+180)%360+360)%360-180;const Ue=Math.max(-90,Math.min(90,ne[1]));let He=ne[2]===180?180:((ne[2]+180)%360+360)%360-180;const lt=Math.max(-90,Math.min(90,ne[3]));if(ne[2]-ne[0]>=360)Ce=-180,He=180;else if(Ce>He){const Mt=this.getClusters([Ce,Ue,180,lt],ue),Dt=this.getClusters([-180,Ue,He,lt],ue);return Mt.concat(Dt)}const be=this.trees[this._limitZoom(ue)],Ee=be.range(Ie(Ce),Qe(lt),Ie(He),Qe(Ue)),y=be.data,gt=[];for(const Mt of Ee){const Dt=this.stride*Mt;gt.push(y[Dt+5]>1?ke(y,Dt,this.clusterProps):this.points[y[Dt+3]])}return gt}getChildren(ne){const ue=this._getOriginId(ne),Ce=this._getOriginZoom(ne),Ue="No cluster with the specified id.",He=this.trees[Ce];if(!He)throw new Error(Ue);const lt=He.data;if(ue*this.stride>=lt.length)throw new Error(Ue);const be=this.options.radius/(this.options.extent*Math.pow(2,Ce-1)),Ee=He.within(lt[ue*this.stride],lt[ue*this.stride+1],be),y=[];for(const gt of Ee){const Mt=gt*this.stride;lt[Mt+4]===ne&&y.push(lt[Mt+5]>1?ke(lt,Mt,this.clusterProps):this.points[lt[Mt+3]])}if(y.length===0)throw new Error(Ue);return y}getLeaves(ne,ue,Ce){const Ue=[];return this._appendLeaves(Ue,ne,ue=ue||10,Ce=Ce||0,0),Ue}getTile(ne,ue,Ce){const Ue=this.trees[this._limitZoom(ne)],He=Math.pow(2,ne),{extent:lt,radius:be}=this.options,Ee=be/lt,y=(Ce-Ee)/He,gt=(Ce+1+Ee)/He,Mt={features:[]};return this._addTileFeatures(Ue.range((ue-Ee)/He,y,(ue+1+Ee)/He,gt),Ue.data,ue,Ce,He,Mt),ue===0&&this._addTileFeatures(Ue.range(1-Ee/He,y,1,gt),Ue.data,He,Ce,He,Mt),ue===He-1&&this._addTileFeatures(Ue.range(0,y,Ee/He,gt),Ue.data,-1,Ce,He,Mt),Mt.features.length?Mt:null}getClusterExpansionZoom(ne){let ue=this._getOriginZoom(ne)-1;for(;ue<=this.options.maxZoom;){const Ce=this.getChildren(ne);if(ue++,Ce.length!==1)break;ne=Ce[0].properties.cluster_id}return ue}_appendLeaves(ne,ue,Ce,Ue,He){const lt=this.getChildren(ue);for(const be of lt){const Ee=be.properties;if(Ee&&Ee.cluster?He+Ee.point_count<=Ue?He+=Ee.point_count:He=this._appendLeaves(ne,Ee.cluster_id,Ce,Ue,He):He<Ue?He++:ne.push(be),ne.length===Ce)break}return He}_createTree(ne){const ue=new s.aI(ne.length/this.stride|0,this.options.nodeSize,Float32Array);for(let Ce=0;Ce<ne.length;Ce+=this.stride)ue.add(ne[Ce],ne[Ce+1]);return ue.finish(),ue.data=ne,ue}_addTileFeatures(ne,ue,Ce,Ue,He,lt){for(const be of ne){const Ee=be*this.stride,y=ue[Ee+5]>1;let gt,Mt,Dt;if(y)gt=je(ue,Ee,this.clusterProps),Mt=ue[Ee],Dt=ue[Ee+1];else{const Gn=this.points[ue[Ee+3]];gt=Gn.properties;const[yn,qn]=Gn.geometry.coordinates;Mt=Ie(yn),Dt=Qe(qn)}const ot={type:1,geometry:[[Math.round(this.options.extent*(Mt*He-Ce)),Math.round(this.options.extent*(Dt*He-Ue))]],tags:gt};let bn;bn=y||this.options.generateId?ue[Ee+3]:this.points[ue[Ee+3]].id,bn!==void 0&&(ot.id=bn),lt.features.push(ot)}}_limitZoom(ne){return Math.max(this.options.minZoom,Math.min(Math.floor(+ne),this.options.maxZoom+1))}_cluster(ne,ue){const{radius:Ce,extent:Ue,reduce:He,minPoints:lt}=this.options,be=Ce/(Ue*Math.pow(2,ue)),Ee=ne.data,y=[],gt=this.stride;for(let Mt=0;Mt<Ee.length;Mt+=gt){if(Ee[Mt+2]<=ue)continue;Ee[Mt+2]=ue;const Dt=Ee[Mt],ot=Ee[Mt+1],bn=ne.within(Ee[Mt],Ee[Mt+1],be),Gn=Ee[Mt+5];let yn=Gn;for(const qn of bn){const $n=qn*gt;Ee[$n+2]>ue&&(yn+=Ee[$n+5])}if(yn>Gn&&yn>=lt){let qn,$n=Dt*Gn,mi=ot*Gn,ir=-1;const di=(Mt/gt<<5)+(ue+1)+this.points.length;for(const Vn of bn){const Fn=Vn*gt;if(Ee[Fn+2]<=ue)continue;Ee[Fn+2]=ue;const Ti=Ee[Fn+5];$n+=Ee[Fn]*Ti,mi+=Ee[Fn+1]*Ti,Ee[Fn+4]=di,He&&(qn||(qn=this._map(Ee,Mt,!0),ir=this.clusterProps.length,this.clusterProps.push(qn)),He(qn,this._map(Ee,Fn)))}Ee[Mt+4]=di,y.push($n/yn,mi/yn,1/0,di,-1,yn),He&&y.push(ir)}else{for(let qn=0;qn<gt;qn++)y.push(Ee[Mt+qn]);if(yn>1)for(const qn of bn){const $n=qn*gt;if(!(Ee[$n+2]<=ue)){Ee[$n+2]=ue;for(let mi=0;mi<gt;mi++)y.push(Ee[$n+mi])}}}}return y}_getOriginId(ne){return ne-this.points.length>>5}_getOriginZoom(ne){return(ne-this.points.length)%32}_map(ne,ue,Ce){if(ne[ue+5]>1){const lt=this.clusterProps[ne[ue+6]];return Ce?Object.assign({},lt):lt}const Ue=this.points[ne[ue+3]].properties,He=this.options.map(Ue);return Ce&&He===Ue?Object.assign({},He):He}}function ke(J,ne,ue){return{type:"Feature",id:J[ne+3],properties:je(J,ne,ue),geometry:{type:"Point",coordinates:[(Ce=J[ne],360*(Ce-.5)),tt(J[ne+1])]}};var Ce}function je(J,ne,ue){const Ce=J[ne+5],Ue=Ce>=1e4?`${Math.round(Ce/1e3)}k`:Ce>=1e3?Math.round(Ce/100)/10+"k":Ce,He=J[ne+6],lt=He===-1?{}:Object.assign({},ue[He]);return Object.assign(lt,{cluster:!0,cluster_id:J[ne+3],point_count:Ce,point_count_abbreviated:Ue})}function Ie(J){return J/360+.5}function Qe(J){const ne=Math.sin(J*Math.PI/180),ue=.5-.25*Math.log((1+ne)/(1-ne))/Math.PI;return ue<0?0:ue>1?1:ue}function tt(J){const ne=(180-360*J)*Math.PI/180;return 360*Math.atan(Math.exp(ne))/Math.PI-90}function ht(J,ne,ue,Ce){let Ue=Ce;const He=ne+(ue-ne>>1);let lt,be=ue-ne;const Ee=J[ne],y=J[ne+1],gt=J[ue],Mt=J[ue+1];for(let Dt=ne+3;Dt<ue;Dt+=3){const ot=ce(J[Dt],J[Dt+1],Ee,y,gt,Mt);if(ot>Ue)lt=Dt,Ue=ot;else if(ot===Ue){const bn=Math.abs(Dt-He);bn<be&&(lt=Dt,be=bn)}}Ue>Ce&&(lt-ne>3&&ht(J,ne,lt,Ce),J[lt+2]=Ue,ue-lt>3&&ht(J,lt,ue,Ce))}function ce(J,ne,ue,Ce,Ue,He){let lt=Ue-ue,be=He-Ce;if(lt!==0||be!==0){const Ee=((J-ue)*lt+(ne-Ce)*be)/(lt*lt+be*be);Ee>1?(ue=Ue,Ce=He):Ee>0&&(ue+=lt*Ee,Ce+=be*Ee)}return lt=J-ue,be=ne-Ce,lt*lt+be*be}function Le(J,ne,ue,Ce){const Ue={id:J??null,type:ne,geometry:ue,tags:Ce,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(ne==="Point"||ne==="MultiPoint"||ne==="LineString")We(Ue,ue);else if(ne==="Polygon")We(Ue,ue[0]);else if(ne==="MultiLineString")for(const He of ue)We(Ue,He);else if(ne==="MultiPolygon")for(const He of ue)We(Ue,He[0]);return Ue}function We(J,ne){for(let ue=0;ue<ne.length;ue+=3)J.minX=Math.min(J.minX,ne[ue]),J.minY=Math.min(J.minY,ne[ue+1]),J.maxX=Math.max(J.maxX,ne[ue]),J.maxY=Math.max(J.maxY,ne[ue+1])}function Me(J,ne,ue,Ce){if(!ne.geometry)return;const Ue=ne.geometry.coordinates;if(Ue&&Ue.length===0)return;const He=ne.geometry.type,lt=Math.pow(ue.tolerance/((1<<ue.maxZoom)*ue.extent),2);let be=[],Ee=ne.id;if(ue.promoteId?Ee=ne.properties[ue.promoteId]:ue.generateId&&(Ee=Ce||0),He==="Point")dt(Ue,be);else if(He==="MultiPoint")for(const y of Ue)dt(y,be);else if(He==="LineString")it(Ue,be,lt,!1);else if(He==="MultiLineString"){if(ue.lineMetrics){for(const y of Ue)be=[],it(y,be,lt,!1),J.push(Le(Ee,"LineString",be,ne.properties));return}vt(Ue,be,lt,!1)}else if(He==="Polygon")vt(Ue,be,lt,!0);else{if(He!=="MultiPolygon"){if(He==="GeometryCollection"){for(const y of ne.geometry.geometries)Me(J,{id:Ee,geometry:y,properties:ne.properties},ue,Ce);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const y of Ue){const gt=[];vt(y,gt,lt,!0),be.push(gt)}}J.push(Le(Ee,He,be,ne.properties))}function dt(J,ne){ne.push(Ut(J[0]),Pe(J[1]),0)}function it(J,ne,ue,Ce){let Ue,He,lt=0;for(let Ee=0;Ee<J.length;Ee++){const y=Ut(J[Ee][0]),gt=Pe(J[Ee][1]);ne.push(y,gt,0),Ee>0&&(lt+=Ce?(Ue*gt-y*He)/2:Math.sqrt(Math.pow(y-Ue,2)+Math.pow(gt-He,2))),Ue=y,He=gt}const be=ne.length-3;ne[2]=1,ht(ne,0,be,ue),ne[be+2]=1,ne.size=Math.abs(lt),ne.start=0,ne.end=ne.size}function vt(J,ne,ue,Ce){for(let Ue=0;Ue<J.length;Ue++){const He=[];it(J[Ue],He,ue,Ce),ne.push(He)}}function Ut(J){return J/360+.5}function Pe(J){const ne=Math.sin(J*Math.PI/180),ue=.5-.25*Math.log((1+ne)/(1-ne))/Math.PI;return ue<0?0:ue>1?1:ue}function Te(J,ne,ue,Ce,Ue,He,lt,be){if(Ce/=ne,He>=(ue/=ne)&&lt<Ce)return J;if(lt<ue||He>=Ce)return null;const Ee=[];for(const y of J){const gt=y.geometry;let Mt=y.type;const Dt=Ue===0?y.minX:y.minY,ot=Ue===0?y.maxX:y.maxY;if(Dt>=ue&&ot<Ce){Ee.push(y);continue}if(ot<ue||Dt>=Ce)continue;let bn=[];if(Mt==="Point"||Mt==="MultiPoint")Se(gt,bn,ue,Ce,Ue);else if(Mt==="LineString")Ne(gt,bn,ue,Ce,Ue,!1,be.lineMetrics);else if(Mt==="MultiLineString")rt(gt,bn,ue,Ce,Ue,!1);else if(Mt==="Polygon")rt(gt,bn,ue,Ce,Ue,!0);else if(Mt==="MultiPolygon")for(const Gn of gt){const yn=[];rt(Gn,yn,ue,Ce,Ue,!0),yn.length&&bn.push(yn)}if(bn.length){if(be.lineMetrics&&Mt==="LineString"){for(const Gn of bn)Ee.push(Le(y.id,Mt,Gn,y.tags));continue}Mt!=="LineString"&&Mt!=="MultiLineString"||(bn.length===1?(Mt="LineString",bn=bn[0]):Mt="MultiLineString"),Mt!=="Point"&&Mt!=="MultiPoint"||(Mt=bn.length===3?"Point":"MultiPoint"),Ee.push(Le(y.id,Mt,bn,y.tags))}}return Ee.length?Ee:null}function Se(J,ne,ue,Ce,Ue){for(let He=0;He<J.length;He+=3){const lt=J[He+Ue];lt>=ue&&lt<=Ce&&mt(ne,J[He],J[He+1],J[He+2])}}function Ne(J,ne,ue,Ce,Ue,He,lt){let be=ut(J);const Ee=Ue===0?Rt:Bt;let y,gt,Mt=J.start;for(let yn=0;yn<J.length-3;yn+=3){const qn=J[yn],$n=J[yn+1],mi=J[yn+2],ir=J[yn+3],di=J[yn+4],Vn=Ue===0?qn:$n,Fn=Ue===0?ir:di;let Ti=!1;lt&&(y=Math.sqrt(Math.pow(qn-ir,2)+Math.pow($n-di,2))),Vn<ue?Fn>ue&&(gt=Ee(be,qn,$n,ir,di,ue),lt&&(be.start=Mt+y*gt)):Vn>Ce?Fn<Ce&&(gt=Ee(be,qn,$n,ir,di,Ce),lt&&(be.start=Mt+y*gt)):mt(be,qn,$n,mi),Fn<ue&&Vn>=ue&&(gt=Ee(be,qn,$n,ir,di,ue),Ti=!0),Fn>Ce&&Vn<=Ce&&(gt=Ee(be,qn,$n,ir,di,Ce),Ti=!0),!He&&Ti&&(lt&&(be.end=Mt+y*gt),ne.push(be),be=ut(J)),lt&&(Mt+=y)}let Dt=J.length-3;const ot=J[Dt],bn=J[Dt+1],Gn=Ue===0?ot:bn;Gn>=ue&&Gn<=Ce&&mt(be,ot,bn,J[Dt+2]),Dt=be.length-3,He&&Dt>=3&&(be[Dt]!==be[0]||be[Dt+1]!==be[1])&&mt(be,be[0],be[1],be[2]),be.length&&ne.push(be)}function ut(J){const ne=[];return ne.size=J.size,ne.start=J.start,ne.end=J.end,ne}function rt(J,ne,ue,Ce,Ue,He){for(const lt of J)Ne(lt,ne,ue,Ce,Ue,He,!1)}function mt(J,ne,ue,Ce){J.push(ne,ue,Ce)}function Rt(J,ne,ue,Ce,Ue,He){const lt=(He-ne)/(Ce-ne);return mt(J,He,ue+(Ue-ue)*lt,1),lt}function Bt(J,ne,ue,Ce,Ue,He){const lt=(He-ue)/(Ue-ue);return mt(J,ne+(Ce-ne)*lt,He,1),lt}function $t(J,ne){const ue=[];for(let Ce=0;Ce<J.length;Ce++){const Ue=J[Ce],He=Ue.type;let lt;if(He==="Point"||He==="MultiPoint"||He==="LineString")lt=Rn(Ue.geometry,ne);else if(He==="MultiLineString"||He==="Polygon"){lt=[];for(const be of Ue.geometry)lt.push(Rn(be,ne))}else if(He==="MultiPolygon"){lt=[];for(const be of Ue.geometry){const Ee=[];for(const y of be)Ee.push(Rn(y,ne));lt.push(Ee)}}ue.push(Le(Ue.id,He,lt,Ue.tags))}return ue}function Rn(J,ne){const ue=[];ue.size=J.size,J.start!==void 0&&(ue.start=J.start,ue.end=J.end);for(let Ce=0;Ce<J.length;Ce+=3)ue.push(J[Ce]+ne,J[Ce+1],J[Ce+2]);return ue}function zn(J,ne){if(J.transformed)return J;const ue=1<<J.z,Ce=J.x,Ue=J.y;for(const He of J.features){const lt=He.geometry,be=He.type;if(He.geometry=[],be===1)for(let Ee=0;Ee<lt.length;Ee+=2)He.geometry.push(ai(lt[Ee],lt[Ee+1],ne,ue,Ce,Ue));else for(let Ee=0;Ee<lt.length;Ee++){const y=[];for(let gt=0;gt<lt[Ee].length;gt+=2)y.push(ai(lt[Ee][gt],lt[Ee][gt+1],ne,ue,Ce,Ue));He.geometry.push(y)}}return J.transformed=!0,J}function ai(J,ne,ue,Ce,Ue,He){return[Math.round(ue*(J*Ce-Ue)),Math.round(ue*(ne*Ce-He))]}function _n(J,ne,ue,Ce,Ue){const He=ne===Ue.maxZoom?0:Ue.tolerance/((1<<ne)*Ue.extent),lt={features:[],numPoints:0,numSimplified:0,numFeatures:J.length,source:null,x:ue,y:Ce,z:ne,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const be of J)Bn(lt,be,He,Ue);return lt}function Bn(J,ne,ue,Ce){const Ue=ne.geometry,He=ne.type,lt=[];if(J.minX=Math.min(J.minX,ne.minX),J.minY=Math.min(J.minY,ne.minY),J.maxX=Math.max(J.maxX,ne.maxX),J.maxY=Math.max(J.maxY,ne.maxY),He==="Point"||He==="MultiPoint")for(let be=0;be<Ue.length;be+=3)lt.push(Ue[be],Ue[be+1]),J.numPoints++,J.numSimplified++;else if(He==="LineString")dn(lt,Ue,J,ue,!1,!1);else if(He==="MultiLineString"||He==="Polygon")for(let be=0;be<Ue.length;be++)dn(lt,Ue[be],J,ue,He==="Polygon",be===0);else if(He==="MultiPolygon")for(let be=0;be<Ue.length;be++){const Ee=Ue[be];for(let y=0;y<Ee.length;y++)dn(lt,Ee[y],J,ue,!0,y===0)}if(lt.length){let be=ne.tags||null;if(He==="LineString"&&Ce.lineMetrics){be={};for(const y in ne.tags)be[y]=ne.tags[y];be.mapbox_clip_start=Ue.start/Ue.size,be.mapbox_clip_end=Ue.end/Ue.size}const Ee={geometry:lt,type:He==="Polygon"||He==="MultiPolygon"?3:He==="LineString"||He==="MultiLineString"?2:1,tags:be};ne.id!==null&&(Ee.id=ne.id),J.features.push(Ee)}}function dn(J,ne,ue,Ce,Ue,He){const lt=Ce*Ce;if(Ce>0&&ne.size<(Ue?lt:Ce))return void(ue.numPoints+=ne.length/3);const be=[];for(let Ee=0;Ee<ne.length;Ee+=3)(Ce===0||ne[Ee+2]>lt)&&(ue.numSimplified++,be.push(ne[Ee],ne[Ee+1])),ue.numPoints++;Ue&&(function(Ee,y){let gt=0;for(let Mt=0,Dt=Ee.length,ot=Dt-2;Mt<Dt;ot=Mt,Mt+=2)gt+=(Ee[Mt]-Ee[ot])*(Ee[Mt+1]+Ee[ot+1]);if(gt>0===y)for(let Mt=0,Dt=Ee.length;Mt<Dt/2;Mt+=2){const ot=Ee[Mt],bn=Ee[Mt+1];Ee[Mt]=Ee[Dt-2-Mt],Ee[Mt+1]=Ee[Dt-1-Mt],Ee[Dt-2-Mt]=ot,Ee[Dt-1-Mt]=bn}})(be,He),J.push(be)}const li={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class In{constructor(ne,ue){const Ce=(ue=this.options=(function(He,lt){for(const be in lt)He[be]=lt[be];return He})(Object.create(li),ue)).debug;if(Ce&&console.time("preprocess data"),ue.maxZoom<0||ue.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(ue.promoteId&&ue.generateId)throw new Error("promoteId and generateId cannot be used together.");let Ue=(function(He,lt){const be=[];if(He.type==="FeatureCollection")for(let Ee=0;Ee<He.features.length;Ee++)Me(be,He.features[Ee],lt,Ee);else Me(be,He.type==="Feature"?He:{geometry:He},lt);return be})(ne,ue);this.tiles={},this.tileCoords=[],Ce&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ue.indexMaxZoom,ue.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Ue=(function(He,lt){const be=lt.buffer/lt.extent;let Ee=He;const y=Te(He,1,-1-be,be,0,-1,2,lt),gt=Te(He,1,1-be,2+be,0,-1,2,lt);return(y||gt)&&(Ee=Te(He,1,-be,1+be,0,-1,2,lt)||[],y&&(Ee=$t(y,1).concat(Ee)),gt&&(Ee=Ee.concat($t(gt,-1)))),Ee})(Ue,ue),Ue.length&&this.splitTile(Ue,0,0,0),Ce&&(Ue.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(ne,ue,Ce,Ue,He,lt,be){const Ee=[ne,ue,Ce,Ue],y=this.options,gt=y.debug;for(;Ee.length;){Ue=Ee.pop(),Ce=Ee.pop(),ue=Ee.pop(),ne=Ee.pop();const Mt=1<<ue,Dt=It(ue,Ce,Ue);let ot=this.tiles[Dt];if(!ot&&(gt>1&&console.time("creation"),ot=this.tiles[Dt]=_n(ne,ue,Ce,Ue,y),this.tileCoords.push({z:ue,x:Ce,y:Ue}),gt)){gt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ue,Ce,Ue,ot.numFeatures,ot.numPoints,ot.numSimplified),console.timeEnd("creation"));const Ti=`z${ue}`;this.stats[Ti]=(this.stats[Ti]||0)+1,this.total++}if(ot.source=ne,He==null){if(ue===y.indexMaxZoom||ot.numPoints<=y.indexMaxPoints)continue}else{if(ue===y.maxZoom||ue===He)continue;if(He!=null){const Ti=He-ue;if(Ce!==lt>>Ti||Ue!==be>>Ti)continue}}if(ot.source=null,ne.length===0)continue;gt>1&&console.time("clipping");const bn=.5*y.buffer/y.extent,Gn=.5-bn,yn=.5+bn,qn=1+bn;let $n=null,mi=null,ir=null,di=null,Vn=Te(ne,Mt,Ce-bn,Ce+yn,0,ot.minX,ot.maxX,y),Fn=Te(ne,Mt,Ce+Gn,Ce+qn,0,ot.minX,ot.maxX,y);ne=null,Vn&&($n=Te(Vn,Mt,Ue-bn,Ue+yn,1,ot.minY,ot.maxY,y),mi=Te(Vn,Mt,Ue+Gn,Ue+qn,1,ot.minY,ot.maxY,y),Vn=null),Fn&&(ir=Te(Fn,Mt,Ue-bn,Ue+yn,1,ot.minY,ot.maxY,y),di=Te(Fn,Mt,Ue+Gn,Ue+qn,1,ot.minY,ot.maxY,y),Fn=null),gt>1&&console.timeEnd("clipping"),Ee.push($n||[],ue+1,2*Ce,2*Ue),Ee.push(mi||[],ue+1,2*Ce,2*Ue+1),Ee.push(ir||[],ue+1,2*Ce+1,2*Ue),Ee.push(di||[],ue+1,2*Ce+1,2*Ue+1)}}getTile(ne,ue,Ce){ne=+ne,ue=+ue,Ce=+Ce;const Ue=this.options,{extent:He,debug:lt}=Ue;if(ne<0||ne>24)return null;const be=1<<ne,Ee=It(ne,ue=ue+be&be-1,Ce);if(this.tiles[Ee])return zn(this.tiles[Ee],He);lt>1&&console.log("drilling down to z%d-%d-%d",ne,ue,Ce);let y,gt=ne,Mt=ue,Dt=Ce;for(;!y&&gt>0;)gt--,Mt>>=1,Dt>>=1,y=this.tiles[It(gt,Mt,Dt)];return y&&y.source?(lt>1&&(console.log("found parent tile z%d-%d-%d",gt,Mt,Dt),console.time("drilling down")),this.splitTile(y.source,gt,Mt,Dt,ne,ue,Ce),lt>1&&console.timeEnd("drilling down"),this.tiles[Ee]?zn(this.tiles[Ee],He):null):null}}function It(J,ne,ue){return 32*((1<<J)*ue+ne)+J}class xe extends v{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(ne,ue){return s._(this,void 0,void 0,(function*(){const Ce=ne.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const Ue=this._geoJSONIndex.getTile(Ce.z,Ce.x,Ce.y);if(!Ue)return null;const He=new Q(Ue.features,{version:2,extent:s.$});let lt=(function(be){const Ee=new s.cM;return(function(y,gt){for(const Mt in y.layers)gt.writeMessage(3,V,y.layers[Mt])})(be,Ee),Ee.finish()})(He);return lt.byteOffset===0&&lt.byteLength===lt.buffer.byteLength||(lt=new Uint8Array(lt)),{vectorTile:He,rawData:lt.buffer}}))}loadData(ne){return s._(this,void 0,void 0,(function*(){var ue;(ue=this._pendingRequest)===null||ue===void 0||ue.abort();const Ce=!!(ne&&ne.request&&ne.request.collectResourceTiming)&&new s.cN(ne.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(ne,this._pendingRequest);const Ue=yield this._pendingData;this._geoJSONIndex=ne.cluster?new we((function({superclusterOptions:lt,clusterProperties:be}){if(!be||!lt)return lt;const Ee={},y={},gt={accumulated:null,zoom:0},Mt={properties:null},Dt=Object.keys(be);for(const ot of Dt){const[bn,Gn]=be[ot],yn=s.cT(Gn),qn=s.cT(typeof bn=="string"?[bn,["accumulated"],["get",ot]]:bn);Ee[ot]=yn.value,y[ot]=qn.value}return lt.map=ot=>{Mt.properties=ot;const bn={};for(const Gn of Dt)bn[Gn]=Ee[Gn].evaluate(gt,Mt);return bn},lt.reduce=(ot,bn)=>{Mt.properties=bn;for(const Gn of Dt)gt.accumulated=ot[Gn],ot[Gn]=y[Gn].evaluate(gt,Mt)},lt})(ne)).load(Ue.features):(function(lt,be){return new In(lt,be)})(Ue,ne.geojsonVtOptions),this.loaded={};const He={data:Ue};if(Ce){const lt=Ce.finish();lt&&(He.resourceTiming={},He.resourceTiming[ne.source]=JSON.parse(JSON.stringify(lt)))}return He}catch(Ue){if(delete this._pendingRequest,s.cy(Ue))return{abandoned:!0};throw Ue}}))}getData(){return s._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile(ne){const ue=this.loaded;return ue&&ue[ne.uid]?super.reloadTile(ne):this.loadTile(ne)}loadAndProcessGeoJSON(ne,ue){return s._(this,void 0,void 0,(function*(){let Ce=yield this.loadGeoJSON(ne,ue);if(delete this._pendingRequest,typeof Ce!="object")throw new Error(`Input data given to '${ne.source}' is not a valid GeoJSON object.`);if(F(Ce,!0),ne.filter){const Ue=s.cT(ne.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Ue.result==="error")throw new Error(Ue.value.map((lt=>`${lt.key}: ${lt.message}`)).join(", "));Ce={type:"FeatureCollection",features:Ce.features.filter((lt=>Ue.value.evaluate({zoom:0},lt)))}}return Ce}))}loadGeoJSON(ne,ue){return s._(this,void 0,void 0,(function*(){const{promoteId:Ce}=ne;if(ne.request){const Ue=yield s.j(ne.request,ue);return this._dataUpdateable=s.cV(Ue.data,Ce)?s.cU(Ue.data,Ce):void 0,Ue.data}if(typeof ne.data=="string")try{const Ue=JSON.parse(ne.data);return this._dataUpdateable=s.cV(Ue,Ce)?s.cU(Ue,Ce):void 0,Ue}catch{throw new Error(`Input data given to '${ne.source}' is not a valid GeoJSON object.`)}if(!ne.dataDiff)throw new Error(`Input data given to '${ne.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${ne.source}`);return s.cW(this._dataUpdateable,ne.dataDiff,Ce),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}}))}removeSource(ne){return s._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom(ne){return this._geoJSONIndex.getClusterExpansionZoom(ne.clusterId)}getClusterChildren(ne){return this._geoJSONIndex.getChildren(ne.clusterId)}getClusterLeaves(ne){return this._geoJSONIndex.getLeaves(ne.clusterId,ne.limit,ne.offset)}}class oe{constructor(ne){this.self=ne,this.actor=new s.J(ne),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(ue,Ce)=>{if(this.externalWorkerSourceTypes[ue])throw new Error(`Worker source with name "${ue}" already registered.`);this.externalWorkerSourceTypes[ue]=Ce},this.self.addProtocol=s.cA,this.self.removeProtocol=s.cB,this.self.registerRTLTextPlugin=ue=>{s.cX.setMethods(ue)},this.actor.registerMessageHandler("LDT",((ue,Ce)=>this._getDEMWorkerSource(ue,Ce.source).loadTile(Ce))),this.actor.registerMessageHandler("RDT",((ue,Ce)=>s._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(ue,Ce.source).removeTile(Ce)})))),this.actor.registerMessageHandler("GCEZ",((ue,Ce)=>s._(this,void 0,void 0,(function*(){return this._getWorkerSource(ue,Ce.type,Ce.source).getClusterExpansionZoom(Ce)})))),this.actor.registerMessageHandler("GCC",((ue,Ce)=>s._(this,void 0,void 0,(function*(){return this._getWorkerSource(ue,Ce.type,Ce.source).getClusterChildren(Ce)})))),this.actor.registerMessageHandler("GCL",((ue,Ce)=>s._(this,void 0,void 0,(function*(){return this._getWorkerSource(ue,Ce.type,Ce.source).getClusterLeaves(Ce)})))),this.actor.registerMessageHandler("LD",((ue,Ce)=>this._getWorkerSource(ue,Ce.type,Ce.source).loadData(Ce))),this.actor.registerMessageHandler("GD",((ue,Ce)=>this._getWorkerSource(ue,Ce.type,Ce.source).getData())),this.actor.registerMessageHandler("LT",((ue,Ce)=>this._getWorkerSource(ue,Ce.type,Ce.source).loadTile(Ce))),this.actor.registerMessageHandler("RT",((ue,Ce)=>this._getWorkerSource(ue,Ce.type,Ce.source).reloadTile(Ce))),this.actor.registerMessageHandler("AT",((ue,Ce)=>this._getWorkerSource(ue,Ce.type,Ce.source).abortTile(Ce))),this.actor.registerMessageHandler("RMT",((ue,Ce)=>this._getWorkerSource(ue,Ce.type,Ce.source).removeTile(Ce))),this.actor.registerMessageHandler("RS",((ue,Ce)=>s._(this,void 0,void 0,(function*(){if(!this.workerSources[ue]||!this.workerSources[ue][Ce.type]||!this.workerSources[ue][Ce.type][Ce.source])return;const Ue=this.workerSources[ue][Ce.type][Ce.source];delete this.workerSources[ue][Ce.type][Ce.source],Ue.removeSource!==void 0&&Ue.removeSource(Ce)})))),this.actor.registerMessageHandler("RM",(ue=>s._(this,void 0,void 0,(function*(){delete this.layerIndexes[ue],delete this.availableImages[ue],delete this.workerSources[ue],delete this.demWorkerSources[ue],this.globalStates.delete(ue)})))),this.actor.registerMessageHandler("SR",((ue,Ce)=>s._(this,void 0,void 0,(function*(){this.referrer=Ce})))),this.actor.registerMessageHandler("SRPS",((ue,Ce)=>this._syncRTLPluginState(ue,Ce))),this.actor.registerMessageHandler("IS",((ue,Ce)=>s._(this,void 0,void 0,(function*(){this.self.importScripts(Ce)})))),this.actor.registerMessageHandler("SI",((ue,Ce)=>this._setImages(ue,Ce))),this.actor.registerMessageHandler("UL",((ue,Ce)=>s._(this,void 0,void 0,(function*(){this._getLayerIndex(ue).update(Ce.layers,Ce.removedIds,this._getGlobalState(ue))})))),this.actor.registerMessageHandler("UGS",((ue,Ce)=>s._(this,void 0,void 0,(function*(){const Ue=this._getGlobalState(ue);for(const He in Ce)Ue[He]=Ce[He]})))),this.actor.registerMessageHandler("SL",((ue,Ce)=>s._(this,void 0,void 0,(function*(){this._getLayerIndex(ue).replace(Ce,this._getGlobalState(ue))}))))}_getGlobalState(ne){let ue=this.globalStates.get(ne);return ue||(ue={},this.globalStates.set(ne,ue)),ue}_setImages(ne,ue){return s._(this,void 0,void 0,(function*(){this.availableImages[ne]=ue;for(const Ce in this.workerSources[ne]){const Ue=this.workerSources[ne][Ce];for(const He in Ue)Ue[He].availableImages=ue}}))}_syncRTLPluginState(ne,ue){return s._(this,void 0,void 0,(function*(){return yield s.cX.syncState(ue,this.self.importScripts)}))}_getAvailableImages(ne){let ue=this.availableImages[ne];return ue||(ue=[]),ue}_getLayerIndex(ne){let ue=this.layerIndexes[ne];return ue||(ue=this.layerIndexes[ne]=new a),ue}_getWorkerSource(ne,ue,Ce){if(this.workerSources[ne]||(this.workerSources[ne]={}),this.workerSources[ne][ue]||(this.workerSources[ne][ue]={}),!this.workerSources[ne][ue][Ce]){const Ue={sendAsync:(He,lt)=>(He.targetMapId=ne,this.actor.sendAsync(He,lt))};switch(ue){case"vector":this.workerSources[ne][ue][Ce]=new v(Ue,this._getLayerIndex(ne),this._getAvailableImages(ne));break;case"geojson":this.workerSources[ne][ue][Ce]=new xe(Ue,this._getLayerIndex(ne),this._getAvailableImages(ne));break;default:this.workerSources[ne][ue][Ce]=new this.externalWorkerSourceTypes[ue](Ue,this._getLayerIndex(ne),this._getAvailableImages(ne))}}return this.workerSources[ne][ue][Ce]}_getDEMWorkerSource(ne,ue){return this.demWorkerSources[ne]||(this.demWorkerSources[ne]={}),this.demWorkerSources[ne][ue]||(this.demWorkerSources[ne][ue]=new x),this.demWorkerSources[ne][ue]}}return s.i(self)&&(self.worker=new oe(self)),oe})),r("index",["exports","./shared"],(function(s,a){var c="5.7.2";function A(){var B=new a.A(4);return a.A!=Float32Array&&(B[1]=0,B[2]=0),B[0]=1,B[3]=1,B}let m,v;const x={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(B,l,p){const C=requestAnimationFrame((T=>{E(),l(T)})),{unsubscribe:E}=a.s(B.signal,"abort",(()=>{E(),cancelAnimationFrame(C),p(a.c())}),!1)},frameAsync(B){return new Promise(((l,p)=>{this.frame(B,l,p)}))},getImageData(B,l=0){return this.getImageCanvasContext(B).getImageData(-l,-l,B.width+2*l,B.height+2*l)},getImageCanvasContext(B){const l=window.document.createElement("canvas"),p=l.getContext("2d",{willReadFrequently:!0});if(!p)throw new Error("failed to create canvas 2d context");return l.width=B.width,l.height=B.height,p.drawImage(B,0,0,B.width,B.height),p},resolveURL:B=>(m||(m=document.createElement("a")),m.href=B,m.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(v==null&&(v=matchMedia("(prefers-reduced-motion: reduce)")),v.matches)}};class _{static testProp(l){if(!_.docStyle)return l[0];for(let p=0;p<l.length;p++)if(l[p]in _.docStyle)return l[p];return l[0]}static create(l,p,C){const E=window.document.createElement(l);return p!==void 0&&(E.className=p),C&&C.appendChild(E),E}static createNS(l,p){return window.document.createElementNS(l,p)}static disableDrag(){_.docStyle&&_.selectProp&&(_.userSelect=_.docStyle[_.selectProp],_.docStyle[_.selectProp]="none")}static enableDrag(){_.docStyle&&_.selectProp&&(_.docStyle[_.selectProp]=_.userSelect)}static setTransform(l,p){l.style[_.transformProp]=p}static addEventListener(l,p,C,E={}){l.addEventListener(p,C,"passive"in E?E:E.capture)}static removeEventListener(l,p,C,E={}){l.removeEventListener(p,C,"passive"in E?E:E.capture)}static suppressClickInternal(l){l.preventDefault(),l.stopPropagation(),window.removeEventListener("click",_.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",_.suppressClickInternal,!0),window.setTimeout((()=>{window.removeEventListener("click",_.suppressClickInternal,!0)}),0)}static getScale(l){const p=l.getBoundingClientRect();return{x:p.width/l.offsetWidth||1,y:p.height/l.offsetHeight||1,boundingClientRect:p}}static getPoint(l,p,C){const E=p.boundingClientRect;return new a.P((C.clientX-E.left)/p.x-l.clientLeft,(C.clientY-E.top)/p.y-l.clientTop)}static mousePos(l,p){const C=_.getScale(l);return _.getPoint(l,C,p)}static touchPos(l,p){const C=[],E=_.getScale(l);for(let T=0;T<p.length;T++)C.push(_.getPoint(l,E,p[T]));return C}static mouseButton(l){return l.button}static remove(l){l.parentNode&&l.parentNode.removeChild(l)}static sanitize(l){const p=new DOMParser().parseFromString(l,"text/html").body||document.createElement("body"),C=p.querySelectorAll("script");for(const E of C)E.remove();return _.clean(p),p.innerHTML}static isPossiblyDangerous(l,p){const C=p.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(l)||!C.includes("javascript:")&&!C.includes("data:"))||!!l.startsWith("on")||void 0}static clean(l){const p=l.children;for(const C of p)_.removeAttributes(C),_.clean(C)}static removeAttributes(l){for(const{name:p,value:C}of l.attributes)_.isPossiblyDangerous(p,C)&&l.removeAttribute(p)}}_.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,_.selectProp=_.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),_.transformProp=_.testProp(["transform","WebkitTransform"]);const O={supported:!1,testSupport:function(B){!j&&F&&(Q?V(B):P=B)}};let P,F,j=!1,Q=!1;function V(B){const l=B.createTexture();B.bindTexture(B.TEXTURE_2D,l);try{if(B.texImage2D(B.TEXTURE_2D,0,B.RGBA,B.RGBA,B.UNSIGNED_BYTE,F),B.isContextLost())return;O.supported=!0}catch{}B.deleteTexture(l),j=!0}var H;typeof document<"u"&&(F=document.createElement("img"),F.onload=()=>{P&&V(P),P=null,Q=!0},F.onerror=()=>{j=!0,P=null},F.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),(function(B){let l,p,C,E;B.resetRequestQueue=()=>{l=[],p=0,C=0,E={}},B.addThrottleControl=Z=>{const ae=C++;return E[ae]=Z,ae},B.removeThrottleControl=Z=>{delete E[Z],U()},B.getImage=(Z,ae,Ae=!0)=>new Promise(((ye,pe)=>{O.supported&&(Z.headers||(Z.headers={}),Z.headers.accept="image/webp,*/*"),a.e(Z,{type:"image"}),l.push({abortController:ae,requestParameters:Z,supportImageRefresh:Ae,state:"queued",onError:Be=>{pe(Be)},onSuccess:Be=>{ye(Be)}}),U()}));const T=Z=>a._(this,void 0,void 0,(function*(){Z.state="running";const{requestParameters:ae,supportImageRefresh:Ae,onError:ye,onSuccess:pe,abortController:Be}=Z,Fe=Ae===!1&&!a.i(self)&&!a.g(ae.url)&&(!ae.headers||Object.keys(ae.headers).reduce(((et,st)=>et&&st==="accept"),!0));p++;const Xe=Fe?q(ae,Be):a.m(ae,Be);try{const et=yield Xe;delete Z.abortController,Z.state="completed",et.data instanceof HTMLImageElement||a.b(et.data)?pe(et):et.data&&pe({data:yield(Ze=et.data,typeof createImageBitmap=="function"?a.f(Ze):a.h(Ze)),cacheControl:et.cacheControl,expires:et.expires})}catch(et){delete Z.abortController,ye(et)}finally{p--,U()}var Ze})),U=()=>{const Z=(()=>{for(const ae of Object.keys(E))if(E[ae]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let ae=p;ae<Z&&l.length>0;ae++){const Ae=l.shift();Ae.abortController.signal.aborted?ae--:T(Ae)}},q=(Z,ae)=>new Promise(((Ae,ye)=>{const pe=new Image,Be=Z.url,Fe=Z.credentials;Fe&&Fe==="include"?pe.crossOrigin="use-credentials":(Fe&&Fe==="same-origin"||!a.d(Be))&&(pe.crossOrigin="anonymous"),ae.signal.addEventListener("abort",(()=>{pe.src="",ye(a.c())})),pe.fetchPriority="high",pe.onload=()=>{pe.onerror=pe.onload=null,Ae({data:pe})},pe.onerror=()=>{pe.onerror=pe.onload=null,ae.signal.aborted||ye(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."))},pe.src=Be}))})(H||(H={})),H.resetRequestQueue();class G{constructor(l){this._transformRequestFn=l??null}transformRequest(l,p){return this._transformRequestFn&&this._transformRequestFn(l,p)||{url:l}}setTransformRequest(l){this._transformRequestFn=l}}function Y(B){const l=[];if(typeof B=="string")l.push({id:"default",url:B});else if(B&&B.length>0){const p=[];for(const{id:C,url:E}of B){const T=`${C}${E}`;p.indexOf(T)===-1&&(p.push(T),l.push({id:C,url:E}))}}return l}function z(B,l,p){try{const C=new URL(B);return C.pathname+=`${l}${p}`,C.toString()}catch{throw new Error(`Invalid sprite URL "${B}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function se(B){const{userImage:l}=B;return!!(l&&l.render&&l.render())&&(B.data.replace(new Uint8Array(l.data.buffer)),!0)}class le extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(l){if(this.loaded!==l&&(this.loaded=l,l)){for(const{ids:p,promiseResolve:C}of this.requestors)C(this._getImagesForIds(p));this.requestors=[]}}getImage(l){const p=this.images[l];if(p&&!p.data&&p.spriteData){const C=p.spriteData;p.data=new a.R({width:C.width,height:C.height},C.context.getImageData(C.x,C.y,C.width,C.height).data),p.spriteData=null}return p}addImage(l,p){if(this.images[l])throw new Error(`Image id ${l} already exist, use updateImage instead`);this._validate(l,p)&&(this.images[l]=p)}_validate(l,p){let C=!0;const E=p.data||p.spriteData;return this._validateStretch(p.stretchX,E&&E.width)||(this.fire(new a.k(new Error(`Image "${l}" has invalid "stretchX" value`))),C=!1),this._validateStretch(p.stretchY,E&&E.height)||(this.fire(new a.k(new Error(`Image "${l}" has invalid "stretchY" value`))),C=!1),this._validateContent(p.content,p)||(this.fire(new a.k(new Error(`Image "${l}" has invalid "content" value`))),C=!1),C}_validateStretch(l,p){if(!l)return!0;let C=0;for(const E of l){if(E[0]<C||E[1]<E[0]||p<E[1])return!1;C=E[1]}return!0}_validateContent(l,p){if(!l)return!0;if(l.length!==4)return!1;const C=p.spriteData,E=C&&C.width||p.data.width,T=C&&C.height||p.data.height;return!(l[0]<0||E<l[0]||l[1]<0||T<l[1]||l[2]<0||E<l[2]||l[3]<0||T<l[3]||l[2]<l[0]||l[3]<l[1])}updateImage(l,p,C=!0){const E=this.getImage(l);if(C&&(E.data.width!==p.data.width||E.data.height!==p.data.height))throw new Error(`size mismatch between old image (${E.data.width}x${E.data.height}) and new image (${p.data.width}x${p.data.height}).`);p.version=E.version+1,this.images[l]=p,this.updatedImages[l]=!0}removeImage(l){const p=this.images[l];delete this.images[l],delete this.patterns[l],p.userImage&&p.userImage.onRemove&&p.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(l){return new Promise(((p,C)=>{let E=!0;if(!this.isLoaded())for(const T of l)this.images[T]||(E=!1);this.isLoaded()||E?p(this._getImagesForIds(l)):this.requestors.push({ids:l,promiseResolve:p})}))}_getImagesForIds(l){const p={};for(const C of l){let E=this.getImage(C);E||(this.fire(new a.l("styleimagemissing",{id:C})),E=this.getImage(C)),E?p[C]={data:E.data.clone(),pixelRatio:E.pixelRatio,sdf:E.sdf,version:E.version,stretchX:E.stretchX,stretchY:E.stretchY,content:E.content,textFitWidth:E.textFitWidth,textFitHeight:E.textFitHeight,hasRenderCallback:!!(E.userImage&&E.userImage.render)}:a.w(`Image "${C}" 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 p}getPixelSize(){const{width:l,height:p}=this.atlasImage;return{width:l,height:p}}getPattern(l){const p=this.patterns[l],C=this.getImage(l);if(!C)return null;if(p&&p.position.version===C.version)return p.position;if(p)p.position.version=C.version;else{const E={w:C.data.width+2,h:C.data.height+2,x:0,y:0},T=new a.I(E,C);this.patterns[l]={bin:E,position:T}}return this._updatePatternAtlas(),this.patterns[l].position}bind(l){const p=l.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new a.T(l,this.atlasImage,p.RGBA),this.atlasTexture.bind(p.LINEAR,p.CLAMP_TO_EDGE)}_updatePatternAtlas(){const l=[];for(const T in this.patterns)l.push(this.patterns[T].bin);const{w:p,h:C}=a.p(l),E=this.atlasImage;E.resize({width:p||1,height:C||1});for(const T in this.patterns){const{bin:U}=this.patterns[T],q=U.x+1,Z=U.y+1,ae=this.getImage(T).data,Ae=ae.width,ye=ae.height;a.R.copy(ae,E,{x:0,y:0},{x:q,y:Z},{width:Ae,height:ye}),a.R.copy(ae,E,{x:0,y:ye-1},{x:q,y:Z-1},{width:Ae,height:1}),a.R.copy(ae,E,{x:0,y:0},{x:q,y:Z+ye},{width:Ae,height:1}),a.R.copy(ae,E,{x:Ae-1,y:0},{x:q-1,y:Z},{width:1,height:ye}),a.R.copy(ae,E,{x:0,y:0},{x:q+Ae,y:Z},{width:1,height:ye})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(l){for(const p of l){if(this.callbackDispatchedThisFrame[p])continue;this.callbackDispatchedThisFrame[p]=!0;const C=this.getImage(p);C||a.w(`Image with ID: "${p}" was not found`),se(C)&&this.updateImage(p,C)}}}const me=1e20;function fe(B,l,p,C,E,T,U,q,Z){for(let ae=l;ae<l+C;ae++)_e(B,p*T+ae,T,E,U,q,Z);for(let ae=p;ae<p+E;ae++)_e(B,ae*T+l,1,C,U,q,Z)}function _e(B,l,p,C,E,T,U){T[0]=0,U[0]=-me,U[1]=me,E[0]=B[l];for(let q=1,Z=0,ae=0;q<C;q++){E[q]=B[l+q*p];const Ae=q*q;do{const ye=T[Z];ae=(E[q]-E[ye]+Ae-ye*ye)/(q-ye)/2}while(ae<=U[Z]&&--Z>-1);Z++,T[Z]=q,U[Z]=ae,U[Z+1]=me}for(let q=0,Z=0;q<C;q++){for(;U[Z+1]<q;)Z++;const ae=T[Z],Ae=q-ae;B[l+q*p]=E[ae]+Ae*Ae}}class we{constructor(l,p,C){this.requestManager=l,this.localIdeographFontFamily=p,this.entries={},this.lang=C}setURL(l){this.url=l}getGlyphs(l){return a._(this,void 0,void 0,(function*(){const p=[];for(const T in l)for(const U of l[T])p.push(this._getAndCacheGlyphsPromise(T,U));const C=yield Promise.all(p),E={};for(const{stack:T,id:U,glyph:q}of C)E[T]||(E[T]={}),E[T][U]=q&&{id:q.id,bitmap:q.bitmap.clone(),metrics:q.metrics};return E}))}_getAndCacheGlyphsPromise(l,p){return a._(this,void 0,void 0,(function*(){let C=this.entries[l];C||(C=this.entries[l]={glyphs:{},requests:{},ranges:{}});let E=C.glyphs[p];if(E!==void 0)return{stack:l,id:p,glyph:E};if(E=this._tinySDF(C,l,p),E)return C.glyphs[p]=E,{stack:l,id:p,glyph:E};const T=Math.floor(p/256);if(256*T>65535)throw new Error("glyphs > 65535 not supported");if(C.ranges[T])return{stack:l,id:p,glyph:E};if(!this.url)throw new Error("glyphsUrl is not set");if(!C.requests[T]){const q=we.loadGlyphRange(l,T,this.url,this.requestManager);C.requests[T]=q}const U=yield C.requests[T];for(const q in U)this._doesCharSupportLocalGlyph(+q)||(C.glyphs[+q]=U[+q]);return C.ranges[T]=!0,{stack:l,id:p,glyph:U[p]||null}}))}_doesCharSupportLocalGlyph(l){return!!this.localIdeographFontFamily&&(new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(l))||a.u["CJK Unified Ideographs"](l)||a.u["Hangul Syllables"](l)||a.u.Hiragana(l)||a.u.Katakana(l)||a.u["CJK Symbols and Punctuation"](l)||a.u["Halfwidth and Fullwidth Forms"](l))}_tinySDF(l,p,C){const E=this.localIdeographFontFamily;if(!E||!this._doesCharSupportLocalGlyph(C))return;let T=l.tinySDF;if(!T){let q="400";/bold/i.test(p)?q="900":/medium/i.test(p)?q="500":/light/i.test(p)&&(q="200"),T=l.tinySDF=new we.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,lang:this.lang,fontFamily:E,fontWeight:q})}const U=T.draw(String.fromCharCode(C));return{id:C,bitmap:new a.q({width:U.width||60,height:U.height||60},U.data),metrics:{width:U.glyphWidth/2||24,height:U.glyphHeight/2||24,left:U.glyphLeft/2+.5||0,top:U.glyphTop/2-27.5||-8,advance:U.glyphAdvance/2||24,isDoubleResolution:!0}}}}we.loadGlyphRange=function(B,l,p,C){return a._(this,void 0,void 0,(function*(){const E=256*l,T=E+255,U=C.transformRequest(p.replace("{fontstack}",B).replace("{range}",`${E}-${T}`),"Glyphs"),q=yield a.n(U,new AbortController);if(!q||!q.data)throw new Error(`Could not load glyph range. range: ${l}, ${E}-${T}`);const Z={};for(const ae of a.o(q.data))Z[ae.id]=ae;return Z}))},we.TinySDF=class{constructor({fontSize:B=24,buffer:l=3,radius:p=8,cutoff:C=.25,fontFamily:E="sans-serif",fontWeight:T="normal",fontStyle:U="normal",lang:q=null}={}){this.buffer=l,this.cutoff=C,this.radius=p,this.lang=q;const Z=this.size=B+4*l,ae=this._createCanvas(Z),Ae=this.ctx=ae.getContext("2d",{willReadFrequently:!0});Ae.font=`${U} ${T} ${B}px ${E}`,Ae.textBaseline="alphabetic",Ae.textAlign="left",Ae.fillStyle="black",this.gridOuter=new Float64Array(Z*Z),this.gridInner=new Float64Array(Z*Z),this.f=new Float64Array(Z),this.z=new Float64Array(Z+1),this.v=new Uint16Array(Z)}_createCanvas(B){const l=document.createElement("canvas");return l.width=l.height=B,l}draw(B){const{width:l,actualBoundingBoxAscent:p,actualBoundingBoxDescent:C,actualBoundingBoxLeft:E,actualBoundingBoxRight:T}=this.ctx.measureText(B),U=Math.ceil(p),q=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(T-E))),Z=Math.min(this.size-this.buffer,U+Math.ceil(C)),ae=q+2*this.buffer,Ae=Z+2*this.buffer,ye=Math.max(ae*Ae,0),pe=new Uint8ClampedArray(ye),Be={data:pe,width:ae,height:Ae,glyphWidth:q,glyphHeight:Z,glyphTop:U,glyphLeft:0,glyphAdvance:l};if(q===0||Z===0)return Be;const{ctx:Fe,buffer:Xe,gridInner:Ze,gridOuter:et}=this;this.lang&&(Fe.lang=this.lang),Fe.clearRect(Xe,Xe,q,Z),Fe.fillText(B,Xe,Xe+U);const st=Fe.getImageData(Xe,Xe,q,Z);et.fill(me,0,ye),Ze.fill(0,0,ye);for(let nt=0;nt<Z;nt++)for(let ct=0;ct<q;ct++){const yt=st.data[4*(nt*q+ct)+3]/255;if(yt===0)continue;const xt=(nt+Xe)*ae+ct+Xe;if(yt===1)et[xt]=0,Ze[xt]=me;else{const At=.5-yt;et[xt]=At>0?At*At:0,Ze[xt]=At<0?At*At:0}}fe(et,0,0,ae,Ae,ae,this.f,this.v,this.z),fe(Ze,Xe,Xe,q,Z,ae,this.f,this.v,this.z);for(let nt=0;nt<ye;nt++){const ct=Math.sqrt(et[nt])-Math.sqrt(Ze[nt]);pe[nt]=Math.round(255-255*(ct/this.radius+this.cutoff))}return Be}};class ke{constructor(){this.specification=a.v.light.position}possiblyEvaluate(l,p){return a.B(l.expression.evaluate(p))}interpolate(l,p,C){return{x:a.C.number(l.x,p.x,C),y:a.C.number(l.y,p.y,C),z:a.C.number(l.z,p.z,C)}}}let je;class Ie extends a.E{constructor(l){super(),je=je||new a.r({anchor:new a.D(a.v.light.anchor),position:new ke,color:new a.D(a.v.light.color),intensity:new a.D(a.v.light.intensity)}),this._transitionable=new a.t(je,void 0),this.setLight(l),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(l,p={}){if(!this._validate(a.x,l,p))for(const C in l){const E=l[C];C.endsWith("-transition")?this._transitionable.setTransition(C.slice(0,-11),E):this._transitionable.setValue(C,E)}}updateTransitions(l){this._transitioning=this._transitionable.transitioned(l,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(l){this.properties=this._transitioning.possiblyEvaluate(l)}_validate(l,p,C){return(!C||C.validate!==!1)&&a.y(this,l.call(a.z,{value:p,style:{glyphs:!0,sprite:!0},styleSpec:a.v}))}}const Qe=new a.r({"sky-color":new a.D(a.v.sky["sky-color"]),"horizon-color":new a.D(a.v.sky["horizon-color"]),"fog-color":new a.D(a.v.sky["fog-color"]),"fog-ground-blend":new a.D(a.v.sky["fog-ground-blend"]),"horizon-fog-blend":new a.D(a.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new a.D(a.v.sky["sky-horizon-blend"]),"atmosphere-blend":new a.D(a.v.sky["atmosphere-blend"])});class tt extends a.E{constructor(l){super(),this._transitionable=new a.t(Qe,void 0),this.setSky(l),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.F(0))}setSky(l,p={}){if(!this._validate(a.G,l,p)){l||(l={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const C in l){const E=l[C];C.endsWith("-transition")?this._transitionable.setTransition(C.slice(0,-11),E):this._transitionable.setValue(C,E)}}}getSky(){return this._transitionable.serialize()}updateTransitions(l){this._transitioning=this._transitionable.transitioned(l,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(l){this.properties=this._transitioning.possiblyEvaluate(l)}_validate(l,p,C={}){return C?.validate!==!1&&a.y(this,l.call(a.z,a.e({value:p,style:{glyphs:!0,sprite:!0},styleSpec:a.v})))}calculateFogBlendOpacity(l){return l<60?0:l<70?(l-60)/10:1}}class ht{constructor(l,p){this.width=l,this.height=p,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(l,p){const C=l.join(",")+String(p);return this.dashEntry[C]||(this.dashEntry[C]=this.addDash(l,p)),this.dashEntry[C]}getDashRanges(l,p,C){const E=[];let T=l.length%2==1?-l[l.length-1]*C:0,U=l[0]*C,q=!0;E.push({left:T,right:U,isDash:q,zeroLength:l[0]===0});let Z=l[0];for(let ae=1;ae<l.length;ae++){q=!q;const Ae=l[ae];T=Z*C,Z+=Ae,U=Z*C,E.push({left:T,right:U,isDash:q,zeroLength:Ae===0})}return E}addRoundDash(l,p,C){const E=p/2;for(let T=-C;T<=C;T++){const U=this.width*(this.nextRow+C+T);let q=0,Z=l[q];for(let ae=0;ae<this.width;ae++){ae/Z.right>1&&(Z=l[++q]);const Ae=Math.abs(ae-Z.left),ye=Math.abs(ae-Z.right),pe=Math.min(Ae,ye);let Be;const Fe=T/C*(E+1);if(Z.isDash){const Xe=E-Math.abs(Fe);Be=Math.sqrt(pe*pe+Xe*Xe)}else Be=E-Math.sqrt(pe*pe+Fe*Fe);this.data[U+ae]=Math.max(0,Math.min(255,Be+128))}}}addRegularDash(l){for(let q=l.length-1;q>=0;--q){const Z=l[q],ae=l[q+1];Z.zeroLength?l.splice(q,1):ae&&ae.isDash===Z.isDash&&(ae.left=Z.left,l.splice(q,1))}const p=l[0],C=l[l.length-1];p.isDash===C.isDash&&(p.left=C.left-this.width,C.right=p.right+this.width);const E=this.width*this.nextRow;let T=0,U=l[T];for(let q=0;q<this.width;q++){q/U.right>1&&(U=l[++T]);const Z=Math.abs(q-U.left),ae=Math.abs(q-U.right),Ae=Math.min(Z,ae);this.data[E+q]=Math.max(0,Math.min(255,(U.isDash?Ae:-Ae)+128))}}addDash(l,p){const C=p?7:0,E=2*C+1;if(this.nextRow+E>this.height)return a.w("LineAtlas out of space"),null;let T=0;for(let q=0;q<l.length;q++)T+=l[q];if(T!==0){const q=this.width/T,Z=this.getDashRanges(l,this.width,q);p?this.addRoundDash(Z,q,C):this.addRegularDash(Z)}const U={y:(this.nextRow+C+.5)/this.height,height:2*C/this.height,width:T};return this.nextRow+=E,this.dirty=!0,U}bind(l){const p=l.gl;this.texture?(p.bindTexture(p.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,p.texSubImage2D(p.TEXTURE_2D,0,0,0,this.width,this.height,p.ALPHA,p.UNSIGNED_BYTE,this.data))):(this.texture=p.createTexture(),p.bindTexture(p.TEXTURE_2D,this.texture),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.REPEAT),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.REPEAT),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.LINEAR),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.LINEAR),p.texImage2D(p.TEXTURE_2D,0,p.ALPHA,this.width,this.height,0,p.ALPHA,p.UNSIGNED_BYTE,this.data))}}const ce="maplibre_preloaded_worker_pool";class Le{constructor(){this.active={}}acquire(l){if(!this.workers)for(this.workers=[];this.workers.length<Le.workerCount;)this.workers.push(new Worker(a.a.WORKER_URL));return this.active[l]=!0,this.workers.slice()}release(l){delete this.active[l],this.numActive()===0&&(this.workers.forEach((p=>{p.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[ce]}numActive(){return Object.keys(this.active).length}}const We=Math.floor(x.hardwareConcurrency/2);let Me,dt;function it(){return Me||(Me=new Le),Me}Le.workerCount=a.H(globalThis)?Math.max(Math.min(We,3),1):1;class vt{constructor(l,p){this.workerPool=l,this.actors=[],this.currentActor=0,this.id=p;const C=this.workerPool.acquire(p);for(let E=0;E<C.length;E++){const T=new a.J(C[E],p);T.name=`Worker ${E}`,this.actors.push(T)}if(!this.actors.length)throw new Error("No actors found")}broadcast(l,p){const C=[];for(const E of this.actors)C.push(E.sendAsync({type:l,data:p}));return Promise.all(C)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(l=!0){this.actors.forEach((p=>{p.remove()})),this.actors=[],l&&this.workerPool.release(this.id)}registerMessageHandler(l,p){for(const C of this.actors)C.registerMessageHandler(l,p)}}function Ut(){return dt||(dt=new vt(it(),a.K),dt.registerMessageHandler("GR",((B,l,p)=>a.m(l,p)))),dt}function Pe(B,l){const p=a.L();return a.M(p,p,[1,1,0]),a.N(p,p,[.5*B.width,.5*B.height,1]),B.calculatePosMatrix?a.O(p,p,B.calculatePosMatrix(l.toUnwrapped())):p}function Te(B,l,p,C,E,T,U){var q;const Z=(function(pe,Be,Fe){if(pe)for(const Xe of pe){const Ze=Be[Xe];if(Ze&&Ze.source===Fe&&Ze.type==="fill-extrusion")return!0}else for(const Xe in Be){const Ze=Be[Xe];if(Ze.source===Fe&&Ze.type==="fill-extrusion")return!0}return!1})((q=E?.layers)!==null&&q!==void 0?q:null,l,B.id),ae=T.maxPitchScaleFactor(),Ae=B.tilesIn(C,ae,Z);Ae.sort(Se);const ye=[];for(const pe of Ae)ye.push({wrappedTileID:pe.tileID.wrapped().key,queryResults:pe.tile.queryRenderedFeatures(l,p,B._state,pe.queryGeometry,pe.cameraQueryGeometry,pe.scale,E,T,ae,Pe(B.transform,pe.tileID),U?(Be,Fe)=>U(pe.tileID,Be,Fe):void 0)});return(function(pe,Be){for(const Fe in pe)for(const Xe of pe[Fe])Ne(Xe,Be);return pe})((function(pe){const Be={},Fe={};for(const Xe of pe){const Ze=Xe.queryResults,et=Xe.wrappedTileID,st=Fe[et]=Fe[et]||{};for(const nt in Ze){const ct=Ze[nt],yt=st[nt]=st[nt]||{},xt=Be[nt]=Be[nt]||[];for(const At of ct)yt[At.featureIndex]||(yt[At.featureIndex]=!0,xt.push(At))}}return Be})(ye),B)}function Se(B,l){const p=B.tileID,C=l.tileID;return p.overscaledZ-C.overscaledZ||p.canonical.y-C.canonical.y||p.wrap-C.wrap||p.canonical.x-C.canonical.x}function Ne(B,l){const p=B.feature,C=l.getFeatureState(p.layer["source-layer"],p.id);p.source=p.layer.source,p.layer["source-layer"]&&(p.sourceLayer=p.layer["source-layer"]),p.state=C}function ut(B,l,p){return a._(this,void 0,void 0,(function*(){let C=B;if(B.url?C=(yield a.j(l.transformRequest(B.url,"Source"),p)).data:yield x.frameAsync(p),!C)return null;const E=a.Q(a.e(C,B),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in C&&C.vector_layers&&(E.vectorLayerIds=C.vector_layers.map((T=>T.id))),E}))}class rt{constructor(l,p){l&&(p?this.setSouthWest(l).setNorthEast(p):Array.isArray(l)&&(l.length===4?this.setSouthWest([l[0],l[1]]).setNorthEast([l[2],l[3]]):this.setSouthWest(l[0]).setNorthEast(l[1])))}setNorthEast(l){return this._ne=l instanceof a.S?new a.S(l.lng,l.lat):a.S.convert(l),this}setSouthWest(l){return this._sw=l instanceof a.S?new a.S(l.lng,l.lat):a.S.convert(l),this}extend(l){const p=this._sw,C=this._ne;let E,T;if(l instanceof a.S)E=l,T=l;else{if(!(l instanceof rt))return Array.isArray(l)?l.length===4||l.every(Array.isArray)?this.extend(rt.convert(l)):this.extend(a.S.convert(l)):l&&("lng"in l||"lon"in l)&&"lat"in l?this.extend(a.S.convert(l)):this;if(E=l._sw,T=l._ne,!E||!T)return this}return p||C?(p.lng=Math.min(E.lng,p.lng),p.lat=Math.min(E.lat,p.lat),C.lng=Math.max(T.lng,C.lng),C.lat=Math.max(T.lat,C.lat)):(this._sw=new a.S(E.lng,E.lat),this._ne=new a.S(T.lng,T.lat)),this}getCenter(){return new a.S((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 a.S(this.getWest(),this.getNorth())}getSouthEast(){return new a.S(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(l){const{lng:p,lat:C}=a.S.convert(l);let E=this._sw.lng<=p&&p<=this._ne.lng;return this._sw.lng>this._ne.lng&&(E=this._sw.lng>=p&&p>=this._ne.lng),this._sw.lat<=C&&C<=this._ne.lat&&E}static convert(l){return l instanceof rt?l:l&&new rt(l)}static fromLngLat(l,p=0){const C=360*p/40075017,E=C/Math.cos(Math.PI/180*l.lat);return new rt(new a.S(l.lng-E,l.lat-C),new a.S(l.lng+E,l.lat+C))}adjustAntiMeridian(){const l=new a.S(this._sw.lng,this._sw.lat),p=new a.S(this._ne.lng,this._ne.lat);return new rt(l,l.lng>p.lng?new a.S(p.lng+360,p.lat):p)}}class mt{constructor(l,p,C){this.bounds=rt.convert(this.validateBounds(l)),this.minzoom=p||0,this.maxzoom=C||24}validateBounds(l){return Array.isArray(l)&&l.length===4?[Math.max(-180,l[0]),Math.max(-90,l[1]),Math.min(180,l[2]),Math.min(90,l[3])]:[-180,-90,180,90]}contains(l){const p=Math.pow(2,l.z),C=Math.floor(a.V(this.bounds.getWest())*p),E=Math.floor(a.U(this.bounds.getNorth())*p),T=Math.ceil(a.V(this.bounds.getEast())*p),U=Math.ceil(a.U(this.bounds.getSouth())*p);return l.x>=C&&l.x<T&&l.y>=E&&l.y<U}}class Rt extends a.E{constructor(l,p,C,E){if(super(),this.id=l,this.dispatcher=C,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,a.e(this,a.Q(p,["url","scheme","tileSize","promoteId"])),this._options=a.e({type:"vector"},p),this._collectResourceTiming=p.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(E)}load(){return a._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new a.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const l=yield ut(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),l&&(a.e(this,l),l.bounds&&(this.tileBounds=new mt(l.bounds,this.minzoom,this.maxzoom)),this.fire(new a.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.l("data",{dataType:"source",sourceDataType:"content"})))}catch(l){this._tileJSONRequest=null,this._loaded=!0,this.fire(new a.k(l))}}))}loaded(){return this._loaded}hasTile(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}onAdd(l){this.map=l,this.load()}setSourceProperty(l){this._tileJSONRequest&&this._tileJSONRequest.abort(),l(),this.load()}setTiles(l){return this.setSourceProperty((()=>{this._options.tiles=l})),this}setUrl(l){return this.setSourceProperty((()=>{this.url=l,this._options.url=l})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return a.e({},this._options)}loadTile(l){return a._(this,void 0,void 0,(function*(){const p=l.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),C={request:this.map._requestManager.transformRequest(p,"Tile"),uid:l.uid,tileID:l.tileID,zoom:l.tileID.overscaledZ,tileSize:this.tileSize*l.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};C.request.collectResourceTiming=this._collectResourceTiming;let E="RT";if(l.actor&&l.state!=="expired"){if(l.state==="loading")return new Promise(((T,U)=>{l.reloadPromise={resolve:T,reject:U}}))}else l.actor=this.dispatcher.getActor(),E="LT";l.abortController=new AbortController;try{const T=yield l.actor.sendAsync({type:E,data:C},l.abortController);if(delete l.abortController,l.aborted)return;this._afterTileLoadWorkerResponse(l,T)}catch(T){if(delete l.abortController,l.aborted)return;if(T&&T.status!==404)throw T;this._afterTileLoadWorkerResponse(l,null)}}))}_afterTileLoadWorkerResponse(l,p){if(p&&p.resourceTiming&&(l.resourceTiming=p.resourceTiming),p&&this.map._refreshExpiredTiles&&l.setExpiryData(p),l.loadVectorData(p,this.map.painter),l.reloadPromise){const C=l.reloadPromise;l.reloadPromise=null,this.loadTile(l).then(C.resolve).catch(C.reject)}}abortTile(l){return a._(this,void 0,void 0,(function*(){l.abortController&&(l.abortController.abort(),delete l.abortController),l.actor&&(yield l.actor.sendAsync({type:"AT",data:{uid:l.uid,type:this.type,source:this.id}}))}))}unloadTile(l){return a._(this,void 0,void 0,(function*(){l.unloadVectorData(),l.actor&&(yield l.actor.sendAsync({type:"RMT",data:{uid:l.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class Bt extends a.E{constructor(l,p,C,E){super(),this.id=l,this.dispatcher=C,this.setEventedParent(E),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.e({type:"raster"},p),a.e(this,a.Q(p,["url","scheme","tileSize"]))}load(){return a._(this,arguments,void 0,(function*(l=!1){this._loaded=!1,this.fire(new a.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const p=yield ut(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,p&&(a.e(this,p),p.bounds&&(this.tileBounds=new mt(p.bounds,this.minzoom,this.maxzoom)),this.fire(new a.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:l})))}catch(p){this._tileJSONRequest=null,this._loaded=!0,this.fire(new a.k(p))}}))}loaded(){return this._loaded}onAdd(l){this.map=l,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(l){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),l(),this.load(!0)}setTiles(l){return this.setSourceProperty((()=>{this._options.tiles=l})),this}setUrl(l){return this.setSourceProperty((()=>{this.url=l,this._options.url=l})),this}serialize(){return a.e({},this._options)}hasTile(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}loadTile(l){return a._(this,void 0,void 0,(function*(){const p=l.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);l.abortController=new AbortController;try{const C=yield H.getImage(this.map._requestManager.transformRequest(p,"Tile"),l.abortController,this.map._refreshExpiredTiles);if(delete l.abortController,l.aborted)return void(l.state="unloaded");if(C&&C.data){this.map._refreshExpiredTiles&&(C.cacheControl||C.expires)&&l.setExpiryData({cacheControl:C.cacheControl,expires:C.expires});const E=this.map.painter.context,T=E.gl,U=C.data;l.texture=this.map.painter.getTileTexture(U.width),l.texture?l.texture.update(U,{useMipmap:!0}):(l.texture=new a.T(E,U,T.RGBA,{useMipmap:!0}),l.texture.bind(T.LINEAR,T.CLAMP_TO_EDGE,T.LINEAR_MIPMAP_NEAREST)),l.state="loaded"}}catch(C){if(delete l.abortController,l.aborted)l.state="unloaded";else if(C)throw l.state="errored",C}}))}abortTile(l){return a._(this,void 0,void 0,(function*(){l.abortController&&(l.abortController.abort(),delete l.abortController)}))}unloadTile(l){return a._(this,void 0,void 0,(function*(){l.texture&&this.map.painter.saveTileTexture(l.texture)}))}hasTransition(){return!1}}class $t extends Bt{constructor(l,p,C,E){super(l,p,C,E),this.type="raster-dem",this.maxzoom=22,this._options=a.e({type:"raster-dem"},p),this.encoding=p.encoding||"mapbox",this.redFactor=p.redFactor,this.greenFactor=p.greenFactor,this.blueFactor=p.blueFactor,this.baseShift=p.baseShift}loadTile(l){return a._(this,void 0,void 0,(function*(){const p=l.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),C=this.map._requestManager.transformRequest(p,"Tile");l.neighboringTiles=this._getNeighboringTiles(l.tileID),l.abortController=new AbortController;try{const E=yield H.getImage(C,l.abortController,this.map._refreshExpiredTiles);if(delete l.abortController,l.aborted)return void(l.state="unloaded");if(E&&E.data){const T=E.data;this.map._refreshExpiredTiles&&(E.cacheControl||E.expires)&&l.setExpiryData({cacheControl:E.cacheControl,expires:E.expires});const U=a.b(T)&&a.W()?T:yield this.readImageNow(T),q={type:this.type,uid:l.uid,source:this.id,rawImageData:U,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!l.actor||l.state==="expired"){l.actor=this.dispatcher.getActor();const Z=yield l.actor.sendAsync({type:"LDT",data:q});l.dem=Z,l.needsHillshadePrepare=!0,l.needsTerrainPrepare=!0,l.state="loaded"}}}catch(E){if(delete l.abortController,l.aborted)l.state="unloaded";else if(E)throw l.state="errored",E}}))}readImageNow(l){return a._(this,void 0,void 0,(function*(){if(typeof VideoFrame<"u"&&a.X()){const p=l.width+2,C=l.height+2;try{return new a.R({width:p,height:C},yield a.Y(l,-1,-1,p,C))}catch{}}return x.getImageData(l,1)}))}_getNeighboringTiles(l){const p=l.canonical,C=Math.pow(2,p.z),E=(p.x-1+C)%C,T=p.x===0?l.wrap-1:l.wrap,U=(p.x+1+C)%C,q=p.x+1===C?l.wrap+1:l.wrap,Z={};return Z[new a.Z(l.overscaledZ,T,p.z,E,p.y).key]={backfilled:!1},Z[new a.Z(l.overscaledZ,q,p.z,U,p.y).key]={backfilled:!1},p.y>0&&(Z[new a.Z(l.overscaledZ,T,p.z,E,p.y-1).key]={backfilled:!1},Z[new a.Z(l.overscaledZ,l.wrap,p.z,p.x,p.y-1).key]={backfilled:!1},Z[new a.Z(l.overscaledZ,q,p.z,U,p.y-1).key]={backfilled:!1}),p.y+1<C&&(Z[new a.Z(l.overscaledZ,T,p.z,E,p.y+1).key]={backfilled:!1},Z[new a.Z(l.overscaledZ,l.wrap,p.z,p.x,p.y+1).key]={backfilled:!1},Z[new a.Z(l.overscaledZ,q,p.z,U,p.y+1).key]={backfilled:!1}),Z}unloadTile(l){return a._(this,void 0,void 0,(function*(){l.demTexture&&this.map.painter.saveTileTexture(l.demTexture),l.fbo&&(l.fbo.destroy(),delete l.fbo),l.dem&&delete l.dem,delete l.neighboringTiles,l.state="unloaded",l.actor&&(yield l.actor.sendAsync({type:"RDT",data:{type:this.type,uid:l.uid,source:this.id}}))}))}}class Rn extends a.E{constructor(l,p,C,E){super(),this.id=l,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:p.data},this.actor=C.getActor(),this.setEventedParent(E),this._data=p.data,this._options=a.e({},p),this._collectResourceTiming=p.collectResourceTiming,p.maxzoom!==void 0&&(this.maxzoom=p.maxzoom),p.type&&(this.type=p.type),p.attribution&&(this.attribution=p.attribution),this.promoteId=p.promoteId,p.clusterMaxZoom!==void 0&&this.maxzoom<=p.clusterMaxZoom&&a.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${p.clusterMaxZoom}".`),this.workerOptions=a.e({source:this.id,cluster:p.cluster||!1,geojsonVtOptions:{buffer:this._pixelsToTileUnits(p.buffer!==void 0?p.buffer:128),tolerance:this._pixelsToTileUnits(p.tolerance!==void 0?p.tolerance:.375),extent:a.$,maxZoom:this.maxzoom,lineMetrics:p.lineMetrics||!1,generateId:p.generateId||!1},superclusterOptions:{maxZoom:this._getClusterMaxZoom(p.clusterMaxZoom),minPoints:Math.max(2,p.clusterMinPoints||2),extent:a.$,radius:this._pixelsToTileUnits(p.clusterRadius||50),log:!1,generateId:p.generateId||!1},clusterProperties:p.clusterProperties,filter:p.filter},p.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}_pixelsToTileUnits(l){return l*(a.$/this.tileSize)}_getClusterMaxZoom(l){const p=l?Math.round(l):this.maxzoom-1;return Number.isInteger(l)||l===void 0||a.w(`Integer expected for option 'clusterMaxZoom': provided value "${l}" rounded to "${p}"`),p}load(){return a._(this,void 0,void 0,(function*(){yield this._updateWorkerData()}))}onAdd(l){this.map=l,this.load()}setData(l){return this._data=l,this._pendingWorkerUpdate={data:l},this._updateWorkerData(),this}updateData(l){return this._pendingWorkerUpdate.diff=a.a0(this._pendingWorkerUpdate.diff,l),this._updateWorkerData(),this}getData(){return a._(this,void 0,void 0,(function*(){const l=a.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:l})}))}getCoordinatesFromGeometry(l){return l.type==="GeometryCollection"?l.geometries.map((p=>p.coordinates)).flat(1/0):l.coordinates.flat(1/0)}getBounds(){return a._(this,void 0,void 0,(function*(){const l=new rt,p=yield this.getData();let C;switch(p.type){case"FeatureCollection":C=p.features.map((E=>this.getCoordinatesFromGeometry(E.geometry))).flat(1/0);break;case"Feature":C=this.getCoordinatesFromGeometry(p.geometry);break;default:C=this.getCoordinatesFromGeometry(p)}if(C.length==0)return l;for(let E=0;E<C.length-1;E+=2)l.extend([C[E],C[E+1]]);return l}))}setClusterOptions(l){return this.workerOptions.cluster=l.cluster,l&&(l.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=this._pixelsToTileUnits(l.clusterRadius)),l.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=this._getClusterMaxZoom(l.clusterMaxZoom))),this._updateWorkerData(),this}getClusterExpansionZoom(l){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:l,source:this.id}})}getClusterChildren(l){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:l,source:this.id}})}getClusterLeaves(l,p,C){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:l,limit:p,offset:C}})}_updateWorkerData(){return a._(this,void 0,void 0,(function*(){if(this._isUpdatingWorker)return;const{data:l,diff:p}=this._pendingWorkerUpdate;if(!l&&!p)return void a.w(`No data or diff provided to GeoJSONSource ${this.id}.`);const C=a.e({type:this.type},this.workerOptions);l?(typeof l=="string"?(C.request=this.map._requestManager.transformRequest(x.resolveURL(l),"Source"),C.request.collectResourceTiming=this._collectResourceTiming):C.data=JSON.stringify(l),this._pendingWorkerUpdate.data=void 0):p&&(C.dataDiff=p,this._pendingWorkerUpdate.diff=void 0),this._isUpdatingWorker=!0,this.fire(new a.l("dataloading",{dataType:"source"}));try{const E=yield this.actor.sendAsync({type:"LD",data:C});if(this._isUpdatingWorker=!1,this._removed||E.abandoned)return void this.fire(new a.l("dataabort",{dataType:"source"}));this._data=E.data;let T=null;E.resourceTiming&&E.resourceTiming[this.id]&&(T=E.resourceTiming[this.id].slice(0));const U={dataType:"source"};this._collectResourceTiming&&T&&T.length>0&&a.e(U,{resourceTiming:T}),this.fire(new a.l("data",Object.assign(Object.assign({},U),{sourceDataType:"metadata"}))),this.fire(new a.l("data",Object.assign(Object.assign({},U),{sourceDataType:"content"})))}catch(E){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new a.l("dataabort",{dataType:"source"}));this.fire(new a.k(E))}finally{(this._pendingWorkerUpdate.data||this._pendingWorkerUpdate.diff)&&this._updateWorkerData()}}))}loaded(){return!this._isUpdatingWorker&&this._pendingWorkerUpdate.data===void 0&&this._pendingWorkerUpdate.diff===void 0}loadTile(l){return a._(this,void 0,void 0,(function*(){const p=l.actor?"RT":"LT";l.actor=this.actor;const C={type:this.type,uid:l.uid,tileID:l.tileID,zoom:l.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};l.abortController=new AbortController;const E=yield this.actor.sendAsync({type:p,data:C},l.abortController);delete l.abortController,l.unloadVectorData(),l.aborted||l.loadVectorData(E,this.map.painter,p==="RT")}))}abortTile(l){return a._(this,void 0,void 0,(function*(){l.abortController&&(l.abortController.abort(),delete l.abortController),l.aborted=!0}))}unloadTile(l){return a._(this,void 0,void 0,(function*(){l.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:l.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 a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class zn extends a.E{constructor(l,p,C,E){super(),this.flippedWindingOrder=!1,this.id=l,this.dispatcher=C,this.coordinates=p.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(E),this.options=p}load(l){return a._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new a.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const p=yield H.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,p&&p.data&&(this.image=p.data,l&&(this.coordinates=l),this._finishLoading())}catch(p){this._request=null,this._loaded=!0,this.fire(new a.k(p))}}))}loaded(){return this._loaded}updateImage(l){return l.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=l.url,this.load(l.coordinates).finally((()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.l("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(l){this.map=l,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(l){this.coordinates=l;const p=l.map(a.a1.fromLngLat);var C;return this.tileID=(function(E){const T=a.a2.fromPoints(E),U=T.width(),q=T.height(),Z=Math.max(U,q),ae=Math.max(0,Math.floor(-Math.log(Z)/Math.LN2)),Ae=Math.pow(2,ae);return new a.a4(ae,Math.floor((T.minX+T.maxX)/2*Ae),Math.floor((T.minY+T.maxY)/2*Ae))})(p),this.terrainTileRanges=this._getOverlappingTileRanges(p),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=p.map((E=>this.tileID.getTilePoint(E)._round())),this.flippedWindingOrder=((C=this.tileCoords)[1].x-C[0].x)*(C[2].y-C[0].y)-(C[1].y-C[0].y)*(C[2].x-C[0].x)<0,this.fire(new a.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const l=this.map.painter.context,p=l.gl;this.texture||(this.texture=new a.T(l,this.image,p.RGBA),this.texture.bind(p.LINEAR,p.CLAMP_TO_EDGE));let C=!1;for(const E in this.tiles){const T=this.tiles[E];T.state!=="loaded"&&(T.state="loaded",T.texture=this.texture,C=!0)}C&&this.fire(new a.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(l){return a._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(l.tileID.canonical)?(this.tiles[String(l.tileID.wrap)]=l,l.buckets={}):l.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(l){const{minX:p,minY:C,maxX:E,maxY:T}=a.a2.fromPoints(l),U={};for(let q=0;q<=a.a3;q++){const Z=Math.pow(2,q),ae=Math.floor(p*Z),Ae=Math.floor(C*Z),ye=Math.floor(E*Z),pe=Math.floor(T*Z);U[q]={minTileX:ae,minTileY:Ae,maxTileX:ye,maxTileY:pe}}return U}}class ai extends zn{constructor(l,p,C,E){super(l,p,C,E),this.roundZoom=!0,this.type="video",this.options=p}load(){return a._(this,void 0,void 0,(function*(){this._loaded=!1;const l=this.options;this.urls=[];for(const p of l.urls)this.urls.push(this.map._requestManager.transformRequest(p,"Source").url);try{const p=yield a.a5(this.urls);if(this._loaded=!0,!p)return;this.video=p,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading()}catch(p){this.fire(new a.k(p))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(l){if(this.video){const p=this.video.seekable;l<p.start(0)||l>p.end(0)?this.fire(new a.k(new a.a6(`sources.${this.id}`,null,`Playback for this video can be set only between the ${p.start(0)} and ${p.end(0)}-second mark.`))):this.video.currentTime=l}}getVideo(){return this.video}onAdd(l){this.map||(this.map=l,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 l=this.map.painter.context,p=l.gl;this.texture?this.video.paused||(this.texture.bind(p.LINEAR,p.CLAMP_TO_EDGE),p.texSubImage2D(p.TEXTURE_2D,0,0,0,p.RGBA,p.UNSIGNED_BYTE,this.video)):(this.texture=new a.T(l,this.video,p.RGBA),this.texture.bind(p.LINEAR,p.CLAMP_TO_EDGE));let C=!1;for(const E in this.tiles){const T=this.tiles[E];T.state!=="loaded"&&(T.state="loaded",T.texture=this.texture,C=!0)}C&&this.fire(new a.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 _n extends zn{constructor(l,p,C,E){super(l,p,C,E),p.coordinates?Array.isArray(p.coordinates)&&p.coordinates.length===4&&!p.coordinates.some((T=>!Array.isArray(T)||T.length!==2||T.some((U=>typeof U!="number"))))||this.fire(new a.k(new a.a6(`sources.${l}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.k(new a.a6(`sources.${l}`,null,'missing required property "coordinates"'))),p.animate&&typeof p.animate!="boolean"&&this.fire(new a.k(new a.a6(`sources.${l}`,null,'optional "animate" property must be a boolean value'))),p.canvas?typeof p.canvas=="string"||p.canvas instanceof HTMLCanvasElement||this.fire(new a.k(new a.a6(`sources.${l}`,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 a.k(new a.a6(`sources.${l}`,null,'missing required property "canvas"'))),this.options=p,this.animate=p.animate===void 0||p.animate}load(){return a._(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 a.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(l){this.map=l,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let l=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,l=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,l=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const p=this.map.painter.context,C=p.gl;this.texture?(l||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new a.T(p,this.canvas,C.RGBA,{premultiply:!0});let E=!1;for(const T in this.tiles){const U=this.tiles[T];U.state!=="loaded"&&(U.state="loaded",U.texture=this.texture,E=!0)}E&&this.fire(new a.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const l of[this.canvas.width,this.canvas.height])if(isNaN(l)||l<=0)return!0;return!1}}const Bn={},dn=B=>{switch(B){case"geojson":return Rn;case"image":return zn;case"raster":return Bt;case"raster-dem":return $t;case"vector":return Rt;case"video":return ai;case"canvas":return _n}return Bn[B]},li="RTLPluginLoaded";class In extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Ut()}_syncState(l){return this.status=l,this.dispatcher.broadcast("SRPS",{pluginStatus:l,pluginURL:this.url}).catch((p=>{throw this.status="error",p}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(l){return a._(this,arguments,void 0,(function*(p,C=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=x.resolveURL(p),!this.url)throw new Error(`requested url ${p} is invalid`);if(this.status==="unavailable"){if(!C)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()}))}_requestImport(){return a._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new a.l(li))}))}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let It=null;function xe(){return It||(It=new In),It}class oe{constructor(l,p){this.timeAdded=0,this.fadeEndTime=0,this.tileID=l,this.uid=a.a7(),this.uses=0,this.tileSize=p,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(l){const p=l+this.timeAdded;p<this.fadeEndTime||(this.fadeEndTime=p)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(l){this.demTexture&&l.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(l,p,C){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",l){l.featureIndex&&(this.latestFeatureIndex=l.featureIndex,l.rawTileData?(this.latestRawTileData=l.rawTileData,this.latestFeatureIndex.rawTileData=l.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=l.collisionBoxArray,this.buckets=(function(E,T){const U={};if(!T)return U;for(const q of E){const Z=q.layerIds.map((ae=>T.getLayer(ae))).filter(Boolean);if(Z.length!==0){q.layers=Z,q.stateDependentLayerIds&&(q.stateDependentLayers=q.stateDependentLayerIds.map((ae=>Z.filter((Ae=>Ae.id===ae))[0])));for(const ae of Z)U[ae.id]=q}}return U})(l.buckets,p?.style),this.hasSymbolBuckets=!1;for(const E in this.buckets){const T=this.buckets[E];if(T instanceof a.a9){if(this.hasSymbolBuckets=!0,!C)break;T.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const E in this.buckets){const T=this.buckets[E];if(T instanceof a.a9&&T.hasRTLText){this.hasRTLText=!0,xe().lazyLoad();break}}this.queryPadding=0;for(const E in this.buckets){const T=this.buckets[E];this.queryPadding=Math.max(this.queryPadding,p.style.getLayer(E).queryRadius(T))}l.imageAtlas&&(this.imageAtlas=l.imageAtlas),l.glyphAtlasImage&&(this.glyphAtlasImage=l.glyphAtlasImage)}else this.collisionBoxArray=new a.a8}unloadVectorData(){for(const l in this.buckets)this.buckets[l].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(l){return this.buckets[l.id]}upload(l){for(const C in this.buckets){const E=this.buckets[C];E.uploadPending()&&E.upload(l)}const p=l.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new a.T(l,this.imageAtlas.image,p.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new a.T(l,this.glyphAtlasImage,p.ALPHA),this.glyphAtlasImage=null)}prepare(l){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(l,this.imageAtlasTexture)}queryRenderedFeatures(l,p,C,E,T,U,q,Z,ae,Ae,ye){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:E,cameraQueryGeometry:T,scale:U,tileSize:this.tileSize,pixelPosMatrix:Ae,transform:Z,params:q,queryPadding:this.queryPadding*ae,getElevation:ye},l,p,C):{}}querySourceFeatures(l,p){const C=this.latestFeatureIndex;if(!C||!C.rawTileData)return;const E=C.loadVTLayers(),T=p&&p.sourceLayer?p.sourceLayer:"",U=E._geojsonTileLayer||E[T];if(!U)return;const q=a.aa(p?.filter,p?.globalState),{z:Z,x:ae,y:Ae}=this.tileID.canonical,ye={z:Z,x:ae,y:Ae};for(let pe=0;pe<U.length;pe++){const Be=U.feature(pe);if(q.needGeometry){const Ze=a.ab(Be,!0);if(!q.filter(new a.F(this.tileID.overscaledZ),Ze,this.tileID.canonical))continue}else if(!q.filter(new a.F(this.tileID.overscaledZ),Be))continue;const Fe=C.getId(Be,T),Xe=new a.ac(Be,Z,ae,Ae,Fe);Xe.tile=ye,l.push(Xe)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(l){const p=this.expirationTime;if(l.cacheControl){const C=a.ad(l.cacheControl);C["max-age"]&&(this.expirationTime=Date.now()+1e3*C["max-age"])}else l.expires&&(this.expirationTime=new Date(l.expires).getTime());if(this.expirationTime){const C=Date.now();let E=!1;if(this.expirationTime>C)E=!1;else if(p)if(this.expirationTime<p)E=!0;else{const T=this.expirationTime-p;T?this.expirationTime=C+Math.max(T,3e4):E=!0}else E=!0;E?(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(l,p){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(l).length===0)return;const C=this.latestFeatureIndex.loadVTLayers();for(const E in this.buckets){if(!p.style.hasLayer(E))continue;const T=this.buckets[E],U=T.layers[0].sourceLayer||"_geojsonTileLayer",q=C[U],Z=l[U];if(!q||!Z||Object.keys(Z).length===0)continue;T.update(Z,q,this.imageAtlas&&this.imageAtlas.patternPositions||{});const ae=p&&p.style&&p.style.getLayer(E);ae&&(this.queryPadding=Math.max(this.queryPadding,ae.queryRadius(T)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<x.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(l){this.symbolFadeHoldUntil=x.now()+l}setDependencies(l,p){const C={};for(const E of p)C[E]=!0;this.dependencies[l]=C}hasDependency(l,p){for(const C of l){const E=this.dependencies[C];if(E){for(const T of p)if(E[T])return!0}}return!1}}class J{constructor(l,p){this.max=l,this.onRemove=p,this.reset()}reset(){for(const l in this.data)for(const p of this.data[l])p.timeout&&clearTimeout(p.timeout),this.onRemove(p.value);return this.data={},this.order=[],this}add(l,p,C){const E=l.wrapped().key;this.data[E]===void 0&&(this.data[E]=[]);const T={value:p,timeout:void 0};if(C!==void 0&&(T.timeout=setTimeout((()=>{this.remove(l,T)}),C)),this.data[E].push(T),this.order.push(E),this.order.length>this.max){const U=this._getAndRemoveByKey(this.order[0]);U&&this.onRemove(U)}return this}has(l){return l.wrapped().key in this.data}getAndRemove(l){return this.has(l)?this._getAndRemoveByKey(l.wrapped().key):null}_getAndRemoveByKey(l){const p=this.data[l].shift();return p.timeout&&clearTimeout(p.timeout),this.data[l].length===0&&delete this.data[l],this.order.splice(this.order.indexOf(l),1),p.value}getByKey(l){const p=this.data[l];return p?p[0].value:null}get(l){return this.has(l)?this.data[l.wrapped().key][0].value:null}remove(l,p){if(!this.has(l))return this;const C=l.wrapped().key,E=p===void 0?0:this.data[C].indexOf(p),T=this.data[C][E];return this.data[C].splice(E,1),T.timeout&&clearTimeout(T.timeout),this.data[C].length===0&&delete this.data[C],this.onRemove(T.value),this.order.splice(this.order.indexOf(C),1),this}setMaxSize(l){for(this.max=l;this.order.length>this.max;){const p=this._getAndRemoveByKey(this.order[0]);p&&this.onRemove(p)}return this}filter(l){const p=[];for(const C in this.data)for(const E of this.data[C])l(E.value)||p.push(E);for(const C of p)this.remove(C.value.tileID,C)}}class ne{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(l,p,C){const E=String(p);if(this.stateChanges[l]=this.stateChanges[l]||{},this.stateChanges[l][E]=this.stateChanges[l][E]||{},a.e(this.stateChanges[l][E],C),this.deletedStates[l]===null){this.deletedStates[l]={};for(const T in this.state[l])T!==E&&(this.deletedStates[l][T]=null)}else if(this.deletedStates[l]&&this.deletedStates[l][E]===null){this.deletedStates[l][E]={};for(const T in this.state[l][E])C[T]||(this.deletedStates[l][E][T]=null)}else for(const T in C)this.deletedStates[l]&&this.deletedStates[l][E]&&this.deletedStates[l][E][T]===null&&delete this.deletedStates[l][E][T]}removeFeatureState(l,p,C){if(this.deletedStates[l]===null)return;const E=String(p);if(this.deletedStates[l]=this.deletedStates[l]||{},C&&p!==void 0)this.deletedStates[l][E]!==null&&(this.deletedStates[l][E]=this.deletedStates[l][E]||{},this.deletedStates[l][E][C]=null);else if(p!==void 0)if(this.stateChanges[l]&&this.stateChanges[l][E])for(C in this.deletedStates[l][E]={},this.stateChanges[l][E])this.deletedStates[l][E][C]=null;else this.deletedStates[l][E]=null;else this.deletedStates[l]=null}getState(l,p){const C=String(p),E=a.e({},(this.state[l]||{})[C],(this.stateChanges[l]||{})[C]);if(this.deletedStates[l]===null)return{};if(this.deletedStates[l]){const T=this.deletedStates[l][p];if(T===null)return{};for(const U in T)delete E[U]}return E}initializeTileState(l,p){l.setFeatureState(this.state,p)}coalesceChanges(l,p){const C={};for(const E in this.stateChanges){this.state[E]=this.state[E]||{};const T={};for(const U in this.stateChanges[E])this.state[E][U]||(this.state[E][U]={}),a.e(this.state[E][U],this.stateChanges[E][U]),T[U]=this.state[E][U];C[E]=T}for(const E in this.deletedStates){this.state[E]=this.state[E]||{};const T={};if(this.deletedStates[E]===null)for(const U in this.state[E])T[U]={},this.state[E][U]={};else for(const U in this.deletedStates[E]){if(this.deletedStates[E][U]===null)this.state[E][U]={};else for(const q of Object.keys(this.deletedStates[E][U]))delete this.state[E][U][q];T[U]=this.state[E][U]}C[E]=C[E]||{},a.e(C[E],T)}if(this.stateChanges={},this.deletedStates={},Object.keys(C).length!==0)for(const E in l)l[E].setFeatureState(C,p)}}const ue=89.25;function Ce(B,l){const p=a.ah(l.lat,-a.ai,a.ai);return new a.P(a.V(l.lng)*B,a.U(p)*B)}function Ue(B,l){return new a.a1(l.x/B,l.y/B).toLngLat()}function He(B){return B.cameraToCenterDistance*Math.min(.85*Math.tan(a.ae(90-B.pitch)),Math.tan(a.ae(ue-B.pitch)))}function lt(B,l){const p=B.canonical,C=l/a.af(p.z),E=p.x+Math.pow(2,p.z)*B.wrap,T=a.ag(new Float64Array(16));return a.M(T,T,[E*C,p.y*C,0]),a.N(T,T,[C/a.$,C/a.$,1]),T}function be(B,l,p,C,E){const T=a.a1.fromLngLat(B,l),U=E*a.aj(1,B.lat),q=U*Math.cos(a.ae(p)),Z=Math.sqrt(U*U-q*q),ae=Z*Math.sin(a.ae(-C)),Ae=Z*Math.cos(a.ae(-C));return new a.a1(T.x+ae,T.y+Ae,T.z+q)}function Ee(B,l,p){const C=l.intersectsFrustum(B);if(!p||C===0)return C;const E=l.intersectsPlane(p);return E===0?0:C===2&&E===2?2:1}function y(B,l,p){let C=0;const E=(p-l)/10;for(let T=0;T<10;T++)C+=E*Math.pow(Math.cos(l+(T+.5)/10*(p-l)),B);return C}function gt(B,l){return function(p,C,E,T,U){const q=2*((B-1)/a.ak(Math.cos(a.ae(ue-U))/Math.cos(a.ae(ue)))-1),Z=Math.acos(E/T),ae=2*y(q-1,0,a.ae(U/2)),Ae=Math.min(a.ae(ue),Z+a.ae(U/2)),ye=y(q-1,Math.min(Ae,Z-a.ae(U/2)),Ae),pe=Math.atan(C/E),Be=Math.hypot(C,E);let Fe=p;return Fe+=a.ak(T/Be/Math.max(.5,Math.cos(a.ae(U/2)))),Fe+=q*a.ak(Math.cos(pe))/2,Fe-=a.ak(Math.max(1,ye/ae/l))/2,Fe}}const Mt=gt(9.314,3);function Dt(B,l){const p=(l.roundZoom?Math.round:Math.floor)(B.zoom+a.ak(B.tileSize/l.tileSize));return Math.max(0,p)}function ot(B,l){const p=B.getCameraFrustum(),C=B.getClippingPlane(),E=B.screenPointToMercatorCoordinate(B.getCameraPoint()),T=a.a1.fromLngLat(B.center,B.elevation);E.z=T.z+Math.cos(B.pitchInRadians)*B.cameraToCenterDistance/B.worldSize;const U=B.getCoveringTilesDetailsProvider(),q=U.allowVariableZoom(B,l),Z=Dt(B,l),ae=l.minzoom||0,Ae=l.maxzoom!==void 0?l.maxzoom:B.maxZoom,ye=Math.min(Math.max(0,Z),Ae),pe=Math.pow(2,ye),Be=[pe*E.x,pe*E.y,0],Fe=[pe*T.x,pe*T.y,0],Xe=Math.hypot(T.x-E.x,T.y-E.y),Ze=Math.abs(T.z-E.z),et=Math.hypot(Xe,Ze),st=yt=>({zoom:0,x:0,y:0,wrap:yt,fullyVisible:!1}),nt=[],ct=[];if(B.renderWorldCopies&&U.allowWorldCopies())for(let yt=1;yt<=3;yt++)nt.push(st(-yt)),nt.push(st(yt));for(nt.push(st(0));nt.length>0;){const yt=nt.pop(),xt=yt.x,At=yt.y;let Ot=yt.fullyVisible;const Vt={x:xt,y:At,z:yt.zoom},Kt=U.getTileBoundingVolume(Vt,yt.wrap,B.elevation,l);if(!Ot){const On=Ee(p,Kt,C);if(On===0)continue;Ot=On===2}const jt=U.distanceToTile2d(E.x,E.y,Vt,Kt);let qt=Z;q&&(qt=(l.calculateTileZoom||Mt)(B.zoom+a.ak(B.tileSize/l.tileSize),jt,Ze,et,B.fov)),qt=(l.roundZoom?Math.round:Math.floor)(qt),qt=Math.max(0,qt);const Kn=Math.min(qt,Ae);if(yt.wrap=U.getWrap(T,Vt,yt.wrap),yt.zoom>=Kn){if(yt.zoom<ae)continue;const On=ye-yt.zoom,un=Be[0]-.5-(xt<<On),ei=Be[1]-.5-(At<<On),Ji=l.reparseOverscaled?Math.max(yt.zoom,qt):yt.zoom;ct.push({tileID:new a.Z(yt.zoom===Ae?Ji:yt.zoom,yt.wrap,yt.zoom,xt,At),distanceSq:a.al([Fe[0]-.5-xt,Fe[1]-.5-At]),tileDistanceToCamera:Math.sqrt(un*un+ei*ei)})}else for(let On=0;On<4;On++)nt.push({zoom:yt.zoom+1,x:(xt<<1)+On%2,y:(At<<1)+(On>>1),wrap:yt.wrap,fullyVisible:Ot})}return ct.sort(((yt,xt)=>yt.distanceSq-xt.distanceSq)).map((yt=>yt.tileID))}const bn=a.a2.fromPoints([new a.P(0,0),new a.P(a.$,a.$)]);class Gn extends a.E{constructor(l,p,C){super(),this.id=l,this.dispatcher=C,this.on("data",(E=>this._dataHandler(E))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((E,T,U,q)=>{const Z=new(dn(T.type))(E,T,U,q);if(Z.id!==E)throw new Error(`Expected Source id to be ${E} instead of ${Z.id}`);return Z})(l,p,C,this),this._tiles={},this._cache=new J(0,(E=>this._unloadTile(E))),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new ne,this._didEmitContent=!1,this._updated=!1}onAdd(l){this.map=l,this._maxTileCacheSize=l?l._maxTileCacheSize:null,this._maxTileCacheZoomLevels=l?l._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(l)}onRemove(l){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(l)}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 l in this._tiles){const p=this._tiles[l];if(p.state!=="loaded"&&p.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const l=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,l&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(l,p,C){return a._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(l),this._tileLoaded(l,p,C)}catch(E){l.state="errored",E.status!==404?this._source.fire(new a.k(E,{tile:l})):this.update(this.transform,this.terrain)}}))}_unloadTile(l){this._source.unloadTile&&this._source.unloadTile(l)}_abortTile(l){this._source.abortTile&&this._source.abortTile(l),this._source.fire(new a.l("dataabort",{tile:l,coord:l.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(l){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const p in this._tiles){const C=this._tiles[p];C.upload(l),C.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((l=>l.tileID)).sort(yn).map((l=>l.key))}getRenderableIds(l){const p=[];for(const C in this._tiles)this._isIdRenderable(C,l)&&p.push(this._tiles[C]);return l?p.sort(((C,E)=>{const T=C.tileID,U=E.tileID,q=new a.P(T.canonical.x,T.canonical.y)._rotate(-this.transform.bearingInRadians),Z=new a.P(U.canonical.x,U.canonical.y)._rotate(-this.transform.bearingInRadians);return T.overscaledZ-U.overscaledZ||Z.y-q.y||Z.x-q.x})).map((C=>C.tileID.key)):p.map((C=>C.tileID)).sort(yn).map((C=>C.key))}hasRenderableParent(l){const p=this.findLoadedParent(l,0);return!!p&&this._isIdRenderable(p.tileID.key)}_isIdRenderable(l,p){return this._tiles[l]&&this._tiles[l].hasData()&&!this._coveredTiles[l]&&(p||!this._tiles[l].holdingForFade())}reload(l){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const p in this._tiles)l?this._reloadTile(p,"expired"):this._tiles[p].state!=="errored"&&this._reloadTile(p,"reloading")}}_reloadTile(l,p){return a._(this,void 0,void 0,(function*(){const C=this._tiles[l];C&&(C.state!=="loading"&&(C.state=p),yield this._loadTile(C,l,p))}))}_tileLoaded(l,p,C){l.timeAdded=x.now(),C==="expired"&&(l.refreshedUponExpiration=!0),this._setTileReloadTimer(p,l),this.getSource().type==="raster-dem"&&l.dem&&this._backfillDEM(l),this._state.initializeTileState(l,this.map?this.map.painter:null),l.aborted||this._source.fire(new a.l("data",{dataType:"source",tile:l,coord:l.tileID}))}_backfillDEM(l){const p=this.getRenderableIds();for(let E=0;E<p.length;E++){const T=p[E];if(l.neighboringTiles&&l.neighboringTiles[T]){const U=this.getTileByID(T);C(l,U),C(U,l)}}function C(E,T){E.needsHillshadePrepare=!0,E.needsTerrainPrepare=!0;let U=T.tileID.canonical.x-E.tileID.canonical.x;const q=T.tileID.canonical.y-E.tileID.canonical.y,Z=Math.pow(2,E.tileID.canonical.z),ae=T.tileID.key;U===0&&q===0||Math.abs(q)>1||(Math.abs(U)>1&&(Math.abs(U+Z)===1?U+=Z:Math.abs(U-Z)===1&&(U-=Z)),T.dem&&E.dem&&(E.dem.backfillBorder(T.dem,U,q),E.neighboringTiles&&E.neighboringTiles[ae]&&(E.neighboringTiles[ae].backfilled=!0)))}}getTile(l){return this.getTileByID(l.key)}getTileByID(l){return this._tiles[l]}_retainLoadedChildren(l,p,C,E){for(const T in this._tiles){let U=this._tiles[T];if(E[T]||!U.hasData()||U.tileID.overscaledZ<=p||U.tileID.overscaledZ>C)continue;let q=U.tileID;for(;U&&U.tileID.overscaledZ>p+1;){const ae=U.tileID.scaledTo(U.tileID.overscaledZ-1);U=this._tiles[ae.key],U&&U.hasData()&&(q=ae)}let Z=q;for(;Z.overscaledZ>p;)if(Z=Z.scaledTo(Z.overscaledZ-1),l[Z.key]||l[Z.canonical.key]){E[q.key]=q;break}}}findLoadedParent(l,p){if(l.key in this._loadedParentTiles){const C=this._loadedParentTiles[l.key];return C&&C.tileID.overscaledZ>=p?C:null}for(let C=l.overscaledZ-1;C>=p;C--){const E=l.scaledTo(C),T=this._getLoadedTile(E);if(T)return T}}findLoadedSibling(l){return this._getLoadedTile(l)}_getLoadedTile(l){const p=this._tiles[l.key];return p&&p.hasData()?p:this._cache.getByKey(l.wrapped().key)}updateCacheSize(l){const p=Math.ceil(l.width/this._source.tileSize)+1,C=Math.ceil(l.height/this._source.tileSize)+1,E=Math.floor(p*C*(this._maxTileCacheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),T=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,E):E;this._cache.setMaxSize(T)}handleWrapJump(l){const p=Math.round((l-(this._prevLng===void 0?l:this._prevLng))/360);if(this._prevLng=l,p){const C={};for(const E in this._tiles){const T=this._tiles[E];T.tileID=T.tileID.unwrapTo(T.tileID.wrap+p),C[T.tileID.key]=T}this._tiles=C;for(const E in this._timers)clearTimeout(this._timers[E]),delete this._timers[E];for(const E in this._tiles)this._setTileReloadTimer(E,this._tiles[E])}}_updateCoveredAndRetainedTiles(l,p,C,E,T,U){const q={},Z={},ae=Object.keys(l),Ae=x.now();for(const ye of ae){const pe=l[ye],Be=this._tiles[ye];if(!Be||Be.fadeEndTime!==0&&Be.fadeEndTime<=Ae)continue;const Fe=this.findLoadedParent(pe,p),Xe=this.findLoadedSibling(pe),Ze=Fe||Xe||null;Ze&&(this._addTile(Ze.tileID),q[Ze.tileID.key]=Ze.tileID),Z[ye]=pe}this._retainLoadedChildren(Z,E,C,l);for(const ye in q)l[ye]||(this._coveredTiles[ye]=!0,l[ye]=q[ye]);if(U){const ye={},pe={};for(const Be of T)this._tiles[Be.key].hasData()?ye[Be.key]=Be:pe[Be.key]=Be;for(const Be in pe){const Fe=pe[Be].children(this._source.maxzoom);this._tiles[Fe[0].key]&&this._tiles[Fe[1].key]&&this._tiles[Fe[2].key]&&this._tiles[Fe[3].key]&&(ye[Fe[0].key]=l[Fe[0].key]=Fe[0],ye[Fe[1].key]=l[Fe[1].key]=Fe[1],ye[Fe[2].key]=l[Fe[2].key]=Fe[2],ye[Fe[3].key]=l[Fe[3].key]=Fe[3],delete pe[Be])}for(const Be in pe){const Fe=pe[Be],Xe=this.findLoadedParent(Fe,this._source.minzoom),Ze=this.findLoadedSibling(Fe),et=Xe||Ze||null;if(et){ye[et.tileID.key]=l[et.tileID.key]=et.tileID;for(const st in ye)ye[st].isChildOf(et.tileID)&&delete ye[st]}}for(const Be in this._tiles)ye[Be]||(this._coveredTiles[Be]=!0)}}update(l,p){if(!this._sourceLoaded||this._paused)return;let C;this.transform=l,this.terrain=p,this.updateCacheSize(l),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?C=l.getVisibleUnwrappedCoordinates(this._source.tileID).map((Ae=>new a.Z(Ae.canonical.z,Ae.wrap,Ae.canonical.z,Ae.canonical.x,Ae.canonical.y))):(C=ot(l,{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:p,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(C=C.filter((Ae=>this._source.hasTile(Ae))))):C=[];const E=Dt(l,this._source),T=Math.max(E-Gn.maxOverzooming,this._source.minzoom),U=Math.max(E+Gn.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const Ae={};for(const ye of C)if(ye.canonical.z>this._source.minzoom){const pe=ye.scaledTo(ye.canonical.z-1);Ae[pe.key]=pe;const Be=ye.scaledTo(Math.max(this._source.minzoom,Math.min(ye.canonical.z,5)));Ae[Be.key]=Be}C=C.concat(Object.values(Ae))}const q=C.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,q&&this.fire(new a.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const Z=this._updateRetainedTiles(C,E);qn(this._source.type)&&this._updateCoveredAndRetainedTiles(Z,T,U,E,C,p);for(const Ae in Z)this._tiles[Ae].clearFadeHold();const ae=a.am(this._tiles,Z);for(const Ae of ae){const ye=this._tiles[Ae];ye.hasSymbolBuckets&&!ye.holdingForFade()?ye.setHoldDuration(this.map._fadeDuration):ye.hasSymbolBuckets&&!ye.symbolFadeFinished()||this._removeTile(Ae)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const l in this._tiles)this._tiles[l].holdingForFade()&&this._removeTile(l)}_updateRetainedTiles(l,p){var C;const E={},T={},U=Math.max(p-Gn.maxOverzooming,this._source.minzoom),q=Math.max(p+Gn.maxUnderzooming,this._source.minzoom),Z={};for(const ae of l){const Ae=this._addTile(ae);E[ae.key]=ae,Ae.hasData()||p<this._source.maxzoom&&(Z[ae.key]=ae)}this._retainLoadedChildren(Z,p,q,E);for(const ae of l){let Ae=this._tiles[ae.key];if(Ae.hasData())continue;if(p+1>this._source.maxzoom){const pe=ae.children(this._source.maxzoom)[0],Be=this.getTile(pe);if(Be&&Be.hasData()){E[pe.key]=pe;continue}}else{const pe=ae.children(this._source.maxzoom);if(pe.length===4&&E[pe[0].key]&&E[pe[1].key]&&E[pe[2].key]&&E[pe[3].key]||pe.length===1&&E[pe[0].key])continue}let ye=Ae.wasRequested();for(let pe=ae.overscaledZ-1;pe>=U;--pe){const Be=ae.scaledTo(pe);if(T[Be.key])break;if(T[Be.key]=!0,Ae=this.getTile(Be),!Ae&&ye&&(Ae=this._addTile(Be)),Ae){const Fe=Ae.hasData();if((Fe||!(!((C=this.map)===null||C===void 0)&&C.cancelPendingTileRequestsWhileZooming)||ye)&&(E[Be.key]=Be),ye=Ae.wasRequested(),Fe)break}}}return E}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const l in this._tiles){const p=[];let C,E=this._tiles[l].tileID;for(;E.overscaledZ>0;){if(E.key in this._loadedParentTiles){C=this._loadedParentTiles[E.key];break}p.push(E.key);const T=E.scaledTo(E.overscaledZ-1);if(C=this._getLoadedTile(T),C)break;E=T}for(const T of p)this._loadedParentTiles[T]=C}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const l in this._tiles){const p=this._tiles[l].tileID,C=this._getLoadedTile(p);this._loadedSiblingTiles[p.key]=C}}_addTile(l){let p=this._tiles[l.key];if(p)return p;p=this._cache.getAndRemove(l),p&&(this._setTileReloadTimer(l.key,p),p.tileID=l,this._state.initializeTileState(p,this.map?this.map.painter:null),this._cacheTimers[l.key]&&(clearTimeout(this._cacheTimers[l.key]),delete this._cacheTimers[l.key],this._setTileReloadTimer(l.key,p)));const C=p;return p||(p=new oe(l,this._source.tileSize*l.overscaleFactor()),this._loadTile(p,l.key,p.state)),p.uses++,this._tiles[l.key]=p,C||this._source.fire(new a.l("dataloading",{tile:p,coord:p.tileID,dataType:"source"})),p}_setTileReloadTimer(l,p){l in this._timers&&(clearTimeout(this._timers[l]),delete this._timers[l]);const C=p.getExpiryTimeout();C&&(this._timers[l]=setTimeout((()=>{this._reloadTile(l,"expired"),delete this._timers[l]}),C))}refreshTiles(l){for(const p in this._tiles)(this._isIdRenderable(p)||this._tiles[p].state=="errored")&&l.some((C=>C.equals(this._tiles[p].tileID.canonical)))&&this._reloadTile(p,"expired")}_removeTile(l){const p=this._tiles[l];p&&(p.uses--,delete this._tiles[l],this._timers[l]&&(clearTimeout(this._timers[l]),delete this._timers[l]),p.uses>0||(p.hasData()&&p.state!=="reloading"?this._cache.add(p.tileID,p,p.getExpiryTimeout()):(p.aborted=!0,this._abortTile(p),this._unloadTile(p))))}_dataHandler(l){const p=l.sourceDataType;l.dataType==="source"&&p==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&l.dataType==="source"&&p==="content"&&(this.reload(l.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const l in this._tiles)this._removeTile(l);this._cache.reset()}tilesIn(l,p,C){const E=[],T=this.transform;if(!T)return E;const U=T.getCoveringTilesDetailsProvider().allowWorldCopies(),q=C?T.getCameraQueryGeometry(l):l,Z=Be=>T.screenPointToMercatorCoordinate(Be,this.terrain),ae=this.transformBbox(l,Z,!U),Ae=this.transformBbox(q,Z,!U),ye=this.getIds(),pe=a.a2.fromPoints(Ae);for(let Be=0;Be<ye.length;Be++){const Fe=this._tiles[ye[Be]];if(Fe.holdingForFade())continue;const Xe=U?[Fe.tileID]:[Fe.tileID.unwrapTo(-1),Fe.tileID.unwrapTo(0)],Ze=Math.pow(2,T.zoom-Fe.tileID.overscaledZ),et=p*Fe.queryPadding*a.$/Fe.tileSize/Ze;for(const st of Xe){const nt=pe.map((ct=>st.getTilePoint(new a.a1(ct.x,ct.y))));if(nt.expandBy(et),nt.intersects(bn)){const ct=ae.map((xt=>st.getTilePoint(xt))),yt=Ae.map((xt=>st.getTilePoint(xt)));E.push({tile:Fe,tileID:U?st:st.unwrapTo(0),queryGeometry:ct,cameraQueryGeometry:yt,scale:Ze})}}}return E}transformBbox(l,p,C){let E=l.map(p);if(C){const T=a.a2.fromPoints(l);T.shrinkBy(.001*Math.min(T.width(),T.height()));const U=T.map(p);a.a2.fromPoints(E).covers(U)||(E=E.map((q=>q.x>.5?new a.a1(q.x-1,q.y,q.z):q)))}return E}getVisibleCoordinates(l){const p=this.getRenderableIds(l).map((C=>this._tiles[C].tileID));return this.transform&&this.transform.populateCache(p),p}hasTransition(){if(this._source.hasTransition())return!0;if(qn(this._source.type)){const l=x.now();for(const p in this._tiles)if(this._tiles[p].fadeEndTime>=l)return!0}return!1}setFeatureState(l,p,C){this._state.updateState(l=l||"_geojsonTileLayer",p,C)}removeFeatureState(l,p,C){this._state.removeFeatureState(l=l||"_geojsonTileLayer",p,C)}getFeatureState(l,p){return this._state.getState(l=l||"_geojsonTileLayer",p)}setDependencies(l,p,C){const E=this._tiles[l];E&&E.setDependencies(p,C)}reloadTilesForDependencies(l,p){for(const C in this._tiles)this._tiles[C].hasDependency(l,p)&&this._reloadTile(C,"reloading");this._cache.filter((C=>!C.hasDependency(l,p)))}}function yn(B,l){const p=Math.abs(2*B.wrap)-+(B.wrap<0),C=Math.abs(2*l.wrap)-+(l.wrap<0);return B.overscaledZ-l.overscaledZ||C-p||l.canonical.y-B.canonical.y||l.canonical.x-B.canonical.x}function qn(B){return B==="raster"||B==="image"||B==="video"}Gn.maxOverzooming=10,Gn.maxUnderzooming=3;class $n{constructor(l,p){this.reset(l,p)}reset(l,p){this.points=l||[],this._distances=[0];for(let C=1;C<this.points.length;C++)this._distances[C]=this._distances[C-1]+this.points[C].dist(this.points[C-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(p||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(l){if(this.points.length===1)return this.points[0];l=a.ah(l,0,1);let p=1,C=this._distances[p];const E=l*this.paddedLength+this.padding;for(;C<E&&p<this._distances.length;)C=this._distances[++p];const T=p-1,U=this._distances[T],q=C-U,Z=q>0?(E-U)/q:0;return this.points[T].mult(1-Z).add(this.points[p].mult(Z))}}function mi(B,l){let p=!0;return B==="always"||B!=="never"&&l!=="never"||(p=!1),p}class ir{constructor(l,p,C){const E=this.boxCells=[],T=this.circleCells=[];this.xCellCount=Math.ceil(l/C),this.yCellCount=Math.ceil(p/C);for(let U=0;U<this.xCellCount*this.yCellCount;U++)E.push([]),T.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=l,this.height=p,this.xScale=this.xCellCount/l,this.yScale=this.yCellCount/p,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(l,p,C,E,T){this._forEachCell(p,C,E,T,this._insertBoxCell,this.boxUid++),this.boxKeys.push(l),this.bboxes.push(p),this.bboxes.push(C),this.bboxes.push(E),this.bboxes.push(T)}insertCircle(l,p,C,E){this._forEachCell(p-E,C-E,p+E,C+E,this._insertCircleCell,this.circleUid++),this.circleKeys.push(l),this.circles.push(p),this.circles.push(C),this.circles.push(E)}_insertBoxCell(l,p,C,E,T,U){this.boxCells[T].push(U)}_insertCircleCell(l,p,C,E,T,U){this.circleCells[T].push(U)}_query(l,p,C,E,T,U,q){if(C<0||l>this.width||E<0||p>this.height)return[];const Z=[];if(l<=0&&p<=0&&this.width<=C&&this.height<=E){if(T)return[{key:null,x1:l,y1:p,x2:C,y2:E}];for(let ae=0;ae<this.boxKeys.length;ae++)Z.push({key:this.boxKeys[ae],x1:this.bboxes[4*ae],y1:this.bboxes[4*ae+1],x2:this.bboxes[4*ae+2],y2:this.bboxes[4*ae+3]});for(let ae=0;ae<this.circleKeys.length;ae++){const Ae=this.circles[3*ae],ye=this.circles[3*ae+1],pe=this.circles[3*ae+2];Z.push({key:this.circleKeys[ae],x1:Ae-pe,y1:ye-pe,x2:Ae+pe,y2:ye+pe})}}else this._forEachCell(l,p,C,E,this._queryCell,Z,{hitTest:T,overlapMode:U,seenUids:{box:{},circle:{}}},q);return Z}query(l,p,C,E){return this._query(l,p,C,E,!1,null)}hitTest(l,p,C,E,T,U){return this._query(l,p,C,E,!0,T,U).length>0}hitTestCircle(l,p,C,E,T){const U=l-C,q=l+C,Z=p-C,ae=p+C;if(q<0||U>this.width||ae<0||Z>this.height)return!1;const Ae=[];return this._forEachCell(U,Z,q,ae,this._queryCellCircle,Ae,{hitTest:!0,overlapMode:E,circle:{x:l,y:p,radius:C},seenUids:{box:{},circle:{}}},T),Ae.length>0}_queryCell(l,p,C,E,T,U,q,Z){const{seenUids:ae,hitTest:Ae,overlapMode:ye}=q,pe=this.boxCells[T];if(pe!==null){const Fe=this.bboxes;for(const Xe of pe)if(!ae.box[Xe]){ae.box[Xe]=!0;const Ze=4*Xe,et=this.boxKeys[Xe];if(l<=Fe[Ze+2]&&p<=Fe[Ze+3]&&C>=Fe[Ze+0]&&E>=Fe[Ze+1]&&(!Z||Z(et))&&(!Ae||!mi(ye,et.overlapMode))&&(U.push({key:et,x1:Fe[Ze],y1:Fe[Ze+1],x2:Fe[Ze+2],y2:Fe[Ze+3]}),Ae))return!0}}const Be=this.circleCells[T];if(Be!==null){const Fe=this.circles;for(const Xe of Be)if(!ae.circle[Xe]){ae.circle[Xe]=!0;const Ze=3*Xe,et=this.circleKeys[Xe];if(this._circleAndRectCollide(Fe[Ze],Fe[Ze+1],Fe[Ze+2],l,p,C,E)&&(!Z||Z(et))&&(!Ae||!mi(ye,et.overlapMode))){const st=Fe[Ze],nt=Fe[Ze+1],ct=Fe[Ze+2];if(U.push({key:et,x1:st-ct,y1:nt-ct,x2:st+ct,y2:nt+ct}),Ae)return!0}}}return!1}_queryCellCircle(l,p,C,E,T,U,q,Z){const{circle:ae,seenUids:Ae,overlapMode:ye}=q,pe=this.boxCells[T];if(pe!==null){const Fe=this.bboxes;for(const Xe of pe)if(!Ae.box[Xe]){Ae.box[Xe]=!0;const Ze=4*Xe,et=this.boxKeys[Xe];if(this._circleAndRectCollide(ae.x,ae.y,ae.radius,Fe[Ze+0],Fe[Ze+1],Fe[Ze+2],Fe[Ze+3])&&(!Z||Z(et))&&!mi(ye,et.overlapMode))return U.push(!0),!0}}const Be=this.circleCells[T];if(Be!==null){const Fe=this.circles;for(const Xe of Be)if(!Ae.circle[Xe]){Ae.circle[Xe]=!0;const Ze=3*Xe,et=this.circleKeys[Xe];if(this._circlesCollide(Fe[Ze],Fe[Ze+1],Fe[Ze+2],ae.x,ae.y,ae.radius)&&(!Z||Z(et))&&!mi(ye,et.overlapMode))return U.push(!0),!0}}}_forEachCell(l,p,C,E,T,U,q,Z){const ae=this._convertToXCellCoord(l),Ae=this._convertToYCellCoord(p),ye=this._convertToXCellCoord(C),pe=this._convertToYCellCoord(E);for(let Be=ae;Be<=ye;Be++)for(let Fe=Ae;Fe<=pe;Fe++)if(T.call(this,l,p,C,E,this.xCellCount*Fe+Be,U,q,Z))return}_convertToXCellCoord(l){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(l*this.xScale)))}_convertToYCellCoord(l){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(l*this.yScale)))}_circlesCollide(l,p,C,E,T,U){const q=E-l,Z=T-p,ae=C+U;return ae*ae>q*q+Z*Z}_circleAndRectCollide(l,p,C,E,T,U,q){const Z=(U-E)/2,ae=Math.abs(l-(E+Z));if(ae>Z+C)return!1;const Ae=(q-T)/2,ye=Math.abs(p-(T+Ae));if(ye>Ae+C)return!1;if(ae<=Z||ye<=Ae)return!0;const pe=ae-Z,Be=ye-Ae;return pe*pe+Be*Be<=C*C}}function di(B,l,p){const C=a.L();if(!B){const{vecSouth:ye,vecEast:pe}=Fn(l),Be=A();Be[0]=pe[0],Be[1]=pe[1],Be[2]=ye[0],Be[3]=ye[1],E=Be,(Ae=(U=(T=Be)[0])*(ae=T[3])-(Z=T[2])*(q=T[1]))&&(E[0]=ae*(Ae=1/Ae),E[1]=-q*Ae,E[2]=-Z*Ae,E[3]=U*Ae),C[0]=Be[0],C[1]=Be[1],C[4]=Be[2],C[5]=Be[3]}var E,T,U,q,Z,ae,Ae;return a.N(C,C,[1/p,1/p,1]),C}function Vn(B,l,p,C){if(B){const E=a.L();if(!l){const{vecSouth:T,vecEast:U}=Fn(p);E[0]=U[0],E[1]=U[1],E[4]=T[0],E[5]=T[1]}return a.N(E,E,[C,C,1]),E}return p.pixelsToClipSpaceMatrix}function Fn(B){const l=Math.cos(B.rollInRadians),p=Math.sin(B.rollInRadians),C=Math.cos(B.pitchInRadians),E=Math.cos(B.bearingInRadians),T=Math.sin(B.bearingInRadians),U=a.ar();U[0]=-E*C*p-T*l,U[1]=-T*C*p+E*l;const q=a.as(U);q<1e-9?a.at(U):a.au(U,U,1/q);const Z=a.ar();Z[0]=E*C*l-T*p,Z[1]=T*C*l+E*p;const ae=a.as(Z);return ae<1e-9?a.at(Z):a.au(Z,Z,1/ae),{vecEast:Z,vecSouth:U}}function Ti(B,l,p,C){let E;C?(E=[B,l,C(B,l),1],a.aw(E,E,p)):(E=[B,l,0,1],Fu(E,E,p));const T=E[3];return{point:new a.P(E[0]/T,E[1]/T),signedDistanceFromCamera:T,isOccluded:!1}}function on(B,l){return .5+B/l*.5}function qr(B,l){return B.x>=-l[0]&&B.x<=l[0]&&B.y>=-l[1]&&B.y<=l[1]}function Di(B,l,p,C,E,T,U,q,Z,ae,Ae,ye,pe){const Be=p?B.textSizeData:B.iconSizeData,Fe=a.an(Be,l.transform.zoom),Xe=[256/l.width*2+1,256/l.height*2+1],Ze=p?B.text.dynamicLayoutVertexArray:B.icon.dynamicLayoutVertexArray;Ze.clear();const et=B.lineVertexArray,st=p?B.text.placedSymbolArray:B.icon.placedSymbolArray,nt=l.transform.width/l.transform.height;let ct=!1;for(let yt=0;yt<st.length;yt++){const xt=st.get(yt);if(xt.hidden||xt.writingMode===a.ao.vertical&&!ct){Fa(xt.numGlyphs,Ze);continue}ct=!1;const At=new a.P(xt.anchorX,xt.anchorY),Ot={getElevation:pe,pitchedLabelPlaneMatrix:C,lineVertexArray:et,pitchWithMap:T,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:l.transform,tileAnchorPoint:At,unwrappedTileID:Z,width:ae,height:Ae,translation:ye},Vt=lo(xt.anchorX,xt.anchorY,Ot);if(!qr(Vt.point,Xe)){Fa(xt.numGlyphs,Ze);continue}const Kt=on(l.transform.cameraToCenterDistance,Vt.signedDistanceFromCamera),jt=a.ap(Be,Fe,xt),qt=T?jt*l.transform.getPitchedTextCorrection(xt.anchorX,xt.anchorY,Z)/Kt:jt*Kt,Kn=Pn({projectionContext:Ot,pitchedLabelPlaneMatrixInverse:E,symbol:xt,fontSize:qt,flip:!1,keepUpright:U,glyphOffsetArray:B.glyphOffsetArray,dynamicLayoutVertexArray:Ze,aspectRatio:nt,rotateToLine:q});ct=Kn.useVertical,(Kn.notEnoughRoom||ct||Kn.needsFlipping&&Pn({projectionContext:Ot,pitchedLabelPlaneMatrixInverse:E,symbol:xt,fontSize:qt,flip:!0,keepUpright:U,glyphOffsetArray:B.glyphOffsetArray,dynamicLayoutVertexArray:Ze,aspectRatio:nt,rotateToLine:q}).notEnoughRoom)&&Fa(xt.numGlyphs,Ze)}p?B.text.dynamicLayoutVertexBuffer.updateData(Ze):B.icon.dynamicLayoutVertexBuffer.updateData(Ze)}function js(B,l,p,C,E,T,U,q){const Z=T.glyphStartIndex+T.numGlyphs,ae=T.lineStartIndex,Ae=T.lineStartIndex+T.lineLength,ye=l.getoffsetX(T.glyphStartIndex),pe=l.getoffsetX(Z-1),Be=ra(B*ye,p,C,E,T.segment,ae,Ae,q,U);if(!Be)return null;const Fe=ra(B*pe,p,C,E,T.segment,ae,Ae,q,U);return Fe?q.projectionCache.anyProjectionOccluded?null:{first:Be,last:Fe}:null}function ea(B,l,p,C){return B===a.ao.horizontal&&Math.abs(p.y-l.y)>Math.abs(p.x-l.x)*C?{useVertical:!0}:(B===a.ao.vertical?l.y<p.y:l.x>p.x)?{needsFlipping:!0}:null}function Pn(B){const{projectionContext:l,pitchedLabelPlaneMatrixInverse:p,symbol:C,fontSize:E,flip:T,keepUpright:U,glyphOffsetArray:q,dynamicLayoutVertexArray:Z,aspectRatio:ae,rotateToLine:Ae}=B,ye=E/24,pe=C.lineOffsetX*ye,Be=C.lineOffsetY*ye;let Fe;if(C.numGlyphs>1){const Xe=C.glyphStartIndex+C.numGlyphs,Ze=C.lineStartIndex,et=C.lineStartIndex+C.lineLength,st=js(ye,q,pe,Be,T,C,Ae,l);if(!st)return{notEnoughRoom:!0};const nt=Oa(st.first.point.x,st.first.point.y,l,p),ct=Oa(st.last.point.x,st.last.point.y,l,p);if(U&&!T){const yt=ea(C.writingMode,nt,ct,ae);if(yt)return yt}Fe=[st.first];for(let yt=C.glyphStartIndex+1;yt<Xe-1;yt++){const xt=ra(ye*q.getoffsetX(yt),pe,Be,T,C.segment,Ze,et,l,Ae);if(!xt)return{notEnoughRoom:!0};Fe.push(xt)}Fe.push(st.last)}else{if(U&&!T){const Ze=Xi(l.tileAnchorPoint.x,l.tileAnchorPoint.y,l).point,et=C.lineStartIndex+C.segment+1,st=new a.P(l.lineVertexArray.getx(et),l.lineVertexArray.gety(et)),nt=Xi(st.x,st.y,l),ct=nt.signedDistanceFromCamera>0?nt.point:Gi(l.tileAnchorPoint,st,Ze,1,l),yt=Oa(Ze.x,Ze.y,l,p),xt=Oa(ct.x,ct.y,l,p),At=ea(C.writingMode,yt,xt,ae);if(At)return At}const Xe=ra(ye*q.getoffsetX(C.glyphStartIndex),pe,Be,T,C.segment,C.lineStartIndex,C.lineStartIndex+C.lineLength,l,Ae);if(!Xe||l.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Fe=[Xe]}for(const Xe of Fe)a.av(Z,Xe.point,Xe.angle);return{}}function Gi(B,l,p,C,E){const T=B.add(B.sub(l)._unit()),U=Xi(T.x,T.y,E).point,q=p.sub(U);return p.add(q._mult(C/q.mag()))}function Li(B,l,p){const C=l.projectionCache;if(C.projections[B])return C.projections[B];const E=new a.P(l.lineVertexArray.getx(B),l.lineVertexArray.gety(B)),T=Xi(E.x,E.y,l);if(T.signedDistanceFromCamera>0)return C.projections[B]=T.point,C.anyProjectionOccluded=C.anyProjectionOccluded||T.isOccluded,T.point;const U=B-p.direction;return Gi(p.distanceFromAnchor===0?l.tileAnchorPoint:new a.P(l.lineVertexArray.getx(U),l.lineVertexArray.gety(U)),E,p.previousVertex,p.absOffsetX-p.distanceFromAnchor+1,l)}function Xi(B,l,p){const C=B+p.translation[0],E=l+p.translation[1];let T;return p.pitchWithMap?(T=Ti(C,E,p.pitchedLabelPlaneMatrix,p.getElevation),T.isOccluded=!1):(T=p.transform.projectTileCoordinates(C,E,p.unwrappedTileID,p.getElevation),T.point.x=(.5*T.point.x+.5)*p.width,T.point.y=(.5*-T.point.y+.5)*p.height),T}function Oa(B,l,p,C){if(p.pitchWithMap){const E=[B,l,0,1];return a.aw(E,E,C),p.transform.projectTileCoordinates(E[0]/E[3],E[1]/E[3],p.unwrappedTileID,p.getElevation).point}return{x:B/p.width*2-1,y:1-l/p.height*2}}function lo(B,l,p){return p.transform.projectTileCoordinates(B,l,p.unwrappedTileID,p.getElevation)}function Fi(B,l,p){return B._unit()._perp()._mult(l*p)}function Cl(B,l,p,C,E,T,U,q,Z){if(q.projectionCache.offsets[B])return q.projectionCache.offsets[B];const ae=p.add(l);if(B+Z.direction<C||B+Z.direction>=E)return q.projectionCache.offsets[B]=ae,ae;const Ae=Li(B+Z.direction,q,Z),ye=Fi(Ae.sub(p),U,Z.direction),pe=p.add(ye),Be=Ae.add(ye);return q.projectionCache.offsets[B]=a.ax(T,ae,pe,Be)||ae,q.projectionCache.offsets[B]}function ra(B,l,p,C,E,T,U,q,Z){const ae=C?B-l:B+l;let Ae=ae>0?1:-1,ye=0;C&&(Ae*=-1,ye=Math.PI),Ae<0&&(ye+=Math.PI);let pe,Be=Ae>0?T+E:T+E+1;q.projectionCache.cachedAnchorPoint?pe=q.projectionCache.cachedAnchorPoint:(pe=Xi(q.tileAnchorPoint.x,q.tileAnchorPoint.y,q).point,q.projectionCache.cachedAnchorPoint=pe);let Fe,Xe,Ze=pe,et=pe,st=0,nt=0;const ct=Math.abs(ae),yt=[];let xt;for(;st+nt<=ct;){if(Be+=Ae,Be<T||Be>=U)return null;st+=nt,et=Ze,Xe=Fe;const Vt={absOffsetX:ct,direction:Ae,distanceFromAnchor:st,previousVertex:et};if(Ze=Li(Be,q,Vt),p===0)yt.push(et),xt=Ze.sub(et);else{let Kt;const jt=Ze.sub(et);Kt=jt.mag()===0?Fi(Li(Be+Ae,q,Vt).sub(Ze),p,Ae):Fi(jt,p,Ae),Xe||(Xe=et.add(Kt)),Fe=Cl(Be,Kt,Ze,T,U,Xe,p,q,Vt),yt.push(Xe),xt=Fe.sub(Xe)}nt=xt.mag()}const At=xt._mult((ct-st)/nt)._add(Xe||et),Ot=ye+Math.atan2(Ze.y-et.y,Ze.x-et.x);return yt.push(At),{point:At,angle:Z?Ot:0,path:yt}}const uo=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Fa(B,l){for(let p=0;p<B;p++){const C=l.length;l.resize(C+4),l.float32.set(uo,3*C)}}function Fu(B,l,p){const C=l[0],E=l[1];return B[0]=p[0]*C+p[4]*E+p[12],B[1]=p[1]*C+p[5]*E+p[13],B[3]=p[3]*C+p[7]*E+p[15],B}const So=100;class AA{constructor(l,p=new ir(l.width+200,l.height+200,25),C=new ir(l.width+200,l.height+200,25)){this.transform=l,this.grid=p,this.ignoredGrid=C,this.pitchFactor=Math.cos(l.pitch*Math.PI/180)*l.cameraToCenterDistance,this.screenRightBoundary=l.width+So,this.screenBottomBoundary=l.height+So,this.gridRightBoundary=l.width+200,this.gridBottomBoundary=l.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(l,p,C,E,T,U,q,Z,ae,Ae,ye,pe){const Be=this.projectAndGetPerspectiveRatio(l.anchorPointX+Z[0],l.anchorPointY+Z[1],T,Ae,pe),Fe=C*Be.perspectiveRatio;let Xe;if(U||q)Xe=this._projectCollisionBox(l,Fe,E,T,U,q,Z,Be,Ae,ye,pe);else{const xt=Be.x+(ye?ye.x*Fe:0),At=Be.y+(ye?ye.y*Fe:0);Xe={allPointsOccluded:!1,box:[xt+l.x1*Fe,At+l.y1*Fe,xt+l.x2*Fe,At+l.y2*Fe]}}const[Ze,et,st,nt]=Xe.box,ct=U?Xe.allPointsOccluded:Be.isOccluded;let yt=ct;return yt||(yt=Be.perspectiveRatio<this.perspectiveRatioCutoff),yt||(yt=!this.isInsideGrid(Ze,et,st,nt)),yt||p!=="always"&&this.grid.hitTest(Ze,et,st,nt,p,ae)?{box:[Ze,et,st,nt],placeable:!1,offscreen:!1,occluded:ct}:{box:[Ze,et,st,nt],placeable:!0,offscreen:this.isOffscreen(Ze,et,st,nt),occluded:ct}}placeCollisionCircles(l,p,C,E,T,U,q,Z,ae,Ae,ye,pe,Be,Fe){const Xe=[],Ze=new a.P(p.anchorX,p.anchorY),et=this.getPerspectiveRatio(Ze.x,Ze.y,U,Fe),st=(ae?T*this.transform.getPitchedTextCorrection(p.anchorX,p.anchorY,U)/et:T*et)/a.aB,nt={getElevation:Fe,pitchedLabelPlaneMatrix:q,lineVertexArray:C,pitchWithMap:ae,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:Ze,unwrappedTileID:U,width:this.transform.width,height:this.transform.height,translation:Be},ct=js(st,E,p.lineOffsetX*st,p.lineOffsetY*st,!1,p,!1,nt);let yt=!1,xt=!1,At=!0;if(ct){const Ot=.5*ye*et+pe,Vt=new a.P(-100,-100),Kt=new a.P(this.screenRightBoundary,this.screenBottomBoundary),jt=new $n,qt=ct.first,Kn=ct.last;let On=[];for(let Ji=qt.path.length-1;Ji>=1;Ji--)On.push(qt.path[Ji]);for(let Ji=1;Ji<Kn.path.length;Ji++)On.push(Kn.path[Ji]);const un=2.5*Ot;if(ae){const Ji=this.projectPathToScreenSpace(On,nt);On=Ji.some((Yr=>Yr.signedDistanceFromCamera<=0))?[]:Ji.map((Yr=>Yr.point))}let ei=[];if(On.length>0){const Ji=On[0].clone(),Yr=On[0].clone();for(let Ms=1;Ms<On.length;Ms++)Ji.x=Math.min(Ji.x,On[Ms].x),Ji.y=Math.min(Ji.y,On[Ms].y),Yr.x=Math.max(Yr.x,On[Ms].x),Yr.y=Math.max(Yr.y,On[Ms].y);ei=Ji.x>=Vt.x&&Yr.x<=Kt.x&&Ji.y>=Vt.y&&Yr.y<=Kt.y?[On]:Yr.x<Vt.x||Ji.x>Kt.x||Yr.y<Vt.y||Ji.y>Kt.y?[]:a.ay([On],Vt.x,Vt.y,Kt.x,Kt.y)}for(const Ji of ei){jt.reset(Ji,.25*Ot);let Yr=0;Yr=jt.length<=.5*Ot?1:Math.ceil(jt.paddedLength/un)+1;for(let Ms=0;Ms<Yr;Ms++){const Hr=Ms/Math.max(Yr-1,1),cs=jt.lerp(Hr),As=cs.x+So,Qo=cs.y+So;Xe.push(As,Qo,Ot,0);const tr=As-Ot,sa=Qo-Ot,qo=As+Ot,Ga=Qo+Ot;if(At=At&&this.isOffscreen(tr,sa,qo,Ga),xt=xt||this.isInsideGrid(tr,sa,qo,Ga),l!=="always"&&this.grid.hitTestCircle(As,Qo,Ot,l,Ae)&&(yt=!0,!Z))return{circles:[],offscreen:!1,collisionDetected:yt}}}}return{circles:!Z&&yt||!xt||et<this.perspectiveRatioCutoff?[]:Xe,offscreen:At,collisionDetected:yt}}projectPathToScreenSpace(l,p){const C=(function(E,T){const U=a.L();return a.aq(U,T.pitchedLabelPlaneMatrix),E.map((q=>{const Z=Ti(q.x,q.y,U,T.getElevation),ae=T.transform.projectTileCoordinates(Z.point.x,Z.point.y,T.unwrappedTileID,T.getElevation);return ae.point.x=(.5*ae.point.x+.5)*T.width,ae.point.y=(.5*-ae.point.y+.5)*T.height,ae}))})(l,p);return(function(E){let T=0,U=0,q=0,Z=0;for(let ae=0;ae<E.length;ae++)E[ae].isOccluded?(q=ae+1,Z=0):(Z++,Z>U&&(U=Z,T=q));return E.slice(T,T+U)})(C)}queryRenderedSymbols(l){if(l.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const p=[],C=new a.a2;for(const ye of l){const pe=new a.P(ye.x+So,ye.y+So);C.extend(pe),p.push(pe)}const{minX:E,minY:T,maxX:U,maxY:q}=C,Z=this.grid.query(E,T,U,q).concat(this.ignoredGrid.query(E,T,U,q)),ae={},Ae={};for(const ye of Z){const pe=ye.key;if(ae[pe.bucketInstanceId]===void 0&&(ae[pe.bucketInstanceId]={}),ae[pe.bucketInstanceId][pe.featureIndex])continue;const Be=[new a.P(ye.x1,ye.y1),new a.P(ye.x2,ye.y1),new a.P(ye.x2,ye.y2),new a.P(ye.x1,ye.y2)];a.az(p,Be)&&(ae[pe.bucketInstanceId][pe.featureIndex]=!0,Ae[pe.bucketInstanceId]===void 0&&(Ae[pe.bucketInstanceId]=[]),Ae[pe.bucketInstanceId].push(pe.featureIndex))}return Ae}insertCollisionBox(l,p,C,E,T,U){(C?this.ignoredGrid:this.grid).insert({bucketInstanceId:E,featureIndex:T,collisionGroupID:U,overlapMode:p},l[0],l[1],l[2],l[3])}insertCollisionCircles(l,p,C,E,T,U){const q=C?this.ignoredGrid:this.grid,Z={bucketInstanceId:E,featureIndex:T,collisionGroupID:U,overlapMode:p};for(let ae=0;ae<l.length;ae+=4)q.insertCircle(Z,l[ae],l[ae+1],l[ae+2])}projectAndGetPerspectiveRatio(l,p,C,E,T){if(T){let U;E?(U=[l,p,E(l,p),1],a.aw(U,U,T)):(U=[l,p,0,1],Fu(U,U,T));const q=U[3];return{x:(U[0]/q+1)/2*this.transform.width+So,y:(-U[1]/q+1)/2*this.transform.height+So,perspectiveRatio:.5+this.transform.cameraToCenterDistance/q*.5,isOccluded:!1,signedDistanceFromCamera:q}}{const U=this.transform.projectTileCoordinates(l,p,C,E);return{x:(U.point.x+1)/2*this.transform.width+So,y:(1-U.point.y)/2*this.transform.height+So,perspectiveRatio:.5+this.transform.cameraToCenterDistance/U.signedDistanceFromCamera*.5,isOccluded:U.isOccluded,signedDistanceFromCamera:U.signedDistanceFromCamera}}}getPerspectiveRatio(l,p,C,E){const T=this.transform.projectTileCoordinates(l,p,C,E);return .5+this.transform.cameraToCenterDistance/T.signedDistanceFromCamera*.5}isOffscreen(l,p,C,E){return C<So||l>=this.screenRightBoundary||E<So||p>this.screenBottomBoundary}isInsideGrid(l,p,C,E){return C>=0&&l<this.gridRightBoundary&&E>=0&&p<this.gridBottomBoundary}getViewportMatrix(){const l=a.ag([]);return a.M(l,l,[-100,-100,0]),l}_projectCollisionBox(l,p,C,E,T,U,q,Z,ae,Ae,ye){let pe=1,Be=0,Fe=0,Xe=1;const Ze=l.anchorPointX+q[0],et=l.anchorPointY+q[1];if(U&&!T){const On=this.projectAndGetPerspectiveRatio(Ze+1,et,E,ae,ye),un=On.x-Z.x,ei=Math.atan((On.y-Z.y)/un)+(un<0?Math.PI:0),Ji=Math.sin(ei),Yr=Math.cos(ei);pe=Yr,Be=Ji,Fe=-Ji,Xe=Yr}else if(!U&&T){const On=Fn(this.transform);pe=On.vecEast[0],Be=On.vecEast[1],Fe=On.vecSouth[0],Xe=On.vecSouth[1]}let st=Z.x,nt=Z.y,ct=p;T&&(st=Ze,nt=et,ct=Math.pow(2,-(this.transform.zoom-C.overscaledZ)),ct*=this.transform.getPitchedTextCorrection(Ze,et,E),Ae||(ct*=a.ah(.5+Z.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),Ae&&(st+=pe*Ae.x*ct+Fe*Ae.y*ct,nt+=Be*Ae.x*ct+Xe*Ae.y*ct);const yt=l.x1*ct,xt=l.x2*ct,At=(yt+xt)/2,Ot=l.y1*ct,Vt=l.y2*ct,Kt=(Ot+Vt)/2,jt=[{offsetX:yt,offsetY:Ot},{offsetX:At,offsetY:Ot},{offsetX:xt,offsetY:Ot},{offsetX:xt,offsetY:Kt},{offsetX:xt,offsetY:Vt},{offsetX:At,offsetY:Vt},{offsetX:yt,offsetY:Vt},{offsetX:yt,offsetY:Kt}];let qt=[];for(const{offsetX:On,offsetY:un}of jt)qt.push(new a.P(st+pe*On+Fe*un,nt+Be*On+Xe*un));let Kn=!1;if(T){const On=qt.map((un=>this.projectAndGetPerspectiveRatio(un.x,un.y,E,ae,ye)));Kn=On.some((un=>!un.isOccluded)),qt=On.map((un=>new a.P(un.x,un.y)))}else Kn=!0;return{box:a.aA(qt),allPointsOccluded:!Kn}}}class ta{constructor(l,p,C,E){this.opacity=l?Math.max(0,Math.min(1,l.opacity+(l.placed?p:-p))):E&&C?1:0,this.placed=C}isHidden(){return this.opacity===0&&!this.placed}}class xr{constructor(l,p,C,E,T){this.text=new ta(l?l.text:null,p,C,T),this.icon=new ta(l?l.icon:null,p,E,T)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Xa{constructor(l,p,C){this.text=l,this.icon=p,this.skipFade=C}}class cl{constructor(l,p,C,E,T){this.bucketInstanceId=l,this.featureIndex=p,this.sourceLayerIndex=C,this.bucketIndex=E,this.tileID=T}}class Bs{constructor(l){this.crossSourceCollisions=l,this.maxGroupID=0,this.collisionGroups={}}get(l){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[l]){const p=++this.maxGroupID;this.collisionGroups[l]={ID:p,predicate:C=>C.collisionGroupID===p}}return this.collisionGroups[l]}}function fa(B,l,p,C,E){const{horizontalAlign:T,verticalAlign:U}=a.aH(B);return new a.P(-(T-.5)*l+C[0]*E,-(U-.5)*p+C[1]*E)}class _l{constructor(l,p,C,E,T){this.transform=l.clone(),this.terrain=p,this.collisionIndex=new AA(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=C,this.retainedQueryData={},this.collisionGroups=new Bs(E),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=T,T&&(T.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(l){const p=this.terrain;return p?(C,E)=>p.getElevation(l,C,E):null}getBucketParts(l,p,C,E){const T=C.getBucket(p),U=C.latestFeatureIndex;if(!T||!U||p.id!==T.layerIds[0])return;const q=C.collisionBoxArray,Z=T.layers[0].layout,ae=T.layers[0].paint,Ae=Math.pow(2,this.transform.zoom-C.tileID.overscaledZ),ye=C.tileSize/a.$,pe=C.tileID.toUnwrapped(),Be=Z.get("text-rotation-alignment")==="map",Fe=a.aC(C,1,this.transform.zoom),Xe=a.aD(this.collisionIndex.transform,C,ae.get("text-translate"),ae.get("text-translate-anchor")),Ze=a.aD(this.collisionIndex.transform,C,ae.get("icon-translate"),ae.get("icon-translate-anchor")),et=di(Be,this.transform,Fe);this.retainedQueryData[T.bucketInstanceId]=new cl(T.bucketInstanceId,U,T.sourceLayerIndex,T.index,C.tileID);const st={bucket:T,layout:Z,translationText:Xe,translationIcon:Ze,unwrappedTileID:pe,pitchedLabelPlaneMatrix:et,scale:Ae,textPixelRatio:ye,holdingForFade:C.holdingForFade(),collisionBoxArray:q,partiallyEvaluatedTextSize:a.an(T.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(T.sourceID)};if(E)for(const nt of T.sortKeyRanges){const{sortKey:ct,symbolInstanceStart:yt,symbolInstanceEnd:xt}=nt;l.push({sortKey:ct,symbolInstanceStart:yt,symbolInstanceEnd:xt,parameters:st})}else l.push({symbolInstanceStart:0,symbolInstanceEnd:T.symbolInstances.length,parameters:st})}attemptAnchorPlacement(l,p,C,E,T,U,q,Z,ae,Ae,ye,pe,Be,Fe,Xe,Ze,et,st,nt,ct){const yt=a.aE[l.textAnchor],xt=[l.textOffset0,l.textOffset1],At=fa(yt,C,E,xt,T),Ot=this.collisionIndex.placeCollisionBox(p,pe,Z,ae,Ae,q,U,Ze,ye.predicate,nt,At,ct);if((!st||this.collisionIndex.placeCollisionBox(st,pe,Z,ae,Ae,q,U,et,ye.predicate,nt,At,ct).placeable)&&Ot.placeable){let Vt;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Be.crossTileID]&&this.prevPlacement.placements[Be.crossTileID]&&this.prevPlacement.placements[Be.crossTileID].text&&(Vt=this.prevPlacement.variableOffsets[Be.crossTileID].anchor),Be.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Be.crossTileID]={textOffset:xt,width:C,height:E,anchor:yt,textBoxScale:T,prevAnchor:Vt},this.markUsedJustification(Fe,yt,Be,Xe),Fe.allowVerticalPlacement&&(this.markUsedOrientation(Fe,Xe,Be),this.placedOrientations[Be.crossTileID]=Xe),{shift:At,placedGlyphBoxes:Ot}}}placeLayerBucketPart(l,p,C){const{bucket:E,layout:T,translationText:U,translationIcon:q,unwrappedTileID:Z,pitchedLabelPlaneMatrix:ae,textPixelRatio:Ae,holdingForFade:ye,collisionBoxArray:pe,partiallyEvaluatedTextSize:Be,collisionGroup:Fe}=l.parameters,Xe=T.get("text-optional"),Ze=T.get("icon-optional"),et=a.aF(T,"text-overlap","text-allow-overlap"),st=et==="always",nt=a.aF(T,"icon-overlap","icon-allow-overlap"),ct=nt==="always",yt=T.get("text-rotation-alignment")==="map",xt=T.get("text-pitch-alignment")==="map",At=T.get("icon-text-fit")!=="none",Ot=T.get("symbol-z-order")==="viewport-y",Vt=st&&(ct||!E.hasIconData()||Ze),Kt=ct&&(st||!E.hasTextData()||Xe);!E.collisionArrays&&pe&&E.deserializeCollisionBoxes(pe);const jt=this.retainedQueryData[E.bucketInstanceId].tileID,qt=this._getTerrainElevationFunc(jt),Kn=this.transform.getFastPathSimpleProjectionMatrix(jt),On=(un,ei,Ji)=>{var Yr,Ms;if(p[un.crossTileID])return;if(ye)return void(this.placements[un.crossTileID]=new Xa(!1,!1,!1));let Hr=!1,cs=!1,As=!0,Qo=null,tr={box:null,placeable:!1,offscreen:null,occluded:!1},sa={placeable:!1},qo=null,Ga=null,aa=null,VA=0,$u=0,Cu=0;ei.textFeatureIndex?VA=ei.textFeatureIndex:un.useRuntimeCollisionCircles&&(VA=un.featureIndex),ei.verticalTextFeatureIndex&&($u=ei.verticalTextFeatureIndex);const HA=ei.textBox;if(HA){const pl=Kr=>{let Bo=a.ao.horizontal;if(E.allowVerticalPlacement&&!Kr&&this.prevPlacement){const Dl=this.prevPlacement.placedOrientations[un.crossTileID];Dl&&(this.placedOrientations[un.crossTileID]=Dl,Bo=Dl,this.markUsedOrientation(E,Bo,un))}return Bo},Zc=(Kr,Bo)=>{if(E.allowVerticalPlacement&&un.numVerticalGlyphVertices>0&&ei.verticalTextBox){for(const Dl of E.writingModes)if(Dl===a.ao.vertical?(tr=Bo(),sa=tr):tr=Kr(),tr&&tr.placeable)break}else tr=Kr()},Mc=un.textAnchorOffsetStartIndex,_u=un.textAnchorOffsetEndIndex;if(_u===Mc){const Kr=(Bo,Dl)=>{const la=this.collisionIndex.placeCollisionBox(Bo,et,Ae,jt,Z,xt,yt,U,Fe.predicate,qt,void 0,Kn);return la&&la.placeable&&(this.markUsedOrientation(E,Dl,un),this.placedOrientations[un.crossTileID]=Dl),la};Zc((()=>Kr(HA,a.ao.horizontal)),(()=>{const Bo=ei.verticalTextBox;return E.allowVerticalPlacement&&un.numVerticalGlyphVertices>0&&Bo?Kr(Bo,a.ao.vertical):{box:null,offscreen:null}})),pl(tr&&tr.placeable)}else{let Kr=a.aE[(Ms=(Yr=this.prevPlacement)===null||Yr===void 0?void 0:Yr.variableOffsets[un.crossTileID])===null||Ms===void 0?void 0:Ms.anchor];const Bo=(la,ZA,Xc)=>{const Rh=la.x2-la.x1,Jl=la.y2-la.y1,wc=un.textBoxScale,Ta=At&&nt==="never"?ZA:null;let ua=null,Wa=et==="never"?1:2,i0="never";Kr&&Wa++;for(let Jc=0;Jc<Wa;Jc++){for(let xu=Mc;xu<_u;xu++){const qs=E.textAnchorOffsets.get(xu);if(Kr&&qs.textAnchor!==Kr)continue;const Vu=this.attemptAnchorPlacement(qs,la,Rh,Jl,wc,yt,xt,Ae,jt,Z,Fe,i0,un,E,Xc,U,q,Ta,qt);if(Vu&&(ua=Vu.placedGlyphBoxes,ua&&ua.placeable))return Hr=!0,Qo=Vu.shift,ua}Kr?Kr=null:i0=et}return C&&!ua&&(ua={box:this.collisionIndex.placeCollisionBox(HA,"always",Ae,jt,Z,xt,yt,U,Fe.predicate,qt,void 0,Kn).box,offscreen:!1,placeable:!1,occluded:!1}),ua};Zc((()=>Bo(HA,ei.iconBox,a.ao.horizontal)),(()=>{const la=ei.verticalTextBox;return E.allowVerticalPlacement&&(!tr||!tr.placeable)&&un.numVerticalGlyphVertices>0&&la?Bo(la,ei.verticalIconBox,a.ao.vertical):{box:null,occluded:!0,offscreen:null}})),tr&&(Hr=tr.placeable,As=tr.offscreen);const Dl=pl(tr&&tr.placeable);if(!Hr&&this.prevPlacement){const la=this.prevPlacement.variableOffsets[un.crossTileID];la&&(this.variableOffsets[un.crossTileID]=la,this.markUsedJustification(E,la.anchor,un,Dl))}}}if(qo=tr,Hr=qo&&qo.placeable,As=qo&&qo.offscreen,un.useRuntimeCollisionCircles){const pl=E.text.placedSymbolArray.get(un.centerJustifiedTextSymbolIndex),Zc=a.ap(E.textSizeData,Be,pl),Mc=T.get("text-padding");Ga=this.collisionIndex.placeCollisionCircles(et,pl,E.lineVertexArray,E.glyphOffsetArray,Zc,Z,ae,C,xt,Fe.predicate,un.collisionCircleDiameter,Mc,U,qt),Ga.circles.length&&Ga.collisionDetected&&!C&&a.w("Collisions detected, but collision boxes are not shown"),Hr=st||Ga.circles.length>0&&!Ga.collisionDetected,As=As&&Ga.offscreen}if(ei.iconFeatureIndex&&(Cu=ei.iconFeatureIndex),ei.iconBox){const pl=Zc=>this.collisionIndex.placeCollisionBox(Zc,nt,Ae,jt,Z,xt,yt,q,Fe.predicate,qt,At&&Qo?Qo:void 0,Kn);sa&&sa.placeable&&ei.verticalIconBox?(aa=pl(ei.verticalIconBox),cs=aa.placeable):(aa=pl(ei.iconBox),cs=aa.placeable),As=As&&aa.offscreen}const Sd=Xe||un.numHorizontalGlyphVertices===0&&un.numVerticalGlyphVertices===0,Ed=Ze||un.numIconVertices===0;Sd||Ed?Ed?Sd||(cs=cs&&Hr):Hr=cs&&Hr:cs=Hr=cs&&Hr;const Hc=cs&&aa.placeable;if(Hr&&qo.placeable&&this.collisionIndex.insertCollisionBox(qo.box,et,T.get("text-ignore-placement"),E.bucketInstanceId,sa&&sa.placeable&&$u?$u:VA,Fe.ID),Hc&&this.collisionIndex.insertCollisionBox(aa.box,nt,T.get("icon-ignore-placement"),E.bucketInstanceId,Cu,Fe.ID),Ga&&Hr&&this.collisionIndex.insertCollisionCircles(Ga.circles,et,T.get("text-ignore-placement"),E.bucketInstanceId,VA,Fe.ID),C&&this.storeCollisionData(E.bucketInstanceId,Ji,ei,qo,aa,Ga),un.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(E.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[un.crossTileID]=new Xa((Hr||Vt)&&!qo?.occluded,(cs||Kt)&&!aa?.occluded,As||E.justReloaded),p[un.crossTileID]=!0};if(Ot){if(l.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const un=E.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let ei=un.length-1;ei>=0;--ei){const Ji=un[ei];On(E.symbolInstances.get(Ji),E.collisionArrays[Ji],Ji)}}else for(let un=l.symbolInstanceStart;un<l.symbolInstanceEnd;un++)On(E.symbolInstances.get(un),E.collisionArrays[un],un);E.justReloaded=!1}storeCollisionData(l,p,C,E,T,U){if(C.textBox||C.iconBox){let q,Z;this.collisionBoxArrays.has(l)?q=this.collisionBoxArrays.get(l):(q=new Map,this.collisionBoxArrays.set(l,q)),q.has(p)?Z=q.get(p):(Z={text:null,icon:null},q.set(p,Z)),C.textBox&&(Z.text=E.box),C.iconBox&&(Z.icon=T.box)}if(U){let q=this.collisionCircleArrays[l];q===void 0&&(q=this.collisionCircleArrays[l]=[]);for(let Z=0;Z<U.circles.length;Z+=4)q.push(U.circles[Z+0]-So),q.push(U.circles[Z+1]-So),q.push(U.circles[Z+2]),q.push(U.collisionDetected?1:0)}}markUsedJustification(l,p,C,E){let T;T=E===a.ao.vertical?C.verticalPlacedTextSymbolIndex:{left:C.leftJustifiedTextSymbolIndex,center:C.centerJustifiedTextSymbolIndex,right:C.rightJustifiedTextSymbolIndex}[a.aG(p)];const U=[C.leftJustifiedTextSymbolIndex,C.centerJustifiedTextSymbolIndex,C.rightJustifiedTextSymbolIndex,C.verticalPlacedTextSymbolIndex];for(const q of U)q>=0&&(l.text.placedSymbolArray.get(q).crossTileID=T>=0&&q!==T?0:C.crossTileID)}markUsedOrientation(l,p,C){const E=p===a.ao.horizontal||p===a.ao.horizontalOnly?p:0,T=p===a.ao.vertical?p:0,U=[C.leftJustifiedTextSymbolIndex,C.centerJustifiedTextSymbolIndex,C.rightJustifiedTextSymbolIndex];for(const q of U)l.text.placedSymbolArray.get(q).placedOrientation=E;C.verticalPlacedTextSymbolIndex&&(l.text.placedSymbolArray.get(C.verticalPlacedTextSymbolIndex).placedOrientation=T)}commit(l){this.commitTime=l,this.zoomAtLastRecencyCheck=this.transform.zoom;const p=this.prevPlacement;let C=!1;this.prevZoomAdjustment=p?p.zoomAdjustment(this.transform.zoom):0;const E=p?p.symbolFadeChange(l):1,T=p?p.opacities:{},U=p?p.variableOffsets:{},q=p?p.placedOrientations:{};for(const Z in this.placements){const ae=this.placements[Z],Ae=T[Z];Ae?(this.opacities[Z]=new xr(Ae,E,ae.text,ae.icon),C=C||ae.text!==Ae.text.placed||ae.icon!==Ae.icon.placed):(this.opacities[Z]=new xr(null,E,ae.text,ae.icon,ae.skipFade),C=C||ae.text||ae.icon)}for(const Z in T){const ae=T[Z];if(!this.opacities[Z]){const Ae=new xr(ae,E,!1,!1);Ae.isHidden()||(this.opacities[Z]=Ae,C=C||ae.text.placed||ae.icon.placed)}}for(const Z in U)this.variableOffsets[Z]||!this.opacities[Z]||this.opacities[Z].isHidden()||(this.variableOffsets[Z]=U[Z]);for(const Z in q)this.placedOrientations[Z]||!this.opacities[Z]||this.opacities[Z].isHidden()||(this.placedOrientations[Z]=q[Z]);if(p&&p.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");C?this.lastPlacementChangeTime=l:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=p?p.lastPlacementChangeTime:l)}updateLayerOpacities(l,p){const C={};for(const E of p){const T=E.getBucket(l);T&&E.latestFeatureIndex&&l.id===T.layerIds[0]&&this.updateBucketOpacities(T,E.tileID,C,E.collisionBoxArray)}}updateBucketOpacities(l,p,C,E){l.hasTextData()&&(l.text.opacityVertexArray.clear(),l.text.hasVisibleVertices=!1),l.hasIconData()&&(l.icon.opacityVertexArray.clear(),l.icon.hasVisibleVertices=!1),l.hasIconCollisionBoxData()&&l.iconCollisionBox.collisionVertexArray.clear(),l.hasTextCollisionBoxData()&&l.textCollisionBox.collisionVertexArray.clear();const T=l.layers[0],U=T.layout,q=new xr(null,0,!1,!1,!0),Z=U.get("text-allow-overlap"),ae=U.get("icon-allow-overlap"),Ae=T._unevaluatedLayout.hasValue("text-variable-anchor")||T._unevaluatedLayout.hasValue("text-variable-anchor-offset"),ye=U.get("text-rotation-alignment")==="map",pe=U.get("text-pitch-alignment")==="map",Be=U.get("icon-text-fit")!=="none",Fe=new xr(null,0,Z&&(ae||!l.hasIconData()||U.get("icon-optional")),ae&&(Z||!l.hasTextData()||U.get("text-optional")),!0);!l.collisionArrays&&E&&(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData())&&l.deserializeCollisionBoxes(E);const Xe=(et,st,nt)=>{for(let ct=0;ct<st/4;ct++)et.opacityVertexArray.emplaceBack(nt);et.hasVisibleVertices=et.hasVisibleVertices||nt!==zu},Ze=this.collisionBoxArrays.get(l.bucketInstanceId);for(let et=0;et<l.symbolInstances.length;et++){const st=l.symbolInstances.get(et),{numHorizontalGlyphVertices:nt,numVerticalGlyphVertices:ct,crossTileID:yt}=st;let xt=this.opacities[yt];C[yt]?xt=q:xt||(xt=Fe,this.opacities[yt]=xt),C[yt]=!0;const At=st.numIconVertices>0,Ot=this.placedOrientations[st.crossTileID],Vt=Ot===a.ao.vertical,Kt=Ot===a.ao.horizontal||Ot===a.ao.horizontalOnly;if(nt>0||ct>0){const qt=Al(xt.text);Xe(l.text,nt,Vt?zu:qt),Xe(l.text,ct,Kt?zu:qt);const Kn=xt.text.isHidden();[st.rightJustifiedTextSymbolIndex,st.centerJustifiedTextSymbolIndex,st.leftJustifiedTextSymbolIndex].forEach((ei=>{ei>=0&&(l.text.placedSymbolArray.get(ei).hidden=Kn||Vt?1:0)})),st.verticalPlacedTextSymbolIndex>=0&&(l.text.placedSymbolArray.get(st.verticalPlacedTextSymbolIndex).hidden=Kn||Kt?1:0);const On=this.variableOffsets[st.crossTileID];On&&this.markUsedJustification(l,On.anchor,st,Ot);const un=this.placedOrientations[st.crossTileID];un&&(this.markUsedJustification(l,"left",st,un),this.markUsedOrientation(l,un,st))}if(At){const qt=Al(xt.icon),Kn=!(Be&&st.verticalPlacedIconSymbolIndex&&Vt);st.placedIconSymbolIndex>=0&&(Xe(l.icon,st.numIconVertices,Kn?qt:zu),l.icon.placedSymbolArray.get(st.placedIconSymbolIndex).hidden=xt.icon.isHidden()),st.verticalPlacedIconSymbolIndex>=0&&(Xe(l.icon,st.numVerticalIconVertices,Kn?zu:qt),l.icon.placedSymbolArray.get(st.verticalPlacedIconSymbolIndex).hidden=xt.icon.isHidden())}const jt=Ze&&Ze.has(et)?Ze.get(et):{text:null,icon:null};if(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData()){const qt=l.collisionArrays[et];if(qt){let Kn=new a.P(0,0);if(qt.textBox||qt.verticalTextBox){let On=!0;if(Ae){const un=this.variableOffsets[yt];un?(Kn=fa(un.anchor,un.width,un.height,un.textOffset,un.textBoxScale),ye&&Kn._rotate(pe?-this.transform.bearingInRadians:this.transform.bearingInRadians)):On=!1}if(qt.textBox||qt.verticalTextBox){let un;qt.textBox&&(un=Vt),qt.verticalTextBox&&(un=Kt),zc(l.textCollisionBox.collisionVertexArray,xt.text.placed,!On||un,jt.text,Kn.x,Kn.y)}}if(qt.iconBox||qt.verticalIconBox){const On=!!(!Kt&&qt.verticalIconBox);let un;qt.iconBox&&(un=On),qt.verticalIconBox&&(un=!On),zc(l.iconCollisionBox.collisionVertexArray,xt.icon.placed,un,jt.icon,Be?Kn.x:0,Be?Kn.y:0)}}}}if(l.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[l.bucketInstanceId]&&(this.retainedQueryData[l.bucketInstanceId].featureSortOrder=l.featureSortOrder),l.hasTextData()&&l.text.opacityVertexBuffer&&l.text.opacityVertexBuffer.updateData(l.text.opacityVertexArray),l.hasIconData()&&l.icon.opacityVertexBuffer&&l.icon.opacityVertexBuffer.updateData(l.icon.opacityVertexArray),l.hasIconCollisionBoxData()&&l.iconCollisionBox.collisionVertexBuffer&&l.iconCollisionBox.collisionVertexBuffer.updateData(l.iconCollisionBox.collisionVertexArray),l.hasTextCollisionBoxData()&&l.textCollisionBox.collisionVertexBuffer&&l.textCollisionBox.collisionVertexBuffer.updateData(l.textCollisionBox.collisionVertexArray),l.text.opacityVertexArray.length!==l.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${l.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${l.text.layoutVertexArray.length}) / 4`);if(l.icon.opacityVertexArray.length!==l.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${l.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${l.icon.layoutVertexArray.length}) / 4`);l.bucketInstanceId in this.collisionCircleArrays&&(l.collisionCircleArray=this.collisionCircleArrays[l.bucketInstanceId],delete this.collisionCircleArrays[l.bucketInstanceId])}symbolFadeChange(l){return this.fadeDuration===0?1:(l-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(l){return Math.max(0,(this.transform.zoom-l)/1.5)}hasTransitions(l){return this.stale||l-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(l,p){const C=this.zoomAtLastRecencyCheck===p?1-this.zoomAdjustment(p):1;return this.zoomAtLastRecencyCheck=p,this.commitTime+this.fadeDuration*C>l}setStale(){this.stale=!0}}function zc(B,l,p,C,E,T){C&&C.length!==0||(C=[0,0,0,0]);const U=C[0]-So,q=C[1]-So,Z=C[2]-So,ae=C[3]-So;B.emplaceBack(l?1:0,p?1:0,E||0,T||0,U,q),B.emplaceBack(l?1:0,p?1:0,E||0,T||0,Z,q),B.emplaceBack(l?1:0,p?1:0,E||0,T||0,Z,ae),B.emplaceBack(l?1:0,p?1:0,E||0,T||0,U,ae)}const Ah=Math.pow(2,25),hA=Math.pow(2,24),Ns=Math.pow(2,17),xl=Math.pow(2,16),jc=Math.pow(2,9),Ja=Math.pow(2,8),Nc=Math.pow(2,1);function Al(B){if(B.opacity===0&&!B.placed)return 0;if(B.opacity===1&&B.placed)return 4294967295;const l=B.placed?1:0,p=Math.floor(127*B.opacity);return p*Ah+l*hA+p*Ns+l*xl+p*jc+l*Ja+p*Nc+l}const zu=0;class Ba{constructor(l){this._sortAcrossTiles=l.layout.get("symbol-z-order")!=="viewport-y"&&!l.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(l,p,C,E,T){const U=this._bucketParts;for(;this._currentTileIndex<l.length;)if(p.getBucketParts(U,E,l[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,T())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,U.sort(((q,Z)=>q.sortKey-Z.sortKey)));this._currentPartIndex<U.length;)if(p.placeLayerBucketPart(U[this._currentPartIndex],this._seenCrossTileIDs,C),this._currentPartIndex++,T())return!0;return!1}}class lc{constructor(l,p,C,E,T,U,q,Z){this.placement=new _l(l,p,U,q,Z),this._currentPlacementIndex=C.length-1,this._forceFullPlacement=E,this._showCollisionBoxes=T,this._done=!1}isDone(){return this._done}continuePlacement(l,p,C){const E=x.now(),T=()=>!this._forceFullPlacement&&x.now()-E>2;for(;this._currentPlacementIndex>=0;){const U=p[l[this._currentPlacementIndex]],q=this.placement.collisionIndex.transform.zoom;if(U.type==="symbol"&&(!U.minzoom||U.minzoom<=q)&&(!U.maxzoom||U.maxzoom>q)){if(this._inProgressLayer||(this._inProgressLayer=new Ba(U)),this._inProgressLayer.continuePlacement(C[U.source],this.placement,this._showCollisionBoxes,U,T))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(l){return this.placement.commit(l),this.placement}}const uu=512/a.$/2;class Ml{constructor(l,p,C){this.tileID=l,this.bucketInstanceId=C,this._symbolsByKey={};const E=new Map;for(let T=0;T<p.length;T++){const U=p.get(T),q=U.key,Z=E.get(q);Z?Z.push(U):E.set(q,[U])}for(const[T,U]of E){const q={positions:U.map((Z=>({x:Math.floor(Z.anchorX*uu),y:Math.floor(Z.anchorY*uu)}))),crossTileIDs:U.map((Z=>Z.crossTileID))};if(q.positions.length>128){const Z=new a.aI(q.positions.length,16,Uint16Array);for(const{x:ae,y:Ae}of q.positions)Z.add(ae,Ae);Z.finish(),delete q.positions,q.index=Z}this._symbolsByKey[T]=q}}getScaledCoordinates(l,p){const{x:C,y:E,z:T}=this.tileID.canonical,{x:U,y:q,z:Z}=p.canonical,ae=uu/Math.pow(2,Z-T),Ae=(q*a.$+l.anchorY)*ae,ye=E*a.$*uu;return{x:Math.floor((U*a.$+l.anchorX)*ae-C*a.$*uu),y:Math.floor(Ae-ye)}}findMatches(l,p,C){const E=this.tileID.canonical.z<p.canonical.z?1:Math.pow(2,this.tileID.canonical.z-p.canonical.z);for(let T=0;T<l.length;T++){const U=l.get(T);if(U.crossTileID)continue;const q=this._symbolsByKey[U.key];if(!q)continue;const Z=this.getScaledCoordinates(U,p);if(q.index){const ae=q.index.range(Z.x-E,Z.y-E,Z.x+E,Z.y+E).sort();for(const Ae of ae){const ye=q.crossTileIDs[Ae];if(!C[ye]){C[ye]=!0,U.crossTileID=ye;break}}}else if(q.positions)for(let ae=0;ae<q.positions.length;ae++){const Ae=q.positions[ae],ye=q.crossTileIDs[ae];if(Math.abs(Ae.x-Z.x)<=E&&Math.abs(Ae.y-Z.y)<=E&&!C[ye]){C[ye]=!0,U.crossTileID=ye;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map((({crossTileIDs:l})=>l))}}class cu{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class zA{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(l){const p=Math.round((l-this.lng)/360);if(p!==0)for(const C in this.indexes){const E=this.indexes[C],T={};for(const U in E){const q=E[U];q.tileID=q.tileID.unwrapTo(q.tileID.wrap+p),T[q.tileID.key]=q}this.indexes[C]=T}this.lng=l}addBucket(l,p,C){if(this.indexes[l.overscaledZ]&&this.indexes[l.overscaledZ][l.key]){if(this.indexes[l.overscaledZ][l.key].bucketInstanceId===p.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(l.overscaledZ,this.indexes[l.overscaledZ][l.key])}for(let T=0;T<p.symbolInstances.length;T++)p.symbolInstances.get(T).crossTileID=0;this.usedCrossTileIDs[l.overscaledZ]||(this.usedCrossTileIDs[l.overscaledZ]={});const E=this.usedCrossTileIDs[l.overscaledZ];for(const T in this.indexes){const U=this.indexes[T];if(Number(T)>l.overscaledZ)for(const q in U){const Z=U[q];Z.tileID.isChildOf(l)&&Z.findMatches(p.symbolInstances,l,E)}else{const q=U[l.scaledTo(Number(T)).key];q&&q.findMatches(p.symbolInstances,l,E)}}for(let T=0;T<p.symbolInstances.length;T++){const U=p.symbolInstances.get(T);U.crossTileID||(U.crossTileID=C.generate(),E[U.crossTileID]=!0)}return this.indexes[l.overscaledZ]===void 0&&(this.indexes[l.overscaledZ]={}),this.indexes[l.overscaledZ][l.key]=new Ml(l,p.symbolInstances,p.bucketInstanceId),!0}removeBucketCrossTileIDs(l,p){for(const C of p.getCrossTileIDsLists())for(const E of C)delete this.usedCrossTileIDs[l][E]}removeStaleBuckets(l){let p=!1;for(const C in this.indexes){const E=this.indexes[C];for(const T in E)l[E[T].bucketInstanceId]||(this.removeBucketCrossTileIDs(C,E[T]),delete E[T],p=!0)}return p}}class Ia{constructor(){this.layerIndexes={},this.crossTileIDs=new cu,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(l,p,C){let E=this.layerIndexes[l.id];E===void 0&&(E=this.layerIndexes[l.id]=new zA);let T=!1;const U={};E.handleWrapJump(C);for(const q of p){const Z=q.getBucket(l);Z&&l.id===Z.layerIds[0]&&(Z.bucketInstanceId||(Z.bucketInstanceId=++this.maxBucketInstanceId),E.addBucket(q.tileID,Z,this.crossTileIDs)&&(T=!0),U[Z.bucketInstanceId]=!0)}return E.removeStaleBuckets(U)&&(T=!0),T}pruneUnusedLayers(l){const p={};l.forEach((C=>{p[C]=!0}));for(const C in this.layerIndexes)p[C]||delete this.layerIndexes[C]}}var jo="void main() {fragColor=vec4(1.0);}";const xo={prelude:Wi(`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
out highp vec4 fragColor;`,`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}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
);}
#ifdef TERRAIN3D
uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
#endif
const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
#ifdef TERRAIN3D
highp float d=unpack(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));
#else
return 1.0;
#endif
}float calculate_visibility(vec4 pos) {
#ifdef TERRAIN3D
vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
#else
return 1.0;
#endif
}float ele(vec2 pos) {
#ifdef TERRAIN3D
vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
#else
return 0.0;
#endif
}float get_elevation(vec2 pos) {
#ifdef TERRAIN3D
#ifdef GLOBE
if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}
#endif
vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
#else
return 0.0;
#endif
}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:Wi("","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:Wi("",`#define GLOBE_RADIUS 6371008.8
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
);}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);
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
);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:Wi(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:Wi(`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;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,"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:Wi(`in vec3 v_data;in float v_visibility;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=v_data.xy;float extrude_length=length(extrude);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;}
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 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) {
#ifdef GLOBE
vec3 center_vector=projectToSphere(circle_center);
#endif
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 {
#ifdef GLOBE
vec4 projected_center=interpolateProjection(circle_center,center_vector,ele);
#else
vec4 projected_center=projectTileWithElevation(circle_center,ele);
#endif
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);}
#ifdef GLOBE
vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);
#else
gl_Position=projectTileWithElevation(corner_position,ele);
#endif
} 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:Wi(jo,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:Wi(`uniform highp float u_intensity;in vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`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;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 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);
#ifdef GLOBE
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);
#else
gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));
#endif
}`),heatmapTexture:Wi(`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;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(0.0);
#endif
}`,"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:Wi("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:Wi("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);}"),colorRelief:Wi(`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else
{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0));
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:Wi("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:Wi(jo,`in vec2 a_pos;void main() {
#ifdef GLOBE
gl_Position=projectTileFor3D(a_pos,0.0);
#else
gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);
#endif
}`),fill:Wi(`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
fragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`uniform vec2 u_fill_translate;in vec2 a_pos;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:Wi(`in vec2 v_pos;
#ifdef GLOBE
in float v_depth;
#endif
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;
#ifdef GLOBE
out float v_depth;
#endif
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
}`),fillOutlinePattern:Wi(`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;
#ifdef GLOBE
in float v_depth;
#endif
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=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;
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`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;
#ifdef GLOBE
out float v_depth;
#endif
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=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;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
}`),fillPattern:Wi(`#ifdef GL_ES
precision highp float;
#endif
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=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;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=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:Wi(`in vec4 v_color;void main() {fragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`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;
#ifdef TERRAIN3D
in vec2 a_centroid;
#endif
out vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;
#ifdef TERRAIN3D
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
#else
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
#endif
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
#ifdef GLOBE
vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
#else
gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
#endif
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);
#ifdef GLOBE
mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);
#endif
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:Wi(`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;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=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;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`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;
#ifdef TERRAIN3D
in vec2 a_centroid;
#endif
#ifdef GLOBE
out vec3 v_sphere_pos;
#endif
out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
#ifdef TERRAIN3D
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
#else
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
#endif
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
#ifdef GLOBE
vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
#else
gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
#endif
vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
? a_pos
: 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:Wi(`#ifdef GL_ES
precision highp float;
#endif
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);
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,"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:Wi(`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];
#define PI 3.141592653589793
#define STANDARD 0
#define COMBINED 1
#define IGOR 2
#define MULTIDIRECTIONAL 3
#define BASIC 4
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
{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
{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;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);}
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,"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:Wi(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;
#ifdef GLOBE
in float v_depth;
#endif
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
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;
#ifdef GLOBE
out float v_depth;
#endif
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);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;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
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;
#endif
v_width2=vec2(outset,inset);}`),lineGradient:Wi(`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;
#ifdef GLOBE
in float v_depth;
#endif
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
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;
#ifdef GLOBE
out float v_depth;
#endif
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);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;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
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;
#endif
v_width2=vec2(outset,inset);}`),linePattern:Wi(`#ifdef GL_ES
precision highp float;
#endif
uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;
#ifdef GLOBE
in float v_depth;
#endif
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
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;
#ifdef GLOBE
out float v_depth;
#endif
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);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;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
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;
#endif
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Wi(`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;
#ifdef GLOBE
in float v_depth;
#endif
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=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);
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
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;
#ifdef GLOBE
out float v_depth;
#endif
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);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;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
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;
#endif
v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Wi(`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);
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`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;
#ifdef GLOBE
if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}
#endif
v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:Wi(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`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;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=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;
#ifdef GLOBE
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);}
#endif
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:Wi(`#define SDF_PX 8.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=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);
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=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;
#ifdef GLOBE
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);}
#endif
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:Wi(`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=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);
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=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;
#ifdef GLOBE
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);}
#endif
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:Wi("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:Wi("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:Wi("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:Wi("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:Wi(`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
);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:Wi("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 Wi(B,l){const p=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,C=l.match(/in ([\w]+) ([\w]+)/g),E=B.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),T=l.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),U=T?T.concat(E):E,q={};return{fragmentSource:B=B.replace(p,((Z,ae,Ae,ye,pe)=>(q[pe]=!0,ae==="define"?`
#ifndef HAS_UNIFORM_u_${pe}
in ${Ae} ${ye} ${pe};
#else
uniform ${Ae} ${ye} u_${pe};
#endif
`:`
#ifdef HAS_UNIFORM_u_${pe}
${Ae} ${ye} ${pe} = u_${pe};
#endif
`))),vertexSource:l=l.replace(p,((Z,ae,Ae,ye,pe)=>{const Be=ye==="float"?"vec2":"vec4",Fe=pe.match(/color/)?"color":Be;return q[pe]?ae==="define"?`
#ifndef HAS_UNIFORM_u_${pe}
uniform lowp float u_${pe}_t;
in ${Ae} ${Be} a_${pe};
out ${Ae} ${ye} ${pe};
#else
uniform ${Ae} ${ye} u_${pe};
#endif
`:Fe==="vec4"?`
#ifndef HAS_UNIFORM_u_${pe}
${pe} = a_${pe};
#else
${Ae} ${ye} ${pe} = u_${pe};
#endif
`:`
#ifndef HAS_UNIFORM_u_${pe}
${pe} = unpack_mix_${Fe}(a_${pe}, u_${pe}_t);
#else
${Ae} ${ye} ${pe} = u_${pe};
#endif
`:ae==="define"?`
#ifndef HAS_UNIFORM_u_${pe}
uniform lowp float u_${pe}_t;
in ${Ae} ${Be} a_${pe};
#else
uniform ${Ae} ${ye} u_${pe};
#endif
`:Fe==="vec4"?`
#ifndef HAS_UNIFORM_u_${pe}
${Ae} ${ye} ${pe} = a_${pe};
#else
${Ae} ${ye} ${pe} = u_${pe};
#endif
`:`
#ifndef HAS_UNIFORM_u_${pe}
${Ae} ${ye} ${pe} = unpack_mix_${Fe}(a_${pe}, u_${pe}_t);
#else
${Ae} ${ye} ${pe} = u_${pe};
#endif
`})),staticAttributes:C,staticUniforms:U}}class Ql{constructor(l,p,C){this.vertexBuffer=l,this.indexBuffer=p,this.segments=C}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var Fo=a.aJ([{name:"a_pos",type:"Int16",components:2}]);const wl="#define PROJECTION_MERCATOR",Au="mercator";class er{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return Au}get shaderDefine(){return wl}get shaderPreludeCode(){return xo.projectionMercator}get vertexShaderPreludeCode(){return xo.projectionMercator.vertexSource}get subdivisionGranularity(){return a.aK.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(l){}getMeshFromTileID(l,p,C,E,T){if(this._cachedMesh)return this._cachedMesh;const U=new a.aL;U.emplaceBack(0,0),U.emplaceBack(a.$,0),U.emplaceBack(0,a.$),U.emplaceBack(a.$,a.$);const q=l.createVertexBuffer(U,Fo.members),Z=a.aM.simpleSegment(0,0,4,2),ae=new a.aN;ae.emplaceBack(1,0,2),ae.emplaceBack(1,2,3);const Ae=l.createIndexBuffer(ae);return this._cachedMesh=new Ql(q,Ae,Z),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(l){}}class Sl{constructor(l=0,p=0,C=0,E=0){if(isNaN(l)||l<0||isNaN(p)||p<0||isNaN(C)||C<0||isNaN(E)||E<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=l,this.bottom=p,this.left=C,this.right=E}interpolate(l,p,C){return p.top!=null&&l.top!=null&&(this.top=a.C.number(l.top,p.top,C)),p.bottom!=null&&l.bottom!=null&&(this.bottom=a.C.number(l.bottom,p.bottom,C)),p.left!=null&&l.left!=null&&(this.left=a.C.number(l.left,p.left,C)),p.right!=null&&l.right!=null&&(this.right=a.C.number(l.right,p.right,C)),this}getCenter(l,p){const C=a.ah((this.left+l-this.right)/2,0,l),E=a.ah((this.top+p-this.bottom)/2,0,p);return new a.P(C,E)}equals(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right}clone(){return new Sl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function ju(B,l){if(!B.renderWorldCopies||B.lngRange)return;const p=l.lng-B.center.lng;l.lng+=p>180?-360:p<-180?360:0}function Mo(B){return Math.max(0,Math.floor(B))}class es{constructor(l,p,C,E,T,U){this._callbacks=l,this._tileSize=512,this._renderWorldCopies=U===void 0||!!U,this._minZoom=p||0,this._maxZoom=C||22,this._minPitch=E??0,this._maxPitch=T??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new a.S(0,0),this._elevation=0,this._zoom=0,this._tileZoom=Mo(this._zoom),this._scale=a.af(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Sl,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(l,p,C){this._latRange=l.latRange,this._lngRange=l.lngRange,this._width=l.width,this._height=l.height,this._center=l.center,this._elevation=l.elevation,this._minElevationForCurrentTile=l.minElevationForCurrentTile,this._zoom=l.zoom,this._tileZoom=Mo(this._zoom),this._scale=a.af(this._zoom),this._bearingInRadians=l.bearingInRadians,this._fovInRadians=l.fovInRadians,this._pitchInRadians=l.pitchInRadians,this._rollInRadians=l.rollInRadians,this._unmodified=l.unmodified,this._edgeInsets=new Sl(l.padding.top,l.padding.bottom,l.padding.left,l.padding.right),this._minZoom=l.minZoom,this._maxZoom=l.maxZoom,this._minPitch=l.minPitch,this._maxPitch=l.maxPitch,this._renderWorldCopies=l.renderWorldCopies,this._cameraToCenterDistance=l.cameraToCenterDistance,this._nearZ=l.nearZ,this._farZ=l.farZ,this._autoCalculateNearFarZ=!C&&l.autoCalculateNearFarZ,p&&this._constrain(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(l){this._minElevationForCurrentTile=l}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(l){this._minZoom!==l&&(this._minZoom=l,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(l){this._maxZoom!==l&&(this._maxZoom=l,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(l){this._minPitch!==l&&(this._minPitch=l,this.setPitch(Math.max(this.pitch,l)))}get maxPitch(){return this._maxPitch}setMaxPitch(l){this._maxPitch!==l&&(this._maxPitch=l,this.setPitch(Math.min(this.pitch,l)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(l){l===void 0?l=!0:l===null&&(l=!1),this._renderWorldCopies=l}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(l){const p=a.aO(l,-180,180)*Math.PI/180;var C,E,T,U,q,Z,ae,Ae,ye;this._bearingInRadians!==p&&(this._unmodified=!1,this._bearingInRadians=p,this._calcMatrices(),this._rotationMatrix=A(),C=this._rotationMatrix,T=-this._bearingInRadians,U=(E=this._rotationMatrix)[0],q=E[1],Z=E[2],ae=E[3],Ae=Math.sin(T),ye=Math.cos(T),C[0]=U*ye+Z*Ae,C[1]=q*ye+ae*Ae,C[2]=U*-Ae+Z*ye,C[3]=q*-Ae+ae*ye)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(l){const p=a.ah(l,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==p&&(this._unmodified=!1,this._pitchInRadians=p,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(l){const p=l/180*Math.PI;this._rollInRadians!==p&&(this._unmodified=!1,this._rollInRadians=p,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return a.aP(this._fovInRadians)}setFov(l){l=a.ah(l,.1,150),this.fov!==l&&(this._unmodified=!1,this._fovInRadians=a.ae(l),this._calcMatrices())}get zoom(){return this._zoom}setZoom(l){const p=this.getConstrained(this._center,l).zoom;this._zoom!==p&&(this._unmodified=!1,this._zoom=p,this._tileZoom=Math.max(0,Math.floor(p)),this._scale=a.af(p),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(l){l.lat===this._center.lat&&l.lng===this._center.lng||(this._unmodified=!1,this._center=l,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(l){l!==this._elevation&&(this._elevation=l,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(l){this._edgeInsets.equals(l)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,l,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(l,p){this._autoCalculateNearFarZ=!1,this._nearZ=l,this._farZ=p,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(l){return this._edgeInsets.equals(l)}interpolatePadding(l,p,C){this._unmodified=!1,this._edgeInsets.interpolate(l,p,C),this._constrain(),this._calcMatrices()}resize(l,p,C=!0){this._width=l,this._height=p,C&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new rt([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(l){l?(this._lngRange=[l.getWest(),l.getEast()],this._latRange=[l.getSouth(),l.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-a.ai,a.ai])}getConstrained(l,p){return this._callbacks.getConstrained(l,p)}getCameraQueryGeometry(l,p){if(p.length===1)return[p[0],l];{const{minX:C,minY:E,maxX:T,maxY:U}=a.a2.fromPoints(p).extend(l);return[new a.P(C,E),new a.P(T,E),new a.P(T,U),new a.P(C,U),new a.P(C,E)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const l=this._unmodified,{center:p,zoom:C}=this.getConstrained(this.center,this.zoom);this.setCenter(p),this.setZoom(C),this._unmodified=l,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let l=a.ag(new Float64Array(16));a.N(l,l,[this._width/2,-this._height/2,1]),a.M(l,l,[1,-1,0]),this._clipSpaceToPixelsMatrix=l,l=a.ag(new Float64Array(16)),a.N(l,l,[1,-1,1]),a.M(l,l,[-1,-1,0]),a.N(l,l,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=l,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(l,p,C,E){const T=C!==void 0?C:this.bearing,U=E=E!==void 0?E:this.pitch,q=a.a1.fromLngLat(l,p),Z=-Math.cos(a.ae(U)),ae=Math.sin(a.ae(U)),Ae=ae*Math.sin(a.ae(T)),ye=-ae*Math.cos(a.ae(T));let pe=this.elevation;const Be=p-pe;let Fe;Z*Be>=0||Math.abs(Z)<.1?(Fe=1e4,pe=p+Fe*Z):Fe=-Be/Z;let Xe,Ze,et=a.aQ(1,q.y),st=0;do{if(st+=1,st>10)break;Ze=Fe/et,Xe=new a.a1(q.x+Ae*Ze,q.y+ye*Ze),et=1/Xe.meterInMercatorCoordinateUnits()}while(Math.abs(Fe-Ze*et)>1e-12);return{center:Xe.toLngLat(),elevation:pe,zoom:a.ak(this.height/2/Math.tan(this.fovInRadians/2)/Ze/this.tileSize)}}recalculateZoomAndCenter(l){if(this.elevation-l==0)return;const p=a.aj(1,this.center.lat)*this.worldSize,C=this.cameraToCenterDistance/p,E=a.a1.fromLngLat(this.center,this.elevation),T=be(this.center,this.elevation,this.pitch,this.bearing,C);this._elevation=l;const U=this.calculateCenterFromCameraLngLatAlt(T.toLngLat(),a.aQ(T.z,E.y),this.bearing,this.pitch);this._elevation=U.elevation,this._center=U.center,this.setZoom(U.zoom)}getCameraPoint(){const l=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.P(l*Math.sin(this.rollInRadians),l*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){const l=a.aj(1,this.center.lat)*this.worldSize;return be(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/l).toLngLat()}getMercatorTileCoordinates(l){if(!l)return[0,0,1,1];const p=l.canonical.z>=0?1<<l.canonical.z:Math.pow(2,l.canonical.z);return[l.canonical.x/p,l.canonical.y/p,1/p/a.$,1/p/a.$]}}class ls{constructor(l,p){this.min=l,this.max=p,this.center=a.aR([],a.aS([],this.min,this.max),.5)}quadrant(l){const p=[l%2==0,l<2],C=a.aT(this.min),E=a.aT(this.max);for(let T=0;T<p.length;T++)C[T]=p[T]?this.min[T]:this.center[T],E[T]=p[T]?this.center[T]:this.max[T];return E[2]=this.max[2],new ls(C,E)}distanceX(l){return Math.max(Math.min(this.max[0],l[0]),this.min[0])-l[0]}distanceY(l){return Math.max(Math.min(this.max[1],l[1]),this.min[1])-l[1]}intersectsFrustum(l){let p=!0;for(let C=0;C<l.planes.length;C++){const E=this.intersectsPlane(l.planes[C]);if(E===0)return 0;E===1&&(p=!1)}return p?2:l.aabb.min[0]>this.max[0]||l.aabb.min[1]>this.max[1]||l.aabb.min[2]>this.max[2]||l.aabb.max[0]<this.min[0]||l.aabb.max[1]<this.min[1]||l.aabb.max[2]<this.min[2]?0:1}intersectsPlane(l){let p=l[3],C=l[3];for(let E=0;E<3;E++)l[E]>0?(p+=l[E]*this.min[E],C+=l[E]*this.max[E]):(C+=l[E]*this.min[E],p+=l[E]*this.max[E]);return p>=0?2:C<0?0:1}}class No{distanceToTile2d(l,p,C,E){const T=E.distanceX([l,p]),U=E.distanceY([l,p]);return Math.hypot(T,U)}getWrap(l,p,C){return C}getTileBoundingVolume(l,p,C,E){var T,U;let q=0,Z=0;if(E?.terrain){const Ae=new a.Z(l.z,p,l.z,l.x,l.y),ye=E.terrain.getMinMaxElevation(Ae);q=(T=ye.minElevation)!==null&&T!==void 0?T:Math.min(0,C),Z=(U=ye.maxElevation)!==null&&U!==void 0?U:Math.max(0,C)}const ae=1<<l.z;return new ls([p+l.x/ae,l.y/ae,q],[p+(l.x+1)/ae,(l.y+1)/ae,Z])}allowVariableZoom(l,p){const C=l.fov*(Math.abs(Math.cos(l.rollInRadians))*l.height+Math.abs(Math.sin(l.rollInRadians))*l.width)/l.height,E=a.ah(78.5-C/2,0,60);return!!p.terrain||l.pitch>E}allowWorldCopies(){return!0}prepareNextFrame(){}}class Go{constructor(l,p,C){this.points=l,this.planes=p,this.aabb=C}static fromInvProjectionMatrix(l,p=1,C=0,E,T){const U=T?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],q=Math.pow(2,C),Z=[[-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((pe=>(function(Be,Fe,Xe,Ze){const et=a.aw([],Be,Fe),st=1/et[3]/Xe*Ze;return a.aY(et,et,[st,st,1/et[3],st])})(pe,l,p,q)));E&&(function(pe,Be,Fe,Xe){const Ze=Xe?4:0,et=Xe?0:4;let st=0;const nt=[],ct=[];for(let At=0;At<4;At++){const Ot=a.aU([],pe[At+et],pe[At+Ze]),Vt=a.aZ(Ot);a.aR(Ot,Ot,1/Vt),nt.push(Vt),ct.push(Ot)}for(let At=0;At<4;At++){const Ot=a.a_(pe[At+Ze],ct[At],Fe);st=Ot!==null&&Ot>=0?Math.max(st,Ot):Math.max(st,nt[At])}const yt=(function(At,Ot){const Vt=a.aU([],At[Ot[0]],At[Ot[1]]),Kt=a.aU([],At[Ot[2]],At[Ot[1]]),jt=[0,0,0,0];return a.aV(jt,a.aW([],Vt,Kt)),jt[3]=-a.aX(jt,At[Ot[0]]),jt})(pe,Be),xt=(function(At,Ot){const Vt=a.a$(At),Kt=a.b0([],At,1/Vt),jt=a.aU([],Ot,a.aR([],Kt,a.aX(Ot,Kt))),qt=a.a$(jt);if(qt>0){const Kn=Math.sqrt(1-Kt[3]*Kt[3]),On=a.aR([],Kt,-Kt[3]),un=a.aS([],On,a.aR([],jt,Kn/qt));return a.b1(Ot,un)}return null})(Fe,yt);if(xt!==null){const At=xt/a.aX(ct[0],yt);st=Math.min(st,At)}for(let At=0;At<4;At++){const Ot=Math.min(st,nt[At]);pe[At+et]=[pe[At+Ze][0]+ct[At][0]*Ot,pe[At+Ze][1]+ct[At][1]*Ot,pe[At+Ze][2]+ct[At][2]*Ot,1]}})(Z,U[0],E,T);const ae=U.map((pe=>{const Be=a.aU([],Z[pe[0]],Z[pe[1]]),Fe=a.aU([],Z[pe[2]],Z[pe[1]]),Xe=a.aV([],a.aW([],Be,Fe)),Ze=-a.aX(Xe,Z[pe[1]]);return Xe.concat(Ze)})),Ae=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],ye=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const pe of Z)for(let Be=0;Be<3;Be++)Ae[Be]=Math.min(Ae[Be],pe[Be]),ye[Be]=Math.max(ye[Be],pe[Be]);return new Go(Z,ae,new ls(Ae,ye))}}class Mr{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(l){this._helper.setMinZoom(l)}setMaxZoom(l){this._helper.setMaxZoom(l)}setMinPitch(l){this._helper.setMinPitch(l)}setMaxPitch(l){this._helper.setMaxPitch(l)}setRenderWorldCopies(l){this._helper.setRenderWorldCopies(l)}setBearing(l){this._helper.setBearing(l)}setPitch(l){this._helper.setPitch(l)}setRoll(l){this._helper.setRoll(l)}setFov(l){this._helper.setFov(l)}setZoom(l){this._helper.setZoom(l)}setCenter(l){this._helper.setCenter(l)}setElevation(l){this._helper.setElevation(l)}setMinElevationForCurrentTile(l){this._helper.setMinElevationForCurrentTile(l)}setPadding(l){this._helper.setPadding(l)}interpolatePadding(l,p,C){return this._helper.interpolatePadding(l,p,C)}isPaddingEqual(l){return this._helper.isPaddingEqual(l)}resize(l,p,C=!0){this._helper.resize(l,p,C)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(l){this._helper.setMaxBounds(l)}overrideNearFarZ(l,p){this._helper.overrideNearFarZ(l,p)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(l){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),l)}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(l,p){}constructor(l,p,C,E,T){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new es({calcMatrices:()=>{this._calcMatrices()},getConstrained:(U,q)=>this.getConstrained(U,q)},l,p,C,E,T),this._coveringTilesDetailsProvider=new No}clone(){const l=new Mr;return l.apply(this),l}apply(l,p,C){this._helper.apply(l,p,C)}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(l){const p=[new a.b2(0,l)];if(this._helper._renderWorldCopies){const C=this.screenPointToMercatorCoordinate(new a.P(0,0)),E=this.screenPointToMercatorCoordinate(new a.P(this._helper._width,0)),T=this.screenPointToMercatorCoordinate(new a.P(this._helper._width,this._helper._height)),U=this.screenPointToMercatorCoordinate(new a.P(0,this._helper._height)),q=Math.floor(Math.min(C.x,E.x,T.x,U.x)),Z=Math.floor(Math.max(C.x,E.x,T.x,U.x)),ae=1;for(let Ae=q-ae;Ae<=Z+ae;Ae++)Ae!==0&&p.push(new a.b2(Ae,l))}return p}getCameraFrustum(){return Go.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(l){const p=this.screenPointToLocation(this.centerPoint,l),C=l?l.getElevationForLngLatZoom(p,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(C)}setLocationAtPoint(l,p){const C=a.aj(this.elevation,this.center.lat),E=this.screenPointToMercatorCoordinateAtZ(p,C),T=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,C),U=a.a1.fromLngLat(l),q=new a.a1(U.x-(E.x-T.x),U.y-(E.y-T.y));this.setCenter(q?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(l,p){return p?this.coordinatePoint(a.a1.fromLngLat(l),p.getElevationForLngLatZoom(l,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(a.a1.fromLngLat(l))}screenPointToLocation(l,p){var C;return(C=this.screenPointToMercatorCoordinate(l,p))===null||C===void 0?void 0:C.toLngLat()}screenPointToMercatorCoordinate(l,p){if(p){const C=p.pointCoordinate(l);if(C!=null)return C}return this.screenPointToMercatorCoordinateAtZ(l)}screenPointToMercatorCoordinateAtZ(l,p){const C=p||0,E=[l.x,l.y,0,1],T=[l.x,l.y,1,1];a.aw(E,E,this._pixelMatrixInverse),a.aw(T,T,this._pixelMatrixInverse);const U=E[3],q=T[3],Z=E[1]/U,ae=T[1]/q,Ae=E[2]/U,ye=T[2]/q,pe=Ae===ye?0:(C-Ae)/(ye-Ae);return new a.a1(a.C.number(E[0]/U,T[0]/q,pe)/this.worldSize,a.C.number(Z,ae,pe)/this.worldSize,C)}coordinatePoint(l,p=0,C=this._pixelMatrix){const E=[l.x*this.worldSize,l.y*this.worldSize,p,1];return a.aw(E,E,C),new a.P(E[0]/E[3],E[1]/E[3])}getBounds(){const l=Math.max(0,this._helper._height/2-He(this));return new rt().extend(this.screenPointToLocation(new a.P(0,l))).extend(this.screenPointToLocation(new a.P(this._helper._width,l))).extend(this.screenPointToLocation(new a.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new a.P(0,this._helper._height)))}isPointOnMapSurface(l,p){return p?p.pointCoordinate(l)!=null:l.y>this.height/2-He(this)}calculatePosMatrix(l,p=!1,C){var E;const T=(E=l.key)!==null&&E!==void 0?E:a.b3(l.wrap,l.canonical.z,l.canonical.z,l.canonical.x,l.canonical.y),U=p?this._alignedPosMatrixCache:this._posMatrixCache;if(U.has(T)){const ae=U.get(T);return C?ae.f32:ae.f64}const q=lt(l,this.worldSize);a.O(q,p?this._alignedProjMatrix:this._viewProjMatrix,q);const Z={f64:q,f32:new Float32Array(q)};return U.set(T,Z),C?Z.f32:Z.f64}calculateFogMatrix(l){const p=l.key,C=this._fogMatrixCacheF32;if(C.has(p))return C.get(p);const E=lt(l,this.worldSize);return a.O(E,this._fogMatrix,E),C.set(p,new Float32Array(E)),C.get(p)}getConstrained(l,p){p=a.ah(+p,this.minZoom,this.maxZoom);const C={center:new a.S(l.lng,l.lat),zoom:p};let E=this._helper._lngRange;if(!this._helper._renderWorldCopies&&E===null){const nt=179.9999999999;E=[-nt,nt]}const T=this.tileSize*a.af(C.zoom);let U=0,q=T,Z=0,ae=T,Ae=0,ye=0;const{x:pe,y:Be}=this.size;if(this._helper._latRange){const nt=this._helper._latRange;U=a.U(nt[1])*T,q=a.U(nt[0])*T,q-U<Be&&(Ae=Be/(q-U))}E&&(Z=a.aO(a.V(E[0])*T,0,T),ae=a.aO(a.V(E[1])*T,0,T),ae<Z&&(ae+=T),ae-Z<pe&&(ye=pe/(ae-Z)));const{x:Fe,y:Xe}=Ce(T,l);let Ze,et;const st=Math.max(ye||0,Ae||0);if(st){const nt=new a.P(ye?(ae+Z)/2:Fe,Ae?(q+U)/2:Xe);return C.center=Ue(T,nt).wrap(),C.zoom+=a.ak(st),C}if(this._helper._latRange){const nt=Be/2;Xe-nt<U&&(et=U+nt),Xe+nt>q&&(et=q-nt)}if(E){const nt=(Z+ae)/2;let ct=Fe;this._helper._renderWorldCopies&&(ct=a.aO(Fe,nt-T/2,nt+T/2));const yt=pe/2;ct-yt<Z&&(Ze=Z+yt),ct+yt>ae&&(Ze=ae-yt)}if(Ze!==void 0||et!==void 0){const nt=new a.P(Ze??Fe,et??Xe);C.center=Ue(T,nt).wrap()}return C}calculateCenterFromCameraLngLatAlt(l,p,C,E){return this._helper.calculateCenterFromCameraLngLatAlt(l,p,C,E)}_calculateNearFarZIfNeeded(l,p,C){if(!this._helper.autoCalculateNearFarZ)return;const E=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),T=l-E*this._helper._pixelPerMeter/Math.cos(p),U=E<0?T:l,q=Math.PI/2+this.pitchInRadians,Z=a.ae(this.fov)*(Math.abs(Math.cos(a.ae(this.roll)))*this.height+Math.abs(Math.sin(a.ae(this.roll)))*this.width)/this.height*(.5+C.y/this.height),ae=Math.sin(Z)*U/Math.sin(a.ah(Math.PI-q-Z,.01,Math.PI-.01)),Ae=He(this),ye=Math.atan(Ae/this._helper.cameraToCenterDistance),pe=a.ae(.75),Be=ye>pe?2*ye*(.5+C.y/(2*Ae)):pe,Fe=Math.sin(Be)*U/Math.sin(a.ah(Math.PI-q-Be,.01,Math.PI-.01)),Xe=Math.min(ae,Fe);this._helper._farZ=1.01*(Math.cos(Math.PI/2-p)*Xe+U),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;const l=this.centerOffset,p=Ce(this.worldSize,this.center),C=p.x,E=p.y;this._helper._pixelPerMeter=a.aj(1,this.center.lat)*this.worldSize;const T=a.ae(Math.min(this.pitch,ue)),U=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(T));let q;this._calculateNearFarZIfNeeded(U,T,l),q=new Float64Array(16),a.b4(q,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),a.aq(this._invProjMatrix,q),q[8]=2*-l.x/this._helper._width,q[9]=2*l.y/this._helper._height,this._projectionMatrix=a.b5(q),a.N(q,q,[1,-1,1]),a.M(q,q,[0,0,-this._helper.cameraToCenterDistance]),a.b6(q,q,-this.rollInRadians),a.b7(q,q,this.pitchInRadians),a.b6(q,q,-this.bearingInRadians),a.M(q,q,[-C,-E,0]),this._mercatorMatrix=a.N([],q,[this.worldSize,this.worldSize,this.worldSize]),a.N(q,q,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=a.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,q),a.M(q,q,[0,0,-this.elevation]),this._viewProjMatrix=q,this._invViewProjMatrix=a.aq([],q);const Z=[0,0,-1,1];a.aw(Z,Z,this._invViewProjMatrix),this._cameraPosition=[Z[0]/Z[3],Z[1]/Z[3],Z[2]/Z[3]],this._fogMatrix=new Float64Array(16),a.b4(this._fogMatrix,this.fovInRadians,this.width/this.height,U,this._helper._farZ),this._fogMatrix[8]=2*-l.x/this.width,this._fogMatrix[9]=2*l.y/this.height,a.N(this._fogMatrix,this._fogMatrix,[1,-1,1]),a.M(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),a.b6(this._fogMatrix,this._fogMatrix,-this.rollInRadians),a.b7(this._fogMatrix,this._fogMatrix,this.pitchInRadians),a.b6(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),a.M(this._fogMatrix,this._fogMatrix,[-C,-E,0]),a.N(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),a.M(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=a.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,q);const ae=this._helper._width%2/2,Ae=this._helper._height%2/2,ye=Math.cos(this.bearingInRadians),pe=Math.sin(-this.bearingInRadians),Be=C-Math.round(C)+ye*ae+pe*Ae,Fe=E-Math.round(E)+ye*Ae+pe*ae,Xe=new Float64Array(q);if(a.M(Xe,Xe,[Be>.5?Be-1:Be,Fe>.5?Fe-1:Fe,0]),this._alignedProjMatrix=Xe,q=a.aq(new Float64Array(16),this._pixelMatrix),!q)throw new Error("failed to invert matrix");this._pixelMatrixInverse=q,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const l=this.screenPointToMercatorCoordinate(new a.P(0,0)),p=[l.x*this.worldSize,l.y*this.worldSize,0,1];return a.aw(p,p,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const l=a.aj(1,this.center.lat)*this.worldSize;return be(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/l).toLngLat()}lngLatToCameraDepth(l,p){const C=a.a1.fromLngLat(l),E=[C.x*this.worldSize,C.y*this.worldSize,p,1];return a.aw(E,E,this._viewProjMatrix),E[2]/E[3]}getProjectionData(l){const{overscaledTileID:p,aligned:C,applyTerrainMatrix:E}=l,T=this._helper.getMercatorTileCoordinates(p),U=p?this.calculatePosMatrix(p,C,!0):null;let q;return q=p&&p.terrainRttPosMatrix32f&&E?p.terrainRttPosMatrix32f:U||a.b8(),{mainMatrix:q,tileMercatorCoords:T,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:q}}isLocationOccluded(l){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(l,p,C){return 1}transformLightDirection(l){return a.aT(l)}getRayDirectionFromPixel(l){throw new Error("Not implemented.")}projectTileCoordinates(l,p,C,E){const T=this.calculatePosMatrix(C);let U;E?(U=[l,p,E(l,p),1],a.aw(U,U,T)):(U=[l,p,0,1],Fu(U,U,T));const q=U[3];return{point:new a.P(U[0]/q,U[1]/q),signedDistanceFromCamera:q,isOccluded:!1}}populateCache(l){for(const p of l)this.calculatePosMatrix(p)}getMatrixForModel(l,p){const C=a.a1.fromLngLat(l,p),E=C.meterInMercatorCoordinateUnits(),T=a.b9();return a.M(T,T,[C.x,C.y,C.z]),a.b6(T,T,Math.PI),a.b7(T,T,Math.PI/2),a.N(T,T,[-E,E,E]),T}getProjectionDataForCustomLayer(l=!0){const p=new a.Z(0,0,0,0,0),C=this.getProjectionData({overscaledTileID:p,applyGlobeMatrix:l}),E=lt(p,this.worldSize);a.O(E,this._viewProjMatrix,E),C.tileMercatorCoords=[0,0,1,1];const T=[a.$,a.$,this.worldSize/this._helper.pixelsPerMeter],U=a.ba();return a.N(U,E,T),C.fallbackMatrix=U,C.mainMatrix=U,C}getFastPathSimpleProjectionMatrix(l){return this.calculatePosMatrix(l)}}function El(){a.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function us(B){if(B.useSlerp)if(B.k<1){const l=a.bb(B.startEulerAngles.roll,B.startEulerAngles.pitch,B.startEulerAngles.bearing),p=a.bb(B.endEulerAngles.roll,B.endEulerAngles.pitch,B.endEulerAngles.bearing),C=new Float64Array(4);a.bc(C,l,p,B.k);const E=a.bd(C);B.tr.setRoll(E.roll),B.tr.setPitch(E.pitch),B.tr.setBearing(E.bearing)}else B.tr.setRoll(B.endEulerAngles.roll),B.tr.setPitch(B.endEulerAngles.pitch),B.tr.setBearing(B.endEulerAngles.bearing);else B.tr.setRoll(a.C.number(B.startEulerAngles.roll,B.endEulerAngles.roll,B.k)),B.tr.setPitch(a.C.number(B.startEulerAngles.pitch,B.endEulerAngles.pitch,B.k)),B.tr.setBearing(a.C.number(B.startEulerAngles.bearing,B.endEulerAngles.bearing,B.k))}function bs(B,l,p,C,E){const T=E.padding,U=Ce(E.worldSize,p.getNorthWest()),q=Ce(E.worldSize,p.getNorthEast()),Z=Ce(E.worldSize,p.getSouthEast()),ae=Ce(E.worldSize,p.getSouthWest()),Ae=a.ae(-C),ye=U.rotate(Ae),pe=q.rotate(Ae),Be=Z.rotate(Ae),Fe=ae.rotate(Ae),Xe=new a.P(Math.max(ye.x,pe.x,Fe.x,Be.x),Math.max(ye.y,pe.y,Fe.y,Be.y)),Ze=new a.P(Math.min(ye.x,pe.x,Fe.x,Be.x),Math.min(ye.y,pe.y,Fe.y,Be.y)),et=Xe.sub(Ze),st=(E.width-(T.left+T.right+l.left+l.right))/et.x,nt=(E.height-(T.top+T.bottom+l.top+l.bottom))/et.y;if(nt<0||st<0)return void El();const ct=Math.min(a.ak(E.scale*Math.min(st,nt)),B.maxZoom),yt=a.P.convert(B.offset),xt=new a.P((l.left-l.right)/2,(l.top-l.bottom)/2).rotate(a.ae(C)),At=yt.add(xt).mult(E.scale/a.af(ct));return{center:Ue(E.worldSize,U.add(Z).div(2).sub(At)),zoom:ct,bearing:C}}class Ro{get useGlobeControls(){return!1}handlePanInertia(l,p){const C=l.mag(),E=Math.abs(He(p));return{easingOffset:l.mult(Math.min(.75*E/C,1)),easingCenter:p.center}}handleMapControlsRollPitchBearingZoom(l,p){l.bearingDelta&&p.setBearing(p.bearing+l.bearingDelta),l.pitchDelta&&p.setPitch(p.pitch+l.pitchDelta),l.rollDelta&&p.setRoll(p.roll+l.rollDelta),l.zoomDelta&&p.setZoom(p.zoom+l.zoomDelta)}handleMapControlsPan(l,p,C){l.around.distSqr(p.centerPoint)<.01||p.setLocationAtPoint(C,l.around)}cameraForBoxAndBearing(l,p,C,E,T){return bs(l,p,C,E,T)}handleJumpToCenterZoom(l,p){l.zoom!==(p.zoom!==void 0?+p.zoom:l.zoom)&&l.setZoom(+p.zoom),p.center!==void 0&&l.setCenter(a.S.convert(p.center))}handleEaseTo(l,p){const C=l.zoom,E=l.padding,T={roll:l.roll,pitch:l.pitch,bearing:l.bearing},U={roll:p.roll===void 0?l.roll:p.roll,pitch:p.pitch===void 0?l.pitch:p.pitch,bearing:p.bearing===void 0?l.bearing:p.bearing},q=p.zoom!==void 0,Z=!l.isPaddingEqual(p.padding);let ae=!1;const Ae=q?+p.zoom:l.zoom;let ye=l.centerPoint.add(p.offsetAsPoint);const pe=l.screenPointToLocation(ye),{center:Be,zoom:Fe}=l.getConstrained(a.S.convert(p.center||pe),Ae??C);ju(l,Be);const Xe=Ce(l.worldSize,pe),Ze=Ce(l.worldSize,Be).sub(Xe),et=a.af(Fe-C);return ae=Fe!==C,{easeFunc:st=>{if(ae&&l.setZoom(a.C.number(C,Fe,st)),a.be(T,U)||us({startEulerAngles:T,endEulerAngles:U,tr:l,k:st,useSlerp:T.roll!=U.roll}),Z&&(l.interpolatePadding(E,p.padding,st),ye=l.centerPoint.add(p.offsetAsPoint)),p.around)l.setLocationAtPoint(p.around,p.aroundPoint);else{const nt=a.af(l.zoom-C),ct=Fe>C?Math.min(2,et):Math.max(.5,et),yt=Math.pow(ct,1-st),xt=Ue(l.worldSize,Xe.add(Ze.mult(st*yt)).mult(nt));l.setLocationAtPoint(l.renderWorldCopies?xt.wrap():xt,ye)}},isZooming:ae,elevationCenter:Be}}handleFlyTo(l,p){const C=p.zoom!==void 0,E=l.zoom,T=l.getConstrained(a.S.convert(p.center||p.locationAtOffset),C?+p.zoom:E),U=T.center,q=T.zoom;ju(l,U);const Z=Ce(l.worldSize,p.locationAtOffset),ae=Ce(l.worldSize,U).sub(Z),Ae=ae.mag(),ye=a.af(q-E);let pe;if(p.minZoom!==void 0){const Be=Math.min(+p.minZoom,E,q),Fe=l.getConstrained(U,Be).zoom;pe=a.af(Fe-E)}return{easeFunc:(Be,Fe,Xe,Ze)=>{l.setZoom(Be===1?q:E+a.ak(Fe));const et=Be===1?U:Ue(l.worldSize,Z.add(ae.mult(Xe)).mult(Fe));l.setLocationAtPoint(l.renderWorldCopies?et.wrap():et,Ze)},scaleOfZoom:ye,targetCenter:U,scaleOfMinZoom:pe,pixelPathLength:Ae}}}class gr{constructor(l,p,C){this.blendFunction=l,this.blendColor=p,this.mask=C}}gr.Replace=[1,0],gr.disabled=new gr(gr.Replace,a.bf.transparent,[!1,!1,!1,!1]),gr.unblended=new gr(gr.Replace,a.bf.transparent,[!0,!0,!0,!0]),gr.alphaBlended=new gr([1,771],a.bf.transparent,[!0,!0,!0,!0]);const el=2305;class Si{constructor(l,p,C){this.enable=l,this.mode=p,this.frontFace=C}}Si.disabled=new Si(!1,1029,el),Si.backCCW=new Si(!0,1029,el),Si.frontCCW=new Si(!0,1028,el);class ti{constructor(l,p,C){this.func=l,this.mask=p,this.range=C}}ti.ReadOnly=!1,ti.ReadWrite=!0,ti.disabled=new ti(519,ti.ReadOnly,[0,1]);const wr=7680;class X{constructor(l,p,C,E,T,U){this.test=l,this.ref=p,this.mask=C,this.fail=E,this.depthFail=T,this.pass=U}}X.disabled=new X({func:519,mask:0},0,0,wr,wr,wr);const ve=new WeakMap;function $e(B){var l;if(ve.has(B))return ve.get(B);{const p=(l=B.getParameter(B.VERSION))===null||l===void 0?void 0:l.startsWith("WebGL 2.0");return ve.set(B,p),p}}class St{get awaitingQuery(){return!!this._readbackQueue}constructor(l){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=l;const p=l.context,C=p.gl;this._texFormat=C.RGBA,this._texType=C.UNSIGNED_BYTE;const E=new a.aL;E.emplaceBack(-1,-1),E.emplaceBack(2,-1),E.emplaceBack(-1,2);const T=new a.aN;T.emplaceBack(0,1,2),this._fullscreenTriangle=new Ql(p.createVertexBuffer(E,Fo.members),p.createIndexBuffer(T),a.aM.simpleSegment(0,0,E.length,T.length)),this._resultBuffer=new Uint8Array(4),p.activeTexture.set(C.TEXTURE1);const U=C.createTexture();C.bindTexture(C.TEXTURE_2D,U),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.CLAMP_TO_EDGE),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.CLAMP_TO_EDGE),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.NEAREST),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.NEAREST),C.texImage2D(C.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=p.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(U),$e(C)&&(this._pbo=C.createBuffer(),C.bindBuffer(C.PIXEL_PACK_BUFFER,this._pbo),C.bufferData(C.PIXEL_PACK_BUFFER,4,C.STREAM_READ),C.bindBuffer(C.PIXEL_PACK_BUFFER,null))}destroy(){const l=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),l.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(l,p){const C=this._updateCount;return this._readbackQueue?C>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():C>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(l,p),this._updateCount++,this._measuredError}_bindFramebuffer(){const l=this._cachedRenderContext.context,p=l.gl;l.activeTexture.set(p.TEXTURE1),p.bindTexture(p.TEXTURE_2D,this._fbo.colorAttachment.get()),l.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(l,p){const C=this._cachedRenderContext.context,E=C.gl;if(this._bindFramebuffer(),C.viewport.set([0,0,this._texWidth,this._texHeight]),C.clear({color:a.bf.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(C,E.TRIANGLES,ti.disabled,X.disabled,gr.unblended,Si.disabled,((T,U)=>({u_input:T,u_output_expected:U}))(l,p),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&$e(E)){E.bindBuffer(E.PIXEL_PACK_BUFFER,this._pbo),E.readBuffer(E.COLOR_ATTACHMENT0),E.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),E.bindBuffer(E.PIXEL_PACK_BUFFER,null);const T=E.fenceSync(E.SYNC_GPU_COMMANDS_COMPLETE,0);E.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:T}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){const l=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&$e(l)){const p=l.clientWaitSync(this._readbackQueue.sync,0,0);if(p===l.WAIT_FAILED)return a.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(p===l.TIMEOUT_EXPIRED)return;l.bindBuffer(l.PIXEL_PACK_BUFFER,this._pbo),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),l.bindBuffer(l.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),l.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=St._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(l){let p=0;return p+=l[0]/256,p+=l[1]/65536,p+=l[2]/16777216,l[3]<127&&(p=-p),p/128}}const ri=a.$/128;function kn(B,l){const p=B.granularity!==void 0?Math.max(B.granularity,1):1,C=p+(B.generateBorders?2:0),E=p+(B.extendToNorthPole||B.generateBorders?1:0)+(B.extendToSouthPole||B.generateBorders?1:0),T=C+1,U=E+1,q=B.generateBorders?-1:0,Z=B.generateBorders||B.extendToNorthPole?-1:0,ae=p+(B.generateBorders?1:0),Ae=p+(B.generateBorders||B.extendToSouthPole?1:0),ye=T*U,pe=C*E*6,Be=T*U>65536;if(Be&&l==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const Fe=Be||l==="32bit",Xe=new Int16Array(2*ye);let Ze=0;for(let nt=Z;nt<=Ae;nt++)for(let ct=q;ct<=ae;ct++){let yt=ct/p*a.$;ct===-1&&(yt=-ri),ct===p+1&&(yt=a.$+ri);let xt=nt/p*a.$;nt===-1&&(xt=B.extendToNorthPole?a.bh:-ri),nt===p+1&&(xt=B.extendToSouthPole?a.bi:a.$+ri),Xe[Ze++]=yt,Xe[Ze++]=xt}const et=Fe?new Uint32Array(pe):new Uint16Array(pe);let st=0;for(let nt=0;nt<E;nt++)for(let ct=0;ct<C;ct++){const yt=ct+1+nt*T,xt=ct+(nt+1)*T,At=ct+1+(nt+1)*T;et[st++]=ct+nt*T,et[st++]=xt,et[st++]=yt,et[st++]=yt,et[st++]=xt,et[st++]=At}return{vertices:Xe.buffer.slice(0),indices:et.buffer.slice(0),uses32bitIndices:Fe}}const xi=new a.aK({fill:new a.bj(128,2),line:new a.bj(512,0),tile:new a.bj(128,32),stencil:new a.bj(128,1),circle:3});class Ki{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 xo.projectionGlobe}get vertexShaderPreludeCode(){return xo.projectionMercator.vertexSource}get subdivisionGranularity(){return xi}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(l){this._errorMeasurement||(this._errorMeasurement=new St(l));const p=a.U(this._errorQueryLatitudeDegrees),C=2*Math.atan(Math.exp(Math.PI-p*Math.PI*2))-.5*Math.PI,E=this._errorMeasurement.updateErrorLoop(p,C),T=x.now();E!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=E,this._errorMeasurementLastChangeTime=T);const U=Math.min(Math.max((T-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=a.bk(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,a.bl(U))}_getMeshKey(l){return`${l.granularity.toString(36)}_${l.generateBorders?"b":""}${l.extendToNorthPole?"n":""}${l.extendToSouthPole?"s":""}`}getMeshFromTileID(l,p,C,E,T){const U=(T==="stencil"?xi.stencil:xi.tile).getGranularityForZoomLevel(p.z);return this._getMesh(l,{granularity:U,generateBorders:C,extendToNorthPole:p.y===0&&E,extendToSouthPole:p.y===(1<<p.z)-1&&E})}_getMesh(l,p){const C=this._getMeshKey(p);if(C in this._tileMeshCache)return this._tileMeshCache[C];const E=(function(T,U){const q=kn(U,"16bit"),Z=a.aL.deserialize({arrayBuffer:q.vertices,length:q.vertices.byteLength/2/2}),ae=a.aN.deserialize({arrayBuffer:q.indices,length:q.indices.byteLength/2/3});return new Ql(T.createVertexBuffer(Z,Fo.members),T.createIndexBuffer(ae),a.aM.simpleSegment(0,0,Z.length,ae.length))})(l,p);return this._tileMeshCache[C]=E,E}recalculate(l){}hasTransition(){const l=x.now();let p=!1;return p=p||(l-this._errorMeasurementLastChangeTime)/1e3<.7,p=p||this._errorMeasurement&&this._errorMeasurement.awaitingQuery,p}setErrorQueryLatitudeDegrees(l){this._errorQueryLatitudeDegrees=l}}const Ri=new a.r({type:new a.D(a.v.projection.type)});class Ei extends a.E{constructor(l){super(),this._transitionable=new a.t(Ri,void 0),this.setProjection(l),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.F(0)),this._mercatorProjection=new er,this._verticalPerspectiveProjection=new Ki}get transitionState(){const l=this.properties.get("type");if(typeof l=="string"&&l==="mercator")return 0;if(typeof l=="string"&&l==="vertical-perspective")return 1;if(l instanceof a.bm){if(l.from==="vertical-perspective"&&l.to==="mercator")return 1-l.transition;if(l.from==="mercator"&&l.to==="vertical-perspective")return l.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(l){this._mercatorProjection.updateGPUdependent(l),this._verticalPerspectiveProjection.updateGPUdependent(l)}getMeshFromTileID(l,p,C,E,T){return this.currentProjection.getMeshFromTileID(l,p,C,E,T)}setProjection(l){this._transitionable.setValue("type",l?.type||"mercator")}updateTransitions(l){this._transitioning=this._transitionable.transitioned(l,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(l){this.properties=this._transitioning.possiblyEvaluate(l)}setErrorQueryLatitudeDegrees(l){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(l),this._mercatorProjection.setErrorQueryLatitudeDegrees(l)}}function Or(B){const l=Ar(B.worldSize,B.center.lat);return 2*Math.PI*l}function zr(B,l,p,C,E){const T=1/(1<<E),U=l/a.$*T+C*T,q=a.bo((B/a.$*T+p*T)*Math.PI*2+Math.PI,2*Math.PI),Z=2*Math.atan(Math.exp(Math.PI-U*Math.PI*2))-.5*Math.PI,ae=Math.cos(Z),Ae=new Float64Array(3);return Ae[0]=Math.sin(q)*ae,Ae[1]=Math.sin(Z),Ae[2]=Math.cos(q)*ae,Ae}function ji(B){return(function(l,p){const C=Math.cos(p),E=new Float64Array(3);return E[0]=Math.sin(l)*C,E[1]=Math.sin(p),E[2]=Math.cos(l)*C,E})(B.lng*Math.PI/180,B.lat*Math.PI/180)}function Ar(B,l){return B/(2*Math.PI)/Math.cos(l*Math.PI/180)}function jr(B){const l=Math.asin(B[1])/Math.PI*180,p=Math.sqrt(B[0]*B[0]+B[2]*B[2]);if(p>1e-6){const C=B[0]/p,E=Math.acos(B[2]/p),T=(C>0?E:-E)/Math.PI*180;return new a.S(a.aO(T,-180,180),l)}return new a.S(0,l)}function Cs(B){return Math.cos(B*Math.PI/180)}function Sr(B,l){const p=Cs(B),C=Cs(l);return a.ak(C/p)}function za(B,l){const p=B.rotate(l.bearingInRadians),C=l.zoom+Sr(l.center.lat,0),E=a.bk(1/Cs(l.center.lat),1/Cs(Math.min(Math.abs(l.center.lat),60)),a.bn(C,7,3,0,1)),T=360/Or({worldSize:l.worldSize,center:{lat:l.center.lat}});return new a.S(l.center.lng-p.x*T*E,a.ah(l.center.lat+p.y*T,-a.ai,a.ai))}function uc(B){const l=.5*B,p=Math.sin(l),C=Math.cos(l);return Math.log(p+C)-Math.log(C-p)}function hu(B,l,p,C){const E=B.lat+p*C;if(Math.abs(p)>1){const T=(Math.sign(B.lat+p)!==Math.sign(B.lat)?-Math.abs(B.lat):Math.abs(B.lat))*Math.PI/180,U=Math.abs(B.lat+p)*Math.PI/180,q=uc(T+C*(U-T)),Z=uc(T),ae=uc(U);return new a.S(B.lng+l*((q-Z)/(ae-Z)),E)}return new a.S(B.lng+l*C,E)}class Gs{constructor(l){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=l}swapBuffers(){if(!this._hadAnyChanges)return;const l=this._cachePrevious;this._cachePrevious=this._cache,this._cache=l,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(l,p,C,E){const T=`${l.z}_${l.x}_${l.y}_${E?.terrain?"t":""}`,U=this._cache.get(T);if(U)return U;const q=this._cachePrevious.get(T);if(q)return this._cache.set(T,q),q;const Z=this._boundingVolumeFactory(l,p,C,E);return this._cache.set(T,Z),this._hadAnyChanges=!0,Z}}class cf{constructor(l,p,C,E){this.min=C,this.max=E,this.points=l,this.planes=p}static fromAabb(l,p){const C=[];for(let E=0;E<8;E++)C.push([1&~E?l[0]:p[0],(E>>1&1)==1?p[1]:l[1],(E>>2&1)==1?p[2]:l[2]]);return new cf(C,[[-1,0,0,p[0]],[1,0,0,-l[0]],[0,-1,0,p[1]],[0,1,0,-l[1]],[0,0,-1,p[2]],[0,0,1,-l[2]]],l,p)}static fromCenterSizeAngles(l,p,C){const E=a.br([],C[0],C[1],C[2]),T=a.bs([],[p[0],0,0],E),U=a.bs([],[0,p[1],0],E),q=a.bs([],[0,0,p[2]],E),Z=[...l],ae=[...l];for(let ye=0;ye<8;ye++)for(let pe=0;pe<3;pe++){const Be=l[pe]+T[pe]*(1&~ye?-1:1)+U[pe]*((ye>>1&1)==1?1:-1)+q[pe]*((ye>>2&1)==1?1:-1);Z[pe]=Math.min(Z[pe],Be),ae[pe]=Math.max(ae[pe],Be)}const Ae=[];for(let ye=0;ye<8;ye++){const pe=[...l];a.aS(pe,pe,a.aR([],T,1&~ye?-1:1)),a.aS(pe,pe,a.aR([],U,(ye>>1&1)==1?1:-1)),a.aS(pe,pe,a.aR([],q,(ye>>2&1)==1?1:-1)),Ae.push(pe)}return new cf(Ae,[[...T,-a.aX(T,Ae[0])],[...U,-a.aX(U,Ae[0])],[...q,-a.aX(q,Ae[0])],[-T[0],-T[1],-T[2],-a.aX(T,Ae[7])],[-U[0],-U[1],-U[2],-a.aX(U,Ae[7])],[-q[0],-q[1],-q[2],-a.aX(q,Ae[7])]],Z,ae)}intersectsFrustum(l){let p=!0;const C=this.points.length,E=this.planes.length,T=l.planes.length,U=l.points.length;for(let q=0;q<T;q++){const Z=l.planes[q];let ae=0;for(let Ae=0;Ae<C;Ae++){const ye=this.points[Ae];Z[0]*ye[0]+Z[1]*ye[1]+Z[2]*ye[2]+Z[3]>=0&&ae++}if(ae===0)return 0;ae<C&&(p=!1)}if(p)return 2;for(let q=0;q<E;q++){const Z=this.planes[q];let ae=0;for(let Ae=0;Ae<U;Ae++){const ye=l.points[Ae];Z[0]*ye[0]+Z[1]*ye[1]+Z[2]*ye[2]+Z[3]>=0&&ae++}if(ae===0)return 0}return 1}intersectsPlane(l){const p=this.points.length;let C=0;for(let E=0;E<p;E++){const T=this.points[E];l[0]*T[0]+l[1]*T[1]+l[2]*T[2]+l[3]>=0&&C++}return C===p?2:C===0?0:1}}function ts(B,l,p){const C=B-l;return C<0?-C:Math.max(0,C-p)}function lp(B,l,p,C,E){const T=B-p;let U;return U=T<0?Math.min(-T,1+T-E):T>1?Math.min(Math.max(T-E,0),1-T):0,Math.max(U,ts(l,C,E))}class Gc{constructor(){this._boundingVolumeCache=new Gs(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(l,p,C,E){const T=1<<C.z,U=1/T,q=C.x/T,Z=C.y/T;let ae=2;return ae=Math.min(ae,lp(l,p,q,Z,U)),ae=Math.min(ae,lp(l,p,q+.5,-Z-U,U)),ae=Math.min(ae,lp(l,p,q+.5,2-Z-U,U)),ae}getWrap(l,p,C){const E=1<<p.z,T=1/E,U=p.x/E,q=ts(l.x,U,T),Z=ts(l.x,U-1,T),ae=ts(l.x,U+1,T),Ae=Math.min(q,Z,ae);return Ae===ae?1:Ae===Z?-1:0}allowVariableZoom(l,p){return Dt(l,p)>4}allowWorldCopies(){return!1}getTileBoundingVolume(l,p,C,E){return this._boundingVolumeCache.getTileBoundingVolume(l,p,C,E)}_computeTileBoundingVolume(l,p,C,E){var T,U;let q=0,Z=0;if(E?.terrain){const ae=new a.Z(l.z,p,l.z,l.x,l.y),Ae=E.terrain.getMinMaxElevation(ae);q=(T=Ae.minElevation)!==null&&T!==void 0?T:Math.min(0,C),Z=(U=Ae.maxElevation)!==null&&U!==void 0?U:Math.max(0,C)}if(q/=a.bu,Z/=a.bu,q+=1,Z+=1,l.z<=0)return cf.fromAabb([-Z,-Z,-Z],[Z,Z,Z]);if(l.z===1)return cf.fromAabb([l.x===0?-Z:0,l.y===0?0:-Z,-Z],[l.x===0?0:Z,l.y===0?Z:0,Z]);{const ae=[zr(0,0,l.x,l.y,l.z),zr(a.$,0,l.x,l.y,l.z),zr(a.$,a.$,l.x,l.y,l.z),zr(0,a.$,l.x,l.y,l.z)],Ae=[];for(const jt of ae)Ae.push(a.aR([],jt,Z));if(Z!==q)for(const jt of ae)Ae.push(a.aR([],jt,q));l.y===0&&Ae.push([0,1,0]),l.y===(1<<l.z)-1&&Ae.push([0,-1,0]);const ye=[1,1,1],pe=[-1,-1,-1];for(const jt of Ae)for(let qt=0;qt<3;qt++)ye[qt]=Math.min(ye[qt],jt[qt]),pe[qt]=Math.max(pe[qt],jt[qt]);const Be=zr(a.$/2,a.$/2,l.x,l.y,l.z),Fe=a.aW([],[0,1,0],Be);a.aV(Fe,Fe);const Xe=a.aW([],Be,Fe);a.aV(Xe,Xe);const Ze=a.aW([],ae[2],ae[1]);a.aV(Ze,Ze);const et=a.aW([],ae[0],ae[3]);a.aV(et,et),Ae.push(a.aR([],Be,Z)),l.y>=(1<<l.z)/2&&Ae.push(a.aR([],zr(a.$/2,0,l.x,l.y,l.z),Z)),l.y<(1<<l.z)/2&&Ae.push(a.aR([],zr(a.$/2,a.$,l.x,l.y,l.z),Z));const st=du(Be,Ae),nt=du(Xe,Ae),ct=[-Be[0],-Be[1],-Be[2],st.max],yt=[Be[0],Be[1],Be[2],-st.min],xt=[-Xe[0],-Xe[1],-Xe[2],nt.max],At=[Xe[0],Xe[1],Xe[2],-nt.min],Ot=[...Ze,0],Vt=[...et,0],Kt=[];return l.y===0?Kt.push(a.bt(Vt,Ot,ct),a.bt(Vt,Ot,yt)):Kt.push(a.bt(xt,Ot,ct),a.bt(xt,Ot,yt),a.bt(xt,Vt,ct),a.bt(xt,Vt,yt)),l.y===(1<<l.z)-1?Kt.push(a.bt(Vt,Ot,ct),a.bt(Vt,Ot,yt)):Kt.push(a.bt(At,Ot,ct),a.bt(At,Ot,yt),a.bt(At,Vt,ct),a.bt(At,Vt,yt)),new cf(Kt,[ct,yt,xt,At,Ot,Vt],ye,pe)}}}function du(B,l){let p=1/0,C=-1/0;for(const E of l){const T=a.aX(B,E);p=Math.min(p,T),C=Math.max(C,T)}return{min:p,max:C}}class hh{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(l){this._helper.setMinZoom(l)}setMaxZoom(l){this._helper.setMaxZoom(l)}setMinPitch(l){this._helper.setMinPitch(l)}setMaxPitch(l){this._helper.setMaxPitch(l)}setRenderWorldCopies(l){this._helper.setRenderWorldCopies(l)}setBearing(l){this._helper.setBearing(l)}setPitch(l){this._helper.setPitch(l)}setRoll(l){this._helper.setRoll(l)}setFov(l){this._helper.setFov(l)}setZoom(l){this._helper.setZoom(l)}setCenter(l){this._helper.setCenter(l)}setElevation(l){this._helper.setElevation(l)}setMinElevationForCurrentTile(l){this._helper.setMinElevationForCurrentTile(l)}setPadding(l){this._helper.setPadding(l)}interpolatePadding(l,p,C){return this._helper.interpolatePadding(l,p,C)}isPaddingEqual(l){return this._helper.isPaddingEqual(l)}resize(l,p){this._helper.resize(l,p)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(l){this._helper.setMaxBounds(l)}overrideNearFarZ(l,p){this._helper.overrideNearFarZ(l,p)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(l){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),l)}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(l){}constructor(){this._cachedClippingPlane=a.bv(),this._projectionMatrix=a.b9(),this._globeViewProjMatrix32f=a.b8(),this._globeViewProjMatrixNoCorrection=a.b9(),this._globeViewProjMatrixNoCorrectionInverted=a.b9(),this._globeProjMatrixInverted=a.b9(),this._cameraPosition=a.bp(),this._globeLatitudeErrorCorrectionRadians=0,this._helper=new es({calcMatrices:()=>{this._calcMatrices()},getConstrained:(l,p)=>this.getConstrained(l,p)}),this._coveringTilesDetailsProvider=new Gc}clone(){const l=new hh;return l.apply(this),l}apply(l,p){this._globeLatitudeErrorCorrectionRadians=p||0,this._helper.apply(l)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){const l=a.bp();return l[0]=this._cameraPosition[0],l[1]=this._cameraPosition[1],l[2]=this._cameraPosition[2],l}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(l){const{overscaledTileID:p,applyGlobeMatrix:C}=l,E=this._helper.getMercatorTileCoordinates(p);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:E,clippingPlane:this._cachedClippingPlane,projectionTransition:C?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(l){const p=this.pitchInRadians,C=this.cameraToCenterDistance/l,E=Math.sin(p)*C,T=Math.cos(p)*C+1,U=1/Math.sqrt(E*E+T*T)*1;let q=-E,Z=T;const ae=Math.sqrt(q*q+Z*Z);q/=ae,Z/=ae;const Ae=[0,q,Z];a.bw(Ae,Ae,[0,0,0],-this.bearingInRadians),a.bx(Ae,Ae,[0,0,0],-1*this.center.lat*Math.PI/180),a.by(Ae,Ae,[0,0,0],this.center.lng*Math.PI/180);const ye=1/a.aZ(Ae);return a.aR(Ae,Ae,ye),[...Ae,-U*ye]}isLocationOccluded(l){return!this.isSurfacePointVisible(ji(l))}transformLightDirection(l){const p=this._helper._center.lng*Math.PI/180,C=this._helper._center.lat*Math.PI/180,E=Math.cos(C),T=[Math.sin(p)*E,Math.sin(C),Math.cos(p)*E],U=[T[2],0,-T[0]],q=[0,0,0];a.aW(q,U,T),a.aV(U,U),a.aV(q,q);const Z=[0,0,0];return a.aV(Z,[U[0]*l[0]+q[0]*l[1]+T[0]*l[2],U[1]*l[0]+q[1]*l[1]+T[1]*l[2],U[2]*l[0]+q[2]*l[1]+T[2]*l[2]]),Z}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(l,p,C){const E=(function(q,Z,ae){const Ae=1/(1<<ae.z);return new a.a1(q/a.$*Ae+ae.x*Ae,Z/a.$*Ae+ae.y*Ae)})(l,p,C.canonical),T=(U=E.y,[a.bo(E.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-U*Math.PI*2))-.5*Math.PI]);var U;return this.getCircleRadiusCorrection()/Math.cos(T[1])}projectTileCoordinates(l,p,C,E){const T=C.canonical,U=zr(l,p,T.x,T.y,T.z),q=1+(E?E(l,p):0)/a.bu,Z=[U[0]*q,U[1]*q,U[2]*q,1];a.aw(Z,Z,this._globeViewProjMatrixNoCorrection);const ae=this._cachedClippingPlane,Ae=ae[0]*U[0]+ae[1]*U[1]+ae[2]*U[2]+ae[3]<0;return{point:new a.P(Z[0]/Z[3],Z[1]/Z[3]),signedDistanceFromCamera:Z[3],isOccluded:Ae}}_calcMatrices(){if(!this._helper._width||!this._helper._height)return;const l=Ar(this.worldSize,this.center.lat),p=a.ba(),C=a.ba();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*l),a.b4(p,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);const E=this.centerOffset;p[8]=2*-E.x/this._helper._width,p[9]=2*E.y/this._helper._height,this._projectionMatrix=a.b5(p),this._globeProjMatrixInverted=a.ba(),a.aq(this._globeProjMatrixInverted,p),a.M(p,p,[0,0,-this.cameraToCenterDistance]),a.b6(p,p,this.rollInRadians),a.b7(p,p,-this.pitchInRadians),a.b6(p,p,this.bearingInRadians),a.M(p,p,[0,0,-l]);const T=a.bp();T[0]=l,T[1]=l,T[2]=l,a.b7(C,p,this.center.lat*Math.PI/180),a.bz(C,C,-this.center.lng*Math.PI/180),a.N(C,C,T),this._globeViewProjMatrixNoCorrection=C,a.b7(p,p,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),a.bz(p,p,-this.center.lng*Math.PI/180),a.N(p,p,T),this._globeViewProjMatrix32f=new Float32Array(p),this._globeViewProjMatrixNoCorrectionInverted=a.ba(),a.aq(this._globeViewProjMatrixNoCorrectionInverted,C);const U=a.bp();this._cameraPosition=a.bp(),this._cameraPosition[2]=this.cameraToCenterDistance/l,a.bw(this._cameraPosition,this._cameraPosition,U,-this.rollInRadians),a.bx(this._cameraPosition,this._cameraPosition,U,this.pitchInRadians),a.bw(this._cameraPosition,this._cameraPosition,U,-this.bearingInRadians),a.aS(this._cameraPosition,this._cameraPosition,[0,0,1]),a.bx(this._cameraPosition,this._cameraPosition,U,-this.center.lat*Math.PI/180),a.by(this._cameraPosition,this._cameraPosition,U,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(l);const q=a.b5(this._globeViewProjMatrixNoCorrectionInverted);a.N(q,q,[1,1,-1]),this._cachedFrustum=Go.fromInvProjectionMatrix(q,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(l){a.w("calculateFogMatrix is not supported on globe projection.");const p=a.ba();return a.ag(p),p}getVisibleUnwrappedCoordinates(l){return[new a.b2(0,l)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(l){l&&a.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(l,p){if(!this._globeViewProjMatrixNoCorrection)return 1;const C=ji(l);a.aR(C,C,1+p/a.bu);const E=a.bv();return a.aw(E,[C[0],C[1],C[2],1],this._globeViewProjMatrixNoCorrection),E[2]/E[3]}populateCache(l){}getBounds(){const l=.5*this.width,p=.5*this.height,C=[new a.P(0,0),new a.P(l,0),new a.P(this.width,0),new a.P(this.width,p),new a.P(this.width,this.height),new a.P(l,this.height),new a.P(0,this.height),new a.P(0,p)],E=[];for(const ye of C)E.push(this.unprojectScreenPoint(ye));let T=0,U=0,q=0,Z=0;const ae=this.center;for(const ye of E){const pe=a.bA(ae.lng,ye.lng),Be=a.bA(ae.lat,ye.lat);pe<U&&(U=pe),pe>T&&(T=pe),Be<Z&&(Z=Be),Be>q&&(q=Be)}const Ae=[ae.lng+U,ae.lat+Z,ae.lng+T,ae.lat+q];return this.isSurfacePointOnScreen([0,1,0])&&(Ae[3]=90,Ae[0]=-180,Ae[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(Ae[1]=-90,Ae[0]=-180,Ae[2]=180),new rt(Ae)}getConstrained(l,p){const C=a.ah(l.lat,-a.ai,a.ai),E=a.ah(+p,this.minZoom+Sr(0,C),this.maxZoom);return{center:new a.S(l.lng,C),zoom:E}}calculateCenterFromCameraLngLatAlt(l,p,C,E){return this._helper.calculateCenterFromCameraLngLatAlt(l,p,C,E)}setLocationAtPoint(l,p){const C=ji(this.unprojectScreenPoint(p)),E=ji(l),T=a.bp();a.bB(T);const U=a.bp();a.by(U,C,T,-this.center.lng*Math.PI/180),a.bx(U,U,T,this.center.lat*Math.PI/180);const q=E[0]*E[0]+E[2]*E[2],Z=U[0]*U[0];if(q<Z)return;const ae=Math.sqrt(q-Z),Ae=-ae,ye=a.bC(E[0],E[2],U[0],ae),pe=a.bC(E[0],E[2],U[0],Ae),Be=a.bp();a.by(Be,E,T,-ye);const Fe=a.bC(Be[1],Be[2],U[1],U[2]),Xe=a.bp();a.by(Xe,E,T,-pe);const Ze=a.bC(Xe[1],Xe[2],U[1],U[2]),et=.5*Math.PI,st=Fe>=-et&&Fe<=et,nt=Ze>=-et&&Ze<=et;let ct,yt;if(st&&nt){const Vt=this.center.lng*Math.PI/180,Kt=this.center.lat*Math.PI/180;a.bD(ye,Vt)+a.bD(Fe,Kt)<a.bD(pe,Vt)+a.bD(Ze,Kt)?(ct=ye,yt=Fe):(ct=pe,yt=Ze)}else if(st)ct=ye,yt=Fe;else{if(!nt)return;ct=pe,yt=Ze}const xt=ct/Math.PI*180,At=yt/Math.PI*180,Ot=this.center.lat;this.setCenter(new a.S(xt,a.ah(At,-90,90))),this.setZoom(this.zoom+Sr(Ot,this.center.lat))}locationToScreenPoint(l,p){const C=ji(l);if(p){const E=p.getElevationForLngLatZoom(l,this._helper._tileZoom);a.aR(C,C,1+E/a.bu)}return this._projectSurfacePointToScreen(C)}_projectSurfacePointToScreen(l){const p=a.bv();return a.aw(p,[...l,1],this._globeViewProjMatrixNoCorrection),p[0]/=p[3],p[1]/=p[3],new a.P((.5*p[0]+.5)*this.width,(.5*-p[1]+.5)*this.height)}screenPointToMercatorCoordinate(l,p){if(p){const C=p.pointCoordinate(l);if(C)return C}return a.a1.fromLngLat(this.unprojectScreenPoint(l))}screenPointToLocation(l,p){var C;return(C=this.screenPointToMercatorCoordinate(l,p))===null||C===void 0?void 0:C.toLngLat()}isPointOnMapSurface(l,p){const C=this._cameraPosition,E=this.getRayDirectionFromPixel(l);return!!this.rayPlanetIntersection(C,E)}getRayDirectionFromPixel(l){const p=a.bv();p[0]=l.x/this.width*2-1,p[1]=-1*(l.y/this.height*2-1),p[2]=1,p[3]=1,a.aw(p,p,this._globeViewProjMatrixNoCorrectionInverted),p[0]/=p[3],p[1]/=p[3],p[2]/=p[3];const C=a.bp();C[0]=p[0]-this._cameraPosition[0],C[1]=p[1]-this._cameraPosition[1],C[2]=p[2]-this._cameraPosition[2];const E=a.bp();return a.aV(E,C),E}isSurfacePointVisible(l){const p=this._cachedClippingPlane;return p[0]*l[0]+p[1]*l[1]+p[2]*l[2]+p[3]>=0}isSurfacePointOnScreen(l){if(!this.isSurfacePointVisible(l))return!1;const p=a.bv();return a.aw(p,[...l,1],this._globeViewProjMatrixNoCorrection),p[0]/=p[3],p[1]/=p[3],p[2]/=p[3],p[0]>-1&&p[0]<1&&p[1]>-1&&p[1]<1&&p[2]>-1&&p[2]<1}rayPlanetIntersection(l,p){const C=a.aX(l,p),E=a.bp(),T=a.bp();a.aR(T,p,C),a.aU(E,l,T);const U=1-a.aX(E,E);if(U<0)return null;const q=a.aX(l,l)-1,Z=-C+(C<0?1:-1)*Math.sqrt(U),ae=q/Z,Ae=Z;return{tMin:Math.min(ae,Ae),tMax:Math.max(ae,Ae)}}unprojectScreenPoint(l){const p=this._cameraPosition,C=this.getRayDirectionFromPixel(l),E=this.rayPlanetIntersection(p,C);if(E){const Ae=a.bp();a.aS(Ae,p,[C[0]*E.tMin,C[1]*E.tMin,C[2]*E.tMin]);const ye=a.bp();return a.aV(ye,Ae),jr(ye)}const T=this._cachedClippingPlane,U=T[0]*C[0]+T[1]*C[1]+T[2]*C[2],q=-a.b1(T,p)/U,Z=a.bp();if(q>0)a.aS(Z,p,[C[0]*q,C[1]*q,C[2]*q]);else{const Ae=a.bp();a.aS(Ae,p,[2*C[0],2*C[1],2*C[2]]);const ye=a.b1(this._cachedClippingPlane,Ae);a.aU(Z,Ae,[this._cachedClippingPlane[0]*ye,this._cachedClippingPlane[1]*ye,this._cachedClippingPlane[2]*ye])}const ae=(function(Ae){const ye=a.bp();return ye[0]=Ae[0]*-Ae[3],ye[1]=Ae[1]*-Ae[3],ye[2]=Ae[2]*-Ae[3],{center:ye,radius:Math.sqrt(1-Ae[3]*Ae[3])}})(T);return jr((function(Ae,ye,pe){const Be=a.bp();a.aU(Be,pe,Ae);const Fe=a.bp();return a.bq(Fe,Ae,Be,ye/a.a$(Be)),Fe})(ae.center,ae.radius,Z))}getMatrixForModel(l,p){const C=a.S.convert(l),E=1/a.bu,T=a.b9();return a.bz(T,T,C.lng/180*Math.PI),a.b7(T,T,-C.lat/180*Math.PI),a.M(T,T,[0,0,1+p/a.bu]),a.b7(T,T,.5*Math.PI),a.N(T,T,[E,E,E]),T}getProjectionDataForCustomLayer(l=!0){const p=this.getProjectionData({overscaledTileID:new a.Z(0,0,0,0,0),applyGlobeMatrix:l});return p.tileMercatorCoords=[0,0,1,1],p}getFastPathSimpleProjectionMatrix(l){}}class ld{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(l){this._helper.setMinZoom(l)}setMaxZoom(l){this._helper.setMaxZoom(l)}setMinPitch(l){this._helper.setMinPitch(l)}setMaxPitch(l){this._helper.setMaxPitch(l)}setRenderWorldCopies(l){this._helper.setRenderWorldCopies(l)}setBearing(l){this._helper.setBearing(l)}setPitch(l){this._helper.setPitch(l)}setRoll(l){this._helper.setRoll(l)}setFov(l){this._helper.setFov(l)}setZoom(l){this._helper.setZoom(l)}setCenter(l){this._helper.setCenter(l)}setElevation(l){this._helper.setElevation(l)}setMinElevationForCurrentTile(l){this._helper.setMinElevationForCurrentTile(l)}setPadding(l){this._helper.setPadding(l)}interpolatePadding(l,p,C){return this._helper.interpolatePadding(l,p,C)}isPaddingEqual(l){return this._helper.isPaddingEqual(l)}resize(l,p,C=!0){this._helper.resize(l,p,C)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(l){this._helper.setMaxBounds(l)}overrideNearFarZ(l,p){this._helper.overrideNearFarZ(l,p)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(l){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),l)}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(l,p){this._globeness=l,this._globeLatitudeErrorCorrectionRadians=p,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this._helper=new es({calcMatrices:()=>{this._calcMatrices()},getConstrained:(l,p)=>this.getConstrained(l,p)}),this._globeness=1,this._mercatorTransform=new Mr,this._verticalPerspectiveTransform=new hh}clone(){const l=new ld;return l._globeness=this._globeness,l._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,l.apply(this),l}apply(l){this._helper.apply(l),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(l){const p=this._mercatorTransform.getProjectionData(l),C=this._verticalPerspectiveTransform.getProjectionData(l);return{mainMatrix:this.isGlobeRendering?C.mainMatrix:p.mainMatrix,clippingPlane:C.clippingPlane,tileMercatorCoords:C.tileMercatorCoords,projectionTransition:l.applyGlobeMatrix?this._globeness:0,fallbackMatrix:p.fallbackMatrix}}isLocationOccluded(l){return this.currentTransform.isLocationOccluded(l)}transformLightDirection(l){return this.currentTransform.transformLightDirection(l)}getPixelScale(){return a.bk(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return a.bk(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(l,p,C){const E=this._mercatorTransform.getPitchedTextCorrection(l,p,C),T=this._verticalPerspectiveTransform.getPitchedTextCorrection(l,p,C);return a.bk(E,T,this._globeness)}projectTileCoordinates(l,p,C,E){return this.currentTransform.projectTileCoordinates(l,p,C,E)}_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(l){return this.currentTransform.calculateFogMatrix(l)}getVisibleUnwrappedCoordinates(l){return this.currentTransform.getVisibleUnwrappedCoordinates(l)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(l){this._mercatorTransform.recalculateZoomAndCenter(l),this._verticalPerspectiveTransform.recalculateZoomAndCenter(l)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(l,p){return this.currentTransform.lngLatToCameraDepth(l,p)}populateCache(l){this._mercatorTransform.populateCache(l),this._verticalPerspectiveTransform.populateCache(l)}getBounds(){return this.currentTransform.getBounds()}getConstrained(l,p){return this.currentTransform.getConstrained(l,p)}calculateCenterFromCameraLngLatAlt(l,p,C,E){return this._helper.calculateCenterFromCameraLngLatAlt(l,p,C,E)}setLocationAtPoint(l,p){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(l,p),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(l,p),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(l,p){return this.currentTransform.locationToScreenPoint(l,p)}screenPointToMercatorCoordinate(l,p){return this.currentTransform.screenPointToMercatorCoordinate(l,p)}screenPointToLocation(l,p){return this.currentTransform.screenPointToLocation(l,p)}isPointOnMapSurface(l,p){return this.currentTransform.isPointOnMapSurface(l,p)}getRayDirectionFromPixel(l){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(l)}getMatrixForModel(l,p){return this.currentTransform.getMatrixForModel(l,p)}getProjectionDataForCustomLayer(l=!0){const p=this._mercatorTransform.getProjectionDataForCustomLayer(l);if(!this.isGlobeRendering)return p;const C=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(l);return C.fallbackMatrix=p.mainMatrix,C}getFastPathSimpleProjectionMatrix(l){return this.currentTransform.getFastPathSimpleProjectionMatrix(l)}}class Nr{get useGlobeControls(){return!0}handlePanInertia(l,p){const C=za(l,p);return Math.abs(C.lng-p.center.lng)>180&&(C.lng=p.center.lng+179.5*Math.sign(C.lng-p.center.lng)),{easingCenter:C,easingOffset:new a.P(0,0)}}handleMapControlsRollPitchBearingZoom(l,p){const C=l.around,E=p.screenPointToLocation(C);l.bearingDelta&&p.setBearing(p.bearing+l.bearingDelta),l.pitchDelta&&p.setPitch(p.pitch+l.pitchDelta),l.rollDelta&&p.setRoll(p.roll+l.rollDelta);const T=p.zoom;l.zoomDelta&&p.setZoom(p.zoom+l.zoomDelta);const U=p.zoom-T;if(U===0)return;const q=a.bA(p.center.lng,E.lng),Z=q/(Math.abs(q/180)+1),ae=a.bA(p.center.lat,E.lat),Ae=p.getRayDirectionFromPixel(C),ye=p.cameraPosition,pe=-1*a.aX(ye,Ae),Be=a.bp();a.aS(Be,ye,[Ae[0]*pe,Ae[1]*pe,Ae[2]*pe]);const Fe=a.aZ(Be)-1,Xe=Math.exp(.5*-Math.max(Fe-.3,0)),Ze=Ar(p.worldSize,p.center.lat)/Math.min(p.width,p.height),et=a.bn(Ze,.9,.5,1,.25),st=(1-a.af(-U))*Math.min(Xe,et),nt=p.center.lat,ct=p.zoom,yt=new a.S(p.center.lng+Z*st,a.ah(p.center.lat+ae*st,-a.ai,a.ai));p.setLocationAtPoint(E,C);const xt=p.center,At=a.bn(Math.abs(q),45,85,0,1),Ot=a.bn(Ze,.75,.35,0,1),Vt=Math.pow(Math.max(At,Ot),.25),Kt=a.bA(xt.lng,yt.lng),jt=a.bA(xt.lat,yt.lat);p.setCenter(new a.S(xt.lng+Kt*Vt,xt.lat+jt*Vt).wrap()),p.setZoom(ct+Sr(nt,p.center.lat))}handleMapControlsPan(l,p,C){if(!l.panDelta)return;const E=p.center.lat,T=p.zoom;p.setCenter(za(l.panDelta,p).wrap()),p.setZoom(T+Sr(E,p.center.lat))}cameraForBoxAndBearing(l,p,C,E,T){const U=bs(l,p,C,E,T),q=p.left/T.width*2-1,Z=(T.width-p.right)/T.width*2-1,ae=p.top/T.height*-2+1,Ae=(T.height-p.bottom)/T.height*-2+1,ye=a.bA(C.getWest(),C.getEast())<0,pe=ye?C.getEast():C.getWest(),Be=ye?C.getWest():C.getEast(),Fe=Math.max(C.getNorth(),C.getSouth()),Xe=Math.min(C.getNorth(),C.getSouth()),Ze=pe+.5*a.bA(pe,Be),et=Fe+.5*a.bA(Fe,Xe),st=T.clone();st.setCenter(U.center),st.setBearing(U.bearing),st.setPitch(0),st.setRoll(0),st.setZoom(U.zoom);const nt=st.modelViewProjectionMatrix,ct=[ji(C.getNorthWest()),ji(C.getNorthEast()),ji(C.getSouthWest()),ji(C.getSouthEast()),ji(new a.S(Be,et)),ji(new a.S(pe,et)),ji(new a.S(Ze,Fe)),ji(new a.S(Ze,Xe))],yt=ji(U.center);let xt=Number.POSITIVE_INFINITY;for(const At of ct)q<0&&(xt=Nr.getLesserNonNegativeNonNull(xt,Nr.solveVectorScale(At,yt,nt,"x",q))),Z>0&&(xt=Nr.getLesserNonNegativeNonNull(xt,Nr.solveVectorScale(At,yt,nt,"x",Z))),ae>0&&(xt=Nr.getLesserNonNegativeNonNull(xt,Nr.solveVectorScale(At,yt,nt,"y",ae))),Ae<0&&(xt=Nr.getLesserNonNegativeNonNull(xt,Nr.solveVectorScale(At,yt,nt,"y",Ae)));if(Number.isFinite(xt)&&xt!==0)return U.zoom=st.zoom+a.ak(xt),U;El()}handleJumpToCenterZoom(l,p){const C=l.center.lat,E=l.getConstrained(p.center?a.S.convert(p.center):l.center,l.zoom).center;l.setCenter(E.wrap());const T=p.zoom!==void 0?+p.zoom:l.zoom+Sr(C,E.lat);l.zoom!==T&&l.setZoom(T)}handleEaseTo(l,p){const C=l.zoom,E=l.center,T=l.padding,U={roll:l.roll,pitch:l.pitch,bearing:l.bearing},q={roll:p.roll===void 0?l.roll:p.roll,pitch:p.pitch===void 0?l.pitch:p.pitch,bearing:p.bearing===void 0?l.bearing:p.bearing},Z=p.zoom!==void 0,ae=!l.isPaddingEqual(p.padding);let Ae=!1;const ye=p.center?a.S.convert(p.center):E,pe=l.getConstrained(ye,C).center;ju(l,pe);const Be=l.clone();Be.setCenter(pe),Be.setZoom(Z?+p.zoom:C+Sr(E.lat,ye.lat)),Be.setBearing(p.bearing);const Fe=new a.P(a.ah(l.centerPoint.x+p.offsetAsPoint.x,0,l.width),a.ah(l.centerPoint.y+p.offsetAsPoint.y,0,l.height));Be.setLocationAtPoint(pe,Fe);const Xe=(p.offset&&p.offsetAsPoint.mag())>0?Be.center:pe,Ze=Z?+p.zoom:C+Sr(E.lat,Xe.lat),et=C+Sr(E.lat,0),st=Ze+Sr(Xe.lat,0),nt=a.bA(E.lng,Xe.lng),ct=a.bA(E.lat,Xe.lat),yt=a.af(st-et);return Ae=Ze!==C,{easeFunc:xt=>{if(a.be(U,q)||us({startEulerAngles:U,endEulerAngles:q,tr:l,k:xt,useSlerp:U.roll!=q.roll}),ae&&l.interpolatePadding(T,p.padding,xt),p.around)a.w("Easing around a point is not supported under globe projection."),l.setLocationAtPoint(p.around,p.aroundPoint);else{const At=st>et?Math.min(2,yt):Math.max(.5,yt),Ot=Math.pow(At,1-xt),Vt=hu(E,nt,ct,xt*Ot);l.setCenter(Vt.wrap())}if(Ae){const At=a.C.number(et,st,xt)+Sr(0,l.center.lat);l.setZoom(At)}},isZooming:Ae,elevationCenter:Xe}}handleFlyTo(l,p){const C=p.zoom!==void 0,E=l.center,T=l.zoom,U=l.padding,q=!l.isPaddingEqual(p.padding),Z=l.getConstrained(a.S.convert(p.center||p.locationAtOffset),T).center,ae=C?+p.zoom:l.zoom+Sr(l.center.lat,Z.lat),Ae=l.clone();Ae.setCenter(Z),Ae.setZoom(ae),Ae.setBearing(p.bearing);const ye=new a.P(a.ah(l.centerPoint.x+p.offsetAsPoint.x,0,l.width),a.ah(l.centerPoint.y+p.offsetAsPoint.y,0,l.height));Ae.setLocationAtPoint(Z,ye);const pe=Ae.center;ju(l,pe);const Be=(function(ct,yt,xt){const At=ji(yt),Ot=ji(xt),Vt=a.aX(At,Ot),Kt=Math.acos(Vt),jt=Or(ct);return Kt/(2*Math.PI)*jt})(l,E,pe),Fe=T+Sr(E.lat,0),Xe=ae+Sr(pe.lat,0),Ze=a.af(Xe-Fe);let et;if(typeof p.minZoom=="number"){const ct=+p.minZoom+Sr(pe.lat,0),yt=Math.min(ct,Fe,Xe)+Sr(0,pe.lat),xt=l.getConstrained(pe,yt).zoom+Sr(pe.lat,0);et=a.af(xt-Fe)}const st=a.bA(E.lng,pe.lng),nt=a.bA(E.lat,pe.lat);return{easeFunc:(ct,yt,xt,At)=>{const Ot=hu(E,st,nt,xt);q&&l.interpolatePadding(U,p.padding,ct);const Vt=ct===1?pe:Ot;l.setCenter(Vt.wrap());const Kt=Fe+a.ak(yt);l.setZoom(ct===1?ae:Kt+Sr(0,Vt.lat))},scaleOfZoom:Ze,targetCenter:pe,scaleOfMinZoom:et,pixelPathLength:Be}}static solveVectorScale(l,p,C,E,T){const U=E==="x"?[C[0],C[4],C[8],C[12]]:[C[1],C[5],C[9],C[13]],q=[C[3],C[7],C[11],C[15]],Z=l[0]*U[0]+l[1]*U[1]+l[2]*U[2],ae=l[0]*q[0]+l[1]*q[1]+l[2]*q[2],Ae=p[0]*U[0]+p[1]*U[1]+p[2]*U[2],ye=p[0]*q[0]+p[1]*q[1]+p[2]*q[2];return Ae+T*ae===Z+T*ye||q[3]*(Z-Ae)+U[3]*(ye-ae)+Z*ye==Ae*ae?null:(Ae+U[3]-T*ye-T*q[3])/(Ae-Z-T*ye+T*ae)}static getLesserNonNegativeNonNull(l,p){return p!==null&&p>=0&&p<l?p:l}}class dA{constructor(l){this._globe=l,this._mercatorCameraHelper=new Ro,this._verticalPerspectiveCameraHelper=new Nr}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(l,p){return this.currentHelper.handlePanInertia(l,p)}handleMapControlsRollPitchBearingZoom(l,p){return this.currentHelper.handleMapControlsRollPitchBearingZoom(l,p)}handleMapControlsPan(l,p,C){this.currentHelper.handleMapControlsPan(l,p,C)}cameraForBoxAndBearing(l,p,C,E,T){return this.currentHelper.cameraForBoxAndBearing(l,p,C,E,T)}handleJumpToCenterZoom(l,p){this.currentHelper.handleJumpToCenterZoom(l,p)}handleEaseTo(l,p){return this.currentHelper.handleEaseTo(l,p)}handleFlyTo(l,p){return this.currentHelper.handleFlyTo(l,p)}}const Af=(B,l)=>a.y(B,l&&l.filter((p=>p.identifier!=="source.canvas"))),ov=a.bE();class up extends a.E{constructor(l,p={}){var C,E;super(),this._rtlPluginLoaded=()=>{for(const U in this.sourceCaches){const q=this.sourceCaches[U].getSource().type;q!=="vector"&&q!=="geojson"||this.sourceCaches[U].reload()}},this.map=l,this.dispatcher=new vt(it(),l._getMapId()),this.dispatcher.registerMessageHandler("GG",((U,q)=>this.getGlyphs(U,q))),this.dispatcher.registerMessageHandler("GI",((U,q)=>this.getImages(U,q))),this.imageManager=new le,this.imageManager.setEventedParent(this);const T=((C=l._container)===null||C===void 0?void 0:C.lang)||typeof document<"u"&&((E=document.documentElement)===null||E===void 0?void 0:E.lang)||void 0;this.glyphManager=new we(l._requestManager,p.localIdeographFontFamily,T),this.lineAtlas=new ht(256,512),this.crossTileSymbolIndex=new Ia,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.bF,this._loaded=!1,this._availableImages=[],this._globalState={},this._resetUpdates(),this.dispatcher.broadcast("SR",a.bG()),xe().on(li,this._rtlPluginLoaded),this.on("data",(U=>{if(U.dataType!=="source"||U.sourceDataType!=="metadata")return;const q=this.sourceCaches[U.sourceId];if(!q)return;const Z=q.getSource();if(Z&&Z.vectorLayerIds)for(const ae in this._layers){const Ae=this._layers[ae];Ae.source===Z.id&&this._validateLayer(Ae)}}))}setGlobalStateProperty(l,p){var C,E,T;this._checkLoaded();const U=p===null?(T=(E=(C=this.stylesheet.state)===null||C===void 0?void 0:C[l])===null||E===void 0?void 0:E.default)!==null&&T!==void 0?T:null:p;if(a.bH(U,this._globalState[l]))return this;this._globalState[l]=U,this._applyGlobalStateChanges([l])}getGlobalState(){return this._globalState}setGlobalState(l){this._checkLoaded();const p=[];for(const C in l)!a.bH(this._globalState[C],l[C].default)&&(p.push(C),this._globalState[C]=l[C].default);this._applyGlobalStateChanges(p)}_applyGlobalStateChanges(l){if(l.length===0)return;const p=new Set,C={};for(const E of l){C[E]=this._globalState[E];for(const T in this._layers){const U=this._layers[T],q=U.getLayoutAffectingGlobalStateRefs(),Z=U.getPaintAffectingGlobalStateRefs();if(q.has(E)&&p.add(U.source),Z.has(E))for(const{name:ae,value:Ae}of Z.get(E))this._updatePaintProperty(U,ae,Ae)}}this.dispatcher.broadcast("UGS",C);for(const E in this.sourceCaches)p.has(E)&&(this._reloadSource(E),this._changed=!0)}loadURL(l,p={},C){this.fire(new a.l("dataloading",{dataType:"style"})),p.validate=typeof p.validate!="boolean"||p.validate;const E=this.map._requestManager.transformRequest(l,"Style");this._loadStyleRequest=new AbortController;const T=this._loadStyleRequest;a.j(E,this._loadStyleRequest).then((U=>{this._loadStyleRequest=null,this._load(U.data,p,C)})).catch((U=>{this._loadStyleRequest=null,U&&!T.signal.aborted&&this.fire(new a.k(U))}))}loadJSON(l,p={},C){this.fire(new a.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,x.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,p.validate=p.validate!==!1,this._load(l,p,C)})).catch((()=>{}))}loadEmpty(){this.fire(new a.l("dataloading",{dataType:"style"})),this._load(ov,{validate:!1})}_load(l,p,C){var E,T;let U=p.transformStyle?p.transformStyle(C,l):l;if(!p.validate||!Af(this,a.z(U))){U=Object.assign({},U),this._loaded=!0,this.stylesheet=U;for(const q in U.sources)this.addSource(q,U.sources[q],{validate:!1});U.sprite?this._loadSprite(U.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(U.glyphs),this._createLayers(),this.light=new Ie(this.stylesheet.light),this._setProjectionInternal(((E=this.stylesheet.projection)===null||E===void 0?void 0:E.type)||"mercator"),this.sky=new tt(this.stylesheet.sky),this.map.setTerrain((T=this.stylesheet.terrain)!==null&&T!==void 0?T:null),this.fire(new a.l("data",{dataType:"style"})),this.fire(new a.l("style.load"))}}_createLayers(){var l;const p=a.bI(this.stylesheet.layers);this.setGlobalState((l=this.stylesheet.state)!==null&&l!==void 0?l:null),this.dispatcher.broadcast("SL",p),this._order=p.map((C=>C.id)),this._layers={},this._serializedLayers=null;for(const C of p){const E=a.bJ(C,this._globalState);E.setEventedParent(this,{layer:{id:C.id}}),this._layers[C.id]=E}}_loadSprite(l,p=!1,C=void 0){let E;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,(function(T,U,q,Z){return a._(this,void 0,void 0,(function*(){const ae=Y(T),Ae=q>1?"@2x":"",ye={},pe={};for(const{id:Be,url:Fe}of ae){const Xe=U.transformRequest(z(Fe,Ae,".json"),"SpriteJSON");ye[Be]=a.j(Xe,Z);const Ze=U.transformRequest(z(Fe,Ae,".png"),"SpriteImage");pe[Be]=H.getImage(Ze,Z)}return yield Promise.all([...Object.values(ye),...Object.values(pe)]),(function(Be,Fe){return a._(this,void 0,void 0,(function*(){const Xe={};for(const Ze in Be){Xe[Ze]={};const et=x.getImageCanvasContext((yield Fe[Ze]).data),st=(yield Be[Ze]).data;for(const nt in st){const{width:ct,height:yt,x:xt,y:At,sdf:Ot,pixelRatio:Vt,stretchX:Kt,stretchY:jt,content:qt,textFitWidth:Kn,textFitHeight:On}=st[nt];Xe[Ze][nt]={data:null,pixelRatio:Vt,sdf:Ot,stretchX:Kt,stretchY:jt,content:qt,textFitWidth:Kn,textFitHeight:On,spriteData:{width:ct,height:yt,x:xt,y:At,context:et}}}}return Xe}))})(ye,pe)}))})(l,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((T=>{if(this._spriteRequest=null,T)for(const U in T){this._spritesImagesIds[U]=[];const q=this._spritesImagesIds[U]?this._spritesImagesIds[U].filter((Z=>!(Z in T))):[];for(const Z of q)this.imageManager.removeImage(Z),this._changedImages[Z]=!0;for(const Z in T[U]){const ae=U==="default"?Z:`${U}:${Z}`;this._spritesImagesIds[U].push(ae),ae in this.imageManager.images?this.imageManager.updateImage(ae,T[U][Z],!1):this.imageManager.addImage(ae,T[U][Z]),p&&(this._changedImages[ae]=!0)}}})).catch((T=>{this._spriteRequest=null,E=T,this.fire(new a.k(E))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),p&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"})),C&&C(E)}))}_unloadSprite(){for(const l of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(l),this._changedImages[l]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"}))}_validateLayer(l){const p=this.sourceCaches[l.source];if(!p)return;const C=l.sourceLayer;if(!C)return;const E=p.getSource();(E.type==="geojson"||E.vectorLayerIds&&E.vectorLayerIds.indexOf(C)===-1)&&this.fire(new a.k(new Error(`Source layer "${C}" does not exist on source "${E.id}" as specified by style layer "${l.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const l in this.sourceCaches)if(!this.sourceCaches[l].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(l,p=!1){const C=this._serializedAllLayers();if(!l||l.length===0)return Object.values(p?a.bK(C):C);const E=[];for(const T of l)if(C[T]){const U=p?a.bK(C[T]):C[T];E.push(U)}return E}_serializedAllLayers(){let l=this._serializedLayers;if(l)return l;l=this._serializedLayers={};const p=Object.keys(this._layers);for(const C of p){const E=this._layers[C];E.type!=="custom"&&(l[C]=E.serialize())}return l}hasTransitions(){var l,p,C;if(!((l=this.light)===null||l===void 0)&&l.hasTransition()||!((p=this.sky)===null||p===void 0)&&p.hasTransition()||!((C=this.projection)===null||C===void 0)&&C.hasTransition())return!0;for(const E in this.sourceCaches)if(this.sourceCaches[E].hasTransition())return!0;for(const E in this._layers)if(this._layers[E].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(l){if(!this._loaded)return;const p=this._changed;if(p){const E=Object.keys(this._updatedLayers),T=Object.keys(this._removedLayers);(E.length||T.length)&&this._updateWorkerLayers(E,T);for(const U in this._updatedSources){const q=this._updatedSources[U];if(q==="reload")this._reloadSource(U);else{if(q!=="clear")throw new Error(`Invalid action ${q}`);this._clearSource(U)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const U in this._updatedPaintProps)this._layers[U].updateTransitions(l);this.light.updateTransitions(l),this.sky.updateTransitions(l),this._resetUpdates()}const C={};for(const E in this.sourceCaches){const T=this.sourceCaches[E];C[E]=T.used,T.used=!1}for(const E of this._order){const T=this._layers[E];T.recalculate(l,this._availableImages),!T.isHidden(l.zoom)&&T.source&&(this.sourceCaches[T.source].used=!0)}for(const E in C){const T=this.sourceCaches[E];!!C[E]!=!!T.used&&T.fire(new a.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:E}))}this.light.recalculate(l),this.sky.recalculate(l),this.projection.recalculate(l),this.z=l.zoom,p&&this.fire(new a.l("data",{dataType:"style"}))}_updateTilesForChangedImages(){const l=Object.keys(this._changedImages);if(l.length){for(const p in this.sourceCaches)this.sourceCaches[p].reloadTilesForDependencies(["icons","patterns"],l);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const l in this.sourceCaches)this.sourceCaches[l].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(l,p){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(l,!1),removedIds:p})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(l,p={}){var C;this._checkLoaded();const E=this.serialize();if(l=p.transformStyle?p.transformStyle(E,l):l,((C=p.validate)===null||C===void 0||C)&&Af(this,a.z(l)))return!1;(l=a.bK(l)).layers=a.bI(l.layers);const T=a.bL(E,l),U=this._getOperationsToPerform(T);if(U.unimplemented.length>0)throw new Error(`Unimplemented: ${U.unimplemented.join(", ")}.`);if(U.operations.length===0)return!1;for(const q of U.operations)q();return this.stylesheet=l,this._serializedLayers=null,!0}_getOperationsToPerform(l){const p=[],C=[];for(const E of l)switch(E.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":p.push((()=>this.addLayer.apply(this,E.args)));break;case"removeLayer":p.push((()=>this.removeLayer.apply(this,E.args)));break;case"setPaintProperty":p.push((()=>this.setPaintProperty.apply(this,E.args)));break;case"setLayoutProperty":p.push((()=>this.setLayoutProperty.apply(this,E.args)));break;case"setFilter":p.push((()=>this.setFilter.apply(this,E.args)));break;case"addSource":p.push((()=>this.addSource.apply(this,E.args)));break;case"removeSource":p.push((()=>this.removeSource.apply(this,E.args)));break;case"setLayerZoomRange":p.push((()=>this.setLayerZoomRange.apply(this,E.args)));break;case"setLight":p.push((()=>this.setLight.apply(this,E.args)));break;case"setGeoJSONSourceData":p.push((()=>this.setGeoJSONSourceData.apply(this,E.args)));break;case"setGlyphs":p.push((()=>this.setGlyphs.apply(this,E.args)));break;case"setSprite":p.push((()=>this.setSprite.apply(this,E.args)));break;case"setTerrain":p.push((()=>this.map.setTerrain.apply(this,E.args)));break;case"setSky":p.push((()=>this.setSky.apply(this,E.args)));break;case"setProjection":this.setProjection.apply(this,E.args);break;case"setGlobalState":p.push((()=>this.setGlobalState.apply(this,E.args)));break;case"setTransition":p.push((()=>{}));break;default:C.push(E.command)}return{operations:p,unimplemented:C}}addImage(l,p){if(this.getImage(l))return this.fire(new a.k(new Error(`An image named "${l}" already exists.`)));this.imageManager.addImage(l,p),this._afterImageUpdated(l)}updateImage(l,p){this.imageManager.updateImage(l,p)}getImage(l){return this.imageManager.getImage(l)}removeImage(l){if(!this.getImage(l))return this.fire(new a.k(new Error(`An image named "${l}" does not exist.`)));this.imageManager.removeImage(l),this._afterImageUpdated(l)}_afterImageUpdated(l){this._availableImages=this.imageManager.listImages(),this._changedImages[l]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(l,p,C={}){if(this._checkLoaded(),this.sourceCaches[l]!==void 0)throw new Error(`Source "${l}" already exists.`);if(!p.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(p).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(p.type)>=0&&this._validate(a.z.source,`sources.${l}`,p,null,C))return;this.map&&this.map._collectResourceTiming&&(p.collectResourceTiming=!0);const E=this.sourceCaches[l]=new Gn(l,p,this.dispatcher);E.style=this,E.setEventedParent(this,(()=>({isSourceLoaded:E.loaded(),source:E.serialize(),sourceId:l}))),E.onAdd(this.map),this._changed=!0}removeSource(l){if(this._checkLoaded(),this.sourceCaches[l]===void 0)throw new Error("There is no source with this ID");for(const C in this._layers)if(this._layers[C].source===l)return this.fire(new a.k(new Error(`Source "${l}" cannot be removed while layer "${C}" is using it.`)));const p=this.sourceCaches[l];delete this.sourceCaches[l],delete this._updatedSources[l],p.fire(new a.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:l})),p.setEventedParent(null),p.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(l,p){if(this._checkLoaded(),this.sourceCaches[l]===void 0)throw new Error(`There is no source with this ID=${l}`);const C=this.sourceCaches[l].getSource();if(C.type!=="geojson")throw new Error(`geojsonSource.type is ${C.type}, which is !== 'geojson`);C.setData(p),this._changed=!0}getSource(l){return this.sourceCaches[l]&&this.sourceCaches[l].getSource()}addLayer(l,p,C={}){this._checkLoaded();const E=l.id;if(this.getLayer(E))return void this.fire(new a.k(new Error(`Layer "${E}" already exists on this map.`)));let T;if(l.type==="custom"){if(Af(this,a.bM(l)))return;T=a.bJ(l,this._globalState)}else{if("source"in l&&typeof l.source=="object"&&(this.addSource(E,l.source),l=a.bK(l),l=a.e(l,{source:E})),this._validate(a.z.layer,`layers.${E}`,l,{arrayIndex:-1},C))return;T=a.bJ(l,this._globalState),this._validateLayer(T),T.setEventedParent(this,{layer:{id:E}})}const U=p?this._order.indexOf(p):this._order.length;if(p&&U===-1)this.fire(new a.k(new Error(`Cannot add layer "${E}" before non-existing layer "${p}".`)));else{if(this._order.splice(U,0,E),this._layerOrderChanged=!0,this._layers[E]=T,this._removedLayers[E]&&T.source&&T.type!=="custom"){const q=this._removedLayers[E];delete this._removedLayers[E],q.type!==T.type?this._updatedSources[T.source]="clear":(this._updatedSources[T.source]="reload",this.sourceCaches[T.source].pause())}this._updateLayer(T),T.onAdd&&T.onAdd(this.map)}}moveLayer(l,p){if(this._checkLoaded(),this._changed=!0,!this._layers[l])return void this.fire(new a.k(new Error(`The layer '${l}' does not exist in the map's style and cannot be moved.`)));if(l===p)return;const C=this._order.indexOf(l);this._order.splice(C,1);const E=p?this._order.indexOf(p):this._order.length;p&&E===-1?this.fire(new a.k(new Error(`Cannot move layer "${l}" before non-existing layer "${p}".`))):(this._order.splice(E,0,l),this._layerOrderChanged=!0)}removeLayer(l){this._checkLoaded();const p=this._layers[l];if(!p)return void this.fire(new a.k(new Error(`Cannot remove non-existing layer "${l}".`)));p.setEventedParent(null);const C=this._order.indexOf(l);this._order.splice(C,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[l]=p,delete this._layers[l],this._serializedLayers&&delete this._serializedLayers[l],delete this._updatedLayers[l],delete this._updatedPaintProps[l],p.onRemove&&p.onRemove(this.map)}getLayer(l){return this._layers[l]}getLayersOrder(){return[...this._order]}hasLayer(l){return l in this._layers}setLayerZoomRange(l,p,C){this._checkLoaded();const E=this.getLayer(l);E?E.minzoom===p&&E.maxzoom===C||(p!=null&&(E.minzoom=p),C!=null&&(E.maxzoom=C),this._updateLayer(E)):this.fire(new a.k(new Error(`Cannot set the zoom range of non-existing layer "${l}".`)))}setFilter(l,p,C={}){this._checkLoaded();const E=this.getLayer(l);if(E){if(!a.bH(E.filter,p))return p==null?(E.setFilter(void 0),void this._updateLayer(E)):void(this._validate(a.z.filter,`layers.${E.id}.filter`,p,null,C)||(E.setFilter(a.bK(p)),this._updateLayer(E)))}else this.fire(new a.k(new Error(`Cannot filter non-existing layer "${l}".`)))}getFilter(l){return a.bK(this.getLayer(l).filter)}setLayoutProperty(l,p,C,E={}){this._checkLoaded();const T=this.getLayer(l);T?a.bH(T.getLayoutProperty(p),C)||(T.setLayoutProperty(p,C,E),this._updateLayer(T)):this.fire(new a.k(new Error(`Cannot style non-existing layer "${l}".`)))}getLayoutProperty(l,p){const C=this.getLayer(l);if(C)return C.getLayoutProperty(p);this.fire(new a.k(new Error(`Cannot get style of non-existing layer "${l}".`)))}setPaintProperty(l,p,C,E={}){this._checkLoaded();const T=this.getLayer(l);T?a.bH(T.getPaintProperty(p),C)||this._updatePaintProperty(T,p,C,E):this.fire(new a.k(new Error(`Cannot style non-existing layer "${l}".`)))}_updatePaintProperty(l,p,C,E={}){l.setPaintProperty(p,C,E)&&this._updateLayer(l),this._changed=!0,this._updatedPaintProps[l.id]=!0,this._serializedLayers=null}getPaintProperty(l,p){return this.getLayer(l).getPaintProperty(p)}setFeatureState(l,p){this._checkLoaded();const C=l.source,E=l.sourceLayer,T=this.sourceCaches[C];if(T===void 0)return void this.fire(new a.k(new Error(`The source '${C}' does not exist in the map's style.`)));const U=T.getSource().type;U==="geojson"&&E?this.fire(new a.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):U!=="vector"||E?(l.id===void 0&&this.fire(new a.k(new Error("The feature id parameter must be provided."))),T.setFeatureState(E,l.id,p)):this.fire(new a.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(l,p){this._checkLoaded();const C=l.source,E=this.sourceCaches[C];if(E===void 0)return void this.fire(new a.k(new Error(`The source '${C}' does not exist in the map's style.`)));const T=E.getSource().type,U=T==="vector"?l.sourceLayer:void 0;T!=="vector"||U?p&&typeof l.id!="string"&&typeof l.id!="number"?this.fire(new a.k(new Error("A feature id is required to remove its specific state property."))):E.removeFeatureState(U,l.id,p):this.fire(new a.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(l){this._checkLoaded();const p=l.source,C=l.sourceLayer,E=this.sourceCaches[p];if(E!==void 0)return E.getSource().type!=="vector"||C?(l.id===void 0&&this.fire(new a.k(new Error("The feature id parameter must be provided."))),E.getFeatureState(C,l.id)):void this.fire(new a.k(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new a.k(new Error(`The source '${p}' does not exist in the map's style.`)))}getTransition(){return a.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const l=a.bN(this.sourceCaches,(T=>T.serialize())),p=this._serializeByIds(this._order,!0),C=this.map.getTerrain()||void 0,E=this.stylesheet;return a.bO({version:E.version,name:E.name,metadata:E.metadata,light:E.light,sky:E.sky,center:E.center,zoom:E.zoom,bearing:E.bearing,pitch:E.pitch,sprite:E.sprite,glyphs:E.glyphs,transition:E.transition,projection:E.projection,sources:l,layers:p,terrain:C},(T=>T!==void 0))}_updateLayer(l){this._updatedLayers[l.id]=!0,l.source&&!this._updatedSources[l.source]&&this.sourceCaches[l.source].getSource().type!=="raster"&&(this._updatedSources[l.source]="reload",this.sourceCaches[l.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(l){const p=U=>this._layers[U].type==="fill-extrusion",C={},E=[];for(let U=this._order.length-1;U>=0;U--){const q=this._order[U];if(p(q)){C[q]=U;for(const Z of l){const ae=Z[q];if(ae)for(const Ae of ae)E.push(Ae)}}}E.sort(((U,q)=>q.intersectionZ-U.intersectionZ));const T=[];for(let U=this._order.length-1;U>=0;U--){const q=this._order[U];if(p(q))for(let Z=E.length-1;Z>=0;Z--){const ae=E[Z].feature;if(C[ae.layer.id]<U)break;T.push(ae),E.pop()}else for(const Z of l){const ae=Z[q];if(ae)for(const Ae of ae)T.push(Ae.feature)}}return T}queryRenderedFeatures(l,p,C){p&&p.filter&&this._validate(a.z.filter,"queryRenderedFeatures.filter",p.filter,null,p);const E={};if(p&&p.layers){if(!(Array.isArray(p.layers)||p.layers instanceof Set))return this.fire(new a.k(new Error("parameters.layers must be an Array or a Set of strings"))),[];for(const ae of p.layers){const Ae=this._layers[ae];if(!Ae)return this.fire(new a.k(new Error(`The layer '${ae}' does not exist in the map's style and cannot be queried for features.`))),[];E[Ae.source]=!0}}const T=[];p.availableImages=this._availableImages;const U=this._serializedAllLayers(),q=p.layers instanceof Set?p.layers:Array.isArray(p.layers)?new Set(p.layers):null,Z=Object.assign(Object.assign({},p),{layers:q,globalState:this._globalState});for(const ae in this.sourceCaches)p.layers&&!E[ae]||T.push(Te(this.sourceCaches[ae],this._layers,U,l,Z,C,this.map.terrain?(Ae,ye,pe)=>this.map.terrain.getElevation(Ae,ye,pe):void 0));return this.placement&&T.push((function(ae,Ae,ye,pe,Be,Fe,Xe){const Ze={},et=Fe.queryRenderedSymbols(pe),st=[];for(const nt of Object.keys(et).map(Number))st.push(Xe[nt]);st.sort(Se);for(const nt of st){const ct=nt.featureIndex.lookupSymbolFeatures(et[nt.bucketInstanceId],Ae,nt.bucketIndex,nt.sourceLayerIndex,{filterSpec:Be.filter,globalState:Be.globalState},Be.layers,Be.availableImages,ae);for(const yt in ct){const xt=Ze[yt]=Ze[yt]||[],At=ct[yt];At.sort(((Ot,Vt)=>{const Kt=nt.featureSortOrder;if(Kt){const jt=Kt.indexOf(Ot.featureIndex);return Kt.indexOf(Vt.featureIndex)-jt}return Vt.featureIndex-Ot.featureIndex}));for(const Ot of At)xt.push(Ot)}}return(function(nt,ct,yt){for(const xt in nt)for(const At of nt[xt])Ne(At,yt[ct[xt].source]);return nt})(Ze,ae,ye)})(this._layers,U,this.sourceCaches,l,Z,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(T)}querySourceFeatures(l,p){p?.filter&&this._validate(a.z.filter,"querySourceFeatures.filter",p.filter,null,p);const C=this.sourceCaches[l];return C?(function(E,T){const U=E.getRenderableIds().map((ae=>E.getTileByID(ae))),q=[],Z={};for(let ae=0;ae<U.length;ae++){const Ae=U[ae],ye=Ae.tileID.canonical.key;Z[ye]||(Z[ye]=!0,Ae.querySourceFeatures(q,T))}return q})(C,p?Object.assign(Object.assign({},p),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(l,p={}){this._checkLoaded();const C=this.light.getLight();let E=!1;for(const U in l)if(!a.bH(l[U],C[U])){E=!0;break}if(!E)return;const T={now:x.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(l,p),this.light.updateTransitions(T)}getProjection(){var l;return(l=this.stylesheet)===null||l===void 0?void 0:l.projection}setProjection(l){if(this._checkLoaded(),this.projection){if(this.projection.name===l.type)return;this.projection.destroy(),delete this.projection}this.stylesheet.projection=l,this._setProjectionInternal(l.type)}getSky(){var l;return(l=this.stylesheet)===null||l===void 0?void 0:l.sky}setSky(l,p={}){this._checkLoaded();const C=this.getSky();let E=!1;if(!l&&!C)return;if(l&&!C)E=!0;else if(!l&&C)E=!0;else for(const U in l)if(!a.bH(l[U],C[U])){E=!0;break}if(!E)return;const T={now:x.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=l,this.sky.setSky(l,p),this.sky.updateTransitions(T)}_setProjectionInternal(l){const p=(function(C){if(Array.isArray(C)){const E=new Ei({type:C});return{projection:E,transform:new ld,cameraHelper:new dA(E)}}switch(C){case"mercator":return{projection:new er,transform:new Mr,cameraHelper:new Ro};case"globe":{const E=new Ei({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:E,transform:new ld,cameraHelper:new dA(E)}}case"vertical-perspective":return{projection:new Ki,transform:new hh,cameraHelper:new Nr};default:return a.w(`Unknown projection name: ${C}. Falling back to mercator projection.`),{projection:new er,transform:new Mr,cameraHelper:new Ro}}})(l);this.projection=p.projection,this.map.migrateProjection(p.transform,p.cameraHelper);for(const C in this.sourceCaches)this.sourceCaches[C].reload()}_validate(l,p,C,E,T={}){return(!T||T.validate!==!1)&&Af(this,l.call(a.z,a.e({key:p,style:this.serialize(),value:C,styleSpec:a.v},E)))}_remove(l=!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),xe().off(li,this._rtlPluginLoaded);for(const p in this._layers)this._layers[p].setEventedParent(null);for(const p in this.sourceCaches){const C=this.sourceCaches[p];C.setEventedParent(null),C.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),l&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(l)}_clearSource(l){this.sourceCaches[l].clearTiles()}_reloadSource(l){this.sourceCaches[l].resume(),this.sourceCaches[l].reload()}_updateSources(l){for(const p in this.sourceCaches)this.sourceCaches[p].update(l,this.map.terrain)}_generateCollisionBoxes(){for(const l in this.sourceCaches)this._reloadSource(l)}_updatePlacement(l,p,C,E,T=!1){let U=!1,q=!1;const Z={};for(const ae of this._order){const Ae=this._layers[ae];if(Ae.type!=="symbol")continue;if(!Z[Ae.source]){const pe=this.sourceCaches[Ae.source];Z[Ae.source]=pe.getRenderableIds(!0).map((Be=>pe.getTileByID(Be))).sort(((Be,Fe)=>Fe.tileID.overscaledZ-Be.tileID.overscaledZ||(Be.tileID.isLessThan(Fe.tileID)?-1:1)))}const ye=this.crossTileSymbolIndex.addLayer(Ae,Z[Ae.source],l.center.lng);U=U||ye}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((T=T||this._layerOrderChanged||C===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(x.now(),l.zoom))&&(this.pauseablePlacement=new lc(l,this.map.terrain,this._order,T,p,C,E,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Z),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(x.now()),q=!0),U&&this.pauseablePlacement.placement.setStale()),q||U)for(const ae of this._order){const Ae=this._layers[ae];Ae.type==="symbol"&&this.placement.updateLayerOpacities(Ae,Z[Ae.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(x.now())}_releaseSymbolFadeTiles(){for(const l in this.sourceCaches)this.sourceCaches[l].releaseSymbolFadeTiles()}getImages(l,p){return a._(this,void 0,void 0,(function*(){const C=yield this.imageManager.getImages(p.icons);this._updateTilesForChangedImages();const E=this.sourceCaches[p.source];return E&&E.setDependencies(p.tileID.key,p.type,p.icons),C}))}getGlyphs(l,p){return a._(this,void 0,void 0,(function*(){const C=yield this.glyphManager.getGlyphs(p.stacks),E=this.sourceCaches[p.source];return E&&E.setDependencies(p.tileID.key,p.type,[""]),C}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(l,p={}){this._checkLoaded(),l&&this._validate(a.z.glyphs,"glyphs",l,null,p)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=l,this.glyphManager.entries={},this.glyphManager.setURL(l))}addSprite(l,p,C={},E){this._checkLoaded();const T=[{id:l,url:p}],U=[...Y(this.stylesheet.sprite),...T];this._validate(a.z.sprite,"sprite",U,null,C)||(this.stylesheet.sprite=U,this._loadSprite(T,!0,E))}removeSprite(l){this._checkLoaded();const p=Y(this.stylesheet.sprite);if(p.find((C=>C.id===l))){if(this._spritesImagesIds[l])for(const C of this._spritesImagesIds[l])this.imageManager.removeImage(C),this._changedImages[C]=!0;p.splice(p.findIndex((C=>C.id===l)),1),this.stylesheet.sprite=p.length>0?p:void 0,delete this._spritesImagesIds[l],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.l("data",{dataType:"style"}))}else this.fire(new a.k(new Error(`Sprite "${l}" doesn't exists on this map.`)))}getSprite(){return Y(this.stylesheet.sprite)}setSprite(l,p={},C){this._checkLoaded(),l&&this._validate(a.z.sprite,"sprite",l,null,p)||(this.stylesheet.sprite=l,l?this._loadSprite(l,!0,C):(this._unloadSprite(),C&&C(null)))}}var sv=a.aJ([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class av{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(l,p,C,E,T,U,q,Z,ae){this.context=l;let Ae=this.boundPaintVertexBuffers.length!==E.length;for(let ye=0;!Ae&&ye<E.length;ye++)this.boundPaintVertexBuffers[ye]!==E[ye]&&(Ae=!0);!this.vao||this.boundProgram!==p||this.boundLayoutVertexBuffer!==C||Ae||this.boundIndexBuffer!==T||this.boundVertexOffset!==U||this.boundDynamicVertexBuffer!==q||this.boundDynamicVertexBuffer2!==Z||this.boundDynamicVertexBuffer3!==ae?this.freshBind(p,C,E,T,U,q,Z,ae):(l.bindVertexArray.set(this.vao),q&&q.bind(),T&&T.dynamicDraw&&T.bind(),Z&&Z.bind(),ae&&ae.bind())}freshBind(l,p,C,E,T,U,q,Z){const ae=l.numAttributes,Ae=this.context,ye=Ae.gl;this.vao&&this.destroy(),this.vao=Ae.createVertexArray(),Ae.bindVertexArray.set(this.vao),this.boundProgram=l,this.boundLayoutVertexBuffer=p,this.boundPaintVertexBuffers=C,this.boundIndexBuffer=E,this.boundVertexOffset=T,this.boundDynamicVertexBuffer=U,this.boundDynamicVertexBuffer2=q,this.boundDynamicVertexBuffer3=Z,p.enableAttributes(ye,l);for(const pe of C)pe.enableAttributes(ye,l);U&&U.enableAttributes(ye,l),q&&q.enableAttributes(ye,l),Z&&Z.enableAttributes(ye,l),p.bind(),p.setVertexAttribPointers(ye,l,T);for(const pe of C)pe.bind(),pe.setVertexAttribPointers(ye,l,T);U&&(U.bind(),U.setVertexAttribPointers(ye,l,T)),E&&E.bind(),q&&(q.bind(),q.setVertexAttribPointers(ye,l,T)),Z&&(Z.bind(),Z.setVertexAttribPointers(ye,l,T)),Ae.currentNumAttributes=ae}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const Mm=(B,l,p,C,E)=>({u_texture:0,u_ele_delta:B,u_fog_matrix:l,u_fog_color:p?p.properties.get("fog-color"):a.bf.white,u_fog_ground_blend:p?p.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:E?0:p?p.calculateFogBlendOpacity(C):0,u_horizon_color:p?p.properties.get("horizon-color"):a.bf.white,u_horizon_fog_blend:p?p.properties.get("horizon-fog-blend"):1,u_is_globe_mode:E?1:0}),wm={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 fA(B){const l=[];for(let p=0;p<B.length;p++){if(B[p]===null)continue;const C=B[p].split(" ");l.push(C.pop())}return l}class dh{constructor(l,p,C,E,T,U,q,Z,ae=[]){const Ae=l.gl;this.program=Ae.createProgram();const ye=fA(p.staticAttributes),pe=C?C.getBinderAttributes():[],Be=ye.concat(pe),Fe=xo.prelude.staticUniforms?fA(xo.prelude.staticUniforms):[],Xe=q.staticUniforms?fA(q.staticUniforms):[],Ze=p.staticUniforms?fA(p.staticUniforms):[],et=C?C.getBinderUniforms():[],st=Fe.concat(Xe).concat(Ze).concat(et),nt=[];for(const Kt of st)nt.indexOf(Kt)<0&&nt.push(Kt);const ct=C?C.defines():[];$e(Ae)&&ct.unshift("#version 300 es"),T&&ct.push("#define OVERDRAW_INSPECTOR;"),U&&ct.push("#define TERRAIN3D;"),Z&&ct.push(Z),ae&&ct.push(...ae);let yt=ct.concat(xo.prelude.fragmentSource,q.fragmentSource,p.fragmentSource).join(`
`),xt=ct.concat(xo.prelude.vertexSource,q.vertexSource,p.vertexSource).join(`
`);$e(Ae)||(yt=(function(Kt){return Kt.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")})(yt),xt=(function(Kt){return Kt.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")})(xt));const At=Ae.createShader(Ae.FRAGMENT_SHADER);if(Ae.isContextLost())return void(this.failedToCreate=!0);if(Ae.shaderSource(At,yt),Ae.compileShader(At),!Ae.getShaderParameter(At,Ae.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Ae.getShaderInfoLog(At)}`);Ae.attachShader(this.program,At);const Ot=Ae.createShader(Ae.VERTEX_SHADER);if(Ae.isContextLost())return void(this.failedToCreate=!0);if(Ae.shaderSource(Ot,xt),Ae.compileShader(Ot),!Ae.getShaderParameter(Ot,Ae.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Ae.getShaderInfoLog(Ot)}`);Ae.attachShader(this.program,Ot),this.attributes={};const Vt={};this.numAttributes=Be.length;for(let Kt=0;Kt<this.numAttributes;Kt++)Be[Kt]&&(Ae.bindAttribLocation(this.program,Kt,Be[Kt]),this.attributes[Be[Kt]]=Kt);if(Ae.linkProgram(this.program),!Ae.getProgramParameter(this.program,Ae.LINK_STATUS))throw new Error(`Program failed to link: ${Ae.getProgramInfoLog(this.program)}`);Ae.deleteShader(Ot),Ae.deleteShader(At);for(let Kt=0;Kt<nt.length;Kt++){const jt=nt[Kt];if(jt&&!Vt[jt]){const qt=Ae.getUniformLocation(this.program,jt);qt&&(Vt[jt]=qt)}}this.fixedUniforms=E(l,Vt),this.terrainUniforms=((Kt,jt)=>({u_depth:new a.bP(Kt,jt.u_depth),u_terrain:new a.bP(Kt,jt.u_terrain),u_terrain_dim:new a.bg(Kt,jt.u_terrain_dim),u_terrain_matrix:new a.bR(Kt,jt.u_terrain_matrix),u_terrain_unpack:new a.bS(Kt,jt.u_terrain_unpack),u_terrain_exaggeration:new a.bg(Kt,jt.u_terrain_exaggeration)}))(l,Vt),this.projectionUniforms=((Kt,jt)=>({u_projection_matrix:new a.bR(Kt,jt.u_projection_matrix),u_projection_tile_mercator_coords:new a.bS(Kt,jt.u_projection_tile_mercator_coords),u_projection_clipping_plane:new a.bS(Kt,jt.u_projection_clipping_plane),u_projection_transition:new a.bg(Kt,jt.u_projection_transition),u_projection_fallback_matrix:new a.bR(Kt,jt.u_projection_fallback_matrix)}))(l,Vt),this.binderUniforms=C?C.getUniforms(l,Vt):[]}draw(l,p,C,E,T,U,q,Z,ae,Ae,ye,pe,Be,Fe,Xe,Ze,et,st,nt){const ct=l.gl;if(this.failedToCreate)return;if(l.program.set(this.program),l.setDepthMode(C),l.setStencilMode(E),l.setColorMode(T),l.setCullFace(U),Z){l.activeTexture.set(ct.TEXTURE2),ct.bindTexture(ct.TEXTURE_2D,Z.depthTexture),l.activeTexture.set(ct.TEXTURE3),ct.bindTexture(ct.TEXTURE_2D,Z.texture);for(const xt in this.terrainUniforms)this.terrainUniforms[xt].set(Z[xt])}if(ae)for(const xt in ae)this.projectionUniforms[wm[xt]].set(ae[xt]);if(q)for(const xt in this.fixedUniforms)this.fixedUniforms[xt].set(q[xt]);Ze&&Ze.setUniforms(l,this.binderUniforms,Fe,{zoom:Xe});let yt=0;switch(p){case ct.LINES:yt=2;break;case ct.TRIANGLES:yt=3;break;case ct.LINE_STRIP:yt=1}for(const xt of Be.get()){const At=xt.vaos||(xt.vaos={});(At[Ae]||(At[Ae]=new av)).bind(l,this,ye,Ze?Ze.getPaintVertexBuffers():[],pe,xt.vertexOffset,et,st,nt),ct.drawElements(p,xt.primitiveLength*yt,ct.UNSIGNED_SHORT,xt.primitiveOffset*yt*2)}}}function hf(B,l,p){const C=1/a.aC(p,1,l.transform.tileZoom),E=Math.pow(2,p.tileID.overscaledZ),T=p.tileSize*Math.pow(2,l.transform.tileZoom)/E,U=T*(p.tileID.canonical.x+p.tileID.wrap*E),q=T*p.tileID.canonical.y;return{u_image:0,u_texsize:p.imageAtlasTexture.size,u_scale:[C,B.fromScale,B.toScale],u_fade:B.t,u_pixel_coord_upper:[U>>16,q>>16],u_pixel_coord_lower:[65535&U,65535&q]}}const Ol=(B,l,p,C)=>{const E=B.style.light,T=E.properties.get("position"),U=[T.x,T.y,T.z],q=a.bV();E.properties.get("anchor")==="viewport"&&a.bW(q,B.transform.bearingInRadians),a.bX(U,U,q);const Z=B.transform.transformLightDirection(U),ae=E.properties.get("color");return{u_lightpos:U,u_lightpos_globe:Z,u_lightintensity:E.properties.get("intensity"),u_lightcolor:[ae.r,ae.g,ae.b],u_vertical_gradient:+l,u_opacity:p,u_fill_translate:C}},u1=(B,l,p,C,E,T,U)=>a.e(Ol(B,l,p,C),hf(T,B,U),{u_height_factor:-Math.pow(2,E.overscaledZ)/U.tileSize/8}),ud=(B,l,p,C)=>a.e(hf(l,B,p),{u_fill_translate:C}),fh=(B,l)=>({u_world:B,u_fill_translate:l}),cd=(B,l,p,C,E)=>a.e(ud(B,l,p,E),{u_world:C}),c1=(B,l,p,C,E)=>{const T=B.transform;let U,q,Z=0;if(p.paint.get("circle-pitch-alignment")==="map"){const ae=a.aC(l,1,T.zoom);U=!0,q=[ae,ae],Z=ae/(a.$*Math.pow(2,l.tileID.overscaledZ))*2*Math.PI*E}else U=!1,q=T.pixelsToGLUnits;return{u_camera_to_center_distance:T.cameraToCenterDistance,u_scale_with_map:+(p.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+U,u_device_pixel_ratio:B.pixelRatio,u_extrude_scale:q,u_globe_extrude_scale:Z,u_translate:C}},Ad=B=>({u_pixel_extrude_scale:[1/B.width,1/B.height]}),ph=B=>({u_viewport_size:[B.width,B.height]}),hd=(B,l=1)=>({u_color:B,u_overlay:0,u_overlay_scale:l}),Hg=(B,l,p,C)=>{const E=a.aC(B,1,l)/(a.$*Math.pow(2,B.tileID.overscaledZ))*2*Math.PI*C;return{u_extrude_scale:a.aC(B,1,l),u_intensity:p,u_globe_extrude_scale:E}},ql=(B,l,p,C)=>{const E=a.L();a.bY(E,0,B.width,B.height,0,0,1);const T=B.context.gl;return{u_matrix:E,u_world:[T.drawingBufferWidth,T.drawingBufferHeight],u_image:p,u_color_ramp:C,u_opacity:l.paint.get("heatmap-opacity")}},Sm=(B,l,p)=>{const C=p.paint.get("hillshade-accent-color");let E;switch(p.paint.get("hillshade-method")){case"basic":E=4;break;case"combined":E=1;break;case"igor":E=2;break;case"multidirectional":E=3;break;default:E=0}const T=p.getIlluminationProperties();for(let U=0;U<T.directionRadians.length;U++)p.paint.get("hillshade-illumination-anchor")==="viewport"&&(T.directionRadians[U]+=B.transform.bearingInRadians);return{u_image:0,u_latrange:mh(0,l.tileID),u_exaggeration:p.paint.get("hillshade-exaggeration"),u_altitudes:T.altitudeRadians,u_azimuths:T.directionRadians,u_accent:C,u_method:E,u_highlights:T.highlightColor,u_shadows:T.shadowColor}},dd=(B,l)=>{const p=l.stride,C=a.L();return a.bY(C,0,a.$,-a.$,0,0,1),a.M(C,C,[0,-a.$,0]),{u_matrix:C,u_image:1,u_dimension:[p,p],u_zoom:B.overscaledZ,u_unpack:l.getUnpackVector()}};function mh(B,l){const p=Math.pow(2,l.canonical.z),C=l.canonical.y;return[new a.a1(0,C/p).toLngLat().lat,new a.a1(0,(C+1)/p).toLngLat().lat]}const fd=(B,l,p=0)=>({u_image:0,u_unpack:l.getUnpackVector(),u_dimension:[l.stride,l.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:p,u_opacity:B.paint.get("color-relief-opacity")}),Em=(B,l,p,C)=>{const E=B.transform;return{u_translation:pA(B,l,p),u_ratio:C/a.aC(l,1,E.zoom),u_device_pixel_ratio:B.pixelRatio,u_units_to_pixels:[1/E.pixelsToGLUnits[0],1/E.pixelsToGLUnits[1]]}},cp=(B,l,p,C,E)=>a.e(Em(B,l,p,C),{u_image:0,u_image_height:E}),Zg=(B,l,p,C,E)=>{const T=B.transform,U=Ap(l,T);return{u_translation:pA(B,l,p),u_texsize:l.imageAtlasTexture.size,u_ratio:C/a.aC(l,1,T.zoom),u_device_pixel_ratio:B.pixelRatio,u_image:0,u_scale:[U,E.fromScale,E.toScale],u_fade:E.t,u_units_to_pixels:[1/T.pixelsToGLUnits[0],1/T.pixelsToGLUnits[1]]}},gh=(B,l,p,C,E,T)=>{const U=B.lineAtlas,q=Ap(l,B.transform),Z=p.layout.get("line-cap")==="round",ae=U.getDash(E.from,Z),Ae=U.getDash(E.to,Z),ye=ae.width*T.fromScale,pe=Ae.width*T.toScale;return a.e(Em(B,l,p,C),{u_patternscale_a:[q/ye,-ae.height/2],u_patternscale_b:[q/pe,-Ae.height/2],u_sdfgamma:U.width/(256*Math.min(ye,pe)*B.pixelRatio)/2,u_image:0,u_tex_y_a:ae.y,u_tex_y_b:Ae.y,u_mix:T.t})};function Ap(B,l){return 1/a.aC(B,1,l.tileZoom)}function pA(B,l,p){return a.aD(B.transform,l,p.paint.get("line-translate"),p.paint.get("line-translate-anchor"))}const df=(B,l,p,C,E)=>{return{u_tl_parent:B,u_scale_parent:l,u_buffer_scale:1,u_fade_t:p.mix,u_opacity:p.opacity*C.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:C.paint.get("raster-brightness-min"),u_brightness_high:C.paint.get("raster-brightness-max"),u_saturation_factor:(U=C.paint.get("raster-saturation"),U>0?1-1/(1.001-U):-U),u_contrast_factor:(T=C.paint.get("raster-contrast"),T>0?1/(1-T):1+T),u_spin_weights:A1(C.paint.get("raster-hue-rotate")),u_coords_top:[E[0].x,E[0].y,E[1].x,E[1].y],u_coords_bottom:[E[3].x,E[3].y,E[2].x,E[2].y]};var T,U};function A1(B){B*=Math.PI/180;const l=Math.sin(B),p=Math.cos(B);return[(2*p+1)/3,(-Math.sqrt(3)*l-p+1)/3,(Math.sqrt(3)*l-p+1)/3]}const yh=(B,l,p,C,E,T,U,q,Z,ae,Ae,ye,pe)=>{const Be=U.transform;return{u_is_size_zoom_constant:+(B==="constant"||B==="source"),u_is_size_feature_constant:+(B==="constant"||B==="camera"),u_size_t:l?l.uSizeT:0,u_size:l?l.uSize:0,u_camera_to_center_distance:Be.cameraToCenterDistance,u_pitch:Be.pitch/360*2*Math.PI,u_rotate_symbol:+p,u_aspect_ratio:Be.width/Be.height,u_fade_change:U.options.fadeDuration?U.symbolFadeChange:1,u_label_plane_matrix:q,u_coord_matrix:Z,u_is_text:+Ae,u_pitch_with_map:+C,u_is_along_line:E,u_is_variable_anchor:T,u_texsize:ye,u_texture:0,u_translation:ae,u_pitched_scale:pe}},Xg=(B,l,p,C,E,T,U,q,Z,ae,Ae,ye,pe,Be)=>{const Fe=U.transform;return a.e(yh(B,l,p,C,E,T,U,q,Z,ae,Ae,ye,Be),{u_gamma_scale:C?Math.cos(Fe.pitch*Math.PI/180)*Fe.cameraToCenterDistance:1,u_device_pixel_ratio:U.pixelRatio,u_is_halo:1})},vh=(B,l,p,C,E,T,U,q,Z,ae,Ae,ye,pe)=>a.e(Xg(B,l,p,C,E,T,U,q,Z,ae,!0,Ae,0,pe),{u_texsize_icon:ye,u_texture_icon:1}),hp=(B,l)=>({u_opacity:B,u_color:l}),h1=(B,l,p,C,E)=>a.e((function(T,U,q,Z){const ae=q.imageManager.getPattern(T.from.toString()),Ae=q.imageManager.getPattern(T.to.toString()),{width:ye,height:pe}=q.imageManager.getPixelSize(),Be=Math.pow(2,Z.tileID.overscaledZ),Fe=Z.tileSize*Math.pow(2,q.transform.tileZoom)/Be,Xe=Fe*(Z.tileID.canonical.x+Z.tileID.wrap*Be),Ze=Fe*Z.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ae.tl,u_pattern_br_a:ae.br,u_pattern_tl_b:Ae.tl,u_pattern_br_b:Ae.br,u_texsize:[ye,pe],u_mix:U.t,u_pattern_size_a:ae.displaySize,u_pattern_size_b:Ae.displaySize,u_scale_a:U.fromScale,u_scale_b:U.toScale,u_tile_units_to_pixels:1/a.aC(Z,1,q.transform.tileZoom),u_pixel_coord_upper:[Xe>>16,Ze>>16],u_pixel_coord_lower:[65535&Xe,65535&Ze]}})(p,E,l,C),{u_opacity:B}),Jg=(B,l)=>{},Yl={fillExtrusion:(B,l)=>({u_lightpos:new a.bT(B,l.u_lightpos),u_lightpos_globe:new a.bT(B,l.u_lightpos_globe),u_lightintensity:new a.bg(B,l.u_lightintensity),u_lightcolor:new a.bT(B,l.u_lightcolor),u_vertical_gradient:new a.bg(B,l.u_vertical_gradient),u_opacity:new a.bg(B,l.u_opacity),u_fill_translate:new a.bU(B,l.u_fill_translate)}),fillExtrusionPattern:(B,l)=>({u_lightpos:new a.bT(B,l.u_lightpos),u_lightpos_globe:new a.bT(B,l.u_lightpos_globe),u_lightintensity:new a.bg(B,l.u_lightintensity),u_lightcolor:new a.bT(B,l.u_lightcolor),u_vertical_gradient:new a.bg(B,l.u_vertical_gradient),u_height_factor:new a.bg(B,l.u_height_factor),u_opacity:new a.bg(B,l.u_opacity),u_fill_translate:new a.bU(B,l.u_fill_translate),u_image:new a.bP(B,l.u_image),u_texsize:new a.bU(B,l.u_texsize),u_pixel_coord_upper:new a.bU(B,l.u_pixel_coord_upper),u_pixel_coord_lower:new a.bU(B,l.u_pixel_coord_lower),u_scale:new a.bT(B,l.u_scale),u_fade:new a.bg(B,l.u_fade)}),fill:(B,l)=>({u_fill_translate:new a.bU(B,l.u_fill_translate)}),fillPattern:(B,l)=>({u_image:new a.bP(B,l.u_image),u_texsize:new a.bU(B,l.u_texsize),u_pixel_coord_upper:new a.bU(B,l.u_pixel_coord_upper),u_pixel_coord_lower:new a.bU(B,l.u_pixel_coord_lower),u_scale:new a.bT(B,l.u_scale),u_fade:new a.bg(B,l.u_fade),u_fill_translate:new a.bU(B,l.u_fill_translate)}),fillOutline:(B,l)=>({u_world:new a.bU(B,l.u_world),u_fill_translate:new a.bU(B,l.u_fill_translate)}),fillOutlinePattern:(B,l)=>({u_world:new a.bU(B,l.u_world),u_image:new a.bP(B,l.u_image),u_texsize:new a.bU(B,l.u_texsize),u_pixel_coord_upper:new a.bU(B,l.u_pixel_coord_upper),u_pixel_coord_lower:new a.bU(B,l.u_pixel_coord_lower),u_scale:new a.bT(B,l.u_scale),u_fade:new a.bg(B,l.u_fade),u_fill_translate:new a.bU(B,l.u_fill_translate)}),circle:(B,l)=>({u_camera_to_center_distance:new a.bg(B,l.u_camera_to_center_distance),u_scale_with_map:new a.bP(B,l.u_scale_with_map),u_pitch_with_map:new a.bP(B,l.u_pitch_with_map),u_extrude_scale:new a.bU(B,l.u_extrude_scale),u_device_pixel_ratio:new a.bg(B,l.u_device_pixel_ratio),u_globe_extrude_scale:new a.bg(B,l.u_globe_extrude_scale),u_translate:new a.bU(B,l.u_translate)}),collisionBox:(B,l)=>({u_pixel_extrude_scale:new a.bU(B,l.u_pixel_extrude_scale)}),collisionCircle:(B,l)=>({u_viewport_size:new a.bU(B,l.u_viewport_size)}),debug:(B,l)=>({u_color:new a.bQ(B,l.u_color),u_overlay:new a.bP(B,l.u_overlay),u_overlay_scale:new a.bg(B,l.u_overlay_scale)}),depth:Jg,clippingMask:Jg,heatmap:(B,l)=>({u_extrude_scale:new a.bg(B,l.u_extrude_scale),u_intensity:new a.bg(B,l.u_intensity),u_globe_extrude_scale:new a.bg(B,l.u_globe_extrude_scale)}),heatmapTexture:(B,l)=>({u_matrix:new a.bR(B,l.u_matrix),u_world:new a.bU(B,l.u_world),u_image:new a.bP(B,l.u_image),u_color_ramp:new a.bP(B,l.u_color_ramp),u_opacity:new a.bg(B,l.u_opacity)}),hillshade:(B,l)=>({u_image:new a.bP(B,l.u_image),u_latrange:new a.bU(B,l.u_latrange),u_exaggeration:new a.bg(B,l.u_exaggeration),u_altitudes:new a.b_(B,l.u_altitudes),u_azimuths:new a.b_(B,l.u_azimuths),u_accent:new a.bQ(B,l.u_accent),u_method:new a.bP(B,l.u_method),u_shadows:new a.bZ(B,l.u_shadows),u_highlights:new a.bZ(B,l.u_highlights)}),hillshadePrepare:(B,l)=>({u_matrix:new a.bR(B,l.u_matrix),u_image:new a.bP(B,l.u_image),u_dimension:new a.bU(B,l.u_dimension),u_zoom:new a.bg(B,l.u_zoom),u_unpack:new a.bS(B,l.u_unpack)}),colorRelief:(B,l)=>({u_image:new a.bP(B,l.u_image),u_unpack:new a.bS(B,l.u_unpack),u_dimension:new a.bU(B,l.u_dimension),u_elevation_stops:new a.bP(B,l.u_elevation_stops),u_color_stops:new a.bP(B,l.u_color_stops),u_color_ramp_size:new a.bP(B,l.u_color_ramp_size),u_opacity:new a.bg(B,l.u_opacity)}),line:(B,l)=>({u_translation:new a.bU(B,l.u_translation),u_ratio:new a.bg(B,l.u_ratio),u_device_pixel_ratio:new a.bg(B,l.u_device_pixel_ratio),u_units_to_pixels:new a.bU(B,l.u_units_to_pixels)}),lineGradient:(B,l)=>({u_translation:new a.bU(B,l.u_translation),u_ratio:new a.bg(B,l.u_ratio),u_device_pixel_ratio:new a.bg(B,l.u_device_pixel_ratio),u_units_to_pixels:new a.bU(B,l.u_units_to_pixels),u_image:new a.bP(B,l.u_image),u_image_height:new a.bg(B,l.u_image_height)}),linePattern:(B,l)=>({u_translation:new a.bU(B,l.u_translation),u_texsize:new a.bU(B,l.u_texsize),u_ratio:new a.bg(B,l.u_ratio),u_device_pixel_ratio:new a.bg(B,l.u_device_pixel_ratio),u_image:new a.bP(B,l.u_image),u_units_to_pixels:new a.bU(B,l.u_units_to_pixels),u_scale:new a.bT(B,l.u_scale),u_fade:new a.bg(B,l.u_fade)}),lineSDF:(B,l)=>({u_translation:new a.bU(B,l.u_translation),u_ratio:new a.bg(B,l.u_ratio),u_device_pixel_ratio:new a.bg(B,l.u_device_pixel_ratio),u_units_to_pixels:new a.bU(B,l.u_units_to_pixels),u_patternscale_a:new a.bU(B,l.u_patternscale_a),u_patternscale_b:new a.bU(B,l.u_patternscale_b),u_sdfgamma:new a.bg(B,l.u_sdfgamma),u_image:new a.bP(B,l.u_image),u_tex_y_a:new a.bg(B,l.u_tex_y_a),u_tex_y_b:new a.bg(B,l.u_tex_y_b),u_mix:new a.bg(B,l.u_mix)}),raster:(B,l)=>({u_tl_parent:new a.bU(B,l.u_tl_parent),u_scale_parent:new a.bg(B,l.u_scale_parent),u_buffer_scale:new a.bg(B,l.u_buffer_scale),u_fade_t:new a.bg(B,l.u_fade_t),u_opacity:new a.bg(B,l.u_opacity),u_image0:new a.bP(B,l.u_image0),u_image1:new a.bP(B,l.u_image1),u_brightness_low:new a.bg(B,l.u_brightness_low),u_brightness_high:new a.bg(B,l.u_brightness_high),u_saturation_factor:new a.bg(B,l.u_saturation_factor),u_contrast_factor:new a.bg(B,l.u_contrast_factor),u_spin_weights:new a.bT(B,l.u_spin_weights),u_coords_top:new a.bS(B,l.u_coords_top),u_coords_bottom:new a.bS(B,l.u_coords_bottom)}),symbolIcon:(B,l)=>({u_is_size_zoom_constant:new a.bP(B,l.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bP(B,l.u_is_size_feature_constant),u_size_t:new a.bg(B,l.u_size_t),u_size:new a.bg(B,l.u_size),u_camera_to_center_distance:new a.bg(B,l.u_camera_to_center_distance),u_pitch:new a.bg(B,l.u_pitch),u_rotate_symbol:new a.bP(B,l.u_rotate_symbol),u_aspect_ratio:new a.bg(B,l.u_aspect_ratio),u_fade_change:new a.bg(B,l.u_fade_change),u_label_plane_matrix:new a.bR(B,l.u_label_plane_matrix),u_coord_matrix:new a.bR(B,l.u_coord_matrix),u_is_text:new a.bP(B,l.u_is_text),u_pitch_with_map:new a.bP(B,l.u_pitch_with_map),u_is_along_line:new a.bP(B,l.u_is_along_line),u_is_variable_anchor:new a.bP(B,l.u_is_variable_anchor),u_texsize:new a.bU(B,l.u_texsize),u_texture:new a.bP(B,l.u_texture),u_translation:new a.bU(B,l.u_translation),u_pitched_scale:new a.bg(B,l.u_pitched_scale)}),symbolSDF:(B,l)=>({u_is_size_zoom_constant:new a.bP(B,l.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bP(B,l.u_is_size_feature_constant),u_size_t:new a.bg(B,l.u_size_t),u_size:new a.bg(B,l.u_size),u_camera_to_center_distance:new a.bg(B,l.u_camera_to_center_distance),u_pitch:new a.bg(B,l.u_pitch),u_rotate_symbol:new a.bP(B,l.u_rotate_symbol),u_aspect_ratio:new a.bg(B,l.u_aspect_ratio),u_fade_change:new a.bg(B,l.u_fade_change),u_label_plane_matrix:new a.bR(B,l.u_label_plane_matrix),u_coord_matrix:new a.bR(B,l.u_coord_matrix),u_is_text:new a.bP(B,l.u_is_text),u_pitch_with_map:new a.bP(B,l.u_pitch_with_map),u_is_along_line:new a.bP(B,l.u_is_along_line),u_is_variable_anchor:new a.bP(B,l.u_is_variable_anchor),u_texsize:new a.bU(B,l.u_texsize),u_texture:new a.bP(B,l.u_texture),u_gamma_scale:new a.bg(B,l.u_gamma_scale),u_device_pixel_ratio:new a.bg(B,l.u_device_pixel_ratio),u_is_halo:new a.bP(B,l.u_is_halo),u_translation:new a.bU(B,l.u_translation),u_pitched_scale:new a.bg(B,l.u_pitched_scale)}),symbolTextAndIcon:(B,l)=>({u_is_size_zoom_constant:new a.bP(B,l.u_is_size_zoom_constant),u_is_size_feature_constant:new a.bP(B,l.u_is_size_feature_constant),u_size_t:new a.bg(B,l.u_size_t),u_size:new a.bg(B,l.u_size),u_camera_to_center_distance:new a.bg(B,l.u_camera_to_center_distance),u_pitch:new a.bg(B,l.u_pitch),u_rotate_symbol:new a.bP(B,l.u_rotate_symbol),u_aspect_ratio:new a.bg(B,l.u_aspect_ratio),u_fade_change:new a.bg(B,l.u_fade_change),u_label_plane_matrix:new a.bR(B,l.u_label_plane_matrix),u_coord_matrix:new a.bR(B,l.u_coord_matrix),u_is_text:new a.bP(B,l.u_is_text),u_pitch_with_map:new a.bP(B,l.u_pitch_with_map),u_is_along_line:new a.bP(B,l.u_is_along_line),u_is_variable_anchor:new a.bP(B,l.u_is_variable_anchor),u_texsize:new a.bU(B,l.u_texsize),u_texsize_icon:new a.bU(B,l.u_texsize_icon),u_texture:new a.bP(B,l.u_texture),u_texture_icon:new a.bP(B,l.u_texture_icon),u_gamma_scale:new a.bg(B,l.u_gamma_scale),u_device_pixel_ratio:new a.bg(B,l.u_device_pixel_ratio),u_is_halo:new a.bP(B,l.u_is_halo),u_translation:new a.bU(B,l.u_translation),u_pitched_scale:new a.bg(B,l.u_pitched_scale)}),background:(B,l)=>({u_opacity:new a.bg(B,l.u_opacity),u_color:new a.bQ(B,l.u_color)}),backgroundPattern:(B,l)=>({u_opacity:new a.bg(B,l.u_opacity),u_image:new a.bP(B,l.u_image),u_pattern_tl_a:new a.bU(B,l.u_pattern_tl_a),u_pattern_br_a:new a.bU(B,l.u_pattern_br_a),u_pattern_tl_b:new a.bU(B,l.u_pattern_tl_b),u_pattern_br_b:new a.bU(B,l.u_pattern_br_b),u_texsize:new a.bU(B,l.u_texsize),u_mix:new a.bg(B,l.u_mix),u_pattern_size_a:new a.bU(B,l.u_pattern_size_a),u_pattern_size_b:new a.bU(B,l.u_pattern_size_b),u_scale_a:new a.bg(B,l.u_scale_a),u_scale_b:new a.bg(B,l.u_scale_b),u_pixel_coord_upper:new a.bU(B,l.u_pixel_coord_upper),u_pixel_coord_lower:new a.bU(B,l.u_pixel_coord_lower),u_tile_units_to_pixels:new a.bg(B,l.u_tile_units_to_pixels)}),terrain:(B,l)=>({u_texture:new a.bP(B,l.u_texture),u_ele_delta:new a.bg(B,l.u_ele_delta),u_fog_matrix:new a.bR(B,l.u_fog_matrix),u_fog_color:new a.bQ(B,l.u_fog_color),u_fog_ground_blend:new a.bg(B,l.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.bg(B,l.u_fog_ground_blend_opacity),u_horizon_color:new a.bQ(B,l.u_horizon_color),u_horizon_fog_blend:new a.bg(B,l.u_horizon_fog_blend),u_is_globe_mode:new a.bg(B,l.u_is_globe_mode)}),terrainDepth:(B,l)=>({u_ele_delta:new a.bg(B,l.u_ele_delta)}),terrainCoords:(B,l)=>({u_texture:new a.bP(B,l.u_texture),u_terrain_coords_id:new a.bg(B,l.u_terrain_coords_id),u_ele_delta:new a.bg(B,l.u_ele_delta)}),projectionErrorMeasurement:(B,l)=>({u_input:new a.bg(B,l.u_input),u_output_expected:new a.bg(B,l.u_output_expected)}),atmosphere:(B,l)=>({u_sun_pos:new a.bT(B,l.u_sun_pos),u_atmosphere_blend:new a.bg(B,l.u_atmosphere_blend),u_globe_position:new a.bT(B,l.u_globe_position),u_globe_radius:new a.bg(B,l.u_globe_radius),u_inv_proj_matrix:new a.bR(B,l.u_inv_proj_matrix)}),sky:(B,l)=>({u_sky_color:new a.bQ(B,l.u_sky_color),u_horizon_color:new a.bQ(B,l.u_horizon_color),u_horizon:new a.bU(B,l.u_horizon),u_horizon_normal:new a.bU(B,l.u_horizon_normal),u_sky_horizon_blend:new a.bg(B,l.u_sky_horizon_blend),u_sky_blend:new a.bg(B,l.u_sky_blend)})};class Wc{constructor(l,p,C){this.context=l;const E=l.gl;this.buffer=E.createBuffer(),this.dynamicDraw=!!C,this.context.unbindVAO(),l.bindElementBuffer.set(this.buffer),E.bufferData(E.ELEMENT_ARRAY_BUFFER,p.arrayBuffer,this.dynamicDraw?E.DYNAMIC_DRAW:E.STATIC_DRAW),this.dynamicDraw||delete p.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(l){const p=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),p.bufferSubData(p.ELEMENT_ARRAY_BUFFER,0,l.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const $l={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Qc{constructor(l,p,C,E){this.length=p.length,this.attributes=C,this.itemSize=p.bytesPerElement,this.dynamicDraw=E,this.context=l;const T=l.gl;this.buffer=T.createBuffer(),l.bindVertexBuffer.set(this.buffer),T.bufferData(T.ARRAY_BUFFER,p.arrayBuffer,this.dynamicDraw?T.DYNAMIC_DRAW:T.STATIC_DRAW),this.dynamicDraw||delete p.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(l){if(l.length!==this.length)throw new Error(`Length of new data is ${l.length}, which doesn't match current length of ${this.length}`);const p=this.context.gl;this.bind(),p.bufferSubData(p.ARRAY_BUFFER,0,l.arrayBuffer)}enableAttributes(l,p){for(let C=0;C<this.attributes.length;C++){const E=p.attributes[this.attributes[C].name];E!==void 0&&l.enableVertexAttribArray(E)}}setVertexAttribPointers(l,p,C){for(let E=0;E<this.attributes.length;E++){const T=this.attributes[E],U=p.attributes[T.name];U!==void 0&&l.vertexAttribPointer(U,T.components,l[$l[T.type]],!1,this.itemSize,T.offset+this.itemSize*(C||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class co{constructor(l){this.gl=l.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(l){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Om extends co{getDefault(){return a.bf.transparent}set(l){const p=this.current;(l.r!==p.r||l.g!==p.g||l.b!==p.b||l.a!==p.a||this.dirty)&&(this.gl.clearColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class dp extends co{getDefault(){return 1}set(l){(l!==this.current||this.dirty)&&(this.gl.clearDepth(l),this.current=l,this.dirty=!1)}}class d1 extends co{getDefault(){return 0}set(l){(l!==this.current||this.dirty)&&(this.gl.clearStencil(l),this.current=l,this.dirty=!1)}}class bh extends co{getDefault(){return[!0,!0,!0,!0]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||l[3]!==p[3]||this.dirty)&&(this.gl.colorMask(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class fu extends co{getDefault(){return!0}set(l){(l!==this.current||this.dirty)&&(this.gl.depthMask(l),this.current=l,this.dirty=!1)}}class Pt extends co{getDefault(){return 255}set(l){(l!==this.current||this.dirty)&&(this.gl.stencilMask(l),this.current=l,this.dirty=!1)}}class sn extends co{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(l){const p=this.current;(l.func!==p.func||l.ref!==p.ref||l.mask!==p.mask||this.dirty)&&(this.gl.stencilFunc(l.func,l.ref,l.mask),this.current=l,this.dirty=!1)}}class nn extends co{getDefault(){const l=this.gl;return[l.KEEP,l.KEEP,l.KEEP]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||this.dirty)&&(this.gl.stencilOp(l[0],l[1],l[2]),this.current=l,this.dirty=!1)}}class ui extends co{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;l?p.enable(p.STENCIL_TEST):p.disable(p.STENCIL_TEST),this.current=l,this.dirty=!1}}class rr extends co{getDefault(){return[0,1]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||this.dirty)&&(this.gl.depthRange(l[0],l[1]),this.current=l,this.dirty=!1)}}class go extends co{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;l?p.enable(p.DEPTH_TEST):p.disable(p.DEPTH_TEST),this.current=l,this.dirty=!1}}class ka extends co{getDefault(){return this.gl.LESS}set(l){(l!==this.current||this.dirty)&&(this.gl.depthFunc(l),this.current=l,this.dirty=!1)}}class yo extends co{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;l?p.enable(p.BLEND):p.disable(p.BLEND),this.current=l,this.dirty=!1}}class pd extends co{getDefault(){const l=this.gl;return[l.ONE,l.ZERO]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||this.dirty)&&(this.gl.blendFunc(l[0],l[1]),this.current=l,this.dirty=!1)}}class fp extends co{getDefault(){return a.bf.transparent}set(l){const p=this.current;(l.r!==p.r||l.g!==p.g||l.b!==p.b||l.a!==p.a||this.dirty)&&(this.gl.blendColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class Bl extends co{getDefault(){return this.gl.FUNC_ADD}set(l){(l!==this.current||this.dirty)&&(this.gl.blendEquation(l),this.current=l,this.dirty=!1)}}class ff extends co{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;l?p.enable(p.CULL_FACE):p.disable(p.CULL_FACE),this.current=l,this.dirty=!1}}class md extends co{getDefault(){return this.gl.BACK}set(l){(l!==this.current||this.dirty)&&(this.gl.cullFace(l),this.current=l,this.dirty=!1)}}class mA extends co{getDefault(){return this.gl.CCW}set(l){(l!==this.current||this.dirty)&&(this.gl.frontFace(l),this.current=l,this.dirty=!1)}}class gA extends co{getDefault(){return null}set(l){(l!==this.current||this.dirty)&&(this.gl.useProgram(l),this.current=l,this.dirty=!1)}}class Il extends co{getDefault(){return this.gl.TEXTURE0}set(l){(l!==this.current||this.dirty)&&(this.gl.activeTexture(l),this.current=l,this.dirty=!1)}}class Eo extends co{getDefault(){const l=this.gl;return[0,0,l.drawingBufferWidth,l.drawingBufferHeight]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||l[3]!==p[3]||this.dirty)&&(this.gl.viewport(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class cc extends co{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.bindFramebuffer(p.FRAMEBUFFER,l),this.current=l,this.dirty=!1}}class pp extends co{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.bindRenderbuffer(p.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class pa extends co{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.bindTexture(p.TEXTURE_2D,l),this.current=l,this.dirty=!1}}class Vl extends co{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.bindBuffer(p.ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class jA extends co{getDefault(){return null}set(l){const p=this.gl;p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class gd extends co{getDefault(){return null}set(l){var p;if(l===this.current&&!this.dirty)return;const C=this.gl;$e(C)?C.bindVertexArray(l):(p=C.getExtension("OES_vertex_array_object"))===null||p===void 0||p.bindVertexArrayOES(l),this.current=l,this.dirty=!1}}class yA extends co{getDefault(){return 4}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_ALIGNMENT,l),this.current=l,this.dirty=!1}}class Ac extends co{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),this.current=l,this.dirty=!1}}class qc extends co{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,l),this.current=l,this.dirty=!1}}class pu extends co{constructor(l,p){super(l),this.context=l,this.parent=p}getDefault(){return null}}class pf extends pu{setDirty(){this.dirty=!0}set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const p=this.gl;p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_2D,l,0),this.current=l,this.dirty=!1}}class yd extends pu{set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const p=this.gl;p.framebufferRenderbuffer(p.FRAMEBUFFER,p.DEPTH_ATTACHMENT,p.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class fr extends pu{set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const p=this.gl;p.framebufferRenderbuffer(p.FRAMEBUFFER,p.DEPTH_STENCIL_ATTACHMENT,p.RENDERBUFFER,l),this.current=l,this.dirty=!1}}const Ch="Framebuffer is not complete";class mu{constructor(l,p,C,E,T){this.context=l,this.width=p,this.height=C;const U=l.gl,q=this.framebuffer=U.createFramebuffer();if(this.colorAttachment=new pf(l,q),E)this.depthAttachment=T?new fr(l,q):new yd(l,q);else if(T)throw new Error("Stencil cannot be set without depth");if(U.checkFramebufferStatus(U.FRAMEBUFFER)!==U.FRAMEBUFFER_COMPLETE)throw new Error(Ch)}destroy(){const l=this.context.gl,p=this.colorAttachment.get();if(p&&l.deleteTexture(p),this.depthAttachment){const C=this.depthAttachment.get();C&&l.deleteRenderbuffer(C)}l.deleteFramebuffer(this.framebuffer)}}class _h{constructor(l){var p,C;if(this.gl=l,this.clearColor=new Om(this),this.clearDepth=new dp(this),this.clearStencil=new d1(this),this.colorMask=new bh(this),this.depthMask=new fu(this),this.stencilMask=new Pt(this),this.stencilFunc=new sn(this),this.stencilOp=new nn(this),this.stencilTest=new ui(this),this.depthRange=new rr(this),this.depthTest=new go(this),this.depthFunc=new ka(this),this.blend=new yo(this),this.blendFunc=new pd(this),this.blendColor=new fp(this),this.blendEquation=new Bl(this),this.cullFace=new ff(this),this.cullFaceSide=new md(this),this.frontFace=new mA(this),this.program=new gA(this),this.activeTexture=new Il(this),this.viewport=new Eo(this),this.bindFramebuffer=new cc(this),this.bindRenderbuffer=new pp(this),this.bindTexture=new pa(this),this.bindVertexBuffer=new Vl(this),this.bindElementBuffer=new jA(this),this.bindVertexArray=new gd(this),this.pixelStoreUnpack=new yA(this),this.pixelStoreUnpackPremultiplyAlpha=new Ac(this),this.pixelStoreUnpackFlipY=new qc(this),this.extTextureFilterAnisotropic=l.getExtension("EXT_texture_filter_anisotropic")||l.getExtension("MOZ_EXT_texture_filter_anisotropic")||l.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=l.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=l.getParameter(l.MAX_TEXTURE_SIZE),$e(l)){this.HALF_FLOAT=l.HALF_FLOAT;const E=l.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(p=l.RGBA16F)!==null&&p!==void 0?p:E?.RGBA16F_EXT,this.RGB16F=(C=l.RGB16F)!==null&&C!==void 0?C:E?.RGB16F_EXT,l.getExtension("EXT_color_buffer_float")}else{l.getExtension("EXT_color_buffer_half_float"),l.getExtension("OES_texture_half_float_linear");const E=l.getExtension("OES_texture_half_float");this.HALF_FLOAT=E?.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(l,p){return new Wc(this,l,p)}createVertexBuffer(l,p,C){return new Qc(this,l,p,C)}createRenderbuffer(l,p,C){const E=this.gl,T=E.createRenderbuffer();return this.bindRenderbuffer.set(T),E.renderbufferStorage(E.RENDERBUFFER,l,p,C),this.bindRenderbuffer.set(null),T}createFramebuffer(l,p,C,E){return new mu(this,l,p,C,E)}clear({color:l,depth:p,stencil:C}){const E=this.gl;let T=0;l&&(T|=E.COLOR_BUFFER_BIT,this.clearColor.set(l),this.colorMask.set([!0,!0,!0,!0])),p!==void 0&&(T|=E.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(p),this.depthMask.set(!0)),C!==void 0&&(T|=E.STENCIL_BUFFER_BIT,this.clearStencil.set(C),this.stencilMask.set(255)),E.clear(T)}setCullFace(l){l.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(l.mode),this.frontFace.set(l.frontFace))}setDepthMode(l){l.func!==this.gl.ALWAYS||l.mask?(this.depthTest.set(!0),this.depthFunc.set(l.func),this.depthMask.set(l.mask),this.depthRange.set(l.range)):this.depthTest.set(!1)}setStencilMode(l){l.test.func!==this.gl.ALWAYS||l.mask?(this.stencilTest.set(!0),this.stencilMask.set(l.mask),this.stencilOp.set([l.fail,l.depthFail,l.pass]),this.stencilFunc.set({func:l.test.func,ref:l.ref,mask:l.test.mask})):this.stencilTest.set(!1)}setColorMode(l){a.bH(l.blendFunction,gr.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(l.blendFunction),this.blendColor.set(l.blendColor)),this.colorMask.set(l.mask)}createVertexArray(){var l;return $e(this.gl)?this.gl.createVertexArray():(l=this.gl.getExtension("OES_vertex_array_object"))===null||l===void 0?void 0:l.createVertexArrayOES()}deleteVertexArray(l){var p;return $e(this.gl)?this.gl.deleteVertexArray(l):(p=this.gl.getExtension("OES_vertex_array_object"))===null||p===void 0?void 0:p.deleteVertexArrayOES(l)}unbindVAO(){this.bindVertexArray.set(null)}}let oa;function mf(B,l,p,C,E){const T=B.context,U=B.transform,q=T.gl,Z=B.useProgram("collisionBox"),ae=[];let Ae=0,ye=0;for(let et=0;et<C.length;et++){const st=C[et],nt=l.getTile(st).getBucket(p);if(!nt)continue;const ct=E?nt.textCollisionBox:nt.iconCollisionBox,yt=nt.collisionCircleArray;yt.length>0&&(ae.push({circleArray:yt,circleOffset:ye,coord:st}),Ae+=yt.length/4,ye=Ae),ct&&Z.draw(T,q.LINES,ti.disabled,X.disabled,B.colorModeForRenderPass(),Si.disabled,Ad(B.transform),B.style.map.terrain&&B.style.map.terrain.getTerrainData(st),U.getProjectionData({overscaledTileID:st,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),p.id,ct.layoutVertexBuffer,ct.indexBuffer,ct.segments,null,B.transform.zoom,null,null,ct.collisionVertexBuffer)}if(!E||!ae.length)return;const pe=B.useProgram("collisionCircle"),Be=new a.b$;Be.resize(4*Ae),Be._trim();let Fe=0;for(const et of ae)for(let st=0;st<et.circleArray.length/4;st++){const nt=4*st,ct=et.circleArray[nt+0],yt=et.circleArray[nt+1],xt=et.circleArray[nt+2],At=et.circleArray[nt+3];Be.emplace(Fe++,ct,yt,xt,At,0),Be.emplace(Fe++,ct,yt,xt,At,1),Be.emplace(Fe++,ct,yt,xt,At,2),Be.emplace(Fe++,ct,yt,xt,At,3)}(!oa||oa.length<2*Ae)&&(oa=(function(et){const st=2*et,nt=new a.c1;nt.resize(st),nt._trim();for(let ct=0;ct<st;ct++){const yt=6*ct;nt.uint16[yt+0]=4*ct+0,nt.uint16[yt+1]=4*ct+1,nt.uint16[yt+2]=4*ct+2,nt.uint16[yt+3]=4*ct+2,nt.uint16[yt+4]=4*ct+3,nt.uint16[yt+5]=4*ct+0}return nt})(Ae));const Xe=T.createIndexBuffer(oa,!0),Ze=T.createVertexBuffer(Be,a.c0.members,!0);for(const et of ae){const st=ph(B.transform);pe.draw(T,q.TRIANGLES,ti.disabled,X.disabled,B.colorModeForRenderPass(),Si.disabled,st,B.style.map.terrain&&B.style.map.terrain.getTerrainData(et.coord),null,p.id,Ze,Xe,a.aM.simpleSegment(0,2*et.circleOffset,et.circleArray.length,et.circleArray.length/2),null,B.transform.zoom,null,null,null)}Ze.destroy(),Xe.destroy()}const Bm=a.ag(new Float32Array(16));function xh(B,l,p,C,E,T){const{horizontalAlign:U,verticalAlign:q}=a.aH(B);return new a.P((-(U-.5)*l/E+C[0])*T,(-(q-.5)*p/E+C[1])*T)}function e0(B,l,p,C,E,T){const U=l.tileAnchorPoint.add(new a.P(l.translation[0],l.translation[1]));if(l.pitchWithMap){let q=C.mult(T);p||(q=q.rotate(-E));const Z=U.add(q);return Ti(Z.x,Z.y,l.pitchedLabelPlaneMatrix,l.getElevation).point}if(p){const q=Xi(l.tileAnchorPoint.x+1,l.tileAnchorPoint.y,l).point.sub(B),Z=Math.atan(q.y/q.x)+(q.x<0?Math.PI:0);return B.add(C.rotate(Z))}return B.add(C)}function Mh(B,l,p,C,E,T,U,q,Z,ae,Ae,ye){const pe=B.text.placedSymbolArray,Be=B.text.dynamicLayoutVertexArray,Fe=B.icon.dynamicLayoutVertexArray,Xe={};Be.clear();for(let Ze=0;Ze<pe.length;Ze++){const et=pe.get(Ze),st=et.hidden||!et.crossTileID||B.allowVerticalPlacement&&!et.placedOrientation?null:C[et.crossTileID];if(st){const nt=new a.P(et.anchorX,et.anchorY),ct={getElevation:ye,width:E.width,height:E.height,pitchedLabelPlaneMatrix:T,pitchWithMap:p,transform:E,tileAnchorPoint:nt,translation:ae,unwrappedTileID:Ae},yt=p?lo(nt.x,nt.y,ct):Xi(nt.x,nt.y,ct),xt=on(E.cameraToCenterDistance,yt.signedDistanceFromCamera);let At=a.ap(B.textSizeData,q,et)*xt/a.aB;p&&(At*=B.tilePixelRatio/U);const{width:Ot,height:Vt,anchor:Kt,textOffset:jt,textBoxScale:qt}=st,Kn=xh(Kt,Ot,Vt,jt,qt,At),On=E.getPitchedTextCorrection(nt.x+ae[0],nt.y+ae[1],Ae),un=e0(yt.point,ct,l,Kn,-E.bearingInRadians,On),ei=B.allowVerticalPlacement&&et.placedOrientation===a.ao.vertical?Math.PI/2:0;for(let Ji=0;Ji<et.numGlyphs;Ji++)a.av(Be,un,ei);Z&&et.associatedIconIndex>=0&&(Xe[et.associatedIconIndex]={shiftedAnchor:un,angle:ei})}else Fa(et.numGlyphs,Be)}if(Z){Fe.clear();const Ze=B.icon.placedSymbolArray;for(let et=0;et<Ze.length;et++){const st=Ze.get(et);if(st.hidden)Fa(st.numGlyphs,Fe);else{const nt=Xe[et];if(nt)for(let ct=0;ct<st.numGlyphs;ct++)a.av(Fe,nt.shiftedAnchor,nt.angle);else Fa(st.numGlyphs,Fe)}}B.icon.dynamicLayoutVertexBuffer.updateData(Fe)}B.text.dynamicLayoutVertexBuffer.updateData(Be)}function hc(B,l,p){return p.iconsInText&&l?"symbolTextAndIcon":B?"symbolSDF":"symbolIcon"}function dc(B,l,p,C,E,T,U,q,Z,ae,Ae,ye,pe){const Be=B.context,Fe=Be.gl,Xe=B.transform,Ze=q==="map",et=Z==="map",st=q!=="viewport"&&p.layout.get("symbol-placement")!=="point",nt=Ze&&!et&&!st,ct=!p.layout.get("symbol-sort-key").isConstant();let yt=!1;const xt=B.getDepthModeForSublayer(0,ti.ReadOnly),At=p._unevaluatedLayout.hasValue("text-variable-anchor")||p._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ot=[],Vt=Xe.getCircleRadiusCorrection();for(const Kt of C){const jt=l.getTile(Kt),qt=jt.getBucket(p);if(!qt)continue;const Kn=E?qt.text:qt.icon;if(!Kn||!Kn.segments.get().length||!Kn.hasVisibleVertices)continue;const On=Kn.programConfigurations.get(p.id),un=E||qt.sdfIcons,ei=E?qt.textSizeData:qt.iconSizeData,Ji=et||Xe.pitch!==0,Yr=B.useProgram(hc(un,E,qt),On),Ms=a.an(ei,Xe.zoom),Hr=B.style.map.terrain&&B.style.map.terrain.getTerrainData(Kt);let cs,As,Qo,tr,sa=[0,0],qo=null;if(E)As=jt.glyphAtlasTexture,Qo=Fe.LINEAR,cs=jt.glyphAtlasTexture.size,qt.iconsInText&&(sa=jt.imageAtlasTexture.size,qo=jt.imageAtlasTexture,tr=Ji||B.options.rotating||B.options.zooming||ei.kind==="composite"||ei.kind==="camera"?Fe.LINEAR:Fe.NEAREST);else{const Kr=p.layout.get("icon-size").constantOr(0)!==1||qt.iconsNeedLinear;As=jt.imageAtlasTexture,Qo=un||B.options.rotating||B.options.zooming||Kr||Ji?Fe.LINEAR:Fe.NEAREST,cs=jt.imageAtlasTexture.size}const Ga=a.aC(jt,1,B.transform.zoom),aa=di(Ze,B.transform,Ga),VA=a.L();a.aq(VA,aa);const $u=Vn(et,Ze,B.transform,Ga),Cu=a.aD(Xe,jt,T,U),HA=Xe.getProjectionData({overscaledTileID:Kt,applyGlobeMatrix:!pe,applyTerrainMatrix:!0}),Sd=At&&qt.hasTextData(),Ed=p.layout.get("icon-text-fit")!=="none"&&Sd&&qt.hasIconData();if(st){const Kr=B.style.map.terrain?(Dl,la)=>B.style.map.terrain.getElevation(Kt,Dl,la):null,Bo=p.layout.get("text-rotation-alignment")==="map";Di(qt,B,E,aa,VA,et,ae,Bo,Kt.toUnwrapped(),Xe.width,Xe.height,Cu,Kr)}const Hc=E&&At||Ed,pl=st||Hc?Bm:et?aa:B.transform.clipSpaceToPixelsMatrix,Zc=un&&p.paint.get(E?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Mc;Mc=un?qt.iconsInText?vh(ei.kind,Ms,nt,et,st,Hc,B,pl,$u,Cu,cs,sa,Vt):Xg(ei.kind,Ms,nt,et,st,Hc,B,pl,$u,Cu,E,cs,0,Vt):yh(ei.kind,Ms,nt,et,st,Hc,B,pl,$u,Cu,E,cs,Vt);const _u={program:Yr,buffers:Kn,uniformValues:Mc,projectionData:HA,atlasTexture:As,atlasTextureIcon:qo,atlasInterpolation:Qo,atlasInterpolationIcon:tr,isSDF:un,hasHalo:Zc};if(ct&&qt.canOverlap){yt=!0;const Kr=Kn.segments.get();for(const Bo of Kr)Ot.push({segments:new a.aM([Bo]),sortKey:Bo.sortKey,state:_u,terrainData:Hr})}else Ot.push({segments:Kn.segments,sortKey:0,state:_u,terrainData:Hr})}yt&&Ot.sort(((Kt,jt)=>Kt.sortKey-jt.sortKey));for(const Kt of Ot){const jt=Kt.state;if(Be.activeTexture.set(Fe.TEXTURE0),jt.atlasTexture.bind(jt.atlasInterpolation,Fe.CLAMP_TO_EDGE),jt.atlasTextureIcon&&(Be.activeTexture.set(Fe.TEXTURE1),jt.atlasTextureIcon&&jt.atlasTextureIcon.bind(jt.atlasInterpolationIcon,Fe.CLAMP_TO_EDGE)),jt.isSDF){const qt=jt.uniformValues;jt.hasHalo&&(qt.u_is_halo=1,wh(jt.buffers,Kt.segments,p,B,jt.program,xt,Ae,ye,qt,jt.projectionData,Kt.terrainData)),qt.u_is_halo=0}wh(jt.buffers,Kt.segments,p,B,jt.program,xt,Ae,ye,jt.uniformValues,jt.projectionData,Kt.terrainData)}}function wh(B,l,p,C,E,T,U,q,Z,ae,Ae){const ye=C.context;E.draw(ye,ye.gl.TRIANGLES,T,U,q,Si.backCCW,Z,Ae,ae,p.id,B.layoutVertexBuffer,B.indexBuffer,l,p.paint,C.transform.zoom,B.programConfigurations.get(p.id),B.dynamicLayoutVertexBuffer,B.opacityVertexBuffer)}function vd(B,l,p,C,E){const T=B.context,U=T.gl,q=X.disabled,Z=new gr([U.ONE,U.ONE],a.bf.transparent,[!0,!0,!0,!0]),ae=l.getBucket(p);if(!ae)return;const Ae=C.key;let ye=p.heatmapFbos.get(Ae);ye||(ye=kl(T,l.tileSize,l.tileSize),p.heatmapFbos.set(Ae,ye)),T.bindFramebuffer.set(ye.framebuffer),T.viewport.set([0,0,l.tileSize,l.tileSize]),T.clear({color:a.bf.transparent});const pe=ae.programConfigurations.get(p.id),Be=B.useProgram("heatmap",pe,!E),Fe=B.transform.getProjectionData({overscaledTileID:l.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Xe=B.style.map.terrain.getTerrainData(C);Be.draw(T,U.TRIANGLES,ti.disabled,q,Z,Si.disabled,Hg(l,B.transform.zoom,p.paint.get("heatmap-intensity"),1),Xe,Fe,p.id,ae.layoutVertexBuffer,ae.indexBuffer,ae.segments,p.paint,B.transform.zoom,pe)}function Nu(B,l,p,C,E){const T=B.context,U=T.gl,q=B.transform;T.setColorMode(B.colorModeForRenderPass());const Z=Wo(T,l),ae=p.key,Ae=l.heatmapFbos.get(ae);if(!Ae)return;T.activeTexture.set(U.TEXTURE0),U.bindTexture(U.TEXTURE_2D,Ae.colorAttachment.get()),T.activeTexture.set(U.TEXTURE1),Z.bind(U.LINEAR,U.CLAMP_TO_EDGE);const ye=q.getProjectionData({overscaledTileID:p,applyTerrainMatrix:E,applyGlobeMatrix:!C});B.useProgram("heatmapTexture").draw(T,U.TRIANGLES,ti.disabled,X.disabled,B.colorModeForRenderPass(),Si.disabled,ql(B,l,0,1),null,ye,l.id,B.rasterBoundsBuffer,B.quadTriangleIndexBuffer,B.rasterBoundsSegments,l.paint,q.zoom),Ae.destroy(),l.heatmapFbos.delete(ae)}function kl(B,l,p){var C,E;const T=B.gl,U=T.createTexture();T.bindTexture(T.TEXTURE_2D,U),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_S,T.CLAMP_TO_EDGE),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_T,T.CLAMP_TO_EDGE),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,T.LINEAR),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,T.LINEAR);const q=(C=B.HALF_FLOAT)!==null&&C!==void 0?C:T.UNSIGNED_BYTE,Z=(E=B.RGBA16F)!==null&&E!==void 0?E:T.RGBA;T.texImage2D(T.TEXTURE_2D,0,Z,l,p,0,T.RGBA,q,null);const ae=B.createFramebuffer(l,p,!1,!1);return ae.colorAttachment.set(U),ae}function Wo(B,l){return l.colorRampTexture||(l.colorRampTexture=new a.T(B,l.colorRamp,B.gl.RGBA)),l.colorRampTexture}function ns(B,l,p,C,E){if(!p||!C||!C.imageAtlas)return;const T=C.imageAtlas.patternPositions;let U=T[p.to.toString()],q=T[p.from.toString()];if(!U&&q&&(U=q),!q&&U&&(q=U),!U||!q){const Z=E.getPaintProperty(l);U=T[Z],q=T[Z]}U&&q&&B.setConstantPatternPositions(U,q)}function fc(B,l,p,C,E,T,U,q){const Z=B.context.gl,ae="fill-pattern",Ae=p.paint.get(ae),ye=Ae&&Ae.constantOr(1),pe=p.getCrossfadeParameters();let Be,Fe,Xe,Ze,et;const st=B.transform,nt=p.paint.get("fill-translate"),ct=p.paint.get("fill-translate-anchor");U?(Fe=ye&&!p.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Be=Z.LINES):(Fe=ye?"fillPattern":"fill",Be=Z.TRIANGLES);const yt=Ae.constantOr(null);for(const xt of C){const At=l.getTile(xt);if(ye&&!At.patternsLoaded())continue;const Ot=At.getBucket(p);if(!Ot)continue;const Vt=Ot.programConfigurations.get(p.id),Kt=B.useProgram(Fe,Vt),jt=B.style.map.terrain&&B.style.map.terrain.getTerrainData(xt);ye&&(B.context.activeTexture.set(Z.TEXTURE0),At.imageAtlasTexture.bind(Z.LINEAR,Z.CLAMP_TO_EDGE),Vt.updatePaintBuffers(pe)),ns(Vt,ae,yt,At,p);const qt=st.getProjectionData({overscaledTileID:xt,applyGlobeMatrix:!q,applyTerrainMatrix:!0}),Kn=a.aD(st,At,nt,ct);if(U){Ze=Ot.indexBuffer2,et=Ot.segments2;const un=[Z.drawingBufferWidth,Z.drawingBufferHeight];Xe=Fe==="fillOutlinePattern"&&ye?cd(B,pe,At,un,Kn):fh(un,Kn)}else Ze=Ot.indexBuffer,et=Ot.segments,Xe=ye?ud(B,pe,At,Kn):{u_fill_translate:Kn};const On=B.stencilModeForClipping(xt);Kt.draw(B.context,Be,E,On,T,Si.backCCW,Xe,jt,qt,p.id,Ot.layoutVertexBuffer,Ze,et,p.paint,B.transform.zoom,Vt)}}function NA(B,l,p,C,E,T,U,q){const Z=B.context,ae=Z.gl,Ae="fill-extrusion-pattern",ye=p.paint.get(Ae),pe=ye.constantOr(1),Be=p.getCrossfadeParameters(),Fe=p.paint.get("fill-extrusion-opacity"),Xe=ye.constantOr(null),Ze=B.transform;for(const et of C){const st=l.getTile(et),nt=st.getBucket(p);if(!nt)continue;const ct=B.style.map.terrain&&B.style.map.terrain.getTerrainData(et),yt=nt.programConfigurations.get(p.id),xt=B.useProgram(pe?"fillExtrusionPattern":"fillExtrusion",yt);pe&&(B.context.activeTexture.set(ae.TEXTURE0),st.imageAtlasTexture.bind(ae.LINEAR,ae.CLAMP_TO_EDGE),yt.updatePaintBuffers(Be));const At=Ze.getProjectionData({overscaledTileID:et,applyGlobeMatrix:!q,applyTerrainMatrix:!0});ns(yt,Ae,Xe,st,p);const Ot=a.aD(Ze,st,p.paint.get("fill-extrusion-translate"),p.paint.get("fill-extrusion-translate-anchor")),Vt=p.paint.get("fill-extrusion-vertical-gradient"),Kt=pe?u1(B,Vt,Fe,Ot,et,Be,st):Ol(B,Vt,Fe,Ot);xt.draw(Z,Z.gl.TRIANGLES,E,T,U,Si.backCCW,Kt,ct,At,p.id,nt.layoutVertexBuffer,nt.indexBuffer,nt.segments,p.paint,B.transform.zoom,yt,B.style.map.terrain&&nt.centroidVertexBuffer)}}function GA(B,l,p,C,E,T,U,q,Z){var ae;const Ae=B.style.projection,ye=B.context,pe=B.transform,Be=ye.gl,Fe=[`#define NUM_ILLUMINATION_SOURCES ${p.paint.get("hillshade-highlight-color").values.length}`],Xe=B.useProgram("hillshade",null,!1,Fe),Ze=!B.options.moving;for(const et of C){const st=l.getTile(et),nt=st.fbo;if(!nt)continue;const ct=Ae.getMeshFromTileID(ye,et.canonical,q,!0,"raster"),yt=(ae=B.style.map.terrain)===null||ae===void 0?void 0:ae.getTerrainData(et);ye.activeTexture.set(Be.TEXTURE0),Be.bindTexture(Be.TEXTURE_2D,nt.colorAttachment.get());const xt=pe.getProjectionData({overscaledTileID:et,aligned:Ze,applyGlobeMatrix:!Z,applyTerrainMatrix:!0});Xe.draw(ye,Be.TRIANGLES,T,E[et.overscaledZ],U,Si.backCCW,Sm(B,st,p),yt,xt,p.id,ct.vertexBuffer,ct.indexBuffer,ct.segments)}}function mp(B,l,p,C,E,T,U,q,Z){var ae;const Ae=B.style.projection,ye=B.context,pe=B.transform,Be=ye.gl,Fe=B.useProgram("colorRelief"),Xe=!B.options.moving;let Ze=!0,et=0;for(const st of C){const nt=l.getTile(st),ct=nt.dem;if(Ze){const Kt=Be.getParameter(Be.MAX_TEXTURE_SIZE),{elevationTexture:jt,colorTexture:qt}=p.getColorRampTextures(ye,Kt,ct.getUnpackVector());ye.activeTexture.set(Be.TEXTURE1),jt.bind(Be.NEAREST,Be.CLAMP_TO_EDGE),ye.activeTexture.set(Be.TEXTURE4),qt.bind(Be.LINEAR,Be.CLAMP_TO_EDGE),Ze=!1,et=jt.size[0]}if(!ct||!ct.data)continue;const yt=ct.stride,xt=ct.getPixels();if(ye.activeTexture.set(Be.TEXTURE0),ye.pixelStoreUnpackPremultiplyAlpha.set(!1),nt.demTexture=nt.demTexture||B.getTileTexture(yt),nt.demTexture){const Kt=nt.demTexture;Kt.update(xt,{premultiply:!1}),Kt.bind(Be.LINEAR,Be.CLAMP_TO_EDGE)}else nt.demTexture=new a.T(ye,xt,Be.RGBA,{premultiply:!1}),nt.demTexture.bind(Be.LINEAR,Be.CLAMP_TO_EDGE);const At=Ae.getMeshFromTileID(ye,st.canonical,q,!0,"raster"),Ot=(ae=B.style.map.terrain)===null||ae===void 0?void 0:ae.getTerrainData(st),Vt=pe.getProjectionData({overscaledTileID:st,aligned:Xe,applyGlobeMatrix:!Z,applyTerrainMatrix:!0});Fe.draw(ye,Be.TRIANGLES,T,E[st.overscaledZ],U,Si.backCCW,fd(p,nt.dem,et),Ot,Vt,p.id,At.vertexBuffer,At.indexBuffer,At.segments)}}const Sh=[new a.P(0,0),new a.P(a.$,0),new a.P(a.$,a.$),new a.P(0,a.$)];function Is(B,l,p,C,E,T,U,q,Z=!1,ae=!1){const Ae=C[C.length-1].overscaledZ,ye=B.context,pe=ye.gl,Be=B.useProgram("raster"),Fe=B.transform,Xe=B.style.projection,Ze=B.colorModeForRenderPass(),et=!B.options.moving;for(const st of C){const nt=B.getDepthModeForSublayer(st.overscaledZ-Ae,p.paint.get("raster-opacity")===1?ti.ReadWrite:ti.ReadOnly,pe.LESS),ct=l.getTile(st);ct.registerFadeDuration(p.paint.get("raster-fade-duration"));const yt=l.findLoadedParent(st,0),xt=l.findLoadedSibling(st),At=_s(ct,yt||xt||null,l,p,B.transform,B.style.map.terrain);let Ot,Vt;const Kt=p.paint.get("raster-resampling")==="nearest"?pe.NEAREST:pe.LINEAR;ye.activeTexture.set(pe.TEXTURE0),ct.texture.bind(Kt,pe.CLAMP_TO_EDGE,pe.LINEAR_MIPMAP_NEAREST),ye.activeTexture.set(pe.TEXTURE1),yt?(yt.texture.bind(Kt,pe.CLAMP_TO_EDGE,pe.LINEAR_MIPMAP_NEAREST),Ot=Math.pow(2,yt.tileID.overscaledZ-ct.tileID.overscaledZ),Vt=[ct.tileID.canonical.x*Ot%1,ct.tileID.canonical.y*Ot%1]):ct.texture.bind(Kt,pe.CLAMP_TO_EDGE,pe.LINEAR_MIPMAP_NEAREST),ct.texture.useMipmap&&ye.extTextureFilterAnisotropic&&B.transform.pitch>20&&pe.texParameterf(pe.TEXTURE_2D,ye.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,ye.extTextureFilterAnisotropicMax);const jt=B.style.map.terrain&&B.style.map.terrain.getTerrainData(st),qt=Fe.getProjectionData({overscaledTileID:st,aligned:et,applyGlobeMatrix:!ae,applyTerrainMatrix:!0}),Kn=df(Vt||[0,0],Ot||1,At,p,q),On=Xe.getMeshFromTileID(ye,st.canonical,T,U,"raster");Be.draw(ye,pe.TRIANGLES,nt,E?E[st.overscaledZ]:X.disabled,Ze,Z?Si.frontCCW:Si.backCCW,Kn,jt,qt,p.id,On.vertexBuffer,On.indexBuffer,On.segments)}}function _s(B,l,p,C,E,T){const U=C.paint.get("raster-fade-duration");if(!T&&U>0){const q=x.now(),Z=(q-B.timeAdded)/U,ae=l?(q-l.timeAdded)/U:-1,Ae=p.getSource(),ye=Dt(E,{tileSize:Ae.tileSize,roundZoom:Ae.roundZoom}),pe=!l||Math.abs(l.tileID.overscaledZ-ye)>Math.abs(B.tileID.overscaledZ-ye),Be=pe&&B.refreshedUponExpiration?1:a.ah(pe?Z:1-ae,0,1);return B.refreshedUponExpiration&&Z>=1&&(B.refreshedUponExpiration=!1),l?{opacity:1,mix:1-Be}:{opacity:Be,mix:0}}return{opacity:1,mix:0}}const Vr=new a.bf(1,0,0,1),pc=new a.bf(0,1,0,1),hl=new a.bf(0,0,1,1),Eh=new a.bf(1,0,1,1),mc=new a.bf(0,1,1,1);function Im(B,l,p,C){gu(B,0,l+p/2,B.transform.width,p,C)}function Ws(B,l,p,C){gu(B,l-p/2,0,p,B.transform.height,C)}function gu(B,l,p,C,E,T){const U=B.context,q=U.gl;q.enable(q.SCISSOR_TEST),q.scissor(l*B.pixelRatio,p*B.pixelRatio,C*B.pixelRatio,E*B.pixelRatio),U.clear({color:T}),q.disable(q.SCISSOR_TEST)}function Tl(B,l,p){const C=B.context,E=C.gl,T=B.useProgram("debug"),U=ti.disabled,q=X.disabled,Z=B.colorModeForRenderPass(),ae="$debug",Ae=B.style.map.terrain&&B.style.map.terrain.getTerrainData(p);C.activeTexture.set(E.TEXTURE0);const ye=l.getTileByID(p.key).latestRawTileData,pe=Math.floor((ye&&ye.byteLength||0)/1024),Be=l.getTile(p).tileSize,Fe=512/Math.min(Be,512)*(p.overscaledZ/B.transform.zoom)*.5;let Xe=p.canonical.toString();p.overscaledZ!==p.canonical.z&&(Xe+=` => ${p.overscaledZ}`),(function(et,st){et.initDebugOverlayCanvas();const nt=et.debugOverlayCanvas,ct=et.context.gl,yt=et.debugOverlayCanvas.getContext("2d");yt.clearRect(0,0,nt.width,nt.height),yt.shadowColor="white",yt.shadowBlur=2,yt.lineWidth=1.5,yt.strokeStyle="white",yt.textBaseline="top",yt.font="bold 36px Open Sans, sans-serif",yt.fillText(st,5,5),yt.strokeText(st,5,5),et.debugOverlayTexture.update(nt),et.debugOverlayTexture.bind(ct.LINEAR,ct.CLAMP_TO_EDGE)})(B,`${Xe} ${pe}kB`);const Ze=B.transform.getProjectionData({overscaledTileID:p,applyGlobeMatrix:!0,applyTerrainMatrix:!0});T.draw(C,E.TRIANGLES,U,q,gr.alphaBlended,Si.disabled,hd(a.bf.transparent,Fe),null,Ze,ae,B.debugBuffer,B.quadTriangleIndexBuffer,B.debugSegments),T.draw(C,E.LINE_STRIP,U,q,Z,Si.disabled,hd(a.bf.red),Ae,Ze,ae,B.debugBuffer,B.tileBorderIndexBuffer,B.debugSegments)}function gp(B,l,p,C){const{isRenderingGlobe:E}=C,T=B.context,U=T.gl,q=B.transform,Z=B.colorModeForRenderPass(),ae=B.getDepthModeFor3D(),Ae=B.useProgram("terrain");T.bindFramebuffer.set(null),T.viewport.set([0,0,B.width,B.height]);for(const ye of p){const pe=l.getTerrainMesh(ye.tileID),Be=B.renderToTexture.getTexture(ye),Fe=l.getTerrainData(ye.tileID);T.activeTexture.set(U.TEXTURE0),U.bindTexture(U.TEXTURE_2D,Be.texture);const Xe=l.getMeshFrameDelta(q.zoom),Ze=q.calculateFogMatrix(ye.tileID.toUnwrapped()),et=Mm(Xe,Ze,B.style.sky,q.pitch,E),st=q.getProjectionData({overscaledTileID:ye.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});Ae.draw(T,U.TRIANGLES,ae,X.disabled,Z,Si.backCCW,et,Fe,st,"terrain",pe.vertexBuffer,pe.indexBuffer,pe.segments)}}function gc(B,l){if(!l.mesh){const p=new a.aL;p.emplaceBack(-1,-1),p.emplaceBack(1,-1),p.emplaceBack(1,1),p.emplaceBack(-1,1);const C=new a.aN;C.emplaceBack(0,1,2),C.emplaceBack(0,2,3),l.mesh=new Ql(B.createVertexBuffer(p,Fo.members),B.createIndexBuffer(C),a.aM.simpleSegment(0,0,p.length,C.length))}return l.mesh}class Oh{constructor(l,p){this.context=new _h(l),this.transform=p,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.ag(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Gn.maxUnderzooming+Gn.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Ia}resize(l,p,C){if(this.width=Math.floor(l*C),this.height=Math.floor(p*C),this.pixelRatio=C,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const E of this.style._order)this.style._layers[E].resize()}setup(){const l=this.context,p=new a.aL;p.emplaceBack(0,0),p.emplaceBack(a.$,0),p.emplaceBack(0,a.$),p.emplaceBack(a.$,a.$),this.tileExtentBuffer=l.createVertexBuffer(p,Fo.members),this.tileExtentSegments=a.aM.simpleSegment(0,0,4,2);const C=new a.aL;C.emplaceBack(0,0),C.emplaceBack(a.$,0),C.emplaceBack(0,a.$),C.emplaceBack(a.$,a.$),this.debugBuffer=l.createVertexBuffer(C,Fo.members),this.debugSegments=a.aM.simpleSegment(0,0,4,5);const E=new a.c6;E.emplaceBack(0,0,0,0),E.emplaceBack(a.$,0,a.$,0),E.emplaceBack(0,a.$,0,a.$),E.emplaceBack(a.$,a.$,a.$,a.$),this.rasterBoundsBuffer=l.createVertexBuffer(E,sv.members),this.rasterBoundsSegments=a.aM.simpleSegment(0,0,4,2);const T=new a.aL;T.emplaceBack(0,0),T.emplaceBack(a.$,0),T.emplaceBack(0,a.$),T.emplaceBack(a.$,a.$),this.rasterBoundsBufferPosOnly=l.createVertexBuffer(T,Fo.members),this.rasterBoundsSegmentsPosOnly=a.aM.simpleSegment(0,0,4,5);const U=new a.aL;U.emplaceBack(0,0),U.emplaceBack(1,0),U.emplaceBack(0,1),U.emplaceBack(1,1),this.viewportBuffer=l.createVertexBuffer(U,Fo.members),this.viewportSegments=a.aM.simpleSegment(0,0,4,2);const q=new a.c7;q.emplaceBack(0),q.emplaceBack(1),q.emplaceBack(3),q.emplaceBack(2),q.emplaceBack(0),this.tileBorderIndexBuffer=l.createIndexBuffer(q);const Z=new a.aN;Z.emplaceBack(1,0,2),Z.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=l.createIndexBuffer(Z);const ae=this.context.gl;this.stencilClearMode=new X({func:ae.ALWAYS,mask:0},0,255,ae.ZERO,ae.ZERO,ae.ZERO),this.tileExtentMesh=new Ql(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const l=this.context,p=l.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const C=a.L();a.bY(C,0,this.width,this.height,0,0,1),a.N(C,C,[p.drawingBufferWidth,p.drawingBufferHeight,0]);const E={mainMatrix:C,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:C};this.useProgram("clippingMask",null,!0).draw(l,p.TRIANGLES,ti.disabled,this.stencilClearMode,gr.disabled,Si.disabled,null,null,E,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(l,p,C){if(this.currentStencilSource===l.source||!l.isTileClipped()||!p||!p.length)return;this.currentStencilSource=l.source,this.nextStencilID+p.length>256&&this.clearStencil();const E=this.context;E.setColorMode(gr.disabled),E.setDepthMode(ti.disabled);const T={};for(const U of p)T[U.key]=this.nextStencilID++;this._renderTileMasks(T,p,C,!0),this._renderTileMasks(T,p,C,!1),this._tileClippingMaskIDs=T}_renderTileMasks(l,p,C,E){const T=this.context,U=T.gl,q=this.style.projection,Z=this.transform,ae=this.useProgram("clippingMask");for(const Ae of p){const ye=l[Ae.key],pe=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Ae),Be=q.getMeshFromTileID(this.context,Ae.canonical,E,!0,"stencil"),Fe=Z.getProjectionData({overscaledTileID:Ae,applyGlobeMatrix:!C,applyTerrainMatrix:!0});ae.draw(T,U.TRIANGLES,ti.disabled,new X({func:U.ALWAYS,mask:0},ye,255,U.KEEP,U.KEEP,U.REPLACE),gr.disabled,C?Si.disabled:Si.backCCW,null,pe,Fe,"$clipping",Be.vertexBuffer,Be.indexBuffer,Be.segments)}}_renderTilesDepthBuffer(){const l=this.context,p=l.gl,C=this.style.projection,E=this.transform,T=this.useProgram("depth"),U=this.getDepthModeFor3D(),q=ot(E,{tileSize:E.tileSize});for(const Z of q){const ae=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Z),Ae=C.getMeshFromTileID(this.context,Z.canonical,!0,!0,"raster"),ye=E.getProjectionData({overscaledTileID:Z,applyGlobeMatrix:!0,applyTerrainMatrix:!0});T.draw(l,p.TRIANGLES,U,X.disabled,gr.disabled,Si.backCCW,null,ae,ye,"$clipping",Ae.vertexBuffer,Ae.indexBuffer,Ae.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const l=this.nextStencilID++,p=this.context.gl;return new X({func:p.NOTEQUAL,mask:255},l,255,p.KEEP,p.KEEP,p.REPLACE)}stencilModeForClipping(l){const p=this.context.gl;return new X({func:p.EQUAL,mask:255},this._tileClippingMaskIDs[l.key],0,p.KEEP,p.KEEP,p.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(l){const p=this.context.gl,C=l.sort(((U,q)=>q.overscaledZ-U.overscaledZ)),E=C[C.length-1].overscaledZ,T=C[0].overscaledZ-E+1;if(T>1){this.currentStencilSource=void 0,this.nextStencilID+T>256&&this.clearStencil();const U={};for(let q=0;q<T;q++)U[q+E]=new X({func:p.GEQUAL,mask:255},q+this.nextStencilID,255,p.KEEP,p.KEEP,p.REPLACE);return this.nextStencilID+=T,[U,C]}return[{[E]:X.disabled},C]}stencilConfigForOverlapTwoPass(l){const p=this.context.gl,C=l.sort(((U,q)=>q.overscaledZ-U.overscaledZ)),E=C[C.length-1].overscaledZ,T=C[0].overscaledZ-E+1;if(this.clearStencil(),T>1){const U={},q={};for(let Z=0;Z<T;Z++)U[Z+E]=new X({func:p.GREATER,mask:255},T+1+Z,255,p.KEEP,p.KEEP,p.REPLACE),q[Z+E]=new X({func:p.GREATER,mask:255},1+Z,255,p.KEEP,p.KEEP,p.REPLACE);return this.nextStencilID=2*T+1,[U,q,C]}return this.nextStencilID=3,[{[E]:new X({func:p.GREATER,mask:255},2,255,p.KEEP,p.KEEP,p.REPLACE)},{[E]:new X({func:p.GREATER,mask:255},1,255,p.KEEP,p.KEEP,p.REPLACE)},C]}colorModeForRenderPass(){const l=this.context.gl;return this._showOverdrawInspector?new gr([l.CONSTANT_COLOR,l.ONE],new a.bf(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?gr.unblended:gr.alphaBlended}getDepthModeForSublayer(l,p,C){if(!this.opaquePassEnabledForLayer())return ti.disabled;const E=1-((1+this.currentLayer)*this.numSublayers+l)*this.depthEpsilon;return new ti(C||this.context.gl.LEQUAL,p,[E,E])}getDepthModeFor3D(){return new ti(this.context.gl.LEQUAL,ti.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(l,p){var C,E;this.style=l,this.options=p,this.lineAtlas=l.lineAtlas,this.imageManager=l.imageManager,this.glyphManager=l.glyphManager,this.symbolFadeChange=l.placement.symbolFadeChange(x.now()),this.imageManager.beginFrame();const T=this.style._order,U=this.style.sourceCaches,q={},Z={},ae={},Ae={isRenderingToTexture:!1,isRenderingGlobe:((C=l.projection)===null||C===void 0?void 0:C.transitionState)>0};for(const pe in U){const Be=U[pe];Be.used&&Be.prepare(this.context),q[pe]=Be.getVisibleCoordinates(!1),Z[pe]=q[pe].slice().reverse(),ae[pe]=Be.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let pe=0;pe<T.length;pe++)if(this.style._layers[T[pe]].is3D()){this.opaquePassCutoff=pe;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const pe of T){const Be=this.style._layers[pe];if(!Be.hasOffscreenPass()||Be.isHidden(this.transform.zoom))continue;const Fe=Z[Be.source];(Be.type==="custom"||Fe.length)&&this.renderLayer(this,U[Be.source],Be,Fe,Ae)}if((E=this.style.projection)===null||E===void 0||E.updateGPUdependent({context:this.context,useProgram:pe=>this.useProgram(pe)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:p.showOverdrawInspector?a.bf.black:a.bf.transparent,depth:1}),this.clearStencil(),this.style.sky&&(function(pe,Be){const Fe=pe.context,Xe=Fe.gl,Ze=((xt,At,Ot)=>{const Vt=Math.cos(At.rollInRadians),Kt=Math.sin(At.rollInRadians),jt=He(At),qt=At.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:xt.properties.get("sky-color"),u_horizon_color:xt.properties.get("horizon-color"),u_horizon:[(At.width/2-jt*Kt)*Ot,(At.height/2+jt*Vt)*Ot],u_horizon_normal:[-Kt,Vt],u_sky_horizon_blend:xt.properties.get("sky-horizon-blend")*At.height/2*Ot,u_sky_blend:qt}})(Be,pe.style.map.transform,pe.pixelRatio),et=new ti(Xe.LEQUAL,ti.ReadWrite,[0,1]),st=X.disabled,nt=pe.colorModeForRenderPass(),ct=pe.useProgram("sky"),yt=gc(Fe,Be);ct.draw(Fe,Xe.TRIANGLES,et,st,nt,Si.disabled,Ze,null,void 0,"sky",yt.vertexBuffer,yt.indexBuffer,yt.segments)})(this,this.style.sky),this._showOverdrawInspector=p.showOverdrawInspector,this.depthRangeFor3D=[0,1-(l._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=T.length-1;this.currentLayer>=0;this.currentLayer--){const pe=this.style._layers[T[this.currentLayer]],Be=U[pe.source],Fe=q[pe.source];this._renderTileClippingMasks(pe,Fe,!1),this.renderLayer(this,Be,pe,Fe,Ae)}this.renderPass="translucent";let ye=!1;for(this.currentLayer=0;this.currentLayer<T.length;this.currentLayer++){const pe=this.style._layers[T[this.currentLayer]],Be=U[pe.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(pe,Ae))continue;this.opaquePassEnabledForLayer()||ye||(ye=!0,Ae.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());const Fe=(pe.type==="symbol"?ae:Z)[pe.source];this._renderTileClippingMasks(pe,q[pe.source],!!this.renderToTexture),this.renderLayer(this,Be,pe,Fe,Ae)}if(Ae.isRenderingGlobe&&(function(pe,Be,Fe){const Xe=pe.context,Ze=Xe.gl,et=pe.useProgram("atmosphere"),st=new ti(Ze.LEQUAL,ti.ReadOnly,[0,1]),nt=pe.transform,ct=(function(qt,Kn){const On=qt.properties.get("position"),un=[-On.x,-On.y,-On.z],ei=a.ag(new Float64Array(16));return qt.properties.get("anchor")==="map"&&(a.b6(ei,ei,Kn.rollInRadians),a.b7(ei,ei,-Kn.pitchInRadians),a.b6(ei,ei,Kn.bearingInRadians),a.b7(ei,ei,Kn.center.lat*Math.PI/180),a.bz(ei,ei,-Kn.center.lng*Math.PI/180)),a.c5(un,un,ei),un})(Fe,pe.transform),yt=nt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),xt=Be.properties.get("atmosphere-blend")*yt.projectionTransition;if(xt===0)return;const At=Ar(nt.worldSize,nt.center.lat),Ot=nt.inverseProjectionMatrix,Vt=new Float64Array(4);Vt[3]=1,a.aw(Vt,Vt,nt.modelViewProjectionMatrix),Vt[0]/=Vt[3],Vt[1]/=Vt[3],Vt[2]/=Vt[3],Vt[3]=1,a.aw(Vt,Vt,Ot),Vt[0]/=Vt[3],Vt[1]/=Vt[3],Vt[2]/=Vt[3],Vt[3]=1;const Kt=((qt,Kn,On,un,ei)=>({u_sun_pos:qt,u_atmosphere_blend:Kn,u_globe_position:On,u_globe_radius:un,u_inv_proj_matrix:ei}))(ct,xt,[Vt[0],Vt[1],Vt[2]],At,Ot),jt=gc(Xe,Be);et.draw(Xe,Ze.TRIANGLES,st,X.disabled,gr.alphaBlended,Si.disabled,Kt,null,null,"atmosphere",jt.vertexBuffer,jt.indexBuffer,jt.segments)})(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const pe=(function(Be,Fe){let Xe=null;const Ze=Object.values(Be._layers).flatMap((ct=>ct.source&&!ct.isHidden(Fe)?[Be.sourceCaches[ct.source]]:[])),et=Ze.filter((ct=>ct.getSource().type==="vector")),st=Ze.filter((ct=>ct.getSource().type!=="vector")),nt=ct=>{(!Xe||Xe.getSource().maxzoom<ct.getSource().maxzoom)&&(Xe=ct)};return et.forEach((ct=>nt(ct))),Xe||st.forEach((ct=>nt(ct))),Xe})(this.style,this.transform.zoom);pe&&(function(Be,Fe,Xe){for(let Ze=0;Ze<Xe.length;Ze++)Tl(Be,Fe,Xe[Ze])})(this,pe,pe.getVisibleCoordinates())}this.options.showPadding&&(function(pe){const Be=pe.transform.padding;Im(pe,pe.transform.height-(Be.top||0),3,Vr),Im(pe,Be.bottom||0,3,pc),Ws(pe,Be.left||0,3,hl),Ws(pe,pe.transform.width-(Be.right||0),3,Eh);const Fe=pe.transform.centerPoint;(function(Xe,Ze,et,st){gu(Xe,Ze-1,et-10,2,20,st),gu(Xe,Ze-10,et-1,20,2,st)})(pe,Fe.x,pe.transform.height-Fe.y,mc)})(this),this.context.setDefault()}maybeDrawDepthAndCoords(l){if(!this.style||!this.style.map||!this.style.map.terrain)return;const p=this.terrainFacilitator.matrix,C=this.transform.modelViewProjectionMatrix;let E=this.terrainFacilitator.dirty;E||(E=l?!a.c8(p,C):!a.c9(p,C)),E||(E=this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)),E&&(a.ca(p,C),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,(function(T,U){const q=T.context,Z=q.gl,ae=T.transform,Ae=gr.unblended,ye=new ti(Z.LEQUAL,ti.ReadWrite,[0,1]),pe=U.sourceCache.getRenderableTiles(),Be=T.useProgram("terrainDepth");q.bindFramebuffer.set(U.getFramebuffer("depth").framebuffer),q.viewport.set([0,0,T.width/devicePixelRatio,T.height/devicePixelRatio]),q.clear({color:a.bf.transparent,depth:1});for(const Fe of pe){const Xe=U.getTerrainMesh(Fe.tileID),Ze=U.getTerrainData(Fe.tileID),et=ae.getProjectionData({overscaledTileID:Fe.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),st={u_ele_delta:U.getMeshFrameDelta(ae.zoom)};Be.draw(q,Z.TRIANGLES,ye,X.disabled,Ae,Si.backCCW,st,Ze,et,"terrain",Xe.vertexBuffer,Xe.indexBuffer,Xe.segments)}q.bindFramebuffer.set(null),q.viewport.set([0,0,T.width,T.height])})(this,this.style.map.terrain),(function(T,U){const q=T.context,Z=q.gl,ae=T.transform,Ae=gr.unblended,ye=new ti(Z.LEQUAL,ti.ReadWrite,[0,1]),pe=U.getCoordsTexture(),Be=U.sourceCache.getRenderableTiles(),Fe=T.useProgram("terrainCoords");q.bindFramebuffer.set(U.getFramebuffer("coords").framebuffer),q.viewport.set([0,0,T.width/devicePixelRatio,T.height/devicePixelRatio]),q.clear({color:a.bf.transparent,depth:1}),U.coordsIndex=[];for(const Xe of Be){const Ze=U.getTerrainMesh(Xe.tileID),et=U.getTerrainData(Xe.tileID);q.activeTexture.set(Z.TEXTURE0),Z.bindTexture(Z.TEXTURE_2D,pe.texture);const st={u_terrain_coords_id:(255-U.coordsIndex.length)/255,u_texture:0,u_ele_delta:U.getMeshFrameDelta(ae.zoom)},nt=ae.getProjectionData({overscaledTileID:Xe.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});Fe.draw(q,Z.TRIANGLES,ye,X.disabled,Ae,Si.backCCW,st,et,nt,"terrain",Ze.vertexBuffer,Ze.indexBuffer,Ze.segments),U.coordsIndex.push(Xe.tileID.key)}q.bindFramebuffer.set(null),q.viewport.set([0,0,T.width,T.height])})(this,this.style.map.terrain))}renderLayer(l,p,C,E,T){C.isHidden(this.transform.zoom)||(C.type==="background"||C.type==="custom"||(E||[]).length)&&(this.id=C.id,a.cb(C)?(function(U,q,Z,ae,Ae,ye){if(U.renderPass!=="translucent")return;const{isRenderingToTexture:pe}=ye,Be=X.disabled,Fe=U.colorModeForRenderPass();(Z._unevaluatedLayout.hasValue("text-variable-anchor")||Z._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(Xe,Ze,et,st,nt,ct,yt,xt,At){const Ot=Ze.transform,Vt=Ze.style.map.terrain,Kt=nt==="map",jt=ct==="map";for(const qt of Xe){const Kn=st.getTile(qt),On=Kn.getBucket(et);if(!On||!On.text||!On.text.segments.get().length)continue;const un=a.an(On.textSizeData,Ot.zoom),ei=a.aC(Kn,1,Ze.transform.zoom),Ji=di(Kt,Ze.transform,ei),Yr=et.layout.get("icon-text-fit")!=="none"&&On.hasIconData();if(un){const Ms=Math.pow(2,Ot.zoom-Kn.tileID.overscaledZ),Hr=Vt?(cs,As)=>Vt.getElevation(qt,cs,As):null;Mh(On,Kt,jt,At,Ot,Ji,Ms,un,Yr,a.aD(Ot,Kn,yt,xt),qt.toUnwrapped(),Hr)}}})(ae,U,Z,q,Z.layout.get("text-rotation-alignment"),Z.layout.get("text-pitch-alignment"),Z.paint.get("text-translate"),Z.paint.get("text-translate-anchor"),Ae),Z.paint.get("icon-opacity").constantOr(1)!==0&&dc(U,q,Z,ae,!1,Z.paint.get("icon-translate"),Z.paint.get("icon-translate-anchor"),Z.layout.get("icon-rotation-alignment"),Z.layout.get("icon-pitch-alignment"),Z.layout.get("icon-keep-upright"),Be,Fe,pe),Z.paint.get("text-opacity").constantOr(1)!==0&&dc(U,q,Z,ae,!0,Z.paint.get("text-translate"),Z.paint.get("text-translate-anchor"),Z.layout.get("text-rotation-alignment"),Z.layout.get("text-pitch-alignment"),Z.layout.get("text-keep-upright"),Be,Fe,pe),q.map.showCollisionBoxes&&(mf(U,q,Z,ae,!0),mf(U,q,Z,ae,!1))})(l,p,C,E,this.style.placement.variableOffsets,T):a.cc(C)?(function(U,q,Z,ae,Ae){if(U.renderPass!=="translucent")return;const{isRenderingToTexture:ye}=Ae,pe=Z.paint.get("circle-opacity"),Be=Z.paint.get("circle-stroke-width"),Fe=Z.paint.get("circle-stroke-opacity"),Xe=!Z.layout.get("circle-sort-key").isConstant();if(pe.constantOr(1)===0&&(Be.constantOr(1)===0||Fe.constantOr(1)===0))return;const Ze=U.context,et=Ze.gl,st=U.transform,nt=U.getDepthModeForSublayer(0,ti.ReadOnly),ct=X.disabled,yt=U.colorModeForRenderPass(),xt=[],At=st.getCircleRadiusCorrection();for(let Ot=0;Ot<ae.length;Ot++){const Vt=ae[Ot],Kt=q.getTile(Vt),jt=Kt.getBucket(Z);if(!jt)continue;const qt=Z.paint.get("circle-translate"),Kn=Z.paint.get("circle-translate-anchor"),On=a.aD(st,Kt,qt,Kn),un=jt.programConfigurations.get(Z.id),ei=U.useProgram("circle",un),Ji=jt.layoutVertexBuffer,Yr=jt.indexBuffer,Ms=U.style.map.terrain&&U.style.map.terrain.getTerrainData(Vt),Hr={programConfiguration:un,program:ei,layoutVertexBuffer:Ji,indexBuffer:Yr,uniformValues:c1(U,Kt,Z,On,At),terrainData:Ms,projectionData:st.getProjectionData({overscaledTileID:Vt,applyGlobeMatrix:!ye,applyTerrainMatrix:!0})};if(Xe){const cs=jt.segments.get();for(const As of cs)xt.push({segments:new a.aM([As]),sortKey:As.sortKey,state:Hr})}else xt.push({segments:jt.segments,sortKey:0,state:Hr})}Xe&&xt.sort(((Ot,Vt)=>Ot.sortKey-Vt.sortKey));for(const Ot of xt){const{programConfiguration:Vt,program:Kt,layoutVertexBuffer:jt,indexBuffer:qt,uniformValues:Kn,terrainData:On,projectionData:un}=Ot.state;Kt.draw(Ze,et.TRIANGLES,nt,ct,yt,Si.backCCW,Kn,On,un,Z.id,jt,qt,Ot.segments,Z.paint,U.transform.zoom,Vt)}})(l,p,C,E,T):a.cd(C)?(function(U,q,Z,ae,Ae){if(Z.paint.get("heatmap-opacity")===0)return;const ye=U.context,{isRenderingToTexture:pe,isRenderingGlobe:Be}=Ae;if(U.style.map.terrain){for(const Fe of ae){const Xe=q.getTile(Fe);q.hasRenderableParent(Fe)||(U.renderPass==="offscreen"?vd(U,Xe,Z,Fe,Be):U.renderPass==="translucent"&&Nu(U,Z,Fe,pe,Be))}ye.viewport.set([0,0,U.width,U.height])}else U.renderPass==="offscreen"?(function(Fe,Xe,Ze,et){const st=Fe.context,nt=st.gl,ct=Fe.transform,yt=X.disabled,xt=new gr([nt.ONE,nt.ONE],a.bf.transparent,[!0,!0,!0,!0]);(function(At,Ot,Vt){const Kt=At.gl;At.activeTexture.set(Kt.TEXTURE1),At.viewport.set([0,0,Ot.width/4,Ot.height/4]);let jt=Vt.heatmapFbos.get(a.c2);jt?(Kt.bindTexture(Kt.TEXTURE_2D,jt.colorAttachment.get()),At.bindFramebuffer.set(jt.framebuffer)):(jt=kl(At,Ot.width/4,Ot.height/4),Vt.heatmapFbos.set(a.c2,jt))})(st,Fe,Ze),st.clear({color:a.bf.transparent});for(let At=0;At<et.length;At++){const Ot=et[At];if(Xe.hasRenderableParent(Ot))continue;const Vt=Xe.getTile(Ot),Kt=Vt.getBucket(Ze);if(!Kt)continue;const jt=Kt.programConfigurations.get(Ze.id),qt=Fe.useProgram("heatmap",jt),Kn=ct.getProjectionData({overscaledTileID:Ot,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),On=ct.getCircleRadiusCorrection();qt.draw(st,nt.TRIANGLES,ti.disabled,yt,xt,Si.backCCW,Hg(Vt,ct.zoom,Ze.paint.get("heatmap-intensity"),On),null,Kn,Ze.id,Kt.layoutVertexBuffer,Kt.indexBuffer,Kt.segments,Ze.paint,ct.zoom,jt)}st.viewport.set([0,0,Fe.width,Fe.height])})(U,q,Z,ae):U.renderPass==="translucent"&&(function(Fe,Xe){const Ze=Fe.context,et=Ze.gl;Ze.setColorMode(Fe.colorModeForRenderPass());const st=Xe.heatmapFbos.get(a.c2);st&&(Ze.activeTexture.set(et.TEXTURE0),et.bindTexture(et.TEXTURE_2D,st.colorAttachment.get()),Ze.activeTexture.set(et.TEXTURE1),Wo(Ze,Xe).bind(et.LINEAR,et.CLAMP_TO_EDGE),Fe.useProgram("heatmapTexture").draw(Ze,et.TRIANGLES,ti.disabled,X.disabled,Fe.colorModeForRenderPass(),Si.disabled,ql(Fe,Xe,0,1),null,null,Xe.id,Fe.viewportBuffer,Fe.quadTriangleIndexBuffer,Fe.viewportSegments,Xe.paint,Fe.transform.zoom))})(U,Z)})(l,p,C,E,T):a.ce(C)?(function(U,q,Z,ae,Ae){if(U.renderPass!=="translucent")return;const{isRenderingToTexture:ye}=Ae,pe=Z.paint.get("line-opacity"),Be=Z.paint.get("line-width");if(pe.constantOr(1)===0||Be.constantOr(1)===0)return;const Fe=U.getDepthModeForSublayer(0,ti.ReadOnly),Xe=U.colorModeForRenderPass(),Ze=Z.paint.get("line-dasharray"),et=Z.paint.get("line-pattern"),st=et.constantOr(1),nt=Z.paint.get("line-gradient"),ct=Z.getCrossfadeParameters(),yt=st?"linePattern":Ze?"lineSDF":nt?"lineGradient":"line",xt=U.context,At=xt.gl,Ot=U.transform;let Vt=!0;for(const Kt of ae){const jt=q.getTile(Kt);if(st&&!jt.patternsLoaded())continue;const qt=jt.getBucket(Z);if(!qt)continue;const Kn=qt.programConfigurations.get(Z.id),On=U.context.program.get(),un=U.useProgram(yt,Kn),ei=Vt||un.program!==On,Ji=U.style.map.terrain&&U.style.map.terrain.getTerrainData(Kt),Yr=et.constantOr(null);if(Yr&&jt.imageAtlas){const Qo=jt.imageAtlas,tr=Qo.patternPositions[Yr.to.toString()],sa=Qo.patternPositions[Yr.from.toString()];tr&&sa&&Kn.setConstantPatternPositions(tr,sa)}const Ms=Ot.getProjectionData({overscaledTileID:Kt,applyGlobeMatrix:!ye,applyTerrainMatrix:!0}),Hr=Ot.getPixelScale(),cs=st?Zg(U,jt,Z,Hr,ct):Ze?gh(U,jt,Z,Hr,Ze,ct):nt?cp(U,jt,Z,Hr,qt.lineClipsArray.length):Em(U,jt,Z,Hr);if(st)xt.activeTexture.set(At.TEXTURE0),jt.imageAtlasTexture.bind(At.LINEAR,At.CLAMP_TO_EDGE),Kn.updatePaintBuffers(ct);else if(Ze&&(ei||U.lineAtlas.dirty))xt.activeTexture.set(At.TEXTURE0),U.lineAtlas.bind(xt);else if(nt){const Qo=qt.gradients[Z.id];let tr=Qo.texture;if(Z.gradientVersion!==Qo.version){let sa=256;if(Z.stepInterpolant){const qo=q.getSource().maxzoom,Ga=Kt.canonical.z===qo?Math.ceil(1<<U.transform.maxZoom-Kt.canonical.z):1;sa=a.ah(a.c3(qt.maxLineLength/a.$*1024*Ga),256,xt.maxTextureSize)}Qo.gradient=a.c4({expression:Z.gradientExpression(),evaluationKey:"lineProgress",resolution:sa,image:Qo.gradient||void 0,clips:qt.lineClipsArray}),Qo.texture?Qo.texture.update(Qo.gradient):Qo.texture=new a.T(xt,Qo.gradient,At.RGBA),Qo.version=Z.gradientVersion,tr=Qo.texture}xt.activeTexture.set(At.TEXTURE0),tr.bind(Z.stepInterpolant?At.NEAREST:At.LINEAR,At.CLAMP_TO_EDGE)}const As=U.stencilModeForClipping(Kt);un.draw(xt,At.TRIANGLES,Fe,As,Xe,Si.disabled,cs,Ji,Ms,Z.id,qt.layoutVertexBuffer,qt.indexBuffer,qt.segments,Z.paint,U.transform.zoom,Kn,qt.layoutVertexBuffer2),Vt=!1}})(l,p,C,E,T):a.cf(C)?(function(U,q,Z,ae,Ae){const ye=Z.paint.get("fill-color"),pe=Z.paint.get("fill-opacity");if(pe.constantOr(1)===0)return;const{isRenderingToTexture:Be}=Ae,Fe=U.colorModeForRenderPass(),Xe=Z.paint.get("fill-pattern"),Ze=U.opaquePassEnabledForLayer()&&!Xe.constantOr(1)&&ye.constantOr(a.bf.transparent).a===1&&pe.constantOr(0)===1?"opaque":"translucent";if(U.renderPass===Ze){const et=U.getDepthModeForSublayer(1,U.renderPass==="opaque"?ti.ReadWrite:ti.ReadOnly);fc(U,q,Z,ae,et,Fe,!1,Be)}if(U.renderPass==="translucent"&&Z.paint.get("fill-antialias")){const et=U.getDepthModeForSublayer(Z.getPaintProperty("fill-outline-color")?2:0,ti.ReadOnly);fc(U,q,Z,ae,et,Fe,!0,Be)}})(l,p,C,E,T):a.cg(C)?(function(U,q,Z,ae,Ae){const ye=Z.paint.get("fill-extrusion-opacity");if(ye===0)return;const{isRenderingToTexture:pe}=Ae;if(U.renderPass==="translucent"){const Be=new ti(U.context.gl.LEQUAL,ti.ReadWrite,U.depthRangeFor3D);if(ye!==1||Z.paint.get("fill-extrusion-pattern").constantOr(1))NA(U,q,Z,ae,Be,X.disabled,gr.disabled,pe),NA(U,q,Z,ae,Be,U.stencilModeFor3D(),U.colorModeForRenderPass(),pe);else{const Fe=U.colorModeForRenderPass();NA(U,q,Z,ae,Be,X.disabled,Fe,pe)}}})(l,p,C,E,T):a.ch(C)?(function(U,q,Z,ae,Ae){if(U.renderPass!=="offscreen"&&U.renderPass!=="translucent")return;const{isRenderingToTexture:ye}=Ae,pe=U.context,Be=U.style.projection.useSubdivision,Fe=U.getDepthModeForSublayer(0,ti.ReadOnly),Xe=U.colorModeForRenderPass();if(U.renderPass==="offscreen")(function(Ze,et,st,nt,ct,yt,xt){const At=Ze.context,Ot=At.gl;for(const Vt of st){const Kt=et.getTile(Vt),jt=Kt.dem;if(!jt||!jt.data||!Kt.needsHillshadePrepare)continue;const qt=jt.dim,Kn=jt.stride,On=jt.getPixels();if(At.activeTexture.set(Ot.TEXTURE1),At.pixelStoreUnpackPremultiplyAlpha.set(!1),Kt.demTexture=Kt.demTexture||Ze.getTileTexture(Kn),Kt.demTexture){const ei=Kt.demTexture;ei.update(On,{premultiply:!1}),ei.bind(Ot.NEAREST,Ot.CLAMP_TO_EDGE)}else Kt.demTexture=new a.T(At,On,Ot.RGBA,{premultiply:!1}),Kt.demTexture.bind(Ot.NEAREST,Ot.CLAMP_TO_EDGE);At.activeTexture.set(Ot.TEXTURE0);let un=Kt.fbo;if(!un){const ei=new a.T(At,{width:qt,height:qt,data:null},Ot.RGBA);ei.bind(Ot.LINEAR,Ot.CLAMP_TO_EDGE),un=Kt.fbo=At.createFramebuffer(qt,qt,!0,!1),un.colorAttachment.set(ei.texture)}At.bindFramebuffer.set(un.framebuffer),At.viewport.set([0,0,qt,qt]),Ze.useProgram("hillshadePrepare").draw(At,Ot.TRIANGLES,ct,yt,xt,Si.disabled,dd(Kt.tileID,jt),null,null,nt.id,Ze.rasterBoundsBuffer,Ze.quadTriangleIndexBuffer,Ze.rasterBoundsSegments),Kt.needsHillshadePrepare=!1}})(U,q,ae,Z,Fe,X.disabled,Xe),pe.viewport.set([0,0,U.width,U.height]);else if(U.renderPass==="translucent")if(Be){const[Ze,et,st]=U.stencilConfigForOverlapTwoPass(ae);GA(U,q,Z,st,Ze,Fe,Xe,!1,ye),GA(U,q,Z,st,et,Fe,Xe,!0,ye)}else{const[Ze,et]=U.getStencilConfigForOverlapAndUpdateStencilID(ae);GA(U,q,Z,et,Ze,Fe,Xe,!1,ye)}})(l,p,C,E,T):a.ci(C)?(function(U,q,Z,ae,Ae){if(U.renderPass!=="translucent"||!ae.length)return;const{isRenderingToTexture:ye}=Ae,pe=U.style.projection.useSubdivision,Be=U.getDepthModeForSublayer(0,ti.ReadOnly),Fe=U.colorModeForRenderPass();if(pe){const[Xe,Ze,et]=U.stencilConfigForOverlapTwoPass(ae);mp(U,q,Z,et,Xe,Be,Fe,!1,ye),mp(U,q,Z,et,Ze,Be,Fe,!0,ye)}else{const[Xe,Ze]=U.getStencilConfigForOverlapAndUpdateStencilID(ae);mp(U,q,Z,Ze,Xe,Be,Fe,!1,ye)}})(l,p,C,E,T):a.cj(C)?(function(U,q,Z,ae,Ae){if(U.renderPass!=="translucent"||Z.paint.get("raster-opacity")===0||!ae.length)return;const{isRenderingToTexture:ye}=Ae,pe=q.getSource(),Be=U.style.projection.useSubdivision;if(pe instanceof zn)Is(U,q,Z,ae,null,!1,!1,pe.tileCoords,pe.flippedWindingOrder,ye);else if(Be){const[Fe,Xe,Ze]=U.stencilConfigForOverlapTwoPass(ae);Is(U,q,Z,Ze,Fe,!1,!0,Sh,!1,ye),Is(U,q,Z,Ze,Xe,!0,!0,Sh,!1,ye)}else{const[Fe,Xe]=U.getStencilConfigForOverlapAndUpdateStencilID(ae);Is(U,q,Z,Xe,Fe,!1,!0,Sh,!1,ye)}})(l,p,C,E,T):a.ck(C)?(function(U,q,Z,ae,Ae){const ye=Z.paint.get("background-color"),pe=Z.paint.get("background-opacity");if(pe===0)return;const{isRenderingToTexture:Be}=Ae,Fe=U.context,Xe=Fe.gl,Ze=U.style.projection,et=U.transform,st=et.tileSize,nt=Z.paint.get("background-pattern");if(U.isPatternMissing(nt))return;const ct=!nt&&ye.a===1&&pe===1&&U.opaquePassEnabledForLayer()?"opaque":"translucent";if(U.renderPass!==ct)return;const yt=X.disabled,xt=U.getDepthModeForSublayer(0,ct==="opaque"?ti.ReadWrite:ti.ReadOnly),At=U.colorModeForRenderPass(),Ot=U.useProgram(nt?"backgroundPattern":"background"),Vt=ae||ot(et,{tileSize:st,terrain:U.style.map.terrain});nt&&(Fe.activeTexture.set(Xe.TEXTURE0),U.imageManager.bind(U.context));const Kt=Z.getCrossfadeParameters();for(const jt of Vt){const qt=et.getProjectionData({overscaledTileID:jt,applyGlobeMatrix:!Be,applyTerrainMatrix:!0}),Kn=nt?h1(pe,U,nt,{tileID:jt,tileSize:st},Kt):hp(pe,ye),On=U.style.map.terrain&&U.style.map.terrain.getTerrainData(jt),un=Ze.getMeshFromTileID(Fe,jt.canonical,!1,!0,"raster");Ot.draw(Fe,Xe.TRIANGLES,xt,yt,At,Si.backCCW,Kn,On,qt,Z.id,un.vertexBuffer,un.indexBuffer,un.segments)}})(l,0,C,E,T):a.cl(C)&&(function(U,q,Z,ae){const{isRenderingGlobe:Ae}=ae,ye=U.context,pe=Z.implementation,Be=U.style.projection,Fe=U.transform,Xe=Fe.getProjectionDataForCustomLayer(Ae),Ze={farZ:Fe.farZ,nearZ:Fe.nearZ,fov:Fe.fov*Math.PI/180,modelViewProjectionMatrix:Fe.modelViewProjectionMatrix,projectionMatrix:Fe.projectionMatrix,shaderData:{variantName:Be.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
uniform mat4 u_projection_matrix;
${Be.shaderPreludeCode.vertexSource}`,define:Be.shaderDefine},defaultProjectionData:Xe},et=pe.renderingMode?pe.renderingMode:"2d";if(U.renderPass==="offscreen"){const st=pe.prerender;st&&(U.setCustomLayerDefaults(),ye.setColorMode(U.colorModeForRenderPass()),st.call(pe,ye.gl,Ze),ye.setDirty(),U.setBaseState())}else if(U.renderPass==="translucent"){U.setCustomLayerDefaults(),ye.setColorMode(U.colorModeForRenderPass()),ye.setStencilMode(X.disabled);const st=et==="3d"?U.getDepthModeFor3D():U.getDepthModeForSublayer(0,ti.ReadOnly);ye.setDepthMode(st),pe.render(ye.gl,Ze),ye.setDirty(),U.setBaseState(),ye.bindFramebuffer.set(null)}})(l,0,C,T))}saveTileTexture(l){const p=this._tileTextures[l.size[0]];p?p.push(l):this._tileTextures[l.size[0]]=[l]}getTileTexture(l){const p=this._tileTextures[l];return p&&p.length>0?p.pop():null}isPatternMissing(l){if(!l)return!1;if(!l.from||!l.to)return!0;const p=this.imageManager.getPattern(l.from.toString()),C=this.imageManager.getPattern(l.to.toString());return!p||!C}useProgram(l,p,C=!1,E=[]){this.cache=this.cache||{};const T=!!this.style.map.terrain,U=this.style.projection,q=C?xo.projectionMercator:U.shaderPreludeCode,Z=C?wl:U.shaderDefine,ae=l+(p?p.cacheKey:"")+`/${C?Au:U.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(T?"/terrain":"")+(E?`/${E.join("/")}`:"");return this.cache[ae]||(this.cache[ae]=new dh(this.context,xo[l],p,Yl[l],this._showOverdrawInspector,T,q,Z,E)),this.cache[ae]}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 l=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(l.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new a.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:l,drawingBufferHeight:p}=this.context.gl;return this.width!==l||this.height!==p}}function yu(B,l){let p,C=!1,E=null,T=null;const U=()=>{E=null,C&&(B.apply(T,p),E=setTimeout(U,l),C=!1)};return(...q)=>(C=!0,T=this,p=q,E||U(),E)}class qe{constructor(l){this._getCurrentHash=()=>{const p=window.location.hash.replace("#","");if(this._hashName){let C;return p.split("&").map((E=>E.split("="))).forEach((E=>{E[0]===this._hashName&&(C=E)})),(C&&C[1]||"").split("/")}return p.split("/")},this._onHashChange=()=>{const p=this._getCurrentHash();if(!this._isValidHash(p))return!1;const C=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(p[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+p[2],+p[1]],zoom:+p[0],bearing:C,pitch:+(p[4]||0)}),!0},this._updateHashUnthrottled=()=>{const p=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,p)},this._removeHash=()=>{const p=this._getCurrentHash();if(p.length===0)return;const C=p.join("/");let E=C;E.split("&").length>0&&(E=E.split("&")[0]),this._hashName&&(E=`${this._hashName}=${C}`);let T=window.location.hash.replace(E,"");T.startsWith("#&")?T=T.slice(0,1)+T.slice(2):T==="#"&&(T="");let U=window.location.href.replace(/(#.+)?$/,T);U=U.replace("&&","&"),window.history.replaceState(window.history.state,null,U)},this._updateHash=yu(this._updateHashUnthrottled,300),this._hashName=l&&encodeURIComponent(l)}addTo(l){return this._map=l,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(l){const p=this._map.getCenter(),C=Math.round(100*this._map.getZoom())/100,E=Math.ceil((C*Math.LN2+Math.log(512/360/.5))/Math.LN10),T=Math.pow(10,E),U=Math.round(p.lng*T)/T,q=Math.round(p.lat*T)/T,Z=this._map.getBearing(),ae=this._map.getPitch();let Ae="";if(Ae+=l?`/${U}/${q}/${C}`:`${C}/${q}/${U}`,(Z||ae)&&(Ae+="/"+Math.round(10*Z)/10),ae&&(Ae+=`/${Math.round(ae)}`),this._hashName){const ye=this._hashName;let pe=!1;const Be=window.location.hash.slice(1).split("&").map((Fe=>{const Xe=Fe.split("=")[0];return Xe===ye?(pe=!0,`${Xe}=${Ae}`):Fe})).filter((Fe=>Fe));return pe||Be.push(`${ye}=${Ae}`),`#${Be.join("&")}`}return`#${Ae}`}_isValidHash(l){if(l.length<3||l.some(isNaN))return!1;try{new a.S(+l[2],+l[1])}catch{return!1}const p=+l[0],C=+(l[3]||0),E=+(l[4]||0);return p>=this._map.getMinZoom()&&p<=this._map.getMaxZoom()&&C>=-180&&C<=180&&E>=this._map.getMinPitch()&&E<=this._map.getMaxPitch()}}const ma={linearity:.3,easing:a.cm(0,0,.3,1)},vu=a.e({deceleration:2500,maxSpeed:1400},ma),Hl=a.e({deceleration:20,maxSpeed:1400},ma),Gr=a.e({deceleration:1e3,maxSpeed:360},ma),gf=a.e({deceleration:1e3,maxSpeed:90},ma),yp=a.e({deceleration:1e3,maxSpeed:360},ma);class Bh{constructor(l){this._map=l,this.clear()}clear(){this._inertiaBuffer=[]}record(l){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:x.now(),settings:l})}_drainInertiaBuffer(){const l=this._inertiaBuffer,p=x.now();for(;l.length>0&&p-l[0].time>160;)l.shift()}_onMoveEnd(l){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const p={zoom:0,bearing:0,pitch:0,roll:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:T}of this._inertiaBuffer)p.zoom+=T.zoomDelta||0,p.bearing+=T.bearingDelta||0,p.pitch+=T.pitchDelta||0,p.roll+=T.rollDelta||0,T.panDelta&&p.pan._add(T.panDelta),T.around&&(p.around=T.around),T.pinchAround&&(p.pinchAround=T.pinchAround);const C=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,E={};if(p.pan.mag()){const T=WA(p.pan.mag(),C,a.e({},vu,l||{})),U=p.pan.mult(T.amount/p.pan.mag()),q=this._map.cameraHelper.handlePanInertia(U,this._map.transform);E.center=q.easingCenter,E.offset=q.easingOffset,Oo(E,T)}if(p.zoom){const T=WA(p.zoom,C,Hl);E.zoom=this._map.transform.zoom+T.amount,Oo(E,T)}if(p.bearing){const T=WA(p.bearing,C,Gr);E.bearing=this._map.transform.bearing+a.ah(T.amount,-179,179),Oo(E,T)}if(p.pitch){const T=WA(p.pitch,C,gf);E.pitch=this._map.transform.pitch+T.amount,Oo(E,T)}if(p.roll){const T=WA(p.roll,C,yp);E.roll=this._map.transform.roll+a.ah(T.amount,-179,179),Oo(E,T)}if(E.zoom||E.bearing){const T=p.pinchAround===void 0?p.around:p.pinchAround;E.around=T?this._map.unproject(T):this._map.getCenter()}return this.clear(),a.e(E,{noMoveStart:!0})}}function Oo(B,l){(!B.duration||B.duration<l.duration)&&(B.duration=l.duration,B.easing=l.easing)}function WA(B,l,p){const{maxSpeed:C,linearity:E,deceleration:T}=p,U=a.ah(B*E/(l/1e3),-C,C),q=Math.abs(U)/(T*E);return{easing:p.easing,duration:1e3*q,amount:U*(q/2)}}class Zl extends a.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,p,C,E={}){C=C instanceof MouseEvent?C:new MouseEvent(l,C);const T=_.mousePos(p.getCanvas(),C),U=p.unproject(T);super(l,a.e({point:T,lngLat:U,originalEvent:C},E)),this._defaultPrevented=!1,this.target=p}}class yf extends a.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,p,C){const E=l==="touchend"?C.changedTouches:C.touches,T=_.touchPos(p.getCanvasContainer(),E),U=T.map((Z=>p.unproject(Z))),q=T.reduce(((Z,ae,Ae,ye)=>Z.add(ae.div(ye.length))),new a.P(0,0));super(l,{points:T,point:q,lngLats:U,lngLat:p.unproject(q),originalEvent:C}),this._defaultPrevented=!1}}class t0 extends a.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,p,C){super(l,{originalEvent:C}),this._defaultPrevented=!1}}class f1{constructor(l,p){this._map=l,this._clickTolerance=p.clickTolerance}reset(){delete this._mousedownPos}wheel(l){return this._firePreventable(new t0(l.type,this._map,l))}mousedown(l,p){return this._mousedownPos=p,this._firePreventable(new Zl(l.type,this._map,l))}mouseup(l){this._map.fire(new Zl(l.type,this._map,l))}click(l,p){this._mousedownPos&&this._mousedownPos.dist(p)>=this._clickTolerance||this._map.fire(new Zl(l.type,this._map,l))}dblclick(l){return this._firePreventable(new Zl(l.type,this._map,l))}mouseover(l){this._map.fire(new Zl(l.type,this._map,l))}mouseout(l){this._map.fire(new Zl(l.type,this._map,l))}touchstart(l){return this._firePreventable(new yf(l.type,this._map,l))}touchmove(l){this._map.fire(new yf(l.type,this._map,l))}touchend(l){this._map.fire(new yf(l.type,this._map,l))}touchcancel(l){this._map.fire(new yf(l.type,this._map,l))}_firePreventable(l){if(this._map.fire(l),l.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class is{constructor(l){this._map=l}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(l){this._map.fire(new Zl(l.type,this._map,l))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Zl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(l){this._delayContextMenu?this._contextMenuEvent=l:this._ignoreContextMenu||this._map.fire(new Zl(l.type,this._map,l)),this._map.listens("contextmenu")&&l.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ih{constructor(l){this._map=l}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(l){return this.transform.screenPointToLocation(a.P.convert(l),this._map.terrain)}}class bd{constructor(l,p){this._map=l,this._tr=new Ih(l),this._el=l.getCanvasContainer(),this._container=l.getContainer(),this._clickTolerance=p.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(l,p){this.isEnabled()&&l.shiftKey&&l.button===0&&(_.disableDrag(),this._startPos=this._lastPos=p,this._active=!0)}mousemoveWindow(l,p){if(!this._active)return;const C=p;if(this._lastPos.equals(C)||!this._box&&C.dist(this._startPos)<this._clickTolerance)return;const E=this._startPos;this._lastPos=C,this._box||(this._box=_.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",l));const T=Math.min(E.x,C.x),U=Math.max(E.x,C.x),q=Math.min(E.y,C.y),Z=Math.max(E.y,C.y);_.setTransform(this._box,`translate(${T}px,${q}px)`),this._box.style.width=U-T+"px",this._box.style.height=Z-q+"px"}mouseupWindow(l,p){if(!this._active||l.button!==0)return;const C=this._startPos,E=p;if(this.reset(),_.suppressClick(),C.x!==E.x||C.y!==E.y)return this._map.fire(new a.l("boxzoomend",{originalEvent:l})),{cameraAnimation:T=>T.fitScreenCoordinates(C,E,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",l)}keydown(l){this._active&&l.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",l))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(_.remove(this._box),this._box=null),_.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(l,p){return this._map.fire(new a.l(l,{originalEvent:p}))}}function vA(B,l){if(B.length!==l.length)throw new Error(`The number of touches and points are not equal - touches ${B.length}, points ${l.length}`);const p={};for(let C=0;C<B.length;C++)p[B[C].identifier]=l[C];return p}class km{constructor(l){this.reset(),this.numTouches=l.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(l,p,C){(this.centroid||C.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=l.timeStamp),C.length===this.numTouches&&(this.centroid=(function(E){const T=new a.P(0,0);for(const U of E)T._add(U);return T.div(E.length)})(p),this.touches=vA(C,p)))}touchmove(l,p,C){if(this.aborted||!this.centroid)return;const E=vA(C,p);for(const T in this.touches){const U=E[T];(!U||U.dist(this.touches[T])>30)&&(this.aborted=!0)}}touchend(l,p,C){if((!this.centroid||l.timeStamp-this.startTime>500)&&(this.aborted=!0),C.length===0){const E=!this.aborted&&this.centroid;if(this.reset(),E)return E}}}class ja{constructor(l){this.singleTap=new km(l),this.numTaps=l.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(l,p,C){this.singleTap.touchstart(l,p,C)}touchmove(l,p,C){this.singleTap.touchmove(l,p,C)}touchend(l,p,C){const E=this.singleTap.touchend(l,p,C);if(E){const T=l.timeStamp-this.lastTime<500,U=!this.lastTap||this.lastTap.dist(E)<30;if(T&&U||this.reset(),this.count++,this.lastTime=l.timeStamp,this.lastTap=E,this.count===this.numTaps)return this.reset(),E}}}class Qs{constructor(l){this._tr=new Ih(l),this._zoomIn=new ja({numTouches:1,numTaps:2}),this._zoomOut=new ja({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(l,p,C){this._zoomIn.touchstart(l,p,C),this._zoomOut.touchstart(l,p,C)}touchmove(l,p,C){this._zoomIn.touchmove(l,p,C),this._zoomOut.touchmove(l,p,C)}touchend(l,p,C){const E=this._zoomIn.touchend(l,p,C),T=this._zoomOut.touchend(l,p,C),U=this._tr;return E?(this._active=!0,l.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:q=>q.easeTo({duration:300,zoom:U.zoom+1,around:U.unproject(E)},{originalEvent:l})}):T?(this._active=!0,l.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:q=>q.easeTo({duration:300,zoom:U.zoom-1,around:U.unproject(T)},{originalEvent:l})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class vf{constructor(l){this._enabled=!!l.enable,this._moveStateManager=l.moveStateManager,this._clickTolerance=l.clickTolerance||1,this._moveFunction=l.move,this._activateOnStart=!!l.activateOnStart,l.assignEvents(this),this.reset()}reset(l){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(l)}_move(...l){const p=this._moveFunction(...l);if(p.bearingDelta||p.pitchDelta||p.rollDelta||p.around||p.panDelta)return this._active=!0,p}dragStart(l,p){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(l)&&(this._moveStateManager.startMove(l),this._lastPoint=Array.isArray(p)?p[0]:p,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(l,p){if(!this.isEnabled())return;const C=this._lastPoint;if(!C)return;if(l.preventDefault(),!this._moveStateManager.isValidMoveEvent(l))return void this.reset(l);const E=Array.isArray(p)?p[0]:p;return!this._moved&&E.dist(C)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=E,this._move(C,E))}dragEnd(l){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(l)&&(this._moved&&_.suppressClick(),this.reset(l))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const yc=0,bf=2,p1={[yc]:1,[bf]:2};class Yc{constructor(l){this._correctEvent=l.checkCorrectEvent}startMove(l){const p=_.mouseButton(l);this._eventButton=p}endMove(l){delete this._eventButton}isValidStartEvent(l){return this._correctEvent(l)}isValidMoveEvent(l){return!(function(p,C){const E=p1[C];return p.buttons===void 0||(p.buttons&E)!==E})(l,this._eventButton)}isValidEndEvent(l){return _.mouseButton(l)===this._eventButton}}class QA{constructor(){this._firstTouch=void 0}_isOneFingerTouch(l){return l.targetTouches.length===1}_isSameTouchEvent(l){return l.targetTouches[0].identifier===this._firstTouch}startMove(l){this._firstTouch=l.targetTouches[0].identifier}endMove(l){delete this._firstTouch}isValidStartEvent(l){return this._isOneFingerTouch(l)}isValidMoveEvent(l){return this._isOneFingerTouch(l)&&this._isSameTouchEvent(l)}isValidEndEvent(l){return this._isOneFingerTouch(l)&&this._isSameTouchEvent(l)}}class Tm{constructor(l=new Yc({checkCorrectEvent:()=>!0}),p=new QA){this.mouseMoveStateManager=l,this.oneFingerTouchMoveStateManager=p}_executeRelevantHandler(l,p,C){return l instanceof MouseEvent?p(l):typeof TouchEvent<"u"&&l instanceof TouchEvent?C(l):void 0}startMove(l){this._executeRelevantHandler(l,(p=>this.mouseMoveStateManager.startMove(p)),(p=>this.oneFingerTouchMoveStateManager.startMove(p)))}endMove(l){this._executeRelevantHandler(l,(p=>this.mouseMoveStateManager.endMove(p)),(p=>this.oneFingerTouchMoveStateManager.endMove(p)))}isValidStartEvent(l){return this._executeRelevantHandler(l,(p=>this.mouseMoveStateManager.isValidStartEvent(p)),(p=>this.oneFingerTouchMoveStateManager.isValidStartEvent(p)))}isValidMoveEvent(l){return this._executeRelevantHandler(l,(p=>this.mouseMoveStateManager.isValidMoveEvent(p)),(p=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(p)))}isValidEndEvent(l){return this._executeRelevantHandler(l,(p=>this.mouseMoveStateManager.isValidEndEvent(p)),(p=>this.oneFingerTouchMoveStateManager.isValidEndEvent(p)))}}const Cf=B=>{B.mousedown=B.dragStart,B.mousemoveWindow=B.dragMove,B.mouseup=B.dragEnd,B.contextmenu=l=>{l.preventDefault()}};class Na{constructor(l,p){this._clickTolerance=l.clickTolerance||1,this._map=p,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(l){return l<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(l,p,C){return this._calculateTransform(l,p,C)}touchmove(l,p,C){if(this._active){if(!this._shouldBePrevented(C.length))return l.preventDefault(),this._calculateTransform(l,p,C);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",l)}}touchend(l,p,C){this._calculateTransform(l,p,C),this._active&&this._shouldBePrevented(C.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(l,p,C){C.length>0&&(this._active=!0);const E=vA(C,p),T=new a.P(0,0),U=new a.P(0,0);let q=0;for(const ae in E){const Ae=E[ae],ye=this._touches[ae];ye&&(T._add(Ae),U._add(Ae.sub(ye)),q++,E[ae]=Ae)}if(this._touches=E,this._shouldBePrevented(q)||!U.mag())return;const Z=U.div(q);return this._sum._add(Z),this._sum.mag()<this._clickTolerance?void 0:{around:T.div(q),panDelta:Z}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class vc{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(l,p,C){this._firstTwoTouches||C.length<2||(this._firstTwoTouches=[C[0].identifier,C[1].identifier],this._start([p[0],p[1]]))}touchmove(l,p,C){if(!this._firstTwoTouches)return;l.preventDefault();const[E,T]=this._firstTwoTouches,U=Xn(C,p,E),q=Xn(C,p,T);if(!U||!q)return;const Z=this._aroundCenter?null:U.add(q).div(2);return this._move([U,q],Z,l)}touchend(l,p,C){if(!this._firstTwoTouches)return;const[E,T]=this._firstTwoTouches,U=Xn(C,p,E),q=Xn(C,p,T);U&&q||(this._active&&_.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(l){this._enabled=!0,this._aroundCenter=!!l&&l.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Xn(B,l,p){for(let C=0;C<B.length;C++)if(B[C].identifier===p)return l[C]}function vp(B,l){return Math.log(B/l)/Math.LN2}class bp extends vc{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(l){this._startDistance=this._distance=l[0].dist(l[1])}_move(l,p){const C=this._distance;if(this._distance=l[0].dist(l[1]),this._active||!(Math.abs(vp(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:vp(this._distance,C),pinchAround:p}}}function _f(B,l){return 180*B.angleWith(l)/Math.PI}class kh extends vc{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(l){this._startVector=this._vector=l[0].sub(l[1]),this._minDiameter=l[0].dist(l[1])}_move(l,p,C){const E=this._vector;if(this._vector=l[0].sub(l[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:_f(this._vector,E),pinchAround:p}}_isBelowThreshold(l){this._minDiameter=Math.min(this._minDiameter,l.mag());const p=25/(Math.PI*this._minDiameter)*360,C=_f(l,this._startVector);return Math.abs(C)<p}}function bc(B){return Math.abs(B.y)>Math.abs(B.x)}class Cp extends vc{constructor(l){super(),this._currentTouchCount=0,this._map=l}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(l,p,C){super.touchstart(l,p,C),this._currentTouchCount=C.length}_start(l){this._lastPoints=l,bc(l[0].sub(l[1]))&&(this._valid=!1)}_move(l,p,C){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const E=l[0].sub(this._lastPoints[0]),T=l[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(E,T,C.timeStamp),this._valid?(this._lastPoints=l,this._active=!0,{pitchDelta:(E.y+T.y)/2*-.5}):void 0}gestureBeginsVertically(l,p,C){if(this._valid!==void 0)return this._valid;const E=l.mag()>=2,T=p.mag()>=2;if(!E&&!T)return;if(!E||!T)return this._firstMove===void 0&&(this._firstMove=C),C-this._firstMove<100&&void 0;const U=l.y>0==p.y>0;return bc(l)&&bc(p)&&U}}const Ur={panStep:100,bearingStep:15,pitchStep:10};class Gu{constructor(l){this._tr=new Ih(l);const p=Ur;this._panStep=p.panStep,this._bearingStep=p.bearingStep,this._pitchStep=p.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(l){if(l.altKey||l.ctrlKey||l.metaKey)return;let p=0,C=0,E=0,T=0,U=0;switch(l.keyCode){case 61:case 107:case 171:case 187:p=1;break;case 189:case 109:case 173:p=-1;break;case 37:l.shiftKey?C=-1:(l.preventDefault(),T=-1);break;case 39:l.shiftKey?C=1:(l.preventDefault(),T=1);break;case 38:l.shiftKey?E=1:(l.preventDefault(),U=-1);break;case 40:l.shiftKey?E=-1:(l.preventDefault(),U=1);break;default:return}return this._rotationDisabled&&(C=0,E=0),{cameraAnimation:q=>{const Z=this._tr;q.easeTo({duration:300,easeId:"keyboardHandler",easing:Cd,zoom:p?Math.round(Z.zoom)+p*(l.shiftKey?2:1):Z.zoom,bearing:Z.bearing+C*this._bearingStep,pitch:Z.pitch+E*this._pitchStep,offset:[-T*this._panStep,-U*this._panStep],center:Z.center},{originalEvent:l})}}}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 Cd(B){return B*(2-B)}const qA=4.000244140625,Th=1/450;class bA{constructor(l,p){this._onTimeout=C=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(C)},this._map=l,this._tr=new Ih(l),this._triggerRenderFrame=p,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Th}setZoomRate(l){this._defaultZoomRate=l}setWheelZoomRate(l){this._wheelZoomRate=l}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(l){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!l&&l.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(l){return!!this._map.cooperativeGestures.isEnabled()&&!(l.ctrlKey||this._map.cooperativeGestures.isBypassed(l))}wheel(l){if(!this.isEnabled())return;if(this._shouldBePrevented(l))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",l);let p=l.deltaMode===WheelEvent.DOM_DELTA_LINE?40*l.deltaY:l.deltaY;const C=x.now(),E=C-(this._lastWheelEventTime||0);this._lastWheelEventTime=C,p!==0&&p%qA==0?this._type="wheel":p!==0&&Math.abs(p)<4?this._type="trackpad":E>400?(this._type=null,this._lastValue=p,this._timeout=setTimeout(this._onTimeout,40,l)):this._type||(this._type=Math.abs(E*p)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,p+=this._lastValue)),l.shiftKey&&p&&(p/=4),this._type&&(this._lastWheelEvent=l,this._delta-=p,this._active||this._start(l)),l.preventDefault()}_start(l){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 p=_.mousePos(this._map.getCanvas(),l),C=this._tr;this._aroundPoint=this._aroundCenter?C.transform.locationToScreenPoint(a.S.convert(C.center)):p,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const l=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){const q=l.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=q),typeof this._targetZoom=="number"&&(this._targetZoom+=q)}if(this._delta!==0){const q=this._type==="wheel"&&Math.abs(this._delta)>qA?this._wheelZoomRate:this._defaultZoomRate;let Z=2/(1+Math.exp(-Math.abs(this._delta*q)));this._delta<0&&Z!==0&&(Z=1/Z);const ae=typeof this._targetZoom!="number"?l.scale:a.af(this._targetZoom);this._targetZoom=l.getConstrained(l.getCameraLngLat(),a.ak(ae*Z)).zoom,this._type==="wheel"&&(this._startZoom=l.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const p=typeof this._targetZoom!="number"?l.zoom:this._targetZoom,C=this._startZoom,E=this._easing;let T,U=!1;if(this._type==="wheel"&&C&&E){const q=x.now()-this._lastWheelEventTime,Z=Math.min((q+5)/200,1),ae=E(Z);T=a.C.number(C,p,ae),Z<1?this._frameId||(this._frameId=!0):U=!0}else T=p,U=!0;return this._active=!0,U&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout}),200)),this._lastExpectedZoom=T,{noInertia:!0,needsRenderFrame:!U,zoomDelta:T-l.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(l){let p=a.co;if(this._prevEase){const C=this._prevEase,E=(x.now()-C.start)/C.duration,T=C.easing(E+.01)-C.easing(E),U=.27/Math.sqrt(T*T+1e-4)*.01,q=Math.sqrt(.0729-U*U);p=a.cm(U,q,.25,1)}return this._prevEase={start:x.now(),duration:l,easing:p},p}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class _d{constructor(l,p){this._clickZoom=l,this._tapZoom=p}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 Wu{constructor(l){this._tr=new Ih(l),this.reset()}reset(){this._active=!1}dblclick(l,p){return l.preventDefault(),{cameraAnimation:C=>{C.easeTo({duration:300,zoom:this._tr.zoom+(l.shiftKey?-1:1),around:this._tr.unproject(p)},{originalEvent:l})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class xf{constructor(){this._tap=new ja({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(l,p,C){if(!this._swipePoint)if(this._tapTime){const E=p[0],T=l.timeStamp-this._tapTime<500,U=this._tapPoint.dist(E)<30;T&&U?C.length>0&&(this._swipePoint=E,this._swipeTouch=C[0].identifier):this.reset()}else this._tap.touchstart(l,p,C)}touchmove(l,p,C){if(this._tapTime){if(this._swipePoint){if(C[0].identifier!==this._swipeTouch)return;const E=p[0],T=E.y-this._swipePoint.y;return this._swipePoint=E,l.preventDefault(),this._active=!0,{zoomDelta:T/128}}}else this._tap.touchmove(l,p,C)}touchend(l,p,C){if(this._tapTime)this._swipePoint&&C.length===0&&this.reset();else{const E=this._tap.touchend(l,p,C);E&&(this._tapTime=l.timeStamp,this._tapPoint=E)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Cc{constructor(l,p,C){this._el=l,this._mousePan=p,this._touchPan=C}enable(l){this._inertiaOptions=l||{},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 tl{constructor(l,p,C,E){this._pitchWithRotate=l.pitchWithRotate,this._rollEnabled=l.rollEnabled,this._mouseRotate=p,this._mousePitch=C,this._mouseRoll=E}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 n0{constructor(l,p,C,E){this._el=l,this._touchZoom=p,this._touchRotate=C,this._tapDragZoom=E,this._rotationDisabled=!1,this._enabled=!0}enable(l){this._touchZoom.enable(l),this._rotationDisabled||this._touchRotate.enable(l),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 Rm{constructor(l,p){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=l,this._options=p,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const l=this._map.getCanvasContainer();l.classList.add("maplibregl-cooperative-gestures"),this._container=_.create("div","maplibregl-cooperative-gesture-screen",l);let p=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(p=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const C=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),E=document.createElement("div");E.className="maplibregl-desktop-message",E.textContent=p,this._container.appendChild(E);const T=document.createElement("div");T.className="maplibregl-mobile-message",T.textContent=C,this._container.appendChild(T),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(_.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(l){return l[this._bypassKey]}notifyGestureBlocked(l,p){this._enabled&&(this._map.fire(new a.l("cooperativegestureprevented",{gestureType:l,originalEvent:p})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}const dl=B=>B.zoom||B.drag||B.roll||B.pitch||B.rotate;class Ao extends a.l{}function $c(B){return B.panDelta&&B.panDelta.mag()||B.zoomDelta||B.bearingDelta||B.pitchDelta||B.rollDelta}class xd{constructor(l,p){this.handleWindowEvent=E=>{this.handleEvent(E,`${E.type}Window`)},this.handleEvent=(E,T)=>{if(E.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const U=E.type==="renderFrame"?void 0:E,q={needsRenderFrame:!1},Z={},ae={};for(const{handlerName:pe,handler:Be,allowed:Fe}of this._handlers){if(!Be.isEnabled())continue;let Xe;if(this._blockedByActive(ae,Fe,pe))Be.reset();else if(Be[T||E.type]){if(a.cp(E,T||E.type)){const Ze=_.mousePos(this._map.getCanvas(),E);Xe=Be[T||E.type](E,Ze)}else if(a.cq(E,T||E.type)){const Ze=this._getMapTouches(E.touches),et=_.touchPos(this._map.getCanvas(),Ze);Xe=Be[T||E.type](E,et,Ze)}else a.cr(T||E.type)||(Xe=Be[T||E.type](E));this.mergeHandlerResult(q,Z,Xe,pe,U),Xe&&Xe.needsRenderFrame&&this._triggerRenderFrame()}(Xe||Be.isActive())&&(ae[pe]=Be)}const Ae={};for(const pe in this._previousActiveHandlers)ae[pe]||(Ae[pe]=U);this._previousActiveHandlers=ae,(Object.keys(Ae).length||$c(q))&&(this._changes.push([q,Z,Ae]),this._triggerRenderFrame()),(Object.keys(ae).length||$c(q))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ye}=q;ye&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ye(this._map))},this._map=l,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Bh(l),this._bearingSnap=p.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(p);const C=this._el;this._listeners=[[C,"touchstart",{passive:!0}],[C,"touchmove",{passive:!1}],[C,"touchend",void 0],[C,"touchcancel",void 0],[C,"mousedown",void 0],[C,"mousemove",void 0],[C,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[C,"mouseover",void 0],[C,"mouseout",void 0],[C,"dblclick",void 0],[C,"click",void 0],[C,"keydown",{capture:!1}],[C,"keyup",void 0],[C,"wheel",{passive:!1}],[C,"contextmenu",void 0],[window,"blur",void 0]];for(const[E,T,U]of this._listeners)_.addEventListener(E,T,E===document?this.handleWindowEvent:this.handleEvent,U)}destroy(){for(const[l,p,C]of this._listeners)_.removeEventListener(l,p,l===document?this.handleWindowEvent:this.handleEvent,C)}_addDefaultHandlers(l){const p=this._map,C=p.getCanvasContainer();this._add("mapEvent",new f1(p,l));const E=p.boxZoom=new bd(p,l);this._add("boxZoom",E),l.interactive&&l.boxZoom&&E.enable();const T=p.cooperativeGestures=new Rm(p,l.cooperativeGestures);this._add("cooperativeGestures",T),l.cooperativeGestures&&T.enable();const U=new Qs(p),q=new Wu(p);p.doubleClickZoom=new _d(q,U),this._add("tapZoom",U),this._add("clickZoom",q),l.interactive&&l.doubleClickZoom&&p.doubleClickZoom.enable();const Z=new xf;this._add("tapDragZoom",Z);const ae=p.touchPitch=new Cp(p);this._add("touchPitch",ae),l.interactive&&l.touchPitch&&p.touchPitch.enable(l.touchPitch);const Ae=()=>p.project(p.getCenter()),ye=(function({enable:ct,clickTolerance:yt,aroundCenter:xt=!0,minPixelCenterThreshold:At=100,rotateDegreesPerPixelMoved:Ot=.8},Vt){const Kt=new Yc({checkCorrectEvent:jt=>_.mouseButton(jt)===0&&jt.ctrlKey||_.mouseButton(jt)===2&&!jt.ctrlKey});return new vf({clickTolerance:yt,move:(jt,qt)=>{const Kn=Vt();if(xt&&Math.abs(Kn.y-jt.y)>At)return{bearingDelta:a.cn(new a.P(jt.x,qt.y),qt,Kn)};let On=(qt.x-jt.x)*Ot;return xt&&qt.y<Kn.y&&(On=-On),{bearingDelta:On}},moveStateManager:Kt,enable:ct,assignEvents:Cf})})(l,Ae),pe=(function({enable:ct,clickTolerance:yt,pitchDegreesPerPixelMoved:xt=-.5}){const At=new Yc({checkCorrectEvent:Ot=>_.mouseButton(Ot)===0&&Ot.ctrlKey||_.mouseButton(Ot)===2});return new vf({clickTolerance:yt,move:(Ot,Vt)=>({pitchDelta:(Vt.y-Ot.y)*xt}),moveStateManager:At,enable:ct,assignEvents:Cf})})(l),Be=(function({enable:ct,clickTolerance:yt,rollDegreesPerPixelMoved:xt=.3},At){const Ot=new Yc({checkCorrectEvent:Vt=>_.mouseButton(Vt)===2&&Vt.ctrlKey});return new vf({clickTolerance:yt,move:(Vt,Kt)=>{const jt=At();let qt=(Kt.x-Vt.x)*xt;return Kt.y<jt.y&&(qt=-qt),{rollDelta:qt}},moveStateManager:Ot,enable:ct,assignEvents:Cf})})(l,Ae);p.dragRotate=new tl(l,ye,pe,Be),this._add("mouseRotate",ye,["mousePitch"]),this._add("mousePitch",pe,["mouseRotate","mouseRoll"]),this._add("mouseRoll",Be,["mousePitch"]),l.interactive&&l.dragRotate&&p.dragRotate.enable();const Fe=(function({enable:ct,clickTolerance:yt}){const xt=new Yc({checkCorrectEvent:At=>_.mouseButton(At)===0&&!At.ctrlKey});return new vf({clickTolerance:yt,move:(At,Ot)=>({around:Ot,panDelta:Ot.sub(At)}),activateOnStart:!0,moveStateManager:xt,enable:ct,assignEvents:Cf})})(l),Xe=new Na(l,p);p.dragPan=new Cc(C,Fe,Xe),this._add("mousePan",Fe),this._add("touchPan",Xe,["touchZoom","touchRotate"]),l.interactive&&l.dragPan&&p.dragPan.enable(l.dragPan);const Ze=new kh,et=new bp;p.touchZoomRotate=new n0(C,et,Ze,Z),this._add("touchRotate",Ze,["touchPan","touchZoom"]),this._add("touchZoom",et,["touchPan","touchRotate"]),l.interactive&&l.touchZoomRotate&&p.touchZoomRotate.enable(l.touchZoomRotate);const st=p.scrollZoom=new bA(p,(()=>this._triggerRenderFrame()));this._add("scrollZoom",st,["mousePan"]),l.interactive&&l.scrollZoom&&p.scrollZoom.enable(l.scrollZoom);const nt=p.keyboard=new Gu(p);this._add("keyboard",nt),l.interactive&&l.keyboard&&p.keyboard.enable(),this._add("blockableMapEvent",new is(p))}_add(l,p,C){this._handlers.push({handlerName:l,handler:p,allowed:C}),this._handlersById[l]=p}stop(l){if(!this._updatingCamera){for(const{handler:p}of this._handlers)p.reset();this._inertia.clear(),this._fireEvents({},{},l),this._changes=[]}}isActive(){for(const{handler:l}of this._handlers)if(l.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!dl(this._eventsInProgress)||this.isZooming()}_blockedByActive(l,p,C){for(const E in l)if(E!==C&&(!p||p.indexOf(E)<0))return!0;return!1}_getMapTouches(l){const p=[];for(const C of l)this._el.contains(C.target)&&p.push(C);return p}mergeHandlerResult(l,p,C,E,T){if(!C)return;a.e(l,C);const U={handlerName:E,originalEvent:C.originalEvent||T};C.zoomDelta!==void 0&&(p.zoom=U),C.panDelta!==void 0&&(p.drag=U),C.rollDelta!==void 0&&(p.roll=U),C.pitchDelta!==void 0&&(p.pitch=U),C.bearingDelta!==void 0&&(p.rotate=U)}_applyChanges(){const l={},p={},C={};for(const[E,T,U]of this._changes)E.panDelta&&(l.panDelta=(l.panDelta||new a.P(0,0))._add(E.panDelta)),E.zoomDelta&&(l.zoomDelta=(l.zoomDelta||0)+E.zoomDelta),E.bearingDelta&&(l.bearingDelta=(l.bearingDelta||0)+E.bearingDelta),E.pitchDelta&&(l.pitchDelta=(l.pitchDelta||0)+E.pitchDelta),E.rollDelta&&(l.rollDelta=(l.rollDelta||0)+E.rollDelta),E.around!==void 0&&(l.around=E.around),E.pinchAround!==void 0&&(l.pinchAround=E.pinchAround),E.noInertia&&(l.noInertia=E.noInertia),a.e(p,T),a.e(C,U);this._updateMapTransform(l,p,C),this._changes=[]}_updateMapTransform(l,p,C){const E=this._map,T=E._getTransformForUpdate(),U=E.terrain;if(!($c(l)||U&&this._terrainMovement))return this._fireEvents(p,C,!0);E._stop(!0);let{panDelta:q,zoomDelta:Z,bearingDelta:ae,pitchDelta:Ae,rollDelta:ye,around:pe,pinchAround:Be}=l;Be!==void 0&&(pe=Be),pe=pe||E.transform.centerPoint,U&&!T.isPointOnMapSurface(pe)&&(pe=T.centerPoint);const Fe={panDelta:q,zoomDelta:Z,rollDelta:ye,pitchDelta:Ae,bearingDelta:ae,around:pe};this._map.cameraHelper.useGlobeControls&&!T.isPointOnMapSurface(pe)&&(pe=T.centerPoint);const Xe=pe.distSqr(T.centerPoint)<.01?T.center:T.screenPointToLocation(q?pe.sub(q):pe);U?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(Fe,T),this._terrainMovement||!p.drag&&!p.zoom?p.drag&&this._terrainMovement?T.setCenter(T.screenPointToLocation(T.centerPoint.sub(q))):this._map.cameraHelper.handleMapControlsPan(Fe,T,Xe):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(Fe,T,Xe))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(Fe,T),this._map.cameraHelper.handleMapControlsPan(Fe,T,Xe)),E._applyUpdatedTransform(T),this._map._update(),l.noInertia||this._inertia.record(l),this._fireEvents(p,C,!0)}_fireEvents(l,p,C){const E=dl(this._eventsInProgress),T=dl(l),U={};for(const ye in l){const{originalEvent:pe}=l[ye];this._eventsInProgress[ye]||(U[`${ye}start`]=pe),this._eventsInProgress[ye]=l[ye]}!E&&T&&this._fireEvent("movestart",T.originalEvent);for(const ye in U)this._fireEvent(ye,U[ye]);T&&this._fireEvent("move",T.originalEvent);for(const ye in l){const{originalEvent:pe}=l[ye];this._fireEvent(ye,pe)}const q={};let Z;for(const ye in this._eventsInProgress){const{handlerName:pe,originalEvent:Be}=this._eventsInProgress[ye];this._handlersById[pe].isActive()||(delete this._eventsInProgress[ye],Z=p[pe]||Be,q[`${ye}end`]=Z)}for(const ye in q)this._fireEvent(ye,q[ye]);const ae=dl(this._eventsInProgress),Ae=(E||T)&&!ae;if(Ae&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const ye=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&ye.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(ye)}if(C&&Ae){this._updatingCamera=!0;const ye=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),pe=Be=>Be!==0&&-this._bearingSnap<Be&&Be<this._bearingSnap;!ye||!ye.essential&&x.prefersReducedMotion?(this._map.fire(new a.l("moveend",{originalEvent:Z})),pe(this._map.getBearing())&&this._map.resetNorth()):(pe(ye.bearing||this._map.getBearing())&&(ye.bearing=0),ye.freezeElevation=!0,this._map.easeTo(ye,{originalEvent:Z})),this._updatingCamera=!1}}_fireEvent(l,p){this._map.fire(new a.l(l,p?{originalEvent:p}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add((l=>{delete this._frameId,this.handleEvent(new Ao("renderFrame",{timeStamp:l})),this._applyChanges()}))}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class _p extends a.E{constructor(l,p,C){super(),this._renderFrameCallback=()=>{const E=Math.min((x.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(E)),E<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=l,this._bearingSnap=C.bearingSnap,this.cameraHelper=p,this.on("moveend",(()=>{delete this._requestedCameraState}))}migrateProjection(l,p){l.apply(this.transform),this.transform=l,this.cameraHelper=p}getCenter(){return new a.S(this.transform.center.lng,this.transform.center.lat)}setCenter(l,p){return this.jumpTo({center:l},p)}getCenterElevation(){return this.transform.elevation}setCenterElevation(l,p){return this.jumpTo({elevation:l},p),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(l){this._centerClampedToGround=l}panBy(l,p,C){return l=a.P.convert(l).mult(-1),this.panTo(this.transform.center,a.e({offset:l},p),C)}panTo(l,p,C){return this.easeTo(a.e({center:l},p),C)}getZoom(){return this.transform.zoom}setZoom(l,p){return this.jumpTo({zoom:l},p),this}zoomTo(l,p,C){return this.easeTo(a.e({zoom:l},p),C)}zoomIn(l,p){return this.zoomTo(this.getZoom()+1,l,p),this}zoomOut(l,p){return this.zoomTo(this.getZoom()-1,l,p),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(l,p){return l!=this.transform.fov&&(this.transform.setFov(l),this.fire(new a.l("movestart",p)).fire(new a.l("move",p)).fire(new a.l("moveend",p))),this}getBearing(){return this.transform.bearing}setBearing(l,p){return this.jumpTo({bearing:l},p),this}getPadding(){return this.transform.padding}setPadding(l,p){return this.jumpTo({padding:l},p),this}rotateTo(l,p,C){return this.easeTo(a.e({bearing:l},p),C)}resetNorth(l,p){return this.rotateTo(0,a.e({duration:1e3},l),p),this}resetNorthPitch(l,p){return this.easeTo(a.e({bearing:0,pitch:0,roll:0,duration:1e3},l),p),this}snapToNorth(l,p){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(l,p):this}getPitch(){return this.transform.pitch}setPitch(l,p){return this.jumpTo({pitch:l},p),this}getRoll(){return this.transform.roll}setRoll(l,p){return this.jumpTo({roll:l},p),this}cameraForBounds(l,p){l=rt.convert(l).adjustAntiMeridian();const C=p&&p.bearing||0;return this._cameraForBoxAndBearing(l.getNorthWest(),l.getSouthEast(),C,p)}_cameraForBoxAndBearing(l,p,C,E){const T={top:0,bottom:0,right:0,left:0};if(typeof(E=a.e({padding:T,offset:[0,0],maxZoom:this.transform.maxZoom},E)).padding=="number"){const ae=E.padding;E.padding={top:ae,bottom:ae,right:ae,left:ae}}const U=a.e(T,E.padding);E.padding=U;const q=this.transform,Z=new rt(l,p);return this.cameraHelper.cameraForBoxAndBearing(E,U,Z,C,q)}fitBounds(l,p,C){return this._fitInternal(this.cameraForBounds(l,p),p,C)}fitScreenCoordinates(l,p,C,E,T){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(a.P.convert(l)),this.transform.screenPointToLocation(a.P.convert(p)),C,E),E,T)}_fitInternal(l,p,C){return l?(delete(p=a.e(l,p)).padding,p.linear?this.easeTo(p,C):this.flyTo(p,C)):this}jumpTo(l,p){this.stop();const C=this._getTransformForUpdate();let E=!1,T=!1,U=!1;const q=C.zoom;this.cameraHelper.handleJumpToCenterZoom(C,l);const Z=C.zoom!==q;return"elevation"in l&&C.elevation!==+l.elevation&&C.setElevation(+l.elevation),"bearing"in l&&C.bearing!==+l.bearing&&(E=!0,C.setBearing(+l.bearing)),"pitch"in l&&C.pitch!==+l.pitch&&(T=!0,C.setPitch(+l.pitch)),"roll"in l&&C.roll!==+l.roll&&(U=!0,C.setRoll(+l.roll)),l.padding==null||C.isPaddingEqual(l.padding)||C.setPadding(l.padding),this._applyUpdatedTransform(C),this.fire(new a.l("movestart",p)).fire(new a.l("move",p)),Z&&this.fire(new a.l("zoomstart",p)).fire(new a.l("zoom",p)).fire(new a.l("zoomend",p)),E&&this.fire(new a.l("rotatestart",p)).fire(new a.l("rotate",p)).fire(new a.l("rotateend",p)),T&&this.fire(new a.l("pitchstart",p)).fire(new a.l("pitch",p)).fire(new a.l("pitchend",p)),U&&this.fire(new a.l("rollstart",p)).fire(new a.l("roll",p)).fire(new a.l("rollend",p)),this.fire(new a.l("moveend",p))}calculateCameraOptionsFromTo(l,p,C,E=0){const T=a.a1.fromLngLat(l,p),U=a.a1.fromLngLat(C,E),q=U.x-T.x,Z=U.y-T.y,ae=U.z-T.z,Ae=Math.hypot(q,Z,ae);if(Ae===0)throw new Error("Can't calculate camera options with same From and To");const ye=Math.hypot(q,Z),pe=a.ak(this.transform.cameraToCenterDistance/Ae/this.transform.tileSize),Be=180*Math.atan2(q,-Z)/Math.PI;let Fe=180*Math.acos(ye/Ae)/Math.PI;return Fe=ae<0?90-Fe:90+Fe,{center:U.toLngLat(),elevation:E,zoom:pe,pitch:Fe,bearing:Be}}calculateCameraOptionsFromCameraLngLatAltRotation(l,p,C,E,T){const U=this.transform.calculateCenterFromCameraLngLatAlt(l,p,C,E);return{center:U.center,elevation:U.elevation,zoom:U.zoom,bearing:C,pitch:E,roll:T}}easeTo(l,p){this._stop(!1,l.easeId),((l=a.e({offset:[0,0],duration:500,easing:a.co},l)).animate===!1||!l.essential&&x.prefersReducedMotion)&&(l.duration=0);const C=this._getTransformForUpdate(),E=this.getBearing(),T=C.pitch,U=C.roll,q="bearing"in l?this._normalizeBearing(l.bearing,E):E,Z="pitch"in l?+l.pitch:T,ae="roll"in l?this._normalizeBearing(l.roll,U):U,Ae="padding"in l?l.padding:C.padding,ye=a.P.convert(l.offset);let pe,Be;l.around&&(pe=a.S.convert(l.around),Be=C.locationToScreenPoint(pe));const Fe={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},Xe=this.cameraHelper.handleEaseTo(C,{bearing:q,pitch:Z,roll:ae,padding:Ae,around:pe,aroundPoint:Be,offsetAsPoint:ye,offset:l.offset,zoom:l.zoom,center:l.center});return this._rotating=this._rotating||E!==q,this._pitching=this._pitching||Z!==T,this._rolling=this._rolling||ae!==U,this._padding=!C.isPaddingEqual(Ae),this._zooming=this._zooming||Xe.isZooming,this._easeId=l.easeId,this._prepareEase(p,l.noMoveStart,Fe),this.terrain&&this._prepareElevation(Xe.elevationCenter),this._ease((Ze=>{Xe.easeFunc(Ze),this.terrain&&!l.freezeElevation&&this._updateElevation(Ze),this._applyUpdatedTransform(C),this._fireMoveEvents(p)}),(Ze=>{this.terrain&&l.freezeElevation&&this._finalizeElevation(),this._afterEase(p,Ze)}),l),this}_prepareEase(l,p,C={}){this._moving=!0,p||C.moving||this.fire(new a.l("movestart",l)),this._zooming&&!C.zooming&&this.fire(new a.l("zoomstart",l)),this._rotating&&!C.rotating&&this.fire(new a.l("rotatestart",l)),this._pitching&&!C.pitching&&this.fire(new a.l("pitchstart",l)),this._rolling&&!C.rolling&&this.fire(new a.l("rollstart",l))}_prepareElevation(l){this._elevationCenter=l,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(l,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(l){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const p=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(l<1&&p!==this._elevationTarget){const C=this._elevationTarget-this._elevationStart;this._elevationStart+=l*(C-(p-(C*l+this._elevationStart))/(1-l)),this._elevationTarget=p}this.transform.setElevation(a.C.number(this._elevationStart,this._elevationTarget,l))}_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(l){if(!this.terrain&&l.elevation>=0&&l.pitch<=90)return{};const p=l.getCameraLngLat(),C=l.getCameraAltitude(),E=this.terrain?this.terrain.getElevationForLngLatZoom(p,l.zoom):0;if(C<E){const T=this.calculateCameraOptionsFromTo(p,E,l.center,l.elevation);return{pitch:T.pitch,zoom:T.zoom}}return{}}_applyUpdatedTransform(l){const p=[];if(p.push((E=>this._elevateCameraIfInsideTerrain(E))),this.transformCameraUpdate&&p.push((E=>this.transformCameraUpdate(E))),!p.length)return;const C=l.clone();for(const E of p){const T=C.clone(),{center:U,zoom:q,roll:Z,pitch:ae,bearing:Ae,elevation:ye}=E(T);U&&T.setCenter(U),ye!==void 0&&T.setElevation(ye),q!==void 0&&T.setZoom(q),Z!==void 0&&T.setRoll(Z),ae!==void 0&&T.setPitch(ae),Ae!==void 0&&T.setBearing(Ae),C.apply(T)}this.transform.apply(C)}_fireMoveEvents(l){this.fire(new a.l("move",l)),this._zooming&&this.fire(new a.l("zoom",l)),this._rotating&&this.fire(new a.l("rotate",l)),this._pitching&&this.fire(new a.l("pitch",l)),this._rolling&&this.fire(new a.l("roll",l))}_afterEase(l,p){if(this._easeId&&p&&this._easeId===p)return;delete this._easeId;const C=this._zooming,E=this._rotating,T=this._pitching,U=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,C&&this.fire(new a.l("zoomend",l)),E&&this.fire(new a.l("rotateend",l)),T&&this.fire(new a.l("pitchend",l)),U&&this.fire(new a.l("rollend",l)),this.fire(new a.l("moveend",l))}flyTo(l,p){if(!l.essential&&x.prefersReducedMotion){const qt=a.Q(l,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(qt,p)}this.stop(),l=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.co},l);const C=this._getTransformForUpdate(),E=C.bearing,T=C.pitch,U=C.roll,q=C.padding,Z="bearing"in l?this._normalizeBearing(l.bearing,E):E,ae="pitch"in l?+l.pitch:T,Ae="roll"in l?this._normalizeBearing(l.roll,U):U,ye="padding"in l?l.padding:C.padding,pe=a.P.convert(l.offset);let Be=C.centerPoint.add(pe);const Fe=C.screenPointToLocation(Be),Xe=this.cameraHelper.handleFlyTo(C,{bearing:Z,pitch:ae,roll:Ae,padding:ye,locationAtOffset:Fe,offsetAsPoint:pe,center:l.center,minZoom:l.minZoom,zoom:l.zoom});let Ze=l.curve;const et=Math.max(C.width,C.height),st=et/Xe.scaleOfZoom,nt=Xe.pixelPathLength;typeof Xe.scaleOfMinZoom=="number"&&(Ze=Math.sqrt(et/Xe.scaleOfMinZoom/nt*2));const ct=Ze*Ze;function yt(qt){const Kn=(st*st-et*et+(qt?-1:1)*ct*ct*nt*nt)/(2*(qt?st:et)*ct*nt);return Math.log(Math.sqrt(Kn*Kn+1)-Kn)}function xt(qt){return(Math.exp(qt)-Math.exp(-qt))/2}function At(qt){return(Math.exp(qt)+Math.exp(-qt))/2}const Ot=yt(!1);let Vt=function(qt){return At(Ot)/At(Ot+Ze*qt)},Kt=function(qt){return et*((At(Ot)*(xt(Kn=Ot+Ze*qt)/At(Kn))-xt(Ot))/ct)/nt;var Kn},jt=(yt(!0)-Ot)/Ze;if(Math.abs(nt)<2e-6||!isFinite(jt)){if(Math.abs(et-st)<1e-6)return this.easeTo(l,p);const qt=st<et?-1:1;jt=Math.abs(Math.log(st/et))/Ze,Kt=()=>0,Vt=Kn=>Math.exp(qt*Ze*Kn)}return l.duration="duration"in l?+l.duration:1e3*jt/("screenSpeed"in l?+l.screenSpeed/Ze:+l.speed),l.maxDuration&&l.duration>l.maxDuration&&(l.duration=0),this._zooming=!0,this._rotating=E!==Z,this._pitching=ae!==T,this._rolling=Ae!==U,this._padding=!C.isPaddingEqual(ye),this._prepareEase(p,!1),this.terrain&&this._prepareElevation(Xe.targetCenter),this._ease((qt=>{const Kn=qt*jt,On=1/Vt(Kn),un=Kt(Kn);this._rotating&&C.setBearing(a.C.number(E,Z,qt)),this._pitching&&C.setPitch(a.C.number(T,ae,qt)),this._rolling&&C.setRoll(a.C.number(U,Ae,qt)),this._padding&&(C.interpolatePadding(q,ye,qt),Be=C.centerPoint.add(pe)),Xe.easeFunc(qt,On,un,Be),this.terrain&&!l.freezeElevation&&this._updateElevation(qt),this._applyUpdatedTransform(C),this._fireMoveEvents(p)}),(()=>{this.terrain&&l.freezeElevation&&this._finalizeElevation(),this._afterEase(p)}),l),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(l,p){var C;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const E=this._onEaseEnd;delete this._onEaseEnd,E.call(this,p)}return l||(C=this.handlers)===null||C===void 0||C.stop(!1),this}_ease(l,p,C){C.animate===!1||C.duration===0?(l(1),p()):(this._easeStart=x.now(),this._easeOptions=C,this._onEaseFrame=l,this._onEaseEnd=p,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(l,p){l=a.aO(l,-180,180);const C=Math.abs(l-p);return Math.abs(l-360-p)<C&&(l-=360),Math.abs(l+360-p)<C&&(l+=360),l}queryTerrainElevation(l){return this.terrain?this.terrain.getElevationForLngLatZoom(a.S.convert(l),this.transform.tileZoom):null}}const Qu={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class kr{constructor(l=Qu){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=p=>{!p||p.sourceDataType!=="metadata"&&p.sourceDataType!=="visibility"&&p.dataType!=="style"&&p.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=l}getDefaultPosition(){return"bottom-right"}onAdd(l){return this._map=l,this._compact=this.options.compact,this._container=_.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=_.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=_.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(){_.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(l,p){const C=this._map._getUIString(`AttributionControl.${p}`);l.title=C,l.setAttribute("aria-label",C)}_updateAttributions(){if(!this._map.style)return;let l=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?l=l.concat(this.options.customAttribution.map((E=>typeof E!="string"?"":E))):typeof this.options.customAttribution=="string"&&l.push(this.options.customAttribution)),this._map.style.stylesheet){const E=this._map.style.stylesheet;this.styleOwner=E.owner,this.styleId=E.id}const p=this._map.style.sourceCaches;for(const E in p){const T=p[E];if(T.used||T.usedForTerrain){const U=T.getSource();U.attribution&&l.indexOf(U.attribution)<0&&l.push(U.attribution)}}l=l.filter((E=>String(E).trim())),l.sort(((E,T)=>E.length-T.length)),l=l.filter(((E,T)=>{for(let U=T+1;U<l.length;U++)if(l[U].indexOf(E)>=0)return!1;return!0}));const C=l.join(" | ");C!==this._attribHTML&&(this._attribHTML=C,l.length?(this._innerContainer.innerHTML=_.sanitize(C),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Do{constructor(l={}){this._updateCompact=()=>{const p=this._container.children;if(p.length){const C=p[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&C.classList.add("maplibregl-compact"):C.classList.remove("maplibregl-compact")}},this.options=l}getDefaultPosition(){return"bottom-left"}onAdd(l){this._map=l,this._compact=this.options&&this.options.compact,this._container=_.create("div","maplibregl-ctrl");const p=_.create("a","maplibregl-ctrl-logo");return p.target="_blank",p.rel="noopener nofollow",p.href="https://maplibre.org/",p.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),p.setAttribute("rel","noopener nofollow"),this._container.appendChild(p),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){_.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class no{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(l){const p=++this._id;return this._queue.push({callback:l,id:p,cancelled:!1}),p}remove(l){const p=this._currentlyRunning,C=p?this._queue.concat(p):this._queue;for(const E of C)if(E.id===l)return void(E.cancelled=!0)}run(l=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const p=this._currentlyRunning=this._queue;this._queue=[];for(const C of p)if(!C.cancelled&&(C.callback(l),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Xl=a.aJ([{name:"a_pos3d",type:"Int16",components:3}]);class CA extends a.E{constructor(l){super(),this._lastTilesetChange=x.now(),this.sourceCache=l,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=l._source.tileSize*2**this.deltaZoom,l.usedForTerrain=!0,l.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(l,p){this.sourceCache.update(l,p),this._renderableTilesKeys=[];const C={};for(const E of ot(l,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:p,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))C[E.key]=!0,this._renderableTilesKeys.push(E.key),this._tiles[E.key]||(E.terrainRttPosMatrix32f=new Float64Array(16),a.bY(E.terrainRttPosMatrix32f,0,a.$,a.$,0,0,1),this._tiles[E.key]=new oe(E,this.tileSize),this._lastTilesetChange=x.now());for(const E in this._tiles)C[E]||delete this._tiles[E]}freeRtt(l){for(const p in this._tiles){const C=this._tiles[p];(!l||C.tileID.equals(l)||C.tileID.isChildOf(l)||l.isChildOf(C.tileID))&&(C.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((l=>this.getTileByID(l)))}getTileByID(l){return this._tiles[l]}getTerrainCoords(l,p){return p?this._getTerrainCoordsForTileRanges(l,p):this._getTerrainCoordsForRegularTile(l)}_getTerrainCoordsForRegularTile(l){const p={};for(const C of this._renderableTilesKeys){const E=this._tiles[C].tileID,T=l.clone(),U=a.ba();if(E.canonical.equals(l.canonical))a.bY(U,0,a.$,a.$,0,0,1);else if(E.canonical.isChildOf(l.canonical)){const q=E.canonical.z-l.canonical.z,Z=E.canonical.x-(E.canonical.x>>q<<q),ae=E.canonical.y-(E.canonical.y>>q<<q),Ae=a.$>>q;a.bY(U,0,Ae,Ae,0,0,1),a.M(U,U,[-Z*Ae,-ae*Ae,0])}else{if(!l.canonical.isChildOf(E.canonical))continue;{const q=l.canonical.z-E.canonical.z,Z=l.canonical.x-(l.canonical.x>>q<<q),ae=l.canonical.y-(l.canonical.y>>q<<q),Ae=a.$>>q;a.bY(U,0,a.$,a.$,0,0,1),a.M(U,U,[Z*Ae,ae*Ae,0]),a.N(U,U,[1/2**q,1/2**q,0])}}T.terrainRttPosMatrix32f=new Float32Array(U),p[C]=T}return p}_getTerrainCoordsForTileRanges(l,p){const C={};for(const E of this._renderableTilesKeys){const T=this._tiles[E].tileID;if(!this._isWithinTileRanges(T,p))continue;const U=l.clone(),q=a.ba();if(T.canonical.z===l.canonical.z){const Z=l.canonical.x-T.canonical.x,ae=l.canonical.y-T.canonical.y;a.bY(q,0,a.$,a.$,0,0,1),a.M(q,q,[Z*a.$,ae*a.$,0])}else if(T.canonical.z>l.canonical.z){const Z=T.canonical.z-l.canonical.z,ae=T.canonical.x-(T.canonical.x>>Z<<Z),Ae=T.canonical.y-(T.canonical.y>>Z<<Z),ye=l.canonical.x-(T.canonical.x>>Z),pe=l.canonical.y-(T.canonical.y>>Z),Be=a.$>>Z;a.bY(q,0,Be,Be,0,0,1),a.M(q,q,[-ae*Be+ye*a.$,-Ae*Be+pe*a.$,0])}else{const Z=l.canonical.z-T.canonical.z,ae=l.canonical.x-(l.canonical.x>>Z<<Z),Ae=l.canonical.y-(l.canonical.y>>Z<<Z),ye=(l.canonical.x>>Z)-T.canonical.x,pe=(l.canonical.y>>Z)-T.canonical.y,Be=a.$<<Z;a.bY(q,0,Be,Be,0,0,1),a.M(q,q,[ae*a.$+ye*Be,Ae*a.$+pe*Be,0])}U.terrainRttPosMatrix32f=new Float32Array(q),C[E]=U}return C}getSourceTile(l,p){const C=this.sourceCache._source;let E=l.overscaledZ-this.deltaZoom;if(E>C.maxzoom&&(E=C.maxzoom),E<C.minzoom)return null;this._sourceTileCache[l.key]||(this._sourceTileCache[l.key]=l.scaledTo(E).key);let T=this.sourceCache.getTileByID(this._sourceTileCache[l.key]);if((!T||!T.dem)&&p)for(;E>=C.minzoom&&(!T||!T.dem);)T=this.sourceCache.getTileByID(l.scaledTo(E--).key);return T}anyTilesAfterTime(l=Date.now()){return this._lastTilesetChange>=l}_isWithinTileRanges(l,p){return p[l.canonical.z]&&l.canonical.x>=p[l.canonical.z].minTileX&&l.canonical.x<=p[l.canonical.z].maxTileX&&l.canonical.y>=p[l.canonical.z].minTileY&&l.canonical.y<=p[l.canonical.z].maxTileY}}class Jn{constructor(l,p,C){this._meshCache={},this.painter=l,this.sourceCache=new CA(p),this.options=C,this.exaggeration=typeof C.exaggeration=="number"?C.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(l,p,C,E=a.$){var T;if(!(p>=0&&p<E&&C>=0&&C<E))return 0;const U=this.getTerrainData(l),q=(T=U.tile)===null||T===void 0?void 0:T.dem;if(!q)return 0;const Z=a.cs([],[p/E*a.$,C/E*a.$],U.u_terrain_matrix),ae=[Z[0]*q.dim,Z[1]*q.dim],Ae=Math.floor(ae[0]),ye=Math.floor(ae[1]),pe=ae[0]-Ae,Be=ae[1]-ye;return q.get(Ae,ye)*(1-pe)*(1-Be)+q.get(Ae+1,ye)*pe*(1-Be)+q.get(Ae,ye+1)*(1-pe)*Be+q.get(Ae+1,ye+1)*pe*Be}getElevationForLngLatZoom(l,p){if(!a.ct(p,l.wrap()))return 0;const{tileID:C,mercatorX:E,mercatorY:T}=this._getOverscaledTileIDFromLngLatZoom(l,p);return this.getElevation(C,E%a.$,T%a.$,a.$)}getElevation(l,p,C,E=a.$){return this.getDEMElevation(l,p,C,E)*this.exaggeration}getTerrainData(l){if(!this._emptyDemTexture){const E=this.painter.context,T=new a.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new a.T(E,T,E.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new a.T(E,new a.R({width:1,height:1}),E.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(E.gl.NEAREST,E.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=a.ag([])}const p=this.sourceCache.getSourceTile(l,!0);if(p&&p.dem&&(!p.demTexture||p.needsTerrainPrepare)){const E=this.painter.context;p.demTexture=this.painter.getTileTexture(p.dem.stride),p.demTexture?p.demTexture.update(p.dem.getPixels(),{premultiply:!1}):p.demTexture=new a.T(E,p.dem.getPixels(),E.gl.RGBA,{premultiply:!1}),p.demTexture.bind(E.gl.NEAREST,E.gl.CLAMP_TO_EDGE),p.needsTerrainPrepare=!1}const C=p&&p+p.tileID.key+l.key;if(C&&!this._demMatrixCache[C]){const E=this.sourceCache.sourceCache._source.maxzoom;let T=l.canonical.z-p.tileID.canonical.z;l.overscaledZ>l.canonical.z&&(l.canonical.z>=E?T=l.canonical.z-E:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const U=l.canonical.x-(l.canonical.x>>T<<T),q=l.canonical.y-(l.canonical.y>>T<<T),Z=a.cu(new Float64Array(16),[1/(a.$<<T),1/(a.$<<T),0]);a.M(Z,Z,[U*a.$,q*a.$,0]),this._demMatrixCache[l.key]={matrix:Z,coord:l}}return{u_depth:2,u_terrain:3,u_terrain_dim:p&&p.dem&&p.dem.dim||1,u_terrain_matrix:C?this._demMatrixCache[l.key].matrix:this._emptyDemMatrix,u_terrain_unpack:p&&p.dem&&p.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(p&&p.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:p}}getFramebuffer(l){const p=this.painter,C=p.width/devicePixelRatio,E=p.height/devicePixelRatio;return!this._fbo||this._fbo.width===C&&this._fbo.height===E||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new a.T(p.context,{width:C,height:E,data:null},p.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(p.context.gl.NEAREST,p.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new a.T(p.context,{width:C,height:E,data:null},p.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(p.context.gl.NEAREST,p.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=p.context.createFramebuffer(C,E,!0,!1),this._fbo.depthAttachment.set(p.context.createRenderbuffer(p.context.gl.DEPTH_COMPONENT16,C,E))),this._fbo.colorAttachment.set(l==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const l=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const p=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let T=0,U=0;T<this._coordsTextureSize;T++)for(let q=0;q<this._coordsTextureSize;q++,U+=4)p[U+0]=255&q,p[U+1]=255&T,p[U+2]=q>>8<<4|T>>8,p[U+3]=0;const C=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(p.buffer)),E=new a.T(l,C,l.gl.RGBA,{premultiply:!1});return E.bind(l.gl.NEAREST,l.gl.CLAMP_TO_EDGE),this._coordsTexture=E,E}pointCoordinate(l){this.painter.maybeDrawDepthAndCoords(!0);const p=new Uint8Array(4),C=this.painter.context,E=C.gl,T=Math.round(l.x*this.painter.pixelRatio/devicePixelRatio),U=Math.round(l.y*this.painter.pixelRatio/devicePixelRatio),q=Math.round(this.painter.height/devicePixelRatio);C.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),E.readPixels(T,q-U-1,1,1,E.RGBA,E.UNSIGNED_BYTE,p),C.bindFramebuffer.set(null);const Z=p[0]+(p[2]>>4<<8),ae=p[1]+((15&p[2])<<8),Ae=this.coordsIndex[255-p[3]],ye=Ae&&this.sourceCache.getTileByID(Ae);if(!ye)return null;const pe=this._coordsTextureSize,Be=(1<<ye.tileID.canonical.z)*pe;return new a.a1((ye.tileID.canonical.x*pe+Z)/Be+ye.tileID.wrap,(ye.tileID.canonical.y*pe+ae)/Be,this.getElevation(ye.tileID,Z,ae,pe))}depthAtPoint(l){const p=new Uint8Array(4),C=this.painter.context,E=C.gl;return C.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),E.readPixels(l.x,this.painter.height/devicePixelRatio-l.y-1,1,1,E.RGBA,E.UNSIGNED_BYTE,p),C.bindFramebuffer.set(null),(p[0]/16777216+p[1]/65536+p[2]/256+p[3])/256}getTerrainMesh(l){var p;const C=((p=this.painter.style.projection)===null||p===void 0?void 0:p.transitionState)>0,E=C&&l.canonical.y===0,T=C&&l.canonical.y===(1<<l.canonical.z)-1,U=`m_${E?"n":""}_${T?"s":""}`;if(this._meshCache[U])return this._meshCache[U];const q=this.painter.context,Z=new a.cv,ae=new a.aN,Ae=this.meshSize,ye=a.$/Ae,pe=Ae*Ae;for(let At=0;At<=Ae;At++)for(let Ot=0;Ot<=Ae;Ot++)Z.emplaceBack(Ot*ye,At*ye,0);for(let At=0;At<pe;At+=Ae+1)for(let Ot=0;Ot<Ae;Ot++)ae.emplaceBack(Ot+At,Ae+Ot+At+1,Ae+Ot+At+2),ae.emplaceBack(Ot+At,Ae+Ot+At+2,Ot+At+1);const Be=Z.length,Fe=Be+(Ae+1),Xe=(Ae+1)*Ae,Ze=E?a.bh:0,et=E?0:1,st=T?a.bi:a.$,nt=T?0:1;for(let At=0;At<=Ae;At++)Z.emplaceBack(At*ye,Ze,et);for(let At=0;At<=Ae;At++)Z.emplaceBack(At*ye,st,nt);for(let At=0;At<Ae;At++)ae.emplaceBack(Xe+At,Fe+At,Fe+At+1),ae.emplaceBack(Xe+At,Fe+At+1,Xe+At+1),ae.emplaceBack(0+At,Be+At+1,Be+At),ae.emplaceBack(0+At,0+At+1,Be+At+1);const ct=Z.length,yt=ct+2*(Ae+1);for(const At of[0,1])for(let Ot=0;Ot<=Ae;Ot++)for(const Vt of[0,1])Z.emplaceBack(At*a.$,Ot*ye,Vt);for(let At=0;At<2*Ae;At+=2)ae.emplaceBack(ct+At,ct+At+1,ct+At+3),ae.emplaceBack(ct+At,ct+At+3,ct+At+2),ae.emplaceBack(yt+At,yt+At+3,yt+At+1),ae.emplaceBack(yt+At,yt+At+2,yt+At+3);const xt=new Ql(q.createVertexBuffer(Z,Xl.members),q.createIndexBuffer(ae),a.aM.simpleSegment(0,0,Z.length,ae.length));return this._meshCache[U]=xt,xt}getMeshFrameDelta(l){return 2*Math.PI*a.bu/Math.pow(2,Math.max(l,0))/5}getMinTileElevationForLngLatZoom(l,p){var C;const{tileID:E}=this._getOverscaledTileIDFromLngLatZoom(l,p);return(C=this.getMinMaxElevation(E).minElevation)!==null&&C!==void 0?C:0}getMinMaxElevation(l){const p=this.getTerrainData(l).tile,C={minElevation:null,maxElevation:null};return p&&p.dem&&(C.minElevation=p.dem.min*this.exaggeration,C.maxElevation=p.dem.max*this.exaggeration),C}_getOverscaledTileIDFromLngLatZoom(l,p){const C=a.a1.fromLngLat(l.wrap()),E=(1<<p)*a.$,T=C.x*E,U=C.y*E,q=Math.floor(T/a.$),Z=Math.floor(U/a.$);return{tileID:new a.Z(p,0,p,q,Z),mercatorX:T,mercatorY:U}}}class Pi{constructor(l,p,C){this._context=l,this._size=p,this._tileSize=C,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const l of this._objects)l.texture.destroy(),l.fbo.destroy()}_createObject(l){const p=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),C=new a.T(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return C.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),p.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),p.colorAttachment.set(C.texture),{id:l,fbo:p,texture:C,stamp:-1,inUse:!1}}getObjectForId(l){return this._objects[l]}useObject(l){l.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter((p=>l.id!==p)),this._recentlyUsed.push(l.id)}stampObject(l){l.stamp=++this._stamp}getOrCreateFreeObject(){for(const p of this._recentlyUsed)if(!this._objects[p].inUse)return this._objects[p];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const l=this._createObject(this._objects.length);return this._objects.push(l),l}freeObject(l){l.inUse=!1}freeAllObjects(){for(const l of this._objects)this.freeObject(l)}isFull(){return!(this._objects.length<this._size)&&this._objects.some((l=>!l.inUse))===!1}}const Rl={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class bu{constructor(l,p){this.painter=l,this.terrain=p,this.pool=new Pi(l.context,30,p.sourceCache.tileSize*p.qualityFactor)}destruct(){this.pool.destruct()}getTexture(l){return this.pool.getObjectForId(l.rtt[this._stacks.length-1].id).texture}prepareForRender(l,p){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=l._order.filter((C=>!l._layers[C].isHidden(p))),this._coordsAscending={};for(const C in l.sourceCaches){this._coordsAscending[C]={};const E=l.sourceCaches[C].getVisibleCoordinates(),T=l.sourceCaches[C].getSource(),U=T instanceof zn?T.terrainTileRanges:null;for(const q of E){const Z=this.terrain.sourceCache.getTerrainCoords(q,U);for(const ae in Z)this._coordsAscending[C][ae]||(this._coordsAscending[C][ae]=[]),this._coordsAscending[C][ae].push(Z[ae])}}this._coordsAscendingStr={};for(const C of l._order){const E=l._layers[C],T=E.source;if(Rl[E.type]&&!this._coordsAscendingStr[T]){this._coordsAscendingStr[T]={};for(const U in this._coordsAscending[T])this._coordsAscendingStr[T][U]=this._coordsAscending[T][U].map((q=>q.key)).sort().join()}}for(const C of this._renderableTiles)for(const E in this._coordsAscendingStr){const T=this._coordsAscendingStr[E][C.tileID.key];T&&T!==C.rttCoords[E]&&(C.rtt=[])}}renderLayer(l,p){if(l.isHidden(this.painter.transform.zoom))return!1;const C=Object.assign(Object.assign({},p),{isRenderingToTexture:!0}),E=l.type,T=this.painter,U=this._renderableLayerIds[this._renderableLayerIds.length-1]===l.id;if(Rl[E]&&(this._prevType&&Rl[this._prevType]||this._stacks.push([]),this._prevType=E,this._stacks[this._stacks.length-1].push(l.id),!U))return!0;if(Rl[this._prevType]||Rl[E]&&U){this._prevType=E;const q=this._stacks.length-1,Z=this._stacks[q]||[];for(const ae of this._renderableTiles){if(this.pool.isFull()&&(gp(this.painter,this.terrain,this._rttTiles,C),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(ae),ae.rtt[q]){const ye=this.pool.getObjectForId(ae.rtt[q].id);if(ye.stamp===ae.rtt[q].stamp){this.pool.useObject(ye);continue}}const Ae=this.pool.getOrCreateFreeObject();this.pool.useObject(Ae),this.pool.stampObject(Ae),ae.rtt[q]={id:Ae.id,stamp:Ae.stamp},T.context.bindFramebuffer.set(Ae.fbo.framebuffer),T.context.clear({color:a.bf.transparent,stencil:0}),T.currentStencilSource=void 0;for(let ye=0;ye<Z.length;ye++){const pe=T.style._layers[Z[ye]],Be=pe.source?this._coordsAscending[pe.source][ae.tileID.key]:[ae.tileID];T.context.viewport.set([0,0,Ae.fbo.width,Ae.fbo.height]),T._renderTileClippingMasks(pe,Be,!0),T.renderLayer(T,T.style.sourceCaches[pe.source],pe,Be,C),pe.source&&(ae.rttCoords[pe.source]=this._coordsAscendingStr[pe.source][ae.tileID.key])}}return gp(this.painter,this.terrain,this._rttTiles,C),this._rttTiles=[],this.pool.freeAllObjects(),Rl[E]}return!1}}const xp={"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"},or=c,Md={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Qu,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:a.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},qu={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class m1{constructor(l,p,C=!1){this.mousedown=T=>{this.startMove(T,_.mousePos(this.element,T)),_.addEventListener(window,"mousemove",this.mousemove),_.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=T=>{this.move(T,_.mousePos(this.element,T))},this.mouseup=T=>{this._rotatePitchHandler.dragEnd(T),this.offTemp()},this.touchstart=T=>{T.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=_.touchPos(this.element,T.targetTouches)[0],this.startMove(T,this._startPos),_.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),_.addEventListener(window,"touchend",this.touchend))},this.touchmove=T=>{T.targetTouches.length!==1?this.reset():(this._lastPos=_.touchPos(this.element,T.targetTouches)[0],this.move(T,this._lastPos))},this.touchend=T=>{T.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._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=p;const E=new Tm;this._rotatePitchHandler=new vf({clickTolerance:3,move:(T,U)=>{const q=p.getBoundingClientRect(),Z=new a.P((q.bottom-q.top)/2,(q.right-q.left)/2);return{bearingDelta:a.cn(new a.P(T.x,U.y),U,Z),pitchDelta:C?-.5*(U.y-T.y):void 0}},moveStateManager:E,enable:!0,assignEvents:()=>{}}),this.map=l,_.addEventListener(p,"mousedown",this.mousedown),_.addEventListener(p,"touchstart",this.touchstart,{passive:!1}),_.addEventListener(p,"touchcancel",this.reset)}startMove(l,p){this._rotatePitchHandler.dragStart(l,p),_.disableDrag()}move(l,p){const C=this.map,{bearingDelta:E,pitchDelta:T}=this._rotatePitchHandler.dragMove(l,p)||{};E&&C.setBearing(C.getBearing()+E),T&&C.setPitch(C.getPitch()+T)}off(){const l=this.element;_.removeEventListener(l,"mousedown",this.mousedown),_.removeEventListener(l,"touchstart",this.touchstart,{passive:!1}),_.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),_.removeEventListener(window,"touchend",this.touchend),_.removeEventListener(l,"touchcancel",this.reset),this.offTemp()}offTemp(){_.enableDrag(),_.removeEventListener(window,"mousemove",this.mousemove),_.removeEventListener(window,"mouseup",this.mouseup),_.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),_.removeEventListener(window,"touchend",this.touchend)}}let _c;function xs(B,l,p,C=!1){if(C||!p.getCoveringTilesDetailsProvider().allowWorldCopies())return B?.wrap();const E=new a.S(B.lng,B.lat);if(B=new a.S(B.lng,B.lat),l){const T=new a.S(B.lng-360,B.lat),U=new a.S(B.lng+360,B.lat),q=p.locationToScreenPoint(B).distSqr(l);p.locationToScreenPoint(T).distSqr(l)<q?B=T:p.locationToScreenPoint(U).distSqr(l)<q&&(B=U)}for(;Math.abs(B.lng-p.center.lng)>180;){const T=p.locationToScreenPoint(B);if(T.x>=0&&T.y>=0&&T.x<=p.width&&T.y<=p.height)break;B.lng>p.center.lng?B.lng-=360:B.lng+=360}return B.lng!==E.lng&&p.isPointOnMapSurface(p.locationToScreenPoint(B))?B:E}const ks={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 YA(B,l,p){const C=B.classList;for(const E in ks)C.remove(`maplibregl-${p}-anchor-${E}`);C.add(`maplibregl-${p}-anchor-${l}`)}class _A extends a.E{constructor(l){if(super(),this._onKeyPress=p=>{const C=p.code,E=p.charCode||p.keyCode;C!=="Space"&&C!=="Enter"&&E!==32&&E!==13||this.togglePopup()},this._onMapClick=p=>{const C=p.originalEvent.target,E=this._element;this._popup&&(C===E||E.contains(C))&&this.togglePopup()},this._update=p=>{if(!this._map)return;const C=this._map.loaded()&&!this._map.isMoving();(p?.type==="terrain"||p?.type==="render"&&!C)&&this._map.once("render",this._update),this._lngLat=xs(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 E="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?E=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(E=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let T="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?T="rotateX(0deg)":this._pitchAlignment==="map"&&(T=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||p&&p.type!=="moveend"||(this._pos=this._pos.round()),_.setTransform(this._element,`${ks[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${T} ${E}`),x.frameAsync(new AbortController).then((()=>{this._updateOpacity(p&&p.type==="moveend")})).catch((()=>{}))},this._onMove=p=>{if(!this._isDragging){const C=this._clickTolerance||this._map._clickTolerance;this._isDragging=p.point.dist(this._pointerdownPos)>=C}this._isDragging&&(this._pos=p.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 a.l("dragstart"))),this.fire(new a.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 a.l("dragend")),this._state="inactive"},this._addDragHandler=p=>{this._element.contains(p.originalEvent.target)&&(p.preventDefault(),this._positionDelta=p.point.sub(this._pos).add(this._offset),this._pointerdownPos=p.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=l&&l.anchor||"center",this._color=l&&l.color||"#3FB1CE",this._scale=l&&l.scale||1,this._draggable=l&&l.draggable||!1,this._clickTolerance=l&&l.clickTolerance||0,this._subpixelPositioning=l&&l.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=l&&l.rotation||0,this._rotationAlignment=l&&l.rotationAlignment||"auto",this._pitchAlignment=l&&l.pitchAlignment&&l.pitchAlignment!=="auto"?l.pitchAlignment:this._rotationAlignment,this.setOpacity(l?.opacity,l?.opacityWhenCovered),l&&l.element)this._element=l.element,this._offset=a.P.convert(l&&l.offset||[0,0]);else{this._defaultMarker=!0,this._element=_.create("div");const p=_.createNS("http://www.w3.org/2000/svg","svg"),C=41,E=27;p.setAttributeNS(null,"display","block"),p.setAttributeNS(null,"height",`${C}px`),p.setAttributeNS(null,"width",`${E}px`),p.setAttributeNS(null,"viewBox",`0 0 ${E} ${C}`);const T=_.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"stroke","none"),T.setAttributeNS(null,"stroke-width","1"),T.setAttributeNS(null,"fill","none"),T.setAttributeNS(null,"fill-rule","evenodd");const U=_.createNS("http://www.w3.org/2000/svg","g");U.setAttributeNS(null,"fill-rule","nonzero");const q=_.createNS("http://www.w3.org/2000/svg","g");q.setAttributeNS(null,"transform","translate(3.0, 29.0)"),q.setAttributeNS(null,"fill","#000000");const Z=[{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 et of Z){const st=_.createNS("http://www.w3.org/2000/svg","ellipse");st.setAttributeNS(null,"opacity","0.04"),st.setAttributeNS(null,"cx","10.5"),st.setAttributeNS(null,"cy","5.80029008"),st.setAttributeNS(null,"rx",et.rx),st.setAttributeNS(null,"ry",et.ry),q.appendChild(st)}const ae=_.createNS("http://www.w3.org/2000/svg","g");ae.setAttributeNS(null,"fill",this._color);const Ae=_.createNS("http://www.w3.org/2000/svg","path");Ae.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"),ae.appendChild(Ae);const ye=_.createNS("http://www.w3.org/2000/svg","g");ye.setAttributeNS(null,"opacity","0.25"),ye.setAttributeNS(null,"fill","#000000");const pe=_.createNS("http://www.w3.org/2000/svg","path");pe.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"),ye.appendChild(pe);const Be=_.createNS("http://www.w3.org/2000/svg","g");Be.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Be.setAttributeNS(null,"fill","#FFFFFF");const Fe=_.createNS("http://www.w3.org/2000/svg","g");Fe.setAttributeNS(null,"transform","translate(8.0, 8.0)");const Xe=_.createNS("http://www.w3.org/2000/svg","circle");Xe.setAttributeNS(null,"fill","#000000"),Xe.setAttributeNS(null,"opacity","0.25"),Xe.setAttributeNS(null,"cx","5.5"),Xe.setAttributeNS(null,"cy","5.5"),Xe.setAttributeNS(null,"r","5.4999962");const Ze=_.createNS("http://www.w3.org/2000/svg","circle");Ze.setAttributeNS(null,"fill","#FFFFFF"),Ze.setAttributeNS(null,"cx","5.5"),Ze.setAttributeNS(null,"cy","5.5"),Ze.setAttributeNS(null,"r","5.4999962"),Fe.appendChild(Xe),Fe.appendChild(Ze),U.appendChild(q),U.appendChild(ae),U.appendChild(ye),U.appendChild(Be),U.appendChild(Fe),p.appendChild(U),p.setAttributeNS(null,"height",C*this._scale+"px"),p.setAttributeNS(null,"width",E*this._scale+"px"),this._element.appendChild(p),this._offset=a.P.convert(l&&l.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(p=>{p.preventDefault()})),this._element.addEventListener("mousedown",(p=>{p.preventDefault()})),YA(this._element,this._anchor,"marker"),l&&l.className)for(const p of l.className.split(" "))this._element.classList.add(p);this._popup=null}addTo(l){return this.remove(),this._map=l,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",l._getUIString("Marker.Title")),l.getCanvasContainer().appendChild(this._element),l.on("move",this._update),l.on("moveend",this._update),l.on("terrain",this._update),l.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),_.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(l){return this._lngLat=a.S.convert(l),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(l){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),l){if(!("offset"in l.options)){const E=Math.abs(13.5)/Math.SQRT2;l.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[E,-1*(38.1-13.5+E)],"bottom-right":[-E,-1*(38.1-13.5+E)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=l,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(l){return this._subpixelPositioning=l,this}getPopup(){return this._popup}togglePopup(){const l=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:l?(l.isOpen()?l.remove():(l.setLngLat(this._lngLat),l.addTo(this._map)),this):this}_updateOpacity(l=!1){var p,C;const E=(p=this._map)===null||p===void 0?void 0:p.terrain,T=this._map.transform.isLocationOccluded(this._lngLat);if(!E||T){const Be=T?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Be&&(this._element.style.opacity=Be))}if(l)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}const U=this._map,q=U.terrain.depthAtPoint(this._pos),Z=U.terrain.getElevationForLngLatZoom(this._lngLat,U.transform.tileZoom);if(U.transform.lngLatToCameraDepth(this._lngLat,Z)-q<.006)return void(this._element.style.opacity=this._opacity);const ae=-this._offset.y/U.transform.pixelsPerMeter,Ae=Math.sin(U.getPitch()*Math.PI/180)*ae,ye=U.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),pe=U.transform.lngLatToCameraDepth(this._lngLat,Z+Ae)-ye>.006;!((C=this._popup)===null||C===void 0)&&C.isOpen()&&pe&&this._popup.remove(),this._element.style.opacity=pe?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(l){return this._offset=a.P.convert(l),this._update(),this}addClassName(l){this._element.classList.add(l)}removeClassName(l){this._element.classList.remove(l)}toggleClassName(l){return this._element.classList.toggle(l)}setDraggable(l){return this._draggable=!!l,this._map&&(l?(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(l){return this._rotation=l||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(l){return this._rotationAlignment=l||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(l){return this._pitchAlignment=l&&l!=="auto"?l:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(l,p){return(this._opacity===void 0||l===void 0&&p===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),l!==void 0&&(this._opacity=l),p!==void 0&&(this._opacityWhenCovered=p),this._map&&this._updateOpacity(!0),this}}const fl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Ts=0,Yu=!1;const wd={maxWidth:100,unit:"metric"};function $A(B,l,p){const C=p&&p.maxWidth||100,E=B._container.clientHeight/2,T=B._container.clientWidth/2,U=B.unproject([T-C/2,E]),q=B.unproject([T+C/2,E]),Z=Math.round(B.project(q).x-B.project(U).x),ae=Math.min(C,Z,B._container.clientWidth),Ae=U.distanceTo(q);if(p&&p.unit==="imperial"){const ye=3.2808*Ae;ye>5280?Vc(l,ae,ye/5280,B._getUIString("ScaleControl.Miles")):Vc(l,ae,ye,B._getUIString("ScaleControl.Feet"))}else p&&p.unit==="nautical"?Vc(l,ae,Ae/1852,B._getUIString("ScaleControl.NauticalMiles")):Ae>=1e3?Vc(l,ae,Ae/1e3,B._getUIString("ScaleControl.Kilometers")):Vc(l,ae,Ae,B._getUIString("ScaleControl.Meters"))}function Vc(B,l,p,C){const E=(function(T){const U=Math.pow(10,`${Math.floor(T)}`.length-1);let q=T/U;return q=q>=10?10:q>=5?5:q>=3?3:q>=2?2:q>=1?1:(function(Z){const ae=Math.pow(10,Math.ceil(-Math.log(Z)/Math.LN10));return Math.round(Z*ae)/ae})(q),U*q})(p);B.style.width=l*(E/p)+"px",B.innerHTML=`${E}&nbsp;${C}`}const xc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0},Mf=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function wf(B){if(B){if(typeof B=="number"){const l=Math.round(Math.abs(B)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,B),"top-left":new a.P(l,l),"top-right":new a.P(-l,l),bottom:new a.P(0,-B),"bottom-left":new a.P(l,-l),"bottom-right":new a.P(-l,-l),left:new a.P(B,0),right:new a.P(-B,0)}}if(B instanceof a.P||Array.isArray(B)){const l=a.P.convert(B);return{center:l,top:l,"top-left":l,"top-right":l,bottom:l,"bottom-left":l,"bottom-right":l,left:l,right:l}}return{center:a.P.convert(B.center||[0,0]),top:a.P.convert(B.top||[0,0]),"top-left":a.P.convert(B["top-left"]||[0,0]),"top-right":a.P.convert(B["top-right"]||[0,0]),bottom:a.P.convert(B.bottom||[0,0]),"bottom-left":a.P.convert(B["bottom-left"]||[0,0]),"bottom-right":a.P.convert(B["bottom-right"]||[0,0]),left:a.P.convert(B.left||[0,0]),right:a.P.convert(B.right||[0,0])}}return wf(new a.P(0,0))}const Mp=c;s.AJAXError=a.cz,s.Event=a.l,s.Evented=a.E,s.LngLat=a.S,s.MercatorCoordinate=a.a1,s.Point=a.P,s.addProtocol=a.cA,s.config=a.a,s.removeProtocol=a.cB,s.AttributionControl=kr,s.BoxZoomHandler=bd,s.CanvasSource=_n,s.CooperativeGesturesHandler=Rm,s.DoubleClickZoomHandler=_d,s.DragPanHandler=Cc,s.DragRotateHandler=tl,s.EdgeInsets=Sl,s.FullscreenControl=class extends a.E{constructor(B={}){super(),this._onFullscreenChange=()=>{var l;let p=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((l=p?.shadowRoot)===null||l===void 0)&&l.fullscreenElement;)p=p.shadowRoot.fullscreenElement;p===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,B&&B.container&&(B.container instanceof HTMLElement?this._container=B.container:a.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(B){return this._map=B,this._container||(this._container=this._map.getContainer()),this._controlContainer=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){_.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const B=this._fullscreenButton=_.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);_.create("span","maplibregl-ctrl-icon",B).setAttribute("aria-hidden","true"),B.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const B=this._getTitle();this._fullscreenButton.setAttribute("aria-label",B),this._fullscreenButton.title=B}_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 a.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.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()}},s.GeoJSONSource=Rn,s.GeolocateControl=class extends a.E{constructor(B){super(),this._onSuccess=l=>{if(this._map){if(this._isOutOfMapMaxBounds(l))return this._setErrorState(),this.fire(new a.l("outofmaxbounds",l)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=l,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(l),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(l),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new a.l("geolocate",l)),this._finish()}},this._updateCamera=l=>{const p=new a.S(l.coords.longitude,l.coords.latitude),C=l.coords.accuracy,E=this._map.getBearing(),T=a.e({bearing:E},this.options.fitBoundsOptions),U=rt.fromLngLat(p,C);this._map.fitBounds(U,T,{geolocateSource:!0})},this._updateMarker=l=>{if(l){const p=new a.S(l.coords.longitude,l.coords.latitude);this._accuracyCircleMarker.setLngLat(p).addTo(this._map),this._userLocationDotMarker.setLngLat(p).addTo(this._map),this._accuracy=l.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=l=>{if(this._map){if(l.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 p=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=p,this._geolocateButton.setAttribute("aria-label",p),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(l.code===3&&Yu)return;this.options.trackUserLocation&&this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new a.l("error",l)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(l=>l.preventDefault())),this._geolocateButton=_.create("button","maplibregl-ctrl-geolocate",this._container),_.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=l=>{if(this._map){if(l===!1){a.w("Geolocation support is not available so the GeolocateControl will be disabled.");const p=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=p,this._geolocateButton.setAttribute("aria-label",p)}else{const p=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=p,this._geolocateButton.setAttribute("aria-label",p)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=_.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new _A({element:this._dotElement}),this._circleElement=_.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new _A({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(p=>{const C=p?.[0]instanceof ResizeObserverEntry;p.geolocateSource||this._watchState!=="ACTIVE_LOCK"||C||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new a.l("trackuserlocationend")),this.fire(new a.l("userlocationlostfocus")))}))}},this.options=a.e({},fl,B)}onAdd(B){return this._map=B,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return a._(this,arguments,void 0,(function*(l=!1){if(_c!==void 0&&!l)return _c;if(window.navigator.permissions===void 0)return _c=!!window.navigator.geolocation,_c;try{_c=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{_c=!!window.navigator.geolocation}return _c}))})().then((l=>this._finishSetupUI(l))),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(),_.remove(this._container),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Ts=0,Yu=!1}_isOutOfMapMaxBounds(B){const l=this._map.getMaxBounds(),p=B.coords;return l&&(p.longitude<l.getWest()||p.longitude>l.getEast()||p.latitude<l.getSouth()||p.latitude>l.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}`)}}_updateCircleRadiusIfNeeded(){const B=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&B))return;const l=this._map.project(B),p=this._map.unproject([l.x+100,l.y]),C=B.distanceTo(p)/100,E=2*this._accuracy/C;this._circleElement.style.width=`${E.toFixed(2)}px`,this._circleElement.style.height=`${E.toFixed(2)}px`}trigger(){if(!this._setup)return a.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 a.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ts--,Yu=!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 a.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 a.l("trackuserlocationstart")),this.fire(new a.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 B;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ts++,Ts>1?(B={maximumAge:6e5,timeout:0},Yu=!0):(B=this.options.positionOptions,Yu=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,B)}}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)}},s.GlobeControl=class{constructor(){this._toggleProjection=()=>{var B;const l=(B=this._map.getProjection())===null||B===void 0?void 0:B.type;this._map.setProjection(l!=="mercator"&&l?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var B;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((B=this._map.getProjection())===null||B===void 0?void 0:B.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(B){return this._map=B,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=_.create("button","maplibregl-ctrl-globe",this._container),_.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(){_.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},s.Hash=qe,s.ImageSource=zn,s.KeyboardHandler=Gu,s.LngLatBounds=rt,s.LogoControl=Do,s.Map=class extends _p{constructor(B){var l,p;a.cw.mark(a.cx.create);const C=Object.assign(Object.assign(Object.assign({},Md),B),{canvasContextAttributes:Object.assign(Object.assign({},Md.canvasContextAttributes),B.canvasContextAttributes)});if(C.minZoom!=null&&C.maxZoom!=null&&C.minZoom>C.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(C.minPitch!=null&&C.maxPitch!=null&&C.minPitch>C.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(C.minPitch!=null&&C.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(C.maxPitch!=null&&C.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const E=new Mr,T=new Ro;if(C.minZoom!==void 0&&E.setMinZoom(C.minZoom),C.maxZoom!==void 0&&E.setMaxZoom(C.maxZoom),C.minPitch!==void 0&&E.setMinPitch(C.minPitch),C.maxPitch!==void 0&&E.setMaxPitch(C.maxPitch),C.renderWorldCopies!==void 0&&E.setRenderWorldCopies(C.renderWorldCopies),super(E,T,{bearingSnap:C.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new no,this._controls=[],this._mapId=a.a7(),this._contextLost=q=>{q.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.l("webglcontextlost",{originalEvent:q}))},this._contextRestored=q=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.l("webglcontextrestored",{originalEvent:q}))},this._onMapScroll=q=>{if(q.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=C.interactive,this._maxTileCacheSize=C.maxTileCacheSize,this._maxTileCacheZoomLevels=C.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},C.canvasContextAttributes),this._trackResize=C.trackResize===!0,this._bearingSnap=C.bearingSnap,this._centerClampedToGround=C.centerClampedToGround,this._refreshExpiredTiles=C.refreshExpiredTiles===!0,this._fadeDuration=C.fadeDuration,this._crossSourceCollisions=C.crossSourceCollisions===!0,this._collectResourceTiming=C.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},xp),C.locale),this._clickTolerance=C.clickTolerance,this._overridePixelRatio=C.pixelRatio,this._maxCanvasSize=C.maxCanvasSize,this.transformCameraUpdate=C.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=C.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=H.addThrottleControl((()=>this.isMoving())),this._requestManager=new G(C.transformRequest),typeof C.container=="string"){if(this._container=document.getElementById(C.container),!this._container)throw new Error(`Container '${C.container}' not found.`)}else{if(!(C.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=C.container}if(C.maxBounds&&this.setMaxBounds(C.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 q=!1;const Z=yu((ae=>{this._trackResize&&!this._removed&&(this.resize(ae),this.redraw())}),50);this._resizeObserver=new ResizeObserver((ae=>{q?Z(ae):q=!0})),this._resizeObserver.observe(this._container)}this.handlers=new xd(this,C),this._hash=C.hash&&new qe(typeof C.hash=="string"&&C.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:C.center,elevation:C.elevation,zoom:C.zoom,bearing:C.bearing,pitch:C.pitch,roll:C.roll}),C.bounds&&(this.resize(),this.fitBounds(C.bounds,a.e({},C.fitBoundsOptions,{duration:0}))));const U=typeof C.style=="string"||((p=(l=C.style)===null||l===void 0?void 0:l.projection)===null||p===void 0?void 0:p.type)!=="globe";this.resize(null,U),this._localIdeographFontFamily=C.localIdeographFontFamily,this._validateStyle=C.validateStyle,C.style&&this.setStyle(C.style,{localIdeographFontFamily:C.localIdeographFontFamily}),C.attributionControl&&this.addControl(new kr(typeof C.attributionControl=="boolean"?void 0:C.attributionControl)),C.maplibreLogo&&this.addControl(new Do,C.logoPosition),this.on("style.load",(()=>{if(U||this._resizeTransform(),this.transform.unmodified){const q=a.Q(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(q)}})),this.on("data",(q=>{this._update(q.dataType==="style"),this.fire(new a.l(`${q.dataType}data`,q))})),this.on("dataloading",(q=>{this.fire(new a.l(`${q.dataType}dataloading`,q))})),this.on("dataabort",(q=>{this.fire(new a.l("sourcedataabort",q))}))}_getMapId(){return this._mapId}setGlobalStateProperty(B,l){return this.style.setGlobalStateProperty(B,l),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(B,l){if(l===void 0&&(l=B.getDefaultPosition?B.getDefaultPosition():"top-right"),!B||!B.onAdd)return this.fire(new a.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const p=B.onAdd(this);this._controls.push(B);const C=this._controlPositions[l];return l.indexOf("bottom")!==-1?C.insertBefore(p,C.firstChild):C.appendChild(p),this}removeControl(B){if(!B||!B.onRemove)return this.fire(new a.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const l=this._controls.indexOf(B);return l>-1&&this._controls.splice(l,1),B.onRemove(this),this}hasControl(B){return this._controls.indexOf(B)>-1}coveringTiles(B){return ot(this.transform,B)}calculateCameraOptionsFromTo(B,l,p,C){return C==null&&this.terrain&&(C=this.terrain.getElevationForLngLatZoom(p,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(B,l,p,C)}resize(B,l=!0){const[p,C]=this._containerDimensions(),E=this._getClampedPixelRatio(p,C);if(this._resizeCanvas(p,C,E),this.painter.resize(p,C,E),this.painter.overLimit()){const U=this.painter.context.gl;this._maxCanvasSize=[U.drawingBufferWidth,U.drawingBufferHeight];const q=this._getClampedPixelRatio(p,C);this._resizeCanvas(p,C,q),this.painter.resize(p,C,q)}this._resizeTransform(l);const T=!this._moving;return T&&(this.stop(),this.fire(new a.l("movestart",B)).fire(new a.l("move",B))),this.fire(new a.l("resize",B)),T&&this.fire(new a.l("moveend",B)),this}_resizeTransform(B=!0){var l;const[p,C]=this._containerDimensions();this.transform.resize(p,C,B),(l=this._requestedCameraState)===null||l===void 0||l.resize(p,C,B)}_getClampedPixelRatio(B,l){const{0:p,1:C}=this._maxCanvasSize,E=this.getPixelRatio(),T=B*E,U=l*E;return Math.min(T>p?p/T:1,U>C?C/U:1)*E}getPixelRatio(){var B;return(B=this._overridePixelRatio)!==null&&B!==void 0?B:devicePixelRatio}setPixelRatio(B){this._overridePixelRatio=B,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(B){return this.transform.setMaxBounds(rt.convert(B)),this._update()}setMinZoom(B){if((B=B??-2)>=-2&&B<=this.transform.maxZoom)return this.transform.setMinZoom(B),this._update(),this.getZoom()<B&&this.setZoom(B),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(B){if((B=B??22)>=this.transform.minZoom)return this.transform.setMaxZoom(B),this._update(),this.getZoom()>B&&this.setZoom(B),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(B){if((B=B??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(B>=0&&B<=this.transform.maxPitch)return this.transform.setMinPitch(B),this._update(),this.getPitch()<B&&this.setPitch(B),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(B){if((B=B??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(B>=this.transform.minPitch)return this.transform.setMaxPitch(B),this._update(),this.getPitch()>B&&this.setPitch(B),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(B){return this.transform.setRenderWorldCopies(B),this._update()}project(B){return this.transform.locationToScreenPoint(a.S.convert(B),this.style&&this.terrain)}unproject(B){return this.transform.screenPointToLocation(a.P.convert(B),this.terrain)}isMoving(){var B;return this._moving||((B=this.handlers)===null||B===void 0?void 0:B.isMoving())}isZooming(){var B;return this._zooming||((B=this.handlers)===null||B===void 0?void 0:B.isZooming())}isRotating(){var B;return this._rotating||((B=this.handlers)===null||B===void 0?void 0:B.isRotating())}_createDelegatedListener(B,l,p){if(B==="mouseenter"||B==="mouseover"){let C=!1;return{layers:l,listener:p,delegates:{mousemove:T=>{const U=l.filter((Z=>this.getLayer(Z))),q=U.length!==0?this.queryRenderedFeatures(T.point,{layers:U}):[];q.length?C||(C=!0,p.call(this,new Zl(B,this,T.originalEvent,{features:q}))):C=!1},mouseout:()=>{C=!1}}}}if(B==="mouseleave"||B==="mouseout"){let C=!1;return{layers:l,listener:p,delegates:{mousemove:U=>{const q=l.filter((Z=>this.getLayer(Z)));(q.length!==0?this.queryRenderedFeatures(U.point,{layers:q}):[]).length?C=!0:C&&(C=!1,p.call(this,new Zl(B,this,U.originalEvent)))},mouseout:U=>{C&&(C=!1,p.call(this,new Zl(B,this,U.originalEvent)))}}}}{const C=E=>{const T=l.filter((q=>this.getLayer(q))),U=T.length!==0?this.queryRenderedFeatures(E.point,{layers:T}):[];U.length&&(E.features=U,p.call(this,E),delete E.features)};return{layers:l,listener:p,delegates:{[B]:C}}}}_saveDelegatedListener(B,l){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[B]=this._delegatedListeners[B]||[],this._delegatedListeners[B].push(l)}_removeDelegatedListener(B,l,p){if(!this._delegatedListeners||!this._delegatedListeners[B])return;const C=this._delegatedListeners[B];for(let E=0;E<C.length;E++){const T=C[E];if(T.listener===p&&T.layers.length===l.length&&T.layers.every((U=>l.includes(U)))){for(const U in T.delegates)this.off(U,T.delegates[U]);return void C.splice(E,1)}}}on(B,l,p){if(p===void 0)return super.on(B,l);const C=typeof l=="string"?[l]:l,E=this._createDelegatedListener(B,C,p);this._saveDelegatedListener(B,E);for(const T in E.delegates)this.on(T,E.delegates[T]);return{unsubscribe:()=>{this._removeDelegatedListener(B,C,p)}}}once(B,l,p){if(p===void 0)return super.once(B,l);const C=typeof l=="string"?[l]:l,E=this._createDelegatedListener(B,C,p);for(const T in E.delegates){const U=E.delegates[T];E.delegates[T]=(...q)=>{this._removeDelegatedListener(B,C,p),U(...q)}}this._saveDelegatedListener(B,E);for(const T in E.delegates)this.once(T,E.delegates[T]);return this}off(B,l,p){return p===void 0?super.off(B,l):(this._removeDelegatedListener(B,typeof l=="string"?[l]:l,p),this)}queryRenderedFeatures(B,l){if(!this.style)return[];let p;const C=B instanceof a.P||Array.isArray(B),E=C?B:[[0,0],[this.transform.width,this.transform.height]];if(l=l||(C?{}:B)||{},E instanceof a.P||typeof E[0]=="number")p=[a.P.convert(E)];else{const T=a.P.convert(E[0]),U=a.P.convert(E[1]);p=[T,new a.P(U.x,T.y),U,new a.P(T.x,U.y),T]}return this.style.queryRenderedFeatures(p,l,this.transform)}querySourceFeatures(B,l){return this.style.querySourceFeatures(B,l)}setStyle(B,l){return(l=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},l)).diff!==!1&&l.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&B?(this._diffStyle(B,l),this):(this._localIdeographFontFamily=l.localIdeographFontFamily,this._updateStyle(B,l))}setTransformRequest(B){return this._requestManager.setTransformRequest(B),this}_getUIString(B){const l=this._locale[B];if(l==null)throw new Error(`Missing UI string '${B}'`);return l}_updateStyle(B,l){var p,C;if(l.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(B,l)));const E=this.style&&l.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!B)),B?(this.style=new up(this,l||{}),this.style.setEventedParent(this,{style:this.style}),typeof B=="string"?this.style.loadURL(B,l,E):this.style.loadJSON(B,l,E),this):((C=(p=this.style)===null||p===void 0?void 0:p.projection)===null||C===void 0||C.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new up(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(B,l){if(typeof B=="string"){const p=this._requestManager.transformRequest(B,"Style");a.j(p,new AbortController).then((C=>{this._updateDiff(C.data,l)})).catch((C=>{C&&this.fire(new a.k(C))}))}else typeof B=="object"&&this._updateDiff(B,l)}_updateDiff(B,l){try{this.style.setState(B,l)&&this._update(!0)}catch(p){a.w(`Unable to perform style diff: ${p.message||p.error||p}. Rebuilding the style from scratch.`),this._updateStyle(B,l)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w("There is no style added to the map.")}addSource(B,l){return this._lazyInitEmptyStyle(),this.style.addSource(B,l),this._update(!0)}isSourceLoaded(B){const l=this.style&&this.style.sourceCaches[B];if(l!==void 0)return l.loaded();this.fire(new a.k(new Error(`There is no source with ID '${B}'`)))}setTerrain(B){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),B){const l=this.style.sourceCaches[B.source];if(!l)throw new Error(`cannot load terrain, because there exists no source with ID: ${B.source}`);this.terrain===null&&l.reload();for(const p in this.style._layers){const C=this.style._layers[p];C.type==="hillshade"&&C.source===B.source&&a.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."),C.type==="color-relief"&&C.source===B.source&&a.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Jn(this.painter,l,B),this.painter.renderToTexture=new bu(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=p=>{var C;p.dataType==="style"?this.terrain.sourceCache.freeRtt():p.dataType==="source"&&p.tile&&(p.sourceId!==B.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))),((C=p.source)===null||C===void 0?void 0:C.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(p.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 a.l("terrain",{terrain:B})),this}getTerrain(){var B,l;return(l=(B=this.terrain)===null||B===void 0?void 0:B.options)!==null&&l!==void 0?l:null}areTilesLoaded(){const B=this.style&&this.style.sourceCaches;for(const l in B){const p=B[l]._tiles;for(const C in p){const E=p[C];if(E.state!=="loaded"&&E.state!=="errored")return!1}}return!0}removeSource(B){return this.style.removeSource(B),this._update(!0)}getSource(B){return this.style.getSource(B)}setSourceTileLodParams(B,l,p){if(p){const C=this.getSource(p);if(!C)throw new Error(`There is no source with ID "${p}", cannot set LOD parameters`);C.calculateTileZoom=gt(Math.max(1,B),Math.max(1,l))}else for(const C in this.style.sourceCaches)this.style.sourceCaches[C].getSource().calculateTileZoom=gt(Math.max(1,B),Math.max(1,l));return this._update(!0),this}refreshTiles(B,l){const p=this.style.sourceCaches[B];if(!p)throw new Error(`There is no source cache with ID "${B}", cannot refresh tile`);l===void 0?p.reload(!0):p.refreshTiles(l.map((C=>new a.a4(C.z,C.x,C.y))))}addImage(B,l,p={}){const{pixelRatio:C=1,sdf:E=!1,stretchX:T,stretchY:U,content:q,textFitWidth:Z,textFitHeight:ae}=p;if(this._lazyInitEmptyStyle(),!(l instanceof HTMLImageElement||a.b(l))){if(l.width===void 0||l.height===void 0)return this.fire(new a.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:Ae,height:ye,data:pe}=l,Be=l;return this.style.addImage(B,{data:new a.R({width:Ae,height:ye},new Uint8Array(pe)),pixelRatio:C,stretchX:T,stretchY:U,content:q,textFitWidth:Z,textFitHeight:ae,sdf:E,version:0,userImage:Be}),Be.onAdd&&Be.onAdd(this,B),this}}{const{width:Ae,height:ye,data:pe}=x.getImageData(l);this.style.addImage(B,{data:new a.R({width:Ae,height:ye},pe),pixelRatio:C,stretchX:T,stretchY:U,content:q,textFitWidth:Z,textFitHeight:ae,sdf:E,version:0})}}updateImage(B,l){const p=this.style.getImage(B);if(!p)return this.fire(new a.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const C=l instanceof HTMLImageElement||a.b(l)?x.getImageData(l):l,{width:E,height:T,data:U}=C;if(E===void 0||T===void 0)return this.fire(new a.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(E!==p.data.width||T!==p.data.height)return this.fire(new a.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));const q=!(l instanceof HTMLImageElement||a.b(l));return p.data.replace(U,q),this.style.updateImage(B,p),this}getImage(B){return this.style.getImage(B)}hasImage(B){return B?!!this.style.getImage(B):(this.fire(new a.k(new Error("Missing required image id"))),!1)}removeImage(B){this.style.removeImage(B)}loadImage(B){return H.getImage(this._requestManager.transformRequest(B,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(B,l){return this._lazyInitEmptyStyle(),this.style.addLayer(B,l),this._update(!0)}moveLayer(B,l){return this.style.moveLayer(B,l),this._update(!0)}removeLayer(B){return this.style.removeLayer(B),this._update(!0)}getLayer(B){return this.style.getLayer(B)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(B,l,p){return this.style.setLayerZoomRange(B,l,p),this._update(!0)}setFilter(B,l,p={}){return this.style.setFilter(B,l,p),this._update(!0)}getFilter(B){return this.style.getFilter(B)}setPaintProperty(B,l,p,C={}){return this.style.setPaintProperty(B,l,p,C),this._update(!0)}getPaintProperty(B,l){return this.style.getPaintProperty(B,l)}setLayoutProperty(B,l,p,C={}){return this.style.setLayoutProperty(B,l,p,C),this._update(!0)}getLayoutProperty(B,l){return this.style.getLayoutProperty(B,l)}setGlyphs(B,l={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(B,l),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(B,l,p={}){return this._lazyInitEmptyStyle(),this.style.addSprite(B,l,p,(C=>{C||this._update(!0)})),this}removeSprite(B){return this._lazyInitEmptyStyle(),this.style.removeSprite(B),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(B,l={}){return this._lazyInitEmptyStyle(),this.style.setSprite(B,l,(p=>{p||this._update(!0)})),this}setLight(B,l={}){return this._lazyInitEmptyStyle(),this.style.setLight(B,l),this._update(!0)}getLight(){return this.style.getLight()}setSky(B,l={}){return this._lazyInitEmptyStyle(),this.style.setSky(B,l),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(B,l){return this.style.setFeatureState(B,l),this._update()}removeFeatureState(B,l){return this.style.removeFeatureState(B,l),this._update()}getFeatureState(B){return this.style.getFeatureState(B)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let B=0,l=0;return this._container&&(B=this._container.clientWidth||400,l=this._container.clientHeight||300),[B,l]}_setupContainer(){const B=this._container;B.classList.add("maplibregl-map");const l=this._canvasContainer=_.create("div","maplibregl-canvas-container",B);this._interactive&&l.classList.add("maplibregl-interactive"),this._canvas=_.create("canvas","maplibregl-canvas",l),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 p=this._containerDimensions(),C=this._getClampedPixelRatio(p[0],p[1]);this._resizeCanvas(p[0],p[1],C);const E=this._controlContainer=_.create("div","maplibregl-control-container",B),T=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((U=>{T[U]=_.create("div",`maplibregl-ctrl-${U} `,E)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(B,l,p){this._canvas.width=Math.floor(p*B),this._canvas.height=Math.floor(p*l),this._canvas.style.width=`${B}px`,this._canvas.style.height=`${l}px`}_setupPainter(){const B=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let l=null;this._canvas.addEventListener("webglcontextcreationerror",(C=>{l={requestedAttributes:B},C&&(l.statusMessage=C.statusMessage,l.type=C.type)}),{once:!0});let p=null;if(p=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,B):this._canvas.getContext("webgl2",B)||this._canvas.getContext("webgl",B),!p){const C="Failed to initialize WebGL";throw l?(l.message=C,new Error(JSON.stringify(l))):new Error(C)}this.painter=new Oh(p,this.transform),O.testSupport(p)}migrateProjection(B,l){super.migrateProjection(B,l),this.painter.transform=B,this.fire(new a.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(B){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||B,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(B){return this._update(),this._renderTaskQueue.add(B)}_cancelRenderFrame(B){this._renderTaskQueue.remove(B)}_render(B){var l,p,C,E,T;const U=this._idleTriggered?this._fadeDuration:0,q=((l=this.style.projection)===null||l===void 0?void 0:l.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(B),this._removed)return;let Z=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const ye=this.transform.zoom,pe=x.now();this.style.zoomHistory.update(ye,pe);const Be=new a.F(ye,{now:pe,fadeDuration:U,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Fe=Be.crossFadingFactor();Fe===1&&Fe===this._crossFadingFactor||(Z=!0,this._crossFadingFactor=Fe),this.style.update(Be)}const ae=((p=this.style.projection)===null||p===void 0?void 0:p.transitionState)>0!==q;(C=this.style.projection)===null||C===void 0||C.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((E=this.style.projection)===null||E===void 0?void 0:E.transitionState,(T=this.style.projection)===null||T===void 0?void 0:T.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||ae)&&(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,U,this._crossSourceCollisions,ae),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:U,showPadding:this.showPadding}),this.fire(new a.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.cw.mark(a.cx.load),this.fire(new a.l("load"))),this.style&&(this.style.hasTransitions()||Z)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const Ae=this._sourcesDirty||this._styleDirty||this._placementDirty;return Ae||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.l("idle")),!this._loaded||this._fullyLoaded||Ae||(this._fullyLoaded=!0,a.cw.mark(a.cx.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var B;this._hash&&this._hash.remove();for(const p of this._controls)p.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),H.removeThrottleControl(this._imageQueueHandle),(B=this._resizeObserver)===null||B===void 0||B.disconnect();const l=this.painter.context.gl.getExtension("WEBGL_lose_context");l?.loseContext&&l.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),_.remove(this._canvasContainer),_.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),a.cw.clearMetrics(),this._removed=!0,this.fire(new a.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,x.frame(this._frameRequest,(B=>{a.cw.frame(B),this._frameRequest=null;try{this._render(B)}catch(l){if(!a.cy(l)&&!(function(p){return p.message===Ch})(l))throw l}}),(()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(B){this._showTileBoundaries!==B&&(this._showTileBoundaries=B,this._update())}get showPadding(){return!!this._showPadding}set showPadding(B){this._showPadding!==B&&(this._showPadding=B,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(B){this._showCollisionBoxes!==B&&(this._showCollisionBoxes=B,B?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(B){this._showOverdrawInspector!==B&&(this._showOverdrawInspector=B,this._update())}get repaint(){return!!this._repaint}set repaint(B){this._repaint!==B&&(this._repaint=B,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(B){this._vertices=B,this._update()}get version(){return or}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(B){return this._lazyInitEmptyStyle(),this.style.setProjection(B),this._update(!0)}},s.MapMouseEvent=Zl,s.MapTouchEvent=yf,s.MapWheelEvent=t0,s.Marker=_A,s.NavigationControl=class{constructor(B){this._updateZoomButtons=()=>{const l=this._map.getZoom(),p=l===this._map.getMaxZoom(),C=l===this._map.getMinZoom();this._zoomInButton.disabled=p,this._zoomOutButton.disabled=C,this._zoomInButton.setAttribute("aria-disabled",p.toString()),this._zoomOutButton.setAttribute("aria-disabled",C.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=(l,p)=>{const C=this._map._getUIString(`NavigationControl.${p}`);l.title=C,l.setAttribute("aria-label",C)},this.options=a.e({},qu,B),this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(l=>l.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(l=>this._map.zoomIn({},{originalEvent:l}))),_.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(l=>this._map.zoomOut({},{originalEvent:l}))),_.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(l=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:l}):this._map.resetNorth({},{originalEvent:l})})),this._compassIcon=_.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(B){return this._map=B,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 m1(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){_.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(B,l){const p=_.create("button",B,this._container);return p.type="button",p.addEventListener("click",l),p}},s.Popup=class extends a.E{constructor(B){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&_.remove(this._content),this._container&&(_.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 a.l("close"))),this),this._onMouseUp=l=>{this._update(l.point)},this._onMouseMove=l=>{this._update(l.point)},this._onDrag=l=>{this._update(l.point)},this._update=l=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=_.create("div","maplibregl-popup",this._map.getContainer()),this._tip=_.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const U of this.options.className.split(" "))this._container.classList.add(U);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=xs(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!l)return;const p=this._flatPos=this._pos=this._trackPointer&&l?l:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&l?l:this._map.transform.locationToScreenPoint(this._lngLat));let C=this.options.anchor;const E=wf(this.options.offset);if(!C){const U=this._container.offsetWidth,q=this._container.offsetHeight;let Z;Z=p.y+E.bottom.y<q?["top"]:p.y>this._map.transform.height-q?["bottom"]:[],p.x<U/2?Z.push("left"):p.x>this._map.transform.width-U/2&&Z.push("right"),C=Z.length===0?"bottom":Z.join("-")}let T=p.add(E[C]);this.options.subpixelPositioning||(T=T.round()),_.setTransform(this._container,`${ks[C]} translate(${T.x}px,${T.y}px)`),YA(this._container,C,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(xc),B)}addTo(B){return this._map&&this.remove(),this._map=B,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 a.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(B){return this._lngLat=a.S.convert(B),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(B){return this.setDOMContent(document.createTextNode(B))}setHTML(B){const l=document.createDocumentFragment(),p=document.createElement("body");let C;for(p.innerHTML=B;C=p.firstChild,C;)l.appendChild(C);return this.setDOMContent(l)}getMaxWidth(){var B;return(B=this._container)===null||B===void 0?void 0:B.style.maxWidth}setMaxWidth(B){return this.options.maxWidth=B,this._update(),this}setDOMContent(B){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=_.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(B),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(B){return this._container&&this._container.classList.add(B),this}removeClassName(B){return this._container&&this._container.classList.remove(B),this}setOffset(B){return this.options.offset=B,this._update(),this}toggleClassName(B){if(this._container)return this._container.classList.toggle(B)}setSubpixelPositioning(B){this.options.subpixelPositioning=B}_createCloseButton(){this.options.closeButton&&(this._closeButton=_.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 B=this._container.querySelector(Mf);B&&B.focus()}},s.RasterDEMTileSource=$t,s.RasterTileSource=Bt,s.ScaleControl=class{constructor(B){this._onMove=()=>{$A(this._map,this._container,this.options)},this.setUnit=l=>{this.options.unit=l,$A(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},wd),B)}getDefaultPosition(){return"bottom-left"}onAdd(B){return this._map=B,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-scale",B.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){_.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},s.ScrollZoomHandler=bA,s.Style=up,s.TerrainControl=class{constructor(B){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=B}onAdd(B){return this._map=B,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=_.create("button","maplibregl-ctrl-terrain",this._container),_.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(){_.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},s.TwoFingersTouchPitchHandler=Cp,s.TwoFingersTouchRotateHandler=kh,s.TwoFingersTouchZoomHandler=bp,s.TwoFingersTouchZoomRotateHandler=n0,s.VectorTileSource=Rt,s.VideoSource=ai,s.addSourceType=(B,l)=>a._(void 0,void 0,void 0,(function*(){if(dn(B))throw new Error(`A source type called "${B}" already exists.`);((p,C)=>{Bn[p]=C})(B,l)})),s.clearPrewarmedResources=function(){const B=Me;B&&(B.isPreloaded()&&B.numActive()===1?(B.release(ce),Me=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()"))},s.createTileMesh=kn,s.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},s.getRTLTextPluginStatus=function(){return xe().getRTLTextPluginStatus()},s.getVersion=function(){return Mp},s.getWorkerCount=function(){return Le.workerCount},s.getWorkerUrl=function(){return a.a.WORKER_URL},s.importScriptInWorkers=function(B){return Ut().broadcast("IS",B)},s.prewarm=function(){it().acquire(ce)},s.setMaxParallelImageRequests=function(B){a.a.MAX_PARALLEL_IMAGE_REQUESTS=B},s.setRTLTextPlugin=function(B,l){return xe().setRTLTextPlugin(B,l)},s.setWorkerCount=function(B){Le.workerCount=B},s.setWorkerUrl=function(B){a.a.WORKER_URL=B}}));var o=t;return o}))})(q5)),q5.exports}var qde=Qde();const l_=Wl(qde);var OM=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function TX(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var S2={exports:{}};S2.exports;var jF;function Yde(){return jF||(jF=1,(function(n,e){var t=200,i="__lodash_hash_undefined__",r=1,o=2,s=9007199254740991,a="[object Arguments]",c="[object Array]",A="[object AsyncFunction]",m="[object Boolean]",v="[object Date]",x="[object Error]",_="[object Function]",O="[object GeneratorFunction]",P="[object Map]",F="[object Number]",j="[object Null]",Q="[object Object]",V="[object Promise]",H="[object Proxy]",G="[object RegExp]",Y="[object Set]",z="[object String]",se="[object Symbol]",le="[object Undefined]",me="[object WeakMap]",fe="[object ArrayBuffer]",_e="[object DataView]",we="[object Float32Array]",ke="[object Float64Array]",je="[object Int8Array]",Ie="[object Int16Array]",Qe="[object Int32Array]",tt="[object Uint8Array]",ht="[object Uint8ClampedArray]",ce="[object Uint16Array]",Le="[object Uint32Array]",We=/[\\^$.*+?()[\]{}|]/g,Me=/^\[object .+?Constructor\]$/,dt=/^(?:0|[1-9]\d*)$/,it={};it[we]=it[ke]=it[je]=it[Ie]=it[Qe]=it[tt]=it[ht]=it[ce]=it[Le]=!0,it[a]=it[c]=it[fe]=it[m]=it[_e]=it[v]=it[x]=it[_]=it[P]=it[F]=it[Q]=it[G]=it[Y]=it[z]=it[me]=!1;var vt=typeof OM=="object"&&OM&&OM.Object===Object&&OM,Ut=typeof self=="object"&&self&&self.Object===Object&&self,Pe=vt||Ut||Function("return this")(),Te=e&&!e.nodeType&&e,Se=Te&&!0&&n&&!n.nodeType&&n,Ne=Se&&Se.exports===Te,ut=Ne&&vt.process,rt=(function(){try{return ut&&ut.binding&&ut.binding("util")}catch{}})(),mt=rt&&rt.isTypedArray;function Rt(X,ve){for(var $e=-1,St=X==null?0:X.length,ri=0,kn=[];++$e<St;){var xi=X[$e];ve(xi,$e,X)&&(kn[ri++]=xi)}return kn}function Bt(X,ve){for(var $e=-1,St=ve.length,ri=X.length;++$e<St;)X[ri+$e]=ve[$e];return X}function $t(X,ve){for(var $e=-1,St=X==null?0:X.length;++$e<St;)if(ve(X[$e],$e,X))return!0;return!1}function Rn(X,ve){for(var $e=-1,St=Array(X);++$e<X;)St[$e]=ve($e);return St}function zn(X){return function(ve){return X(ve)}}function ai(X,ve){return X.has(ve)}function _n(X,ve){return X?.[ve]}function Bn(X){var ve=-1,$e=Array(X.size);return X.forEach(function(St,ri){$e[++ve]=[ri,St]}),$e}function dn(X,ve){return function($e){return X(ve($e))}}function li(X){var ve=-1,$e=Array(X.size);return X.forEach(function(St){$e[++ve]=St}),$e}var In=Array.prototype,It=Function.prototype,xe=Object.prototype,oe=Pe["__core-js_shared__"],J=It.toString,ne=xe.hasOwnProperty,ue=(function(){var X=/[^.]+$/.exec(oe&&oe.keys&&oe.keys.IE_PROTO||"");return X?"Symbol(src)_1."+X:""})(),Ce=xe.toString,Ue=RegExp("^"+J.call(ne).replace(We,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=Ne?Pe.Buffer:void 0,lt=Pe.Symbol,be=Pe.Uint8Array,Ee=xe.propertyIsEnumerable,y=In.splice,gt=lt?lt.toStringTag:void 0,Mt=Object.getOwnPropertySymbols,Dt=He?He.isBuffer:void 0,ot=dn(Object.keys,Object),bn=xo(Pe,"DataView"),Gn=xo(Pe,"Map"),yn=xo(Pe,"Promise"),qn=xo(Pe,"Set"),$n=xo(Pe,"WeakMap"),mi=xo(Object,"create"),ir=Mo(bn),di=Mo(Gn),Vn=Mo(yn),Fn=Mo(qn),Ti=Mo($n),on=lt?lt.prototype:void 0,qr=on?on.valueOf:void 0;function Di(X){var ve=-1,$e=X==null?0:X.length;for(this.clear();++ve<$e;){var St=X[ve];this.set(St[0],St[1])}}function js(){this.__data__=mi?mi(null):{},this.size=0}function ea(X){var ve=this.has(X)&&delete this.__data__[X];return this.size-=ve?1:0,ve}function Pn(X){var ve=this.__data__;if(mi){var $e=ve[X];return $e===i?void 0:$e}return ne.call(ve,X)?ve[X]:void 0}function Gi(X){var ve=this.__data__;return mi?ve[X]!==void 0:ne.call(ve,X)}function Li(X,ve){var $e=this.__data__;return this.size+=this.has(X)?0:1,$e[X]=mi&&ve===void 0?i:ve,this}Di.prototype.clear=js,Di.prototype.delete=ea,Di.prototype.get=Pn,Di.prototype.has=Gi,Di.prototype.set=Li;function Xi(X){var ve=-1,$e=X==null?0:X.length;for(this.clear();++ve<$e;){var St=X[ve];this.set(St[0],St[1])}}function Oa(){this.__data__=[],this.size=0}function lo(X){var ve=this.__data__,$e=xl(ve,X);if($e<0)return!1;var St=ve.length-1;return $e==St?ve.pop():y.call(ve,$e,1),--this.size,!0}function Fi(X){var ve=this.__data__,$e=xl(ve,X);return $e<0?void 0:ve[$e][1]}function Cl(X){return xl(this.__data__,X)>-1}function ra(X,ve){var $e=this.__data__,St=xl($e,X);return St<0?(++this.size,$e.push([X,ve])):$e[St][1]=ve,this}Xi.prototype.clear=Oa,Xi.prototype.delete=lo,Xi.prototype.get=Fi,Xi.prototype.has=Cl,Xi.prototype.set=ra;function uo(X){var ve=-1,$e=X==null?0:X.length;for(this.clear();++ve<$e;){var St=X[ve];this.set(St[0],St[1])}}function Fa(){this.size=0,this.__data__={hash:new Di,map:new(Gn||Xi),string:new Di}}function Fu(X){var ve=jo(this,X).delete(X);return this.size-=ve?1:0,ve}function So(X){return jo(this,X).get(X)}function AA(X){return jo(this,X).has(X)}function ta(X,ve){var $e=jo(this,X),St=$e.size;return $e.set(X,ve),this.size+=$e.size==St?0:1,this}uo.prototype.clear=Fa,uo.prototype.delete=Fu,uo.prototype.get=So,uo.prototype.has=AA,uo.prototype.set=ta;function xr(X){var ve=-1,$e=X==null?0:X.length;for(this.__data__=new uo;++ve<$e;)this.add(X[ve])}function Xa(X){return this.__data__.set(X,i),this}function cl(X){return this.__data__.has(X)}xr.prototype.add=xr.prototype.push=Xa,xr.prototype.has=cl;function Bs(X){var ve=this.__data__=new Xi(X);this.size=ve.size}function fa(){this.__data__=new Xi,this.size=0}function _l(X){var ve=this.__data__,$e=ve.delete(X);return this.size=ve.size,$e}function zc(X){return this.__data__.get(X)}function Ah(X){return this.__data__.has(X)}function hA(X,ve){var $e=this.__data__;if($e instanceof Xi){var St=$e.__data__;if(!Gn||St.length<t-1)return St.push([X,ve]),this.size=++$e.size,this;$e=this.__data__=new uo(St)}return $e.set(X,ve),this.size=$e.size,this}Bs.prototype.clear=fa,Bs.prototype.delete=_l,Bs.prototype.get=zc,Bs.prototype.has=Ah,Bs.prototype.set=hA;function Ns(X,ve){var $e=No(X),St=!$e&&ls(X),ri=!$e&&!St&&Mr(X),kn=!$e&&!St&&!ri&&el(X),xi=$e||St||ri||kn,Ki=xi?Rn(X.length,String):[],Ri=Ki.length;for(var Ei in X)ne.call(X,Ei)&&!(xi&&(Ei=="length"||ri&&(Ei=="offset"||Ei=="parent")||kn&&(Ei=="buffer"||Ei=="byteLength"||Ei=="byteOffset")||wl(Ei,Ri)))&&Ki.push(Ei);return Ki}function xl(X,ve){for(var $e=X.length;$e--;)if(es(X[$e][0],ve))return $e;return-1}function jc(X,ve,$e){var St=ve(X);return No(X)?St:Bt(St,$e(X))}function Ja(X){return X==null?X===void 0?le:j:gt&&gt in Object(X)?Wi(X):ju(X)}function Nc(X){return gr(X)&&Ja(X)==a}function Al(X,ve,$e,St,ri){return X===ve?!0:X==null||ve==null||!gr(X)&&!gr(ve)?X!==X&&ve!==ve:zu(X,ve,$e,St,Al,ri)}function zu(X,ve,$e,St,ri,kn){var xi=No(X),Ki=No(ve),Ri=xi?c:Fo(X),Ei=Ki?c:Fo(ve);Ri=Ri==a?Q:Ri,Ei=Ei==a?Q:Ei;var Or=Ri==Q,zr=Ei==Q,ji=Ri==Ei;if(ji&&Mr(X)){if(!Mr(ve))return!1;xi=!0,Or=!1}if(ji&&!Or)return kn||(kn=new Bs),xi||el(X)?Ml(X,ve,$e,St,ri,kn):cu(X,ve,Ri,$e,St,ri,kn);if(!($e&r)){var Ar=Or&&ne.call(X,"__wrapped__"),jr=zr&&ne.call(ve,"__wrapped__");if(Ar||jr){var Cs=Ar?X.value():X,Sr=jr?ve.value():ve;return kn||(kn=new Bs),ri(Cs,Sr,$e,St,kn)}}return ji?(kn||(kn=new Bs),zA(X,ve,$e,St,ri,kn)):!1}function Ba(X){if(!Ro(X)||er(X))return!1;var ve=us(X)?Ue:Me;return ve.test(Mo(X))}function lc(X){return gr(X)&&bs(X.length)&&!!it[Ja(X)]}function uu(X){if(!Sl(X))return ot(X);var ve=[];for(var $e in Object(X))ne.call(X,$e)&&$e!="constructor"&&ve.push($e);return ve}function Ml(X,ve,$e,St,ri,kn){var xi=$e&r,Ki=X.length,Ri=ve.length;if(Ki!=Ri&&!(xi&&Ri>Ki))return!1;var Ei=kn.get(X);if(Ei&&kn.get(ve))return Ei==ve;var Or=-1,zr=!0,ji=$e&o?new xr:void 0;for(kn.set(X,ve),kn.set(ve,X);++Or<Ki;){var Ar=X[Or],jr=ve[Or];if(St)var Cs=xi?St(jr,Ar,Or,ve,X,kn):St(Ar,jr,Or,X,ve,kn);if(Cs!==void 0){if(Cs)continue;zr=!1;break}if(ji){if(!$t(ve,function(Sr,za){if(!ai(ji,za)&&(Ar===Sr||ri(Ar,Sr,$e,St,kn)))return ji.push(za)})){zr=!1;break}}else if(!(Ar===jr||ri(Ar,jr,$e,St,kn))){zr=!1;break}}return kn.delete(X),kn.delete(ve),zr}function cu(X,ve,$e,St,ri,kn,xi){switch($e){case _e:if(X.byteLength!=ve.byteLength||X.byteOffset!=ve.byteOffset)return!1;X=X.buffer,ve=ve.buffer;case fe:return!(X.byteLength!=ve.byteLength||!kn(new be(X),new be(ve)));case m:case v:case F:return es(+X,+ve);case x:return X.name==ve.name&&X.message==ve.message;case G:case z:return X==ve+"";case P:var Ki=Bn;case Y:var Ri=St&r;if(Ki||(Ki=li),X.size!=ve.size&&!Ri)return!1;var Ei=xi.get(X);if(Ei)return Ei==ve;St|=o,xi.set(X,ve);var Or=Ml(Ki(X),Ki(ve),St,ri,kn,xi);return xi.delete(X),Or;case se:if(qr)return qr.call(X)==qr.call(ve)}return!1}function zA(X,ve,$e,St,ri,kn){var xi=$e&r,Ki=Ia(X),Ri=Ki.length,Ei=Ia(ve),Or=Ei.length;if(Ri!=Or&&!xi)return!1;for(var zr=Ri;zr--;){var ji=Ki[zr];if(!(xi?ji in ve:ne.call(ve,ji)))return!1}var Ar=kn.get(X);if(Ar&&kn.get(ve))return Ar==ve;var jr=!0;kn.set(X,ve),kn.set(ve,X);for(var Cs=xi;++zr<Ri;){ji=Ki[zr];var Sr=X[ji],za=ve[ji];if(St)var uc=xi?St(za,Sr,ji,ve,X,kn):St(Sr,za,ji,X,ve,kn);if(!(uc===void 0?Sr===za||ri(Sr,za,$e,St,kn):uc)){jr=!1;break}Cs||(Cs=ji=="constructor")}if(jr&&!Cs){var hu=X.constructor,Gs=ve.constructor;hu!=Gs&&"constructor"in X&&"constructor"in ve&&!(typeof hu=="function"&&hu instanceof hu&&typeof Gs=="function"&&Gs instanceof Gs)&&(jr=!1)}return kn.delete(X),kn.delete(ve),jr}function Ia(X){return jc(X,Si,Ql)}function jo(X,ve){var $e=X.__data__;return Au(ve)?$e[typeof ve=="string"?"string":"hash"]:$e.map}function xo(X,ve){var $e=_n(X,ve);return Ba($e)?$e:void 0}function Wi(X){var ve=ne.call(X,gt),$e=X[gt];try{X[gt]=void 0;var St=!0}catch{}var ri=Ce.call(X);return St&&(ve?X[gt]=$e:delete X[gt]),ri}var Ql=Mt?function(X){return X==null?[]:(X=Object(X),Rt(Mt(X),function(ve){return Ee.call(X,ve)}))}:ti,Fo=Ja;(bn&&Fo(new bn(new ArrayBuffer(1)))!=_e||Gn&&Fo(new Gn)!=P||yn&&Fo(yn.resolve())!=V||qn&&Fo(new qn)!=Y||$n&&Fo(new $n)!=me)&&(Fo=function(X){var ve=Ja(X),$e=ve==Q?X.constructor:void 0,St=$e?Mo($e):"";if(St)switch(St){case ir:return _e;case di:return P;case Vn:return V;case Fn:return Y;case Ti:return me}return ve});function wl(X,ve){return ve=ve??s,!!ve&&(typeof X=="number"||dt.test(X))&&X>-1&&X%1==0&&X<ve}function Au(X){var ve=typeof X;return ve=="string"||ve=="number"||ve=="symbol"||ve=="boolean"?X!=="__proto__":X===null}function er(X){return!!ue&&ue in X}function Sl(X){var ve=X&&X.constructor,$e=typeof ve=="function"&&ve.prototype||xe;return X===$e}function ju(X){return Ce.call(X)}function Mo(X){if(X!=null){try{return J.call(X)}catch{}try{return X+""}catch{}}return""}function es(X,ve){return X===ve||X!==X&&ve!==ve}var ls=Nc((function(){return arguments})())?Nc:function(X){return gr(X)&&ne.call(X,"callee")&&!Ee.call(X,"callee")},No=Array.isArray;function Go(X){return X!=null&&bs(X.length)&&!us(X)}var Mr=Dt||wr;function El(X,ve){return Al(X,ve)}function us(X){if(!Ro(X))return!1;var ve=Ja(X);return ve==_||ve==O||ve==A||ve==H}function bs(X){return typeof X=="number"&&X>-1&&X%1==0&&X<=s}function Ro(X){var ve=typeof X;return X!=null&&(ve=="object"||ve=="function")}function gr(X){return X!=null&&typeof X=="object"}var el=mt?zn(mt):lc;function Si(X){return Go(X)?Ns(X):uu(X)}function ti(){return[]}function wr(){return!1}n.exports=El})(S2,S2.exports)),S2.exports}var $de=Yde(),Vde=TX($de);function h9(n,e,t){const i={id:[e,t,"circle"].join("_"),source:e,type:"circle",paint:{"circle-color":n,"circle-radius":2},filter:["==","$type","Point"]};return t&&(i["source-layer"]=t),i}function d9(n,e,t,i){const r={id:[t,i,"polygon"].join("_"),source:t,type:"fill",paint:{"fill-color":n,"fill-antialias":!0,"fill-outline-color":n},filter:["==","$type","Polygon"]};return i&&(r["source-layer"]=i),r}function f9(n,e,t){const i={id:[e,t,"line"].join("_"),source:e,layout:{"line-join":"round","line-cap":"round"},type:"line",paint:{"line-color":n},filter:["==","$type","LineString"]};return t&&(i["source-layer"]=t),i}function Hde(n,e){const t=[],i=[],r=[];function o(s){return{circle:e(s,.8),line:e(s,.6),polygon:e(s,.3),polygonOutline:e(s,.6),default:e(s,1)}}return Object.keys(n).forEach(s=>{const a=n[s];if(!a||a.length===0){const c=o(s);i.push(h9(c.circle,s)),r.push(f9(c.line,s)),t.push(d9(c.polygon,c.polygonOutline,s))}else a.forEach(c=>{const A=o(c);i.push(h9(A.circle,s,c)),r.push(f9(A.line,s,c)),t.push(d9(A.polygon,A.polygonOutline,s,c))})}),t.concat(r).concat(i)}function Zde(n,e,t){t=Object.assign({backgroundColor:"#fff"},t);const i={id:"background",type:"background",paint:{"background-color":t.backgroundColor}},r={};return Object.keys(n.sources).forEach(o=>{const s=n.sources[o];(s.type==="vector"||s.type==="geojson")&&(r[o]=s)}),Object.assign(n,{layers:[i].concat(e),sources:r})}var NF={polygonLayer:d9,lineLayer:f9,circleLayer:h9,generateInspectStyle:Zde,generateColoredLayers:Hde};class Xde{constructor(e){e=Object.assign({show:!0,onToggle(){}},e),this._btn=this.createButton(),this._btn.onclick=e.onToggle,this.elem=this.createContainer(this._btn,e.show)}createButton(){const e=document.createElement("button");return e.className="maplibregl-ctrl-icon maplibregl-ctrl-inspect",e.type="button",e.title="Toggle Inspect",e.setAttribute("aria-label","Toggle Inspect"),e}createContainer(e,t){const i=document.createElement("div");return i.className="maplibregl-ctrl maplibregl-ctrl-group",i.appendChild(e),t||(i.style.display="none"),i}setInspectIcon(){this._btn.className="maplibregl-ctrl-icon maplibregl-ctrl-inspect"}setMapIcon(){this._btn.className="maplibregl-ctrl-icon maplibregl-ctrl-map"}}function Jde(n){return typeof n>"u"||n===null?n:n instanceof Date?n.toLocaleString():typeof n=="object"||typeof n=="number"||typeof n=="string"?n.toString():n}function fO(n,e){return`<div class="maplibregl-inspect_property"><div class="maplibregl-inspect_property-name">${n}</div><div class="maplibregl-inspect_property-value">${Jde(e)}</div></div>`}function efe(n){return`<div class="maplibregl-inspect_layer">${n}</div>`}function tfe(n){const e=efe(n.layer["source-layer"]||n.layer.source),t=fO("$id",n.id),i=fO("$type",n.geometry.type),r=Object.keys(n.properties).map(o=>fO(o,n.properties[o]));return[e,t,i].concat(r).join("")}function nfe(n){return n.map(e=>`<div class="maplibregl-inspect_feature">${tfe(e)}</div>`).join("")}function ife(n){return`<div class="maplibregl-inspect_popup">${nfe(n)}</div>`}var E2={exports:{}},rfe=E2.exports,GF;function ofe(){return GF||(GF=1,(function(n,e){(function(t,i){{var r=i();n.exports&&(e=n.exports=r),e.randomColor=r}})(rfe,function(){var t=null,i={};j();var r=[],o=function(z){if(z=z||{},z.seed!==void 0&&z.seed!==null&&z.seed===parseInt(z.seed,10))t=z.seed;else if(typeof z.seed=="string")t=G(z.seed);else{if(z.seed!==void 0&&z.seed!==null)throw new TypeError("The seed value must be an integer or string");t=null}var se,le,me;if(z.count!==null&&z.count!==void 0){for(var fe=z.count,_e=[],we=0;we<z.count;we++)r.push(!1);for(z.count=null;fe>_e.length;){var ke=o(z);t!==null&&(z.seed=t),_e.push(ke)}return z.count=fe,_e}return se=s(z),le=a(se,z),me=c(se,le,z),A([se,le,me],z)};function s(z){if(r.length>0){var se=Y(z.hue),le=O(se),me=(se[1]-se[0])/r.length,fe=parseInt((le-se[0])/me);r[fe]===!0?fe=(fe+2)%r.length:r[fe]=!0;var _e=(se[0]+fe*me)%359,we=(se[0]+(fe+1)*me)%359;return se=[_e,we],le=O(se),le<0&&(le=360+le),le}else{var se=v(z.hue);return le=O(se),le<0&&(le=360+le),le}}function a(z,se){if(se.hue==="monochrome")return 0;if(se.luminosity==="random")return O([0,100]);var le=x(z),me=le[0],fe=le[1];switch(se.luminosity){case"bright":me=55;break;case"dark":me=fe-10;break;case"light":fe=55;break}return O([me,fe])}function c(z,se,le){var me=m(z,se),fe=100;switch(le.luminosity){case"dark":fe=me+20;break;case"light":me=(fe+me)/2;break;case"random":me=0,fe=100;break}return O([me,fe])}function A(z,se){switch(se.format){case"hsvArray":return z;case"hslArray":return H(z);case"hsl":var le=H(z);return"hsl("+le[0]+", "+le[1]+"%, "+le[2]+"%)";case"hsla":var me=H(z),we=se.alpha||Math.random();return"hsla("+me[0]+", "+me[1]+"%, "+me[2]+"%, "+we+")";case"rgbArray":return Q(z);case"rgb":var fe=Q(z);return"rgb("+fe.join(", ")+")";case"rgba":var _e=Q(z),we=se.alpha||Math.random();return"rgba("+_e.join(", ")+", "+we+")";default:return P(z)}}function m(z,se){for(var le=_(z).lowerBounds,me=0;me<le.length-1;me++){var fe=le[me][0],_e=le[me][1],we=le[me+1][0],ke=le[me+1][1];if(se>=fe&&se<=we){var je=(ke-_e)/(we-fe),Ie=_e-je*fe;return je*se+Ie}}return 0}function v(z){if(typeof parseInt(z)=="number"){var se=parseInt(z);if(se<360&&se>0)return[se,se]}if(typeof z=="string"){if(i[z]){var le=i[z];if(le.hueRange)return le.hueRange}else if(z.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var me=V(z)[0];return[me,me]}}return[0,360]}function x(z){return _(z).saturationRange}function _(z){z>=334&&z<=360&&(z-=360);for(var se in i){var le=i[se];if(le.hueRange&&z>=le.hueRange[0]&&z<=le.hueRange[1])return i[se]}return"Color not found"}function O(z){if(t===null){var se=.618033988749895,le=Math.random();return le+=se,le%=1,Math.floor(z[0]+le*(z[1]+1-z[0]))}else{var me=z[1]||1,fe=z[0]||0;t=(t*9301+49297)%233280;var _e=t/233280;return Math.floor(fe+_e*(me-fe))}}function P(z){var se=Q(z);function le(fe){var _e=fe.toString(16);return _e.length==1?"0"+_e:_e}var me="#"+le(se[0])+le(se[1])+le(se[2]);return me}function F(z,se,le){var me=le[0][0],fe=le[le.length-1][0],_e=le[le.length-1][1],we=le[0][1];i[z]={hueRange:se,lowerBounds:le,saturationRange:[me,fe],brightnessRange:[_e,we]}}function j(){F("monochrome",null,[[0,0],[100,0]]),F("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),F("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),F("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),F("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),F("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),F("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),F("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function Q(z){var se=z[0];se===0&&(se=1),se===360&&(se=359),se=se/360;var le=z[1]/100,me=z[2]/100,fe=Math.floor(se*6),_e=se*6-fe,we=me*(1-le),ke=me*(1-_e*le),je=me*(1-(1-_e)*le),Ie=256,Qe=256,tt=256;switch(fe){case 0:Ie=me,Qe=je,tt=we;break;case 1:Ie=ke,Qe=me,tt=we;break;case 2:Ie=we,Qe=me,tt=je;break;case 3:Ie=we,Qe=ke,tt=me;break;case 4:Ie=je,Qe=we,tt=me;break;case 5:Ie=me,Qe=we,tt=ke;break}var ht=[Math.floor(Ie*255),Math.floor(Qe*255),Math.floor(tt*255)];return ht}function V(z){z=z.replace(/^#/,""),z=z.length===3?z.replace(/(.)/g,"$1$1"):z;var se=parseInt(z.substr(0,2),16)/255,le=parseInt(z.substr(2,2),16)/255,me=parseInt(z.substr(4,2),16)/255,fe=Math.max(se,le,me),_e=fe-Math.min(se,le,me),we=fe?_e/fe:0;switch(fe){case se:return[60*((le-me)/_e%6)||0,we,fe];case le:return[60*((me-se)/_e+2)||0,we,fe];case me:return[60*((se-le)/_e+4)||0,we,fe]}}function H(z){var se=z[0],le=z[1]/100,me=z[2]/100,fe=(2-le)*me;return[se,Math.round(le*me/(fe<1?fe:2-fe)*1e4)/100,fe/2*100]}function G(z){for(var se=0,le=0;le!==z.length&&!(se>=Number.MAX_SAFE_INTEGER);le++)se+=z.charCodeAt(le);return se}function Y(z){if(isNaN(z)){if(typeof z=="string"){if(i[z]){var le=i[z];if(le.hueRange)return le.hueRange}else if(z.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var me=V(z)[0];return _(me).hueRange}}}else{var se=parseInt(z);if(se<360&&se>0)return _(z).hueRange}return[0,360]}return o})})(E2,E2.exports)),E2.exports}var sfe=ofe(),afe=TX(sfe);function lfe(n,e){let t="bright",i;return/water|ocean|lake|sea|river/.test(n)&&(i="blue"),/state|country|place/.test(n)&&(i="pink"),/road|highway|transport|streets/.test(n)&&(i="orange"),/contour|building|earth/.test(n)&&(i="monochrome"),/building/.test(n)&&(t="dark"),/earth/.test(n)&&(t="light"),/contour|landuse/.test(n)&&(i="yellow"),/wood|forest|park|landcover|land|natural/.test(n)&&(i="green"),`rgba(${afe({luminosity:t,hue:i,seed:n,format:"rgbArray"}).join(", ")}, ${e||"1"})`}var ufe={brightColor:lfe};function cfe(n){return n.metadata&&n.metadata["maplibregl-inspect:inspect"]}function Afe(n){return Object.assign(n,{metadata:Object.assign({},n.metadata,{"maplibregl-inspect:inspect":!0})})}class sP{constructor(e){if(this._onSourceChange=i=>{if(i.sourceDataType==="visibility"||!i.isSourceLoaded)return;const r=Object.assign({},this.sources);this._setSourcesFromMap(),!Vde(r,this.sources)&&Object.keys(this.sources).length>0&&setTimeout(()=>this.render(),1e3)},this._onStyleChange=()=>{const i=this._map.getStyle();cfe(i)||(this._originalStyle=i)},this._onRightClick=()=>{!this.options.showMapPopupOnHover&&!this.options.showInspectMapPopupOnHover&&!this.options.blockHoverPopupOnClick&&this._popup&&this._popup.remove()},this._onMousemove=i=>{if(this._showInspectMap){if(!this.options.showInspectMapPopup||i.type==="mousemove"&&!this.options.showInspectMapPopupOnHover)return;i.type==="click"&&this.options.showInspectMapPopupOnHover&&this.options.blockHoverPopupOnClick&&(this._popupBlocked=!this._popupBlocked)}else{if(!this.options.showMapPopup||i.type==="mousemove"&&!this.options.showMapPopupOnHover)return;i.type==="click"&&this.options.showMapPopupOnHover&&this.options.blockHoverPopupOnClick&&(this._popupBlocked=!this._popupBlocked)}if(!this._popupBlocked&&this._popup){let r;this.options.selectThreshold===0?r=i.point:r=[[i.point.x-this.options.selectThreshold,i.point.y+this.options.selectThreshold],[i.point.x+this.options.selectThreshold,i.point.y-this.options.selectThreshold]];const o=this._map.queryRenderedFeatures(r,this.options.queryParameters)||[];if(this._map.getCanvas().style.cursor=o.length?"pointer":"",!o.length)this._popup.remove();else{this._popup.setLngLat(i.lngLat);const s=this.options.renderPopup(o);typeof s=="string"?this._popup.setHTML(s):this._popup.setDOMContent(s),this._popup.addTo(this._map)}}},!(this instanceof sP))throw new Error("MaplibreInspect needs to be called with the new keyword");let t=null;window.maplibregl?t=new window.maplibregl.Popup({closeButton:!1,closeOnClick:!1}):e.popup||console.error("Maplibre GL JS can not be found. Make sure to include it or pass an initialized MaplibreGL Popup to MaplibreInspect if you are using moduleis."),this.options=Object.assign({showInspectMap:!1,showInspectButton:!0,showInspectMapPopup:!0,showMapPopup:!1,showMapPopupOnHover:!0,showInspectMapPopupOnHover:!0,blockHoverPopupOnClick:!1,backgroundColor:"#fff",assignLayerColor:ufe.brightColor,buildInspectStyle:NF.generateInspectStyle,renderPopup:ife,popup:t,selectThreshold:5,useInspectStyle:!0,queryParameters:{},sources:{},toggleCallback(){},manageStyleOutside:!1},e),this.sources=this.options.sources,this.assignLayerColor=this.options.assignLayerColor,this._popup=this.options.popup,this._popupBlocked=!1,this._showInspectMap=this.options.showInspectMap,this._toggle=new Xde({show:this.options.showInspectButton,onToggle:()=>this.toggleInspector()})}toggleInspector(){this._showInspectMap=!this._showInspectMap,this._popupBlocked=!1,this.options.toggleCallback(this._showInspectMap),this.render()}_inspectStyle(){const e=NF.generateColoredLayers(this.sources,this.assignLayerColor);return this.options.buildInspectStyle(this._map.getStyle(),e,{backgroundColor:this.options.backgroundColor})}render(){this._showInspectMap?(this.options.useInspectStyle&&this._map.setStyle(Afe(this._inspectStyle())),this._toggle.setMapIcon()):this._originalStyle&&(this._popup&&this._popup.remove(),this.options.useInspectStyle&&this._map.setStyle(this._originalStyle),this._toggle.setInspectIcon())}_setSourcesFromMap(){const e=Object.keys(this._map.getStyle().sources);Object.keys(this._map.style.sourceCaches).forEach(t=>{const i=this._map.style.sourceCaches[t]||{_source:{}},r=i._source.vectorLayerIds;r?this.sources[t]=r:i._source.type==="geojson"&&(this.sources[t]=[])}),Object.keys(this.sources).forEach(t=>{e.indexOf(t)===-1&&delete this.sources[t]})}setOriginalStyle(e){this._originalStyle=e,this._setSourcesFromMap()}onAdd(e){return this._map=e,Object.keys(this.sources).length===0&&(e.on("tiledata",this._onSourceChange),e.on("sourcedata",this._onSourceChange)),e.on("styledata",this._onStyleChange),e.on("load",this._onStyleChange),e.on("mousemove",this._onMousemove),e.on("click",this._onMousemove),e.on("contextmenu",this._onRightClick),this._toggle.elem}onRemove(){this._map.off("styledata",this._onStyleChange),this._map.off("load",this._onStyleChange),this._map.off("tiledata",this._onSourceChange),this._map.off("sourcedata",this._onSourceChange),this._map.off("mousemove",this._onMousemove),this._map.off("click",this._onMousemove),this._map.off("contextmenu",this._onRightClick);const e=this._toggle.elem;e.parentNode.removeChild(e),this._map=void 0}}var O2={exports:{}},hfe=O2.exports,WF;function dfe(){return WF||(WF=1,(function(n,e){(function(t,i){{var r=i();n&&n.exports&&(e=n.exports=r),e.randomColor=r}})(hfe,function(){var t=null,i={};j();var r=[],o=function(z){if(z=z||{},z.seed!==void 0&&z.seed!==null&&z.seed===parseInt(z.seed,10))t=z.seed;else if(typeof z.seed=="string")t=G(z.seed);else{if(z.seed!==void 0&&z.seed!==null)throw new TypeError("The seed value must be an integer or string");t=null}var se,le,me;if(z.count!==null&&z.count!==void 0){for(var fe=z.count,_e=[],we=0;we<z.count;we++)r.push(!1);for(z.count=null;fe>_e.length;){var ke=o(z);t!==null&&(z.seed=t),_e.push(ke)}return z.count=fe,_e}return se=s(z),le=a(se,z),me=c(se,le,z),A([se,le,me],z)};function s(z){if(r.length>0){var se=Y(z.hue),le=O(se),me=(se[1]-se[0])/r.length,fe=parseInt((le-se[0])/me);r[fe]===!0?fe=(fe+2)%r.length:r[fe]=!0;var _e=(se[0]+fe*me)%359,we=(se[0]+(fe+1)*me)%359;return se=[_e,we],le=O(se),le<0&&(le=360+le),le}else{var se=v(z.hue);return le=O(se),le<0&&(le=360+le),le}}function a(z,se){if(se.hue==="monochrome")return 0;if(se.luminosity==="random")return O([0,100]);var le=x(z),me=le[0],fe=le[1];switch(se.luminosity){case"bright":me=55;break;case"dark":me=fe-10;break;case"light":fe=55;break}return O([me,fe])}function c(z,se,le){var me=m(z,se),fe=100;switch(le.luminosity){case"dark":fe=me+20;break;case"light":me=(fe+me)/2;break;case"random":me=0,fe=100;break}return O([me,fe])}function A(z,se){switch(se.format){case"hsvArray":return z;case"hslArray":return H(z);case"hsl":var le=H(z);return"hsl("+le[0]+", "+le[1]+"%, "+le[2]+"%)";case"hsla":var me=H(z),we=se.alpha||Math.random();return"hsla("+me[0]+", "+me[1]+"%, "+me[2]+"%, "+we+")";case"rgbArray":return Q(z);case"rgb":var fe=Q(z);return"rgb("+fe.join(", ")+")";case"rgba":var _e=Q(z),we=se.alpha||Math.random();return"rgba("+_e.join(", ")+", "+we+")";default:return P(z)}}function m(z,se){for(var le=_(z).lowerBounds,me=0;me<le.length-1;me++){var fe=le[me][0],_e=le[me][1],we=le[me+1][0],ke=le[me+1][1];if(se>=fe&&se<=we){var je=(ke-_e)/(we-fe),Ie=_e-je*fe;return je*se+Ie}}return 0}function v(z){if(typeof parseInt(z)=="number"){var se=parseInt(z);if(se<360&&se>0)return[se,se]}if(typeof z=="string"){if(i[z]){var le=i[z];if(le.hueRange)return le.hueRange}else if(z.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var me=V(z)[0];return[me,me]}}return[0,360]}function x(z){return _(z).saturationRange}function _(z){z>=334&&z<=360&&(z-=360);for(var se in i){var le=i[se];if(le.hueRange&&z>=le.hueRange[0]&&z<=le.hueRange[1])return i[se]}return"Color not found"}function O(z){if(t===null){var se=.618033988749895,le=Math.random();return le+=se,le%=1,Math.floor(z[0]+le*(z[1]+1-z[0]))}else{var me=z[1]||1,fe=z[0]||0;t=(t*9301+49297)%233280;var _e=t/233280;return Math.floor(fe+_e*(me-fe))}}function P(z){var se=Q(z);function le(fe){var _e=fe.toString(16);return _e.length==1?"0"+_e:_e}var me="#"+le(se[0])+le(se[1])+le(se[2]);return me}function F(z,se,le){var me=le[0][0],fe=le[le.length-1][0],_e=le[le.length-1][1],we=le[0][1];i[z]={hueRange:se,lowerBounds:le,saturationRange:[me,fe],brightnessRange:[_e,we]}}function j(){F("monochrome",null,[[0,0],[100,0]]),F("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),F("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),F("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),F("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),F("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),F("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),F("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function Q(z){var se=z[0];se===0&&(se=1),se===360&&(se=359),se=se/360;var le=z[1]/100,me=z[2]/100,fe=Math.floor(se*6),_e=se*6-fe,we=me*(1-le),ke=me*(1-_e*le),je=me*(1-(1-_e)*le),Ie=256,Qe=256,tt=256;switch(fe){case 0:Ie=me,Qe=je,tt=we;break;case 1:Ie=ke,Qe=me,tt=we;break;case 2:Ie=we,Qe=me,tt=je;break;case 3:Ie=we,Qe=ke,tt=me;break;case 4:Ie=je,Qe=we,tt=me;break;case 5:Ie=me,Qe=we,tt=ke;break}var ht=[Math.floor(Ie*255),Math.floor(Qe*255),Math.floor(tt*255)];return ht}function V(z){z=z.replace(/^#/,""),z=z.length===3?z.replace(/(.)/g,"$1$1"):z;var se=parseInt(z.substr(0,2),16)/255,le=parseInt(z.substr(2,2),16)/255,me=parseInt(z.substr(4,2),16)/255,fe=Math.max(se,le,me),_e=fe-Math.min(se,le,me),we=fe?_e/fe:0;switch(fe){case se:return[60*((le-me)/_e%6)||0,we,fe];case le:return[60*((me-se)/_e+2)||0,we,fe];case me:return[60*((se-le)/_e+4)||0,we,fe]}}function H(z){var se=z[0],le=z[1]/100,me=z[2]/100,fe=(2-le)*me;return[se,Math.round(le*me/(fe<1?fe:2-fe)*1e4)/100,fe/2*100]}function G(z){for(var se=0,le=0;le!==z.length&&!(se>=Number.MAX_SAFE_INTEGER);le++)se+=z.charCodeAt(le);return se}function Y(z){if(isNaN(z)){if(typeof z=="string"){if(i[z]){var le=i[z];if(le.hueRange)return le.hueRange}else if(z.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var me=V(z)[0];return _(me).hueRange}}}else{var se=parseInt(z);if(se<360&&se>0)return _(z).hueRange}return[0,360]}return o})})(O2,O2.exports)),O2.exports}var ffe=dfe();const pfe=Wl(ffe);function mfe(n,e){let t="bright",i;return/water|ocean|lake|sea|river/.test(n)&&(i="blue"),/state|country|place/.test(n)&&(i="pink"),/road|highway|transport|streets/.test(n)&&(i="orange"),/contour|building|earth/.test(n)&&(i="monochrome"),/building/.test(n)&&(t="dark"),/earth/.test(n)&&(t="light"),/contour|landuse/.test(n)&&(i="yellow"),/wood|forest|park|landcover|land|natural/.test(n)&&(i="green"),`rgba(${pfe({luminosity:t,hue:i,seed:n,format:"rgbArray"}).join(", ")}, ${e||"1"})`}const RX={brightColor:mfe};function gfe(n){return Lo({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v2h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-2H2a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z"},child:[]}]})(n)}function yfe(n){return Lo({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M6.95.435c.58-.58 1.52-.58 2.1 0l6.515 6.516c.58.58.58 1.519 0 2.098L9.05 15.565c-.58.58-1.519.58-2.098 0L.435 9.05a1.48 1.48 0 0 1 0-2.098z"},child:[]}]})(n)}function vfe(n){return Lo({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0m0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0m9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708"},child:[]}]})(n)}function Kb(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(n)}function bfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"},child:[]}]})(n)}function Cfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"},child:[]}]})(n)}function _fe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},child:[]}]})(n)}function xfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 7h2v2h-2V7zm0 4h2v6h-2v-6zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},child:[]}]})(n)}function Mfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95a15.65 15.65 0 0 0-1.38-3.56A8.03 8.03 0 0 1 18.92 8zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56A7.987 7.987 0 0 1 5.08 16zm2.95-8H5.08a7.987 7.987 0 0 1 4.33-3.56A15.65 15.65 0 0 0 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95a8.03 8.03 0 0 1-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"},child:[]}]})(n)}function wfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6a2 2 0 0 0-2-2zm-7 6-4 4h3v6h2v-6h3l-4-4z"},child:[]}]})(n)}function Sfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"},child:[]}]})(n)}function Efe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 0 0 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},child:[]}]})(n)}function Ofe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},child:[]}]})(n)}function DX(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},child:[]}]})(n)}function Bfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(n)}function p9(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(n)}function Ife(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},child:[]}]})(n)}function kfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"circle",attr:{cx:"7.2",cy:"14.4",r:"3.2"},child:[]},{tag:"circle",attr:{cx:"14.8",cy:"18",r:"2"},child:[]},{tag:"circle",attr:{cx:"15.2",cy:"8.8",r:"4.8"},child:[]}]})(n)}function QF(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z"},child:[]}]})(n)}function Tfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"},child:[]}]})(n)}function qF(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"},child:[]}]})(n)}function Rfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"},child:[]}]})(n)}function Dfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"},child:[]}]})(n)}function Pfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z"},child:[]}]})(n)}function Ufe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C8.13 2 5 5.13 5 9c0 1.74.5 3.37 1.41 4.84.95 1.54 2.2 2.86 3.16 4.4.47.75.81 1.45 1.17 2.26.26.55.47 1.5 1.26 1.5s1-.95 1.25-1.5c.37-.81.7-1.51 1.17-2.26.96-1.53 2.21-2.85 3.16-4.4C18.5 12.37 19 10.74 19 9c0-3.87-3.13-7-7-7zm0 9.75a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z"},child:[]}]})(n)}function Kfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"},child:[]}]})(n)}function PX(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 10 5 5 5-5z"},child:[]}]})(n)}function UX(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 14 5-5 5 5z"},child:[]}]})(n)}function Lfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(n)}function Ffe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(n)}function zfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"19",r:"2"},child:[]},{tag:"path",attr:{d:"M10 3h4v12h-4z"},child:[]}]})(n)}function jfe(n){return Lo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"},child:[]}]})(n)}function Nfe(n){return Lo({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m344 280 88-88m-200 24 64 64M80 320l104-104"},child:[]},{tag:"circle",attr:{cx:"456",cy:"168",r:"24",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"circle",attr:{cx:"320",cy:"304",r:"24",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"circle",attr:{cx:"208",cy:"192",r:"24",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"circle",attr:{cx:"56",cy:"344",r:"24",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]}]})(n)}function Gfe(n){return Lo({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M467.3 168.1c-1.8 0-3.5.3-5.1 1l-177.6 92.1h-.1c-7.6 4.7-12.5 12.5-12.5 21.4v185.9c0 6.4 5.6 11.5 12.7 11.5 2.2 0 4.3-.5 6.1-1.4.2-.1.4-.2.5-.3L466 385.6l.3-.1c8.2-4.5 13.7-12.7 13.7-22.1V179.6c0-6.4-5.7-11.5-12.7-11.5zM454.3 118.5L272.6 36.8S261.9 32 256 32c-5.9 0-16.5 4.8-16.5 4.8L57.6 118.5s-8 3.3-8 9.5c0 6.6 8.3 11.5 8.3 11.5l185.5 97.8c3.8 1.7 8.1 2.6 12.6 2.6 4.6 0 8.9-1 12.7-2.7l185.4-97.9s7.5-4 7.5-11.5c.1-6.3-7.3-9.3-7.3-9.3zM227.5 261.2L49.8 169c-1.5-.6-3.3-1-5.1-1-7 0-12.7 5.1-12.7 11.5v183.8c0 9.4 5.5 17.6 13.7 22.1l.2.1 174.7 92.7c1.9 1.1 4.2 1.7 6.6 1.7 7 0 12.7-5.2 12.7-11.5V282.6c.1-8.9-4.9-16.8-12.4-21.4z"},child:[]}]})(n)}function Wfe(n){return Lo({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M634.92 462.7l-288-448C341.03 5.54 330.89 0 320 0s-21.03 5.54-26.92 14.7l-288 448a32.001 32.001 0 0 0-1.17 32.64A32.004 32.004 0 0 0 32 512h576c11.71 0 22.48-6.39 28.09-16.67a31.983 31.983 0 0 0-1.17-32.63zM320 91.18L405.39 224H320l-64 64-38.06-38.06L320 91.18z"},child:[]}]})(n)}function ca(){var n="/home/runner/work/maputnik/maputnik/src/components/IconLayer.tsx",e="0b6460c942a48f834d2809c818afa5c72625023a",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/IconLayer.tsx",statementMap:{0:{start:{line:7,column:18},end:{line:33,column:1}},1:{start:{line:8,column:20},end:{line:8,column:42}},2:{start:{line:9,column:2},end:{line:32,column:3}},3:{start:{line:11,column:6},end:{line:11,column:61}},4:{start:{line:13,column:6},end:{line:13,column:60}},5:{start:{line:15,column:6},end:{line:15,column:62}},6:{start:{line:17,column:6},end:{line:17,column:63}},7:{start:{line:19,column:6},end:{line:19,column:66}},8:{start:{line:21,column:6},end:{line:21,column:66}},9:{start:{line:23,column:6},end:{line:23,column:59}},10:{start:{line:25,column:6},end:{line:25,column:71}},11:{start:{line:27,column:6},end:{line:27,column:66}},12:{start:{line:29,column:6},end:{line:29,column:61}},13:{start:{line:31,column:6},end:{line:31,column:67}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:18},end:{line:7,column:19}},loc:{start:{line:7,column:29},end:{line:33,column:1}},line:7}},branchMap:{0:{loc:{start:{line:9,column:2},end:{line:32,column:3}},type:"switch",locations:[{start:{line:10,column:4},end:{line:11,column:61}},{start:{line:12,column:4},end:{line:13,column:60}},{start:{line:14,column:4},end:{line:15,column:62}},{start:{line:16,column:4},end:{line:17,column:63}},{start:{line:18,column:4},end:{line:19,column:66}},{start:{line:20,column:4},end:{line:21,column:66}},{start:{line:22,column:4},end:{line:23,column:59}},{start:{line:24,column:4},end:{line:25,column:71}},{start:{line:26,column:4},end:{line:27,column:66}},{start:{line:28,column:4},end:{line:29,column:61}},{start:{line:30,column:4},end:{line:31,column:67}}],line:9}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},f:{0:0},b:{0:[0,0,0,0,0,0,0,0,0,0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconLayer.tsx"],names:[],mappings:"AAkBkC;AAflC,SAAS,QAAQ,eAAe,iBAAiB;AACjD,SAAS,eAAe,UAAU,eAAe,SAAS,sBAAsB;AAChF,SAAS,0BAA0B;AACnC,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAQ3B,MAAM,YAAsC,CAAC,UAAU;AACrD,QAAM,YAAY,EAAE,OAAO,MAAM,MAAM;AACvC,UAAO,MAAM,MAAM;AAAA,IACjB,KAAK;AAAkB,aAAO,oBAAC,YAAU,GAAG,WAAW;AAAA,IACvD,KAAK;AAAU,aAAO,oBAAC,WAAS,GAAG,WAAW;AAAA,IAC9C,KAAK;AAAa,aAAO,oBAAC,aAAW,GAAG,WAAW;AAAA,IACnD,KAAK;AAAgB,aAAO,oBAAC,cAAY,GAAG,WAAW;AAAA,IACvD,KAAK;AAAW,aAAO,oBAAC,iBAAe,GAAG,WAAW;AAAA,IACrD,KAAK;AAAQ,aAAO,oBAAC,iBAAe,GAAG,WAAW;AAAA,IAClD,KAAK;AAAc,aAAO,oBAAC,UAAQ,GAAG,WAAW;AAAA,IACjD,KAAK;AAAQ,aAAO,oBAAC,sBAAoB,GAAG,WAAW;AAAA,IACvD,KAAK;AAAU,aAAO,oBAAC,iBAAe,GAAG,WAAW;AAAA,IACpD,KAAK;AAAU,aAAO,oBAAC,YAAU,GAAG,WAAW;AAAA,IAC/C;AAAS,aAAO,oBAAC,kBAAgB,GAAG,WAAW;AAAA,EACjD;AACF;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"0b6460c942a48f834d2809c818afa5c72625023a"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return ca=function(){return s},s}ca();ca().s[0]++;const KX=n=>{ca().f[0]++;const e=(ca().s[1]++,{style:n.style});switch(ca().s[2]++,n.type){case"fill-extrusion":return ca().b[0][0]++,ca().s[3]++,ie.jsx(Gfe,{...e});case"raster":return ca().b[0][1]++,ca().s[4]++,ie.jsx(Dfe,{...e});case"hillshade":return ca().b[0][2]++,ca().s[5]++,ie.jsx(vfe,{...e});case"color-relief":return ca().b[0][3]++,ca().s[6]++,ie.jsx(Wfe,{...e});case"heatmap":return ca().b[0][4]++,ca().s[7]++,ie.jsx(kfe,{...e});case"fill":return ca().b[0][5]++,ca().s[8]++,ie.jsx(yfe,{...e});case"background":return ca().b[0][6]++,ca().s[9]++,ie.jsx(gfe,{...e});case"line":return ca().b[0][7]++,ca().s[10]++,ie.jsx(Nfe,{...e});case"symbol":return ca().b[0][8]++,ca().s[11]++,ie.jsx(Ufe,{...e});case"circle":return ca().b[0][9]++,ca().s[12]++,ie.jsx(Rfe,{...e});default:return ca().b[0][10]++,ca().s[13]++,ie.jsx(zfe,{...e})}};function _i(){var n="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlLayerPopup.tsx",e="6d83428b3c695d7740365dc3cc3e42bdf4d49028",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlLayerPopup.tsx",statementMap:{0:{start:{line:5,column:18},end:{line:5,column:20}},1:{start:{line:6,column:27},end:{line:6,column:29}},2:{start:{line:7,column:2},end:{line:18,column:5}},3:{start:{line:8,column:22},end:{line:8,column:51}},4:{start:{line:9,column:4},end:{line:17,column:5}},5:{start:{line:10,column:6},end:{line:10,column:43}},6:{start:{line:11,column:28},end:{line:11,column:91}},7:{start:{line:11,column:59},end:{line:11,column:90}},8:{start:{line:12,column:6},end:{line:12,column:65}},9:{start:{line:14,column:6},end:{line:14,column:52}},10:{start:{line:15,column:6},end:{line:15,column:39}},11:{start:{line:16,column:6},end:{line:16,column:45}},12:{start:{line:19,column:2},end:{line:19,column:17}},13:{start:{line:23,column:4},end:{line:25,column:5}},14:{start:{line:24,column:6},end:{line:24,column:13}},15:{start:{line:26,column:4},end:{line:44,column:5}},16:{start:{line:27,column:25},end:{line:27,column:44}},17:{start:{line:28,column:6},end:{line:30,column:7}},18:{start:{line:29,column:8},end:{line:29,column:48}},19:{start:{line:31,column:6},end:{line:33,column:7}},20:{start:{line:32,column:8},end:{line:32,column:48}},21:{start:{line:34,column:6},end:{line:36,column:7}},22:{start:{line:35,column:8},end:{line:35,column:48}},23:{start:{line:37,column:6},end:{line:39,column:7}},24:{start:{line:38,column:8},end:{line:38,column:58}},25:{start:{line:40,column:6},end:{line:40,column:21}},26:{start:{line:42,column:6},end:{line:42,column:63}},27:{start:{line:43,column:6},end:{line:43,column:21}},28:{start:{line:47,column:20},end:{line:47,column:67}},29:{start:{line:48,column:18},end:{line:93,column:6}},30:{start:{line:49,column:21},end:{line:88,column:8}},31:{start:{line:50,column:29},end:{line:50,column:76}},32:{start:{line:51,column:8},end:{line:87,column:10}},33:{start:{line:68,column:20},end:{line:68,column:63}},34:{start:{line:89,column:6},end:{line:92,column:26}},35:{start:{line:94,column:4},end:{line:94,column:152}}},fnMap:{0:{name:"groupFeaturesBySourceLayer",decl:{start:{line:4,column:9},end:{line:4,column:35}},loc:{start:{line:4,column:46},end:{line:20,column:1}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:7,column:19},end:{line:7,column:20}},loc:{start:{line:7,column:32},end:{line:18,column:3}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:11,column:52},end:{line:11,column:53}},loc:{start:{line:11,column:59},end:{line:11,column:90}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:22,column:2},end:{line:22,column:3}},loc:{start:{line:22,column:35},end:{line:45,column:3}},line:22},4:{name:"(anonymous_4)",decl:{start:{line:46,column:2},end:{line:46,column:3}},loc:{start:{line:46,column:11},end:{line:95,column:3}},line:46},5:{name:"(anonymous_5)",decl:{start:{line:48,column:43},end:{line:48,column:44}},loc:{start:{line:48,column:62},end:{line:93,column:5}},line:48},6:{name:"(anonymous_6)",decl:{start:{line:49,column:48},end:{line:49,column:49}},loc:{start:{line:49,column:66},end:{line:88,column:7}},line:49},7:{name:"(anonymous_7)",decl:{start:{line:67,column:27},end:{line:67,column:28}},loc:{start:{line:67,column:33},end:{line:69,column:19}},line:67}},branchMap:{0:{loc:{start:{line:9,column:4},end:{line:17,column:5}},type:"if",locations:[{start:{line:9,column:4},end:{line:17,column:5}},{start:{line:13,column:11},end:{line:17,column:5}}],line:9},1:{loc:{start:{line:14,column:27},end:{line:14,column:51}},type:"binary-expr",locations:[{start:{line:14,column:27},end:{line:14,column:45}},{start:{line:14,column:49},end:{line:14,column:51}}],line:14},2:{loc:{start:{line:23,column:4},end:{line:25,column:5}},type:"if",locations:[{start:{line:23,column:4},end:{line:25,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:23},3:{loc:{start:{line:28,column:6},end:{line:30,column:7}},type:"if",locations:[{start:{line:28,column:6},end:{line:30,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:28},4:{loc:{start:{line:28,column:10},end:{line:28,column:64}},type:"binary-expr",locations:[{start:{line:28,column:10},end:{line:28,column:36}},{start:{line:28,column:40},end:{line:28,column:64}}],line:28},5:{loc:{start:{line:31,column:6},end:{line:33,column:7}},type:"if",locations:[{start:{line:31,column:6},end:{line:33,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:31},6:{loc:{start:{line:31,column:10},end:{line:31,column:64}},type:"binary-expr",locations:[{start:{line:31,column:10},end:{line:31,column:36}},{start:{line:31,column:40},end:{line:31,column:64}}],line:31},7:{loc:{start:{line:34,column:6},end:{line:36,column:7}},type:"if",locations:[{start:{line:34,column:6},end:{line:36,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:34},8:{loc:{start:{line:34,column:10},end:{line:34,column:64}},type:"binary-expr",locations:[{start:{line:34,column:10},end:{line:34,column:36}},{start:{line:34,column:40},end:{line:34,column:64}}],line:34},9:{loc:{start:{line:37,column:6},end:{line:39,column:7}},type:"if",locations:[{start:{line:37,column:6},end:{line:39,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:37},10:{loc:{start:{line:37,column:10},end:{line:37,column:84}},type:"binary-expr",locations:[{start:{line:37,column:10},end:{line:37,column:46}},{start:{line:37,column:50},end:{line:37,column:84}}],line:37},11:{loc:{start:{line:71,column:20},end:{line:75,column:24}},type:"binary-expr",locations:[{start:{line:71,column:20},end:{line:71,column:38}},{start:{line:71,column:58},end:{line:75,column:24}}],line:71},12:{loc:{start:{line:77,column:20},end:{line:80,column:24}},type:"binary-expr",locations:[{start:{line:77,column:20},end:{line:77,column:35}},{start:{line:77,column:55},end:{line:80,column:24}}],line:77}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlLayerPopup.tsx"],names:[],mappings:"AA8EU,cAkBsB,YAlBtB;AA9EV,OAAO,WAAW;AAClB,OAAO,eAAe;AAGtB,SAAS,2BAA2B,UAA4B;AAC9D,QAAM,UAA6C,CAAC;AAEpD,QAAM,mBAA4C,CAAC;AAEnD,WAAS,QAAQ,aAAW;AAC1B,UAAM,YAAY,QAAQ,MAAM,cAAc;AAC9C,QAAG,OAAO,UAAU,eAAe,KAAK,kBAAkB,QAAQ,MAAM,EAAE,GAAG;AAC3E,uBAAiB,QAAQ,MAAM,EAAE;AAEjC,YAAM,gBAAgB,QAAQ,SAAS,EAAE,KAAK,CAAC,MAAsB,EAAE,MAAM,OAAO,QAAQ,MAAM,EAAE;AAEpG,oBAAe,UAAU,iBAAiB,QAAQ,MAAM,EAAE;AAAA,IAC5D,OAAO;AACL,cAAQ,SAAS,IAAI,QAAQ,SAAS,KAAK,CAAC;AAC5C,cAAQ,SAAS,EAAE,KAAK,OAAO;AAE/B,uBAAiB,QAAQ,MAAM,EAAE,IAAI;AAAA,IACvC;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAQA,MAAM,0BAA0B,MAAM,UAAkC;AAAA,EACtE,iBAAiB,SAAyB,OAAgB;AAExD,QAAI,CAAC,QAAQ,MAAM,OAAO;AACxB;AAAA,IACF;AAEA,QAAI;AACF,YAAM,aAAa,QAAQ,MAAM;AAEjC,UAAG,gBAAgB,cAAc,WAAW,YAAY,GAAG;AACzD,eAAO,OAAO,WAAW,YAAY,CAAC;AAAA,MACxC;AACA,UAAI,gBAAgB,cAAc,WAAW,YAAY,GAAG;AAC1D,eAAO,OAAO,WAAW,YAAY,CAAC;AAAA,MACxC;AACA,UAAI,gBAAgB,cAAc,WAAW,YAAY,GAAG;AAC1D,eAAO,OAAO,WAAW,YAAY,CAAC;AAAA,MACxC;AACA,UAAI,0BAA0B,cAAc,WAAW,sBAAsB,GAAG;AAC9E,eAAO,OAAO,WAAW,sBAAsB,CAAC;AAAA,MAClD;AAEA,aAAO;AAAA,IACT,SAGO,KAAK;AACV,cAAQ,KAAK,uCAAuC,GAAG;AACvD,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,UAAU,2BAA2B,KAAK,MAAM,QAAQ;AAE9D,UAAM,QAAQ,OAAO,KAAK,OAAO,EAAE,IAAI,mBAAiB;AACtD,YAAM,SAAS,QAAQ,aAAa,EAAE,IAAI,CAAC,SAAyB,QAAgB;AAClF,cAAM,eAAe,KAAK,iBAAiB,SAAS,KAAK,MAAM,IAAI;AAEnE,eAAO;AAAA,UAAC;AAAA;AAAA,YAEN,WAAU;AAAA,YAEV;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,OAAO,EAAC,YAAY,aAAY;AAAA;AAAA,cACjC;AAAA,cACD;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,SAAS,MAAM;AACb,yBAAK,MAAM,cAAc,QAAQ,MAAM,EAAE;AAAA,kBAC3C;AAAA,kBAEC;AAAA,4BAAQ,MAAM,QACb,oBAAC,aAAU,MAAM,QAAQ,MAAM,MAAM,OAAO;AAAA,sBAC1C,OAAO;AAAA,sBACP,QAAQ;AAAA,sBACR,cAAc;AAAA,oBAChB,GAAE;AAAA,oBAEH,QAAQ,MAAM;AAAA,oBACd,QAAQ,WAAW,qBAAC,UAAK;AAAA;AAAA,sBAAI,QAAQ;AAAA,uBAAQ;AAAA;AAAA;AAAA,cAChD;AAAA;AAAA;AAAA,UAtBK;AAAA,QAuBP;AAAA,MACF,CAAC;AACD,aAAO,qBAAC,SACN;AAAA,4BAAC,SAAI,WAAU,2BAA2B,yBAAc;AAAA,QACvD;AAAA,WAFc,aAGjB;AAAA,IACF,CAAC;AAED,WAAO,oBAAC,SAAI,WAAU,gCAA+B,eAAY,uBAAsB,KAAI,OACxF,iBACH;AAAA,EACF;AACF;AAGA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6d83428b3c695d7740365dc3cc3e42bdf4d49028"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return _i=function(){return s},s}_i();function Qfe(n){_i().f[0]++;const e=(_i().s[0]++,{}),t=(_i().s[1]++,{});return _i().s[2]++,n.forEach(i=>{_i().f[1]++;const r=(_i().s[3]++,i.layer["source-layer"]);if(_i().s[4]++,Object.prototype.hasOwnProperty.call(t,i.layer.id)){_i().b[0][0]++,_i().s[5]++,t[i.layer.id]++;const o=(_i().s[6]++,e[r].find(s=>(_i().f[2]++,_i().s[7]++,s.layer.id===i.layer.id)));_i().s[8]++,o.counter=t[i.layer.id]}else _i().b[0][1]++,_i().s[9]++,e[r]=(_i().b[1][0]++,e[r]||(_i().b[1][1]++,[])),_i().s[10]++,e[r].push(i),_i().s[11]++,t[i.layer.id]=1}),_i().s[12]++,e}class LX extends En.Component{_getFeatureColor(e,t){if(_i().f[3]++,_i().s[13]++,e.layer.paint)_i().b[2][1]++;else{_i().b[2][0]++,_i().s[14]++;return}_i().s[15]++;try{const i=(_i().s[16]++,e.layer.paint);return _i().s[17]++,_i().b[4][0]++,"text-color"in i&&(_i().b[4][1]++,i["text-color"])?(_i().b[3][0]++,_i().s[18]++,String(i["text-color"])):(_i().b[3][1]++,_i().s[19]++,_i().b[6][0]++,"fill-color"in i&&(_i().b[6][1]++,i["fill-color"])?(_i().b[5][0]++,_i().s[20]++,String(i["fill-color"])):(_i().b[5][1]++,_i().s[21]++,_i().b[8][0]++,"line-color"in i&&(_i().b[8][1]++,i["line-color"])?(_i().b[7][0]++,_i().s[22]++,String(i["line-color"])):(_i().b[7][1]++,_i().s[23]++,_i().b[10][0]++,"fill-extrusion-color"in i&&(_i().b[10][1]++,i["fill-extrusion-color"])?(_i().b[9][0]++,_i().s[24]++,String(i["fill-extrusion-color"])):(_i().b[9][1]++,_i().s[25]++,"black"))))}catch(i){return _i().s[26]++,console.warn("Unable to get feature color, error:",i),_i().s[27]++,"black"}}render(){_i().f[4]++;const e=(_i().s[28]++,Qfe(this.props.features)),t=(_i().s[29]++,Object.keys(e).map(i=>{_i().f[5]++;const r=(_i().s[30]++,e[i].map((o,s)=>{_i().f[6]++;const a=(_i().s[31]++,this._getFeatureColor(o,this.props.zoom));return _i().s[32]++,ie.jsxs("div",{className:"maputnik-popup-layer",children:[ie.jsx("div",{className:"maputnik-popup-layer__swatch",style:{background:a}}),ie.jsxs("label",{className:"maputnik-popup-layer__label",onClick:()=>{_i().f[7]++,_i().s[33]++,this.props.onLayerSelect(o.layer.id)},children:[(_i().b[11][0]++,o.layer.type&&(_i().b[11][1]++,ie.jsx(KX,{type:o.layer.type,style:{width:14,height:14,paddingRight:3}}))),o.layer.id,(_i().b[12][0]++,o.counter&&(_i().b[12][1]++,ie.jsxs("span",{children:[" × ",o.counter]})))]})]},s)}));return _i().s[34]++,ie.jsxs("div",{children:[ie.jsx("div",{className:"maputnik-popup-layer-id",children:i}),r]},i)}));return _i().s[35]++,ie.jsx("div",{className:"maputnik-feature-layer-popup","data-wd-key":"feature-layer-popup",dir:"ltr",children:t})}}function mr(){var n="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlFeaturePropertyPopup.tsx",e="1e4c480681bcaba84c2c41960b73ded2066b54bc",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlFeaturePropertyPopup.tsx",statementMap:{0:{start:{line:4,column:2},end:{line:4,column:67}},1:{start:{line:4,column:54},end:{line:4,column:67}},2:{start:{line:5,column:2},end:{line:5,column:59}},3:{start:{line:5,column:29},end:{line:5,column:59}},4:{start:{line:6,column:2},end:{line:6,column:115}},5:{start:{line:6,column:91},end:{line:6,column:115}},6:{start:{line:7,column:2},end:{line:7,column:15}},7:{start:{line:10,column:2},end:{line:13,column:12}},8:{start:{line:16,column:2},end:{line:32,column:12}},9:{start:{line:29,column:23},end:{line:29,column:55}},10:{start:{line:30,column:6},end:{line:30,column:74}},11:{start:{line:35,column:25},end:{line:35,column:27}},12:{start:{line:36,column:2},end:{line:49,column:5}},13:{start:{line:37,column:25},end:{line:39,column:6}},14:{start:{line:38,column:6},end:{line:38,column:156}},15:{start:{line:40,column:4},end:{line:48,column:5}},16:{start:{line:41,column:6},end:{line:41,column:35}},17:{start:{line:43,column:6},end:{line:47,column:7}},18:{start:{line:44,column:8},end:{line:44,column:58}},19:{start:{line:46,column:8},end:{line:46,column:60}},20:{start:{line:50,column:2},end:{line:50,column:24}},21:{start:{line:54,column:21},end:{line:54,column:66}},22:{start:{line:55,column:4},end:{line:55,column:303}}},fnMap:{0:{name:"displayValue",decl:{start:{line:3,column:9},end:{line:3,column:21}},loc:{start:{line:3,column:29},end:{line:8,column:1}},line:3},1:{name:"renderKeyValueTableRow",decl:{start:{line:9,column:9},end:{line:9,column:31}},loc:{start:{line:9,column:44},end:{line:14,column:1}},line:9},2:{name:"renderFeature",decl:{start:{line:15,column:9},end:{line:15,column:22}},loc:{start:{line:15,column:37},end:{line:33,column:1}},line:15},3:{name:"(anonymous_3)",decl:{start:{line:28,column:40},end:{line:28,column:41}},loc:{start:{line:28,column:58},end:{line:31,column:5}},line:28},4:{name:"removeDuplicatedFeatures",decl:{start:{line:34,column:9},end:{line:34,column:33}},loc:{start:{line:34,column:44},end:{line:51,column:1}},line:34},5:{name:"(anonymous_5)",decl:{start:{line:36,column:19},end:{line:36,column:20}},loc:{start:{line:36,column:32},end:{line:49,column:3}},line:36},6:{name:"(anonymous_6)",decl:{start:{line:37,column:50},end:{line:37,column:51}},loc:{start:{line:37,column:64},end:{line:39,column:5}},line:37},7:{name:"(anonymous_7)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:11},end:{line:56,column:3}},line:53}},branchMap:{0:{loc:{start:{line:4,column:2},end:{line:4,column:67}},type:"if",locations:[{start:{line:4,column:2},end:{line:4,column:67}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:4},1:{loc:{start:{line:4,column:6},end:{line:4,column:52}},type:"binary-expr",locations:[{start:{line:4,column:6},end:{line:4,column:34}},{start:{line:4,column:38},end:{line:4,column:52}}],line:4},2:{loc:{start:{line:5,column:2},end:{line:5,column:59}},type:"if",locations:[{start:{line:5,column:2},end:{line:5,column:59}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:5},3:{loc:{start:{line:6,column:2},end:{line:6,column:115}},type:"if",locations:[{start:{line:6,column:2},end:{line:6,column:115}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:6},4:{loc:{start:{line:6,column:6},end:{line:6,column:89}},type:"binary-expr",locations:[{start:{line:6,column:6},end:{line:6,column:31}},{start:{line:6,column:35},end:{line:6,column:60}},{start:{line:6,column:64},end:{line:6,column:89}}],line:6},5:{loc:{start:{line:21,column:6},end:{line:24,column:10}},type:"binary-expr",locations:[{start:{line:21,column:6},end:{line:21,column:32}},{start:{line:21,column:52},end:{line:24,column:10}}],line:21},6:{loc:{start:{line:38,column:13},end:{line:38,column:155}},type:"binary-expr",locations:[{start:{line:38,column:13},end:{line:38,column:77}},{start:{line:38,column:81},end:{line:38,column:155}}],line:38},7:{loc:{start:{line:40,column:4},end:{line:48,column:5}},type:"if",locations:[{start:{line:40,column:4},end:{line:48,column:5}},{start:{line:42,column:11},end:{line:48,column:5}}],line:40},8:{loc:{start:{line:43,column:6},end:{line:47,column:7}},type:"if",locations:[{start:{line:43,column:6},end:{line:47,column:7}},{start:{line:45,column:13},end:{line:47,column:7}}],line:43}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlFeaturePropertyPopup.tsx"],names:[],mappings:"AAkBS,SACL,KADK;AAlBT,OAAO,WAAW;AAQlB,SAAS,aAAa,OAAoD;AACxE,MAAI,OAAO,UAAU,eAAe,UAAU,KAAM,QAAO;AAC3D,MAAI,iBAAiB,KAAM,QAAO,MAAM,eAAe;AACvD,MAAI,OAAO,UAAU,YACb,OAAO,UAAU,YACjB,OAAO,UAAU,SAAU,QAAO,MAAM,SAAS;AACzD,SAAO;AACT;AAEA,SAAS,uBAAuB,KAAa,OAA2B;AACtE,SAAO,qBAAC,QACN;AAAA,wBAAC,QAAG,WAAU,6BAA6B,eAAI;AAAA,IAC/C,oBAAC,QAAG,WAAU,6BAA6B,iBAAM;AAAA,OAFnC,GAGhB;AACF;AAEA,SAAS,cAAc,SAAyB,KAAa;AAC3D,SAAO,qBAAC,MAAM,UAAN,EACN;AAAA,wBAAC,QACC,+BAAC,QAAG,SAAS,GAAG,WAAU,2BAA2B;AAAA,cAAQ,MAAM,QAAQ;AAAA,MAAE;AAAA,MAAG,QAAQ,MAAM,cAAc;AAAA,MAAG,QAAQ,sBAAsB,qBAAC,UAAK;AAAA;AAAA,QAAI,QAAQ;AAAA,SAAmB;AAAA,OAAQ,GAC5L;AAAA,IACC,uBAAuB,SAAS,QAAQ,SAAS,IAAI;AAAA,IACrD,uBAAuB,OAAO,aAAa,QAAQ,EAAE,CAAC;AAAA,IACtD,OAAO,KAAK,QAAQ,UAAU,EAAE,IAAI,kBAAgB;AACnD,YAAM,WAAW,QAAQ,WAAW,YAAY;AAChD,aAAO,uBAAuB,cAAc,aAAa,QAAQ,CAAC;AAAA,IACpE,CAAC;AAAA,OATyB,GAU5B;AACF;AAEA,SAAS,yBAAyB,UAA4B;AAC5D,QAAM,iBAAmC,CAAC;AAE1C,WAAS,QAAQ,aAAW;AAC1B,UAAM,eAAe,eAAe,UAAU,cAAY;AACxD,aAAO,QAAQ,MAAM,cAAc,MAAM,SAAS,MAAM,cAAc,KACjE,KAAK,UAAU,QAAQ,UAAU,MAAM,KAAK,UAAU,SAAS,UAAU;AAAA,IAChF,CAAC;AAED,QAAG,iBAAiB,IAAI;AACtB,qBAAe,KAAK,OAAO;AAAA,IAC7B,OAAO;AACL,UAAG,wBAAwB,eAAe,YAAY,GAAG;AACvD,uBAAe,YAAY,EAAE;AAAA,MAC/B,OAAO;AACL,uBAAe,YAAY,EAAE,qBAAqB;AAAA,MACpD;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAMA,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,SAAS;AACP,UAAM,WAAW,yBAAyB,KAAK,MAAM,QAAQ;AAC7D,WAAO,oBAAC,SAAI,WAAU,mCAAkC,KAAI,OAAM,eAAY,0BAC5E,8BAAC,WAAM,WAAU,wBACf,8BAAC,WACE,mBAAS,IAAI,aAAa,GAC7B,GACF,GACF;AAAA,EACF;AACF;AAGA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1e4c480681bcaba84c2c41960b73ded2066b54bc"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return mr=function(){return s},s}mr();function YF(n){return mr().f[0]++,mr().s[0]++,mr().b[1][0]++,typeof n>"u"||(mr().b[1][1]++,n===null)?(mr().b[0][0]++,mr().s[1]++,n):(mr().b[0][1]++,mr().s[2]++,n instanceof Date?(mr().b[2][0]++,mr().s[3]++,n.toLocaleString()):(mr().b[2][1]++,mr().s[4]++,mr().b[4][0]++,typeof n=="object"||(mr().b[4][1]++,typeof n=="number")||(mr().b[4][2]++,typeof n=="string")?(mr().b[3][0]++,mr().s[5]++,n.toString()):(mr().b[3][1]++,mr().s[6]++,n)))}function pO(n,e){return mr().f[1]++,mr().s[7]++,ie.jsxs("tr",{children:[ie.jsx("td",{className:"maputnik-popup-table-cell",children:n}),ie.jsx("td",{className:"maputnik-popup-table-cell",children:e})]},n)}function qfe(n,e){return mr().f[2]++,mr().s[8]++,ie.jsxs(En.Fragment,{children:[ie.jsx("tr",{children:ie.jsxs("td",{colSpan:2,className:"maputnik-popup-layer-id",children:[n.layer.source,": ",n.layer["source-layer"],(mr().b[5][0]++,n.inspectModeCounter&&(mr().b[5][1]++,ie.jsxs("span",{children:[" × ",n.inspectModeCounter]})))]})}),pO("$type",n.geometry.type),pO("$id",YF(n.id)),Object.keys(n.properties).map(t=>{mr().f[3]++;const i=(mr().s[9]++,n.properties[t]);return mr().s[10]++,pO(t,YF(i))})]},e)}function Yfe(n){mr().f[4]++;const e=(mr().s[11]++,[]);return mr().s[12]++,n.forEach(t=>{mr().f[5]++;const i=(mr().s[13]++,e.findIndex(r=>(mr().f[6]++,mr().s[14]++,mr().b[6][0]++,t.layer["source-layer"]===r.layer["source-layer"]&&(mr().b[6][1]++,JSON.stringify(t.properties)===JSON.stringify(r.properties)))));mr().s[15]++,i===-1?(mr().b[7][0]++,mr().s[16]++,e.push(t)):(mr().b[7][1]++,mr().s[17]++,"inspectModeCounter"in e[i]?(mr().b[8][0]++,mr().s[18]++,e[i].inspectModeCounter++):(mr().b[8][1]++,mr().s[19]++,e[i].inspectModeCounter=2))}),mr().s[20]++,e}class $fe extends En.Component{render(){mr().f[7]++;const e=(mr().s[21]++,Yfe(this.props.features));return mr().s[22]++,ie.jsx("div",{className:"maputnik-feature-property-popup",dir:"ltr","data-wd-key":"feature-property-popup",children:ie.jsx("table",{className:"maputnik-popup-table",children:ie.jsx("tbody",{children:e.map(qfe)})})})}}const J2={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]},FX=Object.create(null);for(const n in J2)Object.hasOwn(J2,n)&&(FX[J2[n]]=n);const oc={to:{},get:{}};oc.get=function(n){const e=n.slice(0,3).toLowerCase();let t,i;switch(e){case"hsl":{t=oc.get.hsl(n),i="hsl";break}case"hwb":{t=oc.get.hwb(n),i="hwb";break}default:{t=oc.get.rgb(n),i="rgb";break}}return t?{model:i,value:t}:null};oc.get.rgb=function(n){if(!n)return null;const e=/^#([a-f\d]{3,4})$/i,t=/^#([a-f\d]{6})([a-f\d]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,r=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,o=/^(\w+)$/;let s=[0,0,0,1],a,c,A;if(a=n.match(t)){for(A=a[2],a=a[1],c=0;c<3;c++){const m=c*2;s[c]=Number.parseInt(a.slice(m,m+2),16)}A&&(s[3]=Number.parseInt(A,16)/255)}else if(a=n.match(e)){for(a=a[1],A=a[3],c=0;c<3;c++)s[c]=Number.parseInt(a[c]+a[c],16);A&&(s[3]=Number.parseInt(A+A,16)/255)}else if(a=n.match(i)){for(c=0;c<3;c++)s[c]=Number.parseInt(a[c+1],10);a[4]&&(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=n.match(r)){for(c=0;c<3;c++)s[c]=Math.round(Number.parseFloat(a[c+1])*2.55);a[4]&&(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=n.match(o))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn(J2,a[1])?(s=J2[a[1]],s[3]=1,s):null:null;for(c=0;c<3;c++)s[c]=Fy(s[c],0,255);return s[3]=Fy(s[3],0,1),s};oc.get.hsl=function(n){if(!n)return null;const e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,t=n.match(e);if(t){const i=Number.parseFloat(t[4]),r=(Number.parseFloat(t[1])%360+360)%360,o=Fy(Number.parseFloat(t[2]),0,100),s=Fy(Number.parseFloat(t[3]),0,100),a=Fy(Number.isNaN(i)?1:i,0,1);return[r,o,s,a]}return null};oc.get.hwb=function(n){if(!n)return null;const e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,t=n.match(e);if(t){const i=Number.parseFloat(t[4]),r=(Number.parseFloat(t[1])%360+360)%360,o=Fy(Number.parseFloat(t[2]),0,100),s=Fy(Number.parseFloat(t[3]),0,100),a=Fy(Number.isNaN(i)?1:i,0,1);return[r,o,s,a]}return null};oc.to.hex=function(...n){return"#"+BM(n[0])+BM(n[1])+BM(n[2])+(n[3]<1?BM(Math.round(n[3]*255)):"")};oc.to.rgb=function(...n){return n.length<4||n[3]===1?"rgb("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+")":"rgba("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+", "+n[3]+")"};oc.to.rgb.percent=function(...n){const e=Math.round(n[0]/255*100),t=Math.round(n[1]/255*100),i=Math.round(n[2]/255*100);return n.length<4||n[3]===1?"rgb("+e+"%, "+t+"%, "+i+"%)":"rgba("+e+"%, "+t+"%, "+i+"%, "+n[3]+")"};oc.to.hsl=function(...n){return n.length<4||n[3]===1?"hsl("+n[0]+", "+n[1]+"%, "+n[2]+"%)":"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+n[3]+")"};oc.to.hwb=function(...n){let e="";return n.length>=4&&n[3]!==1&&(e=", "+n[3]),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+e+")"};oc.to.keyword=function(...n){return FX[n.slice(0,3)]};function Fy(n,e,t){return Math.min(Math.max(e,n),t)}function BM(n){const e=Math.round(n).toString(16).toUpperCase();return e.length<2?"0"+e:e}const I3={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]},zX={};for(const n of Object.keys(I3))zX[I3[n]]=n;const bi={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},Q0=(6/29)**3;function I_(n){const e=n>.0031308?1.055*n**.4166666666666667-.055:n*12.92;return Math.min(Math.max(0,e),1)}function k_(n){return n>.04045?((n+.055)/1.055)**2.4:n/12.92}for(const n of Object.keys(bi)){if(!("channels"in bi[n]))throw new Error("missing channels property: "+n);if(!("labels"in bi[n]))throw new Error("missing channel labels property: "+n);if(bi[n].labels.length!==bi[n].channels)throw new Error("channel and label counts mismatch: "+n);const{channels:e,labels:t}=bi[n];delete bi[n].channels,delete bi[n].labels,Object.defineProperty(bi[n],"channels",{value:e}),Object.defineProperty(bi[n],"labels",{value:t})}bi.rgb.hsl=function(n){const e=n[0]/255,t=n[1]/255,i=n[2]/255,r=Math.min(e,t,i),o=Math.max(e,t,i),s=o-r;let a,c;switch(o){case r:{a=0;break}case e:{a=(t-i)/s;break}case t:{a=2+(i-e)/s;break}case i:{a=4+(e-t)/s;break}}a=Math.min(a*60,360),a<0&&(a+=360);const A=(r+o)/2;return o===r?c=0:A<=.5?c=s/(o+r):c=s/(2-o-r),[a,c*100,A*100]};bi.rgb.hsv=function(n){let e,t,i,r,o;const s=n[0]/255,a=n[1]/255,c=n[2]/255,A=Math.max(s,a,c),m=A-Math.min(s,a,c),v=function(x){return(A-x)/6/m+1/2};if(m===0)r=0,o=0;else{switch(o=m/A,e=v(s),t=v(a),i=v(c),A){case s:{r=i-t;break}case a:{r=1/3+e-i;break}case c:{r=2/3+t-e;break}}r<0?r+=1:r>1&&(r-=1)}return[r*360,o*100,A*100]};bi.rgb.hwb=function(n){const e=n[0],t=n[1];let i=n[2];const r=bi.rgb.hsl(n)[0],o=1/255*Math.min(e,Math.min(t,i));return i=1-1/255*Math.max(e,Math.max(t,i)),[r,o*100,i*100]};bi.rgb.oklab=function(n){const e=k_(n[0]/255),t=k_(n[1]/255),i=k_(n[2]/255),r=Math.cbrt(.4122214708*e+.5363325363*t+.0514459929*i),o=Math.cbrt(.2119034982*e+.6806995451*t+.1073969566*i),s=Math.cbrt(.0883024619*e+.2817188376*t+.6299787005*i),a=.2104542553*r+.793617785*o-.0040720468*s,c=1.9779984951*r-2.428592205*o+.4505937099*s,A=.0259040371*r+.7827717662*o-.808675766*s;return[a*100,c*100,A*100]};bi.rgb.cmyk=function(n){const e=n[0]/255,t=n[1]/255,i=n[2]/255,r=Math.min(1-e,1-t,1-i),o=(1-e-r)/(1-r)||0,s=(1-t-r)/(1-r)||0,a=(1-i-r)/(1-r)||0;return[o*100,s*100,a*100,r*100]};function Vfe(n,e){return(n[0]-e[0])**2+(n[1]-e[1])**2+(n[2]-e[2])**2}bi.rgb.keyword=function(n){const e=zX[n];if(e)return e;let t=Number.POSITIVE_INFINITY,i;for(const r of Object.keys(I3)){const o=I3[r],s=Vfe(n,o);s<t&&(t=s,i=r)}return i};bi.keyword.rgb=function(n){return I3[n]};bi.rgb.xyz=function(n){const e=k_(n[0]/255),t=k_(n[1]/255),i=k_(n[2]/255),r=e*.4124564+t*.3575761+i*.1804375,o=e*.2126729+t*.7151522+i*.072175,s=e*.0193339+t*.119192+i*.9503041;return[r*100,o*100,s*100]};bi.rgb.lab=function(n){const e=bi.rgb.xyz(n);let t=e[0],i=e[1],r=e[2];t/=95.047,i/=100,r/=108.883,t=t>Q0?t**(1/3):7.787*t+16/116,i=i>Q0?i**(1/3):7.787*i+16/116,r=r>Q0?r**(1/3):7.787*r+16/116;const o=116*i-16,s=500*(t-i),a=200*(i-r);return[o,s,a]};bi.hsl.rgb=function(n){const e=n[0]/360,t=n[1]/100,i=n[2]/100;let r,o;if(t===0)return o=i*255,[o,o,o];const s=i<.5?i*(1+t):i+t-i*t,a=2*i-s,c=[0,0,0];for(let A=0;A<3;A++)r=e+1/3*-(A-1),r<0&&r++,r>1&&r--,6*r<1?o=a+(s-a)*6*r:2*r<1?o=s:3*r<2?o=a+(s-a)*(2/3-r)*6:o=a,c[A]=o*255;return c};bi.hsl.hsv=function(n){const e=n[0];let t=n[1]/100,i=n[2]/100,r=t;const o=Math.max(i,.01);i*=2,t*=i<=1?i:2-i,r*=o<=1?o:2-o;const s=(i+t)/2,a=i===0?2*r/(o+r):2*t/(i+t);return[e,a*100,s*100]};bi.hsv.rgb=function(n){const e=n[0]/60,t=n[1]/100;let i=n[2]/100;const r=Math.floor(e)%6,o=e-Math.floor(e),s=255*i*(1-t),a=255*i*(1-t*o),c=255*i*(1-t*(1-o));switch(i*=255,r){case 0:return[i,c,s];case 1:return[a,i,s];case 2:return[s,i,c];case 3:return[s,a,i];case 4:return[c,s,i];case 5:return[i,s,a]}};bi.hsv.hsl=function(n){const e=n[0],t=n[1]/100,i=n[2]/100,r=Math.max(i,.01);let o,s;s=(2-t)*i;const a=(2-t)*r;return o=t*r,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};bi.hwb.rgb=function(n){const e=n[0]/360;let t=n[1]/100,i=n[2]/100;const r=t+i;let o;r>1&&(t/=r,i/=r);const s=Math.floor(6*e),a=1-i;o=6*e-s,(s&1)!==0&&(o=1-o);const c=t+o*(a-t);let A,m,v;switch(s){default:case 6:case 0:{A=a,m=c,v=t;break}case 1:{A=c,m=a,v=t;break}case 2:{A=t,m=a,v=c;break}case 3:{A=t,m=c,v=a;break}case 4:{A=c,m=t,v=a;break}case 5:{A=a,m=t,v=c;break}}return[A*255,m*255,v*255]};bi.cmyk.rgb=function(n){const e=n[0]/100,t=n[1]/100,i=n[2]/100,r=n[3]/100,o=1-Math.min(1,e*(1-r)+r),s=1-Math.min(1,t*(1-r)+r),a=1-Math.min(1,i*(1-r)+r);return[o*255,s*255,a*255]};bi.xyz.rgb=function(n){const e=n[0]/100,t=n[1]/100,i=n[2]/100;let r,o,s;return r=e*3.2404542+t*-1.5371385+i*-.4985314,o=e*-.969266+t*1.8760108+i*.041556,s=e*.0556434+t*-.2040259+i*1.0572252,r=I_(r),o=I_(o),s=I_(s),[r*255,o*255,s*255]};bi.xyz.lab=function(n){let e=n[0],t=n[1],i=n[2];e/=95.047,t/=100,i/=108.883,e=e>Q0?e**(1/3):7.787*e+16/116,t=t>Q0?t**(1/3):7.787*t+16/116,i=i>Q0?i**(1/3):7.787*i+16/116;const r=116*t-16,o=500*(e-t),s=200*(t-i);return[r,o,s]};bi.xyz.oklab=function(n){const e=n[0]/100,t=n[1]/100,i=n[2]/100,r=Math.cbrt(.8189330101*e+.3618667424*t-.1288597137*i),o=Math.cbrt(.0329845436*e+.9293118715*t+.0361456387*i),s=Math.cbrt(.0482003018*e+.2643662691*t+.633851707*i),a=.2104542553*r+.793617785*o-.0040720468*s,c=1.9779984951*r-2.428592205*o+.4505937099*s,A=.0259040371*r+.7827717662*o-.808675766*s;return[a*100,c*100,A*100]};bi.oklab.oklch=function(n){return bi.lab.lch(n)};bi.oklab.xyz=function(n){const e=n[0]/100,t=n[1]/100,i=n[2]/100,r=(.999999998*e+.396337792*t+.215803758*i)**3,o=(1.000000008*e-.105561342*t-.063854175*i)**3,s=(1.000000055*e-.089484182*t-1.291485538*i)**3,a=1.227013851*r-.55779998*o+.281256149*s,c=-.040580178*r+1.11225687*o-.071676679*s,A=-.076381285*r-.421481978*o+1.58616322*s;return[a*100,c*100,A*100]};bi.oklab.rgb=function(n){const e=n[0]/100,t=n[1]/100,i=n[2]/100,r=(e+.3963377774*t+.2158037573*i)**3,o=(e-.1055613458*t-.0638541728*i)**3,s=(e-.0894841775*t-1.291485548*i)**3,a=I_(4.0767416621*r-3.3077115913*o+.2309699292*s),c=I_(-1.2684380046*r+2.6097574011*o-.3413193965*s),A=I_(-.0041960863*r-.7034186147*o+1.707614701*s);return[a*255,c*255,A*255]};bi.oklch.oklab=function(n){return bi.lch.lab(n)};bi.lab.xyz=function(n){const e=n[0],t=n[1],i=n[2];let r,o,s;o=(e+16)/116,r=t/500+o,s=o-i/200;const a=o**3,c=r**3,A=s**3;return o=a>Q0?a:(o-16/116)/7.787,r=c>Q0?c:(r-16/116)/7.787,s=A>Q0?A:(s-16/116)/7.787,r*=95.047,o*=100,s*=108.883,[r,o,s]};bi.lab.lch=function(n){const e=n[0],t=n[1],i=n[2];let r;r=Math.atan2(i,t)*360/2/Math.PI,r<0&&(r+=360);const s=Math.sqrt(t*t+i*i);return[e,s,r]};bi.lch.lab=function(n){const e=n[0],t=n[1],r=n[2]/360*2*Math.PI,o=t*Math.cos(r),s=t*Math.sin(r);return[e,o,s]};bi.rgb.ansi16=function(n,e=null){const[t,i,r]=n;let o=e===null?bi.rgb.hsv(n)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(r/255)<<2|Math.round(i/255)<<1|Math.round(t/255));return o===2&&(s+=60),s};bi.hsv.ansi16=function(n){return bi.rgb.ansi16(bi.hsv.rgb(n),n[2])};bi.rgb.ansi256=function(n){const e=n[0],t=n[1],i=n[2];return e>>4===t>>4&&t>>4===i>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5)};bi.ansi16.rgb=function(n){n=n[0];let e=n%10;if(e===0||e===7)return n>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const t=(Math.trunc(n>50)+1)*.5,i=(e&1)*t*255,r=(e>>1&1)*t*255,o=(e>>2&1)*t*255;return[i,r,o]};bi.ansi256.rgb=function(n){if(n=n[0],n>=232){const o=(n-232)*10+8;return[o,o,o]}n-=16;let e;const t=Math.floor(n/36)/5*255,i=Math.floor((e=n%36)/6)/5*255,r=e%6/5*255;return[t,i,r]};bi.rgb.hex=function(n){const t=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".slice(t.length)+t};bi.hex.rgb=function(n){const e=n.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let t=e[0];e[0].length===3&&(t=[...t].map(a=>a+a).join(""));const i=Number.parseInt(t,16),r=i>>16&255,o=i>>8&255,s=i&255;return[r,o,s]};bi.rgb.hcg=function(n){const e=n[0]/255,t=n[1]/255,i=n[2]/255,r=Math.max(Math.max(e,t),i),o=Math.min(Math.min(e,t),i),s=r-o;let a;const c=s<1?o/(1-s):0;return s<=0?a=0:r===e?a=(t-i)/s%6:r===t?a=2+(i-e)/s:a=4+(e-t)/s,a/=6,a%=1,[a*360,s*100,c*100]};bi.hsl.hcg=function(n){const e=n[1]/100,t=n[2]/100,i=t<.5?2*e*t:2*e*(1-t);let r=0;return i<1&&(r=(t-.5*i)/(1-i)),[n[0],i*100,r*100]};bi.hsv.hcg=function(n){const e=n[1]/100,t=n[2]/100,i=e*t;let r=0;return i<1&&(r=(t-i)/(1-i)),[n[0],i*100,r*100]};bi.hcg.rgb=function(n){const e=n[0]/360,t=n[1]/100,i=n[2]/100;if(t===0)return[i*255,i*255,i*255];const r=[0,0,0],o=e%1*6,s=o%1,a=1-s;let c=0;switch(Math.floor(o)){case 0:{r[0]=1,r[1]=s,r[2]=0;break}case 1:{r[0]=a,r[1]=1,r[2]=0;break}case 2:{r[0]=0,r[1]=1,r[2]=s;break}case 3:{r[0]=0,r[1]=a,r[2]=1;break}case 4:{r[0]=s,r[1]=0,r[2]=1;break}default:r[0]=1,r[1]=0,r[2]=a}return c=(1-t)*i,[(t*r[0]+c)*255,(t*r[1]+c)*255,(t*r[2]+c)*255]};bi.hcg.hsv=function(n){const e=n[1]/100,t=n[2]/100,i=e+t*(1-e);let r=0;return i>0&&(r=e/i),[n[0],r*100,i*100]};bi.hcg.hsl=function(n){const e=n[1]/100,i=n[2]/100*(1-e)+.5*e;let r=0;return i>0&&i<.5?r=e/(2*i):i>=.5&&i<1&&(r=e/(2*(1-i))),[n[0],r*100,i*100]};bi.hcg.hwb=function(n){const e=n[1]/100,t=n[2]/100,i=e+t*(1-e);return[n[0],(i-e)*100,(1-i)*100]};bi.hwb.hcg=function(n){const e=n[1]/100,i=1-n[2]/100,r=i-e;let o=0;return r<1&&(o=(i-r)/(1-r)),[n[0],r*100,o*100]};bi.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]};bi.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]};bi.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]};bi.gray.hsl=function(n){return[0,0,n[0]]};bi.gray.hsv=bi.gray.hsl;bi.gray.hwb=function(n){return[0,100,n[0]]};bi.gray.cmyk=function(n){return[0,0,0,n[0]]};bi.gray.lab=function(n){return[n[0],0,0]};bi.gray.hex=function(n){const e=Math.round(n[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(i.length)+i};bi.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]};function Hfe(){const n={},e=Object.keys(bi);for(let{length:t}=e,i=0;i<t;i++)n[e[i]]={distance:-1,parent:null};return n}function Zfe(n){const e=Hfe(),t=[n];for(e[n].distance=0;t.length>0;){const i=t.pop(),r=Object.keys(bi[i]);for(let{length:o}=r,s=0;s<o;s++){const a=r[s],c=e[a];c.distance===-1&&(c.distance=e[i].distance+1,c.parent=i,t.unshift(a))}}return e}function Xfe(n,e){return function(t){return e(n(t))}}function Jfe(n,e){const t=[e[n].parent,n];let i=bi[e[n].parent][n],r=e[n].parent;for(;e[r].parent;)t.unshift(e[r].parent),i=Xfe(bi[e[r].parent][r],i),r=e[r].parent;return i.conversion=t,i}function epe(n){const e=Zfe(n),t={},i=Object.keys(e);for(let{length:r}=i,o=0;o<r;o++){const s=i[o];e[s].parent!==null&&(t[s]=Jfe(s,e))}return t}const Lc={},tpe=Object.keys(bi);function npe(n){const e=function(...t){const i=t[0];return i==null?i:(i.length>1&&(t=i),n(t))};return"conversion"in n&&(e.conversion=n.conversion),e}function ipe(n){const e=function(...t){const i=t[0];if(i==null)return i;i.length>1&&(t=i);const r=n(t);if(typeof r=="object")for(let{length:o}=r,s=0;s<o;s++)r[s]=Math.round(r[s]);return r};return"conversion"in n&&(e.conversion=n.conversion),e}for(const n of tpe){Lc[n]={},Object.defineProperty(Lc[n],"channels",{value:bi[n].channels}),Object.defineProperty(Lc[n],"labels",{value:bi[n].labels});const e=epe(n),t=Object.keys(e);for(const i of t){const r=e[i];Lc[n][i]=ipe(r),Lc[n][i].raw=npe(r)}}const jX=["keyword","gray","hex"],m9={};for(const n of Object.keys(Lc))m9[[...Lc[n].labels].sort().join("")]=n;const g9={};function Ru(n,e){if(!(this instanceof Ru))return new Ru(n,e);if(e&&e in jX&&(e=null),e&&!(e in Lc))throw new Error("Unknown model: "+e);let t,i;if(n==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(n instanceof Ru)this.model=n.model,this.color=[...n.color],this.valpha=n.valpha;else if(typeof n=="string"){const r=oc.get(n);if(r===null)throw new Error("Unable to parse color from string: "+n);this.model=r.model,i=Lc[this.model].channels,this.color=r.value.slice(0,i),this.valpha=typeof r.value[i]=="number"?r.value[i]:1}else if(n.length>0){this.model=e||"rgb",i=Lc[this.model].channels;const r=Array.prototype.slice.call(n,0,i);this.color=y9(r,i),this.valpha=typeof n[i]=="number"?n[i]:1}else if(typeof n=="number")this.model="rgb",this.color=[n>>16&255,n>>8&255,n&255],this.valpha=1;else{this.valpha=1;const r=Object.keys(n);"alpha"in n&&(r.splice(r.indexOf("alpha"),1),this.valpha=typeof n.alpha=="number"?n.alpha:0);const o=r.sort().join("");if(!(o in m9))throw new Error("Unable to parse color from object: "+JSON.stringify(n));this.model=m9[o];const{labels:s}=Lc[this.model],a=[];for(t=0;t<s.length;t++)a.push(n[s[t]]);this.color=y9(a)}if(g9[this.model])for(i=Lc[this.model].channels,t=0;t<i;t++){const r=g9[this.model][t];r&&(this.color[t]=r(this.color[t]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Ru.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(n){let e=this.model in oc.to?this:this.rgb();e=e.round(typeof n=="number"?n:1);const t=e.valpha===1?e.color:[...e.color,this.valpha];return oc.to[e.model](...t)},percentString(n){const e=this.rgb().round(typeof n=="number"?n:1),t=e.valpha===1?e.color:[...e.color,this.valpha];return oc.to.rgb.percent(...t)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const n={},{channels:e}=Lc[this.model],{labels:t}=Lc[this.model];for(let i=0;i<e;i++)n[t[i]]=this.color[i];return this.valpha!==1&&(n.alpha=this.valpha),n},unitArray(){const n=this.rgb().color;return n[0]/=255,n[1]/=255,n[2]/=255,this.valpha!==1&&n.push(this.valpha),n},unitObject(){const n=this.rgb().object();return n.r/=255,n.g/=255,n.b/=255,this.valpha!==1&&(n.alpha=this.valpha),n},round(n){return n=Math.max(n||0,0),new Ru([...this.color.map(ope(n)),this.valpha],this.model)},alpha(n){return n!==void 0?new Ru([...this.color,Math.max(0,Math.min(1,n))],this.model):this.valpha},red:zl("rgb",0,ec(255)),green:zl("rgb",1,ec(255)),blue:zl("rgb",2,ec(255)),hue:zl(["hsl","hsv","hsl","hwb","hcg"],0,n=>(n%360+360)%360),saturationl:zl("hsl",1,ec(100)),lightness:zl("hsl",2,ec(100)),saturationv:zl("hsv",1,ec(100)),value:zl("hsv",2,ec(100)),chroma:zl("hcg",1,ec(100)),gray:zl("hcg",2,ec(100)),white:zl("hwb",1,ec(100)),wblack:zl("hwb",2,ec(100)),cyan:zl("cmyk",0,ec(100)),magenta:zl("cmyk",1,ec(100)),yellow:zl("cmyk",2,ec(100)),black:zl("cmyk",3,ec(100)),x:zl("xyz",0,ec(95.047)),y:zl("xyz",1,ec(100)),z:zl("xyz",2,ec(108.833)),l:zl("lab",0,ec(100)),a:zl("lab",1),b:zl("lab",2),keyword(n){return n!==void 0?new Ru(n):Lc[this.model].keyword(this.color)},hex(n){return n!==void 0?new Ru(n):oc.to.hex(...this.rgb().round().color)},hexa(n){if(n!==void 0)return new Ru(n);const e=this.rgb().round().color;let t=Math.round(this.valpha*255).toString(16).toUpperCase();return t.length===1&&(t="0"+t),oc.to.hex(...e)+t},rgbNumber(){const n=this.rgb().color;return(n[0]&255)<<16|(n[1]&255)<<8|n[2]&255},luminosity(){const n=this.rgb().color,e=[];for(const[t,i]of n.entries()){const r=i/255;e[t]=r<=.04045?r/12.92:((r+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(n){const e=this.luminosity(),t=n.luminosity();return e>t?(e+.05)/(t+.05):(t+.05)/(e+.05)},level(n){const e=this.contrast(n);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const n=this.rgb().color;return(n[0]*2126+n[1]*7152+n[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const n=this.rgb();for(let e=0;e<3;e++)n.color[e]=255-n.color[e];return n},lighten(n){const e=this.hsl();return e.color[2]+=e.color[2]*n,e},darken(n){const e=this.hsl();return e.color[2]-=e.color[2]*n,e},saturate(n){const e=this.hsl();return e.color[1]+=e.color[1]*n,e},desaturate(n){const e=this.hsl();return e.color[1]-=e.color[1]*n,e},whiten(n){const e=this.hwb();return e.color[1]+=e.color[1]*n,e},blacken(n){const e=this.hwb();return e.color[2]+=e.color[2]*n,e},grayscale(){const n=this.rgb().color,e=n[0]*.3+n[1]*.59+n[2]*.11;return Ru.rgb(e,e,e)},fade(n){return this.alpha(this.valpha-this.valpha*n)},opaquer(n){return this.alpha(this.valpha+this.valpha*n)},rotate(n){const e=this.hsl();let t=e.color[0];return t=(t+n)%360,t=t<0?360+t:t,e.color[0]=t,e},mix(n,e){if(!n||!n.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof n);const t=n.rgb(),i=this.rgb(),r=e===void 0?.5:e,o=2*r-1,s=t.alpha()-i.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,c=1-a;return Ru.rgb(a*t.red()+c*i.red(),a*t.green()+c*i.green(),a*t.blue()+c*i.blue(),t.alpha()*r+i.alpha()*(1-r))}};for(const n of Object.keys(Lc)){if(jX.includes(n))continue;const{channels:e}=Lc[n];Ru.prototype[n]=function(...t){return this.model===n?new Ru(this):t.length>0?new Ru(t,n):new Ru([...spe(Lc[this.model][n].raw(this.color)),this.valpha],n)},Ru[n]=function(...t){let i=t[0];return typeof i=="number"&&(i=y9(t,e)),new Ru(i,n)}}function rpe(n,e){return Number(n.toFixed(e))}function ope(n){return function(e){return rpe(e,n)}}function zl(n,e,t){n=Array.isArray(n)?n:[n];for(const i of n)(g9[i]||=[])[e]=t;return n=n[0],function(i){let r;return i!==void 0?(t&&(i=t(i)),r=this[n](),r.color[e]=i,r):(r=this[n]().color[e],t&&(r=t(r)),r)}}function ec(n){return function(e){return Math.max(0,Math.min(n,e))}}function spe(n){return Array.isArray(n)?n:[n]}function y9(n,e){for(let t=0;t<e;t++)typeof n[t]!="number"&&(n[t]=0);return n}function ms(){var n="/home/runner/work/maputnik/maputnik/src/libs/zoomcontrol.ts",e="9dd3eea5f46b0cc48ff3173a7af02bc32aa63f10",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/zoomcontrol.ts",statementMap:{0:{start:{line:2,column:9},end:{line:2,column:15}},1:{start:{line:3,column:15},end:{line:3,column:21}},2:{start:{line:4,column:12},end:{line:4,column:16}},3:{start:{line:8,column:4},end:{line:8,column:20}},4:{start:{line:9,column:4},end:{line:9,column:52}},5:{start:{line:10,column:4},end:{line:10,column:93}},6:{start:{line:11,column:4},end:{line:11,column:70}},7:{start:{line:12,column:4},end:{line:12,column:27}},8:{start:{line:13,column:4},end:{line:13,column:29}},9:{start:{line:14,column:4},end:{line:14,column:27}},10:{start:{line:17,column:4},end:{line:17,column:60}},11:{start:{line:20,column:4},end:{line:22,column:6}},12:{start:{line:23,column:4},end:{line:23,column:57}},13:{start:{line:24,column:4},end:{line:24,column:27}},14:{start:{line:27,column:4},end:{line:27,column:57}},15:{start:{line:27,column:33},end:{line:27,column:55}},16:{start:{line:28,column:4},end:{line:28,column:57}},17:{start:{line:28,column:33},end:{line:28,column:55}},18:{start:{line:29,column:4},end:{line:29,column:58}},19:{start:{line:29,column:34},end:{line:29,column:56}},20:{start:{line:32,column:4},end:{line:32,column:60}},21:{start:{line:33,column:4},end:{line:33,column:23}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:16},end:{line:6,column:3}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:13},end:{line:15,column:3}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:16,column:2},end:{line:16,column:3}},loc:{start:{line:16,column:20},end:{line:18,column:3}},line:16},3:{name:"(anonymous_3)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:18},end:{line:25,column:3}},line:19},4:{name:"(anonymous_4)",decl:{start:{line:26,column:2},end:{line:26,column:3}},loc:{start:{line:26,column:22},end:{line:30,column:3}},line:26},5:{name:"(anonymous_5)",decl:{start:{line:27,column:27},end:{line:27,column:28}},loc:{start:{line:27,column:33},end:{line:27,column:55}},line:27},6:{name:"(anonymous_6)",decl:{start:{line:28,column:27},end:{line:28,column:28}},loc:{start:{line:28,column:33},end:{line:28,column:55}},line:28},7:{name:"(anonymous_7)",decl:{start:{line:29,column:28},end:{line:29,column:29}},loc:{start:{line:29,column:34},end:{line:29,column:56}},line:29},8:{name:"(anonymous_8)",decl:{start:{line:31,column:2},end:{line:31,column:3}},loc:{start:{line:31,column:13},end:{line:34,column:3}},line:31}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/zoomcontrol.ts"],names:[],mappings:"AAEA,qBAAqB,YAAY;AAAA,EAC/B,OAAuB;AAAA,EACvB,aAAyC;AAAA,EACzC,UAAkC;AAAA,EAElC,cAAc;AAAA,EAAC;AAAA,EAEf,MAAM,KAAU;AACd,SAAK,OAAO;AACZ,SAAK,aAAa,SAAS,cAAc,KAAK;AAC9C,SAAK,WAAW,YAAY;AAC5B,SAAK,WAAW,aAAa,eAAe,oBAAoB;AAChE,SAAK,SAAS,OAAO;AACrB,SAAK,kBAAkB;AAEvB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,kBAAkB;AAChB,SAAK,QAAS,YAAY,KAAK,KAAM,QAAQ,EAAE,QAAQ,CAAC;AAAA,EAC1D;AAAA,EAEA,SAAS,OAAe;AACtB,SAAK,WAAY,YAAY;AAAA,QACzB,KAAK;AAAA;AAET,SAAK,UAAU,KAAK,WAAY,cAAc,MAAM;AACpD,SAAK,gBAAgB;AAAA,EACvB;AAAA,EAEA,oBAAoB;AAClB,SAAK,KAAM,GAAG,UAAU,MAAM,KAAK,gBAAgB,CAAC;AACpD,SAAK,KAAM,GAAG,UAAU,MAAM,KAAK,gBAAgB,CAAC;AACpD,SAAK,KAAM,GAAG,WAAW,MAAM,KAAK,gBAAgB,CAAC;AAAA,EACvD;AAAA,EAEA,WAAW;AACT,SAAK,WAAY,WAAY,YAAY,KAAK,UAAW;AACzD,SAAK,OAAO;AAAA,EACd;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"9dd3eea5f46b0cc48ff3173a7af02bc32aa63f10"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return ms=function(){return s},s}ms();class ape{_map=(ms().s[0]++,void 0);_container=(ms().s[1]++,void 0);_textEl=(ms().s[2]++,null);constructor(){ms().f[0]++}onAdd(e){return ms().f[1]++,ms().s[3]++,this._map=e,ms().s[4]++,this._container=document.createElement("div"),ms().s[5]++,this._container.className="maplibregl-ctrl maplibregl-ctrl-group maplibregl-ctrl-zoom",ms().s[6]++,this._container.setAttribute("data-wd-key","maplibre:ctrl-zoom"),ms().s[7]++,this.setLabel("Zoom:"),ms().s[8]++,this.addEventListeners(),ms().s[9]++,this._container}updateZoomLevel(){ms().f[2]++,ms().s[10]++,this._textEl.innerHTML=this._map.getZoom().toFixed(2)}setLabel(e){ms().f[3]++,ms().s[11]++,this._container.innerHTML=`
${e} <span></span>
`,ms().s[12]++,this._textEl=this._container.querySelector("span"),ms().s[13]++,this.updateZoomLevel()}addEventListeners(){ms().f[4]++,ms().s[14]++,this._map.on("render",()=>(ms().f[5]++,ms().s[15]++,this.updateZoomLevel())),ms().s[16]++,this._map.on("zoomIn",()=>(ms().f[6]++,ms().s[17]++,this.updateZoomLevel())),ms().s[18]++,this._map.on("zoomOut",()=>(ms().f[7]++,ms().s[19]++,this.updateZoomLevel()))}onRemove(){ms().f[8]++,ms().s[20]++,this._container.parentNode.removeChild(this._container),ms().s[21]++,this._map=void 0}}function v9(n,e,t){const i={id:[e,t,"circle"].join("_"),source:e,type:"circle",paint:{"circle-color":n,"circle-radius":2},filter:["==","$type","Point"]};return t&&(i["source-layer"]=t),i}function b9(n,e,t,i){const r={id:[t,i,"polygon"].join("_"),source:t,type:"fill",paint:{"fill-color":n,"fill-antialias":!0,"fill-outline-color":n},filter:["==","$type","Polygon"]};return i&&(r["source-layer"]=i),r}function C9(n,e,t){const i={id:[e,t,"line"].join("_"),source:e,layout:{"line-join":"round","line-cap":"round"},type:"line",paint:{"line-color":n},filter:["==","$type","LineString"]};return t&&(i["source-layer"]=t),i}function lpe(n,e){const t=[],i=[],r=[];function o(s){return{circle:e(s,.8),line:e(s,.6),polygon:e(s,.3),polygonOutline:e(s,.6),default:e(s,1)}}return Object.keys(n).forEach(s=>{const a=n[s];if(!a||a.length===0){const c=o(s);i.push(v9(c.circle,s)),r.push(C9(c.line,s)),t.push(b9(c.polygon,c.polygonOutline,s))}else a.forEach(c=>{const A=o(c);i.push(v9(A.circle,s,c)),r.push(C9(A.line,s,c)),t.push(b9(A.polygon,A.polygonOutline,s,c))})}),t.concat(r).concat(i)}function upe(n,e,t){t=Object.assign({backgroundColor:"#fff"},t);const i={id:"background",type:"background",paint:{"background-color":t.backgroundColor}},r={};return Object.keys(n.sources).forEach(o=>{const s=n.sources[o];(s.type==="vector"||s.type==="geojson")&&(r[o]=s)}),Object.assign(n,{layers:[i].concat(e),sources:r})}const mO={polygonLayer:b9,lineLayer:C9,circleLayer:v9,generateInspectStyle:upe,generateColoredLayers:lpe};function Rr(){var n="/home/runner/work/maputnik/maputnik/src/libs/highlight.ts",e="aec0f701e803624fae461cc89b5fc887ff556587",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/highlight.ts",statementMap:{0:{start:{line:4,column:2},end:{line:8,column:3}},1:{start:{line:5,column:4},end:{line:5,column:33}},2:{start:{line:6,column:9},end:{line:8,column:3}},3:{start:{line:7,column:4},end:{line:7,column:30}},4:{start:{line:9,column:2},end:{line:13,column:3}},5:{start:{line:10,column:4},end:{line:10,column:28}},6:{start:{line:12,column:4},end:{line:12,column:23}},7:{start:{line:14,column:2},end:{line:14,column:29}},8:{start:{line:15,column:2},end:{line:15,column:11}},9:{start:{line:18,column:2},end:{line:18,column:84}},10:{start:{line:18,column:72},end:{line:18,column:84}},11:{start:{line:19,column:24},end:{line:19,column:51}},12:{start:{line:20,column:16},end:{line:20,column:52}},13:{start:{line:21,column:2},end:{line:23,column:3}},14:{start:{line:22,column:4},end:{line:22,column:104}},15:{start:{line:24,column:2},end:{line:26,column:3}},16:{start:{line:25,column:4},end:{line:25,column:96}},17:{start:{line:27,column:2},end:{line:29,column:3}},18:{start:{line:28,column:4},end:{line:28,column:94}},19:{start:{line:30,column:2},end:{line:30,column:14}}},fnMap:{0:{name:"changeLayer",decl:{start:{line:3,column:9},end:{line:3,column:20}},loc:{start:{line:3,column:31},end:{line:16,column:1}},line:3},1:{name:"colorHighlightedLayer",decl:{start:{line:17,column:16},end:{line:17,column:37}},loc:{start:{line:17,column:45},end:{line:31,column:1}},line:17}},branchMap:{0:{loc:{start:{line:4,column:2},end:{line:8,column:3}},type:"if",locations:[{start:{line:4,column:2},end:{line:8,column:3}},{start:{line:6,column:9},end:{line:8,column:3}}],line:4},1:{loc:{start:{line:6,column:9},end:{line:8,column:3}},type:"if",locations:[{start:{line:6,column:9},end:{line:8,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:6},2:{loc:{start:{line:9,column:2},end:{line:13,column:3}},type:"if",locations:[{start:{line:9,column:2},end:{line:13,column:3}},{start:{line:11,column:9},end:{line:13,column:3}}],line:9},3:{loc:{start:{line:18,column:2},end:{line:18,column:84}},type:"if",locations:[{start:{line:18,column:2},end:{line:18,column:84}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:18},4:{loc:{start:{line:18,column:6},end:{line:18,column:70}},type:"binary-expr",locations:[{start:{line:18,column:6},end:{line:18,column:12}},{start:{line:18,column:16},end:{line:18,column:43}},{start:{line:18,column:47},end:{line:18,column:70}}],line:18},5:{loc:{start:{line:19,column:24},end:{line:19,column:51}},type:"binary-expr",locations:[{start:{line:19,column:24},end:{line:19,column:45}},{start:{line:19,column:49},end:{line:19,column:51}}],line:19},6:{loc:{start:{line:21,column:2},end:{line:23,column:3}},type:"if",locations:[{start:{line:21,column:2},end:{line:23,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:21},7:{loc:{start:{line:21,column:6},end:{line:21,column:62}},type:"binary-expr",locations:[{start:{line:21,column:6},end:{line:21,column:27}},{start:{line:21,column:31},end:{line:21,column:62}}],line:21},8:{loc:{start:{line:24,column:2},end:{line:26,column:3}},type:"if",locations:[{start:{line:24,column:2},end:{line:26,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:24},9:{loc:{start:{line:24,column:6},end:{line:24,column:56}},type:"binary-expr",locations:[{start:{line:24,column:6},end:{line:24,column:29}},{start:{line:24,column:33},end:{line:24,column:56}}],line:24},10:{loc:{start:{line:27,column:2},end:{line:29,column:3}},type:"if",locations:[{start:{line:27,column:2},end:{line:29,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:27}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0},f:{0:0,1:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/highlight.ts"],names:[],mappings:"AAAA,OAAO,cAAc;AACrB,OAAO,YAAY;AAKnB,SAAS,YAAY,GAAqB,OAA2B;AACnE,MAAG,EAAE,SAAS,UAAU;AACtB,MAAE,MAAO,eAAe,IAAI;AAAA,EAC9B,WAAU,EAAE,SAAS,QAAQ;AAC3B,MAAE,MAAO,YAAY,IAAI;AAAA,EAC3B;AAEA,MAAG,YAAY,OAAO;AACpB,MAAE,SAAS,MAAM;AAAA,EACnB,OAAO;AACL,WAAO,EAAE,QAAQ;AAAA,EACnB;AACA,IAAE,KAAK,EAAE,KAAK;AACd,SAAO;AACT;AAEO,gBAAS,sBAAsB,OAAqD;AACzF,MAAG,CAAC,SAAS,MAAM,SAAS,gBAAgB,MAAM,SAAS,SAAU,QAAO;AAE5E,QAAM,gBAAgB,MAAM,cAAc,KAAK;AAC/C,QAAM,QAAQ,OAAO,YAAY,eAAe,CAAC;AAEjD,MAAG,MAAM,SAAS,UAAU,MAAM,SAAS,kBAAkB;AAC3D,WAAO,YAAY,SAAS,aAAa,OAAO,OAAO,MAAM,QAAQ,MAAM,cAAc,CAAC,GAAG,KAAK;AAAA,EACpG;AAEA,MAAG,MAAM,SAAS,YAAY,MAAM,SAAS,UAAU;AACrD,WAAO,YAAY,SAAS,YAAY,OAAO,MAAM,QAAQ,MAAM,cAAc,CAAC,GAAG,KAAK;AAAA,EAC5F;AAEA,MAAG,MAAM,SAAS,QAAQ;AACxB,WAAO,YAAY,SAAS,UAAU,OAAO,MAAM,QAAQ,MAAM,cAAc,CAAC,GAAG,KAAK;AAAA,EAC1F;AAEA,SAAO;AACT;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"aec0f701e803624fae461cc89b5fc887ff556587"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Rr=function(){return s},s}Rr();function gO(n,e){return Rr().f[0]++,Rr().s[0]++,n.type==="circle"?(Rr().b[0][0]++,Rr().s[1]++,n.paint["circle-radius"]=3):(Rr().b[0][1]++,Rr().s[2]++,n.type==="line"?(Rr().b[1][0]++,Rr().s[3]++,n.paint["line-width"]=2):Rr().b[1][1]++),Rr().s[4]++,"filter"in e?(Rr().b[2][0]++,Rr().s[5]++,n.filter=e.filter):(Rr().b[2][1]++,Rr().s[6]++,delete n.filter),Rr().s[7]++,n.id=n.id+"_highlight",Rr().s[8]++,n}function cpe(n){if(Rr().f[1]++,Rr().s[9]++,Rr().b[4][0]++,!n||(Rr().b[4][1]++,n.type==="background")||(Rr().b[4][2]++,n.type==="raster"))return Rr().b[3][0]++,Rr().s[10]++,null;Rr().b[3][1]++;const e=(Rr().s[11]++,Rr().b[5][0]++,n["source-layer"]||(Rr().b[5][1]++,"")),t=(Rr().s[12]++,RX.brightColor(e,1));return Rr().s[13]++,Rr().b[7][0]++,n.type==="fill"||(Rr().b[7][1]++,n.type==="fill-extrusion")?(Rr().b[6][0]++,Rr().s[14]++,gO(mO.polygonLayer(t,t,n.source,n["source-layer"]),n)):(Rr().b[6][1]++,Rr().s[15]++,Rr().b[9][0]++,n.type==="symbol"||(Rr().b[9][1]++,n.type==="circle")?(Rr().b[8][0]++,Rr().s[16]++,gO(mO.circleLayer(t,n.source,n["source-layer"]),n)):(Rr().b[8][1]++,Rr().s[17]++,n.type==="line"?(Rr().b[10][0]++,Rr().s[18]++,gO(mO.lineLayer(t,n.source,n["source-layer"]),n)):(Rr().b[10][1]++,Rr().s[19]++,null)))}function aP(){var n="/home/runner/work/maputnik/maputnik/src/libs/maplibre-rtl.ts",e="a9dc98f82c73787713de0672aff7a601bfeb069d",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/maplibre-rtl.ts",statementMap:{0:{start:{line:2,column:0},end:{line:2,column:115}}},fnMap:{},branchMap:{},s:{0:0},f:{},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/maplibre-rtl.ts"],names:[],mappings:"AAAA,OAAO,gBAAgB;AAEvB,WAAW,iBAAiB,gFAAgF,KAAK;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a9dc98f82c73787713de0672aff7a601bfeb069d"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return aP=function(){return s},s}aP();aP().s[0]++;l_.setRTLTextPlugin("https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js",!1);function yO(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(m){try{A(i.next(m))}catch(v){s(v)}}function c(m){try{A(i.throw(m))}catch(v){s(v)}}function A(m){m.done?o(m.value):r(m.value).then(a,c)}A((i=i.apply(n,e||[])).next())})}var IM=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function lE(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var vO,$F;function NX(){if($F)return vO;$F=1,vO=e;var n=Object.prototype.hasOwnProperty;function e(){for(var t={},i=0;i<arguments.length;i++){var r=arguments[i];for(var o in r)n.call(r,o)&&(t[o]=r[o])}return t}return vO}var bO={exports:{}},VF;function Ape(){return VF||(VF=1,(function(n,e){(function(){var t={};n.exports=t,t.simpleFilter=function(i,r){return r.filter(function(o){return t.test(i,o)})},t.test=function(i,r){return t.match(i,r)!==null},t.match=function(i,r,o){o=o||{};var s=0,a=[],c=r.length,A=0,m=0,v=o.pre||"",x=o.post||"",_=o.caseSensitive&&r||r.toLowerCase(),O;i=o.caseSensitive&&i||i.toLowerCase();for(var P=0;P<c;P++)O=r[P],_[P]===i[s]?(O=v+O+x,s+=1,m+=1+m):m=0,A+=m,a[a.length]=O;return s===i.length?(A=_===i?1/0:A,{rendered:a.join(""),score:A}):null},t.filter=function(i,r,o){return!r||r.length===0?[]:typeof i!="string"?r:(o=o||{},r.reduce(function(s,a,c,A){var m=a;o.extract&&(m=o.extract(a));var v=t.match(i,m,o);return v!=null&&(s[s.length]={string:v.rendered,score:v.score,index:c,original:a}),s},[]).sort(function(s,a){var c=a.score-s.score;return c||s.index-a.index}))}})()})(bO)),bO.exports}var CO,HF;function hpe(){if(HF)return CO;HF=1;var n=function(e){return this.component=e,this.items=[],this.active=e.options.noInitialSelection?-1:0,this.wrapper=document.createElement("div"),this.wrapper.className="suggestions-wrapper",this.element=document.createElement("ul"),this.element.className="suggestions",this.wrapper.appendChild(this.element),this.selectingListItem=!1,e.el.parentNode.insertBefore(this.wrapper,e.el.nextSibling),this};return n.prototype.show=function(){this.element.style.display="block"},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.add=function(e){this.items.push(e)},n.prototype.clear=function(){this.items=[],this.active=this.component.options.noInitialSelection?-1:0},n.prototype.isEmpty=function(){return!this.items.length},n.prototype.isVisible=function(){return this.element.style.display==="block"},n.prototype.draw=function(){if(this.element.innerHTML="",this.items.length===0){this.hide();return}for(var e=0;e<this.items.length;e++)this.drawItem(this.items[e],this.active===e);this.show()},n.prototype.drawItem=function(e,t){var i=document.createElement("li"),r=document.createElement("a");t&&(i.className+=" active"),r.innerHTML=e.string,i.appendChild(r),this.element.appendChild(i),i.addEventListener("mousedown",(function(){this.selectingListItem=!0}).bind(this)),i.addEventListener("mouseup",(function(){this.handleMouseUp.call(this,e)}).bind(this))},n.prototype.handleMouseUp=function(e){this.selectingListItem=!1,this.component.value(e.original),this.clear(),this.draw()},n.prototype.move=function(e){this.active=e,this.draw()},n.prototype.previous=function(){this.move(this.active<=0?this.items.length-1:this.active-1)},n.prototype.next=function(){this.move(this.active>=this.items.length-1?0:this.active+1)},n.prototype.drawError=function(e){var t=document.createElement("li");t.innerHTML=e,this.element.appendChild(t),this.show()},CO=n,CO}var _O,ZF;function dpe(){if(ZF)return _O;ZF=1;var n=NX(),e=Ape(),t=hpe(),i=function(r,o,s){return s=s||{},this.options=n({minLength:2,limit:5,filter:!0,hideOnBlur:!0,noInitialSelection:!0},s),this.el=r,this.data=o||[],this.list=new t(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",(function(a){this.handleKeyUp(a.keyCode,a)}).bind(this),!1),this.el.addEventListener("keydown",(function(a){this.handleKeyDown(a)}).bind(this)),this.el.addEventListener("focus",(function(){this.handleFocus()}).bind(this)),this.el.addEventListener("blur",(function(){this.handleBlur()}).bind(this)),this.el.addEventListener("paste",(function(a){this.handlePaste(a)}).bind(this)),this.render=this.options.render?this.options.render.bind(this):this.render.bind(this),this.getItemValue=this.options.getItemValue?this.options.getItemValue.bind(this):this.getItemValue.bind(this),this};return i.prototype.handleKeyUp=function(r,o){if(!(r===40||r===38||r===27||r===9)){if(r===13){this.list.items[this.list.active]&&(this.list.handleMouseUp(this.list.items[this.list.active]),o.stopPropagation());return}this.handleInputChange(this.el.value)}},i.prototype.handleKeyDown=function(r){switch(r.keyCode){case 13:this.list.active>=0&&(this.list.selectingListItem=!0);break;case 9:this.list.isEmpty()||(this.list.isVisible()&&r.preventDefault(),this.value(this.list.active>=0?this.list.items[this.list.active].original:null),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next();break}},i.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},i.prototype.handlePaste=function(r){if(r.clipboardData)this.handleInputChange(r.clipboardData.getData("Text"));else{var o=this;setTimeout(function(){o.handleInputChange(r.target.value)},100)}},i.prototype.handleInputChange=function(r){if(this.query=this.normalize(r),this.list.clear(),this.query.length<this.options.minLength){this.list.draw();return}this.getCandidates((function(o){for(var s=0;s<o.length&&(this.list.add(o[s]),s!==this.options.limit-1);s++);this.list.draw()}).bind(this))},i.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1},i.prototype.update=function(r){this.data=r,this.handleKeyUp()},i.prototype.clear=function(){this.data=[],this.list.clear()},i.prototype.normalize=function(r){return r=r.toLowerCase(),r},i.prototype.match=function(r,o){return r.indexOf(o)>-1},i.prototype.value=function(r){if(this.selected=r,this.el.value=this.getItemValue(r||{place_name:this.query}),document.createEvent){var o=document.createEvent("HTMLEvents");o.initEvent("change",!0,!1),this.el.dispatchEvent(o)}else this.el.fireEvent("onchange")},i.prototype.getCandidates=function(r){var o={pre:"<strong>",post:"</strong>",extract:(function(a){return this.getItemValue(a)}).bind(this)},s;this.options.filter?(s=e.filter(this.query,this.data,o),s=s.map((function(a){return{original:a.original,string:this.render(a.original,a.string)}}).bind(this))):s=this.data.map((function(a){var c=this.render(a);return{original:a,string:c}}).bind(this)),r(s)},i.prototype.getItemValue=function(r){return r},i.prototype.render=function(r,o){if(o)return o;for(var s=r.original?this.getItemValue(r.original):this.getItemValue(r),a=this.normalize(s),c=a.lastIndexOf(this.query);c>-1;){var A=c+this.query.length;s=s.slice(0,c)+"<strong>"+s.slice(c,A)+"</strong>"+s.slice(A),c=a.slice(0,c).lastIndexOf(this.query)}return s},i.prototype.renderError=function(r){this.list.drawError(r)},_O=i,_O}var xO,XF;function fpe(){if(XF)return xO;XF=1;var n=dpe();return xO=n,typeof window<"u"&&(window.Suggestions=n),xO}var ppe=fpe(),mpe=lE(ppe),Y5={exports:{}},gpe=Y5.exports,JF;function ype(){return JF||(JF=1,(function(n){(function(e,t,i){n.exports?n.exports=i():e[t]=i()})(gpe,"subtag",function(){var e="",t=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function i(c){return c.match(t)||[]}function r(c){return i(c).filter(function(A,m){return A&&m})}function o(c){return c=i(c),{language:c[1]||e,extlang:c[2]||e,script:c[3]||e,region:c[4]||e}}function s(c,A,m){Object.defineProperty(c,A,{value:m,enumerable:!0})}function a(c,A,m){function v(x){return i(x)[c]||e}s(v,"pattern",A),s(o,m,v)}return a(1,/^[a-zA-Z]{2,3}$/,"language"),a(2,/^[a-zA-Z]{3}$/,"extlang"),a(3,/^[a-zA-Z]{4}$/,"script"),a(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),s(o,"split",r),o})})(Y5)),Y5.exports}var vpe=ype(),bpe=lE(vpe),MO,ez;function Cpe(){if(ez)return MO;ez=1;var n="Expected a function",e=NaN,t="[object Symbol]",i=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,c=typeof IM=="object"&&IM&&IM.Object===Object&&IM,A=typeof self=="object"&&self&&self.Object===Object&&self,m=c||A||Function("return this")(),v=Object.prototype,x=v.toString,_=Math.max,O=Math.min,P=function(){return m.Date.now()};function F(G,Y,z){var se,le,me,fe,_e,we,ke=0,je=!1,Ie=!1,Qe=!0;if(typeof G!="function")throw new TypeError(n);Y=H(Y)||0,j(z)&&(je=!!z.leading,Ie="maxWait"in z,me=Ie?_(H(z.maxWait)||0,Y):me,Qe="trailing"in z?!!z.trailing:Qe);function tt(Ut){var Pe=se,Te=le;return se=le=void 0,ke=Ut,fe=G.apply(Te,Pe),fe}function ht(Ut){return ke=Ut,_e=setTimeout(We,Y),je?tt(Ut):fe}function ce(Ut){var Pe=Ut-we,Te=Ut-ke,Se=Y-Pe;return Ie?O(Se,me-Te):Se}function Le(Ut){var Pe=Ut-we,Te=Ut-ke;return we===void 0||Pe>=Y||Pe<0||Ie&&Te>=me}function We(){var Ut=P();if(Le(Ut))return Me(Ut);_e=setTimeout(We,ce(Ut))}function Me(Ut){return _e=void 0,Qe&&se?tt(Ut):(se=le=void 0,fe)}function dt(){_e!==void 0&&clearTimeout(_e),ke=0,se=we=le=_e=void 0}function it(){return _e===void 0?fe:Me(P())}function vt(){var Ut=P(),Pe=Le(Ut);if(se=arguments,le=this,we=Ut,Pe){if(_e===void 0)return ht(we);if(Ie)return _e=setTimeout(We,Y),tt(we)}return _e===void 0&&(_e=setTimeout(We,Y)),fe}return vt.cancel=dt,vt.flush=it,vt}function j(G){var Y=typeof G;return!!G&&(Y=="object"||Y=="function")}function Q(G){return!!G&&typeof G=="object"}function V(G){return typeof G=="symbol"||Q(G)&&x.call(G)==t}function H(G){if(typeof G=="number")return G;if(V(G))return e;if(j(G)){var Y=typeof G.valueOf=="function"?G.valueOf():G;G=j(Y)?Y+"":Y}if(typeof G!="string")return G===0?G:+G;G=G.replace(i,"");var z=o.test(G);return z||s.test(G)?a(G.slice(2),z?2:8):r.test(G)?e:+G}return MO=F,MO}var _pe=Cpe(),xpe=lE(_pe),Mpe=NX(),$p=lE(Mpe),kM={exports:{}},tz;function wpe(){if(tz)return kM.exports;tz=1;var n=typeof Reflect=="object"?Reflect:null,e=n&&typeof n.apply=="function"?n.apply:function(G,Y,z){return Function.prototype.apply.call(G,Y,z)},t;n&&typeof n.ownKeys=="function"?t=n.ownKeys:Object.getOwnPropertySymbols?t=function(G){return Object.getOwnPropertyNames(G).concat(Object.getOwnPropertySymbols(G))}:t=function(G){return Object.getOwnPropertyNames(G)};function i(H){console&&console.warn&&console.warn(H)}var r=Number.isNaN||function(G){return G!==G};function o(){o.init.call(this)}kM.exports=o,kM.exports.once=j,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(H){if(typeof H!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof H)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(H){if(typeof H!="number"||H<0||r(H))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+H+".");s=H}}),o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(G){if(typeof G!="number"||G<0||r(G))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+G+".");return this._maxListeners=G,this};function c(H){return H._maxListeners===void 0?o.defaultMaxListeners:H._maxListeners}o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(G){for(var Y=[],z=1;z<arguments.length;z++)Y.push(arguments[z]);var se=G==="error",le=this._events;if(le!==void 0)se=se&&le.error===void 0;else if(!se)return!1;if(se){var me;if(Y.length>0&&(me=Y[0]),me instanceof Error)throw me;var fe=new Error("Unhandled error."+(me?" ("+me.message+")":""));throw fe.context=me,fe}var _e=le[G];if(_e===void 0)return!1;if(typeof _e=="function")e(_e,this,Y);else for(var we=_e.length,ke=O(_e,we),z=0;z<we;++z)e(ke[z],this,Y);return!0};function A(H,G,Y,z){var se,le,me;if(a(Y),le=H._events,le===void 0?(le=H._events=Object.create(null),H._eventsCount=0):(le.newListener!==void 0&&(H.emit("newListener",G,Y.listener?Y.listener:Y),le=H._events),me=le[G]),me===void 0)me=le[G]=Y,++H._eventsCount;else if(typeof me=="function"?me=le[G]=z?[Y,me]:[me,Y]:z?me.unshift(Y):me.push(Y),se=c(H),se>0&&me.length>se&&!me.warned){me.warned=!0;var fe=new Error("Possible EventEmitter memory leak detected. "+me.length+" "+String(G)+" listeners added. Use emitter.setMaxListeners() to increase limit");fe.name="MaxListenersExceededWarning",fe.emitter=H,fe.type=G,fe.count=me.length,i(fe)}return H}o.prototype.addListener=function(G,Y){return A(this,G,Y,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(G,Y){return A(this,G,Y,!0)};function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function v(H,G,Y){var z={fired:!1,wrapFn:void 0,target:H,type:G,listener:Y},se=m.bind(z);return se.listener=Y,z.wrapFn=se,se}o.prototype.once=function(G,Y){return a(Y),this.on(G,v(this,G,Y)),this},o.prototype.prependOnceListener=function(G,Y){return a(Y),this.prependListener(G,v(this,G,Y)),this},o.prototype.removeListener=function(G,Y){var z,se,le,me,fe;if(a(Y),se=this._events,se===void 0)return this;if(z=se[G],z===void 0)return this;if(z===Y||z.listener===Y)--this._eventsCount===0?this._events=Object.create(null):(delete se[G],se.removeListener&&this.emit("removeListener",G,z.listener||Y));else if(typeof z!="function"){for(le=-1,me=z.length-1;me>=0;me--)if(z[me]===Y||z[me].listener===Y){fe=z[me].listener,le=me;break}if(le<0)return this;le===0?z.shift():P(z,le),z.length===1&&(se[G]=z[0]),se.removeListener!==void 0&&this.emit("removeListener",G,fe||Y)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(G){var Y,z,se;if(z=this._events,z===void 0)return this;if(z.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):z[G]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete z[G]),this;if(arguments.length===0){var le=Object.keys(z),me;for(se=0;se<le.length;++se)me=le[se],me!=="removeListener"&&this.removeAllListeners(me);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Y=z[G],typeof Y=="function")this.removeListener(G,Y);else if(Y!==void 0)for(se=Y.length-1;se>=0;se--)this.removeListener(G,Y[se]);return this};function x(H,G,Y){var z=H._events;if(z===void 0)return[];var se=z[G];return se===void 0?[]:typeof se=="function"?Y?[se.listener||se]:[se]:Y?F(se):O(se,se.length)}o.prototype.listeners=function(G){return x(this,G,!0)},o.prototype.rawListeners=function(G){return x(this,G,!1)},o.listenerCount=function(H,G){return typeof H.listenerCount=="function"?H.listenerCount(G):_.call(H,G)},o.prototype.listenerCount=_;function _(H){var G=this._events;if(G!==void 0){var Y=G[H];if(typeof Y=="function")return 1;if(Y!==void 0)return Y.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function O(H,G){for(var Y=new Array(G),z=0;z<G;++z)Y[z]=H[z];return Y}function P(H,G){for(;G+1<H.length;G++)H[G]=H[G+1];H.pop()}function F(H){for(var G=new Array(H.length),Y=0;Y<G.length;++Y)G[Y]=H[Y].listener||H[Y];return G}function j(H,G){return new Promise(function(Y,z){function se(me){H.removeListener(G,le),z(me)}function le(){typeof H.removeListener=="function"&&H.removeListener("error",se),Y([].slice.call(arguments))}V(H,G,le,{once:!0}),G!=="error"&&Q(H,se,{once:!0})})}function Q(H,G,Y){typeof H.on=="function"&&V(H,"error",G,Y)}function V(H,G,Y,z){if(typeof H.on=="function")z.once?H.once(G,Y):H.on(G,Y);else if(typeof H.addEventListener=="function")H.addEventListener(G,function se(le){z.once&&H.removeEventListener(G,se),Y(le)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof H)}return kM.exports}var Spe=wpe();const nz={fr:{name:"France",bbox:[[-4.59235,41.380007],[9.560016,51.148506]]},us:{name:"United States",bbox:[[-171.791111,18.91619],[-66.96466,71.357764]]},ru:{name:"Russia",bbox:[[19.66064,41.151416],[190.10042,81.2504]]},ca:{name:"Canada",bbox:[[-140.99778,41.675105],[-52.648099,83.23324]]}},Epe={de:"Suche",it:"Ricerca",en:"Search",nl:"Zoeken",fr:"Chercher",ca:"Cerca",he:"לחפש",ja:"サーチ",lv:"Meklēt",pt:"Procurar",sr:"Претрага",zh:"搜索",cs:"Vyhledávání",hu:"Keresés",ka:"ძიება",nb:"Søke",sk:"Vyhľadávanie",th:"ค้นหา",fi:"Hae",is:"Leita",ko:"수색",pl:"Szukaj",sl:"Iskanje",fa:"جستجو",ru:"Поиск",es:"Buscar"},Ope={en:"No results found",de:"Keine Ergebnisse gefunden",es:"No hay resultados"},Bpe={en:"There was an error reaching the server",de:"Verbindung fehlgeschlagen",es:"Error al conectarse al servidor"};var Xx={placeholder:Epe,errorNoResults:Ope,errorConnectionFailed:Bpe};const Ipe=/(-?\d+\.?\d*)[, ]+(-?\d+\.?\d*)[ ]*$/;class kpe{constructor(e,t){this.options={zoom:16,flyTo:!0,trackProximity:!0,showResultsWhileTyping:!1,minLength:2,reverseGeocode:!1,limit:5,enableEventLogging:!0,marker:!0,popup:!1,maplibregl:void 0,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,proximityMinZoom:9,getItemValue:i=>i.text!==void 0?i.text:i.place_name,render:function(i){if(!i.geometry){const o=i.text,s=o.toLowerCase().indexOf(this.query.toLowerCase()),a=this.query.length,c=o.substring(0,s),A=o.substring(s,s+a),m=o.substring(s+a);return'<div class="maplibregl-ctrl-geocoder--suggestion"><svg class="maplibregl-ctrl-geocoder--suggestion-icon" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22.8702 20.1258H21.4248L20.9125 19.6318C22.7055 17.546 23.785 14.8382 23.785 11.8925C23.785 5.32419 18.4608 0 11.8925 0C5.32419 0 0 5.32419 0 11.8925C0 18.4608 5.32419 23.785 11.8925 23.785C14.8382 23.785 17.546 22.7055 19.6318 20.9125L20.1258 21.4248V22.8702L29.2739 32L32 29.2739L22.8702 20.1258ZM11.8925 20.1258C7.33676 20.1258 3.65923 16.4483 3.65923 11.8925C3.65923 7.33676 7.33676 3.65923 11.8925 3.65923C16.4483 3.65923 20.1258 7.33676 20.1258 11.8925C20.1258 16.4483 16.4483 20.1258 11.8925 20.1258Z" fill="#687078"/></svg><div class="maplibregl-ctrl-geocoder--suggestion-info"><div class="maplibregl-ctrl-geocoder--suggestion-title">'+c+'<span class="maplibregl-ctrl-geocoder--suggestion-match">'+A+"</span>"+m+"</div></div></div>"}const r=i.place_name.split(",");return'<div class="maplibregl-ctrl-geocoder--result"><svg class="maplibregl-ctrl-geocoder--result-icon" viewBox="0 0 24 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 0C5.36571 0 0 5.38676 0 12.0471C0 21.0824 12 32 12 32C12 32 24 21.0824 24 12.0471C24 5.38676 18.6343 0 12 0ZM12 16.3496C9.63428 16.3496 7.71429 14.4221 7.71429 12.0471C7.71429 9.67207 9.63428 7.74454 12 7.74454C14.3657 7.74454 16.2857 9.67207 16.2857 12.0471C16.2857 14.4221 14.3657 16.3496 12 16.3496Z" fill="#687078"/></svg><div><div class="maplibregl-ctrl-geocoder--result-title">'+r[0]+'</div><div class="maplibregl-ctrl-geocoder--result-address">'+r.splice(1,r.length).join(",")+"</div></div></div>"},popupRender:i=>{const r=i.place_name.split(",");return'<div class="maplibregl-ctrl-geocoder--suggestion popup-suggestion"><div class="maplibregl-ctrl-geocoder--suggestion-title popup-suggestion-title">'+r[0]+'</div><div class="maplibregl-ctrl-geocoder--suggestion-address popup-suggestion-address">'+r.splice(1,r.length).join(",")+"</div></div>"},showResultMarkers:!0,debounceSearch:200},this._eventEmitter=new Spe.EventEmitter,this.options=$p({},this.options,t),this.fresh=!0,this.lastSelected=null,this.geocoderApi=e}addTo(e){function t(i,r){if(!document.body.contains(r))throw new Error("Element provided to #addTo() exists, but is not in the DOM");const o=i.onAdd();r.appendChild(o)}if(e instanceof HTMLElement)t(this,e);else if(typeof e=="string"){const i=document.querySelectorAll(e);if(i.length===0)throw new Error("Element "+e+"not found.");if(i.length>1)throw new Error("Geocoder can only be added to a single html element");t(this,i[0])}else if("addControl"in e)e.addControl(this);else throw new Error("Error: addTo must be a maplibre-gl-js map, an html element, or a CSS selector query for a single html element")}onAdd(e){if(e&&typeof e!="string"&&(this._map=e),this.setLanguage(),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPaste=this._onPaste.bind(this),this._onBlur=this._onBlur.bind(this),this._showButton=this._showButton.bind(this),this._hideButton=this._hideButton.bind(this),this._onQueryResult=this._onQueryResult.bind(this),this.clear=this.clear.bind(this),this._updateProximity=this._updateProximity.bind(this),this._collapse=this._collapse.bind(this),this._unCollapse=this._unCollapse.bind(this),this._clear=this._clear.bind(this),this._clearOnBlur=this._clearOnBlur.bind(this);const t=this.container=document.createElement("div");t.className="maplibregl-ctrl-geocoder maplibregl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";const i=this.createIcon("search",'<path d="M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"/>');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="maplibregl-ctrl-geocoder--input",this.setPlaceholder(),this.options.collapsed&&(this._collapse(),this.container.addEventListener("mouseenter",this._unCollapse),this.container.addEventListener("mouseleave",this._collapse),this._inputEl.addEventListener("focus",this._unCollapse)),(this.options.collapsed||this.options.clearOnBlur)&&this._inputEl.addEventListener("blur",this._onBlur),this._inputEl.addEventListener("keydown",xpe(this._onKeyDown,this.options.debounceSearch)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton);const r=document.createElement("div");r.classList.add("maplibregl-ctrl-geocoder--pin-right"),this._clearEl=document.createElement("button"),this._clearEl.setAttribute("type","button"),this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this.clear),this._clearEl.className="maplibregl-ctrl-geocoder--button";const o=this.createIcon("close",'<path d="M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"/>');return this._clearEl.appendChild(o),this._loadingEl=this.createIcon("loading",'<path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"/><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"/>'),r.appendChild(this._clearEl),r.appendChild(this._loadingEl),t.appendChild(i),t.appendChild(this._inputEl),t.appendChild(r),this._typeahead=new mpe(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit,noInitialSelection:!0}),this.container.addEventListener("click",()=>{this._typeahead.update(this._typeahead.data)}),this.setRenderFunction(this.options.render),this._typeahead.getItemValue=this.options.getItemValue,this.mapMarker=null,this.resultMarkers=[],this._handleMarker=this._handleMarker.bind(this),this._handleResultMarkers=this._handleResultMarkers.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._maplibregl=this.options.maplibregl,!this._maplibregl&&this.options.marker&&(console.error("No maplibregl detected in options. Map markers are disabled. Please set options.maplibregl."),this.options.marker=!1)),t}createIcon(e,t){const i=document.createElementNS("http://www.w3.org/2000/svg","svg");if(i.setAttribute("class","maplibregl-ctrl-geocoder--icon maplibregl-ctrl-geocoder--icon-"+e),i.setAttribute("viewBox","0 0 18 18"),i.setAttribute("xml:space","preserve"),i.setAttribute("width","18"),i.setAttribute("height","18"),"innerHTML"in i)i.innerHTML=t;else{const r=document.createElement("div");r.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";const o=r.firstChild,s=o.firstChild;i.appendChild(s)}return i}onRemove(){return this.container.remove(),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this}_onPaste(e){const t=(e.clipboardData||window.clipboardData).getData("text");t.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(t)}_onKeyDown(e){if(e.keyCode===27&&this.options.clearAndBlurOnEsc)return this._clear(e),this._inputEl.blur();const o=this._inputEl.value;if(!o)return this.fresh=!0,e.keyCode!==9&&this.clear(e),this._clearEl.style.display="none";if(!(e.metaKey||[9,27,37,39,38,40].indexOf(e.keyCode)!==-1)){if(e.keyCode===13)if(!this.options.showResultsWhileTyping)this._typeahead.selected||this._geocode(o);else{this._typeahead.selected==null&&this.geocoderApi.getSuggestions?this._geocode(o,!0):this._typeahead.selected==null&&this.options.showResultMarkers&&this._fitBoundsForMarkers();return}o.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(o)}}_showButton(){this._inputEl.value.length>0&&(this._clearEl.style.display="block")}_hideButton(){this._typeahead.selected&&(this._clearEl.style.display="none")}_onBlur(e){this.options.clearOnBlur&&this._clearOnBlur(e),this.options.collapsed&&this._collapse()}_onChange(){const e=this._typeahead.selected;if(e&&!e.geometry)e.placeId?this._geocode(e.placeId,!0,!0):this._geocode(e.text,!0);else if(e&&JSON.stringify(e)!==this.lastSelected){if(this._clearEl.style.display="none",this.options.flyTo){let t;if(this._removeResultMarkers(),e.properties&&nz[e.properties.short_code])t=$p({},this.options.flyTo),this._map&&this._map.fitBounds(nz[e.properties.short_code].bbox,t);else if(e.bbox){const i=e.bbox;t=$p({},this.options.flyTo),this._map&&this._map.fitBounds([[i[0],i[1]],[i[2],i[3]]],t)}else{const i={zoom:this.options.zoom};t=$p({},i,this.options.flyTo),e.center?t.center=e.center:e.geometry&&e.geometry.type&&e.geometry.type==="Point"&&e.geometry.coordinates&&(t.center=e.geometry.coordinates),this._map&&this._map.flyTo(t)}}this.options.marker&&this._maplibregl&&this._handleMarker(e),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(e),this._typeahead.selected=null,this._eventEmitter.emit("result",{result:e})}}_getConfigForRequest(){return["bbox","limit","proximity","countries","types","language","reverseMode"].reduce((i,r)=>(this.options[r]&&(["countries","types","language"].indexOf(r)>-1?i[r]=this.options[r].split(/[\s,]+/):i[r]=this.options[r],r==="proximity"&&this.options[r]&&typeof this.options[r].longitude=="number"&&typeof this.options[r].latitude=="number"&&(i[r]=[this.options[r].longitude,this.options[r].latitude])),i),{})}_geocode(e){return yO(this,arguments,void 0,function*(t,i=!1,r=!1){this._loadingEl.style.display="block",this._eventEmitter.emit("loading",{query:t});const o=this._getConfigForRequest(),s=this._createGeocodeRequest(o,t,i,r),a=this.options.localGeocoder?this.options.localGeocoder(t)||[]:[];try{const c=yield s;yield this._handleGeocodeResponse(c,o,t,i,a)}catch(c){this._handleGeocodeErrorResponse(c,a)}return s})}_createGeocodeRequest(e,t,i,r){return this.options.localGeocoderOnly?Promise.resolve({}):this.options.reverseGeocode&&Ipe.test(t)?this._createReverseGeocodeRequest(t,e):(e.query=t,this.geocoderApi.getSuggestions?i?this.geocoderApi.searchByPlaceId&&r?this.geocoderApi.searchByPlaceId(e):this.geocoderApi.forwardGeocode(e):this.geocoderApi.getSuggestions(e):this.geocoderApi.forwardGeocode(e))}_createReverseGeocodeRequest(e,t){const i=e.split(/[\s(,)?]+/).map(r=>parseFloat(r)).reverse();return t.query=i,t.limit=1,"proximity"in t&&delete t.proximity,this.geocoderApi.reverseGeocode(t)}_handleGeocodeResponse(e,t,i,r,o){return yO(this,void 0,void 0,function*(){this._loadingEl.style.display="none";let s={};e?s=e:s={type:"FeatureCollection",features:[]},s.config=t,this.fresh&&(this.fresh=!1),s.features=s.features?o.concat(s.features):o;const a=this.options.externalGeocoder?this.options.externalGeocoder(i,s.features,t)||Promise.resolve([]):Promise.resolve([]);try{const A=yield a;s.features=s.features?A.concat(s.features):A}catch{}this.options.filter&&s.features.length&&(s.features=s.features.filter(this.options.filter));let c=[];"suggestions"in s?c=s.suggestions:"place"in s?c=[s.place]:c=s.features,c.length?(this._clearEl.style.display="block",this._typeahead.update(c),(!this.options.showResultsWhileTyping||r)&&this.options.showResultMarkers&&(s.features.length>0||"place"in s)&&this._fitBoundsForMarkers(),this._eventEmitter.emit("results",s)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",s))})}_handleGeocodeErrorResponse(e,t){this._loadingEl.style.display="none",t.length&&this.options.localGeocoder?(this._clearEl.style.display="block",this._typeahead.update(t)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:t}),this._eventEmitter.emit("error",{error:e})}_clear(e){e&&e.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._clearEl.style.display="none",this._removeMarker(),this._removeResultMarkers(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0}clear(e){this._clear(e),this._inputEl.focus()}_clearOnBlur(e){e.relatedTarget&&this._clear(e)}_onQueryResult(e){if(!("features"in e)||!e.features.length)return;const t=e.features[0];this._typeahead.selected=t,this._inputEl.value=t.place_name,this._onChange()}_updateProximity(){if(this._map)if(this._map.getZoom()>this.options.proximityMinZoom){const e=this._map.getCenter().wrap();this.setProximity({longitude:e.lng,latitude:e.lat})}else this.setProximity(null)}_collapse(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("maplibregl-ctrl-geocoder--collapsed")}_unCollapse(){this.container.classList.remove("maplibregl-ctrl-geocoder--collapsed")}query(e){return yO(this,void 0,void 0,function*(){const t=yield this._geocode(e);this._onQueryResult(t)})}_renderError(){const e=`<div class='maplibre-gl-geocoder--error'>${this._localize("errorConnectionFailed")}</div>`;this._renderMessage(e)}_renderNoResults(){const e=`<div class='maplibre-gl-geocoder--error maplibre-gl-geocoder--no-results'>
${this._localize("errorNoResults")}</div>`;this._renderMessage(e)}_renderMessage(e){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(e)}_localize(e){const t=bpe.language(this.options.language.split(",")[0]);return this.options.language&&Xx?.[e][t]?Xx[e][t]:Xx[e].en}_fitBoundsForMarkers(){if(this._typeahead.data.length<1)return;const e=this._typeahead.data.filter(t=>typeof t!="string").slice(0,this.options.limit);if(this._clearEl.style.display="none",this.options.flyTo&&this._maplibregl&&this._map){const i=$p({},{padding:100},this.options.flyTo),r=new this._maplibregl.LngLatBounds;for(const o of e)r.extend(o.geometry.coordinates);this._map.fitBounds(r,i)}return e.length>0&&this._maplibregl&&this._handleResultMarkers(e),this}setInput(e){return this._inputEl.value=e,this._typeahead.selected=null,this._typeahead.clear(),e.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(e),this}setProximity(e){return this.options.proximity=e,this}getProximity(){return this.options.proximity}setRenderFunction(e){return e&&typeof e=="function"&&(this._typeahead.render=e),this}getRenderFunction(){return this._typeahead.render}setLanguage(e){return this.options.language=e||this.options.language||navigator.language,this}getLanguage(){return this.options.language}getZoom(){return this.options.zoom}setZoom(e){return this.options.zoom=e,this}getFlyTo(){return this.options.flyTo}setFlyTo(e){return this.options.flyTo=e,this}getPlaceholder(){return this.options.placeholder}setPlaceholder(e){return this.placeholder=e||this.options.placeholder||this._localize("placeholder"),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this}getBbox(){return this.options.bbox}setBbox(e){return this.options.bbox=e,this}getCountries(){return this.options.countries}setCountries(e){return this.options.countries=e,this}getTypes(){return this.options.types}setTypes(e){return this.options.types=e,this}getMinLength(){return this.options.minLength}setMinLength(e){return this.options.minLength=e,this._typeahead&&(this._typeahead.options.minLength=e),this}getLimit(){return this.options.limit}setLimit(e){return this.options.limit=e,this._typeahead&&(this._typeahead.options.limit=e),this}getFilter(){return this.options.filter}setFilter(e){return this.options.filter=e,this}setGeocoderApi(e){return this.geocoderApi=e,this}getGeocoderApi(){return this.geocoderApi}_handleMarker(e){if(!this._map)return;this._removeMarker();const i=$p({},{color:"#4668F2"},this.options.marker);this.mapMarker=new this._maplibregl.Marker(i);let r;if(this.options.popup){const s=$p({},{},this.options.popup);r=new this._maplibregl.Popup(s).setHTML(this.options.popupRender(e))}return e.center?(this.mapMarker.setLngLat(e.center).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(r)):e.geometry&&e.geometry.type&&e.geometry.type==="Point"&&e.geometry.coordinates&&(this.mapMarker.setLngLat(e.geometry.coordinates).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(r)),this}_removeMarker(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)}_handleResultMarkers(e){if(!this._map)return;this._removeResultMarkers();let i=$p({},{color:"#4668F2"},this.options.showResultMarkers);for(const r of e){let o;if(this.options.showResultMarkers){this.options.showResultMarkers&&this.options.showResultMarkers.element&&(o=this.options.showResultMarkers.element.cloneNode(!0),i=$p(i,{element:o}));const s=new this._maplibregl.Marker($p({},i,{element:o}));let a;if(this.options.popup){const A=$p({},{},this.options.popup);a=new this._maplibregl.Popup(A).setHTML(this.options.popupRender(r))}r.center?(s.setLngLat(r.center).addTo(this._map),this.options.popup&&s.setPopup(a)):r.geometry&&r.geometry.type&&r.geometry.type==="Point"&&r.geometry.coordinates&&(s.setLngLat(r.geometry.coordinates).addTo(this._map),this.options.popup&&s.setPopup(a)),this.resultMarkers.push(s)}}return this}_removeResultMarkers(){this.resultMarkers&&this.resultMarkers.length>0&&(this.resultMarkers.forEach(function(e){e.remove()}),this.resultMarkers=[])}on(e,t){return this._eventEmitter.on(e,t),this}once(e){return new Promise(t=>{this._eventEmitter.once(e,t)})}off(e,t){return this._eventEmitter.removeListener(e,t),this}}function tn(){var n="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGl.tsx",e="1655c5d10102378b1e2627d777374c6f3c3f21a7",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGl.tsx",statementMap:{0:{start:{line:21,column:26},end:{line:27,column:3}},1:{start:{line:28,column:16},end:{line:28,column:55}},2:{start:{line:29,column:2},end:{line:31,column:3}},3:{start:{line:30,column:4},end:{line:30,column:30}},4:{start:{line:32,column:18},end:{line:32,column:20}},5:{start:{line:33,column:2},end:{line:38,column:5}},6:{start:{line:34,column:19},end:{line:34,column:53}},7:{start:{line:35,column:4},end:{line:37,column:5}},8:{start:{line:36,column:6},end:{line:36,column:33}},9:{start:{line:39,column:23},end:{line:43,column:3}},10:{start:{line:44,column:2},end:{line:44,column:22}},11:{start:{line:47,column:24},end:{line:57,column:3}},12:{start:{line:58,column:14},end:{line:58,column:18}},13:{start:{line:60,column:4},end:{line:60,column:17}},14:{start:{line:61,column:4},end:{line:66,column:6}},15:{start:{line:67,column:4},end:{line:69,column:7}},16:{start:{line:68,column:6},end:{line:68,column:25}},17:{start:{line:72,column:17},end:{line:72,column:22}},18:{start:{line:73,column:4},end:{line:76,column:5}},19:{start:{line:74,column:6},end:{line:74,column:132}},20:{start:{line:77,column:4},end:{line:77,column:18}},21:{start:{line:80,column:16},end:{line:80,column:30}},22:{start:{line:81,column:28},end:{line:81,column:79}},23:{start:{line:82,column:4},end:{line:87,column:5}},24:{start:{line:83,column:6},end:{line:83,column:52}},25:{start:{line:84,column:6},end:{line:84,column:70}},26:{start:{line:85,column:6},end:{line:85,column:70}},27:{start:{line:86,column:6},end:{line:86,column:76}},28:{start:{line:88,column:4},end:{line:90,column:5}},29:{start:{line:89,column:6},end:{line:89,column:43}},30:{start:{line:91,column:4},end:{line:96,column:5}},31:{start:{line:92,column:6},end:{line:92,column:59}},32:{start:{line:93,column:6},end:{line:95,column:14}},33:{start:{line:94,column:8},end:{line:94,column:36}},34:{start:{line:99,column:20},end:{line:108,column:5}},35:{start:{line:109,column:21},end:{line:109,column:53}},36:{start:{line:110,column:4},end:{line:110,column:53}},37:{start:{line:111,column:16},end:{line:111,column:43}},38:{start:{line:112,column:26},end:{line:116,column:5}},39:{start:{line:113,column:21},end:{line:113,column:36}},40:{start:{line:114,column:19},end:{line:114,column:32}},41:{start:{line:115,column:6},end:{line:115,column:44}},42:{start:{line:117,column:4},end:{line:117,column:20}},43:{start:{line:118,column:4},end:{line:118,column:56}},44:{start:{line:119,column:4},end:{line:119,column:56}},45:{start:{line:120,column:4},end:{line:120,column:62}},46:{start:{line:121,column:21},end:{line:121,column:43}},47:{start:{line:122,column:24},end:{line:122,column:41}},48:{start:{line:123,column:4},end:{line:123,column:45}},49:{start:{line:124,column:16},end:{line:124,column:74}},50:{start:{line:125,column:4},end:{line:125,column:37}},51:{start:{line:126,column:20},end:{line:126,column:49}},52:{start:{line:127,column:17},end:{line:127,column:36}},53:{start:{line:128,column:25},end:{line:130,column:6}},54:{start:{line:131,column:20},end:{line:162,column:6}},55:{start:{line:139,column:8},end:{line:139,column:82}},56:{start:{line:141,column:62},end:{line:141,column:141}},57:{start:{line:143,column:8},end:{line:160,column:9}},58:{start:{line:144,column:10},end:{line:146,column:13}},59:{start:{line:145,column:12},end:{line:145,column:94}},60:{start:{line:147,column:10},end:{line:147,column:25}},61:{start:{line:149,column:10},end:{line:158,column:13}},62:{start:{line:150,column:12},end:{line:157,column:15}},63:{start:{line:159,column:10},end:{line:159,column:25}},64:{start:{line:163,column:4},end:{line:163,column:28}},65:{start:{line:164,column:4},end:{line:172,column:7}},66:{start:{line:165,column:6},end:{line:171,column:9}},67:{start:{line:173,column:4},end:{line:178,column:7}},68:{start:{line:174,column:6},end:{line:174,column:40}},69:{start:{line:174,column:33},end:{line:174,column:40}},70:{start:{line:175,column:6},end:{line:177,column:9}},71:{start:{line:179,column:4},end:{line:181,column:7}},72:{start:{line:180,column:6},end:{line:180,column:30}},73:{start:{line:182,column:4},end:{line:186,column:7}},74:{start:{line:183,column:6},end:{line:185,column:9}},75:{start:{line:187,column:4},end:{line:187,column:37}},76:{start:{line:188,column:4},end:{line:188,column:37}},77:{start:{line:190,column:22},end:{line:193,column:3}},78:{start:{line:191,column:18},end:{line:191,column:82}},79:{start:{line:191,column:66},end:{line:191,column:81}},80:{start:{line:192,column:4},end:{line:192,column:36}},81:{start:{line:195,column:27},end:{line:228,column:5}},82:{start:{line:197,column:25},end:{line:197,column:27}},83:{start:{line:198,column:8},end:{line:223,column:9}},84:{start:{line:199,column:26},end:{line:199,column:138}},85:{start:{line:200,column:27},end:{line:200,column:47}},86:{start:{line:201,column:26},end:{line:201,column:47}},87:{start:{line:202,column:10},end:{line:220,column:11}},88:{start:{line:203,column:27},end:{line:206,column:13}},89:{start:{line:207,column:26},end:{line:218,column:13}},90:{start:{line:219,column:12},end:{line:219,column:33}},91:{start:{line:222,column:10},end:{line:222,column:69}},92:{start:{line:224,column:8},end:{line:226,column:10}},93:{start:{line:229,column:21},end:{line:232,column:6}},94:{start:{line:233,column:4},end:{line:233,column:41}},95:{start:{line:234,column:4},end:{line:234,column:20}},96:{start:{line:237,column:14},end:{line:237,column:26}},97:{start:{line:238,column:4},end:{line:238,column:53}},98:{start:{line:239,column:4},end:{line:239,column:49}},99:{start:{line:240,column:4},end:{line:251,column:6}},100:{start:{line:247,column:10},end:{line:247,column:29}},101:{start:{line:254,column:22},end:{line:254,column:62}}},fnMap:{0:{name:"buildInspectStyle",decl:{start:{line:20,column:9},end:{line:20,column:26}},loc:{start:{line:20,column:78},end:{line:45,column:1}},line:20},1:{name:"(anonymous_1)",decl:{start:{line:33,column:48},end:{line:33,column:49}},loc:{start:{line:33,column:62},end:{line:38,column:3}},line:33},2:{name:"(anonymous_2)",decl:{start:{line:48,column:17},end:{line:48,column:18}},loc:{start:{line:48,column:23},end:{line:49,column:5}},line:48},3:{name:"(anonymous_3)",decl:{start:{line:50,column:18},end:{line:50,column:19}},loc:{start:{line:50,column:24},end:{line:51,column:5}},line:50},4:{name:"(anonymous_4)",decl:{start:{line:52,column:19},end:{line:52,column:20}},loc:{start:{line:52,column:25},end:{line:53,column:5}},line:52},5:{name:"(anonymous_5)",decl:{start:{line:54,column:14},end:{line:54,column:15}},loc:{start:{line:54,column:20},end:{line:55,column:5}},line:54},6:{name:"(anonymous_6)",decl:{start:{line:59,column:2},end:{line:59,column:3}},loc:{start:{line:59,column:21},end:{line:70,column:3}},line:59},7:{name:"(anonymous_7)",decl:{start:{line:67,column:34},end:{line:67,column:35}},loc:{start:{line:67,column:40},end:{line:69,column:5}},line:67},8:{name:"(anonymous_8)",decl:{start:{line:71,column:2},end:{line:71,column:3}},loc:{start:{line:71,column:46},end:{line:78,column:3}},line:71},9:{name:"(anonymous_9)",decl:{start:{line:79,column:2},end:{line:79,column:3}},loc:{start:{line:79,column:23},end:{line:97,column:3}},line:79},10:{name:"(anonymous_10)",decl:{start:{line:93,column:17},end:{line:93,column:18}},loc:{start:{line:93,column:23},end:{line:95,column:7}},line:93},11:{name:"(anonymous_11)",decl:{start:{line:98,column:2},end:{line:98,column:3}},loc:{start:{line:98,column:22},end:{line:189,column:3}},line:98},12:{name:"(anonymous_12)",decl:{start:{line:112,column:26},end:{line:112,column:27}},loc:{start:{line:112,column:32},end:{line:116,column:5}},line:112},13:{name:"(anonymous_13)",decl:{start:{line:138,column:24},end:{line:138,column:25}},loc:{start:{line:138,column:44},end:{line:140,column:7}},line:138},14:{name:"(anonymous_14)",decl:{start:{line:141,column:25},end:{line:141,column:26}},loc:{start:{line:141,column:62},end:{line:141,column:141}},line:141},15:{name:"(anonymous_15)",decl:{start:{line:142,column:19},end:{line:142,column:20}},loc:{start:{line:142,column:33},end:{line:161,column:7}},line:142},16:{name:"(anonymous_16)",decl:{start:{line:144,column:36},end:{line:144,column:37}},loc:{start:{line:144,column:42},end:{line:146,column:11}},line:144},17:{name:"(anonymous_17)",decl:{start:{line:149,column:36},end:{line:149,column:37}},loc:{start:{line:149,column:42},end:{line:158,column:11}},line:149},18:{name:"(anonymous_18)",decl:{start:{line:164,column:25},end:{line:164,column:26}},loc:{start:{line:164,column:31},end:{line:172,column:5}},line:164},19:{name:"(anonymous_19)",decl:{start:{line:173,column:19},end:{line:173,column:20}},loc:{start:{line:173,column:26},end:{line:178,column:5}},line:173},20:{name:"(anonymous_20)",decl:{start:{line:179,column:20},end:{line:179,column:21}},loc:{start:{line:179,column:27},end:{line:181,column:5}},line:179},21:{name:"(anonymous_21)",decl:{start:{line:182,column:19},end:{line:182,column:20}},loc:{start:{line:182,column:27},end:{line:186,column:5}},line:182},22:{name:"(anonymous_22)",decl:{start:{line:190,column:22},end:{line:190,column:23}},loc:{start:{line:190,column:30},end:{line:193,column:3}},line:190},23:{name:"(anonymous_23)",decl:{start:{line:191,column:55},end:{line:191,column:56}},loc:{start:{line:191,column:66},end:{line:191,column:81}},line:191},24:{name:"(anonymous_24)",decl:{start:{line:194,column:2},end:{line:194,column:3}},loc:{start:{line:194,column:20},end:{line:235,column:3}},line:194},25:{name:"(anonymous_25)",decl:{start:{line:196,column:22},end:{line:196,column:23}},loc:{start:{line:196,column:40},end:{line:227,column:7}},line:196},26:{name:"(anonymous_26)",decl:{start:{line:236,column:2},end:{line:236,column:3}},loc:{start:{line:236,column:11},end:{line:252,column:3}},line:236},27:{name:"(anonymous_27)",decl:{start:{line:246,column:13},end:{line:246,column:14}},loc:{start:{line:246,column:20},end:{line:248,column:9}},line:246}},branchMap:{0:{loc:{start:{line:29,column:2},end:{line:31,column:3}},type:"if",locations:[{start:{line:29,column:2},end:{line:31,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:29},1:{loc:{start:{line:35,column:4},end:{line:37,column:5}},type:"if",locations:[{start:{line:35,column:4},end:{line:37,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:35},2:{loc:{start:{line:35,column:8},end:{line:35,column:64}},type:"binary-expr",locations:[{start:{line:35,column:8},end:{line:35,column:32}},{start:{line:35,column:36},end:{line:35,column:64}}],line:35},3:{loc:{start:{line:74,column:15},end:{line:74,column:131}},type:"binary-expr",locations:[{start:{line:74,column:15},end:{line:74,column:71}},{start:{line:74,column:75},end:{line:74,column:131}}],line:74},4:{loc:{start:{line:82,column:4},end:{line:87,column:5}},type:"if",locations:[{start:{line:82,column:4},end:{line:87,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:82},5:{loc:{start:{line:88,column:4},end:{line:90,column:5}},type:"if",locations:[{start:{line:88,column:4},end:{line:90,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:88},6:{loc:{start:{line:88,column:8},end:{line:88,column:98}},type:"binary-expr",locations:[{start:{line:88,column:8},end:{line:88,column:26}},{start:{line:88,column:30},end:{line:88,column:98}}],line:88},7:{loc:{start:{line:91,column:4},end:{line:96,column:5}},type:"if",locations:[{start:{line:91,column:4},end:{line:96,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:91},8:{loc:{start:{line:91,column:8},end:{line:91,column:59}},type:"binary-expr",locations:[{start:{line:91,column:8},end:{line:91,column:26}},{start:{line:91,column:30},end:{line:91,column:59}}],line:91},9:{loc:{start:{line:143,column:8},end:{line:160,column:9}},type:"if",locations:[{start:{line:143,column:8},end:{line:160,column:9}},{start:{line:148,column:15},end:{line:160,column:9}}],line:143},10:{loc:{start:{line:174,column:6},end:{line:174,column:40}},type:"if",locations:[{start:{line:174,column:6},end:{line:174,column:40}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:174}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGl.tsx"],names:[],mappings:"AA8LwB;AA9LxB,OAAO,WAAW;AAClB,SAAQ,kBAAiB;AACzB,OAAO,gBAAsI;AAC7I,OAAO,qBAAqB;AAC5B,OAAO,YAAY;AACnB,OAAO,6BAA6B;AACpC,OAAO,uCAAgE;AACvE,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,SAAgC,6BAA6B;AAC7D,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,sBAAoF;AAC3F,OAAO;AACP,SAAS,uBAA6C;AACtD,OAAO,aAAa;AACpB,SAAS,gBAAgB;AAEzB,SAAS,kBAAkB,kBAAsC,eAAmC,kBAAqC;AACvI,QAAM,kBAAkB;AAAA,IACtB,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,MACP,oBAAoB;AAAA,IACtB;AAAA,EACF;AAEA,QAAM,QAAQ,sBAAsB,gBAAgB;AACpD,MAAG,OAAO;AACR,kBAAc,KAAK,KAAK;AAAA,EAC1B;AAEA,QAAM,UAA+C,CAAC;AAEtD,SAAO,KAAK,iBAAiB,OAAO,EAAE,QAAQ,cAAY;AACxD,UAAM,SAAS,iBAAiB,QAAQ,QAAQ;AAChD,QAAG,OAAO,SAAS,YAAY,OAAO,SAAS,cAAc;AAC3D,cAAQ,QAAQ,IAAI;AAAA,IACtB;AAAA,EACF,CAAC;AAED,QAAM,eAAe;AAAA,IACnB,GAAG;AAAA,IACH;AAAA,IACA,QAAQ,CAAC,eAAe,EAAE,OAAO,aAAqC;AAAA,EACxE;AACA,SAAO;AACT;AAyBA,MAAM,8BAA8B,MAAM,UAA0D;AAAA,EAClG,OAAO,eAAe;AAAA,IACpB,aAAa,MAAM;AAAA,IAAC;AAAA,IACpB,cAAc,MAAM;AAAA,IAAC;AAAA,IACrB,eAAe,MAAM;AAAA,IAAC;AAAA,IACtB,UAAU,MAAM;AAAA,IAAC;AAAA,IACjB,SAAS,CAAC;AAAA,EACZ;AAAA,EACA,YAAmC;AAAA,EAEnC,YAAY,OAAmC;AAC7C,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,KAAK;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,MACV,aAAa;AAAA,IACf;AACA,YAAQ,GAAG,mBAAmB,MAAM;AAClC,WAAK,YAAY;AAAA,IACnB,CAAC;AAAA,EACH;AAAA,EAGA,sBAAsB,WAAuC,WAA+B;AAC1F,QAAI,SAAS;AACb,QAAI;AACF,eAAS,KAAK,UAAU,KAAK,KAAK,MAAM,KAAK,UAAU,SAAS,KAAK,KAAK,UAAU,KAAK,KAAK,MAAM,KAAK,UAAU,SAAS;AAAA,IAC9H,SAAQ,IAAI;AAAA,IAEZ;AACA,WAAO;AAAA,EACT;AAAA,EAEA,qBAAqB;AACnB,UAAM,MAAM,KAAK,MAAM;AAEvB,UAAM,kBAAkB,KAAK,MAAM,oBAAoB,KAAK,MAAM,QAAQ;AAC1E,QAAI,KAAK;AAIP,UAAI,SAAS,iBAAiB,EAAC,MAAM,KAAI,CAAC;AAC1C,UAAI,qBAAqB,KAAK,MAAM,SAAS;AAC7C,UAAI,qBAAqB,KAAK,MAAM,SAAS;AAC7C,UAAI,wBAAwB,KAAK,MAAM,SAAS;AAAA,IAClD;AAEA,QAAG,KAAK,MAAM,WAAW,KAAK,MAAM,uBAAuB,KAAK,MAAM,QAAQ,iBAAiB;AAC7F,WAAK,MAAM,QAAQ,gBAAgB;AAAA,IACrC;AACA,QAAI,KAAK,MAAM,WAAW,KAAK,MAAM,oBAAoB;AACvD,WAAK,MAAM,QAAQ,iBAAiB,eAAe;AAEnD,iBAAW,MAAM;AACf,aAAK,MAAM,QAAS,OAAO;AAAA,MAC7B,GAAG,GAAG;AAAA,IACR;AAAA,EAEF;AAAA,EAEA,oBAAoB;AAClB,UAAM,UAAU;AAAA,MACd,GAAG,KAAK,MAAM;AAAA,MACd,WAAW,KAAK;AAAA,MAChB,OAAO,KAAK,MAAM;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA;AAAA;AAAA,MAGT,0BAA0B;AAAA,IAC5B;AAEA,UAAM,WAAW,IAAI,SAAS,EAAC,UAAU,KAAI,CAAC;AAC9C,eAAW,YAAY,WAAU,SAAS,IAAI;AAC9C,UAAM,MAAM,IAAI,WAAW,IAAI,OAAO;AAEtC,UAAM,gBAAgB,MAAM;AAC1B,YAAM,SAAS,IAAI,UAAU;AAC7B,YAAM,OAAO,IAAI,QAAQ;AACzB,WAAK,MAAM,SAAS,EAAC,QAAQ,KAAI,CAAC;AAAA,IACpC;AACA,kBAAc;AAEd,QAAI,qBAAqB,QAAQ;AACjC,QAAI,qBAAqB,QAAQ;AACjC,QAAI,wBAAwB,QAAQ;AAEpC,UAAM,WAAW,KAAK,aAAa,GAAG;AAEtC,UAAM,cAAc,IAAI,YAAY;AACpC,QAAI,WAAW,aAAa,WAAW;AAEvC,UAAM,MAAM,IAAI,WAAW,kBAAkB,EAAC,gBAAe,KAAI,CAAC;AAClE,QAAI,WAAW,KAAK,WAAW;AAE/B,UAAM,UAAU,SAAS,cAAc,KAAK;AAC5C,UAAM,OAAO,WAAW,OAAO;AAE/B,UAAM,eAAe,IAAI,WAAW,MAAM;AAAA,MACxC,cAAc;AAAA,IAChB,CAAC;AAED,UAAM,UAAU,IAAI,gBAAgB;AAAA,MAClC,OAAO;AAAA,MACP,cAAc;AAAA,MACd,qBAAqB;AAAA,MACrB,4BAA4B;AAAA,MAC5B,mBAAmB;AAAA,MACnB,wBAAwB;AAAA,MACxB,kBAAkB,CAAC,SAAiB,UAAkB;AACpD,eAAO,MAAM,OAAO,YAAY,SAAS,KAAK,CAAC,EAAE,WAAW,GAAG,EAAE,OAAO;AAAA,MAC1E;AAAA,MACA,mBAAmB,CAAC,kBAAsC,kBAAsC,kBAAkB,kBAAkB,eAAe,KAAK,MAAM,gBAAgB;AAAA,MAC9K,aAAa,CAAC,aAA+B;AAC3C,YAAG,KAAK,MAAM,oBAAoB;AAChC,uBAAa,KAAK,QAAQ,MAAM;AAC9B,iBAAK,OAAO,oBAAC,qCAAkC,UAAoB,CAAE;AAAA,UACvE,CAAC;AACD,iBAAO;AAAA,QACT,OAAO;AACL,uBAAa,KAAK,QAAQ,MAAM;AAC9B,iBAAK,OAAO;AAAA,cAAC;AAAA;AAAA,gBACX;AAAA,gBACA,eAAe,KAAK;AAAA,gBACpB,MAAM,KAAK,MAAM;AAAA;AAAA,YACnB,CAAG;AAAA,UACL,CAAC;AACD,iBAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF,CAAC;AACD,QAAI,WAAW,OAAO;AAEtB,QAAI,GAAG,cAAc,MAAM;AACzB,WAAK,SAAS;AAAA,QACZ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,MAAM,IAAI,QAAQ;AAAA,MACpB,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,QAAQ,OAAK;AAClB,UAAG,EAAE,aAAa,OAAQ;AAC1B,WAAK,MAAM,aAAc;AAAA,QACvB,KAAK,KAAK,MAAM;AAAA,MAClB,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,SAAS,OAAK;AACnB,cAAQ,IAAI,SAAS,CAAC;AAAA,IACxB,CAAC;AAED,QAAI,GAAG,QAAQ,QAAM;AACnB,WAAK,SAAS;AAAA,QACZ,MAAM,IAAI,QAAQ;AAAA,MACpB,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,WAAW,aAAa;AAC/B,QAAI,GAAG,WAAW,aAAa;AAAA,EACjC;AAAA,EAEA,oBAAoB,CAAC,OAAe;AAClC,UAAM,QAAQ,KAAK,MAAM,SAAS,OAAO,UAAU,WAAS,MAAM,OAAO,EAAE;AAC3E,SAAK,MAAM,cAAc,KAAK;AAAA,EAChC;AAAA,EAEA,aAAa,KAAU;AACrB,UAAM,iBAAiB;AAAA,MACrB,gBAAgB,OAAO,WAAsC;AAC3D,cAAM,WAAW,CAAC;AAClB,YAAI;AACF,gBAAM,UAAU,gDAAgD,OAAO,KAAK;AAC5E,gBAAM,WAAW,MAAM,MAAM,OAAO;AACpC,gBAAM,UAAU,MAAM,SAAS,KAAK;AACpC,qBAAW,WAAW,QAAQ,UAAU;AACtC,kBAAM,SAAS;AAAA,cACb,QAAQ,KAAK,CAAC,KACT,QAAQ,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,KAAK;AAAA,cAC1C,QAAQ,KAAK,CAAC,KACT,QAAQ,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,KAAK;AAAA,YAC5C;AACA,kBAAM,QAAQ;AAAA,cACZ,MAAM;AAAA,cACN,UAAU;AAAA,gBACR,MAAM;AAAA,gBACN,aAAa;AAAA,cACf;AAAA,cACA,YAAY,QAAQ,WAAW;AAAA,cAC/B,YAAY,QAAQ;AAAA,cACpB,MAAM,QAAQ,WAAW;AAAA,cACzB,YAAY,CAAC,OAAO;AAAA,cACpB;AAAA,YACF;AACA,qBAAS,KAAK,KAAK;AAAA,UACrB;AAAA,QACF,SAAS,GAAG;AACV,kBAAQ,MAAM,wCAAwC,CAAC,EAAE;AAAA,QAC3D;AACA,eAAO;AAAA,UACL;AAAA,QACF;AAAA,MACF;AAAA,IACF;AACA,UAAM,WAAW,IAAI,iBAAiB,gBAAgB;AAAA,MACpD,aAAa,KAAK,MAAM,EAAE,QAAQ;AAAA,MAClC,YAAY;AAAA,IACd,CAAC;AACD,QAAI,WAAW,UAAU,UAAU;AACnC,WAAO;AAAA,EACT;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,SAAK,MAAM,UAAU,eAAe,EAAE,QAAQ,CAAC;AAC/C,SAAK,MAAM,aAAa,SAAS,EAAE,OAAO,CAAC;AAC3C,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,MAAK;AAAA,QACL,cAAY,EAAE,UAAU;AAAA,QACxB,KAAK,OAAK;AAAC,eAAK,YAAY;AAAA,QAAE;AAAA,QAC9B,eAAY;AAAA;AAAA,IACb;AAAA,EACH;AACF;AAEA,MAAM,gBAAgB,gBAAgB,EAAE,qBAAqB;AAC7D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1655c5d10102378b1e2627d777374c6f3c3f21a7"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return tn=function(){return s},s}tn();function Tpe(n,e,t){tn().f[0]++;const i=(tn().s[0]++,{id:"background",type:"background",paint:{"background-color":"#1c1f24"}}),r=(tn().s[1]++,cpe(t));tn().s[2]++,r?(tn().b[0][0]++,tn().s[3]++,e.push(r)):tn().b[0][1]++;const o=(tn().s[4]++,{});tn().s[5]++,Object.keys(n.sources).forEach(a=>{tn().f[1]++;const c=(tn().s[6]++,n.sources[a]);tn().s[7]++,tn().b[2][0]++,c.type!=="raster"&&(tn().b[2][1]++,c.type!=="raster-dem")?(tn().b[1][0]++,tn().s[8]++,o[a]=c):tn().b[1][1]++});const s=(tn().s[9]++,{...n,sources:o,layers:[i].concat(e)});return tn().s[10]++,s}class Rpe extends En.Component{static defaultProps=(tn().s[11]++,{onMapLoaded:()=>{tn().f[2]++},onDataChange:()=>{tn().f[3]++},onLayerSelect:()=>{tn().f[4]++},onChange:()=>{tn().f[5]++},options:{}});container=(tn().s[12]++,null);constructor(e){tn().f[6]++,tn().s[13]++,super(e),tn().s[14]++,this.state={map:null,inspect:null,geocoder:null,zoomControl:null},tn().s[15]++,cA.on("languageChanged",()=>{tn().f[7]++,tn().s[16]++,this.forceUpdate()})}shouldComponentUpdate(e,t){tn().f[8]++;let i=(tn().s[17]++,!1);tn().s[18]++;try{tn().s[19]++,i=(tn().b[3][0]++,JSON.stringify(this.props)!==JSON.stringify(e)||(tn().b[3][1]++,JSON.stringify(this.state)!==JSON.stringify(t)))}catch{}return tn().s[20]++,i}componentDidUpdate(){tn().f[9]++;const e=(tn().s[21]++,this.state.map),t=(tn().s[22]++,this.props.replaceAccessTokens(this.props.mapStyle));tn().s[23]++,e?(tn().b[4][0]++,tn().s[24]++,e.setStyle(t,{diff:!0}),tn().s[25]++,e.showTileBoundaries=this.props.options?.showTileBoundaries,tn().s[26]++,e.showCollisionBoxes=this.props.options?.showCollisionBoxes,tn().s[27]++,e.showOverdrawInspector=this.props.options?.showOverdrawInspector):tn().b[4][1]++,tn().s[28]++,tn().b[6][0]++,this.state.inspect&&(tn().b[6][1]++,this.props.inspectModeEnabled!==this.state.inspect._showInspectMap)?(tn().b[5][0]++,tn().s[29]++,this.state.inspect.toggleInspector()):tn().b[5][1]++,tn().s[30]++,tn().b[8][0]++,this.state.inspect&&(tn().b[8][1]++,this.props.inspectModeEnabled)?(tn().b[7][0]++,tn().s[31]++,this.state.inspect.setOriginalStyle(t),tn().s[32]++,setTimeout(()=>{tn().f[10]++,tn().s[33]++,this.state.inspect.render()},500)):tn().b[7][1]++}componentDidMount(){tn().f[11]++;const e=(tn().s[34]++,{...this.props.options,container:this.container,style:this.props.mapStyle,hash:!0,maxZoom:24,localIdeographFontFamily:!1}),t=(tn().s[35]++,new Nue({metadata:!0}));tn().s[36]++,l_.addProtocol("pmtiles",t.tile);const i=(tn().s[37]++,new l_.Map(e));tn().s[38]++;const r=()=>{tn().f[12]++;const x=(tn().s[39]++,i.getCenter()),_=(tn().s[40]++,i.getZoom());tn().s[41]++,this.props.onChange({center:x,zoom:_})};tn().s[42]++,r(),tn().s[43]++,i.showTileBoundaries=e.showTileBoundaries,tn().s[44]++,i.showCollisionBoxes=e.showCollisionBoxes,tn().s[45]++,i.showOverdrawInspector=e.showOverdrawInspector;const o=(tn().s[46]++,this.initGeocoder(i)),s=(tn().s[47]++,new ape);tn().s[48]++,i.addControl(s,"top-right");const a=(tn().s[49]++,new l_.NavigationControl({visualizePitch:!0}));tn().s[50]++,i.addControl(a,"top-right");const c=(tn().s[51]++,document.createElement("div")),A=(tn().s[52]++,jH.createRoot(c)),m=(tn().s[53]++,new l_.Popup({closeOnClick:!1})),v=(tn().s[54]++,new sP({popup:m,showMapPopup:!0,showMapPopupOnHover:!1,showInspectMapPopupOnHover:!0,showInspectButton:!1,blockHoverPopupOnClick:!0,assignLayerColor:(x,_)=>(tn().f[13]++,tn().s[55]++,Ru(RX.brightColor(x,_)).desaturate(.5).string()),buildInspectStyle:(x,_)=>(tn().f[14]++,tn().s[56]++,Tpe(x,_,this.props.highlightedLayer)),renderPopup:x=>(tn().f[15]++,tn().s[57]++,this.props.inspectModeEnabled?(tn().b[9][0]++,tn().s[58]++,m.once("open",()=>{tn().f[16]++,tn().s[59]++,A.render(ie.jsx($fe,{features:x}))}),tn().s[60]++,c):(tn().b[9][1]++,tn().s[61]++,m.once("open",()=>{tn().f[17]++,tn().s[62]++,A.render(ie.jsx(LX,{features:x,onLayerSelect:this.onLayerSelectById,zoom:this.state.zoom}))}),tn().s[63]++,c))}));tn().s[64]++,i.addControl(v),tn().s[65]++,i.on("style.load",()=>{tn().f[18]++,tn().s[66]++,this.setState({map:i,inspect:v,geocoder:o,zoomControl:s,zoom:i.getZoom()})}),tn().s[67]++,i.on("data",x=>{if(tn().f[19]++,tn().s[68]++,x.dataType!=="tile"){tn().b[10][0]++,tn().s[69]++;return}else tn().b[10][1]++;tn().s[70]++,this.props.onDataChange({map:this.state.map})}),tn().s[71]++,i.on("error",x=>{tn().f[20]++,tn().s[72]++,console.log("ERROR",x)}),tn().s[73]++,i.on("zoom",x=>{tn().f[21]++,tn().s[74]++,this.setState({zoom:i.getZoom()})}),tn().s[75]++,i.on("dragend",r),tn().s[76]++,i.on("zoomend",r)}onLayerSelectById=(tn().s[77]++,e=>{tn().f[22]++;const t=(tn().s[78]++,this.props.mapStyle.layers.findIndex(i=>(tn().f[23]++,tn().s[79]++,i.id===e)));tn().s[80]++,this.props.onLayerSelect(t)});initGeocoder(e){tn().f[24]++;const t=(tn().s[81]++,{forwardGeocode:async r=>{tn().f[25]++;const o=(tn().s[82]++,[]);tn().s[83]++;try{const s=(tn().s[84]++,`https://nominatim.openstreetmap.org/search?q=${r.query}&format=geojson&polygon_geojson=1&addressdetails=1`),a=(tn().s[85]++,await fetch(s)),c=(tn().s[86]++,await a.json());tn().s[87]++;for(const A of c.features){const m=(tn().s[88]++,[A.bbox[0]+(A.bbox[2]-A.bbox[0])/2,A.bbox[1]+(A.bbox[3]-A.bbox[1])/2]),v=(tn().s[89]++,{type:"Feature",geometry:{type:"Point",coordinates:m},place_name:A.properties.display_name,properties:A.properties,text:A.properties.display_name,place_type:["place"],center:m});tn().s[90]++,o.push(v)}}catch(s){tn().s[91]++,console.error(`Failed to forwardGeocode with error: ${s}`)}return tn().s[92]++,{features:o}}}),i=(tn().s[93]++,new kpe(t,{placeholder:this.props.t("Search"),maplibregl:l_}));return tn().s[94]++,e.addControl(i,"top-left"),tn().s[95]++,i}render(){tn().f[26]++;const e=(tn().s[96]++,this.props.t);return tn().s[97]++,this.state.geocoder?.setPlaceholder(e("Search")),tn().s[98]++,this.state.zoomControl?.setLabel(e("Zoom:")),tn().s[99]++,ie.jsx("div",{className:"maputnik-map__map",role:"region","aria-label":e("Map view"),ref:t=>{tn().f[27]++,tn().s[100]++,this.container=t},"data-wd-key":"maplibre:map"})}}const Dpe=(tn().s[101]++,Jo()(Rpe));var Ppe=8,Upe={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"}},Kpe={"*":{type:"source"}},Lpe=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Fpe={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:"*"}},zpe={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:"*"}},jpe={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:"*"}},Npe={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"}},Gpe={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"}}},Wpe={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"}}},Qpe={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},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"}},qpe=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],Ype={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},$pe={"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"}},Vpe={"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"}},Hpe={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Zpe={"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"}},Xpe={"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"}},Jpe={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},eme={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},tme={type:"array",value:"*"},nme={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},ime={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},rme={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},ome={type:"array",value:"*",minimum:1},sme={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}},ame={"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}},lme={source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},ume={type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},cme=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],Ame={"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"}},hme={"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"}},dme={"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"}},fme={"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"}},pme={"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"}},mme={"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"}},gme={"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"}},yme={"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"}},vme={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},bme={"*":{type:"string"}},Cme={$version:Ppe,$root:Upe,sources:Kpe,source:Lpe,source_vector:Fpe,source_raster:zpe,source_raster_dem:jpe,source_geojson:Npe,source_video:Gpe,source_image:Wpe,layer:Qpe,layout:qpe,layout_background:Ype,layout_fill:$pe,layout_circle:Vpe,layout_heatmap:Hpe,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Zpe,layout_symbol:Xpe,layout_raster:Jpe,layout_hillshade:eme,"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:tme,filter_operator:nme,geometry_type:ime,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:rme,expression:ome,light:sme,sky:ame,terrain:lme,projection:ume,paint:cme,paint_fill:Ame,"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:hme,paint_circle:dme,paint_heatmap:fme,paint_symbol:pme,paint_raster:mme,paint_hillshade:gme,"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"}},paint_background:yme,transition:vme,"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:bme};const _me=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function xme(n,e){const t={};for(const i in n)i!=="ref"&&(t[i]=n[i]);return _me.forEach(i=>{i in e&&(t[i]=e[i])}),t}function GX(n){n=n.slice();const e=Object.create(null);for(let t=0;t<n.length;t++)e[n[t].id]=n[t];for(let t=0;t<n.length;t++)"ref"in n[t]&&(n[t]=xme(n[t],e[n[t].ref]));return n}class mg extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}class lP{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[i,r]of t)this.bindings[i]=r}concat(e){return new lP(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1}}const uE={kind:"null"},ii={kind:"number"},Co={kind:"string"},so={kind:"boolean"},kg={kind:"color"},cE={kind:"projectionDefinition"},Ab={kind:"object"},to={kind:"value"},Mme={kind:"error"},AE={kind:"collator"},hE={kind:"formatted"},dE={kind:"padding"},k3={kind:"colorArray"},fE={kind:"numberArray"},F4={kind:"resolvedImage"},pE={kind:"variableAnchorOffsetCollection"};function Jd(n,e){return{kind:"array",itemType:n,N:e}}function ll(n){if(n.kind==="array"){const e=ll(n.itemType);return typeof n.N=="number"?`array<${e}, ${n.N}>`:n.itemType.kind==="value"?"array":`array<${e}>`}else return n.kind}const wme=[uE,ii,Co,so,kg,cE,hE,Ab,Jd(to),dE,fE,k3,F4,pE];function T3(n,e){if(e.kind==="error")return null;if(n.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!T3(n.itemType,e.itemType))&&(typeof n.N!="number"||n.N===e.N))return null}else{if(n.kind===e.kind)return null;if(n.kind==="value"){for(const t of wme)if(!T3(t,e))return null}}return`Expected ${ll(n)} but found ${ll(e)} instead.`}function uP(n,e){return e.some(t=>t.kind===n.kind)}function hb(n,e){return e.some(t=>t==="null"?n===null:t==="array"?Array.isArray(n):t==="object"?n&&!Array.isArray(n)&&typeof n=="object":t===typeof n)}function ay(n,e){return n.kind==="array"&&e.kind==="array"?n.itemType.kind===e.itemType.kind&&typeof n.N=="number":n.kind===e.kind}const WX=.96422,QX=1,qX=.82521,YX=4/29,T_=6/29,$X=3*T_*T_,Sme=T_*T_*T_,Eme=Math.PI/180,Ome=180/Math.PI;function VX(n){return n=n%360,n<0&&(n+=360),n}function HX([n,e,t,i]){n=wO(n),e=wO(e),t=wO(t);let r,o;const s=SO((.2225045*n+.7168786*e+.0606169*t)/QX);n===e&&e===t?r=o=s:(r=SO((.4360747*n+.3850649*e+.1430804*t)/WX),o=SO((.0139322*n+.0971045*e+.7141733*t)/qX));const a=116*s-16;return[a<0?0:a,500*(r-s),200*(s-o),i]}function wO(n){return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function SO(n){return n>Sme?Math.pow(n,1/3):n/$X+YX}function ZX([n,e,t,i]){let r=(n+16)/116,o=isNaN(e)?r:r+e/500,s=isNaN(t)?r:r-t/200;return r=QX*OO(r),o=WX*OO(o),s=qX*OO(s),[EO(3.1338561*o-1.6168667*r-.4906146*s),EO(-.9787684*o+1.9161415*r+.033454*s),EO(.0719453*o-.2289914*r+1.4052427*s),i]}function EO(n){return n=n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055,n<0?0:n>1?1:n}function OO(n){return n>T_?n*n*n:$X*(n-YX)}function Bme(n){const[e,t,i,r]=HX(n),o=Math.sqrt(t*t+i*i);return[Math.round(o*1e4)?VX(Math.atan2(i,t)*Ome):NaN,o,e,r]}function Ime([n,e,t,i]){return n=isNaN(n)?0:n*Eme,ZX([t,Math.cos(n)*e,Math.sin(n)*e,i])}function kme([n,e,t,i]){n=VX(n),e/=100,t/=100;function r(o){const s=(o+n/30)%12,a=e*Math.min(t,1-t);return t-a*Math.max(-1,Math.min(s-3,9-s,1))}return[r(0),r(8),r(4),i]}const Tme=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function XX(n,e){return Tme(n,e)?n[e]:void 0}function Rme(n){if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];const e=XX(Dme,n);if(e){const[r,o,s]=e;return[r/255,o/255,s/255,1]}if(n.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(n)){const o=n.length<6?1:2;let s=1;return[TM(n.slice(s,s+=o)),TM(n.slice(s,s+=o)),TM(n.slice(s,s+=o)),TM(n.slice(s,s+o)||"ff")]}if(n.startsWith("rgb")){const r=/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,o=n.match(r);if(o){const[s,a,c,A,m,v,x,_,O,P,F,j]=o,Q=[A||" ",x||" ",P].join("");if(Q===" "||Q===" /"||Q===",,"||Q===",,,"){const V=[c,v,O].join(""),H=V==="%%%"?100:V===""?255:0;if(H){const G=[u_(+a/H,0,1),u_(+m/H,0,1),u_(+_/H,0,1),F?iz(+F,j):1];if(rz(G))return G}}return}}const t=/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,i=n.match(t);if(i){const[r,o,s,a,c,A,m,v,x]=i,_=[s||" ",c||" ",m].join("");if(_===" "||_===" /"||_===",,"||_===",,,"){const O=[+o,u_(+a,0,100),u_(+A,0,100),v?iz(+v,x):1];if(rz(O))return kme(O)}}}function TM(n){return parseInt(n.padEnd(2,n),16)/255}function iz(n,e){return u_(e?n/100:n,0,1)}function u_(n,e,t){return Math.min(Math.max(e,n),t)}function rz(n){return!n.some(Number.isNaN)}const Dme={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 db(n,e,t){return n+t*(e-n)}function R3(n,e,t){return n.map((i,r)=>db(i,e[r],t))}class Zs{constructor(e,t,i,r=1,o=!0){this.r=e,this.g=t,this.b=i,this.a=r,o||(this.r*=r,this.g*=r,this.b*=r,r||this.overwriteGetter("rgb",[e,t,i,r]))}static parse(e){if(e instanceof Zs)return e;if(typeof e!="string")return;const t=Rme(e);if(t)return new Zs(...t,!1)}get rgb(){const{r:e,g:t,b:i,a:r}=this,o=r||1/0;return this.overwriteGetter("rgb",[e/o,t/o,i/o,r])}get hcl(){return this.overwriteGetter("hcl",Bme(this.rgb))}get lab(){return this.overwriteGetter("lab",HX(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){const[e,t,i,r]=this.rgb;return`rgba(${[e,t,i].map(o=>Math.round(o*255)).join(",")},${r})`}static interpolate(e,t,i,r="rgb"){switch(r){case"rgb":{const[o,s,a,c]=R3(e.rgb,t.rgb,i);return new Zs(o,s,a,c,!1)}case"hcl":{const[o,s,a,c]=e.hcl,[A,m,v,x]=t.hcl;let _,O;if(!isNaN(o)&&!isNaN(A)){let V=A-o;A>o&&V>180?V-=360:A<o&&o-A>180&&(V+=360),_=o+i*V}else isNaN(o)?isNaN(A)?_=NaN:(_=A,(a===1||a===0)&&(O=m)):(_=o,(v===1||v===0)&&(O=s));const[P,F,j,Q]=Ime([_,O??db(s,m,i),db(a,v,i),db(c,x,i)]);return new Zs(P,F,j,Q,!1)}case"lab":{const[o,s,a,c]=ZX(R3(e.lab,t.lab,i));return new Zs(o,s,a,c,!1)}}}}Zs.black=new Zs(0,0,0,1);Zs.white=new Zs(1,1,1,1);Zs.transparent=new Zs(0,0,0,0);Zs.red=new Zs(1,0,0,1);class cP{constructor(e,t,i){e?this.sensitivity=t?"variant":"case":this.sensitivity=t?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const Pme=["bottom","center","top"];class _9{constructor(e,t,i,r,o,s){this.text=e,this.image=t,this.scale=i,this.fontStack=r,this.textColor=o,this.verticalAlign=s}}class q0{constructor(e){this.sections=e}static fromString(e){return new q0([new _9(e,null,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof q0?e:q0.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}}class sm{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof sm)return e;if(typeof e=="number")return new sm([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const t of e)if(typeof t!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]];break}return new sm(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,i){return new sm(R3(e.values,t.values,i))}}class am{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof am)return e;if(typeof e=="number")return new am([e]);if(Array.isArray(e)){for(const t of e)if(typeof t!="number")return;return new am(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,i){return new am(R3(e.values,t.values,i))}}class tf{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tf)return e;if(typeof e=="string"){const i=Zs.parse(e);return i?new tf([i]):void 0}if(!Array.isArray(e))return;const t=[];for(const i of e){if(typeof i!="string")return;const r=Zs.parse(i);if(!r)return;t.push(r)}return new tf(t)}toString(){return JSON.stringify(this.values)}static interpolate(e,t,i,r="rgb"){const o=[];if(e.values.length!=t.values.length)throw new Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${t.values.length}), cannot interpolate.`);for(let s=0;s<e.values.length;s++)o.push(Zs.interpolate(e.values[s],t.values[s],i,r));return new tf(o)}}class yl extends Error{constructor(e){super(e),this.name="RuntimeError"}toJSON(){return this.message}}const Ume=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Tg{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Tg)return e;if(!(!Array.isArray(e)||e.length<1||e.length%2!==0)){for(let t=0;t<e.length;t+=2){const i=e[t],r=e[t+1];if(typeof i!="string"||!Ume.has(i)||!Array.isArray(r)||r.length!==2||typeof r[0]!="number"||typeof r[1]!="number")return}return new Tg(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,i){const r=e.values,o=t.values;if(r.length!==o.length)throw new yl(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);const s=[];for(let a=0;a<r.length;a+=2){if(r[a]!==o[a])throw new yl(`Cannot interpolate values containing mismatched anchors. from[${a}]: ${r[a]}, to[${a}]: ${o[a]}`);s.push(r[a]);const[c,A]=r[a+1],[m,v]=o[a+1];s.push([db(c,m,i),db(A,v,i)])}return new Tg(s)}}class ev{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new ev({name:e,available:!1}):null}}class tm{constructor(e,t,i){this.from=e,this.to=t,this.transition=i}static interpolate(e,t,i){return new tm(e,t,i)}static parse(e){if(e instanceof tm)return e;if(Array.isArray(e)&&e.length===3&&typeof e[0]=="string"&&typeof e[1]=="string"&&typeof e[2]=="number")return new tm(e[0],e[1],e[2]);if(typeof e=="object"&&typeof e.from=="string"&&typeof e.to=="string"&&typeof e.transition=="number")return new tm(e.from,e.to,e.transition);if(typeof e=="string")return new tm(e,e,1)}}function JX(n,e,t,i){return typeof n=="number"&&n>=0&&n<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255?typeof i>"u"||typeof i=="number"&&i>=0&&i<=1?null:`Invalid rgba value [${[n,e,t,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof i=="number"?[n,e,t,i]:[n,e,t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function D3(n){if(n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number"||n instanceof tm||n instanceof Zs||n instanceof cP||n instanceof q0||n instanceof sm||n instanceof am||n instanceof tf||n instanceof Tg||n instanceof ev)return!0;if(Array.isArray(n)){for(const e of n)if(!D3(e))return!1;return!0}else if(typeof n=="object"){for(const e in n)if(!D3(n[e]))return!1;return!0}else return!1}function Uu(n){if(n===null)return uE;if(typeof n=="string")return Co;if(typeof n=="boolean")return so;if(typeof n=="number")return ii;if(n instanceof Zs)return kg;if(n instanceof tm)return cE;if(n instanceof cP)return AE;if(n instanceof q0)return hE;if(n instanceof sm)return dE;if(n instanceof am)return fE;if(n instanceof tf)return k3;if(n instanceof Tg)return pE;if(n instanceof ev)return F4;if(Array.isArray(n)){const e=n.length;let t;for(const i of n){const r=Uu(i);if(!t)t=r;else{if(t===r)continue;t=to;break}}return Jd(t||to,e)}else return Ab}function e3(n){const e=typeof n;return n===null?"":e==="string"||e==="number"||e==="boolean"?String(n):n instanceof Zs||n instanceof tm||n instanceof q0||n instanceof sm||n instanceof am||n instanceof tf||n instanceof Tg||n instanceof ev?n.toString():JSON.stringify(n)}class ex{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(e.length!==2)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!D3(e[1]))return t.error("invalid value");const i=e[1];let r=Uu(i);const o=t.expectedType;return r.kind==="array"&&r.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(r=o),new ex(r,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const RM={string:Co,number:ii,boolean:so,object:Ab};class nm{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let i=1,r;const o=e[0];if(o==="array"){let a;if(e.length>2){const A=e[1];if(typeof A!="string"||!(A in RM)||A==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);a=RM[A],i++}else a=to;let c;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);c=e[2],i++}r=Jd(a,c)}else{if(!RM[o])throw new Error(`Types doesn't contain name = ${o}`);r=RM[o]}const s=[];for(;i<e.length;i++){const a=t.parse(e[i],i,to);if(!a)return null;s.push(a)}return new nm(r,s)}evaluate(e){for(let t=0;t<this.args.length;t++){const i=this.args[t].evaluate(e);if(T3(this.type,Uu(i))){if(t===this.args.length-1)throw new yl(`Expected value to be of type ${ll(this.type)}, but found ${ll(Uu(i))} instead.`)}else return i}throw new Error}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}const oz={"to-boolean":so,"to-color":kg,"to-number":ii,"to-string":Co};class Ey{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const i=e[0];if(!oz[i])throw new Error(`Can't parse ${i} as it is not part of the known types`);if((i==="to-boolean"||i==="to-string")&&e.length!==2)return t.error("Expected one argument.");const r=oz[i],o=[];for(let s=1;s<e.length;s++){const a=t.parse(e[s],s,to);if(!a)return null;o.push(a)}return new Ey(r,o)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let t,i;for(const r of this.args){if(t=r.evaluate(e),i=null,t instanceof Zs)return t;if(typeof t=="string"){const o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&(t.length<3||t.length>4?i=`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:i=JX(t[0],t[1],t[2],t[3]),!i))return new Zs(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new yl(i||`Could not parse color from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"padding":{let t;for(const i of this.args){t=i.evaluate(e);const r=sm.parse(t);if(r)return r}throw new yl(`Could not parse padding from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"numberArray":{let t;for(const i of this.args){t=i.evaluate(e);const r=am.parse(t);if(r)return r}throw new yl(`Could not parse numberArray from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"colorArray":{let t;for(const i of this.args){t=i.evaluate(e);const r=tf.parse(t);if(r)return r}throw new yl(`Could not parse colorArray from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(const i of this.args){t=i.evaluate(e);const r=Tg.parse(t);if(r)return r}throw new yl(`Could not parse variableAnchorOffsetCollection from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(const i of this.args){if(t=i.evaluate(e),t===null)return 0;const r=Number(t);if(!isNaN(r))return r}throw new yl(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return q0.fromString(e3(this.args[0].evaluate(e)));case"resolvedImage":return ev.fromString(e3(this.args[0].evaluate(e)));case"projectionDefinition":return this.args[0].evaluate(e);default:return e3(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}const Kme=["Unknown","Point","LineString","Polygon"];class eJ{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"?Kme[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache.get(e);return t||(t=Zs.parse(e),this._parseColorCache.set(e,t)),t}}class mE{constructor(e,t,i=[],r,o=new lP,s=[]){this.registry=e,this.path=i,this.key=i.map(a=>`[${a}]`).join(""),this.scope=o,this.errors=s,this.expectedType=r,this._isConstant=t}parse(e,t,i,r,o={}){return t?this.concat(t,i,r)._parse(e,o):this._parse(e,o)}_parse(e,t){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);function i(r,o,s){return s==="assert"?new nm(o,[r]):s==="coerce"?new Ey(o,[r]):r}if(Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const r=e[0];if(typeof r!="string")return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const o=this.registry[r];if(o){let s=o.parse(e,this);if(!s)return null;if(this.expectedType){const a=this.expectedType,c=s.type;if((a.kind==="string"||a.kind==="number"||a.kind==="boolean"||a.kind==="object"||a.kind==="array")&&c.kind==="value")s=i(s,a,t.typeAnnotation||"assert");else if(a.kind==="projectionDefinition"&&["string","array"].includes(c.kind)||["color","formatted","resolvedImage"].includes(a.kind)&&["value","string"].includes(c.kind)||["padding","numberArray"].includes(a.kind)&&["value","number","array"].includes(c.kind)||a.kind==="colorArray"&&["value","string","array"].includes(c.kind)||a.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(c.kind))s=i(s,a,t.typeAnnotation||"coerce");else if(this.checkSubtype(a,c))return null}if(!(s instanceof ex)&&s.type.kind!=="resolvedImage"&&this._isConstant(s)){const a=new eJ;try{s=new ex(s.type,s.evaluate(a))}catch(c){return this.error(c.message),null}}return s}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):typeof e=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,t,i){const r=typeof e=="number"?this.path.concat(e):this.path,o=i?this.scope.concat(i):this.scope;return new mE(this.registry,this._isConstant,r,t||null,o,this.errors)}error(e,...t){const i=`${this.key}${t.map(r=>`[${r}]`).join("")}`;this.errors.push(new mg(i,e))}checkSubtype(e,t){const i=T3(e,t);return i&&this.error(i),i}}class gE{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const i=[];for(let o=1;o<e.length-1;o+=2){const s=e[o];if(typeof s!="string")return t.error(`Expected string, but found ${typeof s} instead.`,o);if(/[^a-zA-Z0-9_]/.test(s))return t.error("Variable names must contain only alphanumeric characters or '_'.",o);const a=t.parse(e[o+1],o+1);if(!a)return null;i.push([s,a])}const r=t.parse(e[e.length-1],e.length-1,t.expectedType,i);return r?new gE(i,r):null}outputDefined(){return this.result.outputDefined()}}class yE{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(e.length!==2||typeof e[1]!="string")return t.error("'var' expression requires exactly one string literal argument.");const i=e[1];return t.scope.has(i)?new yE(i,t.scope.get(i)):t.error(`Unknown variable "${i}". Make sure "${i}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}}class AP{constructor(e,t,i){this.type=e,this.index=t,this.input=i}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const i=t.parse(e[1],1,ii),r=t.parse(e[2],2,Jd(t.expectedType||to));if(!i||!r)return null;const o=r.type;return new AP(o.itemType,i,r)}evaluate(e){const t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new yl(`Array index out of bounds: ${t} < 0.`);if(t>=i.length)throw new yl(`Array index out of bounds: ${t} > ${i.length-1}.`);if(t!==Math.floor(t))throw new yl(`Array index must be an integer, but found ${t} instead.`);return i[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class hP{constructor(e,t){this.type=so,this.needle=e,this.haystack=t}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const i=t.parse(e[1],1,to),r=t.parse(e[2],2,to);return!i||!r?null:uP(i.type,[so,Co,ii,uE,to])?new hP(i,r):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${ll(i.type)} instead`)}evaluate(e){const t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!i)return!1;if(!hb(t,["boolean","string","number","null"]))throw new yl(`Expected first argument to be of type boolean, string, number or null, but found ${ll(Uu(t))} instead.`);if(!hb(i,["string","array"]))throw new yl(`Expected second argument to be of type array or string, but found ${ll(Uu(i))} instead.`);return i.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class kw{constructor(e,t,i){this.type=ii,this.needle=e,this.haystack=t,this.fromIndex=i}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const i=t.parse(e[1],1,to),r=t.parse(e[2],2,to);if(!i||!r)return null;if(!uP(i.type,[so,Co,ii,uE,to]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${ll(i.type)} instead`);if(e.length===4){const o=t.parse(e[3],3,ii);return o?new kw(i,r,o):null}else return new kw(i,r)}evaluate(e){const t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!hb(t,["boolean","string","number","null"]))throw new yl(`Expected first argument to be of type boolean, string, number or null, but found ${ll(Uu(t))} instead.`);let r;if(this.fromIndex&&(r=this.fromIndex.evaluate(e)),hb(i,["string"])){const o=i.indexOf(t,r);return o===-1?-1:[...i.slice(0,o)].length}else{if(hb(i,["array"]))return i.indexOf(t,r);throw new yl(`Expected second argument to be of type array or string, but found ${ll(Uu(i))} instead.`)}}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class dP{constructor(e,t,i,r,o,s){this.inputType=e,this.type=t,this.input=i,this.cases=r,this.outputs=o,this.otherwise=s}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!==1)return t.error("Expected an even number of arguments.");let i,r;t.expectedType&&t.expectedType.kind!=="value"&&(r=t.expectedType);const o={},s=[];for(let A=2;A<e.length-1;A+=2){let m=e[A];const v=e[A+1];Array.isArray(m)||(m=[m]);const x=t.concat(A);if(m.length===0)return x.error("Expected at least one branch label.");for(const O of m){if(typeof O!="number"&&typeof O!="string")return x.error("Branch labels must be numbers or strings.");if(typeof O=="number"&&Math.abs(O)>Number.MAX_SAFE_INTEGER)return x.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof O=="number"&&Math.floor(O)!==O)return x.error("Numeric branch labels must be integer values.");if(!i)i=Uu(O);else if(x.checkSubtype(i,Uu(O)))return null;if(typeof o[String(O)]<"u")return x.error("Branch labels must be unique.");o[String(O)]=s.length}const _=t.parse(v,A,r);if(!_)return null;r=r||_.type,s.push(_)}const a=t.parse(e[1],1,to);if(!a)return null;const c=t.parse(e[e.length-1],e.length-1,r);return!c||a.type.kind!=="value"&&t.concat(1).checkSubtype(i,a.type)?null:new dP(i,r,a,o,s,c)}evaluate(e){const t=this.input.evaluate(e);return(Uu(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}}class fP{constructor(e,t,i){this.type=e,this.branches=t,this.otherwise=i}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!==0)return t.error("Expected an odd number of arguments.");let i;t.expectedType&&t.expectedType.kind!=="value"&&(i=t.expectedType);const r=[];for(let s=1;s<e.length-1;s+=2){const a=t.parse(e[s],s,so);if(!a)return null;const c=t.parse(e[s+1],s+1,i);if(!c)return null;r.push([a,c]),i=i||c.type}const o=t.parse(e[e.length-1],e.length-1,i);if(!o)return null;if(!i)throw new Error("Can't infer output type");return new fP(i,r,o)}evaluate(e){for(const[t,i]of this.branches)if(t.evaluate(e))return i.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[t,i]of this.branches)e(t),e(i);e(this.otherwise)}outputDefined(){return this.branches.every(([e,t])=>t.outputDefined())&&this.otherwise.outputDefined()}}class Tw{constructor(e,t,i,r){this.type=e,this.input=t,this.beginIndex=i,this.endIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const i=t.parse(e[1],1,to),r=t.parse(e[2],2,ii);if(!i||!r)return null;if(!uP(i.type,[Jd(to),Co,to]))return t.error(`Expected first argument to be of type array or string, but found ${ll(i.type)} instead`);if(e.length===4){const o=t.parse(e[3],3,ii);return o?new Tw(i.type,i,r,o):null}else return new Tw(i.type,i,r)}evaluate(e){const t=this.input.evaluate(e),i=this.beginIndex.evaluate(e);let r;if(this.endIndex&&(r=this.endIndex.evaluate(e)),hb(t,["string"]))return[...t].slice(i,r).join("");if(hb(t,["array"]))return t.slice(i,r);throw new yl(`Expected first argument to be of type array or string, but found ${ll(Uu(t))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function tJ(n,e){const t=n.length-1;let i=0,r=t,o=0,s,a;for(;i<=r;)if(o=Math.floor((i+r)/2),s=n[o],a=n[o+1],s<=e){if(o===t||e<a)return o;i=o+1}else if(s>e)r=o-1;else throw new yl("Input is not a number.");return 0}class vE{constructor(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[r,o]of i)this.labels.push(r),this.outputs.push(o)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");const i=t.parse(e[1],1,ii);if(!i)return null;const r=[];let o=null;t.expectedType&&t.expectedType.kind!=="value"&&(o=t.expectedType);for(let s=1;s<e.length;s+=2){const a=s===1?-1/0:e[s],c=e[s+1],A=s,m=s+1;if(typeof a!="number")return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',A);if(r.length&&r[r.length-1][0]>=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',A);const v=t.parse(c,m,o);if(!v)return null;o=o||v.type,r.push([a,v])}return new vE(o,i,r)}evaluate(e){const t=this.labels,i=this.outputs;if(t.length===1)return i[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return i[0].evaluate(e);const o=t.length;if(r>=t[o-1])return i[o-1].evaluate(e);const s=tJ(t,r);return i[s].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function Lme(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var BO,sz;function Fme(){if(sz)return BO;sz=1,BO=n;function n(e,t,i,r){this.cx=3*e,this.bx=3*(i-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(r-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=i,this.p2y=r}return n.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(t===void 0&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var i=e,r=0;r<8;r++){var o=this.sampleCurveX(i)-e;if(Math.abs(o)<t)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i=i-o/s}var a=0,c=1;for(i=e,r=0;r<20&&(o=this.sampleCurveX(i),!(Math.abs(o-e)<t));r++)e>o?a=i:c=i,i=(c-a)*.5+a;return i},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},BO}var zme=Fme(),jme=Lme(zme);class Rg{constructor(e,t,i,r,o){this.type=e,this.operator=t,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[];for(const[s,a]of o)this.labels.push(s),this.outputs.push(a)}static interpolationFactor(e,t,i,r){let o=0;if(e.name==="exponential")o=IO(t,e.base,i,r);else if(e.name==="linear")o=IO(t,1,i,r);else if(e.name==="cubic-bezier"){const s=e.controlPoints;o=new jme(s[0],s[1],s[2],s[3]).solve(IO(t,1,i,r))}return o}static parse(e,t){let[i,r,o,...s]=e;if(!Array.isArray(r)||r.length===0)return t.error("Expected an interpolation type expression.",1);if(r[0]==="linear")r={name:"linear"};else if(r[0]==="exponential"){const A=r[1];if(typeof A!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:A}}else if(r[0]==="cubic-bezier"){const A=r.slice(1);if(A.length!==4||A.some(m=>typeof m!="number"||m<0||m>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:A}}else return t.error(`Unknown interpolation type ${String(r[0])}`,1,0);if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(o=t.parse(o,2,ii),!o)return null;const a=[];let c=null;(i==="interpolate-hcl"||i==="interpolate-lab")&&t.expectedType!=k3?c=kg:t.expectedType&&t.expectedType.kind!=="value"&&(c=t.expectedType);for(let A=0;A<s.length;A+=2){const m=s[A],v=s[A+1],x=A+3,_=A+4;if(typeof m!="number")return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',x);if(a.length&&a[a.length-1][0]>=m)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',x);const O=t.parse(v,_,c);if(!O)return null;c=c||O.type,a.push([m,O])}return!ay(c,ii)&&!ay(c,cE)&&!ay(c,kg)&&!ay(c,dE)&&!ay(c,fE)&&!ay(c,k3)&&!ay(c,pE)&&!ay(c,Jd(ii))?t.error(`Type ${ll(c)} is not interpolatable.`):new Rg(c,i,r,o,a)}evaluate(e){const t=this.labels,i=this.outputs;if(t.length===1)return i[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return i[0].evaluate(e);const o=t.length;if(r>=t[o-1])return i[o-1].evaluate(e);const s=tJ(t,r),a=t[s],c=t[s+1],A=Rg.interpolationFactor(this.interpolation,r,a,c),m=i[s].evaluate(e),v=i[s+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return db(m,v,A);case"color":return Zs.interpolate(m,v,A);case"padding":return sm.interpolate(m,v,A);case"colorArray":return tf.interpolate(m,v,A);case"numberArray":return am.interpolate(m,v,A);case"variableAnchorOffsetCollection":return Tg.interpolate(m,v,A);case"array":return R3(m,v,A);case"projectionDefinition":return tm.interpolate(m,v,A)}case"interpolate-hcl":switch(this.type.kind){case"color":return Zs.interpolate(m,v,A,"hcl");case"colorArray":return tf.interpolate(m,v,A,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Zs.interpolate(m,v,A,"lab");case"colorArray":return tf.interpolate(m,v,A,"lab")}}}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function IO(n,e,t,i){const r=i-t,o=n-t;return r===0?0:e===1?o/r:(Math.pow(e,o)-1)/(Math.pow(e,r)-1)}class P3{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let i=null;const r=t.expectedType;r&&r.kind!=="value"&&(i=r);const o=[];for(const a of e.slice(1)){const c=t.parse(a,1+o.length,i,void 0,{typeAnnotation:"omit"});if(!c)return null;i=i||c.type,o.push(c)}if(!i)throw new Error("No output type");return r&&o.some(a=>T3(r,a.type))?new P3(to,o):new P3(i,o)}evaluate(e){let t=null,i=0,r;for(const o of this.args)if(i++,t=o.evaluate(e),t&&t instanceof ev&&!t.available&&(r||(r=t.name),t=null,i===this.args.length&&(t=r)),t!==null)break;return t}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}function az(n,e){return n==="=="||n==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function Nme(n,e,t){return e===t}function Gme(n,e,t){return e!==t}function Wme(n,e,t){return e<t}function Qme(n,e,t){return e>t}function qme(n,e,t){return e<=t}function Yme(n,e,t){return e>=t}function nJ(n,e,t,i){return i.compare(e,t)===0}function $me(n,e,t,i){return!nJ(n,e,t,i)}function Vme(n,e,t,i){return i.compare(e,t)<0}function Hme(n,e,t,i){return i.compare(e,t)>0}function Zme(n,e,t,i){return i.compare(e,t)<=0}function Xme(n,e,t,i){return i.compare(e,t)>=0}function Mx(n,e,t){const i=n!=="=="&&n!=="!=";return class iJ{constructor(o,s,a){this.type=so,this.lhs=o,this.rhs=s,this.collator=a,this.hasUntypedArgument=o.type.kind==="value"||s.type.kind==="value"}static parse(o,s){if(o.length!==3&&o.length!==4)return s.error("Expected two or three arguments.");const a=o[0];let c=s.parse(o[1],1,to);if(!c)return null;if(!az(a,c.type))return s.concat(1).error(`"${a}" comparisons are not supported for type '${ll(c.type)}'.`);let A=s.parse(o[2],2,to);if(!A)return null;if(!az(a,A.type))return s.concat(2).error(`"${a}" comparisons are not supported for type '${ll(A.type)}'.`);if(c.type.kind!==A.type.kind&&c.type.kind!=="value"&&A.type.kind!=="value")return s.error(`Cannot compare types '${ll(c.type)}' and '${ll(A.type)}'.`);i&&(c.type.kind==="value"&&A.type.kind!=="value"?c=new nm(A.type,[c]):c.type.kind!=="value"&&A.type.kind==="value"&&(A=new nm(c.type,[A])));let m=null;if(o.length===4){if(c.type.kind!=="string"&&A.type.kind!=="string"&&c.type.kind!=="value"&&A.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(m=s.parse(o[3],3,AE),!m)return null}return new iJ(c,A,m)}evaluate(o){const s=this.lhs.evaluate(o),a=this.rhs.evaluate(o);if(i&&this.hasUntypedArgument){const c=Uu(s),A=Uu(a);if(c.kind!==A.kind||!(c.kind==="string"||c.kind==="number"))throw new yl(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${c.kind}, ${A.kind}) instead.`)}if(this.collator&&!i&&this.hasUntypedArgument){const c=Uu(s),A=Uu(a);if(c.kind!=="string"||A.kind!=="string")return e(o,s,a)}return this.collator?t(o,s,a,this.collator.evaluate(o)):e(o,s,a)}eachChild(o){o(this.lhs),o(this.rhs),this.collator&&o(this.collator)}outputDefined(){return!0}}}const Jme=Mx("==",Nme,nJ),ege=Mx("!=",Gme,$me),tge=Mx("<",Wme,Vme),nge=Mx(">",Qme,Hme),ige=Mx("<=",qme,Zme),rge=Mx(">=",Yme,Xme);class bE{constructor(e,t,i){this.type=AE,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(e.length!==2)return t.error("Expected one argument.");const i=e[1];if(typeof i!="object"||Array.isArray(i))return t.error("Collator options argument must be an object.");const r=t.parse(i["case-sensitive"]===void 0?!1:i["case-sensitive"],1,so);if(!r)return null;const o=t.parse(i["diacritic-sensitive"]===void 0?!1:i["diacritic-sensitive"],1,so);if(!o)return null;let s=null;return i.locale&&(s=t.parse(i.locale,1,Co),!s)?null:new bE(r,o,s)}evaluate(e){return new cP(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}class pP{constructor(e,t,i,r,o){this.type=Co,this.number=e,this.locale=t,this.currency=i,this.minFractionDigits=r,this.maxFractionDigits=o}static parse(e,t){if(e.length!==3)return t.error("Expected two arguments.");const i=t.parse(e[1],1,ii);if(!i)return null;const r=e[2];if(typeof r!="object"||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");let o=null;if(r.locale&&(o=t.parse(r.locale,1,Co),!o))return null;let s=null;if(r.currency&&(s=t.parse(r.currency,1,Co),!s))return null;let a=null;if(r["min-fraction-digits"]&&(a=t.parse(r["min-fraction-digits"],1,ii),!a))return null;let c=null;return r["max-fraction-digits"]&&(c=t.parse(r["max-fraction-digits"],1,ii),!c)?null:new pP(i,o,s,a,c)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class mP{constructor(e){this.type=hE,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const i=e[1];if(!Array.isArray(i)&&typeof i=="object")return t.error("First argument must be an image or text section.");const r=[];let o=!1;for(let s=1;s<=e.length-1;++s){const a=e[s];if(o&&typeof a=="object"&&!Array.isArray(a)){o=!1;let c=null;if(a["font-scale"]&&(c=t.parse(a["font-scale"],1,ii),!c))return null;let A=null;if(a["text-font"]&&(A=t.parse(a["text-font"],1,Jd(Co)),!A))return null;let m=null;if(a["text-color"]&&(m=t.parse(a["text-color"],1,kg),!m))return null;let v=null;if(a["vertical-align"]){if(typeof a["vertical-align"]=="string"&&!Pme.includes(a["vertical-align"]))return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${a["vertical-align"]}' instead.`);if(v=t.parse(a["vertical-align"],1,Co),!v)return null}const x=r[r.length-1];x.scale=c,x.font=A,x.textColor=m,x.verticalAlign=v}else{const c=t.parse(e[s],1,to);if(!c)return null;const A=c.type.kind;if(A!=="string"&&A!=="value"&&A!=="null"&&A!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,r.push({content:c,scale:null,font:null,textColor:null,verticalAlign:null})}}return new mP(r)}evaluate(e){const t=i=>{const r=i.content.evaluate(e);return Uu(r)===F4?new _9("",r,null,null,null,i.verticalAlign?i.verticalAlign.evaluate(e):null):new _9(e3(r),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null,i.verticalAlign?i.verticalAlign.evaluate(e):null)};return new q0(this.sections.map(t))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor),t.verticalAlign&&e(t.verticalAlign)}outputDefined(){return!1}}class gP{constructor(e){this.type=F4,this.input=e}static parse(e,t){if(e.length!==2)return t.error("Expected two arguments.");const i=t.parse(e[1],1,Co);return i?new gP(i):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),i=ev.fromString(t);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(t)>-1),i}eachChild(e){e(this.input)}outputDefined(){return!1}}class yP{constructor(e){this.type=ii,this.input=e}static parse(e,t){if(e.length!==2)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const i=t.parse(e[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?t.error(`Expected argument of type string or array, but found ${ll(i.type)} instead.`):new yP(i):null}evaluate(e){const t=this.input.evaluate(e);if(typeof t=="string")return[...t].length;if(Array.isArray(t))return t.length;throw new yl(`Expected value to be of type string or array, but found ${ll(Uu(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}const Dg=8192;function oge(n,e){const t=sge(n[0]),i=lge(n[1]),r=Math.pow(2,e.z);return[Math.round(t*r*Dg),Math.round(i*r*Dg)]}function vP(n,e){const t=Math.pow(2,e.z),i=(n[0]/Dg+e.x)/t,r=(n[1]/Dg+e.y)/t;return[age(i),uge(r)]}function sge(n){return(180+n)/360}function age(n){return n*360-180}function lge(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function uge(n){return 360/Math.PI*Math.atan(Math.exp((180-n*360)*Math.PI/180))-90}function z4(n,e){n[0]=Math.min(n[0],e[0]),n[1]=Math.min(n[1],e[1]),n[2]=Math.max(n[2],e[0]),n[3]=Math.max(n[3],e[1])}function U3(n,e){return!(n[0]<=e[0]||n[2]>=e[2]||n[1]<=e[1]||n[3]>=e[3])}function cge(n,e,t){return e[1]>n[1]!=t[1]>n[1]&&n[0]<(t[0]-e[0])*(n[1]-e[1])/(t[1]-e[1])+e[0]}function Age(n,e,t){const i=n[0]-e[0],r=n[1]-e[1],o=n[0]-t[0],s=n[1]-t[1];return i*s-o*r===0&&i*o<=0&&r*s<=0}function CE(n,e,t,i){const r=[e[0]-n[0],e[1]-n[1]],o=[i[0]-t[0],i[1]-t[1]];return pge(o,r)===0?!1:!!(lz(n,e,t,i)&&lz(t,i,n,e))}function hge(n,e,t){for(const i of t)for(let r=0;r<i.length-1;++r)if(CE(n,e,i[r],i[r+1]))return!0;return!1}function wx(n,e,t=!1){let i=!1;for(const r of e)for(let o=0;o<r.length-1;o++){if(Age(n,r[o],r[o+1]))return t;cge(n,r[o],r[o+1])&&(i=!i)}return i}function dge(n,e){for(const t of e)if(wx(n,t))return!0;return!1}function rJ(n,e){for(const t of n)if(!wx(t,e))return!1;for(let t=0;t<n.length-1;++t)if(hge(n[t],n[t+1],e))return!1;return!0}function fge(n,e){for(const t of e)if(rJ(n,t))return!0;return!1}function pge(n,e){return n[0]*e[1]-n[1]*e[0]}function lz(n,e,t,i){const r=n[0]-t[0],o=n[1]-t[1],s=e[0]-t[0],a=e[1]-t[1],c=i[0]-t[0],A=i[1]-t[1],m=r*A-c*o,v=s*A-c*a;return m>0&&v<0||m<0&&v>0}function bP(n,e,t){const i=[];for(let r=0;r<n.length;r++){const o=[];for(let s=0;s<n[r].length;s++){const a=oge(n[r][s],t);z4(e,a),o.push(a)}i.push(o)}return i}function oJ(n,e,t){const i=[];for(let r=0;r<n.length;r++){const o=bP(n[r],e,t);i.push(o)}return i}function sJ(n,e,t,i){if(n[0]<t[0]||n[0]>t[2]){const r=i*.5;let o=n[0]-t[0]>r?-i:t[0]-n[0]>r?i:0;o===0&&(o=n[0]-t[2]>r?-i:t[2]-n[0]>r?i:0),n[0]+=o}z4(e,n)}function mge(n){n[0]=n[1]=1/0,n[2]=n[3]=-1/0}function uz(n,e,t,i){const r=Math.pow(2,i.z)*Dg,o=[i.x*Dg,i.y*Dg],s=[];for(const a of n)for(const c of a){const A=[c.x+o[0],c.y+o[1]];sJ(A,e,t,r),s.push(A)}return s}function cz(n,e,t,i){const r=Math.pow(2,i.z)*Dg,o=[i.x*Dg,i.y*Dg],s=[];for(const a of n){const c=[];for(const A of a){const m=[A.x+o[0],A.y+o[1]];z4(e,m),c.push(m)}s.push(c)}if(e[2]-e[0]<=r/2){mge(e);for(const a of s)for(const c of a)sJ(c,e,t,r)}return s}function gge(n,e){const t=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],r=n.canonicalID();if(e.type==="Polygon"){const o=bP(e.coordinates,i,r),s=uz(n.geometry(),t,i,r);if(!U3(t,i))return!1;for(const a of s)if(!wx(a,o))return!1}if(e.type==="MultiPolygon"){const o=oJ(e.coordinates,i,r),s=uz(n.geometry(),t,i,r);if(!U3(t,i))return!1;for(const a of s)if(!dge(a,o))return!1}return!0}function yge(n,e){const t=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],r=n.canonicalID();if(e.type==="Polygon"){const o=bP(e.coordinates,i,r),s=cz(n.geometry(),t,i,r);if(!U3(t,i))return!1;for(const a of s)if(!rJ(a,o))return!1}if(e.type==="MultiPolygon"){const o=oJ(e.coordinates,i,r),s=cz(n.geometry(),t,i,r);if(!U3(t,i))return!1;for(const a of s)if(!fge(a,o))return!1}return!0}class fb{constructor(e,t){this.type=so,this.geojson=e,this.geometries=t}static parse(e,t){if(e.length!==2)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(D3(e[1])){const i=e[1];if(i.type==="FeatureCollection"){const r=[];for(const o of i.features){const{type:s,coordinates:a}=o.geometry;s==="Polygon"&&r.push(a),s==="MultiPolygon"&&r.push(...a)}if(r.length){const o={type:"MultiPolygon",coordinates:r};return new fb(i,o)}}else if(i.type==="Feature"){const r=i.geometry.type;if(r==="Polygon"||r==="MultiPolygon")return new fb(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new fb(i,i)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return gge(e,this.geometries);if(e.geometryType()==="LineString")return yge(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class aJ{constructor(e=[],t=(i,r)=>i<r?-1:i>r?1:0){if(this.data=e,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(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;const e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:i}=this,r=t[e];for(;e>0;){const o=e-1>>1,s=t[o];if(i(r,s)>=0)break;t[e]=s,e=o}t[e]=r}_down(e){const{data:t,compare:i}=this,r=this.length>>1,o=t[e];for(;e<r;){let s=(e<<1)+1;const a=s+1;if(a<this.length&&i(t[a],t[s])<0&&(s=a),i(t[s],o)>=0)break;t[e]=t[s],e=s}t[e]=o}}function vge(n,e){if(n.length<=1)return[n];const i=[];let r,o;for(const s of n){const a=bge(s);a!==0&&(s.area=Math.abs(a),o===void 0&&(o=a<0),o===a<0?(r&&i.push(r),r=[s]):r.push(s))}return r&&i.push(r),i}function bge(n){let e=0;for(let t=0,i=n.length,r=i-1,o,s;t<i;r=t++)o=n[t],s=n[r],e+=(s.x-o.x)*(o.y+s.y);return e}const Cge=6378.137,Az=1/298.257223563,hz=Az*(2-Az),dz=Math.PI/180;class CP{constructor(e){const t=dz*Cge*1e3,i=Math.cos(e*dz),r=1/(1-hz*(1-i*i)),o=Math.sqrt(r);this.kx=t*o*i,this.ky=t*o*r*(1-hz)}distance(e,t){const i=this.wrap(e[0]-t[0])*this.kx,r=(e[1]-t[1])*this.ky;return Math.sqrt(i*i+r*r)}pointOnLine(e,t){let i=1/0,r,o,s,a;for(let c=0;c<e.length-1;c++){let A=e[c][0],m=e[c][1],v=this.wrap(e[c+1][0]-A)*this.kx,x=(e[c+1][1]-m)*this.ky,_=0;(v!==0||x!==0)&&(_=(this.wrap(t[0]-A)*this.kx*v+(t[1]-m)*this.ky*x)/(v*v+x*x),_>1?(A=e[c+1][0],m=e[c+1][1]):_>0&&(A+=v/this.kx*_,m+=x/this.ky*_)),v=this.wrap(t[0]-A)*this.kx,x=(t[1]-m)*this.ky;const O=v*v+x*x;O<i&&(i=O,r=A,o=m,s=c,a=_)}return{point:[r,o],index:s,t:Math.max(0,Math.min(1,a))}}wrap(e){for(;e<-180;)e+=360;for(;e>180;)e-=360;return e}}const x9=100,M9=50;function lJ(n,e){return e[0]-n[0]}function Rw(n){return n[1]-n[0]+1}function Z0(n,e){return n[1]>=n[0]&&n[1]<e}function w9(n,e){if(n[0]>n[1])return[null,null];const t=Rw(n);if(e){if(t===2)return[n,null];const r=Math.floor(t/2);return[[n[0],n[0]+r],[n[0]+r,n[1]]]}if(t===1)return[n,null];const i=Math.floor(t/2)-1;return[[n[0],n[0]+i],[n[0]+i+1,n[1]]]}function S9(n,e){if(!Z0(e,n.length))return[1/0,1/0,-1/0,-1/0];const t=[1/0,1/0,-1/0,-1/0];for(let i=e[0];i<=e[1];++i)z4(t,n[i]);return t}function E9(n){const e=[1/0,1/0,-1/0,-1/0];for(const t of n)for(const i of t)z4(e,i);return e}function fz(n){return n[0]!==-1/0&&n[1]!==-1/0&&n[2]!==1/0&&n[3]!==1/0}function _P(n,e,t){if(!fz(n)||!fz(e))return NaN;let i=0,r=0;return n[2]<e[0]&&(i=e[0]-n[2]),n[0]>e[2]&&(i=n[0]-e[2]),n[1]>e[3]&&(r=n[1]-e[3]),n[3]<e[1]&&(r=e[1]-n[3]),t.distance([0,0],[i,r])}function eb(n,e,t){const i=t.pointOnLine(e,n);return t.distance(n,i.point)}function xP(n,e,t,i,r){const o=Math.min(eb(n,[t,i],r),eb(e,[t,i],r)),s=Math.min(eb(t,[n,e],r),eb(i,[n,e],r));return Math.min(o,s)}function _ge(n,e,t,i,r){if(!(Z0(e,n.length)&&Z0(i,t.length)))return 1/0;let s=1/0;for(let a=e[0];a<e[1];++a){const c=n[a],A=n[a+1];for(let m=i[0];m<i[1];++m){const v=t[m],x=t[m+1];if(CE(c,A,v,x))return 0;s=Math.min(s,xP(c,A,v,x,r))}}return s}function xge(n,e,t,i,r){if(!(Z0(e,n.length)&&Z0(i,t.length)))return NaN;let s=1/0;for(let a=e[0];a<=e[1];++a)for(let c=i[0];c<=i[1];++c)if(s=Math.min(s,r.distance(n[a],t[c])),s===0)return s;return s}function Mge(n,e,t){if(wx(n,e,!0))return 0;let i=1/0;for(const r of e){const o=r[0],s=r[r.length-1];if(o!==s&&(i=Math.min(i,eb(n,[s,o],t)),i===0))return i;const a=t.pointOnLine(r,n);if(i=Math.min(i,t.distance(n,a.point)),i===0)return i}return i}function wge(n,e,t,i){if(!Z0(e,n.length))return NaN;for(let o=e[0];o<=e[1];++o)if(wx(n[o],t,!0))return 0;let r=1/0;for(let o=e[0];o<e[1];++o){const s=n[o],a=n[o+1];for(const c of t)for(let A=0,m=c.length,v=m-1;A<m;v=A++){const x=c[v],_=c[A];if(CE(s,a,x,_))return 0;r=Math.min(r,xP(s,a,x,_,i))}}return r}function pz(n,e){for(const t of n)for(const i of t)if(wx(i,e,!0))return!0;return!1}function Sge(n,e,t,i=1/0){const r=E9(n),o=E9(e);if(i!==1/0&&_P(r,o,t)>=i)return i;if(U3(r,o)){if(pz(n,e))return 0}else if(pz(e,n))return 0;let s=1/0;for(const a of n)for(let c=0,A=a.length,m=A-1;c<A;m=c++){const v=a[m],x=a[c];for(const _ of e)for(let O=0,P=_.length,F=P-1;O<P;F=O++){const j=_[F],Q=_[O];if(CE(v,x,j,Q))return 0;s=Math.min(s,xP(v,x,j,Q,t))}}return s}function mz(n,e,t,i,r,o){if(!o)return;const s=_P(S9(i,o),r,t);s<e&&n.push([s,o,[0,0]])}function DM(n,e,t,i,r,o,s){if(!o||!s)return;const a=_P(S9(i,o),S9(r,s),t);a<e&&n.push([a,o,s])}function Dw(n,e,t,i,r=1/0){let o=Math.min(i.distance(n[0],t[0][0]),r);if(o===0)return o;const s=new aJ([[0,[0,n.length-1],[0,0]]],lJ),a=E9(t);for(;s.length>0;){const c=s.pop();if(c[0]>=o)continue;const A=c[1],m=e?M9:x9;if(Rw(A)<=m){if(!Z0(A,n.length))return NaN;if(e){const v=wge(n,A,t,i);if(isNaN(v)||v===0)return v;o=Math.min(o,v)}else for(let v=A[0];v<=A[1];++v){const x=Mge(n[v],t,i);if(o=Math.min(o,x),o===0)return 0}}else{const v=w9(A,e);mz(s,o,i,n,a,v[0]),mz(s,o,i,n,a,v[1])}}return o}function Pw(n,e,t,i,r,o=1/0){let s=Math.min(o,r.distance(n[0],t[0]));if(s===0)return s;const a=new aJ([[0,[0,n.length-1],[0,t.length-1]]],lJ);for(;a.length>0;){const c=a.pop();if(c[0]>=s)continue;const A=c[1],m=c[2],v=e?M9:x9,x=i?M9:x9;if(Rw(A)<=v&&Rw(m)<=x){if(!Z0(A,n.length)&&Z0(m,t.length))return NaN;let _;if(e&&i)_=_ge(n,A,t,m,r),s=Math.min(s,_);else if(e&&!i){const O=n.slice(A[0],A[1]+1);for(let P=m[0];P<=m[1];++P)if(_=eb(t[P],O,r),s=Math.min(s,_),s===0)return s}else if(!e&&i){const O=t.slice(m[0],m[1]+1);for(let P=A[0];P<=A[1];++P)if(_=eb(n[P],O,r),s=Math.min(s,_),s===0)return s}else _=xge(n,A,t,m,r),s=Math.min(s,_)}else{const _=w9(A,e),O=w9(m,i);DM(a,s,r,n,t,_[0],O[0]),DM(a,s,r,n,t,_[0],O[1]),DM(a,s,r,n,t,_[1],O[0]),DM(a,s,r,n,t,_[1],O[1])}}return s}function Ege(n,e){const t=n.geometry(),i=t.flat().map(s=>vP([s.x,s.y],n.canonical));if(t.length===0)return NaN;const r=new CP(i[0][1]);let o=1/0;for(const s of e){switch(s.type){case"Point":o=Math.min(o,Pw(i,!1,[s.coordinates],!1,r,o));break;case"LineString":o=Math.min(o,Pw(i,!1,s.coordinates,!0,r,o));break;case"Polygon":o=Math.min(o,Dw(i,!1,s.coordinates,r,o));break}if(o===0)return o}return o}function Oge(n,e){const t=n.geometry(),i=t.flat().map(s=>vP([s.x,s.y],n.canonical));if(t.length===0)return NaN;const r=new CP(i[0][1]);let o=1/0;for(const s of e){switch(s.type){case"Point":o=Math.min(o,Pw(i,!0,[s.coordinates],!1,r,o));break;case"LineString":o=Math.min(o,Pw(i,!0,s.coordinates,!0,r,o));break;case"Polygon":o=Math.min(o,Dw(i,!0,s.coordinates,r,o));break}if(o===0)return o}return o}function Bge(n,e){const t=n.geometry();if(t.length===0||t[0].length===0)return NaN;const i=vge(t).map(s=>s.map(a=>a.map(c=>vP([c.x,c.y],n.canonical)))),r=new CP(i[0][0][0][1]);let o=1/0;for(const s of e)for(const a of i){switch(s.type){case"Point":o=Math.min(o,Dw([s.coordinates],!1,a,r,o));break;case"LineString":o=Math.min(o,Dw(s.coordinates,!0,a,r,o));break;case"Polygon":o=Math.min(o,Sge(a,s.coordinates,r,o));break}if(o===0)return o}return o}function kO(n){return n.type==="MultiPolygon"?n.coordinates.map(e=>({type:"Polygon",coordinates:e})):n.type==="MultiLineString"?n.coordinates.map(e=>({type:"LineString",coordinates:e})):n.type==="MultiPoint"?n.coordinates.map(e=>({type:"Point",coordinates:e})):[n]}class pb{constructor(e,t){this.type=ii,this.geojson=e,this.geometries=t}static parse(e,t){if(e.length!==2)return t.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(D3(e[1])){const i=e[1];if(i.type==="FeatureCollection")return new pb(i,i.features.map(r=>kO(r.geometry)).flat());if(i.type==="Feature")return new pb(i,kO(i.geometry));if("type"in i&&"coordinates"in i)return new pb(i,kO(i))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return Ege(e,this.geometries);if(e.geometryType()==="LineString")return Oge(e,this.geometries);if(e.geometryType()==="Polygon")return Bge(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class j4{constructor(e){this.type=to,this.key=e}static parse(e,t){if(e.length!==2)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const i=e[1];return i==null?t.error("Global state property must be defined."):typeof i!="string"?t.error(`Global state property must be string, but found ${typeof e[1]} instead.`):new j4(i)}evaluate(e){var t;const i=(t=e.globals)===null||t===void 0?void 0:t.globalState;return!i||Object.keys(i).length===0?null:XX(i,this.key)}eachChild(){}outputDefined(){return!1}}const _E={"==":Jme,"!=":ege,">":nge,"<":tge,">=":rge,"<=":ige,array:nm,at:AP,boolean:nm,case:fP,coalesce:P3,collator:bE,format:mP,image:gP,in:hP,"index-of":kw,interpolate:Rg,"interpolate-hcl":Rg,"interpolate-lab":Rg,length:yP,let:gE,literal:ex,match:dP,number:nm,"number-format":pP,object:nm,slice:Tw,step:vE,string:nm,"to-boolean":Ey,"to-color":Ey,"to-number":Ey,"to-string":Ey,var:yE,within:fb,distance:pb,"global-state":j4};class nf{constructor(e,t,i,r){this.name=e,this.type=t,this._evaluate=i,this.args=r}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){const i=e[0],r=nf.definitions[i];if(!r)return t.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(r)?r[0]:r.type,s=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=s.filter(([A])=>!Array.isArray(A)||A.length===e.length-1);let c=null;for(const[A,m]of a){c=new mE(t.registry,Uw,t.path,null,t.scope);const v=[];let x=!1;for(let _=1;_<e.length;_++){const O=e[_],P=Array.isArray(A)?A[_-1]:A.type,F=c.parse(O,1+v.length,P);if(!F){x=!0;break}v.push(F)}if(!x){if(Array.isArray(A)&&A.length!==v.length){c.error(`Expected ${A.length} arguments, but found ${v.length} instead.`);continue}for(let _=0;_<v.length;_++){const O=Array.isArray(A)?A[_]:A.type,P=v[_];c.concat(_+1).checkSubtype(O,P.type)}if(c.errors.length===0)return new nf(i,o,m,v)}}if(a.length===1)t.errors.push(...c.errors);else{const m=(a.length?a:s).map(([x])=>kge(x)).join(" | "),v=[];for(let x=1;x<e.length;x++){const _=t.parse(e[x],1+v.length);if(!_)return null;v.push(ll(_.type))}t.error(`Expected arguments of type ${m}, but found (${v.join(", ")}) instead.`)}return null}static register(e,t){nf.definitions=t;for(const i in t)e[i]=nf}}function gz(n,[e,t,i,r]){e=e.evaluate(n),t=t.evaluate(n),i=i.evaluate(n);const o=r?r.evaluate(n):1,s=JX(e,t,i,o);if(s)throw new yl(s);return new Zs(e/255,t/255,i/255,o,!1)}function yz(n,e){return n in e}function TO(n,e){const t=e[n];return typeof t>"u"?null:t}function Ige(n,e,t,i){for(;t<=i;){const r=t+i>>1;if(e[r]===n)return!0;e[r]>n?i=r-1:t=r+1}return!1}function Lv(n){return{type:n}}nf.register(_E,{error:[Mme,[Co],(n,[e])=>{throw new yl(e.evaluate(n))}],typeof:[Co,[to],(n,[e])=>ll(Uu(e.evaluate(n)))],"to-rgba":[Jd(ii,4),[kg],(n,[e])=>{const[t,i,r,o]=e.evaluate(n).rgb;return[t*255,i*255,r*255,o]}],rgb:[kg,[ii,ii,ii],gz],rgba:[kg,[ii,ii,ii,ii],gz],has:{type:so,overloads:[[[Co],(n,[e])=>yz(e.evaluate(n),n.properties())],[[Co,Ab],(n,[e,t])=>yz(e.evaluate(n),t.evaluate(n))]]},get:{type:to,overloads:[[[Co],(n,[e])=>TO(e.evaluate(n),n.properties())],[[Co,Ab],(n,[e,t])=>TO(e.evaluate(n),t.evaluate(n))]]},"feature-state":[to,[Co],(n,[e])=>TO(e.evaluate(n),n.featureState||{})],properties:[Ab,[],n=>n.properties()],"geometry-type":[Co,[],n=>n.geometryType()],id:[to,[],n=>n.id()],zoom:[ii,[],n=>n.globals.zoom],"heatmap-density":[ii,[],n=>n.globals.heatmapDensity||0],elevation:[ii,[],n=>n.globals.elevation||0],"line-progress":[ii,[],n=>n.globals.lineProgress||0],accumulated:[to,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[ii,Lv(ii),(n,e)=>{let t=0;for(const i of e)t+=i.evaluate(n);return t}],"*":[ii,Lv(ii),(n,e)=>{let t=1;for(const i of e)t*=i.evaluate(n);return t}],"-":{type:ii,overloads:[[[ii,ii],(n,[e,t])=>e.evaluate(n)-t.evaluate(n)],[[ii],(n,[e])=>-e.evaluate(n)]]},"/":[ii,[ii,ii],(n,[e,t])=>e.evaluate(n)/t.evaluate(n)],"%":[ii,[ii,ii],(n,[e,t])=>e.evaluate(n)%t.evaluate(n)],ln2:[ii,[],()=>Math.LN2],pi:[ii,[],()=>Math.PI],e:[ii,[],()=>Math.E],"^":[ii,[ii,ii],(n,[e,t])=>Math.pow(e.evaluate(n),t.evaluate(n))],sqrt:[ii,[ii],(n,[e])=>Math.sqrt(e.evaluate(n))],log10:[ii,[ii],(n,[e])=>Math.log(e.evaluate(n))/Math.LN10],ln:[ii,[ii],(n,[e])=>Math.log(e.evaluate(n))],log2:[ii,[ii],(n,[e])=>Math.log(e.evaluate(n))/Math.LN2],sin:[ii,[ii],(n,[e])=>Math.sin(e.evaluate(n))],cos:[ii,[ii],(n,[e])=>Math.cos(e.evaluate(n))],tan:[ii,[ii],(n,[e])=>Math.tan(e.evaluate(n))],asin:[ii,[ii],(n,[e])=>Math.asin(e.evaluate(n))],acos:[ii,[ii],(n,[e])=>Math.acos(e.evaluate(n))],atan:[ii,[ii],(n,[e])=>Math.atan(e.evaluate(n))],min:[ii,Lv(ii),(n,e)=>Math.min(...e.map(t=>t.evaluate(n)))],max:[ii,Lv(ii),(n,e)=>Math.max(...e.map(t=>t.evaluate(n)))],abs:[ii,[ii],(n,[e])=>Math.abs(e.evaluate(n))],round:[ii,[ii],(n,[e])=>{const t=e.evaluate(n);return t<0?-Math.round(-t):Math.round(t)}],floor:[ii,[ii],(n,[e])=>Math.floor(e.evaluate(n))],ceil:[ii,[ii],(n,[e])=>Math.ceil(e.evaluate(n))],"filter-==":[so,[Co,to],(n,[e,t])=>n.properties()[e.value]===t.value],"filter-id-==":[so,[to],(n,[e])=>n.id()===e.value],"filter-type-==":[so,[Co],(n,[e])=>n.geometryType()===e.value],"filter-<":[so,[Co,to],(n,[e,t])=>{const i=n.properties()[e.value],r=t.value;return typeof i==typeof r&&i<r}],"filter-id-<":[so,[to],(n,[e])=>{const t=n.id(),i=e.value;return typeof t==typeof i&&t<i}],"filter->":[so,[Co,to],(n,[e,t])=>{const i=n.properties()[e.value],r=t.value;return typeof i==typeof r&&i>r}],"filter-id->":[so,[to],(n,[e])=>{const t=n.id(),i=e.value;return typeof t==typeof i&&t>i}],"filter-<=":[so,[Co,to],(n,[e,t])=>{const i=n.properties()[e.value],r=t.value;return typeof i==typeof r&&i<=r}],"filter-id-<=":[so,[to],(n,[e])=>{const t=n.id(),i=e.value;return typeof t==typeof i&&t<=i}],"filter->=":[so,[Co,to],(n,[e,t])=>{const i=n.properties()[e.value],r=t.value;return typeof i==typeof r&&i>=r}],"filter-id->=":[so,[to],(n,[e])=>{const t=n.id(),i=e.value;return typeof t==typeof i&&t>=i}],"filter-has":[so,[to],(n,[e])=>e.value in n.properties()],"filter-has-id":[so,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[so,[Jd(Co)],(n,[e])=>e.value.indexOf(n.geometryType())>=0],"filter-id-in":[so,[Jd(to)],(n,[e])=>e.value.indexOf(n.id())>=0],"filter-in-small":[so,[Co,Jd(to)],(n,[e,t])=>t.value.indexOf(n.properties()[e.value])>=0],"filter-in-large":[so,[Co,Jd(to)],(n,[e,t])=>Ige(n.properties()[e.value],t.value,0,t.value.length-1)],all:{type:so,overloads:[[[so,so],(n,[e,t])=>e.evaluate(n)&&t.evaluate(n)],[Lv(so),(n,e)=>{for(const t of e)if(!t.evaluate(n))return!1;return!0}]]},any:{type:so,overloads:[[[so,so],(n,[e,t])=>e.evaluate(n)||t.evaluate(n)],[Lv(so),(n,e)=>{for(const t of e)if(t.evaluate(n))return!0;return!1}]]},"!":[so,[so],(n,[e])=>!e.evaluate(n)],"is-supported-script":[so,[Co],(n,[e])=>{const t=n.globals&&n.globals.isSupportedScript;return t?t(e.evaluate(n)):!0}],upcase:[Co,[Co],(n,[e])=>e.evaluate(n).toUpperCase()],downcase:[Co,[Co],(n,[e])=>e.evaluate(n).toLowerCase()],concat:[Co,Lv(to),(n,e)=>e.map(t=>e3(t.evaluate(n))).join("")],"resolved-locale":[Co,[AE],(n,[e])=>e.evaluate(n).resolvedLocale()]});function kge(n){return Array.isArray(n)?`(${n.map(ll).join(", ")})`:`(${ll(n.type)}...)`}function Uw(n){if(n instanceof yE)return Uw(n.boundExpression);if(n instanceof nf&&n.name==="error")return!1;if(n instanceof bE)return!1;if(n instanceof fb)return!1;if(n instanceof pb)return!1;if(n instanceof j4)return!1;const e=n instanceof Ey||n instanceof nm;let t=!0;return n.eachChild(i=>{e?t=t&&Uw(i):t=t&&i instanceof ex}),t?MP(n)&&SP(n,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function MP(n){if(n instanceof nf){if(n.name==="get"&&n.args.length===1)return!1;if(n.name==="feature-state")return!1;if(n.name==="has"&&n.args.length===1)return!1;if(n.name==="properties"||n.name==="geometry-type"||n.name==="id")return!1;if(/^filter-/.test(n.name))return!1}if(n instanceof fb||n instanceof pb)return!1;let e=!0;return n.eachChild(t=>{e&&!MP(t)&&(e=!1)}),e}function wP(n){if(n instanceof nf&&n.name==="feature-state")return!1;let e=!0;return n.eachChild(t=>{e&&!wP(t)&&(e=!1)}),e}function SP(n,e){if(n instanceof nf&&e.indexOf(n.name)>=0)return!1;let t=!0;return n.eachChild(i=>{t&&!SP(i,e)&&(t=!1)}),t}function O9(n){return{result:"success",value:n}}function c_(n){return{result:"error",value:n}}function Tge(n){return n["property-type"]==="data-driven"||n["property-type"]==="cross-faded-data-driven"}function Rge(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function Dge(n){return!!n.expression&&n.expression.interpolated}function uJ(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&Uu(n)===Ab}class Pge{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new eJ,this._defaultValue=t?Fge(t):null,this._enumValues=t&&t.type==="enum"?t.values:null}evaluateWithoutErrorHandling(e,t,i,r,o,s){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.canonical=r,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s,this.expression.evaluate(this._evaluator)}evaluate(e,t,i,r,o,s){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=i||null,this._evaluator.canonical=r,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s||null;try{const a=this.expression.evaluate(this._evaluator);if(a==null||typeof a=="number"&&a!==a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new yl(`Expected value to be one of ${Object.keys(this._enumValues).map(c=>JSON.stringify(c)).join(", ")}, but found ${JSON.stringify(a)} instead.`);return a}catch(a){return this._warningHistory[a.message]||(this._warningHistory[a.message]=!0,typeof console<"u"&&console.warn(a.message)),this._defaultValue}}}function Uge(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in _E}function cJ(n,e){const t=new mE(_E,Uw,[],e?Lge(e):void 0),i=t.parse(n,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return i?O9(new Pge(i,e)):c_(t.errors)}class vz{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!wP(t.expression),this.globalStateRefs=xE(t.expression)}evaluateWithoutErrorHandling(e,t,i,r,o,s){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,r,o,s)}evaluate(e,t,i,r,o,s){return this._styleExpression.evaluate(e,t,i,r,o,s)}}class bz{constructor(e,t,i,r){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!wP(t.expression),this.globalStateRefs=xE(t.expression),this.interpolationType=r}evaluateWithoutErrorHandling(e,t,i,r,o,s){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,r,o,s)}evaluate(e,t,i,r,o,s){return this._styleExpression.evaluate(e,t,i,r,o,s)}interpolationFactor(e,t,i){return this.interpolationType?Rg.interpolationFactor(this.interpolationType,e,t,i):0}}function Kge(n,e){const t=cJ(n,e);if(t.result==="error")return t;const i=t.value.expression,r=MP(i);if(!r&&!Tge(e))return c_([new mg("","data expressions not supported")]);const o=SP(i,["zoom"]);if(!o&&!Rge(e))return c_([new mg("","zoom expressions not supported")]);const s=$5(i);if(!s&&!o)return c_([new mg("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(s instanceof mg)return c_([s]);if(s instanceof Rg&&!Dge(e))return c_([new mg("",'"interpolate" expressions cannot be used with this property')]);if(!s)return O9(r?new vz("constant",t.value):new vz("source",t.value));const a=s instanceof Rg?s.interpolation:void 0;return O9(r?new bz("camera",t.value,s.labels,a):new bz("composite",t.value,s.labels,a))}function $5(n){let e=null;if(n instanceof gE)e=$5(n.result);else if(n instanceof P3){for(const t of n.args)if(e=$5(t),e)break}else(n instanceof vE||n instanceof Rg)&&n.input instanceof nf&&n.input.name==="zoom"&&(e=n);return e instanceof mg||n.eachChild(t=>{const i=$5(t);i instanceof mg?e=i:!e&&i?e=new mg("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&i&&e!==i&&(e=new mg("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function xE(n,e=new Set){return n instanceof j4&&e.add(n.key),n.eachChild(t=>{xE(t,e)}),e}function Lge(n){const e={color:kg,string:Co,number:ii,enum:Co,boolean:so,formatted:hE,padding:dE,numberArray:fE,colorArray:k3,projectionDefinition:cE,resolvedImage:F4,variableAnchorOffsetCollection:pE};return n.type==="array"?Jd(e[n.value]||to,n.length):e[n.type]}function Fge(n){if(n.type==="color"&&uJ(n.default))return new Zs(0,0,0,0);switch(n.type){case"color":return Zs.parse(n.default)||null;case"padding":return sm.parse(n.default)||null;case"numberArray":return am.parse(n.default)||null;case"colorArray":return tf.parse(n.default)||null;case"variableAnchorOffsetCollection":return Tg.parse(n.default)||null;case"projectionDefinition":return tm.parse(n.default)||null;default:return n.default===void 0?null:n.default}}function AJ(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 e of n.slice(1))if(!AJ(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}const zge={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function jge(n){if(n==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};AJ(n)||(n=Kw(n));const e=cJ(n,zge);if(e.result==="error")throw new Error(e.value.map(t=>`${t.key}: ${t.message}`).join(", "));{const t=hJ(n);return{filter:(i,r,o)=>e.value.evaluate(i,r,{},o),needGeometry:t,getGlobalStateRefs:()=>xE(e.value.expression)}}}function Nge(n,e){return n<e?-1:n>e?1:0}function hJ(n){if(!Array.isArray(n))return!1;if(n[0]==="within"||n[0]==="distance")return!0;for(let e=1;e<n.length;e++)if(hJ(n[e]))return!0;return!1}function Kw(n){if(!n)return!0;const e=n[0];return n.length<=1?e!=="any":e==="=="?RO(n[1],n[2],"=="):e==="!="?PM(RO(n[1],n[2],"==")):e==="<"||e===">"||e==="<="||e===">="?RO(n[1],n[2],e):e==="any"?Gge(n.slice(1)):e==="all"?["all"].concat(n.slice(1).map(Kw)):e==="none"?["all"].concat(n.slice(1).map(Kw).map(PM)):e==="in"?Cz(n[1],n.slice(2)):e==="!in"?PM(Cz(n[1],n.slice(2))):e==="has"?_z(n[1]):e==="!has"?PM(_z(n[1])):!0}function RO(n,e,t){switch(n){case"$type":return[`filter-type-${t}`,e];case"$id":return[`filter-id-${t}`,e];default:return[`filter-${t}`,n,e]}}function Gge(n){return["any"].concat(n.map(Kw))}function Cz(n,e){if(e.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(t=>typeof t!=typeof e[0])?["filter-in-large",n,["literal",e.sort(Nge)]]:["filter-in-small",n,["literal",e]]}}function _z(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function PM(n){return["!",n]}function K3(n){return typeof n=="object"?["literal",n]:n}function Wge(n,e){let t=n.stops;if(!t)return Qge(n,e);const i=t&&typeof t[0][0]=="object",r=i||n.property!==void 0,o=i||!r;return t=t.map(s=>!r&&e.tokens&&typeof s[1]=="string"?[s[0],Vge(s[1])]:[s[0],K3(s[1])]),i?qge(n,e,t):o?$ge(n,e,t):B9(n,e,t)}function Qge(n,e){const t=["get",n.property];if(n.default===void 0)return e.type==="string"?["string",t]:t;if(e.type==="enum")return["match",t,Object.keys(e.values),t,n.default];{const i=[e.type==="color"?"to-color":e.type,t,K3(n.default)];return e.type==="array"&&i.splice(1,0,e.value,e.length||null),i}}function EP(n){switch(n.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function qge(n,e,t){const i={},r={},o=[];for(let a=0;a<t.length;a++){const c=t[a],A=c[0].zoom;i[A]===void 0&&(i[A]={zoom:A,type:n.type,property:n.property,default:n.default},r[A]=[],o.push(A)),r[A].push([c[0].value,c[1]])}if(BP({},e)==="exponential"){const a=[EP(n),["linear"],["zoom"]];for(const c of o){const A=B9(i[c],e,r[c]);R_(a,c,A,!1)}return a}else{const a=["step",["zoom"]];for(const c of o){const A=B9(i[c],e,r[c]);R_(a,c,A,!0)}return OP(a),a}}function Yge(n,e){if(n!==void 0)return n;if(e!==void 0)return e}function xz(n,e){const t=K3(Yge(n.default,e.default));return t===void 0&&e.type==="resolvedImage"?"":t}function B9(n,e,t){const i=BP(n,e),r=["get",n.property];if(i==="categorical"&&typeof t[0][0]=="boolean"){const o=["case"];for(const s of t)o.push(["==",r,s[0]],s[1]);return o.push(xz(n,e)),o}else if(i==="categorical"){const o=["match",r];for(const s of t)R_(o,s[0],s[1],!1);return o.push(xz(n,e)),o}else if(i==="interval"){const o=["step",["number",r]];for(const s of t)R_(o,s[0],s[1],!0);return OP(o),n.default===void 0?o:["case",["==",["typeof",r],"number"],o,K3(n.default)]}else if(i==="exponential"){const o=n.base!==void 0?n.base:1,s=[EP(n),o===1?["linear"]:["exponential",o],["number",r]];for(const a of t)R_(s,a[0],a[1],!1);return n.default===void 0?s:["case",["==",["typeof",r],"number"],s,K3(n.default)]}else throw new Error(`Unknown property function type ${i}`)}function $ge(n,e,t,i=["zoom"]){const r=BP(n,e);let o,s=!1;if(r==="interval")o=["step",i],s=!0;else if(r==="exponential"){const a=n.base!==void 0?n.base:1;o=[EP(n),a===1?["linear"]:["exponential",a],i]}else throw new Error(`Unknown zoom function type "${r}"`);for(const a of t)R_(o,a[0],a[1],s);return OP(o),o}function OP(n){n[0]==="step"&&n.length===3&&(n.push(0),n.push(n[3]))}function R_(n,e,t,i){n.length>3&&e===n[n.length-2]||(i&&n.length===2||n.push(e),n.push(t))}function BP(n,e){return n.type?n.type:e.expression.interpolated?"exponential":"interval"}function Vge(n){const e=["concat"],t=/{([^{}]+)}/g;let i=0;for(let r=t.exec(n);r!==null;r=t.exec(n)){const o=n.slice(i,t.lastIndex-r[0].length);i=t.lastIndex,o.length>0&&e.push(o),e.push(["get",r[1]])}if(e.length===1)return n;if(i<n.length)e.push(n.slice(i));else if(e.length===2)return["to-string",e[1]];return e}const Hge=Cme;var Mz={thin:100,hairline:100,"ultra-light":200,"extra-light":200,light:300,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,"extra-bold":800,"ultra-bold":800,heavy:900,black:900,"heavy-black":900,fat:900,poster:900,"ultra-black":950,"extra-black":950},Jx=" ",wz=/(italic|oblique)$/i,Sz={};function I9(n,e,t){var i=Sz[n];if(!i){Array.isArray(n)||(n=[n]);for(var r=400,o="normal",s=[],a,c,A=0,m=n.length;A<m;++A){var v=n[A],x=v.split(" "),_=x[x.length-1].toLowerCase();_=="normal"||_=="italic"||_=="oblique"?(o=c?o:_,c=!0,x.pop(),_=x[x.length-1].toLowerCase()):wz.test(_)&&(_=_.replace(wz,""),o=c?o:x[x.length-1].replace(_,""),c=!0);for(var O in Mz){var P=x.length>1?x[x.length-2].toLowerCase():"";if(_==O||_==O.replace("-","")||P+"-"+_==O){r=a?r:Mz[O],x.pop(),P&&O.startsWith(P)&&x.pop();break}}!a&&typeof _=="number"&&(r=_,a=!0);var F=x.join(Jx).replace("Klokantech Noto Sans","Noto Sans").replace("DIN Pro","Barlow").replace("Arial Unicode MS","Arial");F.indexOf(Jx)!==-1&&(F='"'+F+'"'),s.push(F)}i=Sz[n]=[o,r,s]}return i[0]+Jx+i[1]+Jx+e+"px"+(t?"/"+t:"")+Jx+i[2]}const Yh={ADD:"add",REMOVE:"remove"},tx={PROPERTYCHANGE:"propertychange"},Ir={CHANGE:"change",ERROR:"error",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",TOUCHMOVE:"touchmove",WHEEL:"wheel"};class N4{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function Zge(n,e,t){let i,r;t=t||Pg;let o=0,s=n.length,a=!1;for(;o<s;)i=o+(s-o>>1),r=+t(n[i],e),r<0?o=i+1:(s=i,a=!r);return a?o:~o}function Pg(n,e){return n>e?1:n<e?-1:0}function Xge(n,e){return n<e?1:n>e?-1:0}function ME(n,e,t){if(n[0]<=e)return 0;const i=n.length;if(e<=n[i-1])return i-1;if(typeof t=="function"){for(let r=1;r<i;++r){const o=n[r];if(o===e)return r;if(o<e)return t(e,n[r-1],o)>0?r-1:r}return i-1}if(t>0){for(let r=1;r<i;++r)if(n[r]<e)return r-1;return i-1}if(t<0){for(let r=1;r<i;++r)if(n[r]<=e)return r;return i-1}for(let r=1;r<i;++r){if(n[r]==e)return r;if(n[r]<e)return n[r-1]-e<e-n[r]?r-1:r}return i-1}function Jge(n,e,t){for(;e<t;){const i=n[e];n[e]=n[t],n[t]=i,++e,--t}}function Ug(n,e){const t=Array.isArray(e)?e:[e],i=t.length;for(let r=0;r<i;r++)n[n.length]=t[r]}function tv(n,e){const t=n.length;if(t!==e.length)return!1;for(let i=0;i<t;i++)if(n[i]!==e[i])return!1;return!0}function e0e(n,e,t){const i=e||Pg;return n.every(function(r,o){if(o===0)return!0;const s=i(n[o-1],r);return!(s>0||s===0)})}function L3(){return!0}function wE(){return!1}function F3(){}function dJ(n){let e,t,i;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==i||!tv(r,t))&&(i=this,t=r,e=n.apply(this,arguments)),e}}function nx(n){function e(){let t;try{t=n()}catch(i){return Promise.reject(i)}return t instanceof Promise?t:Promise.resolve(t)}return e()}function G4(n){for(const e in n)delete n[e]}function qy(n){let e;for(e in n)return!1;return!e}class ym{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}class W4 extends N4{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,t){if(!e||!t)return;const i=this.listeners_||(this.listeners_={}),r=i[e]||(i[e]=[]);r.includes(t)||r.push(t)}dispatchEvent(e){const t=typeof e=="string",i=t?e:e.type,r=this.listeners_&&this.listeners_[i];if(!r)return;const o=t?new ym(e):e;o.target||(o.target=this.eventTarget_||this);const s=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in s||(s[i]=0,a[i]=0),++s[i];let c;for(let A=0,m=r.length;A<m;++A)if("handleEvent"in r[A]?c=r[A].handleEvent(o):c=r[A].call(this,o),c===!1||o.propagationStopped){c=!1;break}if(--s[i]===0){let A=a[i];for(delete a[i];A--;)this.removeEventListener(i,F3);delete s[i]}return c}disposeInternal(){this.listeners_&&G4(this.listeners_)}getListeners(e){return this.listeners_&&this.listeners_[e]||void 0}hasListener(e){return this.listeners_?e?e in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(e,t){if(!this.listeners_)return;const i=this.listeners_[e];if(!i)return;const r=i.indexOf(t);r!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(i[r]=F3,++this.pendingRemovals_[e]):(i.splice(r,1),i.length===0&&delete this.listeners_[e]))}}function Zo(n,e,t,i,r){if(r){const s=t;t=function(a){return n.removeEventListener(e,t),s.call(i??this,a)}}else i&&i!==n&&(t=t.bind(i));const o={target:n,type:e,listener:t};return n.addEventListener(e,t),o}function Lw(n,e,t,i){return Zo(n,e,t,i,!0)}function Ea(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),G4(n))}class Q4 extends W4{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(Ir.CHANGE)}getRevision(){return this.revision_}onInternal(e,t){if(Array.isArray(e)){const i=e.length,r=new Array(i);for(let o=0;o<i;++o)r[o]=Zo(this,e[o],t);return r}return Zo(this,e,t)}onceInternal(e,t){let i;if(Array.isArray(e)){const r=e.length;i=new Array(r);for(let o=0;o<r;++o)i[o]=Lw(this,e[o],t)}else i=Lw(this,e,t);return t.ol_key=i,i}unInternal(e,t){const i=t.ol_key;if(i)t0e(i);else if(Array.isArray(e))for(let r=0,o=e.length;r<o;++r)this.removeEventListener(e[r],t);else this.removeEventListener(e,t)}}Q4.prototype.on;Q4.prototype.once;Q4.prototype.un;function t0e(n){if(Array.isArray(n))for(let e=0,t=n.length;e<t;++e)Ea(n[e]);else Ea(n)}function Dr(){throw new Error("Unimplemented abstract method.")}let n0e=0;function $r(n){return n.ol_uid||(n.ol_uid=String(++n0e))}class Ez extends ym{constructor(e,t,i){super(e),this.key=t,this.oldValue=i}}class vm extends Q4{constructor(e){super(),this.on,this.once,this.un,$r(this),this.values_=null,e!==void 0&&this.setProperties(e)}get(e){let t;return this.values_&&this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(e,t){let i;i=`change:${e}`,this.hasListener(i)&&this.dispatchEvent(new Ez(i,e,t)),i=tx.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new Ez(i,e,t))}addChangeListener(e,t){this.addEventListener(`change:${e}`,t)}removeChangeListener(e,t){this.removeEventListener(`change:${e}`,t)}set(e,t,i){const r=this.values_||(this.values_={});if(i)r[e]=t;else{const o=r[e];r[e]=t,o!==t&&this.notify(e,o)}}setProperties(e,t){for(const i in e)this.set(i,e[i],t)}applyProperties(e){e.values_&&Object.assign(this.values_||(this.values_={}),e.values_)}unset(e,t){if(this.values_&&e in this.values_){const i=this.values_[e];delete this.values_[e],qy(this.values_)&&(this.values_=null),t||this.notify(e,i)}}}const Oz={LENGTH:"length"};class UM extends ym{constructor(e,t,i){super(e),this.element=t,this.index=i}}class _g extends vm{constructor(e,t){if(super(),this.on,this.once,this.un,t=t||{},this.unique_=!!t.unique,this.array_=e||[],this.unique_)for(let i=0,r=this.array_.length;i<r;++i)this.assertUnique_(this.array_[i],i);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(e){for(let t=0,i=e.length;t<i;++t)this.push(e[t]);return this}forEach(e){const t=this.array_;for(let i=0,r=t.length;i<r;++i)e(t[i],i,t)}getArray(){return this.array_}item(e){return this.array_[e]}getLength(){return this.get(Oz.LENGTH)}insertAt(e,t){if(e<0||e>this.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t),this.array_.splice(e,0,t),this.updateLength_(),this.dispatchEvent(new UM(Yh.ADD,t,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const t=this.getLength();return this.insertAt(t,e),this.getLength()}remove(e){const t=this.array_;for(let i=0,r=t.length;i<r;++i)if(t[i]===e)return this.removeAt(i)}removeAt(e){if(e<0||e>=this.getLength())return;const t=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new UM(Yh.REMOVE,t,e)),t}setAt(e,t){const i=this.getLength();if(e>=i){this.insertAt(e,t);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t,e);const r=this.array_[e];this.array_[e]=t,this.dispatchEvent(new UM(Yh.REMOVE,r,e)),this.dispatchEvent(new UM(Yh.ADD,t,e))}updateLength_(){this.set(Oz.LENGTH,this.array_.length)}assertUnique_(e,t){for(let i=0,r=this.array_.length;i<r;++i)if(this.array_[i]===e&&i!==t)throw new Error("Duplicate item added to a unique collection")}}class A_ extends ym{constructor(e,t,i){super(e),this.map=t,this.frameState=i!==void 0?i:null}}class my extends A_{constructor(e,t,i,r,o,s){super(e,t,o),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=r!==void 0?r:!1,this.activePointers=s}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(e){this.pixel_=e}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(e){this.coordinate_=e}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const jl={SINGLECLICK:"singleclick",CLICK:Ir.CLICK,DBLCLICK:Ir.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},wb=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",i0e=wb.includes("safari")&&!wb.includes("chrom");i0e&&(wb.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(wb));const r0e=wb.includes("webkit")&&!wb.includes("edge"),fJ=wb.includes("macintosh"),o0e=typeof devicePixelRatio<"u"?devicePixelRatio:1,IP=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,pJ=typeof Image<"u"&&Image.prototype.decode,s0e=typeof createImageBitmap=="function",mJ=(function(){let n=!1;try{const e=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return n})(),k9={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown"};class a0e extends W4{constructor(e,t){super(e),this.map_=e,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=t===void 0?1:t,this.down_=null;const i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=Zo(i,k9.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=Zo(i,k9.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(Ir.TOUCHMOVE,this.boundHandleTouchMove_,mJ?{passive:!1}:!1)}emulateClick_(e){let t=new my(jl.CLICK,this.map_,e);this.dispatchEvent(t),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,t=new my(jl.DBLCLICK,this.map_,e),this.dispatchEvent(t)):this.clickTimeoutId_=setTimeout(()=>{this.clickTimeoutId_=void 0;const i=new my(jl.SINGLECLICK,this.map_,e);this.dispatchEvent(i)},250)}updateActivePointers_(e){const t=e,i=t.pointerId;if(t.type==jl.POINTERUP||t.type==jl.POINTERCANCEL){delete this.trackedTouches_[i];for(const r in this.trackedTouches_)if(this.trackedTouches_[r].target!==t.target){delete this.trackedTouches_[r];break}}else(t.type==jl.POINTERDOWN||t.type==jl.POINTERMOVE)&&(this.trackedTouches_[i]=t);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const t=new my(jl.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(t),this.emulateClicks_&&!t.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Ea),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(e){return e.button===0}handlePointerDown_(e){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(e);const t=new my(jl.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);if(this.dispatchEvent(t),this.down_=new PointerEvent(e.type,e),Object.defineProperty(this.down_,"target",{writable:!1,value:e.target}),this.dragListenerKeys_.length===0){const i=this.map_.getOwnerDocument();this.dragListenerKeys_.push(Zo(i,jl.POINTERMOVE,this.handlePointerMove_,this),Zo(i,jl.POINTERUP,this.handlePointerUp_,this),Zo(this.element_,jl.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(Zo(this.element_.getRootNode(),jl.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const t=new my(jl.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(t)}}relayMoveEvent_(e){this.originalPointerMoveEvent_=e;const t=!!(this.down_&&this.isMoving_(e));this.dispatchEvent(new my(jl.POINTERMOVE,this.map_,e,t))}handleTouchMove_(e){const t=this.originalPointerMoveEvent_;(!t||t.defaultPrevented)&&(typeof e.cancelable!="boolean"||e.cancelable===!0)&&e.preventDefault()}isMoving_(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Ea(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Ir.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Ea(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Ea),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const L0={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},kA={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},si={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function Os(n,e){if(!n)throw new Error(e)}const Fw=1/0;class l0e{constructor(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,G4(this.queuedElements_)}dequeue(){const e=this.elements_,t=this.priorities_,i=e[0];e.length==1?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));const r=this.keyFunction_(i);return delete this.queuedElements_[r],i}enqueue(e){Os(!(this.keyFunction_(e)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const t=this.priorityFunction_(e);return t!=Fw?(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(e){return e*2+1}getRightChildIndex_(e){return e*2+2}getParentIndex_(e){return e-1>>1}heapify_(){let e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)}isEmpty(){return this.elements_.length===0}isKeyQueued(e){return e in this.queuedElements_}isQueued(e){return this.isKeyQueued(this.keyFunction_(e))}siftUp_(e){const t=this.elements_,i=this.priorities_,r=t.length,o=t[e],s=i[e],a=e;for(;e<r>>1;){const c=this.getLeftChildIndex_(e),A=this.getRightChildIndex_(e),m=A<r&&i[A]<i[c]?A:c;t[e]=t[m],i[e]=i[m],e=m}t[e]=o,i[e]=s,this.siftDown_(a,e)}siftDown_(e,t){const i=this.elements_,r=this.priorities_,o=i[t],s=r[t];for(;t>e;){const a=this.getParentIndex_(t);if(r[a]>s)i[t]=i[a],r[t]=r[a],t=a;else break}i[t]=o,r[t]=s}reprioritize(){const e=this.priorityFunction_,t=this.elements_,i=this.priorities_;let r=0;const o=t.length;let s,a,c;for(a=0;a<o;++a)s=t[a],c=e(s),c==Fw?delete this.queuedElements_[this.keyFunction_(s)]:(i[r]=c,t[r++]=s);t.length=r,i.length=r,this.heapify_()}}class gJ extends l0e{constructor(e,t){super(i=>e.apply(null,i),i=>i[0].getKey()),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=t,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(e){const t=super.enqueue(e);return t&&e[0].addEventListener(Ir.CHANGE,this.boundHandleTileChange_),t}getTilesLoading(){return this.tilesLoading_}handleTileChange(e){const t=e.target,i=t.getState();if(i===si.LOADED||i===si.ERROR||i===si.EMPTY){i!==si.ERROR&&t.removeEventListener(Ir.CHANGE,this.boundHandleTileChange_);const r=t.getKey();r in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[r],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(e,t){let i=0;for(;this.tilesLoading_<e&&i<t&&this.getCount()>0;){const r=this.dequeue()[0],o=r.getKey();r.getState()===si.IDLE&&!(o in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[o]=!0,++this.tilesLoading_,++i,r.load())}}}function u0e(n,e,t,i,r){if(!n||!(t in n.wantedTiles)||!n.wantedTiles[t][e.getKey()])return Fw;const o=n.viewState.center,s=i[0]-o[0],a=i[1]-o[1];return 65536*Math.log(r)+Math.sqrt(s*s+a*a)/r}const sl={ANIMATING:0,INTERACTING:1},Vp={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function vl(n,e,t){return Math.min(Math.max(n,e),t)}function c0e(n,e,t,i,r,o){const s=r-t,a=o-i;if(s!==0||a!==0){const c=((n-t)*s+(e-i)*a)/(s*s+a*a);c>1?(t=r,i=o):c>0&&(t+=s*c,i+=a*c)}return mb(n,e,t,i)}function mb(n,e,t,i){const r=t-n,o=i-e;return r*r+o*o}function A0e(n){const e=n.length;for(let i=0;i<e;i++){let r=i,o=Math.abs(n[i][i]);for(let a=i+1;a<e;a++){const c=Math.abs(n[a][i]);c>o&&(o=c,r=a)}if(o===0)return null;const s=n[r];n[r]=n[i],n[i]=s;for(let a=i+1;a<e;a++){const c=-n[a][i]/n[i][i];for(let A=i;A<e+1;A++)i==A?n[a][A]=0:n[a][A]+=c*n[i][A]}}const t=new Array(e);for(let i=e-1;i>=0;i--){t[i]=n[i][e]/n[i][i];for(let r=i-1;r>=0;r--)n[r][e]-=n[r][i]*t[i]}return t}function Bz(n){return n*180/Math.PI}function zy(n){return n*Math.PI/180}function gb(n,e){const t=n%e;return t*e<0?t+e:t}function Vd(n,e,t){return n+t*(e-n)}function SE(n,e){const t=Math.pow(10,e);return Math.round(n*t)/t}function KM(n,e){return Math.floor(SE(n,e))}function Oy(n,e){return Math.ceil(SE(n,e))}function T9(n,e,t){if(n>=e&&n<t)return n;const i=t-e;return((n-e)%i+i)%i+e}function Iz(n,e,t){return(function(i,r,o,s,a){if(!i)return;if(!r&&!e)return i;const c=e?0:o[0]*r,A=e?0:o[1]*r,m=a?a[0]:0,v=a?a[1]:0;let x=n[0]+c/2+m,_=n[2]-c/2+m,O=n[1]+A/2+v,P=n[3]-A/2+v;x>_&&(x=(_+x)/2,_=x),O>P&&(O=(P+O)/2,P=O);let F=vl(i[0],x,_),j=vl(i[1],O,P);if(s&&t&&r){const Q=30*r;F+=-Q*Math.log(1+Math.max(0,x-i[0])/Q)+Q*Math.log(1+Math.max(0,i[0]-_)/Q),j+=-Q*Math.log(1+Math.max(0,O-i[1])/Q)+Q*Math.log(1+Math.max(0,i[1]-P)/Q)}return[F,j]})}function h0e(n){return n}const Dc={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function R9(n){const e=rp();for(let t=0,i=n.length;t<i;++t)t3(e,n[t]);return e}function d0e(n,e,t){const i=Math.min.apply(null,n),r=Math.min.apply(null,e),o=Math.max.apply(null,n),s=Math.max.apply(null,e);return X0(i,r,o,s,t)}function jy(n,e,t){return t?(t[0]=n[0]-e,t[1]=n[1]-e,t[2]=n[2]+e,t[3]=n[3]+e,t):[n[0]-e,n[1]-e,n[2]+e,n[3]+e]}function yJ(n,e){return e?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e):n.slice()}function Lb(n,e,t){let i,r;return e<n[0]?i=n[0]-e:n[2]<e?i=e-n[2]:i=0,t<n[1]?r=n[1]-t:n[3]<t?r=t-n[3]:r=0,i*i+r*r}function Sb(n,e){return kP(n,e[0],e[1])}function xg(n,e){return n[0]<=e[0]&&e[2]<=n[2]&&n[1]<=e[1]&&e[3]<=n[3]}function kP(n,e,t){return n[0]<=e&&e<=n[2]&&n[1]<=t&&t<=n[3]}function D9(n,e){const t=n[0],i=n[1],r=n[2],o=n[3],s=e[0],a=e[1];let c=Dc.UNKNOWN;return s<t?c=c|Dc.LEFT:s>r&&(c=c|Dc.RIGHT),a<i?c=c|Dc.BELOW:a>o&&(c=c|Dc.ABOVE),c===Dc.UNKNOWN&&(c=Dc.INTERSECTING),c}function rp(){return[1/0,1/0,-1/0,-1/0]}function X0(n,e,t,i,r){return r?(r[0]=n,r[1]=e,r[2]=t,r[3]=i,r):[n,e,t,i]}function Sx(n){return X0(1/0,1/0,-1/0,-1/0,n)}function vJ(n,e){const t=n[0],i=n[1];return X0(t,i,t,i,e)}function TP(n,e,t,i,r){const o=Sx(r);return CJ(o,n,e,t,i)}function J0(n,e){return n[0]==e[0]&&n[2]==e[2]&&n[1]==e[1]&&n[3]==e[3]}function bJ(n,e){return e[0]<n[0]&&(n[0]=e[0]),e[2]>n[2]&&(n[2]=e[2]),e[1]<n[1]&&(n[1]=e[1]),e[3]>n[3]&&(n[3]=e[3]),n}function t3(n,e){e[0]<n[0]&&(n[0]=e[0]),e[0]>n[2]&&(n[2]=e[0]),e[1]<n[1]&&(n[1]=e[1]),e[1]>n[3]&&(n[3]=e[1])}function CJ(n,e,t,i,r){for(;t<i;t+=r)f0e(n,e[t],e[t+1]);return n}function f0e(n,e,t){n[0]=Math.min(n[0],e),n[1]=Math.min(n[1],t),n[2]=Math.max(n[2],e),n[3]=Math.max(n[3],t)}function _J(n,e){let t;return t=e(EE(n)),t||(t=e(OE(n)),t)||(t=e(BE(n)),t)||(t=e(r1(n)),t)?t:!1}function P9(n){let e=0;return Fb(n)||(e=as(n)*Ku(n)),e}function EE(n){return[n[0],n[1]]}function OE(n){return[n[2],n[1]]}function lf(n){return[(n[0]+n[2])/2,(n[1]+n[3])/2]}function p0e(n,e){let t;if(e==="bottom-left")t=EE(n);else if(e==="bottom-right")t=OE(n);else if(e==="top-left")t=r1(n);else if(e==="top-right")t=BE(n);else throw new Error("Invalid corner");return t}function zw(n,e,t,i,r){const[o,s,a,c,A,m,v,x]=xJ(n,e,t,i);return X0(Math.min(o,a,A,v),Math.min(s,c,m,x),Math.max(o,a,A,v),Math.max(s,c,m,x),r)}function xJ(n,e,t,i){const r=e*i[0]/2,o=e*i[1]/2,s=Math.cos(t),a=Math.sin(t),c=r*s,A=r*a,m=o*s,v=o*a,x=n[0],_=n[1];return[x-c+v,_-A-m,x-c-v,_-A+m,x+c-v,_+A+m,x+c+v,_+A-m,x-c+v,_-A-m]}function Ku(n){return n[3]-n[1]}function cm(n,e,t){const i=t||rp();return Gl(n,e)?(n[0]>e[0]?i[0]=n[0]:i[0]=e[0],n[1]>e[1]?i[1]=n[1]:i[1]=e[1],n[2]<e[2]?i[2]=n[2]:i[2]=e[2],n[3]<e[3]?i[3]=n[3]:i[3]=e[3]):Sx(i),i}function r1(n){return[n[0],n[3]]}function BE(n){return[n[2],n[3]]}function as(n){return n[2]-n[0]}function Gl(n,e){return n[0]<=e[2]&&n[2]>=e[0]&&n[1]<=e[3]&&n[3]>=e[1]}function Fb(n){return n[2]<n[0]||n[3]<n[1]}function m0e(n,e){return e?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e):n}function g0e(n,e,t){let i=!1;const r=D9(n,e),o=D9(n,t);if(r===Dc.INTERSECTING||o===Dc.INTERSECTING)i=!0;else{const s=n[0],a=n[1],c=n[2],A=n[3],m=e[0],v=e[1],x=t[0],_=t[1],O=(_-v)/(x-m);let P,F;o&Dc.ABOVE&&!(r&Dc.ABOVE)&&(P=x-(_-A)/O,i=P>=s&&P<=c),!i&&o&Dc.RIGHT&&!(r&Dc.RIGHT)&&(F=_-(x-c)*O,i=F>=a&&F<=A),!i&&o&Dc.BELOW&&!(r&Dc.BELOW)&&(P=x-(_-a)/O,i=P>=s&&P<=c),!i&&o&Dc.LEFT&&!(r&Dc.LEFT)&&(F=_-(x-s)*O,i=F>=a&&F<=A)}return i}function y0e(n,e,t,i){if(Fb(n))return Sx(t);let r=[];r=[n[0],n[1],n[2],n[1],n[2],n[3],n[0],n[3]],e(r,r,2);const o=[],s=[];for(let a=0,c=r.length;a<c;a+=2)o.push(r[a]),s.push(r[a+1]);return d0e(o,s,t)}function MJ(n,e){const t=e.getExtent(),i=lf(n);if(e.canWrapX()&&(i[0]<t[0]||i[0]>=t[2])){const r=as(t),s=Math.floor((i[0]-t[0])/r)*r;n[0]-=s,n[2]-=s}return n}function wJ(n,e,t){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(n[0])||!isFinite(n[2]))return[[i[0],n[1],i[2],n[3]]];MJ(n,e);const r=as(i);if(as(n)>r&&!t)return[[i[0],n[1],i[2],n[3]]];if(n[0]<i[0])return[[n[0]+r,n[1],i[2],n[3]],[i[0],n[1],n[2],n[3]]];if(n[2]>i[2])return[[n[0],n[1],i[2],n[3]],[i[0],n[1],n[2]-r,n[3]]]}return[n]}function v0e(n,e){return n[0]+=+e[0],n[1]+=+e[1],n}function jw(n,e){let t=!0;for(let i=n.length-1;i>=0;--i)if(n[i]!=e[i]){t=!1;break}return t}function RP(n,e){const t=Math.cos(e),i=Math.sin(e),r=n[0]*t-n[1]*i,o=n[1]*t+n[0]*i;return n[0]=r,n[1]=o,n}function b0e(n,e){return n[0]*=e,n[1]*=e,n}function C0e(n,e){const t=n[0]-e[0],i=n[1]-e[1];return t*t+i*i}function _0e(n,e){return Math.sqrt(C0e(n,e))}function DP(n,e){if(e.canWrapX()){const t=as(e.getExtent()),i=x0e(n,e,t);i&&(n[0]-=i*t)}return n}function x0e(n,e,t){const i=e.getExtent();let r=0;return e.canWrapX()&&(n[0]<i[0]||n[0]>i[2])&&(t=t||as(i),r=Math.floor((n[0]-i[0])/t)),r}function SJ(n){return Math.pow(n,3)}function Ex(n){return 1-SJ(1-n)}function M0e(n){return 3*n*n-2*n*n*n}function w0e(n){return n}const S0e=63710088e-1;function kz(n,e,t){t=t||S0e;const i=zy(n[1]),r=zy(e[1]),o=(r-i)/2,s=zy(e[0]-n[0])/2,a=Math.sin(o)*Math.sin(o)+Math.sin(s)*Math.sin(s)*Math.cos(i)*Math.cos(r);return 2*t*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function EJ(...n){console.warn(...n)}const Yy={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class IE{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Yy[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const q4=6378137,v_=Math.PI*q4,E0e=[-v_,-v_,v_,v_],O0e=[-180,-85,180,85],LM=q4*Math.log(Math.tan(Math.PI/2));class OC extends IE{constructor(e){super({code:e,units:"m",extent:E0e,global:!0,worldExtent:O0e,getPointResolution:function(t,i){return t/Math.cosh(i[1]/q4)}})}}const Tz=[new OC("EPSG:3857"),new OC("EPSG:102100"),new OC("EPSG:102113"),new OC("EPSG:900913"),new OC("http://www.opengis.net/def/crs/EPSG/0/3857"),new OC("http://www.opengis.net/gml/srs/epsg.xml#3857")];function B0e(n,e,t,i){const r=n.length;t=t>1?t:2,i=i??t,e===void 0&&(t>2?e=n.slice():e=new Array(r));for(let o=0;o<r;o+=i){e[o]=v_*n[o]/180;let s=q4*Math.log(Math.tan(Math.PI*(+n[o+1]+90)/360));s>LM?s=LM:s<-LM&&(s=-LM),e[o+1]=s}return e}function I0e(n,e,t,i){const r=n.length;t=t>1?t:2,i=i??t,e===void 0&&(t>2?e=n.slice():e=new Array(r));for(let o=0;o<r;o+=i)e[o]=180*n[o]/v_,e[o+1]=360*Math.atan(Math.exp(n[o+1]/q4))/Math.PI-90;return e}const k0e=6378137,Rz=[-180,-90,180,90],T0e=Math.PI*k0e/180;class Fv extends IE{constructor(e,t){super({code:e,units:"degrees",extent:Rz,axisOrientation:t,global:!0,metersPerUnit:T0e,worldExtent:Rz})}}const Dz=[new Fv("CRS:84"),new Fv("EPSG:4326","neu"),new Fv("urn:ogc:def:crs:OGC:1.3:CRS84"),new Fv("urn:ogc:def:crs:OGC:2:84"),new Fv("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Fv("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Fv("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let U9={};function R0e(n){return U9[n]||U9[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function D0e(n,e){U9[n]=e}let D_={};function z3(n,e,t){const i=n.getCode(),r=e.getCode();i in D_||(D_[i]={}),D_[i][r]=t}function DO(n,e){return n in D_&&e in D_[n]?D_[n][e]:null}const Nw=.9996,tp=.00669438,kE=tp*tp,TE=kE*tp,tb=tp/(1-tp),Pz=Math.sqrt(1-tp),ix=(1-Pz)/(1+Pz),OJ=ix*ix,PP=OJ*ix,UP=PP*ix,BJ=UP*ix,IJ=1-tp/4-3*kE/64-5*TE/256,P0e=3*tp/8+3*kE/32+45*TE/1024,U0e=15*kE/256+45*TE/1024,K0e=35*TE/3072,L0e=3/2*ix-27/32*PP+269/512*BJ,F0e=21/16*OJ-55/32*UP,z0e=151/96*PP-417/128*BJ,j0e=1097/512*UP,Gw=6378137;function N0e(n,e,t){const i=n-5e5,s=(t.north?e:e-1e7)/Nw/(Gw*IJ),a=s+L0e*Math.sin(2*s)+F0e*Math.sin(4*s)+z0e*Math.sin(6*s)+j0e*Math.sin(8*s),c=Math.sin(a),A=c*c,m=Math.cos(a),v=c/m,x=v*v,_=x*x,O=1-tp*A,P=Math.sqrt(1-tp*A),F=Gw/P,j=(1-tp)/O,Q=tb*m**2,V=Q*Q,H=i/(F*Nw),G=H*H,Y=G*H,z=Y*H,se=z*H,le=se*H,me=a-v/j*(G/2-z/24*(5+3*x+10*Q-4*V-9*tb))+le/720*(61+90*x+298*Q+45*_-252*tb-3*V);let fe=(H-Y/6*(1+2*x+Q)+se/120*(5-2*Q+28*x-3*V+8*tb+24*_))/m;return fe=T9(fe+zy(kJ(t.number)),-Math.PI,Math.PI),[Bz(fe),Bz(me)]}const Uz=-80,Kz=84,G0e=-180,W0e=180;function Q0e(n,e,t){n=T9(n,G0e,W0e),e<Uz?e=Uz:e>Kz&&(e=Kz);const i=zy(e),r=Math.sin(i),o=Math.cos(i),s=r/o,a=s*s,c=a*a,A=zy(n),m=kJ(t.number),v=zy(m),x=Gw/Math.sqrt(1-tp*r**2),_=tb*o**2,O=o*T9(A-v,-Math.PI,Math.PI),P=O*O,F=P*O,j=F*O,Q=j*O,V=Q*O,H=Gw*(IJ*i-P0e*Math.sin(2*i)+U0e*Math.sin(4*i)-K0e*Math.sin(6*i)),G=Nw*x*(O+F/6*(1-a+_)+Q/120*(5-18*a+c+72*_-58*tb))+5e5;let Y=Nw*(H+x*s*(P/2+j/24*(5-a+9*_+4*_**2)+V/720*(61-58*a+c+600*_-330*tb)));return t.north||(Y+=1e7),[G,Y]}function kJ(n){return(n-1)*6-180+3}const q0e=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function TJ(n){let e=0;for(const r of q0e){const o=n.match(r);if(o){e=parseInt(o[1]);break}}if(!e)return null;let t=0,i=!1;return e>32700&&e<32761?t=e-32700:e>32600&&e<32661&&(i=!0,t=e-32600),t?{number:t,north:i}:null}function Lz(n,e){return function(t,i,r,o){const s=t.length;r=r>1?r:2,o=o??r,i||(r>2?i=t.slice():i=new Array(s));for(let a=0;a<s;a+=o){const c=t[a],A=t[a+1],m=n(c,A,e);i[a]=m[0],i[a+1]=m[1]}return i}}function Y0e(n){return TJ(n)?new IE({code:n,units:"m"}):null}function $0e(n){const e=TJ(n.getCode());return e?{forward:Lz(Q0e,e),inverse:Lz(N0e,e)}:null}const V0e=[$0e],H0e=[Y0e];let K9=!0;function RJ(n){K9=!1}function KP(n,e){if(e!==void 0){for(let t=0,i=n.length;t<i;++t)e[t]=n[t];e=e}else e=n.slice();return e}function L9(n){D0e(n.getCode(),n),z3(n,n,KP)}function Z0e(n){n.forEach(L9)}function Xs(n){if(typeof n!="string")return n;const e=R0e(n);if(e)return e;for(const t of H0e){const i=t(n);if(i)return i}return null}function F9(n,e,t,i){n=Xs(n);let r;const o=n.getPointResolutionFunc();if(o){if(r=o(e,t),i&&i!==n.getUnits()){const s=n.getMetersPerUnit();s&&(r=r*s/Yy[i])}}else{const s=n.getUnits();if(s=="degrees"&&!i||i=="degrees")r=e;else{const a=Y4(n,Xs("EPSG:4326"));if(!a&&s!=="degrees")r=e*n.getMetersPerUnit();else{let A=[t[0]-e/2,t[1],t[0]+e/2,t[1],t[0],t[1]-e/2,t[0],t[1]+e/2];A=a(A,A,2);const m=kz(A.slice(0,2),A.slice(2,4)),v=kz(A.slice(4,6),A.slice(6,8));r=(m+v)/2}const c=i?Yy[i]:n.getMetersPerUnit();c!==void 0&&(r/=c)}}return r}function Fz(n){Z0e(n),n.forEach(function(e){n.forEach(function(t){e!==t&&z3(e,t,KP)})})}function X0e(n,e,t,i){n.forEach(function(r){e.forEach(function(o){z3(r,o,t),z3(o,r,i)})})}function LP(n,e){return n?typeof n=="string"?Xs(n):n:Xs(e)}function J0e(n){return(function(e,t,i,r){const o=e.length;i=i!==void 0?i:2,r=r??i,t=t!==void 0?t:new Array(o);for(let s=0;s<o;s+=r){const a=n(e.slice(s,s+i)),c=a.length;for(let A=0,m=r;A<m;++A)t[s+A]=A>=c?e[s+A]:a[A]}return t})}function z9(n,e){return RJ(),RE(n,"EPSG:4326",e!==void 0?e:"EPSG:3857")}function PO(n,e){const t=RE(n,"EPSG:3857","EPSG:4326"),i=t[0];return(i<-180||i>180)&&(t[0]=gb(i+180,360)-180),t}function Ny(n,e){if(n===e)return!0;const t=n.getUnits()===e.getUnits();return(n.getCode()===e.getCode()||Y4(n,e)===KP)&&t}function Y4(n,e){const t=n.getCode(),i=e.getCode();let r=DO(t,i);if(r)return r;let o=null,s=null;for(const c of V0e)o||(o=c(n)),s||(s=c(e));if(!o&&!s)return null;const a="EPSG:4326";if(s)if(o)r=UO(o.inverse,s.forward);else{const c=DO(t,a);c&&(r=UO(c,s.forward))}else{const c=DO(a,i);c&&(r=UO(o.inverse,c))}return r&&(L9(n),L9(e),z3(n,e,r)),r}function UO(n,e){return function(t,i,r,o){return i=n(t,i,r,o),e(i,i,r,o)}}function j3(n,e){const t=Xs(n),i=Xs(e);return Y4(t,i)}function RE(n,e,t){const i=j3(e,t);if(!i){const r=Xs(e).getCode(),o=Xs(t).getCode();throw new Error(`No transform available between ${r} and ${o}`)}return i(n,void 0,n.length)}let e1e=null;function t1e(){return e1e}function j9(n,e){return n}function K0(n,e){return K9&&!jw(n,[0,0])&&n[0]>=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(K9=!1,EJ("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n}function FP(n,e){return n}function Mg(n,e){return n}function n1e(){Fz(Tz),Fz(Dz),X0e(Dz,Tz,B0e,I0e)}n1e();const DJ=new Array(6);function td(){return[1,0,0,1,0,0]}function zz(n){return jP(n,1,0,0,1,0,0)}function zP(n,e){const t=n[0],i=n[1],r=n[2],o=n[3],s=n[4],a=n[5],c=e[0],A=e[1],m=e[2],v=e[3],x=e[4],_=e[5];return n[0]=t*c+r*A,n[1]=i*c+o*A,n[2]=t*m+r*v,n[3]=i*m+o*v,n[4]=t*x+r*_+s,n[5]=i*x+o*_+a,n}function jP(n,e,t,i,r,o,s){return n[0]=e,n[1]=t,n[2]=i,n[3]=r,n[4]=o,n[5]=s,n}function i1e(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n}function Du(n,e){const t=e[0],i=e[1];return e[0]=n[0]*t+n[2]*i+n[4],e[1]=n[1]*t+n[3]*i+n[5],e}function KO(n,e,t){return zP(n,jP(DJ,e,0,0,t,0,0))}function r1e(n,e,t){return zP(n,jP(DJ,1,0,0,1,e,t))}function Fg(n,e,t,i,r,o,s,a){const c=Math.sin(o),A=Math.cos(o);return n[0]=i*A,n[1]=r*c,n[2]=-i*c,n[3]=r*A,n[4]=s*i*A-a*i*c+e,n[5]=s*r*c+a*r*A+t,n}function PJ(n,e){const t=o1e(e);Os(t!==0,"Transformation matrix cannot be inverted");const i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],c=e[5];return n[0]=s/t,n[1]=-r/t,n[2]=-o/t,n[3]=i/t,n[4]=(o*c-s*a)/t,n[5]=-(i*c-r*a)/t,n}function o1e(n){return n[0]*n[3]-n[1]*n[2]}const s1e=[1e5,1e5,1e5,1e5,2,2];function a1e(n){return"matrix("+n.join(", ")+")"}function jz(n){return n.substring(7,n.length-1).split(",").map(parseFloat)}function l1e(n,e){const t=jz(n),i=jz(e);for(let r=0;r<6;++r)if(Math.round((t[r]-i[r])*s1e[r])!==0)return!1;return!0}function Gy(n,e,t,i,r,o,s){o=o||[],s=s||2;let a=0;for(let c=e;c<t;c+=i){const A=n[c],m=n[c+1];o[a++]=r[0]*A+r[2]*m+r[4],o[a++]=r[1]*A+r[3]*m+r[5];for(let v=2;v<s;v++)o[a++]=n[c+v]}return o&&o.length!=a&&(o.length=a),o}function UJ(n,e,t,i,r,o,s){s=s||[];const a=Math.cos(r),c=Math.sin(r),A=o[0],m=o[1];let v=0;for(let x=e;x<t;x+=i){const _=n[x]-A,O=n[x+1]-m;s[v++]=A+_*a-O*c,s[v++]=m+_*c+O*a;for(let P=x+2;P<x+i;++P)s[v++]=n[P]}return s&&s.length!=v&&(s.length=v),s}function u1e(n,e,t,i,r,o,s,a){a=a||[];const c=s[0],A=s[1];let m=0;for(let v=e;v<t;v+=i){const x=n[v]-c,_=n[v+1]-A;a[m++]=c+r*x,a[m++]=A+o*_;for(let O=v+2;O<v+i;++O)a[m++]=n[O]}return a&&a.length!=m&&(a.length=m),a}function c1e(n,e,t,i,r,o,s){s=s||[];let a=0;for(let c=e;c<t;c+=i){s[a++]=n[c]+r,s[a++]=n[c+1]+o;for(let A=c+2;A<c+i;++A)s[a++]=n[A]}return s&&s.length!=a&&(s.length=a),s}const Nz=td(),A1e=[NaN,NaN];class KJ extends vm{constructor(){super(),this.extent_=rp(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=dJ((e,t,i)=>{if(!i)return this.getSimplifiedGeometry(t);const r=this.clone();return r.applyTransform(i),r.getSimplifiedGeometry(t)})}simplifyTransformed(e,t){return this.simplifyTransformedInternal(this.getRevision(),e,t)}clone(){return Dr()}closestPointXY(e,t,i,r){return Dr()}containsXY(e,t){return this.closestPointXY(e,t,A1e,Number.MIN_VALUE)===0}getClosestPoint(e,t){return t=t||[NaN,NaN],this.closestPointXY(e[0],e[1],t,1/0),t}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return Dr()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&Sx(t),this.extentRevision_=this.getRevision()}return m0e(this.extent_,e)}rotate(e,t){Dr()}scale(e,t,i){Dr()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return Dr()}getType(){return Dr()}applyTransform(e){Dr()}intersectsExtent(e){return Dr()}translate(e,t){Dr()}transform(e,t){const i=Xs(e),r=i.getUnits()=="tile-pixels"?function(o,s,a){const c=i.getExtent(),A=i.getWorldExtent(),m=Ku(A)/Ku(c);Fg(Nz,A[0],A[3],m,-m,0,0,0);const v=Gy(o,0,o.length,a,Nz,s),x=j3(i,t);return x?x(v,v,a):v}:j3(i,t);return this.applyTransform(r),this}}class zb extends KJ{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return TP(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return Dr()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=this.getSimplifiedGeometryInternal(e);return t.getFlatCoordinates().length<this.flatCoordinates.length?t:(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getSimplifiedGeometryInternal(e){return this}getStride(){return this.stride}setFlatCoordinates(e,t){this.stride=Gz(e),this.layout=e,this.flatCoordinates=t}setCoordinates(e,t){Dr()}setLayout(e,t,i){let r;if(e)r=Gz(e);else{for(let o=0;o<i;++o){if(t.length===0){this.layout="XY",this.stride=2;return}t=t[0]}r=t.length,e=jb(r)}this.layout=e,this.stride=r}applyTransform(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(e,t){const i=this.getFlatCoordinates();if(i){const r=this.getStride();UJ(i,0,i.length,r,e,t,i),this.changed()}}scale(e,t,i){t===void 0&&(t=e),i||(i=lf(this.getExtent()));const r=this.getFlatCoordinates();if(r){const o=this.getStride();u1e(r,0,r.length,o,e,t,i,r),this.changed()}}translate(e,t){const i=this.getFlatCoordinates();if(i){const r=this.getStride();c1e(i,0,i.length,r,e,t,i),this.changed()}}}function jb(n){let e;return n==2?e="XY":n==3?e="XYZ":n==4&&(e="XYZM"),e}function Gz(n){let e;return n=="XY"?e=2:n=="XYZ"||n=="XYM"?e=3:n=="XYZM"&&(e=4),e}function h1e(n,e,t){const i=n.getFlatCoordinates();if(!i)return null;const r=n.getStride();return Gy(i,0,i.length,r,e,t)}function LJ(n,e,t,i){let r=0;const o=n[t-i],s=n[t-i+1];let a=0,c=0;for(;e<t;e+=i){const A=n[e]-o,m=n[e+1]-s;r+=c*A-a*m,a=A,c=m}return r/2}function FJ(n,e,t,i){let r=0;for(let o=0,s=t.length;o<s;++o){const a=t[o];r+=LJ(n,e,a,i),e=a}return r}function d1e(n,e,t,i){let r=0;for(let o=0,s=t.length;o<s;++o){const a=t[o];r+=FJ(n,e,a,i),e=a[a.length-1]}return r}function Wz(n,e,t,i,r,o,s){const a=n[e],c=n[e+1],A=n[t]-a,m=n[t+1]-c;let v;if(A===0&&m===0)v=e;else{const x=((r-a)*A+(o-c)*m)/(A*A+m*m);if(x>1)v=t;else if(x>0){for(let _=0;_<i;++_)s[_]=Vd(n[e+_],n[t+_],x);s.length=i;return}else v=e}for(let x=0;x<i;++x)s[x]=n[v+x];s.length=i}function NP(n,e,t,i,r){let o=n[e],s=n[e+1];for(e+=i;e<t;e+=i){const a=n[e],c=n[e+1],A=mb(o,s,a,c);A>r&&(r=A),o=a,s=c}return r}function GP(n,e,t,i,r){for(let o=0,s=t.length;o<s;++o){const a=t[o];r=NP(n,e,a,i,r),e=a}return r}function f1e(n,e,t,i,r){for(let o=0,s=t.length;o<s;++o){const a=t[o];r=GP(n,e,a,i,r),e=a[a.length-1]}return r}function WP(n,e,t,i,r,o,s,a,c,A,m){if(e==t)return A;let v,x;if(r===0){if(x=mb(s,a,n[e],n[e+1]),x<A){for(v=0;v<i;++v)c[v]=n[e+v];return c.length=i,x}return A}m=m||[NaN,NaN];let _=e+i;for(;_<t;)if(Wz(n,_-i,_,i,s,a,m),x=mb(s,a,m[0],m[1]),x<A){for(A=x,v=0;v<i;++v)c[v]=m[v];c.length=i,_+=i}else _+=i*Math.max((Math.sqrt(x)-Math.sqrt(A))/r|0,1);if(o&&(Wz(n,t-i,e,i,s,a,m),x=mb(s,a,m[0],m[1]),x<A)){for(A=x,v=0;v<i;++v)c[v]=m[v];c.length=i}return A}function QP(n,e,t,i,r,o,s,a,c,A,m){m=m||[NaN,NaN];for(let v=0,x=t.length;v<x;++v){const _=t[v];A=WP(n,e,_,i,r,o,s,a,c,A,m),e=_}return A}function p1e(n,e,t,i,r,o,s,a,c,A,m){m=m||[NaN,NaN];for(let v=0,x=t.length;v<x;++v){const _=t[v];A=QP(n,e,_,i,r,o,s,a,c,A,m),e=_[_.length-1]}return A}function m1e(n,e,t,i){for(let r=0,o=t.length;r<o;++r)n[e++]=t[r];return e}function DE(n,e,t,i){for(let r=0,o=t.length;r<o;++r){const s=t[r];for(let a=0;a<i;++a)n[e++]=s[a]}return e}function $4(n,e,t,i,r){r=r||[];let o=0;for(let s=0,a=t.length;s<a;++s){const c=DE(n,e,t[s],i);r[o++]=c,e=c}return r.length=o,r}function zJ(n,e,t,i,r){r=r||[];let o=0;for(let s=0,a=t.length;s<a;++s){const c=$4(n,e,t[s],i,r[o]);c.length===0&&(c[0]=e),r[o++]=c,e=c[c.length-1]}return r.length=o,r}function By(n,e,t,i,r){r=r!==void 0?r:[];let o=0;for(let s=e;s<t;s+=i)r[o++]=n.slice(s,s+i);return r.length=o,r}function N3(n,e,t,i,r){r=r!==void 0?r:[];let o=0;for(let s=0,a=t.length;s<a;++s){const c=t[s];r[o++]=By(n,e,c,i,r[o]),e=c}return r.length=o,r}function N9(n,e,t,i,r){r=r!==void 0?r:[];let o=0;for(let s=0,a=t.length;s<a;++s){const c=t[s];r[o++]=c.length===1&&c[0]===e?[]:N3(n,e,c,i,r[o]),e=c[c.length-1]}return r.length=o,r}function PE(n,e,t,i,r,o,s){const a=(t-e)/i;if(a<3){for(;e<t;e+=i)o[s++]=n[e],o[s++]=n[e+1];return s}const c=new Array(a);c[0]=1,c[a-1]=1;const A=[e,t-i];let m=0;for(;A.length>0;){const v=A.pop(),x=A.pop();let _=0;const O=n[x],P=n[x+1],F=n[v],j=n[v+1];for(let Q=x+i;Q<v;Q+=i){const V=n[Q],H=n[Q+1],G=c0e(V,H,O,P,F,j);G>_&&(m=Q,_=G)}_>r&&(c[(m-e)/i]=1,x+i<m&&A.push(x,m),m+i<v&&A.push(m,v))}for(let v=0;v<a;++v)c[v]&&(o[s++]=n[e+v*i],o[s++]=n[e+v*i+1]);return s}function jJ(n,e,t,i,r,o,s,a){for(let c=0,A=t.length;c<A;++c){const m=t[c];s=PE(n,e,m,i,r,o,s),a.push(s),e=m}return s}function qv(n,e){return e*Math.round(n/e)}function g1e(n,e,t,i,r,o,s){if(e==t)return s;let a=qv(n[e],r),c=qv(n[e+1],r);e+=i,o[s++]=a,o[s++]=c;let A,m;do if(A=qv(n[e],r),m=qv(n[e+1],r),e+=i,e==t)return o[s++]=A,o[s++]=m,s;while(A==a&&m==c);for(;e<t;){const v=qv(n[e],r),x=qv(n[e+1],r);if(e+=i,v==A&&x==m)continue;const _=A-a,O=m-c,P=v-a,F=x-c;if(_*F==O*P&&(_<0&&P<_||_==P||_>0&&P>_)&&(O<0&&F<O||O==F||O>0&&F>O)){A=v,m=x;continue}o[s++]=A,o[s++]=m,a=A,c=m,A=v,m=x}return o[s++]=A,o[s++]=m,s}function qP(n,e,t,i,r,o,s,a){for(let c=0,A=t.length;c<A;++c){const m=t[c];s=g1e(n,e,m,i,r,o,s),a.push(s),e=m}return s}function y1e(n,e,t,i,r,o,s,a){for(let c=0,A=t.length;c<A;++c){const m=t[c],v=[];s=qP(n,e,m,i,r,o,s,v),a.push(v),e=m[m.length-1]}return s}class G3 extends zb{constructor(e,t){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,t!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}clone(){return new G3(this.flatCoordinates.slice(),this.layout)}closestPointXY(e,t,i,r){return r<Lb(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(NP(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),WP(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,e,t,i,r))}getArea(){return LJ(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return By(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(e){const t=[];return t.length=PE(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new G3(t,"XY")}getType(){return"LinearRing"}intersectsExtent(e){return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=DE(this.flatCoordinates,0,e,this.stride),this.changed()}}class Eb extends zb{constructor(e,t){super(),this.setCoordinates(e,t)}clone(){const e=new Eb(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,i,r){const o=this.flatCoordinates,s=mb(e,t,o[0],o[1]);if(s<r){const a=this.stride;for(let c=0;c<a;++c)i[c]=o[c];return i.length=a,s}return r}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(e){return vJ(this.flatCoordinates,e)}getType(){return"Point"}intersectsExtent(e){return kP(e,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(e,t){this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=m1e(this.flatCoordinates,0,e,this.stride),this.changed()}}function v1e(n,e,t,i,r){return!_J(r,function(s){return!nb(n,e,t,i,s[0],s[1])})}function nb(n,e,t,i,r,o){let s=0,a=n[t-i],c=n[t-i+1];for(;e<t;e+=i){const A=n[e],m=n[e+1];c<=o?m>o&&(A-a)*(o-c)-(r-a)*(m-c)>0&&s++:m<=o&&(A-a)*(o-c)-(r-a)*(m-c)<0&&s--,a=A,c=m}return s!==0}function YP(n,e,t,i,r,o){if(t.length===0||!nb(n,e,t[0],i,r,o))return!1;for(let s=1,a=t.length;s<a;++s)if(nb(n,t[s-1],t[s],i,r,o))return!1;return!0}function b1e(n,e,t,i,r,o){if(t.length===0)return!1;for(let s=0,a=t.length;s<a;++s){const c=t[s];if(YP(n,e,c,i,r,o))return!0;e=c[c.length-1]}return!1}function $P(n,e,t,i,r,o,s){let a,c,A,m,v,x,_;const O=r[o+1],P=[];for(let Q=0,V=t.length;Q<V;++Q){const H=t[Q];for(m=n[H-i],x=n[H-i+1],a=e;a<H;a+=i)v=n[a],_=n[a+1],(O<=x&&_<=O||x<=O&&O<=_)&&(A=(O-x)/(_-x)*(v-m)+m,P.push(A)),m=v,x=_}let F=NaN,j=-1/0;for(P.sort(Pg),m=P[0],a=1,c=P.length;a<c;++a){v=P[a];const Q=Math.abs(v-m);Q>j&&(A=(m+v)/2,YP(n,e,t,i,A,O)&&(F=A,j=Q)),m=v}return isNaN(F)&&(F=r[o]),s?(s.push(F,O,j),s):[F,O,j]}function NJ(n,e,t,i,r){let o=[];for(let s=0,a=t.length;s<a;++s){const c=t[s];o=$P(n,e,c,i,r,2*s,o),e=c[c.length-1]}return o}function GJ(n,e,t,i,r){let o;for(e+=i;e<t;e+=i)if(o=r(n.slice(e-i,e),n.slice(e,e+i)),o)return o;return!1}function UE(n,e,t,i,r,o){return o=o??CJ(rp(),n,e,t,i),Gl(r,o)?o[0]>=r[0]&&o[2]<=r[2]||o[1]>=r[1]&&o[3]<=r[3]?!0:GJ(n,e,t,i,function(s,a){return g0e(r,s,a)}):!1}function C1e(n,e,t,i,r){for(let o=0,s=t.length;o<s;++o){if(UE(n,e,t[o],i,r))return!0;e=t[o]}return!1}function WJ(n,e,t,i,r){return!!(UE(n,e,t,i,r)||nb(n,e,t,i,r[0],r[1])||nb(n,e,t,i,r[0],r[3])||nb(n,e,t,i,r[2],r[1])||nb(n,e,t,i,r[2],r[3]))}function QJ(n,e,t,i,r){if(!WJ(n,e,t[0],i,r))return!1;if(t.length===1)return!0;for(let o=1,s=t.length;o<s;++o)if(v1e(n,t[o-1],t[o],i,r)&&!UE(n,t[o-1],t[o],i,r))return!1;return!0}function _1e(n,e,t,i,r){for(let o=0,s=t.length;o<s;++o){const a=t[o];if(QJ(n,e,a,i,r))return!0;e=a[a.length-1]}return!1}function x1e(n,e,t,i){for(;e<t-i;){for(let r=0;r<i;++r){const o=n[e+r];n[e+r]=n[t-i+r],n[t-i+r]=o}e+=i,t-=i}}function VP(n,e,t,i){let r=0,o=n[t-i],s=n[t-i+1];for(;e<t;e+=i){const a=n[e],c=n[e+1];r+=(a-o)*(c+s),o=a,s=c}return r===0?void 0:r>0}function HP(n,e,t,i,r){r=r!==void 0?r:!1;for(let o=0,s=t.length;o<s;++o){const a=t[o],c=VP(n,e,a,i);if(o===0){if(r&&c||!r&&!c)return!1}else if(r&&!c||!r&&c)return!1;e=a}return!0}function qJ(n,e,t,i,r){for(let o=0,s=t.length;o<s;++o){const a=t[o];if(!HP(n,e,a,i,r))return!1;a.length&&(e=a[a.length-1])}return!0}function Ww(n,e,t,i,r){r=r!==void 0?r:!1;for(let o=0,s=t.length;o<s;++o){const a=t[o],c=VP(n,e,a,i);(o===0?r&&c||!r&&!c:r&&!c||!r&&c)&&x1e(n,e,a,i),e=a}return e}function G9(n,e,t,i,r){for(let o=0,s=t.length;o<s;++o)e=Ww(n,e,t[o],i,r);return e}function YJ(n,e){const t=[];let i=0,r=0,o;for(let s=0,a=e.length;s<a;++s){const c=e[s],A=VP(n,i,c,2);if(o===void 0&&(o=A),A===o)t.push(e.slice(r,s+1));else{if(t.length===0)continue;t[t.length-1].push(e[r])}r=s+1,i=c}return t}class e1 extends zb{constructor(e,t,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,t!==void 0&&i?(this.setFlatCoordinates(t,e),this.ends_=i):this.setCoordinates(e,t)}appendLinearRing(e){this.flatCoordinates?Ug(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new e1(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,i,r){return r<Lb(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(GP(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),QP(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,i,r))}containsXY(e,t){return YP(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)}getArea(){return FJ(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(e){let t;return e!==void 0?(t=this.getOrientedFlatCoordinates().slice(),Ww(t,0,this.ends_,this.stride,e)):t=this.flatCoordinates,N3(t,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const e=lf(this.getExtent());this.flatInteriorPoint_=$P(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Eb(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(e){return e<0||this.ends_.length<=e?null:new G3(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLinearRings(){const e=this.layout,t=this.flatCoordinates,i=this.ends_,r=[];let o=0;for(let s=0,a=i.length;s<a;++s){const c=i[s],A=new G3(t.slice(o,c),e);r.push(A),o=c}return r}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;HP(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=Ww(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],i=[];return t.length=qP(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,i),new e1(t,"XY",i)}getType(){return"Polygon"}intersectsExtent(e){return QJ(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=$4(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}}function Qz(n){if(Fb(n))throw new Error("Cannot create polygon from empty extent");const e=n[0],t=n[1],i=n[2],r=n[3],o=[e,t,e,r,i,r,i,t,e,t];return new e1(o,"XY",[o.length])}function ZP(n,e,t,i){const r=as(e)/t[0],o=Ku(e)/t[1];return i?Math.min(n,Math.max(r,o)):Math.min(n,Math.min(r,o))}function XP(n,e,t){let i=Math.min(n,e);const r=50;return i*=Math.log(1+r*Math.max(0,n/e-1))/r+1,t&&(i=Math.max(i,t),i/=Math.log(1+r*Math.max(0,t/n-1))/r+1),vl(i,t/2,e*2)}function M1e(n,e,t,i){return e=e!==void 0?e:!0,(function(r,o,s,a){if(r!==void 0){const c=n[0],A=n[n.length-1],m=t?ZP(c,t,s,i):c;if(a)return e?XP(r,m,A):vl(r,A,m);const v=Math.min(m,r),x=Math.floor(ME(n,v,o));return n[x]>m&&x<n.length-1?n[x+1]:n[x]}})}function w1e(n,e,t,i,r,o){return i=i!==void 0?i:!0,t=t!==void 0?t:0,(function(s,a,c,A){if(s!==void 0){const m=r?ZP(e,r,c,o):e;if(A)return i?XP(s,m,t):vl(s,t,m);const v=1e-9,x=Math.ceil(Math.log(e/m)/Math.log(n)-v),_=-a*(.5-v)+.5,O=Math.min(m,s),P=Math.floor(Math.log(e/O)/Math.log(n)+_),F=Math.max(x,P),j=e/Math.pow(n,F);return vl(j,t,m)}})}function qz(n,e,t,i,r){return t=t!==void 0?t:!0,(function(o,s,a,c){if(o!==void 0){const A=i?ZP(n,i,a,r):n;return!t||!c?vl(o,e,A):XP(o,A,e)}})}function JP(n){if(n!==void 0)return 0}function Yz(n){if(n!==void 0)return n}function S1e(n){const e=2*Math.PI/n;return(function(t,i){if(i)return t;if(t!==void 0)return t=Math.floor(t/e+.5)*e,t})}function E1e(n){const e=zy(5);return(function(t,i){return i||t===void 0?t:Math.abs(t)<=e?0:t})}const $J=42,eU=256,LO=0;class im extends vm{constructor(e){super(),this.on,this.once,this.un,e=Object.assign({},e),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=LP(e.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,e.projection&&RJ(),e.center&&(e.center=K0(e.center,this.projection_)),e.extent&&(e.extent=Mg(e.extent,this.projection_)),this.applyOptions_(e)}applyOptions_(e){const t=Object.assign({},e);for(const a in Vp)delete t[a];this.setProperties(t,!0);const i=B1e(e);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=e.resolutions,this.padding_=e.padding,this.minZoom_=i.minZoom;const r=O1e(e),o=i.constraint,s=I1e(e);this.constraints_={center:r,resolution:o,rotation:s},this.setRotation(e.rotation!==void 0?e.rotation:0),this.setCenterInternal(e.center!==void 0?e.center:null),e.resolution!==void 0?this.setResolution(e.resolution):e.zoom!==void 0&&this.setZoom(e.zoom)}get padding(){return this.padding_}set padding(e){let t=this.padding_;this.padding_=e;const i=this.getCenterInternal();if(i){const r=e||[0,0,0,0];t=t||[0,0,0,0];const o=this.getResolution(),s=o/2*(r[3]-t[3]+t[1]-r[1]),a=o/2*(r[0]-t[0]+t[2]-r[2]);this.setCenterInternal([i[0]+s,i[1]-a])}}getUpdatedOptions_(e){const t=this.getProperties();return t.resolution!==void 0?t.resolution=this.getResolution():t.zoom=this.getZoom(),t.center=this.getCenterInternal(),t.rotation=this.getRotation(),Object.assign({},t,e)}animate(e){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const t=new Array(arguments.length);for(let i=0;i<t.length;++i){let r=arguments[i];r.center&&(r=Object.assign({},r),r.center=K0(r.center,this.getProjection())),r.anchor&&(r=Object.assign({},r),r.anchor=K0(r.anchor,this.getProjection())),t[i]=r}this.animateInternal.apply(this,t)}animateInternal(e){let t=arguments.length,i;t>1&&typeof arguments[t-1]=="function"&&(i=arguments[t-1],--t);let r=0;for(;r<t&&!this.isDef();++r){const m=arguments[r];m.center&&this.setCenterInternal(m.center),m.zoom!==void 0?this.setZoom(m.zoom):m.resolution&&this.setResolution(m.resolution),m.rotation!==void 0&&this.setRotation(m.rotation)}if(r===t){i&&FM(i,!0);return}let o=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,c=this.targetRotation_;const A=[];for(;r<t;++r){const m=arguments[r],v={start:o,complete:!1,anchor:m.anchor,duration:m.duration!==void 0?m.duration:1e3,easing:m.easing||M0e,callback:i};if(m.center&&(v.sourceCenter=s,v.targetCenter=m.center.slice(),s=v.targetCenter),m.zoom!==void 0?(v.sourceResolution=a,v.targetResolution=this.getResolutionForZoom(m.zoom),a=v.targetResolution):m.resolution&&(v.sourceResolution=a,v.targetResolution=m.resolution,a=v.targetResolution),m.rotation!==void 0){v.sourceRotation=c;const x=gb(m.rotation-c+Math.PI,2*Math.PI)-Math.PI;v.targetRotation=c+x,c=v.targetRotation}k1e(v)?v.complete=!0:o+=v.duration,A.push(v)}this.animations_.push(A),this.setHint(sl.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[sl.ANIMATING]>0}getInteracting(){return this.hints_[sl.INTERACTING]>0}cancelAnimations(){this.setHint(sl.ANIMATING,-this.hints_[sl.ANIMATING]);let e;for(let t=0,i=this.animations_.length;t<i;++t){const r=this.animations_[t];if(r[0].callback&&FM(r[0].callback,!1),!e)for(let o=0,s=r.length;o<s;++o){const a=r[o];if(!a.complete){e=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=e,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const e=Date.now();let t=!1;for(let i=this.animations_.length-1;i>=0;--i){const r=this.animations_[i];let o=!0;for(let s=0,a=r.length;s<a;++s){const c=r[s];if(c.complete)continue;const A=e-c.start;let m=c.duration>0?A/c.duration:1;m>=1?(c.complete=!0,m=1):o=!1;const v=c.easing(m);if(c.sourceCenter){const x=c.sourceCenter[0],_=c.sourceCenter[1],O=c.targetCenter[0],P=c.targetCenter[1];this.nextCenter_=c.targetCenter;const F=x+v*(O-x),j=_+v*(P-_);this.targetCenter_=[F,j]}if(c.sourceResolution&&c.targetResolution){const x=v===1?c.targetResolution:c.sourceResolution+v*(c.targetResolution-c.sourceResolution);if(c.anchor){const _=this.getViewportSize_(this.getRotation()),O=this.constraints_.resolution(x,0,_,!0);this.targetCenter_=this.calculateCenterZoom(O,c.anchor)}this.nextResolution_=c.targetResolution,this.targetResolution_=x,this.applyTargetState_(!0)}if(c.sourceRotation!==void 0&&c.targetRotation!==void 0){const x=v===1?gb(c.targetRotation+Math.PI,2*Math.PI)-Math.PI:c.sourceRotation+v*(c.targetRotation-c.sourceRotation);if(c.anchor){const _=this.constraints_.rotation(x,!0);this.targetCenter_=this.calculateCenterRotate(_,c.anchor)}this.nextRotation_=c.targetRotation,this.targetRotation_=x}if(this.applyTargetState_(!0),t=!0,!c.complete)break}if(o){this.animations_[i]=null,this.setHint(sl.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const s=r[0].callback;s&&FM(s,!0)}}this.animations_=this.animations_.filter(Boolean),t&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,t){let i;const r=this.getCenterInternal();return r!==void 0&&(i=[r[0]-t[0],r[1]-t[1]],RP(i,e-this.getRotation()),v0e(i,t)),i}calculateCenterZoom(e,t){let i;const r=this.getCenterInternal(),o=this.getResolution();if(r!==void 0&&o!==void 0){const s=t[0]-e*(t[0]-r[0])/o,a=t[1]-e*(t[1]-r[1])/o;i=[s,a]}return i}getViewportSize_(e){const t=this.viewportSize_;if(e){const i=t[0],r=t[1];return[Math.abs(i*Math.cos(e))+Math.abs(r*Math.sin(e)),Math.abs(i*Math.sin(e))+Math.abs(r*Math.cos(e))]}return t}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const e=this.getCenterInternal();return e&&j9(e,this.getProjection())}getCenterInternal(){return this.get(Vp.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){const t=this.calculateExtentInternal(e);return FP(t,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const t=this.getCenterInternal();Os(t,"The view center is not defined");const i=this.getResolution();Os(i!==void 0,"The view resolution is not defined");const r=this.getRotation();return Os(r!==void 0,"The view rotation is not defined"),zw(t,i,r,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(Vp.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,t){return this.getResolutionForExtentInternal(Mg(e,this.getProjection()),t)}getResolutionForExtentInternal(e,t){t=t||this.getViewportSizeMinusPadding_();const i=as(e)/t[0],r=Ku(e)/t[1];return Math.max(i,r)}getResolutionForValueFunction(e){e=e||2;const t=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(t/i)/Math.log(e);return(function(o){return t/Math.pow(e,o*r)})}getRotation(){return this.get(Vp.ROTATION)}getValueForResolutionFunction(e){const t=Math.log(e||2),i=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,o=Math.log(i/r)/t;return(function(s){return Math.log(i/s)/t/o})}getViewportSizeMinusPadding_(e){let t=this.getViewportSize_(e);const i=this.padding_;return i&&(t=[t[0]-i[1]-i[3],t[1]-i[0]-i[2]]),t}getState(){const e=this.getProjection(),t=this.getResolution(),i=this.getRotation();let r=this.getCenterInternal();const o=this.padding_;if(o){const s=this.getViewportSizeMinusPadding_();r=FO(r,this.getViewportSize_(),[s[0]/2+o[3],s[1]/2+o[0]],t,i)}return{center:r.slice(0),projection:e!==void 0?e:null,resolution:t,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e;const t=this.getResolution();return t!==void 0&&(e=this.getZoomForResolution(t)),e}getZoomForResolution(e){let t=this.minZoom_||0,i,r;if(this.resolutions_){const o=ME(this.resolutions_,e,1);t=o,i=this.resolutions_[o],o==this.resolutions_.length-1?r=2:r=i/this.resolutions_[o+1]}else i=this.maxResolution_,r=this.zoomFactor_;return t+Math.log(i/e)/Math.log(r)}getResolutionForZoom(e){if(this.resolutions_?.length){if(this.resolutions_.length===1)return this.resolutions_[0];const t=vl(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[t]/this.resolutions_[t+1];return this.resolutions_[t]/Math.pow(i,vl(e-t,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,t){let i;if(Os(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(e)){Os(!Fb(e),"Cannot fit empty extent provided as `geometry`");const r=Mg(e,this.getProjection());i=Qz(r)}else if(e.getType()==="Circle"){const r=Mg(e.getExtent(),this.getProjection());i=Qz(r),i.rotate(this.getRotation(),lf(r))}else i=e;this.fitInternal(i,t)}rotatedExtentForGeometry(e){const t=this.getRotation(),i=Math.cos(t),r=Math.sin(-t),o=e.getFlatCoordinates(),s=e.getStride();let a=1/0,c=1/0,A=-1/0,m=-1/0;for(let v=0,x=o.length;v<x;v+=s){const _=o[v]*i-o[v+1]*r,O=o[v]*r+o[v+1]*i;a=Math.min(a,_),c=Math.min(c,O),A=Math.max(A,_),m=Math.max(m,O)}return[a,c,A,m]}fitInternal(e,t){t=t||{};let i=t.size;i||(i=this.getViewportSizeMinusPadding_());const r=t.padding!==void 0?t.padding:[0,0,0,0],o=t.nearest!==void 0?t.nearest:!1;let s;t.minResolution!==void 0?s=t.minResolution:t.maxZoom!==void 0?s=this.getResolutionForZoom(t.maxZoom):s=0;const a=this.rotatedExtentForGeometry(e);let c=this.getResolutionForExtentInternal(a,[i[0]-r[1]-r[3],i[1]-r[0]-r[2]]);c=isNaN(c)?s:Math.max(c,s),c=this.getConstrainedResolution(c,o?0:1);const A=this.getRotation(),m=Math.sin(A),v=Math.cos(A),x=lf(a);x[0]+=(r[1]-r[3])/2*c,x[1]+=(r[0]-r[2])/2*c;const _=x[0]*v-x[1]*m,O=x[1]*v+x[0]*m,P=this.getConstrainedCenter([_,O],c),F=t.callback?t.callback:F3;t.duration!==void 0?this.animateInternal({resolution:c,center:P,duration:t.duration,easing:t.easing},F):(this.targetResolution_=c,this.targetCenter_=P,this.applyTargetState_(!1,!0),FM(F,!0))}centerOn(e,t,i){this.centerOnInternal(K0(e,this.getProjection()),t,i)}centerOnInternal(e,t,i){this.setCenterInternal(FO(e,t,i,this.getResolution(),this.getRotation()))}calculateCenterShift(e,t,i,r){let o;const s=this.padding_;if(s&&e){const a=this.getViewportSizeMinusPadding_(-i),c=FO(e,r,[a[0]/2+s[3],a[1]/2+s[0]],t,i);o=[e[0]-c[0],e[1]-c[1]]}return o}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(e){const t=j9(this.targetCenter_,this.getProjection());this.setCenter([t[0]+e[0],t[1]+e[1]])}adjustCenterInternal(e){const t=this.targetCenter_;this.setCenterInternal([t[0]+e[0],t[1]+e[1]])}adjustResolution(e,t){t=t&&K0(t,this.getProjection()),this.adjustResolutionInternal(e,t)}adjustResolutionInternal(e,t){const i=this.getAnimating()||this.getInteracting(),r=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*e,0,r,i);t&&(this.targetCenter_=this.calculateCenterZoom(o,t)),this.targetResolution_*=e,this.applyTargetState_()}adjustZoom(e,t){this.adjustResolution(Math.pow(this.zoomFactor_,-e),t)}adjustRotation(e,t){t&&(t=K0(t,this.getProjection())),this.adjustRotationInternal(e,t)}adjustRotationInternal(e,t){const i=this.getAnimating()||this.getInteracting(),r=this.constraints_.rotation(this.targetRotation_+e,i);t&&(this.targetCenter_=this.calculateCenterRotate(r,t)),this.targetRotation_+=e,this.applyTargetState_()}setCenter(e){this.setCenterInternal(e&&K0(e,this.getProjection()))}setCenterInternal(e){this.targetCenter_=e,this.applyTargetState_()}setHint(e,t){return this.hints_[e]+=t,this.changed(),this.hints_[e]}setResolution(e){this.targetResolution_=e,this.applyTargetState_()}setRotation(e){this.targetRotation_=e,this.applyTargetState_()}setZoom(e){this.setResolution(this.getResolutionForZoom(e))}applyTargetState_(e,t){const i=this.getAnimating()||this.getInteracting()||t,r=this.constraints_.rotation(this.targetRotation_,i),o=this.getViewportSize_(r),s=this.constraints_.resolution(this.targetResolution_,0,o,i),a=this.constraints_.center(this.targetCenter_,s,o,i,this.calculateCenterShift(this.targetCenter_,s,r,o));this.get(Vp.ROTATION)!==r&&this.set(Vp.ROTATION,r),this.get(Vp.RESOLUTION)!==s&&(this.set(Vp.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(Vp.CENTER)||!jw(this.get(Vp.CENTER),a))&&this.set(Vp.CENTER,a),this.getAnimating()&&!e&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(e,t,i){e=e!==void 0?e:200;const r=t||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,r,s),c=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(e===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=c,this.applyTargetState_();return}i=i||(e===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==o||!this.getCenterInternal()||!jw(this.getCenterInternal(),c))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:c,resolution:a,duration:e,easing:Ex,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(sl.INTERACTING,1)}endInteraction(e,t,i){i=i&&K0(i,this.getProjection()),this.endInteractionInternal(e,t,i)}endInteractionInternal(e,t,i){this.getInteracting()&&(this.setHint(sl.INTERACTING,-1),this.resolveConstraints(e,t,i))}getConstrainedCenter(e,t){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(e,t||this.getResolution(),i)}getConstrainedZoom(e,t){const i=this.getResolutionForZoom(e);return this.getZoomForResolution(this.getConstrainedResolution(i,t))}getConstrainedResolution(e,t){t=t||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(e,t,i)}}function FM(n,e){setTimeout(function(){n(e)},0)}function O1e(n){if(n.extent!==void 0){const t=n.smoothExtentConstraint!==void 0?n.smoothExtentConstraint:!0;return Iz(n.extent,n.constrainOnlyCenter,t)}const e=LP(n.projection,"EPSG:3857");if(n.multiWorld!==!0&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,Iz(t,!1,!1)}return h0e}function B1e(n){let e,t,i,s=n.minZoom!==void 0?n.minZoom:LO,a=n.maxZoom!==void 0?n.maxZoom:28;const c=n.zoomFactor!==void 0?n.zoomFactor:2,A=n.multiWorld!==void 0?n.multiWorld:!1,m=n.smoothResolutionConstraint!==void 0?n.smoothResolutionConstraint:!0,v=n.showFullExtent!==void 0?n.showFullExtent:!1,x=LP(n.projection,"EPSG:3857"),_=x.getExtent();let O=n.constrainOnlyCenter,P=n.extent;if(!A&&!P&&x.isGlobal()&&(O=!1,P=_),n.resolutions!==void 0){const F=n.resolutions;t=F[s],i=F[a]!==void 0?F[a]:F[F.length-1],n.constrainResolution?e=M1e(F,m,!O&&P,v):e=qz(t,i,m,!O&&P,v)}else{const j=(_?Math.max(as(_),Ku(_)):360*Yy.degrees/x.getMetersPerUnit())/eU/Math.pow(2,LO),Q=j/Math.pow(2,28-LO);t=n.maxResolution,t!==void 0?s=0:t=j/Math.pow(c,s),i=n.minResolution,i===void 0&&(n.maxZoom!==void 0?n.maxResolution!==void 0?i=t/Math.pow(c,a):i=j/Math.pow(c,a):i=Q),a=s+Math.floor(Math.log(t/i)/Math.log(c)),i=t/Math.pow(c,a-s),n.constrainResolution?e=w1e(c,t,i,m,!O&&P,v):e=qz(t,i,m,!O&&P,v)}return{constraint:e,maxResolution:t,minResolution:i,minZoom:s,zoomFactor:c}}function I1e(n){if(n.enableRotation!==void 0?n.enableRotation:!0){const t=n.constrainRotation;return t===void 0||t===!0?E1e():t===!1?Yz:typeof t=="number"?S1e(t):Yz}return JP}function k1e(n){return!(n.sourceCenter&&n.targetCenter&&!jw(n.sourceCenter,n.targetCenter)||n.sourceResolution!==n.targetResolution||n.sourceRotation!==n.targetRotation)}function FO(n,e,t,i,r){const o=Math.cos(-r);let s=Math.sin(-r),a=n[0]*o-n[1]*s,c=n[1]*o+n[0]*s;a+=(e[0]/2-t[0])*i,c+=(t[1]-e[1]/2)*i,s=-s;const A=a*o-c*s,m=c*o+a*s;return[A,m]}const zM="ol-hidden",T1e="ol-selectable",KE="ol-unselectable",tU="ol-control",$z="ol-collapsed",R1e=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z0-9]+?)\\s*$`].join(""),"i"),Vz=["style","variant","weight","size","lineHeight","family"],W9={normal:400,bold:700},Q9=function(n){const e=n.match(R1e);if(!e)return null;const t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"400",variant:"normal"};for(let i=0,r=Vz.length;i<r;++i){const o=e[i+1];o!==void 0&&(t[Vz[i]]=typeof o=="string"?o.trim():o)}return isNaN(Number(t.weight))&&t.weight in W9&&(t.weight=W9[t.weight]),t.families=t.family.split(/,\s?/).map(i=>i.trim().replace(/^['"]|['"]$/g,"")),t};function bl(n,e,t,i){let r;return t&&t.length?r=t.shift():IP?r=new OffscreenCanvas(n||300,e||300):r=document.createElement("canvas"),n&&(r.width=n),e&&(r.height=e),r.getContext("2d",i)}let zO;function Qw(){return zO||(zO=bl(1,1)),zO}function V4(n){const e=n.canvas;e.width=1,e.height=1,n.clearRect(0,0,1,1)}function D1e(n){let e=n.offsetWidth;const t=getComputedStyle(n);return e+=parseInt(t.marginLeft,10)+parseInt(t.marginRight,10),e}function P1e(n){let e=n.offsetHeight;const t=getComputedStyle(n);return e+=parseInt(t.marginTop,10)+parseInt(t.marginBottom,10),e}function Hz(n,e){const t=e.parentNode;t&&t.replaceChild(n,e)}function VJ(n){for(;n.lastChild;)n.lastChild.remove()}function U1e(n,e){const t=n.childNodes;for(let i=0;;++i){const r=t[i],o=e[i];if(!r&&!o)break;if(r!==o){if(!r){n.appendChild(o);continue}if(!o){n.removeChild(r),--i;continue}n.insertBefore(o,r)}}}class nU extends vm{constructor(e){super();const t=e.element;t&&!e.target&&!t.style.pointerEvents&&(t.style.pointerEvents="auto"),this.element=t||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(e){this.map_&&this.element?.remove();for(let t=0,i=this.listenerKeys.length;t<i;++t)Ea(this.listenerKeys[t]);if(this.listenerKeys.length=0,this.map_=e,e){const t=this.target_??e.getOverlayContainerStopEvent();this.element&&t.appendChild(this.element),this.render!==F3&&this.listenerKeys.push(Zo(e,L0.POSTRENDER,this.render,this)),e.render()}}render(e){}setTarget(e){this.target_=typeof e=="string"?document.getElementById(e):e}}class K1e extends nU{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=e.collapsed!==void 0?e.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=e.collapsible!==void 0,this.collapsible_=e.collapsible!==void 0?e.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.attributions_=e.attributions;const t=e.className!==void 0?e.className:"ol-attribution",i=e.tipLabel!==void 0?e.tipLabel:"Attributions",r=e.expandClassName!==void 0?e.expandClassName:t+"-expand",o=e.collapseLabel!==void 0?e.collapseLabel:"",s=e.collapseClassName!==void 0?e.collapseClassName:t+"-collapse";typeof o=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o,this.collapseLabel_.className=s):this.collapseLabel_=o;const a=e.label!==void 0?e.label:"i";typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a,this.label_.className=r):this.label_=a;const c=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(c),this.toggleButton_.addEventListener(Ir.CLICK,this.handleClick_.bind(this),!1);const A=t+" "+KE+" "+tU+(this.collapsed_&&this.collapsible_?" "+$z:"")+(this.collapsible_?"":" ol-uncollapsible"),m=this.element;m.className=A,m.appendChild(this.toggleButton_),m.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(e){const t=this.getMap().getAllLayers(),i=new Set(t.flatMap(r=>r.getAttributions(e)));if(this.attributions_!==void 0&&(Array.isArray(this.attributions_)?this.attributions_.forEach(r=>i.add(r)):i.add(this.attributions_)),!this.overrideCollapsible_){const r=!t.some(o=>o.getSource()?.getAttributionsCollapsible()===!1);this.setCollapsible(r)}return Array.from(i)}async updateElement_(e){if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const t=await Promise.all(this.collectSourceAttributions_(e).map(r=>nx(()=>r))),i=t.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!tv(t,this.renderedAttributions_)){VJ(this.ulElement_);for(let r=0,o=t.length;r<o;++r){const s=document.createElement("li");s.innerHTML=t[r],this.ulElement_.appendChild(s)}this.renderedAttributions_=t}}handleClick_(e){e.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle($z),this.collapsed_?Hz(this.collapseLabel_,this.label_):Hz(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(e){this.userCollapsed_=e,!(!this.collapsible_||this.collapsed_===e)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(e){this.updateElement_(e.frameState)}}class L1e extends nU{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target});const t=e.className!==void 0?e.className:"ol-rotate",i=e.label!==void 0?e.label:"⇧",r=e.compassClassName!==void 0?e.compassClassName:"ol-compass";this.label_=null,typeof i=="string"?(this.label_=document.createElement("span"),this.label_.className=r,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(r));const o=e.tipLabel?e.tipLabel:"Reset rotation",s=document.createElement("button");s.className=t+"-reset",s.setAttribute("type","button"),s.title=o,s.appendChild(this.label_),s.addEventListener(Ir.CLICK,this.handleClick_.bind(this),!1);const a=t+" "+KE+" "+tU,c=this.element;c.className=a,c.appendChild(s),this.callResetNorth_=e.resetNorth?e.resetNorth:void 0,this.duration_=e.duration!==void 0?e.duration:250,this.autoHide_=e.autoHide!==void 0?e.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(zM)}handleClick_(e){e.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const i=t.getRotation();i!==void 0&&(this.duration_>0&&i%(2*Math.PI)!==0?t.animate({rotation:0,duration:this.duration_,easing:Ex}):t.setRotation(0))}render(e){const t=e.frameState;if(!t)return;const i=t.viewState.rotation;if(i!=this.rotation_){const r="rotate("+i+"rad)";if(this.autoHide_){const o=this.element.classList.contains(zM);!o&&i===0?this.element.classList.add(zM):o&&i!==0&&this.element.classList.remove(zM)}this.label_.style.transform=r}this.rotation_=i}}class F1e extends nU{constructor(e){e=e||{},super({element:document.createElement("div"),target:e.target});const t=e.className!==void 0?e.className:"ol-zoom",i=e.delta!==void 0?e.delta:1,r=e.zoomInClassName!==void 0?e.zoomInClassName:t+"-in",o=e.zoomOutClassName!==void 0?e.zoomOutClassName:t+"-out",s=e.zoomInLabel!==void 0?e.zoomInLabel:"+",a=e.zoomOutLabel!==void 0?e.zoomOutLabel:"",c=e.zoomInTipLabel!==void 0?e.zoomInTipLabel:"Zoom in",A=e.zoomOutTipLabel!==void 0?e.zoomOutTipLabel:"Zoom out",m=document.createElement("button");m.className=r,m.setAttribute("type","button"),m.title=c,m.appendChild(typeof s=="string"?document.createTextNode(s):s),m.addEventListener(Ir.CLICK,this.handleClick_.bind(this,i),!1);const v=document.createElement("button");v.className=o,v.setAttribute("type","button"),v.title=A,v.appendChild(typeof a=="string"?document.createTextNode(a):a),v.addEventListener(Ir.CLICK,this.handleClick_.bind(this,-i),!1);const x=t+" "+KE+" "+tU,_=this.element;_.className=x,_.appendChild(m),_.appendChild(v),this.duration_=e.duration!==void 0?e.duration:250}handleClick_(e,t){t.preventDefault(),this.zoomByDelta_(e)}zoomByDelta_(e){const i=this.getMap().getView();if(!i)return;const r=i.getZoom();if(r!==void 0){const o=i.getConstrainedZoom(r+e);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:o,duration:this.duration_,easing:Ex})):i.setZoom(o)}}}function z1e(n){n=n||{};const e=new _g;return(n.zoom!==void 0?n.zoom:!0)&&e.push(new F1e(n.zoomOptions)),(n.rotate!==void 0?n.rotate:!0)&&e.push(new L1e(n.rotateOptions)),(n.attribution!==void 0?n.attribution:!0)&&e.push(new K1e(n.attributionOptions)),e}class j1e{constructor(e,t,i){this.decay_=e,this.minVelocity_=t,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(e,t){this.points_.push(e,t,Date.now())}end(){if(this.points_.length<6)return!1;const e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]<e)return!1;let i=t-3;for(;i>0&&this.points_[i+2]>e;)i-=3;const r=this.points_[t+2]-this.points_[i+2];if(r<1e3/60)return!1;const o=this.points_[t]-this.points_[i],s=this.points_[t+1]-this.points_[i+1];return this.angle_=Math.atan2(s,o),this.initialVelocity_=Math.sqrt(o*o+s*s)/r,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const Zz={ACTIVE:"active"};class H4 extends vm{constructor(e){super(),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Zz.ACTIVE)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(Zz.ACTIVE,e)}setMap(e){this.map_=e}}function N1e(n,e,t){const i=n.getCenterInternal();if(i){const r=[i[0]+e[0],i[1]+e[1]];n.animateInternal({duration:t!==void 0?t:250,easing:w0e,center:n.getConstrainedCenter(r)})}}function iU(n,e,t,i){const r=n.getZoom();if(r===void 0)return;const o=n.getConstrainedZoom(r+e),s=n.getResolutionForZoom(o);n.getAnimating()&&n.cancelAnimations(),n.animate({resolution:s,anchor:t,duration:i!==void 0?i:250,easing:Ex})}class G1e extends H4{constructor(e){super(),e=e||{},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:250}handleEvent(e){let t=!1;if(e.type==jl.DBLCLICK){const i=e.originalEvent,r=e.map,o=e.coordinate,s=i.shiftKey?-this.delta_:this.delta_,a=r.getView();iU(a,s,o,this.duration_),i.preventDefault(),t=!0}return!t}}function q9(n){const e=arguments;return function(t){let i=!0;for(let r=0,o=e.length;r<o&&(i=i&&e[r](t),!!i);++r);return i}}const W1e=function(n){const e=n.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Q1e=function(n){const e=n.map.getTargetElement(),t=e.getRootNode(),i=n.map.getOwnerDocument().activeElement;return t instanceof ShadowRoot?t.host.contains(i):e.contains(i)},HJ=function(n){const e=n.map.getTargetElement(),t=e.getRootNode();return(t instanceof ShadowRoot?t.host:e).hasAttribute("tabindex")?Q1e(n):!0},q1e=L3,ZJ=function(n){const e=n.originalEvent;return"pointerId"in e&&e.button==0&&!(r0e&&fJ&&e.ctrlKey)},XJ=function(n){const e=n.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Y1e=function(n){const e=n.originalEvent;return fJ?e.metaKey:e.ctrlKey},$1e=function(n){const e=n.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},JJ=function(n){const e=n.originalEvent,t=e.target.tagName;return t!=="INPUT"&&t!=="SELECT"&&t!=="TEXTAREA"&&!e.target.isContentEditable},jO=function(n){const e=n.originalEvent;return"pointerId"in e&&e.pointerType=="mouse"},V1e=function(n){const e=n.originalEvent;return"pointerId"in e&&e.isPrimary&&e.button===0};class Z4 extends H4{constructor(e){e=e||{},super(e),e.handleDownEvent&&(this.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(this.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(this.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(this.handleUpEvent=e.handleUpEvent),e.stopDown&&(this.stopDown=e.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(e){return!1}handleDragEvent(e){}handleEvent(e){if(!e.originalEvent)return!0;let t=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==jl.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==jl.POINTERUP){const i=this.handleUpEvent(e);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(e.type==jl.POINTERDOWN){const i=this.handleDownEvent(e);this.handlingDownUpSequence=i,t=this.stopDown(i)}else e.type==jl.POINTERMOVE&&this.handleMoveEvent(e);return!t}handleMoveEvent(e){}handleUpEvent(e){return!1}stopDown(e){return e}updateTrackedPointers_(e){e.activePointers&&(this.targetPointers=e.activePointers)}}function rU(n){const e=n.length;let t=0,i=0;for(let r=0;r<e;r++)t+=n[r].clientX,i+=n[r].clientY;return{clientX:t/e,clientY:i/e}}class H1e extends Z4{constructor(e){super({stopDown:wE}),e=e||{},this.kinetic_=e.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const t=e.condition?e.condition:q9(XJ,V1e);this.condition_=e.onFocusOnly?q9(HJ,t):t,this.noKinetic_=!1}handleDragEvent(e){const t=e.map;this.panning_||(this.panning_=!0,t.getView().beginInteraction());const i=this.targetPointers,r=t.getEventPixel(rU(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){const o=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],a=e.map.getView();b0e(o,a.getResolution()),RP(o,a.getRotation()),a.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=i.length,e.originalEvent.preventDefault()}handleUpEvent(e){const t=e.map,i=t.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const r=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),s=i.getCenterInternal(),a=t.getPixelFromCoordinateInternal(s),c=t.getCoordinateFromPixelInternal([a[0]-r*Math.cos(o),a[1]-r*Math.sin(o)]);i.animateInternal({center:i.getConstrainedCenter(c),duration:500,easing:Ex})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(e){if(this.targetPointers.length>0&&this.condition_(e)){const i=e.map.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class Z1e extends Z4{constructor(e){e=e||{},super({stopDown:wE}),this.condition_=e.condition?e.condition:W1e,this.lastAngle_=void 0,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){if(!jO(e))return;const t=e.map,i=t.getView();if(i.getConstraints().rotation===JP)return;const r=t.getSize(),o=e.pixel,s=Math.atan2(r[1]/2-o[1],o[0]-r[0]/2);if(this.lastAngle_!==void 0){const a=s-this.lastAngle_;i.adjustRotationInternal(-a)}this.lastAngle_=s}handleUpEvent(e){return jO(e)?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){return jO(e)&&ZJ(e)&&this.condition_(e)?(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class X1e extends N4{constructor(e){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const e=this.startPixel_,t=this.endPixel_,i="px",r=this.element_.style;r.left=Math.min(e[0],t[0])+i,r.top=Math.min(e[1],t[1])+i,r.width=Math.abs(t[0]-e[0])+i,r.height=Math.abs(t[1]-e[1])+i}setMap(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(e,t){this.startPixel_=e,this.endPixel_=t,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const e=this.startPixel_,t=this.endPixel_,r=[e,[e[0],t[1]],t,[t[0],e[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new e1([r])}getGeometry(){return this.geometry_}}const BC={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class e2 extends ym{constructor(e,t,i){super(e),this.coordinate=t,this.mapBrowserEvent=i}}class J1e extends Z4{constructor(e){super(),this.on,this.once,this.un,e=e??{},this.box_=new X1e(e.className||"ol-dragbox"),this.minArea_=e.minArea??64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition??ZJ,this.boxEndCondition_=e.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(e,t,i){const r=i[0]-t[0],o=i[1]-t[1];return r*r+o*o>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(e){this.startPixel_&&(this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new e2(BC.BOXDRAG,e.coordinate,e)))}handleUpEvent(e){if(!this.startPixel_)return!1;const t=this.boxEndCondition_(e,this.startPixel_,e.pixel);return t&&this.onBoxEnd(e),this.dispatchEvent(new e2(t?BC.BOXEND:BC.BOXCANCEL,e.coordinate,e)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(e){return this.condition_(e)?(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new e2(BC.BOXSTART,e.coordinate,e)),!0):!1}onBoxEnd(e){}setActive(e){e||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new e2(BC.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(e)}setMap(e){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new e2(BC.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(e)}}class eye extends J1e{constructor(e){e=e||{};const t=e.condition?e.condition:$1e;super({condition:t,className:e.className||"ol-dragzoom",minArea:e.minArea}),this.duration_=e.duration!==void 0?e.duration:200,this.out_=e.out!==void 0?e.out:!1}onBoxEnd(e){const i=this.getMap().getView();let r=this.getGeometry();if(this.out_){const o=i.rotatedExtentForGeometry(r),s=i.getResolutionForExtentInternal(o),a=i.getResolution()/s;r=r.clone(),r.scale(a*a)}i.fitInternal(r,{duration:this.duration_,easing:Ex})}}const zv={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class tye extends H4{constructor(e){super(),e=e||{},this.defaultCondition_=function(t){return XJ(t)&&JJ(t)},this.condition_=e.condition!==void 0?e.condition:this.defaultCondition_,this.duration_=e.duration!==void 0?e.duration:100,this.pixelDelta_=e.pixelDelta!==void 0?e.pixelDelta:128}handleEvent(e){let t=!1;if(e.type==Ir.KEYDOWN){const i=e.originalEvent,r=i.key;if(this.condition_(e)&&(r==zv.DOWN||r==zv.LEFT||r==zv.RIGHT||r==zv.UP)){const s=e.map.getView(),a=s.getResolution()*this.pixelDelta_;let c=0,A=0;r==zv.DOWN?A=-a:r==zv.LEFT?c=-a:r==zv.RIGHT?c=a:A=a;const m=[c,A];RP(m,s.getRotation()),N1e(s,m,this.duration_),i.preventDefault(),t=!0}}return!t}}class nye extends H4{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:function(t){return!Y1e(t)&&JJ(t)},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:100}handleEvent(e){let t=!1;if(e.type==Ir.KEYDOWN||e.type==Ir.KEYPRESS){const i=e.originalEvent,r=i.key;if(this.condition_(e)&&(r==="+"||r==="-")){const o=e.map,s=r==="+"?this.delta_:-this.delta_,a=o.getView();iU(a,s,void 0,this.duration_),i.preventDefault(),t=!0}}return!t}}const iye=40,rye=300;class oye extends H4{constructor(e){e=e||{},super(e),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=e.maxDelta!==void 0?e.maxDelta:1,this.duration_=e.duration!==void 0?e.duration:250,this.timeout_=e.timeout!==void 0?e.timeout:80,this.useAnchor_=e.useAnchor!==void 0?e.useAnchor:!0,this.constrainResolution_=e.constrainResolution!==void 0?e.constrainResolution:!1;const t=e.condition?e.condition:q1e;this.condition_=e.onFocusOnly?q9(HJ,t):t,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const e=this.getMap();if(!e)return;e.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(e){if(!this.condition_(e)||e.type!==Ir.WHEEL)return!0;const i=e.map,r=e.originalEvent;r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.pixel);let o=r.deltaY;switch(r.deltaMode){case WheelEvent.DOM_DELTA_LINE:o*=iye;break;case WheelEvent.DOM_DELTA_PAGE:o*=rye;break}if(o===0)return!1;this.lastDelta_=o;const s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(o)<4?"trackpad":"wheel");const a=i.getView();if(this.mode_==="trackpad"&&!(a.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-o/this.deltaPerZoom_,this.lastAnchor_?i.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=s,!1;this.totalDelta_+=o;const c=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),c),!1}handleWheelZoom_(e){const t=e.getView();t.getAnimating()&&t.cancelAnimations();let i=-vl(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(t.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),iU(t,i,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(e){this.useAnchor_=e,e||(this.lastAnchor_=null)}}class sye extends Z4{constructor(e){e=e||{};const t=e;t.stopDown||(t.stopDown=wE),super(t),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=e.threshold!==void 0?e.threshold:.3,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){let t=0;const i=this.targetPointers[0],r=this.targetPointers[1],o=Math.atan2(r.clientY-i.clientY,r.clientX-i.clientX);if(this.lastAngle_!==void 0){const c=o-this.lastAngle_;this.rotationDelta_+=c,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),t=c}this.lastAngle_=o;const s=e.map,a=s.getView();a.getConstraints().rotation!==JP&&(this.anchor_=s.getCoordinateFromPixelInternal(s.getEventPixel(rU(this.targetPointers))),this.rotating_&&(s.render(),a.adjustRotationInternal(t,this.anchor_)))}handleUpEvent(e){return this.targetPointers.length<2?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}class aye extends Z4{constructor(e){e=e||{};const t=e;t.stopDown||(t.stopDown=wE),super(t),this.anchor_=null,this.duration_=e.duration!==void 0?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(e){let t=1;const i=this.targetPointers[0],r=this.targetPointers[1],o=i.clientX-r.clientX,s=i.clientY-r.clientY,a=Math.sqrt(o*o+s*s);this.lastDistance_!==void 0&&(t=this.lastDistance_/a),this.lastDistance_=a;const c=e.map,A=c.getView();t!=1&&(this.lastScaleDelta_=t),this.anchor_=c.getCoordinateFromPixelInternal(c.getEventPixel(rU(this.targetPointers))),c.render(),A.adjustResolutionInternal(t,this.anchor_)}handleUpEvent(e){if(this.targetPointers.length<2){const i=e.map.getView(),r=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,r),!1}return!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}function lye(n){n=n||{};const e=new _g,t=new j1e(-.005,.05,100);return(n.altShiftDragRotate!==void 0?n.altShiftDragRotate:!0)&&e.push(new Z1e),(n.doubleClickZoom!==void 0?n.doubleClickZoom:!0)&&e.push(new G1e({delta:n.zoomDelta,duration:n.zoomDuration})),(n.dragPan!==void 0?n.dragPan:!0)&&e.push(new H1e({onFocusOnly:n.onFocusOnly,kinetic:t})),(n.pinchRotate!==void 0?n.pinchRotate:!0)&&e.push(new sye),(n.pinchZoom!==void 0?n.pinchZoom:!0)&&e.push(new aye({duration:n.zoomDuration})),(n.keyboard!==void 0?n.keyboard:!0)&&(e.push(new tye),e.push(new nye({delta:n.zoomDelta,duration:n.zoomDuration}))),(n.mouseWheelZoom!==void 0?n.mouseWheelZoom:!0)&&e.push(new oye({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(n.shiftDragZoom!==void 0?n.shiftDragZoom:!0)&&e.push(new eye({duration:n.zoomDuration})),e}const ia={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class eee extends vm{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;const t=Object.assign({},e);typeof e.properties=="object"&&(delete t.properties,Object.assign(t,e.properties)),t[ia.OPACITY]=e.opacity!==void 0?e.opacity:1,Os(typeof t[ia.OPACITY]=="number","Layer opacity must be a number"),t[ia.VISIBLE]=e.visible!==void 0?e.visible:!0,t[ia.Z_INDEX]=e.zIndex,t[ia.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,t[ia.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,t[ia.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,t[ia.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,this.className_=t.className!==void 0?t.className:"ol-layer",delete t.className,this.setProperties(t),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){const t=this.state_||{layer:this,managed:e===void 0?!0:e},i=this.getZIndex();return t.opacity=vl(Math.round(this.getOpacity()*100)/100,0,1),t.visible=this.getVisible(),t.extent=this.getExtent(),t.zIndex=i===void 0&&!t.managed?1/0:i,t.maxResolution=this.getMaxResolution(),t.minResolution=Math.max(this.getMinResolution(),0),t.minZoom=this.getMinZoom(),t.maxZoom=this.getMaxZoom(),this.state_=t,t}getLayersArray(e){return Dr()}getLayerStatesArray(e){return Dr()}getExtent(){return this.get(ia.EXTENT)}getMaxResolution(){return this.get(ia.MAX_RESOLUTION)}getMinResolution(){return this.get(ia.MIN_RESOLUTION)}getMinZoom(){return this.get(ia.MIN_ZOOM)}getMaxZoom(){return this.get(ia.MAX_ZOOM)}getOpacity(){return this.get(ia.OPACITY)}getSourceState(){return Dr()}getVisible(){return this.get(ia.VISIBLE)}getZIndex(){return this.get(ia.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(ia.EXTENT,e)}setMaxResolution(e){this.set(ia.MAX_RESOLUTION,e)}setMinResolution(e){this.set(ia.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(ia.MAX_ZOOM,e)}setMinZoom(e){this.set(ia.MIN_ZOOM,e)}setOpacity(e){Os(typeof e=="number","Layer opacity must be a number"),this.set(ia.OPACITY,e)}setVisible(e){this.set(ia.VISIBLE,e)}setZIndex(e){this.set(ia.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}class yy extends ym{constructor(e,t){super(e),this.layer=t}}const NO={LAYERS:"layers"};class Ox extends eee{constructor(e){e=e||{};const t=Object.assign({},e);delete t.layers;let i=e.layers;super(t),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(NO.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new _g(i.slice(),{unique:!0}):Os(typeof i.getArray=="function","Expected `layers` to be an array or a `Collection`"):i=new _g(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Ea),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(Zo(e,Yh.ADD,this.handleLayersAdd_,this),Zo(e,Yh.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(Ea);G4(this.listenerKeys_);const t=e.getArray();for(let i=0,r=t.length;i<r;i++){const o=t[i];this.registerLayerListeners_(o),this.dispatchEvent(new yy("addlayer",o))}this.changed()}registerLayerListeners_(e){const t=[Zo(e,tx.PROPERTYCHANGE,this.handleLayerChange_,this),Zo(e,Ir.CHANGE,this.handleLayerChange_,this)];e instanceof Ox&&t.push(Zo(e,"addlayer",this.handleLayerGroupAdd_,this),Zo(e,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[$r(e)]=t}handleLayerGroupAdd_(e){this.dispatchEvent(new yy("addlayer",e.layer))}handleLayerGroupRemove_(e){this.dispatchEvent(new yy("removelayer",e.layer))}handleLayersAdd_(e){const t=e.element;this.registerLayerListeners_(t),this.dispatchEvent(new yy("addlayer",t)),this.changed()}handleLayersRemove_(e){const t=e.element,i=$r(t);this.listenerKeys_[i].forEach(Ea),delete this.listenerKeys_[i],this.dispatchEvent(new yy("removelayer",t)),this.changed()}getLayers(){return this.get(NO.LAYERS)}setLayers(e){const t=this.getLayers();if(t){const i=t.getArray();for(let r=0,o=i.length;r<o;++r)this.dispatchEvent(new yy("removelayer",i[r]))}this.set(NO.LAYERS,e)}getLayersArray(e){return e=e!==void 0?e:[],this.getLayers().forEach(function(t){t.getLayersArray(e)}),e}getLayerStatesArray(e){const t=e!==void 0?e:[],i=t.length;this.getLayers().forEach(function(s){s.getLayerStatesArray(t)});const r=this.getLayerState();let o=r.zIndex;!e&&r.zIndex===void 0&&(o=0);for(let s=i,a=t.length;s<a;s++){const c=t[s];c.opacity*=r.opacity,c.visible=c.visible&&r.visible,c.maxResolution=Math.min(c.maxResolution,r.maxResolution),c.minResolution=Math.max(c.minResolution,r.minResolution),c.minZoom=Math.max(c.minZoom,r.minZoom),c.maxZoom=Math.min(c.maxZoom,r.maxZoom),r.extent!==void 0&&(c.extent!==void 0?c.extent=cm(c.extent,r.extent):c.extent=r.extent),c.zIndex===void 0&&(c.zIndex=o)}return t}getSourceState(){return"ready"}}const Hf={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class Bx extends eee{constructor(e){const t=Object.assign({},e);delete t.source,super(t),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,e.render&&(this.render=e.render),e.map&&this.setMap(e.map),this.addChangeListener(ia.SOURCE,this.handleSourcePropertyChange_);const i=e.source?e.source:null;this.setSource(i)}getLayersArray(e){return e=e||[],e.push(this),e}getLayerStatesArray(e){return e=e||[],e.push(this.getLayerState()),e}getSource(){return this.get(ia.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const e=this.getSource();return e?e.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Ea(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const e=this.getSource();e&&(this.sourceChangeKey_=Zo(e,Ir.CHANGE,this.handleSourceChange_,this),e.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)}isVisible(e){let t;const i=this.getMapInternal();!e&&i&&(e=i.getView()),e instanceof im?t={viewState:e.getState(),extent:e.calculateExtent()}:t=e,!t.layerStatesArray&&i&&(t.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let r;if(t.layerStatesArray){if(r=t.layerStatesArray.find(s=>s.layer===this),!r)return!1}else r=this.getLayerState();const o=this.getExtent();return oU(r,t.viewState)&&(!o||Gl(o,t.extent))}getAttributions(e){if(!this.isVisible(e))return[];const t=this.getSource()?.getAttributions();if(!t)return[];const i=e instanceof im?e.getViewStateAndExtent():e;let r=t(i);return Array.isArray(r)||(r=[r]),r}render(e,t){const i=this.getRenderer();return i.prepareFrame(e)?(this.rendered=!0,i.renderFrame(e,t)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(e,t){}renderDeferred(e){const t=this.getRenderer();t&&t.renderDeferred(e)}setMapInternal(e){e||this.unrender(),this.set(ia.MAP,e)}getMapInternal(){return this.get(ia.MAP)}setMap(e){this.mapPrecomposeKey_&&(Ea(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(Ea(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=Zo(e,Hf.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=Zo(this,Ir.CHANGE,e.render,e),this.changed())}handlePrecompose_(e){const t=e.frameState.layerStatesArray,i=this.getLayerState(!1);Os(!t.some(r=>r.layer===i.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),t.push(i)}setSource(e){this.set(ia.SOURCE,e)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}}function oU(n,e){if(!n.visible)return!1;const t=e.resolution;if(t<n.minResolution||t>=n.maxResolution)return!1;const i=e.zoom;return i>n.minZoom&&i<=n.maxZoom}function tee(n,e,t=0,i=n.length-1,r=uye){for(;i>t;){if(i-t>600){const c=i-t+1,A=e-t+1,m=Math.log(c),v=.5*Math.exp(2*m/3),x=.5*Math.sqrt(m*v*(c-v)/c)*(A-c/2<0?-1:1),_=Math.max(t,Math.floor(e-A*v/c+x)),O=Math.min(i,Math.floor(e+(c-A)*v/c+x));tee(n,e,_,O,r)}const o=n[e];let s=t,a=i;for(t2(n,t,e),r(n[i],o)>0&&t2(n,t,i);s<a;){for(t2(n,s,a),s++,a--;r(n[s],o)<0;)s++;for(;r(n[a],o)>0;)a--}r(n[t],o)===0?t2(n,t,a):(a++,t2(n,a,i)),a<=e&&(t=a+1),e<=a&&(i=a-1)}}function t2(n,e,t){const i=n[e];n[e]=n[t],n[t]=i}function uye(n,e){return n<e?-1:n>e?1:0}let nee=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const i=[];if(!NM(e,t))return i;const r=this.toBBox,o=[];for(;t;){for(let s=0;s<t.children.length;s++){const a=t.children[s],c=t.leaf?r(a):a;NM(e,c)&&(t.leaf?i.push(a):WO(e,c)?this._all(a,i):o.push(a))}t=o.pop()}return i}collides(e){let t=this.data;if(!NM(e,t))return!1;const i=[];for(;t;){for(let r=0;r<t.children.length;r++){const o=t.children[r],s=t.leaf?this.toBBox(o):o;if(NM(e,s)){if(t.leaf||WO(e,s))return!0;i.push(o)}}t=i.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let i=0;i<e.length;i++)this.insert(e[i]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const i=this.data;this.data=t,t=i}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=h_([]),this}remove(e,t){if(!e)return this;let i=this.data;const r=this.toBBox(e),o=[],s=[];let a,c,A;for(;i||o.length;){if(i||(i=o.pop(),c=o[o.length-1],a=s.pop(),A=!0),i.leaf){const m=cye(e,i.children,t);if(m!==-1)return i.children.splice(m,1),o.push(i),this._condense(o),this}!A&&!i.leaf&&WO(i,r)?(o.push(i),s.push(a),a=0,c=i,i=i.children[0]):c?(a++,i=c.children[a],A=!1):i=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const i=[];for(;e;)e.leaf?t.push(...e.children):i.push(...e.children),e=i.pop();return t}_build(e,t,i,r){const o=i-t+1;let s=this._maxEntries,a;if(o<=s)return a=h_(e.slice(t,i+1)),IC(a,this.toBBox),a;r||(r=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,r-1))),a=h_([]),a.leaf=!1,a.height=r;const c=Math.ceil(o/s),A=c*Math.ceil(Math.sqrt(s));Xz(e,t,i,A,this.compareMinX);for(let m=t;m<=i;m+=A){const v=Math.min(m+A-1,i);Xz(e,m,v,c,this.compareMinY);for(let x=m;x<=v;x+=c){const _=Math.min(x+c-1,v);a.children.push(this._build(e,x,_,r-1))}}return IC(a,this.toBBox),a}_chooseSubtree(e,t,i,r){for(;r.push(t),!(t.leaf||r.length-1===i);){let o=1/0,s=1/0,a;for(let c=0;c<t.children.length;c++){const A=t.children[c],m=GO(A),v=dye(e,A)-m;v<s?(s=v,o=m<o?m:o,a=A):v===s&&m<o&&(o=m,a=A)}t=a||t.children[0]}return t}_insert(e,t,i){const r=i?e:this.toBBox(e),o=[],s=this._chooseSubtree(r,this.data,t,o);for(s.children.push(e),I2(s,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)}_split(e,t){const i=e[t],r=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,r);const s=this._chooseSplitIndex(i,o,r),a=h_(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,IC(i,this.toBBox),IC(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this.data=h_([e,t]),this.data.height=e.height+1,this.data.leaf=!1,IC(this.data,this.toBBox)}_chooseSplitIndex(e,t,i){let r,o=1/0,s=1/0;for(let a=t;a<=i-t;a++){const c=B2(e,0,a,this.toBBox),A=B2(e,a,i,this.toBBox),m=fye(c,A),v=GO(c)+GO(A);m<o?(o=m,r=a,s=v<s?v:s):m===o&&v<s&&(s=v,r=a)}return r||i-t}_chooseSplitAxis(e,t,i){const r=e.leaf?this.compareMinX:Aye,o=e.leaf?this.compareMinY:hye,s=this._allDistMargin(e,t,i,r),a=this._allDistMargin(e,t,i,o);s<a&&e.children.sort(r)}_allDistMargin(e,t,i,r){e.children.sort(r);const o=this.toBBox,s=B2(e,0,t,o),a=B2(e,i-t,i,o);let c=jM(s)+jM(a);for(let A=t;A<i-t;A++){const m=e.children[A];I2(s,e.leaf?o(m):m),c+=jM(s)}for(let A=i-t-1;A>=t;A--){const m=e.children[A];I2(a,e.leaf?o(m):m),c+=jM(a)}return c}_adjustParentBBoxes(e,t,i){for(let r=i;r>=0;r--)I2(t[r],e)}_condense(e){for(let t=e.length-1,i;t>=0;t--)e[t].children.length===0?t>0?(i=e[t-1].children,i.splice(i.indexOf(e[t]),1)):this.clear():IC(e[t],this.toBBox)}};function cye(n,e,t){if(!t)return e.indexOf(n);for(let i=0;i<e.length;i++)if(t(n,e[i]))return i;return-1}function IC(n,e){B2(n,0,n.children.length,e,n)}function B2(n,e,t,i,r){r||(r=h_(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o=e;o<t;o++){const s=n.children[o];I2(r,n.leaf?i(s):s)}return r}function I2(n,e){return n.minX=Math.min(n.minX,e.minX),n.minY=Math.min(n.minY,e.minY),n.maxX=Math.max(n.maxX,e.maxX),n.maxY=Math.max(n.maxY,e.maxY),n}function Aye(n,e){return n.minX-e.minX}function hye(n,e){return n.minY-e.minY}function GO(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function jM(n){return n.maxX-n.minX+(n.maxY-n.minY)}function dye(n,e){return(Math.max(e.maxX,n.maxX)-Math.min(e.minX,n.minX))*(Math.max(e.maxY,n.maxY)-Math.min(e.minY,n.minY))}function fye(n,e){const t=Math.max(n.minX,e.minX),i=Math.max(n.minY,e.minY),r=Math.min(n.maxX,e.maxX),o=Math.min(n.maxY,e.maxY);return Math.max(0,r-t)*Math.max(0,o-i)}function WO(n,e){return n.minX<=e.minX&&n.minY<=e.minY&&e.maxX<=n.maxX&&e.maxY<=n.maxY}function NM(n,e){return e.minX<=n.maxX&&e.minY<=n.maxY&&e.maxX>=n.minX&&e.maxY>=n.minY}function h_(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Xz(n,e,t,i,r){const o=[e,t];for(;o.length;){if(t=o.pop(),e=o.pop(),t-e<=i)continue;const s=e+Math.ceil((t-e)/i/2)*i;tee(n,s,e,t,r),o.push(e,s,s,t)}}const sU=[NaN,NaN,NaN,0];let QO;function pye(){return QO||(QO=bl(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),QO}const mye=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,gye=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,yye=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,vye=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function GM(n,e){return n.endsWith("%")?Number(n.substring(0,n.length-1))/e:Number(n)}function n3(n){throw new Error('failed to parse "'+n+'" as color')}function iee(n){if(n.toLowerCase().startsWith("rgb")){const o=n.match(gye)||n.match(mye)||n.match(yye);if(o){const s=o[4],a=100/255;return[vl(GM(o[1],a)+.5|0,0,255),vl(GM(o[2],a)+.5|0,0,255),vl(GM(o[3],a)+.5|0,0,255),s!==void 0?vl(GM(s,100),0,1):1]}n3(n)}if(n.startsWith("#")){if(vye.test(n)){const o=n.substring(1),s=o.length<=4?1:2,a=[0,0,0,255];for(let c=0,A=o.length;c<A;c+=s){let m=parseInt(o.substring(c,c+s),16);s===1&&(m+=m<<4),a[c/s]=m}return a[3]=a[3]/255,a}n3(n)}const e=pye();e.fillStyle="#abcdef";let t=e.fillStyle;e.fillStyle=n,e.fillStyle===t&&(e.fillStyle="#fedcba",t=e.fillStyle,e.fillStyle=n,e.fillStyle===t&&n3(n));const i=e.fillStyle;if(i.startsWith("#")||i.startsWith("rgba"))return iee(i);e.clearRect(0,0,1,1),e.fillRect(0,0,1,1);const r=Array.from(e.getImageData(0,0,1,1).data);return r[3]=SE(r[3]/255,3),r}function bye(n){return typeof n=="string"?n:lU(n)}const Cye=1024,n2={};let qO=0;function _ye(n){if(n.length===4)return n;const e=n.slice();return e[3]=1,e}function YO(n){return n>.0031308?Math.pow(n,1/2.4)*269.025-14.025:n*3294.6}function $O(n){return n>.2068965?Math.pow(n,3):(n-4/29)*(108/841)}function VO(n){return n>10.314724?Math.pow((n+14.025)/269.025,2.4):n/3294.6}function HO(n){return n>.0088564?Math.pow(n,1/3):n/(108/841)+4/29}function Jz(n){const e=VO(n[0]),t=VO(n[1]),i=VO(n[2]),r=HO(e*.222488403+t*.716873169+i*.06060791),o=500*(HO(e*.452247074+t*.399439023+i*.148375274)-r),s=200*(r-HO(e*.016863605+t*.117638439+i*.865350722)),a=Math.atan2(s,o)*(180/Math.PI);return[116*r-16,Math.sqrt(o*o+s*s),a<0?a+360:a,n[3]]}function xye(n){const e=(n[0]+16)/116,t=n[1],i=n[2]*Math.PI/180,r=$O(e),o=$O(e+t/500*Math.cos(i)),s=$O(e-t/200*Math.sin(i)),a=YO(o*3.021973625-r*1.617392459-s*.404875592),c=YO(o*-.943766287+r*1.916279586+s*.027607165),A=YO(o*.069407491-r*.22898585+s*1.159737864);return[vl(a+.5|0,0,255),vl(c+.5|0,0,255),vl(A+.5|0,0,255),n[3]]}function aU(n){if(n==="none")return sU;if(n2.hasOwnProperty(n))return n2[n];if(qO>=Cye){let t=0;for(const i in n2)(t++&3)===0&&(delete n2[i],--qO)}const e=iee(n);e.length!==4&&n3(n);for(const t of e)isNaN(t)&&n3(n);return n2[n]=e,++qO,e}function rx(n){return Array.isArray(n)?n:aU(n)}function lU(n){let e=n[0];e!=(e|0)&&(e=e+.5|0);let t=n[1];t!=(t|0)&&(t=t+.5|0);let i=n[2];i!=(i|0)&&(i=i+.5|0);const r=n[3]===void 0?1:Math.round(n[3]*1e3)/1e3;return"rgba("+e+","+t+","+i+","+r+")"}function ej(n){return n[0]>0&&n[1]>0}function Mye(n,e,t){return t===void 0&&(t=[0,0]),t[0]=n[0]*e+.5|0,t[1]=n[1]*e+.5|0,t}function UA(n,e){return Array.isArray(n)?n:(e===void 0?e=[n,n]:(e[0]=n,e[1]=n),e)}let Nb=0;const oh=1<<Nb++,Ho=1<<Nb++,$h=1<<Nb++,rm=1<<Nb++,Ob=1<<Nb++,k2=1<<Nb++,WM=Math.pow(2,Nb)-1,uU={[oh]:"boolean",[Ho]:"number",[$h]:"string",[rm]:"color",[Ob]:"number[]",[k2]:"size"},wye=Object.keys(uU).map(Number).sort(Pg);function Sye(n){return n in uU}function T2(n){const e=[];for(const t of wye)R2(n,t)&&e.push(uU[t]);return e.length===0?"untyped":e.length<3?e.join(" or "):e.slice(0,-1).join(", ")+", or "+e[e.length-1]}function R2(n,e){return(n&e)===e}function ly(n,e){return n===e}class tc{constructor(e,t){if(!Sye(e))throw new Error(`literal expressions must have a specific type, got ${T2(e)}`);this.type=e,this.value=t}}class Eye{constructor(e,t,...i){this.type=e,this.operator=t,this.args=i}}function ree(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1,mapState:!1}}function lA(n,e,t){switch(typeof n){case"boolean":{if(ly(e,$h))return new tc($h,n?"true":"false");if(!R2(e,oh))throw new Error(`got a boolean, but expected ${T2(e)}`);return new tc(oh,n)}case"number":{if(ly(e,k2))return new tc(k2,UA(n));if(ly(e,oh))return new tc(oh,!!n);if(ly(e,$h))return new tc($h,n.toString());if(!R2(e,Ho))throw new Error(`got a number, but expected ${T2(e)}`);return new tc(Ho,n)}case"string":{if(ly(e,rm))return new tc(rm,aU(n));if(ly(e,oh))return new tc(oh,!!n);if(!R2(e,$h))throw new Error(`got a string, but expected ${T2(e)}`);return new tc($h,n)}}if(!Array.isArray(n))throw new Error("expression must be an array or a primitive value");if(n.length===0)throw new Error("empty expression");if(typeof n[0]=="string")return Lye(n,e,t);for(const i of n)if(typeof i!="number")throw new Error("expected an array of numbers");if(ly(e,k2)){if(n.length!==2)throw new Error(`expected an array of two values for a size, got ${n.length}`);return new tc(k2,n)}if(ly(e,rm)){if(n.length===3)return new tc(rm,[...n,1]);if(n.length===4)return new tc(rm,n);throw new Error(`expected an array of 3 or 4 values for a color, got ${n.length}`)}if(!R2(e,Ob))throw new Error(`got an array of numbers, but expected ${T2(e)}`);return new tc(Ob,n)}const pn={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",LineMetric:"line-metric",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string",Has:"has"},Oye={[pn.Get]:Tr(po(1,1/0),tj),[pn.Var]:Tr(po(1,1),Bye),[pn.Has]:Tr(po(1,1/0),tj),[pn.Id]:Tr(Iye,kC),[pn.Concat]:Tr(po(2,1/0),Ps($h)),[pn.GeometryType]:Tr(kye,kC),[pn.LineMetric]:Tr(kC),[pn.Resolution]:Tr(ZO,kC),[pn.Zoom]:Tr(ZO,kC),[pn.Time]:Tr(ZO,kC),[pn.Any]:Tr(po(2,1/0),Ps(oh)),[pn.All]:Tr(po(2,1/0),Ps(oh)),[pn.Not]:Tr(po(1,1),Ps(oh)),[pn.Equal]:Tr(po(2,2),Ps(WM)),[pn.NotEqual]:Tr(po(2,2),Ps(WM)),[pn.GreaterThan]:Tr(po(2,2),Ps(Ho)),[pn.GreaterThanOrEqualTo]:Tr(po(2,2),Ps(Ho)),[pn.LessThan]:Tr(po(2,2),Ps(Ho)),[pn.LessThanOrEqualTo]:Tr(po(2,2),Ps(Ho)),[pn.Multiply]:Tr(po(2,1/0),nj),[pn.Coalesce]:Tr(po(2,1/0),nj),[pn.Divide]:Tr(po(2,2),Ps(Ho)),[pn.Add]:Tr(po(2,1/0),Ps(Ho)),[pn.Subtract]:Tr(po(2,2),Ps(Ho)),[pn.Clamp]:Tr(po(3,3),Ps(Ho)),[pn.Mod]:Tr(po(2,2),Ps(Ho)),[pn.Pow]:Tr(po(2,2),Ps(Ho)),[pn.Abs]:Tr(po(1,1),Ps(Ho)),[pn.Floor]:Tr(po(1,1),Ps(Ho)),[pn.Ceil]:Tr(po(1,1),Ps(Ho)),[pn.Round]:Tr(po(1,1),Ps(Ho)),[pn.Sin]:Tr(po(1,1),Ps(Ho)),[pn.Cos]:Tr(po(1,1),Ps(Ho)),[pn.Atan]:Tr(po(1,2),Ps(Ho)),[pn.Sqrt]:Tr(po(1,1),Ps(Ho)),[pn.Match]:Tr(po(4,1/0),ij,Rye),[pn.Between]:Tr(po(3,3),Ps(Ho)),[pn.Interpolate]:Tr(po(6,1/0),ij,Dye),[pn.Case]:Tr(po(3,1/0),Tye,Pye),[pn.In]:Tr(po(2,2),Uye),[pn.Number]:Tr(po(1,1/0),Ps(WM)),[pn.String]:Tr(po(1,1/0),Ps(WM)),[pn.Array]:Tr(po(1,1/0),Ps(Ho)),[pn.Color]:Tr(po(1,4),Ps(Ho)),[pn.Band]:Tr(po(1,3),Ps(Ho)),[pn.Palette]:Tr(po(2,2),Kye),[pn.ToString]:Tr(po(1,1),Ps(oh|Ho|$h|rm))};function tj(n,e,t){const i=n.length-1,r=new Array(i);for(let o=0;o<i;++o){const s=n[o+1];switch(typeof s){case"number":{r[o]=new tc(Ho,s);break}case"string":{r[o]=new tc($h,s);break}default:throw new Error(`expected a string key or numeric array index for a get operation, got ${s}`)}o===0&&t.properties.add(String(s))}return r}function Bye(n,e,t){const i=n[1];if(typeof i!="string")throw new Error("expected a string argument for var operation");return t.variables.add(i),[new tc($h,i)]}function Iye(n,e,t){t.featureId=!0}function kye(n,e,t){t.geometryType=!0}function ZO(n,e,t){t.mapState=!0}function kC(n,e,t){const i=n[0];if(n.length!==1)throw new Error(`expected no arguments for ${i} operation`);return[]}function po(n,e){return function(t,i,r){const o=t[0],s=t.length-1;if(n===e){if(s!==n){const a=n===1?"":"s";throw new Error(`expected ${n} argument${a} for ${o}, got ${s}`)}}else if(s<n||s>e){const a=e===1/0?`${n} or more`:`${n} to ${e}`;throw new Error(`expected ${a} arguments for ${o}, got ${s}`)}}}function nj(n,e,t){const i=n.length-1,r=new Array(i);for(let o=0;o<i;++o){const s=lA(n[o+1],e,t);r[o]=s}return r}function Ps(n){return function(e,t,i){const r=e.length-1,o=new Array(r);for(let s=0;s<r;++s){const a=lA(e[s+1],n,i);o[s]=a}return o}}function Tye(n,e,t){const i=n[0],r=n.length-1;if(r%2===0)throw new Error(`expected an odd number of arguments for ${i}, got ${r} instead`)}function ij(n,e,t){const i=n[0],r=n.length-1;if(r%2===1)throw new Error(`expected an even number of arguments for operation ${i}, got ${r} instead`)}function Rye(n,e,t){const i=n.length-1,r=$h|Ho|oh,o=lA(n[1],r,t),s=lA(n[n.length-1],e,t),a=new Array(i-2);for(let c=0;c<i-2;c+=2){try{const A=lA(n[c+2],o.type,t);a[c]=A}catch(A){throw new Error(`failed to parse argument ${c+1} of match expression: ${A.message}`)}try{const A=lA(n[c+3],s.type,t);a[c+1]=A}catch(A){throw new Error(`failed to parse argument ${c+2} of match expression: ${A.message}`)}}return[o,...a,s]}function Dye(n,e,t){const i=n[1];let r;switch(i[0]){case"linear":r=1;break;case"exponential":const c=i[1];if(typeof c!="number"||c<=0)throw new Error(`expected a number base for exponential interpolation, got ${JSON.stringify(c)} instead`);r=c;break;default:throw new Error(`invalid interpolation type: ${JSON.stringify(i)}`)}const o=new tc(Ho,r);let s;try{s=lA(n[2],Ho,t)}catch(c){throw new Error(`failed to parse argument 1 in interpolate expression: ${c.message}`)}const a=new Array(n.length-3);for(let c=0;c<a.length;c+=2){try{const A=lA(n[c+3],Ho,t);a[c]=A}catch(A){throw new Error(`failed to parse argument ${c+2} for interpolate expression: ${A.message}`)}try{const A=lA(n[c+4],e,t);a[c+1]=A}catch(A){throw new Error(`failed to parse argument ${c+3} for interpolate expression: ${A.message}`)}}return[o,s,...a]}function Pye(n,e,t){const i=lA(n[n.length-1],e,t),r=new Array(n.length-1);for(let o=0;o<r.length-1;o+=2){try{const s=lA(n[o+1],oh,t);r[o]=s}catch(s){throw new Error(`failed to parse argument ${o} of case expression: ${s.message}`)}try{const s=lA(n[o+2],i.type,t);r[o+1]=s}catch(s){throw new Error(`failed to parse argument ${o+1} of case expression: ${s.message}`)}}return r[r.length-1]=i,r}function Uye(n,e,t){let i=n[2];if(!Array.isArray(i))throw new Error('the second argument for the "in" operator must be an array');let r;if(typeof i[0]=="string"){if(i[0]!=="literal")throw new Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');if(!Array.isArray(i[1]))throw new Error('failed to parse "in" expression: the literal operator must be followed by an array');i=i[1],r=$h}else r=Ho;const o=new Array(i.length);for(let a=0;a<o.length;a++)try{const c=lA(i[a],r,t);o[a]=c}catch(c){throw new Error(`failed to parse haystack item ${a} for "in" expression: ${c.message}`)}return[lA(n[1],r,t),...o]}function Kye(n,e,t){let i;try{i=lA(n[1],Ho,t)}catch(s){throw new Error(`failed to parse first argument in palette expression: ${s.message}`)}const r=n[2];if(!Array.isArray(r))throw new Error("the second argument of palette must be an array");const o=new Array(r.length);for(let s=0;s<o.length;s++){let a;try{a=lA(r[s],rm,t)}catch(c){throw new Error(`failed to parse color at index ${s} in palette expression: ${c.message}`)}if(!(a instanceof tc))throw new Error(`the palette color at index ${s} must be a literal value`);o[s]=a}return[i,...o]}function Tr(...n){return function(e,t,i){const r=e[0];let o;for(let s=0;s<n.length;s++){const a=n[s](e,t,i);if(s==n.length-1){if(!a)throw new Error("expected last argument validator to return the parsed args");o=a}}return new Eye(t,r,...o)}}function Lye(n,e,t){const i=n[0],r=Oye[i];if(!r)throw new Error(`unknown operator: ${i}`);return r(n,e,t)}function oee(n){if(!n)return"";const e=n.getType();switch(e){case"Point":case"LineString":case"Polygon":return e;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return e.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return oee(n.getGeometries()[0]);default:return""}}function see(){return{variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""}}function o1(n,e,t){const i=lA(n,e,t);return Am(i)}function Am(n,e){if(n instanceof tc){if(n.type===rm&&typeof n.value=="string"){const i=aU(n.value);return function(){return i}}return function(){return n.value}}const t=n.operator;switch(t){case pn.Number:case pn.String:case pn.Coalesce:return Fye(n);case pn.Get:case pn.Var:case pn.Has:return zye(n);case pn.Id:return i=>i.featureId;case pn.GeometryType:return i=>i.geometryType;case pn.Concat:{const i=n.args.map(r=>Am(r));return r=>"".concat(...i.map(o=>o(r).toString()))}case pn.Resolution:return i=>i.resolution;case pn.Any:case pn.All:case pn.Between:case pn.In:case pn.Not:return Nye(n);case pn.Equal:case pn.NotEqual:case pn.LessThan:case pn.LessThanOrEqualTo:case pn.GreaterThan:case pn.GreaterThanOrEqualTo:return jye(n);case pn.Multiply:case pn.Divide:case pn.Add:case pn.Subtract:case pn.Clamp:case pn.Mod:case pn.Pow:case pn.Abs:case pn.Floor:case pn.Ceil:case pn.Round:case pn.Sin:case pn.Cos:case pn.Atan:case pn.Sqrt:return Gye(n);case pn.Case:return Wye(n);case pn.Match:return Qye(n);case pn.Interpolate:return qye(n);case pn.ToString:return Yye(n);default:throw new Error(`Unsupported operator ${t}`)}}function Fye(n,e){const t=n.operator,i=n.args.length,r=new Array(i);for(let o=0;o<i;++o)r[o]=Am(n.args[o]);switch(t){case pn.Coalesce:return o=>{for(let s=0;s<i;++s){const a=r[s](o);if(typeof a<"u"&&a!==null)return a}throw new Error("Expected one of the values to be non-null")};case pn.Number:case pn.String:return o=>{for(let s=0;s<i;++s){const a=r[s](o);if(typeof a===t)return a}throw new Error(`Expected one of the values to be a ${t}`)};default:throw new Error(`Unsupported assertion operator ${t}`)}}function zye(n,e){const i=n.args[0].value;switch(n.operator){case pn.Get:return r=>{const o=n.args;let s=r.properties[i];for(let a=1,c=o.length;a<c;++a){const m=o[a].value;s=s[m]}return s};case pn.Var:return r=>r.variables[i];case pn.Has:return r=>{const o=n.args;if(!(i in r.properties))return!1;let s=r.properties[i];for(let a=1,c=o.length;a<c;++a){const m=o[a].value;if(!s||!Object.hasOwn(s,m))return!1;s=s[m]}return!0};default:throw new Error(`Unsupported accessor operator ${n.operator}`)}}function jye(n,e){const t=n.operator,i=Am(n.args[0]),r=Am(n.args[1]);switch(t){case pn.Equal:return o=>i(o)===r(o);case pn.NotEqual:return o=>i(o)!==r(o);case pn.LessThan:return o=>i(o)<r(o);case pn.LessThanOrEqualTo:return o=>i(o)<=r(o);case pn.GreaterThan:return o=>i(o)>r(o);case pn.GreaterThanOrEqualTo:return o=>i(o)>=r(o);default:throw new Error(`Unsupported comparison operator ${t}`)}}function Nye(n,e){const t=n.operator,i=n.args.length,r=new Array(i);for(let o=0;o<i;++o)r[o]=Am(n.args[o]);switch(t){case pn.Any:return o=>{for(let s=0;s<i;++s)if(r[s](o))return!0;return!1};case pn.All:return o=>{for(let s=0;s<i;++s)if(!r[s](o))return!1;return!0};case pn.Between:return o=>{const s=r[0](o),a=r[1](o),c=r[2](o);return s>=a&&s<=c};case pn.In:return o=>{const s=r[0](o);for(let a=1;a<i;++a)if(s===r[a](o))return!0;return!1};case pn.Not:return o=>!r[0](o);default:throw new Error(`Unsupported logical operator ${t}`)}}function Gye(n,e){const t=n.operator,i=n.args.length,r=new Array(i);for(let o=0;o<i;++o)r[o]=Am(n.args[o]);switch(t){case pn.Multiply:return o=>{let s=1;for(let a=0;a<i;++a)s*=r[a](o);return s};case pn.Divide:return o=>r[0](o)/r[1](o);case pn.Add:return o=>{let s=0;for(let a=0;a<i;++a)s+=r[a](o);return s};case pn.Subtract:return o=>r[0](o)-r[1](o);case pn.Clamp:return o=>{const s=r[0](o),a=r[1](o);if(s<a)return a;const c=r[2](o);return s>c?c:s};case pn.Mod:return o=>r[0](o)%r[1](o);case pn.Pow:return o=>Math.pow(r[0](o),r[1](o));case pn.Abs:return o=>Math.abs(r[0](o));case pn.Floor:return o=>Math.floor(r[0](o));case pn.Ceil:return o=>Math.ceil(r[0](o));case pn.Round:return o=>Math.round(r[0](o));case pn.Sin:return o=>Math.sin(r[0](o));case pn.Cos:return o=>Math.cos(r[0](o));case pn.Atan:return i===2?o=>Math.atan2(r[0](o),r[1](o)):o=>Math.atan(r[0](o));case pn.Sqrt:return o=>Math.sqrt(r[0](o));default:throw new Error(`Unsupported numeric operator ${t}`)}}function Wye(n,e){const t=n.args.length,i=new Array(t);for(let r=0;r<t;++r)i[r]=Am(n.args[r]);return r=>{for(let o=0;o<t-1;o+=2)if(i[o](r))return i[o+1](r);return i[t-1](r)}}function Qye(n,e){const t=n.args.length,i=new Array(t);for(let r=0;r<t;++r)i[r]=Am(n.args[r]);return r=>{const o=i[0](r);for(let s=1;s<t-1;s+=2)if(o===i[s](r))return i[s+1](r);return i[t-1](r)}}function qye(n,e){const t=n.args.length,i=new Array(t);for(let r=0;r<t;++r)i[r]=Am(n.args[r]);return r=>{const o=i[0](r),s=i[1](r);let a,c;for(let A=2;A<t;A+=2){const m=i[A](r);let v=i[A+1](r);const x=Array.isArray(v);if(x&&(v=_ye(v)),m>=s)return A===2?v:x?$ye(o,s,a,c,m,v):D2(o,s,a,c,m,v);a=m,c=v}return c}}function Yye(n,e){const t=n.operator,i=n.args.length,r=new Array(i);for(let o=0;o<i;++o)r[o]=Am(n.args[o]);switch(t){case pn.ToString:return o=>{const s=r[0](o);return n.args[0].type===rm?lU(s):s.toString()};default:throw new Error(`Unsupported convert operator ${t}`)}}function D2(n,e,t,i,r,o){const s=r-t;if(s===0)return i;const a=e-t,c=n===1?a/s:(Math.pow(n,a)-1)/(Math.pow(n,s)-1);return i+c*(o-i)}function $ye(n,e,t,i,r,o){if(r-t===0)return i;const a=Jz(i),c=Jz(o);let A=c[2]-a[2];A>180?A-=360:A<-180&&(A+=360);const m=[D2(n,e,t,a[0],r,c[0]),D2(n,e,t,a[1],r,c[1]),a[2]+D2(n,e,t,0,r,A),D2(n,e,t,i[3],r,o[3])];return xye(m)}const zi={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class cU extends W4{constructor(e,t,i,r){super(),this.extent=e,this.pixelRatio_=i,this.resolution=t,this.state=typeof r=="function"?zi.IDLE:r,this.image_=null,this.loader=typeof r=="function"?r:null}changed(){this.dispatchEvent(Ir.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==zi.IDLE&&this.loader){this.state=zi.LOADING,this.changed();const e=this.getResolution(),t=Array.isArray(e)?e[0]:e;nx(()=>this.loader(this.getExtent(),t,this.getPixelRatio())).then(i=>{"image"in i&&(this.image_=i.image),"extent"in i&&(this.extent=i.extent),"resolution"in i&&(this.resolution=i.resolution),"pixelRatio"in i&&(this.pixelRatio_=i.pixelRatio),(i instanceof HTMLImageElement||s0e&&i instanceof ImageBitmap||i instanceof HTMLCanvasElement||i instanceof HTMLVideoElement)&&(this.image_=i),this.state=zi.LOADED}).catch(i=>{this.state=zi.ERROR,console.error(i)}).finally(()=>this.changed())}}setImage(e){this.image_=e}setResolution(e){this.resolution=e}}function Vye(n,e,t){const i=n;let r=!0,o=!1,s=!1;const a=[Lw(i,Ir.LOAD,function(){s=!0,o||e()})];return i.src&&pJ?(o=!0,i.decode().then(function(){r&&e()}).catch(function(c){r&&(s?e():t())})):a.push(Lw(i,Ir.ERROR,t)),function(){r=!1,a.forEach(Ea)}}function Hye(n,e){return new Promise((t,i)=>{function r(){s(),t(n)}function o(){s(),i(new Error("Image load error"))}function s(){n.removeEventListener("load",r),n.removeEventListener("error",o)}n.addEventListener("load",r),n.addEventListener("error",o)})}function Zye(n,e){return e&&(n.src=e),n.src&&pJ?new Promise((t,i)=>n.decode().then(()=>t(n)).catch(r=>n.complete&&n.width?t(n):i(r))):Hye(n)}class Xye{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const t in this.cache_){const i=this.cache_[t];(e++&3)===0&&!i.hasListener()&&(delete this.cache_[t],delete this.patternCache_[t],--this.cacheSize_)}}}get(e,t,i){const r=XO(e,t,i);return r in this.cache_?this.cache_[r]:null}getPattern(e,t,i){const r=XO(e,t,i);return r in this.patternCache_?this.patternCache_[r]:null}set(e,t,i,r,o){const s=XO(e,t,i),a=s in this.cache_;this.cache_[s]=r,o&&(r.getImageState()===zi.IDLE&&r.load(),r.getImageState()===zi.LOADING?r.ready().then(()=>{this.patternCache_[s]=Qw().createPattern(r.getImage(1),"repeat")}):this.patternCache_[s]=Qw().createPattern(r.getImage(1),"repeat")),a||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function XO(n,e,t){const i=t?rx(t):"null";return e+":"+n+":"+i}const Zf=new Xye;let i2=null;class aee extends W4{constructor(e,t,i,r,o){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=i,this.canvas_={},this.color_=o,this.imageState_=r===void 0?zi.IDLE:r,this.size_=e&&e.width&&e.height?[e.width,e.height]:null,this.src_=t,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===zi.LOADED){i2||(i2=bl(1,1,void 0,{willReadFrequently:!0})),i2.drawImage(this.image_,0,0);try{i2.getImageData(0,0,1,1),this.tainted_=!1}catch{i2=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(Ir.CHANGE)}handleImageError_(){this.imageState_=zi.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=zi.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],t=this.size_[1],i=bl(e,t);i.fillRect(0,0,e,t),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===zi.IDLE){this.image_||this.initializeImage_(),this.imageState_=zi.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Zye(this.image_,this.src_).then(e=>{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==zi.LOADED)return;const t=this.image_,i=bl(Math.ceil(t.width*e),Math.ceil(t.height*e)),r=i.canvas;i.scale(e,e),i.drawImage(t,0,0),i.globalCompositeOperation="multiply",i.fillStyle=bye(this.color_),i.fillRect(0,0,r.width/e,r.height/e),i.globalCompositeOperation="destination-in",i.drawImage(t,0,0),this.canvas_[e]=r}ready(){return this.ready_||(this.ready_=new Promise(e=>{if(this.imageState_===zi.LOADED||this.imageState_===zi.ERROR)e();else{const t=()=>{(this.imageState_===zi.LOADED||this.imageState_===zi.ERROR)&&(this.removeEventListener(Ir.CHANGE,t),e())};this.addEventListener(Ir.CHANGE,t)}})),this.ready_}}function AU(n,e,t,i,r,o){let s=e===void 0?void 0:Zf.get(e,t,r);return s||(s=new aee(n,n&&"src"in n?n.src||void 0:e,t,i,r),Zf.set(e,t,r,s,o)),o&&s&&!Zf.getPattern(e,t,r)&&Zf.set(e,t,r,s,o),s}function wg(n){return n?Array.isArray(n)?lU(n):typeof n=="object"&&"src"in n?Jye(n):n:null}function Jye(n){if(!n.offset||!n.size)return Zf.getPattern(n.src,"anonymous",n.color);const e=n.src+":"+n.offset,t=Zf.getPattern(e,void 0,n.color);if(t)return t;const i=Zf.get(n.src,"anonymous",null);if(i.getImageState()!==zi.LOADED)return null;const r=bl(n.size[0],n.size[1]);return r.drawImage(i.getImage(1),n.offset[0],n.offset[1],n.size[0],n.size[1],0,0,n.size[0],n.size[1]),AU(r.canvas,e,void 0,zi.LOADED,n.color,!0),Zf.getPattern(e,void 0,n.color)}const lee="10px sans-serif",Vh="#000",ox="round",Y0=[],$0=0,sx="round",W3=10,Q3="#000",q3="center",qw="middle",ib=[0,0,0,0],Y3=1,$v=new vm;let r2=null,rj;const Y9={},eve=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function tve(n,e,t){return`${n} ${e} 16px "${t}"`}const nve=(function(){let e,t;async function i(o){await t.ready;const s=await t.load(o);if(s.length===0)return!1;const a=Q9(o),c=a.families[0].toLowerCase(),A=a.weight;return s.some(m=>{const v=m.family.replace(/^['"]|['"]$/g,"").toLowerCase(),x=W9[m.weight]||m.weight;return v===c&&m.style===a.style&&x==A})}async function r(){await t.ready;let o=!0;const s=$v.getProperties(),a=Object.keys(s).filter(c=>s[c]<100);for(let c=a.length-1;c>=0;--c){const A=a[c];let m=s[A];m<100&&(await i(A)?(G4(Y9),$v.set(A,100)):(m+=10,$v.set(A,m,!0),m<100&&(o=!1)))}e=void 0,o||(e=setTimeout(r,100))}return async function(o){t||(t=IP?self.fonts:document.fonts);const s=Q9(o);if(!s)return;const a=s.families;let c=!1;for(const A of a){if(eve.has(A))continue;const m=tve(s.style,s.weight,A);$v.get(m)===void 0&&($v.set(m,0,!0),c=!0)}c&&(clearTimeout(e),e=setTimeout(r,100))}})(),ive=(function(){let n;return function(e){let t=Y9[e];if(t==null){if(IP){const i=Q9(e),r=uee(e,"Žg");t=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=e,document.body.appendChild(n),t=n.offsetHeight,document.body.removeChild(n);Y9[e]=t}return t}})();function uee(n,e){return r2||(r2=bl(1,1)),n!=rj&&(r2.font=n,rj=r2.font),r2.measureText(e)}function cee(n,e){return uee(n,e).width}function oj(n,e,t){if(e in t)return t[e];const i=e.split(`
`).reduce((r,o)=>Math.max(r,cee(n,o)),0);return t[e]=i,i}function rve(n,e){const t=[],i=[],r=[];let o=0,s=0,a=0,c=0;for(let A=0,m=e.length;A<=m;A+=2){const v=e[A];if(v===`
`||A===m){o=Math.max(o,s),r.push(s),s=0,a+=c,c=0;continue}const x=e[A+1]||n.font,_=cee(x,v);t.push(_),s+=_;const O=ive(x);i.push(O),c=Math.max(c,O)}return{width:o,height:a,widths:t,heights:i,lineWidths:r}}function ove(n,e,t,i,r,o,s,a,c,A,m){n.save(),t!==1&&(n.globalAlpha===void 0?n.globalAlpha=v=>v.globalAlpha*=t:n.globalAlpha*=t),e&&n.transform.apply(n,e),i.contextInstructions?(n.translate(c,A),n.scale(m[0],m[1]),sve(i,n)):m[0]<0||m[1]<0?(n.translate(c,A),n.scale(m[0],m[1]),n.drawImage(i,r,o,s,a,0,0,s,a)):n.drawImage(i,r,o,s,a,c,A,s*m[0],a*m[1]),n.restore()}function sve(n,e){const t=n.contextInstructions;for(let i=0,r=t.length;i<r;i+=2)Array.isArray(t[i+1])?e[t[i]].apply(e,t[i+1]):e[t[i]]=t[i+1]}class LE{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=UA(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new LE({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return Dr()}getImage(e){return Dr()}getHitDetectionImage(){return Dr()}getPixelRatio(e){return 1}getImageState(){return Dr()}getImageSize(){return Dr()}getOrigin(){return Dr()}getSize(){return Dr()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=UA(e)}listenImageChange(e){Dr()}load(){Dr()}unlistenImageChange(e){Dr()}ready(){return Promise.resolve()}}class FE extends LE{constructor(e){super({opacity:1,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,rotation:e.rotation!==void 0?e.rotation:0,scale:e.scale!==void 0?e.scale:1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode}),this.hitDetectionCanvas_=null,this.fill_=e.fill!==void 0?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius=e.radius,this.radius2_=e.radius2,this.angle_=e.angle!==void 0?e.angle:0,this.stroke_=e.stroke!==void 0?e.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?zi.LOADING:zi.LOADED,this.imageState_===zi.LOADING&&this.ready().then(()=>this.imageState_=zi.LOADED),this.render()}clone(){const e=this.getScale(),t=new FE({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}getAnchor(){const e=this.size_,t=this.getDisplacement(),i=this.getScaleArray();return[e[0]/2-t[0]/i[0],e[1]/2+t[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(e){const t=this.fill_?.getKey(),i=`${e},${this.angle_},${this.radius},${this.radius2_},${this.points_},${t}`+Object.values(this.renderOptions_).join(",");let r=Zf.get(i,null,null)?.getImage(1);if(!r){const o=this.renderOptions_,s=Math.ceil(o.size*e),a=bl(s,s);this.draw_(o,a,e),r=a.canvas,Zf.set(i,null,null,new aee(r,void 0,null,zi.LOADED,null))}return r}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,t,i){if(t===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return t;let r=this.radius,o=this.radius2_===void 0?r:this.radius2_;if(r<o){const Y=r;r=o,o=Y}const s=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/s,c=o*Math.sin(a),A=Math.sqrt(o*o-c*c),m=r-A,v=Math.sqrt(c*c+m*m),x=v/c;if(e==="miter"&&x<=i)return x*t;const _=t/2/x,O=t/2*(m/v),F=Math.sqrt((r+_)*(r+_)+O*O)-r;if(this.radius2_===void 0||e==="bevel")return F*2;const j=r*Math.sin(a),Q=Math.sqrt(r*r-j*j),V=o-Q,G=Math.sqrt(j*j+V*V)/j;if(G<=i){const Y=G*t/2-o-r;return 2*Math.max(F,Y)}return F*2}createRenderOptions(){let e=ox,t=sx,i=0,r=null,o=0,s,a=0;this.stroke_&&(s=wg(this.stroke_.getColor()??Q3),a=this.stroke_.getWidth()??Y3,r=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset()??0,t=this.stroke_.getLineJoin()??sx,e=this.stroke_.getLineCap()??ox,i=this.stroke_.getMiterLimit()??W3);const c=this.calculateLineJoinSize_(t,a,i),A=Math.max(this.radius,this.radius2_||0),m=Math.ceil(2*A+c);return{strokeStyle:s,strokeWidth:a,size:m,lineCap:e,lineDash:r,lineDashOffset:o,lineJoin:t,miterLimit:i}}render(){this.renderOptions_=this.createRenderOptions();const e=this.renderOptions_.size;this.hitDetectionCanvas_=null,this.size_=[e,e]}draw_(e,t,i){if(t.scale(i,i),t.translate(e.size/2,e.size/2),this.createPath_(t),this.fill_){let r=this.fill_.getColor();r===null&&(r=Vh),t.fillStyle=wg(r),t.fill()}e.strokeStyle&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}createHitDetectionCanvas_(e){let t;if(this.fill_){let i=this.fill_.getColor(),r=0;typeof i=="string"&&(i=rx(i)),i===null?r=1:Array.isArray(i)&&(r=i.length===4?i[3]:1),r===0&&(t=bl(e.size,e.size),this.drawHitDetectionCanvas_(e,t))}return t?t.canvas:this.getImage(1)}createPath_(e){let t=this.points_;const i=this.radius;if(t===1/0)e.arc(0,0,i,0,2*Math.PI);else{const r=this.radius2_===void 0?i:this.radius2_;this.radius2_!==void 0&&(t*=2);const o=this.angle_-Math.PI/2,s=2*Math.PI/t;for(let a=0;a<t;a++){const c=o+a*s,A=a%2===0?i:r;e.lineTo(A*Math.cos(c),A*Math.sin(c))}e.closePath()}}drawHitDetectionCanvas_(e,t){t.translate(e.size/2,e.size/2),this.createPath_(t),t.fillStyle=Vh,t.fill(),e.strokeStyle&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}class X4 extends FE{constructor(e){e=e||{radius:5},super({points:1/0,fill:e.fill,radius:e.radius,stroke:e.stroke,scale:e.scale!==void 0?e.scale:1,rotation:e.rotation!==void 0?e.rotation:0,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode})}clone(){const e=this.getScale(),t=new X4({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}setRadius(e){this.radius=e,this.render()}}class G0{constructor(e){e=e||{},this.patternImage_=null,this.color_=null,e.color!==void 0&&this.setColor(e.color)}clone(){const e=this.getColor();return new G0({color:Array.isArray(e)?e.slice():e||void 0})}getColor(){return this.color_}setColor(e){if(e!==null&&typeof e=="object"&&"src"in e){const t=AU(null,e.src,"anonymous",void 0,e.offset?null:e.color?e.color:null,!(e.offset&&e.size));t.ready().then(()=>{this.patternImage_=null}),t.getImageState()===zi.IDLE&&t.load(),t.getImageState()===zi.LOADING&&(this.patternImage_=t)}this.color_=e}getKey(){const e=this.getColor();return e?e instanceof CanvasPattern||e instanceof CanvasGradient?$r(e):typeof e=="object"&&"src"in e?e.src+":"+e.offset:rx(e).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}function sj(n,e,t,i){return t!==void 0&&i!==void 0?[t/n,i/e]:t!==void 0?t/n:i!==void 0?i/e:1}class ax extends LE{constructor(e){e=e||{};const t=e.opacity!==void 0?e.opacity:1,i=e.rotation!==void 0?e.rotation:0,r=e.scale!==void 0?e.scale:1,o=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:t,rotation:i,scale:r,displacement:e.displacement!==void 0?e.displacement:[0,0],rotateWithView:o,declutterMode:e.declutterMode}),this.anchor_=e.anchor!==void 0?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=e.anchorOrigin!==void 0?e.anchorOrigin:"top-left",this.anchorXUnits_=e.anchorXUnits!==void 0?e.anchorXUnits:"fraction",this.anchorYUnits_=e.anchorYUnits!==void 0?e.anchorYUnits:"fraction",this.crossOrigin_=e.crossOrigin!==void 0?e.crossOrigin:null;const s=e.img!==void 0?e.img:null;let a=e.src;Os(!(a!==void 0&&s),"`image` and `src` cannot be provided at the same time"),(a===void 0||a.length===0)&&s&&(a=s.src||$r(s)),Os(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),Os(!((e.width!==void 0||e.height!==void 0)&&e.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let c;if(e.src!==void 0?c=zi.IDLE:s!==void 0&&("complete"in s?s.complete?c=s.src?zi.LOADED:zi.IDLE:c=zi.LOADING:c=zi.LOADED),this.color_=e.color!==void 0?rx(e.color):null,this.iconImage_=AU(s,a,this.crossOrigin_,c,this.color_),this.offset_=e.offset!==void 0?e.offset:[0,0],this.offsetOrigin_=e.offsetOrigin!==void 0?e.offsetOrigin:"top-left",this.origin_=null,this.size_=e.size!==void 0?e.size:null,this.initialOptions_,e.width!==void 0||e.height!==void 0){let A,m;if(e.size)[A,m]=e.size;else{const v=this.getImage(1);if(v.width&&v.height)A=v.width,m=v.height;else if(v instanceof HTMLImageElement){this.initialOptions_=e;const x=()=>{if(this.unlistenImageChange(x),!this.initialOptions_)return;const _=this.iconImage_.getSize();this.setScale(sj(_[0],_[1],e.width,e.height))};this.listenImageChange(x);return}}A!==void 0&&this.setScale(sj(A,m,e.width,e.height))}}clone(){let e,t,i;return this.initialOptions_?(t=this.initialOptions_.width,i=this.initialOptions_.height):(e=this.getScale(),e=Array.isArray(e)?e.slice():e),new ax({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:e,width:t,height:i,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let e=this.normalizedAnchor_;if(!e){e=this.anchor_;const r=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!r)return null;e=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(e[0]*=r[0]),this.anchorYUnits_=="fraction"&&(e[1]*=r[1])}if(this.anchorOrigin_!="top-left"){if(!r)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(e[0]=-e[0]+r[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(e[1]=-e[1]+r[1])}this.normalizedAnchor_=e}const t=this.getDisplacement(),i=this.getScaleArray();return[e[0]-t[0]/i[0],e[1]+t[1]/i[1]]}setAnchor(e){this.anchor_=e,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(e){return this.iconImage_.getImage(e)}getPixelRatio(e){return this.iconImage_.getPixelRatio(e)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let e=this.offset_;if(this.offsetOrigin_!="top-left"){const t=this.getSize(),i=this.iconImage_.getSize();if(!t||!i)return null;e=e.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(e[0]=i[0]-t[0]-e[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(e[1]=i[1]-t[1]-e[1])}return this.origin_=e,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const e=this.getScaleArray();if(this.size_)return this.size_[0]*e[0];if(this.iconImage_.getImageState()==zi.LOADED)return this.iconImage_.getSize()[0]*e[0]}getHeight(){const e=this.getScaleArray();if(this.size_)return this.size_[1]*e[1];if(this.iconImage_.getImageState()==zi.LOADED)return this.iconImage_.getSize()[1]*e[1]}setScale(e){delete this.initialOptions_,super.setScale(e)}listenImageChange(e){this.iconImage_.addEventListener(Ir.CHANGE,e)}load(){this.iconImage_.load()}unlistenImageChange(e){this.iconImage_.removeEventListener(Ir.CHANGE,e)}ready(){return this.iconImage_.ready()}}class Iy{constructor(e){e=e||{},this.color_=e.color!==void 0?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=e.lineDash!==void 0?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}clone(){const e=this.getColor();return new Iy({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(e){this.color_=e}setLineCap(e){this.lineCap_=e}setLineDash(e){this.lineDash_=e}setLineDashOffset(e){this.lineDashOffset_=e}setLineJoin(e){this.lineJoin_=e}setMiterLimit(e){this.miterLimit_=e}setWidth(e){this.width_=e}}class Hd{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=aj,e.geometry!==void 0&&this.setGeometry(e.geometry),this.fill_=e.fill!==void 0?e.fill:null,this.image_=e.image!==void 0?e.image:null,this.renderer_=e.renderer!==void 0?e.renderer:null,this.hitDetectionRenderer_=e.hitDetectionRenderer!==void 0?e.hitDetectionRenderer:null,this.stroke_=e.stroke!==void 0?e.stroke:null,this.text_=e.text!==void 0?e.text:null,this.zIndex_=e.zIndex}clone(){let e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new Hd({geometry:e??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(e){this.renderer_=e}setHitDetectionRenderer(e){this.hitDetectionRenderer_=e}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(e){this.fill_=e}getImage(){return this.image_}setImage(e){this.image_=e}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e}getText(){return this.text_}setText(e){this.text_=e}getZIndex(){return this.zIndex_}setGeometry(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(t){return t.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=aj,this.geometry_=e}setZIndex(e){this.zIndex_=e}}function ave(n){let e;if(typeof n=="function")e=n;else{let t;Array.isArray(n)?t=n:(Os(typeof n.getZIndex=="function","Expected an `Style` or an array of `Style`"),t=[n]),e=function(){return t}}return e}let JO=null;function Aee(n,e){if(!JO){const t=new G0({color:"rgba(255,255,255,0.4)"}),i=new Iy({color:"#3399CC",width:1.25});JO=[new Hd({image:new X4({fill:t,stroke:i,radius:5}),fill:t,stroke:i})]}return JO}function aj(n){return n.getGeometry()}const lve="#333";let hee=class dee{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.keepUpright_=e.keepUpright,this.scale_=e.scale,this.scaleArray_=UA(e.scale!==void 0?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.repeat_=e.repeat,this.textBaseline_=e.textBaseline,this.fill_=e.fill!==void 0?e.fill:new G0({color:lve}),this.maxAngle_=e.maxAngle!==void 0?e.maxAngle:Math.PI/4,this.placement_=e.placement!==void 0?e.placement:"point",this.overflow_=!!e.overflow,this.stroke_=e.stroke!==void 0?e.stroke:null,this.offsetX_=e.offsetX!==void 0?e.offsetX:0,this.offsetY_=e.offsetY!==void 0?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=e.padding===void 0?null:e.padding,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new dee({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),keepUpright:this.getKeepUpright(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getKeepUpright(){return this.keepUpright_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(e){this.overflow_=e}setFont(e){this.font_=e}setMaxAngle(e){this.maxAngle_=e}setOffsetX(e){this.offsetX_=e}setOffsetY(e){this.offsetY_=e}setPlacement(e){this.placement_=e}setRepeat(e){this.repeat_=e}setRotateWithView(e){this.rotateWithView_=e}setKeepUpright(e){this.keepUpright_=e}setFill(e){this.fill_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=UA(e!==void 0?e:1)}setStroke(e){this.stroke_=e}setText(e){this.text_=e}setTextAlign(e){this.textAlign_=e}setJustify(e){this.justify_=e}setTextBaseline(e){this.textBaseline_=e}setBackgroundFill(e){this.backgroundFill_=e}setBackgroundStroke(e){this.backgroundStroke_=e}setPadding(e){this.padding_=e}};function uve(n){return!0}function cve(n){const e=ree(),t=Ave(n,e),i=see();return function(r,o){if(i.properties=r.getPropertiesInternal(),i.resolution=o,e.featureId){const s=r.getId();s!==void 0?i.featureId=s:i.featureId=null}return e.geometryType&&(i.geometryType=oee(r.getGeometry())),t(i)}}function lj(n){const e=ree(),t=n.length,i=new Array(t);for(let s=0;s<t;++s)i[s]=$9(n[s],e);const r=see(),o=new Array(t);return function(s,a){if(r.properties=s.getPropertiesInternal(),r.resolution=a,e.featureId){const A=s.getId();A!==void 0?r.featureId=A:r.featureId=null}let c=0;for(let A=0;A<t;++A){const m=i[A](r);m&&(o[c]=m,c+=1)}return o.length=c,o}}function Ave(n,e){const t=n.length,i=new Array(t);for(let r=0;r<t;++r){const o=n[r],s="filter"in o?o1(o.filter,oh,e):uve;let a;if(Array.isArray(o.style)){const c=o.style.length;a=new Array(c);for(let A=0;A<c;++A)a[A]=$9(o.style[A],e)}else a=[$9(o.style,e)];i[r]={filter:s,styles:a}}return function(r){const o=[];let s=!1;for(let a=0;a<t;++a){const c=i[a].filter;if(c(r)&&!(n[a].else&&s)){s=!0;for(const A of i[a].styles){const m=A(r);m&&o.push(m)}}}return o}}function $9(n,e){const t=$3(n,"",e),i=V3(n,"",e),r=hve(n,e),o=dve(n,e),s=Jh(n,"z-index",e);if(!t&&!i&&!r&&!o&&!qy(n))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(n));const a=new Hd;return function(c){let A=!0;if(t){const m=t(c);m&&(A=!1),a.setFill(m)}if(i){const m=i(c);m&&(A=!1),a.setStroke(m)}if(r){const m=r(c);m&&(A=!1),a.setText(m)}if(o){const m=o(c);m&&(A=!1),a.setImage(m)}return s&&a.setZIndex(s(c)),A?null:a}}function $3(n,e,t){let i;if(e+"fill-pattern-src"in n)i=gve(n,e+"fill-",t);else{if(n[e+"fill-color"]==="none")return o=>null;i=hU(n,e+"fill-color",t)}if(!i)return null;const r=new G0;return function(o){const s=i(o);return s===sU?null:(r.setColor(s),r)}}function V3(n,e,t){const i=Jh(n,e+"stroke-width",t),r=hU(n,e+"stroke-color",t);if(!i&&!r)return null;const o=F0(n,e+"stroke-line-cap",t),s=F0(n,e+"stroke-line-join",t),a=fee(n,e+"stroke-line-dash",t),c=Jh(n,e+"stroke-line-dash-offset",t),A=Jh(n,e+"stroke-miter-limit",t),m=new Iy;return function(v){if(r){const x=r(v);if(x===sU)return null;m.setColor(x)}if(i&&m.setWidth(i(v)),o){const x=o(v);if(x!=="butt"&&x!=="round"&&x!=="square")throw new Error("Expected butt, round, or square line cap");m.setLineCap(x)}if(s){const x=s(v);if(x!=="bevel"&&x!=="round"&&x!=="miter")throw new Error("Expected bevel, round, or miter line join");m.setLineJoin(x)}return a&&m.setLineDash(a(v)),c&&m.setLineDashOffset(c(v)),A&&m.setMiterLimit(A(v)),m}}function hve(n,e){const t="text-",i=F0(n,t+"value",e);if(!i)return null;const r=$3(n,t,e),o=$3(n,t+"background-",e),s=V3(n,t,e),a=V3(n,t+"background-",e),c=F0(n,t+"font",e),A=Jh(n,t+"max-angle",e),m=Jh(n,t+"offset-x",e),v=Jh(n,t+"offset-y",e),x=P_(n,t+"overflow",e),_=F0(n,t+"placement",e),O=Jh(n,t+"repeat",e),P=zE(n,t+"scale",e),F=P_(n,t+"rotate-with-view",e),j=Jh(n,t+"rotation",e),Q=F0(n,t+"align",e),V=F0(n,t+"justify",e),H=F0(n,t+"baseline",e),G=P_(n,t+"keep-upright",e),Y=fee(n,t+"padding",e),z=jE(n,t+"declutter-mode"),se=new hee({declutterMode:z});return function(le){if(se.setText(i(le)),r&&se.setFill(r(le)),o&&se.setBackgroundFill(o(le)),s&&se.setStroke(s(le)),a&&se.setBackgroundStroke(a(le)),c&&se.setFont(c(le)),A&&se.setMaxAngle(A(le)),m&&se.setOffsetX(m(le)),v&&se.setOffsetY(v(le)),x&&se.setOverflow(x(le)),_){const me=_(le);if(me!=="point"&&me!=="line")throw new Error("Expected point or line for text-placement");se.setPlacement(me)}if(O&&se.setRepeat(O(le)),P&&se.setScale(P(le)),F&&se.setRotateWithView(F(le)),j&&se.setRotation(j(le)),Q){const me=Q(le);if(me!=="left"&&me!=="center"&&me!=="right"&&me!=="end"&&me!=="start")throw new Error("Expected left, right, center, start, or end for text-align");se.setTextAlign(me)}if(V){const me=V(le);if(me!=="left"&&me!=="right"&&me!=="center")throw new Error("Expected left, right, or center for text-justify");se.setJustify(me)}if(H){const me=H(le);if(me!=="bottom"&&me!=="top"&&me!=="middle"&&me!=="alphabetic"&&me!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");se.setTextBaseline(me)}return Y&&se.setPadding(Y(le)),G&&se.setKeepUpright(G(le)),se}}function dve(n,e){return"icon-src"in n?fve(n,e):"shape-points"in n?pve(n,e):"circle-radius"in n?mve(n,e):null}function fve(n,e){const t="icon-",i=t+"src",r=pee(n[i],i),o=Yw(n,t+"anchor",e),s=zE(n,t+"scale",e),a=Jh(n,t+"opacity",e),c=Yw(n,t+"displacement",e),A=Jh(n,t+"rotation",e),m=P_(n,t+"rotate-with-view",e),v=cj(n,t+"anchor-origin"),x=Aj(n,t+"anchor-x-units"),_=Aj(n,t+"anchor-y-units"),O=Cve(n,t+"color"),P=vve(n,t+"cross-origin"),F=bve(n,t+"offset"),j=cj(n,t+"offset-origin"),Q=$w(n,t+"width"),V=$w(n,t+"height"),H=yve(n,t+"size"),G=jE(n,t+"declutter-mode"),Y=new ax({src:r,anchorOrigin:v,anchorXUnits:x,anchorYUnits:_,color:O,crossOrigin:P,offset:F,offsetOrigin:j,height:V,width:Q,size:H,declutterMode:G});return function(z){return a&&Y.setOpacity(a(z)),c&&Y.setDisplacement(c(z)),A&&Y.setRotation(A(z)),m&&Y.setRotateWithView(m(z)),s&&Y.setScale(s(z)),o&&Y.setAnchor(o(z)),Y}}function pve(n,e){const t="shape-",i=t+"points",r=t+"radius",o=V9(n[i],i),s=V9(n[r],r),a=$3(n,t,e),c=V3(n,t,e),A=zE(n,t+"scale",e),m=Yw(n,t+"displacement",e),v=Jh(n,t+"rotation",e),x=P_(n,t+"rotate-with-view",e),_=$w(n,t+"radius2"),O=$w(n,t+"angle"),P=jE(n,t+"declutter-mode"),F=new FE({points:o,radius:s,radius2:_,angle:O,declutterMode:P});return function(j){return a&&F.setFill(a(j)),c&&F.setStroke(c(j)),m&&F.setDisplacement(m(j)),v&&F.setRotation(v(j)),x&&F.setRotateWithView(x(j)),A&&F.setScale(A(j)),F}}function mve(n,e){const t="circle-",i=$3(n,t,e),r=V3(n,t,e),o=Jh(n,t+"radius",e),s=zE(n,t+"scale",e),a=Yw(n,t+"displacement",e),c=Jh(n,t+"rotation",e),A=P_(n,t+"rotate-with-view",e),m=jE(n,t+"declutter-mode"),v=new X4({radius:5,declutterMode:m});return function(x){return o&&v.setRadius(o(x)),i&&v.setFill(i(x)),r&&v.setStroke(r(x)),a&&v.setDisplacement(a(x)),c&&v.setRotation(c(x)),A&&v.setRotateWithView(A(x)),s&&v.setScale(s(x)),v}}function Jh(n,e,t){if(!(e in n))return;const i=o1(n[e],Ho,t);return function(r){return V9(i(r),e)}}function F0(n,e,t){if(!(e in n))return null;const i=o1(n[e],$h,t);return function(r){return pee(i(r),e)}}function gve(n,e,t){const i=F0(n,e+"pattern-src",t),r=uj(n,e+"pattern-offset",t),o=uj(n,e+"pattern-size",t),s=hU(n,e+"color",t);return function(a){return{src:i(a),offset:r&&r(a),size:o&&o(a),color:s&&s(a)}}}function P_(n,e,t){if(!(e in n))return null;const i=o1(n[e],oh,t);return function(r){const o=i(r);if(typeof o!="boolean")throw new Error(`Expected a boolean for ${e}`);return o}}function hU(n,e,t){if(!(e in n))return null;const i=o1(n[e],rm,t);return function(r){return mee(i(r),e)}}function fee(n,e,t){if(!(e in n))return null;const i=o1(n[e],Ob,t);return function(r){return J4(i(r),e)}}function Yw(n,e,t){if(!(e in n))return null;const i=o1(n[e],Ob,t);return function(r){const o=J4(i(r),e);if(o.length!==2)throw new Error(`Expected two numbers for ${e}`);return o}}function uj(n,e,t){if(!(e in n))return null;const i=o1(n[e],Ob,t);return function(r){return gee(i(r),e)}}function zE(n,e,t){if(!(e in n))return null;const i=o1(n[e],Ob|Ho,t);return function(r){return _ve(i(r),e)}}function $w(n,e){const t=n[e];if(t!==void 0){if(typeof t!="number")throw new Error(`Expected a number for ${e}`);return t}}function yve(n,e){const t=n[e];if(t!==void 0){if(typeof t=="number")return UA(t);if(!Array.isArray(t))throw new Error(`Expected a number or size array for ${e}`);if(t.length!==2||typeof t[0]!="number"||typeof t[1]!="number")throw new Error(`Expected a number or size array for ${e}`);return t}}function vve(n,e){const t=n[e];if(t!==void 0){if(typeof t!="string")throw new Error(`Expected a string for ${e}`);return t}}function cj(n,e){const t=n[e];if(t!==void 0){if(t!=="bottom-left"&&t!=="bottom-right"&&t!=="top-left"&&t!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return t}}function Aj(n,e){const t=n[e];if(t!==void 0){if(t!=="pixels"&&t!=="fraction")throw new Error(`Expected pixels or fraction for ${e}`);return t}}function bve(n,e){const t=n[e];if(t!==void 0)return J4(t,e)}function jE(n,e){const t=n[e];if(t!==void 0){if(typeof t!="string")throw new Error(`Expected a string for ${e}`);if(t!=="declutter"&&t!=="obstacle"&&t!=="none")throw new Error(`Expected declutter, obstacle, or none for ${e}`);return t}}function Cve(n,e){const t=n[e];if(t!==void 0)return mee(t,e)}function J4(n,e){if(!Array.isArray(n))throw new Error(`Expected an array for ${e}`);const t=n.length;for(let i=0;i<t;++i)if(typeof n[i]!="number")throw new Error(`Expected an array of numbers for ${e}`);return n}function pee(n,e){if(typeof n!="string")throw new Error(`Expected a string for ${e}`);return n}function V9(n,e){if(typeof n!="number")throw new Error(`Expected a number for ${e}`);return n}function mee(n,e){if(typeof n=="string")return n;const t=J4(n,e),i=t.length;if(i<3||i>4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return t}function gee(n,e){const t=J4(n,e);if(t.length!==2)throw new Error(`Expected an array of two numbers for ${e}`);return t}function _ve(n,e){return typeof n=="number"?n:gee(n,e)}const hj={RENDER_ORDER:"renderOrder"};class dU extends Bx{constructor(e){e=e||{};const t=Object.assign({},e);delete t.style,delete t.renderBuffer,delete t.updateWhileAnimating,delete t.updateWhileInteracting,super(t),this.declutter_=e.declutter?String(e.declutter):void 0,this.renderBuffer_=e.renderBuffer!==void 0?e.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(e.style),this.updateWhileAnimating_=e.updateWhileAnimating!==void 0?e.updateWhileAnimating:!1,this.updateWhileInteracting_=e.updateWhileInteracting!==void 0?e.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(e){return super.getFeatures(e)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(hj.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(e,t){const i=this.getDeclutter();i in e.declutter||(e.declutter[i]=new nee(9)),this.getRenderer().renderDeclutter(e,t)}setRenderOrder(e){this.set(hj.RENDER_ORDER,e)}setStyle(e){this.style_=e===void 0?Aee:e;const t=xve(e);this.styleFunction_=e===null?void 0:ave(t),this.changed()}setDeclutter(e){this.declutter_=e?String(e):void 0,this.changed()}}function xve(n){if(n===void 0)return Aee;if(!n)return null;if(typeof n=="function"||n instanceof Hd)return n;if(!Array.isArray(n))return lj([n]);if(n.length===0)return[];const e=n.length,t=n[0];if(t instanceof Hd){const r=new Array(e);for(let o=0;o<e;++o){const s=n[o];if(!(s instanceof Hd))throw new Error("Expected a list of style instances");r[o]=s}return r}if("style"in t){const r=new Array(e);for(let o=0;o<e;++o){const s=n[o];if(!("style"in s))throw new Error("Expected a list of rules with a style property");r[o]=s}return cve(r)}return lj(n)}class yee extends ym{constructor(e,t,i,r){super(e),this.inversePixelTransform=t,this.frameState=i,this.context=r}}class Mve extends N4{constructor(e){super(),this.map_=e}dispatchRenderEvent(e,t){Dr()}calculateMatrices2D(e){const t=e.viewState,i=e.coordinateToPixelTransform,r=e.pixelToCoordinateTransform;Fg(i,e.size[0]/2,e.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]),PJ(r,i)}forEachFeatureAtCoordinate(e,t,i,r,o,s,a,c){let A;const m=t.viewState;function v(H,G,Y,z){return o.call(s,G,H?Y:null,z)}const x=m.projection,_=DP(e.slice(),x),O=[[0,0]];if(x.canWrapX()&&r){const H=x.getExtent(),G=as(H);O.push([-G,0],[G,0])}const P=t.layerStatesArray,F=P.length,j=[],Q=[];for(let H=0;H<O.length;H++)for(let G=F-1;G>=0;--G){const Y=P[G],z=Y.layer;if(z.hasRenderer()&&oU(Y,m)&&a.call(c,z)){const se=z.getRenderer(),le=z.getSource();if(se&&le){const me=le.getWrapX()?_:e,fe=v.bind(null,Y.managed);Q[0]=me[0]+O[H][0],Q[1]=me[1]+O[H][1],A=se.forEachFeatureAtCoordinate(Q,t,i,fe,j)}if(A)return A}}if(j.length===0)return;const V=1/j.length;return j.forEach((H,G)=>H.distanceSq+=G*V),j.sort((H,G)=>H.distanceSq-G.distanceSq),j.some(H=>A=H.callback(H.feature,H.layer,H.geometry)),A}hasFeatureAtCoordinate(e,t,i,r,o,s){return this.forEachFeatureAtCoordinate(e,t,i,r,L3,this,o,s)!==void 0}getMap(){return this.map_}renderFrame(e){Dr()}scheduleExpireIconCache(e){Zf.canExpireCache()&&e.postRenderFunctions.push(wve)}}function wve(n,e){Zf.expire()}class Sve extends Mve{constructor(e){super(e),this.fontChangeListenerKey_=Zo($v,tx.PROPERTYCHANGE,e.redrawText,e),this.element_=document.createElement("div");const t=this.element_.style;t.position="absolute",t.width="100%",t.height="100%",t.zIndex="0",this.element_.className=KE+" ol-layers";const i=e.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(e,t){const i=this.getMap();if(i.hasListener(e)){const r=new yee(e,void 0,t);i.dispatchEvent(r)}}disposeInternal(){Ea(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(e){if(!e){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(e),this.dispatchRenderEvent(Hf.PRECOMPOSE,e);const t=e.layerStatesArray.sort((a,c)=>a.zIndex-c.zIndex);t.some(a=>a.layer instanceof dU&&a.layer.getDeclutter())&&(e.declutter={});const r=e.viewState;this.children_.length=0;const o=[];let s=null;for(let a=0,c=t.length;a<c;++a){const A=t[a];e.layerIndex=a;const m=A.layer,v=m.getSourceState();if(!oU(A,r)||v!="ready"&&v!="undefined"){m.unrender();continue}const x=m.render(e,s);x&&(x!==s&&(this.children_.push(x),s=x),o.push(A))}this.declutter(e,o),U1e(this.element_,this.children_),this.dispatchRenderEvent(Hf.POSTCOMPOSE,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}declutter(e,t){if(e.declutter){for(let i=t.length-1;i>=0;--i){const r=t[i],o=r.layer;o.getDeclutter()&&o.renderDeclutter(e,r)}t.forEach(i=>i.layer.renderDeferred(e))}}}function vee(n){if(n instanceof Bx){n.setMapInternal(null);return}n instanceof Ox&&n.getLayers().forEach(vee)}function bee(n,e){if(n instanceof Bx){n.setMapInternal(e);return}if(n instanceof Ox){const t=n.getLayers().getArray();for(let i=0,r=t.length;i<r;++i)bee(t[i],e)}}let NE=class extends vm{constructor(e){super(),e=e||{},this.on,this.once,this.un;const t=Eve(e);this.renderComplete_=!1,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=e.maxTilesLoading!==void 0?e.maxTilesLoading:16,this.pixelRatio_=e.pixelRatio!==void 0?e.pixelRatio:o0e,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=td(),this.pixelToCoordinateTransform_=td(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=e.moveTolerance,this.keyboardEventTarget_=t.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver(()=>this.updateSize()),this.controls=t.controls||z1e(),this.interactions=t.interactions||lye({onFocusOnly:!0}),this.overlays_=t.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new gJ(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(kA.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(kA.VIEW,this.handleViewChanged_),this.addChangeListener(kA.SIZE,this.handleSizeChanged_),this.addChangeListener(kA.TARGET,this.handleTargetChanged_),this.setProperties(t.values);const i=this;e.view&&!(e.view instanceof im)&&e.view.then(function(r){i.setView(new im(r))}),this.controls.addEventListener(Yh.ADD,r=>{r.element.setMap(this)}),this.controls.addEventListener(Yh.REMOVE,r=>{r.element.setMap(null)}),this.interactions.addEventListener(Yh.ADD,r=>{r.element.setMap(this)}),this.interactions.addEventListener(Yh.REMOVE,r=>{r.element.setMap(null)}),this.overlays_.addEventListener(Yh.ADD,r=>{this.addOverlayInternal_(r.element)}),this.overlays_.addEventListener(Yh.REMOVE,r=>{const o=r.element.getId();o!==void 0&&delete this.overlayIdIndex_[o.toString()],r.element.setMap(null)}),this.controls.forEach(r=>{r.setMap(this)}),this.interactions.forEach(r=>{r.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(e){this.getControls().push(e)}addInteraction(e){this.getInteractions().push(e)}addLayer(e){this.getLayerGroup().getLayers().push(e)}handleLayerAdd_(e){bee(e.layer,this)}addOverlay(e){this.getOverlays().push(e)}addOverlayInternal_(e){const t=e.getId();t!==void 0&&(this.overlayIdIndex_[t.toString()]=e),e.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(e,t,i){if(!this.frameState_||!this.renderer_)return;const r=this.getCoordinateFromPixelInternal(e);i=i!==void 0?i:{};const o=i.hitTolerance!==void 0?i.hitTolerance:0,s=i.layerFilter!==void 0?i.layerFilter:L3,a=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,o,a,t,null,s,null)}getFeaturesAtPixel(e,t){const i=[];return this.forEachFeatureAtPixel(e,function(r){i.push(r)},t),i}getAllLayers(){const e=[];function t(i){i.forEach(function(r){r instanceof Ox?t(r.getLayers()):e.push(r)})}return t(this.getLayers()),e}hasFeatureAtPixel(e,t){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(e);t=t!==void 0?t:{};const r=t.layerFilter!==void 0?t.layerFilter:L3,o=t.hitTolerance!==void 0?t.hitTolerance:0,s=t.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,o,s,r,null)}getEventCoordinate(e){return this.getCoordinateFromPixel(this.getEventPixel(e))}getEventCoordinateInternal(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))}getEventPixel(e){const i=this.viewport_.getBoundingClientRect(),r=this.getSize(),o=i.width/r[0],s=i.height/r[1],a="changedTouches"in e?e.changedTouches[0]:e;return[(a.clientX-i.left)/o,(a.clientY-i.top)/s]}getTarget(){return this.get(kA.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return j9(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const t=this.frameState_;return t?Du(t.pixelToCoordinateTransform,e.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(e){const t=this.overlayIdIndex_[e.toString()];return t!==void 0?t:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(kA.LAYERGROUP)}setLayers(e){const t=this.getLayerGroup();if(e instanceof _g){t.setLayers(e);return}const i=t.getLayers();i.clear(),i.extend(e)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const e=this.getLayerGroup().getLayerStatesArray();for(let t=0,i=e.length;t<i;++t){const r=e[t];if(!r.visible)continue;const o=r.layer.getRenderer();if(o&&!o.ready)return!0;const s=r.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(e){const t=K0(e,this.getView().getProjection());return this.getPixelFromCoordinateInternal(t)}getPixelFromCoordinateInternal(e){const t=this.frameState_;return t?Du(t.coordinateToPixelTransform,e.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(kA.SIZE)}getView(){return this.get(kA.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const e=this.getTargetElement();return e?e.ownerDocument:document}getTilePriority(e,t,i,r){return u0e(this.frameState_,e,t,i,r)}handleBrowserEvent(e,t){t=t||e.type;const i=new my(t,this,e);this.handleMapBrowserEvent(i)}handleMapBrowserEvent(e){if(!this.frameState_)return;const t=e.originalEvent,i=t.type;if(i===k9.POINTERDOWN||i===Ir.WHEEL||i===Ir.KEYDOWN){const r=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():r,s=t.target,a=o instanceof ShadowRoot?o.host===s?o.host.ownerDocument:o:o===r?r.documentElement:o;if(this.overlayContainerStopEvent_.contains(s)||!a.contains(s))return}if(e.frameState=this.frameState_,this.dispatchEvent(e)!==!1){const r=this.getInteractions().getArray().slice();for(let o=r.length-1;o>=0;o--){const s=r[o];if(s.getMap()!==this||!s.getActive()||!this.getTargetElement())continue;if(!s.handleEvent(e)||e.propagationStopped)break}}}handlePostRender(){const e=this.frameState_,t=this.tileQueue_;if(!t.isEmpty()){let r=this.maxTilesLoading_,o=r;if(e){const s=e.viewHints;if(s[sl.ANIMATING]||s[sl.INTERACTING]){const a=Date.now()-e.time>8;r=a?0:8,o=a?0:2}}t.getTilesLoading()<r&&(t.reprioritize(),t.loadMoreTiles(r,o))}e&&this.renderer_&&!e.animate&&(this.renderComplete_?(this.hasListener(Hf.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(Hf.RENDERCOMPLETE,e),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new A_(L0.LOADEND,this,e)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new A_(L0.LOADSTART,this,e))));const i=this.postRenderFunctions_;if(e)for(let r=0,o=i.length;r<o;++r)i[r](this,e);i.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let i=0,r=this.targetChangeHandlerKeys_.length;i<r;++i)Ea(this.targetChangeHandlerKeys_[i]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(Ir.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(Ir.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,this.viewport_.remove()}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const i=this.targetElement_.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.unobserve(i.host),this.setSize(void 0)}const e=this.getTarget(),t=typeof e=="string"?document.getElementById(e):e;if(this.targetElement_=t,!t)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{t.appendChild(this.viewport_),this.renderer_||(this.renderer_=new Sve(this)),this.mapBrowserEventHandler_=new a0e(this,this.moveTolerance_);for(const o in jl)this.mapBrowserEventHandler_.addEventListener(jl[o],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(Ir.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(Ir.WHEEL,this.boundHandleBrowserEvent_,mJ?{passive:!1}:!1);let i;if(this.keyboardEventTarget_)i=this.keyboardEventTarget_;else{const o=t.getRootNode();i=o instanceof ShadowRoot?o.host:t}this.targetChangeHandlerKeys_=[Zo(i,Ir.KEYDOWN,this.handleBrowserEvent,this),Zo(i,Ir.KEYPRESS,this.handleBrowserEvent,this)];const r=t.getRootNode();r instanceof ShadowRoot&&this.resizeObserver_.observe(r.host),this.resizeObserver_.observe(t)}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(Ea(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Ea(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const e=this.getView();e&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=Zo(e,tx.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=Zo(e,Ir.CHANGE,this.handleViewPropertyChanged_,this),e.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Ea),this.layerGroupPropertyListenerKeys_=null);const e=this.getLayerGroup();e&&(this.handleLayerAdd_(new yy("addlayer",e)),this.layerGroupPropertyListenerKeys_=[Zo(e,tx.PROPERTYCHANGE,this.render,this),Zo(e,Ir.CHANGE,this.render,this),Zo(e,"addlayer",this.handleLayerAdd_,this),Zo(e,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){if(!this.frameState_)return;const e=this.frameState_.layerStatesArray;for(let t=0,i=e.length;t<i;++t){const r=e[t].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(e){return this.getControls().remove(e)}removeInteraction(e){return this.getInteractions().remove(e)}removeLayer(e){return this.getLayerGroup().getLayers().remove(e)}handleLayerRemove_(e){vee(e.layer)}removeOverlay(e){return this.getOverlays().remove(e)}renderFrame_(e){const t=this.getSize(),i=this.getView(),r=this.frameState_;let o=null;if(t!==void 0&&ej(t)&&i&&i.isDef()){const s=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=i.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutter:null,extent:zw(a.center,a.resolution,a.rotation,t),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:t,tileQueue:this.tileQueue_,time:e,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{},mapId:$r(this),renderTargets:{}},a.nextCenter&&a.nextResolution){const c=isNaN(a.nextRotation)?a.rotation:a.nextRotation;o.nextExtent=zw(a.nextCenter,a.nextResolution,c,t)}}this.frameState_=o,this.renderer_.renderFrame(o),o&&(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),r&&(!this.previousExtent_||!Fb(this.previousExtent_)&&!J0(o.extent,this.previousExtent_))&&(this.dispatchEvent(new A_(L0.MOVESTART,this,r)),this.previousExtent_=Sx(this.previousExtent_)),this.previousExtent_&&!o.viewHints[sl.ANIMATING]&&!o.viewHints[sl.INTERACTING]&&!J0(o.extent,this.previousExtent_)&&(this.dispatchEvent(new A_(L0.MOVEEND,this,o)),yJ(o.extent,this.previousExtent_))),this.dispatchEvent(new A_(L0.POSTRENDER,this,o)),this.renderComplete_=(this.hasListener(L0.LOADSTART)||this.hasListener(L0.LOADEND)||this.hasListener(Hf.RENDERCOMPLETE))&&!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady(),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(e){const t=this.getLayerGroup();t&&this.handleLayerRemove_(new yy("removelayer",t)),this.set(kA.LAYERGROUP,e)}setSize(e){this.set(kA.SIZE,e)}setTarget(e){this.set(kA.TARGET,e)}setView(e){if(!e||e instanceof im){this.set(kA.VIEW,e);return}this.set(kA.VIEW,new im);const t=this;e.then(function(i){t.setView(new im(i))})}updateSize(){const e=this.getTargetElement();let t;if(e){const r=getComputedStyle(e),o=e.offsetWidth-parseFloat(r.borderLeftWidth)-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight)-parseFloat(r.borderRightWidth),s=e.offsetHeight-parseFloat(r.borderTopWidth)-parseFloat(r.paddingTop)-parseFloat(r.paddingBottom)-parseFloat(r.borderBottomWidth);!isNaN(o)&&!isNaN(s)&&(t=[Math.max(0,o),Math.max(0,s)],!ej(t)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&EJ("No map visible because the map container's width or height are 0."))}const i=this.getSize();t&&(!i||!tv(t,i))&&(this.setSize(t),this.updateViewportSize_(t))}updateViewportSize_(e){const t=this.getView();t&&t.setViewportSize(e)}};function Eve(n){let e=null;n.keyboardEventTarget!==void 0&&(e=typeof n.keyboardEventTarget=="string"?document.getElementById(n.keyboardEventTarget):n.keyboardEventTarget);const t={},i=n.layers&&typeof n.layers.getLayers=="function"?n.layers:new Ox({layers:n.layers});t[kA.LAYERGROUP]=i,t[kA.TARGET]=n.target,t[kA.VIEW]=n.view instanceof im?n.view:new im;let r;n.controls!==void 0&&(Array.isArray(n.controls)?r=new _g(n.controls.slice()):(Os(typeof n.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),r=n.controls));let o;n.interactions!==void 0&&(Array.isArray(n.interactions)?o=new _g(n.interactions.slice()):(Os(typeof n.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),o=n.interactions));let s;return n.overlays!==void 0?Array.isArray(n.overlays)?s=new _g(n.overlays.slice()):(Os(typeof n.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),s=n.overlays):s=new _g,{controls:r,interactions:o,keyboardEventTarget:e,overlays:s,values:t}}class GE extends vm{constructor(e){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),e)if(typeof e.getSimplifiedGeometry=="function"){const t=e;this.setGeometry(t)}else{const t=e;this.setProperties(t)}}clone(){const e=new GE(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());const t=this.getGeometry();t&&e.setGeometry(t.clone());const i=this.getStyle();return i&&e.setStyle(i),e}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(Ea(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=Zo(e,Ir.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?Ove(e):void 0,this.changed()}setId(e){this.id_=e,this.changed()}setGeometryName(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function Ove(n){if(typeof n=="function")return n;let e;return Array.isArray(n)?e=n:(Os(typeof n.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[n]),function(){return e}}function Cee(n,e,t,i){const r=[];let o=rp();for(let s=0,a=t.length;s<a;++s){const c=t[s];o=TP(n,e,c[0],i),r.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=c[c.length-1]}return r}function Vw(n,e,t,i,r,o,s){let a,c;const A=(t-e)/i;if(A===1)a=e;else if(A===2)a=e,c=r;else if(A!==0){let m=n[e],v=n[e+1],x=0;const _=[0];for(let F=e+i;F<t;F+=i){const j=n[F],Q=n[F+1];x+=Math.sqrt((j-m)*(j-m)+(Q-v)*(Q-v)),_.push(x),m=j,v=Q}const O=r*x,P=Zge(_,O);P<0?(c=(O-_[-P-2])/(_[-P-1]-_[-P-2]),a=e+(-P-2)*i):a=e+P*i}s=s>1?s:2,o=o||new Array(s);for(let m=0;m<s;++m)o[m]=a===void 0?NaN:c===void 0?n[a+m]:Vd(n[a+m],n[a+i+m],c);return o}function H9(n,e,t,i,r,o){if(t==e)return null;let s;if(r<n[e+i-1])return o?(s=n.slice(e,e+i),s[i-1]=r,s):null;if(n[t-1]<r)return o?(s=n.slice(t-i,t),s[i-1]=r,s):null;if(r==n[e+i-1])return n.slice(e,e+i);let a=e/i,c=t/i;for(;a<c;){const x=a+c>>1;r<n[(x+1)*i-1]?c=x:a=x+1}const A=n[a*i-1];if(r==A)return n.slice((a-1)*i,(a-1)*i+i);const m=n[(a+1)*i-1],v=(r-A)/(m-A);s=[];for(let x=0;x<i-1;++x)s.push(Vd(n[(a-1)*i+x],n[a*i+x],v));return s.push(r),s}function Bve(n,e,t,i,r,o,s){if(s)return H9(n,e,t[t.length-1],i,r,o);let a;if(r<n[i-1])return o?(a=n.slice(0,i),a[i-1]=r,a):null;if(n[n.length-1]<r)return o?(a=n.slice(n.length-i),a[i-1]=r,a):null;for(let c=0,A=t.length;c<A;++c){const m=t[c];if(e!=m){if(r<n[e+i-1])return null;if(r<=n[m-1])return H9(n,e,m,i,r,!1);e=m}}return null}class Hw extends KJ{constructor(e){super(),this.geometries_=e,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Ea),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const e=this.geometries_;for(let t=0,i=e.length;t<i;++t)this.changeEventsKeys_.push(Zo(e[t],Ir.CHANGE,this.changed,this))}clone(){const e=new Hw(eB(this.geometries_));return e.applyProperties(this),e}closestPointXY(e,t,i,r){if(r<Lb(this.getExtent(),e,t))return r;const o=this.geometries_;for(let s=0,a=o.length;s<a;++s)r=o[s].closestPointXY(e,t,i,r);return r}containsXY(e,t){const i=this.geometries_;for(let r=0,o=i.length;r<o;++r)if(i[r].containsXY(e,t))return!0;return!1}computeExtent(e){Sx(e);const t=this.geometries_;for(let i=0,r=t.length;i<r;++i)bJ(e,t[i].getExtent());return e}getGeometries(){return eB(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let e=[];const t=this.geometries_;for(let i=0,r=t.length;i<r;++i)t[i].getType()===this.getType()?e=e.concat(t[i].getGeometriesArrayRecursive()):e.push(t[i]);return e}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=[],i=this.geometries_;let r=!1;for(let o=0,s=i.length;o<s;++o){const a=i[o],c=a.getSimplifiedGeometry(e);t.push(c),c!==a&&(r=!0)}return r?new Hw(t):(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getType(){return"GeometryCollection"}intersectsExtent(e){const t=this.geometries_;for(let i=0,r=t.length;i<r;++i)if(t[i].intersectsExtent(e))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(e,t){const i=this.geometries_;for(let r=0,o=i.length;r<o;++r)i[r].rotate(e,t);this.changed()}scale(e,t,i){i||(i=lf(this.getExtent()));const r=this.geometries_;for(let o=0,s=r.length;o<s;++o)r[o].scale(e,t,i);this.changed()}setGeometries(e){this.setGeometriesArray(eB(e))}setGeometriesArray(e){this.unlistenGeometriesChange_(),this.geometries_=e,this.listenGeometriesChange_(),this.changed()}applyTransform(e){const t=this.geometries_;for(let i=0,r=t.length;i<r;++i)t[i].applyTransform(e);this.changed()}translate(e,t){const i=this.geometries_;for(let r=0,o=i.length;r<o;++r)i[r].translate(e,t);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function eB(n){return n.map(e=>e.clone())}function fU(n,e,t,i){let r=n[e],o=n[e+1],s=0;for(let a=e+i;a<t;a+=i){const c=n[a],A=n[a+1];s+=Math.sqrt((c-r)*(c-r)+(A-o)*(A-o)),r=c,o=A}return s}class Bb extends zb{constructor(e,t){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,t!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendCoordinate(e){Ug(this.flatCoordinates,e),this.changed()}clone(){const e=new Bb(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,i,r){return r<Lb(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(NP(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),WP(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,i,r))}forEachSegment(e){return GJ(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinateAtM(e,t){return this.layout!="XYM"&&this.layout!="XYZM"?null:(t=t!==void 0?t:!1,H9(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t))}getCoordinates(){return By(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(e,t){return Vw(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,this.stride)}getLength(){return fU(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(e){const t=[];return t.length=PE(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new Bb(t,"XY")}getType(){return"LineString"}intersectsExtent(e){return UE(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,this.getExtent())}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=DE(this.flatCoordinates,0,e,this.stride),this.changed()}}class H3 extends zb{constructor(e,t,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(e[0]))this.setCoordinates(e,t);else if(t!==void 0&&i)this.setFlatCoordinates(t,e),this.ends_=i;else{const r=e,o=[],s=[];for(let c=0,A=r.length;c<A;++c){const m=r[c];Ug(o,m.getFlatCoordinates()),s.push(o.length)}const a=r.length===0?this.getLayout():r[0].getLayout();this.setFlatCoordinates(a,o),this.ends_=s}}appendLineString(e){Ug(this.flatCoordinates,e.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new H3(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,i,r){return r<Lb(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(GP(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),QP(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,i,r))}getCoordinateAtM(e,t,i){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(t=t!==void 0?t:!1,i=i!==void 0?i:!1,Bve(this.flatCoordinates,0,this.ends_,this.stride,e,t,i))}getCoordinates(){return N3(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(e){return e<0||this.ends_.length<=e?null:new Bb(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLineStrings(){const e=this.flatCoordinates,t=this.ends_,i=this.layout,r=[];let o=0;for(let s=0,a=t.length;s<a;++s){const c=t[s],A=new Bb(e.slice(o,c),i);r.push(A),o=c}return r}getLength(){const e=this.ends_;let t=0,i=0;for(let r=0,o=e.length;r<o;++r)i+=fU(this.flatCoordinates,t,e[r],this.stride),t=e[r];return i}getFlatMidpoints(){const e=[],t=this.flatCoordinates;let i=0;const r=this.ends_,o=this.stride;for(let s=0,a=r.length;s<a;++s){const c=r[s],A=Vw(t,i,c,o,.5);Ug(e,A),i=c}return e}getSimplifiedGeometryInternal(e){const t=[],i=[];return t.length=jJ(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,i),new H3(t,"XY",i)}getType(){return"MultiLineString"}intersectsExtent(e){return C1e(this.flatCoordinates,0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=$4(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}}class eM extends zb{constructor(e,t){super(),t&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendPoint(e){Ug(this.flatCoordinates,e.getFlatCoordinates()),this.changed()}clone(){const e=new eM(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,i,r){if(r<Lb(this.getExtent(),e,t))return r;const o=this.flatCoordinates,s=this.stride;for(let a=0,c=o.length;a<c;a+=s){const A=mb(e,t,o[a],o[a+1]);if(A<r){r=A;for(let m=0;m<s;++m)i[m]=o[a+m];i.length=s}}return r}getCoordinates(){return By(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(e){const t=this.flatCoordinates.length/this.stride;return e<0||t<=e?null:new Eb(this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride),this.layout)}getPoints(){const e=this.flatCoordinates,t=this.layout,i=this.stride,r=[];for(let o=0,s=e.length;o<s;o+=i){const a=new Eb(e.slice(o,o+i),t);r.push(a)}return r}getType(){return"MultiPoint"}intersectsExtent(e){const t=this.flatCoordinates,i=this.stride;for(let r=0,o=t.length;r<o;r+=i){const s=t[r],a=t[r+1];if(kP(e,s,a))return!0}return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=DE(this.flatCoordinates,0,e,this.stride),this.changed()}}class Z3 extends zb{constructor(e,t,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(e[0])){const r=e,o=[],s=[];for(let a=0,c=r.length;a<c;++a){const A=r[a],m=o.length,v=A.getEnds();for(let x=0,_=v.length;x<_;++x)v[x]+=m;Ug(o,A.getFlatCoordinates()),s.push(v)}t=r.length===0?this.getLayout():r[0].getLayout(),e=o,i=s}t!==void 0&&i?(this.setFlatCoordinates(t,e),this.endss_=i):this.setCoordinates(e,t)}appendPolygon(e){let t;if(!this.flatCoordinates)this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();else{const i=this.flatCoordinates.length;Ug(this.flatCoordinates,e.getFlatCoordinates()),t=e.getEnds().slice();for(let r=0,o=t.length;r<o;++r)t[r]+=i}this.endss_.push(t),this.changed()}clone(){const e=this.endss_.length,t=new Array(e);for(let r=0;r<e;++r)t[r]=this.endss_[r].slice();const i=new Z3(this.flatCoordinates.slice(),this.layout,t);return i.applyProperties(this),i}closestPointXY(e,t,i,r){return r<Lb(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(f1e(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),p1e(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,t,i,r))}containsXY(e,t){return b1e(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)}getArea(){return d1e(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(e){let t;return e!==void 0?(t=this.getOrientedFlatCoordinates().slice(),G9(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,N9(t,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const e=Cee(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=NJ(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new eM(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;qJ(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=G9(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],i=[];return t.length=y1e(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,i),new Z3(t,"XY",i)}getPolygon(e){if(e<0||this.endss_.length<=e)return null;let t;if(e===0)t=0;else{const o=this.endss_[e-1];t=o[o.length-1]}const i=this.endss_[e].slice(),r=i[i.length-1];if(t!==0)for(let o=0,s=i.length;o<s;++o)i[o]-=t;return new e1(this.flatCoordinates.slice(t,r),this.layout,i)}getPolygons(){const e=this.layout,t=this.flatCoordinates,i=this.endss_,r=[];let o=0;for(let s=0,a=i.length;s<a;++s){const c=i[s].slice(),A=c[c.length-1];if(o!==0)for(let v=0,x=c.length;v<x;++v)c[v]-=o;const m=new e1(t.slice(o,A),e,c);r.push(m),o=A}return r}getType(){return"MultiPolygon"}intersectsExtent(e){return _1e(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);const i=zJ(this.flatCoordinates,0,e,this.stride,this.endss_);if(i.length===0)this.flatCoordinates.length=0;else{const r=i[i.length-1];this.flatCoordinates.length=r.length===0?0:r[r.length-1]}this.changed()}}const dj=td();class DA{constructor(e,t,i,r,o,s){this.styleFunction,this.extent_,this.id_=s,this.type_=e,this.flatCoordinates_=t,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=o,this.squaredTolerance_,this.stride_=r,this.simplifiedGeometry_}get(e){return this.properties_[e]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?vJ(this.flatCoordinates_):TP(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const e=lf(this.getExtent());this.flatInteriorPoints_=$P(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const e=YJ(this.flatCoordinates_,this.ends_),t=Cee(this.flatCoordinates_,0,e,2);this.flatInteriorPoints_=NJ(this.flatCoordinates_,0,e,2,t)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=Vw(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const e=this.flatCoordinates_;let t=0;const i=this.ends_;for(let r=0,o=i.length;r<o;++r){const s=i[r],a=Vw(e,t,s,2,.5);Ug(this.flatMidpoints_,a),t=s}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(e){return this}simplifyTransformed(e,t){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(e){e=Xs(e);const t=e.getExtent(),i=e.getWorldExtent();if(t&&i){const r=Ku(i)/Ku(t);Fg(dj,i[0],i[3],r,-r,0,0,0),Gy(this.flatCoordinates_,0,this.flatCoordinates_.length,2,dj,this.flatCoordinates_)}}applyTransform(e){e(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){return new DA(this.type_,this.flatCoordinates_.slice(),this.ends_?.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=dJ((e,t)=>{if(e===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),t&&this.simplifiedGeometry_.applyTransform(t);const i=this.simplifiedGeometry_.getFlatCoordinates();let r;switch(this.type_){case"LineString":i.length=PE(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,e,i,0),r=[i.length];break;case"MultiLineString":r=[],i.length=jJ(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,e,i,0,r);break;case"Polygon":r=[],i.length=qP(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(e),i,0,r);break}return r&&(this.simplifiedGeometry_=new DA(this.type_,i,r,2,this.properties_,this.id_)),this.squaredTolerance_=e,this.simplifiedGeometry_}),this}}DA.prototype.getFlatCoordinates=DA.prototype.getOrientedFlatCoordinates;class _ee{drawCustom(e,t,i,r,o){}drawGeometry(e){}setStyle(e){}drawCircle(e,t,i){}drawFeature(e,t,i){}drawGeometryCollection(e,t,i){}drawLineString(e,t,i){}drawMultiLineString(e,t,i){}drawMultiPoint(e,t,i){}drawMultiPolygon(e,t,i){}drawPoint(e,t,i){}drawPolygon(e,t,i){}drawText(e,t,i){}setFillStrokeStyle(e,t){}setImageStyle(e,t){}setTextStyle(e,t){}}class Ive extends _ee{constructor(e,t,i,r,o,s,a){super(),this.context_=e,this.pixelRatio_=t,this.extent_=i,this.transform_=r,this.transformRotation_=r?SE(Math.atan2(r[1],r[0]),10):0,this.viewRotation_=o,this.squaredTolerance_=s,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=td()}drawImages_(e,t,i,r){if(!this.image_)return;const o=Gy(e,t,i,r,this.transform_,this.pixelCoordinates_),s=this.context_,a=this.tmpLocalTransform_,c=s.globalAlpha;this.imageOpacity_!=1&&(s.globalAlpha=c*this.imageOpacity_);let A=this.imageRotation_;this.transformRotation_===0&&(A-=this.viewRotation_),this.imageRotateWithView_&&(A+=this.viewRotation_);for(let m=0,v=o.length;m<v;m+=2){const x=o[m]-this.imageAnchorX_,_=o[m+1]-this.imageAnchorY_;if(A!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const O=x+this.imageAnchorX_,P=_+this.imageAnchorY_;Fg(a,O,P,1,1,A,-O,-P),s.save(),s.transform.apply(s,a),s.translate(O,P),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.restore()}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,x,_,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(s.globalAlpha=c)}drawText_(e,t,i,r){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const o=Gy(e,t,i,r,this.transform_,this.pixelCoordinates_),s=this.context_;let a=this.textRotation_;for(this.transformRotation_===0&&(a-=this.viewRotation_),this.textRotateWithView_&&(a+=this.viewRotation_);t<i;t+=r){const c=o[t]+this.textOffsetX_,A=o[t+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(s.save(),s.translate(c-this.textOffsetX_,A-this.textOffsetY_),s.rotate(a),s.translate(this.textOffsetX_,this.textOffsetY_),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.restore()):(this.textStrokeState_&&s.strokeText(this.text_,c,A),this.textFillState_&&s.fillText(this.text_,c,A))}}moveToLineTo_(e,t,i,r,o){const s=this.context_,a=Gy(e,t,i,r,this.transform_,this.pixelCoordinates_);s.moveTo(a[0],a[1]);let c=a.length;o&&(c-=2);for(let A=2;A<c;A+=2)s.lineTo(a[A],a[A+1]);return o&&s.closePath(),i}drawRings_(e,t,i,r){for(let o=0,s=i.length;o<s;++o)t=this.moveToLineTo_(e,t,i[o],r,!0);return t}drawCircle(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Gl(this.extent_,e.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=h1e(e,this.transform_,this.pixelCoordinates_),i=t[2]-t[0],r=t[3]-t[1],o=Math.sqrt(i*i+r*r),s=this.context_;s.beginPath(),s.arc(t[0],t[1],o,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}this.text_!==""&&this.drawText_(e.getCenter(),0,2,2)}}setStyle(e){this.setFillStrokeStyle(e.getFill(),e.getStroke()),this.setImageStyle(e.getImage()),this.setTextStyle(e.getText())}setTransform(e){this.transform_=e}drawGeometry(e){switch(e.getType()){case"Point":this.drawPoint(e);break;case"LineString":this.drawLineString(e);break;case"Polygon":this.drawPolygon(e);break;case"MultiPoint":this.drawMultiPoint(e);break;case"MultiLineString":this.drawMultiLineString(e);break;case"MultiPolygon":this.drawMultiPolygon(e);break;case"GeometryCollection":this.drawGeometryCollection(e);break;case"Circle":this.drawCircle(e);break}}drawFeature(e,t){const i=t.getGeometryFunction()(e);i&&(this.setStyle(t),this.drawGeometry(i))}drawGeometryCollection(e){const t=e.getGeometriesArray();for(let i=0,r=t.length;i<r;++i)this.drawGeometry(t[i])}drawPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getFlatCoordinates(),i=e.getStride();this.image_&&this.drawImages_(t,0,t.length,i),this.text_!==""&&this.drawText_(t,0,t.length,i)}drawMultiPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getFlatCoordinates(),i=e.getStride();this.image_&&this.drawImages_(t,0,t.length,i),this.text_!==""&&this.drawText_(t,0,t.length,i)}drawLineString(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Gl(this.extent_,e.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const t=this.context_,i=e.getFlatCoordinates();t.beginPath(),this.moveToLineTo_(i,0,i.length,e.getStride(),!1),t.stroke()}if(this.text_!==""){const t=e.getFlatMidpoint();this.drawText_(t,0,2,2)}}}drawMultiLineString(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getExtent();if(Gl(this.extent_,t)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const i=this.context_,r=e.getFlatCoordinates();let o=0;const s=e.getEnds(),a=e.getStride();i.beginPath();for(let c=0,A=s.length;c<A;++c)o=this.moveToLineTo_(r,o,s[c],a,!1);i.stroke()}if(this.text_!==""){const i=e.getFlatMidpoints();this.drawText_(i,0,i.length,2)}}}drawPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Gl(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=this.context_;t.beginPath(),this.drawRings_(e.getOrientedFlatCoordinates(),0,e.getEnds(),e.getStride()),this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(this.text_!==""){const t=e.getFlatInteriorPoint();this.drawText_(t,0,2,2)}}}drawMultiPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Gl(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=this.context_,i=e.getOrientedFlatCoordinates();let r=0;const o=e.getEndss(),s=e.getStride();t.beginPath();for(let a=0,c=o.length;a<c;++a){const A=o[a];r=this.drawRings_(i,r,A,s)}this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(this.text_!==""){const t=e.getFlatInteriorPoints();this.drawText_(t,0,t.length,2)}}}setContextFillState_(e){const t=this.context_,i=this.contextFillState_;i?i.fillStyle!=e.fillStyle&&(i.fillStyle=e.fillStyle,t.fillStyle=e.fillStyle):(t.fillStyle=e.fillStyle,this.contextFillState_={fillStyle:e.fillStyle})}setContextStrokeState_(e){const t=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=e.lineCap&&(i.lineCap=e.lineCap,t.lineCap=e.lineCap),tv(i.lineDash,e.lineDash)||t.setLineDash(i.lineDash=e.lineDash),i.lineDashOffset!=e.lineDashOffset&&(i.lineDashOffset=e.lineDashOffset,t.lineDashOffset=e.lineDashOffset),i.lineJoin!=e.lineJoin&&(i.lineJoin=e.lineJoin,t.lineJoin=e.lineJoin),i.lineWidth!=e.lineWidth&&(i.lineWidth=e.lineWidth,t.lineWidth=e.lineWidth),i.miterLimit!=e.miterLimit&&(i.miterLimit=e.miterLimit,t.miterLimit=e.miterLimit),i.strokeStyle!=e.strokeStyle&&(i.strokeStyle=e.strokeStyle,t.strokeStyle=e.strokeStyle)):(t.lineCap=e.lineCap,t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.miterLimit=e.miterLimit,t.strokeStyle=e.strokeStyle,this.contextStrokeState_={lineCap:e.lineCap,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,lineJoin:e.lineJoin,lineWidth:e.lineWidth,miterLimit:e.miterLimit,strokeStyle:e.strokeStyle})}setContextTextState_(e){const t=this.context_,i=this.contextTextState_,r=e.textAlign?e.textAlign:q3;i?(i.font!=e.font&&(i.font=e.font,t.font=e.font),i.textAlign!=r&&(i.textAlign=r,t.textAlign=r),i.textBaseline!=e.textBaseline&&(i.textBaseline=e.textBaseline,t.textBaseline=e.textBaseline)):(t.font=e.font,t.textAlign=r,t.textBaseline=e.textBaseline,this.contextTextState_={font:e.font,textAlign:r,textBaseline:e.textBaseline})}setFillStrokeStyle(e,t){if(!e)this.fillState_=null;else{const i=e.getColor();this.fillState_={fillStyle:wg(i||Vh)}}if(!t)this.strokeState_=null;else{const i=t.getColor(),r=t.getLineCap(),o=t.getLineDash(),s=t.getLineDashOffset(),a=t.getLineJoin(),c=t.getWidth(),A=t.getMiterLimit(),m=o||Y0;this.strokeState_={lineCap:r!==void 0?r:ox,lineDash:this.pixelRatio_===1?m:m.map(v=>v*this.pixelRatio_),lineDashOffset:(s||$0)*this.pixelRatio_,lineJoin:a!==void 0?a:sx,lineWidth:(c!==void 0?c:Y3)*this.pixelRatio_,miterLimit:A!==void 0?A:W3,strokeStyle:wg(i||Q3)}}}setImageStyle(e){let t;if(!e||!(t=e.getSize())){this.image_=null;return}const i=e.getPixelRatio(this.pixelRatio_),r=e.getAnchor(),o=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=r[0]*i,this.imageAnchorY_=r[1]*i,this.imageHeight_=t[1]*i,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=o[0],this.imageOriginY_=o[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();const s=e.getScaleArray();this.imageScale_=[s[0]*this.pixelRatio_/i,s[1]*this.pixelRatio_/i],this.imageWidth_=t[0]*i}setTextStyle(e){if(!e)this.text_="";else{const t=e.getFill();if(!t)this.textFillState_=null;else{const _=t.getColor();this.textFillState_={fillStyle:wg(_||Vh)}}const i=e.getStroke();if(!i)this.textStrokeState_=null;else{const _=i.getColor(),O=i.getLineCap(),P=i.getLineDash(),F=i.getLineDashOffset(),j=i.getLineJoin(),Q=i.getWidth(),V=i.getMiterLimit();this.textStrokeState_={lineCap:O!==void 0?O:ox,lineDash:P||Y0,lineDashOffset:F||$0,lineJoin:j!==void 0?j:sx,lineWidth:Q!==void 0?Q:Y3,miterLimit:V!==void 0?V:W3,strokeStyle:wg(_||Q3)}}const r=e.getFont(),o=e.getOffsetX(),s=e.getOffsetY(),a=e.getRotateWithView(),c=e.getRotation(),A=e.getScaleArray(),m=e.getText(),v=e.getTextAlign(),x=e.getTextBaseline();this.textState_={font:r!==void 0?r:lee,textAlign:v!==void 0?v:q3,textBaseline:x!==void 0?x:qw},this.text_=m!==void 0?Array.isArray(m)?m.reduce((_,O,P)=>_+=P%2?" ":O,""):m:"",this.textOffsetX_=o!==void 0?this.pixelRatio_*o:0,this.textOffsetY_=s!==void 0?this.pixelRatio_*s:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=c!==void 0?c:0,this.textScale_=[this.pixelRatio_*A[0],this.pixelRatio_*A[1]]}}}const kve=.5,xee={Point:Fve,LineString:Uve,Polygon:jve,MultiPoint:zve,MultiLineString:Kve,MultiPolygon:Lve,GeometryCollection:Pve,Circle:Rve};function Tve(n,e){return parseInt($r(n),10)-parseInt($r(e),10)}function Z9(n,e){const t=Mee(n,e);return t*t}function Mee(n,e){return kve*n/e}function Rve(n,e,t,i,r){const o=t.getFill(),s=t.getStroke();if(o||s){const c=n.getBuilder(t.getZIndex(),"Circle");c.setFillStrokeStyle(o,s),c.drawCircle(e,i,r)}const a=t.getText();if(a&&a.getText()){const c=n.getBuilder(t.getZIndex(),"Text");c.setTextStyle(a),c.drawText(e,i)}}function Zw(n,e,t,i,r,o,s,a){const c=[],A=t.getImage();if(A){let x=!0;const _=A.getImageState();_==zi.LOADED||_==zi.ERROR?x=!1:_==zi.IDLE&&A.load(),x&&c.push(A.ready())}const m=t.getFill();m&&m.loading()&&c.push(m.ready());const v=c.length>0;return v&&Promise.all(c).then(()=>r(null)),Dve(n,e,t,i,o,s,a),v}function Dve(n,e,t,i,r,o,s){const a=t.getGeometryFunction()(e);if(!a)return;const c=a.simplifyTransformed(i,r);if(t.getRenderer())wee(n,c,t,e,s);else{const m=xee[c.getType()];m(n,c,t,e,s,o)}}function wee(n,e,t,i,r){if(e.getType()=="GeometryCollection"){const s=e.getGeometries();for(let a=0,c=s.length;a<c;++a)wee(n,s[a],t,i,r);return}n.getBuilder(t.getZIndex(),"Default").drawCustom(e,i,t.getRenderer(),t.getHitDetectionRenderer(),r)}function Pve(n,e,t,i,r,o){const s=e.getGeometriesArray();let a,c;for(a=0,c=s.length;a<c;++a){const A=xee[s[a].getType()];A(n,s[a],t,i,r,o)}}function Uve(n,e,t,i,r){const o=t.getStroke();if(o){const a=n.getBuilder(t.getZIndex(),"LineString");a.setFillStrokeStyle(null,o),a.drawLineString(e,i,r)}const s=t.getText();if(s&&s.getText()){const a=n.getBuilder(t.getZIndex(),"Text");a.setTextStyle(s),a.drawText(e,i,r)}}function Kve(n,e,t,i,r){const o=t.getStroke();if(o){const a=n.getBuilder(t.getZIndex(),"LineString");a.setFillStrokeStyle(null,o),a.drawMultiLineString(e,i,r)}const s=t.getText();if(s&&s.getText()){const a=n.getBuilder(t.getZIndex(),"Text");a.setTextStyle(s),a.drawText(e,i,r)}}function Lve(n,e,t,i,r){const o=t.getFill(),s=t.getStroke();if(s||o){const c=n.getBuilder(t.getZIndex(),"Polygon");c.setFillStrokeStyle(o,s),c.drawMultiPolygon(e,i,r)}const a=t.getText();if(a&&a.getText()){const c=n.getBuilder(t.getZIndex(),"Text");c.setTextStyle(a),c.drawText(e,i,r)}}function Fve(n,e,t,i,r,o){const s=t.getImage(),a=t.getText(),c=a&&a.getText(),A=o&&s&&c?{}:void 0;if(s){if(s.getImageState()!=zi.LOADED)return;const m=n.getBuilder(t.getZIndex(),"Image");m.setImageStyle(s,A),m.drawPoint(e,i,r)}if(c){const m=n.getBuilder(t.getZIndex(),"Text");m.setTextStyle(a,A),m.drawText(e,i,r)}}function zve(n,e,t,i,r,o){const s=t.getImage(),a=s&&s.getOpacity()!==0,c=t.getText(),A=c&&c.getText(),m=o&&a&&A?{}:void 0;if(a){if(s.getImageState()!=zi.LOADED)return;const v=n.getBuilder(t.getZIndex(),"Image");v.setImageStyle(s,m),v.drawMultiPoint(e,i,r)}if(A){const v=n.getBuilder(t.getZIndex(),"Text");v.setTextStyle(c,m),v.drawText(e,i,r)}}function jve(n,e,t,i,r){const o=t.getFill(),s=t.getStroke();if(o||s){const c=n.getBuilder(t.getZIndex(),"Polygon");c.setFillStrokeStyle(o,s),c.drawPolygon(e,i,r)}const a=t.getText();if(a&&a.getText()){const c=n.getBuilder(t.getZIndex(),"Text");c.setTextStyle(a),c.drawText(e,i,r)}}let Nve=!1;function See(n,e,t,i,r,o,s){const a=new XMLHttpRequest;a.open("GET",typeof n=="function"?n(t,i,r):n,!0),e.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=Nve,a.onload=function(c){if(!a.status||a.status>=200&&a.status<300){const A=e.getType();try{let m;A=="text"||A=="json"?m=a.responseText:A=="xml"?m=a.responseXML||a.responseText:A=="arraybuffer"&&(m=a.response),m?o(e.readFeatures(m,{extent:t,featureProjection:r}),e.readProjection(m)):s()}catch{s()}}else s()},a.onerror=s,a.send()}function fj(n,e){return function(t,i,r,o,s){See(n,e,t,i,r,(a,c)=>{this.addFeatures(a),o!==void 0&&o(a)},()=>{this.changed(),s!==void 0&&s()})}}function Gve(n,e){return[[-1/0,-1/0,1/0,1/0]]}function Wve(n,e){return[n]}class pj{constructor(e){this.rbush_=new nee(e),this.items_={}}insert(e,t){const i={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(i),this.items_[$r(t)]=i}load(e,t){const i=new Array(t.length);for(let r=0,o=t.length;r<o;r++){const s=e[r],a=t[r],c={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};i[r]=c,this.items_[$r(a)]=c}this.rbush_.load(i)}remove(e){const t=$r(e),i=this.items_[t];return delete this.items_[t],this.rbush_.remove(i)!==null}update(e,t){const i=this.items_[$r(t)],r=[i.minX,i.minY,i.maxX,i.maxY];J0(r,e)||(this.remove(t),this.insert(e,t))}getAll(){return this.rbush_.all().map(function(t){return t.value})}getInExtent(e){const t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]};return this.rbush_.search(t).map(function(r){return r.value})}forEach(e){return this.forEach_(this.getAll(),e)}forEachInExtent(e,t){return this.forEach_(this.getInExtent(e),t)}forEach_(e,t){let i;for(let r=0,o=e.length;r<o;r++)if(i=t(e[r]),i)return i;return i}isEmpty(){return qy(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(e){const t=this.rbush_.toJSON();return X0(t.minX,t.minY,t.maxX,t.maxY,e)}concat(e){this.rbush_.load(e.rbush_.all());for(const t in e.items_)this.items_[t]=e.items_[t]}}class Ix extends vm{constructor(e){super(),this.projection=Xs(e.projection),this.attributions_=mj(e.attributions),this.attributionsCollapsible_=e.attributionsCollapsible??!0,this.loading=!1,this.state_=e.state!==void 0?e.state:"ready",this.wrapX_=e.wrapX!==void 0?e.wrapX:!1,this.interpolate_=!!e.interpolate,this.viewResolver=null,this.viewRejector=null;const t=this;this.viewPromise_=new Promise(function(i,r){t.viewResolver=i,t.viewRejector=r})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(e){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(e){this.attributions_=mj(e),this.changed()}setState(e){this.state_=e,this.changed()}}function mj(n){return n?typeof n=="function"?n:(Array.isArray(n)||(n=[n]),e=>n):null}const zf={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};class uy extends ym{constructor(e,t,i){super(e),this.feature=t,this.features=i}}class V5 extends Ix{constructor(e){e=e||{},super({attributions:e.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:e.wrapX!==void 0?e.wrapX:!0}),this.on,this.once,this.un,this.loader_=F3,this.format_=e.format||null,this.overlaps_=e.overlaps===void 0?!0:e.overlaps,this.url_=e.url,e.loader!==void 0?this.loader_=e.loader:this.url_!==void 0&&(Os(this.format_,"`format` must be set when `url` is set"),this.loader_=fj(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:Gve;const t=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=t?new pj:null,this.loadedExtentsRtree_=new pj,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,r;Array.isArray(e.features)?r=e.features:e.features&&(i=e.features,r=i.getArray()),!t&&i===void 0&&(i=new _g(r)),r!==void 0&&this.addFeaturesInternal(r),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const t=$r(e);if(!this.addToIndex_(t,e)){this.featuresCollection_&&this.featuresCollection_.remove(e);return}this.setupChangeEvents_(t,e);const i=e.getGeometry();if(i){const r=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,e)}else this.nullGeometryFeatures_[t]=e;this.dispatchEvent(new uy(zf.ADDFEATURE,e))}setupChangeEvents_(e,t){t instanceof DA||(this.featureChangeKeys_[e]=[Zo(t,Ir.CHANGE,this.handleFeatureChange_,this),Zo(t,tx.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(e,t){let i=!0;if(t.getId()!==void 0){const r=String(t.getId());if(!(r in this.idIndex_))this.idIndex_[r]=t;else if(t instanceof DA){const o=this.idIndex_[r];o instanceof DA?Array.isArray(o)?o.push(t):this.idIndex_[r]=[o,t]:i=!1}else i=!1}return i&&(Os(!(e in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[e]=t),i}addFeatures(e){this.addFeaturesInternal(e),this.changed()}addFeaturesInternal(e){const t=[],i=[],r=[];for(let o=0,s=e.length;o<s;o++){const a=e[o],c=$r(a);this.addToIndex_(c,a)&&i.push(a)}for(let o=0,s=i.length;o<s;o++){const a=i[o],c=$r(a);this.setupChangeEvents_(c,a);const A=a.getGeometry();if(A){const m=A.getExtent();t.push(m),r.push(a)}else this.nullGeometryFeatures_[c]=a}if(this.featuresRtree_&&this.featuresRtree_.load(t,r),this.hasListener(zf.ADDFEATURE))for(let o=0,s=i.length;o<s;o++)this.dispatchEvent(new uy(zf.ADDFEATURE,i[o]))}bindFeaturesCollection_(e){let t=!1;this.addEventListener(zf.ADDFEATURE,function(i){t||(t=!0,e.push(i.feature),t=!1)}),this.addEventListener(zf.REMOVEFEATURE,function(i){t||(t=!0,e.remove(i.feature),t=!1)}),e.addEventListener(Yh.ADD,i=>{t||(t=!0,this.addFeature(i.element),t=!1)}),e.addEventListener(Yh.REMOVE,i=>{t||(t=!0,this.removeFeature(i.element),t=!1)}),this.featuresCollection_=e}clear(e){if(e){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(Ea);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){this.featuresRtree_.forEach(i=>{this.removeFeatureInternal(i)});for(const i in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const t=new uy(zf.CLEAR);this.dispatchEvent(t),this.changed()}forEachFeature(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureAtCoordinateDirect(e,t){const i=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(i,function(r){const o=r.getGeometry();if(o instanceof DA||o.intersectsCoordinate(e))return t(r)})}forEachFeatureInExtent(e,t){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureIntersectingExtent(e,t){return this.forEachFeatureInExtent(e,function(i){const r=i.getGeometry();if(r instanceof DA||r.intersectsExtent(e)){const o=t(i);if(o)return o}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),qy(this.nullGeometryFeatures_)||Ug(e,Object.values(this.nullGeometryFeatures_))),e}getFeaturesAtCoordinate(e){const t=[];return this.forEachFeatureAtCoordinateDirect(e,function(i){t.push(i)}),t}getFeaturesInExtent(e,t){if(this.featuresRtree_){if(!(t&&t.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);const r=wJ(e,t);return[].concat(...r.map(o=>this.featuresRtree_.getInExtent(o)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,t){const i=e[0],r=e[1];let o=null;const s=[NaN,NaN];let a=1/0;const c=[-1/0,-1/0,1/0,1/0];return t=t||L3,this.featuresRtree_.forEachInExtent(c,function(A){if(t(A)){const m=A.getGeometry(),v=a;if(a=m instanceof DA?0:m.closestPointXY(i,r,s,a),a<v){o=A;const x=Math.sqrt(a);c[0]=i-x,c[1]=r-x,c[2]=i+x,c[3]=r+x}}}),o}getExtent(e){return this.featuresRtree_.getExtent(e)}getFeatureById(e){const t=this.idIndex_[e.toString()];return t!==void 0?t:null}getFeatureByUid(e){const t=this.uidIndex_[e];return t!==void 0?t:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(e){const t=e.target,i=$r(t),r=t.getGeometry();if(!r)i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(t),this.nullGeometryFeatures_[i]=t);else{const s=r.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(s,t)):this.featuresRtree_&&this.featuresRtree_.update(s,t)}const o=t.getId();if(o!==void 0){const s=o.toString();this.idIndex_[s]!==t&&(this.removeFromIdIndex_(t),this.idIndex_[s]=t)}else this.removeFromIdIndex_(t),this.uidIndex_[i]=t;this.changed(),this.dispatchEvent(new uy(zf.CHANGEFEATURE,t))}hasFeature(e){const t=e.getId();return t!==void 0?t in this.idIndex_:$r(e)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&qy(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(e,t,i){const r=this.loadedExtentsRtree_,o=this.strategy_(e,t,i);for(let s=0,a=o.length;s<a;++s){const c=o[s];r.forEachInExtent(c,function(m){return xg(m.extent,c)})||(++this.loadingExtentsCount_,this.dispatchEvent(new uy(zf.FEATURESLOADSTART)),this.loader_.call(this,c,t,i,m=>{--this.loadingExtentsCount_,this.dispatchEvent(new uy(zf.FEATURESLOADEND,void 0,m))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new uy(zf.FEATURESLOADERROR))}),r.insert(c,{extent:c.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(e){const t=this.loadedExtentsRtree_,i=t.forEachInExtent(e,function(r){if(J0(r.extent,e))return r});i&&t.remove(i)}removeFeatures(e){let t=!1;for(let i=0,r=e.length;i<r;++i)t=this.removeFeatureInternal(e[i])||t;t&&this.changed()}removeFeature(e){if(!e)return;this.removeFeatureInternal(e)&&this.changed()}removeFeatureInternal(e){const t=$r(e);if(!(t in this.uidIndex_))return!1;t in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[t]:this.featuresRtree_&&this.featuresRtree_.remove(e),this.featureChangeKeys_[t]?.forEach(Ea),delete this.featureChangeKeys_[t];const r=e.getId();if(r!==void 0){const o=r.toString(),s=this.idIndex_[o];s===e?delete this.idIndex_[o]:Array.isArray(s)&&(s.splice(s.indexOf(e),1),s.length===1&&(this.idIndex_[o]=s[0]))}return delete this.uidIndex_[t],this.hasListener(zf.REMOVEFEATURE)&&this.dispatchEvent(new uy(zf.REMOVEFEATURE,e)),!0}removeFromIdIndex_(e){for(const t in this.idIndex_)if(this.idIndex_[t]===e){delete this.idIndex_[t];break}}setLoader(e){this.loader_=e}setUrl(e){Os(this.format_,"`format` must be set when `url` is set"),this.url_=e,this.setLoader(fj(e,this.format_))}setOverlaps(e){this.overlaps_=e,this.changed()}}const dr={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},QM=[dr.FILL],ky=[dr.STROKE],rb=[dr.BEGIN_PATH],gj=[dr.CLOSE_PATH];class tM extends _ee{constructor(e,t,i,r){super(),this.tolerance=e,this.maxExtent=t,this.pixelRatio=r,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(e){const t=this.pixelRatio;return t==1?e:e.map(function(i){return i*t})}appendFlatPointCoordinates(e,t){const i=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,o=this.coordinates;let s=o.length;for(let a=0,c=e.length;a<c;a+=t)r[0]=e[a],r[1]=e[a+1],Sb(i,r)&&(o[s++]=r[0],o[s++]=r[1]);return s}appendFlatLineCoordinates(e,t,i,r,o,s){const a=this.coordinates;let c=a.length;const A=this.getBufferedMaxExtent();s&&(t+=r);let m=e[t],v=e[t+1];const x=this.tmpCoordinate_;let _=!0,O,P,F;for(O=t+r;O<i;O+=r)x[0]=e[O],x[1]=e[O+1],F=D9(A,x),F!==P?(_&&(a[c++]=m,a[c++]=v,_=!1),a[c++]=x[0],a[c++]=x[1]):F===Dc.INTERSECTING?(a[c++]=x[0],a[c++]=x[1],_=!1):_=!0,m=x[0],v=x[1],P=F;return(o&&_||O===t+r)&&(a[c++]=m,a[c++]=v),c}drawCustomCoordinates_(e,t,i,r,o){for(let s=0,a=i.length;s<a;++s){const c=i[s],A=this.appendFlatLineCoordinates(e,t,c,r,!1,!1);o.push(A),t=c}return t}drawCustom(e,t,i,r,o){this.beginGeometry(e,t,o);const s=e.getType(),a=e.getStride(),c=this.coordinates.length;let A,m,v,x,_;switch(s){case"MultiPolygon":A=e.getOrientedFlatCoordinates(),x=[];const O=e.getEndss();_=0;for(let P=0,F=O.length;P<F;++P){const j=[];_=this.drawCustomCoordinates_(A,_,O[P],a,j),x.push(j)}this.instructions.push([dr.CUSTOM,c,x,e,i,N9,o]),this.hitDetectionInstructions.push([dr.CUSTOM,c,x,e,r||i,N9,o]);break;case"Polygon":case"MultiLineString":v=[],A=s=="Polygon"?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),_=this.drawCustomCoordinates_(A,0,e.getEnds(),a,v),this.instructions.push([dr.CUSTOM,c,v,e,i,N3,o]),this.hitDetectionInstructions.push([dr.CUSTOM,c,v,e,r||i,N3,o]);break;case"LineString":case"Circle":A=e.getFlatCoordinates(),m=this.appendFlatLineCoordinates(A,0,A.length,a,!1,!1),this.instructions.push([dr.CUSTOM,c,m,e,i,By,o]),this.hitDetectionInstructions.push([dr.CUSTOM,c,m,e,r||i,By,o]);break;case"MultiPoint":A=e.getFlatCoordinates(),m=this.appendFlatPointCoordinates(A,a),m>c&&(this.instructions.push([dr.CUSTOM,c,m,e,i,By,o]),this.hitDetectionInstructions.push([dr.CUSTOM,c,m,e,r||i,By,o]));break;case"Point":A=e.getFlatCoordinates(),this.coordinates.push(A[0],A[1]),m=this.coordinates.length,this.instructions.push([dr.CUSTOM,c,m,e,i,void 0,o]),this.hitDetectionInstructions.push([dr.CUSTOM,c,m,e,r||i,void 0,o]);break}this.endGeometry(t)}beginGeometry(e,t,i){this.beginGeometryInstruction1_=[dr.BEGIN_GEOMETRY,t,0,e,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[dr.BEGIN_GEOMETRY,t,0,e,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const e=this.hitDetectionInstructions;e.reverse();let t;const i=e.length;let r,o,s=-1;for(t=0;t<i;++t)r=e[t],o=r[0],o==dr.END_GEOMETRY?s=t:o==dr.BEGIN_GEOMETRY&&(r[2]=t,Jge(this.hitDetectionInstructions,s,t),s=-1)}fillStyleToState(e,t={}){if(e){const i=e.getColor();t.fillPatternScale=i&&typeof i=="object"&&"src"in i?this.pixelRatio:1,t.fillStyle=wg(i||Vh)}else t.fillStyle=void 0;return t}strokeStyleToState(e,t={}){if(e){const i=e.getColor();t.strokeStyle=wg(i||Q3);const r=e.getLineCap();t.lineCap=r!==void 0?r:ox;const o=e.getLineDash();t.lineDash=o?o.slice():Y0;const s=e.getLineDashOffset();t.lineDashOffset=s||$0;const a=e.getLineJoin();t.lineJoin=a!==void 0?a:sx;const c=e.getWidth();t.lineWidth=c!==void 0?c:Y3;const A=e.getMiterLimit();t.miterLimit=A!==void 0?A:W3,t.lineWidth>this.maxLineWidth&&(this.maxLineWidth=t.lineWidth,this.bufferedMaxExtent_=null)}else t.strokeStyle=void 0,t.lineCap=void 0,t.lineDash=null,t.lineDashOffset=void 0,t.lineJoin=void 0,t.lineWidth=void 0,t.miterLimit=void 0;return t}setFillStrokeStyle(e,t){const i=this.state;this.fillStyleToState(e,i),this.strokeStyleToState(t,i)}createFill(e){const t=e.fillStyle,i=[dr.SET_FILL_STYLE,t];return typeof t!="string"&&i.push(e.fillPatternScale),i}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[dr.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,e.lineDash?this.applyPixelRatio(e.lineDash):null,e.lineDashOffset*this.pixelRatio]}updateFillStyle(e,t){const i=e.fillStyle;(typeof i!="string"||e.currentFillStyle!=i)&&(this.instructions.push(t.call(this,e)),e.currentFillStyle=i)}updateStrokeStyle(e,t){const i=e.strokeStyle,r=e.lineCap,o=e.lineDash,s=e.lineDashOffset,a=e.lineJoin,c=e.lineWidth,A=e.miterLimit;(e.currentStrokeStyle!=i||e.currentLineCap!=r||o!=e.currentLineDash&&!tv(e.currentLineDash,o)||e.currentLineDashOffset!=s||e.currentLineJoin!=a||e.currentLineWidth!=c||e.currentMiterLimit!=A)&&(t.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=r,e.currentLineDash=o,e.currentLineDashOffset=s,e.currentLineJoin=a,e.currentLineWidth=c,e.currentMiterLimit=A)}endGeometry(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const t=[dr.END_GEOMETRY,e];this.instructions.push(t),this.hitDetectionInstructions.push(t)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=yJ(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;jy(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class Qve extends tM{constructor(e,t,i,r){super(e,t,i,r),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(e,t,i){if(!this.image_||this.maxExtent&&!Sb(this.maxExtent,e.getFlatCoordinates()))return;this.beginGeometry(e,t,i);const r=e.getFlatCoordinates(),o=e.getStride(),s=this.coordinates.length,a=this.appendFlatPointCoordinates(r,o);this.instructions.push([dr.DRAW_IMAGE,s,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([dr.DRAW_IMAGE,s,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}drawMultiPoint(e,t,i){if(!this.image_)return;this.beginGeometry(e,t,i);const r=e.getFlatCoordinates(),o=[];for(let c=0,A=r.length;c<A;c+=e.getStride())(!this.maxExtent||Sb(this.maxExtent,r.slice(c,c+2)))&&o.push(r[c],r[c+1]);const s=this.coordinates.length,a=this.appendFlatPointCoordinates(o,2);this.instructions.push([dr.DRAW_IMAGE,s,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([dr.DRAW_IMAGE,s,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(e,t){const i=e.getAnchor(),r=e.getSize(),o=e.getOrigin();this.imagePixelRatio_=e.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=e.getHitDetectionImage(),this.image_=e.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=e.getOpacity(),this.originX_=o[0],this.originY_=o[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScaleArray(),this.width_=r[0],this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=t}}class qve extends tM{constructor(e,t,i,r){super(e,t,i,r)}drawFlatCoordinates_(e,t,i,r){const o=this.coordinates.length,s=this.appendFlatLineCoordinates(e,t,i,r,!1,!1),a=[dr.MOVE_TO_LINE_TO,o,s];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i}drawLineString(e,t,i){const r=this.state,o=r.strokeStyle,s=r.lineWidth;if(o===void 0||s===void 0)return;this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(e,t,i),this.hitDetectionInstructions.push([dr.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,Y0,$0],rb);const a=e.getFlatCoordinates(),c=e.getStride();this.drawFlatCoordinates_(a,0,a.length,c),this.hitDetectionInstructions.push(ky),this.endGeometry(t)}drawMultiLineString(e,t,i){const r=this.state,o=r.strokeStyle,s=r.lineWidth;if(o===void 0||s===void 0)return;this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(e,t,i),this.hitDetectionInstructions.push([dr.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,Y0,$0],rb);const a=e.getEnds(),c=e.getFlatCoordinates(),A=e.getStride();let m=0;for(let v=0,x=a.length;v<x;++v)m=this.drawFlatCoordinates_(c,m,a[v],A);this.hitDetectionInstructions.push(ky),this.endGeometry(t)}finish(){const e=this.state;return e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&this.instructions.push(ky),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(e){e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(ky),e.lastStroke=this.coordinates.length),e.lastStroke=0,super.applyStroke(e),this.instructions.push(rb)}}class yj extends tM{constructor(e,t,i,r){super(e,t,i,r)}drawFlatCoordinatess_(e,t,i,r){const o=this.state,s=o.fillStyle!==void 0,a=o.strokeStyle!==void 0,c=i.length;this.instructions.push(rb),this.hitDetectionInstructions.push(rb);for(let A=0;A<c;++A){const m=i[A],v=this.coordinates.length,x=this.appendFlatLineCoordinates(e,t,m,r,!0,!a),_=[dr.MOVE_TO_LINE_TO,v,x];this.instructions.push(_),this.hitDetectionInstructions.push(_),a&&(this.instructions.push(gj),this.hitDetectionInstructions.push(gj)),t=m}return s&&(this.instructions.push(QM),this.hitDetectionInstructions.push(QM)),a&&(this.instructions.push(ky),this.hitDetectionInstructions.push(ky)),t}drawCircle(e,t,i){const r=this.state,o=r.fillStyle,s=r.strokeStyle;if(o===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t,i),r.fillStyle!==void 0&&this.hitDetectionInstructions.push([dr.SET_FILL_STYLE,Vh]),r.strokeStyle!==void 0&&this.hitDetectionInstructions.push([dr.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,Y0,$0]);const a=e.getFlatCoordinates(),c=e.getStride(),A=this.coordinates.length;this.appendFlatLineCoordinates(a,0,a.length,c,!1,!1);const m=[dr.CIRCLE,A];this.instructions.push(rb,m),this.hitDetectionInstructions.push(rb,m),r.fillStyle!==void 0&&(this.instructions.push(QM),this.hitDetectionInstructions.push(QM)),r.strokeStyle!==void 0&&(this.instructions.push(ky),this.hitDetectionInstructions.push(ky)),this.endGeometry(t)}drawPolygon(e,t,i){const r=this.state,o=r.fillStyle,s=r.strokeStyle;if(o===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t,i),r.fillStyle!==void 0&&this.hitDetectionInstructions.push([dr.SET_FILL_STYLE,Vh]),r.strokeStyle!==void 0&&this.hitDetectionInstructions.push([dr.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,Y0,$0]);const a=e.getEnds(),c=e.getOrientedFlatCoordinates(),A=e.getStride();this.drawFlatCoordinatess_(c,0,a,A),this.endGeometry(t)}drawMultiPolygon(e,t,i){const r=this.state,o=r.fillStyle,s=r.strokeStyle;if(o===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t,i),r.fillStyle!==void 0&&this.hitDetectionInstructions.push([dr.SET_FILL_STYLE,Vh]),r.strokeStyle!==void 0&&this.hitDetectionInstructions.push([dr.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,Y0,$0]);const a=e.getEndss(),c=e.getOrientedFlatCoordinates(),A=e.getStride();let m=0;for(let v=0,x=a.length;v<x;++v)m=this.drawFlatCoordinatess_(c,m,a[v],A);this.endGeometry(t)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const e=this.tolerance;if(e!==0){const t=this.coordinates;for(let i=0,r=t.length;i<r;++i)t[i]=qv(t[i],e)}return super.finish()}setFillStrokeStyles_(){const e=this.state;this.updateFillStyle(e,this.createFill),this.updateStrokeStyle(e,this.applyStroke)}}function Yve(n,e,t,i,r){const o=[];let s=t,a=0,c=e.slice(t,2);for(;a<n&&s+r<i;){const[A,m]=c.slice(-2),v=e[s+r],x=e[s+r+1],_=Math.sqrt((v-A)*(v-A)+(x-m)*(x-m));if(a+=_,a>=n){const O=(n-a+_)/_,P=Vd(A,v,O),F=Vd(m,x,O);c.push(P,F),o.push(c),c=[P,F],a==n&&(s+=r),a=0}else if(a<n)c.push(e[s+r],e[s+r+1]),s+=r;else{const O=_-a,P=Vd(A,v,O/_),F=Vd(m,x,O/_);c.push(P,F),o.push(c),c=[P,F],a=0,s+=r}}return a>0&&o.push(c),o}function $ve(n,e,t,i,r){let o=t,s=t,a=0,c=0,A=t,m,v,x,_,O,P,F,j,Q,V;for(v=t;v<i;v+=r){const H=e[v],G=e[v+1];O!==void 0&&(Q=H-O,V=G-P,_=Math.sqrt(Q*Q+V*V),F!==void 0&&(c+=x,m=Math.acos((F*Q+j*V)/(x*_)),m>n&&(c>a&&(a=c,o=A,s=v),c=0,A=v-r)),x=_,F=Q,j=V),O=H,P=G}return c+=_,c>a?[A,v]:[o,s]}const Xw={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class Vve extends tM{constructor(e,t,i,r){super(e,t,i,r),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textKeepUpright_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[Vh]={fillStyle:Vh},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const e=super.finish();return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e}drawText(e,t,i){const r=this.textFillState_,o=this.textStrokeState_,s=this.textState_;if(this.text_===""||!s||!r&&!o)return;const a=this.coordinates;let c=a.length;const A=e.getType();let m=null,v=e.getStride();if(s.placement==="line"&&(A=="LineString"||A=="MultiLineString"||A=="Polygon"||A=="MultiPolygon")){if(!Gl(this.maxExtent,e.getExtent()))return;let x;if(m=e.getFlatCoordinates(),A=="LineString")x=[m.length];else if(A=="MultiLineString")x=e.getEnds();else if(A=="Polygon")x=e.getEnds().slice(0,1);else if(A=="MultiPolygon"){const F=e.getEndss();x=[];for(let j=0,Q=F.length;j<Q;++j)x.push(F[j][0])}this.beginGeometry(e,t,i);const _=s.repeat,O=_?void 0:s.textAlign;let P=0;for(let F=0,j=x.length;F<j;++F){let Q;_?Q=Yve(_*this.resolution,m,P,x[F],v):Q=[m.slice(P,x[F])];for(let V=0,H=Q.length;V<H;++V){const G=Q[V];let Y=0,z=G.length;if(O==null){const le=$ve(s.maxAngle,G,0,G.length,2);Y=le[0],z=le[1]}for(let le=Y;le<z;le+=v)a.push(G[le],G[le+1]);const se=a.length;P=x[F],this.drawChars_(c,se),c=se}}this.endGeometry(t)}else{let x=s.overflow?null:[];switch(A){case"Point":case"MultiPoint":m=e.getFlatCoordinates();break;case"LineString":m=e.getFlatMidpoint();break;case"Circle":m=e.getCenter();break;case"MultiLineString":m=e.getFlatMidpoints(),v=2;break;case"Polygon":m=e.getFlatInteriorPoint(),s.overflow||x.push(m[2]/this.resolution),v=3;break;case"MultiPolygon":const H=e.getFlatInteriorPoints();m=[];for(let G=0,Y=H.length;G<Y;G+=3)s.overflow||x.push(H[G+2]/this.resolution),m.push(H[G],H[G+1]);if(m.length===0)return;v=2;break}const _=this.appendFlatPointCoordinates(m,v);if(_===c)return;if(x&&(_-c)/2!==m.length/v){let H=c/2;x=x.filter((G,Y)=>{const z=a[(H+Y)*2]===m[Y*v]&&a[(H+Y)*2+1]===m[Y*v+1];return z||--H,z})}this.saveTextStates_();const O=s.backgroundFill?this.createFill(this.fillStyleToState(s.backgroundFill)):null,P=s.backgroundStroke?this.createStroke(this.strokeStyleToState(s.backgroundStroke)):null;this.beginGeometry(e,t,i);let F=s.padding;if(F!=ib&&(s.scale[0]<0||s.scale[1]<0)){let H=s.padding[0],G=s.padding[1],Y=s.padding[2],z=s.padding[3];s.scale[0]<0&&(G=-G,z=-z),s.scale[1]<0&&(H=-H,Y=-Y),F=[H,G,Y,z]}const j=this.pixelRatio;this.instructions.push([dr.DRAW_IMAGE,c,_,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,F==ib?ib:F.map(function(H){return H*j}),O,P,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,x]);const Q=1/j,V=O?O.slice(0):null;V&&(V[1]=Vh),this.hitDetectionInstructions.push([dr.DRAW_IMAGE,c,_,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[Q,Q],NaN,this.declutterMode_,this.declutterImageWithText_,F,V,P,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?Vh:this.fillKey_,this.textOffsetX_,this.textOffsetY_,x]),this.endGeometry(t)}}saveTextStates_(){const e=this.textStrokeState_,t=this.textState_,i=this.textFillState_,r=this.strokeKey_;e&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));const o=this.textKey_;o in this.textStates||(this.textStates[o]={font:t.font,textAlign:t.textAlign||q3,justify:t.justify,textBaseline:t.textBaseline||qw,scale:t.scale});const s=this.fillKey_;i&&(s in this.fillStates||(this.fillStates[s]={fillStyle:i.fillStyle}))}drawChars_(e,t){const i=this.textStrokeState_,r=this.textState_,o=this.strokeKey_,s=this.textKey_,a=this.fillKey_;this.saveTextStates_();const c=this.pixelRatio,A=Xw[r.textBaseline],m=this.textOffsetY_*c,v=this.text_,x=i?i.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([dr.DRAW_CHARS,e,t,A,r.overflow,a,r.maxAngle,c,m,o,x*c,v,s,1,this.declutterMode_,this.textKeepUpright_]),this.hitDetectionInstructions.push([dr.DRAW_CHARS,e,t,A,r.overflow,a&&Vh,r.maxAngle,c,m,o,x*c,v,s,1/c,this.declutterMode_,this.textKeepUpright_])}setTextStyle(e,t){let i,r,o;if(!e)this.text_="";else{const s=e.getFill();s?(r=this.textFillState_,r||(r={},this.textFillState_=r),r.fillStyle=wg(s.getColor()||Vh)):(r=null,this.textFillState_=r);const a=e.getStroke();if(!a)o=null,this.textStrokeState_=o;else{o=this.textStrokeState_,o||(o={},this.textStrokeState_=o);const P=a.getLineDash(),F=a.getLineDashOffset(),j=a.getWidth(),Q=a.getMiterLimit();o.lineCap=a.getLineCap()||ox,o.lineDash=P?P.slice():Y0,o.lineDashOffset=F===void 0?$0:F,o.lineJoin=a.getLineJoin()||sx,o.lineWidth=j===void 0?Y3:j,o.miterLimit=Q===void 0?W3:Q,o.strokeStyle=wg(a.getColor()||Q3)}i=this.textState_;const c=e.getFont()||lee;nve(c);const A=e.getScaleArray();i.overflow=e.getOverflow(),i.font=c,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.repeat=e.getRepeat(),i.justify=e.getJustify(),i.textBaseline=e.getTextBaseline()||qw,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||ib,i.scale=A===void 0?[1,1]:A;const m=e.getOffsetX(),v=e.getOffsetY(),x=e.getRotateWithView(),_=e.getKeepUpright(),O=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=m===void 0?0:m,this.textOffsetY_=v===void 0?0:v,this.textRotateWithView_=x===void 0?!1:x,this.textKeepUpright_=_===void 0?!0:_,this.textRotation_=O===void 0?0:O,this.strokeKey_=o?(typeof o.strokeStyle=="string"?o.strokeStyle:$r(o.strokeStyle))+o.lineCap+o.lineDashOffset+"|"+o.lineWidth+o.lineJoin+o.miterLimit+"["+o.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=r&&r.fillStyle?typeof r.fillStyle=="string"?r.fillStyle:"|"+$r(r.fillStyle):""}this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=t}}const Hve={Circle:yj,Default:tM,Image:Qve,LineString:qve,Polygon:yj,Text:Vve};class Eee{constructor(e,t,i,r){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=r,this.resolution_=i,this.buildersByZIndex_={}}finish(){const e={};for(const t in this.buildersByZIndex_){e[t]=e[t]||{};const i=this.buildersByZIndex_[t];for(const r in i){const o=i[r].finish();e[t][r]=o}}return e}getBuilder(e,t){const i=e!==void 0?e.toString():"0";let r=this.buildersByZIndex_[i];r===void 0&&(r={},this.buildersByZIndex_[i]=r);let o=r[t];if(o===void 0){const s=Hve[t];o=new s(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[t]=o}return o}}function Zve(n,e,t,i,r,o,s,a,c,A,m,v,x=!0){let _=n[e],O=n[e+1],P=0,F=0,j=0,Q=0;function V(){P=_,F=O,e+=i,_=n[e],O=n[e+1],Q+=j,j=Math.sqrt((_-P)*(_-P)+(O-F)*(O-F))}do V();while(e<t-i&&Q+j<o);let H=j===0?0:(o-Q)/j;const G=Vd(P,_,H),Y=Vd(F,O,H),z=e-i,se=Q,le=o+a*c(A,r,m);for(;e<t-i&&Q+j<le;)V();H=j===0?0:(le-Q)/j;const me=Vd(P,_,H),fe=Vd(F,O,H);let _e=!1;if(x)if(v){const Qe=[G,Y,me,fe];UJ(Qe,0,4,2,v,Qe,Qe),_e=Qe[0]>Qe[2]}else _e=G>me;const we=Math.PI,ke=[],je=z+i===e;e=z,j=0,Q=se,_=n[e],O=n[e+1];let Ie;if(je){V(),Ie=Math.atan2(O-F,_-P),_e&&(Ie+=Ie>0?-we:we);const Qe=(me+G)/2,tt=(fe+Y)/2;return ke[0]=[Qe,tt,(le-o)/2,Ie,r],ke}r=r.replace(/\n/g," ");for(let Qe=0,tt=r.length;Qe<tt;){V();let ht=Math.atan2(O-F,_-P);if(_e&&(ht+=ht>0?-we:we),Ie!==void 0){let it=ht-Ie;if(it+=it>we?-2*we:it<-we?2*we:0,Math.abs(it)>s)return null}Ie=ht;const ce=Qe;let Le=0;for(;Qe<tt;++Qe){const it=_e?tt-Qe-1:Qe,vt=a*c(A,r[it],m);if(e+i<t&&Q+j<o+Le+vt/2)break;Le+=vt}if(Qe===ce)continue;const We=_e?r.substring(tt-ce,tt-Qe):r.substring(ce,Qe);H=j===0?0:(o+Le/2-Q)/j;const Me=Vd(P,_,H),dt=Vd(F,O,H);ke.push([Me,dt,Le/2,ht,We]),o+=Le}return ke}class pU{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Qw(),{get:(e,t)=>{if(typeof Qw()[t]=="function")return this.push_(t),this.pushMethodArgs_},set:(e,t,i)=>(this.push_(t,i),!0)})}push_(...e){const t=this.instructions_,i=this.zIndex+this.offset_;t[i]||(t[i]=[]),t[i].push(...e)}pushMethodArgs_=(...e)=>(this.push_(e),this);pushFunction(e){this.push_(e)}getContext(){return this.context_}draw(e){this.instructions_.forEach(t=>{for(let i=0,r=t.length;i<r;++i){const o=t[i];if(typeof o=="function"){o(e);continue}const s=t[++i];if(typeof e[o]=="function")e[o](...s);else{if(typeof s=="function"){e[o]=s(e);continue}e[o]=s}}})}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}}const TC=rp(),cy=[],R0=[],D0=[],Ay=[];function vj(n){return n[3].declutterBox}const bj=new RegExp("[֑-ࣿיִ-﷿ﹰ-ﻼࠀ-࿿-]");function tB(n,e){return e==="start"?e=bj.test(n)?"right":"left":e==="end"&&(e=bj.test(n)?"left":"right"),Xw[e]}function Xve(n,e,t){return t>0&&n.push(`
`,""),n.push(e,""),n}function Jve(n,e,t){return t%2===0&&(n+=e),n}class ebe{constructor(e,t,i,r,o){this.overlaps=i,this.pixelRatio=t,this.resolution=e,this.alignAndScaleFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=td(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=o?new pU:null}getZIndexContext(){return this.zIndexContext_}createLabel(e,t,i,r){const o=e+t+i+r;if(this.labels_[o])return this.labels_[o];const s=r?this.strokeStates[r]:null,a=i?this.fillStates[i]:null,c=this.textStates[t],A=this.pixelRatio,m=[c.scale[0]*A,c.scale[1]*A],v=c.justify?Xw[c.justify]:tB(Array.isArray(e)?e[0]:e,c.textAlign||q3),x=r&&s.lineWidth?s.lineWidth:0,_=Array.isArray(e)?e:String(e).split(`
`).reduce(Xve,[]),{width:O,height:P,widths:F,heights:j,lineWidths:Q}=rve(c,_),V=O+x,H=[],G=(V+2)*m[0],Y=(P+x)*m[1],z={width:G<0?Math.floor(G):Math.ceil(G),height:Y<0?Math.floor(Y):Math.ceil(Y),contextInstructions:H};(m[0]!=1||m[1]!=1)&&H.push("scale",m),r&&(H.push("strokeStyle",s.strokeStyle),H.push("lineWidth",x),H.push("lineCap",s.lineCap),H.push("lineJoin",s.lineJoin),H.push("miterLimit",s.miterLimit),H.push("setLineDash",[s.lineDash]),H.push("lineDashOffset",s.lineDashOffset)),i&&H.push("fillStyle",a.fillStyle),H.push("textBaseline","middle"),H.push("textAlign","center");const se=.5-v;let le=v*V+se*x;const me=[],fe=[];let _e=0,we=0,ke=0,je=0,Ie;for(let Qe=0,tt=_.length;Qe<tt;Qe+=2){const ht=_[Qe];if(ht===`
`){we+=_e,_e=0,le=v*V+se*x,++je;continue}const ce=_[Qe+1]||c.font;ce!==Ie&&(r&&me.push("font",ce),i&&fe.push("font",ce),Ie=ce),_e=Math.max(_e,j[ke]);const Le=[ht,le+se*F[ke]+v*(F[ke]-Q[je]),.5*(x+_e)+we];le+=F[ke],r&&me.push("strokeText",Le),i&&fe.push("fillText",Le),++ke}return Array.prototype.push.apply(H,me),Array.prototype.push.apply(H,fe),this.labels_[o]=z,z}replayTextBackground_(e,t,i,r,o,s,a){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,i),e.lineTo.apply(e,r),e.lineTo.apply(e,o),e.lineTo.apply(e,t),s&&(this.alignAndScaleFill_=s[2],e.fillStyle=s[1],this.fill_(e)),a&&(this.setStrokeStyle_(e,a),e.stroke())}calculateImageOrLabelDimensions_(e,t,i,r,o,s,a,c,A,m,v,x,_,O,P,F){a*=x[0],c*=x[1];let j=i-a,Q=r-c;const V=o+A>e?e-A:o,H=s+m>t?t-m:s,G=O[3]+V*x[0]+O[1],Y=O[0]+H*x[1]+O[2],z=j-O[3],se=Q-O[0];(P||v!==0)&&(cy[0]=z,Ay[0]=z,cy[1]=se,R0[1]=se,R0[0]=z+G,D0[0]=R0[0],D0[1]=se+Y,Ay[1]=D0[1]);let le;return v!==0?(le=Fg(td(),i,r,1,1,v,-i,-r),Du(le,cy),Du(le,R0),Du(le,D0),Du(le,Ay),X0(Math.min(cy[0],R0[0],D0[0],Ay[0]),Math.min(cy[1],R0[1],D0[1],Ay[1]),Math.max(cy[0],R0[0],D0[0],Ay[0]),Math.max(cy[1],R0[1],D0[1],Ay[1]),TC)):X0(Math.min(z,z+G),Math.min(se,se+Y),Math.max(z,z+G),Math.max(se,se+Y),TC),_&&(j=Math.round(j),Q=Math.round(Q)),{drawImageX:j,drawImageY:Q,drawImageW:V,drawImageH:H,originX:A,originY:m,declutterBox:{minX:TC[0],minY:TC[1],maxX:TC[2],maxY:TC[3],value:F},canvasTransform:le,scale:x}}replayImageOrLabel_(e,t,i,r,o,s,a){const c=!!(s||a),A=r.declutterBox,m=a?a[2]*r.scale[0]/2:0;return A.minX-m<=t[0]&&A.maxX+m>=0&&A.minY-m<=t[1]&&A.maxY+m>=0&&(c&&this.replayTextBackground_(e,cy,R0,D0,Ay,s,a),ove(e,r.canvasTransform,o,i,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0}fill_(e){const t=this.alignAndScaleFill_;if(t){const i=Du(this.renderedTransform_,[0,0]),r=512*this.pixelRatio;e.save(),e.translate(i[0]%r,i[1]%r),t!==1&&e.scale(t,t),e.rotate(this.viewRotation_)}e.fill(),t&&e.restore()}setStrokeStyle_(e,t){e.strokeStyle=t[1],t[1]&&(e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.lineDashOffset=t[7],e.setLineDash(t[6]))}drawLabelWithPointPlacement_(e,t,i,r){const o=this.textStates[t],s=this.createLabel(e,t,r,i),a=this.strokeStates[i],c=this.pixelRatio,A=tB(Array.isArray(e)?e[0]:e,o.textAlign||q3),m=Xw[o.textBaseline||qw],v=a&&a.lineWidth?a.lineWidth:0,x=s.width/c-2*o.scale[0],_=A*x+2*(.5-A)*v,O=m*s.height/c+2*(.5-m)*v;return{label:s,anchorX:_,anchorY:O}}execute_(e,t,i,r,o,s,a,c){const A=this.zIndexContext_;let m;this.pixelCoordinates_&&tv(i,this.renderedTransform_)?m=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),m=Gy(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),i1e(this.renderedTransform_,i));let v=0;const x=r.length;let _=0,O,P,F,j,Q,V,H,G,Y,z,se,le,me,fe=0,_e=0;const we=this.coordinateCache_,ke=this.viewRotation_,je=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,Ie={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:ke},Qe=this.instructions!=r||this.overlaps?0:200;let tt,ht,ce,Le;for(;v<x;){const We=r[v];switch(We[0]){case dr.BEGIN_GEOMETRY:tt=We[1],Le=We[3],tt.getGeometry()?a!==void 0&&!Gl(a,Le.getExtent())?v=We[2]+1:++v:v=We[2],A&&(A.zIndex=We[4]);break;case dr.BEGIN_PATH:fe>Qe&&(this.fill_(e),fe=0),_e>Qe&&(e.stroke(),_e=0),!fe&&!_e&&(e.beginPath(),Q=NaN,V=NaN),++v;break;case dr.CIRCLE:_=We[1];const dt=m[_],it=m[_+1],vt=m[_+2],Ut=m[_+3],Pe=vt-dt,Te=Ut-it,Se=Math.sqrt(Pe*Pe+Te*Te);e.moveTo(dt+Se,it),e.arc(dt,it,Se,0,2*Math.PI,!0),++v;break;case dr.CLOSE_PATH:e.closePath(),++v;break;case dr.CUSTOM:_=We[1],O=We[2];const Ne=We[3],ut=We[4],rt=We[5];Ie.geometry=Ne,Ie.feature=tt,v in we||(we[v]=[]);const mt=we[v];rt?rt(m,_,O,2,mt):(mt[0]=m[_],mt[1]=m[_+1],mt.length=2),A&&(A.zIndex=We[6]),ut(mt,Ie),++v;break;case dr.DRAW_IMAGE:_=We[1],O=We[2],Y=We[3],P=We[4],F=We[5];let Rt=We[6];const Bt=We[7],$t=We[8],Rn=We[9],zn=We[10];let ai=We[11];const _n=We[12];let Bn=We[13];j=We[14]||"declutter";const dn=We[15];if(!Y&&We.length>=20){z=We[19],se=We[20],le=We[21],me=We[22];const yn=this.drawLabelWithPointPlacement_(z,se,le,me);Y=yn.label,We[3]=Y;const qn=We[23];P=(yn.anchorX-qn)*this.pixelRatio,We[4]=P;const $n=We[24];F=(yn.anchorY-$n)*this.pixelRatio,We[5]=F,Rt=Y.height,We[6]=Rt,Bn=Y.width,We[13]=Bn}let li;We.length>25&&(li=We[25]);let In,It,xe;We.length>17?(In=We[16],It=We[17],xe=We[18]):(In=ib,It=null,xe=null),zn&&je?ai+=ke:!zn&&!je&&(ai-=ke);let oe=0;for(;_<O;_+=2){if(li&&li[oe++]<Bn/this.pixelRatio)continue;const yn=this.calculateImageOrLabelDimensions_(Y.width,Y.height,m[_],m[_+1],Bn,Rt,P,F,$t,Rn,ai,_n,o,In,!!It||!!xe,tt),qn=[e,t,Y,yn,Bt,It,xe];if(c){let $n,mi,ir;if(dn){const Fn=O-_;if(!dn[Fn]){dn[Fn]={args:qn,declutterMode:j};continue}const Ti=dn[Fn];$n=Ti.args,mi=Ti.declutterMode,delete dn[Fn],ir=vj($n)}let di,Vn;if($n&&(mi!=="declutter"||!c.collides(ir))&&(di=!0),(j!=="declutter"||!c.collides(yn.declutterBox))&&(Vn=!0),mi==="declutter"&&j==="declutter"){const Fn=di&&Vn;di=Fn,Vn=Fn}di&&(mi!=="none"&&c.insert(ir),this.replayImageOrLabel_.apply(this,$n)),Vn&&(j!=="none"&&c.insert(yn.declutterBox),this.replayImageOrLabel_.apply(this,qn))}else this.replayImageOrLabel_.apply(this,qn)}++v;break;case dr.DRAW_CHARS:const J=We[1],ne=We[2],ue=We[3],Ce=We[4];me=We[5];const Ue=We[6],He=We[7],lt=We[8];le=We[9];const be=We[10];z=We[11],Array.isArray(z)&&(z=z.reduce(Jve,"")),se=We[12];const Ee=[We[13],We[13]];j=We[14]||"declutter";const y=We[15],gt=this.textStates[se],Mt=gt.font,Dt=[gt.scale[0]*He,gt.scale[1]*He];let ot;Mt in this.widths_?ot=this.widths_[Mt]:(ot={},this.widths_[Mt]=ot);const bn=fU(m,J,ne,2),Gn=Math.abs(Dt[0])*oj(Mt,z,ot);if(Ce||Gn<=bn){const yn=this.textStates[se].textAlign,qn=(bn-Gn)*tB(z,yn),$n=Zve(m,J,ne,2,z,qn,Ue,Math.abs(Dt[0]),oj,Mt,ot,je?0:this.viewRotation_,y);e:if($n){const mi=[];let ir,di,Vn,Fn,Ti;if(le)for(ir=0,di=$n.length;ir<di;++ir){Ti=$n[ir],Vn=Ti[4],Fn=this.createLabel(Vn,se,"",le),P=Ti[2]+(Dt[0]<0?-be:be),F=ue*Fn.height+(.5-ue)*2*be*Dt[1]/Dt[0]-lt;const on=this.calculateImageOrLabelDimensions_(Fn.width,Fn.height,Ti[0],Ti[1],Fn.width,Fn.height,P,F,0,0,Ti[3],Ee,!1,ib,!1,tt);if(c&&j==="declutter"&&c.collides(on.declutterBox))break e;mi.push([e,t,Fn,on,1,null,null])}if(me)for(ir=0,di=$n.length;ir<di;++ir){Ti=$n[ir],Vn=Ti[4],Fn=this.createLabel(Vn,se,me,""),P=Ti[2],F=ue*Fn.height-lt;const on=this.calculateImageOrLabelDimensions_(Fn.width,Fn.height,Ti[0],Ti[1],Fn.width,Fn.height,P,F,0,0,Ti[3],Ee,!1,ib,!1,tt);if(c&&j==="declutter"&&c.collides(on.declutterBox))break e;mi.push([e,t,Fn,on,1,null,null])}c&&j!=="none"&&c.load(mi.map(vj));for(let on=0,qr=mi.length;on<qr;++on)this.replayImageOrLabel_.apply(this,mi[on])}}++v;break;case dr.END_GEOMETRY:if(s!==void 0){tt=We[1];const yn=s(tt,Le,j);if(yn)return yn}++v;break;case dr.FILL:Qe?fe++:this.fill_(e),++v;break;case dr.MOVE_TO_LINE_TO:for(_=We[1],O=We[2],ht=m[_],ce=m[_+1],e.moveTo(ht,ce),Q=ht+.5|0,V=ce+.5|0,_+=2;_<O;_+=2)ht=m[_],ce=m[_+1],H=ht+.5|0,G=ce+.5|0,(_==O-2||H!==Q||G!==V)&&(e.lineTo(ht,ce),Q=H,V=G);++v;break;case dr.SET_FILL_STYLE:this.alignAndScaleFill_=We[2],fe&&(this.fill_(e),fe=0,_e&&(e.stroke(),_e=0)),e.fillStyle=We[1],++v;break;case dr.SET_STROKE_STYLE:_e&&(e.stroke(),_e=0),this.setStrokeStyle_(e,We),++v;break;case dr.STROKE:Qe?_e++:e.stroke(),++v;break;default:++v;break}}fe&&this.fill_(e),_e&&e.stroke()}execute(e,t,i,r,o,s){this.viewRotation_=r,this.execute_(e,t,i,this.instructions,o,void 0,void 0,s)}executeHitDetection(e,t,i,r,o){return this.viewRotation_=i,this.execute_(e,[e.canvas.width,e.canvas.height],t,this.hitDetectionInstructions,!0,r,o)}}const Vv=["Polygon","Circle","LineString","Image","Text","Default"],Jw=["Image","Text"],tbe=Vv.filter(n=>!Jw.includes(n));class Oee{constructor(e,t,i,r,o,s,a){this.maxExtent_=e,this.overlaps_=r,this.pixelRatio_=i,this.resolution_=t,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=td(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(o,a)}clip(e,t){const i=this.getClipCoords(t);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()}createExecutors_(e,t){for(const i in e){let r=this.executorsByZIndex_[i];r===void 0&&(r={},this.executorsByZIndex_[i]=r);const o=e[i];for(const s in o){const a=o[s];r[s]=new ebe(this.resolution_,this.pixelRatio_,this.overlaps_,a,t)}}}hasExecutors(e){for(const t in this.executorsByZIndex_){const i=this.executorsByZIndex_[t];for(let r=0,o=e.length;r<o;++r)if(e[r]in i)return!0}return!1}forEachFeatureAtCoordinate(e,t,i,r,o,s){r=Math.round(r);const a=r*2+1,c=Fg(this.hitDetectionTransform_,r+.5,r+.5,1/t,-1/t,-i,-e[0],-e[1]),A=!this.hitDetectionContext_;A&&(this.hitDetectionContext_=bl(a,a));const m=this.hitDetectionContext_;m.canvas.width!==a||m.canvas.height!==a?(m.canvas.width=a,m.canvas.height=a):A||m.clearRect(0,0,a,a);let v;this.renderBuffer_!==void 0&&(v=rp(),t3(v,e),jy(v,t*(this.renderBuffer_+r),v));const x=nbe(r);let _;function O(G,Y,z){const se=m.getImageData(0,0,a,a).data;for(let le=0,me=x.length;le<me;le++)if(se[x[le]]>0){if(!s||z==="none"||_!=="Image"&&_!=="Text"||s.includes(G)){const fe=(x[le]-3)/4,_e=r-fe%a,we=r-(fe/a|0),ke=o(G,Y,_e*_e+we*we);if(ke)return ke}m.clearRect(0,0,a,a);break}}const P=Object.keys(this.executorsByZIndex_).map(Number);P.sort(Pg);let F,j,Q,V,H;for(F=P.length-1;F>=0;--F){const G=P[F].toString();for(Q=this.executorsByZIndex_[G],j=Vv.length-1;j>=0;--j)if(_=Vv[j],V=Q[_],V!==void 0&&(H=V.executeHitDetection(m,c,i,O,v),H))return H}}getClipCoords(e){const t=this.maxExtent_;if(!t)return null;const i=t[0],r=t[1],o=t[2],s=t[3],a=[i,r,i,s,o,s,o,r];return Gy(a,0,8,2,e,a),a}isEmpty(){return qy(this.executorsByZIndex_)}execute(e,t,i,r,o,s,a){const c=Object.keys(this.executorsByZIndex_).map(Number);c.sort(a?Xge:Pg),s=s||Vv;const A=Vv.length;for(let m=0,v=c.length;m<v;++m){const x=c[m].toString(),_=this.executorsByZIndex_[x];for(let O=0,P=s.length;O<P;++O){const F=s[O],j=_[F];if(j!==void 0){const Q=a===null?void 0:j.getZIndexContext(),V=Q?Q.getContext():e,H=this.maxExtent_&&F!=="Image"&&F!=="Text";if(H&&(V.save(),this.clip(V,i)),!Q||F==="Text"||F==="Image"?j.execute(V,t,i,r,o,a):Q.pushFunction(G=>j.execute(G,t,i,r,o,a)),H&&V.restore(),Q){Q.offset();const G=c[m]*A+Vv.indexOf(F);this.deferredZIndexContexts_[G]||(this.deferredZIndexContexts_[G]=[]),this.deferredZIndexContexts_[G].push(Q)}}}}this.renderedContext_=e}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const e=this.deferredZIndexContexts_,t=Object.keys(e).map(Number).sort(Pg);for(let i=0,r=t.length;i<r;++i)e[t[i]].forEach(o=>{o.draw(this.renderedContext_),o.clear()}),e[t[i]].length=0}}const nB={};function nbe(n){if(nB[n]!==void 0)return nB[n];const e=n*2+1,t=n*n,i=new Array(t+1);for(let o=0;o<=n;++o)for(let s=0;s<=n;++s){const a=o*o+s*s;if(a>t)break;let c=i[a];c||(c=[],i[a]=c),c.push(((n+o)*e+(n+s))*4+3),o>0&&c.push(((n-o)*e+(n+s))*4+3),s>0&&(c.push(((n+o)*e+(n-s))*4+3),o>0&&c.push(((n-o)*e+(n-s))*4+3))}const r=[];for(let o=0,s=i.length;o<s;++o)i[o]&&r.push(...i[o]);return nB[n]=r,r}const ef=.5;function Bee(n,e,t,i,r,o,s,a,c){const A=c?FP(r):r,m=n[0]*ef,v=n[1]*ef,x=bl(m,v);x.imageSmoothingEnabled=!1;const _=x.canvas,O=new Ive(x,ef,r,null,s,a,c?Y4(t1e(),c):null),P=t.length,F=Math.floor((256*256*256-1)/P),j={};for(let V=1;V<=P;++V){const H=t[V-1],G=H.getStyleFunction()||i;if(!G)continue;let Y=G(H,o);if(!Y)continue;Array.isArray(Y)||(Y=[Y]);const se=(V*F).toString(16).padStart(7,"#00000");for(let le=0,me=Y.length;le<me;++le){const fe=Y[le],_e=fe.getGeometryFunction()(H);if(!_e||!Gl(A,_e.getExtent()))continue;const we=fe.clone(),ke=we.getFill();ke&&ke.setColor(se);const je=we.getStroke();je&&(je.setColor(se),je.setLineDash(null)),we.setText(void 0);const Ie=fe.getImage();if(Ie){const ce=Ie.getImageSize();if(!ce)continue;const Le=bl(ce[0],ce[1],void 0,{alpha:!1}),We=Le.canvas;Le.fillStyle=se,Le.fillRect(0,0,We.width,We.height),we.setImage(new ax({img:We,anchor:Ie.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:Ie.getOrigin(),opacity:1,size:Ie.getSize(),scale:Ie.getScale(),rotation:Ie.getRotation(),rotateWithView:Ie.getRotateWithView()}))}const Qe=we.getZIndex()||0;let tt=j[Qe];tt||(tt={},j[Qe]=tt,tt.Polygon=[],tt.Circle=[],tt.LineString=[],tt.Point=[]);const ht=_e.getType();if(ht==="GeometryCollection"){const ce=_e.getGeometriesArrayRecursive();for(let Le=0,We=ce.length;Le<We;++Le){const Me=ce[Le];tt[Me.getType().replace("Multi","")].push(Me,we)}}else tt[ht.replace("Multi","")].push(_e,we)}}const Q=Object.keys(j).map(Number).sort(Pg);for(let V=0,H=Q.length;V<H;++V){const G=j[Q[V]];for(const Y in G){const z=G[Y];for(let se=0,le=z.length;se<le;se+=2){O.setStyle(z[se+1]);for(let me=0,fe=e.length;me<fe;++me)O.setTransform(e[me]),O.drawGeometry(z[se])}}}return x.getImageData(0,0,_.width,_.height)}function Iee(n,e,t){const i=[];if(t){const r=Math.floor(Math.round(n[0])*ef),o=Math.floor(Math.round(n[1])*ef),s=(vl(r,0,t.width-1)+vl(o,0,t.height-1)*t.width)*4,a=t.data[s],c=t.data[s+1],m=t.data[s+2]+256*(c+256*a),v=Math.floor((256*256*256-1)/e.length);m&&m%v===0&&i.push(e[m/v-1])}return i}const ibe=5;class rbe extends Q4{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.staleKeys_=new Array,this.maxStaleKeys=ibe}getStaleKeys(){return this.staleKeys_}prependStaleKey(e){this.staleKeys_.unshift(e),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(e){return Dr()}getData(e){return null}prepareFrame(e){return Dr()}renderFrame(e,t){return Dr()}forEachFeatureAtCoordinate(e,t,i,r,o){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(e){const t=e.target;(t.getState()===zi.LOADED||t.getState()===zi.ERROR)&&this.renderIfReadyAndVisible()}loadImage(e){let t=e.getState();return t!=zi.LOADED&&t!=zi.ERROR&&e.addEventListener(Ir.CHANGE,this.boundHandleImageChange_),t==zi.IDLE&&(e.load(),t=e.getState()),t==zi.LOADED}renderIfReadyAndVisible(){const e=this.getLayer();e&&e.getVisible()&&e.getSourceState()==="ready"&&e.changed()}renderDeferred(e){}disposeInternal(){delete this.layer_,super.disposeInternal()}}const Cj=[];let d_=null;function obe(){d_=bl(1,1,void 0,{willReadFrequently:!0})}class mU extends rbe{constructor(e){super(e),this.container=null,this.renderedResolution,this.tempTransform=td(),this.pixelTransform=td(),this.inversePixelTransform=td(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(e,t,i){d_||obe(),d_.clearRect(0,0,1,1);let r;try{d_.drawImage(e,t,i,1,1,0,0,1,1),r=d_.getImageData(0,0,1,1).data}catch{return d_=null,null}return r}getBackground(e){let i=this.getLayer().getBackground();return typeof i=="function"&&(i=i(e.viewState.resolution)),i||void 0}useContainer(e,t,i){const r=this.getLayer().getClassName();let o,s;if(e&&e.className===r&&(!i||e&&e.style.backgroundColor&&tv(rx(e.style.backgroundColor),rx(i)))){const a=e.firstElementChild;a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}if(s&&l1e(s.canvas.style.transform,t)?(this.container=e,this.context=s,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){o=document.createElement("div"),o.className=r;let a=o.style;a.position="absolute",a.width="100%",a.height="100%",s=bl();const c=s.canvas;o.appendChild(c),a=c.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=o,this.context=s}!this.containerReused&&i&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=i)}clipUnrotated(e,t,i){const r=r1(i),o=BE(i),s=OE(i),a=EE(i);Du(t.coordinateToPixelTransform,r),Du(t.coordinateToPixelTransform,o),Du(t.coordinateToPixelTransform,s),Du(t.coordinateToPixelTransform,a);const c=this.inversePixelTransform;Du(c,r),Du(c,o),Du(c,s),Du(c,a),e.save(),e.beginPath(),e.moveTo(Math.round(r[0]),Math.round(r[1])),e.lineTo(Math.round(o[0]),Math.round(o[1])),e.lineTo(Math.round(s[0]),Math.round(s[1])),e.lineTo(Math.round(a[0]),Math.round(a[1])),e.clip()}prepareContainer(e,t){const i=e.extent,r=e.viewState.resolution,o=e.viewState.rotation,s=e.pixelRatio,a=Math.round(as(i)/r*s),c=Math.round(Ku(i)/r*s);Fg(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/s,1/s,o,-a/2,-c/2),PJ(this.inversePixelTransform,this.pixelTransform);const A=a1e(this.pixelTransform);if(this.useContainer(t,A,this.getBackground(e)),!this.containerReused){const m=this.context.canvas;m.width!=a||m.height!=c?(m.width=a,m.height=c):this.context.clearRect(0,0,a,c),A!==m.style.transform&&(m.style.transform=A)}}dispatchRenderEvent_(e,t,i){const r=this.getLayer();if(r.hasListener(e)){const o=new yee(e,this.inversePixelTransform,i,t);r.dispatchEvent(o)}}preRender(e,t){this.frameState=t,!t.declutter&&this.dispatchRenderEvent_(Hf.PRERENDER,e,t)}postRender(e,t){t.declutter||this.dispatchRenderEvent_(Hf.POSTRENDER,e,t)}renderDeferredInternal(e){}getRenderContext(e){return e.declutter&&!this.deferredContext_&&(this.deferredContext_=new pU),e.declutter?this.deferredContext_.getContext():this.context}renderDeferred(e){e.declutter&&(this.dispatchRenderEvent_(Hf.PRERENDER,this.context,e),e.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(e),this.dispatchRenderEvent_(Hf.POSTRENDER,this.context,e))}getRenderTransform(e,t,i,r,o,s,a){const c=o/2,A=s/2,m=r/t,v=-m,x=-e[0]+a,_=-e[1];return Fg(this.tempTransform,c,A,m,v,-i,x,_)}disposeInternal(){delete this.frameState,super.disposeInternal()}}class sbe extends mU{constructor(e){super(e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipped_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=rp(),this.wrappedRenderedExtent_=rp(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(e,t,i){const r=t.extent,o=t.viewState,s=o.center,a=o.resolution,c=o.projection,A=o.rotation,m=c.getExtent(),v=this.getLayer().getSource(),x=this.getLayer().getDeclutter(),_=t.pixelRatio,O=t.viewHints,P=!(O[sl.ANIMATING]||O[sl.INTERACTING]),F=this.context,j=Math.round(as(r)/a*_),Q=Math.round(Ku(r)/a*_),V=v.getWrapX()&&c.canWrapX(),H=V?as(m):null,G=V?Math.ceil((r[2]-m[2])/H)+1:1;let Y=V?Math.floor((r[0]-m[0])/H):0;do{let z=this.getRenderTransform(s,a,0,_,j,Q,Y*H);t.declutter&&(z=z.slice(0)),e.execute(F,[F.canvas.width,F.canvas.height],z,A,P,i===void 0?Vv:i?Jw:tbe,i?x&&t.declutter[x]:void 0)}while(++Y<G)}setDrawContext_(){this.opacity_!==1&&(this.targetContext_=this.context,this.context=bl(this.context.canvas.width,this.context.canvas.height,Cj))}resetDrawContext_(){if(this.opacity_!==1&&this.targetContext_){const e=this.targetContext_.globalAlpha;this.targetContext_.globalAlpha=this.opacity_,this.targetContext_.drawImage(this.context.canvas,0,0),this.targetContext_.globalAlpha=e,V4(this.context),Cj.push(this.context.canvas),this.context=this.targetContext_,this.targetContext_=null}}renderDeclutter(e){!this.replayGroup_||!this.getLayer().getDeclutter()||this.renderWorlds(this.replayGroup_,e,!0)}renderDeferredInternal(e){this.replayGroup_&&(this.replayGroup_.renderDeferred(),this.clipped_&&this.context.restore(),this.resetDrawContext_())}renderFrame(e,t){const i=e.layerStatesArray[e.layerIndex];this.opacity_=i.opacity;const r=e.viewState;this.prepareContainer(e,t);const o=this.context,s=this.replayGroup_;let a=s&&!s.isEmpty();if(!a&&!(this.getLayer().hasListener(Hf.PRERENDER)||this.getLayer().hasListener(Hf.POSTRENDER)))return this.container;if(this.setDrawContext_(),this.preRender(o,e),r.projection,this.clipped_=!1,a&&i.extent&&this.clipping){const c=Mg(i.extent);a=Gl(c,e.extent),this.clipped_=a&&!xg(c,e.extent),this.clipped_&&this.clipUnrotated(o,e,c)}return a&&this.renderWorlds(s,e,this.getLayer().getDeclutter()?!1:void 0),!e.declutter&&this.clipped_&&o.restore(),this.postRender(o,e),this.renderedRotation_!==r.rotation&&(this.renderedRotation_=r.rotation,this.hitDetectionImageData_=null),e.declutter||this.resetDrawContext_(),this.container}getFeatures(e){return new Promise(t=>{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const i=this.frameState.size.slice(),r=this.renderedCenter_,o=this.renderedResolution_,s=this.renderedRotation_,a=this.renderedProjection_,c=this.wrappedRenderedExtent_,A=this.getLayer(),m=[],v=i[0]*ef,x=i[1]*ef;m.push(this.getRenderTransform(r,o,s,ef,v,x,0).slice());const _=A.getSource(),O=a.getExtent();if(_.getWrapX()&&a.canWrapX()&&!xg(O,c)){let P=c[0];const F=as(O);let j=0,Q;for(;P<O[0];)--j,Q=F*j,m.push(this.getRenderTransform(r,o,s,ef,v,x,Q).slice()),P+=F;for(j=0,P=c[2];P>O[2];)++j,Q=F*j,m.push(this.getRenderTransform(r,o,s,ef,v,x,Q).slice()),P-=F}this.hitDetectionImageData_=Bee(i,m,this.renderedFeatures_,A.getStyleFunction(),c,o,s,Z9(o,this.renderedPixelRatio_),null)}t(Iee(e,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(e,t,i,r,o){if(!this.replayGroup_)return;const s=t.viewState.resolution,a=t.viewState.rotation,c=this.getLayer(),A={},m=function(x,_,O){const P=$r(x),F=A[P];if(F){if(F!==!0&&O<F.distanceSq){if(O===0)return A[P]=!0,o.splice(o.lastIndexOf(F),1),r(x,c,_);F.geometry=_,F.distanceSq=O}}else{if(O===0)return A[P]=!0,r(x,c,_);o.push(A[P]={feature:x,layer:c,geometry:_,distanceSq:O,callback:r})}},v=this.getLayer().getDeclutter();return this.replayGroup_.forEachFeatureAtCoordinate(e,s,a,i,m,v?t.declutter?.[v]?.all().map(x=>x.value):null)}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}prepareFrame(e){const t=this.getLayer(),i=t.getSource();if(!i)return!1;const r=e.viewHints[sl.ANIMATING],o=e.viewHints[sl.INTERACTING],s=t.getUpdateWhileAnimating(),a=t.getUpdateWhileInteracting();if(this.ready&&!s&&r||!a&&o)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const c=e.extent,A=e.viewState,m=A.projection,v=A.resolution,x=e.pixelRatio,_=t.getRevision(),O=t.getRenderBuffer();let P=t.getRenderOrder();P===void 0&&(P=Tve);const F=A.center.slice(),j=jy(c,O*v),Q=j.slice(),V=[j.slice()],H=m.getExtent();if(i.getWrapX()&&m.canWrapX()&&!xg(H,e.extent)){const ke=as(H),je=Math.max(as(j)/2,ke);j[0]=H[0]-je,j[2]=H[2]+je,DP(F,m);const Ie=MJ(V[0],m);Ie[0]<H[0]&&Ie[2]<H[2]?V.push([Ie[0]+ke,Ie[1],Ie[2]+ke,Ie[3]]):Ie[0]>H[0]&&Ie[2]>H[2]&&V.push([Ie[0]-ke,Ie[1],Ie[2]-ke,Ie[3]])}if(this.ready&&this.renderedResolution_==v&&this.renderedRevision_==_&&this.renderedRenderOrder_==P&&this.renderedFrameDeclutter_===!!e.declutter&&xg(this.wrappedRenderedExtent_,j))return tv(this.renderedExtent_,Q)||(this.hitDetectionImageData_=null,this.renderedExtent_=Q),this.renderedCenter_=F,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const G=new Eee(Mee(v,x),j,v,x);let Y;for(let ke=0,je=V.length;ke<je;++ke)i.loadFeatures(V[ke],v,m);const z=Z9(v,x);let se=!0;const le=((ke,je)=>{let Ie;const Qe=ke.getStyleFunction()||t.getStyleFunction();if(Qe&&(Ie=Qe(ke,v)),Ie){const tt=this.renderFeature(ke,z,Ie,G,Y,this.getLayer().getDeclutter(),je);se=se&&!tt}}),me=FP(j),fe=i.getFeaturesInExtent(me);P&&fe.sort(P);for(let ke=0,je=fe.length;ke<je;++ke)le(fe[ke],ke);this.renderedFeatures_=fe,this.ready=se;const _e=G.finish(),we=new Oee(j,v,x,i.getOverlaps(),_e,t.getRenderBuffer(),!!e.declutter);return this.renderedResolution_=v,this.renderedRevision_=_,this.renderedRenderOrder_=P,this.renderedFrameDeclutter_=!!e.declutter,this.renderedExtent_=Q,this.wrappedRenderedExtent_=j,this.renderedCenter_=F,this.renderedProjection_=m,this.renderedPixelRatio_=x,this.replayGroup_=we,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(e,t,i,r,o,s,a){if(!i)return!1;let c=!1;if(Array.isArray(i))for(let A=0,m=i.length;A<m;++A)c=Zw(r,e,i[A],t,this.boundHandleStyleImageChange_,o,s,a)||c;else c=Zw(r,e,i,t,this.boundHandleStyleImageChange_,o,s,a);return c}}class gU extends dU{constructor(e){super(e)}createRenderer(){return new sbe(this)}}class abe extends cU{constructor(e,t,i,r,o){const s=o!==void 0?zi.IDLE:zi.LOADED;super(e,t,i,s),this.loader_=o!==void 0?o:null,this.canvas_=r,this.error_=null}getError(){return this.error_}handleLoad_(e){e?(this.error_=e,this.state=zi.ERROR):this.state=zi.LOADED,this.changed()}load(){this.state==zi.IDLE&&(this.state=zi.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))}getImage(){return this.canvas_}}class nM extends W4{constructor(e,t,i){super(),i=i||{},this.tileCoord=e,this.state=t,this.key="",this.transition_=i.transition===void 0?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(Ir.CHANGE)}release(){this.setState(si.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(e){if(this.state!==si.EMPTY){if(this.state!==si.ERROR&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()}}load(){Dr()}getAlpha(e,t){if(!this.transition_)return 1;let i=this.transitionStarts_[e];if(!i)i=t,this.transitionStarts_[e]=i;else if(i===-1)return 1;const r=t-i+1e3/60;return r>=this.transition_?1:SJ(r/this.transition_)}inTransition(e){return this.transition_?this.transitionStarts_[e]!==-1:!1}endTransition(e){this.transition_&&(this.transitionStarts_[e]=-1)}disposeInternal(){this.release(),super.disposeInternal()}}class kee extends nM{constructor(e,t,i,r,o,s){super(e,t,s),this.crossOrigin_=r,this.src_=i,this.key=i,this.image_=new Image,r!==null&&(this.image_.crossOrigin=r),this.unlisten_=null,this.tileLoadFunction_=o}getImage(){return this.image_}setImage(e){this.image_=e,this.state=si.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=si.ERROR,this.unlistenImage_(),this.image_=lbe(),this.changed()}handleImageLoad_(){const e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=si.LOADED:this.state=si.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==si.ERROR&&(this.state=si.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==si.IDLE&&(this.state=si.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Vye(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}disposeInternal(){this.unlistenImage_(),this.image_=null,super.disposeInternal()}}function lbe(){const n=bl(1,1);return n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1),n.canvas}const IA={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class ube extends vm{constructor(e){super(),this.on,this.once,this.un,this.options=e,this.id=e.id,this.insertFirst=e.insertFirst!==void 0?e.insertFirst:!0,this.stopEvent=e.stopEvent!==void 0?e.stopEvent:!0,this.element=document.createElement("div"),this.element.className=e.className!==void 0?e.className:"ol-overlay-container "+T1e,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=e.autoPan===!0?{}:e.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(IA.ELEMENT,this.handleElementChanged),this.addChangeListener(IA.MAP,this.handleMapChanged),this.addChangeListener(IA.OFFSET,this.handleOffsetChanged),this.addChangeListener(IA.POSITION,this.handlePositionChanged),this.addChangeListener(IA.POSITIONING,this.handlePositioningChanged),e.element!==void 0&&this.setElement(e.element),this.setOffset(e.offset!==void 0?e.offset:[0,0]),this.setPositioning(e.positioning||"top-left"),e.position!==void 0&&this.setPosition(e.position)}getElement(){return this.get(IA.ELEMENT)}getId(){return this.id}getMap(){return this.get(IA.MAP)||null}getOffset(){return this.get(IA.OFFSET)}getPosition(){return this.get(IA.POSITION)}getPositioning(){return this.get(IA.POSITIONING)}handleElementChanged(){VJ(this.element);const e=this.getElement();e&&this.element.appendChild(e)}handleMapChanged(){this.mapPostrenderListenerKey&&(this.element?.remove(),Ea(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const e=this.getMap();if(e){this.mapPostrenderListenerKey=Zo(e,L0.POSTRENDER,this.render,this),this.updatePixelPosition();const t=this.stopEvent?e.getOverlayContainerStopEvent():e.getOverlayContainer();this.insertFirst?t.insertBefore(this.element,t.childNodes[0]||null):t.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(e){this.set(IA.ELEMENT,e)}setMap(e){this.set(IA.MAP,e)}setOffset(e){this.set(IA.OFFSET,e)}setPosition(e){this.set(IA.POSITION,e)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(e){const t=this.getMap();if(!t||!t.getTargetElement()||!this.get(IA.POSITION))return;const i=this.getRect(t.getTargetElement(),t.getSize()),r=this.getElement(),o=this.getRect(r,[D1e(r),P1e(r)]);e=e||{};const s=e.margin===void 0?20:e.margin;if(!xg(i,o)){const a=o[0]-i[0],c=i[2]-o[2],A=o[1]-i[1],m=i[3]-o[3],v=[0,0];if(a<0?v[0]=a-s:c<0&&(v[0]=Math.abs(c)+s),A<0?v[1]=A-s:m<0&&(v[1]=Math.abs(m)+s),v[0]!==0||v[1]!==0){const x=t.getView().getCenterInternal(),_=t.getPixelFromCoordinateInternal(x);if(!_)return;const O=[_[0]+v[0],_[1]+v[1]],P=e.animation||{};t.getView().animateInternal({center:t.getCoordinateFromPixelInternal(O),duration:P.duration,easing:P.easing})}}}getRect(e,t){const i=e.getBoundingClientRect(),r=i.left+window.pageXOffset,o=i.top+window.pageYOffset;return[r,o,r+t[0],o+t[1]]}setPositioning(e){this.set(IA.POSITIONING,e)}setVisible(e){this.rendered.visible!==e&&(this.element.style.display=e?"":"none",this.rendered.visible=e)}updatePixelPosition(){const e=this.getMap(),t=this.getPosition();if(!e||!e.isRendered()||!t){this.setVisible(!1);return}const i=e.getPixelFromCoordinate(t),r=e.getSize();this.updateRenderedPosition(i,r)}updateRenderedPosition(e,t){const i=this.element.style,r=this.getOffset(),o=this.getPositioning();this.setVisible(!0);const s=`${e[0]+r[0]}px`,a=`${e[1]+r[1]}px`;let c="0%",A="0%";o=="bottom-right"||o=="center-right"||o=="top-right"?c="-100%":(o=="bottom-center"||o=="center-center"||o=="top-center")&&(c="-50%"),o=="bottom-left"||o=="bottom-center"||o=="bottom-right"?A="-100%":(o=="center-left"||o=="center-center"||o=="center-right")&&(A="-50%");const m=`translate(${c}, ${A}) translate(${s}, ${a})`;this.rendered.transform_!=m&&(this.rendered.transform_=m,i.transform=m)}getOptions(){return this.options}}class yU{constructor(e,t,i,r){this.minX=e,this.maxX=t,this.minY=i,this.maxY=r}contains(e){return this.containsXY(e[1],e[2])}containsTileRange(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY}containsXY(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY}equals(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY}extend(e){e.minX<this.minX&&(this.minX=e.minX),e.maxX>this.maxX&&(this.maxX=e.maxX),e.minY<this.minY&&(this.minY=e.minY),e.maxY>this.maxY&&(this.maxY=e.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY}}function RC(n,e,t,i,r){return r!==void 0?(r.minX=n,r.maxX=e,r.minY=t,r.maxY=i,r):new yU(n,e,t,i)}const _j=[];class cbe extends nM{constructor(e,t,i,r,o){super(e,t,{transition:0}),this.context_=null,this.executorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=r.bind(void 0,this),this.removeSourceTiles_=o,this.wrappedTileCoord=i}getContext(){return this.context_||(this.context_=bl(1,1,_j)),this.context_}hasContext(){return!!this.context_}getImage(){return this.hasContext()?this.getContext().canvas:null}getReplayState(e){const t=$r(e);return t in this.replayState_||(this.replayState_[t]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[t]}load(){this.getSourceTiles()}release(){this.context_&&(V4(this.context_),_j.push(this.context_.canvas),this.context_=null),this.removeSourceTiles_(this),this.sourceTiles.length=0,super.release()}}let Tee=class extends nM{constructor(e,t,i,r,o,s){super(e,t,s),this.extent=null,this.format_=r,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=o,this.url_=i,this.key=i}getTileUrl(){return this.url_}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==si.IDLE&&(this.setState(si.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(e,t){this.setFeatures(e)}onError(){this.setState(si.ERROR)}setFeatures(e){this.features_=e,this.setState(si.LOADED)}setLoader(e){this.loader_=e}};const Ree="https://api.mapbox.com";function vU(n){const e="mapbox://";return n.indexOf(e)!==0?"":n.slice(e.length)}function Abe(n,e,t){if(typeof n=="string")return[{id:"default",url:xj(n,e,t)}];for(const i of n)i.url=xj(i.url,e,t);return n}function xj(n,e,t){const i=vU(n);if(!i)return decodeURI(new URL(n,t).href);const r="sprites/";if(i.indexOf(r)!==0)throw new Error(`unexpected sprites url: ${n}`);const o=i.slice(r.length);return`${Ree}/styles/v1/${o}/sprite?access_token=${e}`}function eS(n,e){const t=vU(n);if(!t)return decodeURI(new URL(n,location.href).href);const i="styles/";if(t.indexOf(i)!==0)throw new Error(`unexpected style url: ${n}`);const r=t.slice(i.length);return`${Ree}/styles/v1/${r}?&access_token=${e}`}const hbe=["a","b","c","d"];function H5(n,e,t,i){const r=new URL(n,i||location.href),o=vU(n);if(!o)return e?(r.searchParams.has(t)||r.searchParams.set(t,e),[decodeURI(r.href)]):[decodeURI(r.href)];if(o==="mapbox.satellite"){const s=window.devicePixelRatio>=1.5?"@2x":"";return[`https://api.mapbox.com/v4/${o}/{z}/{x}/{y}${s}.webp?access_token=${e}`]}return hbe.map(s=>`https://${s}.tiles.mapbox.com/v4/${o}/{z}/{x}/{y}.vector.pbf?access_token=${e}`)}const om=Object.freeze({}),Mj={},wj={};let dbe=0;function bU(n){return n.id||(n.id=dbe++),n.id}function fbe(n,e){return bU(n)+"."+$r(e)}function Dee(n){let e=Mj[n.id];return e||(e={},Mj[bU(n)]=e),e}function pbe(n){let e=wj[n.id];return e||(e={},wj[bU(n)]=e),e}function iB(n){return n*Math.PI/180}const Kg=(function(){const n=[];for(let e=78271.51696402048;n.length<=24;e/=2)n.push(e);return n})();function WE(n,e){if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof OffscreenCanvas<"u")return new OffscreenCanvas(n,e);const t=document.createElement("canvas");return t.width=n,t.height=e,t}function CU(n,e){let t=0;const i=e.length;for(;t<i;++t)if(e[t]<n&&t+1<i){const o=e[t]/e[t+1];return t+Math.log(e[t]/n)/Math.log(o)}return i-1}function P2(n,e){const t=Math.floor(n),i=Math.pow(2,n-t);return e[t]/i}const DC={};function lx(n,e,t={},i){if(e in DC)return i&&(i.url=DC[e][0].url),DC[e][1];const r=t.transformRequest&&t.transformRequest(e,n)||e,o=function(c){return delete DC[e],Promise.reject(new Error("Error fetching source "+e))},s=function(c){return delete DC[e],c.ok?c.json():Promise.reject(new Error("Error fetching source "+e))},a=nx(()=>r).then(c=>c instanceof Response?(i&&(i.url=c.url),s(c)):(c instanceof Request||(c=new Request(c)),c.headers.get("Accept")||c.headers.set("Accept","application/json"),i&&(i.url=c.url),fetch(c).then(s).catch(o))).catch(o);return DC[e]=[r,a],a}function Pee(n,e){if(typeof n=="string")if(n.trim().startsWith("{"))try{const t=JSON.parse(n);return Promise.resolve(t)}catch(t){return Promise.reject(t)}else return n=eS(n,e.accessToken),lx("Style",n,e);else return Promise.resolve(n)}const Sj={};function Uee(n,e,t={}){const i=[e,JSON.stringify(n)].toString();let r=Sj[i];if(!r||t.transformRequest){let o;t.transformRequest&&(o=(a,c)=>{const A=t.transformRequest&&t.transformRequest(c,"Tiles")||c;if(a instanceof Tee)a.setLoader((m,v,x)=>{const _=function(O){O.arrayBuffer().then(P=>{const j=a.getFormat().readFeatures(P,{extent:m,featureProjection:x});a.setFeatures(j)})};nx(()=>A).then(O=>{if(O instanceof Response)return _(O);fetch(O).then(_).catch(P=>a.setState(si.ERROR))}).catch(O=>a.setState(si.ERROR))});else{const m=a.getImage();nx(()=>A).then(v=>{if(typeof v=="string"){m.src=v;return}const x=_=>_.blob().then(O=>{const P=URL.createObjectURL(O);m.addEventListener("load",()=>URL.revokeObjectURL(P)),m.addEventListener("error",()=>URL.revokeObjectURL(P)),m.src=P});if(v instanceof Response)return x(v);fetch(v).then(x).catch(_=>a.setState(si.ERROR))}).catch(v=>a.setState(si.ERROR))}});const s=n.url;if(s&&!n.tiles){const a=H5(s,t.accessToken,t.accessTokenParam||"access_token",e||location.href);if(s.startsWith("mapbox://"))r=Promise.resolve({tileJson:Object.assign({},n,{url:void 0,tiles:a}),tileLoadFunction:o});else{const c={};r=lx("Source",a[0],t,c).then(function(A){return A.tiles=A.tiles.map(function(m){return A.scheme==="tms"&&(m=m.replace("{y}","{-y}")),H5(m,t.accessToken,t.accessTokenParam||"access_token",c.url)[0]}),Promise.resolve({tileJson:A,tileLoadFunction:o})})}}else n.tiles?(n=Object.assign({},n,{tiles:n.tiles.map(function(a){return n.scheme==="tms"&&(a=a.replace("{y}","{-y}")),H5(a,t.accessToken,t.accessTokenParam||"access_token",e||location.href)[0]})}),r=Promise.resolve({tileJson:Object.assign({},n),tileLoadFunction:o})):r=Promise.reject(new Error("source has no `tiles` nor `url`"));Sj[i]=r}return r}function Ej(n,e,t,i){const r=[2*t*e.pixelRatio+e.width,2*t*e.pixelRatio+e.height],o=WE(r[0],r[1]),s=o.getContext("2d");s.drawImage(n,e.x,e.y,e.width,e.height,t*e.pixelRatio,t*e.pixelRatio,e.width,e.height);const a=s.getImageData(0,0,r[0],r[1]);s.globalCompositeOperation="destination-over",s.fillStyle=`rgba(${i.r*255},${i.g*255},${i.b*255},${i.a})`;const c=a.data;for(let A=0,m=a.width;A<m;++A)for(let v=0,x=a.height;v<x;++v){const _=(v*m+A)*4;c[_+3]>0&&s.arc(A,v,t*e.pixelRatio,0,2*Math.PI)}return s.fill(),o}function mbe(n,e,t){const i=Math.max(0,Math.min(1,(t-n)/(e-n)));return i*i*(3-2*i)}function Oj(n,e,t){const i=WE(e.width,e.height),r=i.getContext("2d");r.drawImage(n,e.x,e.y,e.width,e.height,0,0,e.width,e.height);const o=r.getImageData(0,0,e.width,e.height),s=o.data;for(let a=0,c=o.width;a<c;++a)for(let A=0,m=o.height;A<m;++A){const v=(A*c+a)*4,x=s[v+3]/255,_=.75,O=.1,P=mbe(_-O,_+O,x);P>0?(s[v+0]=Math.round(255*t.r*P),s[v+1]=Math.round(255*t.g*P),s[v+2]=Math.round(255*t.b*P),s[v+3]=Math.round(255*P)):s[v+3]=0}return r.putImageData(o,0,0),i}const gbe=Array(256).join("");function X9(n,e){if(e>=.05){let t="";const i=n.split(`
`),r=gbe.slice(0,Math.round(e/.1));for(let o=0,s=i.length;o<s;++o)o>0&&(t+=`
`),t+=i[o].split("").join(r);return t}return n}let rB;function Kee(){return rB||(rB=WE(1,1).getContext("2d")),rB}function jv(n,e){return Kee().measureText(n).width+(n.length-1)*e}const tS={};$v.on("propertychange",()=>{for(const n in tS)delete tS[n]});function J9(n,e,t,i){if(n.indexOf(`
`)!==-1){const s=n.split(`
`),a=[];for(let c=0,A=s.length;c<A;++c)a.push(J9(s[c],e,t,i));return a.join(`
`)}const r=t+","+e+","+n+","+i;let o=tS[r];if(!o){const s=n.split(" ");if(s.length>1){const a=Kee();a.font=e;const A=a.measureText("M").width*t;let m="";const v=[];for(let x=0,_=s.length;x<_;++x){const O=s[x],P=m+(m?" ":"")+O;jv(P,i)<=A?m=P:(m&&v.push(m),m=O)}m&&v.push(m);for(let x=0,_=v.length;x<_&&_>1;++x){const O=v[x];if(jv(O,i)<A*.35){const P=x>0?jv(v[x-1],i):1/0,F=x<_-1?jv(v[x+1],i):1/0;v.splice(x,1),_-=1,P<F?(v[x-1]+=" "+O,x-=1):v[x]=O+" "+v[x]}}for(let x=0,_=v.length-1;x<_;++x){const O=v[x],P=v[x+1];if(jv(O,i)>A*.7&&jv(P,i)<A*.6){const F=O.split(" "),j=F.pop();jv(j,i)<A*.2&&(v[x]=F.join(" "),v[x+1]=j+" "+P),_-=1}}o=v.join(`
`)}else o=n;o=X9(o,i),tS[r]=o}return o}const ybe=["Arial","Courier New","Times New Roman","Verdana","sans-serif","serif","monospace","cursive","fantasy"],Bj={};function vbe(n,e="https://cdn.jsdelivr.net/npm/@fontsource/{font-family}/{fontweight}{-fontstyle}.css"){let t;for(let i=0,r=n.length;i<r;++i){const o=n[i];if(o in Bj)continue;Bj[o]=!0;const a=I9(o,16).split(" ");t||(t=[]),t.push([a.slice(3).join(" ").replace(/"/g,""),a[1],a[0]])}return t&&(async()=>{await document.fonts.ready;for(let i=0,r=t.length;i<r;++i){const o=t[i],s=o[0];if(ybe.includes(s))continue;const a=o[1],c=o[2];if(!(await document.fonts.load(`${c} ${a} 16px "${s}"`)).some(m=>m.family.replace(/^['"]|['"]$/g,"").toLowerCase()===s.toLowerCase()&&m.weight==a&&m.style===c)){const m=e.replace("{font-family}",s.replace(/ /g,"-").toLowerCase()).replace("{Font+Family}",s.replace(/ /g,"+")).replace("{fontweight}",a).replace("{-fontstyle}",c.replace("normal","").replace(/(.+)/,"-$1")).replace("{fontstyle}",c);if(!document.querySelector('link[href="'+m+'"]')){const v=document.createElement("link");v.href=m,v.rel="stylesheet",document.head.appendChild(v)}}}})(),n}const bbe={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},Cbe={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},_be=function(n,e){const t=Kge(n,e);if(t.result==="error")throw new Error(t.value.map(i=>`${i.key}: ${i.message}`).join(", "));return t.value},af={zoom:0,distanceFromCenter:0};nf.register(_E,{...nf.definitions,pitch:[{kind:"number"},[],n=>af.pitch||90],"distance-from-center":[{kind:"number"},[],n=>af.distanceFromCenter||0]});let qM,oB;function $i(n,e,t,i,r,o){const s=n.id;r||(r={},console.warn("No functionCache provided to getValue()")),r[s]||(r[s]={});const a=r[s];if(!a[t]){let c=(n[e]||om)[t];const A=Hge[`${e}_${n.type}`][t];c===void 0&&(c=A.default);let m=Uge(c);if(!m&&uJ(c)&&(c=Wge(c,A),m=!0),m){const v=_be(c,A);a[t]=v.evaluate.bind(v)}else A.type=="color"&&(c=Zs.parse(c)),a[t]=function(){return c}}return a[t](af,i,o)}function Ij(n,e,t,i){return $i(n,"layout",`${t}-allow-overlap`,e,i)?$i(n,"layout",`${t}-ignore-placement`,e,i)?"none":"obstacle":"declutter"}function xbe(n,e,t,i){if(i||console.warn("No filterCache provided to evaluateFilter()"),!(n in i))try{i[n]=jge(e).filter}catch(r){console.warn("Filter will evaluate to false: "+r.message),i[n]=function(){return!1}}return i[n](af,t)}function gy(n,e){if(n){if(n.a===0||e===0)return;const t=n.a;return e=e===void 0?1:e,t===0?"transparent":"rgba("+Math.round(n.r*255/t)+","+Math.round(n.g*255/t)+","+Math.round(n.b*255/t)+","+t*e+")"}return n}const Mbe=/\{[^{}}]*\}/g;function sB(n,e){return n.replace(Mbe,function(t){return e[t.slice(1,-1)]||""})}function kj(n,e){let t=n.split(":")[0];return t===n&&(t="default"),e[t]}const wbe={};function Sbe(n,e,t,i=Kg,r=void 0,o=void 0,s=void 0,a=void 0){if(typeof e=="string"&&(e=JSON.parse(e)),e.version!=8)throw new Error("glStyle version 8 required.");wbe[fbe(e,n)]=Array.from(arguments);const c={};(typeof o=="string"||o instanceof Request||o instanceof Response||o instanceof Promise)&&(o={default:o});for(const G in o){const Y=o[G];nx(()=>Y).then(async z=>{let se;if(typeof Image<"u"){const le=new Image;if(typeof z=="string")le.crossOrigin="anonymous",le.src=z;else{let me;z instanceof Request?me=await fetch(z):z instanceof Response&&(me=z);const fe=await me.blob();se=URL.createObjectURL(fe),le.src=se}le.addEventListener("load",function me(){le.removeEventListener("load",me),c[G]={image:le,size:[le.width,le.height]},n.changed(),se&&URL.revokeObjectURL(se)}),le.addEventListener("error",function me(){URL.revokeObjectURL(se),le.removeEventListener("error",me)})}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){const le=self;le.postMessage({action:"loadImage",src:z}),le.addEventListener("message",function(fe){fe.data.action==="imageLoaded"&&fe.data.src===z&&(c[G]={image:fe.data.image,size:[fe.data.image.width,fe.data.image.height]})})}})}const A=GX(e.layers),m={},v=[],x={},_={},O=Dee(e),P=pbe(e);let F;for(let G=0,Y=A.length;G<Y;++G){const z=A[G],se=z.id;if(typeof t=="string"&&z.source==t||Array.isArray(t)&&t.indexOf(se)!==-1){const le=z["source-layer"];if(F){if(z.source!==F)throw new Error(`Layer "${se}" does not use source "${F}`)}else{F=z.source;const fe=e.sources[F];if(!fe)throw new Error(`Source "${F}" is not defined`);const _e=fe.type;if(_e!=="vector"&&_e!=="geojson")throw new Error(`Source "${F}" is not of type "vector" or "geojson", but "${_e}"`)}let me=m[le];me||(me=[],m[le]=me),me.push({layer:z,index:G}),v.push(se)}}const j=new Iy,Q=new G0,V=[],H=function(G,Y,z){const se=n.getSource?.()?.format_?.layerName_??"mvt:layer",le=G.getProperties(),me=m[le[se]];if(!me)return;let fe=i.indexOf(Y);fe==-1&&(fe=CU(Y,i)),af.zoom=fe,af.distanceFromCenter=0;const _e=G.getGeometry(),we=bbe[_e.getType()],ke=n.get("map");if(ke&&ke instanceof NE&&we===1){const tt=ke.getSize();if(tt){const ht=ke.getView().getCenter(),ce=lf(_e.getExtent());af.distanceFromCenter=_0e(ht,ce)/Y/tt[1]}}const je={id:G.getId(),properties:le,type:we},Ie=n.get("mapbox-featurestate")[G.getId()];let Qe=-1;for(let tt=0,ht=me.length;tt<ht;++tt){const ce=me[tt],Le=ce.layer,We=Le.id;if(z!==void 0&&z!==We)continue;const Me=Le.layout||om,dt=Le.paint||om;if(Me.visibility==="none"||"minzoom"in Le&&fe<Le.minzoom||"maxzoom"in Le&&fe>=Le.maxzoom)continue;const it=Le.filter;if(!it||xbe(We,it,je,P)){let vt,Ut,Pe,Te,Se,Ne;const ut=ce.index;if(we==3&&(Le.type=="fill"||Le.type=="fill-extrusion"))if(Ut=$i(Le,"paint",Le.type+"-opacity",je,O,Ie),Le.type+"-pattern"in dt){const In=$i(Le,"paint",Le.type+"-pattern",je,O,Ie);if(In){const It=typeof In=="string"?sB(In,le):In.toString(),xe=kj(It,c);if(r&&r[It]&&xe){++Qe,Ne=V[Qe],(!Ne||!Ne.getFill()||Ne.getStroke()||Ne.getText())&&(Ne=new Hd({fill:new G0}),V[Qe]=Ne),Pe=Ne.getFill(),Ne.setZIndex(ut);const oe=It+"."+Ut;let J=_[oe];if(!J){const ne=r[It],ue=WE(ne.width,ne.height),Ce=ue.getContext("2d");Ce.globalAlpha=Ut,Ce.drawImage(xe.image,ne.x,ne.y,ne.width,ne.height,0,0,ne.width,ne.height),J=Ce.createPattern(ue,"repeat"),_[oe]=J}Pe.setColor(J)}}}else vt=gy($i(Le,"paint",Le.type+"-color",je,O,Ie),Ut),Le.type+"-outline-color"in dt&&(Se=gy($i(Le,"paint",Le.type+"-outline-color",je,O,Ie),Ut)),Se||(Se=vt),(vt||Se)&&(++Qe,Ne=V[Qe],(!Ne||vt&&!Ne.getFill()||!vt&&Ne.getFill()||Se&&!Ne.getStroke()||!Se&&Ne.getStroke()||Ne.getText())&&(Ne=new Hd({fill:vt?new G0:void 0,stroke:Se?new Iy:void 0}),V[Qe]=Ne),vt&&(Pe=Ne.getFill(),Pe.setColor(vt)),Se&&(Te=Ne.getStroke(),Te.setColor(Se),Te.setWidth(.5)),Ne.setZIndex(ut));if(we!=1&&Le.type=="line"){"line-pattern"in dt?vt=void 0:vt=gy($i(Le,"paint","line-color",je,O,Ie),$i(Le,"paint","line-opacity",je,O,Ie));const In=$i(Le,"paint","line-width",je,O,Ie);vt&&In>0&&(++Qe,Ne=V[Qe],(!Ne||!Ne.getStroke()||Ne.getFill()||Ne.getText())&&(Ne=new Hd({stroke:new Iy}),V[Qe]=Ne),Te=Ne.getStroke(),Te.setLineCap($i(Le,"layout","line-cap",je,O,Ie)),Te.setLineJoin($i(Le,"layout","line-join",je,O,Ie)),Te.setMiterLimit($i(Le,"layout","line-miter-limit",je,O,Ie)),Te.setColor(vt),Te.setWidth(In),Te.setLineDash(dt["line-dasharray"]?$i(Le,"paint","line-dasharray",je,O,Ie).map(function(It){return It*In}):null),Ne.setZIndex(ut))}let rt=!1,mt=null,Rt=0,Bt,$t,Rn;if((we==1||we==2)&&"icon-image"in Me){const In=$i(Le,"layout","icon-image",je,O,Ie);if(In){Bt=typeof In=="string"?sB(In,le):In.toString();let It;const xe=a?a(n,Bt):void 0,oe=kj(Bt,c);if(r&&r[Bt]&&oe||xe){const J=$i(Le,"layout","icon-rotation-alignment",je,O,Ie);if(we==2){const ne=G.getGeometry();if(ne.getFlatMidpoint||ne.getFlatMidpoints){const ue=ne.getExtent();if(Math.sqrt(Math.max(Math.pow((ue[2]-ue[0])/Y,2),Math.pow((ue[3]-ue[1])/Y,2)))>150){const Ue=ne.getType()==="MultiLineString"?ne.getFlatMidpoints():ne.getFlatMidpoint();if(oB||(qM=[NaN,NaN],oB=new DA("Point",qM,[],2,{},void 0)),It=oB,qM[0]=Ue[0],qM[1]=Ue[1],$i(Le,"layout","symbol-placement",je,O,Ie)==="line"&&J==="map"){const lt=ne.getStride(),be=ne.getFlatCoordinates();for(let Ee=0,y=be.length-lt;Ee<y;Ee+=lt){const gt=be[Ee],Mt=be[Ee+1],Dt=be[Ee+lt],ot=be[Ee+lt+1],bn=Math.min(gt,Dt),Gn=Math.max(gt,Dt),yn=Ue[0],qn=Ue[1],$n=(ot-Mt)*(yn-gt)-(Dt-gt)*(qn-Mt);if(Math.abs($n)<.001&&yn<=Gn&&yn>=bn){Rt=Math.atan2(Mt-ot,Dt-gt);break}}}}}}if(we!==2||It){const ne=$i(Le,"layout","icon-size",je,O,Ie),ue=dt["icon-color"]!==void 0?$i(Le,"paint","icon-color",je,O,Ie):null;if(!ue||ue.a!==0){const Ce=$i(Le,"paint","icon-halo-color",je,O,Ie),Ue=$i(Le,"paint","icon-halo-width",je,O,Ie);let He=`${Bt}.${ne}.${Ue}.${Ce}`;if(ue!==null&&(He+=`.${ue}`),$t=x[He],!$t){const lt=Ij(Le,je,"icon",O);let be;"icon-offset"in Me&&(be=$i(Le,"layout","icon-offset",je,O,Ie).slice(0),be[0]*=ne,be[1]*=-ne);let Ee=ue?[ue.r*255,ue.g*255,ue.b*255,ue.a]:void 0;if(xe){const y={color:Ee,rotateWithView:J==="map",displacement:be,declutterMode:lt,scale:ne};typeof xe=="string"?y.src=xe:(y.img=xe,y.imgSize=[xe.width,xe.height]),$t=new ax(y)}else{const y=r[Bt];let gt,Mt,Dt;if(Ue)y.sdf?(gt=Ej(Oj(oe.image,y,ue||[0,0,0,1]),{x:0,y:0,width:y.width,height:y.height,pixelRatio:y.pixelRatio},Ue,Ce),Ee=void 0):gt=Ej(oe.image,y,Ue,Ce);else{if(y.sdf&&!oe.unSDFed){const ot=Oj(oe.image,{x:0,y:0,width:oe.size[0],height:oe.size[1]},{r:1,g:1,b:1});oe.image=ot,oe.unSDFed=!0}gt=oe.image,Mt=[y.width,y.height],Dt=[y.x,y.y]}$t=new ax({color:Ee,img:gt,imgSize:oe.size,size:Mt,offset:Dt,rotateWithView:J==="map",scale:ne/y.pixelRatio,displacement:be,declutterMode:lt})}x[He]=$t}}$t&&(++Qe,Ne=V[Qe],(!Ne||!Ne.getImage()||Ne.getFill()||Ne.getStroke())&&(Ne=new Hd,V[Qe]=Ne),Ne.setGeometry(It),$t.setRotation(Rt+iB($i(Le,"layout","icon-rotate",je,O,Ie))),$t.setOpacity($i(Le,"paint","icon-opacity",je,O,Ie)),$t.setAnchor(Cbe[$i(Le,"layout","icon-anchor",je,O,Ie)]),Ne.setImage($t),mt=Ne.getText(),Ne.setText(void 0),Ne.setZIndex(ut),rt=!0,Rn=!1)}else Rn=!0}}}if(we==1&&Le.type==="circle"){++Qe,Ne=V[Qe],(!Ne||!Ne.getImage()||Ne.getFill()||Ne.getStroke())&&(Ne=new Hd,V[Qe]=Ne);const In="circle-radius"in dt?$i(Le,"paint","circle-radius",je,O,Ie):5,It=gy($i(Le,"paint","circle-stroke-color",je,O,Ie),$i(Le,"paint","circle-stroke-opacity",je,O,Ie)),xe=$i(Le,"paint","circle-translate",je,O,Ie),oe=gy($i(Le,"paint","circle-color",je,O,Ie),$i(Le,"paint","circle-opacity",je,O,Ie)),J=$i(Le,"paint","circle-stroke-width",je,O,Ie),ne=In+"."+It+"."+oe+"."+J+"."+xe[0]+"."+xe[1];$t=x[ne],$t||($t=new X4({radius:In,displacement:[xe[0],-xe[1]],stroke:It&&J>0?new Iy({width:J,color:It}):void 0,fill:oe?new G0({color:oe}):void 0,declutterMode:"none"}),x[ne]=$t),Ne.setImage($t),mt=Ne.getText(),Ne.setText(void 0),Ne.setGeometry(void 0),Ne.setZIndex(ut),rt=!0}let zn,ai,_n,Bn,dn,li;if("text-field"in Me){Bn=Math.round($i(Le,"layout","text-size",je,O,Ie));const In=$i(Le,"layout","text-font",je,O,Ie);_n=$i(Le,"layout","text-line-height",je,O,Ie),ai=I9(s?s(In,e.metadata?e.metadata["ol:webfonts"]:void 0):In,Bn,_n),ai.includes("sans-serif")||(ai+=",sans-serif"),dn=$i(Le,"layout","text-letter-spacing",je,O,Ie),li=$i(Le,"layout","text-max-width",je,O,Ie);const It=$i(Le,"layout","text-field",je,O,Ie);typeof It=="object"&&It.sections?It.sections.length===1?zn=It.toString():zn=It.sections.reduce((xe,oe,J)=>{const ne=oe.fontStack?oe.fontStack.split(","):In,ue=I9(s?s(ne):ne,Bn*(oe.scale||1),_n);let Ce=oe.text;if(Ce===`
`)return xe.push(`
`,""),xe;if(we==2)return xe.push(X9(Ce,dn),ue),xe;Ce=J9(Ce,ue,li,dn).split(`
`);for(let Ue=0,He=Ce.length;Ue<He;++Ue)Ue>0&&xe.push(`
`,""),xe.push(Ce[Ue],ue);return xe},[]):zn=sB(It,le).trim(),Ut=$i(Le,"paint","text-opacity",je,O,Ie)}if(zn&&Ut&&!Rn){rt||(++Qe,Ne=V[Qe],(!Ne||!Ne.getText()||Ne.getFill()||Ne.getStroke())&&(Ne=new Hd,V[Qe]=Ne),Ne.setImage(void 0),Ne.setGeometry(void 0));const In=Ij(Le,je,"text",O);Ne.getText()||Ne.setText(mt),mt=Ne.getText(),(!mt||"getDeclutterMode"in mt&&mt.getDeclutterMode()!==In)&&(mt=new hee({padding:[2,2,2,2],declutterMode:In}),Ne.setText(mt));const It=$i(Le,"layout","text-transform",je,O,Ie);It=="uppercase"?zn=Array.isArray(zn)?zn.map((Dt,ot)=>ot%2?Dt:Dt.toUpperCase()):zn.toUpperCase():It=="lowercase"&&(zn=Array.isArray(zn)?zn.map((Dt,ot)=>ot%2?Dt:Dt.toLowerCase()):zn.toLowerCase());const xe=Array.isArray(zn)?zn:we==2?X9(zn,dn):J9(zn,ai,li,dn);if(mt.setText(xe),mt.setFont(ai),mt.setRotation(iB($i(Le,"layout","text-rotate",je,O,Ie))),typeof mt.setKeepUpright=="function"){const Dt=$i(Le,"layout","text-keep-upright",je,O,Ie);mt.setKeepUpright(Dt)}const oe=$i(Le,"layout","text-anchor",je,O,Ie),J=rt||we==1?"point":$i(Le,"layout","symbol-placement",je,O,Ie);let ne;if(J==="line-center"?(mt.setPlacement("line"),ne="center"):mt.setPlacement(J),J==="line"&&typeof mt.setRepeat=="function"){const Dt=$i(Le,"layout","symbol-spacing",je,O,Ie);mt.setRepeat(Dt*2)}mt.setOverflow(J==="point");let ue=$i(Le,"paint","text-halo-width",je,O,Ie);const Ce=$i(Le,"layout","text-offset",je,O,Ie),Ue=$i(Le,"paint","text-translate",je,O,Ie);let He=0,lt=0;if(J=="point"){ne="center",oe.indexOf("left")!==-1?(ne="left",lt=ue):oe.indexOf("right")!==-1&&(ne="right",lt=-ue);const Dt=$i(Le,"layout","text-rotation-alignment",je,O,Ie);mt.setRotateWithView(Dt=="map")}else mt.setMaxAngle(iB($i(Le,"layout","text-max-angle",je,O,Ie))*zn.length/xe.length),mt.setRotateWithView(!1);mt.setTextAlign(ne);let be="middle";oe.indexOf("bottom")==0?(be="bottom",He=-ue-.5*(_n-1)*Bn):oe.indexOf("top")==0&&(be="top",He=ue+.5*(_n-1)*Bn),mt.setTextBaseline(be);const Ee=$i(Le,"layout","text-justify",je,O,Ie);mt.setJustify(Ee==="auto"?void 0:Ee),mt.setOffsetX(Ce[0]*Bn+lt+Ue[0]),mt.setOffsetY(Ce[1]*Bn+He+Ue[1]),Q.setColor(gy($i(Le,"paint","text-color",je,O,Ie),Ut)),mt.setFill(Q);const y=gy($i(Le,"paint","text-halo-color",je,O,Ie),Ut);if(y&&ue>0){j.setColor(y),ue*=2;const Dt=.5*Bn;j.setWidth(ue<=Dt?ue:Dt),mt.setStroke(j)}else mt.setStroke(void 0);const gt=$i(Le,"layout","text-padding",je,O,Ie),Mt=mt.getPadding();gt!==Mt[0]&&(Mt[0]=gt,Mt[1]=gt,Mt[2]=gt,Mt[3]=gt),Ne.setZIndex(ut)}}}if(Qe>-1)return V.length=Qe+1,V};return n.setStyle(H),n.set("mapbox-layers",v),n.set("mapbox-source",F),n.set("mapbox-featurestate",n.get("mapbox-featurestate")||{}),H}class Lee{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=GE,this.supportedMediaTypes=null}getReadOptions(e,t){if(t){let i=t.dataProjection?Xs(t.dataProjection):this.readProjection(e);t.extent&&i&&i.getUnits()==="tile-pixels"&&(i=Xs(i),i.setWorldExtent(t.extent)),t={dataProjection:i,featureProjection:t.featureProjection}}return this.adaptOptions(t)}adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},e)}getType(){return Dr()}readFeature(e,t){return Dr()}readFeatures(e,t){return Dr()}readGeometry(e,t){return Dr()}readProjection(e){return Dr()}writeFeature(e,t){return Dr()}writeFeatures(e,t){return Dr()}writeGeometry(e,t){return Dr()}}function QE(n,e,t){const i=t?Xs(t.featureProjection):null,r=t?Xs(t.dataProjection):null;let o=n;if(i&&r&&!Ny(i,r)){e&&(o=n.clone());const s=e?i:r,a=e?r:i;s.getUnits()==="tile-pixels"?o.transform(s,a):o.applyTransform(j3(s,a))}if(e&&t&&t.decimals!==void 0){const s=Math.pow(10,t.decimals),a=function(c){for(let A=0,m=c.length;A<m;++A)c[A]=Math.round(c[A]*s)/s;return c};o===n&&(o=n.clone()),o.applyTransform(a)}return o}const Ebe={Point:Eb,LineString:Bb,Polygon:e1,MultiPoint:eM,MultiLineString:H3,MultiPolygon:Z3};function Obe(n,e,t){return Array.isArray(e[0])?(qJ(n,0,e,t)||(n=n.slice(),G9(n,0,e,t)),n):(HP(n,0,e,t)||(n=n.slice(),Ww(n,0,e,t)),n)}function Fee(n,e){const t=n.geometry;if(!t)return[];if(Array.isArray(t))return t.map(o=>Fee({...n,geometry:o})).flat();const i=t.type==="MultiPolygon"?"Polygon":t.type;if(i==="GeometryCollection"||i==="Circle")throw new Error("Unsupported geometry type: "+i);const r=t.layout.length;return QE(new DA(i,i==="Polygon"?Obe(t.flatCoordinates,t.ends,r):t.flatCoordinates,t.ends?.flat(),r,n.properties||{},n.id).enableSimplifyTransformed(),!1,e)}function _U(n,e){if(!n)return null;if(Array.isArray(n)){const i=n.map(r=>_U(r,e));return new Hw(i)}const t=Ebe[n.type];return QE(new t(n.flatCoordinates,n.layout||"XY",n.ends),!1,e)}class Bbe extends Lee{constructor(){super()}getType(){return"json"}readFeature(e,t){return this.readFeatureFromObject(YM(e),this.getReadOptions(e,t))}readFeatures(e,t){return this.readFeaturesFromObject(YM(e),this.getReadOptions(e,t))}readFeatureFromObject(e,t){return Dr()}readFeaturesFromObject(e,t){return Dr()}readGeometry(e,t){return this.readGeometryFromObject(YM(e),this.getReadOptions(e,t))}readGeometryFromObject(e,t){return Dr()}readProjection(e){return this.readProjectionFromObject(YM(e))}readProjectionFromObject(e){return Dr()}writeFeature(e,t){return JSON.stringify(this.writeFeatureObject(e,t))}writeFeatureObject(e,t){return Dr()}writeFeatures(e,t){return JSON.stringify(this.writeFeaturesObject(e,t))}writeFeaturesObject(e,t){return Dr()}writeGeometry(e,t){return JSON.stringify(this.writeGeometryObject(e,t))}writeGeometryObject(e,t){return Dr()}}function YM(n){if(typeof n=="string"){const e=JSON.parse(n);return e||null}return n!==null?n:null}class Tj extends Bbe{constructor(e){e=e||{},super(),this.dataProjection=Xs(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=Xs(e.featureProjection)),e.featureClass&&(this.featureClass=e.featureClass),this.geometryName_=e.geometryName,this.extractGeometryName_=e.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(e,t){let i=null;e.type==="Feature"?i=e:i={type:"Feature",geometry:e,properties:null};const r=xU(i.geometry);if(this.featureClass===DA)return Fee({geometry:r,id:i.id,properties:i.properties},t);const o=new GE;return this.geometryName_?o.setGeometryName(this.geometryName_):this.extractGeometryName_&&i.geometry_name&&o.setGeometryName(i.geometry_name),o.setGeometry(_U(r,t)),"id"in i&&o.setId(i.id),i.properties&&o.setProperties(i.properties,!0),o}readFeaturesFromObject(e,t){const i=e;let r=null;if(i.type==="FeatureCollection"){const o=e;r=[];const s=o.features;for(let a=0,c=s.length;a<c;++a){const A=this.readFeatureFromObject(s[a],t);A&&r.push(A)}}else r=[this.readFeatureFromObject(e,t)];return r.flat()}readGeometryFromObject(e,t){return Ibe(e,t)}readProjectionFromObject(e){const t=e.crs;let i;if(t)if(t.type=="name")i=Xs(t.properties.name);else if(t.type==="EPSG")i=Xs("EPSG:"+t.properties.code);else throw new Error("Unknown SRS type");else i=this.dataProjection;return i}writeFeatureObject(e,t){t=this.adaptOptions(t);const i={type:"Feature",geometry:null,properties:null},r=e.getId();if(r!==void 0&&(i.id=r),!e.hasProperties())return i;const o=e.getProperties(),s=e.getGeometry();return s&&(i.geometry=eR(s,t),delete o[e.getGeometryName()]),qy(o)||(i.properties=o),i}writeFeaturesObject(e,t){t=this.adaptOptions(t);const i=[];for(let r=0,o=e.length;r<o;++r)i.push(this.writeFeatureObject(e[r],t));return{type:"FeatureCollection",features:i}}writeGeometryObject(e,t){return eR(e,this.adaptOptions(t))}}function xU(n,e){if(!n)return null;let t;switch(n.type){case"Point":{t=Tbe(n);break}case"LineString":{t=Rbe(n);break}case"Polygon":{t=Kbe(n);break}case"MultiPoint":{t=Pbe(n);break}case"MultiLineString":{t=Dbe(n);break}case"MultiPolygon":{t=Ube(n);break}case"GeometryCollection":{t=kbe(n);break}default:throw new Error("Unsupported GeoJSON type: "+n.type)}return t}function Ibe(n,e){const t=xU(n);return _U(t,e)}function kbe(n,e){return n.geometries.map(function(i){return xU(i)})}function Tbe(n){const e=n.coordinates;return{type:"Point",flatCoordinates:e,layout:jb(e.length)}}function Rbe(n){const e=n.coordinates,t=e.flat();return{type:"LineString",flatCoordinates:t,ends:[t.length],layout:jb(e[0]?.length||2)}}function Dbe(n){const e=n.coordinates,t=e[0]?.[0]?.length||2,i=[],r=$4(i,0,e,t);return{type:"MultiLineString",flatCoordinates:i,ends:r,layout:jb(t)}}function Pbe(n){const e=n.coordinates;return{type:"MultiPoint",flatCoordinates:e.flat(),layout:jb(e[0]?.length||2)}}function Ube(n){const e=n.coordinates,t=[],i=e[0]?.[0]?.[0].length||2,r=zJ(t,0,e,i);return{type:"MultiPolygon",flatCoordinates:t,ends:r,layout:jb(i)}}function Kbe(n){const e=n.coordinates,t=[],i=e[0]?.[0]?.length,r=$4(t,0,e,i);return{type:"Polygon",flatCoordinates:t,ends:r,layout:jb(i)}}function eR(n,e){n=QE(n,!0,e);const t=n.getType();let i;switch(t){case"Point":{i=Gbe(n);break}case"LineString":{i=Fbe(n);break}case"Polygon":{i=Wbe(n,e);break}case"MultiPoint":{i=jbe(n);break}case"MultiLineString":{i=zbe(n);break}case"MultiPolygon":{i=Nbe(n,e);break}case"GeometryCollection":{i=Lbe(n,e);break}case"Circle":{i={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+t)}return i}function Lbe(n,e){return e=Object.assign({},e),delete e.featureProjection,{type:"GeometryCollection",geometries:n.getGeometriesArray().map(function(i){return eR(i,e)})}}function Fbe(n,e){return{type:"LineString",coordinates:n.getCoordinates()}}function zbe(n,e){return{type:"MultiLineString",coordinates:n.getCoordinates()}}function jbe(n,e){return{type:"MultiPoint",coordinates:n.getCoordinates()}}function Nbe(n,e){let t;return e&&(t=e.rightHanded),{type:"MultiPolygon",coordinates:n.getCoordinates(t)}}function Gbe(n,e){return{type:"Point",coordinates:n.getCoordinates()}}function Wbe(n,e){let t;return e&&(t=e.rightHanded),{type:"Polygon",coordinates:n.getCoordinates(t)}}const tR=65536*65536,Rj=1/tR,Qbe=12,Dj=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),aB=0,$M=1,o2=2,VM=5;class qbe{constructor(e=new Uint8Array(16)){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(e,t,i=this.length){for(;this.pos<i;){const r=this.readVarint(),o=r>>3,s=this.pos;this.type=r&7,e(o,t,this),this.pos===s&&this.skip(r)}return t}readMessage(e,t){return this.readFields(e,t,this.readVarint()+this.pos)}readFixed32(){const e=this.dataView.getUint32(this.pos,!0);return this.pos+=4,e}readSFixed32(){const e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}readFixed64(){const e=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*tR;return this.pos+=8,e}readSFixed64(){const e=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*tR;return this.pos+=8,e}readFloat(){const e=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,e}readDouble(){const e=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,e}readVarint(e){const t=this.buf;let i,r;return r=t[this.pos++],i=r&127,r<128||(r=t[this.pos++],i|=(r&127)<<7,r<128)||(r=t[this.pos++],i|=(r&127)<<14,r<128)||(r=t[this.pos++],i|=(r&127)<<21,r<128)?i:(r=t[this.pos],i|=(r&15)<<28,Ybe(i,e,this))}readVarint64(){return this.readVarint(!0)}readSVarint(){const e=this.readVarint();return e%2===1?(e+1)/-2:e/2}readBoolean(){return!!this.readVarint()}readString(){const e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=Qbe&&Dj?Dj.decode(this.buf.subarray(t,e)):sCe(this.buf,t,e)}readBytes(){const e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}readPackedVarint(e=[],t){const i=this.readPackedEnd();for(;this.pos<i;)e.push(this.readVarint(t));return e}readPackedSVarint(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSVarint());return e}readPackedBoolean(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readBoolean());return e}readPackedFloat(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFloat());return e}readPackedDouble(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readDouble());return e}readPackedFixed32(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed32());return e}readPackedSFixed32(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed32());return e}readPackedFixed64(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed64());return e}readPackedSFixed64(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed64());return e}readPackedEnd(){return this.type===o2?this.readVarint()+this.pos:this.pos+1}skip(e){const t=e&7;if(t===aB)for(;this.buf[this.pos++]>127;);else if(t===o2)this.pos=this.readVarint()+this.pos;else if(t===VM)this.pos+=4;else if(t===$M)this.pos+=8;else throw new Error(`Unimplemented type: ${t}`)}writeTag(e,t){this.writeVarint(e<<3|t)}realloc(e){let t=this.length||16;for(;t<this.pos+e;)t*=2;if(t!==this.length){const i=new Uint8Array(t);i.set(this.buf),this.buf=i,this.dataView=new DataView(i.buffer),this.length=t}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,!0),this.pos+=4}writeSFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,!0),this.pos+=4}writeFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,e&-1,!0),this.dataView.setInt32(this.pos+4,Math.floor(e*Rj),!0),this.pos+=8}writeSFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,e&-1,!0),this.dataView.setInt32(this.pos+4,Math.floor(e*Rj),!0),this.pos+=8}writeVarint(e){if(e=+e||0,e>268435455||e<0){$be(e,this);return}this.realloc(4),this.buf[this.pos++]=e&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127)))}writeSVarint(e){this.writeVarint(e<0?-e*2-1:e*2)}writeBoolean(e){this.writeVarint(+e)}writeString(e){e=String(e),this.realloc(e.length*4),this.pos++;const t=this.pos;this.pos=aCe(this.buf,e,this.pos);const i=this.pos-t;i>=128&&Pj(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i}writeFloat(e){this.realloc(4),this.dataView.setFloat32(this.pos,e,!0),this.pos+=4}writeDouble(e){this.realloc(8),this.dataView.setFloat64(this.pos,e,!0),this.pos+=8}writeBytes(e){const t=e.length;this.writeVarint(t),this.realloc(t);for(let i=0;i<t;i++)this.buf[this.pos++]=e[i]}writeRawMessage(e,t){this.pos++;const i=this.pos;e(t,this);const r=this.pos-i;r>=128&&Pj(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r}writeMessage(e,t,i){this.writeTag(e,o2),this.writeRawMessage(t,i)}writePackedVarint(e,t){t.length&&this.writeMessage(e,Zbe,t)}writePackedSVarint(e,t){t.length&&this.writeMessage(e,Xbe,t)}writePackedBoolean(e,t){t.length&&this.writeMessage(e,tCe,t)}writePackedFloat(e,t){t.length&&this.writeMessage(e,Jbe,t)}writePackedDouble(e,t){t.length&&this.writeMessage(e,eCe,t)}writePackedFixed32(e,t){t.length&&this.writeMessage(e,nCe,t)}writePackedSFixed32(e,t){t.length&&this.writeMessage(e,iCe,t)}writePackedFixed64(e,t){t.length&&this.writeMessage(e,rCe,t)}writePackedSFixed64(e,t){t.length&&this.writeMessage(e,oCe,t)}writeBytesField(e,t){this.writeTag(e,o2),this.writeBytes(t)}writeFixed32Field(e,t){this.writeTag(e,VM),this.writeFixed32(t)}writeSFixed32Field(e,t){this.writeTag(e,VM),this.writeSFixed32(t)}writeFixed64Field(e,t){this.writeTag(e,$M),this.writeFixed64(t)}writeSFixed64Field(e,t){this.writeTag(e,$M),this.writeSFixed64(t)}writeVarintField(e,t){this.writeTag(e,aB),this.writeVarint(t)}writeSVarintField(e,t){this.writeTag(e,aB),this.writeSVarint(t)}writeStringField(e,t){this.writeTag(e,o2),this.writeString(t)}writeFloatField(e,t){this.writeTag(e,VM),this.writeFloat(t)}writeDoubleField(e,t){this.writeTag(e,$M),this.writeDouble(t)}writeBooleanField(e,t){this.writeVarintField(e,+t)}}function Ybe(n,e,t){const i=t.buf;let r,o;if(o=i[t.pos++],r=(o&112)>>4,o<128||(o=i[t.pos++],r|=(o&127)<<3,o<128)||(o=i[t.pos++],r|=(o&127)<<10,o<128)||(o=i[t.pos++],r|=(o&127)<<17,o<128)||(o=i[t.pos++],r|=(o&127)<<24,o<128)||(o=i[t.pos++],r|=(o&1)<<31,o<128))return PC(n,r,e);throw new Error("Expected varint not more than 10 bytes")}function PC(n,e,t){return t?e*4294967296+(n>>>0):(e>>>0)*4294967296+(n>>>0)}function $be(n,e){let t,i;if(n>=0?(t=n%4294967296|0,i=n/4294967296|0):(t=~(-n%4294967296),i=~(-n/4294967296),t^4294967295?t=t+1|0:(t=0,i=i+1|0)),n>=18446744073709552e3||n<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),Vbe(t,i,e),Hbe(i,e)}function Vbe(n,e,t){t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos]=n&127}function Hbe(n,e){const t=(n&7)<<4;e.buf[e.pos++]|=t|((n>>>=3)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127)))))}function Pj(n,e,t){const i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));t.realloc(i);for(let r=t.pos-1;r>=n;r--)t.buf[r+i]=t.buf[r]}function Zbe(n,e){for(let t=0;t<n.length;t++)e.writeVarint(n[t])}function Xbe(n,e){for(let t=0;t<n.length;t++)e.writeSVarint(n[t])}function Jbe(n,e){for(let t=0;t<n.length;t++)e.writeFloat(n[t])}function eCe(n,e){for(let t=0;t<n.length;t++)e.writeDouble(n[t])}function tCe(n,e){for(let t=0;t<n.length;t++)e.writeBoolean(n[t])}function nCe(n,e){for(let t=0;t<n.length;t++)e.writeFixed32(n[t])}function iCe(n,e){for(let t=0;t<n.length;t++)e.writeSFixed32(n[t])}function rCe(n,e){for(let t=0;t<n.length;t++)e.writeFixed64(n[t])}function oCe(n,e){for(let t=0;t<n.length;t++)e.writeSFixed64(n[t])}function sCe(n,e,t){let i="",r=e;for(;r<t;){const o=n[r];let s=null,a=o>239?4:o>223?3:o>191?2:1;if(r+a>t)break;let c,A,m;a===1?o<128&&(s=o):a===2?(c=n[r+1],(c&192)===128&&(s=(o&31)<<6|c&63,s<=127&&(s=null))):a===3?(c=n[r+1],A=n[r+2],(c&192)===128&&(A&192)===128&&(s=(o&15)<<12|(c&63)<<6|A&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):a===4&&(c=n[r+1],A=n[r+2],m=n[r+3],(c&192)===128&&(A&192)===128&&(m&192)===128&&(s=(o&15)<<18|(c&63)<<12|(A&63)<<6|m&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,a=1):s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),r+=a}return i}function aCe(n,e,t){for(let i=0,r,o;i<e.length;i++){if(r=e.charCodeAt(i),r>55295&&r<57344)if(o)if(r<56320){n[t++]=239,n[t++]=191,n[t++]=189,o=r;continue}else r=o-55296<<10|r-56320|65536,o=null;else{r>56319||i+1===e.length?(n[t++]=239,n[t++]=191,n[t++]=189):o=r;continue}else o&&(n[t++]=239,n[t++]=191,n[t++]=189,o=null);r<128?n[t++]=r:(r<2048?n[t++]=r>>6|192:(r<65536?n[t++]=r>>12|224:(n[t++]=r>>18|240,n[t++]=r>>12&63|128),n[t++]=r>>6&63|128),n[t++]=r&63|128)}return t}class zee extends Lee{constructor(e){super(),e=e||{},this.dataProjection=new IE({code:"",units:"tile-pixels"}),this.featureClass=e.featureClass?e.featureClass:DA,this.geometryName_=e.geometryName,this.layerName_=e.layerName?e.layerName:"layer",this.layers_=e.layers?e.layers:null,this.idProperty_=e.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(e,t,i,r){e.pos=t.geometry;const o=e.readVarint()+e.pos;let s=1,a=0,c=0,A=0,m=0,v=0;for(;e.pos<o;){if(!a){const x=e.readVarint();s=x&7,a=x>>3}if(a--,s===1||s===2)c+=e.readSVarint(),A+=e.readSVarint(),s===1&&m>v&&(r.push(m),v=m),i.push(c,A),m+=2;else if(s===7)m>v&&(i.push(i[v],i[v+1]),m+=2);else throw new Error("Invalid command found in the PBF")}m>v&&(r.push(m),v=m)}createFeature_(e,t,i){const r=t.type;if(r===0)return null;let o;const s=t.properties;let a;this.idProperty_?(a=s[this.idProperty_],delete s[this.idProperty_]):a=t.id,s[this.layerName_]=t.layer.name;const c=[],A=[];this.readRawGeometry_(e,t,c,A);const m=hCe(r,A.length);if(this.featureClass===DA)o=new this.featureClass(m,c,A,2,s,a),o.transform(i.dataProjection);else{let v;if(m=="Polygon"){const O=YJ(c,A);v=O.length>1?new Z3(c,"XY",O):new e1(c,"XY",A)}else v=m==="Point"?new Eb(c,"XY"):m==="LineString"?new Bb(c,"XY"):m==="MultiPoint"?new eM(c,"XY"):m==="MultiLineString"?new H3(c,"XY",A):null;const x=this.featureClass;o=new x,this.geometryName_&&o.setGeometryName(this.geometryName_);const _=QE(v,!1,i);o.setGeometry(_),a!==void 0&&o.setId(a),o.setProperties(s,!0)}return o}getType(){return"arraybuffer"}readFeatures(e,t){const i=this.layers_;t=this.adaptOptions(t);const r=Xs(t.dataProjection);r.setWorldExtent(t.extent),t.dataProjection=r;const o=new qbe(e),s=o.readFields(lCe,{}),a=[];for(const c in s){if(i&&!i.includes(c))continue;const A=s[c],m=A?[0,0,A.extent,A.extent]:null;r.setExtent(m);for(let v=0,x=A.length;v<x;++v){const _=ACe(o,A,v),O=this.createFeature_(o,_,t);O!==null&&a.push(O)}}return a}readProjection(e){return this.dataProjection}setLayers(e){this.layers_=e}}function lCe(n,e,t){if(n===3){const i={keys:[],values:[],features:[]},r=t.readVarint()+t.pos;t.readFields(uCe,i,r),i.length=i.features.length,i.length&&(e[i.name]=i)}}function uCe(n,e,t){if(n===15)e.version=t.readVarint();else if(n===1)e.name=t.readString();else if(n===5)e.extent=t.readVarint();else if(n===2)e.features.push(t.pos);else if(n===3)e.keys.push(t.readString());else if(n===4){let i=null;const r=t.readVarint()+t.pos;for(;t.pos<r;)n=t.readVarint()>>3,i=n===1?t.readString():n===2?t.readFloat():n===3?t.readDouble():n===4?t.readVarint64():n===5?t.readVarint():n===6?t.readSVarint():n===7?t.readBoolean():null;e.values.push(i)}}function cCe(n,e,t){if(n==1)e.id=t.readVarint();else if(n==2){const i=t.readVarint()+t.pos;for(;t.pos<i;){const r=e.layer.keys[t.readVarint()],o=e.layer.values[t.readVarint()];e.properties[r]=o}}else n==3?e.type=t.readVarint():n==4&&(e.geometry=t.pos)}function ACe(n,e,t){n.pos=e.features[t];const i=n.readVarint()+n.pos,r={layer:e,type:0,properties:{}};return n.readFields(cCe,r,i),r}function hCe(n,e){let t;return n===1?t=e===1?"Point":"MultiPoint":n===2?t=e===1?"LineString":"MultiLineString":n===3&&(t="Polygon"),t}class dCe extends mU{constructor(e){super(e),this.image=null}getImage(){return this.image?this.image.getImage():null}prepareFrame(e){const t=e.layerStatesArray[e.layerIndex],i=e.pixelRatio,r=e.viewState,o=r.resolution,s=this.getLayer().getSource(),a=e.viewHints;let c=e.extent;if(t.extent!==void 0&&(c=cm(c,Mg(t.extent,r.projection))),!a[sl.ANIMATING]&&!a[sl.INTERACTING]&&!Fb(c))if(s){const A=r.projection,m=s.getImage(c,o,i,A);m&&(this.loadImage(m)?this.image=m:m.getState()===zi.EMPTY&&(this.image=null))}else this.image=null;return!!this.image}getData(e){const t=this.frameState;if(!t)return null;const i=this.getLayer(),r=Du(t.pixelToCoordinateTransform,e.slice()),o=i.getExtent();if(o&&!Sb(o,r))return null;const s=this.image.getExtent(),a=this.image.getImage(),c=as(s),A=Math.floor(a.width*((r[0]-s[0])/c));if(A<0||A>=a.width)return null;const m=Ku(s),v=Math.floor(a.height*((s[3]-r[1])/m));return v<0||v>=a.height?null:this.getImageData(a,A,v)}renderFrame(e,t){const i=this.image,r=i.getExtent(),o=i.getResolution(),[s,a]=Array.isArray(o)?o:[o,o],c=i.getPixelRatio(),A=e.layerStatesArray[e.layerIndex],m=e.pixelRatio,v=e.viewState,x=v.center,_=v.resolution,O=m*s/(_*c),P=m*a/(_*c);this.prepareContainer(e,t);const F=this.context.canvas.width,j=this.context.canvas.height,Q=this.getRenderContext(e);let V=!1,H=!0;if(A.extent){const le=Mg(A.extent,v.projection);H=Gl(le,e.extent),V=H&&!xg(le,e.extent),V&&this.clipUnrotated(Q,e,le)}const G=i.getImage(),Y=Fg(this.tempTransform,F/2,j/2,O,P,0,c*(r[0]-x[0])/s,c*(x[1]-r[3])/a);this.renderedResolution=a*m/c;const z=G.width*Y[0],se=G.height*Y[3];if(this.getLayer().getSource().getInterpolate()||(Q.imageSmoothingEnabled=!1),this.preRender(Q,e),H&&z>=.5&&se>=.5){const le=Y[4],me=Y[5],fe=A.opacity;fe!==1&&(Q.save(),Q.globalAlpha=fe),Q.drawImage(G,0,0,+G.width,+G.height,le,me,z,se),fe!==1&&Q.restore()}return this.postRender(this.context,e),V&&Q.restore(),Q.imageSmoothingEnabled=!0,this.container}}class fCe extends Bx{constructor(e){e=e||{},super(e)}}class jee extends fCe{constructor(e){super(e)}createRenderer(){return new dCe(this)}getData(e){return super.getData(e)}}function nR(n){return n instanceof Image||n instanceof HTMLCanvasElement||n instanceof HTMLVideoElement||n instanceof ImageBitmap?n:null}const pCe=new Error("disposed"),mCe=[256,256];class Uj extends nM{constructor(e){const t=si.IDLE;super(e.tileCoord,t,{transition:e.transition,interpolate:e.interpolate}),this.loader_=e.loader,this.data_=null,this.error_=null,this.size_=e.size||null,this.controller_=e.controller||null}getSize(){if(this.size_)return this.size_;const e=nR(this.data_);return e?[e.width,e.height]:mCe}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==si.IDLE&&this.state!==si.ERROR)return;this.state=si.LOADING,this.changed();const e=this;this.loader_().then(function(t){e.data_=t,e.state=si.LOADED,e.changed()}).catch(function(t){e.error_=t,e.state=si.ERROR,e.changed()})}disposeInternal(){this.controller_&&(this.controller_.abort(pCe),this.controller_=null),super.disposeInternal()}}let lB;const U_=[];function Kj(n,e,t,i,r){n.beginPath(),n.moveTo(0,0),n.lineTo(e,t),n.lineTo(i,r),n.closePath(),n.save(),n.clip(),n.fillRect(0,0,Math.max(e,i)+1,Math.max(t,r)),n.restore()}function uB(n,e){return Math.abs(n[e*4]-210)>2||Math.abs(n[e*4+3]-.75*255)>2}function gCe(){if(lB===void 0){const n=bl(6,6,U_);n.globalCompositeOperation="lighter",n.fillStyle="rgba(210, 0, 0, 0.75)",Kj(n,4,5,4,0),Kj(n,4,5,0,5);const e=n.getImageData(0,0,3,3).data;lB=uB(e,0)||uB(e,4)||uB(e,8),V4(n),U_.push(n.canvas)}return lB}function iR(n,e,t,i){const r=RE(t,e,n);let o=F9(e,i,t);const s=e.getMetersPerUnit();s!==void 0&&(o*=s);const a=n.getMetersPerUnit();a!==void 0&&(o/=a);const c=n.getExtent();if(!c||Sb(c,r)){const A=F9(n,o,r)/o;isFinite(A)&&A>0&&(o/=A)}return o}function yCe(n,e,t,i){const r=lf(t);let o=iR(n,e,r,i);return(!isFinite(o)||o<=0)&&_J(t,function(s){return o=iR(n,e,s,i),isFinite(o)&&o>0}),o}function Nee(n,e,t,i,r,o,s,a,c,A,m,v,x,_){const O=bl(Math.round(t*n),Math.round(t*e),U_);if(v||(O.imageSmoothingEnabled=!1),c.length===0)return O.canvas;O.scale(t,t);function P(G){return Math.round(G*t)/t}O.globalCompositeOperation="lighter";const F=rp();c.forEach(function(G,Y,z){bJ(F,G.extent)});let j;const Q=t/i,V=(v?1:1+Math.pow(2,-24))/Q;(!x||c.length!==1||A!==0)&&(j=bl(Math.round(as(F)*Q),Math.round(Ku(F)*Q),U_),v||(j.imageSmoothingEnabled=!1),c.forEach(function(G,Y,z){if(G.image.width>0&&G.image.height>0){if(G.clipExtent){j.save();const _e=(G.clipExtent[0]-F[0])*Q,we=-(G.clipExtent[3]-F[3])*Q,ke=as(G.clipExtent)*Q,je=Ku(G.clipExtent)*Q;j.rect(v?_e:Math.round(_e),v?we:Math.round(we),v?ke:Math.round(_e+ke)-Math.round(_e),v?je:Math.round(we+je)-Math.round(we)),j.clip()}const se=(G.extent[0]-F[0])*Q,le=-(G.extent[3]-F[3])*Q,me=as(G.extent)*Q,fe=Ku(G.extent)*Q;j.drawImage(G.image,A,A,G.image.width-2*A,G.image.height-2*A,v?se:Math.round(se),v?le:Math.round(le),v?me:Math.round(se+me)-Math.round(se),v?fe:Math.round(le+fe)-Math.round(le)),G.clipExtent&&j.restore()}}));const H=r1(s);return a.getTriangles().forEach(function(G,Y,z){const se=G.source,le=G.target;let me=se[0][0],fe=se[0][1],_e=se[1][0],we=se[1][1],ke=se[2][0],je=se[2][1];const Ie=P((le[0][0]-H[0])/o),Qe=P(-(le[0][1]-H[1])/o),tt=P((le[1][0]-H[0])/o),ht=P(-(le[1][1]-H[1])/o),ce=P((le[2][0]-H[0])/o),Le=P(-(le[2][1]-H[1])/o),We=me,Me=fe;me=0,fe=0,_e-=We,we-=Me,ke-=We,je-=Me;const dt=[[_e,we,0,0,tt-Ie],[ke,je,0,0,ce-Ie],[0,0,_e,we,ht-Qe],[0,0,ke,je,Le-Qe]],it=A0e(dt);if(!it)return;if(O.save(),O.beginPath(),gCe()||!v){O.moveTo(tt,ht);const Ut=4,Pe=Ie-tt,Te=Qe-ht;for(let Se=0;Se<Ut;Se++)O.lineTo(tt+P((Se+1)*Pe/Ut),ht+P(Se*Te/(Ut-1))),Se!=Ut-1&&O.lineTo(tt+P((Se+1)*Pe/Ut),ht+P((Se+1)*Te/(Ut-1)));O.lineTo(ce,Le)}else O.moveTo(tt,ht),O.lineTo(Ie,Qe),O.lineTo(ce,Le);O.clip(),O.transform(it[0],it[2],it[1],it[3],Ie,Qe),O.translate(F[0]-We,F[3]-Me);let vt;if(j)vt=j.canvas,O.scale(V,-V);else{const Ut=c[0],Pe=Ut.extent;vt=Ut.image,O.scale(as(Pe)/vt.width,-Ku(Pe)/vt.height)}O.drawImage(vt,0,0),O.restore()}),j&&(V4(j),U_.push(j.canvas)),m&&(O.save(),O.globalCompositeOperation="source-over",O.strokeStyle="black",O.lineWidth=1,a.getTriangles().forEach(function(G,Y,z){const se=G.target,le=(se[0][0]-H[0])/o,me=-(se[0][1]-H[1])/o,fe=(se[1][0]-H[0])/o,_e=-(se[1][1]-H[1])/o,we=(se[2][0]-H[0])/o,ke=-(se[2][1]-H[1])/o;O.beginPath(),O.moveTo(fe,_e),O.lineTo(le,me),O.lineTo(we,ke),O.closePath(),O.stroke()}),O.restore()),O.canvas}const vCe=10,Lj=.25;class Gee{constructor(e,t,i,r,o,s,a){this.sourceProj_=e,this.targetProj_=t;let c={};const A=a?J0e(V=>Du(a,RE(V,this.targetProj_,this.sourceProj_))):j3(this.targetProj_,this.sourceProj_);this.transformInv_=function(V){const H=V[0]+"/"+V[1];return c[H]||(c[H]=A(V)),c[H]},this.maxSourceExtent_=r,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&as(r)>=as(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?as(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?as(this.targetProj_.getExtent()):null;const m=r1(i),v=BE(i),x=OE(i),_=EE(i),O=this.transformInv_(m),P=this.transformInv_(v),F=this.transformInv_(x),j=this.transformInv_(_),Q=vCe+(s?Math.max(0,Math.ceil(Math.log2(P9(i)/(s*s*256*256)))):0);if(this.addQuad_(m,v,x,_,O,P,F,j,Q),this.wrapsXInSource_){let V=1/0;this.triangles_.forEach(function(H,G,Y){V=Math.min(V,H.source[0][0],H.source[1][0],H.source[2][0])}),this.triangles_.forEach(H=>{if(Math.max(H.source[0][0],H.source[1][0],H.source[2][0])-V>this.sourceWorldWidth_/2){const G=[[H.source[0][0],H.source[0][1]],[H.source[1][0],H.source[1][1]],[H.source[2][0],H.source[2][1]]];G[0][0]-V>this.sourceWorldWidth_/2&&(G[0][0]-=this.sourceWorldWidth_),G[1][0]-V>this.sourceWorldWidth_/2&&(G[1][0]-=this.sourceWorldWidth_),G[2][0]-V>this.sourceWorldWidth_/2&&(G[2][0]-=this.sourceWorldWidth_);const Y=Math.min(G[0][0],G[1][0],G[2][0]);Math.max(G[0][0],G[1][0],G[2][0])-Y<this.sourceWorldWidth_/2&&(H.source=G)}})}c={}}addTriangle_(e,t,i,r,o,s){this.triangles_.push({source:[r,o,s],target:[e,t,i]})}addQuad_(e,t,i,r,o,s,a,c,A){const m=R9([o,s,a,c]),v=this.sourceWorldWidth_?as(m)/this.sourceWorldWidth_:null,x=this.sourceWorldWidth_,_=this.sourceProj_.canWrapX()&&v>.5&&v<1;let O=!1;if(A>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const F=R9([e,t,i,r]);O=as(F)/this.targetWorldWidth_>Lj||O}!_&&this.sourceProj_.isGlobal()&&v&&(O=v>Lj||O)}if(!O&&this.maxSourceExtent_&&isFinite(m[0])&&isFinite(m[1])&&isFinite(m[2])&&isFinite(m[3])&&!Gl(m,this.maxSourceExtent_))return;let P=0;if(!O&&(!isFinite(o[0])||!isFinite(o[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(c[0])||!isFinite(c[1]))){if(A>0)O=!0;else if(P=(!isFinite(o[0])||!isFinite(o[1])?8:0)+(!isFinite(s[0])||!isFinite(s[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(c[0])||!isFinite(c[1])?1:0),P!=1&&P!=2&&P!=4&&P!=8)return}if(A>0){if(!O){const F=[(e[0]+i[0])/2,(e[1]+i[1])/2],j=this.transformInv_(F);let Q;_?Q=(gb(o[0],x)+gb(a[0],x))/2-gb(j[0],x):Q=(o[0]+a[0])/2-j[0];const V=(o[1]+a[1])/2-j[1];O=Q*Q+V*V>this.errorThresholdSquared_}if(O){if(Math.abs(e[0]-i[0])<=Math.abs(e[1]-i[1])){const F=[(t[0]+i[0])/2,(t[1]+i[1])/2],j=this.transformInv_(F),Q=[(r[0]+e[0])/2,(r[1]+e[1])/2],V=this.transformInv_(Q);this.addQuad_(e,t,F,Q,o,s,j,V,A-1),this.addQuad_(Q,F,i,r,V,j,a,c,A-1)}else{const F=[(e[0]+t[0])/2,(e[1]+t[1])/2],j=this.transformInv_(F),Q=[(i[0]+r[0])/2,(i[1]+r[1])/2],V=this.transformInv_(Q);this.addQuad_(e,F,Q,r,o,j,V,c,A-1),this.addQuad_(F,t,i,Q,j,s,a,V,A-1)}return}}if(_){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}(P&11)==0&&this.addTriangle_(e,i,r,o,a,c),(P&14)==0&&this.addTriangle_(e,i,t,o,a,s),P&&((P&13)==0&&this.addTriangle_(t,r,e,s,c,o),(P&7)==0&&this.addTriangle_(t,r,i,s,c,a))}calculateSourceExtent(){const e=rp();return this.triangles_.forEach(function(t,i,r){const o=t.source;t3(e,o[0]),t3(e,o[1]),t3(e,o[2])}),e}getTriangles(){return this.triangles_}}const Wee=.5;class Qee extends nM{constructor(e,t,i,r,o,s,a,c,A,m,v,x){super(o,si.IDLE,x),this.renderEdges_=v!==void 0?v:!1,this.pixelRatio_=a,this.gutter_=c,this.canvas_=null,this.sourceTileGrid_=t,this.targetTileGrid_=r,this.wrappedTileCoord_=s||o,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=e.canWrapX()?e.getExtent():void 0;const _=r.getTileCoordExtent(this.wrappedTileCoord_),O=this.targetTileGrid_.getExtent();let P=this.sourceTileGrid_.getExtent();const F=O?cm(_,O):_;if(P9(F)===0){this.state=si.EMPTY;return}const j=e.getExtent();j&&(P?P=cm(P,j):P=j);const Q=r.getResolution(this.wrappedTileCoord_[0]),V=yCe(e,i,F,Q);if(!isFinite(V)||V<=0){this.state=si.EMPTY;return}const H=m!==void 0?m:Wee;if(this.triangulation_=new Gee(e,i,F,P,V*H,Q),this.triangulation_.getTriangles().length===0){this.state=si.EMPTY;return}this.sourceZ_=t.getZForResolution(V);let G=this.triangulation_.calculateSourceExtent();if(P&&(e.canWrapX()?(G[1]=vl(G[1],P[1],P[3]),G[3]=vl(G[3],P[1],P[3])):G=cm(G,P)),!P9(G))this.state=si.EMPTY;else{let Y=0,z=0;e.canWrapX()&&(Y=as(j),z=Math.floor((G[0]-j[0])/Y)),wJ(G.slice(),e,!0).forEach(le=>{const me=t.getTileRangeForExtentAndZ(le,this.sourceZ_);for(let fe=me.minX;fe<=me.maxX;fe++)for(let _e=me.minY;_e<=me.maxY;_e++){const we=A(this.sourceZ_,fe,_e,a);if(we){const ke=z*Y;this.sourceTiles_.push({tile:we,offset:ke})}}++z}),this.sourceTiles_.length===0&&(this.state=si.EMPTY)}}getImage(){return this.canvas_}reproject_(){const e=[];if(this.sourceTiles_.forEach(t=>{const i=t.tile;if(i&&i.getState()==si.LOADED){const r=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);r[0]+=t.offset,r[2]+=t.offset;const o=this.clipExtent_?.slice();o&&(o[0]+=t.offset,o[2]+=t.offset),e.push({extent:r,clipExtent:o,image:i.getImage()})}}),this.sourceTiles_.length=0,e.length===0)this.state=si.ERROR;else{const t=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(t),r=typeof i=="number"?i:i[0],o=typeof i=="number"?i:i[1],s=this.targetTileGrid_.getResolution(t),a=this.sourceTileGrid_.getResolution(this.sourceZ_),c=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Nee(r,o,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),s,c,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=si.LOADED}this.changed()}load(){if(this.state==si.IDLE){this.state=si.LOADING,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:t})=>{const i=t.getState();if(i==si.IDLE||i==si.LOADING){e++;const r=Zo(t,Ir.CHANGE,o=>{const s=t.getState();(s==si.LOADED||s==si.ERROR||s==si.EMPTY)&&(Ea(r),e--,e===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(r)}}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:t},i,r){t.getState()==si.IDLE&&t.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Ea),this.sourcesListenerKeys_=null}release(){this.canvas_&&(V4(this.canvas_.getContext("2d")),U_.push(this.canvas_),this.canvas_=null),super.release()}}class bCe{constructor(e){this.highWaterMark=e!==void 0?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}deleteOldest(){const e=this.pop();e instanceof N4&&e.dispose()}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(e){for(;this.canExpireCache();)this.deleteOldest()}clear(){for(;this.oldest_;)this.deleteOldest()}containsKey(e){return this.entries_.hasOwnProperty(e)}forEach(e){let t=this.oldest_;for(;t;)e(t.value_,t.key_,this),t=t.newer}get(e,t){const i=this.entries_[e];return Os(i!==void 0,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(e){const t=this.entries_[e];return Os(t!==void 0,"Tried to get a value for a key that does not exist in the cache"),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_}getCount(){return this.count_}getKeys(){const e=new Array(this.count_);let t=0,i;for(i=this.newest_;i;i=i.older)e[t++]=i.key_;return e}getValues(){const e=new Array(this.count_);let t=0,i;for(i=this.newest_;i;i=i.older)e[t++]=i.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(e){return this.entries_[e]?.value_}pop(){const e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}replace(e,t){this.get(e),this.entries_[e].value_=t}set(e,t){Os(!(e in this.entries_),"Tried to set a value for a key that is used already");const i={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_}setSize(e){this.highWaterMark=e}}function nS(n,e,t,i){return i!==void 0?(i[0]=n,i[1]=e,i[2]=t,i):[n,e,t]}function CCe(n,e,t){return n+"/"+e+"/"+t}function _Ce(n){return xCe(n[0],n[1],n[2])}function xCe(n,e,t){return(e<<n)+t}function MCe(n,e){const t=n[0],i=n[1],r=n[2];if(e.getMinZoom()>t||t>e.getMaxZoom())return!1;const o=e.getFullTileRange(t);return o?o.containsXY(i,r):!0}function cB(n,e,t,i,r){return`${$r(n)},${e},${CCe(t,i,r)}`}function AB(n,e,t){if(!(t in n))return n[t]=new Set([e]),!0;const i=n[t],r=i.has(e);return r||i.add(e),!r}function wCe(n,e,t){const i=n[t];return i?i.delete(e):!1}function Fj(n,e){const t=n.layerStatesArray[n.layerIndex];t.extent&&(e=cm(e,Mg(t.extent,n.viewState.projection)));const i=t.layer.getRenderSource();if(!i.getWrapX()){const r=i.getTileGridForProjection(n.viewState.projection).getExtent();r&&(e=cm(e,r))}return e}class qee extends mU{constructor(e,t){super(e),t=t||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=rp(),this.tempTileRange_=new yU(0,0,0,0),this.tempTileCoord_=nS(0,0,0);const i=t.cacheSize!==void 0?t.cacheSize:512;this.tileCache_=new bCe(i),this.maxStaleKeys=i*.5}getTileCache(){return this.tileCache_}getOrCreateTile(e,t,i,r){const o=this.tileCache_,a=this.getLayer().getSource(),c=cB(a,a.getKey(),e,t,i);let A;if(o.containsKey(c))A=o.get(c);else{if(A=a.getTile(e,t,i,r.pixelRatio,r.viewState.projection),!A)return null;o.set(c,A)}return A}getTile(e,t,i,r){const o=this.getOrCreateTile(e,t,i,r);return o||null}getData(e){const t=this.frameState;if(!t)return null;const i=this.getLayer(),r=Du(t.pixelToCoordinateTransform,e.slice()),o=i.getExtent();if(o&&!Sb(o,r))return null;const s=t.viewState,a=i.getRenderSource(),c=a.getTileGridForProjection(s.projection),A=a.getTilePixelRatio(t.pixelRatio);for(let m=c.getZForResolution(s.resolution);m>=c.getMinZoom();--m){const v=c.getTileCoordForCoordAndZ(r,m),x=this.getTile(m,v[1],v[2],t);if(!x||x.getState()!==si.LOADED)continue;const _=c.getOrigin(m),O=UA(c.getTileSize(m)),P=c.getResolution(m);let F;if(x instanceof kee||x instanceof Qee)F=x.getImage();else if(x instanceof Uj){if(F=nR(x.getData()),!F)continue}else continue;const j=Math.floor(A*((r[0]-_[0])/P-v[1]*O[0])),Q=Math.floor(A*((_[1]-r[1])/P-v[2]*O[1])),V=Math.round(A*a.getGutterForProjection(s.projection));return this.getImageData(F,j+V,Q+V)}return null}prepareFrame(e){this.renderedProjection?e.viewState.projection!==this.renderedProjection&&(this.tileCache_.clear(),this.renderedProjection=e.viewState.projection):this.renderedProjection=e.viewState.projection;const t=this.getLayer().getSource();if(!t)return!1;const i=t.getRevision();return this.renderedSourceRevision_?this.renderedSourceRevision_!==i&&(this.renderedSourceRevision_=i,this.renderedSourceKey_===t.getKey()&&this.tileCache_.clear()):this.renderedSourceRevision_=i,!0}enqueueTiles(e,t,i,r,o){const s=e.viewState,a=this.getLayer(),c=a.getRenderSource(),A=c.getTileGridForProjection(s.projection),m=$r(c);m in e.wantedTiles||(e.wantedTiles[m]={});const v=e.wantedTiles[m],x=a.getMapInternal(),_=Math.max(i-o,A.getMinZoom(),A.getZForResolution(Math.min(a.getMaxResolution(),x?x.getView().getResolutionForZoom(Math.max(a.getMinZoom(),0)):A.getResolution(0)),c.zDirection)),O=s.rotation,P=O?xJ(s.center,s.resolution,O,e.size):void 0;for(let F=i;F>=_;--F){const j=A.getTileRangeForExtentAndZ(t,F,this.tempTileRange_),Q=A.getResolution(F);for(let V=j.minX;V<=j.maxX;++V)for(let H=j.minY;H<=j.maxY;++H){if(O&&!A.tileCoordIntersectsViewport([F,V,H],P))continue;const G=this.getTile(F,V,H,e);if(!G||!AB(r,G,F))continue;const z=G.getKey();if(v[z]=!0,G.getState()===si.IDLE&&!e.tileQueue.isKeyQueued(z)){const se=nS(F,V,H,this.tempTileCoord_);e.tileQueue.enqueue([G,m,A.getTileCoordCenter(se),Q])}}}}findStaleTile_(e,t){const i=this.tileCache_,r=e[0],o=e[1],s=e[2],a=this.getStaleKeys();for(let c=0;c<a.length;++c){const A=cB(this.getLayer().getSource(),a[c],r,o,s);if(i.containsKey(A)){const m=i.peek(A);if(m.getState()===si.LOADED)return m.endTransition($r(this)),AB(t,m,r),!0}}return!1}findAltTiles_(e,t,i,r){const o=e.getTileRangeForTileCoordAndZ(t,i,this.tempTileRange_);if(!o)return!1;let s=!0;const a=this.tileCache_,c=this.getLayer().getRenderSource(),A=c.getKey();for(let m=o.minX;m<=o.maxX;++m)for(let v=o.minY;v<=o.maxY;++v){const x=cB(c,A,i,m,v);let _=!1;if(a.containsKey(x)){const O=a.peek(x);O.getState()===si.LOADED&&(AB(r,O,i),_=!0)}_||(s=!1)}return s}renderFrame(e,t){this.renderComplete=!0;const i=e.layerStatesArray[e.layerIndex],r=e.viewState,o=r.projection,s=r.resolution,a=r.center,c=e.pixelRatio,A=this.getLayer(),m=A.getSource(),v=m.getTileGridForProjection(o),x=v.getZForResolution(s,m.zDirection),_=v.getResolution(x),O=m.getKey();this.renderedSourceKey_?this.renderedSourceKey_!==O&&(this.prependStaleKey(this.renderedSourceKey_),this.renderedSourceKey_=O):this.renderedSourceKey_=O;let P=e.extent;const F=m.getTilePixelRatio(c);this.prepareContainer(e,t);const j=this.context.canvas.width,Q=this.context.canvas.height,V=i.extent&&Mg(i.extent);V&&(P=cm(P,Mg(i.extent)));const H=_*j/2/F,G=_*Q/2/F,Y=[a[0]-H,a[1]-G,a[0]+H,a[1]+G],z={};this.renderedTiles.length=0;const se=A.getPreload();if(e.nextExtent){const tt=v.getZForResolution(r.nextResolution,m.zDirection),ht=Fj(e,e.nextExtent);this.enqueueTiles(e,ht,tt,z,se)}const le=Fj(e,P);if(this.enqueueTiles(e,le,x,z,0),se>0&&setTimeout(()=>{this.enqueueTiles(e,le,x-1,z,se-1)},0),!(x in z))return this.container;const me=$r(this),fe=e.time;for(const tt of z[x]){const ht=tt.getState();if(ht===si.EMPTY)continue;const ce=tt.tileCoord;if(ht===si.LOADED&&tt.getAlpha(me,fe)===1){tt.endTransition(me);continue}if(ht!==si.ERROR&&(this.renderComplete=!1),this.findStaleTile_(ce,z)){wCe(z,tt,x),e.animate=!0;continue}if(this.findAltTiles_(v,ce,x+1,z))continue;const Me=v.getMinZoom();for(let dt=x-1;dt>=Me&&!this.findAltTiles_(v,ce,dt,z);--dt);}const _e=_/s*c/F,we=this.getRenderContext(e);Fg(this.tempTransform,j/2,Q/2,_e,_e,0,-j/2,-Q/2),i.extent&&this.clipUnrotated(we,e,V),m.getInterpolate()||(we.imageSmoothingEnabled=!1),this.preRender(we,e);const ke=Object.keys(z).map(Number);ke.sort(Pg);let je;const Ie=[],Qe=[];for(let tt=ke.length-1;tt>=0;--tt){const ht=ke[tt],ce=m.getTilePixelSize(ht,c,o),We=v.getResolution(ht)/_,Me=ce[0]*We*_e,dt=ce[1]*We*_e,it=v.getTileCoordForCoordAndZ(r1(Y),ht),vt=v.getTileCoordExtent(it),Ut=Du(this.tempTransform,[F*(vt[0]-Y[0])/_,F*(Y[3]-vt[3])/_]),Pe=F*m.getGutterForProjection(o);for(const Te of z[ht]){if(Te.getState()!==si.LOADED)continue;const Se=Te.tileCoord,Ne=it[1]-Se[1],ut=Math.round(Ut[0]-(Ne-1)*Me),rt=it[2]-Se[2],mt=Math.round(Ut[1]-(rt-1)*dt),Rt=Math.round(Ut[0]-Ne*Me),Bt=Math.round(Ut[1]-rt*dt),$t=ut-Rt,Rn=mt-Bt,zn=ke.length===1;let ai=!1;je=[Rt,Bt,Rt+$t,Bt,Rt+$t,Bt+Rn,Rt,Bt+Rn];for(let _n=0,Bn=Ie.length;_n<Bn;++_n)if(!zn&&ht<Qe[_n]){const dn=Ie[_n];Gl([Rt,Bt,Rt+$t,Bt+Rn],[dn[0],dn[3],dn[4],dn[7]])&&(ai||(we.save(),ai=!0),we.beginPath(),we.moveTo(je[0],je[1]),we.lineTo(je[2],je[3]),we.lineTo(je[4],je[5]),we.lineTo(je[6],je[7]),we.moveTo(dn[6],dn[7]),we.lineTo(dn[4],dn[5]),we.lineTo(dn[2],dn[3]),we.lineTo(dn[0],dn[1]),we.clip())}Ie.push(je),Qe.push(ht),this.drawTile(Te,e,Rt,Bt,$t,Rn,Pe,zn),ai&&we.restore(),this.renderedTiles.unshift(Te),this.updateUsedTiles(e.usedTiles,m,Te)}}if(this.renderedResolution=_,this.extentChanged=!this.renderedExtent_||!J0(this.renderedExtent_,Y),this.renderedExtent_=Y,this.renderedPixelRatio=c,this.postRender(this.context,e),i.extent&&we.restore(),we.imageSmoothingEnabled=!0,this.renderComplete){const tt=(ht,ce)=>{const Le=$r(m),We=ce.wantedTiles[Le],Me=We?Object.keys(We).length:0;this.updateCacheSize(Me),this.tileCache_.expireCache()};e.postRenderFunctions.push(tt)}return this.container}updateCacheSize(e){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,e*2)}drawTile(e,t,i,r,o,s,a,c){let A;if(e instanceof Uj){if(A=nR(e.getData()),!A)throw new Error("Rendering array data is not yet supported")}else A=this.getTileImage(e);if(!A)return;const m=this.getRenderContext(t),v=$r(this),x=t.layerStatesArray[t.layerIndex],_=x.opacity*(c?e.getAlpha(v,t.time):1),O=_!==m.globalAlpha;O&&(m.save(),m.globalAlpha=_),m.drawImage(A,a,a,A.width-2*a,A.height-2*a,i,r,o,s),O&&m.restore(),_!==x.opacity?t.animate=!0:c&&e.endTransition(v)}getImage(){const e=this.context;return e?e.canvas:null}getTileImage(e){return e.getImage()}updateUsedTiles(e,t,i){const r=$r(t);r in e||(e[r]={}),e[r][i.getKey()]=!0}}const Ty={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class SCe extends Bx{constructor(e){e=e||{};const t=Object.assign({},e),i=e.cacheSize;delete e.cacheSize,delete t.preload,delete t.useInterimTilesOnError,super(t),this.on,this.once,this.un,this.cacheSize_=i,this.setPreload(e.preload!==void 0?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(Ty.PRELOAD)}setPreload(e){this.set(Ty.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(Ty.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(Ty.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}class Yee extends SCe{constructor(e){super(e)}createRenderer(){return new qee(this,{cacheSize:this.getCacheSize()})}}const ECe={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},zj={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class OCe extends qee{constructor(e,t){super(e,t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=td(),this.tileClipContexts_=null}drawTile(e,t,i,r,o,s,a,c){this.updateExecutorGroup_(e,t.pixelRatio,t.viewState.projection),this.tileImageNeedsRender_(e)&&this.renderTileImage_(e,t),super.drawTile(e,t,i,r,o,s,a,c)}getTile(e,t,i,r){const o=this.getOrCreateTile(e,t,i,r);if(!o)return null;const a=r.viewState.resolution,c=r.viewHints;return(!(c[sl.ANIMATING]||c[sl.INTERACTING])||!o.wantedResolution)&&(o.wantedResolution=a),o}prepareFrame(e){const t=this.getLayer().getRevision();return this.renderedLayerRevision_!==t&&(this.renderedLayerRevision_=t,this.renderedTiles.length=0),super.prepareFrame(e)}updateExecutorGroup_(e,t,i){const r=this.getLayer(),o=r.getRevision(),s=r.getRenderOrder()||null,a=e.wantedResolution,c=e.getReplayState(r);if(!c.dirty&&c.renderedResolution===a&&c.renderedRevision==o&&c.renderedRenderOrder==s)return;const A=r.getSource(),m=!!r.getDeclutter(),v=A.getTileGrid(),_=A.getTileGridForProjection(i).getTileCoordExtent(e.wrappedTileCoord),O=A.getSourceTiles(t,i,e),P=$r(r);delete e.hitDetectionImageData[P],e.executorGroups[P]=[],c.dirty=!1;for(let F=0,j=O.length;F<j;++F){const Q=O[F];if(Q.getState()!=si.LOADED)continue;const V=Q.tileCoord,H=v.getTileCoordExtent(V),G=cm(_,H),Y=jy(G,r.getRenderBuffer()*a,this.tempExtent),z=J0(H,G)?null:Y,se=new Eee(0,G,a,t),le=Z9(a,t),me=function(je,Ie){let Qe;const tt=je.getStyleFunction()||r.getStyleFunction();if(tt&&(Qe=tt(je,a)),Qe){const ht=this.renderFeature(je,le,Qe,se,m,Ie);c.dirty=c.dirty||ht}},fe=Q.getFeatures();s&&s!==c.renderedRenderOrder&&fe.sort(s);for(let je=0,Ie=fe.length;je<Ie;++je){const Qe=fe[je];(!z||Gl(z,Qe.getGeometry().getExtent()))&&me.call(this,Qe,je)}const _e=se.finish(),we=r.getRenderMode()!=="vector"&&m&&O.length===1?null:G,ke=new Oee(we,a,t,A.getOverlaps(),_e,r.getRenderBuffer(),!0);e.executorGroups[P].push(ke)}c.renderedRevision=o,c.renderedRenderOrder=s,c.renderedResolution=a}forEachFeatureAtCoordinate(e,t,i,r,o){const s=t.viewState.resolution,a=t.viewState.rotation;i=i??0;const c=this.getLayer(),m=c.getSource().getTileGridForProjection(t.viewState.projection),v=R9([e]);jy(v,s*i,v);const x={},_=function(V,H,G){let Y=V.getId();Y===void 0&&(Y=$r(V));const z=x[Y];if(z){if(z!==!0&&G<z.distanceSq){if(G===0)return x[Y]=!0,o.splice(o.lastIndexOf(z),1),r(V,c,H);z.geometry=H,z.distanceSq=G}}else{if(G===0)return x[Y]=!0,r(V,c,H);o.push(x[Y]={feature:V,layer:c,geometry:H,distanceSq:G,callback:r})}},O=this.renderedTiles,P=$r(c),F=c.getDeclutter(),j=F?t.declutter?.[F]?.all().map(V=>V.value):null;let Q;e:for(let V=0,H=O.length;V<H;++V){const G=O[V],Y=m.getTileCoordExtent(G.wrappedTileCoord);if(!Gl(Y,v))continue;const z=G.executorGroups[P];for(let se=0,le=z.length;se<le;++se)if(Q=z[se].forEachFeatureAtCoordinate(e,s,a,i,_,j),Q)break e}return Q}getFeatures(e){return this.renderedTiles.length===0?Promise.resolve([]):new Promise((t,i)=>{const r=this.getLayer(),o=r.getSource(),s=this.renderedProjection,a=s.getExtent(),c=this.renderedResolution,A=o.getTileGridForProjection(s),m=Du(this.renderedPixelToCoordinateTransform_,e.slice()),v=A.getTileCoordForCoordAndResolution(m,c).toString(),x=this.renderedTiles.find(V=>V.tileCoord.toString()===v&&V.getState()===si.LOADED);if(!x||x.loadingSourceTiles>0){t([]);return}o.getWrapX()&&s.canWrapX()&&!xg(a,A.getTileCoordExtent(x.tileCoord))&&DP(m,s);const _=$r(r),O=A.getTileCoordExtent(x.wrappedTileCoord),P=r1(O),F=[(m[0]-P[0])/c,(P[1]-m[1])/c],j=x.getSourceTiles().reduce((V,H)=>V.concat(H.getFeatures()),[]);let Q=x.hitDetectionImageData[_];if(!Q){const V=UA(A.getTileSize(A.getZForResolution(c,o.zDirection))),H=this.renderedRotation_,G=[this.getRenderTransform(A.getTileCoordCenter(x.wrappedTileCoord),c,0,ef,V[0]*ef,V[1]*ef,0)];Q=Bee(V,G,j,r.getStyleFunction(),A.getTileCoordExtent(x.wrappedTileCoord),x.getReplayState(r).renderedResolution,H),x.hitDetectionImageData[_]=Q}t(Iee(F,j,Q))})}getFeaturesInExtent(e){const t=[],i=this.getTileCache();if(i.getCount()===0)return t;const o=this.getLayer().getSource().getTileGridForProjection(this.frameState.viewState.projection),s=o.getZForResolution(this.renderedResolution),a={};return i.forEach(c=>{if(c.tileCoord[0]!==s||c.getState()!==si.LOADED)return;const A=c.getSourceTiles();for(let m=0,v=A.length;m<v;++m){const x=A[m],_=x.getKey();if(_ in a)continue;a[_]=!0;const O=x.tileCoord;if(Gl(e,o.getTileCoordExtent(O))){const P=x.getFeatures();if(P)for(let F=0,j=P.length;F<j;++F){const Q=P[F],V=Q.getGeometry();Gl(e,V.getExtent())&&t.push(Q)}}}}),t}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.renderedLayerRevision_!==void 0&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}renderDeclutter(e,t){const i=this.context,r=i.globalAlpha;i.globalAlpha=t.opacity;const o=e.viewHints,s=!(o[sl.ANIMATING]||o[sl.INTERACTING]),a=[this.context.canvas.width,this.context.canvas.height],c=this.getLayer().getDeclutter(),A=c?e.declutter?.[c]:void 0,m=$r(this.getLayer()),v=this.renderedTiles;for(let x=0,_=v.length;x<_;++x){const O=v[x],P=O.executorGroups[m];if(P)for(let F=P.length-1;F>=0;--F)P[F].execute(this.context,a,this.getTileRenderTransform(O,e),e.viewState.rotation,s,Jw,A)}i.globalAlpha=r}renderDeferredInternal(e){const t=this.renderedTiles,i=$r(this.getLayer()),r=t.reduce((c,A,m)=>(A.executorGroups[i].forEach(v=>c.push({executorGroup:v,index:m})),c),[]),o=r.map(({executorGroup:c})=>c.getDeferredZIndexContexts()),s={};for(let c=0,A=r.length;c<A;++c){const m=r[c].executorGroup.getDeferredZIndexContexts();for(const v in m)s[v]=!0}Object.keys(s).map(Number).sort(Pg).forEach(c=>{o.forEach((A,m)=>{A[c]&&(A[c].forEach(v=>{const{executorGroup:x,index:_}=r[m],O=x.getRenderedContext(),P=O.globalAlpha;O.globalAlpha=this.renderedOpacity_;const F=this.tileClipContexts_[_];F&&F.draw(O),v.draw(O),F&&O.restore(),O.globalAlpha=P,v.clear()}),A[c].length=0)})})}getTileRenderTransform(e,t){const i=t.pixelRatio,r=t.viewState,o=r.center,s=r.resolution,a=r.rotation,c=t.size,A=Math.round(c[0]*i),m=Math.round(c[1]*i),x=this.getLayer().getSource().getTileGridForProjection(t.viewState.projection),_=e.tileCoord,O=x.getTileCoordExtent(e.wrappedTileCoord),P=x.getTileCoordExtent(_,this.tempExtent)[0]-O[0];return zP(KO(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(o,s,a,i,A,m,P))}postRender(e,t){const i=t.viewHints,r=!(i[sl.ANIMATING]||i[sl.INTERACTING]);this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice(),this.renderedRotation_=t.viewState.rotation,this.renderedOpacity_=t.layerStatesArray[t.layerIndex].opacity;const o=this.getLayer(),s=o.getRenderMode(),a=e.globalAlpha;e.globalAlpha=this.renderedOpacity_;const c=o.getDeclutter(),A=c?zj[s].filter(G=>!Jw.includes(G)):zj[s],m=t.viewState,v=m.rotation,x=o.getSource(),O=x.getTileGridForProjection(m.projection).getZForResolution(m.resolution,x.zDirection),P=this.renderedTiles,F=[],j=[],Q=[],V=$r(o);let H=!0;for(let G=P.length-1;G>=0;--G){const Y=P[G];H=H&&!Y.getReplayState(o).dirty;const z=Y.executorGroups[V].filter(ke=>ke.hasExecutors(A));if(z.length===0)continue;const se=this.getTileRenderTransform(Y,t),le=Y.tileCoord[0];let me=!1;const fe=z[0].getClipCoords(se);let _e=e,we;if(fe){we=new pU,_e=we.getContext();for(let ke=0,je=F.length;ke<je;++ke)if(O!==le&&le<j[ke]){const Ie=F[ke];Gl([fe[0],fe[3],fe[4],fe[7]],[Ie[0],Ie[3],Ie[4],Ie[7]])&&(me||(_e.save(),me=!0),_e.beginPath(),_e.moveTo(fe[0],fe[1]),_e.lineTo(fe[2],fe[3]),_e.lineTo(fe[4],fe[5]),_e.lineTo(fe[6],fe[7]),_e.moveTo(Ie[6],Ie[7]),_e.lineTo(Ie[4],Ie[5]),_e.lineTo(Ie[2],Ie[3]),_e.lineTo(Ie[0],Ie[1]),_e.clip())}F.push(fe),j.push(le)}for(let ke=0,je=z.length;ke<je;++ke)z[ke].execute(e,[e.canvas.width,e.canvas.height],se,v,r,A,t.declutter?.[c]);me&&(_e===e?_e.restore():Q[G]=we)}e.globalAlpha=a,this.ready=H,this.tileClipContexts_=Q,t.declutter||this.renderDeferredInternal(t),super.postRender(e,t)}renderFeature(e,t,i,r,o,s){if(!i)return!1;let a=!1;if(Array.isArray(i))for(let c=0,A=i.length;c<A;++c)a=Zw(r,e,i[c],t,this.boundHandleStyleImageChange_,void 0,o,s)||a;else a=Zw(r,e,i,t,this.boundHandleStyleImageChange_,void 0,o,s);return a}tileImageNeedsRender_(e){const t=this.getLayer();if(t.getRenderMode()==="vector")return!1;const i=e.getReplayState(t),r=t.getRevision(),o=e.wantedResolution;return i.renderedTileResolution!==o||i.renderedTileRevision!==r}renderTileImage_(e,t){const i=this.getLayer(),r=e.getReplayState(i),o=i.getRevision(),s=e.executorGroups[$r(i)];r.renderedTileRevision=o;const a=e.wrappedTileCoord,c=a[0],A=i.getSource();let m=t.pixelRatio;const x=t.viewState.projection,_=A.getTileGridForProjection(x),O=_.getResolution(e.tileCoord[0]),P=t.pixelRatio/e.wantedResolution*O,F=_.getResolution(c),j=e.getContext();m=Math.round(Math.max(m,P/m));const Q=A.getTilePixelSize(c,m,x);j.canvas.width=Q[0],j.canvas.height=Q[1];const V=m/P;if(V!==1){const z=zz(this.tmpTransform_);KO(z,V,V),j.setTransform.apply(j,z)}const H=_.getTileCoordExtent(a,this.tempExtent),G=P/F,Y=zz(this.tmpTransform_);KO(Y,G,-G),r1e(Y,-H[0],-H[3]);for(let z=0,se=s.length;z<se;++z)s[z].execute(j,[j.canvas.width*V,j.canvas.height*V],Y,0,!0,ECe[i.getRenderMode()],null);r.renderedTileResolution=e.wantedResolution}}class i3 extends dU{constructor(e){e=e||{};const t=Object.assign({},e);delete t.preload;const i=e.cacheSize===void 0?0:e.cacheSize;delete e.cacheSize,delete t.useInterimTilesOnError,super(t),this.on,this.once,this.un,this.cacheSize_=i;const r=e.renderMode||"hybrid";Os(r=="hybrid"||r=="vector","`renderMode` must be `'hybrid'` or `'vector'`"),this.renderMode_=r,this.setPreload(e.preload?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0),this.getBackground,this.setBackground}createRenderer(){return new OCe(this,{cacheSize:this.cacheSize_})}getFeatures(e){return super.getFeatures(e)}getFeaturesInExtent(e){return this.getRenderer().getFeaturesInExtent(e)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(Ty.PRELOAD)}getUseInterimTilesOnError(){return this.get(Ty.USE_INTERIM_TILES_ON_ERROR)}setPreload(e){this.set(Ty.PRELOAD,e)}setUseInterimTilesOnError(e){this.set(Ty.USE_INTERIM_TILES_ON_ERROR,e)}}function rR(n){return Array.isArray(n)?Math.min(...n):n}class BCe extends cU{constructor(e,t,i,r,o,s,a){let c=e.getExtent();c&&e.canWrapX()&&(c=c.slice(),c[0]=-1/0,c[2]=1/0);let A=t.getExtent();A&&t.canWrapX()&&(A=A.slice(),A[0]=-1/0,A[2]=1/0);const m=A?cm(i,A):i,v=lf(m),x=iR(e,t,v,r),_=Wee,O=new Gee(e,t,m,c,x*_,r),P=O.calculateSourceExtent(),F=Fb(P)?null:s(P,x,o),j=F?zi.IDLE:zi.EMPTY,Q=F?F.getPixelRatio():1;super(i,r,Q,j),this.targetProj_=t,this.maxSourceExtent_=c,this.triangulation_=O,this.targetResolution_=r,this.targetExtent_=i,this.sourceImage_=F,this.sourcePixelRatio_=Q,this.interpolate_=a,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==zi.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const e=this.sourceImage_.getState();if(e==zi.LOADED){const t=as(this.targetExtent_)/this.targetResolution_,i=Ku(this.targetExtent_)/this.targetResolution_;this.canvas_=Nee(t,i,this.sourcePixelRatio_,rR(this.sourceImage_.getResolution()),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_,!0)}this.state=e,this.changed()}load(){if(this.state==zi.IDLE){this.state=zi.LOADING,this.changed();const e=this.sourceImage_.getState();e==zi.LOADED||e==zi.ERROR?this.reproject_():(this.sourceListenerKey_=Zo(this.sourceImage_,Ir.CHANGE,t=>{const i=this.sourceImage_.getState();(i==zi.LOADED||i==zi.ERROR)&&(this.unlistenSource_(),this.reproject_())}),this.sourceImage_.load())}}unlistenSource_(){Ea(this.sourceListenerKey_),this.sourceListenerKey_=null}}const HM=4,hB={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"};class ICe extends ym{constructor(e,t){super(e),this.image=t}}class $ee extends Ix{constructor(e){super({attributions:e.attributions,projection:e.projection,state:e.state,interpolate:e.interpolate!==void 0?e.interpolate:!0}),this.on,this.once,this.un,this.loader=e.loader||null,this.resolutions_=e.resolutions!==void 0?e.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0,this.image=null,this.wantedExtent_,this.wantedResolution_,this.static_=e.loader?e.loader.length===0:!1,this.wantedProjection_=null}getResolutions(){return this.resolutions_}setResolutions(e){this.resolutions_=e}findNearestResolution(e){const t=this.getResolutions();if(t){const i=ME(t,e,0);e=t[i]}return e}getImage(e,t,i,r){const o=this.getProjection();if(!o||!r||Ny(o,r))return o&&(r=o),this.getImageInternal(e,t,i,r);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Ny(this.reprojectedImage_.getProjection(),r)&&this.reprojectedImage_.getResolution()==t&&J0(this.reprojectedImage_.getExtent(),e))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new BCe(o,r,e,t,i,(s,a,c)=>this.getImageInternal(s,a,c,o),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(e,t,i,r){if(this.loader){const o=kCe(e,t,i,1),s=this.findNearestResolution(t);if(this.image&&(this.static_||this.wantedProjection_===r&&(this.wantedExtent_&&xg(this.wantedExtent_,o)||xg(this.image.getExtent(),o))&&(this.wantedResolution_&&rR(this.wantedResolution_)===s||rR(this.image.getResolution())===s)))return this.image;this.wantedProjection_=r,this.wantedExtent_=o,this.wantedResolution_=s,this.image=new cU(o,s,i,this.loader),this.image.addEventListener(Ir.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(e){const t=e.target;let i;switch(t.getState()){case zi.LOADING:this.loading=!0,i=hB.IMAGELOADSTART;break;case zi.LOADED:this.loading=!1,i=hB.IMAGELOADEND;break;case zi.ERROR:this.loading=!1,i=hB.IMAGELOADERROR;break;default:return}this.hasListener(i)&&this.dispatchEvent(new ICe(i,t))}}function kCe(n,e,t,i){const r=e/t,o=lf(n),s=Oy(as(n)/r,HM),a=Oy(Ku(n)/r,HM),c=Oy((i-1)*s/2,HM),A=s+2*c,m=Oy((i-1)*a/2,HM),v=a+2*m;return zw(o,r,0,[A,v])}const UC=[0,0,0],hy=5;class qE{constructor(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,Os(e0e(this.resolutions_,(r,o)=>o-r),"`resolutions` must be sorted in descending order");let t;if(!e.origins){for(let r=0,o=this.resolutions_.length-1;r<o;++r)if(!t)t=this.resolutions_[r]/this.resolutions_[r+1];else if(this.resolutions_[r]/this.resolutions_[r+1]!==t){t=void 0;break}}this.zoomFactor_=t,this.maxZoom=this.resolutions_.length-1,this.origin_=e.origin!==void 0?e.origin:null,this.origins_=null,e.origins!==void 0&&(this.origins_=e.origins,Os(this.origins_.length==this.resolutions_.length,"Number of `origins` and `resolutions` must be equal"));const i=e.extent;i!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=r1(i)),Os(!this.origin_&&this.origins_||this.origin_&&!this.origins_,"Either `origin` or `origins` must be configured, never both"),this.tileSizes_=null,e.tileSizes!==void 0&&(this.tileSizes_=e.tileSizes,Os(this.tileSizes_.length==this.resolutions_.length,"Number of `tileSizes` and `resolutions` must be equal")),this.tileSize_=e.tileSize!==void 0?e.tileSize:this.tileSizes_?null:eU,Os(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,"Either `tileSize` or `tileSizes` must be configured, never both"),this.extent_=i!==void 0?i:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],e.sizes!==void 0?this.fullTileRanges_=e.sizes.map((r,o)=>{const s=new yU(Math.min(0,r[0]),Math.max(r[0]-1,-1),Math.min(0,r[1]),Math.max(r[1]-1,-1));if(i){const a=this.getTileRangeForExtentAndZ(i,o);s.minX=Math.max(a.minX,s.minX),s.maxX=Math.min(a.maxX,s.maxX),s.minY=Math.max(a.minY,s.minY),s.maxY=Math.min(a.maxY,s.maxY)}return s}):i&&this.calculateTileRanges_(i)}forEachTileCoord(e,t,i){const r=this.getTileRangeForExtentAndZ(e,t);for(let o=r.minX,s=r.maxX;o<=s;++o)for(let a=r.minY,c=r.maxY;a<=c;++a)i([t,o,a])}forEachTileCoordParentTileRange(e,t,i,r){let o,s,a,c=null,A=e[0]-1;for(this.zoomFactor_===2?(s=e[1],a=e[2]):c=this.getTileCoordExtent(e,r);A>=this.minZoom;){if(s!==void 0&&a!==void 0?(s=Math.floor(s/2),a=Math.floor(a/2),o=RC(s,s,a,a,i)):o=this.getTileRangeForExtentAndZ(c,A,i),t(A,o))return!0;--A}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(e){return this.origin_?this.origin_:this.origins_[e]}getResolution(e){return this.resolutions_[e]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(e,t,i){if(e[0]<this.maxZoom){if(this.zoomFactor_===2){const o=e[1]*2,s=e[2]*2;return RC(o,o+1,s,s+1,t)}const r=this.getTileCoordExtent(e,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(r,e[0]+1,t)}return null}getTileRangeForTileCoordAndZ(e,t,i){if(t>this.maxZoom||t<this.minZoom)return null;const r=e[0],o=e[1],s=e[2];if(t===r)return RC(o,s,o,s,i);if(this.zoomFactor_){const c=Math.pow(this.zoomFactor_,t-r),A=Math.floor(o*c),m=Math.floor(s*c);if(t<r)return RC(A,A,m,m,i);const v=Math.floor(c*(o+1))-1,x=Math.floor(c*(s+1))-1;return RC(A,v,m,x,i)}const a=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,t,i)}getTileRangeForExtentAndZ(e,t,i){this.getTileCoordForXYAndZ_(e[0],e[3],t,!1,UC);const r=UC[1],o=UC[2];this.getTileCoordForXYAndZ_(e[2],e[1],t,!0,UC);const s=UC[1],a=UC[2];return RC(r,s,o,a,i)}getTileCoordCenter(e){const t=this.getOrigin(e[0]),i=this.getResolution(e[0]),r=UA(this.getTileSize(e[0]),this.tmpSize_);return[t[0]+(e[1]+.5)*r[0]*i,t[1]-(e[2]+.5)*r[1]*i]}getTileCoordExtent(e,t){const i=this.getOrigin(e[0]),r=this.getResolution(e[0]),o=UA(this.getTileSize(e[0]),this.tmpSize_),s=i[0]+e[1]*o[0]*r,a=i[1]-(e[2]+1)*o[1]*r,c=s+o[0]*r,A=a+o[1]*r;return X0(s,a,c,A,t)}getTileCoordForCoordAndResolution(e,t,i){return this.getTileCoordForXYAndResolution_(e[0],e[1],t,!1,i)}getTileCoordForXYAndResolution_(e,t,i,r,o){const s=this.getZForResolution(i),a=i/this.getResolution(s),c=this.getOrigin(s),A=UA(this.getTileSize(s),this.tmpSize_);let m=a*(e-c[0])/i/A[0],v=a*(c[1]-t)/i/A[1];return r?(m=Oy(m,hy)-1,v=Oy(v,hy)-1):(m=KM(m,hy),v=KM(v,hy)),nS(s,m,v,o)}getTileCoordForXYAndZ_(e,t,i,r,o){const s=this.getOrigin(i),a=this.getResolution(i),c=UA(this.getTileSize(i),this.tmpSize_);let A=(e-s[0])/a/c[0],m=(s[1]-t)/a/c[1];return r?(A=Oy(A,hy)-1,m=Oy(m,hy)-1):(A=KM(A,hy),m=KM(m,hy)),nS(i,A,m,o)}getTileCoordForCoordAndZ(e,t,i){return this.getTileCoordForXYAndZ_(e[0],e[1],t,!1,i)}getTileCoordResolution(e){return this.resolutions_[e[0]]}getTileSize(e){return this.tileSize_?this.tileSize_:this.tileSizes_[e]}getFullTileRange(e){return this.fullTileRanges_?this.fullTileRanges_[e]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,e):null}getZForResolution(e,t){const i=ME(this.resolutions_,e,t||0);return vl(i,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(e,t){return WJ(t,0,t.length,2,this.getTileCoordExtent(e))}calculateTileRanges_(e){const t=this.resolutions_.length,i=new Array(t);for(let r=this.minZoom;r<t;++r)i[r]=this.getTileRangeForExtentAndZ(e,r);this.fullTileRanges_=i}}function Vee(n){let e=n.getDefaultTileGrid();return e||(e=DCe(n),n.setDefaultTileGrid(e)),e}function TCe(n,e,t){const i=e[0],r=n.getTileCoordCenter(e),o=YE(t);if(!Sb(o,r)){const s=as(o),a=Math.ceil((o[0]-r[0])/s);return r[0]+=s*a,n.getTileCoordForCoordAndZ(r,i)}return e}function RCe(n,e,t,i){i=i!==void 0?i:"top-left";const r=Hee(n,e,t);return new qE({extent:n,origin:p0e(n,i),resolutions:r,tileSize:t})}function MU(n){const e=n||{},t=e.extent||Xs("EPSG:3857").getExtent(),i={extent:t,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Hee(t,e.maxZoom,e.tileSize,e.maxResolution)};return new qE(i)}function Hee(n,e,t,i){e=e!==void 0?e:$J,t=UA(t!==void 0?t:eU);const r=Ku(n),o=as(n);i=i>0?i:Math.max(o/t[0],r/t[1]);const s=e+1,a=new Array(s);for(let c=0;c<s;++c)a[c]=i/Math.pow(2,c);return a}function DCe(n,e,t,i){const r=YE(n);return RCe(r,e,t,i)}function YE(n){n=Xs(n);let e=n.getExtent();if(!e){const t=180*Yy.degrees/n.getMetersPerUnit();e=X0(-t,-t,t,t)}return e}class Zee extends Ix{constructor(e){super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate}),this.on,this.once,this.un,this.tilePixelRatio_=e.tilePixelRatio!==void 0?e.tilePixelRatio:1,this.tileGrid=e.tileGrid!==void 0?e.tileGrid:null;const t=[256,256];this.tileGrid&&UA(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),t),this.tmpSize=[0,0],this.key_=e.key||$r(this),this.tileOptions={transition:e.transition,interpolate:e.interpolate},this.zDirection=e.zDirection?e.zDirection:0}getGutterForProjection(e){return 0}getKey(){return this.key_}setKey(e){this.key_!==e&&(this.key_=e,this.changed())}getResolutions(e){const t=e?this.getTileGridForProjection(e):this.tileGrid;return t?t.getResolutions():null}getTile(e,t,i,r,o){return Dr()}getTileGrid(){return this.tileGrid}getTileGridForProjection(e){return this.tileGrid?this.tileGrid:Vee(e)}getTilePixelRatio(e){return this.tilePixelRatio_}getTilePixelSize(e,t,i){const r=this.getTileGridForProjection(i),o=this.getTilePixelRatio(t),s=UA(r.getTileSize(e),this.tmpSize);return o==1?s:Mye(s,o,this.tmpSize)}getTileCoordForTileUrlFunction(e,t){const i=t!==void 0?t:this.getProjection(),r=t!==void 0?this.getTileGridForProjection(i):this.tileGrid||this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(e=TCe(r,e,i)),MCe(e,r)?e:null}clear(){}refresh(){this.clear(),super.refresh()}}class PCe extends ym{constructor(e,t){super(e),this.tile=t}}function Xee(n){return function(e){const t=e.buffers,i=e.meta,r=e.imageOps,o=e.width,s=e.height,a=t.length,c=t[0].byteLength;if(r){const x=new Array(a);for(let O=0;O<a;++O)x[O]=new ImageData(new Uint8ClampedArray(t[O]),o,s);return n(x,i).data.buffer}const A=new Uint8ClampedArray(c),m=new Array(a),v=new Array(a);for(let x=0;x<a;++x)m[x]=new Uint8ClampedArray(t[x]),v[x]=[0,0,0,0];for(let x=0;x<c;x+=4){for(let O=0;O<a;++O){const P=m[O];v[O][0]=P[x],v[O][1]=P[x+1],v[O][2]=P[x+2],v[O][3]=P[x+3]}const _=n(v,i);A[x]=_[0],A[x+1]=_[1],A[x+2]=_[2],A[x+3]=_[3]}return A.buffer}}function UCe(n,e){const i=Object.keys(n.lib||{}).map(function(o){return"const "+o+" = "+n.lib[o].toString()+";"}).concat(["const __minion__ = ("+Xee.toString()+")(",n.operation.toString(),");",'self.addEventListener("message", function(event) {'," const buffer = __minion__(event.data);"," self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),r=new Worker(typeof Blob>"u"?"data:text/javascript;base64,"+Buffer.from(i.join(`
`),"binary").toString("base64"):URL.createObjectURL(new Blob(i,{type:"text/javascript"})));return r.addEventListener("message",e),r}function KCe(n,e){const t=Xee(n.operation);let i=!1;return{postMessage:function(r){setTimeout(function(){i||e({data:{buffer:t(r),meta:r.meta}})},0)},terminate:function(){i=!0}}}let LCe=class extends N4{constructor(e){super(),this.imageOps_=!!e.imageOps;let t;e.threads===0?t=0:this.imageOps_?t=1:t=e.threads||1;const i=new Array(t);if(t)for(let r=0;r<t;++r)i[r]=UCe(e,this.onWorkerMessage_.bind(this,r));else i[0]=KCe(e,this.onWorkerMessage_.bind(this,0));this.workers_=i,this.queue_=[],this.maxQueueLength_=e.queue||1/0,this.running_=0,this.dataLookup_={},this.job_=null}process(e,t,i){this.enqueue_({inputs:e,meta:t,callback:i}),this.dispatch_()}enqueue_(e){for(this.queue_.push(e);this.queue_.length>this.maxQueueLength_;)this.queue_.shift().callback(null,null)}dispatch_(){if(this.running_||this.queue_.length===0)return;const e=this.queue_.shift();this.job_=e;const t=e.inputs[0].width,i=e.inputs[0].height,r=e.inputs.map(function(c){return c.data.buffer}),o=this.workers_.length;if(this.running_=o,o===1){this.workers_[0].postMessage({buffers:r,meta:e.meta,imageOps:this.imageOps_,width:t,height:i},r);return}const s=e.inputs[0].data.length,a=4*Math.ceil(s/4/o);for(let c=0;c<o;++c){const A=c*a,m=[];for(let v=0,x=r.length;v<x;++v)m.push(r[v].slice(A,A+a));this.workers_[c].postMessage({buffers:m,meta:e.meta,imageOps:this.imageOps_,width:t,height:i},m)}}onWorkerMessage_(e,t){this.disposed||(this.dataLookup_[e]=t.data,--this.running_,this.running_===0&&this.resolveJob_())}resolveJob_(){const e=this.job_,t=this.workers_.length;let i,r;if(t===1)i=new Uint8ClampedArray(this.dataLookup_[0].buffer),r=this.dataLookup_[0].meta;else{const o=e.inputs[0].data.length;i=new Uint8ClampedArray(o),r=new Array(t);const s=4*Math.ceil(o/4/t);for(let a=0;a<t;++a){const c=this.dataLookup_[a].buffer,A=a*s;i.set(new Uint8ClampedArray(c),A),r[a]=this.dataLookup_[a].meta}}this.job_=null,this.dataLookup_={},e.callback(null,new ImageData(i,e.inputs[0].width,e.inputs[0].height),r),this.dispatch_()}disposeInternal(){for(let e=0;e<this.workers_.length;++e)this.workers_[e].terminate();this.workers_.length=0}};const jj={BEFOREOPERATIONS:"beforeoperations",AFTEROPERATIONS:"afteroperations"};class Nj extends ym{constructor(e,t,i){super(e),this.extent=t.extent,this.resolution=t.viewState.resolution/t.pixelRatio,this.data=i}}class Jee extends $ee{constructor(e){super({projection:null}),this.on,this.once,this.un,this.processor_=null,this.operationType_=e.operationType!==void 0?e.operationType:"pixel",this.threads_=e.threads!==void 0?e.threads:1,this.layers_=jCe(e.sources);const t=this.changed.bind(this);for(let i=0,r=this.layers_.length;i<r;++i)this.layers_[i].addEventListener(Ir.CHANGE,t);this.useResolutions_=e.resolutions!==null,this.tileQueue_=new gJ(function(){return 1},this.processSources_.bind(this)),this.requestedFrameState_,this.renderedImageCanvas_=null,this.renderedRevision_,this.frameState_={animate:!1,coordinateToPixelTransform:td(),declutter:null,extent:null,index:0,layerIndex:0,layerStatesArray:zCe(this.layers_),pixelRatio:1,pixelToCoordinateTransform:td(),postRenderFunctions:[],size:[0,0],tileQueue:this.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},mapId:$r(this),renderTargets:{}},this.setAttributions(function(i){const r=[];for(let o=0,s=e.sources.length;o<s;++o){const a=e.sources[o],c=a instanceof Ix?a:a.getSource();if(!c)continue;const A=c.getAttributions()?.(i);typeof A=="string"?r.push(A):A!==void 0&&r.push(...A)}return r}),e.operation!==void 0&&this.setOperation(e.operation,e.lib)}setOperation(e,t){this.processor_&&this.processor_.dispose(),this.processor_=new LCe({operation:e,imageOps:this.operationType_==="image",queue:1,lib:t,threads:this.threads_}),this.changed()}updateFrameState_(e,t,i){const r=Object.assign({},this.frameState_);r.viewState=Object.assign({},r.viewState);const o=lf(e);r.size[0]=Math.ceil(as(e)/t),r.size[1]=Math.ceil(Ku(e)/t),r.extent=[o[0]-r.size[0]*t/2,o[1]-r.size[1]*t/2,o[0]+r.size[0]*t/2,o[1]+r.size[1]*t/2],r.time=Date.now();const s=r.viewState;return s.center=o,s.projection=i,s.resolution=t,r}allSourcesReady_(){let e=!0,t;for(let i=0,r=this.layers_.length;i<r;++i)if(t=this.layers_[i].getSource(),!t||t.getState()!=="ready"){e=!1;break}return e}getImage(e,t,i,r){if(!this.allSourcesReady_())return null;this.tileQueue_.loadMoreTiles(16,16),t=this.findNearestResolution(t);const o=this.updateFrameState_(e,t,r);if(this.requestedFrameState_=o,this.renderedImageCanvas_){const s=this.renderedImageCanvas_.getResolution(),a=this.renderedImageCanvas_.getExtent();(t!==s||!J0(o.extent,a))&&(this.renderedImageCanvas_=null)}return(!this.renderedImageCanvas_||this.getRevision()!==this.renderedRevision_)&&this.processSources_(),o.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_}processSources_(){const e=this.requestedFrameState_,t=this.layers_.length,i=new Array(t);for(let o=0;o<t;++o){e.layerIndex=o,e.renderTargets={};const s=FCe(this.layers_[o],e);if(s)i[o]=s;else return}const r={};this.dispatchEvent(new Nj(jj.BEFOREOPERATIONS,e,r)),this.processor_.process(i,r,this.onWorkerComplete_.bind(this,e))}onWorkerComplete_(e,t,i,r){if(t||!i)return;const o=e.extent,s=e.viewState.resolution;if(s!==this.requestedFrameState_.viewState.resolution||!J0(o,this.requestedFrameState_.extent))return;let a;if(this.renderedImageCanvas_)a=this.renderedImageCanvas_.getImage().getContext("2d");else{const c=Math.round(as(o)/s),A=Math.round(Ku(o)/s);a=bl(c,A),this.renderedImageCanvas_=new abe(o,s,1,a.canvas)}a.putImageData(i,0,0),e.animate?requestAnimationFrame(this.changed.bind(this)):this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new Nj(jj.AFTEROPERATIONS,e,r))}getResolutions(e){if(!this.useResolutions_)return null;let t=super.getResolutions();if(!t)for(let i=0,r=this.layers_.length;i<r&&(t=this.layers_[i].getSource().getResolutions(e),!t);++i);return t}disposeInternal(){this.processor_&&this.processor_.dispose(),super.disposeInternal()}}Jee.prototype.dispose;let Nv=null;function FCe(n,e){const t=n.getRenderer();if(!t)throw new Error("Unsupported layer type: "+n);if(!t.prepareFrame(e))return null;const i=e.size[0],r=e.size[1];if(i===0||r===0)return null;const o=t.renderFrame(e,null);let s;if(o instanceof HTMLCanvasElement)s=o;else{if(o&&(s=o.firstElementChild),!(s instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+s);if(s.width===i&&s.height===r)return s.getContext("2d").getImageData(0,0,i,r)}if(!Nv)Nv=bl(i,r,void 0,{willReadFrequently:!0});else{const a=Nv.canvas;a.width!==i||a.height!==r?Nv=bl(i,r,void 0,{willReadFrequently:!0}):Nv.clearRect(0,0,i,r)}return Nv.drawImage(s,0,0,i,r),Nv.getImageData(0,0,i,r)}function zCe(n){return n.map(function(e){return e.getLayerState()})}function jCe(n){const e=n.length,t=new Array(e);for(let i=0;i<e;++i)t[i]=NCe(n[i]);return t}function NCe(n){let e;return n instanceof Ix?n instanceof Zee?e=new Yee({source:n}):n instanceof $ee&&(e=new jee({source:n})):e=n,e}function GCe(n,e,t,i){const r=document.createElement("script"),o="olc_"+$r(e);function s(){delete window[o],r.parentNode.removeChild(r)}r.async=!0,r.src=n+(n.includes("?")?"&":"?")+"callback="+o;const a=setTimeout(function(){s(),t&&t()},1e4);window[o]=function(c){clearTimeout(a),s(),e(c)},document.head.appendChild(r)}const WCe=/\{z\}/g,QCe=/\{x\}/g,qCe=/\{y\}/g,YCe=/\{-y\}/g;function $Ce(n,e,t,i,r){return n.replace(WCe,e.toString()).replace(QCe,t.toString()).replace(qCe,i.toString()).replace(YCe,function(){if(r===void 0)throw new Error("If the URL template has a {-y} placeholder, the grid extent must be known");return(r-i).toString()})}function VCe(n){const e=[];let t=/\{([a-z])-([a-z])\}/.exec(n);if(t){const i=t[1].charCodeAt(0),r=t[2].charCodeAt(0);let o;for(o=i;o<=r;++o)e.push(n.replace(t[0],String.fromCharCode(o)));return e}if(t=/\{(\d+)-(\d+)\}/.exec(n),t){const i=parseInt(t[2],10);for(let r=parseInt(t[1],10);r<=i;r++)e.push(n.replace(t[0],r.toString()));return e}return e.push(n),e}function HCe(n,e){return(function(t,i,r){if(!t)return;let o;const s=t[0];if(e){const a=e.getFullTileRange(s);a&&(o=a.getHeight()-1)}return $Ce(n,s,t[1],t[2],o)})}function ete(n,e){const t=n.length,i=new Array(t);for(let r=0;r<t;++r)i[r]=HCe(n[r],e);return ZCe(i)}function ZCe(n){return n.length===1?n[0]:(function(e,t,i){if(!e)return;const r=_Ce(e),o=gb(r,n.length);return n[o](e,t,i)})}const dB={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class $E extends Zee{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===$E.prototype.tileUrlFunction,this.tileLoadFunction=e.tileLoadFunction,e.tileUrlFunction&&(this.tileUrlFunction=e.tileUrlFunction),this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(e){const t=e.target,i=$r(t),r=t.getState();let o;r==si.LOADING?(this.tileLoadingKeys_[i]=!0,o=dB.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],o=r==si.ERROR?dB.TILELOADERROR:r==si.LOADED?dB.TILELOADEND:void 0),o!=null&&this.dispatchEvent(new PCe(o,t))}setTileLoadFunction(e){this.tileLoadFunction=e,this.changed()}setTileUrlFunction(e,t){this.tileUrlFunction=e,typeof t<"u"?this.setKey(t):this.changed()}setUrl(e){const t=VCe(e);this.urls=t,this.setUrls(t)}setUrls(e){this.urls=e;const t=e.join(`
`);this.generateTileUrlFunction_?this.setTileUrlFunction(ete(e,this.tileGrid),t):this.setKey(t)}tileUrlFunction(e,t,i){}}class XCe extends $E{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:JCe,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate!==void 0?e.interpolate:!0,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin!==void 0?e.crossOrigin:null,this.tileClass=e.tileClass!==void 0?e.tileClass:kee,this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(e){return this.getProjection()&&e&&!Ny(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=":disable-interpolation"),e}getTileGridForProjection(e){const t=this.getProjection();if(this.tileGrid&&(!t||Ny(t,e)))return this.tileGrid;const i=$r(e);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=Vee(e)),this.tileGridForProjection[i]}createTile_(e,t,i,r,o,s){const a=[e,t,i],c=this.getTileCoordForTileUrlFunction(a,o),A=c?this.tileUrlFunction(c,r,o):void 0,m=new this.tileClass(a,A!==void 0?si.IDLE:si.EMPTY,A!==void 0?A:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return m.key=s,m.addEventListener(Ir.CHANGE,this.handleTileChange.bind(this)),m}getTile(e,t,i,r,o){const s=this.getProjection();if(!s||!o||Ny(s,o))return this.getTileInternal(e,t,i,r,s||o);const a=[e,t,i],c=this.getKey(),A=this.getTileGridForProjection(s),m=this.getTileGridForProjection(o),v=this.getTileCoordForTileUrlFunction(a,o),x=new Qee(s,A,o,m,a,v,this.getTilePixelRatio(r),this.getGutter(),(_,O,P,F)=>this.getTileInternal(_,O,P,F,s),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return x.key=c,x}getTileInternal(e,t,i,r,o){const s=this.getKey();return this.createTile_(e,t,i,r,o,s)}setRenderReprojectionEdges(e){this.renderReprojectionEdges_!=e&&(this.renderReprojectionEdges_=e,this.changed())}setTileGridForProjection(e,t){const i=Xs(e);if(i){const r=$r(i);r in this.tileGridForProjection||(this.tileGridForProjection[r]=t)}}}function JCe(n,e){n.getImage().src=e}class tte extends XCe{constructor(e){if(super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:Xs("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:"loading",tileLoadFunction:e.tileLoadFunction,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,zDirection:e.zDirection}),this.tileJSON_=null,this.tileSize_=e.tileSize,e.url)if(e.jsonp)GCe(e.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",e.url),t.send()}else if(e.tileJSON)this.handleTileJSONResponse(e.tileJSON);else throw new Error("Either `url` or `tileJSON` options must be provided")}onXHRLoad_(e){const t=e.target;if(!t.status||t.status>=200&&t.status<300){let i;try{i=JSON.parse(t.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(i)}else this.handleTileJSONError()}onXHRError_(e){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(e){const t=Xs("EPSG:4326"),i=this.getProjection();let r;if(e.bounds!==void 0){const A=Y4(t,i);r=y0e(e.bounds,A)}const o=YE(i),s=e.minzoom||0,a=e.maxzoom||22,c=MU({extent:o,maxZoom:a,minZoom:s,tileSize:this.tileSize_});if(this.tileGrid=c,this.tileUrlFunction=ete(e.tiles,c),e.attribution&&!this.getAttributions()){const A=r!==void 0?r:o;this.setAttributions(function(m){return Gl(A,m.extent)?[e.attribution]:null})}this.tileJSON_=e,this.setState("ready")}handleTileJSONError(){this.setState("error")}}class wU extends $E{constructor(e){const t=e.projection||"EPSG:3857",i=e.extent||YE(t),r=e.tileGrid||MU({extent:i,maxResolution:e.maxResolution,maxZoom:e.maxZoom!==void 0?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,interpolate:!0,projection:t,state:e.state,tileGrid:r,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:nte,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX===void 0?!0:e.wrapX,transition:e.transition,zDirection:e.zDirection===void 0?1:e.zDirection}),this.format_=e.format?e.format:null,this.tileKeysBySourceTileUrl_={},this.sourceTiles_={},this.overlaps_=e.overlaps==null?!0:e.overlaps,this.tileClass=e.tileClass?e.tileClass:Tee,this.tileGrids_={}}getOverlaps(){return this.overlaps_}getSourceTiles(e,t,i){if(i.getState()===si.IDLE){i.setState(si.LOADING);const r=i.wrappedTileCoord,o=this.getTileGridForProjection(t),s=o.getTileCoordExtent(r),a=r[0],c=o.getResolution(a);jy(s,-c,s);const A=this.tileGrid,m=A.getExtent();m&&cm(s,m,s);const v=A.getZForResolution(c,this.zDirection);A.forEachTileCoord(s,v,x=>{const _=this.tileUrlFunction(x,e,t);this.sourceTiles_[_]||(this.sourceTiles_[_]=new this.tileClass(x,_?si.IDLE:si.EMPTY,_,this.format_,this.tileLoadFunction));const O=this.sourceTiles_[_];i.sourceTiles.push(O),this.tileKeysBySourceTileUrl_[_]||(this.tileKeysBySourceTileUrl_[_]=[]),this.tileKeysBySourceTileUrl_[_].push(i.getKey());const P=O.getState();if(P<si.LOADED){const F=j=>{this.handleTileChange(j);const Q=O.getState();if(Q===si.LOADED||Q===si.ERROR){const V=O.getKey();V in i.errorTileKeys?O.getState()===si.LOADED&&delete i.errorTileKeys[V]:i.loadingSourceTiles--,Q===si.ERROR?i.errorTileKeys[V]=!0:O.removeEventListener(Ir.CHANGE,F),i.loadingSourceTiles===0&&i.setState(qy(i.errorTileKeys)?si.LOADED:si.ERROR)}};O.addEventListener(Ir.CHANGE,F),i.loadingSourceTiles++}P===si.IDLE&&(O.extent=A.getTileCoordExtent(x),O.projection=t,O.resolution=A.getResolution(x[0]),O.load())}),i.loadingSourceTiles||i.setState(i.sourceTiles.some(x=>x.getState()===si.ERROR)?si.ERROR:si.LOADED)}return i.sourceTiles}removeSourceTiles(e){const t=e.getKey(),i=e.sourceTiles;for(let r=0,o=i.length;r<o;++r){const s=i[r].getTileUrl();if(!this.tileKeysBySourceTileUrl_[s])return;const a=this.tileKeysBySourceTileUrl_[s].indexOf(t);a!==-1&&(this.tileKeysBySourceTileUrl_[s].splice(a,1),this.tileKeysBySourceTileUrl_[s].length===0&&(delete this.tileKeysBySourceTileUrl_[s],delete this.sourceTiles_[s]))}}getTile(e,t,i,r,o){const s=[e,t,i];let a=this.getTileCoordForTileUrlFunction(s,o);const c=this.getTileGrid().getExtent(),A=this.getTileGridForProjection(o);if(a&&c){const x=A.getTileCoordExtent(a);jy(x,-A.getResolution(e),x),Gl(c,x)||(a=null)}let m=!0;if(a!==null){const x=this.tileGrid,_=A.getResolution(e),O=x.getZForResolution(_,1),P=A.getTileCoordExtent(a);jy(P,-_,P),x.forEachTileCoord(P,O,F=>{m=m&&!this.tileUrlFunction(F,r,o)})}const v=new cbe(s,m?si.EMPTY:si.IDLE,a,this.getSourceTiles.bind(this,r,o),this.removeSourceTiles.bind(this));return v.key=this.getKey(),v}getTileGridForProjection(e){const t=e.getCode();let i=this.tileGrids_[t];if(!i){const r=this.getProjection();Os(r===null||Ny(r,e),"A VectorTile source can only be rendered if it has a projection compatible with the view projection.");const o=this.tileGrid,s=o.getResolutions().slice(),a=s.map(function(m,v){return o.getOrigin(v)}),c=s.map(function(m,v){return o.getTileSize(v)}),A=$J+1;for(let m=s.length;m<A;++m)s.push(s[m-1]/2),a.push(a[m-1]),c.push(c[m-1]);i=new qE({extent:o.getExtent(),origins:a,resolutions:s,tileSizes:c}),this.tileGrids_[t]=i}return i}getTilePixelRatio(e){return e}getTilePixelSize(e,t,i){const r=this.getTileGridForProjection(i),o=UA(r.getTileSize(e),this.tmpSize);return[Math.round(o[0]*t),Math.round(o[1]*t)]}setOverlaps(e){this.overlaps_=e,this.changed()}}function nte(n,e){n.setLoader(function(t,i,r){See(e,n.getFormat(),t,i,r,n.onLoad.bind(n),n.onError.bind(n))})}function e_e(n,e){const t=n[0],i=t.width,r=t.height,o=t.data,s=new Uint8ClampedArray(o.length),a=e.resolution*2,c=i-1,A=r-1,m=[0,0,0,0],v=2*Math.PI,x=Math.PI/2,_=Math.PI*e.sunEl/180,O=Math.PI*e.sunAz/180,P=Math.cos(_),F=Math.sin(_),j=e.highlightColor,Q=e.shadowColor,V=e.accentColor,H=e.encoding;let G,Y,z,se,le,me,fe,_e,we,ke,je,Ie,Qe,tt,ht,ce,Le,We,Me,dt,it,vt;function Ut(Pe,Te="mapbox"){if(Te==="mapbox")return(Pe[0]*256*256+Pe[1]*256+Pe[2])*.1-1e4;if(Te==="terrarium")return Pe[0]*256+Pe[1]+Pe[2]/256-32768}for(Y=0;Y<=A;++Y)for(le=Y===0?0:Y-1,me=Y===A?A:Y+1,G=0;G<=c;++G)z=G===0?0:G-1,se=G===c?c:G+1,fe=(Y*i+z)*4,m[0]=o[fe],m[1]=o[fe+1],m[2]=o[fe+2],m[3]=o[fe+3],_e=e.vert*Ut(m,H),fe=(Y*i+se)*4,m[0]=o[fe],m[1]=o[fe+1],m[2]=o[fe+2],m[3]=o[fe+3],we=e.vert*Ut(m,H),ke=(we-_e)/a,fe=(le*i+G)*4,m[0]=o[fe],m[1]=o[fe+1],m[2]=o[fe+2],m[3]=o[fe+3],_e=e.vert*Ut(m,H),fe=(me*i+G)*4,m[0]=o[fe],m[1]=o[fe+1],m[2]=o[fe+2],m[3]=o[fe+3],we=e.vert*Ut(m,H),je=(we-_e)/a,Qe=Math.atan2(je,-ke),Qe<0?Qe=x-Qe:Qe>x?Qe=v-Qe+x:Qe=x-Qe,Ie=Math.atan(Math.sqrt(ke*ke+je*je)),vt=F*Math.cos(Ie)+P*Math.sin(Ie)*Math.cos(O-Qe),tt=Math.cos(Ie),ht=255*vt,Me=Math.min(Math.max(2*e.sunEl,0),1),dt=1.875-e.opacity*1.75,it=e.opacity!==.5?x*((Math.pow(dt,Ie)-1)/(Math.pow(dt,x)-1)):Ie,Le={r:(1-tt)*V.r*Me*255,g:(1-tt)*V.g*Me*255,b:(1-tt)*V.b*Me*255,a:(1-tt)*V.a*Me*255},ce=Math.abs(((Qe+O)/Math.PI+.5)%2-1),We={r:(j.r*(1-ce)+Q.r*ce)*ht,g:(j.g*(1-ce)+Q.g*ce)*ht,b:(j.b*(1-ce)+Q.b*ce)*ht,a:(j.a*(1-ce)+Q.a*ce)*ht},fe=(Y*i+G)*4,s[fe]=Le.r*(1-ce)+We.r,s[fe+1]=Le.g*(1-ce)+We.g,s[fe+2]=Le.b*(1-ce)+We.b,s[fe+3]=o[fe+3]*e.opacity*Me*Math.sin(it);return new ImageData(s,i,r)}function t_e(n,e=512){return n.getExtent()?MU({extent:n.getExtent(),tileSize:e,maxZoom:22}).getResolutions():Kg}function ite(n,e){return e.accessToken||(e=Object.assign({},e),new URL(n).searchParams.forEach((i,r)=>{e.accessToken=i,e.accessTokenParam=r})),e}function n_e(n,e,t="",i={},r=void 0){let o,s,a,c,A=!0;return typeof t!="string"&&!Array.isArray(t)?(a=t,c=a.source||a.layers,i=a):c=t,typeof i=="string"?(o=i,a={}):(o=i.styleUrl,a=i),a.updateSource===!1&&(A=!1),r||(r=a.resolutions),!o&&typeof e=="string"&&!e.trim().startsWith("{")&&(o=e),o&&(o=o.startsWith("data:")?location.href:eS(o,a.accessToken),a=ite(o,a)),new Promise(function(m,v){Pee(e,a).then(function(x){if(x.version!=8)return v(new Error("glStyle version 8 required."));if(!(n instanceof gU||n instanceof i3))return v(new Error("Can only apply to VectorLayer or VectorTileLayer"));const _=n instanceof i3?"vector":"geojson";if(c?Array.isArray(c)?s=x.layers.find(function(H){return H.id===c[0]}).source:s=c:(s=x.layers.find(function(H){return H.source&&x.sources[H.source].type===_}).source,c=s),!s)return v(new Error(`No ${_} source found in the glStyle.`));function O(){if(!A)return Promise.resolve();if(n instanceof i3)return ste(x.sources[s],o,a).then(function(z){const se=n.getSource();se?z!==se&&(se.setTileUrlFunction(z.getTileUrlFunction()),typeof se.setUrls=="function"&&typeof z.getUrls=="function"&&se.setUrls(z.getUrls()),se.format_||(se.format_=z.format_),se.getAttributions()||se.setAttributions(z.getAttributions()),se.getTileLoadFunction()===nte&&se.setTileLoadFunction(z.getTileLoadFunction()),Ny(se.getProjection(),z.getProjection())&&(se.tileGrid=z.getTileGrid())):n.setSource(z);const le=n.getSource().getTileGrid();!isFinite(n.getMaxResolution())&&!isFinite(n.getMinZoom())&&le.getMinZoom()>0&&n.setMaxResolution(P2(Math.max(0,le.getMinZoom()-1e-12),le.getResolutions()))});const H=x.sources[s];let G=n.getSource();(!G||G.get("mapbox-source")!==H)&&(G=ute(H,o,a));const Y=n.getSource();return Y?G!==Y&&(Y.getAttributions()||Y.setAttributions(G.getAttributions()),Y.format_||(Y.format_=G.getFormat()),Y.url_=G.getUrl()):n.setSource(G),Promise.resolve()}let P,F;const j={},Q={};function V(){if(!F&&(!x.sprite||j)){if(a.projection&&!r){const z=Xs(a.projection).getUnits();z!=="m"&&(r=Kg.map(se=>se/Yy[z]))}let H;const G=n.getSource();G instanceof wU&&G.format_ instanceof zee&&(H=G.format_.layerName_),F=Sbe(n,x,c,r,j,Q,(Y,z=a.webfonts)=>vbe(Y,z),a.getImage,H),n.getStyle()?O().then(m).catch(v):v(new Error(`Nothing to show for source [${s}]`))}else F?(n.setStyle(F),O().then(m).catch(v)):v(new Error("Something went wrong trying to apply style."))}if(x.sprite){const H=Abe(x.sprite,a.accessToken,o||location.href);P=window.devicePixelRatio>=1.5?.5:1;const G=P==.5?"@2x":"";Promise.all(H.map(function(Y){const z=new URL(Y.url);let se=z.origin+z.pathname+G+".json"+z.search;return new Promise(function(le,me){lx("Sprite",se,a).then(le).catch(function(fe){se=z.origin+z.pathname+".json"+z.search,lx("Sprite",se,a).then(le).catch(me)})}).then(function(le){le===void 0&&v(new Error("No sprites found."));let me;if(me=z.origin+z.pathname+G+".png"+z.search,a.transformRequest){const fe=a.transformRequest(me,"SpriteImage")||me;(fe instanceof Request||fe instanceof Promise)&&(me=fe)}Q[Y.id]=me;for(const fe in le){const _e=Y.id=="default"?fe:`${Y.id}:${fe}`;j[_e]=le[fe]}}).catch(function(le){v(new Error(`Sprites cannot be loaded: ${se}: ${le.message}`))})})).then(V).catch(v)}else V()}).catch(v)})}function rte(n,e){let t;return n.some(function(i){if(i.id==e)return t=i.source,!0}),t}function i_e(n,e){const t=n.bounds;if(t){const i=z9([t[0],t[1]],e),r=z9([t[2],t[3]],e);return[i[0],i[1],r[0],r[1]]}return Xs(e).getExtent()}function ote(n,e,t){const i=new tte({tileJSON:e,tileSize:n.tileSize||e.tileSize||512}),r=i.getTileJSON(),o=i.getTileGrid(),s=Xs(t.projection||"EPSG:3857"),a=i_e(r,s),c=s.getExtent(),A=r.minzoom||0,m=r.maxzoom||22,v={attributions:i.getAttributions(),projection:s,tileGrid:new qE({origin:c?r1(c):o.getOrigin(0),extent:a||o.getExtent(),minZoom:A,resolutions:t_e(s,e.tileSize).slice(0,m+1),tileSize:o.getTileSize(0)})};return Array.isArray(r.tiles)?v.urls=r.tiles:v.url=r.tiles,v}function r_e(n,e,t,i){const r={id:n.id,type:n.type},o=n.layout||{},s=n.paint||{};r.paint=s,af.zoom=CU(e,t.resolutions||Kg),af.distanceFromCenter=0;let a;const c=$i(r,"paint","background-color",om,i);return s["background-opacity"]!==void 0&&(a=$i(r,"paint","background-opacity",om,i)),o.visibility=="none"?void 0:gy(c,a)}function o_e(n,e,t){const i=document.createElement("div");return i.className="ol-mapbox-style-background",i.style.position="absolute",i.style.width="100%",i.style.height="100%",new Bx({source:new Ix({}),render(r){const o=r_e(n,r.viewState.resolution,e,t);return i.style.backgroundColor=o,i}})}function ste(n,e,t){return new Promise(function(i,r){Uee(n,e,t).then(function({tileJson:o,tileLoadFunction:s}){const a=ote(n,o,t);a.tileLoadFunction=s,a.format=new zee({layerName:"mvt:layer"});const c=new wU(a);c.set("mapbox-source",n),i(c)}).catch(r)})}function s_e(n,e,t){const i=new i3({declutter:!0,visible:!1});return ste(n,e,t).then(function(r){i.setSource(r)}).catch(function(r){i.setSource(void 0)}),i}function ate(n){return`{bbox-${(n?n.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")}}`}function a_e(n,e,t){return new Promise(function(i,r){Uee(n,e,t).then(function({tileJson:o,tileLoadFunction:s}){const a=new tte({interpolate:t.interpolate===void 0?!0:t.interpolate,transition:0,crossOrigin:"anonymous",tileJSON:o});a.tileGrid=ote(n,o,t).tileGrid,t.projection&&(a.projection=Xs(t.projection));const c=a.getTileUrlFunction();s&&a.setTileLoadFunction(s),a.setTileUrlFunction(function(A,m,v){const x=ate(v);let _=c(A,m,v);if(_.indexOf(x)!=-1){const O=a.getTileGrid().getTileCoordExtent(A);_=_.replace(x,O.toString())}return _}),a.set("mapbox-source",n),i(a)}).catch(function(o){r(o)})})}function lte(n,e,t){const i=new Yee;return a_e(n,e,t).then(function(r){i.setSource(r)}).catch(function(){i.setSource(void 0)}),i}function l_e(n,e,t){const i=lte(n,e,t);return new jee({source:new Jee({operationType:"image",operation:e_e,sources:[i]})})}function ute(n,e,t){const i=t.projection?new Tj({dataProjection:t.projection}):new Tj,r=n.data,o={};if(typeof r=="string"){const[a]=H5(r,t.accessToken,t.accessTokenParam||"access_token",e||location.href);if(/\{bbox-[0-9a-z-]+\}/.test(a)){const A=(v,x,_)=>{const O=ate(_);return a.replace(O,`${v.join(",")}`)},m=new V5({attributions:n.attribution,format:i,loader:(v,x,_,O,P)=>{const F=typeof A=="function"?A(v,x,_):A;lx("GeoJSON",F,t).then(j=>{const Q=m.getFormat().readFeatures(j,{featureProjection:_});m.addFeatures(Q),O(Q)}).catch(j=>{m.removeLoadedExtent(v),P()})},strategy:Wve});return m.set("mapbox-source",n),m}const c=new V5({attributions:n.attribution,format:i,url:a,loader:(A,m,v,x,_)=>{lx("GeoJSON",a,t).then(O=>{const P=c.getFormat().readFeatures(O,{featureProjection:v});c.addFeatures(P),x(P)}).catch(O=>{c.removeLoadedExtent(A),_()})}});return c}o.features=i.readFeatures(r,{featureProjection:"EPSG:3857"});const s=new V5(Object.assign({attributions:n.attribution,format:i},o));return s.set("mapbox-source",n),s}function u_e(n,e,t){return new gU({declutter:!0,source:ute(n,e,t),visible:!1})}function c_e(n,e,t){let i=null;return function(r){n.paint&&"raster-opacity"in n.paint&&r.frameState.viewState.zoom!==i&&(i=r.frameState.viewState.zoom,delete t[n.id],A_e(n,e,i,t))}}function A_e(n,e,t,i){af.zoom=t,af.distanceFromCenter=0;const r=$i(n,"paint","raster-opacity",om,i);e.setOpacity(r)}function h_e(n,e){function t(){const i=e.get("mapbox-style");if(!i)return;const r=GX(i.layers),o=n.get("mapbox-layers"),s=r.filter(function(a){return o.includes(a.id)}).some(function(a){return!a.layout||!a.layout.visibility||a.layout.visibility==="visible"});n.get("visible")!==s&&n.setVisible(s)}n.on("change",t),t()}function d_e(n,e,t,i){const r=Dee(n),o=n.layers,s=t.type,a=t.source||rte(o,t.ref),c=n.sources[a];let A;if(s=="background")A=o_e(t,i,r);else if(c.type=="vector")A=s_e(c,e,i);else if(c.type=="raster")A=lte(c,e,i),A.setVisible(t.layout?t.layout.visibility!=="none":!0),A.on("prerender",c_e(t,A,r));else if(c.type=="geojson")A=u_e(c,e,i);else if(c.type=="raster-dem"&&t.type=="hillshade"){const v=l_e(c,e,i);A=v,v.getSource().on("beforeoperations",function(x){const _=x.data;_.resolution=F9(i.projection||"EPSG:3857",x.resolution,lf(x.extent),"m"),af.zoom=CU(x.resolution,i.resolutions||Kg),af.distanceFromCenter=0,_.encoding=c.encoding,_.vert=5*$i(t,"paint","hillshade-exaggeration",om,r),_.sunAz=$i(t,"paint","hillshade-illumination-direction",om,r),_.sunEl=35,_.opacity=.3,_.highlightColor=$i(t,"paint","hillshade-highlight-color",om,r),_.shadowColor=$i(t,"paint","hillshade-shadow-color",om,r),_.accentColor=$i(t,"paint","hillshade-accent-color",om,r)}),A.setVisible(t.layout?t.layout.visibility!=="none":!0)}const m=a;return A&&A.set("mapbox-source",m),A}function Gj(n,e,t,i){const r=[];let o=null;if(e instanceof NE){if(o=e.getView(),!o.isDef()&&!o.getRotation()&&!o.getResolutions()){const v=i.projection?Xs(i.projection):o.getProjection();o=new im(Object.assign(o.getProperties(),{maxResolution:Kg[0]/Yy[v.getUnits()],projection:i.projection||o.getProjection()})),e.setView(o)}"center"in n&&!o.getCenter()&&o.setCenter(z9(n.center,o.getProjection())),"zoom"in n&&o.getZoom()===void 0&&o.setResolution(Kg[0]/Yy[o.getProjection().getUnits()]/Math.pow(2,n.zoom)),(!o.getCenter()||o.getZoom()===void 0)&&o.fit(o.getProjection().getExtent(),{nearest:!0,size:e.getSize()})}e.set("mapbox-style",n),e.set("mapbox-metadata",{styleUrl:t,options:i});const s=n.layers;let a=[],c,A,m;for(let v=0,x=s.length;v<x;++v){const _=s[v],O=_.type;if(O=="heatmap"){console.debug(`layers[${v}].type "${O}" not supported`);continue}else m=_.source||rte(s,_.ref),(!m||m!=A)&&(a.length&&(r.push(Wj(c,a,n,t,e,i)),a=[]),c=d_e(n,t,_,i),c instanceof gU||c instanceof i3||(a=[]),A=c.get("mapbox-source")),a.push(_.id)}return r.push(Wj(c,a,n,t,e,i)),Promise.all(r)}function f_e(n,e,t={}){let i,r;if(typeof n=="string"||n instanceof HTMLElement?r=new NE({target:n}):r=n,typeof e=="string"){const o=e.startsWith("data:")?location.href:eS(e,t.accessToken);t=ite(o,t),i=new Promise(function(s,a){Pee(e,t).then(function(c){Gj(c,r,o,t).then(function(){s(r)}).catch(a)}).catch(function(c){a(new Error(`Could not load ${e}: ${c.message}`))})})}else i=new Promise(function(o,s){Gj(e,r,!t.styleUrl||t.styleUrl.startsWith("data:")?location.href:eS(t.styleUrl,t.accessToken),t).then(function(){o(r)}).catch(s)});return i}function Wj(n,e,t,i,r,o={}){let s=24,a=0;const c=t.layers;for(let A=0,m=c.length;A<m;++A){const v=c[A];e.indexOf(v.id)!==-1&&(s=Math.min("minzoom"in v?v.minzoom:0,s),a=Math.max("maxzoom"in v?v.maxzoom:24,a))}return new Promise(function(A,m){const v=function(){const _=n.getSource();if(!_||_.getState()==="error"){m(new Error("Error accessing data for source "+n.get("mapbox-source")));return}if("getTileGrid"in _){const O=_.getTileGrid();if(O){const P=O.getMinZoom();(s>0||P>0)&&n.setMaxResolution(Math.min(P2(Math.max(0,s-1e-12),Kg),P2(Math.max(0,P-1e-12),O.getResolutions()))),a<24&&n.setMinResolution(P2(a,Kg))}}else s>0&&n.setMaxResolution(P2(Math.max(0,s-1e-12),Kg));_ instanceof V5||_ instanceof wU?n_e(n,t,e,Object.assign({styleUrl:i},o)).then(function(){h_e(n,r),A()}).catch(m):A()};n.set("mapbox-layers",e);const x=r.getLayers();x.getArray().indexOf(n)===-1&&x.push(n),n.getSource()?v():n.once("change:source",v)})}function Bi(){var n="/home/runner/work/maputnik/maputnik/src/components/MapOpenLayers.tsx",e="5f4719fc476214e7aff32d9043337b9c97544cf9",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/MapOpenLayers.tsx",statementMap:{0:{start:{line:11,column:2},end:{line:15,column:3}},1:{start:{line:12,column:4},end:{line:12,column:16}},2:{start:{line:14,column:4},end:{line:14,column:149}},3:{start:{line:14,column:103},end:{line:14,column:133}},4:{start:{line:18,column:24},end:{line:25,column:3}},5:{start:{line:28,column:14},end:{line:28,column:18}},6:{start:{line:30,column:19},end:{line:30,column:23}},7:{start:{line:32,column:4},end:{line:32,column:17}},8:{start:{line:33,column:4},end:{line:38,column:6}},9:{start:{line:39,column:4},end:{line:39,column:67}},10:{start:{line:42,column:4},end:{line:42,column:26}},11:{start:{line:42,column:19},end:{line:42,column:26}},12:{start:{line:43,column:4},end:{line:43,column:33}},13:{start:{line:44,column:4},end:{line:44,column:33}},14:{start:{line:47,column:4},end:{line:51,column:5}},15:{start:{line:48,column:6},end:{line:50,column:8}},16:{start:{line:54,column:4},end:{line:61,column:7}},17:{start:{line:62,column:16},end:{line:69,column:6}},18:{start:{line:70,column:4},end:{line:78,column:7}},19:{start:{line:71,column:21},end:{line:71,column:45}},20:{start:{line:72,column:6},end:{line:77,column:9}},21:{start:{line:79,column:22},end:{line:89,column:5}},22:{start:{line:80,column:19},end:{line:80,column:42}},23:{start:{line:81,column:21},end:{line:81,column:56}},24:{start:{line:82,column:6},end:{line:88,column:9}},25:{start:{line:90,column:4},end:{line:90,column:16}},26:{start:{line:91,column:4},end:{line:91,column:33}},27:{start:{line:92,column:4},end:{line:102,column:7}},28:{start:{line:93,column:21},end:{line:93,column:56}},29:{start:{line:94,column:6},end:{line:101,column:9}},30:{start:{line:103,column:4},end:{line:103,column:19}},31:{start:{line:104,column:4},end:{line:106,column:6}},32:{start:{line:108,column:17},end:{line:111,column:3}},33:{start:{line:109,column:4},end:{line:109,column:20}},34:{start:{line:110,column:4},end:{line:110,column:37}},35:{start:{line:113,column:14},end:{line:113,column:26}},36:{start:{line:114,column:4},end:{line:185,column:9}},37:{start:{line:119,column:12},end:{line:119,column:36}},38:{start:{line:176,column:12},end:{line:176,column:31}},39:{start:{line:188,column:22},end:{line:188,column:62}}},fnMap:{0:{name:"renderCoords",decl:{start:{line:10,column:9},end:{line:10,column:21}},loc:{start:{line:10,column:30},end:{line:16,column:1}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:14,column:92},end:{line:14,column:93}},loc:{start:{line:14,column:103},end:{line:14,column:133}},line:14},2:{name:"(anonymous_2)",decl:{start:{line:19,column:17},end:{line:19,column:18}},loc:{start:{line:19,column:23},end:{line:20,column:5}},line:19},3:{name:"(anonymous_3)",decl:{start:{line:21,column:18},end:{line:21,column:19}},loc:{start:{line:21,column:24},end:{line:22,column:5}},line:21},4:{name:"(anonymous_4)",decl:{start:{line:23,column:19},end:{line:23,column:20}},loc:{start:{line:23,column:25},end:{line:24,column:5}},line:23},5:{name:"(anonymous_5)",decl:{start:{line:31,column:2},end:{line:31,column:3}},loc:{start:{line:31,column:21},end:{line:40,column:3}},line:31},6:{name:"(anonymous_6)",decl:{start:{line:41,column:2},end:{line:41,column:3}},loc:{start:{line:41,column:28},end:{line:45,column:3}},line:41},7:{name:"(anonymous_7)",decl:{start:{line:46,column:2},end:{line:46,column:3}},loc:{start:{line:46,column:32},end:{line:52,column:3}},line:46},8:{name:"(anonymous_8)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:22},end:{line:107,column:3}},line:53},9:{name:"(anonymous_9)",decl:{start:{line:70,column:26},end:{line:70,column:27}},loc:{start:{line:70,column:35},end:{line:78,column:5}},line:70},10:{name:"(anonymous_10)",decl:{start:{line:79,column:22},end:{line:79,column:23}},loc:{start:{line:79,column:28},end:{line:89,column:5}},line:79},11:{name:"(anonymous_11)",decl:{start:{line:92,column:25},end:{line:92,column:26}},loc:{start:{line:92,column:33},end:{line:102,column:5}},line:92},12:{name:"(anonymous_12)",decl:{start:{line:108,column:17},end:{line:108,column:18}},loc:{start:{line:108,column:24},end:{line:111,column:3}},line:108},13:{name:"(anonymous_13)",decl:{start:{line:112,column:2},end:{line:112,column:3}},loc:{start:{line:112,column:11},end:{line:186,column:3}},line:112},14:{name:"(anonymous_14)",decl:{start:{line:118,column:15},end:{line:118,column:16}},loc:{start:{line:118,column:22},end:{line:120,column:11}},line:118},15:{name:"(anonymous_15)",decl:{start:{line:175,column:15},end:{line:175,column:16}},loc:{start:{line:175,column:22},end:{line:177,column:11}},line:175}},branchMap:{0:{loc:{start:{line:11,column:2},end:{line:15,column:3}},type:"if",locations:[{start:{line:11,column:2},end:{line:15,column:3}},{start:{line:13,column:9},end:{line:15,column:3}}],line:11},1:{loc:{start:{line:11,column:6},end:{line:11,column:34}},type:"binary-expr",locations:[{start:{line:11,column:6},end:{line:11,column:13}},{start:{line:11,column:17},end:{line:11,column:34}}],line:11},2:{loc:{start:{line:42,column:4},end:{line:42,column:26}},type:"if",locations:[{start:{line:42,column:4},end:{line:42,column:26}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:42},3:{loc:{start:{line:47,column:4},end:{line:51,column:5}},type:"if",locations:[{start:{line:47,column:4},end:{line:51,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:47},4:{loc:{start:{line:136,column:26},end:{line:136,column:59}},type:"binary-expr",locations:[{start:{line:136,column:26},end:{line:136,column:53}},{start:{line:136,column:57},end:{line:136,column:59}}],line:136},5:{loc:{start:{line:148,column:6},end:{line:170,column:10}},type:"binary-expr",locations:[{start:{line:148,column:6},end:{line:148,column:29}},{start:{line:148,column:49},end:{line:170,column:10}}],line:148}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/MapOpenLayers.tsx"],names:[],mappings:"AAoBW,cAyIL,YAzIK;AApBX,OAAO,WAAW;AAClB,SAAQ,gBAAe;AACvB,SAA+B,uBAAuB;AAEtD,OAAO,6BAA6B;AAEpC,OAAO;AAEP,SAAQ,aAAY;AACpB,SAAQ,KAAK,MAAM,eAAc;AAEjC,SAAQ,gBAAe;AAIvB,SAAS,aAAc,QAAkB;AACvC,MAAI,CAAC,UAAU,OAAO,SAAS,GAAG;AAChC,WAAO;AAAA,EACT,OACK;AACH,WAAO,oBAAC,UAAK,WAAU,mBACpB,iBAAO,IAAI,CAAC,UAAU,OAAO,KAAK,EAAE,SAAS,GAAG,GAAQ,CAAC,EAAE,KAAK,IAAI,GACvE;AAAA,EACF;AACF;AAqBA,MAAM,8BAA8B,MAAM,UAA0D;AAAA,EAClG,OAAO,eAAe;AAAA,IACpB,aAAa,MAAM;AAAA,IAAC;AAAA,IACpB,cAAc,MAAM;AAAA,IAAC;AAAA,IACrB,eAAe,MAAM;AAAA,IAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAmC;AAAA,EACnC;AAAA,EACA,iBAAqC;AAAA,EAErC,YAAY,OAAmC;AAC7C,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA,MACV,QAAQ,CAAC;AAAA,MACT,QAAQ,CAAC;AAAA,IACX;AACA,SAAK,cAAc,SAAS,KAAK,aAAa,KAAK,IAAI,GAAG,GAAG;AAAA,EAC/D;AAAA,EAEA,aAAa,aAAiC;AAC5C,QAAG,CAAC,KAAK,IAAK;AAGd,SAAK,IAAI,UAAU,EAAE,MAAM;AAC3B,UAAM,KAAK,KAAK,WAAW;AAAA,EAC7B;AAAA,EAEA,mBAAmB,WAAuC;AACxD,QAAI,KAAK,MAAM,aAAa,UAAU,UAAU;AAC9C,WAAK;AAAA,QACH,KAAK,MAAM,oBAAoB,KAAK,MAAM,QAAQ;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AAAA,EAEA,oBAAoB;AAClB,SAAK,UAAU,IAAI,QAAQ;AAAA,MACzB,SAAS,KAAK;AAAA,MACd,SAAS;AAAA,QACP,WAAW;AAAA,UACT,UAAU;AAAA,QACZ;AAAA,MACF;AAAA,IACF,CAAC;AAED,UAAM,MAAM,IAAI,IAAI;AAAA,MAClB,QAAQ,KAAK;AAAA,MACb,UAAU,CAAC,KAAK,OAAO;AAAA,MACvB,MAAM,IAAI,KAAK;AAAA,QACb,MAAM;AAAA,QACN,QAAQ,CAAC,KAAK,GAAG;AAAA,MACnB,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,eAAe,CAAC,QAAQ;AAC7B,YAAM,SAAS,SAAS,IAAI,UAAU;AACtC,WAAK,SAAS;AAAA,QACZ,QAAQ;AAAA,UACN,OAAO,CAAC,EAAE,QAAQ,CAAC;AAAA,UACnB,OAAO,CAAC,EAAE,QAAQ,CAAC;AAAA,QACrB;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAED,UAAM,YAAY,MAAM;AACtB,YAAM,OAAO,IAAI,QAAQ,EAAE,QAAQ;AACnC,YAAM,SAAS,SAAS,IAAI,QAAQ,EAAE,UAAU,CAAE;AAElD,WAAK,MAAM,SAAS;AAAA,QAClB;AAAA,QACA,QAAQ;AAAA,UACN,KAAK,OAAO,CAAC;AAAA,UACb,KAAK,OAAO,CAAC;AAAA,QACf;AAAA,MACF,CAAC;AAAA,IACH;AAEA,cAAU;AACV,QAAI,GAAG,WAAW,SAAS;AAE3B,QAAI,GAAG,cAAc,CAAC,OAAO;AAC3B,YAAM,SAAS,SAAS,IAAI,QAAQ,EAAE,UAAU,CAAE;AAClD,WAAK,SAAS;AAAA,QACZ,QAAQ;AAAA,UACN,OAAO,CAAC,EAAE,QAAQ,CAAC;AAAA,UACnB,OAAO,CAAC,EAAE,QAAQ,CAAC;AAAA,QACrB;AAAA,QACA,UAAU,IAAI,QAAQ,EAAE,YAAY,EAAE,QAAQ,CAAC;AAAA,QAC/C,MAAM,IAAI,QAAQ,EAAE,QAAQ,EAAG,QAAQ,CAAC;AAAA,MAC1C,CAAC;AAAA,IACH,CAAC;AAID,SAAK,MAAM;AACX,SAAK;AAAA,MACH,KAAK,MAAM,oBAAoB,KAAK,MAAM,QAAQ;AAAA,IACpD;AAAA,EACF;AAAA,EAEA,eAAe,CAAC,MAAW;AACzB,MAAE,OAAO,KAAK;AACd,SAAK,QAAS,YAAY,MAAS;AAAA,EACrC;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SAAI,WAAU,yBACpB;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,KAAK,OAAK;AAAC,iBAAK,iBAAiB;AAAA,UAAE;AAAA,UACnC,OAAO,EAAC,YAAY,QAAO;AAAA,UAC3B,WAAU;AAAA,UAEV;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS,KAAK;AAAA,gBACd,cAAY,EAAE,aAAa;AAAA,gBAC5B;AAAA;AAAA,YAED;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,UAAU,KAAK,MAAM,oBAAoB,CAAC;AAAA,gBAC1C,eAAe,KAAK,MAAM;AAAA;AAAA,YAC5B;AAAA;AAAA;AAAA,MACF;AAAA,MACA,qBAAC,SAAI,WAAU,oBACZ;AAAA,UAAE,OAAO;AAAA,QAAE;AAAA,QAAE,KAAK,MAAM;AAAA,SAC3B;AAAA,MACC,KAAK,MAAM,gBACV,qBAAC,SAAI,WAAU,qBACb;AAAA,6BAAC,SACC;AAAA,+BAAC,WAAO;AAAA,cAAE,SAAS;AAAA,YAAE;AAAA,aAAC;AAAA,UACtB,oBAAC,UAAM,uBAAa,KAAK,MAAM,MAAM,GAAE;AAAA,WACzC;AAAA,QACA,qBAAC,SACC;AAAA,+BAAC,WAAO;AAAA,cAAE,SAAS;AAAA,YAAE;AAAA,aAAC;AAAA,UACtB,oBAAC,UAAM,uBAAa,KAAK,MAAM,MAAM,GAAE;AAAA,WACzC;AAAA,QACA,qBAAC,SACC;AAAA,+BAAC,WAAO;AAAA,cAAE,WAAW;AAAA,YAAE;AAAA,aAAC;AAAA,UACxB,oBAAC,UAAM,eAAK,MAAM,UAAS;AAAA,WAC7B;AAAA,SACF;AAAA,MAEF;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,KAAK,OAAK;AAAC,iBAAK,YAAY;AAAA,UAAE;AAAA,UAC9B,MAAK;AAAA,UACL,cAAY,EAAE,UAAU;AAAA,UACxB,OAAO;AAAA,YACL,GAAG,KAAK,MAAM;AAAA,UAChB;AAAA;AAAA,MACF;AAAA,OACF;AAAA,EACF;AACF;AAEA,MAAM,gBAAgB,gBAAgB,EAAE,qBAAqB;AAC7D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"5f4719fc476214e7aff32d9043337b9c97544cf9"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Bi=function(){return s},s}Bi();function Qj(n){return Bi().f[0]++,Bi().s[0]++,Bi().b[1][0]++,!n||(Bi().b[1][1]++,n.length<2)?(Bi().b[0][0]++,Bi().s[1]++,null):(Bi().b[0][1]++,Bi().s[2]++,ie.jsx("span",{className:"maputnik-coords",children:n.map(e=>(Bi().f[1]++,Bi().s[3]++,String(e).padStart(7," "))).join(", ")}))}class p_e extends En.Component{static defaultProps=(Bi().s[4]++,{onMapLoaded:()=>{Bi().f[2]++},onDataChange:()=>{Bi().f[3]++},onLayerSelect:()=>{Bi().f[4]++}});updateStyle;map;container=(Bi().s[5]++,null);overlay;popupContainer=(Bi().s[6]++,null);constructor(e){Bi().f[5]++,Bi().s[7]++,super(e),Bi().s[8]++,this.state={zoom:"0",rotation:"0",cursor:[],center:[]},Bi().s[9]++,this.updateStyle=T4.throttle(this._updateStyle.bind(this),200)}_updateStyle(e){if(Bi().f[6]++,Bi().s[10]++,this.map)Bi().b[2][1]++;else{Bi().b[2][0]++,Bi().s[11]++;return}Bi().s[12]++,this.map.getLayers().clear(),Bi().s[13]++,f_e(this.map,e)}componentDidUpdate(e){Bi().f[7]++,Bi().s[14]++,this.props.mapStyle!==e.mapStyle?(Bi().b[3][0]++,Bi().s[15]++,this.updateStyle(this.props.replaceAccessTokens(this.props.mapStyle))):Bi().b[3][1]++}componentDidMount(){Bi().f[8]++,Bi().s[16]++,this.overlay=new ube({element:this.popupContainer,autoPan:{animation:{duration:250}}});const e=(Bi().s[17]++,new NE({target:this.container,overlays:[this.overlay],view:new im({zoom:1,center:[180,-90]})}));Bi().s[18]++,e.on("pointermove",i=>{Bi().f[9]++;const r=(Bi().s[19]++,PO(i.coordinate));Bi().s[20]++,this.setState({cursor:[r[0].toFixed(2),r[1].toFixed(2)]})}),Bi().s[21]++;const t=()=>{Bi().f[10]++;const i=(Bi().s[22]++,e.getView().getZoom()),r=(Bi().s[23]++,PO(e.getView().getCenter()));Bi().s[24]++,this.props.onChange({zoom:i,center:{lng:r[0],lat:r[1]}})};Bi().s[25]++,t(),Bi().s[26]++,e.on("moveend",t),Bi().s[27]++,e.on("postrender",i=>{Bi().f[11]++;const r=(Bi().s[28]++,PO(e.getView().getCenter()));Bi().s[29]++,this.setState({center:[r[0].toFixed(2),r[1].toFixed(2)],rotation:e.getView().getRotation().toFixed(2),zoom:e.getView().getZoom().toFixed(2)})}),Bi().s[30]++,this.map=e,Bi().s[31]++,this.updateStyle(this.props.replaceAccessTokens(this.props.mapStyle))}closeOverlay=(Bi().s[32]++,e=>{Bi().f[12]++,Bi().s[33]++,e.target.blur(),Bi().s[34]++,this.overlay.setPosition(void 0)});render(){Bi().f[13]++;const e=(Bi().s[35]++,this.props.t);return Bi().s[36]++,ie.jsxs("div",{className:"maputnik-ol-container",children:[ie.jsxs("div",{ref:t=>{Bi().f[14]++,Bi().s[37]++,this.popupContainer=t},style:{background:"black"},className:"maputnik-popup",children:[ie.jsx("button",{className:"maplibregl-popup-close-button",onClick:this.closeOverlay,"aria-label":e("Close popup"),children:"×"}),ie.jsx(LX,{features:(Bi().b[4][0]++,this.state.selectedFeatures||(Bi().b[4][1]++,[])),onLayerSelect:this.props.onLayerSelect})]}),ie.jsxs("div",{className:"maputnik-ol-zoom",children:[e("Zoom:")," ",this.state.zoom]}),(Bi().b[5][0]++,this.props.debugToolbox&&(Bi().b[5][1]++,ie.jsxs("div",{className:"maputnik-ol-debug",children:[ie.jsxs("div",{children:[ie.jsxs("label",{children:[e("cursor:")," "]}),ie.jsx("span",{children:Qj(this.state.cursor)})]}),ie.jsxs("div",{children:[ie.jsxs("label",{children:[e("center:")," "]}),ie.jsx("span",{children:Qj(this.state.center)})]}),ie.jsxs("div",{children:[ie.jsxs("label",{children:[e("rotation:")," "]}),ie.jsx("span",{children:this.state.rotation})]})]}))),ie.jsx("div",{className:"maputnik-ol",ref:t=>{Bi().f[15]++,Bi().s[38]++,this.container=t},role:"region","aria-label":e("Map view"),style:{...this.props.style}})]})}}const m_e=(Bi().s[39]++,Jo()(p_e));var fB={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/var qj;function g_e(){return qj||(qj=1,(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=r(o,i(a)))}return o}function i(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)e.call(o,a)&&o[a]&&(s=r(s,a));return s}function r(o,s){return s?o?o+" "+s:o+s:o}n.exports?(t.default=t,n.exports=t):window.classNames=t})()})(fB)),fB.exports}var y_e=g_e();const Yg=Wl(y_e);var U2=kD();function v_e(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return wt.useMemo(()=>i=>{e.forEach(r=>r(i))},e)}const VE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function kx(n){const e=Object.prototype.toString.call(n);return e==="[object Window]"||e==="[object global]"}function SU(n){return"nodeType"in n}function sd(n){var e,t;return n?kx(n)?n:SU(n)&&(e=(t=n.ownerDocument)==null?void 0:t.defaultView)!=null?e:window:window}function EU(n){const{Document:e}=sd(n);return n instanceof e}function iM(n){return kx(n)?!1:n instanceof sd(n).HTMLElement}function cte(n){return n instanceof sd(n).SVGElement}function Tx(n){return n?kx(n)?n.document:SU(n)?EU(n)?n:iM(n)||cte(n)?n.ownerDocument:document:document:document}const zg=VE?wt.useLayoutEffect:wt.useEffect;function OU(n){const e=wt.useRef(n);return zg(()=>{e.current=n}),wt.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return e.current==null?void 0:e.current(...i)},[])}function b_e(){const n=wt.useRef(null),e=wt.useCallback((i,r)=>{n.current=setInterval(i,r)},[]),t=wt.useCallback(()=>{n.current!==null&&(clearInterval(n.current),n.current=null)},[]);return[e,t]}function X3(n,e){e===void 0&&(e=[n]);const t=wt.useRef(n);return zg(()=>{t.current!==n&&(t.current=n)},e),t}function rM(n,e){const t=wt.useRef();return wt.useMemo(()=>{const i=n(t.current);return t.current=i,i},[...e])}function iS(n){const e=OU(n),t=wt.useRef(null),i=wt.useCallback(r=>{r!==t.current&&e?.(r,t.current),t.current=r},[]);return[t,i]}function oR(n){const e=wt.useRef();return wt.useEffect(()=>{e.current=n},[n]),e.current}let pB={};function oM(n,e){return wt.useMemo(()=>{if(e)return e;const t=pB[n]==null?0:pB[n]+1;return pB[n]=t,n+"-"+t},[n,e])}function Ate(n){return function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return i.reduce((o,s)=>{const a=Object.entries(s);for(const[c,A]of a){const m=o[c];m!=null&&(o[c]=m+n*A)}return o},{...e})}}const K_=Ate(1),rS=Ate(-1);function C_e(n){return"clientX"in n&&"clientY"in n}function BU(n){if(!n)return!1;const{KeyboardEvent:e}=sd(n.target);return e&&n instanceof e}function __e(n){if(!n)return!1;const{TouchEvent:e}=sd(n.target);return e&&n instanceof e}function sR(n){if(__e(n)){if(n.touches&&n.touches.length){const{clientX:e,clientY:t}=n.touches[0];return{x:e,y:t}}else if(n.changedTouches&&n.changedTouches.length){const{clientX:e,clientY:t}=n.changedTouches[0];return{x:e,y:t}}}return C_e(n)?{x:n.clientX,y:n.clientY}:null}const J3=Object.freeze({Translate:{toString(n){if(!n)return;const{x:e,y:t}=n;return"translate3d("+(e?Math.round(e):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(n){if(!n)return;const{scaleX:e,scaleY:t}=n;return"scaleX("+e+") scaleY("+t+")"}},Transform:{toString(n){if(n)return[J3.Translate.toString(n),J3.Scale.toString(n)].join(" ")}},Transition:{toString(n){let{property:e,duration:t,easing:i}=n;return e+" "+t+"ms "+i}}}),Yj="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function x_e(n){return n.matches(Yj)?n:n.querySelector(Yj)}const M_e={display:"none"};function w_e(n){let{id:e,value:t}=n;return En.createElement("div",{id:e,style:M_e},t)}function S_e(n){let{id:e,announcement:t,ariaLiveType:i="assertive"}=n;const r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return En.createElement("div",{id:e,style:r,role:"status","aria-live":i,"aria-atomic":!0},t)}function E_e(){const[n,e]=wt.useState("");return{announce:wt.useCallback(i=>{i!=null&&e(i)},[]),announcement:n}}const hte=wt.createContext(null);function O_e(n){const e=wt.useContext(hte);wt.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(n)},[n,e])}function B_e(){const[n]=wt.useState(()=>new Set),e=wt.useCallback(i=>(n.add(i),()=>n.delete(i)),[n]);return[wt.useCallback(i=>{let{type:r,event:o}=i;n.forEach(s=>{var a;return(a=s[r])==null?void 0:a.call(s,o)})},[n]),e]}const I_e={draggable:`
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
`},k_e={onDragStart(n){let{active:e}=n;return"Picked up draggable item "+e.id+"."},onDragOver(n){let{active:e,over:t}=n;return t?"Draggable item "+e.id+" was moved over droppable area "+t.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(n){let{active:e,over:t}=n;return t?"Draggable item "+e.id+" was dropped over droppable area "+t.id:"Draggable item "+e.id+" was dropped."},onDragCancel(n){let{active:e}=n;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function T_e(n){let{announcements:e=k_e,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=I_e}=n;const{announce:o,announcement:s}=E_e(),a=oM("DndLiveRegion"),[c,A]=wt.useState(!1);if(wt.useEffect(()=>{A(!0)},[]),O_e(wt.useMemo(()=>({onDragStart(v){let{active:x}=v;o(e.onDragStart({active:x}))},onDragMove(v){let{active:x,over:_}=v;e.onDragMove&&o(e.onDragMove({active:x,over:_}))},onDragOver(v){let{active:x,over:_}=v;o(e.onDragOver({active:x,over:_}))},onDragEnd(v){let{active:x,over:_}=v;o(e.onDragEnd({active:x,over:_}))},onDragCancel(v){let{active:x,over:_}=v;o(e.onDragCancel({active:x,over:_}))}}),[o,e])),!c)return null;const m=En.createElement(En.Fragment,null,En.createElement(w_e,{id:i,value:r.draggable}),En.createElement(S_e,{id:a,announcement:s}));return t?U2.createPortal(m,t):m}var ic;(function(n){n.DragStart="dragStart",n.DragMove="dragMove",n.DragEnd="dragEnd",n.DragCancel="dragCancel",n.DragOver="dragOver",n.RegisterDroppable="registerDroppable",n.SetDroppableDisabled="setDroppableDisabled",n.UnregisterDroppable="unregisterDroppable"})(ic||(ic={}));function oS(){}function R_e(n,e){return wt.useMemo(()=>({sensor:n,options:e??{}}),[n,e])}function D_e(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return wt.useMemo(()=>[...e].filter(i=>i!=null),[...e])}const hm=Object.freeze({x:0,y:0});function P_e(n,e){return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}function U_e(n,e){let{data:{value:t}}=n,{data:{value:i}}=e;return t-i}function K_e(n,e){let{data:{value:t}}=n,{data:{value:i}}=e;return i-t}function L_e(n,e){if(!n||n.length===0)return null;const[t]=n;return t[e]}function $j(n,e,t){return e===void 0&&(e=n.left),t===void 0&&(t=n.top),{x:e+n.width*.5,y:t+n.height*.5}}const F_e=n=>{let{collisionRect:e,droppableRects:t,droppableContainers:i}=n;const r=$j(e,e.left,e.top),o=[];for(const s of i){const{id:a}=s,c=t.get(a);if(c){const A=P_e($j(c),r);o.push({id:a,data:{droppableContainer:s,value:A}})}}return o.sort(U_e)};function z_e(n,e){const t=Math.max(e.top,n.top),i=Math.max(e.left,n.left),r=Math.min(e.left+e.width,n.left+n.width),o=Math.min(e.top+e.height,n.top+n.height),s=r-i,a=o-t;if(i<r&&t<o){const c=e.width*e.height,A=n.width*n.height,m=s*a,v=m/(c+A-m);return Number(v.toFixed(4))}return 0}const j_e=n=>{let{collisionRect:e,droppableRects:t,droppableContainers:i}=n;const r=[];for(const o of i){const{id:s}=o,a=t.get(s);if(a){const c=z_e(a,e);c>0&&r.push({id:s,data:{droppableContainer:o,value:c}})}}return r.sort(K_e)};function N_e(n,e,t){return{...n,scaleX:e&&t?e.width/t.width:1,scaleY:e&&t?e.height/t.height:1}}function dte(n,e){return n&&e?{x:n.left-e.left,y:n.top-e.top}:hm}function G_e(n){return function(t){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>({...s,top:s.top+n*a.y,bottom:s.bottom+n*a.y,left:s.left+n*a.x,right:s.right+n*a.x}),{...t})}}const W_e=G_e(1);function Q_e(n){if(n.startsWith("matrix3d(")){const e=n.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(n.startsWith("matrix(")){const e=n.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function q_e(n,e,t){const i=Q_e(e);if(!i)return n;const{scaleX:r,scaleY:o,x:s,y:a}=i,c=n.left-s-(1-r)*parseFloat(t),A=n.top-a-(1-o)*parseFloat(t.slice(t.indexOf(" ")+1)),m=r?n.width/r:n.width,v=o?n.height/o:n.height;return{width:m,height:v,top:A,right:c+m,bottom:A+v,left:c}}const Y_e={ignoreTransform:!1};function Rx(n,e){e===void 0&&(e=Y_e);let t=n.getBoundingClientRect();if(e.ignoreTransform){const{transform:A,transformOrigin:m}=sd(n).getComputedStyle(n);A&&(t=q_e(t,A,m))}const{top:i,left:r,width:o,height:s,bottom:a,right:c}=t;return{top:i,left:r,width:o,height:s,bottom:a,right:c}}function Vj(n){return Rx(n,{ignoreTransform:!0})}function $_e(n){const e=n.innerWidth,t=n.innerHeight;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}function V_e(n,e){return e===void 0&&(e=sd(n).getComputedStyle(n)),e.position==="fixed"}function H_e(n,e){e===void 0&&(e=sd(n).getComputedStyle(n));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const o=e[r];return typeof o=="string"?t.test(o):!1})}function IU(n,e){const t=[];function i(r){if(e!=null&&t.length>=e||!r)return t;if(EU(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!iM(r)||cte(r)||t.includes(r))return t;const o=sd(n).getComputedStyle(r);return r!==n&&H_e(r,o)&&t.push(r),V_e(r,o)?t:i(r.parentNode)}return n?i(n):t}function fte(n){const[e]=IU(n,1);return e??null}function mB(n){return!VE||!n?null:kx(n)?n:SU(n)?EU(n)||n===Tx(n).scrollingElement?window:iM(n)?n:null:null}function pte(n){return kx(n)?n.scrollX:n.scrollLeft}function mte(n){return kx(n)?n.scrollY:n.scrollTop}function aR(n){return{x:pte(n),y:mte(n)}}var Pc;(function(n){n[n.Forward=1]="Forward",n[n.Backward=-1]="Backward"})(Pc||(Pc={}));function gte(n){return!VE||!n?!1:n===document.scrollingElement}function yte(n){const e={x:0,y:0},t=gte(n)?{height:window.innerHeight,width:window.innerWidth}:{height:n.clientHeight,width:n.clientWidth},i={x:n.scrollWidth-t.width,y:n.scrollHeight-t.height},r=n.scrollTop<=e.y,o=n.scrollLeft<=e.x,s=n.scrollTop>=i.y,a=n.scrollLeft>=i.x;return{isTop:r,isLeft:o,isBottom:s,isRight:a,maxScroll:i,minScroll:e}}const Z_e={x:.2,y:.2};function X_e(n,e,t,i,r){let{top:o,left:s,right:a,bottom:c}=t;i===void 0&&(i=10),r===void 0&&(r=Z_e);const{isTop:A,isBottom:m,isLeft:v,isRight:x}=yte(n),_={x:0,y:0},O={x:0,y:0},P={height:e.height*r.y,width:e.width*r.x};return!A&&o<=e.top+P.height?(_.y=Pc.Backward,O.y=i*Math.abs((e.top+P.height-o)/P.height)):!m&&c>=e.bottom-P.height&&(_.y=Pc.Forward,O.y=i*Math.abs((e.bottom-P.height-c)/P.height)),!x&&a>=e.right-P.width?(_.x=Pc.Forward,O.x=i*Math.abs((e.right-P.width-a)/P.width)):!v&&s<=e.left+P.width&&(_.x=Pc.Backward,O.x=i*Math.abs((e.left+P.width-s)/P.width)),{direction:_,speed:O}}function J_e(n){if(n===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:e,left:t,right:i,bottom:r}=n.getBoundingClientRect();return{top:e,left:t,right:i,bottom:r,width:n.clientWidth,height:n.clientHeight}}function vte(n){return n.reduce((e,t)=>K_(e,aR(t)),hm)}function exe(n){return n.reduce((e,t)=>e+pte(t),0)}function txe(n){return n.reduce((e,t)=>e+mte(t),0)}function nxe(n,e){if(e===void 0&&(e=Rx),!n)return;const{top:t,left:i,bottom:r,right:o}=e(n);fte(n)&&(r<=0||o<=0||t>=window.innerHeight||i>=window.innerWidth)&&n.scrollIntoView({block:"center",inline:"center"})}const ixe=[["x",["left","right"],exe],["y",["top","bottom"],txe]];class kU{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=IU(t),r=vte(i);this.rect={...e},this.width=e.width,this.height=e.height;for(const[o,s,a]of ixe)for(const c of s)Object.defineProperty(this,c,{get:()=>{const A=a(i),m=r[o]-A;return this.rect[c]+m},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class r3{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...t)})},this.target=e}add(e,t,i){var r;(r=this.target)==null||r.addEventListener(e,t,i),this.listeners.push([e,t,i])}}function rxe(n){const{EventTarget:e}=sd(n);return n instanceof e?n:Tx(n)}function gB(n,e){const t=Math.abs(n.x),i=Math.abs(n.y);return typeof e=="number"?Math.sqrt(t**2+i**2)>e:"x"in e&&"y"in e?t>e.x&&i>e.y:"x"in e?t>e.x:"y"in e?i>e.y:!1}var Qf;(function(n){n.Click="click",n.DragStart="dragstart",n.Keydown="keydown",n.ContextMenu="contextmenu",n.Resize="resize",n.SelectionChange="selectionchange",n.VisibilityChange="visibilitychange"})(Qf||(Qf={}));function Hj(n){n.preventDefault()}function oxe(n){n.stopPropagation()}var Ls;(function(n){n.Space="Space",n.Down="ArrowDown",n.Right="ArrowRight",n.Left="ArrowLeft",n.Up="ArrowUp",n.Esc="Escape",n.Enter="Enter",n.Tab="Tab"})(Ls||(Ls={}));const bte={start:[Ls.Space,Ls.Enter],cancel:[Ls.Esc],end:[Ls.Space,Ls.Enter,Ls.Tab]},sxe=(n,e)=>{let{currentCoordinates:t}=e;switch(n.code){case Ls.Right:return{...t,x:t.x+25};case Ls.Left:return{...t,x:t.x-25};case Ls.Down:return{...t,y:t.y+25};case Ls.Up:return{...t,y:t.y-25}}};class Cte{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new r3(Tx(t)),this.windowListeners=new r3(sd(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Qf.Resize,this.handleCancel),this.windowListeners.add(Qf.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Qf.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,i=e.node.current;i&&nxe(i),t(hm)}handleKeyDown(e){if(BU(e)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:o=bte,coordinateGetter:s=sxe,scrollBehavior:a="smooth"}=r,{code:c}=e;if(o.end.includes(c)){this.handleEnd(e);return}if(o.cancel.includes(c)){this.handleCancel(e);return}const{collisionRect:A}=i.current,m=A?{x:A.left,y:A.top}:hm;this.referenceCoordinates||(this.referenceCoordinates=m);const v=s(e,{active:t,context:i.current,currentCoordinates:m});if(v){const x=rS(v,m),_={x:0,y:0},{scrollableAncestors:O}=i.current;for(const P of O){const F=e.code,{isTop:j,isRight:Q,isLeft:V,isBottom:H,maxScroll:G,minScroll:Y}=yte(P),z=J_e(P),se={x:Math.min(F===Ls.Right?z.right-z.width/2:z.right,Math.max(F===Ls.Right?z.left:z.left+z.width/2,v.x)),y:Math.min(F===Ls.Down?z.bottom-z.height/2:z.bottom,Math.max(F===Ls.Down?z.top:z.top+z.height/2,v.y))},le=F===Ls.Right&&!Q||F===Ls.Left&&!V,me=F===Ls.Down&&!H||F===Ls.Up&&!j;if(le&&se.x!==v.x){const fe=P.scrollLeft+x.x,_e=F===Ls.Right&&fe<=G.x||F===Ls.Left&&fe>=Y.x;if(_e&&!x.y){P.scrollTo({left:fe,behavior:a});return}_e?_.x=P.scrollLeft-fe:_.x=F===Ls.Right?P.scrollLeft-G.x:P.scrollLeft-Y.x,_.x&&P.scrollBy({left:-_.x,behavior:a});break}else if(me&&se.y!==v.y){const fe=P.scrollTop+x.y,_e=F===Ls.Down&&fe<=G.y||F===Ls.Up&&fe>=Y.y;if(_e&&!x.x){P.scrollTo({top:fe,behavior:a});return}_e?_.y=P.scrollTop-fe:_.y=F===Ls.Down?P.scrollTop-G.y:P.scrollTop-Y.y,_.y&&P.scrollBy({top:-_.y,behavior:a});break}}this.handleMove(e,K_(rS(v,this.referenceCoordinates),_))}}}handleMove(e,t){const{onMove:i}=this.props;e.preventDefault(),i(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Cte.activators=[{eventName:"onKeyDown",handler:(n,e,t)=>{let{keyboardCodes:i=bte,onActivation:r}=e,{active:o}=t;const{code:s}=n.nativeEvent;if(i.start.includes(s)){const a=o.activatorNode.current;return a&&n.target!==a?!1:(n.preventDefault(),r?.({event:n.nativeEvent}),!0)}return!1}}];function Zj(n){return!!(n&&"distance"in n)}function Xj(n){return!!(n&&"delay"in n)}class TU{constructor(e,t,i){var r;i===void 0&&(i=rxe(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:s}=o;this.props=e,this.events=t,this.document=Tx(s),this.documentListeners=new r3(this.document),this.listeners=new r3(i),this.windowListeners=new r3(sd(s)),this.initialCoordinates=(r=sR(o))!=null?r:hm,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:i}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Qf.Resize,this.handleCancel),this.windowListeners.add(Qf.DragStart,Hj),this.windowListeners.add(Qf.VisibilityChange,this.handleCancel),this.windowListeners.add(Qf.ContextMenu,Hj),this.documentListeners.add(Qf.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Xj(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Zj(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:i,onPending:r}=this.props;r(i,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Qf.Click,oxe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Qf.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:i,initialCoordinates:r,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!r)return;const c=(t=sR(e))!=null?t:hm,A=rS(r,c);if(!i&&a){if(Zj(a)){if(a.tolerance!=null&&gB(A,a.tolerance))return this.handleCancel();if(gB(A,a.distance))return this.handleStart()}if(Xj(a)&&gB(A,a.tolerance))return this.handleCancel();this.handlePending(a,A);return}e.cancelable&&e.preventDefault(),s(c)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Ls.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const axe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class RU extends TU{constructor(e){const{event:t}=e,i=Tx(t.target);super(e,axe,i)}}RU.activators=[{eventName:"onPointerDown",handler:(n,e)=>{let{nativeEvent:t}=n,{onActivation:i}=e;return!t.isPrimary||t.button!==0?!1:(i?.({event:t}),!0)}}];const lxe={move:{name:"mousemove"},end:{name:"mouseup"}};var lR;(function(n){n[n.RightClick=2]="RightClick"})(lR||(lR={}));class uxe extends TU{constructor(e){super(e,lxe,Tx(e.event.target))}}uxe.activators=[{eventName:"onMouseDown",handler:(n,e)=>{let{nativeEvent:t}=n,{onActivation:i}=e;return t.button===lR.RightClick?!1:(i?.({event:t}),!0)}}];const yB={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class cxe extends TU{constructor(e){super(e,yB)}static setup(){return window.addEventListener(yB.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(yB.move.name,e)};function e(){}}}cxe.activators=[{eventName:"onTouchStart",handler:(n,e)=>{let{nativeEvent:t}=n,{onActivation:i}=e;const{touches:r}=t;return r.length>1?!1:(i?.({event:t}),!0)}}];var o3;(function(n){n[n.Pointer=0]="Pointer",n[n.DraggableRect=1]="DraggableRect"})(o3||(o3={}));var sS;(function(n){n[n.TreeOrder=0]="TreeOrder",n[n.ReversedTreeOrder=1]="ReversedTreeOrder"})(sS||(sS={}));function Axe(n){let{acceleration:e,activator:t=o3.Pointer,canScroll:i,draggingRect:r,enabled:o,interval:s=5,order:a=sS.TreeOrder,pointerCoordinates:c,scrollableAncestors:A,scrollableAncestorRects:m,delta:v,threshold:x}=n;const _=dxe({delta:v,disabled:!o}),[O,P]=b_e(),F=wt.useRef({x:0,y:0}),j=wt.useRef({x:0,y:0}),Q=wt.useMemo(()=>{switch(t){case o3.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case o3.DraggableRect:return r}},[t,r,c]),V=wt.useRef(null),H=wt.useCallback(()=>{const Y=V.current;if(!Y)return;const z=F.current.x*j.current.x,se=F.current.y*j.current.y;Y.scrollBy(z,se)},[]),G=wt.useMemo(()=>a===sS.TreeOrder?[...A].reverse():A,[a,A]);wt.useEffect(()=>{if(!o||!A.length||!Q){P();return}for(const Y of G){if(i?.(Y)===!1)continue;const z=A.indexOf(Y),se=m[z];if(!se)continue;const{direction:le,speed:me}=X_e(Y,se,Q,e,x);for(const fe of["x","y"])_[fe][le[fe]]||(me[fe]=0,le[fe]=0);if(me.x>0||me.y>0){P(),V.current=Y,O(H,s),F.current=me,j.current=le;return}}F.current={x:0,y:0},j.current={x:0,y:0},P()},[e,H,i,P,o,s,JSON.stringify(Q),JSON.stringify(_),O,A,G,m,JSON.stringify(x)])}const hxe={x:{[Pc.Backward]:!1,[Pc.Forward]:!1},y:{[Pc.Backward]:!1,[Pc.Forward]:!1}};function dxe(n){let{delta:e,disabled:t}=n;const i=oR(e);return rM(r=>{if(t||!i||!r)return hxe;const o={x:Math.sign(e.x-i.x),y:Math.sign(e.y-i.y)};return{x:{[Pc.Backward]:r.x[Pc.Backward]||o.x===-1,[Pc.Forward]:r.x[Pc.Forward]||o.x===1},y:{[Pc.Backward]:r.y[Pc.Backward]||o.y===-1,[Pc.Forward]:r.y[Pc.Forward]||o.y===1}}},[t,e,i])}function fxe(n,e){const t=e!=null?n.get(e):void 0,i=t?t.node.current:null;return rM(r=>{var o;return e==null?null:(o=i??r)!=null?o:null},[i,e])}function pxe(n,e){return wt.useMemo(()=>n.reduce((t,i)=>{const{sensor:r}=i,o=r.activators.map(s=>({eventName:s.eventName,handler:e(s.handler,i)}));return[...t,...o]},[]),[n,e])}var e4;(function(n){n[n.Always=0]="Always",n[n.BeforeDragging=1]="BeforeDragging",n[n.WhileDragging=2]="WhileDragging"})(e4||(e4={}));var uR;(function(n){n.Optimized="optimized"})(uR||(uR={}));const Jj=new Map;function mxe(n,e){let{dragging:t,dependencies:i,config:r}=e;const[o,s]=wt.useState(null),{frequency:a,measure:c,strategy:A}=r,m=wt.useRef(n),v=F(),x=X3(v),_=wt.useCallback(function(j){j===void 0&&(j=[]),!x.current&&s(Q=>Q===null?j:Q.concat(j.filter(V=>!Q.includes(V))))},[x]),O=wt.useRef(null),P=rM(j=>{if(v&&!t)return Jj;if(!j||j===Jj||m.current!==n||o!=null){const Q=new Map;for(let V of n){if(!V)continue;if(o&&o.length>0&&!o.includes(V.id)&&V.rect.current){Q.set(V.id,V.rect.current);continue}const H=V.node.current,G=H?new kU(c(H),H):null;V.rect.current=G,G&&Q.set(V.id,G)}return Q}return j},[n,o,t,v,c]);return wt.useEffect(()=>{m.current=n},[n]),wt.useEffect(()=>{v||_()},[t,v]),wt.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),wt.useEffect(()=>{v||typeof a!="number"||O.current!==null||(O.current=setTimeout(()=>{_(),O.current=null},a))},[a,v,_,...i]),{droppableRects:P,measureDroppableContainers:_,measuringScheduled:o!=null};function F(){switch(A){case e4.Always:return!1;case e4.BeforeDragging:return t;default:return!t}}}function _te(n,e){return rM(t=>n?t||(typeof e=="function"?e(n):n):null,[e,n])}function gxe(n,e){return _te(n,e)}function yxe(n){let{callback:e,disabled:t}=n;const i=OU(e),r=wt.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(i)},[i,t]);return wt.useEffect(()=>()=>r?.disconnect(),[r]),r}function HE(n){let{callback:e,disabled:t}=n;const i=OU(e),r=wt.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(i)},[t]);return wt.useEffect(()=>()=>r?.disconnect(),[r]),r}function vxe(n){return new kU(Rx(n),n)}function eN(n,e,t){e===void 0&&(e=vxe);const[i,r]=wt.useState(null);function o(){r(c=>{if(!n)return null;if(n.isConnected===!1){var A;return(A=c??t)!=null?A:null}const m=e(n);return JSON.stringify(c)===JSON.stringify(m)?c:m})}const s=yxe({callback(c){if(n)for(const A of c){const{type:m,target:v}=A;if(m==="childList"&&v instanceof HTMLElement&&v.contains(n)){o();break}}}}),a=HE({callback:o});return zg(()=>{o(),n?(a?.observe(n),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[n]),i}function bxe(n){const e=_te(n);return dte(n,e)}const tN=[];function Cxe(n){const e=wt.useRef(n),t=rM(i=>n?i&&i!==tN&&n&&e.current&&n.parentNode===e.current.parentNode?i:IU(n):tN,[n]);return wt.useEffect(()=>{e.current=n},[n]),t}function _xe(n){const[e,t]=wt.useState(null),i=wt.useRef(n),r=wt.useCallback(o=>{const s=mB(o.target);s&&t(a=>a?(a.set(s,aR(s)),new Map(a)):null)},[]);return wt.useEffect(()=>{const o=i.current;if(n!==o){s(o);const a=n.map(c=>{const A=mB(c);return A?(A.addEventListener("scroll",r,{passive:!0}),[A,aR(A)]):null}).filter(c=>c!=null);t(a.length?new Map(a):null),i.current=n}return()=>{s(n),s(o)};function s(a){a.forEach(c=>{const A=mB(c);A?.removeEventListener("scroll",r)})}},[r,n]),wt.useMemo(()=>n.length?e?Array.from(e.values()).reduce((o,s)=>K_(o,s),hm):vte(n):hm,[n,e])}function nN(n,e){e===void 0&&(e=[]);const t=wt.useRef(null);return wt.useEffect(()=>{t.current=null},e),wt.useEffect(()=>{const i=n!==hm;i&&!t.current&&(t.current=n),!i&&t.current&&(t.current=null)},[n]),t.current?rS(n,t.current):hm}function xxe(n){wt.useEffect(()=>{if(!VE)return;const e=n.map(t=>{let{sensor:i}=t;return i.setup==null?void 0:i.setup()});return()=>{for(const t of e)t?.()}},n.map(e=>{let{sensor:t}=e;return t}))}function Mxe(n,e){return wt.useMemo(()=>n.reduce((t,i)=>{let{eventName:r,handler:o}=i;return t[r]=s=>{o(s,e)},t},{}),[n,e])}function xte(n){return wt.useMemo(()=>n?$_e(n):null,[n])}const iN=[];function wxe(n,e){e===void 0&&(e=Rx);const[t]=n,i=xte(t?sd(t):null),[r,o]=wt.useState(iN);function s(){o(()=>n.length?n.map(c=>gte(c)?i:new kU(e(c),c)):iN)}const a=HE({callback:s});return zg(()=>{a?.disconnect(),s(),n.forEach(c=>a?.observe(c))},[n]),r}function Sxe(n){if(!n)return null;if(n.children.length>1)return n;const e=n.children[0];return iM(e)?e:n}function Exe(n){let{measure:e}=n;const[t,i]=wt.useState(null),r=wt.useCallback(A=>{for(const{target:m}of A)if(iM(m)){i(v=>{const x=e(m);return v?{...v,width:x.width,height:x.height}:x});break}},[e]),o=HE({callback:r}),s=wt.useCallback(A=>{const m=Sxe(A);o?.disconnect(),m&&o?.observe(m),i(m?e(m):null)},[e,o]),[a,c]=iS(s);return wt.useMemo(()=>({nodeRef:a,rect:t,setRef:c}),[t,a,c])}const Oxe=[{sensor:RU,options:{}},{sensor:Cte,options:{}}],Bxe={current:{}},Z5={draggable:{measure:Vj},droppable:{measure:Vj,strategy:e4.WhileDragging,frequency:uR.Optimized},dragOverlay:{measure:Rx}};class s3 extends Map{get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,i;return(t=(i=this.get(e))==null?void 0:i.node.current)!=null?t:void 0}}const Ixe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new s3,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:oS},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Z5,measureDroppableContainers:oS,windowRect:null,measuringScheduled:!1},kxe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:oS,draggableNodes:new Map,over:null,measureDroppableContainers:oS},ZE=wt.createContext(kxe),Mte=wt.createContext(Ixe);function Txe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new s3}}}function Rxe(n,e){switch(e.type){case ic.DragStart:return{...n,draggable:{...n.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case ic.DragMove:return n.draggable.active==null?n:{...n,draggable:{...n.draggable,translate:{x:e.coordinates.x-n.draggable.initialCoordinates.x,y:e.coordinates.y-n.draggable.initialCoordinates.y}}};case ic.DragEnd:case ic.DragCancel:return{...n,draggable:{...n.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ic.RegisterDroppable:{const{element:t}=e,{id:i}=t,r=new s3(n.droppable.containers);return r.set(i,t),{...n,droppable:{...n.droppable,containers:r}}}case ic.SetDroppableDisabled:{const{id:t,key:i,disabled:r}=e,o=n.droppable.containers.get(t);if(!o||i!==o.key)return n;const s=new s3(n.droppable.containers);return s.set(t,{...o,disabled:r}),{...n,droppable:{...n.droppable,containers:s}}}case ic.UnregisterDroppable:{const{id:t,key:i}=e,r=n.droppable.containers.get(t);if(!r||i!==r.key)return n;const o=new s3(n.droppable.containers);return o.delete(t),{...n,droppable:{...n.droppable,containers:o}}}default:return n}}function Dxe(n){let{disabled:e}=n;const{active:t,activatorEvent:i,draggableNodes:r}=wt.useContext(ZE),o=oR(i),s=oR(t?.id);return wt.useEffect(()=>{if(!e&&!i&&o&&s!=null){if(!BU(o)||document.activeElement===o.target)return;const a=r.get(s);if(!a)return;const{activatorNode:c,node:A}=a;if(!c.current&&!A.current)return;requestAnimationFrame(()=>{for(const m of[c.current,A.current]){if(!m)continue;const v=x_e(m);if(v){v.focus();break}}})}},[i,e,r,s,o]),null}function Pxe(n,e){let{transform:t,...i}=e;return n!=null&&n.length?n.reduce((r,o)=>o({transform:r,...i}),t):t}function Uxe(n){return wt.useMemo(()=>({draggable:{...Z5.draggable,...n?.draggable},droppable:{...Z5.droppable,...n?.droppable},dragOverlay:{...Z5.dragOverlay,...n?.dragOverlay}}),[n?.draggable,n?.droppable,n?.dragOverlay])}function Kxe(n){let{activeNode:e,measure:t,initialRect:i,config:r=!0}=n;const o=wt.useRef(!1),{x:s,y:a}=typeof r=="boolean"?{x:r,y:r}:r;zg(()=>{if(!s&&!a||!e){o.current=!1;return}if(o.current||!i)return;const A=e?.node.current;if(!A||A.isConnected===!1)return;const m=t(A),v=dte(m,i);if(s||(v.x=0),a||(v.y=0),o.current=!0,Math.abs(v.x)>0||Math.abs(v.y)>0){const x=fte(A);x&&x.scrollBy({top:v.y,left:v.x})}},[e,s,a,i,t])}const wte=wt.createContext({...hm,scaleX:1,scaleY:1});var vy;(function(n){n[n.Uninitialized=0]="Uninitialized",n[n.Initializing=1]="Initializing",n[n.Initialized=2]="Initialized"})(vy||(vy={}));const Lxe=wt.memo(function(e){var t,i,r,o;let{id:s,accessibility:a,autoScroll:c=!0,children:A,sensors:m=Oxe,collisionDetection:v=j_e,measuring:x,modifiers:_,...O}=e;const P=wt.useReducer(Rxe,void 0,Txe),[F,j]=P,[Q,V]=B_e(),[H,G]=wt.useState(vy.Uninitialized),Y=H===vy.Initialized,{draggable:{active:z,nodes:se,translate:le},droppable:{containers:me}}=F,fe=z!=null?se.get(z):null,_e=wt.useRef({initial:null,translated:null}),we=wt.useMemo(()=>{var ot;return z!=null?{id:z,data:(ot=fe?.data)!=null?ot:Bxe,rect:_e}:null},[z,fe]),ke=wt.useRef(null),[je,Ie]=wt.useState(null),[Qe,tt]=wt.useState(null),ht=X3(O,Object.values(O)),ce=oM("DndDescribedBy",s),Le=wt.useMemo(()=>me.getEnabled(),[me]),We=Uxe(x),{droppableRects:Me,measureDroppableContainers:dt,measuringScheduled:it}=mxe(Le,{dragging:Y,dependencies:[le.x,le.y],config:We.droppable}),vt=fxe(se,z),Ut=wt.useMemo(()=>Qe?sR(Qe):null,[Qe]),Pe=Dt(),Te=gxe(vt,We.draggable.measure);Kxe({activeNode:z!=null?se.get(z):null,config:Pe.layoutShiftCompensation,initialRect:Te,measure:We.draggable.measure});const Se=eN(vt,We.draggable.measure,Te),Ne=eN(vt?vt.parentElement:null),ut=wt.useRef({activatorEvent:null,active:null,activeNode:vt,collisionRect:null,collisions:null,droppableRects:Me,draggableNodes:se,draggingNode:null,draggingNodeRect:null,droppableContainers:me,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),rt=me.getNodeFor((t=ut.current.over)==null?void 0:t.id),mt=Exe({measure:We.dragOverlay.measure}),Rt=(i=mt.nodeRef.current)!=null?i:vt,Bt=Y?(r=mt.rect)!=null?r:Se:null,$t=!!(mt.nodeRef.current&&mt.rect),Rn=bxe($t?null:Se),zn=xte(Rt?sd(Rt):null),ai=Cxe(Y?rt??vt:null),_n=wxe(ai),Bn=Pxe(_,{transform:{x:le.x-Rn.x,y:le.y-Rn.y,scaleX:1,scaleY:1},activatorEvent:Qe,active:we,activeNodeRect:Se,containerNodeRect:Ne,draggingNodeRect:Bt,over:ut.current.over,overlayNodeRect:mt.rect,scrollableAncestors:ai,scrollableAncestorRects:_n,windowRect:zn}),dn=Ut?K_(Ut,le):null,li=_xe(ai),In=nN(li),It=nN(li,[Se]),xe=K_(Bn,In),oe=Bt?W_e(Bt,Bn):null,J=we&&oe?v({active:we,collisionRect:oe,droppableRects:Me,droppableContainers:Le,pointerCoordinates:dn}):null,ne=L_e(J,"id"),[ue,Ce]=wt.useState(null),Ue=$t?Bn:K_(Bn,It),He=N_e(Ue,(o=ue?.rect)!=null?o:null,Se),lt=wt.useRef(null),be=wt.useCallback((ot,bn)=>{let{sensor:Gn,options:yn}=bn;if(ke.current==null)return;const qn=se.get(ke.current);if(!qn)return;const $n=ot.nativeEvent,mi=new Gn({active:ke.current,activeNode:qn,event:$n,options:yn,context:ut,onAbort(di){if(!se.get(di))return;const{onDragAbort:Fn}=ht.current,Ti={id:di};Fn?.(Ti),Q({type:"onDragAbort",event:Ti})},onPending(di,Vn,Fn,Ti){if(!se.get(di))return;const{onDragPending:qr}=ht.current,Di={id:di,constraint:Vn,initialCoordinates:Fn,offset:Ti};qr?.(Di),Q({type:"onDragPending",event:Di})},onStart(di){const Vn=ke.current;if(Vn==null)return;const Fn=se.get(Vn);if(!Fn)return;const{onDragStart:Ti}=ht.current,on={activatorEvent:$n,active:{id:Vn,data:Fn.data,rect:_e}};U2.unstable_batchedUpdates(()=>{Ti?.(on),G(vy.Initializing),j({type:ic.DragStart,initialCoordinates:di,active:Vn}),Q({type:"onDragStart",event:on}),Ie(lt.current),tt($n)})},onMove(di){j({type:ic.DragMove,coordinates:di})},onEnd:ir(ic.DragEnd),onCancel:ir(ic.DragCancel)});lt.current=mi;function ir(di){return async function(){const{active:Fn,collisions:Ti,over:on,scrollAdjustedTranslate:qr}=ut.current;let Di=null;if(Fn&&qr){const{cancelDrop:js}=ht.current;Di={activatorEvent:$n,active:Fn,collisions:Ti,delta:qr,over:on},di===ic.DragEnd&&typeof js=="function"&&await Promise.resolve(js(Di))&&(di=ic.DragCancel)}ke.current=null,U2.unstable_batchedUpdates(()=>{j({type:di}),G(vy.Uninitialized),Ce(null),Ie(null),tt(null),lt.current=null;const js=di===ic.DragEnd?"onDragEnd":"onDragCancel";if(Di){const ea=ht.current[js];ea?.(Di),Q({type:js,event:Di})}})}}},[se]),Ee=wt.useCallback((ot,bn)=>(Gn,yn)=>{const qn=Gn.nativeEvent,$n=se.get(yn);if(ke.current!==null||!$n||qn.dndKit||qn.defaultPrevented)return;const mi={active:$n};ot(Gn,bn.options,mi)===!0&&(qn.dndKit={capturedBy:bn.sensor},ke.current=yn,be(Gn,bn))},[se,be]),y=pxe(m,Ee);xxe(m),zg(()=>{Se&&H===vy.Initializing&&G(vy.Initialized)},[Se,H]),wt.useEffect(()=>{const{onDragMove:ot}=ht.current,{active:bn,activatorEvent:Gn,collisions:yn,over:qn}=ut.current;if(!bn||!Gn)return;const $n={active:bn,activatorEvent:Gn,collisions:yn,delta:{x:xe.x,y:xe.y},over:qn};U2.unstable_batchedUpdates(()=>{ot?.($n),Q({type:"onDragMove",event:$n})})},[xe.x,xe.y]),wt.useEffect(()=>{const{active:ot,activatorEvent:bn,collisions:Gn,droppableContainers:yn,scrollAdjustedTranslate:qn}=ut.current;if(!ot||ke.current==null||!bn||!qn)return;const{onDragOver:$n}=ht.current,mi=yn.get(ne),ir=mi&&mi.rect.current?{id:mi.id,rect:mi.rect.current,data:mi.data,disabled:mi.disabled}:null,di={active:ot,activatorEvent:bn,collisions:Gn,delta:{x:qn.x,y:qn.y},over:ir};U2.unstable_batchedUpdates(()=>{Ce(ir),$n?.(di),Q({type:"onDragOver",event:di})})},[ne]),zg(()=>{ut.current={activatorEvent:Qe,active:we,activeNode:vt,collisionRect:oe,collisions:J,droppableRects:Me,draggableNodes:se,draggingNode:Rt,draggingNodeRect:Bt,droppableContainers:me,over:ue,scrollableAncestors:ai,scrollAdjustedTranslate:xe},_e.current={initial:Bt,translated:oe}},[we,vt,J,oe,se,Rt,Bt,Me,me,ue,ai,xe]),Axe({...Pe,delta:le,draggingRect:oe,pointerCoordinates:dn,scrollableAncestors:ai,scrollableAncestorRects:_n});const gt=wt.useMemo(()=>({active:we,activeNode:vt,activeNodeRect:Se,activatorEvent:Qe,collisions:J,containerNodeRect:Ne,dragOverlay:mt,draggableNodes:se,droppableContainers:me,droppableRects:Me,over:ue,measureDroppableContainers:dt,scrollableAncestors:ai,scrollableAncestorRects:_n,measuringConfiguration:We,measuringScheduled:it,windowRect:zn}),[we,vt,Se,Qe,J,Ne,mt,se,me,Me,ue,dt,ai,_n,We,it,zn]),Mt=wt.useMemo(()=>({activatorEvent:Qe,activators:y,active:we,activeNodeRect:Se,ariaDescribedById:{draggable:ce},dispatch:j,draggableNodes:se,over:ue,measureDroppableContainers:dt}),[Qe,y,we,Se,j,ce,se,ue,dt]);return En.createElement(hte.Provider,{value:V},En.createElement(ZE.Provider,{value:Mt},En.createElement(Mte.Provider,{value:gt},En.createElement(wte.Provider,{value:He},A)),En.createElement(Dxe,{disabled:a?.restoreFocus===!1})),En.createElement(T_e,{...a,hiddenTextDescribedById:ce}));function Dt(){const ot=je?.autoScrollEnabled===!1,bn=typeof c=="object"?c.enabled===!1:c===!1,Gn=Y&&!ot&&!bn;return typeof c=="object"?{...c,enabled:Gn}:{enabled:Gn}}}),Fxe=wt.createContext(null),rN="button",zxe="Draggable";function jxe(n){let{id:e,data:t,disabled:i=!1,attributes:r}=n;const o=oM(zxe),{activators:s,activatorEvent:a,active:c,activeNodeRect:A,ariaDescribedById:m,draggableNodes:v,over:x}=wt.useContext(ZE),{role:_=rN,roleDescription:O="draggable",tabIndex:P=0}=r??{},F=c?.id===e,j=wt.useContext(F?wte:Fxe),[Q,V]=iS(),[H,G]=iS(),Y=Mxe(s,e),z=X3(t);zg(()=>(v.set(e,{id:e,key:o,node:Q,activatorNode:H,data:z}),()=>{const le=v.get(e);le&&le.key===o&&v.delete(e)}),[v,e]);const se=wt.useMemo(()=>({role:_,tabIndex:P,"aria-disabled":i,"aria-pressed":F&&_===rN?!0:void 0,"aria-roledescription":O,"aria-describedby":m.draggable}),[i,_,P,F,O,m.draggable]);return{active:c,activatorEvent:a,activeNodeRect:A,attributes:se,isDragging:F,listeners:i?void 0:Y,node:Q,over:x,setNodeRef:V,setActivatorNodeRef:G,transform:j}}function Nxe(){return wt.useContext(Mte)}const Gxe="Droppable",Wxe={timeout:25};function Qxe(n){let{data:e,disabled:t=!1,id:i,resizeObserverConfig:r}=n;const o=oM(Gxe),{active:s,dispatch:a,over:c,measureDroppableContainers:A}=wt.useContext(ZE),m=wt.useRef({disabled:t}),v=wt.useRef(!1),x=wt.useRef(null),_=wt.useRef(null),{disabled:O,updateMeasurementsFor:P,timeout:F}={...Wxe,...r},j=X3(P??i),Q=wt.useCallback(()=>{if(!v.current){v.current=!0;return}_.current!=null&&clearTimeout(_.current),_.current=setTimeout(()=>{A(Array.isArray(j.current)?j.current:[j.current]),_.current=null},F)},[F]),V=HE({callback:Q,disabled:O||!s}),H=wt.useCallback((se,le)=>{V&&(le&&(V.unobserve(le),v.current=!1),se&&V.observe(se))},[V]),[G,Y]=iS(H),z=X3(e);return wt.useEffect(()=>{!V||!G.current||(V.disconnect(),v.current=!1,V.observe(G.current))},[G,V]),wt.useEffect(()=>(a({type:ic.RegisterDroppable,element:{id:i,key:o,disabled:t,node:G,rect:x,data:z}}),()=>a({type:ic.UnregisterDroppable,key:o,id:i})),[i]),wt.useEffect(()=>{t!==m.current.disabled&&(a({type:ic.SetDroppableDisabled,id:i,key:o,disabled:t}),m.current.disabled=t)},[i,o,t,a]),{active:s,rect:x,isOver:c?.id===i,node:G,over:c,setNodeRef:Y}}function Ste(n,e,t){const i=n.slice();return i.splice(t<0?i.length+t:t,0,i.splice(e,1)[0]),i}function qxe(n,e){return n.reduce((t,i,r)=>{const o=e.get(i);return o&&(t[r]=o),t},Array(n.length))}function ZM(n){return n!==null&&n>=0}function Yxe(n,e){if(n===e)return!0;if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function $xe(n){return typeof n=="boolean"?{draggable:n,droppable:n}:n}const Ete=n=>{let{rects:e,activeIndex:t,overIndex:i,index:r}=n;const o=Ste(e,i,t),s=e[r],a=o[r];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},XM={scaleX:1,scaleY:1},Vxe=n=>{var e;let{activeIndex:t,activeNodeRect:i,index:r,rects:o,overIndex:s}=n;const a=(e=o[t])!=null?e:i;if(!a)return null;if(r===t){const A=o[s];return A?{x:0,y:t<s?A.top+A.height-(a.top+a.height):A.top-a.top,...XM}:null}const c=Hxe(o,r,t);return r>t&&r<=s?{x:0,y:-a.height-c,...XM}:r<t&&r>=s?{x:0,y:a.height+c,...XM}:{x:0,y:0,...XM}};function Hxe(n,e,t){const i=n[e],r=n[e-1],o=n[e+1];return i?t<e?r?i.top-(r.top+r.height):o?o.top-(i.top+i.height):0:o?o.top-(i.top+i.height):r?i.top-(r.top+r.height):0:0}const Ote="Sortable",Bte=En.createContext({activeIndex:-1,containerId:Ote,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ete,disabled:{draggable:!1,droppable:!1}});function Zxe(n){let{children:e,id:t,items:i,strategy:r=Ete,disabled:o=!1}=n;const{active:s,dragOverlay:a,droppableRects:c,over:A,measureDroppableContainers:m}=Nxe(),v=oM(Ote,t),x=a.rect!==null,_=wt.useMemo(()=>i.map(Y=>typeof Y=="object"&&"id"in Y?Y.id:Y),[i]),O=s!=null,P=s?_.indexOf(s.id):-1,F=A?_.indexOf(A.id):-1,j=wt.useRef(_),Q=!Yxe(_,j.current),V=F!==-1&&P===-1||Q,H=$xe(o);zg(()=>{Q&&O&&m(_)},[Q,_,O,m]),wt.useEffect(()=>{j.current=_},[_]);const G=wt.useMemo(()=>({activeIndex:P,containerId:v,disabled:H,disableTransforms:V,items:_,overIndex:F,useDragOverlay:x,sortedRects:qxe(_,c),strategy:r}),[P,v,H.draggable,H.droppable,V,_,F,c,x,r]);return En.createElement(Bte.Provider,{value:G},e)}const Xxe=n=>{let{id:e,items:t,activeIndex:i,overIndex:r}=n;return Ste(t,i,r).indexOf(e)},Jxe=n=>{let{containerId:e,isSorting:t,wasDragging:i,index:r,items:o,newIndex:s,previousItems:a,previousContainerId:c,transition:A}=n;return!A||!i||a!==o&&r===s?!1:t?!0:s!==r&&e===c},e2e={duration:200,easing:"ease"},Ite="transform",t2e=J3.Transition.toString({property:Ite,duration:0,easing:"linear"}),n2e={roleDescription:"sortable"};function i2e(n){let{disabled:e,index:t,node:i,rect:r}=n;const[o,s]=wt.useState(null),a=wt.useRef(t);return zg(()=>{if(!e&&t!==a.current&&i.current){const c=r.current;if(c){const A=Rx(i.current,{ignoreTransform:!0}),m={x:c.left-A.left,y:c.top-A.top,scaleX:c.width/A.width,scaleY:c.height/A.height};(m.x||m.y)&&s(m)}}t!==a.current&&(a.current=t)},[e,t,i,r]),wt.useEffect(()=>{o&&s(null)},[o]),o}function r2e(n){let{animateLayoutChanges:e=Jxe,attributes:t,disabled:i,data:r,getNewIndex:o=Xxe,id:s,strategy:a,resizeObserverConfig:c,transition:A=e2e}=n;const{items:m,containerId:v,activeIndex:x,disabled:_,disableTransforms:O,sortedRects:P,overIndex:F,useDragOverlay:j,strategy:Q}=wt.useContext(Bte),V=o2e(i,_),H=m.indexOf(s),G=wt.useMemo(()=>({sortable:{containerId:v,index:H,items:m},...r}),[v,r,H,m]),Y=wt.useMemo(()=>m.slice(m.indexOf(s)),[m,s]),{rect:z,node:se,isOver:le,setNodeRef:me}=Qxe({id:s,data:G,disabled:V.droppable,resizeObserverConfig:{updateMeasurementsFor:Y,...c}}),{active:fe,activatorEvent:_e,activeNodeRect:we,attributes:ke,setNodeRef:je,listeners:Ie,isDragging:Qe,over:tt,setActivatorNodeRef:ht,transform:ce}=jxe({id:s,data:G,attributes:{...n2e,...t},disabled:V.draggable}),Le=v_e(me,je),We=!!fe,Me=We&&!O&&ZM(x)&&ZM(F),dt=!j&&Qe,it=dt&&Me?ce:null,Ut=Me?it??(a??Q)({rects:P,activeNodeRect:we,activeIndex:x,overIndex:F,index:H}):null,Pe=ZM(x)&&ZM(F)?o({id:s,items:m,activeIndex:x,overIndex:F}):H,Te=fe?.id,Se=wt.useRef({activeId:Te,items:m,newIndex:Pe,containerId:v}),Ne=m!==Se.current.items,ut=e({active:fe,containerId:v,isDragging:Qe,isSorting:We,id:s,index:H,items:m,newIndex:Se.current.newIndex,previousItems:Se.current.items,previousContainerId:Se.current.containerId,transition:A,wasDragging:Se.current.activeId!=null}),rt=i2e({disabled:!ut,index:H,node:se,rect:z});return wt.useEffect(()=>{We&&Se.current.newIndex!==Pe&&(Se.current.newIndex=Pe),v!==Se.current.containerId&&(Se.current.containerId=v),m!==Se.current.items&&(Se.current.items=m)},[We,Pe,v,m]),wt.useEffect(()=>{if(Te===Se.current.activeId)return;if(Te!=null&&Se.current.activeId==null){Se.current.activeId=Te;return}const Rt=setTimeout(()=>{Se.current.activeId=Te},50);return()=>clearTimeout(Rt)},[Te]),{active:fe,activeIndex:x,attributes:ke,data:G,rect:z,index:H,newIndex:Pe,items:m,isOver:le,isSorting:We,isDragging:Qe,listeners:Ie,node:se,overIndex:F,over:tt,setNodeRef:Le,setActivatorNodeRef:ht,setDroppableNodeRef:me,setDraggableNodeRef:je,transform:rt??Ut,transition:mt()};function mt(){if(rt||Ne&&Se.current.newIndex===H)return t2e;if(!(dt&&!BU(_e)||!A)&&(We||ut))return J3.Transition.toString({...A,property:Ite})}}function o2e(n,e){var t,i;return typeof n=="boolean"?{draggable:n,droppable:!1}:{draggable:(t=n?.draggable)!=null?t:e.draggable,droppable:(i=n?.droppable)!=null?i:e.droppable}}Ls.Down,Ls.Right,Ls.Up,Ls.Left;function Hv(){var n="/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx",e="e73e8fb606fcd7318a8222b2e50c576ed3ad8702",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx",statementMap:{0:{start:{line:6,column:22},end:{line:10,column:5}},1:{start:{line:11,column:4},end:{line:11,column:154}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:12,column:3}},line:5}},branchMap:{0:{loc:{start:{line:11,column:11},end:{line:11,column:153}},type:"cond-expr",locations:[{start:{line:11,column:52},end:{line:11,column:92}},{start:{line:11,column:111},end:{line:11,column:153}}],line:11}},s:{0:0,1:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx"],names:[],mappings:"AAeoC;AAfpC,OAAO,WAAW;AAClB,SAAQ,iBAAiB,qBAAoB;AAO7C,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,UAAM,YAAY;AAAA,MAChB,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,GAAG,KAAK,MAAM;AAAA,IAChB;AACA,WAAO,KAAK,MAAM,cAAc,oBAAC,iBAAc,OAAO,WAAU,IAAK,oBAAC,mBAAgB,OAAO,WAAW;AAAA,EAC1G;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e73e8fb606fcd7318a8222b2e50c576ed3ad8702"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Hv=function(){return s},s}Hv();class s2e extends En.Component{render(){Hv().f[0]++;const e=(Hv().s[0]++,{width:20,height:20,...this.props.style});return Hv().s[1]++,this.props.isCollapsed?(Hv().b[0][0]++,ie.jsx(UX,{style:e})):(Hv().b[0][1]++,ie.jsx(PX,{style:e}))}}function b_(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx",e="b04bfec534013c327fd210571832bbd2813a944a",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:32,column:9}},1:{start:{line:11,column:25},end:{line:11,column:72}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:33,column:3}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:11,column:17},end:{line:11,column:18}},loc:{start:{line:11,column:25},end:{line:11,column:72}},line:11}},branchMap:{},s:{0:0,1:0},f:{0:0,1:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx"],names:[],mappings:"AAcM,SAIE,KAJF;AAdN,OAAO,WAAW;AAClB,OAAO,eAAe;AAUtB,qBAAqB,uBAAuB,MAAM,UAA+B;AAAA,EAC/E,SAAS;AACP,WAAO,oBAAC,QAAG,WAAU,6BACnB;AAAA,MAAC;AAAA;AAAA,QAAI,WAAU;AAAA,QACb,eAAa,sBAAoB,KAAK,MAAM,aAAa;AAAA,QACzD,SAAS,QAAM,KAAK,MAAM,eAAe,CAAC,KAAK,MAAM,QAAQ;AAAA,QAE7D;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,iBAAe,KAAK,MAAM,eAAe;AAAA,cACzC,iBAAe,KAAK,MAAM;AAAA,cAEzB,eAAK,MAAM;AAAA;AAAA,UACd;AAAA,UACA,oBAAC,UAAK,WAAU,kBAAiB;AAAA,UACjC;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,QAAQ,IAAI,OAAO,GAAG;AAAA,cAC/B,aAAa,KAAK,MAAM;AAAA;AAAA,UAC1B;AAAA;AAAA;AAAA,IACF,GACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"b04bfec534013c327fd210571832bbd2813a944a"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return b_=function(){return s},s}b_();class a2e extends En.Component{render(){return b_().f[0]++,b_().s[0]++,ie.jsx("li",{className:"maputnik-layer-list-group",children:ie.jsxs("div",{className:"maputnik-layer-list-group-header","data-wd-key":"layer-list-group:"+this.props["data-wd-key"],onClick:e=>(b_().f[1]++,b_().s[1]++,this.props.onActiveToggle(!this.props.isActive)),children:[ie.jsx("button",{className:"maputnik-layer-list-group-title","aria-controls":this.props["aria-controls"],"aria-expanded":this.props.isActive,children:this.props.title}),ie.jsx("span",{className:"maputnik-space"}),ie.jsx(s2e,{style:{height:14,width:14},isCollapsed:this.props.isActive})]})})}}function Ni(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerListItem.tsx",e="65a9cb0d1a08cfab21a14c1632991e31e3063aa8",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/LayerListItem.tsx",statementMap:{0:{start:{line:9,column:23},end:{line:22,column:1}},1:{start:{line:10,column:44},end:{line:10,column:49}},2:{start:{line:11,column:2},end:{line:21,column:7}},3:{start:{line:25,column:4},end:{line:34,column:5}},4:{start:{line:27,column:8},end:{line:27,column:54}},5:{start:{line:29,column:8},end:{line:29,column:53}},6:{start:{line:31,column:8},end:{line:31,column:56}},7:{start:{line:33,column:8},end:{line:33,column:49}},8:{start:{line:37,column:51},end:{line:37,column:61}},9:{start:{line:38,column:25},end:{line:38,column:27}},10:{start:{line:39,column:4},end:{line:44,column:5}},11:{start:{line:40,column:6},end:{line:40,column:76}},12:{start:{line:41,column:6},end:{line:43,column:7}},13:{start:{line:42,column:8},end:{line:42,column:103}},14:{start:{line:45,column:4},end:{line:56,column:6}},15:{start:{line:59,column:22},end:{line:145,column:2}},16:{start:{line:69,column:6},end:{line:69,column:11}},17:{start:{line:77,column:6},end:{line:77,column:40}},18:{start:{line:78,column:16},end:{line:82,column:3}},19:{start:{line:83,column:27},end:{line:83,column:69}},20:{start:{line:84,column:20},end:{line:84,column:23}},21:{start:{line:85,column:2},end:{line:144,column:7}},22:{start:{line:89,column:8},end:{line:89,column:25}},23:{start:{line:90,column:8},end:{line:92,column:9}},24:{start:{line:91,column:10},end:{line:91,column:35}},25:{start:{line:96,column:23},end:{line:96,column:60}},26:{start:{line:120,column:29},end:{line:120,column:61}},27:{start:{line:129,column:29},end:{line:129,column:58}},28:{start:{line:139,column:29},end:{line:139,column:70}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:23},end:{line:9,column:24}},loc:{start:{line:9,column:34},end:{line:22,column:1}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:24,column:2},end:{line:24,column:3}},loc:{start:{line:24,column:15},end:{line:35,column:3}},line:24},2:{name:"(anonymous_2)",decl:{start:{line:36,column:2},end:{line:36,column:3}},loc:{start:{line:36,column:11},end:{line:57,column:3}},line:36},3:{name:"(anonymous_3)",decl:{start:{line:59,column:39},end:{line:59,column:40}},loc:{start:{line:59,column:55},end:{line:145,column:1}},line:59},4:{name:"(anonymous_4)",decl:{start:{line:63,column:18},end:{line:63,column:19}},loc:{start:{line:63,column:24},end:{line:64,column:5}},line:63},5:{name:"(anonymous_5)",decl:{start:{line:65,column:21},end:{line:65,column:22}},loc:{start:{line:65,column:27},end:{line:66,column:5}},line:65},6:{name:"(anonymous_6)",decl:{start:{line:67,column:30},end:{line:67,column:31}},loc:{start:{line:67,column:36},end:{line:68,column:5}},line:67},7:{name:"(anonymous_7)",decl:{start:{line:88,column:11},end:{line:88,column:12}},loc:{start:{line:88,column:21},end:{line:93,column:7}},line:88},8:{name:"(anonymous_8)",decl:{start:{line:96,column:15},end:{line:96,column:16}},loc:{start:{line:96,column:23},end:{line:96,column:60}},line:96},9:{name:"(anonymous_9)",decl:{start:{line:120,column:21},end:{line:120,column:22}},loc:{start:{line:120,column:29},end:{line:120,column:61}},line:120},10:{name:"(anonymous_10)",decl:{start:{line:129,column:21},end:{line:129,column:22}},loc:{start:{line:129,column:29},end:{line:129,column:58}},line:129},11:{name:"(anonymous_11)",decl:{start:{line:139,column:21},end:{line:139,column:22}},loc:{start:{line:139,column:29},end:{line:139,column:70}},line:139}},branchMap:{0:{loc:{start:{line:25,column:4},end:{line:34,column:5}},type:"switch",locations:[{start:{line:26,column:6},end:{line:27,column:54}},{start:{line:28,column:6},end:{line:29,column:53}},{start:{line:30,column:6},end:{line:31,column:56}},{start:{line:32,column:6},end:{line:33,column:49}}],line:25},1:{loc:{start:{line:39,column:4},end:{line:44,column:5}},type:"if",locations:[{start:{line:39,column:4},end:{line:44,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:39},2:{loc:{start:{line:41,column:6},end:{line:43,column:7}},type:"if",locations:[{start:{line:41,column:6},end:{line:43,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:41},3:{loc:{start:{line:61,column:4},end:{line:61,column:22}},type:"default-arg",locations:[{start:{line:61,column:17},end:{line:61,column:22}}],line:61},4:{loc:{start:{line:62,column:4},end:{line:62,column:26}},type:"default-arg",locations:[{start:{line:62,column:17},end:{line:62,column:26}}],line:62},5:{loc:{start:{line:63,column:4},end:{line:64,column:5}},type:"default-arg",locations:[{start:{line:63,column:18},end:{line:64,column:5}}],line:63},6:{loc:{start:{line:65,column:4},end:{line:66,column:5}},type:"default-arg",locations:[{start:{line:65,column:21},end:{line:66,column:5}}],line:65},7:{loc:{start:{line:67,column:4},end:{line:68,column:5}},type:"default-arg",locations:[{start:{line:67,column:30},end:{line:68,column:5}}],line:67},8:{loc:{start:{line:81,column:13},end:{line:81,column:33}},type:"cond-expr",locations:[{start:{line:81,column:26},end:{line:81,column:29}},{start:{line:81,column:32},end:{line:81,column:33}}],line:81},9:{loc:{start:{line:83,column:27},end:{line:83,column:69}},type:"cond-expr",locations:[{start:{line:83,column:54},end:{line:83,column:60}},{start:{line:83,column:63},end:{line:83,column:69}}],line:83},10:{loc:{start:{line:90,column:8},end:{line:92,column:9}},type:"if",locations:[{start:{line:90,column:8},end:{line:92,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:90}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},b:{0:[0,0,0,0],1:[0,0],2:[0,0],3:[0],4:[0],5:[0],6:[0],7:[0],8:[0,0],9:[0,0],10:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerListItem.tsx"],names:[],mappings:"AAmBS,SACL,KADK;AAnBT,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,SAAQ,eAAe,cAAc,iBAAiB,gBAAe;AACrE,SAAS,mBAAmB;AAC5B,SAAQ,mBAAkB;AAC1B,SAAQ,WAAU;AAElB,OAAO,eAAe;AAUtB,MAAM,iBAAgD,CAAC,UAAU;AAC/D,QAAM,EAAC,gBAAgB,cAAa,IAAI;AACxC,SAAO,qBAAC,SAAI,WAAU,mCAAmC,GAAG,gBAAiB,GAAG,eAC9E;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,MAAM,MAAM;AAAA,QACZ,OAAO,EAAE,OAAO,OAAO,QAAQ,OAAO,eAAe,SAAS;AAAA;AAAA,IAChE;AAAA,IACA,oBAAC,YAAO,WAAU,+BACf,gBAAM,SACT;AAAA,KACF;AACF;AAUA,MAAM,mBAAmB,MAAM,UAA2B;AAAA,EACxD,aAAa;AACX,YAAO,KAAK,MAAM,QAAQ;AAAA,MACxB,KAAK;AAAa,eAAO,oBAAC,iBAAc;AAAA,MACxC,KAAK;AAAQ,eAAO,oBAAC,gBAAa;AAAA,MAClC,KAAK;AAAQ,eAAO,oBAAC,mBAAgB;AAAA,MACrC,KAAK;AAAU,eAAO,oBAAC,YAAS;AAAA,IAClC;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,gBAAgB,mBAAkB,IAAI,KAAK;AAElD,QAAI,iBAAiB;AACrB,QAAI,gBAAgB;AAClB,uBAAiB,oCAAoC,cAAc;AAEnE,UAAI,oBAAoB;AACtB,0BAAkB,qCAAqC,cAAc,KAAK,kBAAkB;AAAA,MAC9F;AAAA,IACF;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,UAAU;AAAA,QACV,OAAO,KAAK,MAAM;AAAA,QAClB,WAAW,mCAAmC,cAAc;AAAA,QAC5D,eAAa,KAAK,MAAM;AAAA,QACxB,SAAS,KAAK,MAAM;AAAA,QACpB,eAAY;AAAA,QAEX,eAAK,WAAW;AAAA;AAAA,IACnB;AAAA,EACF;AACF;AAgBA,MAAM,gBAAgB,MAAM,WAA8C,CAAC,OAAO,QAAQ;AACxF,QAAM;AAAA,IACJ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc,MAAM;AAAA,IAAC;AAAA,IACrB,iBAAiB,MAAM;AAAA,IAAC;AAAA,IACxB,0BAA0B,MAAM;AAAA,IAAC;AAAA,EACnC,IAAI;AAEJ,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,YAAY,EAAC,IAAI,MAAM,QAAO,CAAC;AAEnC,QAAM,QAAQ;AAAA,IACZ,WAAW,IAAI,UAAU,SAAS,SAAS;AAAA,IAC3C;AAAA,IACA,SAAS,aAAa,MAAM;AAAA,EAC9B;AAEA,QAAM,mBAAmB,eAAe,YAAY,SAAS;AAG7D,QAAM,YAAY;AAElB,SAAO,oBAAC,YAAY,UAAZ,EAAqB,OAAO,EAAC,MAAM,OAAM,GAC/C;AAAA,IAAC;AAAA;AAAA,MACC,KAAK,CAAC,SAAS;AACb,mBAAW,IAAI;AACf,YAAI,WAAW;AACb,oBAAU,UAAU;AAAA,QACtB;AAAA,MACF;AAAA,MACA;AAAA,MACA,IAAI,MAAM;AAAA,MACV,SAAS,QAAM,MAAM,cAAc,MAAM,UAAU;AAAA,MACnD,eAAa,qBAAqB,MAAM;AAAA,MACxC,WAAW,WAAW;AAAA,QACpB,4BAA4B;AAAA,QAC5B,qCAAqC;AAAA,QACrC,CAAC,MAAM,SAAU,GAAG;AAAA,MACtB,CAAC;AAAA,MACD;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,SAAS,MAAM;AAAA,YACf,WAAW,MAAM;AAAA,YACjB,gBAAgB;AAAA,YAChB,eAAe;AAAA;AAAA,QACjB;AAAA,QACA,oBAAC,UAAK,OAAO,EAAC,UAAU,EAAC,GAAG;AAAA,QAC5B;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,qBAAqB,MAAM,UAAQ;AAAA,YAC1C,QAAQ;AAAA,YACR,gBAAe;AAAA,YACf,SAAS,QAAM,eAAgB,MAAM,UAAU;AAAA;AAAA,QACjD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,qBAAqB,MAAM,UAAQ;AAAA,YAC1C,QAAQ;AAAA,YACR,gBAAe;AAAA,YACf,SAAS,QAAM,YAAa,MAAM,UAAU;AAAA;AAAA,QAC9C;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,qBAAmB,MAAM,UAAQ;AAAA,YACxC,QAAQ;AAAA,YACR,gBAAe;AAAA,YACf,oBAAoB;AAAA,YACpB,SAAS,QAAM,wBAAyB,MAAM,UAAU;AAAA;AAAA,QAC1D;AAAA;AAAA;AAAA,EACF,GACF;AACF,CAAC;AAED,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"65a9cb0d1a08cfab21a14c1632991e31e3063aa8"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Ni=function(){return s},s}Ni();Ni().s[0]++;const l2e=n=>{Ni().f[0]++;const{dragAttributes:e,dragListeners:t}=(Ni().s[1]++,n);return Ni().s[2]++,ie.jsxs("div",{className:"maputnik-layer-list-item-handle",...e,...t,children:[ie.jsx(KX,{className:"layer-handle__icon",type:n.layerType,style:{width:"1em",height:"1em",verticalAlign:"middle"}}),ie.jsx("button",{className:"maputnik-layer-list-item-id",children:n.layerId})]})};class vB extends En.Component{renderIcon(){switch(Ni().f[1]++,Ni().s[3]++,this.props.action){case"duplicate":return Ni().b[0][0]++,Ni().s[4]++,ie.jsx(Bfe,{});case"show":return Ni().b[0][1]++,Ni().s[5]++,ie.jsx(Ofe,{});case"hide":return Ni().b[0][2]++,Ni().s[6]++,ie.jsx(Efe,{});case"delete":return Ni().b[0][3]++,Ni().s[7]++,ie.jsx(Kb,{})}}render(){Ni().f[2]++;const{classBlockName:e,classBlockModifier:t}=(Ni().s[8]++,this.props);let i=(Ni().s[9]++,"");return Ni().s[10]++,e?(Ni().b[1][0]++,Ni().s[11]++,i=`maputnik-layer-list-icon-action__${e}`,Ni().s[12]++,t?(Ni().b[2][0]++,Ni().s[13]++,i+=` maputnik-layer-list-icon-action__${e}--${t}`):Ni().b[2][1]++):Ni().b[1][1]++,Ni().s[14]++,ie.jsx("button",{tabIndex:-1,title:this.props.action,className:`maputnik-layer-list-icon-action ${i}`,"data-wd-key":this.props.wdKey,onClick:this.props.onClick,"aria-hidden":"true",children:this.renderIcon()})}}const u2e=(Ni().s[15]++,En.forwardRef((n,e)=>{Ni().f[3]++;const{isSelected:t=(Ni().b[3][0]++,!1),visibility:i=(Ni().b[4][0]++,"visible"),onLayerCopy:r=(Ni().b[5][0]++,()=>{Ni().f[4]++}),onLayerDestroy:o=(Ni().b[6][0]++,()=>{Ni().f[5]++}),onLayerVisibilityToggle:s=(Ni().b[7][0]++,()=>{Ni().f[6]++})}=(Ni().s[16]++,n),{attributes:a,listeners:c,setNodeRef:A,transform:m,transition:v,isDragging:x}=(Ni().s[17]++,r2e({id:n.layerId})),_=(Ni().s[18]++,{transform:J3.Transform.toString(m),transition:v,opacity:x?(Ni().b[8][0]++,.5):(Ni().b[8][1]++,1)}),O=(Ni().s[19]++,i==="visible"?(Ni().b[9][0]++,"show"):(Ni().b[9][1]++,"hide")),P=(Ni().s[20]++,e);return Ni().s[21]++,ie.jsx(H_.Provider,{value:{size:"14px"},children:ie.jsxs("li",{ref:F=>{Ni().f[7]++,Ni().s[22]++,A(F),Ni().s[23]++,P?(Ni().b[10][0]++,Ni().s[24]++,P.current=F):Ni().b[10][1]++},style:_,id:n.id,onClick:F=>(Ni().f[8]++,Ni().s[25]++,n.onLayerSelect(n.layerIndex)),"data-wd-key":"layer-list-item:"+n.layerId,className:Yg({"maputnik-layer-list-item":!0,"maputnik-layer-list-item-selected":t,[n.className]:!0}),children:[ie.jsx(l2e,{layerId:n.layerId,layerType:n.layerType,dragAttributes:a,dragListeners:c}),ie.jsx("span",{style:{flexGrow:1}}),ie.jsx(vB,{wdKey:"layer-list-item:"+n.layerId+":delete",action:"delete",classBlockName:"delete",onClick:F=>(Ni().f[9]++,Ni().s[26]++,o(n.layerIndex))}),ie.jsx(vB,{wdKey:"layer-list-item:"+n.layerId+":copy",action:"duplicate",classBlockName:"duplicate",onClick:F=>(Ni().f[10]++,Ni().s[27]++,r(n.layerIndex))}),ie.jsx(vB,{wdKey:"layer-list-item:"+n.layerId+":toggle-visibility",action:O,classBlockName:"visibility",classBlockModifier:O,onClick:F=>(Ni().f[11]++,Ni().s[28]++,s(n.layerIndex))})]})})}));function aS(){var n="/home/runner/work/maputnik/maputnik/src/components/InputButton.tsx",e="522bfc6b8aacbfd03b55d947af2897dc69beb570",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputButton.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:20,column:6}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:21,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputButton.tsx"],names:[],mappings:"AAkBW;AAlBX,OAAO,WAAW;AAClB,OAAO,gBAAgB;AAevB,qBAAqB,oBAAoB,MAAM,UAA4B;AAAA,EACzE,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,IAAI,KAAK,MAAM;AAAA,QACf,OAAO,KAAK,MAAM;AAAA,QAClB,MAAM,KAAK,MAAM;AAAA,QACjB,SAAS,KAAK,MAAM;AAAA,QACpB,UAAU,KAAK,MAAM;AAAA,QACrB,cAAY,KAAK,MAAM,YAAY;AAAA,QACnC,WAAW,WAAW,mBAAmB,KAAK,MAAM,SAAS;AAAA,QAC7D,eAAa,KAAK,MAAM,aAAa;AAAA,QACrC,OAAO,KAAK,MAAM;AAAA,QAEjB,eAAK,MAAM;AAAA;AAAA,IACd;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"522bfc6b8aacbfd03b55d947af2897dc69beb570"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return aS=function(){return s},s}aS();class Js extends En.Component{render(){return aS().f[0]++,aS().s[0]++,ie.jsx("button",{id:this.props.id,title:this.props.title,type:this.props.type,onClick:this.props.onClick,disabled:this.props.disabled,"aria-label":this.props["aria-label"],className:Yg("maputnik-button",this.props.className),"data-wd-key":this.props["data-wd-key"],style:this.props.style,children:this.props.children})}}var bB={exports:{}},CB,oN;function c2e(){if(oN)return CB;oN=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return CB=n,CB}var _B,sN;function A2e(){if(sN)return _B;sN=1;var n=c2e();function e(){}function t(){}return t.resetWarningCache=e,_B=function(){function i(s,a,c,A,m,v){if(v!==n){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}}i.isRequired=i;function r(){return i}var o={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:r,element:i,elementType:i,instanceOf:r,node:i,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:t,resetWarningCache:e};return o.PropTypes=o,o},_B}var aN;function s1(){return aN||(aN=1,bB.exports=A2e()()),bB.exports}/*!
* tabbable 6.2.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/var kte=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],lS=kte.join(","),Tte=typeof Element>"u",Ib=Tte?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,uS=!Tte&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n?.ownerDocument},cS=function n(e,t){var i;t===void 0&&(t=!0);var r=e==null||(i=e.getAttribute)===null||i===void 0?void 0:i.call(e,"inert"),o=r===""||r==="true",s=o||t&&e&&n(e.parentNode);return s},h2e=function(e){var t,i=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return i===""||i==="true"},Rte=function(e,t,i){if(cS(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(lS));return t&&Ib.call(e,lS)&&r.unshift(e),r=r.filter(i),r},Dte=function n(e,t,i){for(var r=[],o=Array.from(e);o.length;){var s=o.shift();if(!cS(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),c=a.length?a:s.children,A=n(c,!0,i);i.flatten?r.push.apply(r,A):r.push({scopeParent:s,candidates:A})}else{var m=Ib.call(s,lS);m&&i.filter(s)&&(t||!e.includes(s))&&r.push(s);var v=s.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(s),x=!cS(v,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(v&&x){var _=n(v===!0?s.children:v.children,!0,i);i.flatten?r.push.apply(r,_):r.push({scopeParent:s,candidates:_})}else o.unshift.apply(o,s.children)}}return r},Pte=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},_y=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||h2e(e))&&!Pte(e)?0:e.tabIndex},d2e=function(e,t){var i=_y(e);return i<0&&t&&!Pte(e)?0:i},f2e=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ute=function(e){return e.tagName==="INPUT"},p2e=function(e){return Ute(e)&&e.type==="hidden"},m2e=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(i){return i.tagName==="SUMMARY"});return t},g2e=function(e,t){for(var i=0;i<e.length;i++)if(e[i].checked&&e[i].form===t)return e[i]},y2e=function(e){if(!e.name)return!0;var t=e.form||uS(e),i=function(a){return t.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=i(window.CSS.escape(e.name));else try{r=i(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=g2e(r,e.form);return!o||o===e},v2e=function(e){return Ute(e)&&e.type==="radio"},b2e=function(e){return v2e(e)&&!y2e(e)},C2e=function(e){var t,i=e&&uS(e),r=(t=i)===null||t===void 0?void 0:t.host,o=!1;if(i&&i!==e){var s,a,c;for(o=!!((s=r)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(c=e.ownerDocument)!==null&&c!==void 0&&c.contains(e));!o&&r;){var A,m,v;i=uS(r),r=(A=i)===null||A===void 0?void 0:A.host,o=!!((m=r)!==null&&m!==void 0&&(v=m.ownerDocument)!==null&&v!==void 0&&v.contains(r))}}return o},lN=function(e){var t=e.getBoundingClientRect(),i=t.width,r=t.height;return i===0&&r===0},_2e=function(e,t){var i=t.displayCheck,r=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=Ib.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(Ib.call(s,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof r=="function"){for(var a=e;e;){var c=e.parentElement,A=uS(e);if(c&&!c.shadowRoot&&r(c)===!0)return lN(e);e.assignedSlot?e=e.assignedSlot:!c&&A!==e.ownerDocument?e=A.host:e=c}e=a}if(C2e(e))return!e.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return lN(e);return!1},x2e=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var i=0;i<t.children.length;i++){var r=t.children.item(i);if(r.tagName==="LEGEND")return Ib.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},AS=function(e,t){return!(t.disabled||cS(t)||p2e(t)||_2e(t,e)||m2e(t)||x2e(t))},cR=function(e,t){return!(b2e(t)||_y(t)<0||!AS(e,t))},M2e=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},w2e=function n(e){var t=[],i=[];return e.forEach(function(r,o){var s=!!r.scopeParent,a=s?r.scopeParent:r,c=d2e(a,s),A=s?n(r.candidates):a;c===0?s?t.push.apply(t,A):t.push(a):i.push({documentOrder:o,tabIndex:c,item:r,isScope:s,content:A})}),i.sort(f2e).reduce(function(r,o){return o.isScope?r.push.apply(r,o.content):r.push(o.content),r},[]).concat(t)},Kte=function(e,t){t=t||{};var i;return t.getShadowRoot?i=Dte([e],t.includeContainer,{filter:cR.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:M2e}):i=Rte(e,t.includeContainer,cR.bind(null,t)),w2e(i)},Lte=function(e,t){t=t||{};var i;return t.getShadowRoot?i=Dte([e],t.includeContainer,{filter:AS.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):i=Rte(e,t.includeContainer,AS.bind(null,t)),i},Yv=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Ib.call(e,lS)===!1?!1:cR(t,e)},S2e=kte.concat("iframe").join(","),X5=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Ib.call(e,S2e)===!1?!1:AS(t,e)};const E2e=Object.freeze(Object.defineProperty({__proto__:null,focusable:Lte,getTabIndex:_y,isFocusable:X5,isTabbable:Yv,tabbable:Kte},Symbol.toStringTag,{value:"Module"}));/*!
* focus-trap 7.6.5
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/function AR(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=Array(e);t<e;t++)i[t]=n[t];return i}function O2e(n){if(Array.isArray(n))return AR(n)}function B2e(n,e,t){return(e=D2e(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function I2e(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function k2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uN(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function cN(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?uN(Object(t),!0).forEach(function(i){B2e(n,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):uN(Object(t)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(t,i))})}return n}function T2e(n){return O2e(n)||I2e(n)||P2e(n)||k2e()}function R2e(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var i=t.call(n,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function D2e(n){var e=R2e(n,"string");return typeof e=="symbol"?e:e+""}function P2e(n,e){if(n){if(typeof n=="string")return AR(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?AR(n,e):void 0}}var AN={activateTrap:function(e,t){if(e.length>0){var i=e[e.length-1];i!==t&&i._setPausedState(!0)}var r=e.indexOf(t);r===-1||e.splice(r,1),e.push(t)},deactivateTrap:function(e,t){var i=e.indexOf(t);i!==-1&&e.splice(i,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},U2e=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},K2e=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},a3=function(e){return e?.key==="Tab"||e?.keyCode===9},L2e=function(e){return a3(e)&&!e.shiftKey},F2e=function(e){return a3(e)&&e.shiftKey},hN=function(e){return setTimeout(e,0)},s2=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return typeof e=="function"?e.apply(void 0,i):e},JM=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},z2e=[],j2e=function(e,t){var i=t?.document||document,r=t?.trapStack||z2e,o=cN({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:L2e,isKeyBackward:F2e},t),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a,c=function(we,ke,je){return we&&we[ke]!==void 0?we[ke]:o[je||ke]},A=function(we,ke){var je=typeof ke?.composedPath=="function"?ke.composedPath():void 0;return s.containerGroups.findIndex(function(Ie){var Qe=Ie.container,tt=Ie.tabbableNodes;return Qe.contains(we)||je?.includes(Qe)||tt.find(function(ht){return ht===we})})},m=function(we){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=ke.hasFallback,Ie=je===void 0?!1:je,Qe=ke.params,tt=Qe===void 0?[]:Qe,ht=o[we];if(typeof ht=="function"&&(ht=ht.apply(void 0,T2e(tt))),ht===!0&&(ht=void 0),!ht){if(ht===void 0||ht===!1)return ht;throw new Error("`".concat(we,"` was specified but was not a node, or did not return a node"))}var ce=ht;if(typeof ht=="string"){try{ce=i.querySelector(ht)}catch(Le){throw new Error("`".concat(we,'` appears to be an invalid selector; error="').concat(Le.message,'"'))}if(!ce&&!Ie)throw new Error("`".concat(we,"` as selector refers to no known node"))}return ce},v=function(){var we=m("initialFocus",{hasFallback:!0});if(we===!1)return!1;if(we===void 0||we&&!X5(we,o.tabbableOptions))if(A(i.activeElement)>=0)we=i.activeElement;else{var ke=s.tabbableGroups[0],je=ke&&ke.firstTabbableNode;we=je||m("fallbackFocus")}else we===null&&(we=m("fallbackFocus"));if(!we)throw new Error("Your focus-trap needs to have at least one focusable element");return we},x=function(){if(s.containerGroups=s.containers.map(function(we){var ke=Kte(we,o.tabbableOptions),je=Lte(we,o.tabbableOptions),Ie=ke.length>0?ke[0]:void 0,Qe=ke.length>0?ke[ke.length-1]:void 0,tt=je.find(function(Le){return Yv(Le)}),ht=je.slice().reverse().find(function(Le){return Yv(Le)}),ce=!!ke.find(function(Le){return _y(Le)>0});return{container:we,tabbableNodes:ke,focusableNodes:je,posTabIndexesFound:ce,firstTabbableNode:Ie,lastTabbableNode:Qe,firstDomTabbableNode:tt,lastDomTabbableNode:ht,nextTabbableNode:function(We){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,dt=ke.indexOf(We);return dt<0?Me?je.slice(je.indexOf(We)+1).find(function(it){return Yv(it)}):je.slice(0,je.indexOf(We)).reverse().find(function(it){return Yv(it)}):ke[dt+(Me?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(we){return we.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!m("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(we){return we.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},_=function(we){var ke=we.activeElement;if(ke)return ke.shadowRoot&&ke.shadowRoot.activeElement!==null?_(ke.shadowRoot):ke},O=function(we){if(we!==!1&&we!==_(document)){if(!we||!we.focus){O(v());return}we.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=we,U2e(we)&&we.select()}},P=function(we){var ke=m("setReturnFocus",{params:[we]});return ke||(ke===!1?!1:we)},F=function(we){var ke=we.target,je=we.event,Ie=we.isBackward,Qe=Ie===void 0?!1:Ie;ke=ke||JM(je),x();var tt=null;if(s.tabbableGroups.length>0){var ht=A(ke,je),ce=ht>=0?s.containerGroups[ht]:void 0;if(ht<0)Qe?tt=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:tt=s.tabbableGroups[0].firstTabbableNode;else if(Qe){var Le=s.tabbableGroups.findIndex(function(Ut){var Pe=Ut.firstTabbableNode;return ke===Pe});if(Le<0&&(ce.container===ke||X5(ke,o.tabbableOptions)&&!Yv(ke,o.tabbableOptions)&&!ce.nextTabbableNode(ke,!1))&&(Le=ht),Le>=0){var We=Le===0?s.tabbableGroups.length-1:Le-1,Me=s.tabbableGroups[We];tt=_y(ke)>=0?Me.lastTabbableNode:Me.lastDomTabbableNode}else a3(je)||(tt=ce.nextTabbableNode(ke,!1))}else{var dt=s.tabbableGroups.findIndex(function(Ut){var Pe=Ut.lastTabbableNode;return ke===Pe});if(dt<0&&(ce.container===ke||X5(ke,o.tabbableOptions)&&!Yv(ke,o.tabbableOptions)&&!ce.nextTabbableNode(ke))&&(dt=ht),dt>=0){var it=dt===s.tabbableGroups.length-1?0:dt+1,vt=s.tabbableGroups[it];tt=_y(ke)>=0?vt.firstTabbableNode:vt.firstDomTabbableNode}else a3(je)||(tt=ce.nextTabbableNode(ke))}}else tt=m("fallbackFocus");return tt},j=function(we){var ke=JM(we);if(!(A(ke,we)>=0)){if(s2(o.clickOutsideDeactivates,we)){a.deactivate({returnFocus:o.returnFocusOnDeactivate});return}s2(o.allowOutsideClick,we)||we.preventDefault()}},Q=function(we){var ke=JM(we),je=A(ke,we)>=0;if(je||ke instanceof Document)je&&(s.mostRecentlyFocusedNode=ke);else{we.stopImmediatePropagation();var Ie,Qe=!0;if(s.mostRecentlyFocusedNode)if(_y(s.mostRecentlyFocusedNode)>0){var tt=A(s.mostRecentlyFocusedNode),ht=s.containerGroups[tt].tabbableNodes;if(ht.length>0){var ce=ht.findIndex(function(Le){return Le===s.mostRecentlyFocusedNode});ce>=0&&(o.isKeyForward(s.recentNavEvent)?ce+1<ht.length&&(Ie=ht[ce+1],Qe=!1):ce-1>=0&&(Ie=ht[ce-1],Qe=!1))}}else s.containerGroups.some(function(Le){return Le.tabbableNodes.some(function(We){return _y(We)>0})})||(Qe=!1);else Qe=!1;Qe&&(Ie=F({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),O(Ie||s.mostRecentlyFocusedNode||v())}s.recentNavEvent=void 0},V=function(we){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;s.recentNavEvent=we;var je=F({event:we,isBackward:ke});je&&(a3(we)&&we.preventDefault(),O(je))},H=function(we){(o.isKeyForward(we)||o.isKeyBackward(we))&&V(we,o.isKeyBackward(we))},G=function(we){K2e(we)&&s2(o.escapeDeactivates,we)!==!1&&(we.preventDefault(),a.deactivate())},Y=function(we){var ke=JM(we);A(ke,we)>=0||s2(o.clickOutsideDeactivates,we)||s2(o.allowOutsideClick,we)||(we.preventDefault(),we.stopImmediatePropagation())},z=function(){if(s.active)return AN.activateTrap(r,a),s.delayInitialFocusTimer=o.delayInitialFocus?hN(function(){O(v())}):O(v()),i.addEventListener("focusin",Q,!0),i.addEventListener("mousedown",j,{capture:!0,passive:!1}),i.addEventListener("touchstart",j,{capture:!0,passive:!1}),i.addEventListener("click",Y,{capture:!0,passive:!1}),i.addEventListener("keydown",H,{capture:!0,passive:!1}),i.addEventListener("keydown",G),a},se=function(){if(s.active)return i.removeEventListener("focusin",Q,!0),i.removeEventListener("mousedown",j,!0),i.removeEventListener("touchstart",j,!0),i.removeEventListener("click",Y,!0),i.removeEventListener("keydown",H,!0),i.removeEventListener("keydown",G),a},le=function(we){var ke=we.some(function(je){var Ie=Array.from(je.removedNodes);return Ie.some(function(Qe){return Qe===s.mostRecentlyFocusedNode})});ke&&O(v())},me=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(le):void 0,fe=function(){me&&(me.disconnect(),s.active&&!s.paused&&s.containers.map(function(we){me.observe(we,{subtree:!0,childList:!0})}))};return a={get active(){return s.active},get paused(){return s.paused},activate:function(we){if(s.active)return this;var ke=c(we,"onActivate"),je=c(we,"onPostActivate"),Ie=c(we,"checkCanFocusTrap");Ie||x(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=_(i),ke?.();var Qe=function(){Ie&&x(),z(),fe(),je?.()};return Ie?(Ie(s.containers.concat()).then(Qe,Qe),this):(Qe(),this)},deactivate:function(we){if(!s.active)return this;var ke=cN({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},we);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,se(),s.active=!1,s.paused=!1,fe(),AN.deactivateTrap(r,a);var je=c(ke,"onDeactivate"),Ie=c(ke,"onPostDeactivate"),Qe=c(ke,"checkCanReturnFocus"),tt=c(ke,"returnFocus","returnFocusOnDeactivate");je?.();var ht=function(){hN(function(){tt&&O(P(s.nodeFocusedBeforeActivation)),Ie?.()})};return tt&&Qe?(Qe(P(s.nodeFocusedBeforeActivation)).then(ht,ht),this):(ht(),this)},pause:function(we){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,we)):this},unpause:function(we){return s.active?(s.manuallyPaused=!1,r[r.length-1]!==this?this:this._setPausedState(!1,we)):this},updateContainerElements:function(we){var ke=[].concat(we).filter(Boolean);return s.containers=ke.map(function(je){return typeof je=="string"?i.querySelector(je):je}),s.active&&x(),fe(),this}},Object.defineProperties(a,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(we,ke){if(s.paused===we)return this;if(s.paused=we,we){var je=c(ke,"onPause"),Ie=c(ke,"onPostPause");je?.(),se(),fe(),Ie?.()}else{var Qe=c(ke,"onUnpause"),tt=c(ke,"onPostUnpause");Qe?.(),x(),z(),fe(),tt?.()}return this}}}),a.updateContainerElements(e),a};const N2e=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:j2e},Symbol.toStringTag,{value:"Module"})),G2e=ID(N2e),W2e=ID(E2e);var xB,dN;function Q2e(){if(dN)return xB;dN=1;function n(Y){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},n(Y)}function e(Y,z){if(!(Y instanceof z))throw new TypeError("Cannot call a class as a function")}function t(Y,z){for(var se=0;se<z.length;se++){var le=z[se];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(Y,x(le.key),le)}}function i(Y,z,se){return z&&t(Y.prototype,z),Object.defineProperty(Y,"prototype",{writable:!1}),Y}function r(Y,z,se){return z=c(z),o(Y,a()?Reflect.construct(z,se||[],c(Y).constructor):z.apply(Y,se))}function o(Y,z){if(z&&(n(z)=="object"||typeof z=="function"))return z;if(z!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(Y)}function s(Y){if(Y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Y}function a(){try{var Y=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a=function(){return!!Y})()}function c(Y){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(z){return z.__proto__||Object.getPrototypeOf(z)},c(Y)}function A(Y,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");Y.prototype=Object.create(z&&z.prototype,{constructor:{value:Y,writable:!0,configurable:!0}}),Object.defineProperty(Y,"prototype",{writable:!1}),z&&m(Y,z)}function m(Y,z){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(se,le){return se.__proto__=le,se},m(Y,z)}function v(Y,z,se){return(z=x(z))in Y?Object.defineProperty(Y,z,{value:se,enumerable:!0,configurable:!0,writable:!0}):Y[z]=se,Y}function x(Y){var z=_(Y,"string");return n(z)=="symbol"?z:z+""}function _(Y,z){if(n(Y)!="object"||!Y)return Y;var se=Y[Symbol.toPrimitive];if(se!==void 0){var le=se.call(Y,z);if(n(le)!="object")return le;throw new TypeError("@@toPrimitive must return a primitive value.")}return(z==="string"?String:Number)(Y)}var O=La(),P=s1(),F=G2e,j=F.createFocusTrap,Q=W2e,V=Q.isFocusable,H=(function(Y){function z(se){var le;e(this,z),le=r(this,z,[se]),v(le,"getNodeForOption",function(_e){var we,ke=(we=this.internalOptions[_e])!==null&&we!==void 0?we:this.originalOptions[_e];if(typeof ke=="function"){for(var je=arguments.length,Ie=new Array(je>1?je-1:0),Qe=1;Qe<je;Qe++)Ie[Qe-1]=arguments[Qe];ke=ke.apply(void 0,Ie)}if(ke===!0&&(ke=void 0),!ke){if(ke===void 0||ke===!1)return ke;throw new Error("`".concat(_e,"` was specified but was not a node, or did not return a node"))}var tt=ke;if(typeof ke=="string"){var ht;if(tt=(ht=this.getDocument())===null||ht===void 0?void 0:ht.querySelector(ke),!tt)throw new Error("`".concat(_e,"` as selector refers to no known node"))}return tt}),le.handleDeactivate=le.handleDeactivate.bind(le),le.handlePostDeactivate=le.handlePostDeactivate.bind(le),le.handleClickOutsideDeactivates=le.handleClickOutsideDeactivates.bind(le),le.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:le.handleDeactivate,onPostDeactivate:le.handlePostDeactivate,clickOutsideDeactivates:le.handleClickOutsideDeactivates},le.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var me=se.focusTrapOptions;for(var fe in me)if(Object.prototype.hasOwnProperty.call(me,fe)){if(fe==="returnFocusOnDeactivate"||fe==="onDeactivate"||fe==="onPostDeactivate"||fe==="checkCanReturnFocus"||fe==="clickOutsideDeactivates"){le.originalOptions[fe]=me[fe];continue}le.internalOptions[fe]=me[fe]}return le.outsideClick=null,le.focusTrapElements=se.containerElements||[],le.updatePreviousElement(),le}return A(z,Y),i(z,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document<"u"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var le=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return le||(le===!1?!1:this.previouslyFocusedElement)}},{key:"updatePreviousElement",value:function(){var le=this.getDocument();le&&(this.previouslyFocusedElement=le.activeElement)}},{key:"deactivateTrap",value:function(){!this.focusTrap||!this.focusTrap.active||this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(le){var me=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,le):this.originalOptions.clickOutsideDeactivates;return me&&(this.outsideClick={target:le.target,allowDeactivation:me}),me}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var le=this,me=function(){var _e=le.getReturnFocusNode(),we=!!(le.originalOptions.returnFocusOnDeactivate&&_e!==null&&_e!==void 0&&_e.focus&&(!le.outsideClick||le.outsideClick.allowDeactivation&&!V(le.outsideClick.target,le.internalOptions.tabbableOptions))),ke=le.internalOptions.preventScroll,je=ke===void 0?!1:ke;we&&_e.focus({preventScroll:je}),le.originalOptions.onPostDeactivate&&le.originalOptions.onPostDeactivate.call(null),le.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(me,me):me()}},{key:"setupFocusTrap",value:function(){if(this.focusTrap)this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause());else{var le=this.focusTrapElements.some(Boolean);le&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(le){if(this.focusTrap){le.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var me=!le.active&&this.props.active,fe=le.active&&!this.props.active,_e=!le.paused&&this.props.paused,we=le.paused&&!this.props.paused;if(me&&(this.updatePreviousElement(),this.focusTrap.activate()),fe){this.deactivateTrap();return}_e&&this.focusTrap.pause(),we&&this.focusTrap.unpause()}else le.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var le=this,me=this.props.children?O.Children.only(this.props.children):void 0;if(me){if(me.type&&me.type===O.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");var fe=function(ke){var je=le.props.containerElements;me&&(typeof me.ref=="function"?me.ref(ke):me.ref&&(me.ref.current=ke)),le.focusTrapElements=je||[ke]},_e=O.cloneElement(me,{ref:fe});return _e}return null}}])})(O.Component),G=typeof Element>"u"?Function:Element;return H.propTypes={active:P.bool,paused:P.bool,focusTrapOptions:P.shape({document:P.object,onActivate:P.func,onPostActivate:P.func,checkCanFocusTrap:P.func,onPause:P.func,onPostPause:P.func,onUnpause:P.func,onPostUnpause:P.func,onDeactivate:P.func,onPostDeactivate:P.func,checkCanReturnFocus:P.func,initialFocus:P.oneOfType([P.instanceOf(G),P.string,P.bool,P.func]),fallbackFocus:P.oneOfType([P.instanceOf(G),P.string,P.func]),escapeDeactivates:P.oneOfType([P.bool,P.func]),clickOutsideDeactivates:P.oneOfType([P.bool,P.func]),returnFocusOnDeactivate:P.bool,setReturnFocus:P.oneOfType([P.instanceOf(G),P.string,P.bool,P.func]),allowOutsideClick:P.oneOfType([P.bool,P.func]),preventScroll:P.bool,tabbableOptions:P.shape({displayCheck:P.oneOf(["full","legacy-full","non-zero-area","none"]),getShadowRoot:P.oneOfType([P.bool,P.func])}),trapStack:P.array,isKeyForward:P.func,isKeyBackward:P.func}),containerElements:P.arrayOf(P.instanceOf(G)),children:P.oneOfType([P.element,P.instanceOf(G)])},H.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:j},xB=H,xB}var MB={exports:{}},fN;function q2e(){return fN||(fN=1,(function(n){(function(e){var t=!1,i,r;function o(){if(typeof i<"u")return i;var v=document.documentElement,x=document.createElement("div");return x.setAttribute("style","width:99px;height:99px;position:absolute;top:-9999px;overflow:scroll;"),v.appendChild(x),i=x.offsetWidth-x.clientWidth,v.removeChild(x),i}function s(){return document.documentElement.scrollHeight>window.innerHeight}function a(v){if(!(typeof document>"u"||t)){var x=document.documentElement;r=window.pageYOffset,s()?x.style.width="calc(100% - "+o()+"px)":x.style.width="100%",x.style.position="fixed",x.style.top=-r+"px",x.style.overflow="hidden",t=!0}}function c(){if(!(typeof document>"u"||!t)){var v=document.documentElement;v.style.width="",v.style.position="",v.style.top="",v.style.overflow="",window.scroll(0,r),t=!1}}function A(){if(t){c();return}a()}var m={on:a,off:c,toggle:A};n.exports=m})()})(MB)),MB.exports}var wB,pN;function Y2e(){if(pN)return wB;pN=1;function n(V){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},n(V)}function e(V,H){if(!(V instanceof H))throw new TypeError("Cannot call a class as a function")}function t(V,H){for(var G=0;G<H.length;G++){var Y=H[G];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(V,Y.key,Y)}}function i(V,H,G){return H&&t(V.prototype,H),Object.defineProperty(V,"prototype",{writable:!1}),V}function r(V,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");V.prototype=Object.create(H&&H.prototype,{constructor:{value:V,writable:!0,configurable:!0}}),Object.defineProperty(V,"prototype",{writable:!1}),H&&o(V,H)}function o(V,H){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Y,z){return Y.__proto__=z,Y},o(V,H)}function s(V){var H=A();return function(){var Y=m(V),z;if(H){var se=m(this).constructor;z=Reflect.construct(Y,arguments,se)}else z=Y.apply(this,arguments);return a(this,z)}}function a(V,H){if(H&&(n(H)==="object"||typeof H=="function"))return H;if(H!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c(V)}function c(V){if(V===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V}function A(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function m(V){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},m(V)}function v(V,H,G){return H in V?Object.defineProperty(V,H,{value:G,enumerable:!0,configurable:!0,writable:!0}):V[H]=G,V}var x=La(),_=kD(),O=Q2e(),P=q2e(),F=(function(V){r(G,V);var H=s(G);function G(Y){var z;if(e(this,G),z=H.call(this,Y),v(c(z),"getApplicationNode",function(){return z.props.getApplicationNode?z.props.getApplicationNode():z.props.applicationNode}),v(c(z),"checkUnderlayClick",function(se){z.dialogNode&&z.dialogNode.contains(se.target)||se.pageX>se.target.ownerDocument.documentElement.offsetWidth||se.pageY>se.target.ownerDocument.documentElement.offsetHeight||z.exit(se)}),v(c(z),"checkDocumentKeyDown",function(se){z.props.escapeExits&&(se.key==="Escape"||se.key==="Esc"||se.keyCode===27)&&z.exit(se)}),v(c(z),"exit",function(se){z.props.onExit&&z.props.onExit(se)}),!Y.titleText&&!Y.titleId)throw new Error("react-aria-modal instances should have a `titleText` or `titleId`");return z}return i(G,[{key:"componentDidMount",value:function(){this.props.onEnter&&this.props.onEnter();var z=this.getApplicationNode();setTimeout(function(){z&&z.setAttribute("aria-hidden","true")},0),this.props.escapeExits&&this.addKeyDownListener(),this.props.scrollDisabled&&P.on()}},{key:"componentDidUpdate",value:function(z){z.scrollDisabled&&!this.props.scrollDisabled?P.off():!z.scrollDisabled&&this.props.scrollDisabled&&P.on(),this.props.escapeExits&&!z.escapeExits?this.addKeyDownListener():!this.props.escapeExits&&z.escapeExits&&this.removeKeyDownListener()}},{key:"componentWillUnmount",value:function(){this.props.scrollDisabled&&P.off();var z=this.getApplicationNode();z&&z.setAttribute("aria-hidden","false"),this.removeKeyDownListener()}},{key:"addKeyDownListener",value:function(){var z=this;setTimeout(function(){document.addEventListener("keydown",z.checkDocumentKeyDown)})}},{key:"removeKeyDownListener",value:function(){var z=this;setTimeout(function(){document.removeEventListener("keydown",z.checkDocumentKeyDown)})}},{key:"render",value:function(){var z=this.props,se={};if(z.includeDefaultStyles&&(se={position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1050,overflowX:"hidden",overflowY:"auto",WebkitOverflowScrolling:"touch",textAlign:"center"},z.underlayColor&&(se.background=z.underlayColor),z.underlayClickExits&&(se.cursor="pointer")),z.underlayStyle)for(var le in z.underlayStyle)z.underlayStyle.hasOwnProperty(le)&&(se[le]=z.underlayStyle[le]);var me={className:z.underlayClass,style:se};z.underlayClickExits&&(me.onMouseDown=this.checkUnderlayClick);for(var fe in this.props.underlayProps)me[fe]=this.props.underlayProps[fe];var _e={};z.includeDefaultStyles&&(_e={display:"inline-block",height:"100%",verticalAlign:"middle"});var we={key:"a",style:_e},ke={};if(z.includeDefaultStyles&&(ke={display:"inline-block",textAlign:"left",top:0,maxWidth:"100%",cursor:"auto",outline:z.focusDialog?0:null},z.verticallyCenter&&(ke.verticalAlign="middle",ke.top=0)),z.dialogStyle)for(var je in z.dialogStyle)z.dialogStyle.hasOwnProperty(je)&&(ke[je]=z.dialogStyle[je]);var Ie={key:"b",ref:(function(ce){this.dialogNode=ce}).bind(this),role:z.alert?"alertdialog":"dialog",id:z.dialogId,className:z.dialogClass,style:ke};z.titleId?Ie["aria-labelledby"]=z.titleId:z.titleText&&(Ie["aria-label"]=z.titleText),z.focusDialog&&(Ie.tabIndex="-1");for(var Qe in z)/^(data-|aria-)/.test(Qe)&&(Ie[Qe]=z[Qe]);var tt=[x.createElement("div",Ie,z.children)];z.verticallyCenter&&tt.unshift(x.createElement("div",we));var ht=z.focusTrapOptions||{};return(z.focusDialog||z.initialFocus)&&(ht.initialFocus=z.focusDialog?"#".concat(this.props.dialogId):z.initialFocus),ht.escapeDeactivates=z.escapeExits,x.createElement(O,{focusTrapOptions:ht,paused:z.focusTrapPaused},x.createElement("div",me,tt))}}]),G})(x.Component);v(F,"defaultProps",{underlayProps:{},dialogId:"react-aria-modal-dialog",underlayClickExits:!0,escapeExits:!0,underlayColor:"rgba(0,0,0,0.5)",includeDefaultStyles:!0,focusTrapPaused:!1,scrollDisabled:!0});function j(V,H){if(!window.document)return function(){return null};H=H||{};var G=(function(Y){r(se,Y);var z=s(se);function se(){var le;e(this,se);for(var me=arguments.length,fe=new Array(me),_e=0;_e<me;_e++)fe[_e]=arguments[_e];return le=z.call.apply(z,[this].concat(fe)),v(c(le),"container",null),le}return i(se,[{key:"componentDidMount",value:function(){H.renderTo?this.container=typeof H.renderTo=="string"?document.querySelector(H.renderTo):H.renderTo:(this.container=document.createElement("div"),document.body.appendChild(this.container)),this.forceUpdate()}},{key:"componentWillUnmount",value:function(){H.renderTo||this.container.parentNode.removeChild(this.container)}},{key:"render",value:function(){return this.container===null||!this.props.mounted?null:_.createPortal(x.createElement(V,this.props,this.props.children),this.container)}}]),se})(x.Component);return v(G,"defaultProps",{mounted:!0}),G}var Q=j(F);return Q.renderTo=function(V){return j(F,{renderTo:V})},wB=Q,wB}var $2e=Y2e();const V2e=Wl($2e);function Iu(){var n="/home/runner/work/maputnik/maputnik/src/components/modals/Modal.tsx",e="b56a3b702e6eec99855202d1cfe05d2ba4d6a2ce",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/modals/Modal.tsx",statementMap:{0:{start:{line:8,column:24},end:{line:10,column:3}},1:{start:{line:12,column:12},end:{line:19,column:3}},2:{start:{line:13,column:4},end:{line:15,column:5}},3:{start:{line:14,column:6},end:{line:14,column:36}},4:{start:{line:16,column:4},end:{line:18,column:10}},5:{start:{line:17,column:6},end:{line:17,column:32}},6:{start:{line:21,column:14},end:{line:21,column:26}},7:{start:{line:22,column:4},end:{line:60,column:5}},8:{start:{line:23,column:6},end:{line:57,column:8}},9:{start:{line:59,column:6},end:{line:59,column:19}},10:{start:{line:63,column:14},end:{line:63,column:46}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:12},end:{line:12,column:13}},loc:{start:{line:12,column:18},end:{line:19,column:3}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:16,column:15},end:{line:16,column:16}},loc:{start:{line:16,column:21},end:{line:18,column:5}},line:16},2:{name:"(anonymous_2)",decl:{start:{line:20,column:2},end:{line:20,column:3}},loc:{start:{line:20,column:11},end:{line:61,column:3}},line:20}},branchMap:{0:{loc:{start:{line:13,column:4},end:{line:15,column:5}},type:"if",locations:[{start:{line:13,column:4},end:{line:15,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:13},1:{loc:{start:{line:22,column:4},end:{line:60,column:5}},type:"if",locations:[{start:{line:22,column:4},end:{line:60,column:5}},{start:{line:58,column:11},end:{line:60,column:5}}],line:22}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},f:{0:0,1:0,2:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/modals/Modal.tsx"],names:[],mappings:"AA8CU,SACE,KADF;AA9CV,OAAO,WAAuC;AAC9C,SAAQ,eAAc;AACtB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,SAA+B,uBAAuB;AAYtD,MAAM,sBAAsB,MAAM,UAA8B;AAAA,EAC9D,OAAO,eAAe;AAAA,IACpB,oBAAoB;AAAA,EACtB;AAAA;AAAA,EAGA,UAAU,MAAM;AACd,QAAI,SAAS,eAAe;AAC1B,MAAC,SAAS,cAA8B,KAAK;AAAA,IAC/C;AAEA,eAAW,MAAM;AACf,WAAK,MAAM,aAAa;AAAA,IAC1B,GAAG,CAAC;AAAA,EACN;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,QAAG,KAAK,MAAM,QAAQ;AACpB,aAAO;AAAA,QAAC;AAAA;AAAA,UACN,WAAW,KAAK,MAAM;AAAA,UACtB,oBAAoB,KAAK,MAAM;AAAA,UAC/B,eAAa,KAAK,MAAM,aAAa;AAAA,UACrC,kBAAkB;AAAA,UAClB,QAAQ,KAAK;AAAA,UACb,aAAY;AAAA,UAEZ;AAAA,YAAC;AAAA;AAAA,cAAI,WAAW,WAAW,kBAAkB,KAAK,MAAM,SAAS;AAAA,cAC/D,eAAa,KAAK,MAAM,aAAa;AAAA,cAErC;AAAA,qCAAC,YAAO,WAAU,yBAChB;AAAA,sCAAC,QAAG,WAAU,+BAA+B,eAAK,MAAM,OAAM;AAAA,kBAC9D,oBAAC,UAAK,WAAU,kBAAiB;AAAA,kBACjC;AAAA,oBAAC;AAAA;AAAA,sBAAO,WAAU;AAAA,sBAChB,OAAO,EAAE,aAAa;AAAA,sBACtB,SAAS,KAAK;AAAA,sBACd,eAAa,KAAK,MAAM,aAAa,IAAE;AAAA,sBAEvC,8BAAC,WAAQ;AAAA;AAAA,kBACX;AAAA,mBACF;AAAA,gBACA,oBAAC,SAAI,WAAU,2BACb,8BAAC,SAAI,WAAU,0BAA0B,eAAK,MAAM,UAAS,GAC/D;AAAA;AAAA;AAAA,UACF;AAAA;AAAA,MACF;AAAA,IACF,OACK;AACH,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,MAAM,QAAQ,gBAAgB,EAAE,aAAa;AAC7C,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"b56a3b702e6eec99855202d1cfe05d2ba4d6a2ce"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Iu=function(){return s},s}Iu();class H2e extends En.Component{static defaultProps=(Iu().s[0]++,{underlayClickExits:!0});onClose=(Iu().s[1]++,()=>{Iu().f[0]++,Iu().s[2]++,document.activeElement?(Iu().b[0][0]++,Iu().s[3]++,document.activeElement.blur()):Iu().b[0][1]++,Iu().s[4]++,setTimeout(()=>{Iu().f[1]++,Iu().s[5]++,this.props.onOpenToggle()},0)});render(){Iu().f[2]++;const e=(Iu().s[6]++,this.props.t);return Iu().s[7]++,this.props.isOpen?(Iu().b[1][0]++,Iu().s[8]++,ie.jsx(V2e,{titleText:this.props.title,underlayClickExits:this.props.underlayClickExits,"data-wd-key":this.props["data-wd-key"],verticallyCenter:!0,onExit:this.onClose,dialogClass:"maputnik-modal-container",children:ie.jsxs("div",{className:Yg("maputnik-modal",this.props.className),"data-wd-key":this.props["data-wd-key"],children:[ie.jsxs("header",{className:"maputnik-modal-header",children:[ie.jsx("h1",{className:"maputnik-modal-header-title",children:this.props.title}),ie.jsx("span",{className:"maputnik-space"}),ie.jsx("button",{className:"maputnik-modal-header-toggle",title:e("Close modal"),onClick:this.onClose,"data-wd-key":this.props["data-wd-key"]+".close-modal",children:ie.jsx(Lfe,{})})]}),ie.jsx("div",{className:"maputnik-modal-scroller",children:ie.jsx("div",{className:"maputnik-modal-content",children:this.props.children})})]})})):(Iu().b[1][1]++,Iu().s[9]++,!1)}}const a1=(Iu().s[10]++,Jo()(H2e));function gs(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldDocLabel.tsx",e="227136badbf4464e3a73e0852e3bc3d4b9112a08",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldDocLabel.tsx",statementMap:{0:{start:{line:4,column:22},end:{line:33,column:1}},1:{start:{line:5,column:26},end:{line:5,column:47}},2:{start:{line:6,column:22},end:{line:11,column:3}},3:{start:{line:7,column:4},end:{line:7,column:19}},4:{start:{line:8,column:4},end:{line:10,column:5}},5:{start:{line:9,column:6},end:{line:9,column:31}},6:{start:{line:12,column:31},end:{line:12,column:36}},7:{start:{line:13,column:18},end:{line:13,column:33}},8:{start:{line:14,column:2},end:{line:31,column:3}},9:{start:{line:15,column:4},end:{line:28,column:12}},10:{start:{line:23,column:25},end:{line:23,column:43}},11:{start:{line:29,column:9},end:{line:31,column:3}},12:{start:{line:30,column:4},end:{line:30,column:172}},13:{start:{line:32,column:2},end:{line:32,column:40}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:22},end:{line:4,column:23}},loc:{start:{line:4,column:33},end:{line:33,column:1}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:6,column:22},end:{line:6,column:23}},loc:{start:{line:6,column:33},end:{line:11,column:3}},line:6},2:{name:"(anonymous_2)",decl:{start:{line:23,column:19},end:{line:23,column:20}},loc:{start:{line:23,column:25},end:{line:23,column:43}},line:23}},branchMap:{0:{loc:{start:{line:8,column:4},end:{line:10,column:5}},type:"if",locations:[{start:{line:8,column:4},end:{line:10,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:8},1:{loc:{start:{line:13,column:18},end:{line:13,column:33}},type:"binary-expr",locations:[{start:{line:13,column:18},end:{line:13,column:27}},{start:{line:13,column:31},end:{line:13,column:33}}],line:13},2:{loc:{start:{line:14,column:2},end:{line:31,column:3}},type:"if",locations:[{start:{line:14,column:2},end:{line:31,column:3}},{start:{line:29,column:9},end:{line:31,column:3}}],line:14},3:{loc:{start:{line:21,column:24},end:{line:21,column:93}},type:"cond-expr",locations:[{start:{line:21,column:31},end:{line:21,column:61}},{start:{line:21,column:64},end:{line:21,column:93}}],line:21},4:{loc:{start:{line:22,column:65},end:{line:22,column:89}},type:"cond-expr",locations:[{start:{line:22,column:72},end:{line:22,column:78}},{start:{line:22,column:81},end:{line:22,column:89}}],line:22},5:{loc:{start:{line:25,column:20},end:{line:25,column:107}},type:"cond-expr",locations:[{start:{line:25,column:43},end:{line:25,column:66}},{start:{line:25,column:85},end:{line:25,column:107}}],line:25},6:{loc:{start:{line:29,column:9},end:{line:31,column:3}},type:"if",locations:[{start:{line:29,column:9},end:{line:31,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:29}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},f:{0:0,1:0,2:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldDocLabel.tsx"],names:[],mappings:"AA4BQ,SASY,KATZ;AA5BR,OAAO,WAAyB;AAChC,SAAQ,eAAe,sBAAqB;AAW5C,MAAM,gBAA8C,CAAC,UAAU;AAC7D,QAAM,CAAC,MAAM,OAAO,IAAI,MAAM,SAAS,KAAK;AAE5C,QAAM,cAAc,CAAC,UAAmB;AACtC,YAAQ,KAAK;AACb,QAAI,MAAM,aAAa;AACrB,YAAM,YAAY,KAAK;AAAA,IACzB;AAAA,EACF;AAEA,QAAM,EAAE,OAAO,UAAU,IAAI;AAC7B,QAAM,EAAE,IAAI,IAAI,aAAa,CAAC;AAE9B,MAAI,KAAK;AACP,WACE,oBAAC,WAAM,WAAU,wBACf,+BAAC,SAAI,WAAU,uBACZ;AAAA;AAAA,MACA;AAAA,MACD;AAAA,QAAC;AAAA;AAAA,UACC,cAAY,OAAO,iCAAiC;AAAA,UACpD,WAAW,4CAA4C,OAAO,SAAS,QAAQ;AAAA,UAC/E,SAAS,MAAM,YAAY,CAAC,IAAI;AAAA,UAChC,eAAa,sBAAsB;AAAA,UAElC,iBAAO,oBAAC,kBAAe,IAAK,oBAAC,iBAAc;AAAA;AAAA,MAC9C;AAAA,OACF,GACF;AAAA,EAEJ,WAAW,OAAO;AAChB,WACE,oBAAC,WAAM,WAAU,wBACf,8BAAC,SAAI,WAAU,uBAAuB,iBAAM,GAC9C;AAAA,EAEJ;AACA,SAAO,oBAAC,SAAI;AACd;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"227136badbf4464e3a73e0852e3bc3d4b9112a08"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return gs=function(){return s},s}gs();gs().s[0]++;const DU=n=>{gs().f[0]++;const[e,t]=(gs().s[1]++,En.useState(!1));gs().s[2]++;const i=a=>{gs().f[1]++,gs().s[3]++,t(a),gs().s[4]++,n.onToggleDoc?(gs().b[0][0]++,gs().s[5]++,n.onToggleDoc(a)):gs().b[0][1]++},{label:r,fieldSpec:o}=(gs().s[6]++,n),{doc:s}=(gs().s[7]++,gs().b[1][0]++,o||(gs().b[1][1]++,{}));return gs().s[8]++,s?(gs().b[2][0]++,gs().s[9]++,ie.jsx("label",{className:"maputnik-doc-wrapper",children:ie.jsxs("div",{className:"maputnik-doc-target",children:[r," ",ie.jsx("button",{"aria-label":e?(gs().b[3][0]++,"close property documentation"):(gs().b[3][1]++,"open property documentation"),className:`maputnik-doc-button maputnik-doc-button--${e?(gs().b[4][0]++,"open"):(gs().b[4][1]++,"closed")}`,onClick:()=>(gs().f[2]++,gs().s[10]++,i(!e)),"data-wd-key":"field-doc-button-"+r,children:e?(gs().b[5][0]++,ie.jsx(_fe,{})):(gs().b[5][1]++,ie.jsx(xfe,{}))})]})})):(gs().b[2][1]++,gs().s[11]++,r?(gs().b[6][0]++,gs().s[12]++,ie.jsx("label",{className:"maputnik-doc-wrapper",children:ie.jsx("div",{className:"maputnik-doc-target",children:r})})):(gs().b[6][1]++,gs().s[13]++,ie.jsx("div",{})))};function Z2e(n,e){const t={};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const X2e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,J2e=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,e3e={};function mN(n,e){return(e3e.jsx?J2e:X2e).test(n)}const t3e=/[ \t\n\f\r]/g;function n3e(n){return typeof n=="object"?n.type==="text"?gN(n.value):!1:gN(n)}function gN(n){return n.replace(t3e,"")===""}class sM{constructor(e,t,i){this.normal=t,this.property=e,i&&(this.space=i)}}sM.prototype.normal={};sM.prototype.property={};sM.prototype.space=void 0;function Fte(n,e){const t={},i={};for(const r of n)Object.assign(t,r.property),Object.assign(i,r.normal);return new sM(t,i,e)}function hR(n){return n.toLowerCase()}class ad{constructor(e,t){this.attribute=t,this.property=e}}ad.prototype.attribute="";ad.prototype.booleanish=!1;ad.prototype.boolean=!1;ad.prototype.commaOrSpaceSeparated=!1;ad.prototype.commaSeparated=!1;ad.prototype.defined=!1;ad.prototype.mustUseProperty=!1;ad.prototype.number=!1;ad.prototype.overloadedBoolean=!1;ad.prototype.property="";ad.prototype.spaceSeparated=!1;ad.prototype.space=void 0;let i3e=0;const mo=Gb(),ku=Gb(),dR=Gb(),Zn=Gb(),Ua=Gb(),L_=Gb(),qd=Gb();function Gb(){return 2**++i3e}const fR=Object.freeze(Object.defineProperty({__proto__:null,boolean:mo,booleanish:ku,commaOrSpaceSeparated:qd,commaSeparated:L_,number:Zn,overloadedBoolean:dR,spaceSeparated:Ua},Symbol.toStringTag,{value:"Module"})),SB=Object.keys(fR);class PU extends ad{constructor(e,t,i,r){let o=-1;if(super(e,t),yN(this,"space",r),typeof i=="number")for(;++o<SB.length;){const s=SB[o];yN(this,SB[o],(i&fR[s])===fR[s])}}}PU.prototype.defined=!0;function yN(n,e,t){t&&(n[e]=t)}function Dx(n){const e={},t={};for(const[i,r]of Object.entries(n.properties)){const o=new PU(i,n.transform(n.attributes||{},i),r,n.space);n.mustUseProperty&&n.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),e[i]=o,t[hR(i)]=i,t[hR(o.attribute)]=i}return new sM(e,t,n.space)}const zte=Dx({properties:{ariaActiveDescendant:null,ariaAtomic:ku,ariaAutoComplete:null,ariaBusy:ku,ariaChecked:ku,ariaColCount:Zn,ariaColIndex:Zn,ariaColSpan:Zn,ariaControls:Ua,ariaCurrent:null,ariaDescribedBy:Ua,ariaDetails:null,ariaDisabled:ku,ariaDropEffect:Ua,ariaErrorMessage:null,ariaExpanded:ku,ariaFlowTo:Ua,ariaGrabbed:ku,ariaHasPopup:null,ariaHidden:ku,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ua,ariaLevel:Zn,ariaLive:null,ariaModal:ku,ariaMultiLine:ku,ariaMultiSelectable:ku,ariaOrientation:null,ariaOwns:Ua,ariaPlaceholder:null,ariaPosInSet:Zn,ariaPressed:ku,ariaReadOnly:ku,ariaRelevant:null,ariaRequired:ku,ariaRoleDescription:Ua,ariaRowCount:Zn,ariaRowIndex:Zn,ariaRowSpan:Zn,ariaSelected:ku,ariaSetSize:Zn,ariaSort:null,ariaValueMax:Zn,ariaValueMin:Zn,ariaValueNow:Zn,ariaValueText:null,role:null},transform(n,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function jte(n,e){return e in n?n[e]:e}function Nte(n,e){return jte(n,e.toLowerCase())}const r3e=Dx({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:L_,acceptCharset:Ua,accessKey:Ua,action:null,allow:null,allowFullScreen:mo,allowPaymentRequest:mo,allowUserMedia:mo,alt:null,as:null,async:mo,autoCapitalize:null,autoComplete:Ua,autoFocus:mo,autoPlay:mo,blocking:Ua,capture:null,charSet:null,checked:mo,cite:null,className:Ua,cols:Zn,colSpan:null,content:null,contentEditable:ku,controls:mo,controlsList:Ua,coords:Zn|L_,crossOrigin:null,data:null,dateTime:null,decoding:null,default:mo,defer:mo,dir:null,dirName:null,disabled:mo,download:dR,draggable:ku,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:mo,formTarget:null,headers:Ua,height:Zn,hidden:dR,high:Zn,href:null,hrefLang:null,htmlFor:Ua,httpEquiv:Ua,id:null,imageSizes:null,imageSrcSet:null,inert:mo,inputMode:null,integrity:null,is:null,isMap:mo,itemId:null,itemProp:Ua,itemRef:Ua,itemScope:mo,itemType:Ua,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:mo,low:Zn,manifest:null,max:null,maxLength:Zn,media:null,method:null,min:null,minLength:Zn,multiple:mo,muted:mo,name:null,nonce:null,noModule:mo,noValidate:mo,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:mo,optimum:Zn,pattern:null,ping:Ua,placeholder:null,playsInline:mo,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:mo,referrerPolicy:null,rel:Ua,required:mo,reversed:mo,rows:Zn,rowSpan:Zn,sandbox:Ua,scope:null,scoped:mo,seamless:mo,selected:mo,shadowRootClonable:mo,shadowRootDelegatesFocus:mo,shadowRootMode:null,shape:null,size:Zn,sizes:null,slot:null,span:Zn,spellCheck:ku,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Zn,step:null,style:null,tabIndex:Zn,target:null,title:null,translate:null,type:null,typeMustMatch:mo,useMap:null,value:ku,width:Zn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ua,axis:null,background:null,bgColor:null,border:Zn,borderColor:null,bottomMargin:Zn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:mo,declare:mo,event:null,face:null,frame:null,frameBorder:null,hSpace:Zn,leftMargin:Zn,link:null,longDesc:null,lowSrc:null,marginHeight:Zn,marginWidth:Zn,noResize:mo,noHref:mo,noShade:mo,noWrap:mo,object:null,profile:null,prompt:null,rev:null,rightMargin:Zn,rules:null,scheme:null,scrolling:ku,standby:null,summary:null,text:null,topMargin:Zn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Zn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:mo,disableRemotePlayback:mo,prefix:null,property:null,results:Zn,security:null,unselectable:null},space:"html",transform:Nte}),o3e=Dx({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qd,accentHeight:Zn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Zn,amplitude:Zn,arabicForm:null,ascent:Zn,attributeName:null,attributeType:null,azimuth:Zn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Zn,by:null,calcMode:null,capHeight:Zn,className:Ua,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Zn,diffuseConstant:Zn,direction:null,display:null,dur:null,divisor:Zn,dominantBaseline:null,download:mo,dx:null,dy:null,edgeMode:null,editable:null,elevation:Zn,enableBackground:null,end:null,event:null,exponent:Zn,externalResourcesRequired:null,fill:null,fillOpacity:Zn,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:L_,g2:L_,glyphName:L_,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Zn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Zn,horizOriginX:Zn,horizOriginY:Zn,id:null,ideographic:Zn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Zn,k:Zn,k1:Zn,k2:Zn,k3:Zn,k4:Zn,kernelMatrix:qd,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Zn,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Zn,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Zn,overlineThickness:Zn,paintOrder:null,panose1:null,path:null,pathLength:Zn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ua,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Zn,pointsAtY:Zn,pointsAtZ:Zn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qd,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qd,rev:qd,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qd,requiredFeatures:qd,requiredFonts:qd,requiredFormats:qd,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Zn,specularExponent:Zn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Zn,strikethroughThickness:Zn,string:null,stroke:null,strokeDashArray:qd,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Zn,strokeOpacity:Zn,strokeWidth:null,style:null,surfaceScale:Zn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qd,tabIndex:Zn,tableValues:null,target:null,targetX:Zn,targetY:Zn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qd,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Zn,underlineThickness:Zn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Zn,values:null,vAlphabetic:Zn,vMathematical:Zn,vectorEffect:null,vHanging:Zn,vIdeographic:Zn,version:null,vertAdvY:Zn,vertOriginX:Zn,vertOriginY:Zn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Zn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:jte}),Gte=Dx({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,e){return"xlink:"+e.slice(5).toLowerCase()}}),Wte=Dx({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nte}),Qte=Dx({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,e){return"xml:"+e.slice(3).toLowerCase()}}),s3e={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},a3e=/[A-Z]/g,vN=/-[a-z]/g,l3e=/^data[-\w.:]+$/i;function u3e(n,e){const t=hR(e);let i=e,r=ad;if(t in n.normal)return n.property[n.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&l3e.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(vN,A3e);i="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!vN.test(o)){let s=o.replace(a3e,c3e);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}r=PU}return new r(i,e)}function c3e(n){return"-"+n.toLowerCase()}function A3e(n){return n.charAt(1).toUpperCase()}const h3e=Fte([zte,r3e,Gte,Wte,Qte],"html"),UU=Fte([zte,o3e,Gte,Wte,Qte],"svg");function d3e(n){return n.join(" ").trim()}var KC={},EB,bN;function f3e(){if(bN)return EB;bN=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,t=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
`,A="/",m="*",v="",x="comment",_="declaration";EB=function(P,F){if(typeof P!="string")throw new TypeError("First argument must be a string");if(!P)return[];F=F||{};var j=1,Q=1;function V(we){var ke=we.match(e);ke&&(j+=ke.length);var je=we.lastIndexOf(c);Q=~je?we.length-je:Q+we.length}function H(){var we={line:j,column:Q};return function(ke){return ke.position=new G(we),se(),ke}}function G(we){this.start=we,this.end={line:j,column:Q},this.source=F.source}G.prototype.content=P;function Y(we){var ke=new Error(F.source+":"+j+":"+Q+": "+we);if(ke.reason=we,ke.filename=F.source,ke.line=j,ke.column=Q,ke.source=P,!F.silent)throw ke}function z(we){var ke=we.exec(P);if(ke){var je=ke[0];return V(je),P=P.slice(je.length),ke}}function se(){z(t)}function le(we){var ke;for(we=we||[];ke=me();)ke!==!1&&we.push(ke);return we}function me(){var we=H();if(!(A!=P.charAt(0)||m!=P.charAt(1))){for(var ke=2;v!=P.charAt(ke)&&(m!=P.charAt(ke)||A!=P.charAt(ke+1));)++ke;if(ke+=2,v===P.charAt(ke-1))return Y("End of comment missing");var je=P.slice(2,ke-2);return Q+=2,V(je),P=P.slice(ke),Q+=2,we({type:x,comment:je})}}function fe(){var we=H(),ke=z(i);if(ke){if(me(),!z(r))return Y("property missing ':'");var je=z(o),Ie=we({type:_,property:O(ke[0].replace(n,v)),value:je?O(je[0].replace(n,v)):v});return z(s),Ie}}function _e(){var we=[];le(we);for(var ke;ke=fe();)ke!==!1&&(we.push(ke),le(we));return we}return se(),_e()};function O(P){return P?P.replace(a,v):v}return EB}var CN;function p3e(){if(CN)return KC;CN=1;var n=KC&&KC.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(KC,"__esModule",{value:!0}),KC.default=t;var e=n(f3e());function t(i,r){var o=null;if(!i||typeof i!="string")return o;var s=(0,e.default)(i),a=typeof r=="function";return s.forEach(function(c){if(c.type==="declaration"){var A=c.property,m=c.value;a?r(A,m,c):m&&(o=o||{},o[A]=m)}}),o}return KC}var a2={},_N;function m3e(){if(_N)return a2;_N=1,Object.defineProperty(a2,"__esModule",{value:!0}),a2.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,t=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,o=function(A){return!A||t.test(A)||n.test(A)},s=function(A,m){return m.toUpperCase()},a=function(A,m){return"".concat(m,"-")},c=function(A,m){return m===void 0&&(m={}),o(A)?A:(A=A.toLowerCase(),m.reactCompat?A=A.replace(r,a):A=A.replace(i,a),A.replace(e,s))};return a2.camelCase=c,a2}var l2,xN;function g3e(){if(xN)return l2;xN=1;var n=l2&&l2.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},e=n(p3e()),t=m3e();function i(r,o){var s={};return!r||typeof r!="string"||(0,e.default)(r,function(a,c){a&&c&&(s[(0,t.camelCase)(a,o)]=c)}),s}return i.default=i,l2=i,l2}var y3e=g3e();const v3e=Wl(y3e),qte=Yte("end"),KU=Yte("start");function Yte(n){return e;function e(t){const i=t&&t.position&&t.position[n]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function b3e(n){const e=KU(n),t=qte(n);if(e&&t)return{start:e,end:t}}function l3(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?MN(n.position):"start"in n||"end"in n?MN(n):"line"in n||"column"in n?pR(n):""}function pR(n){return wN(n&&n.line)+":"+wN(n&&n.column)}function MN(n){return pR(n&&n.start)+"-"+pR(n&&n.end)}function wN(n){return n&&typeof n=="number"?n:1}class LA extends Error{constructor(e,t,i){super(),typeof t=="string"&&(i=t,t=void 0);let r="",o={},s=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof e=="string"?r=e:!o.cause&&e&&(s=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof i=="string"){const c=i.indexOf(":");c===-1?o.ruleId=i:(o.source=i.slice(0,c),o.ruleId=i.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=l3(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}LA.prototype.file="";LA.prototype.name="";LA.prototype.reason="";LA.prototype.message="";LA.prototype.stack="";LA.prototype.column=void 0;LA.prototype.line=void 0;LA.prototype.ancestors=void 0;LA.prototype.cause=void 0;LA.prototype.fatal=void 0;LA.prototype.place=void 0;LA.prototype.ruleId=void 0;LA.prototype.source=void 0;const LU={}.hasOwnProperty,C3e=new Map,_3e=/[A-Z]/g,x3e=new Set(["table","tbody","thead","tfoot","tr"]),M3e=new Set(["td","th"]),$te="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function w3e(n,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=e.filePath||void 0;let i;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=R3e(t,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=T3e(t,e.jsx,e.jsxs)}const r={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:i,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?UU:h3e,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},o=Vte(r,n,void 0);return o&&typeof o!="string"?o:r.create(n,r.Fragment,{children:o||void 0},void 0)}function Vte(n,e,t){if(e.type==="element")return S3e(n,e,t);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return E3e(n,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return B3e(n,e,t);if(e.type==="mdxjsEsm")return O3e(n,e);if(e.type==="root")return I3e(n,e,t);if(e.type==="text")return k3e(n,e)}function S3e(n,e,t){const i=n.schema;let r=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=UU,n.schema=r),n.ancestors.push(e);const o=Zte(n,e.tagName,!1),s=D3e(n,e);let a=zU(n,e);return x3e.has(e.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!n3e(c):!0})),Hte(n,s,o,e),FU(s,a),n.ancestors.pop(),n.schema=i,n.create(e,o,s,t)}function E3e(n,e){if(e.data&&e.data.estree&&n.evaluater){const i=e.data.estree.body[0];return i.type,n.evaluater.evaluateExpression(i.expression)}t4(n,e.position)}function O3e(n,e){if(e.data&&e.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(e.data.estree);t4(n,e.position)}function B3e(n,e,t){const i=n.schema;let r=i;e.name==="svg"&&i.space==="html"&&(r=UU,n.schema=r),n.ancestors.push(e);const o=e.name===null?n.Fragment:Zte(n,e.name,!0),s=P3e(n,e),a=zU(n,e);return Hte(n,s,o,e),FU(s,a),n.ancestors.pop(),n.schema=i,n.create(e,o,s,t)}function I3e(n,e,t){const i={};return FU(i,zU(n,e)),n.create(e,n.Fragment,i,t)}function k3e(n,e){return e.value}function Hte(n,e,t,i){typeof t!="string"&&t!==n.Fragment&&n.passNode&&(e.node=i)}function FU(n,e){if(e.length>0){const t=e.length>1?e:e[0];t&&(n.children=t)}}function T3e(n,e,t){return i;function i(r,o,s,a){const A=Array.isArray(s.children)?t:e;return a?A(o,s,a):A(o,s)}}function R3e(n,e){return t;function t(i,r,o,s){const a=Array.isArray(o.children),c=KU(i);return e(r,o,s,a,{columnNumber:c?c.column-1:void 0,fileName:n,lineNumber:c?c.line:void 0},void 0)}}function D3e(n,e){const t={};let i,r;for(r in e.properties)if(r!=="children"&&LU.call(e.properties,r)){const o=U3e(n,r,e.properties[r]);if(o){const[s,a]=o;n.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&M3e.has(e.tagName)?i=a:t[s]=a}}if(i){const o=t.style||(t.style={});o[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return t}function P3e(n,e){const t={};for(const i of e.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&n.evaluater){const o=i.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(t,n.evaluater.evaluateExpression(a.argument))}else t4(n,e.position);else{const r=i.name;let o;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&n.evaluater){const a=i.value.data.estree.body[0];a.type,o=n.evaluater.evaluateExpression(a.expression)}else t4(n,e.position);else o=i.value===null?!0:i.value;t[r]=o}return t}function zU(n,e){const t=[];let i=-1;const r=n.passKeys?new Map:C3e;for(;++i<e.children.length;){const o=e.children[i];let s;if(n.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const A=r.get(c)||0;s=c+"-"+A,r.set(c,A+1)}}const a=Vte(n,o,s);a!==void 0&&t.push(a)}return t}function U3e(n,e,t){const i=u3e(n.schema,e);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=i.commaSeparated?Z2e(t):d3e(t)),i.property==="style"){let r=typeof t=="object"?t:K3e(n,String(t));return n.stylePropertyNameCase==="css"&&(r=L3e(r)),["style",r]}return[n.elementAttributeNameCase==="react"&&i.space?s3e[i.property]||i.property:i.attribute,t]}}function K3e(n,e){try{return v3e(e,{reactCompat:!0})}catch(t){if(n.ignoreInvalidStyle)return{};const i=t,r=new LA("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=n.filePath||void 0,r.url=$te+"#cannot-parse-style-attribute",r}}function Zte(n,e,t){let i;if(!t)i={type:"Literal",value:e};else if(e.includes(".")){const r=e.split(".");let o=-1,s;for(;++o<r.length;){const a=mN(r[o])?{type:"Identifier",name:r[o]}:{type:"Literal",value:r[o]};s=s?{type:"MemberExpression",object:s,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}i=s}else i=mN(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(i.type==="Literal"){const r=i.value;return LU.call(n.components,r)?n.components[r]:r}if(n.evaluater)return n.evaluater.evaluateExpression(i);t4(n)}function t4(n,e){const t=new LA("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=n.filePath||void 0,t.url=$te+"#cannot-handle-mdx-estrees-without-createevaluater",t}function L3e(n){const e={};let t;for(t in n)LU.call(n,t)&&(e[F3e(t)]=n[t]);return e}function F3e(n){let e=n.replace(_3e,z3e);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function z3e(n){return"-"+n.toLowerCase()}const OB={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},j3e={};function N3e(n,e){const t=j3e,i=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,r=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Xte(n,i,r)}function Xte(n,e,t){if(G3e(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(e&&"alt"in n&&n.alt)return n.alt;if("children"in n)return SN(n.children,e,t)}return Array.isArray(n)?SN(n,e,t):""}function SN(n,e,t){const i=[];let r=-1;for(;++r<n.length;)i[r]=Xte(n[r],e,t);return i.join("")}function G3e(n){return!!(n&&typeof n=="object")}const EN=document.createElement("i");function jU(n){const e="&"+n+";";EN.innerHTML=e;const t=EN.textContent;return t.charCodeAt(t.length-1)===59&&n!=="semi"||t===e?!1:t}function jg(n,e,t,i){const r=n.length;let o=0,s;if(e<0?e=-e>r?0:r+e:e=e>r?r:e,t=t>0?t:0,i.length<1e4)s=Array.from(i),s.unshift(e,t),n.splice(...s);else for(t&&n.splice(e,t);o<i.length;)s=i.slice(o,o+1e4),s.unshift(e,0),n.splice(...s),o+=1e4,e+=1e4}function qf(n,e){return n.length>0?(jg(n,n.length,0,e),n):e}const ON={}.hasOwnProperty;function W3e(n){const e={};let t=-1;for(;++t<n.length;)Q3e(e,n[t]);return e}function Q3e(n,e){let t;for(t in e){const r=(ON.call(n,t)?n[t]:void 0)||(n[t]={}),o=e[t];let s;if(o)for(s in o){ON.call(r,s)||(r[s]=[]);const a=o[s];q3e(r[s],Array.isArray(a)?a:a?[a]:[])}}}function q3e(n,e){let t=-1;const i=[];for(;++t<e.length;)(e[t].add==="after"?n:i).push(e[t]);jg(n,0,0,i)}function Jte(n,e){const t=Number.parseInt(n,e);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"<22>":String.fromCodePoint(t)}function F_(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gg=nv(/[A-Za-z]/),rf=nv(/[\dA-Za-z]/),Y3e=nv(/[#-'*+\--9=?A-Z^-~]/);function mR(n){return n!==null&&(n<32||n===127)}const gR=nv(/\d/),$3e=nv(/[\dA-Fa-f]/),V3e=nv(/[!-/:-@[-`{-~]/);function Pr(n){return n!==null&&n<-2}function nd(n){return n!==null&&(n<0||n===32)}function zs(n){return n===-2||n===-1||n===32}const H3e=nv(new RegExp("\\p{P}|\\p{S}","u")),Z3e=nv(/\s/);function nv(n){return e;function e(t){return t!==null&&t>-1&&n.test(String.fromCharCode(t))}}function Px(n){const e=[];let t=-1,i=0,r=0;for(;++t<n.length;){const o=n.charCodeAt(t);let s="";if(o===37&&rf(n.charCodeAt(t+1))&&rf(n.charCodeAt(t+2)))r=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const a=n.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),r=1):s="<22>"}else s=String.fromCharCode(o);s&&(e.push(n.slice(i,t),encodeURIComponent(s)),i=t+r+1,s=""),r&&(t+=r,r=0)}return e.join("")+n.slice(i)}function Ka(n,e,t,i){const r=i?i-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(c){return zs(c)?(n.enter(t),a(c)):e(c)}function a(c){return zs(c)&&o++<r?(n.consume(c),a):(n.exit(t),e(c))}}const X3e={tokenize:J3e};function J3e(n){const e=n.attempt(this.parser.constructs.contentInitial,i,r);let t;return e;function i(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),Ka(n,e,"linePrefix")}function r(a){return n.enter("paragraph"),o(a)}function o(a){const c=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,s(a)}function s(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return Pr(a)?(n.consume(a),n.exit("chunkText"),o):(n.consume(a),s)}}const e4e={tokenize:t4e},BN={tokenize:n4e};function t4e(n){const e=this,t=[];let i=0,r,o,s;return a;function a(V){if(i<t.length){const H=t[i];return e.containerState=H[1],n.attempt(H[0].continuation,c,A)(V)}return A(V)}function c(V){if(i++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,r&&Q();const H=e.events.length;let G=H,Y;for(;G--;)if(e.events[G][0]==="exit"&&e.events[G][1].type==="chunkFlow"){Y=e.events[G][1].end;break}j(i);let z=H;for(;z<e.events.length;)e.events[z][1].end={...Y},z++;return jg(e.events,G+1,0,e.events.slice(H)),e.events.length=z,A(V)}return a(V)}function A(V){if(i===t.length){if(!r)return x(V);if(r.currentConstruct&&r.currentConstruct.concrete)return O(V);e.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return e.containerState={},n.check(BN,m,v)(V)}function m(V){return r&&Q(),j(i),x(V)}function v(V){return e.parser.lazy[e.now().line]=i!==t.length,s=e.now().offset,O(V)}function x(V){return e.containerState={},n.attempt(BN,_,O)(V)}function _(V){return i++,t.push([e.currentConstruct,e.containerState]),x(V)}function O(V){if(V===null){r&&Q(),j(0),n.consume(V);return}return r=r||e.parser.flow(e.now()),n.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),P(V)}function P(V){if(V===null){F(n.exit("chunkFlow"),!0),j(0),n.consume(V);return}return Pr(V)?(n.consume(V),F(n.exit("chunkFlow")),i=0,e.interrupt=void 0,a):(n.consume(V),P)}function F(V,H){const G=e.sliceStream(V);if(H&&G.push(null),V.previous=o,o&&(o.next=V),o=V,r.defineSkip(V.start),r.write(G),e.parser.lazy[V.start.line]){let Y=r.events.length;for(;Y--;)if(r.events[Y][1].start.offset<s&&(!r.events[Y][1].end||r.events[Y][1].end.offset>s))return;const z=e.events.length;let se=z,le,me;for(;se--;)if(e.events[se][0]==="exit"&&e.events[se][1].type==="chunkFlow"){if(le){me=e.events[se][1].end;break}le=!0}for(j(i),Y=z;Y<e.events.length;)e.events[Y][1].end={...me},Y++;jg(e.events,se+1,0,e.events.slice(z)),e.events.length=Y}}function j(V){let H=t.length;for(;H-- >V;){const G=t[H];e.containerState=G[1],G[0].exit.call(e,n)}t.length=V}function Q(){r.write([null]),o=void 0,r=void 0,e.containerState._closeFlow=void 0}}function n4e(n,e,t){return Ka(n,n.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function IN(n){if(n===null||nd(n)||Z3e(n))return 1;if(H3e(n))return 2}function NU(n,e,t){const i=[];let r=-1;for(;++r<n.length;){const o=n[r].resolveAll;o&&!i.includes(o)&&(e=o(e,t),i.push(o))}return e}const yR={name:"attention",resolveAll:i4e,tokenize:r4e};function i4e(n,e){let t=-1,i,r,o,s,a,c,A,m;for(;++t<n.length;)if(n[t][0]==="enter"&&n[t][1].type==="attentionSequence"&&n[t][1]._close){for(i=t;i--;)if(n[i][0]==="exit"&&n[i][1].type==="attentionSequence"&&n[i][1]._open&&e.sliceSerialize(n[i][1]).charCodeAt(0)===e.sliceSerialize(n[t][1]).charCodeAt(0)){if((n[i][1]._close||n[t][1]._open)&&(n[t][1].end.offset-n[t][1].start.offset)%3&&!((n[i][1].end.offset-n[i][1].start.offset+n[t][1].end.offset-n[t][1].start.offset)%3))continue;c=n[i][1].end.offset-n[i][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const v={...n[i][1].end},x={...n[t][1].start};kN(v,-c),kN(x,c),s={type:c>1?"strongSequence":"emphasisSequence",start:v,end:{...n[i][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...n[t][1].start},end:x},o={type:c>1?"strongText":"emphasisText",start:{...n[i][1].end},end:{...n[t][1].start}},r={type:c>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},n[i][1].end={...s.start},n[t][1].start={...a.end},A=[],n[i][1].end.offset-n[i][1].start.offset&&(A=qf(A,[["enter",n[i][1],e],["exit",n[i][1],e]])),A=qf(A,[["enter",r,e],["enter",s,e],["exit",s,e],["enter",o,e]]),A=qf(A,NU(e.parser.constructs.insideSpan.null,n.slice(i+1,t),e)),A=qf(A,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",r,e]]),n[t][1].end.offset-n[t][1].start.offset?(m=2,A=qf(A,[["enter",n[t][1],e],["exit",n[t][1],e]])):m=0,jg(n,i-1,t-i+3,A),t=i+A.length-m-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function r4e(n,e){const t=this.parser.constructs.attentionMarkers.null,i=this.previous,r=IN(i);let o;return s;function s(c){return o=c,n.enter("attentionSequence"),a(c)}function a(c){if(c===o)return n.consume(c),a;const A=n.exit("attentionSequence"),m=IN(c),v=!m||m===2&&r||t.includes(c),x=!r||r===2&&m||t.includes(i);return A._open=!!(o===42?v:v&&(r||!x)),A._close=!!(o===42?x:x&&(m||!v)),e(c)}}function kN(n,e){n.column+=e,n.offset+=e,n._bufferIndex+=e}const o4e={name:"autolink",tokenize:s4e};function s4e(n,e,t){let i=0;return r;function r(_){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(_),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),o}function o(_){return gg(_)?(n.consume(_),s):_===64?t(_):A(_)}function s(_){return _===43||_===45||_===46||rf(_)?(i=1,a(_)):A(_)}function a(_){return _===58?(n.consume(_),i=0,c):(_===43||_===45||_===46||rf(_))&&i++<32?(n.consume(_),a):(i=0,A(_))}function c(_){return _===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(_),n.exit("autolinkMarker"),n.exit("autolink"),e):_===null||_===32||_===60||mR(_)?t(_):(n.consume(_),c)}function A(_){return _===64?(n.consume(_),m):Y3e(_)?(n.consume(_),A):t(_)}function m(_){return rf(_)?v(_):t(_)}function v(_){return _===46?(n.consume(_),i=0,m):_===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(_),n.exit("autolinkMarker"),n.exit("autolink"),e):x(_)}function x(_){if((_===45||rf(_))&&i++<63){const O=_===45?x:v;return n.consume(_),O}return t(_)}}const XE={partial:!0,tokenize:a4e};function a4e(n,e,t){return i;function i(o){return zs(o)?Ka(n,r,"linePrefix")(o):r(o)}function r(o){return o===null||Pr(o)?e(o):t(o)}}const ene={continuation:{tokenize:u4e},exit:c4e,name:"blockQuote",tokenize:l4e};function l4e(n,e,t){const i=this;return r;function r(s){if(s===62){const a=i.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(s),n.exit("blockQuoteMarker"),o}return t(s)}function o(s){return zs(s)?(n.enter("blockQuotePrefixWhitespace"),n.consume(s),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),e):(n.exit("blockQuotePrefix"),e(s))}}function u4e(n,e,t){const i=this;return r;function r(s){return zs(s)?Ka(n,o,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return n.attempt(ene,e,t)(s)}}function c4e(n){n.exit("blockQuote")}const tne={name:"characterEscape",tokenize:A4e};function A4e(n,e,t){return i;function i(o){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(o),n.exit("escapeMarker"),r}function r(o){return V3e(o)?(n.enter("characterEscapeValue"),n.consume(o),n.exit("characterEscapeValue"),n.exit("characterEscape"),e):t(o)}}const nne={name:"characterReference",tokenize:h4e};function h4e(n,e,t){const i=this;let r=0,o,s;return a;function a(v){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(v),n.exit("characterReferenceMarker"),c}function c(v){return v===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(v),n.exit("characterReferenceMarkerNumeric"),A):(n.enter("characterReferenceValue"),o=31,s=rf,m(v))}function A(v){return v===88||v===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(v),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),o=6,s=$3e,m):(n.enter("characterReferenceValue"),o=7,s=gR,m(v))}function m(v){if(v===59&&r){const x=n.exit("characterReferenceValue");return s===rf&&!jU(i.sliceSerialize(x))?t(v):(n.enter("characterReferenceMarker"),n.consume(v),n.exit("characterReferenceMarker"),n.exit("characterReference"),e)}return s(v)&&r++<o?(n.consume(v),m):t(v)}}const TN={partial:!0,tokenize:f4e},RN={concrete:!0,name:"codeFenced",tokenize:d4e};function d4e(n,e,t){const i=this,r={partial:!0,tokenize:G};let o=0,s=0,a;return c;function c(Y){return A(Y)}function A(Y){const z=i.events[i.events.length-1];return o=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,a=Y,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),m(Y)}function m(Y){return Y===a?(s++,n.consume(Y),m):s<3?t(Y):(n.exit("codeFencedFenceSequence"),zs(Y)?Ka(n,v,"whitespace")(Y):v(Y))}function v(Y){return Y===null||Pr(Y)?(n.exit("codeFencedFence"),i.interrupt?e(Y):n.check(TN,P,H)(Y)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),x(Y))}function x(Y){return Y===null||Pr(Y)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),v(Y)):zs(Y)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Ka(n,_,"whitespace")(Y)):Y===96&&Y===a?t(Y):(n.consume(Y),x)}function _(Y){return Y===null||Pr(Y)?v(Y):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),O(Y))}function O(Y){return Y===null||Pr(Y)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),v(Y)):Y===96&&Y===a?t(Y):(n.consume(Y),O)}function P(Y){return n.attempt(r,H,F)(Y)}function F(Y){return n.enter("lineEnding"),n.consume(Y),n.exit("lineEnding"),j}function j(Y){return o>0&&zs(Y)?Ka(n,Q,"linePrefix",o+1)(Y):Q(Y)}function Q(Y){return Y===null||Pr(Y)?n.check(TN,P,H)(Y):(n.enter("codeFlowValue"),V(Y))}function V(Y){return Y===null||Pr(Y)?(n.exit("codeFlowValue"),Q(Y)):(n.consume(Y),V)}function H(Y){return n.exit("codeFenced"),e(Y)}function G(Y,z,se){let le=0;return me;function me(je){return Y.enter("lineEnding"),Y.consume(je),Y.exit("lineEnding"),fe}function fe(je){return Y.enter("codeFencedFence"),zs(je)?Ka(Y,_e,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(je):_e(je)}function _e(je){return je===a?(Y.enter("codeFencedFenceSequence"),we(je)):se(je)}function we(je){return je===a?(le++,Y.consume(je),we):le>=s?(Y.exit("codeFencedFenceSequence"),zs(je)?Ka(Y,ke,"whitespace")(je):ke(je)):se(je)}function ke(je){return je===null||Pr(je)?(Y.exit("codeFencedFence"),z(je)):se(je)}}}function f4e(n,e,t){const i=this;return r;function r(s){return s===null?t(s):(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),o)}function o(s){return i.parser.lazy[i.now().line]?t(s):e(s)}}const BB={name:"codeIndented",tokenize:m4e},p4e={partial:!0,tokenize:g4e};function m4e(n,e,t){const i=this;return r;function r(A){return n.enter("codeIndented"),Ka(n,o,"linePrefix",5)(A)}function o(A){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?s(A):t(A)}function s(A){return A===null?c(A):Pr(A)?n.attempt(p4e,s,c)(A):(n.enter("codeFlowValue"),a(A))}function a(A){return A===null||Pr(A)?(n.exit("codeFlowValue"),s(A)):(n.consume(A),a)}function c(A){return n.exit("codeIndented"),e(A)}}function g4e(n,e,t){const i=this;return r;function r(s){return i.parser.lazy[i.now().line]?t(s):Pr(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),r):Ka(n,o,"linePrefix",5)(s)}function o(s){const a=i.events[i.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):Pr(s)?r(s):t(s)}}const y4e={name:"codeText",previous:b4e,resolve:v4e,tokenize:C4e};function v4e(n){let e=n.length-4,t=3,i,r;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[e][1].type==="lineEnding"||n[e][1].type==="space")){for(i=t;++i<e;)if(n[i][1].type==="codeTextData"){n[t][1].type="codeTextPadding",n[e][1].type="codeTextPadding",t+=2,e-=2;break}}for(i=t-1,e++;++i<=e;)r===void 0?i!==e&&n[i][1].type!=="lineEnding"&&(r=i):(i===e||n[i][1].type==="lineEnding")&&(n[r][1].type="codeTextData",i!==r+2&&(n[r][1].end=n[i-1][1].end,n.splice(r+2,i-r-2),e-=i-r-2,i=r+2),r=void 0);return n}function b4e(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function C4e(n,e,t){let i=0,r,o;return s;function s(v){return n.enter("codeText"),n.enter("codeTextSequence"),a(v)}function a(v){return v===96?(n.consume(v),i++,a):(n.exit("codeTextSequence"),c(v))}function c(v){return v===null?t(v):v===32?(n.enter("space"),n.consume(v),n.exit("space"),c):v===96?(o=n.enter("codeTextSequence"),r=0,m(v)):Pr(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),c):(n.enter("codeTextData"),A(v))}function A(v){return v===null||v===32||v===96||Pr(v)?(n.exit("codeTextData"),c(v)):(n.consume(v),A)}function m(v){return v===96?(n.consume(v),r++,m):r===i?(n.exit("codeTextSequence"),n.exit("codeText"),e(v)):(o.type="codeTextData",A(v))}}class _4e{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const i=t??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(e,i):e>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,t,i){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&u2(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),u2(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),u2(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);u2(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);u2(this.left,t.reverse())}}}function u2(n,e){let t=0;if(e.length<1e4)n.push(...e);else for(;t<e.length;)n.push(...e.slice(t,t+1e4)),t+=1e4}function ine(n){const e={};let t=-1,i,r,o,s,a,c,A;const m=new _4e(n);for(;++t<m.length;){for(;t in e;)t=e[t];if(i=m.get(t),t&&i[1].type==="chunkFlow"&&m.get(t-1)[1].type==="listItemPrefix"&&(c=i[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(i[0]==="enter")i[1].contentType&&(Object.assign(e,x4e(m,t)),t=e[t],A=!0);else if(i[1]._container){for(o=t,r=void 0;o--;)if(s=m.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(r&&(m.get(r)[1].type="lineEndingBlank"),s[1].type="lineEnding",r=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;r&&(i[1].end={...m.get(r)[1].start},a=m.slice(r,t),a.unshift(i),m.splice(r,t-r+1,a))}}return jg(n,0,Number.POSITIVE_INFINITY,m.slice(0)),!A}function x4e(n,e){const t=n.get(e)[1],i=n.get(e)[2];let r=e-1;const o=[];let s=t._tokenizer;s||(s=i.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,c=[],A={};let m,v,x=-1,_=t,O=0,P=0;const F=[P];for(;_;){for(;n.get(++r)[1]!==_;);o.push(r),_._tokenizer||(m=i.sliceStream(_),_.next||m.push(null),v&&s.defineSkip(_.start),_._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(m),_._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),v=_,_=_.next}for(_=t;++x<a.length;)a[x][0]==="exit"&&a[x-1][0]==="enter"&&a[x][1].type===a[x-1][1].type&&a[x][1].start.line!==a[x][1].end.line&&(P=x+1,F.push(P),_._tokenizer=void 0,_.previous=void 0,_=_.next);for(s.events=[],_?(_._tokenizer=void 0,_.previous=void 0):F.pop(),x=F.length;x--;){const j=a.slice(F[x],F[x+1]),Q=o.pop();c.push([Q,Q+j.length-1]),n.splice(Q,2,j)}for(c.reverse(),x=-1;++x<c.length;)A[O+c[x][0]]=O+c[x][1],O+=c[x][1]-c[x][0]-1;return A}const M4e={resolve:S4e,tokenize:E4e},w4e={partial:!0,tokenize:O4e};function S4e(n){return ine(n),n}function E4e(n,e){let t;return i;function i(a){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),r(a)}function r(a){return a===null?o(a):Pr(a)?n.check(w4e,s,o)(a):(n.consume(a),r)}function o(a){return n.exit("chunkContent"),n.exit("content"),e(a)}function s(a){return n.consume(a),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,r}}function O4e(n,e,t){const i=this;return r;function r(s){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),Ka(n,o,"linePrefix")}function o(s){if(s===null||Pr(s))return t(s);const a=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):n.interrupt(i.parser.constructs.flow,t,e)(s)}}function rne(n,e,t,i,r,o,s,a,c){const A=c||Number.POSITIVE_INFINITY;let m=0;return v;function v(j){return j===60?(n.enter(i),n.enter(r),n.enter(o),n.consume(j),n.exit(o),x):j===null||j===32||j===41||mR(j)?t(j):(n.enter(i),n.enter(s),n.enter(a),n.enter("chunkString",{contentType:"string"}),P(j))}function x(j){return j===62?(n.enter(o),n.consume(j),n.exit(o),n.exit(r),n.exit(i),e):(n.enter(a),n.enter("chunkString",{contentType:"string"}),_(j))}function _(j){return j===62?(n.exit("chunkString"),n.exit(a),x(j)):j===null||j===60||Pr(j)?t(j):(n.consume(j),j===92?O:_)}function O(j){return j===60||j===62||j===92?(n.consume(j),_):_(j)}function P(j){return!m&&(j===null||j===41||nd(j))?(n.exit("chunkString"),n.exit(a),n.exit(s),n.exit(i),e(j)):m<A&&j===40?(n.consume(j),m++,P):j===41?(n.consume(j),m--,P):j===null||j===32||j===40||mR(j)?t(j):(n.consume(j),j===92?F:P)}function F(j){return j===40||j===41||j===92?(n.consume(j),P):P(j)}}function one(n,e,t,i,r,o){const s=this;let a=0,c;return A;function A(_){return n.enter(i),n.enter(r),n.consume(_),n.exit(r),n.enter(o),m}function m(_){return a>999||_===null||_===91||_===93&&!c||_===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?t(_):_===93?(n.exit(o),n.enter(r),n.consume(_),n.exit(r),n.exit(i),e):Pr(_)?(n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),m):(n.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===null||_===91||_===93||Pr(_)||a++>999?(n.exit("chunkString"),m(_)):(n.consume(_),c||(c=!zs(_)),_===92?x:v)}function x(_){return _===91||_===92||_===93?(n.consume(_),a++,v):v(_)}}function sne(n,e,t,i,r,o){let s;return a;function a(x){return x===34||x===39||x===40?(n.enter(i),n.enter(r),n.consume(x),n.exit(r),s=x===40?41:x,c):t(x)}function c(x){return x===s?(n.enter(r),n.consume(x),n.exit(r),n.exit(i),e):(n.enter(o),A(x))}function A(x){return x===s?(n.exit(o),c(s)):x===null?t(x):Pr(x)?(n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),Ka(n,A,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===s||x===null||Pr(x)?(n.exit("chunkString"),A(x)):(n.consume(x),x===92?v:m)}function v(x){return x===s||x===92?(n.consume(x),m):m(x)}}function u3(n,e){let t;return i;function i(r){return Pr(r)?(n.enter("lineEnding"),n.consume(r),n.exit("lineEnding"),t=!0,i):zs(r)?Ka(n,i,t?"linePrefix":"lineSuffix")(r):e(r)}}const B4e={name:"definition",tokenize:k4e},I4e={partial:!0,tokenize:T4e};function k4e(n,e,t){const i=this;let r;return o;function o(_){return n.enter("definition"),s(_)}function s(_){return one.call(i,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(_)}function a(_){return r=F_(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),_===58?(n.enter("definitionMarker"),n.consume(_),n.exit("definitionMarker"),c):t(_)}function c(_){return nd(_)?u3(n,A)(_):A(_)}function A(_){return rne(n,m,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(_)}function m(_){return n.attempt(I4e,v,v)(_)}function v(_){return zs(_)?Ka(n,x,"whitespace")(_):x(_)}function x(_){return _===null||Pr(_)?(n.exit("definition"),i.parser.defined.push(r),e(_)):t(_)}}function T4e(n,e,t){return i;function i(a){return nd(a)?u3(n,r)(a):t(a)}function r(a){return sne(n,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return zs(a)?Ka(n,s,"whitespace")(a):s(a)}function s(a){return a===null||Pr(a)?e(a):t(a)}}const R4e={name:"hardBreakEscape",tokenize:D4e};function D4e(n,e,t){return i;function i(o){return n.enter("hardBreakEscape"),n.consume(o),r}function r(o){return Pr(o)?(n.exit("hardBreakEscape"),e(o)):t(o)}}const P4e={name:"headingAtx",resolve:U4e,tokenize:K4e};function U4e(n,e){let t=n.length-2,i=3,r,o;return n[i][1].type==="whitespace"&&(i+=2),t-2>i&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(i===t-1||t-4>i&&n[t-2][1].type==="whitespace")&&(t-=i+1===t?2:4),t>i&&(r={type:"atxHeadingText",start:n[i][1].start,end:n[t][1].end},o={type:"chunkText",start:n[i][1].start,end:n[t][1].end,contentType:"text"},jg(n,i,t-i+1,[["enter",r,e],["enter",o,e],["exit",o,e],["exit",r,e]])),n}function K4e(n,e,t){let i=0;return r;function r(m){return n.enter("atxHeading"),o(m)}function o(m){return n.enter("atxHeadingSequence"),s(m)}function s(m){return m===35&&i++<6?(n.consume(m),s):m===null||nd(m)?(n.exit("atxHeadingSequence"),a(m)):t(m)}function a(m){return m===35?(n.enter("atxHeadingSequence"),c(m)):m===null||Pr(m)?(n.exit("atxHeading"),e(m)):zs(m)?Ka(n,a,"whitespace")(m):(n.enter("atxHeadingText"),A(m))}function c(m){return m===35?(n.consume(m),c):(n.exit("atxHeadingSequence"),a(m))}function A(m){return m===null||m===35||nd(m)?(n.exit("atxHeadingText"),a(m)):(n.consume(m),A)}}const L4e=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],DN=["pre","script","style","textarea"],F4e={concrete:!0,name:"htmlFlow",resolveTo:N4e,tokenize:G4e},z4e={partial:!0,tokenize:Q4e},j4e={partial:!0,tokenize:W4e};function N4e(n){let e=n.length;for(;e--&&!(n[e][0]==="enter"&&n[e][1].type==="htmlFlow"););return e>1&&n[e-2][1].type==="linePrefix"&&(n[e][1].start=n[e-2][1].start,n[e+1][1].start=n[e-2][1].start,n.splice(e-2,2)),n}function G4e(n,e,t){const i=this;let r,o,s,a,c;return A;function A(Me){return m(Me)}function m(Me){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(Me),v}function v(Me){return Me===33?(n.consume(Me),x):Me===47?(n.consume(Me),o=!0,P):Me===63?(n.consume(Me),r=3,i.interrupt?e:ce):gg(Me)?(n.consume(Me),s=String.fromCharCode(Me),F):t(Me)}function x(Me){return Me===45?(n.consume(Me),r=2,_):Me===91?(n.consume(Me),r=5,a=0,O):gg(Me)?(n.consume(Me),r=4,i.interrupt?e:ce):t(Me)}function _(Me){return Me===45?(n.consume(Me),i.interrupt?e:ce):t(Me)}function O(Me){const dt="CDATA[";return Me===dt.charCodeAt(a++)?(n.consume(Me),a===dt.length?i.interrupt?e:_e:O):t(Me)}function P(Me){return gg(Me)?(n.consume(Me),s=String.fromCharCode(Me),F):t(Me)}function F(Me){if(Me===null||Me===47||Me===62||nd(Me)){const dt=Me===47,it=s.toLowerCase();return!dt&&!o&&DN.includes(it)?(r=1,i.interrupt?e(Me):_e(Me)):L4e.includes(s.toLowerCase())?(r=6,dt?(n.consume(Me),j):i.interrupt?e(Me):_e(Me)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t(Me):o?Q(Me):V(Me))}return Me===45||rf(Me)?(n.consume(Me),s+=String.fromCharCode(Me),F):t(Me)}function j(Me){return Me===62?(n.consume(Me),i.interrupt?e:_e):t(Me)}function Q(Me){return zs(Me)?(n.consume(Me),Q):me(Me)}function V(Me){return Me===47?(n.consume(Me),me):Me===58||Me===95||gg(Me)?(n.consume(Me),H):zs(Me)?(n.consume(Me),V):me(Me)}function H(Me){return Me===45||Me===46||Me===58||Me===95||rf(Me)?(n.consume(Me),H):G(Me)}function G(Me){return Me===61?(n.consume(Me),Y):zs(Me)?(n.consume(Me),G):V(Me)}function Y(Me){return Me===null||Me===60||Me===61||Me===62||Me===96?t(Me):Me===34||Me===39?(n.consume(Me),c=Me,z):zs(Me)?(n.consume(Me),Y):se(Me)}function z(Me){return Me===c?(n.consume(Me),c=null,le):Me===null||Pr(Me)?t(Me):(n.consume(Me),z)}function se(Me){return Me===null||Me===34||Me===39||Me===47||Me===60||Me===61||Me===62||Me===96||nd(Me)?G(Me):(n.consume(Me),se)}function le(Me){return Me===47||Me===62||zs(Me)?V(Me):t(Me)}function me(Me){return Me===62?(n.consume(Me),fe):t(Me)}function fe(Me){return Me===null||Pr(Me)?_e(Me):zs(Me)?(n.consume(Me),fe):t(Me)}function _e(Me){return Me===45&&r===2?(n.consume(Me),Ie):Me===60&&r===1?(n.consume(Me),Qe):Me===62&&r===4?(n.consume(Me),Le):Me===63&&r===3?(n.consume(Me),ce):Me===93&&r===5?(n.consume(Me),ht):Pr(Me)&&(r===6||r===7)?(n.exit("htmlFlowData"),n.check(z4e,We,we)(Me)):Me===null||Pr(Me)?(n.exit("htmlFlowData"),we(Me)):(n.consume(Me),_e)}function we(Me){return n.check(j4e,ke,We)(Me)}function ke(Me){return n.enter("lineEnding"),n.consume(Me),n.exit("lineEnding"),je}function je(Me){return Me===null||Pr(Me)?we(Me):(n.enter("htmlFlowData"),_e(Me))}function Ie(Me){return Me===45?(n.consume(Me),ce):_e(Me)}function Qe(Me){return Me===47?(n.consume(Me),s="",tt):_e(Me)}function tt(Me){if(Me===62){const dt=s.toLowerCase();return DN.includes(dt)?(n.consume(Me),Le):_e(Me)}return gg(Me)&&s.length<8?(n.consume(Me),s+=String.fromCharCode(Me),tt):_e(Me)}function ht(Me){return Me===93?(n.consume(Me),ce):_e(Me)}function ce(Me){return Me===62?(n.consume(Me),Le):Me===45&&r===2?(n.consume(Me),ce):_e(Me)}function Le(Me){return Me===null||Pr(Me)?(n.exit("htmlFlowData"),We(Me)):(n.consume(Me),Le)}function We(Me){return n.exit("htmlFlow"),e(Me)}}function W4e(n,e,t){const i=this;return r;function r(s){return Pr(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),o):t(s)}function o(s){return i.parser.lazy[i.now().line]?t(s):e(s)}}function Q4e(n,e,t){return i;function i(r){return n.enter("lineEnding"),n.consume(r),n.exit("lineEnding"),n.attempt(XE,e,t)}}const q4e={name:"htmlText",tokenize:Y4e};function Y4e(n,e,t){const i=this;let r,o,s;return a;function a(ce){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(ce),c}function c(ce){return ce===33?(n.consume(ce),A):ce===47?(n.consume(ce),G):ce===63?(n.consume(ce),V):gg(ce)?(n.consume(ce),se):t(ce)}function A(ce){return ce===45?(n.consume(ce),m):ce===91?(n.consume(ce),o=0,O):gg(ce)?(n.consume(ce),Q):t(ce)}function m(ce){return ce===45?(n.consume(ce),_):t(ce)}function v(ce){return ce===null?t(ce):ce===45?(n.consume(ce),x):Pr(ce)?(s=v,Qe(ce)):(n.consume(ce),v)}function x(ce){return ce===45?(n.consume(ce),_):v(ce)}function _(ce){return ce===62?Ie(ce):ce===45?x(ce):v(ce)}function O(ce){const Le="CDATA[";return ce===Le.charCodeAt(o++)?(n.consume(ce),o===Le.length?P:O):t(ce)}function P(ce){return ce===null?t(ce):ce===93?(n.consume(ce),F):Pr(ce)?(s=P,Qe(ce)):(n.consume(ce),P)}function F(ce){return ce===93?(n.consume(ce),j):P(ce)}function j(ce){return ce===62?Ie(ce):ce===93?(n.consume(ce),j):P(ce)}function Q(ce){return ce===null||ce===62?Ie(ce):Pr(ce)?(s=Q,Qe(ce)):(n.consume(ce),Q)}function V(ce){return ce===null?t(ce):ce===63?(n.consume(ce),H):Pr(ce)?(s=V,Qe(ce)):(n.consume(ce),V)}function H(ce){return ce===62?Ie(ce):V(ce)}function G(ce){return gg(ce)?(n.consume(ce),Y):t(ce)}function Y(ce){return ce===45||rf(ce)?(n.consume(ce),Y):z(ce)}function z(ce){return Pr(ce)?(s=z,Qe(ce)):zs(ce)?(n.consume(ce),z):Ie(ce)}function se(ce){return ce===45||rf(ce)?(n.consume(ce),se):ce===47||ce===62||nd(ce)?le(ce):t(ce)}function le(ce){return ce===47?(n.consume(ce),Ie):ce===58||ce===95||gg(ce)?(n.consume(ce),me):Pr(ce)?(s=le,Qe(ce)):zs(ce)?(n.consume(ce),le):Ie(ce)}function me(ce){return ce===45||ce===46||ce===58||ce===95||rf(ce)?(n.consume(ce),me):fe(ce)}function fe(ce){return ce===61?(n.consume(ce),_e):Pr(ce)?(s=fe,Qe(ce)):zs(ce)?(n.consume(ce),fe):le(ce)}function _e(ce){return ce===null||ce===60||ce===61||ce===62||ce===96?t(ce):ce===34||ce===39?(n.consume(ce),r=ce,we):Pr(ce)?(s=_e,Qe(ce)):zs(ce)?(n.consume(ce),_e):(n.consume(ce),ke)}function we(ce){return ce===r?(n.consume(ce),r=void 0,je):ce===null?t(ce):Pr(ce)?(s=we,Qe(ce)):(n.consume(ce),we)}function ke(ce){return ce===null||ce===34||ce===39||ce===60||ce===61||ce===96?t(ce):ce===47||ce===62||nd(ce)?le(ce):(n.consume(ce),ke)}function je(ce){return ce===47||ce===62||nd(ce)?le(ce):t(ce)}function Ie(ce){return ce===62?(n.consume(ce),n.exit("htmlTextData"),n.exit("htmlText"),e):t(ce)}function Qe(ce){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(ce),n.exit("lineEnding"),tt}function tt(ce){return zs(ce)?Ka(n,ht,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ce):ht(ce)}function ht(ce){return n.enter("htmlTextData"),s(ce)}}const GU={name:"labelEnd",resolveAll:Z4e,resolveTo:X4e,tokenize:J4e},$4e={tokenize:eMe},V4e={tokenize:tMe},H4e={tokenize:nMe};function Z4e(n){let e=-1;const t=[];for(;++e<n.length;){const i=n[e][1];if(t.push(n[e]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const r=i.type==="labelImage"?4:2;i.type="data",e+=r}}return n.length!==t.length&&jg(n,0,n.length,t),n}function X4e(n,e){let t=n.length,i=0,r,o,s,a;for(;t--;)if(r=n[t][1],o){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;n[t][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(s){if(n[t][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(o=t,r.type!=="labelLink")){i=2;break}}else r.type==="labelEnd"&&(s=t);const c={type:n[o][1].type==="labelLink"?"link":"image",start:{...n[o][1].start},end:{...n[n.length-1][1].end}},A={type:"label",start:{...n[o][1].start},end:{...n[s][1].end}},m={type:"labelText",start:{...n[o+i+2][1].end},end:{...n[s-2][1].start}};return a=[["enter",c,e],["enter",A,e]],a=qf(a,n.slice(o+1,o+i+3)),a=qf(a,[["enter",m,e]]),a=qf(a,NU(e.parser.constructs.insideSpan.null,n.slice(o+i+4,s-3),e)),a=qf(a,[["exit",m,e],n[s-2],n[s-1],["exit",A,e]]),a=qf(a,n.slice(s+1)),a=qf(a,[["exit",c,e]]),jg(n,o,n.length,a),n}function J4e(n,e,t){const i=this;let r=i.events.length,o,s;for(;r--;)if((i.events[r][1].type==="labelImage"||i.events[r][1].type==="labelLink")&&!i.events[r][1]._balanced){o=i.events[r][1];break}return a;function a(x){return o?o._inactive?v(x):(s=i.parser.defined.includes(F_(i.sliceSerialize({start:o.end,end:i.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(x),n.exit("labelMarker"),n.exit("labelEnd"),c):t(x)}function c(x){return x===40?n.attempt($4e,m,s?m:v)(x):x===91?n.attempt(V4e,m,s?A:v)(x):s?m(x):v(x)}function A(x){return n.attempt(H4e,m,v)(x)}function m(x){return e(x)}function v(x){return o._balanced=!0,t(x)}}function eMe(n,e,t){return i;function i(v){return n.enter("resource"),n.enter("resourceMarker"),n.consume(v),n.exit("resourceMarker"),r}function r(v){return nd(v)?u3(n,o)(v):o(v)}function o(v){return v===41?m(v):rne(n,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(v)}function s(v){return nd(v)?u3(n,c)(v):m(v)}function a(v){return t(v)}function c(v){return v===34||v===39||v===40?sne(n,A,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(v):m(v)}function A(v){return nd(v)?u3(n,m)(v):m(v)}function m(v){return v===41?(n.enter("resourceMarker"),n.consume(v),n.exit("resourceMarker"),n.exit("resource"),e):t(v)}}function tMe(n,e,t){const i=this;return r;function r(a){return one.call(i,n,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return i.parser.defined.includes(F_(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(a):t(a)}function s(a){return t(a)}}function nMe(n,e,t){return i;function i(o){return n.enter("reference"),n.enter("referenceMarker"),n.consume(o),n.exit("referenceMarker"),r}function r(o){return o===93?(n.enter("referenceMarker"),n.consume(o),n.exit("referenceMarker"),n.exit("reference"),e):t(o)}}const iMe={name:"labelStartImage",resolveAll:GU.resolveAll,tokenize:rMe};function rMe(n,e,t){const i=this;return r;function r(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),o}function o(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),s):t(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?t(a):e(a)}}const oMe={name:"labelStartLink",resolveAll:GU.resolveAll,tokenize:sMe};function sMe(n,e,t){const i=this;return r;function r(s){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(s),n.exit("labelMarker"),n.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in i.parser.constructs?t(s):e(s)}}const IB={name:"lineEnding",tokenize:aMe};function aMe(n,e){return t;function t(i){return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),Ka(n,e,"linePrefix")}}const J5={name:"thematicBreak",tokenize:lMe};function lMe(n,e,t){let i=0,r;return o;function o(A){return n.enter("thematicBreak"),s(A)}function s(A){return r=A,a(A)}function a(A){return A===r?(n.enter("thematicBreakSequence"),c(A)):i>=3&&(A===null||Pr(A))?(n.exit("thematicBreak"),e(A)):t(A)}function c(A){return A===r?(n.consume(A),i++,c):(n.exit("thematicBreakSequence"),zs(A)?Ka(n,a,"whitespace")(A):a(A))}}const Wh={continuation:{tokenize:hMe},exit:fMe,name:"list",tokenize:AMe},uMe={partial:!0,tokenize:pMe},cMe={partial:!0,tokenize:dMe};function AMe(n,e,t){const i=this,r=i.events[i.events.length-1];let o=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,s=0;return a;function a(_){const O=i.containerState.type||(_===42||_===43||_===45?"listUnordered":"listOrdered");if(O==="listUnordered"?!i.containerState.marker||_===i.containerState.marker:gR(_)){if(i.containerState.type||(i.containerState.type=O,n.enter(O,{_container:!0})),O==="listUnordered")return n.enter("listItemPrefix"),_===42||_===45?n.check(J5,t,A)(_):A(_);if(!i.interrupt||_===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),c(_)}return t(_)}function c(_){return gR(_)&&++s<10?(n.consume(_),c):(!i.interrupt||s<2)&&(i.containerState.marker?_===i.containerState.marker:_===41||_===46)?(n.exit("listItemValue"),A(_)):t(_)}function A(_){return n.enter("listItemMarker"),n.consume(_),n.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||_,n.check(XE,i.interrupt?t:m,n.attempt(uMe,x,v))}function m(_){return i.containerState.initialBlankLine=!0,o++,x(_)}function v(_){return zs(_)?(n.enter("listItemPrefixWhitespace"),n.consume(_),n.exit("listItemPrefixWhitespace"),x):t(_)}function x(_){return i.containerState.size=o+i.sliceSerialize(n.exit("listItemPrefix"),!0).length,e(_)}}function hMe(n,e,t){const i=this;return i.containerState._closeFlow=void 0,n.check(XE,r,o);function r(a){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ka(n,e,"listItemIndent",i.containerState.size+1)(a)}function o(a){return i.containerState.furtherBlankLines||!zs(a)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,s(a)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,n.attempt(cMe,e,s)(a))}function s(a){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ka(n,n.attempt(Wh,e,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function dMe(n,e,t){const i=this;return Ka(n,r,"listItemIndent",i.containerState.size+1);function r(o){const s=i.events[i.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===i.containerState.size?e(o):t(o)}}function fMe(n){n.exit(this.containerState.type)}function pMe(n,e,t){const i=this;return Ka(n,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(o){const s=i.events[i.events.length-1];return!zs(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):t(o)}}const PN={name:"setextUnderline",resolveTo:mMe,tokenize:gMe};function mMe(n,e){let t=n.length,i,r,o;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){i=t;break}n[t][1].type==="paragraph"&&(r=t)}else n[t][1].type==="content"&&n.splice(t,1),!o&&n[t][1].type==="definition"&&(o=t);const s={type:"setextHeading",start:{...n[i][1].start},end:{...n[n.length-1][1].end}};return n[r][1].type="setextHeadingText",o?(n.splice(r,0,["enter",s,e]),n.splice(o+1,0,["exit",n[i][1],e]),n[i][1].end={...n[o][1].end}):n[i][1]=s,n.push(["exit",s,e]),n}function gMe(n,e,t){const i=this;let r;return o;function o(A){let m=i.events.length,v;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){v=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||v)?(n.enter("setextHeadingLine"),r=A,s(A)):t(A)}function s(A){return n.enter("setextHeadingLineSequence"),a(A)}function a(A){return A===r?(n.consume(A),a):(n.exit("setextHeadingLineSequence"),zs(A)?Ka(n,c,"lineSuffix")(A):c(A))}function c(A){return A===null||Pr(A)?(n.exit("setextHeadingLine"),e(A)):t(A)}}const yMe={tokenize:vMe};function vMe(n){const e=this,t=n.attempt(XE,i,n.attempt(this.parser.constructs.flowInitial,r,Ka(n,n.attempt(this.parser.constructs.flow,r,n.attempt(M4e,r)),"linePrefix")));return t;function i(o){if(o===null){n.consume(o);return}return n.enter("lineEndingBlank"),n.consume(o),n.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function r(o){if(o===null){n.consume(o);return}return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),e.currentConstruct=void 0,t}}const bMe={resolveAll:lne()},CMe=ane("string"),_Me=ane("text");function ane(n){return{resolveAll:lne(n==="text"?xMe:void 0),tokenize:e};function e(t){const i=this,r=this.parser.constructs[n],o=t.attempt(r,s,a);return s;function s(m){return A(m)?o(m):a(m)}function a(m){if(m===null){t.consume(m);return}return t.enter("data"),t.consume(m),c}function c(m){return A(m)?(t.exit("data"),o(m)):(t.consume(m),c)}function A(m){if(m===null)return!0;const v=r[m];let x=-1;if(v)for(;++x<v.length;){const _=v[x];if(!_.previous||_.previous.call(i,i.previous))return!0}return!1}}}function lne(n){return e;function e(t,i){let r=-1,o;for(;++r<=t.length;)o===void 0?t[r]&&t[r][1].type==="data"&&(o=r,r++):(!t[r]||t[r][1].type!=="data")&&(r!==o+2&&(t[o][1].end=t[r-1][1].end,t.splice(o+2,r-o-2),r=o+2),o=void 0);return n?n(t,i):t}}function xMe(n,e){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){const i=n[t-1][1],r=e.sliceStream(i);let o=r.length,s=-1,a=0,c;for(;o--;){const A=r[o];if(typeof A=="string"){for(s=A.length;A.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(A===-2)c=!0,a++;else if(A!==-1){o++;break}}if(e._contentTypeTextTrailing&&t===n.length&&(a=0),a){const A={type:t===n.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-a,offset:i.end.offset-a},end:{...i.end}};i.end={...A.start},i.start.offset===i.end.offset?Object.assign(i,A):(n.splice(t,0,["enter",A,e],["exit",A,e]),t+=2)}t++}return n}const MMe={42:Wh,43:Wh,45:Wh,48:Wh,49:Wh,50:Wh,51:Wh,52:Wh,53:Wh,54:Wh,55:Wh,56:Wh,57:Wh,62:ene},wMe={91:B4e},SMe={[-2]:BB,[-1]:BB,32:BB},EMe={35:P4e,42:J5,45:[PN,J5],60:F4e,61:PN,95:J5,96:RN,126:RN},OMe={38:nne,92:tne},BMe={[-5]:IB,[-4]:IB,[-3]:IB,33:iMe,38:nne,42:yR,60:[o4e,q4e],91:oMe,92:[R4e,tne],93:GU,95:yR,96:y4e},IMe={null:[yR,bMe]},kMe={null:[42,95]},TMe={null:[]},RMe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:kMe,contentInitial:wMe,disable:TMe,document:MMe,flow:EMe,flowInitial:SMe,insideSpan:IMe,string:OMe,text:BMe},Symbol.toStringTag,{value:"Module"}));function DMe(n,e,t){let i={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const r={},o=[];let s=[],a=[];const c={attempt:z(G),check:z(Y),consume:Q,enter:V,exit:H,interrupt:z(Y,{interrupt:!0})},A={code:null,containerState:{},defineSkip:P,events:[],now:O,parser:n,previous:null,sliceSerialize:x,sliceStream:_,write:v};let m=e.tokenize.call(A,c);return e.resolveAll&&o.push(e),A;function v(fe){return s=qf(s,fe),F(),s[s.length-1]!==null?[]:(se(e,0),A.events=NU(o,A.events,A),A.events)}function x(fe,_e){return UMe(_(fe),_e)}function _(fe){return PMe(s,fe)}function O(){const{_bufferIndex:fe,_index:_e,line:we,column:ke,offset:je}=i;return{_bufferIndex:fe,_index:_e,line:we,column:ke,offset:je}}function P(fe){r[fe.line]=fe.column,me()}function F(){let fe;for(;i._index<s.length;){const _e=s[i._index];if(typeof _e=="string")for(fe=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===fe&&i._bufferIndex<_e.length;)j(_e.charCodeAt(i._bufferIndex));else j(_e)}}function j(fe){m=m(fe)}function Q(fe){Pr(fe)?(i.line++,i.column=1,i.offset+=fe===-3?2:1,me()):fe!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===s[i._index].length&&(i._bufferIndex=-1,i._index++)),A.previous=fe}function V(fe,_e){const we=_e||{};return we.type=fe,we.start=O(),A.events.push(["enter",we,A]),a.push(we),we}function H(fe){const _e=a.pop();return _e.end=O(),A.events.push(["exit",_e,A]),_e}function G(fe,_e){se(fe,_e.from)}function Y(fe,_e){_e.restore()}function z(fe,_e){return we;function we(ke,je,Ie){let Qe,tt,ht,ce;return Array.isArray(ke)?We(ke):"tokenize"in ke?We([ke]):Le(ke);function Le(vt){return Ut;function Ut(Pe){const Te=Pe!==null&&vt[Pe],Se=Pe!==null&&vt.null,Ne=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return We(Ne)(Pe)}}function We(vt){return Qe=vt,tt=0,vt.length===0?Ie:Me(vt[tt])}function Me(vt){return Ut;function Ut(Pe){return ce=le(),ht=vt,vt.partial||(A.currentConstruct=vt),vt.name&&A.parser.constructs.disable.null.includes(vt.name)?it():vt.tokenize.call(_e?Object.assign(Object.create(A),_e):A,c,dt,it)(Pe)}}function dt(vt){return fe(ht,ce),je}function it(vt){return ce.restore(),++tt<Qe.length?Me(Qe[tt]):Ie}}}function se(fe,_e){fe.resolveAll&&!o.includes(fe)&&o.push(fe),fe.resolve&&jg(A.events,_e,A.events.length-_e,fe.resolve(A.events.slice(_e),A)),fe.resolveTo&&(A.events=fe.resolveTo(A.events,A))}function le(){const fe=O(),_e=A.previous,we=A.currentConstruct,ke=A.events.length,je=Array.from(a);return{from:ke,restore:Ie};function Ie(){i=fe,A.previous=_e,A.currentConstruct=we,A.events.length=ke,a=je,me()}}function me(){i.line in r&&i.column<2&&(i.column=r[i.line],i.offset+=r[i.line]-1)}}function PMe(n,e){const t=e.start._index,i=e.start._bufferIndex,r=e.end._index,o=e.end._bufferIndex;let s;if(t===r)s=[n[t].slice(i,o)];else{if(s=n.slice(t,r),i>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(i):s.shift()}o>0&&s.push(n[r].slice(0,o))}return s}function UMe(n,e){let t=-1;const i=[];let r;for(;++t<n.length;){const o=n[t];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
`;break}case-3:{s=`\r
`;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&r)continue;s=" ";break}default:s=String.fromCharCode(o)}r=o===-2,i.push(s)}return i.join("")}function KMe(n){const i={constructs:W3e([RMe,...(n||{}).extensions||[]]),content:r(X3e),defined:[],document:r(e4e),flow:r(yMe),lazy:{},string:r(CMe),text:r(_Me)};return i;function r(o){return s;function s(a){return DMe(i,o,a)}}}function LMe(n){for(;!ine(n););return n}const UN=/[\0\t\n\r]/g;function FMe(){let n=1,e="",t=!0,i;return r;function r(o,s,a){const c=[];let A,m,v,x,_;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),v=0,e="",t&&(o.charCodeAt(0)===65279&&v++,t=void 0);v<o.length;){if(UN.lastIndex=v,A=UN.exec(o),x=A&&A.index!==void 0?A.index:o.length,_=o.charCodeAt(x),!A){e=o.slice(v);break}if(_===10&&v===x&&i)c.push(-3),i=void 0;else switch(i&&(c.push(-5),i=void 0),v<x&&(c.push(o.slice(v,x)),n+=x-v),_){case 0:{c.push(65533),n++;break}case 9:{for(m=Math.ceil(n/4)*4,c.push(-2);n++<m;)c.push(-1);break}case 10:{c.push(-4),n=1;break}default:i=!0,n=1}v=x+1}return a&&(i&&c.push(-5),e&&c.push(e),c.push(null)),c}}const zMe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jMe(n){return n.replace(zMe,NMe)}function NMe(n,e,t){if(e)return e;if(t.charCodeAt(0)===35){const r=t.charCodeAt(1),o=r===120||r===88;return Jte(t.slice(o?2:1),o?16:10)}return jU(t)||n}const une={}.hasOwnProperty;function GMe(n,e,t){return typeof e!="string"&&(t=e,e=void 0),WMe(t)(LMe(KMe(t).document().write(FMe()(n,e,!0))))}function WMe(n){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(zn),autolinkProtocol:le,autolinkEmail:le,atxHeading:o(Rt),blockQuote:o(Se),characterEscape:le,characterReference:le,codeFenced:o(Ne),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(Ne,s),codeText:o(ut,s),codeTextData:le,data:le,codeFlowValue:le,definition:o(rt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(mt),hardBreakEscape:o(Bt),hardBreakTrailing:o(Bt),htmlFlow:o($t,s),htmlFlowData:le,htmlText:o($t,s),htmlTextData:le,image:o(Rn),label:s,link:o(zn),listItem:o(_n),listItemValue:x,listOrdered:o(ai,v),listUnordered:o(ai),paragraph:o(Bn),reference:Me,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Rt),strong:o(dn),thematicBreak:o(In)},exit:{atxHeading:c(),atxHeadingSequence:G,autolink:c(),autolinkEmail:Te,autolinkProtocol:Pe,blockQuote:c(),characterEscapeValue:me,characterReferenceMarkerHexadecimal:it,characterReferenceMarkerNumeric:it,characterReferenceValue:vt,characterReference:Ut,codeFenced:c(F),codeFencedFence:P,codeFencedFenceInfo:_,codeFencedFenceMeta:O,codeFlowValue:me,codeIndented:c(j),codeText:c(je),codeTextData:me,data:me,definition:c(),definitionDestinationString:H,definitionLabelString:Q,definitionTitleString:V,emphasis:c(),hardBreakEscape:c(_e),hardBreakTrailing:c(_e),htmlFlow:c(we),htmlFlowData:me,htmlText:c(ke),htmlTextData:me,image:c(Qe),label:ht,labelText:tt,lineEnding:fe,link:c(Ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:dt,resourceDestinationString:ce,resourceTitleString:Le,resource:We,setextHeading:c(se),setextHeadingLineSequence:z,setextHeadingText:Y,strong:c(),thematicBreak:c()}};cne(e,(n||{}).mdastExtensions||[]);const t={};return i;function i(It){let xe={type:"root",children:[]};const oe={stack:[xe],tokenStack:[],config:e,enter:a,exit:A,buffer:s,resume:m,data:t},J=[];let ne=-1;for(;++ne<It.length;)if(It[ne][1].type==="listOrdered"||It[ne][1].type==="listUnordered")if(It[ne][0]==="enter")J.push(ne);else{const ue=J.pop();ne=r(It,ue,ne)}for(ne=-1;++ne<It.length;){const ue=e[It[ne][0]];une.call(ue,It[ne][1].type)&&ue[It[ne][1].type].call(Object.assign({sliceSerialize:It[ne][2].sliceSerialize},oe),It[ne][1])}if(oe.tokenStack.length>0){const ue=oe.tokenStack[oe.tokenStack.length-1];(ue[1]||KN).call(oe,void 0,ue[0])}for(xe.position={start:dy(It.length>0?It[0][1].start:{line:1,column:1,offset:0}),end:dy(It.length>0?It[It.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne<e.transforms.length;)xe=e.transforms[ne](xe)||xe;return xe}function r(It,xe,oe){let J=xe-1,ne=-1,ue=!1,Ce,Ue,He,lt;for(;++J<=oe;){const be=It[J];switch(be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{be[0]==="enter"?ne++:ne--,lt=void 0;break}case"lineEndingBlank":{be[0]==="enter"&&(Ce&&!lt&&!ne&&!He&&(He=J),lt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:lt=void 0}if(!ne&&be[0]==="enter"&&be[1].type==="listItemPrefix"||ne===-1&&be[0]==="exit"&&(be[1].type==="listUnordered"||be[1].type==="listOrdered")){if(Ce){let Ee=J;for(Ue=void 0;Ee--;){const y=It[Ee];if(y[1].type==="lineEnding"||y[1].type==="lineEndingBlank"){if(y[0]==="exit")continue;Ue&&(It[Ue][1].type="lineEndingBlank",ue=!0),y[1].type="lineEnding",Ue=Ee}else if(!(y[1].type==="linePrefix"||y[1].type==="blockQuotePrefix"||y[1].type==="blockQuotePrefixWhitespace"||y[1].type==="blockQuoteMarker"||y[1].type==="listItemIndent"))break}He&&(!Ue||He<Ue)&&(Ce._spread=!0),Ce.end=Object.assign({},Ue?It[Ue][1].start:be[1].end),It.splice(Ue||J,0,["exit",Ce,be[2]]),J++,oe++}if(be[1].type==="listItemPrefix"){const Ee={type:"listItem",_spread:!1,start:Object.assign({},be[1].start),end:void 0};Ce=Ee,It.splice(J,0,["enter",Ee,be[2]]),J++,oe++,He=void 0,lt=!0}}}return It[xe][1]._spread=ue,oe}function o(It,xe){return oe;function oe(J){a.call(this,It(J),J),xe&&xe.call(this,J)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(It,xe,oe){this.stack[this.stack.length-1].children.push(It),this.stack.push(It),this.tokenStack.push([xe,oe||void 0]),It.position={start:dy(xe.start),end:void 0}}function c(It){return xe;function xe(oe){It&&It.call(this,oe),A.call(this,oe)}}function A(It,xe){const oe=this.stack.pop(),J=this.tokenStack.pop();if(J)J[0].type!==It.type&&(xe?xe.call(this,It,J[0]):(J[1]||KN).call(this,It,J[0]));else throw new Error("Cannot close `"+It.type+"` ("+l3({start:It.start,end:It.end})+"): its not open");oe.position.end=dy(It.end)}function m(){return N3e(this.stack.pop())}function v(){this.data.expectingFirstListItemValue=!0}function x(It){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(It),10),this.data.expectingFirstListItemValue=void 0}}function _(){const It=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=It}function O(){const It=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=It}function P(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function F(){const It=this.resume(),xe=this.stack[this.stack.length-1];xe.value=It.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const It=this.resume(),xe=this.stack[this.stack.length-1];xe.value=It.replace(/(\r?\n|\r)$/g,"")}function Q(It){const xe=this.resume(),oe=this.stack[this.stack.length-1];oe.label=xe,oe.identifier=F_(this.sliceSerialize(It)).toLowerCase()}function V(){const It=this.resume(),xe=this.stack[this.stack.length-1];xe.title=It}function H(){const It=this.resume(),xe=this.stack[this.stack.length-1];xe.url=It}function G(It){const xe=this.stack[this.stack.length-1];if(!xe.depth){const oe=this.sliceSerialize(It).length;xe.depth=oe}}function Y(){this.data.setextHeadingSlurpLineEnding=!0}function z(It){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(It).codePointAt(0)===61?1:2}function se(){this.data.setextHeadingSlurpLineEnding=void 0}function le(It){const oe=this.stack[this.stack.length-1].children;let J=oe[oe.length-1];(!J||J.type!=="text")&&(J=li(),J.position={start:dy(It.start),end:void 0},oe.push(J)),this.stack.push(J)}function me(It){const xe=this.stack.pop();xe.value+=this.sliceSerialize(It),xe.position.end=dy(It.end)}function fe(It){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const oe=xe.children[xe.children.length-1];oe.position.end=dy(It.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(xe.type)&&(le.call(this,It),me.call(this,It))}function _e(){this.data.atHardBreak=!0}function we(){const It=this.resume(),xe=this.stack[this.stack.length-1];xe.value=It}function ke(){const It=this.resume(),xe=this.stack[this.stack.length-1];xe.value=It}function je(){const It=this.resume(),xe=this.stack[this.stack.length-1];xe.value=It}function Ie(){const It=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";It.type+="Reference",It.referenceType=xe,delete It.url,delete It.title}else delete It.identifier,delete It.label;this.data.referenceType=void 0}function Qe(){const It=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";It.type+="Reference",It.referenceType=xe,delete It.url,delete It.title}else delete It.identifier,delete It.label;this.data.referenceType=void 0}function tt(It){const xe=this.sliceSerialize(It),oe=this.stack[this.stack.length-2];oe.label=jMe(xe),oe.identifier=F_(xe).toLowerCase()}function ht(){const It=this.stack[this.stack.length-1],xe=this.resume(),oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,oe.type==="link"){const J=It.children;oe.children=J}else oe.alt=xe}function ce(){const It=this.resume(),xe=this.stack[this.stack.length-1];xe.url=It}function Le(){const It=this.resume(),xe=this.stack[this.stack.length-1];xe.title=It}function We(){this.data.inReference=void 0}function Me(){this.data.referenceType="collapsed"}function dt(It){const xe=this.resume(),oe=this.stack[this.stack.length-1];oe.label=xe,oe.identifier=F_(this.sliceSerialize(It)).toLowerCase(),this.data.referenceType="full"}function it(It){this.data.characterReferenceType=It.type}function vt(It){const xe=this.sliceSerialize(It),oe=this.data.characterReferenceType;let J;oe?(J=Jte(xe,oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):J=jU(xe);const ne=this.stack[this.stack.length-1];ne.value+=J}function Ut(It){const xe=this.stack.pop();xe.position.end=dy(It.end)}function Pe(It){me.call(this,It);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(It)}function Te(It){me.call(this,It);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(It)}function Se(){return{type:"blockquote",children:[]}}function Ne(){return{type:"code",lang:null,meta:null,value:""}}function ut(){return{type:"inlineCode",value:""}}function rt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function mt(){return{type:"emphasis",children:[]}}function Rt(){return{type:"heading",depth:0,children:[]}}function Bt(){return{type:"break"}}function $t(){return{type:"html",value:""}}function Rn(){return{type:"image",title:null,url:"",alt:null}}function zn(){return{type:"link",title:null,url:"",children:[]}}function ai(It){return{type:"list",ordered:It.type==="listOrdered",start:null,spread:It._spread,children:[]}}function _n(It){return{type:"listItem",spread:It._spread,checked:null,children:[]}}function Bn(){return{type:"paragraph",children:[]}}function dn(){return{type:"strong",children:[]}}function li(){return{type:"text",value:""}}function In(){return{type:"thematicBreak"}}}function dy(n){return{line:n.line,column:n.column,offset:n.offset}}function cne(n,e){let t=-1;for(;++t<e.length;){const i=e[t];Array.isArray(i)?cne(n,i):QMe(n,i)}}function QMe(n,e){let t;for(t in e)if(une.call(e,t))switch(t){case"canContainEols":{const i=e[t];i&&n[t].push(...i);break}case"transforms":{const i=e[t];i&&n[t].push(...i);break}case"enter":case"exit":{const i=e[t];i&&Object.assign(n[t],i);break}}}function KN(n,e){throw n?new Error("Cannot close `"+n.type+"` ("+l3({start:n.start,end:n.end})+"): a different token (`"+e.type+"`, "+l3({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+l3({start:e.start,end:e.end})+") is still open")}function qMe(n){const e=this;e.parser=t;function t(i){return GMe(i,{...e.data("settings"),...n,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function YMe(n,e){const t={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(e),!0)};return n.patch(e,t),n.applyData(e,t)}function $Me(n,e){const t={type:"element",tagName:"br",properties:{},children:[]};return n.patch(e,t),[n.applyData(e,t),{type:"text",value:`
`}]}function VMe(n,e){const t=e.value?e.value+`
`:"",i={};e.lang&&(i.className=["language-"+e.lang]);let r={type:"element",tagName:"code",properties:i,children:[{type:"text",value:t}]};return e.meta&&(r.data={meta:e.meta}),n.patch(e,r),r=n.applyData(e,r),r={type:"element",tagName:"pre",properties:{},children:[r]},n.patch(e,r),r}function HMe(n,e){const t={type:"element",tagName:"del",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function ZMe(n,e){const t={type:"element",tagName:"em",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function XMe(n,e){const t=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",i=String(e.identifier).toUpperCase(),r=Px(i.toLowerCase()),o=n.footnoteOrder.indexOf(i);let s,a=n.footnoteCounts.get(i);a===void 0?(a=0,n.footnoteOrder.push(i),s=n.footnoteOrder.length):s=o+1,a+=1,n.footnoteCounts.set(i,a);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};n.patch(e,c);const A={type:"element",tagName:"sup",properties:{},children:[c]};return n.patch(e,A),n.applyData(e,A)}function JMe(n,e){const t={type:"element",tagName:"h"+e.depth,properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function e5e(n,e){if(n.options.allowDangerousHtml){const t={type:"raw",value:e.value};return n.patch(e,t),n.applyData(e,t)}}function Ane(n,e){const t=e.referenceType;let i="]";if(t==="collapsed"?i+="[]":t==="full"&&(i+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+i}];const r=n.all(e),o=r[0];o&&o.type==="text"?o.value="["+o.value:r.unshift({type:"text",value:"["});const s=r[r.length-1];return s&&s.type==="text"?s.value+=i:r.push({type:"text",value:i}),r}function t5e(n,e){const t=String(e.identifier).toUpperCase(),i=n.definitionById.get(t);if(!i)return Ane(n,e);const r={src:Px(i.url||""),alt:e.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const o={type:"element",tagName:"img",properties:r,children:[]};return n.patch(e,o),n.applyData(e,o)}function n5e(n,e){const t={src:Px(e.url)};e.alt!==null&&e.alt!==void 0&&(t.alt=e.alt),e.title!==null&&e.title!==void 0&&(t.title=e.title);const i={type:"element",tagName:"img",properties:t,children:[]};return n.patch(e,i),n.applyData(e,i)}function i5e(n,e){const t={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};n.patch(e,t);const i={type:"element",tagName:"code",properties:{},children:[t]};return n.patch(e,i),n.applyData(e,i)}function r5e(n,e){const t=String(e.identifier).toUpperCase(),i=n.definitionById.get(t);if(!i)return Ane(n,e);const r={href:Px(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const o={type:"element",tagName:"a",properties:r,children:n.all(e)};return n.patch(e,o),n.applyData(e,o)}function o5e(n,e){const t={href:Px(e.url)};e.title!==null&&e.title!==void 0&&(t.title=e.title);const i={type:"element",tagName:"a",properties:t,children:n.all(e)};return n.patch(e,i),n.applyData(e,i)}function s5e(n,e,t){const i=n.all(e),r=t?a5e(t):hne(e),o={},s=[];if(typeof e.checked=="boolean"){const m=i[0];let v;m&&m.type==="element"&&m.tagName==="p"?v=m:(v={type:"element",tagName:"p",properties:{},children:[]},i.unshift(v)),v.children.length>0&&v.children.unshift({type:"text",value:" "}),v.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<i.length;){const m=i[a];(r||a!==0||m.type!=="element"||m.tagName!=="p")&&s.push({type:"text",value:`
`}),m.type==="element"&&m.tagName==="p"&&!r?s.push(...m.children):s.push(m)}const c=i[i.length-1];c&&(r||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
`});const A={type:"element",tagName:"li",properties:o,children:s};return n.patch(e,A),n.applyData(e,A)}function a5e(n){let e=!1;if(n.type==="list"){e=n.spread||!1;const t=n.children;let i=-1;for(;!e&&++i<t.length;)e=hne(t[i])}return e}function hne(n){const e=n.spread;return e??n.children.length>1}function l5e(n,e){const t={},i=n.all(e);let r=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++r<i.length;){const s=i[r];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:e.ordered?"ol":"ul",properties:t,children:n.wrap(i,!0)};return n.patch(e,o),n.applyData(e,o)}function u5e(n,e){const t={type:"element",tagName:"p",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function c5e(n,e){const t={type:"root",children:n.wrap(n.all(e))};return n.patch(e,t),n.applyData(e,t)}function A5e(n,e){const t={type:"element",tagName:"strong",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function h5e(n,e){const t=n.all(e),i=t.shift(),r=[];if(i){const s={type:"element",tagName:"thead",properties:{},children:n.wrap([i],!0)};n.patch(e.children[0],s),r.push(s)}if(t.length>0){const s={type:"element",tagName:"tbody",properties:{},children:n.wrap(t,!0)},a=KU(e.children[1]),c=qte(e.children[e.children.length-1]);a&&c&&(s.position={start:a,end:c}),r.push(s)}const o={type:"element",tagName:"table",properties:{},children:n.wrap(r,!0)};return n.patch(e,o),n.applyData(e,o)}function d5e(n,e,t){const i=t?t.children:void 0,o=(i?i.indexOf(e):1)===0?"th":"td",s=t&&t.type==="table"?t.align:void 0,a=s?s.length:e.children.length;let c=-1;const A=[];for(;++c<a;){const v=e.children[c],x={},_=s?s[c]:void 0;_&&(x.align=_);let O={type:"element",tagName:o,properties:x,children:[]};v&&(O.children=n.all(v),n.patch(v,O),O=n.applyData(v,O)),A.push(O)}const m={type:"element",tagName:"tr",properties:{},children:n.wrap(A,!0)};return n.patch(e,m),n.applyData(e,m)}function f5e(n,e){const t={type:"element",tagName:"td",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}const LN=9,FN=32;function p5e(n){const e=String(n),t=/\r?\n|\r/g;let i=t.exec(e),r=0;const o=[];for(;i;)o.push(zN(e.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=t.exec(e);return o.push(zN(e.slice(r),r>0,!1)),o.join("")}function zN(n,e,t){let i=0,r=n.length;if(e){let o=n.codePointAt(i);for(;o===LN||o===FN;)i++,o=n.codePointAt(i)}if(t){let o=n.codePointAt(r-1);for(;o===LN||o===FN;)r--,o=n.codePointAt(r-1)}return r>i?n.slice(i,r):""}function m5e(n,e){const t={type:"text",value:p5e(String(e.value))};return n.patch(e,t),n.applyData(e,t)}function g5e(n,e){const t={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(e,t),n.applyData(e,t)}const y5e={blockquote:YMe,break:$Me,code:VMe,delete:HMe,emphasis:ZMe,footnoteReference:XMe,heading:JMe,html:e5e,imageReference:t5e,image:n5e,inlineCode:i5e,linkReference:r5e,link:o5e,listItem:s5e,list:l5e,paragraph:u5e,root:c5e,strong:A5e,table:h5e,tableCell:f5e,tableRow:d5e,text:m5e,thematicBreak:g5e,toml:e5,yaml:e5,definition:e5,footnoteDefinition:e5};function e5(){}const dne=-1,JE=0,c3=1,hS=2,WU=3,QU=4,qU=5,YU=6,fne=7,pne=8,jN=typeof self=="object"?self:globalThis,v5e=(n,e)=>{const t=(r,o)=>(n.set(o,r),r),i=r=>{if(n.has(r))return n.get(r);const[o,s]=e[r];switch(o){case JE:case dne:return t(s,r);case c3:{const a=t([],r);for(const c of s)a.push(i(c));return a}case hS:{const a=t({},r);for(const[c,A]of s)a[i(c)]=i(A);return a}case WU:return t(new Date(s),r);case QU:{const{source:a,flags:c}=s;return t(new RegExp(a,c),r)}case qU:{const a=t(new Map,r);for(const[c,A]of s)a.set(i(c),i(A));return a}case YU:{const a=t(new Set,r);for(const c of s)a.add(i(c));return a}case fne:{const{name:a,message:c}=s;return t(new jN[a](c),r)}case pne:return t(BigInt(s),r);case"BigInt":return t(Object(BigInt(s)),r);case"ArrayBuffer":return t(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:a}=new Uint8Array(s);return t(new DataView(a),s)}}return t(new jN[o](s),r)};return i},NN=n=>v5e(new Map,n)(0),LC="",{toString:b5e}={},{keys:C5e}=Object,c2=n=>{const e=typeof n;if(e!=="object"||!n)return[JE,e];const t=b5e.call(n).slice(8,-1);switch(t){case"Array":return[c3,LC];case"Object":return[hS,LC];case"Date":return[WU,LC];case"RegExp":return[QU,LC];case"Map":return[qU,LC];case"Set":return[YU,LC];case"DataView":return[c3,t]}return t.includes("Array")?[c3,t]:t.includes("Error")?[fne,t]:[hS,t]},t5=([n,e])=>n===JE&&(e==="function"||e==="symbol"),_5e=(n,e,t,i)=>{const r=(s,a)=>{const c=i.push(s)-1;return t.set(a,c),c},o=s=>{if(t.has(s))return t.get(s);let[a,c]=c2(s);switch(a){case JE:{let m=s;switch(c){case"bigint":a=pne,m=s.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+c);m=null;break;case"undefined":return r([dne],s)}return r([a,m],s)}case c3:{if(c){let x=s;return c==="DataView"?x=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(x=new Uint8Array(s)),r([c,[...x]],s)}const m=[],v=r([a,m],s);for(const x of s)m.push(o(x));return v}case hS:{if(c)switch(c){case"BigInt":return r([c,s.toString()],s);case"Boolean":case"Number":case"String":return r([c,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());const m=[],v=r([a,m],s);for(const x of C5e(s))(n||!t5(c2(s[x])))&&m.push([o(x),o(s[x])]);return v}case WU:return r([a,s.toISOString()],s);case QU:{const{source:m,flags:v}=s;return r([a,{source:m,flags:v}],s)}case qU:{const m=[],v=r([a,m],s);for(const[x,_]of s)(n||!(t5(c2(x))||t5(c2(_))))&&m.push([o(x),o(_)]);return v}case YU:{const m=[],v=r([a,m],s);for(const x of s)(n||!t5(c2(x)))&&m.push(o(x));return v}}const{message:A}=s;return r([a,{name:c,message:A}],s)};return o},GN=(n,{json:e,lossy:t}={})=>{const i=[];return _5e(!(e||t),!!e,new Map,i)(n),i},dS=typeof structuredClone=="function"?(n,e)=>e&&("json"in e||"lossy"in e)?NN(GN(n,e)):structuredClone(n):(n,e)=>NN(GN(n,e));function x5e(n,e){const t=[{type:"text",value:"↩"}];return e>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),t}function M5e(n,e){return"Back to reference "+(n+1)+(e>1?"-"+e:"")}function w5e(n){const e=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",t=n.options.footnoteBackContent||x5e,i=n.options.footnoteBackLabel||M5e,r=n.options.footnoteLabel||"Footnotes",o=n.options.footnoteLabelTagName||"h2",s=n.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<n.footnoteOrder.length;){const A=n.footnoteById.get(n.footnoteOrder[c]);if(!A)continue;const m=n.all(A),v=String(A.identifier).toUpperCase(),x=Px(v.toLowerCase());let _=0;const O=[],P=n.footnoteCounts.get(v);for(;P!==void 0&&++_<=P;){O.length>0&&O.push({type:"text",value:" "});let Q=typeof t=="string"?t:t(c,_);typeof Q=="string"&&(Q={type:"text",value:Q}),O.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+x+(_>1?"-"+_:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(c,_),className:["data-footnote-backref"]},children:Array.isArray(Q)?Q:[Q]})}const F=m[m.length-1];if(F&&F.type==="element"&&F.tagName==="p"){const Q=F.children[F.children.length-1];Q&&Q.type==="text"?Q.value+=" ":F.children.push({type:"text",value:" "}),F.children.push(...O)}else m.push(...O);const j={type:"element",tagName:"li",properties:{id:e+"fn-"+x},children:n.wrap(m,!0)};n.patch(A,j),a.push(j)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...dS(s),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(a,!0)},{type:"text",value:`
`}]}}const mne=(function(n){if(n==null)return B5e;if(typeof n=="function")return e6(n);if(typeof n=="object")return Array.isArray(n)?S5e(n):E5e(n);if(typeof n=="string")return O5e(n);throw new Error("Expected function, string, or object as test")});function S5e(n){const e=[];let t=-1;for(;++t<n.length;)e[t]=mne(n[t]);return e6(i);function i(...r){let o=-1;for(;++o<e.length;)if(e[o].apply(this,r))return!0;return!1}}function E5e(n){const e=n;return e6(t);function t(i){const r=i;let o;for(o in n)if(r[o]!==e[o])return!1;return!0}}function O5e(n){return e6(e);function e(t){return t&&t.type===n}}function e6(n){return e;function e(t,i,r){return!!(I5e(t)&&n.call(this,t,typeof i=="number"?i:void 0,r||void 0))}}function B5e(){return!0}function I5e(n){return n!==null&&typeof n=="object"&&"type"in n}const gne=[],k5e=!0,WN=!1,T5e="skip";function R5e(n,e,t,i){let r;typeof e=="function"&&typeof t!="function"?(i=t,t=e):r=e;const o=mne(r),s=i?-1:1;a(n,void 0,[])();function a(c,A,m){const v=c&&typeof c=="object"?c:{};if(typeof v.type=="string"){const _=typeof v.tagName=="string"?v.tagName:typeof v.name=="string"?v.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(c.type+(_?"<"+_+">":""))+")"})}return x;function x(){let _=gne,O,P,F;if((!e||o(c,A,m[m.length-1]||void 0))&&(_=D5e(t(c,m)),_[0]===WN))return _;if("children"in c&&c.children){const j=c;if(j.children&&_[0]!==T5e)for(P=(i?j.children.length:-1)+s,F=m.concat(j);P>-1&&P<j.children.length;){const Q=j.children[P];if(O=a(Q,P,F)(),O[0]===WN)return O;P=typeof O[1]=="number"?O[1]:P+s}}return _}}}function D5e(n){return Array.isArray(n)?n:typeof n=="number"?[k5e,n]:n==null?gne:[n]}function yne(n,e,t,i){let r,o,s;typeof e=="function"&&typeof t!="function"?(o=void 0,s=e,r=t):(o=e,s=t,r=i),R5e(n,o,a,r);function a(c,A){const m=A[A.length-1],v=m?m.children.indexOf(c):void 0;return s(c,v,m)}}const vR={}.hasOwnProperty,P5e={};function U5e(n,e){const t=e||P5e,i=new Map,r=new Map,o=new Map,s={...y5e,...t.handlers},a={all:A,applyData:L5e,definitionById:i,footnoteById:r,footnoteCounts:o,footnoteOrder:[],handlers:s,one:c,options:t,patch:K5e,wrap:z5e};return yne(n,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const v=m.type==="definition"?i:r,x=String(m.identifier).toUpperCase();v.has(x)||v.set(x,m)}}),a;function c(m,v){const x=m.type,_=a.handlers[x];if(vR.call(a.handlers,x)&&_)return _(a,m,v);if(a.options.passThrough&&a.options.passThrough.includes(x)){if("children"in m){const{children:P,...F}=m,j=dS(F);return j.children=a.all(m),j}return dS(m)}return(a.options.unknownHandler||F5e)(a,m,v)}function A(m){const v=[];if("children"in m){const x=m.children;let _=-1;for(;++_<x.length;){const O=a.one(x[_],m);if(O){if(_&&x[_-1].type==="break"&&(!Array.isArray(O)&&O.type==="text"&&(O.value=QN(O.value)),!Array.isArray(O)&&O.type==="element")){const P=O.children[0];P&&P.type==="text"&&(P.value=QN(P.value))}Array.isArray(O)?v.push(...O):v.push(O)}}}return v}}function K5e(n,e){n.position&&(e.position=b3e(n))}function L5e(n,e){let t=e;if(n&&n.data){const i=n.data.hName,r=n.data.hChildren,o=n.data.hProperties;if(typeof i=="string")if(t.type==="element")t.tagName=i;else{const s="children"in t?t.children:[t];t={type:"element",tagName:i,properties:{},children:s}}t.type==="element"&&o&&Object.assign(t.properties,dS(o)),"children"in t&&t.children&&r!==null&&r!==void 0&&(t.children=r)}return t}function F5e(n,e){const t=e.data||{},i="value"in e&&!(vR.call(t,"hProperties")||vR.call(t,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:n.all(e)};return n.patch(e,i),n.applyData(e,i)}function z5e(n,e){const t=[];let i=-1;for(e&&t.push({type:"text",value:`
`});++i<n.length;)i&&t.push({type:"text",value:`
`}),t.push(n[i]);return e&&n.length>0&&t.push({type:"text",value:`
`}),t}function QN(n){let e=0,t=n.charCodeAt(e);for(;t===9||t===32;)e++,t=n.charCodeAt(e);return n.slice(e)}function qN(n,e){const t=U5e(n,e),i=t.one(n,void 0),r=w5e(t),o=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&o.children.push({type:"text",value:`
`},r),o}function j5e(n,e){return n&&"run"in n?async function(t,i){const r=qN(t,{file:i,...e});await n.run(r,i)}:function(t,i){return qN(t,{file:i,...n||e})}}function YN(n){if(n)throw n}var kB,$N;function N5e(){if($N)return kB;$N=1;var n=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(A){return typeof Array.isArray=="function"?Array.isArray(A):e.call(A)==="[object Array]"},o=function(A){if(!A||e.call(A)!=="[object Object]")return!1;var m=n.call(A,"constructor"),v=A.constructor&&A.constructor.prototype&&n.call(A.constructor.prototype,"isPrototypeOf");if(A.constructor&&!m&&!v)return!1;var x;for(x in A);return typeof x>"u"||n.call(A,x)},s=function(A,m){t&&m.name==="__proto__"?t(A,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):A[m.name]=m.newValue},a=function(A,m){if(m==="__proto__")if(n.call(A,m)){if(i)return i(A,m).value}else return;return A[m]};return kB=function c(){var A,m,v,x,_,O,P=arguments[0],F=1,j=arguments.length,Q=!1;for(typeof P=="boolean"&&(Q=P,P=arguments[1]||{},F=2),(P==null||typeof P!="object"&&typeof P!="function")&&(P={});F<j;++F)if(A=arguments[F],A!=null)for(m in A)v=a(P,m),x=a(A,m),P!==x&&(Q&&x&&(o(x)||(_=r(x)))?(_?(_=!1,O=v&&r(v)?v:[]):O=v&&o(v)?v:{},s(P,{name:m,newValue:c(Q,O,x)})):typeof x<"u"&&s(P,{name:m,newValue:x}));return P},kB}var G5e=N5e();const TB=Wl(G5e);function bR(n){if(typeof n!="object"||n===null)return!1;const e=Object.getPrototypeOf(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function W5e(){const n=[],e={run:t,use:i};return e;function t(...r){let o=-1;const s=r.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...r);function a(c,...A){const m=n[++o];let v=-1;if(c){s(c);return}for(;++v<r.length;)(A[v]===null||A[v]===void 0)&&(A[v]=r[v]);r=A,m?Q5e(m,a)(...A):s(null,...A)}}function i(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return n.push(r),e}}function Q5e(n,e){let t;return i;function i(...s){const a=n.length>s.length;let c;a&&s.push(r);try{c=n.apply(this,s)}catch(A){const m=A;if(a&&t)throw m;return r(m)}a||(c&&c.then&&typeof c.then=="function"?c.then(o,r):c instanceof Error?r(c):o(c))}function r(s,...a){t||(t=!0,e(s,...a))}function o(s){r(null,s)}}const cg={basename:q5e,dirname:Y5e,extname:$5e,join:V5e,sep:"/"};function q5e(n,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');aM(n);let t=0,i=-1,r=n.length,o;if(e===void 0||e.length===0||e.length>n.length){for(;r--;)if(n.codePointAt(r)===47){if(o){t=r+1;break}}else i<0&&(o=!0,i=r+1);return i<0?"":n.slice(t,i)}if(e===n)return"";let s=-1,a=e.length-1;for(;r--;)if(n.codePointAt(r)===47){if(o){t=r+1;break}}else s<0&&(o=!0,s=r+1),a>-1&&(n.codePointAt(r)===e.codePointAt(a--)?a<0&&(i=r):(a=-1,i=s));return t===i?i=s:i<0&&(i=n.length),n.slice(t,i)}function Y5e(n){if(aM(n),n.length===0)return".";let e=-1,t=n.length,i;for(;--t;)if(n.codePointAt(t)===47){if(i){e=t;break}}else i||(i=!0);return e<0?n.codePointAt(0)===47?"/":".":e===1&&n.codePointAt(0)===47?"//":n.slice(0,e)}function $5e(n){aM(n);let e=n.length,t=-1,i=0,r=-1,o=0,s;for(;e--;){const a=n.codePointAt(e);if(a===47){if(s){i=e+1;break}continue}t<0&&(s=!0,t=e+1),a===46?r<0?r=e:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||t<0||o===0||o===1&&r===t-1&&r===i+1?"":n.slice(r,t)}function V5e(...n){let e=-1,t;for(;++e<n.length;)aM(n[e]),n[e]&&(t=t===void 0?n[e]:t+"/"+n[e]);return t===void 0?".":H5e(t)}function H5e(n){aM(n);const e=n.codePointAt(0)===47;let t=Z5e(n,!e);return t.length===0&&!e&&(t="."),t.length>0&&n.codePointAt(n.length-1)===47&&(t+="/"),e?"/"+t:t}function Z5e(n,e){let t="",i=0,r=-1,o=0,s=-1,a,c;for(;++s<=n.length;){if(s<n.length)a=n.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(r===s-1||o===1))if(r!==s-1&&o===2){if(t.length<2||i!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",i=0):(t=t.slice(0,c),i=t.length-1-t.lastIndexOf("/")),r=s,o=0;continue}}else if(t.length>0){t="",i=0,r=s,o=0;continue}}e&&(t=t.length>0?t+"/..":"..",i=2)}else t.length>0?t+="/"+n.slice(r+1,s):t=n.slice(r+1,s),i=s-r-1;r=s,o=0}else a===46&&o>-1?o++:o=-1}return t}function aM(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const X5e={cwd:J5e};function J5e(){return"/"}function CR(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function ewe(n){if(typeof n=="string")n=new URL(n);else if(!CR(n)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(n.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return twe(n)}function twe(n){if(n.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=n.pathname;let t=-1;for(;++t<e.length;)if(e.codePointAt(t)===37&&e.codePointAt(t+1)===50){const i=e.codePointAt(t+2);if(i===70||i===102){const r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(e)}const RB=["history","path","basename","stem","extname","dirname"];class vne{constructor(e){let t;e?CR(e)?t={path:e}:typeof e=="string"||nwe(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":X5e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<RB.length;){const o=RB[i];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let r;for(r in t)RB.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path=="string"?cg.basename(this.path):void 0}set basename(e){PB(e,"basename"),DB(e,"basename"),this.path=cg.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?cg.dirname(this.path):void 0}set dirname(e){VN(this.basename,"dirname"),this.path=cg.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?cg.extname(this.path):void 0}set extname(e){if(DB(e,"extname"),VN(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=cg.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){CR(e)&&(e=ewe(e)),PB(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?cg.basename(this.path,this.extname):void 0}set stem(e){PB(e,"stem"),DB(e,"stem"),this.path=cg.join(this.dirname||"",e+(this.extname||""))}fail(e,t,i){const r=this.message(e,t,i);throw r.fatal=!0,r}info(e,t,i){const r=this.message(e,t,i);return r.fatal=void 0,r}message(e,t,i){const r=new LA(e,t,i);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function DB(n,e){if(n&&n.includes(cg.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+cg.sep+"`")}function PB(n,e){if(!n)throw new Error("`"+e+"` cannot be empty")}function VN(n,e){if(!n)throw new Error("Setting `"+e+"` requires `path` to be set too")}function nwe(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const iwe=(function(n){const i=this.constructor.prototype,r=i[n],o=function(){return r.apply(o,arguments)};return Object.setPrototypeOf(o,i),o}),rwe={}.hasOwnProperty;class $U extends iwe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=W5e()}copy(){const e=new $U;let t=-1;for(;++t<this.attachers.length;){const i=this.attachers[t];e.use(...i)}return e.data(TB(!0,{},this.namespace)),e}data(e,t){return typeof e=="string"?arguments.length===2?(LB("data",this.frozen),this.namespace[e]=t,this):rwe.call(this.namespace,e)&&this.namespace[e]||void 0:e?(LB("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const r=t.call(e,...i);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=n5(e),i=this.parser||this.Parser;return UB("parse",i),i(String(t),t)}process(e,t){const i=this;return this.freeze(),UB("process",this.parser||this.Parser),KB("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(o,s){const a=n5(e),c=i.parse(a);i.run(c,a,function(m,v,x){if(m||!v||!x)return A(m);const _=v,O=i.stringify(_,x);awe(O)?x.value=O:x.result=O,A(m,x)});function A(m,v){m||!v?s(m):o?o(v):t(void 0,v)}}}processSync(e){let t=!1,i;return this.freeze(),UB("processSync",this.parser||this.Parser),KB("processSync",this.compiler||this.Compiler),this.process(e,r),ZN("processSync","process",t),i;function r(o,s){t=!0,YN(o),i=s}}run(e,t,i){HN(e),this.freeze();const r=this.transformers;return!i&&typeof t=="function"&&(i=t,t=void 0),i?o(void 0,i):new Promise(o);function o(s,a){const c=n5(t);r.run(e,c,A);function A(m,v,x){const _=v||e;m?a(m):s?s(_):i(void 0,_,x)}}}runSync(e,t){let i=!1,r;return this.run(e,t,o),ZN("runSync","run",i),r;function o(s,a){YN(s),r=a,i=!0}}stringify(e,t){this.freeze();const i=n5(t),r=this.compiler||this.Compiler;return KB("stringify",r),HN(e),r(e,i)}use(e,...t){const i=this.attachers,r=this.namespace;if(LB("use",this.frozen),e!=null)if(typeof e=="function")c(e,t);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(A){if(typeof A=="function")c(A,[]);else if(typeof A=="object")if(Array.isArray(A)){const[m,...v]=A;c(m,v)}else s(A);else throw new TypeError("Expected usable value, not `"+A+"`")}function s(A){if(!("plugins"in A)&&!("settings"in A))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(A.plugins),A.settings&&(r.settings=TB(!0,r.settings,A.settings))}function a(A){let m=-1;if(A!=null)if(Array.isArray(A))for(;++m<A.length;){const v=A[m];o(v)}else throw new TypeError("Expected a list of plugins, not `"+A+"`")}function c(A,m){let v=-1,x=-1;for(;++v<i.length;)if(i[v][0]===A){x=v;break}if(x===-1)i.push([A,...m]);else if(m.length>0){let[_,...O]=m;const P=i[x][1];bR(P)&&bR(_)&&(_=TB(!0,P,_)),i[x]=[A,_,...O]}}}}const owe=new $U().freeze();function UB(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function KB(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function LB(n,e){if(e)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function HN(n){if(!bR(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function ZN(n,e,t){if(!t)throw new Error("`"+n+"` finished async. Use `"+e+"` instead")}function n5(n){return swe(n)?n:new vne(n)}function swe(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function awe(n){return typeof n=="string"||lwe(n)}function lwe(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const uwe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",XN=[],JN={allowDangerousHtml:!0},cwe=/^(https?|ircs?|mailto|xmpp)$/i,Awe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function hwe(n){const e=dwe(n),t=fwe(n);return pwe(e.runSync(e.parse(t),t),n)}function dwe(n){const e=n.rehypePlugins||XN,t=n.remarkPlugins||XN,i=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...JN}:JN;return owe().use(qMe).use(t).use(j5e,i).use(e)}function fwe(n){const e=n.children||"",t=new vne;return typeof e=="string"&&(t.value=e),t}function pwe(n,e){const t=e.allowedElements,i=e.allowElement,r=e.components,o=e.disallowedElements,s=e.skipHtml,a=e.unwrapDisallowed,c=e.urlTransform||mwe;for(const m of Awe)Object.hasOwn(e,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+uwe+m.id,void 0);return yne(n,A),w3e(n,{Fragment:ie.Fragment,components:r,ignoreInvalidStyle:!0,jsx:ie.jsx,jsxs:ie.jsxs,passKeys:!0,passNode:!0});function A(m,v,x){if(m.type==="raw"&&x&&typeof v=="number")return s?x.children.splice(v,1):x.children[v]={type:"text",value:m.value},v;if(m.type==="element"){let _;for(_ in OB)if(Object.hasOwn(OB,_)&&Object.hasOwn(m.properties,_)){const O=m.properties[_],P=OB[_];(P===null||P.includes(m.tagName))&&(m.properties[_]=c(String(O||""),_,m))}}if(m.type==="element"){let _=t?!t.includes(m.tagName):o?o.includes(m.tagName):!1;if(!_&&i&&typeof v=="number"&&(_=!i(m,v,x)),_&&x&&typeof v=="number")return a&&m.children?x.children.splice(v,1,...m.children):x.children.splice(v,1),v}}}function mwe(n){const e=n.indexOf(":"),t=n.indexOf("?"),i=n.indexOf("#"),r=n.indexOf("/");return e===-1||r!==-1&&e>r||t!==-1&&e>t||i!==-1&&e>i||cwe.test(n.slice(0,e))?n:""}function ro(){var n="/home/runner/work/maputnik/maputnik/src/components/Doc.tsx",e="a7edc49bc306eb20f0cc16abd4c84f78b7cc6807",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/Doc.tsx",statementMap:{0:{start:{line:4,column:16},end:{line:8,column:1}},1:{start:{line:11,column:26},end:{line:11,column:36}},2:{start:{line:12,column:52},end:{line:12,column:61}},3:{start:{line:13,column:23},end:{line:13,column:47}},4:{start:{line:14,column:25},end:{line:16,column:26}},5:{start:{line:17,column:28},end:{line:23,column:5}},6:{start:{line:18,column:27},end:{line:18,column:46}},7:{start:{line:19,column:6},end:{line:21,column:7}},8:{start:{line:20,column:8},end:{line:20,column:148}},9:{start:{line:22,column:6},end:{line:22,column:19}},10:{start:{line:24,column:4},end:{line:57,column:9}},11:{start:{line:27,column:76},end:{line:27,column:132}},12:{start:{line:30,column:10},end:{line:33,column:20}},13:{start:{line:40,column:12},end:{line:40,column:75}},14:{start:{line:44,column:10},end:{line:53,column:20}},15:{start:{line:47,column:14},end:{line:51,column:15}},16:{start:{line:48,column:16},end:{line:48,column:98}},17:{start:{line:50,column:16},end:{line:50,column:72}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:58,column:3}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:17,column:28},end:{line:17,column:29}},loc:{start:{line:17,column:39},end:{line:23,column:5}},line:17},2:{name:"(anonymous_2)",decl:{start:{line:27,column:13},end:{line:27,column:14}},loc:{start:{line:27,column:76},end:{line:27,column:132}},line:27},3:{name:"(anonymous_3)",decl:{start:{line:29,column:119},end:{line:29,column:120}},loc:{start:{line:29,column:137},end:{line:34,column:9}},line:29},4:{name:"(anonymous_4)",decl:{start:{line:39,column:37},end:{line:39,column:38}},loc:{start:{line:39,column:49},end:{line:41,column:11}},line:39},5:{name:"(anonymous_5)",decl:{start:{line:43,column:80},end:{line:43,column:81}},loc:{start:{line:43,column:103},end:{line:54,column:9}},line:43},6:{name:"(anonymous_6)",decl:{start:{line:46,column:37},end:{line:46,column:38}},loc:{start:{line:46,column:44},end:{line:52,column:13}},line:46}},branchMap:{0:{loc:{start:{line:14,column:25},end:{line:16,column:26}},type:"binary-expr",locations:[{start:{line:14,column:25},end:{line:14,column:33}},{start:{line:16,column:4},end:{line:16,column:26}}],line:14},1:{loc:{start:{line:19,column:6},end:{line:21,column:7}},type:"if",locations:[{start:{line:19,column:6},end:{line:21,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:19},2:{loc:{start:{line:25,column:6},end:{line:35,column:10}},type:"binary-expr",locations:[{start:{line:25,column:6},end:{line:25,column:9}},{start:{line:25,column:29},end:{line:35,column:10}}],line:25},3:{loc:{start:{line:29,column:8},end:{line:34,column:13}},type:"binary-expr",locations:[{start:{line:29,column:8},end:{line:29,column:20}},{start:{line:29,column:40},end:{line:34,column:13}}],line:29},4:{loc:{start:{line:36,column:6},end:{line:55,column:13}},type:"binary-expr",locations:[{start:{line:36,column:6},end:{line:36,column:16}},{start:{line:36,column:36},end:{line:55,column:13}}],line:36},5:{loc:{start:{line:47,column:14},end:{line:51,column:15}},type:"if",locations:[{start:{line:47,column:14},end:{line:51,column:15}},{start:{line:49,column:21},end:{line:51,column:15}}],line:47},6:{loc:{start:{line:56,column:6},end:{line:56,column:215}},type:"binary-expr",locations:[{start:{line:56,column:6},end:{line:56,column:12}},{start:{line:56,column:16},end:{line:56,column:30}},{start:{line:56,column:50},end:{line:56,column:215}}],line:56}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Doc.tsx"],names:[],mappings:"AA0Ce,SAMT,UANS,KAkBK,YAlBL;AA1Cf,OAAO,WAAW;AAClB,OAAO,cAAc;AAErB,MAAM,UAAU;AAAA,EACd,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,KAAK;AACP;AAkBA,qBAAqB,YAAY,MAAM,UAAoB;AAAA,EACzD,SAAU;AACR,UAAM,EAAC,UAAS,IAAI,KAAK;AAEzB,UAAM,EAAC,KAAK,QAAQ,QAAQ,eAAc,IAAI;AAC9C,UAAM,aAAa,UAAU,aAAa;AAE1C,UAAM,eACJ,CAAC,CAAC;AAAA;AAAA,IAGF,CAAC,MAAM,QAAQ,MAAM;AAGvB,UAAM,kBAAkB,CAAC,UAAkB;AACzC,YAAM,eAAe,MAAM,YAAY;AACvC,UAAI,aAAa,WAAW,UAAU,GAAG;AACvC,eAAO,oBAAC,OAAE,MAAM,cAAc,QAAO,UAAS,KAAI,cAAc,gBAAM,aAAa,MAAM,GAAG,EAAE,IAAI,GAAE;AAAA,MACtG;AACA,aAAO;AAAA,IACT;AAEA,WACE,iCACG;AAAA,aACC,qBAAC,SAAI,WAAU,WACb;AAAA,4BAAC,SAAI,WAAU,gBAAe,eAAY,kBACxC,8BAAC,YAAS,YAAY;AAAA,UACpB,GAAG,CAAC,EAAC,MAAM,OAAO,MAAM,UAAU,GAAG,MAAK,MAAM,oBAAC,OAAE,MAAY,QAAO,UAAU,GAAG,OAAQ,UAAS;AAAA,QACtG,GAAI,eAAI,GACV;AAAA,QACC,gBACC,oBAAC,QAAG,WAAU,mBACX,iBAAO,QAAQ,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM;AAC5C,iBACE,qBAAC,QACC;AAAA,gCAAC,UAAM,eAAK,UAAU,GAAG,GAAE;AAAA,YAC3B,oBAAC,SAAK,gBAAM,KAAI;AAAA,eAFT,GAGT;AAAA,QAEJ,CAAC,GACH;AAAA,SAEJ;AAAA,MAED,cACC,oBAAC,SAAI,WAAU,wBACb,+BAAC,WAAM,WAAU,+BACf;AAAA,4BAAC,WACC,+BAAC,QACC;AAAA,8BAAC,QAAG;AAAA,UACH,OAAO,OAAO,OAAO,EAAE,IAAI,YAAU;AACpC,mBAAO,oBAAC,QAAiB,oBAAT,MAAgB;AAAA,UAClC,CAAC;AAAA,WACH,GACF;AAAA,QACA,oBAAC,WACE,iBAAO,QAAQ,UAAU,EAAE,IAAI,CAAC,CAAC,KAAK,UAAU,MAAM;AACrD,iBACE,qBAAC,QACC;AAAA,gCAAC,QAAI,eAAI;AAAA,YACR,OAAO,KAAK,OAAO,EAAE,IAAI,CAAC,MAAM;AAC/B,kBAAI,OAAO,UAAU,eAAe,KAAK,YAAY,CAAC,GAAG;AACvD,uBAAO,oBAAC,QAAY,0BAAgB,WAAW,CAAyB,CAAC,KAAzD,CAA2D;AAAA,cAC7E,OACK;AACH,uBAAO,oBAAC,QAAW,kBAAH,CAAK;AAAA,cACvB;AAAA,YACF,CAAC;AAAA,eATM,GAUT;AAAA,QAEJ,CAAC,GACH;AAAA,SACF,GACF;AAAA,MAED,UAAU,kBACT,oBAAC,SAAI,WAAU,uBACb,8BAAC,OAAE,MAAM,QAAS,QAAO,UAAS,KAAI,cAAc,0BAAe,GACrE;AAAA,OAEJ;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a7edc49bc306eb20f0cc16abd4c84f78b7cc6807"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return ro=function(){return s},s}ro();const eG=(ro().s[0]++,{js:"JS",android:"Android",ios:"iOS"});class t6 extends En.Component{render(){ro().f[0]++;const{fieldSpec:e}=(ro().s[1]++,this.props),{doc:t,values:i,docUrl:r,docUrlLinkText:o}=(ro().s[2]++,e),s=(ro().s[3]++,e["sdk-support"]),a=(ro().s[4]++,ro().b[0][0]++,!!i&&(ro().b[0][1]++,!Array.isArray(i)));ro().s[5]++;const c=A=>{ro().f[1]++;const m=(ro().s[6]++,A.toLowerCase());return ro().s[7]++,m.startsWith("https://")?(ro().b[1][0]++,ro().s[8]++,ie.jsx("a",{href:m,target:"_blank",rel:"noreferrer",children:"#"+m.split("/").pop()})):(ro().b[1][1]++,ro().s[9]++,A)};return ro().s[10]++,ie.jsxs(ie.Fragment,{children:[(ro().b[2][0]++,t&&(ro().b[2][1]++,ie.jsxs("div",{className:"SpecDoc",children:[ie.jsx("div",{className:"SpecDoc__doc","data-wd-key":"spec-field-doc",children:ie.jsx(hwe,{components:{a:({node:A,href:m,children:v,...x})=>(ro().f[2]++,ro().s[11]++,ie.jsx("a",{href:m,target:"_blank",...x,children:v}))},children:t})}),(ro().b[3][0]++,a&&(ro().b[3][1]++,ie.jsx("ul",{className:"SpecDoc__values",children:Object.entries(i).map(([A,m])=>(ro().f[3]++,ro().s[12]++,ie.jsxs("li",{children:[ie.jsx("code",{children:JSON.stringify(A)}),ie.jsx("div",{children:m.doc})]},A)))})))]}))),(ro().b[4][0]++,s&&(ro().b[4][1]++,ie.jsx("div",{className:"SpecDoc__sdk-support",children:ie.jsxs("table",{className:"SpecDoc__sdk-support__table",children:[ie.jsx("thead",{children:ie.jsxs("tr",{children:[ie.jsx("th",{}),Object.values(eG).map(A=>(ro().f[4]++,ro().s[13]++,ie.jsx("th",{children:A},A)))]})}),ie.jsx("tbody",{children:Object.entries(s).map(([A,m])=>(ro().f[5]++,ro().s[14]++,ie.jsxs("tr",{children:[ie.jsx("td",{children:A}),Object.keys(eG).map(v=>(ro().f[6]++,ro().s[15]++,Object.prototype.hasOwnProperty.call(m,v)?(ro().b[5][0]++,ro().s[16]++,ie.jsx("td",{children:c(m[v])},v)):(ro().b[5][1]++,ro().s[17]++,ie.jsx("td",{children:"no"},v))))]},A)))})]})}))),(ro().b[6][0]++,r&&(ro().b[6][1]++,o)&&(ro().b[6][2]++,ie.jsx("div",{className:"SpecDoc__learn-more",children:ie.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:o})})))]})}}function Xr(){var n="/home/runner/work/maputnik/maputnik/src/components/Block.tsx",e="a026f5c10cd11169be04acaaf924d5e996792a37",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/Block.tsx",statementMap:{0:{start:{line:7,column:13},end:{line:7,column:17}},1:{start:{line:9,column:4},end:{line:9,column:17}},2:{start:{line:10,column:4},end:{line:12,column:6}},3:{start:{line:15,column:18},end:{line:15,column:32}},4:{start:{line:16,column:4},end:{line:18,column:5}},5:{start:{line:17,column:6},end:{line:17,column:64}},6:{start:{line:20,column:16},end:{line:24,column:3}},7:{start:{line:21,column:4},end:{line:23,column:7}},8:{start:{line:31,column:17},end:{line:40,column:3}},9:{start:{line:32,column:15},end:{line:32,column:39}},10:{start:{line:33,column:21},end:{line:33,column:48}},11:{start:{line:34,column:4},end:{line:36,column:5}},12:{start:{line:35,column:6},end:{line:35,column:30}},13:{start:{line:37,column:4},end:{line:39,column:5}},14:{start:{line:38,column:6},end:{line:38,column:29}},15:{start:{line:42,column:4},end:{line:78,column:6}},16:{start:{line:66,column:12},end:{line:66,column:31}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:21},end:{line:13,column:3}},line:8},1:{name:"(anonymous_1)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:14},end:{line:19,column:3}},line:14},2:{name:"(anonymous_2)",decl:{start:{line:20,column:16},end:{line:20,column:17}},loc:{start:{line:20,column:25},end:{line:24,column:3}},line:20},3:{name:"(anonymous_3)",decl:{start:{line:31,column:17},end:{line:31,column:18}},loc:{start:{line:31,column:28},end:{line:40,column:3}},line:31},4:{name:"(anonymous_4)",decl:{start:{line:41,column:2},end:{line:41,column:3}},loc:{start:{line:41,column:11},end:{line:79,column:3}},line:41},5:{name:"(anonymous_5)",decl:{start:{line:65,column:87},end:{line:65,column:88}},loc:{start:{line:65,column:95},end:{line:67,column:11}},line:65}},branchMap:{0:{loc:{start:{line:16,column:4},end:{line:18,column:5}},type:"if",locations:[{start:{line:16,column:4},end:{line:18,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:16},1:{loc:{start:{line:17,column:33},end:{line:17,column:62}},type:"cond-expr",locations:[{start:{line:17,column:48},end:{line:17,column:54}},{start:{line:17,column:57},end:{line:17,column:62}}],line:17},2:{loc:{start:{line:34,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:34,column:4},end:{line:36,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:34},3:{loc:{start:{line:34,column:8},end:{line:34,column:66}},type:"binary-expr",locations:[{start:{line:34,column:8},end:{line:34,column:53}},{start:{line:34,column:57},end:{line:34,column:66}}],line:34},4:{loc:{start:{line:37,column:4},end:{line:39,column:5}},type:"if",locations:[{start:{line:37,column:4},end:{line:39,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:37},5:{loc:{start:{line:55,column:10},end:{line:62,column:14}},type:"binary-expr",locations:[{start:{line:55,column:10},end:{line:55,column:30}},{start:{line:55,column:50},end:{line:62,column:14}}],line:55},6:{loc:{start:{line:63,column:10},end:{line:63,column:134}},type:"binary-expr",locations:[{start:{line:63,column:10},end:{line:63,column:31}},{start:{line:63,column:51},end:{line:63,column:134}}],line:63},7:{loc:{start:{line:68,column:10},end:{line:75,column:11}},type:"binary-expr",locations:[{start:{line:68,column:10},end:{line:68,column:30}},{start:{line:68,column:50},end:{line:75,column:11}}],line:68},8:{loc:{start:{line:72,column:32},end:{line:72,column:64}},type:"cond-expr",locations:[{start:{line:72,column:53},end:{line:72,column:55}},{start:{line:72,column:58},end:{line:72,column:64}}],line:72}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Block.tsx"],names:[],mappings:"AA+DW,SAYD,KAZC;AA/DX,OAAO,WAA8E;AACrF,OAAO,gBAAgB;AACvB,OAAO,mBAAmB;AAC1B,OAAO,SAAS;AAkBhB,qBAAqB,cAAc,MAAM,UAAkC;AAAA,EACzE,WAAkC;AAAA,EAElC,YAAa,OAAmB;AAC9B,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EAEA,SAAS,GAAwE;AAC/E,UAAM,QAAQ,EAAE,OAAO;AACvB,QAAI,KAAK,MAAM,UAAU;AACvB,aAAO,KAAK,MAAM,SAAS,UAAU,KAAK,SAAY,KAAK;AAAA,IAC7D;AAAA,EACF;AAAA,EAEA,cAAc,CAAC,QAAiB;AAC9B,SAAK,SAAS;AAAA,MACZ,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,eAAe,CAAC,UAAoC;AAClD,UAAM,KAAK,MAAM,YAAY;AAC7B,UAAM,WAAW,KAAK,UAAU,SAAS,EAAE;AAE3C,QAAI,MAAM,YAAY,OAAO,aAAa,WAAW,CAAC,UAAU;AAC9D,YAAM,gBAAgB;AAAA,IACxB;AACA,QAAI,MAAM,YAAY,OAAO,aAAa,KAAK;AAC7C,YAAM,eAAe;AAAA,IACvB;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QAAM,OAAO,KAAK,MAAM;AAAA,QAC9B,eAAa,KAAK,MAAM,aAAa;AAAA,QACrC,WAAW,WAAW;AAAA,UACpB,wBAAwB;AAAA,UACxB,8BAA8B,KAAK,MAAM;AAAA,UACzC,yBAAyB,KAAK,MAAM;AAAA,UACpC,+BAA+B,KAAK,MAAM;AAAA,QAC5C,CAAC;AAAA,QACD,SAAS,KAAK;AAAA,QAEb;AAAA,eAAK,MAAM,aACV,oBAAC,SAAI,WAAU,8BACb;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,KAAK,MAAM;AAAA,cAClB,aAAa,KAAK;AAAA,cAClB,WAAW,KAAK,MAAM;AAAA;AAAA,UACxB,GACF;AAAA,UAED,CAAC,KAAK,MAAM,aACX,oBAAC,SAAI,WAAU,8BACZ,eAAK,MAAM,OACd;AAAA,UAEF,oBAAC,SAAI,WAAU,+BACZ,eAAK,MAAM,QACd;AAAA,UACA,oBAAC,SAAI,WAAU,gCAA+B,KAAK,QAAM;AAAC,iBAAK,WAAW;AAAA,UAAG,GAC1E,eAAK,MAAM,UACd;AAAA,UACC,KAAK,MAAM,aACV;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO,EAAC,SAAS,KAAK,MAAM,UAAU,KAAK,OAAM;AAAA,cAEjD,8BAAC,OAAI,WAAW,KAAK,MAAM,WAAW;AAAA;AAAA,UACxC;AAAA;AAAA;AAAA,IAEJ;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a026f5c10cd11169be04acaaf924d5e996792a37"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Xr=function(){return s},s}Xr();class Fs extends En.Component{_blockEl=(Xr().s[0]++,null);constructor(e){Xr().f[0]++,Xr().s[1]++,super(e),Xr().s[2]++,this.state={showDoc:!1}}onChange(e){Xr().f[1]++;const t=(Xr().s[3]++,e.target.value);if(Xr().s[4]++,this.props.onChange)return Xr().b[0][0]++,Xr().s[5]++,this.props.onChange(t===""?(Xr().b[1][0]++,void 0):(Xr().b[1][1]++,t));Xr().b[0][1]++}onToggleDoc=(Xr().s[6]++,e=>{Xr().f[2]++,Xr().s[7]++,this.setState({showDoc:e})});onLabelClick=(Xr().s[8]++,e=>{Xr().f[3]++;const t=(Xr().s[9]++,e.nativeEvent.target),i=(Xr().s[10]++,this._blockEl?.contains(t));Xr().s[11]++,Xr().b[3][0]++,e.nativeEvent.target.nodeName!=="INPUT"&&(Xr().b[3][1]++,!i)?(Xr().b[2][0]++,Xr().s[12]++,e.stopPropagation()):Xr().b[2][1]++,Xr().s[13]++,e.nativeEvent.target.nodeName!=="A"?(Xr().b[4][0]++,Xr().s[14]++,e.preventDefault()):Xr().b[4][1]++});render(){return Xr().f[4]++,Xr().s[15]++,ie.jsxs("label",{style:this.props.style,"data-wd-key":this.props["data-wd-key"],className:Yg({"maputnik-input-block":!0,"maputnik-input-block--wide":this.props.wideMode,"maputnik-action-block":this.props.action,"maputnik-input-block--error":this.props.error}),onClick:this.onLabelClick,children:[(Xr().b[5][0]++,this.props.fieldSpec&&(Xr().b[5][1]++,ie.jsx("div",{className:"maputnik-input-block-label",children:ie.jsx(DU,{label:this.props.label,onToggleDoc:this.onToggleDoc,fieldSpec:this.props.fieldSpec})}))),(Xr().b[6][0]++,!this.props.fieldSpec&&(Xr().b[6][1]++,ie.jsx("div",{className:"maputnik-input-block-label",children:this.props.label}))),ie.jsx("div",{className:"maputnik-input-block-action",children:this.props.action}),ie.jsx("div",{className:"maputnik-input-block-content",ref:e=>{Xr().f[5]++,Xr().s[16]++,this._blockEl=e},children:this.props.children}),(Xr().b[7][0]++,this.props.fieldSpec&&(Xr().b[7][1]++,ie.jsx("div",{className:"maputnik-doc-inline",style:{display:this.state.showDoc?(Xr().b[8][0]++,""):(Xr().b[8][1]++,"none")},children:ie.jsx(t6,{fieldSpec:this.props.fieldSpec})})))]})}}function oA(){var n="/home/runner/work/maputnik/maputnik/src/components/InputSelect.tsx",e="1b99a181d4a9dd7b629113889cbb71c3a4bb4d42",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputSelect.tsx",statementMap:{0:{start:{line:5,column:18},end:{line:5,column:36}},1:{start:{line:6,column:4},end:{line:8,column:5}},2:{start:{line:7,column:6},end:{line:7,column:43}},3:{start:{line:7,column:35},end:{line:7,column:41}},4:{start:{line:9,column:4},end:{line:21,column:6}},5:{start:{line:17,column:25},end:{line:17,column:60}},6:{start:{line:19,column:64},end:{line:19,column:115}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:2},end:{line:4,column:3}},loc:{start:{line:4,column:11},end:{line:22,column:3}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:7,column:28},end:{line:7,column:29}},loc:{start:{line:7,column:35},end:{line:7,column:41}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:17,column:18},end:{line:17,column:19}},loc:{start:{line:17,column:25},end:{line:17,column:60}},line:17},3:{name:"(anonymous_3)",decl:{start:{line:19,column:30},end:{line:19,column:31}},loc:{start:{line:19,column:64},end:{line:19,column:115}},line:19}},branchMap:{0:{loc:{start:{line:6,column:4},end:{line:8,column:5}},type:"if",locations:[{start:{line:6,column:4},end:{line:8,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:6},1:{loc:{start:{line:6,column:8},end:{line:6,column:56}},type:"binary-expr",locations:[{start:{line:6,column:8},end:{line:6,column:26}},{start:{line:6,column:30},end:{line:6,column:56}}],line:6}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputSelect.tsx"],names:[],mappings:"AA4BsC;AA5BtC,OAAO,WAAW;AAYlB,qBAAqB,oBAAoB,MAAM,UAA4B;AAAA,EACzE,SAAS;AACP,QAAI,UAAU,KAAK,MAAM;AACzB,QAAG,QAAQ,SAAS,KAAK,CAAC,MAAM,QAAQ,QAAQ,CAAC,CAAC,GAAG;AACnD,gBAAU,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAAA,IACrC;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,eAAa,KAAK,MAAM,aAAa;AAAA,QACrC,OAAO,KAAK,MAAM;AAAA,QAClB,OAAO,KAAK,MAAM;AAAA,QAClB,OAAO,KAAK,MAAM;AAAA,QAClB,UAAU,OAAK,KAAK,MAAM,SAAS,EAAE,OAAO,KAAK;AAAA,QACjD,cAAY,KAAK,MAAM,YAAY;AAAA,QAEjC,kBAAQ,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,oBAAC,YAAiB,OAAO,KAAM,mBAAlB,GAAwB,CAAS;AAAA;AAAA,IAChF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1b99a181d4a9dd7b629113889cbb71c3a4bb4d42"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return oA=function(){return s},s}oA();class Wb extends En.Component{render(){oA().f[0]++;let e=(oA().s[0]++,this.props.options);return oA().s[1]++,oA().b[1][0]++,e.length>0&&(oA().b[1][1]++,!Array.isArray(e[0]))?(oA().b[0][0]++,oA().s[2]++,e=e.map(t=>(oA().f[1]++,oA().s[3]++,[t,t]))):oA().b[0][1]++,oA().s[4]++,ie.jsx("select",{className:"maputnik-select","data-wd-key":this.props["data-wd-key"],style:this.props.style,title:this.props.title,value:this.props.value,onChange:t=>(oA().f[2]++,oA().s[5]++,this.props.onChange(t.target.value)),"aria-label":this.props["aria-label"],children:e.map(([t,i])=>(oA().f[3]++,oA().s[6]++,ie.jsx("option",{value:t,children:i},t)))})}}function ar(){var n="/home/runner/work/maputnik/maputnik/src/components/InputString.tsx",e="ffe977722e3215b5f6718c464b93680839810a41",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputString.tsx",statementMap:{0:{start:{line:3,column:24},end:{line:6,column:3}},1:{start:{line:8,column:4},end:{line:8,column:17}},2:{start:{line:9,column:4},end:{line:12,column:6}},3:{start:{line:15,column:4},end:{line:19,column:5}},4:{start:{line:16,column:6},end:{line:18,column:8}},5:{start:{line:20,column:4},end:{line:20,column:14}},6:{start:{line:25,column:4},end:{line:36,column:5}},7:{start:{line:26,column:6},end:{line:26,column:23}},8:{start:{line:27,column:6},end:{line:30,column:8}},9:{start:{line:32,column:6},end:{line:32,column:20}},10:{start:{line:33,column:6},end:{line:35,column:8}},11:{start:{line:37,column:4},end:{line:39,column:5}},12:{start:{line:38,column:6},end:{line:38,column:48}},13:{start:{line:40,column:4},end:{line:70,column:7}},14:{start:{line:51,column:8},end:{line:56,column:11}},15:{start:{line:55,column:10},end:{line:55,column:71}},16:{start:{line:55,column:34},end:{line:55,column:71}},17:{start:{line:59,column:8},end:{line:62,column:9}},18:{start:{line:60,column:10},end:{line:60,column:44}},19:{start:{line:61,column:10},end:{line:61,column:73}},20:{start:{line:61,column:35},end:{line:61,column:73}},21:{start:{line:65,column:8},end:{line:67,column:9}},22:{start:{line:66,column:10},end:{line:66,column:48}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:13},end:{line:4,column:14}},loc:{start:{line:4,column:19},end:{line:5,column:5}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:21},end:{line:13,column:3}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:48},end:{line:21,column:3}},line:14},3:{name:"(anonymous_3)",decl:{start:{line:22,column:2},end:{line:22,column:3}},loc:{start:{line:22,column:11},end:{line:71,column:3}},line:22},4:{name:"(anonymous_4)",decl:{start:{line:50,column:16},end:{line:50,column:17}},loc:{start:{line:50,column:23},end:{line:57,column:7}},line:50},5:{name:"(anonymous_5)",decl:{start:{line:54,column:11},end:{line:54,column:12}},loc:{start:{line:54,column:17},end:{line:56,column:9}},line:54},6:{name:"(anonymous_6)",decl:{start:{line:58,column:14},end:{line:58,column:15}},loc:{start:{line:58,column:20},end:{line:63,column:7}},line:58},7:{name:"(anonymous_7)",decl:{start:{line:64,column:17},end:{line:64,column:18}},loc:{start:{line:64,column:24},end:{line:68,column:7}},line:64}},branchMap:{0:{loc:{start:{line:11,column:13},end:{line:11,column:30}},type:"binary-expr",locations:[{start:{line:11,column:13},end:{line:11,column:24}},{start:{line:11,column:28},end:{line:11,column:30}}],line:11},1:{loc:{start:{line:15,column:4},end:{line:19,column:5}},type:"if",locations:[{start:{line:15,column:4},end:{line:19,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:15},2:{loc:{start:{line:25,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:25,column:4},end:{line:36,column:5}},{start:{line:31,column:11},end:{line:36,column:5}}],line:25},3:{loc:{start:{line:37,column:4},end:{line:39,column:5}},type:"if",locations:[{start:{line:37,column:4},end:{line:39,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:37},4:{loc:{start:{line:43,column:18},end:{line:43,column:125}},type:"cond-expr",locations:[{start:{line:43,column:83},end:{line:43,column:104}},{start:{line:43,column:107},end:{line:43,column:125}}],line:43},5:{loc:{start:{line:47,column:13},end:{line:47,column:64}},type:"cond-expr",locations:[{start:{line:47,column:43},end:{line:47,column:45}},{start:{line:47,column:48},end:{line:47,column:64}}],line:47},6:{loc:{start:{line:55,column:10},end:{line:55,column:71}},type:"if",locations:[{start:{line:55,column:10},end:{line:55,column:71}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:55},7:{loc:{start:{line:59,column:8},end:{line:62,column:9}},type:"if",locations:[{start:{line:59,column:8},end:{line:62,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:59},8:{loc:{start:{line:61,column:10},end:{line:61,column:73}},type:"if",locations:[{start:{line:61,column:10},end:{line:61,column:73}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:61},9:{loc:{start:{line:65,column:8},end:{line:67,column:9}},type:"if",locations:[{start:{line:65,column:8},end:{line:67,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:65},10:{loc:{start:{line:65,column:12},end:{line:65,column:51}},type:"binary-expr",locations:[{start:{line:65,column:12},end:{line:65,column:28}},{start:{line:65,column:32},end:{line:65,column:51}}],line:65}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputString.tsx"],names:[],mappings:"AAAA,OAAO,WAAW;AAsBlB,qBAAqB,oBAAoB,MAAM,UAA8C;AAAA,EAC3F,OAAO,eAAe;AAAA,IACpB,SAAS,MAAM;AAAA,IAAC;AAAA,EAClB;AAAA,EAEA,YAAY,OAAyB;AACnC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,SAAS;AAAA,MACT,OAAO,MAAM,SAAS;AAAA,IACxB;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAAmC,OAAyB;AAC1F,QAAI,CAAC,MAAM,SAAS;AAClB,aAAO;AAAA,QACL,OAAO,MAAM;AAAA,MACf;AAAA,IACF;AACA,WAAO,CAAC;AAAA,EACV;AAAA,EAEA,SAAS;AACP,QAAI;AACJ,QAAI;AAEJ,QAAG,KAAK,MAAM,OAAO;AACnB,YAAM;AACN,gBAAU;AAAA,QACR;AAAA,QACA;AAAA,MACF;AAAA,IACF,OACK;AACH,YAAM;AACN,gBAAU;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,QAAG,KAAK,MAAM,UAAU;AACtB,cAAQ,KAAK,2BAA2B;AAAA,IAC1C;AAEA,WAAO,MAAM,cAAc,KAAK;AAAA,MAC9B,cAAc,KAAK,MAAM,YAAY;AAAA,MACrC,eAAe,KAAK,MAAM,aAAa;AAAA,MACvC,YAAY,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO,YAAY,IAAI,KAAK,MAAM,aAAa,EAAE,QAAQ;AAAA,MAC/G,UAAU,KAAK,MAAM;AAAA,MACrB,WAAW,QAAQ,KAAK,GAAG;AAAA,MAC3B,OAAO,KAAK,MAAM;AAAA,MAClB,OAAO,KAAK,MAAM,UAAU,SAAY,KAAK,KAAK,MAAM;AAAA,MACxD,aAAa,KAAK,MAAM;AAAA,MACxB,OAAO,KAAK,MAAM;AAAA,MAClB,UAAU,CAAC,MAA2E;AACpF,aAAK,SAAS;AAAA,UACZ,SAAS;AAAA,UACT,OAAO,EAAE,OAAO;AAAA,QAClB,GAAG,MAAM;AACP,cAAI,KAAK,MAAM,QAAS,MAAK,MAAM,QAAQ,KAAK,MAAM,KAAK;AAAA,QAC7D,CAAC;AAAA,MACH;AAAA,MACA,QAAQ,MAAM;AACZ,YAAG,KAAK,MAAM,UAAQ,KAAK,MAAM,OAAO;AACtC,eAAK,SAAS,EAAC,SAAS,MAAK,CAAC;AAC9B,cAAI,KAAK,MAAM,SAAU,MAAK,MAAM,SAAS,KAAK,MAAM,KAAK;AAAA,QAC/D;AAAA,MACF;AAAA,MACA,WAAW,CAAC,MAAM;AAChB,YAAI,EAAE,YAAY,MAAM,KAAK,MAAM,UAAU;AAC3C,eAAK,MAAM,SAAS,KAAK,MAAM,KAAK;AAAA,QACtC;AAAA,MACF;AAAA,MACA,UAAU,KAAK,MAAM;AAAA,IACvB,CAAC;AAAA,EACH;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ffe977722e3215b5f6718c464b93680839810a41"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return ar=function(){return s},s}ar();class dm extends En.Component{static defaultProps=(ar().s[0]++,{onInput:()=>{ar().f[0]++}});constructor(e){ar().f[1]++,ar().s[1]++,super(e),ar().s[2]++,this.state={editing:!1,value:(ar().b[0][0]++,e.value||(ar().b[0][1]++,""))}}static getDerivedStateFromProps(e,t){if(ar().f[2]++,ar().s[3]++,t.editing)ar().b[1][1]++;else return ar().b[1][0]++,ar().s[4]++,{value:e.value};return ar().s[5]++,{}}render(){ar().f[3]++;let e,t;return ar().s[6]++,this.props.multi?(ar().b[2][0]++,ar().s[7]++,e="textarea",ar().s[8]++,t=["maputnik-string","maputnik-string--multi"]):(ar().b[2][1]++,ar().s[9]++,e="input",ar().s[10]++,t=["maputnik-string"]),ar().s[11]++,this.props.disabled?(ar().b[3][0]++,ar().s[12]++,t.push("maputnik-string--disabled")):ar().b[3][1]++,ar().s[13]++,En.createElement(e,{"aria-label":this.props["aria-label"],"data-wd-key":this.props["data-wd-key"],spellCheck:Object.prototype.hasOwnProperty.call(this.props,"spellCheck")?(ar().b[4][0]++,this.props.spellCheck):(ar().b[4][1]++,e!=="input"),disabled:this.props.disabled,className:t.join(" "),style:this.props.style,value:this.state.value===void 0?(ar().b[5][0]++,""):(ar().b[5][1]++,this.state.value),placeholder:this.props.default,title:this.props.title,onChange:i=>{ar().f[4]++,ar().s[14]++,this.setState({editing:!0,value:i.target.value},()=>{ar().f[5]++,ar().s[15]++,this.props.onInput?(ar().b[6][0]++,ar().s[16]++,this.props.onInput(this.state.value)):ar().b[6][1]++})},onBlur:()=>{ar().f[6]++,ar().s[17]++,this.state.value!==this.props.value?(ar().b[7][0]++,ar().s[18]++,this.setState({editing:!1}),ar().s[19]++,this.props.onChange?(ar().b[8][0]++,ar().s[20]++,this.props.onChange(this.state.value)):ar().b[8][1]++):ar().b[7][1]++},onKeyDown:i=>{ar().f[7]++,ar().s[21]++,ar().b[10][0]++,i.keyCode===13&&(ar().b[10][1]++,this.props.onChange)?(ar().b[9][0]++,ar().s[22]++,this.props.onChange(this.state.value)):ar().b[9][1]++},required:this.props.required})}}function TA(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldType.tsx",e="599a12b14a1057b6bb554b629d0d81238d4af16c",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldType.tsx",statementMap:{0:{start:{line:8,column:26},end:{line:38,column:1}},1:{start:{line:16,column:22},end:{line:16,column:110}},2:{start:{line:16,column:73},end:{line:16,column:109}},3:{start:{line:17,column:2},end:{line:37,column:4}},4:{start:{line:39,column:18},end:{line:39,column:54}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:26},end:{line:8,column:27}},loc:{start:{line:15,column:6},end:{line:38,column:1}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:16,column:66},end:{line:16,column:67}},loc:{start:{line:16,column:73},end:{line:16,column:109}},line:16}},branchMap:{0:{loc:{start:{line:14,column:2},end:{line:14,column:18}},type:"default-arg",locations:[{start:{line:14,column:13},end:{line:14,column:18}}],line:14},1:{loc:{start:{line:16,column:34},end:{line:16,column:60}},type:"binary-expr",locations:[{start:{line:16,column:34},end:{line:16,column:54}},{start:{line:16,column:58},end:{line:16,column:60}}],line:16},2:{loc:{start:{line:25,column:8},end:{line:25,column:79}},type:"binary-expr",locations:[{start:{line:25,column:8},end:{line:25,column:16}},{start:{line:25,column:36},end:{line:25,column:79}}],line:25},3:{loc:{start:{line:26,column:8},end:{line:34,column:9}},type:"binary-expr",locations:[{start:{line:26,column:8},end:{line:26,column:17}},{start:{line:26,column:37},end:{line:34,column:9}}],line:26}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0},b:{0:[0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldType.tsx"],names:[],mappings:"AA0BI,SAKI,KALJ;AAzBJ,SAAQ,UAAS;AACjB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,SAA+B,uBAAuB;AACtD,SAAS,iBAAiB;AAU1B,MAAM,oBAAsD,CAAC;AAAA,EAC3D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AACb,MAAM;AACJ,QAAM,cAAkC,OAAO,KAAK,GAAG,MAAM,KAAK,UAAU,CAAC,CAAC,EAAE,IAAI,OAAK,CAAC,GAAG,UAAU,EAAE,QAAQ,MAAM,GAAG,CAAC,CAAC,CAAC;AAC7H,SACE;AAAA,IAAC;AAAA;AAAA,MAAM,OAAO,EAAE,MAAM;AAAA,MAAG,WAAW,GAAG,MAAM;AAAA,MAC3C,eAAa;AAAA,MACb;AAAA,MAEC;AAAA,oBACC,oBAAC,eAAY,OAAc,UAAU,MAAM;AAAA,QAE5C,CAAC,YACA;AAAA,UAAC;AAAA;AAAA,YACC,SAAS;AAAA,YACT;AAAA,YACA;AAAA,YACA,eAAa,QAAQ;AAAA;AAAA,QACvB;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,MAAM,YAAY,gBAAgB,EAAE,iBAAiB;AACrD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"599a12b14a1057b6bb554b629d0d81238d4af16c"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return TA=function(){return s},s}TA();TA().s[0]++;const gwe=({t:n,value:e,wdKey:t,onChange:i,error:r,disabled:o=(TA().b[0][0]++,!1)})=>{TA().f[0]++;const s=(TA().s[1]++,Object.keys((TA().b[1][0]++,$f.layer.type.values||(TA().b[1][1]++,{}))).map(a=>(TA().f[1]++,TA().s[2]++,[a,T4.startCase(a.replace(/-/g," "))])));return TA().s[3]++,ie.jsxs(Fs,{label:n("Type"),fieldSpec:$f.layer.type,"data-wd-key":t,error:r,children:[(TA().b[2][0]++,o&&(TA().b[2][1]++,ie.jsx(dm,{value:e,disabled:!0}))),(TA().b[3][0]++,!o&&(TA().b[3][1]++,ie.jsx(Wb,{options:s,onChange:i,value:e,"data-wd-key":t+".select"})))]})},bne=(TA().s[4]++,Jo()(gwe));function n4(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldId.tsx",e="faa51332e301a2db02ecf3d9679788ae744c6d26",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldId.tsx",statementMap:{0:{start:{line:5,column:16},end:{line:23,column:1}},1:{start:{line:6,column:2},end:{line:22,column:4}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:16},end:{line:5,column:17}},loc:{start:{line:5,column:27},end:{line:23,column:1}},line:5}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldId.tsx"],names:[],mappings:"AAkBM;AAjBN,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AASxB,MAAM,UAAkC,CAAC,UAAU;AACjD,SACE;AAAA,IAAC;AAAA;AAAA,MAAM,OAAM;AAAA,MAAK,WAAW,OAAO,MAAM;AAAA,MACxC,eAAa,MAAM;AAAA,MACnB,OAAO,MAAM;AAAA,MAEb;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,MAAM;AAAA,UACb,SAAS,MAAM;AAAA,UACf,eAAa,MAAM,QAAQ;AAAA;AAAA,MAC7B;AAAA;AAAA,EACF;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"faa51332e301a2db02ecf3d9679788ae744c6d26"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return n4=function(){return s},s}n4();n4().s[0]++;const Cne=n=>(n4().f[0]++,n4().s[1]++,ie.jsx(Fs,{label:"ID",fieldSpec:Jr.layer.id,"data-wd-key":n.wdKey,error:n.error,children:ie.jsx(dm,{value:n.value,onInput:n.onChange,"data-wd-key":n.wdKey+".input"})}));function i5(n,e){if(n==null)return{};var t={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(e.indexOf(i)!==-1)continue;t[i]=n[i]}return t}function ml(){return ml=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},ml.apply(null,arguments)}var ywe=s1();const pr=Wl(ywe);var FB={exports:{}},Hs={};/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var tG;function vwe(){if(tG)return Hs;tG=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),O;O=Symbol.for("react.module.reference");function P(F){if(typeof F=="object"&&F!==null){var j=F.$$typeof;switch(j){case n:switch(F=F.type,F){case t:case r:case i:case A:case m:return F;default:switch(F=F&&F.$$typeof,F){case a:case s:case c:case x:case v:case o:return F;default:return j}}case e:return j}}}return Hs.ContextConsumer=s,Hs.ContextProvider=o,Hs.Element=n,Hs.ForwardRef=c,Hs.Fragment=t,Hs.Lazy=x,Hs.Memo=v,Hs.Portal=e,Hs.Profiler=r,Hs.StrictMode=i,Hs.Suspense=A,Hs.SuspenseList=m,Hs.isAsyncMode=function(){return!1},Hs.isConcurrentMode=function(){return!1},Hs.isContextConsumer=function(F){return P(F)===s},Hs.isContextProvider=function(F){return P(F)===o},Hs.isElement=function(F){return typeof F=="object"&&F!==null&&F.$$typeof===n},Hs.isForwardRef=function(F){return P(F)===c},Hs.isFragment=function(F){return P(F)===t},Hs.isLazy=function(F){return P(F)===x},Hs.isMemo=function(F){return P(F)===v},Hs.isPortal=function(F){return P(F)===e},Hs.isProfiler=function(F){return P(F)===r},Hs.isStrictMode=function(F){return P(F)===i},Hs.isSuspense=function(F){return P(F)===A},Hs.isSuspenseList=function(F){return P(F)===m},Hs.isValidElementType=function(F){return typeof F=="string"||typeof F=="function"||F===t||F===r||F===i||F===A||F===m||F===_||typeof F=="object"&&F!==null&&(F.$$typeof===x||F.$$typeof===v||F.$$typeof===o||F.$$typeof===s||F.$$typeof===c||F.$$typeof===O||F.getModuleId!==void 0)},Hs.typeOf=P,Hs}var nG;function bwe(){return nG||(nG=1,FB.exports=vwe()),FB.exports}bwe();const iG=n=>typeof n=="object"&&n!=null&&n.nodeType===1,rG=(n,e)=>(!e||n!=="hidden")&&n!=="visible"&&n!=="clip",r5=(n,e)=>{if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){const t=getComputedStyle(n,null);return rG(t.overflowY,e)||rG(t.overflowX,e)||(i=>{const r=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!r&&(r.clientHeight<i.scrollHeight||r.clientWidth<i.scrollWidth)})(n)}return!1},o5=(n,e,t,i,r,o,s,a)=>o<n&&s>e||o>n&&s<e?0:o<=n&&a<=t||s>=e&&a>=t?o-n-i:s>e&&a<t||o<n&&a>t?s-e+r:0,Cwe=n=>{const e=n.parentElement;return e??(n.getRootNode().host||null)},_we=(n,e)=>{var t,i,r,o;if(typeof document>"u")return[];const{inline:s,boundary:a,skipOverflowHiddenElements:c}=e,A=typeof a=="function"?a:we=>we!==a;if(!iG(n))throw new TypeError("Invalid target");const m=document.scrollingElement||document.documentElement,v=[];let x=n;for(;iG(x)&&A(x);){if(x=Cwe(x),x===m){v.push(x);break}x!=null&&x===document.body&&r5(x)&&!r5(document.documentElement)||x!=null&&r5(x,c)&&v.push(x)}const _=(i=(t=window.visualViewport)==null?void 0:t.width)!=null?i:innerWidth,O=(o=(r=window.visualViewport)==null?void 0:r.height)!=null?o:innerHeight,{scrollX:P,scrollY:F}=window,{height:j,width:Q,top:V,right:H,bottom:G,left:Y}=n.getBoundingClientRect(),{top:z,right:se,left:le}=(we=>{const ke=window.getComputedStyle(we);return{top:parseFloat(ke.scrollMarginTop)||0,right:parseFloat(ke.scrollMarginRight)||0,bottom:parseFloat(ke.scrollMarginBottom)||0,left:parseFloat(ke.scrollMarginLeft)||0}})(n);let me=V-z,fe=s==="center"?Y+Q/2-le+se:s==="end"?H+se:Y-le;const _e=[];for(let we=0;we<v.length;we++){const ke=v[we],{height:je,width:Ie,top:Qe,right:tt,bottom:ht,left:ce}=ke.getBoundingClientRect();if(V>=0&&Y>=0&&G<=O&&H<=_&&(ke===m&&!r5(ke)||V>=Qe&&G<=ht&&Y>=ce&&H<=tt))return _e;const Le=getComputedStyle(ke),We=parseInt(Le.borderLeftWidth,10),Me=parseInt(Le.borderTopWidth,10),dt=parseInt(Le.borderRightWidth,10),it=parseInt(Le.borderBottomWidth,10);let vt=0,Ut=0;const Pe="offsetWidth"in ke?ke.offsetWidth-ke.clientWidth-We-dt:0,Te="offsetHeight"in ke?ke.offsetHeight-ke.clientHeight-Me-it:0,Se="offsetWidth"in ke?ke.offsetWidth===0?0:Ie/ke.offsetWidth:0,Ne="offsetHeight"in ke?ke.offsetHeight===0?0:je/ke.offsetHeight:0;if(m===ke)vt=o5(F,F+O,O,Me,it,F+me,F+me+j,j),Ut=s==="start"?fe:s==="center"?fe-_/2:s==="end"?fe-_:o5(P,P+_,_,We,dt,P+fe,P+fe+Q,Q),vt=Math.max(0,vt+F),Ut=Math.max(0,Ut+P);else{vt=o5(Qe,ht,je,Me,it+Te,me,me+j,j),Ut=s==="start"?fe-ce-We:s==="center"?fe-(ce+Ie/2)+Pe/2:s==="end"?fe-tt+dt+Pe:o5(ce,tt,Ie,We,dt+Pe,fe,fe+Q,Q);const{scrollLeft:ut,scrollTop:rt}=ke;vt=Ne===0?0:Math.max(0,Math.min(rt+vt/Ne,ke.scrollHeight-je/Ne+Te)),Ut=Se===0?0:Math.max(0,Math.min(ut+Ut/Se,ke.scrollWidth-Ie/Se+Pe)),me+=rt-vt,fe+=ut-Ut}_e.push({el:ke,top:vt,left:Ut})}return _e};var ux=function(){return ux=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},ux.apply(this,arguments)};var xwe=0;function _ne(){}function Mwe(n,e){if(n){var t=_we(n,{boundary:e});t.forEach(function(i){var r=i.el,o=i.top,s=i.left;r.scrollTop=o,r.scrollLeft=s})}}function oG(n,e,t){var i=n===e||e instanceof t.Node&&n.contains&&n.contains(e);return i}function xne(n,e){var t;function i(){t&&clearTimeout(t)}function r(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];i(),t=setTimeout(function(){t=null,n.apply(void 0,s)},e)}return r.cancel=i,r}function P0(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return function(i){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return e.some(function(a){return a&&a.apply(void 0,[i].concat(o)),i.preventDownshiftDefault||i.hasOwnProperty("nativeEvent")&&i.nativeEvent.preventDownshiftDefault})}}function s5(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return function(i){e.forEach(function(r){typeof r=="function"?r(i):r&&(r.current=i)})}}function wwe(){return String(xwe++)}function _R(n,e){return!n||!e?n:Object.keys(n).reduce(function(t,i){return t[i]=Mne(e,i)?e[i]:n[i],t},{})}function Mne(n,e){return n[e]!==void 0}function Swe(n){var e=n.key,t=n.keyCode;return t>=37&&t<=40&&e.indexOf("Arrow")!==0?"Arrow"+e:e}function a5(n,e,t,i,r){var o=t.length;if(o===0)return-1;var s=o-1;(typeof n!="number"||n<0||n>s)&&(n=e>0?-1:s+1);var a=n+e;a<0?a=s:a>s&&(a=0);var c=fS(a,e<0,t,i,r);return c===-1?n>=o?-1:n:c}function fS(n,e,t,i,r){r===void 0&&(r=!1);var o=t.length;if(e){for(var s=n;s>=0;s--)if(!i(t[s],s))return s}else for(var a=n;a<o;a++)if(!i(t[a],a))return a;return r?fS(e?o-1:0,e,t,i):-1}function sG(n,e,t,i){return i===void 0&&(i=!0),t&&e.some(function(r){return r&&(oG(r,n,t)||i&&oG(r,t.document.activeElement,t))})}var Ewe=xne(function(n){wne(n).textContent=""},500);function wne(n){var e=n.getElementById("a11y-status-message");return e||(e=n.createElement("div"),e.setAttribute("id","a11y-status-message"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-relevant","additions text"),Object.assign(e.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),n.body.appendChild(e),e)}function Owe(n,e){if(!(!n||!e)){var t=wne(e);t.textContent=n,Ewe(e)}}function Bwe(n){var e=n?.getElementById("a11y-status-message");e&&e.remove()}var Sne={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function Iwe(n,e,t){var i=n.props,r=n.type,o={};Object.keys(e).forEach(function(s){kwe(s,n,e,t),t[s]!==e[s]&&(o[s]=t[s])}),i.onStateChange&&Object.keys(o).length&&i.onStateChange(ml({type:r},o))}function kwe(n,e,t,i){var r=e.props,o=e.type,s="on"+VU(n)+"Change";r[s]&&i[n]!==void 0&&i[n]!==t[n]&&r[s](ml({type:o},i))}function Twe(n,e){return e.changes}var aG=xne(function(n,e){Owe(n,e)},200),Rwe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?wt.useLayoutEffect:wt.useEffect,Dwe="useId"in En?function(e){var t=e.id,i=e.labelId,r=e.menuId,o=e.getItemId,s=e.toggleButtonId,a=e.inputId,c="downshift-"+En.useId();t||(t=c);var A=wt.useRef({labelId:i||t+"-label",menuId:r||t+"-menu",getItemId:o||function(m){return t+"-item-"+m},toggleButtonId:s||t+"-toggle-button",inputId:a||t+"-input"});return A.current}:function(e){var t=e.id,i=t===void 0?"downshift-"+wwe():t,r=e.labelId,o=e.menuId,s=e.getItemId,a=e.toggleButtonId,c=e.inputId,A=wt.useRef({labelId:r||i+"-label",menuId:o||i+"-menu",getItemId:s||function(m){return i+"-item-"+m},toggleButtonId:a||i+"-toggle-button",inputId:c||i+"-input"});return A.current};function Pwe(n,e,t,i){var r,o;if(n===void 0){if(e===void 0)throw new Error(i);r=t[e],o=e}else o=e===void 0?t.indexOf(n):e,r=n;return[r,o]}function VU(n){return""+n.slice(0,1).toUpperCase()+n.slice(1)}function Ene(n){var e=wt.useRef(n);return e.current=n,e}function Uwe(n,e,t,i){var r=wt.useRef(),o=wt.useRef(),s=wt.useCallback(function(_,O){o.current=O,_=_R(_,O.props);var P=n(_,O),F=O.props.stateReducer(_,ml({},O,{changes:P}));return F},[n]),a=wt.useReducer(s,e,t),c=a[0],A=a[1],m=Ene(e),v=wt.useCallback(function(_){return A(ml({props:m.current},_))},[m]),x=o.current;return wt.useEffect(function(){var _=_R(r.current,x?.props),O=x&&r.current&&!i(_,c);O&&Iwe(x,_,c),r.current=c},[c,x,i]),[c,v]}var A3={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:Twe,scrollIntoView:Mwe,environment:typeof window>"u"?void 0:window};function Wy(n,e,t){t===void 0&&(t=Sne);var i=n["default"+VU(e)];return i!==void 0?i:t[e]}function h3(n,e,t){t===void 0&&(t=Sne);var i=n[e];if(i!==void 0)return i;var r=n["initial"+VU(e)];return r!==void 0?r:Wy(n,e,t)}function Kwe(n){var e=h3(n,"selectedItem"),t=h3(n,"isOpen"),i=Gwe(n),r=h3(n,"inputValue");return{highlightedIndex:i<0&&e&&t?n.items.findIndex(function(o){return n.itemToKey(o)===n.itemToKey(e)}):i,isOpen:t,selectedItem:e,inputValue:r}}function d3(n,e,t){var i=n.items,r=n.initialHighlightedIndex,o=n.defaultHighlightedIndex,s=n.isItemDisabled,a=n.itemToKey,c=e.selectedItem,A=e.highlightedIndex;return i.length===0?-1:r!==void 0&&A===r&&!s(i[r],r)?r:o!==void 0&&!s(i[o],o)?o:c?i.findIndex(function(m){return a(c)===a(m)}):t<0&&!s(i[i.length-1],i.length-1)?i.length-1:t>0&&!s(i[0],0)?0:-1}function Lwe(n,e,t){var i=wt.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1});return wt.useEffect(function(){if(!n)return _ne;var r=t.map(function(m){return m.current});function o(){i.current.isTouchEnd=!1,i.current.isMouseDown=!0}function s(m){i.current.isMouseDown=!1,sG(m.target,r,n)||e()}function a(){i.current.isTouchEnd=!1,i.current.isTouchMove=!1}function c(){i.current.isTouchMove=!0}function A(m){i.current.isTouchEnd=!0,!i.current.isTouchMove&&!sG(m.target,r,n,!1)&&e()}return n.addEventListener("mousedown",o),n.addEventListener("mouseup",s),n.addEventListener("touchstart",a),n.addEventListener("touchmove",c),n.addEventListener("touchend",A),function(){n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",s),n.removeEventListener("touchstart",a),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",A)}},[t,n,e]),i.current}var Fwe=function(){return _ne};function zwe(n,e,t,i){i===void 0&&(i={});var r=i.document,o=HU();wt.useEffect(function(){if(!(!n||o||!r)){var s=n(e);aG(s,r)}},t),wt.useEffect(function(){return function(){aG.cancel(),Bwe(r)}},[r])}function jwe(n){var e=n.highlightedIndex,t=n.isOpen,i=n.itemRefs,r=n.getItemNodeFromIndex,o=n.menuElement,s=n.scrollIntoView,a=wt.useRef(!0);return Rwe(function(){e<0||!t||!Object.keys(i.current).length||(a.current===!1?a.current=!0:s(r(e),o))},[e]),a}function lG(n,e,t){var i;t===void 0&&(t=!0);var r=((i=n.items)==null?void 0:i.length)&&e>=0;return ml({isOpen:!1,highlightedIndex:-1},r&&ml({selectedItem:n.items[e],isOpen:Wy(n,"isOpen"),highlightedIndex:Wy(n,"highlightedIndex")},t&&{inputValue:n.itemToString(n.items[e])}))}function Nwe(n,e){return n.isOpen===e.isOpen&&n.inputValue===e.inputValue&&n.highlightedIndex===e.highlightedIndex&&n.selectedItem===e.selectedItem}function HU(){var n=En.useRef(!0);return En.useEffect(function(){return n.current=!1,function(){n.current=!0}},[]),n.current}function xR(n){var e=Wy(n,"highlightedIndex");return e>-1&&n.isItemDisabled(n.items[e],e)?-1:e}function Gwe(n){var e=h3(n,"highlightedIndex");return e>-1&&n.isItemDisabled(n.items[e],e)?-1:e}var ew={environment:pr.shape({addEventListener:pr.func.isRequired,removeEventListener:pr.func.isRequired,document:pr.shape({createElement:pr.func.isRequired,getElementById:pr.func.isRequired,activeElement:pr.any.isRequired,body:pr.any.isRequired}).isRequired,Node:pr.func.isRequired}),itemToString:pr.func,itemToKey:pr.func,stateReducer:pr.func},One=ml({},ew,{getA11yStatusMessage:pr.func,highlightedIndex:pr.number,defaultHighlightedIndex:pr.number,initialHighlightedIndex:pr.number,isOpen:pr.bool,defaultIsOpen:pr.bool,initialIsOpen:pr.bool,selectedItem:pr.any,initialSelectedItem:pr.any,defaultSelectedItem:pr.any,id:pr.string,labelId:pr.string,menuId:pr.string,getItemId:pr.func,toggleButtonId:pr.string,onSelectedItemChange:pr.func,onHighlightedIndexChange:pr.func,onStateChange:pr.func,onIsOpenChange:pr.func,scrollIntoView:pr.func});function Wwe(n,e,t){var i=e.type,r=e.props,o;switch(i){case t.ItemMouseMove:o={highlightedIndex:e.disabled?-1:e.index};break;case t.MenuMouseLeave:o={highlightedIndex:-1};break;case t.ToggleButtonClick:case t.FunctionToggleMenu:o={isOpen:!n.isOpen,highlightedIndex:n.isOpen?-1:d3(r,n,0)};break;case t.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:d3(r,n,0)};break;case t.FunctionCloseMenu:o={isOpen:!1};break;case t.FunctionSetHighlightedIndex:o={highlightedIndex:r.isItemDisabled(r.items[e.highlightedIndex],e.highlightedIndex)?-1:e.highlightedIndex};break;case t.FunctionSetInputValue:o={inputValue:e.inputValue};break;case t.FunctionReset:o={highlightedIndex:xR(r),isOpen:Wy(r,"isOpen"),selectedItem:Wy(r,"selectedItem"),inputValue:Wy(r,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ml({},n,o)}ux(ux({},One),{items:pr.array.isRequired,isItemDisabled:pr.func});ux(ux({},A3),{isItemDisabled:function(){return!1}});var ZU=0,XU=1,JU=2,eK=3,tK=4,nK=5,iK=6,rK=7,oK=8,pS=9,sK=10,Bne=11,Ine=12,aK=13,kne=14,Tne=15,Rne=16,Dne=17,Pne=18,lK=19,Une=20,Kne=21,uK=22,Lne=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:uK,FunctionCloseMenu:Dne,FunctionOpenMenu:Rne,FunctionReset:Kne,FunctionSelectItem:lK,FunctionSetHighlightedIndex:Pne,FunctionSetInputValue:Une,FunctionToggleMenu:Tne,InputBlur:pS,InputChange:oK,InputClick:sK,InputKeyDownArrowDown:ZU,InputKeyDownArrowUp:XU,InputKeyDownEnd:tK,InputKeyDownEnter:rK,InputKeyDownEscape:JU,InputKeyDownHome:eK,InputKeyDownPageDown:iK,InputKeyDownPageUp:nK,ItemClick:aK,ItemMouseMove:Ine,MenuMouseLeave:Bne,ToggleButtonClick:kne});function Qwe(n){var e=Kwe(n),t=e.selectedItem,i=e.inputValue;return i===""&&t&&n.defaultInputValue===void 0&&n.initialInputValue===void 0&&n.inputValue===void 0&&(i=n.itemToString(t)),ml({},e,{inputValue:i})}ml({},One,{items:pr.array.isRequired,isItemDisabled:pr.func,inputValue:pr.string,defaultInputValue:pr.string,initialInputValue:pr.string,inputId:pr.string,onInputValueChange:pr.func});function qwe(n,e,t,i){var r=wt.useRef(),o=Uwe(n,e,t,i),s=o[0],a=o[1],c=HU();return wt.useEffect(function(){if(Mne(e,"selectedItem")){if(!c){var A=e.itemToKey(e.selectedItem)!==e.itemToKey(r.current);A&&a({type:uK,inputValue:e.itemToString(e.selectedItem)})}r.current=s.selectedItem===r.current?e.selectedItem:s.selectedItem}},[s.selectedItem,e.selectedItem]),[_R(s,e),a]}var Ywe=ml({},A3,{isItemDisabled:function(){return!1}});function $we(n,e){var t,i=e.type,r=e.props,o=e.altKey,s;switch(i){case aK:s={isOpen:Wy(r,"isOpen"),highlightedIndex:xR(r),selectedItem:r.items[e.index],inputValue:r.itemToString(r.items[e.index])};break;case ZU:n.isOpen?s={highlightedIndex:a5(n.highlightedIndex,1,r.items,r.isItemDisabled,!0)}:s={highlightedIndex:o&&n.selectedItem==null?-1:d3(r,n,1),isOpen:r.items.length>=0};break;case XU:n.isOpen?o?s=lG(r,n.highlightedIndex):s={highlightedIndex:a5(n.highlightedIndex,-1,r.items,r.isItemDisabled,!0)}:s={highlightedIndex:d3(r,n,-1),isOpen:r.items.length>=0};break;case rK:s=lG(r,n.highlightedIndex);break;case JU:s=ml({isOpen:!1,highlightedIndex:-1},!n.isOpen&&{selectedItem:null,inputValue:""});break;case nK:s={highlightedIndex:a5(n.highlightedIndex,-10,r.items,r.isItemDisabled,!0)};break;case iK:s={highlightedIndex:a5(n.highlightedIndex,10,r.items,r.isItemDisabled,!0)};break;case eK:s={highlightedIndex:fS(0,!1,r.items,r.isItemDisabled)};break;case tK:s={highlightedIndex:fS(r.items.length-1,!0,r.items,r.isItemDisabled)};break;case pS:s=ml({isOpen:!1,highlightedIndex:-1},n.highlightedIndex>=0&&((t=r.items)==null?void 0:t.length)&&e.selectItem&&{selectedItem:r.items[n.highlightedIndex],inputValue:r.itemToString(r.items[n.highlightedIndex])});break;case oK:s={isOpen:!0,highlightedIndex:xR(r),inputValue:e.inputValue};break;case sK:s={isOpen:!n.isOpen,highlightedIndex:n.isOpen?-1:d3(r,n,0)};break;case lK:s={selectedItem:e.selectedItem,inputValue:r.itemToString(e.selectedItem)};break;case uK:s={inputValue:e.inputValue};break;default:return Wwe(n,e,Lne)}return ml({},n,s)}var Vwe=["onMouseLeave","refKey","ref"],Hwe=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],Zwe=["onClick","onPress","refKey","ref"],Xwe=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];MR.stateChangeTypes=Lne;function MR(n){n===void 0&&(n={});var e=ml({},Ywe,n),t=e.items,i=e.scrollIntoView,r=e.environment,o=e.getA11yStatusMessage,s=qwe($we,e,Qwe,Nwe),a=s[0],c=s[1],A=a.isOpen,m=a.highlightedIndex,v=a.selectedItem,x=a.inputValue,_=wt.useRef(null),O=wt.useRef({}),P=wt.useRef(null),F=wt.useRef(null),j=HU(),Q=Dwe(e),V=wt.useRef(),H=Ene({state:a,props:e}),G=wt.useCallback(function(We){return O.current[Q.getItemId(We)]},[Q]);zwe(o,a,[A,m,v,x],r);var Y=jwe({menuElement:_.current,highlightedIndex:m,isOpen:A,itemRefs:O,scrollIntoView:i,getItemNodeFromIndex:G});wt.useEffect(function(){var We=h3(e,"isOpen");We&&P.current&&P.current.focus()},[]),wt.useEffect(function(){j||(V.current=t.length)});var z=Lwe(r,wt.useCallback(function(){H.current.state.isOpen&&c({type:pS,selectItem:!1})},[c,H]),wt.useMemo(function(){return[_,F,P]},[_.current,F.current,P.current])),se=Fwe();wt.useEffect(function(){A||(O.current={})},[A]),wt.useEffect(function(){var We;!A||!(r!=null&&r.document)||!(P!=null&&(We=P.current)!=null&&We.focus)||r.document.activeElement!==P.current&&P.current.focus()},[A,r]);var le=wt.useMemo(function(){return{ArrowDown:function(Me){Me.preventDefault(),c({type:ZU,altKey:Me.altKey})},ArrowUp:function(Me){Me.preventDefault(),c({type:XU,altKey:Me.altKey})},Home:function(Me){H.current.state.isOpen&&(Me.preventDefault(),c({type:eK}))},End:function(Me){H.current.state.isOpen&&(Me.preventDefault(),c({type:tK}))},Escape:function(Me){var dt=H.current.state;(dt.isOpen||dt.inputValue||dt.selectedItem||dt.highlightedIndex>-1)&&(Me.preventDefault(),c({type:JU}))},Enter:function(Me){var dt=H.current.state;!dt.isOpen||Me.which===229||(Me.preventDefault(),c({type:rK}))},PageUp:function(Me){H.current.state.isOpen&&(Me.preventDefault(),c({type:nK}))},PageDown:function(Me){H.current.state.isOpen&&(Me.preventDefault(),c({type:iK}))}}},[c,H]),me=wt.useCallback(function(We){return ml({id:Q.labelId,htmlFor:Q.inputId},We)},[Q]),fe=wt.useCallback(function(We,Me){var dt,it=We===void 0?{}:We,vt=it.onMouseLeave,Ut=it.refKey,Pe=Ut===void 0?"ref":Ut,Te=it.ref,Se=i5(it,Vwe),Ne=Me===void 0?{}:Me;return Ne.suppressRefError,ml((dt={},dt[Pe]=s5(Te,function(ut){_.current=ut}),dt.id=Q.menuId,dt.role="listbox",dt["aria-labelledby"]=Se&&Se["aria-label"]?void 0:""+Q.labelId,dt.onMouseLeave=P0(vt,function(){c({type:Bne})}),dt),Se)},[c,se,Q]),_e=wt.useCallback(function(We){var Me,dt,it=We===void 0?{}:We,vt=it.item,Ut=it.index,Pe=it.refKey,Te=Pe===void 0?"ref":Pe,Se=it.ref,Ne=it.onMouseMove,ut=it.onMouseDown,rt=it.onClick;it.onPress;var mt=it.disabled,Rt=i5(it,Hwe);mt!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var Bt=H.current,$t=Bt.props,Rn=Bt.state,zn=Pwe(vt,Ut,$t.items,"Pass either item or index to getItemProps!"),ai=zn[0],_n=zn[1],Bn=$t.isItemDisabled(ai,_n),dn="onClick",li=rt,In=function(){z.isTouchEnd||_n===Rn.highlightedIndex||(Y.current=!1,c({type:Ine,index:_n,disabled:Bn}))},It=function(){c({type:aK,index:_n})},xe=function(J){return J.preventDefault()};return ml((Me={},Me[Te]=s5(Se,function(oe){oe&&(O.current[Q.getItemId(_n)]=oe)}),Me["aria-disabled"]=Bn,Me["aria-selected"]=_n===Rn.highlightedIndex,Me.id=Q.getItemId(_n),Me.role="option",Me),!Bn&&(dt={},dt[dn]=P0(li,It),dt),{onMouseMove:P0(Ne,In),onMouseDown:P0(ut,xe)},Rt)},[c,Q,H,z,Y]),we=wt.useCallback(function(We){var Me,dt=We===void 0?{}:We,it=dt.onClick;dt.onPress;var vt=dt.refKey,Ut=vt===void 0?"ref":vt,Pe=dt.ref,Te=i5(dt,Zwe),Se=H.current.state,Ne=function(){c({type:kne})};return ml((Me={},Me[Ut]=s5(Pe,function(ut){F.current=ut}),Me["aria-controls"]=Q.menuId,Me["aria-expanded"]=Se.isOpen,Me.id=Q.toggleButtonId,Me.tabIndex=-1,Me),!Te.disabled&&ml({},{onClick:P0(it,Ne)}),Te)},[c,H,Q]),ke=wt.useCallback(function(We,Me){var dt,it=We===void 0?{}:We,vt=it.onKeyDown,Ut=it.onChange,Pe=it.onInput,Te=it.onBlur;it.onChangeText;var Se=it.onClick,Ne=it.refKey,ut=Ne===void 0?"ref":Ne,rt=it.ref,mt=i5(it,Xwe),Rt=Me===void 0?{}:Me;Rt.suppressRefError;var Bt=H.current.state,$t=function(In){var It=Swe(In);It&&le[It]&&le[It](In)},Rn=function(In){c({type:oK,inputValue:In.target.value})},zn=function(In){if(r!=null&&r.document&&Bt.isOpen&&!z.isMouseDown){var It=In.relatedTarget===null&&r.document.activeElement!==r.document.body;c({type:pS,selectItem:!It})}},ai=function(){c({type:sK})},_n="onChange",Bn={};if(!mt.disabled){var dn;Bn=(dn={},dn[_n]=P0(Ut,Pe,Rn),dn.onKeyDown=P0(vt,$t),dn.onBlur=P0(Te,zn),dn.onClick=P0(Se,ai),dn)}return ml((dt={},dt[ut]=s5(rt,function(li){P.current=li}),dt["aria-activedescendant"]=Bt.isOpen&&Bt.highlightedIndex>-1?Q.getItemId(Bt.highlightedIndex):"",dt["aria-autocomplete"]="list",dt["aria-controls"]=Q.menuId,dt["aria-expanded"]=Bt.isOpen,dt["aria-labelledby"]=mt&&mt["aria-label"]?void 0:Q.labelId,dt.autoComplete="off",dt.id=Q.inputId,dt.role="combobox",dt.value=Bt.inputValue,dt),Bn,mt)},[c,Q,r,le,H,z,se]),je=wt.useCallback(function(){c({type:Tne})},[c]),Ie=wt.useCallback(function(){c({type:Dne})},[c]),Qe=wt.useCallback(function(){c({type:Rne})},[c]),tt=wt.useCallback(function(We){c({type:Pne,highlightedIndex:We})},[c]),ht=wt.useCallback(function(We){c({type:lK,selectedItem:We})},[c]),ce=wt.useCallback(function(We){c({type:Une,inputValue:We})},[c]),Le=wt.useCallback(function(){c({type:Kne})},[c]);return{getItemProps:_e,getLabelProps:me,getMenuProps:fe,getInputProps:ke,getToggleButtonProps:we,toggleMenu:je,openMenu:Qe,closeMenu:Ie,setHighlightedIndex:tt,setInputValue:ce,selectItem:ht,reset:Le,highlightedIndex:m,isOpen:A,selectedItem:v,inputValue:x}}ew.stateReducer,ew.itemToKey,ew.environment,pr.array,pr.array,pr.array,pr.func,pr.number,pr.number,pr.number,pr.func,pr.func,pr.string,pr.string;A3.itemToKey,A3.stateReducer,A3.environment;function fi(){var n="/home/runner/work/maputnik/maputnik/src/components/InputAutocomplete.tsx",e="73020a5a2032027cc342d42db613082f6da43a81",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputAutocomplete.tsx",statementMap:{0:{start:{line:5,column:19},end:{line:5,column:22}},1:{start:{line:13,column:28},end:{line:13,column:55}},2:{start:{line:14,column:18},end:{line:14,column:36}},3:{start:{line:15,column:36},end:{line:15,column:62}},4:{start:{line:16,column:24},end:{line:19,column:22}},5:{start:{line:17,column:15},end:{line:17,column:34}},6:{start:{line:18,column:4},end:{line:18,column:72}},7:{start:{line:18,column:36},end:{line:18,column:70}},8:{start:{line:20,column:24},end:{line:25,column:8}},9:{start:{line:21,column:4},end:{line:24,column:5}},10:{start:{line:22,column:20},end:{line:22,column:84}},11:{start:{line:23,column:6},end:{line:23,column:48}},12:{start:{line:33,column:6},end:{line:55,column:4}},13:{start:{line:36,column:28},end:{line:36,column:47}},14:{start:{line:38,column:6},end:{line:40,column:7}},15:{start:{line:39,column:8},end:{line:39,column:51}},16:{start:{line:41,column:6},end:{line:41,column:28}},17:{start:{line:44,column:16},end:{line:44,column:51}},18:{start:{line:45,column:6},end:{line:45,column:18}},19:{start:{line:46,column:6},end:{line:46,column:56}},20:{start:{line:49,column:6},end:{line:53,column:7}},21:{start:{line:50,column:8},end:{line:50,column:20}},22:{start:{line:51,column:8},end:{line:51,column:40}},23:{start:{line:52,column:8},end:{line:52,column:19}},24:{start:{line:56,column:2},end:{line:60,column:30}},25:{start:{line:57,column:4},end:{line:59,column:5}},26:{start:{line:58,column:6},end:{line:58,column:22}},27:{start:{line:61,column:2},end:{line:64,column:22}},28:{start:{line:62,column:4},end:{line:62,column:53}},29:{start:{line:63,column:4},end:{line:63,column:69}},30:{start:{line:63,column:17},end:{line:63,column:68}},31:{start:{line:65,column:2},end:{line:67,column:14}},32:{start:{line:66,column:4},end:{line:66,column:26}},33:{start:{line:68,column:2},end:{line:103,column:7}},34:{start:{line:76,column:25},end:{line:76,column:35}},35:{start:{line:87,column:79},end:{line:100,column:9}}},fnMap:{0:{name:"InputAutocomplete",decl:{start:{line:6,column:24},end:{line:6,column:41}},loc:{start:{line:12,column:3},end:{line:104,column:1}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:9,column:13},end:{line:9,column:14}},loc:{start:{line:9,column:19},end:{line:10,column:3}},line:9},2:{name:"(anonymous_2)",decl:{start:{line:16,column:38},end:{line:16,column:39}},loc:{start:{line:16,column:44},end:{line:19,column:3}},line:16},3:{name:"(anonymous_3)",decl:{start:{line:18,column:26},end:{line:18,column:27}},loc:{start:{line:18,column:36},end:{line:18,column:70}},line:18},4:{name:"(anonymous_4)",decl:{start:{line:20,column:42},end:{line:20,column:43}},loc:{start:{line:20,column:48},end:{line:25,column:3}},line:20},5:{name:"(anonymous_5)",decl:{start:{line:36,column:18},end:{line:36,column:19}},loc:{start:{line:36,column:28},end:{line:36,column:47}},line:36},6:{name:"(anonymous_6)",decl:{start:{line:37,column:18},end:{line:37,column:19}},loc:{start:{line:37,column:38},end:{line:42,column:5}},line:37},7:{name:"(anonymous_7)",decl:{start:{line:43,column:26},end:{line:43,column:27}},loc:{start:{line:43,column:48},end:{line:47,column:5}},line:43},8:{name:"(anonymous_8)",decl:{start:{line:48,column:24},end:{line:48,column:25}},loc:{start:{line:48,column:47},end:{line:54,column:5}},line:48},9:{name:"(anonymous_9)",decl:{start:{line:56,column:18},end:{line:56,column:19}},loc:{start:{line:56,column:24},end:{line:60,column:3}},line:56},10:{name:"(anonymous_10)",decl:{start:{line:61,column:18},end:{line:61,column:19}},loc:{start:{line:61,column:24},end:{line:64,column:3}},line:61},11:{name:"(anonymous_11)",decl:{start:{line:63,column:11},end:{line:63,column:12}},loc:{start:{line:63,column:17},end:{line:63,column:68}},line:63},12:{name:"(anonymous_12)",decl:{start:{line:65,column:18},end:{line:65,column:19}},loc:{start:{line:65,column:24},end:{line:67,column:3}},line:65},13:{name:"(anonymous_13)",decl:{start:{line:76,column:19},end:{line:76,column:20}},loc:{start:{line:76,column:25},end:{line:76,column:35}},line:76},14:{name:"(anonymous_14)",decl:{start:{line:87,column:46},end:{line:87,column:47}},loc:{start:{line:87,column:79},end:{line:100,column:9}},line:87}},branchMap:{0:{loc:{start:{line:8,column:2},end:{line:8,column:14}},type:"default-arg",locations:[{start:{line:8,column:12},end:{line:8,column:14}}],line:8},1:{loc:{start:{line:9,column:2},end:{line:10,column:3}},type:"default-arg",locations:[{start:{line:9,column:13},end:{line:10,column:3}}],line:9},2:{loc:{start:{line:13,column:43},end:{line:13,column:54}},type:"binary-expr",locations:[{start:{line:13,column:43},end:{line:13,column:48}},{start:{line:13,column:52},end:{line:13,column:54}}],line:13},3:{loc:{start:{line:21,column:4},end:{line:24,column:5}},type:"if",locations:[{start:{line:21,column:4},end:{line:24,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:21},4:{loc:{start:{line:36,column:28},end:{line:36,column:47}},type:"cond-expr",locations:[{start:{line:36,column:35},end:{line:36,column:42}},{start:{line:36,column:45},end:{line:36,column:47}}],line:36},5:{loc:{start:{line:38,column:6},end:{line:40,column:7}},type:"if",locations:[{start:{line:38,column:6},end:{line:40,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:38},6:{loc:{start:{line:44,column:16},end:{line:44,column:51}},type:"cond-expr",locations:[{start:{line:44,column:31},end:{line:44,column:46}},{start:{line:44,column:49},end:{line:44,column:51}}],line:44},7:{loc:{start:{line:46,column:15},end:{line:46,column:54}},type:"cond-expr",locations:[{start:{line:46,column:30},end:{line:46,column:45}},{start:{line:46,column:48},end:{line:46,column:54}}],line:46},8:{loc:{start:{line:49,column:6},end:{line:53,column:7}},type:"if",locations:[{start:{line:49,column:6},end:{line:53,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:49},9:{loc:{start:{line:51,column:17},end:{line:51,column:38}},type:"cond-expr",locations:[{start:{line:51,column:28},end:{line:51,column:34}},{start:{line:51,column:37},end:{line:51,column:38}}],line:51},10:{loc:{start:{line:57,column:4},end:{line:59,column:5}},type:"if",locations:[{start:{line:57,column:4},end:{line:59,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:57},11:{loc:{start:{line:66,column:13},end:{line:66,column:24}},type:"binary-expr",locations:[{start:{line:66,column:13},end:{line:66,column:18}},{start:{line:66,column:22},end:{line:66,column:24}}],line:66},12:{loc:{start:{line:87,column:18},end:{line:100,column:10}},type:"binary-expr",locations:[{start:{line:87,column:18},end:{line:87,column:24}},{start:{line:87,column:28},end:{line:100,column:10}}],line:87}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0},b:{0:[0],1:[0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputAutocomplete.tsx"],names:[],mappings:"AAkFI,SACE,KADF;AAlFJ,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,SAAQ,mBAAkB;AAE1B,MAAM,aAAa;AASnB,wBAAwB,kBAAkB;AAAA,EACxC;AAAA,EACA,UAAU,CAAC;AAAA,EACX,WAAW,MAAM;AAAA,EAAC;AAAA,EAClB,cAAc;AAChB,GAA2B;AACzB,QAAM,CAAC,OAAO,QAAQ,IAAI,MAAM,SAAS,SAAS,EAAE;AACpD,QAAM,UAAU,MAAM,OAAuB,IAAI;AACjD,QAAM,CAAC,WAAW,YAAY,IAAI,MAAM,SAAS,UAAU;AAE3D,QAAM,gBAAgB,MAAM,QAAQ,MAAM;AACxC,UAAM,KAAK,MAAM,YAAY;AAC7B,WAAO,QAAQ,OAAO,CAAC,SAAS,KAAK,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AAAA,EACpE,GAAG,CAAC,SAAS,KAAK,CAAC;AAEnB,QAAM,gBAAgB,MAAM,YAAY,MAAM;AAC5C,QAAI,QAAQ,SAAS;AACnB,YAAM,QAAQ,OAAO,cAAc,QAAQ,QAAQ,sBAAsB,EAAE;AAC3E,mBAAa,KAAK,IAAI,OAAO,UAAU,CAAC;AAAA,IAC1C;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,YAAY;AAAA,IACd,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,cAAc,CAAC,SAAU,OAAO,KAAK,CAAC,IAAI;AAAA,IAC1C,cAAc,CAAC,QAAQ,WAAW;AAChC,UAAI,OAAO,SAAS,YAAY,iBAAiB,YAAY;AAC3D,eAAO,EAAC,GAAG,OAAO,SAAS,QAAQ,KAAI;AAAA,MACzC;AACA,aAAO,OAAO;AAAA,IAChB;AAAA,IACA,sBAAsB,CAAC,EAAC,aAAY,MAAM;AACxC,YAAM,IAAI,eAAe,aAAa,CAAC,IAAI;AAC3C,eAAS,CAAC;AACV,eAAS,eAAe,aAAa,CAAC,IAAI,MAAS;AAAA,IACrD;AAAA,IACA,oBAAoB,CAAC,EAAC,YAAY,EAAC,MAAM;AACvC,UAAI,OAAO,MAAM,UAAU;AACzB,iBAAS,CAAC;AACV,iBAAS,MAAM,KAAK,SAAY,CAAC;AACjC,iBAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF,CAAC;AAED,QAAM,UAAU,MAAM;AACpB,QAAI,QAAQ;AACV,oBAAc;AAAA,IAChB;AAAA,EACF,GAAG,CAAC,QAAQ,aAAa,CAAC;AAE1B,QAAM,UAAU,MAAM;AACpB,WAAO,iBAAiB,UAAU,aAAa;AAC/C,WAAO,MAAM,OAAO,oBAAoB,UAAU,aAAa;AAAA,EACjE,GAAG,CAAC,aAAa,CAAC;AAElB,QAAM,UAAU,MAAM;AACpB,aAAS,SAAS,EAAE;AAAA,EACtB,GAAG,CAAC,KAAK,CAAC;AAEV,SACE,qBAAC,SAAI,WAAU,yBACb;AAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG,cAAc;AAAA,UAChB,cAAc;AAAA,UACd,WAAW;AAAA,UACX,YAAY;AAAA,UACZ,SAAS,MAAM,SAAS;AAAA,QAC1B,CAAC;AAAA;AAAA,IACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG,aAAa,CAAC,GAAG,EAAC,kBAAkB,KAAI,CAAC;AAAA,QAC7C,KAAK;AAAA,QACL,OAAO,EAAC,UAAU,SAAS,UAAU,QAAQ,WAAW,QAAQ,IAAG;AAAA,QACnE,WAAU;AAAA,QAET,oBACC,cAAc,IAAI,CAAC,MAAM,UACvB;AAAA,UAAC;AAAA;AAAA,YAEE,GAAG,aAAa;AAAA,cACf;AAAA,cACA;AAAA,cACA,WAAW,WAAW,mCAAmC;AAAA,gBACvD,4CAA4C,qBAAqB;AAAA,cACnE,CAAC;AAAA,YACH,CAAC;AAAA,YAEA,eAAK,CAAC;AAAA;AAAA,UATF,KAAK,CAAC;AAAA,QAUb,CACD;AAAA;AAAA,IACL;AAAA,KACF;AAEJ;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"73020a5a2032027cc342d42db613082f6da43a81"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return fi=function(){return s},s}fi();const uG=(fi().s[0]++,140);function lM({value:n,options:e=(fi().b[0][0]++,[]),onChange:t=(fi().b[1][0]++,()=>{fi().f[1]++}),"aria-label":i}){fi().f[0]++;const[r,o]=(fi().s[1]++,En.useState((fi().b[2][0]++,n||(fi().b[2][1]++,"")))),s=(fi().s[2]++,En.useRef(null)),[a,c]=(fi().s[3]++,En.useState(uG)),A=(fi().s[4]++,En.useMemo(()=>{fi().f[2]++;const j=(fi().s[5]++,r.toLowerCase());return fi().s[6]++,e.filter(Q=>(fi().f[3]++,fi().s[7]++,Q[0].toLowerCase().includes(j)))},[e,r])),m=(fi().s[8]++,En.useCallback(()=>{if(fi().f[4]++,fi().s[9]++,s.current){fi().b[3][0]++;const j=(fi().s[10]++,window.innerHeight-s.current.getBoundingClientRect().top);fi().s[11]++,c(Math.min(j,uG))}else fi().b[3][1]++},[])),{isOpen:v,getMenuProps:x,getInputProps:_,getItemProps:O,highlightedIndex:P,openMenu:F}=(fi().s[12]++,MR({items:A,inputValue:r,itemToString:j=>(fi().f[5]++,fi().s[13]++,j?(fi().b[4][0]++,j[0]):(fi().b[4][1]++,"")),stateReducer:(j,Q)=>(fi().f[6]++,fi().s[14]++,Q.type===MR.stateChangeTypes.InputClick?(fi().b[5][0]++,fi().s[15]++,{...Q.changes,isOpen:!0}):(fi().b[5][1]++,fi().s[16]++,Q.changes)),onSelectedItemChange:({selectedItem:j})=>{fi().f[7]++;const Q=(fi().s[17]++,j?(fi().b[6][0]++,j[0]):(fi().b[6][1]++,""));fi().s[18]++,o(Q),fi().s[19]++,t(j?(fi().b[7][0]++,j[0]):(fi().b[7][1]++,void 0))},onInputValueChange:({inputValue:j})=>{fi().f[8]++,fi().s[20]++,typeof j=="string"?(fi().b[8][0]++,fi().s[21]++,o(j),fi().s[22]++,t(j===""?(fi().b[9][0]++,void 0):(fi().b[9][1]++,j)),fi().s[23]++,F()):fi().b[8][1]++}}));return fi().s[24]++,En.useEffect(()=>{fi().f[9]++,fi().s[25]++,v?(fi().b[10][0]++,fi().s[26]++,m()):fi().b[10][1]++},[v,m]),fi().s[27]++,En.useEffect(()=>(fi().f[10]++,fi().s[28]++,window.addEventListener("resize",m),fi().s[29]++,()=>(fi().f[11]++,fi().s[30]++,window.removeEventListener("resize",m))),[m]),fi().s[31]++,En.useEffect(()=>{fi().f[12]++,fi().s[32]++,o((fi().b[11][0]++,n||(fi().b[11][1]++,"")))},[n]),fi().s[33]++,ie.jsxs("div",{className:"maputnik-autocomplete",children:[ie.jsx("input",{..._({"aria-label":i,className:"maputnik-string",spellCheck:!1,onFocus:()=>(fi().f[13]++,fi().s[34]++,F())})}),ie.jsx("div",{...x({},{suppressRefError:!0}),ref:s,style:{position:"fixed",overflow:"auto",maxHeight:a,zIndex:998},className:"maputnik-autocomplete-menu",children:(fi().b[12][0]++,v&&(fi().b[12][1]++,A.map((j,Q)=>(fi().f[14]++,fi().s[35]++,ie.jsx("div",{...O({item:j,index:Q,className:Yg("maputnik-autocomplete-menu-item",{"maputnik-autocomplete-menu-item-selected":P===Q})}),children:j[1]},j[0])))))})]})}function Zp(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldSource.tsx",e="787db584cc9becf4089365283e16f9ba747f4840",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldSource.tsx",statementMap:{0:{start:{line:6,column:28},end:{line:32,column:1}},1:{start:{line:15,column:2},end:{line:31,column:4}},2:{start:{line:27,column:43},end:{line:27,column:53}},3:{start:{line:33,column:20},end:{line:33,column:58}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:28},end:{line:6,column:29}},loc:{start:{line:14,column:6},end:{line:32,column:1}},line:14},1:{name:"(anonymous_1)",decl:{start:{line:7,column:13},end:{line:7,column:14}},loc:{start:{line:7,column:19},end:{line:8,column:3}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:27,column:34},end:{line:27,column:35}},loc:{start:{line:27,column:43},end:{line:27,column:53}},line:27}},branchMap:{0:{loc:{start:{line:7,column:2},end:{line:8,column:3}},type:"default-arg",locations:[{start:{line:7,column:13},end:{line:8,column:3}}],line:7},1:{loc:{start:{line:9,column:2},end:{line:9,column:16}},type:"default-arg",locations:[{start:{line:9,column:14},end:{line:9,column:16}}],line:9}},s:{0:0,1:0,2:0,3:0},f:{0:0,1:0,2:0},b:{0:[0],1:[0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldSource.tsx"],names:[],mappings:"AA8BM;AA5BN,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAC9B,SAA+B,uBAAuB;AAUtD,MAAM,sBAA0D,CAAC;AAAA,EAC/D,WAAW,MAAM;AAAA,EAAC;AAAA,EAClB,YAAY,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,EAAE,QAAQ;AAAA,MACjB,WAAW,OAAO,MAAM;AAAA,MACxB;AAAA,MACA,eAAa;AAAA,MAEb;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,SAAS,WAAW,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC;AAAA;AAAA,MAC7C;AAAA;AAAA,EACF;AAEJ;AAGA,MAAM,cAAc,gBAAgB,EAAE,mBAAmB;AACzD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"787db584cc9becf4089365283e16f9ba747f4840"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Zp=function(){return s},s}Zp();Zp().s[0]++;const Jwe=({onChange:n=(Zp().b[0][0]++,()=>{Zp().f[1]++}),sourceIds:e=(Zp().b[1][0]++,[]),wdKey:t,value:i,error:r,t:o})=>(Zp().f[0]++,Zp().s[1]++,ie.jsx(Fs,{label:o("Source"),fieldSpec:Jr.layer.source,error:r,"data-wd-key":t,children:ie.jsx(lM,{value:i,onChange:n,options:e?.map(s=>(Zp().f[2]++,Zp().s[2]++,[s,s]))})})),Fne=(Zp().s[3]++,Jo()(Jwe));function Xp(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldSourceLayer.tsx",e="61cb059654b456e27f782356448ebd0362f3cb6a",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldSourceLayer.tsx",statementMap:{0:{start:{line:6,column:33},end:{line:31,column:1}},1:{start:{line:14,column:2},end:{line:30,column:4}},2:{start:{line:26,column:46},end:{line:26,column:52}},3:{start:{line:32,column:25},end:{line:32,column:68}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:33},end:{line:6,column:34}},loc:{start:{line:13,column:6},end:{line:31,column:1}},line:13},1:{name:"(anonymous_1)",decl:{start:{line:7,column:13},end:{line:7,column:14}},loc:{start:{line:7,column:19},end:{line:8,column:3}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:26,column:39},end:{line:26,column:40}},loc:{start:{line:26,column:46},end:{line:26,column:52}},line:26}},branchMap:{0:{loc:{start:{line:7,column:2},end:{line:8,column:3}},type:"default-arg",locations:[{start:{line:7,column:13},end:{line:8,column:3}}],line:7},1:{loc:{start:{line:9,column:2},end:{line:9,column:21}},type:"default-arg",locations:[{start:{line:9,column:19},end:{line:9,column:21}}],line:9}},s:{0:0,1:0,2:0,3:0},f:{0:0,1:0,2:0},b:{0:[0],1:[0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldSourceLayer.tsx"],names:[],mappings:"AA4BM;AA1BN,SAAQ,cAAa;AACrB,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAC9B,SAA+B,uBAAuB;AAStD,MAAM,2BAAoE,CAAC;AAAA,EACzE,WAAW,MAAM;AAAA,EAAC;AAAA,EAClB,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,EAAE,cAAc;AAAA,MACvB,WAAW,OAAO,MAAM,cAAc;AAAA,MACtC,eAAY;AAAA,MACZ;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,SAAS,gBAAgB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAAA;AAAA,MAC5C;AAAA;AAAA,EACF;AAEJ;AAEA,MAAM,mBAAmB,gBAAgB,EAAE,wBAAwB;AACnE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"61cb059654b456e27f782356448ebd0362f3cb6a"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Xp=function(){return s},s}Xp();Xp().s[0]++;const eSe=({onChange:n=(Xp().b[0][0]++,()=>{Xp().f[1]++}),sourceLayerIds:e=(Xp().b[1][0]++,[]),value:t,error:i,t:r})=>(Xp().f[0]++,Xp().s[1]++,ie.jsx(Fs,{label:r("Source Layer"),fieldSpec:ss.layer["source-layer"],"data-wd-key":"layer-source-layer",error:i,children:ie.jsx(lM,{value:t,onChange:n,options:e?.map(o=>(Xp().f[2]++,Xp().s[2]++,[o,o]))})})),zne=(Xp().s[3]++,Jo()(eSe));function cK(){var n="/home/runner/work/maputnik/maputnik/src/libs/non-source-layers.ts",e="674dcf7f1706a4f312a810bdf5e5997ddaf065e0",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/non-source-layers.ts",statementMap:{0:{start:{line:1,column:33},end:{line:1,column:97}}},fnMap:{},branchMap:{},s:{0:0},f:{},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/non-source-layers.ts"],names:[],mappings:"AAAO,aAAM,oBAAoB,CAAC,cAAc,UAAU,aAAa,WAAW,cAAc;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"674dcf7f1706a4f312a810bdf5e5997ddaf065e0"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return cK=function(){return s},s}cK();const wR=(cK().s[0]++,["background","raster","hillshade","heatmap","color-relief"]);function mn(){var n="/home/runner/work/maputnik/maputnik/src/components/modals/ModalAdd.tsx",e="90da8e5ee6bdbe488a5f45bfae015ac94b0d70a9",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/modals/ModalAdd.tsx",statementMap:{0:{start:{line:12,column:13},end:{line:33,column:3}},1:{start:{line:13,column:4},end:{line:16,column:5}},2:{start:{line:13,column:38},end:{line:13,column:60}},3:{start:{line:14,column:6},end:{line:14,column:72}},4:{start:{line:15,column:6},end:{line:15,column:13}},5:{start:{line:17,column:26},end:{line:17,column:52}},6:{start:{line:18,column:18},end:{line:21,column:5}},7:{start:{line:22,column:4},end:{line:27,column:5}},8:{start:{line:23,column:6},end:{line:23,column:39}},9:{start:{line:24,column:6},end:{line:26,column:7}},10:{start:{line:25,column:8},end:{line:25,column:59}},11:{start:{line:28,column:4},end:{line:28,column:30}},12:{start:{line:29,column:4},end:{line:32,column:7}},13:{start:{line:30,column:6},end:{line:30,column:47}},14:{start:{line:31,column:6},end:{line:31,column:32}},15:{start:{line:35,column:4},end:{line:35,column:17}},16:{start:{line:36,column:18},end:{line:40,column:5}},17:{start:{line:41,column:4},end:{line:47,column:5}},18:{start:{line:42,column:6},end:{line:42,column:56}},19:{start:{line:43,column:27},end:{line:43,column:72}},20:{start:{line:44,column:6},end:{line:46,column:7}},21:{start:{line:45,column:8},end:{line:45,column:48}},22:{start:{line:48,column:4},end:{line:48,column:23}},23:{start:{line:51,column:20},end:{line:51,column:34}},24:{start:{line:52,column:20},end:{line:52,column:35}},25:{start:{line:53,column:32},end:{line:53,column:56}},26:{start:{line:54,column:32},end:{line:54,column:56}},27:{start:{line:55,column:4},end:{line:62,column:5}},28:{start:{line:59,column:6},end:{line:61,column:9}},29:{start:{line:65,column:22},end:{line:65,column:54}},30:{start:{line:66,column:4},end:{line:66,column:34}},31:{start:{line:69,column:4},end:{line:86,column:5}},32:{start:{line:71,column:8},end:{line:71,column:18}},33:{start:{line:74,column:8},end:{line:74,column:113}},34:{start:{line:74,column:69},end:{line:74,column:92}},35:{start:{line:74,column:110},end:{line:74,column:111}},36:{start:{line:76,column:8},end:{line:76,column:109}},37:{start:{line:76,column:69},end:{line:76,column:88}},38:{start:{line:76,column:106},end:{line:76,column:107}},39:{start:{line:83,column:8},end:{line:83,column:133}},40:{start:{line:83,column:69},end:{line:83,column:112}},41:{start:{line:83,column:130},end:{line:83,column:131}},42:{start:{line:85,column:8},end:{line:85,column:18}},43:{start:{line:89,column:14},end:{line:89,column:26}},44:{start:{line:90,column:20},end:{line:90,column:52}},45:{start:{line:91,column:19},end:{line:91,column:61}},46:{start:{line:93,column:4},end:{line:106,column:5}},47:{start:{line:94,column:6},end:{line:105,column:11}},48:{start:{line:100,column:27},end:{line:100,column:57}},49:{start:{line:107,column:4},end:{line:165,column:6}},50:{start:{line:124,column:18},end:{line:124,column:56}},51:{start:{line:133,column:33},end:{line:133,column:59}},52:{start:{line:142,column:33},end:{line:142,column:61}},53:{start:{line:150,column:33},end:{line:150,column:69}},54:{start:{line:168,column:17},end:{line:168,column:52}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:13},end:{line:12,column:14}},loc:{start:{line:12,column:19},end:{line:33,column:3}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:13,column:31},end:{line:13,column:32}},loc:{start:{line:13,column:38},end:{line:13,column:60}},line:13},2:{name:"(anonymous_2)",decl:{start:{line:29,column:35},end:{line:29,column:36}},loc:{start:{line:29,column:41},end:{line:32,column:5}},line:29},3:{name:"(anonymous_3)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:21},end:{line:49,column:3}},line:34},4:{name:"(anonymous_4)",decl:{start:{line:50,column:2},end:{line:50,column:3}},loc:{start:{line:50,column:44},end:{line:63,column:3}},line:50},5:{name:"(anonymous_5)",decl:{start:{line:64,column:2},end:{line:64,column:3}},loc:{start:{line:64,column:29},end:{line:67,column:3}},line:64},6:{name:"(anonymous_6)",decl:{start:{line:68,column:2},end:{line:68,column:3}},loc:{start:{line:68,column:19},end:{line:87,column:3}},line:68},7:{name:"(anonymous_7)",decl:{start:{line:74,column:57},end:{line:74,column:58}},loc:{start:{line:74,column:69},end:{line:74,column:92}},line:74},8:{name:"(anonymous_8)",decl:{start:{line:74,column:98},end:{line:74,column:99}},loc:{start:{line:74,column:110},end:{line:74,column:111}},line:74},9:{name:"(anonymous_9)",decl:{start:{line:76,column:57},end:{line:76,column:58}},loc:{start:{line:76,column:69},end:{line:76,column:88}},line:76},10:{name:"(anonymous_10)",decl:{start:{line:76,column:94},end:{line:76,column:95}},loc:{start:{line:76,column:106},end:{line:76,column:107}},line:76},11:{name:"(anonymous_11)",decl:{start:{line:83,column:57},end:{line:83,column:58}},loc:{start:{line:83,column:69},end:{line:83,column:112}},line:83},12:{name:"(anonymous_12)",decl:{start:{line:83,column:118},end:{line:83,column:119}},loc:{start:{line:83,column:130},end:{line:83,column:131}},line:83},13:{name:"(anonymous_13)",decl:{start:{line:88,column:2},end:{line:88,column:3}},loc:{start:{line:88,column:11},end:{line:166,column:3}},line:88},14:{name:"(anonymous_14)",decl:{start:{line:100,column:21},end:{line:100,column:22}},loc:{start:{line:100,column:27},end:{line:100,column:57}},line:100},15:{name:"(anonymous_15)",decl:{start:{line:123,column:26},end:{line:123,column:27}},loc:{start:{line:123,column:33},end:{line:125,column:17}},line:123},16:{name:"(anonymous_16)",decl:{start:{line:133,column:26},end:{line:133,column:27}},loc:{start:{line:133,column:33},end:{line:133,column:59}},line:133},17:{name:"(anonymous_17)",decl:{start:{line:142,column:26},end:{line:142,column:27}},loc:{start:{line:142,column:33},end:{line:142,column:61}},line:142},18:{name:"(anonymous_18)",decl:{start:{line:150,column:26},end:{line:150,column:27}},loc:{start:{line:150,column:33},end:{line:150,column:69}},line:150}},branchMap:{0:{loc:{start:{line:13,column:4},end:{line:16,column:5}},type:"if",locations:[{start:{line:13,column:4},end:{line:16,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:13},1:{loc:{start:{line:22,column:4},end:{line:27,column:5}},type:"if",locations:[{start:{line:22,column:4},end:{line:27,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:22},2:{loc:{start:{line:24,column:6},end:{line:26,column:7}},type:"if",locations:[{start:{line:24,column:6},end:{line:26,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:24},3:{loc:{start:{line:24,column:10},end:{line:24,column:84}},type:"binary-expr",locations:[{start:{line:24,column:10},end:{line:24,column:54}},{start:{line:24,column:58},end:{line:24,column:84}}],line:24},4:{loc:{start:{line:41,column:4},end:{line:47,column:5}},type:"if",locations:[{start:{line:41,column:4},end:{line:47,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:41},5:{loc:{start:{line:43,column:27},end:{line:43,column:72}},type:"binary-expr",locations:[{start:{line:43,column:27},end:{line:43,column:66}},{start:{line:43,column:70},end:{line:43,column:72}}],line:43},6:{loc:{start:{line:44,column:6},end:{line:46,column:7}},type:"if",locations:[{start:{line:44,column:6},end:{line:46,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44},7:{loc:{start:{line:55,column:4},end:{line:62,column:5}},type:"if",locations:[{start:{line:55,column:4},end:{line:62,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:55},8:{loc:{start:{line:57,column:6},end:{line:57,column:160}},type:"binary-expr",locations:[{start:{line:57,column:6},end:{line:57,column:25}},{start:{line:57,column:29},end:{line:57,column:52}},{start:{line:57,column:56},end:{line:57,column:106}},{start:{line:57,column:110},end:{line:57,column:160}}],line:57},9:{loc:{start:{line:65,column:22},end:{line:65,column:54}},type:"binary-expr",locations:[{start:{line:65,column:22},end:{line:65,column:48}},{start:{line:65,column:52},end:{line:65,column:54}}],line:65},10:{loc:{start:{line:66,column:11},end:{line:66,column:33}},type:"binary-expr",locations:[{start:{line:66,column:11},end:{line:66,column:27}},{start:{line:66,column:31},end:{line:66,column:33}}],line:66},11:{loc:{start:{line:69,column:4},end:{line:86,column:5}},type:"switch",locations:[{start:{line:70,column:6},end:{line:71,column:18}},{start:{line:72,column:6},end:{line:72,column:23}},{start:{line:73,column:6},end:{line:74,column:113}},{start:{line:75,column:6},end:{line:76,column:109}},{start:{line:77,column:6},end:{line:77,column:21}},{start:{line:78,column:6},end:{line:78,column:20}},{start:{line:79,column:6},end:{line:79,column:18}},{start:{line:80,column:6},end:{line:80,column:28}},{start:{line:81,column:6},end:{line:81,column:18}},{start:{line:82,column:6},end:{line:83,column:133}},{start:{line:84,column:6},end:{line:85,column:18}}],line:69},12:{loc:{start:{line:83,column:69},end:{line:83,column:112}},type:"binary-expr",locations:[{start:{line:83,column:69},end:{line:83,column:88}},{start:{line:83,column:92},end:{line:83,column:112}}],line:83},13:{loc:{start:{line:93,column:4},end:{line:106,column:5}},type:"if",locations:[{start:{line:93,column:4},end:{line:106,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:93},14:{loc:{start:{line:136,column:12},end:{line:144,column:13}},type:"binary-expr",locations:[{start:{line:136,column:12},end:{line:136,column:44}},{start:{line:136,column:64},end:{line:144,column:13}}],line:136},15:{loc:{start:{line:145,column:12},end:{line:152,column:13}},type:"binary-expr",locations:[{start:{line:145,column:12},end:{line:145,column:56}},{start:{line:145,column:76},end:{line:152,column:13}}],line:145}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0,0,0],9:[0,0],10:[0,0],11:[0,0,0,0,0,0,0,0,0,0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/modals/ModalAdd.tsx"],names:[],mappings:"AAqIQ,SAEE,KAFF;AArIR,OAAO,WAAW;AAClB,SAA+B,uBAAuB;AAGtD,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,OAAO,aAAa;AACpB,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAC7B,SAAS,yBAAyB;AAmBlC,MAAM,yBAAyB,MAAM,UAAgD;AAAA,EACnF,WAAW,MAAM;AACf,QAAI,KAAK,MAAM,OAAO,KAAK,OAAK,EAAE,OAAO,KAAK,MAAM,EAAE,GAAG;AACvD,WAAK,SAAS,EAAE,OAAO,KAAK,MAAM,EAAE,yBAAyB,EAAE,CAAC;AAChE;AAAA,IACF;AAEA,UAAM,gBAAgB,KAAK,MAAM,OAAO,MAAM,CAAC;AAC/C,UAAM,QAAuB;AAAA,MAC3B,IAAI,KAAK,MAAM;AAAA,MACf,MAAM,KAAK,MAAM;AAAA,IACnB;AAEA,QAAG,KAAK,MAAM,SAAS,cAAc;AACnC,YAAM,SAAS,KAAK,MAAM;AAC1B,UAAG,CAAC,kBAAkB,SAAS,KAAK,MAAM,IAAI,KAAK,KAAK,MAAM,cAAc,GAAG;AAC7E,cAAM,cAAc,IAAI,KAAK,MAAM,cAAc;AAAA,MACnD;AAAA,IACF;AAEA,kBAAc,KAAK,KAA2B;AAC9C,SAAK,SAAS,EAAE,OAAO,KAAK,GAAG,MAAM;AACnC,WAAK,MAAM,eAAe,aAAa;AACvC,WAAK,MAAM,aAAa;AAAA,IAC1B,CAAC;AAAA,EACH;AAAA,EAEA,YAAY,OAA8B;AACxC,UAAM,KAAK;AACX,UAAM,QAAuB;AAAA,MAC3B,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAEA,QAAG,OAAO,KAAK,MAAM,OAAO,EAAE,SAAS,GAAG;AACxC,YAAM,SAAS,OAAO,KAAK,KAAK,MAAM,OAAO,EAAE,CAAC;AAChD,YAAM,eAAe,KAAK,MAAM,QAAQ,MAAM,MAAM,EAAE,UAAU,CAAC;AACjE,UAAI,aAAa,SAAS,GAAG;AAC3B,cAAM,cAAc,IAAI,aAAa,CAAC;AAAA,MACxC;AAAA,IACF;AACA,SAAK,QAAQ;AAAA,EACf;AAAA,EAEA,mBAAmB,YAAmC,WAA0B;AAE9E,UAAM,UAAU,UAAU;AAC1B,UAAM,UAAU,KAAK,MAAM;AAE3B,UAAM,sBAAsB,KAAK,WAAW,OAAO;AACnD,UAAM,sBAAsB,KAAK,WAAW,OAAO;AAEnD;AAAA;AAAA,MAEE,YAAY,WACT,UAAU,WAAW,MAErB,oBAAoB,QAAQ,UAAU,MAAO,IAAI,MAEjD,oBAAoB,QAAQ,KAAK,MAAM,MAAO,IAAI;AAAA,MACrD;AAEA,WAAK,SAAS;AAAA,QACZ,QAAQ;AAAA,MACV,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,mBAAmB,QAAgB;AACjC,UAAM,YAAY,KAAK,MAAM,QAAQ,MAAM,KAAK,CAAC;AACjD,WAAO,UAAU,UAAU,CAAC;AAAA,EAC9B;AAAA,EAEA,WAAW,MAAkC;AAE3C,YAAO,MAAM;AAAA,MACX,KAAK;AACH,eAAO,CAAC;AAAA,MACV,KAAK;AAAA,MACL,KAAK;AACH,eAAO,OAAO,QAAQ,KAAK,MAAM,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;AAAA,MACzG,KAAK;AACH,eAAO,OAAO,QAAQ,KAAK,MAAM,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;AAAA,MACrG,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,eAAO,OAAO,QAAQ,KAAK,MAAM,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,SAAS,SAAS,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;AAAA,MAC7H;AACE,eAAO,CAAC;AAAA,IACZ;AAAA,EACF;AAAA,EAGA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,UAAU,KAAK,WAAW,KAAK,MAAM,IAAI;AAC/C,UAAM,SAAS,KAAK,mBAAmB,KAAK,MAAM,MAAO;AACzD,QAAI;AACJ,QAAI,KAAK,MAAM,OAAO;AACpB,qBACE,qBAAC,SAAI,WAAU,wBACZ;AAAA,aAAK,MAAM;AAAA,QACZ;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,SAAS,MAAM,KAAK,SAAS,EAAE,OAAO,KAAK,CAAC;AAAA,YAC5C,WAAU;AAAA,YACX;AAAA;AAAA,QAED;AAAA,SACF;AAAA,IAEJ;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,WAAW;AAAA,QACpB,eAAY;AAAA,QACZ,WAAU;AAAA,QAET;AAAA;AAAA,UACD,qBAAC,SAAI,WAAU,sBACb;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,KAAK,MAAM;AAAA,gBAClB,OAAM;AAAA,gBACN,UAAU,CAAC,MAAc;AACvB,uBAAK,SAAS,EAAE,IAAI,GAAG,OAAO,KAAK,CAAC;AAAA,gBACtC;AAAA;AAAA,YACF;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,KAAK,MAAM;AAAA,gBAClB,OAAM;AAAA,gBACN,UAAU,CAAC,MAAkC,KAAK,SAAS,EAAE,MAAM,EAAE,CAAC;AAAA;AAAA,YACxE;AAAA,YACC,KAAK,MAAM,SAAS,gBACvB;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW;AAAA,gBACX,OAAM;AAAA,gBACN,OAAO,KAAK,MAAM;AAAA,gBAClB,UAAU,CAAC,MAAc,KAAK,SAAS,EAAE,QAAQ,EAAE,CAAC;AAAA;AAAA,YACtD;AAAA,YAEG,CAAC,kBAAkB,SAAS,KAAK,MAAM,IAAI,KAC9C;AAAA,cAAC;AAAA;AAAA,gBACC,gBAAgB;AAAA,gBAChB,OAAO,KAAK,MAAM,cAAc;AAAA,gBAChC,UAAU,CAAC,MAAc,KAAK,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAAA;AAAA,YAC9D;AAAA,YAEE;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS,KAAK;AAAA,gBACd,eAAY;AAAA,gBAEX,YAAE,WAAW;AAAA;AAAA,YAChB;AAAA,aACF;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,WAAW,gBAAgB,EAAE,gBAAgB;AACnD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"90da8e5ee6bdbe488a5f45bfae015ac94b0d70a9"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return mn=function(){return s},s}mn();class tSe extends En.Component{addLayer=(mn().s[0]++,()=>{if(mn().f[0]++,mn().s[1]++,this.props.layers.some(i=>(mn().f[1]++,mn().s[2]++,i.id===this.state.id))){mn().b[0][0]++,mn().s[3]++,this.setState({error:this.props.t("Layer ID already exists")}),mn().s[4]++;return}else mn().b[0][1]++;const e=(mn().s[5]++,this.props.layers.slice(0)),t=(mn().s[6]++,{id:this.state.id,type:this.state.type});mn().s[7]++,this.state.type!=="background"?(mn().b[1][0]++,mn().s[8]++,t.source=this.state.source,mn().s[9]++,mn().b[3][0]++,!wR.includes(this.state.type)&&(mn().b[3][1]++,this.state["source-layer"])?(mn().b[2][0]++,mn().s[10]++,t["source-layer"]=this.state["source-layer"]):mn().b[2][1]++):mn().b[1][1]++,mn().s[11]++,e.push(t),mn().s[12]++,this.setState({error:null},()=>{mn().f[2]++,mn().s[13]++,this.props.onLayersChange(e),mn().s[14]++,this.props.onOpenToggle()})});constructor(e){mn().f[3]++,mn().s[15]++,super(e);const t=(mn().s[16]++,{type:"fill",id:"",error:null});if(mn().s[17]++,Object.keys(e.sources).length>0){mn().b[4][0]++,mn().s[18]++,t.source=Object.keys(this.props.sources)[0];const i=(mn().s[19]++,mn().b[5][0]++,this.props.sources[t.source].layers||(mn().b[5][1]++,[]));mn().s[20]++,i.length>0?(mn().b[6][0]++,mn().s[21]++,t["source-layer"]=i[0]):mn().b[6][1]++}else mn().b[4][1]++;mn().s[22]++,this.state=t}componentDidUpdate(e,t){mn().f[4]++;const i=(mn().s[23]++,t.type),r=(mn().s[24]++,this.state.type),o=(mn().s[25]++,this.getSources(i)),s=(mn().s[26]++,this.getSources(r));mn().s[27]++,mn().b[8][0]++,i!==r&&(mn().b[8][1]++,t.source!=="")&&(mn().b[8][2]++,o.indexOf(t.source)>-1)&&(mn().b[8][3]++,s.indexOf(this.state.source)<0)?(mn().b[7][0]++,mn().s[28]++,this.setState({source:""})):mn().b[7][1]++}getLayersForSource(e){mn().f[5]++;const t=(mn().s[29]++,mn().b[9][0]++,this.props.sources[e]||(mn().b[9][1]++,{}));return mn().s[30]++,mn().b[10][0]++,t.layers||(mn().b[10][1]++,[])}getSources(e){switch(mn().f[6]++,mn().s[31]++,e){case"background":return mn().b[11][0]++,mn().s[32]++,[];case"hillshade":mn().b[11][1]++;case"color-relief":return mn().b[11][2]++,mn().s[33]++,Object.entries(this.props.sources).filter(([t,i])=>(mn().f[7]++,mn().s[34]++,i.type==="raster-dem")).map(([t,i])=>(mn().f[8]++,mn().s[35]++,t));case"raster":return mn().b[11][3]++,mn().s[36]++,Object.entries(this.props.sources).filter(([t,i])=>(mn().f[9]++,mn().s[37]++,i.type==="raster")).map(([t,i])=>(mn().f[10]++,mn().s[38]++,t));case"heatmap":mn().b[11][4]++;case"circle":mn().b[11][5]++;case"fill":mn().b[11][6]++;case"fill-extrusion":mn().b[11][7]++;case"line":mn().b[11][8]++;case"symbol":return mn().b[11][9]++,mn().s[39]++,Object.entries(this.props.sources).filter(([t,i])=>(mn().f[11]++,mn().s[40]++,mn().b[12][0]++,i.type==="vector"||(mn().b[12][1]++,i.type==="geojson"))).map(([t,i])=>(mn().f[12]++,mn().s[41]++,t));default:return mn().b[11][10]++,mn().s[42]++,[]}}render(){mn().f[13]++;const e=(mn().s[43]++,this.props.t),t=(mn().s[44]++,this.getSources(this.state.type)),i=(mn().s[45]++,this.getLayersForSource(this.state.source));let r;return mn().s[46]++,this.state.error?(mn().b[13][0]++,mn().s[47]++,r=ie.jsxs("div",{className:"maputnik-modal-error",children:[this.state.error,ie.jsx("a",{href:"#",onClick:()=>(mn().f[14]++,mn().s[48]++,this.setState({error:null})),className:"maputnik-modal-error-close",children:"×"})]})):mn().b[13][1]++,mn().s[49]++,ie.jsxs(a1,{isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Add Layer"),"data-wd-key":"modal:add-layer",className:"maputnik-add-modal",children:[r,ie.jsxs("div",{className:"maputnik-add-layer",children:[ie.jsx(Cne,{value:this.state.id,wdKey:"add-layer.layer-id",onChange:o=>{mn().f[15]++,mn().s[50]++,this.setState({id:o,error:null})}}),ie.jsx(bne,{value:this.state.type,wdKey:"add-layer.layer-type",onChange:o=>(mn().f[16]++,mn().s[51]++,this.setState({type:o}))}),(mn().b[14][0]++,this.state.type!=="background"&&(mn().b[14][1]++,ie.jsx(Fne,{sourceIds:t,wdKey:"add-layer.layer-source-block",value:this.state.source,onChange:o=>(mn().f[17]++,mn().s[52]++,this.setState({source:o}))}))),(mn().b[15][0]++,!wR.includes(this.state.type)&&(mn().b[15][1]++,ie.jsx(zne,{sourceLayerIds:i,value:this.state["source-layer"],onChange:o=>(mn().f[18]++,mn().s[53]++,this.setState({"source-layer":o}))}))),ie.jsx(Js,{className:"maputnik-add-layer-button",onClick:this.addLayer,"data-wd-key":"add-layer",children:e("Add Layer")})]})]})}}const nSe=(mn().s[54]++,Jo()(tSe));function ob(){var n="/home/runner/work/maputnik/maputnik/src/libs/document-uid.ts",e="a991ed6da2a27b46f1adbb88a645aa2ee0df375e",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/document-uid.ts",statementMap:{0:{start:{line:1,column:10},end:{line:1,column:11}},1:{start:{line:3,column:2},end:{line:3,column:8}},2:{start:{line:4,column:2},end:{line:4,column:22}}},fnMap:{0:{name:"generateUniqueId",decl:{start:{line:2,column:24},end:{line:2,column:40}},loc:{start:{line:2,column:54},end:{line:5,column:1}},line:2}},branchMap:{0:{loc:{start:{line:2,column:41},end:{line:2,column:52}},type:"default-arg",locations:[{start:{line:2,column:50},end:{line:2,column:52}}],line:2}},s:{0:0,1:0,2:0},f:{0:0},b:{0:[0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/document-uid.ts"],names:[],mappings:"AAGA,IAAI,MAAM;AAEV,wBAAwB,iBAAiB,SAAO,IAAI;AAClD;AACA,SAAO,SAAO;AAChB;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a991ed6da2a27b46f1adbb88a645aa2ee0df375e"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return ob=function(){return s},s}ob();let cG=(ob().s[0]++,0);function cx(n=(ob().b[0][0]++,"")){return ob().f[0]++,ob().s[1]++,cG++,ob().s[2]++,n+cG}function cr(){var n="/home/runner/work/maputnik/maputnik/src/libs/layer.ts",e="6a81b3c8ffc06f88598225aa1f9b90e3bb6da08e",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/layer.ts",statementMap:{0:{start:{line:3,column:28},end:{line:3,column:46}},1:{start:{line:4,column:2},end:{line:8,column:5}},2:{start:{line:5,column:4},end:{line:7,column:5}},3:{start:{line:6,column:6},end:{line:6,column:45}},4:{start:{line:9,column:29},end:{line:9,column:48}},5:{start:{line:10,column:2},end:{line:14,column:5}},6:{start:{line:11,column:4},end:{line:13,column:5}},7:{start:{line:12,column:6},end:{line:12,column:46}},8:{start:{line:15,column:2},end:{line:20,column:4}},9:{start:{line:23,column:2},end:{line:59,column:3}},10:{start:{line:24,column:4},end:{line:43,column:5}},11:{start:{line:25,column:23},end:{line:31,column:7}},12:{start:{line:32,column:6},end:{line:32,column:39}},13:{start:{line:33,column:6},end:{line:35,column:7}},14:{start:{line:34,column:8},end:{line:34,column:31}},15:{start:{line:36,column:6},end:{line:36,column:22}},16:{start:{line:38,column:23},end:{line:40,column:7}},17:{start:{line:41,column:6},end:{line:41,column:32}},18:{start:{line:42,column:6},end:{line:42,column:22}},19:{start:{line:45,column:4},end:{line:58,column:5}},20:{start:{line:46,column:6},end:{line:52,column:8}},21:{start:{line:54,column:6},end:{line:57,column:8}},22:{start:{line:62,column:2},end:{line:62,column:64}},23:{start:{line:65,column:29},end:{line:65,column:56}},24:{start:{line:66,column:19},end:{line:66,column:22}},25:{start:{line:67,column:2},end:{line:74,column:3}},26:{start:{line:67,column:15},end:{line:67,column:18}},27:{start:{line:68,column:32},end:{line:68,column:61}},28:{start:{line:69,column:4},end:{line:73,column:5}},29:{start:{line:70,column:6},end:{line:70,column:25}},30:{start:{line:72,column:6},end:{line:72,column:24}},31:{start:{line:75,column:2},end:{line:75,column:20}}},fnMap:{0:{name:"changeType",decl:{start:{line:2,column:16},end:{line:2,column:26}},loc:{start:{line:2,column:43},end:{line:21,column:1}},line:2},1:{name:"(anonymous_1)",decl:{start:{line:4,column:41},end:{line:4,column:42}},loc:{start:{line:4,column:59},end:{line:8,column:3}},line:4},2:{name:"(anonymous_2)",decl:{start:{line:10,column:42},end:{line:10,column:43}},loc:{start:{line:10,column:60},end:{line:14,column:3}},line:10},3:{name:"changeProperty",decl:{start:{line:22,column:16},end:{line:22,column:30}},loc:{start:{line:22,column:65},end:{line:60,column:1}},line:22},4:{name:"layerPrefix",decl:{start:{line:61,column:16},end:{line:61,column:27}},loc:{start:{line:61,column:34},end:{line:63,column:1}},line:61},5:{name:"findClosestCommonPrefix",decl:{start:{line:64,column:16},end:{line:64,column:39}},loc:{start:{line:64,column:53},end:{line:76,column:1}},line:64}},branchMap:{0:{loc:{start:{line:5,column:4},end:{line:7,column:5}},type:"if",locations:[{start:{line:5,column:4},end:{line:7,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:5},1:{loc:{start:{line:11,column:4},end:{line:13,column:5}},type:"if",locations:[{start:{line:11,column:4},end:{line:13,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:11},2:{loc:{start:{line:23,column:2},end:{line:59,column:3}},type:"if",locations:[{start:{line:23,column:2},end:{line:59,column:3}},{start:{line:44,column:9},end:{line:59,column:3}}],line:23},3:{loc:{start:{line:24,column:4},end:{line:43,column:5}},type:"if",locations:[{start:{line:24,column:4},end:{line:43,column:5}},{start:{line:37,column:11},end:{line:43,column:5}}],line:24},4:{loc:{start:{line:33,column:6},end:{line:35,column:7}},type:"if",locations:[{start:{line:33,column:6},end:{line:35,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:33},5:{loc:{start:{line:45,column:4},end:{line:58,column:5}},type:"if",locations:[{start:{line:45,column:4},end:{line:58,column:5}},{start:{line:53,column:11},end:{line:58,column:5}}],line:45},6:{loc:{start:{line:69,column:4},end:{line:73,column:5}},type:"if",locations:[{start:{line:69,column:4},end:{line:73,column:5}},{start:{line:71,column:11},end:{line:73,column:5}}],line:69}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/layer.ts"],names:[],mappings:"AAAA,SAAQ,cAAa;AAId,gBAAS,WAAW,OAA2B,SAAqC;AACzF,QAAM,oBAAiD,EAAE,GAAG,MAAM,MAAM;AACxE,SAAO,KAAK,iBAAiB,EAAE,QAAQ,kBAAgB;AACrD,QAAG,EAAE,gBAAgB,OAAO,WAAW,OAAO,IAAI;AAChD,aAAO,kBAAkB,YAAiD;AAAA,IAC5E;AAAA,EACF,CAAC;AAED,QAAM,qBAAmD,EAAE,GAAG,MAAM,OAAO;AAC3E,SAAO,KAAK,kBAAkB,EAAE,QAAQ,kBAAgB;AACtD,QAAG,EAAE,gBAAgB,OAAO,YAAY,OAAO,IAAI;AACjD,aAAO,mBAAmB,YAAkD;AAAA,IAC9E;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,EACR;AACF;AAKO,gBAAS,eAAe,OAA2B,OAAwC,UAAkB,UAAe;AAEjI,MAAG,aAAa,QAAW;AACzB,QAAG,OAAO;AACR,YAAM,WAAgB;AAAA,QACpB,GAAG;AAAA;AAAA,QAEH,CAAC,KAAK,GAAG;AAAA,UACP,GAAG,MAAM,KAAK;AAAA,QAChB;AAAA,MACF;AACA,aAAO,SAAS,KAAK,EAAE,QAAQ;AAG/B,UAAG,OAAO,KAAK,SAAS,KAAK,CAAC,EAAE,SAAS,GAAG;AAC1C,eAAO,SAAS,KAAK;AAAA,MACvB;AACA,aAAO;AAAA,IACT,OAAO;AACL,YAAM,WAAgB;AAAA,QACpB,GAAG;AAAA,MACL;AACA,aAAO,SAAS,QAAQ;AACxB,aAAO;AAAA,IACT;AAAA,EACF,OACK;AACH,QAAG,OAAO;AACR,aAAO;AAAA,QACL,GAAG;AAAA,QACH,CAAC,KAAK,GAAG;AAAA,UACP,GAAG,MAAM,KAAK;AAAA,UACd,CAAC,QAAQ,GAAG;AAAA,QACd;AAAA,MACF;AAAA,IACF,OAAO;AACL,aAAO;AAAA,QACL,GAAG;AAAA,QACH,CAAC,QAAQ,GAAG;AAAA,MACd;AAAA,IACF;AAAA,EACF;AACF;AAEO,gBAAS,YAAY,MAAc;AACxC,SAAO,KAAK,QAAQ,KAAK,GAAG,EAAE,QAAQ,KAAK,GAAG,EAAE,MAAM,GAAG,EAAE,CAAC;AAC9D;AAEO,gBAAS,wBAAwB,QAA8B,KAAa;AACjF,QAAM,qBAAqB,YAAY,OAAO,GAAG,EAAE,EAAE;AACrD,MAAI,aAAa;AACjB,WAAS,IAAI,KAAK,IAAI,GAAG,KAAK;AAC5B,UAAM,sBAAsB,YAAY,OAAO,IAAE,CAAC,EAAE,EAAE;AACtD,QAAG,wBAAwB,oBAAoB;AAC7C,mBAAa,IAAI;AAAA,IACnB,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6a81b3c8ffc06f88598225aa1f9b90e3bb6da08e"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return cr=function(){return s},s}cr();function iSe(n,e){cr().f[0]++;const t=(cr().s[0]++,{...n.paint});cr().s[1]++,Object.keys(t).forEach(r=>{cr().f[1]++,cr().s[2]++,r in ss["paint_"+e]?cr().b[0][1]++:(cr().b[0][0]++,cr().s[3]++,delete t[r])});const i=(cr().s[4]++,{...n.layout});return cr().s[5]++,Object.keys(i).forEach(r=>{cr().f[2]++,cr().s[6]++,r in ss["layout_"+e]?cr().b[1][1]++:(cr().b[1][0]++,cr().s[7]++,delete i[r])}),cr().s[8]++,{...n,paint:t,layout:i,type:e}}function rSe(n,e,t,i){if(cr().f[3]++,cr().s[9]++,i===void 0)if(cr().b[2][0]++,cr().s[10]++,e){cr().b[3][0]++;const r=(cr().s[11]++,{...n,[e]:{...n[e]}});return cr().s[12]++,delete r[e][t],cr().s[13]++,Object.keys(r[e]).length<1?(cr().b[4][0]++,cr().s[14]++,delete r[e]):cr().b[4][1]++,cr().s[15]++,r}else{cr().b[3][1]++;const r=(cr().s[16]++,{...n});return cr().s[17]++,delete r[t],cr().s[18]++,r}else return cr().b[2][1]++,cr().s[19]++,e?(cr().b[5][0]++,cr().s[20]++,{...n,[e]:{...n[e],[t]:i}}):(cr().b[5][1]++,cr().s[21]++,{...n,[t]:i})}function C_(n){return cr().f[4]++,cr().s[22]++,n.replace(" ","-").replace("_","-").split("-")[0]}function oSe(n,e){cr().f[5]++;const t=(cr().s[23]++,C_(n[e].id));let i=(cr().s[24]++,e);cr().s[25]++;for(let r=(cr().s[26]++,e);r>0;r--){const o=(cr().s[27]++,C_(n[r-1].id));if(cr().s[28]++,o===t)cr().b[6][0]++,cr().s[29]++,i=r-1;else return cr().b[6][1]++,cr().s[30]++,i}return cr().s[31]++,i}function Ft(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerList.tsx",e="f68294db07afb93676beed55b7a9de47e3a7c779",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/LayerList.tsx",statementMap:{0:{start:{line:23,column:24},end:{line:26,column:3}},1:{start:{line:30,column:4},end:{line:30,column:17}},2:{start:{line:31,column:4},end:{line:31,column:45}},3:{start:{line:32,column:4},end:{line:32,column:48}},4:{start:{line:33,column:4},end:{line:42,column:6}},5:{start:{line:45,column:4},end:{line:54,column:7}},6:{start:{line:56,column:17},end:{line:73,column:3}},7:{start:{line:57,column:14},end:{line:57,column:15}},8:{start:{line:58,column:22},end:{line:58,column:24}},9:{start:{line:59,column:4},end:{line:68,column:7}},10:{start:{line:60,column:26},end:{line:60,column:51}},11:{start:{line:61,column:24},end:{line:61,column:52}},12:{start:{line:62,column:6},end:{line:64,column:7}},13:{start:{line:63,column:8},end:{line:63,column:63}},14:{start:{line:65,column:6},end:{line:67,column:9}},15:{start:{line:66,column:8},end:{line:66,column:17}},16:{start:{line:69,column:4},end:{line:72,column:7}},17:{start:{line:75,column:19},end:{line:75,column:21}},18:{start:{line:76,column:41},end:{line:76,column:50}},19:{start:{line:77,column:4},end:{line:94,column:5}},20:{start:{line:77,column:17},end:{line:77,column:18}},21:{start:{line:78,column:24},end:{line:78,column:44}},22:{start:{line:79,column:28},end:{line:79,column:52}},23:{start:{line:80,column:6},end:{line:83,column:8}},24:{start:{line:84,column:20},end:{line:87,column:7}},25:{start:{line:88,column:6},end:{line:93,column:7}},26:{start:{line:89,column:26},end:{line:89,column:51}},27:{start:{line:90,column:8},end:{line:90,column:30}},28:{start:{line:92,column:8},end:{line:92,column:29}},29:{start:{line:95,column:4},end:{line:95,column:18}},30:{start:{line:98,column:22},end:{line:98,column:50}},31:{start:{line:99,column:22},end:{line:99,column:55}},32:{start:{line:100,column:4},end:{line:104,column:5}},33:{start:{line:101,column:6},end:{line:101,column:68}},34:{start:{line:103,column:6},end:{line:103,column:35}},35:{start:{line:105,column:4},end:{line:107,column:7}},36:{start:{line:110,column:22},end:{line:110,column:78}},37:{start:{line:111,column:4},end:{line:111,column:51}},38:{start:{line:114,column:4},end:{line:116,column:5}},39:{start:{line:115,column:6},end:{line:115,column:18}},40:{start:{line:118,column:18},end:{line:120,column:7}},41:{start:{line:121,column:6},end:{line:125,column:7}},42:{start:{line:122,column:8},end:{line:124,column:10}},43:{start:{line:126,column:6},end:{line:126,column:17}},44:{start:{line:128,column:24},end:{line:131,column:5}},45:{start:{line:133,column:18},end:{line:135,column:7}},46:{start:{line:136,column:6},end:{line:136,column:27}},47:{start:{line:137,column:6},end:{line:137,column:17}},48:{start:{line:139,column:23},end:{line:142,column:5}},49:{start:{line:143,column:25},end:{line:143,column:53}},50:{start:{line:144,column:4},end:{line:144,column:24}},51:{start:{line:147,column:4},end:{line:163,column:5}},52:{start:{line:148,column:31},end:{line:148,column:59}},53:{start:{line:149,column:6},end:{line:162,column:7}},54:{start:{line:150,column:23},end:{line:150,column:44}},55:{start:{line:151,column:24},end:{line:154,column:9}},56:{start:{line:155,column:25},end:{line:160,column:19}},57:{start:{line:156,column:10},end:{line:156,column:37}},58:{start:{line:157,column:10},end:{line:159,column:11}},59:{start:{line:158,column:12},end:{line:158,column:36}},60:{start:{line:161,column:8},end:{line:161,column:33}},61:{start:{line:166,column:22},end:{line:166,column:24}},62:{start:{line:167,column:14},end:{line:167,column:15}},63:{start:{line:168,column:26},end:{line:168,column:46}},64:{start:{line:169,column:4},end:{line:219,column:7}},65:{start:{line:170,column:26},end:{line:170,column:51}},66:{start:{line:171,column:6},end:{line:184,column:7}},67:{start:{line:172,column:36},end:{line:182,column:9}},68:{start:{line:176,column:47},end:{line:176,column:52}},69:{start:{line:183,column:8},end:{line:183,column:28}},70:{start:{line:185,column:6},end:{line:218,column:9}},71:{start:{line:186,column:25},end:{line:186,column:72}},72:{start:{line:187,column:27},end:{line:189,column:10}},73:{start:{line:188,column:10},end:{line:188,column:97}},74:{start:{line:190,column:32},end:{line:190,column:34}},75:{start:{line:191,column:8},end:{line:193,column:9}},76:{start:{line:192,column:10},end:{line:192,column:53}},77:{start:{line:194,column:41},end:{line:215,column:9}},78:{start:{line:216,column:8},end:{line:216,column:33}},79:{start:{line:217,column:8},end:{line:217,column:17}},80:{start:{line:220,column:14},end:{line:220,column:26}},81:{start:{line:221,column:4},end:{line:274,column:6}},82:{start:{line:277,column:27},end:{line:277,column:72}},83:{start:{line:278,column:18},end:{line:291,column:1}},84:{start:{line:279,column:18},end:{line:279,column:97}},85:{start:{line:280,column:24},end:{line:288,column:3}},86:{start:{line:281,column:29},end:{line:281,column:34}},87:{start:{line:282,column:4},end:{line:282,column:22}},88:{start:{line:282,column:15},end:{line:282,column:22}},89:{start:{line:283,column:21},end:{line:283,column:78}},90:{start:{line:283,column:55},end:{line:283,column:77}},91:{start:{line:284,column:21},end:{line:284,column:76}},92:{start:{line:284,column:55},end:{line:284,column:75}},93:{start:{line:285,column:4},end:{line:287,column:5}},94:{start:{line:286,column:6},end:{line:286,column:48}},95:{start:{line:289,column:19},end:{line:289,column:56}},96:{start:{line:289,column:47},end:{line:289,column:55}},97:{start:{line:290,column:2},end:{line:290,column:288}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:24,column:19},end:{line:24,column:20}},loc:{start:{line:24,column:25},end:{line:25,column:5}},line:24},1:{name:"(anonymous_1)",decl:{start:{line:29,column:2},end:{line:29,column:3}},loc:{start:{line:29,column:21},end:{line:43,column:3}},line:29},2:{name:"(anonymous_2)",decl:{start:{line:44,column:2},end:{line:44,column:3}},loc:{start:{line:44,column:25},end:{line:55,column:3}},line:44},3:{name:"(anonymous_3)",decl:{start:{line:56,column:17},end:{line:56,column:18}},loc:{start:{line:56,column:23},end:{line:73,column:3}},line:56},4:{name:"(anonymous_4)",decl:{start:{line:59,column:33},end:{line:59,column:34}},loc:{start:{line:59,column:45},end:{line:68,column:5}},line:59},5:{name:"(anonymous_5)",decl:{start:{line:65,column:21},end:{line:65,column:22}},loc:{start:{line:65,column:33},end:{line:67,column:7}},line:65},6:{name:"(anonymous_6)",decl:{start:{line:74,column:2},end:{line:74,column:3}},loc:{start:{line:74,column:18},end:{line:96,column:3}},line:74},7:{name:"(anonymous_7)",decl:{start:{line:97,column:2},end:{line:97,column:3}},loc:{start:{line:97,column:37},end:{line:108,column:3}},line:97},8:{name:"(anonymous_8)",decl:{start:{line:109,column:2},end:{line:109,column:3}},loc:{start:{line:109,column:32},end:{line:112,column:3}},line:109},9:{name:"(anonymous_9)",decl:{start:{line:113,column:2},end:{line:113,column:3}},loc:{start:{line:113,column:46},end:{line:145,column:3}},line:113},10:{name:"getRequiredProps",decl:{start:{line:117,column:13},end:{line:117,column:29}},loc:{start:{line:117,column:37},end:{line:127,column:5}},line:117},11:{name:"withoutLayers",decl:{start:{line:132,column:13},end:{line:132,column:26}},loc:{start:{line:132,column:34},end:{line:138,column:5}},line:132},12:{name:"(anonymous_12)",decl:{start:{line:146,column:2},end:{line:146,column:3}},loc:{start:{line:146,column:32},end:{line:164,column:3}},line:146},13:{name:"(anonymous_13)",decl:{start:{line:155,column:50},end:{line:155,column:51}},loc:{start:{line:155,column:63},end:{line:160,column:9}},line:155},14:{name:"(anonymous_14)",decl:{start:{line:165,column:2},end:{line:165,column:3}},loc:{start:{line:165,column:11},end:{line:275,column:3}},line:165},15:{name:"(anonymous_15)",decl:{start:{line:169,column:26},end:{line:169,column:27}},loc:{start:{line:169,column:38},end:{line:219,column:5}},line:169},16:{name:"(anonymous_16)",decl:{start:{line:176,column:40},end:{line:176,column:41}},loc:{start:{line:176,column:47},end:{line:176,column:52}},line:176},17:{name:"(anonymous_17)",decl:{start:{line:185,column:21},end:{line:185,column:22}},loc:{start:{line:185,column:44},end:{line:218,column:7}},line:185},18:{name:"(anonymous_18)",decl:{start:{line:187,column:50},end:{line:187,column:51}},loc:{start:{line:187,column:61},end:{line:189,column:9}},line:187},19:{name:"(anonymous_19)",decl:{start:{line:278,column:18},end:{line:278,column:19}},loc:{start:{line:278,column:29},end:{line:291,column:1}},line:278},20:{name:"(anonymous_20)",decl:{start:{line:280,column:24},end:{line:280,column:25}},loc:{start:{line:280,column:35},end:{line:288,column:3}},line:280},21:{name:"(anonymous_21)",decl:{start:{line:283,column:44},end:{line:283,column:45}},loc:{start:{line:283,column:55},end:{line:283,column:77}},line:283},22:{name:"(anonymous_22)",decl:{start:{line:284,column:44},end:{line:284,column:45}},loc:{start:{line:284,column:55},end:{line:284,column:75}},line:284},23:{name:"(anonymous_23)",decl:{start:{line:289,column:36},end:{line:289,column:37}},loc:{start:{line:289,column:47},end:{line:289,column:55}},line:289}},branchMap:{0:{loc:{start:{line:62,column:6},end:{line:64,column:7}},type:"if",locations:[{start:{line:62,column:6},end:{line:64,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:62},1:{loc:{start:{line:82,column:8},end:{line:82,column:79}},type:"cond-expr",locations:[{start:{line:82,column:41},end:{line:82,column:75}},{start:{line:82,column:78},end:{line:82,column:79}}],line:82},2:{loc:{start:{line:88,column:6},end:{line:93,column:7}},type:"if",locations:[{start:{line:88,column:6},end:{line:93,column:7}},{start:{line:91,column:13},end:{line:93,column:7}}],line:88},3:{loc:{start:{line:88,column:10},end:{line:88,column:81}},type:"binary-expr",locations:[{start:{line:88,column:10},end:{line:88,column:23}},{start:{line:88,column:27},end:{line:88,column:81}}],line:88},4:{loc:{start:{line:100,column:4},end:{line:104,column:5}},type:"if",locations:[{start:{line:100,column:4},end:{line:104,column:5}},{start:{line:102,column:11},end:{line:104,column:5}}],line:100},5:{loc:{start:{line:111,column:11},end:{line:111,column:50}},type:"cond-expr",locations:[{start:{line:111,column:34},end:{line:111,column:38}},{start:{line:111,column:41},end:{line:111,column:50}}],line:111},6:{loc:{start:{line:114,column:4},end:{line:116,column:5}},type:"if",locations:[{start:{line:114,column:4},end:{line:116,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:114},7:{loc:{start:{line:121,column:6},end:{line:125,column:7}},type:"if",locations:[{start:{line:121,column:6},end:{line:125,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:121},8:{loc:{start:{line:143,column:27},end:{line:143,column:52}},type:"binary-expr",locations:[{start:{line:143,column:27},end:{line:143,column:38}},{start:{line:143,column:42},end:{line:143,column:52}}],line:143},9:{loc:{start:{line:147,column:4},end:{line:163,column:5}},type:"if",locations:[{start:{line:147,column:4},end:{line:163,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:147},10:{loc:{start:{line:149,column:6},end:{line:162,column:7}},type:"if",locations:[{start:{line:149,column:6},end:{line:162,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:149},11:{loc:{start:{line:149,column:10},end:{line:149,column:51}},type:"binary-expr",locations:[{start:{line:149,column:10},end:{line:149,column:26}},{start:{line:149,column:30},end:{line:149,column:51}}],line:149},12:{loc:{start:{line:157,column:10},end:{line:159,column:11}},type:"if",locations:[{start:{line:157,column:10},end:{line:159,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:157},13:{loc:{start:{line:157,column:14},end:{line:157,column:68}},type:"binary-expr",locations:[{start:{line:157,column:14},end:{line:157,column:32}},{start:{line:157,column:36},end:{line:157,column:68}}],line:157},14:{loc:{start:{line:171,column:6},end:{line:184,column:7}},type:"if",locations:[{start:{line:171,column:6},end:{line:184,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:171},15:{loc:{start:{line:178,column:22},end:{line:178,column:98}},type:"binary-expr",locations:[{start:{line:178,column:22},end:{line:178,column:57}},{start:{line:178,column:61},end:{line:178,column:98}}],line:178},16:{loc:{start:{line:188,column:17},end:{line:188,column:96}},type:"binary-expr",locations:[{start:{line:188,column:17},end:{line:188,column:29}},{start:{line:188,column:33},end:{line:188,column:62}},{start:{line:188,column:66},end:{line:188,column:96}}],line:188},17:{loc:{start:{line:191,column:8},end:{line:193,column:9}},type:"if",locations:[{start:{line:191,column:8},end:{line:193,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:191},18:{loc:{start:{line:198,column:52},end:{line:198,column:153}},type:"binary-expr",locations:[{start:{line:198,column:52},end:{line:198,column:69}},{start:{line:198,column:73},end:{line:198,column:112}},{start:{line:198,column:116},end:{line:198,column:153}}],line:198},19:{loc:{start:{line:199,column:53},end:{line:199,column:105}},type:"binary-expr",locations:[{start:{line:199,column:53},end:{line:199,column:84}},{start:{line:199,column:88},end:{line:199,column:105}}],line:199},20:{loc:{start:{line:206,column:25},end:{line:206,column:43}},type:"binary-expr",locations:[{start:{line:206,column:25},end:{line:206,column:37}},{start:{line:206,column:41},end:{line:206,column:43}}],line:206},21:{loc:{start:{line:251,column:26},end:{line:251,column:96}},type:"cond-expr",locations:[{start:{line:251,column:69},end:{line:251,column:82}},{start:{line:251,column:85},end:{line:251,column:96}}],line:251},22:{loc:{start:{line:282,column:4},end:{line:282,column:22}},type:"if",locations:[{start:{line:282,column:4},end:{line:282,column:22}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:282},23:{loc:{start:{line:285,column:4},end:{line:287,column:5}},type:"if",locations:[{start:{line:285,column:4},end:{line:287,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:285},24:{loc:{start:{line:285,column:8},end:{line:285,column:67}},type:"binary-expr",locations:[{start:{line:285,column:8},end:{line:285,column:23}},{start:{line:285,column:27},end:{line:285,column:42}},{start:{line:285,column:46},end:{line:285,column:67}}],line:285}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0,0],17:[0,0],18:[0,0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerList.tsx"],names:[],mappings:"AA+NoB,cAoEd,YApEc;AA/NpB,OAAO,WAAuB;AAC9B,OAAO,gBAAgB;AACvB,OAAO,YAAY;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAEP,OAAO,oBAAoB;AAC3B,OAAO,mBAAmB;AAC1B,OAAO,cAAc;AAGrB,OAAO,sBAAsB;AAC7B,SAAS,yBAAyB,mBAAmB;AACrD,SAA+B,uBAAuB;AAwBtD,MAAM,mCAAmC,MAAM,UAAoE;AAAA,EACjH,OAAO,eAAe;AAAA,IACpB,eAAe,MAAM;AAAA,IAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,OAAwC;AAClD,UAAM,KAAK;AACX,SAAK,kBAAkB,MAAM,UAAU;AACvC,SAAK,qBAAqB,MAAM,UAAU;AAC1C,SAAK,QAAQ;AAAA,MACX,iBAAiB,CAAC;AAAA,MAClB,sBAAsB;AAAA,MACtB,MAAM;AAAA,QACJ,KAAK,CAAC,iBAAiB;AAAA,MACzB;AAAA,MACA,QAAQ;AAAA,QACN,KAAK;AAAA,MACP;AAAA,IACF;AAAA,EACF;AAAA,EAEA,YAAY,WAAmB;AAC7B,SAAK,SAAS;AAAA,MACZ,MAAM;AAAA,QACJ,GAAG,KAAK,MAAM;AAAA,QACd,CAAC,SAAS,GAAG,CAAC,iBAAiB;AAAA,MACjC;AAAA,MACA,QAAQ;AAAA,QACN,GAAG,KAAK,MAAM;AAAA,QACd,CAAC,SAAS,GAAG,CAAC,KAAK,MAAM,OAAO,SAAS;AAAA,MAC3C;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,eAAe,MAAM;AACnB,QAAI,MAAM;AAEV,UAAM,YAAqC,CAAC;AAE5C,SAAK,cAAc,EAAE,QAAQ,YAAU;AACrC,YAAM,cAAc,YAAY,OAAO,CAAC,EAAE,EAAE;AAC5C,YAAM,YAAY,CAAC,aAAa,GAAG,EAAE,KAAK,GAAG;AAG7C,UAAI,OAAO,SAAS,GAAG;AACrB,kBAAU,SAAS,IAAI,KAAK,MAAM;AAAA,MACpC;AAEA,aAAO,QAAQ,CAAC,WAAW;AACzB,eAAO;AAAA,MACT,CAAC;AAAA,IACH,CAAC;AAED,SAAK,SAAS;AAAA,MACZ,iBAAiB;AAAA,MACjB,sBAAsB,CAAC,KAAK,MAAM;AAAA,IACpC,CAAC;AAAA,EACH;AAAA,EAEA,gBAA0D;AACxD,UAAM,SAAS,CAAC;AAChB,UAAM,eAAe,oBAAI,IAAI;AAE7B,aAAS,IAAI,GAAG,IAAI,KAAK,MAAM,OAAO,QAAQ,KAAK;AACjD,YAAM,YAAY,KAAK,MAAM,OAAO,CAAC;AACrC,YAAM,gBAAgB,KAAK,MAAM,OAAO,IAAE,CAAC;AAC3C,mBAAa;AAAA,QAAI,UAAU;AAAA,QACzB,aAAa,IAAI,UAAU,EAAE,IAAI,aAAa,IAAI,UAAU,EAAE,IAAI,IAAI;AAAA,MACxE;AACA,YAAM,QAAQ;AAAA,QACZ,GAAG;AAAA,QACH,KAAK,eAAe,UAAU,EAAE,IAAI,aAAa,IAAI,UAAU,EAAE,CAAC;AAAA,MACpE;AACA,UAAG,iBAAiB,YAAY,cAAc,EAAE,KAAK,YAAY,MAAM,EAAE,GAAG;AAC1E,cAAM,YAAY,OAAO,OAAO,SAAS,CAAC;AAC1C,kBAAU,KAAK,KAAK;AAAA,MACtB,OAAO;AACL,eAAO,KAAK,CAAC,KAAK,CAAC;AAAA,MACrB;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA,EAEA,iBAAiB,aAAqB,KAAa;AACjD,UAAM,YAAY,CAAC,aAAa,GAAG,EAAE,KAAK,GAAG;AAC7C,UAAM,YAAY,EAAE,GAAG,KAAK,MAAM,gBAAgB;AAClD,QAAG,aAAa,KAAK,MAAM,iBAAiB;AAC1C,gBAAU,SAAS,IAAI,CAAC,KAAK,MAAM,gBAAgB,SAAS;AAAA,IAC9D,OAAO;AACL,gBAAU,SAAS,IAAI;AAAA,IACzB;AACA,SAAK,SAAS;AAAA,MACZ,iBAAiB;AAAA,IACnB,CAAC;AAAA,EACH;AAAA,EAEA,YAAY,aAAqB,KAAa;AAC5C,UAAM,YAAY,KAAK,MAAM,gBAAgB,CAAC,aAAa,GAAG,EAAE,KAAK,GAAG,CAAC;AACzE,WAAO,cAAc,SAAY,OAAO;AAAA,EAC1C;AAAA,EAEA,sBAAuB,WAAoC,WAAoC;AAE7F,QAAI,KAAK,UAAU,WAAW;AAC5B,aAAO;AAAA,IACT;AAIA,aAAS,iBAAiB,OAA2B;AACnD,YAAM,MAAiD;AAAA,QACrD,IAAI,MAAM;AAAA,MACZ;AAEA,UAAI,MAAM,QAAQ;AAChB,YAAI,SAAS;AAAA,UACX,YAAY,MAAM,OAAO;AAAA,QAC3B;AAAA,MACF;AACA,aAAO;AAAA,IACT;AACA,UAAM,cAAc,OAAO;AAAA,MACzB,UAAU,OAAO,IAAI,gBAAgB;AAAA,MACrC,KAAK,MAAM,OAAO,IAAI,gBAAgB;AAAA,IACxC;AAEA,aAAS,cAAc,OAAgC;AACrD,YAAM,MAAM;AAAA,QACV,GAAG;AAAA,MACL;AACA,aAAO,IAAI,QAAQ;AACnB,aAAO;AAAA,IACT;AAIA,UAAM,aAAa,OAAO;AAAA,MACxB,cAAc,KAAK,KAAK;AAAA,MACxB,cAAc,SAAS;AAAA,IACzB;AAEA,UAAM,eAAe,EAAE,eAAe;AACtC,WAAO;AAAA,EACT;AAAA,EAEA,mBAAoB,WAAoC;AACtD,QAAI,UAAU,uBAAuB,KAAK,MAAM,oBAAoB;AAClE,YAAM,mBAAmB,KAAK,gBAAgB;AAC9C,UAAI,oBAAoB,iBAAiB,MAAM;AAC7C,cAAM,SAAS,iBAAiB;AAChC,cAAM,UAAU;AAAA,UACd,MAAM,KAAK,mBAAmB;AAAA,UAC9B,WAAW;AAAA,QACb;AACA,cAAM,WAAW,IAAI,qBAAqB,aAAW;AACnD,mBAAS,UAAU,MAAM;AACzB,cAAI,QAAQ,SAAS,KAAK,QAAQ,CAAC,EAAE,oBAAoB,GAAG;AAC1D,mBAAO,eAAe;AAAA,UACxB;AAAA,QACF,GAAG,OAAO;AAEV,iBAAS,QAAQ,MAAM;AAAA,MACzB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,SAAS;AAEP,UAAM,YAA2B,CAAC;AAClC,QAAI,MAAM;AACV,UAAM,gBAAgB,KAAK,cAAc;AACzC,kBAAc,QAAQ,YAAU;AAC9B,YAAM,cAAc,YAAY,OAAO,CAAC,EAAE,EAAE;AAC5C,UAAG,OAAO,SAAS,GAAG;AACpB,cAAM,MAAM;AAAA,UAAC;AAAA;AAAA,YACX,eAAa,CAAC,aAAa,GAAG,EAAE,KAAK,GAAG;AAAA,YACxC,iBAAe,OAAO,IAAI,OAAK,EAAE,GAAG,EAAE,KAAK,GAAG;AAAA,YAE9C,OAAO;AAAA,YACP,UAAU,CAAC,KAAK,YAAY,aAAa,GAAG,KAAK,QAAQ,KAAK,MAAM;AAAA,YACpE,gBAAgB,KAAK,iBAAiB,KAAK,MAAM,aAAa,GAAG;AAAA;AAAA,UAH5D,SAAS,WAAW,IAAI,GAAG;AAAA,QAIlC;AACA,kBAAU,KAAK,GAAG;AAAA,MACpB;AAEA,aAAO,QAAQ,CAAC,OAAO,eAAe;AACpC,cAAM,WAAW,wBAAwB,KAAK,MAAM,QAAQ,GAAG;AAE/D,cAAM,aAAa,KAAK,MAAM,OAAO,KAAK,WAAS;AACjD,iBACE,MAAM,UACN,MAAM,OAAO,SAAS,WACtB,MAAM,OAAO,KAAK,SAAS;AAAA,QAE/B,CAAC;AAED,cAAM,kBAAgD,CAAC;AACvD,YAAI,QAAQ,KAAK,MAAM,oBAAoB;AACzC,0BAAgB,MAAM,KAAK;AAAA,QAC7B;AAEA,cAAM,WAAW;AAAA,UAAC;AAAA;AAAA,YAChB,WAAW,WAAW;AAAA,cACpB,sCAAsC,OAAO,SAAS,KAAK,KAAK,YAAY,aAAa,QAAQ,KAAK,QAAQ,KAAK,MAAM;AAAA,cACzH,uCAAuC,cAAc,OAAO,SAAS,KAAK,OAAO,SAAS;AAAA,cAC1F,mCAAmC,CAAC,CAAC;AAAA,YACvC,CAAC;AAAA,YAED,IAAI,MAAM;AAAA,YACV,SAAS,MAAM;AAAA,YACf,YAAY;AAAA,YACZ,WAAW,MAAM;AAAA,YACjB,aAAa,MAAM,UAAU,CAAC,GAAG;AAAA,YACjC,YAAY,QAAQ,KAAK,MAAM;AAAA,YAC/B,eAAe,KAAK,MAAM;AAAA,YAC1B,gBAAgB,KAAK,MAAM,gBAAgB,KAAK,IAAI;AAAA,YACpD,aAAa,KAAK,MAAM,YAAY,KAAK,IAAI;AAAA,YAC7C,yBAAyB,KAAK,MAAM,wBAAwB,KAAK,IAAI;AAAA,YACpE,GAAG;AAAA;AAAA,UAXC,MAAM;AAAA,QAYb;AACA,kBAAU,KAAK,QAAQ;AACvB,eAAO;AAAA,MACT,CAAC;AAAA,IACH,CAAC;AAED,UAAM,IAAI,KAAK,MAAM;AAErB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,eAAY;AAAA,QACZ,MAAK;AAAA,QACL,cAAY,EAAE,aAAa;AAAA,QAC3B,KAAK,KAAK;AAAA,QAEV;AAAA;AAAA,YAAC;AAAA;AAAA,cAEC,QAAQ,KAAK,MAAM;AAAA,cACnB,SAAS,KAAK,MAAM;AAAA,cACpB,QAAQ,KAAK,MAAM,OAAO;AAAA,cAC1B,cAAc,KAAK,YAAY,KAAK,MAAM,KAAK;AAAA,cAC/C,gBAAgB,KAAK,MAAM;AAAA;AAAA,YALtB,KAAK,MAAM,KAAK;AAAA,UAMvB;AAAA,UACA,qBAAC,YAAO,WAAU,8BAChB;AAAA,gCAAC,UAAK,WAAU,oCAAoC,YAAE,QAAQ,GAAE;AAAA,YAChE,oBAAC,UAAK,WAAU,kBAAiB;AAAA,YACjC,oBAAC,SAAI,WAAU,6BACb,8BAAC,SAAI,WAAU,wBACb;AAAA,cAAC;AAAA;AAAA,gBACC,IAAG;AAAA,gBACH,eAAY;AAAA,gBACZ,SAAS,KAAK;AAAA,gBACd,WAAU;AAAA,gBACT,eAAK,MAAM,yBAAyB,OACnC,EAAE,UAAU,IAEZ,EAAE,QAAQ;AAAA;AAAA,YAEd,GACF,GACF;AAAA,YACA,oBAAC,SAAI,WAAU,6BACb,8BAAC,SAAI,WAAU,wBACb;AAAA,cAAC;AAAA;AAAA,gBACC,SAAS,KAAK,YAAY,KAAK,MAAM,KAAK;AAAA,gBAC1C,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACT,YAAE,WAAW;AAAA;AAAA,YAChB,GACF,GACF;AAAA,aACF;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAY,EAAE,aAAa;AAAA,cAE3B,8BAAC,QAAG,WAAU,iCACX,qBACH;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,qBAAqB,gBAAgB,EAAE,0BAA0B;AAMvE,MAAM,YAAsC,CAAC,UAAU;AACrD,QAAM,UAAU,WAAW,UAAU,eAAe,EAAE,sBAAsB,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;AAE9F,QAAM,gBAAgB,CAAC,UAAwB;AAC7C,UAAM,EAAC,QAAQ,KAAI,IAAI;AACvB,QAAI,CAAC,KAAM;AAEX,UAAM,WAAW,MAAM,OAAO,UAAU,WAAS,MAAM,OAAO,OAAO,EAAE;AACvE,UAAM,WAAW,MAAM,OAAO,UAAU,WAAS,MAAM,OAAO,KAAK,EAAE;AAErE,QAAI,aAAa,MAAM,aAAa,MAAM,aAAa,UAAU;AAC/D,YAAM,YAAY,EAAC,UAAU,SAAQ,CAAC;AAAA,IACxC;AAAA,EACF;AAEA,QAAM,WAAW,MAAM,OAAO,IAAI,WAAS,MAAM,EAAE;AAEnD,SACE,oBAAC,cAAW,SAAkB,oBAAoB,eAAe,WAAW,eAC1E,8BAAC,mBAAgB,OAAO,UAAU,UAAU,6BAC1C,8BAAC,sBAAoB,GAAG,OAAO,GACjC,GACF;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f68294db07afb93676beed55b7a9de47e3a7c779"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Ft=function(){return s},s}Ft();class sSe extends En.Component{static defaultProps=(Ft().s[0]++,{onLayerSelect:()=>{Ft().f[0]++}});selectedItemRef;scrollContainerRef;constructor(e){Ft().f[1]++,Ft().s[1]++,super(e),Ft().s[2]++,this.selectedItemRef=En.createRef(),Ft().s[3]++,this.scrollContainerRef=En.createRef(),Ft().s[4]++,this.state={collapsedGroups:{},areAllGroupsExpanded:!1,keys:{add:+cx()},isOpen:{add:!1}}}toggleModal(e){Ft().f[2]++,Ft().s[5]++,this.setState({keys:{...this.state.keys,[e]:+cx()},isOpen:{...this.state.isOpen,[e]:!this.state.isOpen[e]}})}toggleLayers=(Ft().s[6]++,()=>{Ft().f[3]++;let e=(Ft().s[7]++,0);const t=(Ft().s[8]++,{});Ft().s[9]++,this.groupedLayers().forEach(i=>{Ft().f[4]++;const r=(Ft().s[10]++,C_(i[0].id)),o=(Ft().s[11]++,[r,e].join("-"));Ft().s[12]++,i.length>1?(Ft().b[0][0]++,Ft().s[13]++,t[o]=this.state.areAllGroupsExpanded):Ft().b[0][1]++,Ft().s[14]++,i.forEach(s=>{Ft().f[5]++,Ft().s[15]++,e+=1})}),Ft().s[16]++,this.setState({collapsedGroups:t,areAllGroupsExpanded:!this.state.areAllGroupsExpanded})});groupedLayers(){Ft().f[6]++;const e=(Ft().s[17]++,[]),t=(Ft().s[18]++,new Map);Ft().s[19]++;for(let i=(Ft().s[20]++,0);i<this.props.layers.length;i++){const r=(Ft().s[21]++,this.props.layers[i]),o=(Ft().s[22]++,this.props.layers[i-1]);Ft().s[23]++,t.set(r.id,t.has(r.id)?(Ft().b[1][0]++,t.get(r.id)+1):(Ft().b[1][1]++,0));const s=(Ft().s[24]++,{...r,key:`layers-list-${r.id}-${t.get(r.id)}`});if(Ft().s[25]++,Ft().b[3][0]++,o&&(Ft().b[3][1]++,C_(o.id)==C_(s.id))){Ft().b[2][0]++;const a=(Ft().s[26]++,e[e.length-1]);Ft().s[27]++,a.push(s)}else Ft().b[2][1]++,Ft().s[28]++,e.push([s])}return Ft().s[29]++,e}toggleLayerGroup(e,t){Ft().f[7]++;const i=(Ft().s[30]++,[e,t].join("-")),r=(Ft().s[31]++,{...this.state.collapsedGroups});Ft().s[32]++,i in this.state.collapsedGroups?(Ft().b[4][0]++,Ft().s[33]++,r[i]=!this.state.collapsedGroups[i]):(Ft().b[4][1]++,Ft().s[34]++,r[i]=!1),Ft().s[35]++,this.setState({collapsedGroups:r})}isCollapsed(e,t){Ft().f[8]++;const i=(Ft().s[36]++,this.state.collapsedGroups[[e,t].join("-")]);return Ft().s[37]++,i===void 0?(Ft().b[5][0]++,!0):(Ft().b[5][1]++,i)}shouldComponentUpdate(e,t){if(Ft().f[9]++,Ft().s[38]++,this.state!==t)return Ft().b[6][0]++,Ft().s[39]++,!0;Ft().b[6][1]++;function i(c){Ft().f[10]++;const A=(Ft().s[40]++,{id:c.id});return Ft().s[41]++,c.layout?(Ft().b[7][0]++,Ft().s[42]++,A.layout={visibility:c.layout.visibility}):Ft().b[7][1]++,Ft().s[43]++,A}const r=(Ft().s[44]++,qT.isEqual(e.layers.map(i),this.props.layers.map(i)));function o(c){Ft().f[11]++;const A=(Ft().s[45]++,{...c});return Ft().s[46]++,delete A.layers,Ft().s[47]++,A}const s=(Ft().s[48]++,qT.isEqual(o(this.props),o(e))),a=(Ft().s[49]++,Ft().b[8][0]++,!(r&&(Ft().b[8][1]++,s)));return Ft().s[50]++,a}componentDidUpdate(e){if(Ft().f[12]++,Ft().s[51]++,e.selectedLayerIndex!==this.props.selectedLayerIndex){Ft().b[9][0]++;const t=(Ft().s[52]++,this.selectedItemRef.current);if(Ft().s[53]++,Ft().b[11][0]++,t&&(Ft().b[11][1]++,t.node)){Ft().b[10][0]++;const i=(Ft().s[54]++,t.node),r=(Ft().s[55]++,{root:this.scrollContainerRef.current,threshold:1}),o=(Ft().s[56]++,new IntersectionObserver(s=>{Ft().f[13]++,Ft().s[57]++,o.unobserve(i),Ft().s[58]++,Ft().b[13][0]++,s.length>0&&(Ft().b[13][1]++,s[0].intersectionRatio<1)?(Ft().b[12][0]++,Ft().s[59]++,i.scrollIntoView()):Ft().b[12][1]++},r));Ft().s[60]++,o.observe(i)}else Ft().b[10][1]++}else Ft().b[9][1]++}render(){Ft().f[14]++;const e=(Ft().s[61]++,[]);let t=(Ft().s[62]++,0);const i=(Ft().s[63]++,this.groupedLayers());Ft().s[64]++,i.forEach(o=>{Ft().f[15]++;const s=(Ft().s[65]++,C_(o[0].id));if(Ft().s[66]++,o.length>1){Ft().b[14][0]++;const a=(Ft().s[67]++,ie.jsx(a2e,{"data-wd-key":[s,t].join("-"),"aria-controls":o.map(c=>(Ft().f[16]++,Ft().s[68]++,c.key)).join(" "),title:s,isActive:(Ft().b[15][0]++,!this.isCollapsed(s,t)||(Ft().b[15][1]++,t===this.props.selectedLayerIndex)),onActiveToggle:this.toggleLayerGroup.bind(this,s,t)},`group-${s}-${t}`));Ft().s[69]++,e.push(a)}else Ft().b[14][1]++;Ft().s[70]++,o.forEach((a,c)=>{Ft().f[17]++;const A=(Ft().s[71]++,oSe(this.props.layers,t)),m=(Ft().s[72]++,this.props.errors.find(_=>(Ft().f[18]++,Ft().s[73]++,Ft().b[16][0]++,_.parsed&&(Ft().b[16][1]++,_.parsed.type==="layer")&&(Ft().b[16][2]++,_.parsed.data.index==t)))),v=(Ft().s[74]++,{});Ft().s[75]++,t===this.props.selectedLayerIndex?(Ft().b[17][0]++,Ft().s[76]++,v.ref=this.selectedItemRef):Ft().b[17][1]++;const x=(Ft().s[77]++,ie.jsx(u2e,{className:Yg({"maputnik-layer-list-item-collapsed":(Ft().b[18][0]++,o.length>1&&(Ft().b[18][1]++,this.isCollapsed(s,A))&&(Ft().b[18][2]++,t!==this.props.selectedLayerIndex)),"maputnik-layer-list-item-group-last":(Ft().b[19][0]++,c==o.length-1&&(Ft().b[19][1]++,o.length>1)),"maputnik-layer-list-item--error":!!m}),id:a.key,layerId:a.id,layerIndex:t,layerType:a.type,visibility:(Ft().b[20][0]++,a.layout||(Ft().b[20][1]++,{})).visibility,isSelected:t===this.props.selectedLayerIndex,onLayerSelect:this.props.onLayerSelect,onLayerDestroy:this.props.onLayerDestroy?.bind(this),onLayerCopy:this.props.onLayerCopy.bind(this),onLayerVisibilityToggle:this.props.onLayerVisibilityToggle.bind(this),...v},a.key));Ft().s[78]++,e.push(x),Ft().s[79]++,t+=1})});const r=(Ft().s[80]++,this.props.t);return Ft().s[81]++,ie.jsxs("section",{className:"maputnik-layer-list","data-wd-key":"layer-list",role:"complementary","aria-label":r("Layers list"),ref:this.scrollContainerRef,children:[ie.jsx(nSe,{layers:this.props.layers,sources:this.props.sources,isOpen:this.state.isOpen.add,onOpenToggle:this.toggleModal.bind(this,"add"),onLayersChange:this.props.onLayersChange},this.state.keys.add),ie.jsxs("header",{className:"maputnik-layer-list-header",children:[ie.jsx("span",{className:"maputnik-layer-list-header-title",children:r("Layers")}),ie.jsx("span",{className:"maputnik-space"}),ie.jsx("div",{className:"maputnik-default-property",children:ie.jsx("div",{className:"maputnik-multibutton",children:ie.jsx("button",{id:"skip-target-layer-list","data-wd-key":"skip-target-layer-list",onClick:this.toggleLayers,className:"maputnik-button",children:this.state.areAllGroupsExpanded===!0?(Ft().b[21][0]++,r("Collapse")):(Ft().b[21][1]++,r("Expand"))})})}),ie.jsx("div",{className:"maputnik-default-property",children:ie.jsx("div",{className:"maputnik-multibutton",children:ie.jsx("button",{onClick:this.toggleModal.bind(this,"add"),"data-wd-key":"layer-list:add-layer",className:"maputnik-button maputnik-button-selected",children:r("Add Layer")})})})]}),ie.jsx("div",{role:"navigation","aria-label":r("Layers list"),children:ie.jsx("ul",{className:"maputnik-layer-list-container",children:e})})]})}}const aSe=(Ft().s[82]++,Jo()(sSe));Ft().s[83]++;const lSe=n=>{Ft().f[19]++;const e=(Ft().s[84]++,D_e(R_e(RU,{activationConstraint:{distance:5}})));Ft().s[85]++;const t=r=>{Ft().f[20]++;const{active:o,over:s}=(Ft().s[86]++,r);if(Ft().s[87]++,s)Ft().b[22][1]++;else{Ft().b[22][0]++,Ft().s[88]++;return}const a=(Ft().s[89]++,n.layers.findIndex(A=>(Ft().f[21]++,Ft().s[90]++,A.id===o.id))),c=(Ft().s[91]++,n.layers.findIndex(A=>(Ft().f[22]++,Ft().s[92]++,A.id===s.id)));Ft().s[93]++,Ft().b[24][0]++,a!==-1&&(Ft().b[24][1]++,c!==-1)&&(Ft().b[24][2]++,a!==c)?(Ft().b[23][0]++,Ft().s[94]++,n.onMoveLayer({oldIndex:a,newIndex:c})):Ft().b[23][1]++},i=(Ft().s[95]++,n.layers.map(r=>(Ft().f[23]++,Ft().s[96]++,r.id)));return Ft().s[97]++,ie.jsx(Lxe,{sensors:e,collisionDetection:F_e,onDragEnd:t,children:ie.jsx(Zxe,{items:i,strategy:Vxe,children:ie.jsx(aSe,{...n})})})};var zB,AG;function jne(){if(AG)return zB;AG=1;var n={},e="a menu outside a mounted Wrapper with an id, or a menu that does not exist";function t(s,a){n[s]=a}function i(s){delete n[s]}function r(s,a){var c=n[s];if(!c)throw new Error("Cannot open "+e);c.openMenu(a)}function o(s,a){var c=n[s];if(!c)throw new Error("Cannot close "+e);c.closeMenu(a)}return zB={registerManager:t,unregisterManager:i,openMenu:r,closeMenu:o},zB}var jB,hG;function uSe(){if(hG)return jB;hG=1;function n(r){r=r||{};var o=r.keybindings||{};this._settings={keybindings:{next:o.next||{keyCode:40},prev:o.prev||{keyCode:38},first:o.first,last:o.last},wrap:r.wrap,stringSearch:r.stringSearch,stringSearchDelay:800},this._keybindingsLookup=[];var s,a;for(s in this._settings.keybindings)a=this._settings.keybindings[s],a&&[].concat(a).forEach((function(c){c.metaKey=c.metaKey||!1,c.ctrlKey=c.ctrlKey||!1,c.altKey=c.altKey||!1,c.shiftKey=c.shiftKey||!1,this._keybindingsLookup.push({action:s,eventMatcher:c})}).bind(this));this._searchString="",this._members=[],r.members&&this.setMembers(r.members),this._boundHandleKeydownEvent=this._handleKeydownEvent.bind(this)}n.prototype.activate=function(){return document.addEventListener("keydown",this._boundHandleKeydownEvent,!0),this},n.prototype.deactivate=function(){return document.removeEventListener("keydown",this._boundHandleKeydownEvent,!0),this._clearSearchStringRefreshTimer(),this},n.prototype._handleKeydownEvent=function(r){var o=this._getActiveElementIndex();if(o!==-1){var s=!1;this._keybindingsLookup.forEach((function(a){if(e(a.eventMatcher,r))switch(s=!0,r.preventDefault(),a.action){case"next":this.moveFocusForward();break;case"prev":this.moveFocusBack();break;case"first":this.moveFocusToFirst();break;case"last":this.moveFocusToLast();break;default:return}}).bind(this)),s||this._handleUnboundKey(r)}},n.prototype.moveFocusForward=function(){var r=this._getActiveElementIndex(),o;return r<this._members.length-1?o=r+1:this._settings.wrap?o=0:o=r,this.focusNodeAtIndex(o),o},n.prototype.moveFocusBack=function(){var r=this._getActiveElementIndex(),o;return r>0?o=r-1:this._settings.wrap?o=this._members.length-1:o=r,this.focusNodeAtIndex(o),o},n.prototype.moveFocusToFirst=function(){this.focusNodeAtIndex(0)},n.prototype.moveFocusToLast=function(){this.focusNodeAtIndex(this._members.length-1)},n.prototype._handleUnboundKey=function(r){if(this._settings.stringSearch){if(this._searchString!==""&&(r.key===" "||r.keyCode===32))return r.preventDefault(),-1;if(!t(r.keyCode)||r.ctrlKey||r.metaKey||r.altKey)return-1;r.preventDefault(),this._addToSearchString(String.fromCharCode(r.keyCode)),this._runStringSearch()}},n.prototype._clearSearchString=function(){this._searchString=""},n.prototype._addToSearchString=function(r){this._searchString+=r.toLowerCase()},n.prototype._startSearchStringRefreshTimer=function(){var r=this;this._clearSearchStringRefreshTimer(),this._stringSearchTimer=setTimeout(function(){r._clearSearchString()},this._settings.stringSearchDelay)},n.prototype._clearSearchStringRefreshTimer=function(){clearTimeout(this._stringSearchTimer)},n.prototype._runStringSearch=function(){this._startSearchStringRefreshTimer(),this.moveFocusByString(this._searchString)},n.prototype.moveFocusByString=function(r){for(var o,s=0,a=this._members.length;s<a;s++)if(o=this._members[s],!!o.text&&o.text.indexOf(r)===0)return i(o.node)},n.prototype._findIndexOfNode=function(r){for(var o=0,s=this._members.length;o<s;o++)if(this._members[o].node===r)return o;return-1},n.prototype._getActiveElementIndex=function(){return this._findIndexOfNode(document.activeElement)},n.prototype.focusNodeAtIndex=function(r){var o=this._members[r];return o&&i(o.node),this},n.prototype.addMember=function(r,o){var s=r.node||r,a=r.text||s.getAttribute("data-focus-group-text")||s.textContent||"";this._checkNode(s);var c=a.replace(/[\W_]/g,"").toLowerCase(),A={node:s,text:c};return o!=null?this._members.splice(o,0,A):this._members.push(A),this},n.prototype.removeMember=function(r){var o=typeof r=="number"?r:this._findIndexOfNode(r);if(o!==-1)return this._members.splice(o,1),this},n.prototype.clearMembers=function(){return this._members=[],this},n.prototype.setMembers=function(r){this.clearMembers();for(var o=0,s=r.length;o<s;o++)this.addMember(r[o]);return this},n.prototype.getMembers=function(){return this._members},n.prototype._checkNode=function(r){if(!r.nodeType||r.nodeType!==window.Node.ELEMENT_NODE)throw new Error("focus-group: only DOM nodes allowed");return r};function e(r,o){for(var s in r)if(o[s]!==void 0&&r[s]!==o[s])return!1;return!0}function t(r){return r>=65&&r<=90}function i(r){!r||!r.focus||(r.focus(),r.tagName.toLowerCase()==="input"&&r.select())}return jB=function(o){return new n(o)},jB}var NB,dG;function cSe(){if(dG)return NB;dG=1;var n=uSe(),e=jne(),t={wrap:!0,stringSearch:!0},i={init:function(c){this.updateOptions(c),this.handleBlur=r.bind(this),this.handleSelection=o.bind(this),this.handleMenuKey=s.bind(this),this.focusGroup=n(t),this.button=null,this.menu=null,this.isOpen=!1},updateOptions:function(c){var A=this.options;this.options=c||this.options||{},typeof this.options.closeOnSelection>"u"&&(this.options.closeOnSelection=!0),typeof this.options.closeOnBlur>"u"&&(this.options.closeOnBlur=!0),this.options.id&&e.registerManager(this.options.id,this),A&&A.id&&A.id!==this.options.id&&e.unregisterManager(this.options.id,this)},focusItem:function(c){this.focusGroup.focusNodeAtIndex(c)},addItem:function(c){this.focusGroup.addMember(c)},clearItems:function(){this.focusGroup.clearMembers()},handleButtonNonArrowKey:function(c){this.focusGroup._handleUnboundKey(c)},destroy:function(){this.button=null,this.menu=null,this.focusGroup.deactivate(),clearTimeout(this.blurTimer),clearTimeout(this.moveFocusTimer)},update:function(){this.menu.setState({isOpen:this.isOpen}),this.button.setState({menuOpen:this.isOpen}),this.options.onMenuToggle&&this.options.onMenuToggle({isOpen:this.isOpen})},openMenu:function(c){if(!this.isOpen&&(c=c||{},c.focusMenu===void 0&&(c.focusMenu=!0),this.isOpen=!0,this.update(),this.focusGroup.activate(),c.focusMenu)){var A=this;this.moveFocusTimer=setTimeout(function(){A.focusItem(0)},0)}},closeMenu:function(c){this.isOpen&&(c=c||{},this.isOpen=!1,this.update(),c.focusButton&&this.button.ref.current.focus())},toggleMenu:function(c,A){c=c||{},A=A||{},this.isOpen?this.closeMenu(c):this.openMenu(A)}};function r(){var a=this;a.blurTimer=setTimeout(function(){if(a.button){var c=a.button.ref.current;if(c){var A=c.ownerDocument.activeElement;if(!(c&&A===c)){var m=a.menu.ref.current;if(m===A){a.focusItem(0);return}m&&m.contains(A)||a.isOpen&&a.closeMenu({focusButton:!1})}}}},0)}function o(a,c){this.options.closeOnSelection&&this.closeMenu({focusButton:!0}),this.options.onSelection&&this.options.onSelection(a,c)}function s(a){if(this.isOpen)switch(a.key){case"Escape":a.preventDefault(),this.closeMenu({focusButton:!0});break;case"Home":a.preventDefault(),this.focusGroup.moveFocusToFirst();break;case"End":a.preventDefault(),this.focusGroup.moveFocusToLast();break}}return NB=function(a){var c=Object.create(i);return c.init(a),c},NB}var GB,fG;function n6(){if(fG)return GB;fG=1;var n=La(),e=n.createContext();return GB=e,GB}var WB,pG;function i6(){if(pG)return WB;pG=1;var n=s1();return WB={refType:n.oneOfType([n.func,n.shape({current:n.elementType})])},WB}var QB,mG;function r6(){return mG||(mG=1,QB=function(n,e,t){t=t||{};for(var i in e)e.hasOwnProperty(i)&&(t[i]||(n[i]=e[i]))}),QB}var qB,gG;function ASe(){if(gG)return qB;gG=1;function n(_,O){if(!(_ instanceof O))throw new TypeError("Cannot call a class as a function")}function e(_,O){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:_}function t(_,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);_.prototype=Object.create(O&&O.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(_,O):_.__proto__=O)}var i=La(),r=s1(),o=cSe(),s=n6(),a=i6(),c=a.refType,A=r6(),m={children:r.node.isRequired,forwardedRef:c,onMenuToggle:r.func,onSelection:r.func,closeOnSelection:r.bool,closeOnBlur:r.bool,tag:r.string},v=function(O){return{onMenuToggle:O.onMenuToggle,onSelection:O.onSelection,closeOnSelection:O.closeOnSelection,closeOnBlur:O.closeOnBlur,id:O.id}},x=(function(_){t(O,_);function O(P){n(this,O);var F=e(this,_.call(this,P));return F.manager=o(v(P)),F}return O.prototype.componentDidUpdate=function(){this.manager.updateOptions(v(this.props))},O.prototype.render=function(){var F={};return A(F,this.props,m),i.createElement(s.Provider,{value:this.manager},i.createElement(this.props.tag,F,this.props.children))},O})(i.Component);return x.propTypes=m,x.defaultProps={tag:"div"},qB=i.forwardRef(function(_,O){var P={forwardedRef:O};return A(P,_,{children:m.children,forwardedRef:m.forwardedRef}),A(P,{forwardedRef:O}),i.createElement(x,P,_.children)}),qB}var YB,yG;function hSe(){if(yG)return YB;yG=1;function n(x,_){if(!(x instanceof _))throw new TypeError("Cannot call a class as a function")}function e(x,_){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:x}function t(x,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);x.prototype=Object.create(_&&_.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(x,_):x.__proto__=_)}var i=La(),r=s1(),o=n6(),s=i6(),a=s.refType,c=r6(),A={ambManager:r.object.isRequired,children:r.node.isRequired,disabled:r.bool,forwardedRef:a,tag:r.string},m=function(){return["button","fieldset","input","optgroup","option","select","textarea"]},v=(function(x){t(_,x);function _(){var O,P,F;n(this,_);for(var j=arguments.length,Q=Array(j),V=0;V<j;V++)Q[V]=arguments[V];return F=(O=(P=e(this,x.call.apply(x,[this].concat(Q))),P),P.ref=i.createRef(),P.handleKeyDown=function(H){if(!P.props.disabled){var G=P.props.ambManager;switch(H.key){case"ArrowDown":H.preventDefault(),G.isOpen?G.focusItem(0):G.openMenu();break;case"Enter":case" ":H.preventDefault(),G.toggleMenu();break;case"Escape":G.handleMenuKey(H);break;default:G.handleButtonNonArrowKey(H)}}},P.handleClick=function(){P.props.disabled||P.props.ambManager.toggleMenu({},{focusMenu:!1})},P.setRef=function(H){P.ref.current=H,typeof P.props.forwardedRef=="function"?P.props.forwardedRef(H):P.props.forwardedRef&&(P.props.forwardedRef.current=H)},O),e(P,F)}return _.prototype.componentDidMount=function(){this.props.ambManager.button=this},_.prototype.componentWillUnmount=function(){this.props.ambManager.destroy()},_.prototype.render=function(){var P=this.props,F=this.props.ambManager,j={role:"button",tabIndex:P.disabled?"":"0","aria-haspopup":!0,"aria-expanded":F.isOpen,"aria-disabled":P.disabled,onKeyDown:this.handleKeyDown,onClick:this.handleClick},Q={};return c(Q,A),m().indexOf(P.tag)>=0&&delete Q.disabled,F.options.closeOnBlur&&(j.onBlur=F.handleBlur),c(j,P,Q),c(j,{ref:this.setRef}),i.createElement(P.tag,j,P.children)},_})(i.Component);return v.propTypes=A,v.defaultProps={tag:"span"},YB=i.forwardRef(function(x,_){return i.createElement(o.Consumer,null,function(O){var P={ambManager:O,forwardedRef:_};return c(P,x,{ambManager:A.ambManager,children:A.children,forwardedRef:A.forwardedRef}),i.createElement(v,P,x.children)})}),YB}var $B,vG;function dSe(){return vG||(vG=1,$B=function(e,t,i){var r=0,o=0,s=!1,a=!1,c=!1;e.addEventListener("click",A,i),e.addEventListener("touchstart",m,i);function A(F){c||t(F)}function m(F){c=!0,!s&&(s=!0,e.addEventListener("touchmove",v,i),e.addEventListener("touchend",x,i),e.addEventListener("touchcancel",_,i),a=!1,r=F.touches[0].clientX,o=F.touches[0].clientY)}function v(F){a||Math.abs(F.touches[0].clientX-r)<=10&&Math.abs(F.touches[0].clientY-o)<=10||(a=!0)}function x(F){s=!1,O(),a||t(F)}function _(){s=!1,a=!1,r=0,o=0}function O(){e.removeEventListener("touchmove",v,i),e.removeEventListener("touchend",x,i),e.removeEventListener("touchcancel",_,i)}function P(){e.removeEventListener("click",A,i),e.removeEventListener("touchstart",m,i),O()}return{remove:P}}),$B}var VB,bG;function fSe(){if(bG)return VB;bG=1;function n(x,_){if(!(x instanceof _))throw new TypeError("Cannot call a class as a function")}function e(x,_){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:x}function t(x,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);x.prototype=Object.create(_&&_.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(x,_):x.__proto__=_)}var i=La(),r=s1(),o=dSe(),s=n6(),a=i6(),c=a.refType,A=r6(),m={ambManager:r.object.isRequired,children:r.oneOfType([r.func,r.node]).isRequired,forwardedRef:c,tag:r.string},v=(function(x){t(_,x);function _(){var O,P,F;n(this,_);for(var j=arguments.length,Q=Array(j),V=0;V<j;V++)Q[V]=arguments[V];return F=(O=(P=e(this,x.call.apply(x,[this].concat(Q))),P),P.ref=i.createRef(),P.addTapListener=function(){var H=P.ref.current;if(H){var G=H.ownerDocument;G&&(P.tapListener=o(G.documentElement,P.handleTap))}},P.handleTap=function(H){P.ref.current.contains(H.target)||P.props.ambManager.button.ref.current.contains(H.target)||P.props.ambManager.closeMenu()},P.setRef=function(H){P.ref.current=H,typeof P.props.forwardedRef=="function"?P.props.forwardedRef(H):P.props.forwardedRef&&(P.props.forwardedRef.current=H)},O),e(P,F)}return _.prototype.componentDidMount=function(){this.props.ambManager.menu=this},_.prototype.componentDidUpdate=function(){var P=this.props.ambManager;P.options.closeOnBlur&&(P.isOpen&&!this.tapListener?this.addTapListener():!P.isOpen&&this.tapListener&&(this.tapListener.remove(),delete this.tapListener),P.isOpen||P.clearItems())},_.prototype.componentWillUnmount=function(){this.tapListener&&this.tapListener.remove(),this.props.ambManager.destroy()},_.prototype.render=function(){var P=this.props,F=this.props.ambManager,j=(function(){return typeof P.children=="function"?P.children({isOpen:F.isOpen}):F.isOpen?P.children:!1})();if(!j)return!1;var Q={onKeyDown:F.handleMenuKey,role:"menu",tabIndex:-1};return F.options.closeOnBlur&&(Q.onBlur=F.handleBlur),A(Q,P,m),A(Q,{ref:this.setRef}),i.createElement(P.tag,Q,j)},_})(i.Component);return v.propTypes=m,v.defaultProps={tag:"div"},VB=i.forwardRef(function(x,_){return i.createElement(s.Consumer,null,function(O){var P={ambManager:O,forwardedRef:_};return A(P,x,{ambManager:m.ambManager,children:m.children,forwardedRef:m.forwardedRef}),i.createElement(v,P,x.children)})}),VB}var HB,CG;function pSe(){if(CG)return HB;CG=1;function n(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")}function e(v,x){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:v}function t(v,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);v.prototype=Object.create(x&&x.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(v,x):v.__proto__=x)}var i=La(),r=s1(),o=n6(),s=i6(),a=s.refType,c=r6(),A={ambManager:r.object.isRequired,children:r.node.isRequired,forwardedRef:a,tag:r.string,text:r.string,value:r.any},m=(function(v){t(x,v);function x(){var _,O,P;n(this,x);for(var F=arguments.length,j=Array(F),Q=0;Q<F;Q++)j[Q]=arguments[Q];return P=(_=(O=e(this,v.call.apply(v,[this].concat(j))),O),O.ref=i.createRef(),O.handleKeyDown=function(V){V.key!=="Enter"&&V.key!==" "||O.props.tag==="a"&&O.props.href||(V.preventDefault(),O.selectItem(V))},O.selectItem=function(V){var H=typeof O.props.value<"u"?O.props.value:O.props.children;O.props.ambManager.handleSelection(H,V)},O.setRef=function(V){O.ref.current=V,typeof O.props.forwardedRef=="function"?O.props.forwardedRef(V):O.props.forwardedRef&&(O.props.forwardedRef.current=V)},_),e(O,P)}return x.prototype.componentDidMount=function(){this.props.ambManager.addItem({node:this.ref.current,text:this.props.text})},x.prototype.render=function(){var O={onClick:this.selectItem,onKeyDown:this.handleKeyDown,role:"menuitem",tabIndex:"-1",ref:this.setRef};return c(O,this.props,A),i.createElement(this.props.tag,O,this.props.children)},x})(i.Component);return m.propTypes=A,m.defaultProps={tag:"div"},HB=i.forwardRef(function(v,x){return i.createElement(o.Consumer,null,function(_){var O={ambManager:_,forwardedRef:x};return c(O,v,{ambManager:A.ambManager,children:A.children,forwardedRef:A.forwardedRef}),i.createElement(m,O,v.children)})}),HB}var ZB,_G;function mSe(){if(_G)return ZB;_G=1;var n=jne();return ZB={Wrapper:ASe(),Button:hSe(),Menu:fSe(),MenuItem:pSe(),openMenu:n.openMenu,closeMenu:n.closeMenu},ZB}var l5=mSe();function xG(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function SR(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?xG(Object(t),!0).forEach(function(i){$a(n,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):xG(Object(t)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(t,i))})}return n}function o6(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function MG(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function s6(n,e,t){return e&&MG(n.prototype,e),t&&MG(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function $a(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Ng(){return Ng=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Ng.apply(this,arguments)}function AK(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&ER(n,e)}function mS(n){return mS=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},mS(n)}function ER(n,e){return ER=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},ER(n,e)}function gSe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ySe(n,e){if(n==null)return{};var t={},i=Object.keys(n),r,o;for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&(t[r]=n[r]);return t}function a6(n,e){if(n==null)return{};var t=ySe(n,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(t[i]=n[i])}return t}function Jp(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function vSe(n,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jp(n)}function hK(n){var e=gSe();return function(){var i=mS(n),r;if(e){var o=mS(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return vSe(this,r)}}function bSe(n,e){return xSe(n)||wSe(n,e)||Nne(n,e)||ESe()}function CSe(n){return _Se(n)||MSe(n)||Nne(n)||SSe()}function _Se(n){if(Array.isArray(n))return OR(n)}function xSe(n){if(Array.isArray(n))return n}function MSe(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function wSe(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var i=[],r=!0,o=!1,s,a;try{for(t=t.call(n);!(r=(s=t.next()).done)&&(i.push(s.value),!(e&&i.length===e));r=!0);}catch(c){o=!0,a=c}finally{try{!r&&t.return!=null&&t.return()}finally{if(o)throw a}}return i}}function Nne(n,e){if(n){if(typeof n=="string")return OR(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return OR(n,e)}}function OR(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=n[t];return i}function SSe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ESe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var OSe=s6(function n(e){var t=this,i=e.expanded,r=i===void 0?[]:i,o=e.allowMultipleExpanded,s=o===void 0?!1:o,a=e.allowZeroExpanded,c=a===void 0?!1:a;o6(this,n),$a(this,"expanded",void 0),$a(this,"allowMultipleExpanded",void 0),$a(this,"allowZeroExpanded",void 0),$a(this,"toggleExpanded",function(A){if(t.isItemDisabled(A))return t;var m=t.isItemExpanded(A);return m?t.augment({expanded:t.expanded.filter(function(v){return v!==A})}):t.augment({expanded:t.allowMultipleExpanded?[].concat(CSe(t.expanded),[A]):[A]})}),$a(this,"isItemDisabled",function(A){var m=t.isItemExpanded(A),v=t.expanded.length===1;return!!(m&&!t.allowZeroExpanded&&v)}),$a(this,"isItemExpanded",function(A){return t.expanded.indexOf(A)!==-1}),$a(this,"getPanelAttributes",function(A,m){var v=m??t.isItemExpanded(A);return{role:t.allowMultipleExpanded?void 0:"region","aria-hidden":t.allowMultipleExpanded?!v:void 0,"aria-labelledby":t.getButtonId(A),id:t.getPanelId(A),hidden:v?void 0:!0}}),$a(this,"getHeadingAttributes",function(){return{role:"heading"}}),$a(this,"getButtonAttributes",function(A,m){var v=m??t.isItemExpanded(A),x=t.isItemDisabled(A);return{id:t.getButtonId(A),"aria-disabled":x,"aria-expanded":v,"aria-controls":t.getPanelId(A),role:"button",tabIndex:0}}),$a(this,"getPanelId",function(A){return"accordion__panel-".concat(A)}),$a(this,"getButtonId",function(A){return"accordion__heading-".concat(A)}),$a(this,"augment",function(A){return new n(SR({expanded:t.expanded,allowMultipleExpanded:t.allowMultipleExpanded,allowZeroExpanded:t.allowZeroExpanded},A))}),this.expanded=r,this.allowMultipleExpanded=s,this.allowZeroExpanded=c}),Gne=wt.createContext(null),Wne=(function(n){AK(t,n);var e=hK(t);function t(){var i;o6(this,t);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=e.call.apply(e,[this].concat(o)),$a(Jp(i),"state",new OSe({expanded:i.props.preExpanded,allowMultipleExpanded:i.props.allowMultipleExpanded,allowZeroExpanded:i.props.allowZeroExpanded})),$a(Jp(i),"toggleExpanded",function(a){i.setState(function(c){return c.toggleExpanded(a)},function(){i.props.onChange&&i.props.onChange(i.state.expanded)})}),$a(Jp(i),"isItemDisabled",function(a){return i.state.isItemDisabled(a)}),$a(Jp(i),"isItemExpanded",function(a){return i.state.isItemExpanded(a)}),$a(Jp(i),"getPanelAttributes",function(a,c){return i.state.getPanelAttributes(a,c)}),$a(Jp(i),"getHeadingAttributes",function(){return i.state.getHeadingAttributes()}),$a(Jp(i),"getButtonAttributes",function(a,c){return i.state.getButtonAttributes(a,c)}),i}return s6(t,[{key:"render",value:function(){var r=this.state,o=r.allowZeroExpanded,s=r.allowMultipleExpanded;return wt.createElement(Gne.Provider,{value:{allowMultipleExpanded:s,allowZeroExpanded:o,toggleExpanded:this.toggleExpanded,isItemDisabled:this.isItemDisabled,isItemExpanded:this.isItemExpanded,getPanelAttributes:this.getPanelAttributes,getHeadingAttributes:this.getHeadingAttributes,getButtonAttributes:this.getButtonAttributes}},this.props.children||null)}}]),t})(wt.PureComponent);$a(Wne,"defaultProps",{allowMultipleExpanded:!1,allowZeroExpanded:!1});var Qne=(function(n){AK(t,n);var e=hK(t);function t(){var i;o6(this,t);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=e.call.apply(e,[this].concat(o)),$a(Jp(i),"renderChildren",function(a){return a?i.props.children(a):null}),i}return s6(t,[{key:"render",value:function(){return wt.createElement(Gne.Consumer,null,this.renderChildren)}}]),t})(wt.PureComponent),BSe=["className","allowMultipleExpanded","allowZeroExpanded","onChange","preExpanded"],ISe=function(e){var t=e.className,i=t===void 0?"accordion":t,r=e.allowMultipleExpanded,o=e.allowZeroExpanded,s=e.onChange,a=e.preExpanded,c=a6(e,BSe);return wt.createElement(Wne,{preExpanded:a,allowMultipleExpanded:r,allowZeroExpanded:o,onChange:s},wt.createElement("div",Ng({"data-accordion-component":"Accordion",className:i},c)))},BR;(function(n){n.Accordion="Accordion",n.AccordionItem="AccordionItem",n.AccordionItemButton="AccordionItemButton",n.AccordionItemHeading="AccordionItemHeading",n.AccordionItemPanel="AccordionItemPanel"})(BR||(BR={}));var qne=BR,XB=0;function kSe(){var n=XB;return XB=XB+1,"raa-".concat(n)}var TSe=wt.useId||kSe,RSe=/[\u0009\u000a\u000c\u000d\u0020]/g;function i4(n){return n===""||RSe.test(n)?(console.error('uuid must be a valid HTML5 id but was given "'.concat(n,'", ASCII whitespaces are forbidden')),!1):!0}var Yne=wt.createContext(null),DSe=function(e){var t=e.children,i=e.uuid,r=e.accordionContext,o=e.dangerouslySetExpanded,s=function(){r.toggleExpanded(i)},a=function(A){var m=o??A.isItemExpanded(i),v=A.isItemDisabled(i),x=A.getPanelAttributes(i,o),_=A.getHeadingAttributes(i),O=A.getButtonAttributes(i,o);return wt.createElement(Yne.Provider,{value:{uuid:i,expanded:m,disabled:v,toggleExpanded:s,panelAttributes:x,headingAttributes:_,buttonAttributes:O}},t)};return wt.createElement(Qne,null,a)},PSe=function(e){return wt.createElement(Qne,null,function(t){return wt.createElement(DSe,Ng({},e,{accordionContext:t}))})},l6=function(e){var t=e.children,i=function(o){return o?t(o):null};return wt.createElement(Yne.Consumer,null,i)},USe=["uuid","dangerouslySetExpanded","className","activeClassName"],$ne=function(e){var t=e.uuid,i=e.dangerouslySetExpanded,r=e.className,o=r===void 0?"accordion__item":r,s=e.activeClassName,a=a6(e,USe),c=wt.useState(TSe()),A=bSe(c,1),m=A[0],v=t??m,x=function(O){var P=O.expanded,F=P&&s?s:o;return wt.createElement("div",Ng({"data-accordion-component":"AccordionItem",className:F},a))};return i4(v.toString()),a.id&&i4(a.id),wt.createElement(PSe,{uuid:v,dangerouslySetExpanded:i},wt.createElement(l6,null,x))};$ne.displayName=qne.AccordionItem;function Vne(n){return n&&(n.matches('[data-accordion-component="Accordion"]')?n:Vne(n.parentElement))}function u6(n){var e=Vne(n);return e&&Array.from(e.querySelectorAll('[data-accordion-component="AccordionItemButton"]'))}function KSe(n){var e=u6(n)||[],t=e[0];t&&t.focus()}function LSe(n){var e=u6(n)||[],t=e[e.length-1];t&&t.focus()}function FSe(n){var e=u6(n)||[],t=e.indexOf(n);if(t!==-1){var i=e[t+1];i&&i.focus()}}function zSe(n){var e=u6(n)||[],t=e.indexOf(n);if(t!==-1){var i=e[t-1];i&&i.focus()}}var U0={END:"End",ENTER:"Enter",HOME:"Home",SPACE:" ",SPACE_DEPRECATED:"Spacebar",UP:"ArrowUp",DOWN:"ArrowDown",LEFT:"ArrowLeft",RIGHT:"ArrowRight"},jSe=["toggleExpanded","className"],NSe=function(e){var t=e.toggleExpanded,i=e.className,r=i===void 0?"accordion__button":i,o=a6(e,jSe),s=function(c){var A=c.key;if((A===U0.ENTER||A===U0.SPACE||A===U0.SPACE_DEPRECATED)&&(c.preventDefault(),t()),c.target instanceof HTMLElement)switch(A){case U0.HOME:{c.preventDefault(),KSe(c.target);break}case U0.END:{c.preventDefault(),LSe(c.target);break}case U0.LEFT:case U0.UP:{c.preventDefault(),zSe(c.target);break}case U0.RIGHT:case U0.DOWN:{c.preventDefault(),FSe(c.target);break}}};return o.id&&i4(o.id),wt.createElement("div",Ng({className:r},o,{role:"button",tabIndex:0,onClick:t,onKeyDown:s,"data-accordion-component":"AccordionItemButton"}))},GSe=function(e){return wt.createElement(l6,null,function(t){var i=t.toggleExpanded,r=t.buttonAttributes;return wt.createElement(NSe,Ng({toggleExpanded:i},e,r))})},WSe={className:"accordion__heading","aria-level":3},QSe=`AccordionItemButton may contain only one child element, which must be an instance of AccordionItemButton.
From the WAI-ARIA spec (https://www.w3.org/TR/wai-aria-practices-1.1/#accordion):
“The button element is the only element inside the heading element. That is, if there are other visually persistent elements, they are not included inside the heading element.”
`,Hne=(function(n){AK(t,n);var e=hK(t);function t(){var i;o6(this,t);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=e.call.apply(e,[this].concat(o)),$a(Jp(i),"ref",void 0),$a(Jp(i),"setRef",function(a){i.ref=a}),i}return s6(t,[{key:"componentDidUpdate",value:function(){t.VALIDATE(this.ref)}},{key:"componentDidMount",value:function(){t.VALIDATE(this.ref)}},{key:"render",value:function(){return wt.createElement("div",Ng({"data-accordion-component":"AccordionItemHeading"},this.props,{ref:this.setRef}))}}],[{key:"VALIDATE",value:function(r){if(r===void 0)throw new Error("ref is undefined");if(!(r.childElementCount===1&&r.firstElementChild&&r.firstElementChild.getAttribute("data-accordion-component")==="AccordionItemButton"))throw new Error(QSe)}}]),t})(wt.PureComponent);$a(Hne,"defaultProps",WSe);var Zne=function(e){return wt.createElement(l6,null,function(t){var i=t.headingAttributes;return e.id&&i4(e.id),wt.createElement(Hne,Ng({},e,i))})};Zne.displayName=qne.AccordionItemHeading;var qSe=["className","region","id"],YSe=function(e){var t=e.className,i=t===void 0?"accordion__panel":t,r=e.region,o=e.id,s=a6(e,qSe),a=function(A){var m=A.panelAttributes;o&&i4(o);var v=SR(SR({},m),{},{"aria-labelledby":r?m["aria-labelledby"]:void 0});return wt.createElement("div",Ng({"data-accordion-component":"AccordionItemPanel",className:i},s,v,{role:r?"region":void 0}))};return wt.createElement(l6,null,a)};const $Se=/("(?:[^\\"]|\\.)*")|[:,]/g;function VSe(n,e={}){const t=JSON.stringify([1],void 0,e.indent===void 0?2:e.indent).slice(2,-3),i=t===""?1/0:e.maxLength===void 0?80:e.maxLength;let{replacer:r}=e;return(function o(s,a,c){s&&typeof s.toJSON=="function"&&(s=s.toJSON());const A=JSON.stringify(s,r);if(A===void 0)return A;const m=i-a.length-c;if(A.length<=m){const v=A.replace($Se,(x,_)=>_||`${x} `);if(v.length<=m)return v}if(r!=null&&(s=JSON.parse(A),r=void 0),typeof s=="object"&&s!==null){const v=a+t,x=[];let _=0,O,P;if(Array.isArray(s)){O="[",P="]";const{length:F}=s;for(;_<F;_++)x.push(o(s[_],v,_===F-1?0:1)||"null")}else{O="{",P="}";const F=Object.keys(s),{length:j}=F;for(;_<j;_++){const Q=F[_],V=`${JSON.stringify(Q)}: `,H=o(s[Q],v,V.length+(_===j-1?0:1));H!==void 0&&x.push(V+H)}}if(x.length>0)return[O,t+x.join(`,
${v}`),P].join(`
${a}`)}return A})(n,"",0)}let IR=[],Xne=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?Xne:IR).push(t=t+n[e])})();function HSe(n){if(n<768)return!1;for(let e=0,t=IR.length;;){let i=e+t>>1;if(n<IR[i])t=i;else if(n>=Xne[i])e=i+1;else return!0;if(e==t)return!1}}function wG(n){return n>=127462&&n<=127487}const SG=8205;function ZSe(n,e,t=!0,i=!0){return(t?Jne:XSe)(n,e,i)}function Jne(n,e,t){if(e==n.length)return e;e&&eie(n.charCodeAt(e))&&tie(n.charCodeAt(e-1))&&e--;let i=JB(n,e);for(e+=EG(i);e<n.length;){let r=JB(n,e);if(i==SG||r==SG||t&&HSe(r))e+=EG(r),i=r;else if(wG(r)){let o=0,s=e-2;for(;s>=0&&wG(JB(n,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function XSe(n,e,t){for(;e>0;){let i=Jne(n,e-2,t);if(i<e)return i;e--}return 0}function JB(n,e){let t=n.charCodeAt(e);if(!tie(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return eie(i)?(t-55296<<10)+(i-56320)+65536:t}function eie(n){return n>=56320&&n<57344}function tie(n){return n>=55296&&n<56320}function EG(n){return n<65536?1:2}class vs{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=Ax(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),yg.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Ax(this,e,t);let i=[];return this.decompose(e,t,i,0),yg.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new f3(this),o=new f3(e);for(let s=t,a=t;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}iter(e=1){return new f3(this,e)}iterRange(e,t=this.length){return new nie(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new iie(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?vs.empty:e.length<=32?new au(e):yg.from(au.split(e,[]))}}class au extends vs{constructor(e,t=JSe(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let o=0;;o++){let s=this.text[o],a=r+s.length;if((t?i:a)>=e)return new eEe(r,a,i,s);r=a+1,i++}}decompose(e,t,i,r){let o=e<=0&&t>=this.length?this:new au(OG(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let s=i.pop(),a=tw(o.text,s.text.slice(),0,o.length);if(a.length<=32)i.push(new au(a,s.length+o.length));else{let c=a.length>>1;i.push(new au(a.slice(0,c)),new au(a.slice(c)))}}else i.push(o)}replace(e,t,i){if(!(i instanceof au))return super.replace(e,t,i);[e,t]=Ax(this,e,t);let r=tw(this.text,tw(i.text,OG(this.text,0,e)),t),o=this.length+i.length-(t-e);return r.length<=32?new au(r,o):yg.from(au.split(r,[]),o)}sliceString(e,t=this.length,i=`
`){[e,t]=Ax(this,e,t);let r="";for(let o=0,s=0;o<=t&&s<this.text.length;s++){let a=this.text[s],c=o+a.length;o>e&&s&&(r+=i),e<c&&t>o&&(r+=a.slice(Math.max(0,e-o),t-o)),o=c+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let o of e)i.push(o),r+=o.length+1,i.length==32&&(t.push(new au(i,r)),i=[],r=-1);return r>-1&&t.push(new au(i,r)),t}}class yg extends vs{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let o=0;;o++){let s=this.children[o],a=r+s.length,c=i+s.lines-1;if((t?c:a)>=e)return s.lineInner(e,t,i,r);r=a+1,i=c+1}}decompose(e,t,i,r){for(let o=0,s=0;s<=t&&o<this.children.length;o++){let a=this.children[o],c=s+a.length;if(e<=c&&t>=s){let A=r&((s<=e?1:0)|(c>=t?2:0));s>=e&&c<=t&&!A?i.push(a):a.decompose(e-s,t-s,i,A)}s=c+1}}replace(e,t,i){if([e,t]=Ax(this,e,t),i.lines<this.lines)for(let r=0,o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.length;if(e>=o&&t<=a){let c=s.replace(e-o,t-o,i),A=this.lines-s.lines+c.lines;if(c.lines<A>>4&&c.lines>A>>6){let m=this.children.slice();return m[r]=c,new yg(m,this.length-(t-e)+i.length)}return super.replace(o,a,c)}o=a+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
`){[e,t]=Ax(this,e,t);let r="";for(let o=0,s=0;o<this.children.length&&s<=t;o++){let a=this.children[o],c=s+a.length;s>e&&o&&(r+=i),e<c&&t>s&&(r+=a.sliceString(e-s,t-s,i)),s=c+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof yg))return 0;let i=0,[r,o,s,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,o+=t){if(r==s||o==a)return i;let c=this.children[r],A=e.children[o];if(c!=A)return i+c.scanIdentical(A,t);i+=c.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let _ of e)i+=_.lines;if(i<32){let _=[];for(let O of e)O.flatten(_);return new au(_,t)}let r=Math.max(32,i>>5),o=r<<1,s=r>>1,a=[],c=0,A=-1,m=[];function v(_){let O;if(_.lines>o&&_ instanceof yg)for(let P of _.children)v(P);else _.lines>s&&(c>s||!c)?(x(),a.push(_)):_ instanceof au&&c&&(O=m[m.length-1])instanceof au&&_.lines+O.lines<=32?(c+=_.lines,A+=_.length+1,m[m.length-1]=new au(O.text.concat(_.text),O.length+1+_.length)):(c+_.lines>r&&x(),c+=_.lines,A+=_.length+1,m.push(_))}function x(){c!=0&&(a.push(m.length==1?m[0]:yg.from(m,A)),A=-1,c=m.length=0)}for(let _ of e)v(_);return x(),a.length==1?a[0]:new yg(a,t)}}vs.empty=new au([""],0);function JSe(n){let e=-1;for(let t of n)e+=t.length+1;return e}function tw(n,e,t=0,i=1e9){for(let r=0,o=0,s=!0;o<n.length&&r<=i;o++){let a=n[o],c=r+a.length;c>=t&&(c>i&&(a=a.slice(0,i-r)),r<t&&(a=a.slice(t-r)),s?(e[e.length-1]+=a,s=!1):e.push(a)),r=c+1}return e}function OG(n,e,t){return tw(n,[""],e,t)}class f3{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof au?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1,a=r instanceof au?r.text.length:r.children.length;if(s==(t>0?a:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(r instanceof au){let c=r.text[s+(t<0?-1:0)];if(this.offsets[i]+=t,c.length>Math.max(0,e))return this.value=e==0?c:t>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=r.children[s+(t<0?-1:0)];e>c.length?(e-=c.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(t>0?1:(c instanceof au?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class nie{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new f3(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class iie{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(vs.prototype[Symbol.iterator]=function(){return this.iter()},f3.prototype[Symbol.iterator]=nie.prototype[Symbol.iterator]=iie.prototype[Symbol.iterator]=function(){return this});class eEe{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}}function Ax(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function uA(n,e,t=!0,i=!0){return ZSe(n,e,t,i)}function tEe(n){return n>=56320&&n<57344}function nEe(n){return n>=55296&&n<56320}function Hh(n,e){let t=n.charCodeAt(e);if(!nEe(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return tEe(i)?(t-55296<<10)+(i-56320)+65536:t}function dK(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function vg(n){return n<65536?1:2}const kR=/\r\n?|\n/;var sh=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(sh||(sh={}));class Lg{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,r=0;t<this.sections.length;){let o=this.sections[t++],s=this.sections[t++];s<0?(e(i,r,o),r+=o):r+=s,i+=o}}iterChangedRanges(e,t=!1){TR(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];r<0?e.push(i,r):e.push(r,i)}return new Lg(e)}composeDesc(e){return this.empty?e:e.empty?this:rie(this,e)}mapDesc(e,t=!1){return e.empty?this:RR(this,e,t)}mapPos(e,t=-1,i=sh.Simple){let r=0,o=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],c=this.sections[s++],A=r+a;if(c<0){if(A>e)return o+(e-r);o+=a}else{if(i!=sh.Simple&&A>=e&&(i==sh.TrackDel&&r<e&&A>e||i==sh.TrackBefore&&r<e||i==sh.TrackAfter&&A>e))return null;if(A>e||A==e&&t<0&&!a)return e==r||t<0?o:o+c;o+=c}r=A}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return o}touchesRange(e,t=e){for(let i=0,r=0;i<this.sections.length&&r<=t;){let o=this.sections[i++],s=this.sections[i++],a=r+o;if(s>=0&&r<=t&&a>=e)return r<e&&a>t?"cover":!0;r=a}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Lg(e)}static create(e){return new Lg(e)}}class rc extends Lg{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return TR(this,(t,i,r,o,s)=>e=e.replace(r,r+(i-t),s),!1),e}mapDesc(e,t=!1){return RR(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,o=0;r<t.length;r+=2){let s=t[r],a=t[r+1];if(a>=0){t[r]=a,t[r+1]=s;let c=r>>1;for(;i.length<c;)i.push(vs.empty);i.push(s?e.slice(o,o+s):vs.empty)}o+=s}return new rc(t,i)}compose(e){return this.empty?e:e.empty?this:rie(this,e,!0)}map(e,t=!1){return e.empty?this:RR(this,e,t,!0)}iterChanges(e,t=!1){TR(this,e,t)}get desc(){return Lg.create(this.sections)}filter(e){let t=[],i=[],r=[],o=new r4(this);e:for(let s=0,a=0;;){let c=s==e.length?1e9:e[s++];for(;a<c||a==c&&o.len==0;){if(o.done)break e;let m=Math.min(o.len,c-a);RA(r,m,-1);let v=o.ins==-1?-1:o.off==0?o.ins:0;RA(t,m,v),v>0&&Ry(i,t,o.text),o.forward(m),a+=m}let A=e[s++];for(;a<A;){if(o.done)break e;let m=Math.min(o.len,A-a);RA(t,m,-1),RA(r,m,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(m),a+=m}}return{changes:new rc(t,i),filtered:Lg.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],r=this.sections[t+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let r=[],o=[],s=0,a=null;function c(m=!1){if(!m&&!r.length)return;s<t&&RA(r,t-s,-1);let v=new rc(r,o);a=a?a.compose(v.map(a)):v,r=[],o=[],s=0}function A(m){if(Array.isArray(m))for(let v of m)A(v);else if(m instanceof rc){if(m.length!=t)throw new RangeError(`Mismatched change set length (got ${m.length}, expected ${t})`);c(),a=a?a.compose(m.map(a)):m}else{let{from:v,to:x=v,insert:_}=m;if(v>x||v<0||x>t)throw new RangeError(`Invalid change range ${v} to ${x} (in doc of length ${t})`);let O=_?typeof _=="string"?vs.of(_.split(i||kR)):_:vs.empty,P=O.length;if(v==x&&P==0)return;v<s&&c(),v>s&&RA(r,v-s,-1),RA(r,x-v,P),Ry(o,r,O),s=x}}return A(e),c(!a),a}static empty(e){return new rc(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let r=0;r<e.length;r++){let o=e[r];if(typeof o=="number")t.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,a)=>a&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)t.push(o[0],0);else{for(;i.length<r;)i.push(vs.empty);i[r]=vs.of(o.slice(1)),t.push(o[0],i[r].length)}}}return new rc(t,i)}static createSet(e,t){return new rc(e,t)}}function RA(n,e,t,i=!1){if(e==0&&t<=0)return;let r=n.length-2;r>=0&&t<=0&&t==n[r+1]?n[r]+=e:r>=0&&e==0&&n[r]==0?n[r+1]+=t:i?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function Ry(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<i;)n.push(vs.empty);n.push(t)}}function TR(n,e,t){let i=n.inserted;for(let r=0,o=0,s=0;s<n.sections.length;){let a=n.sections[s++],c=n.sections[s++];if(c<0)r+=a,o+=a;else{let A=r,m=o,v=vs.empty;for(;A+=a,m+=c,c&&i&&(v=v.append(i[s-2>>1])),!(t||s==n.sections.length||n.sections[s+1]<0);)a=n.sections[s++],c=n.sections[s++];e(r,A,o,m,v),r=A,o=m}}}function RR(n,e,t,i=!1){let r=[],o=i?[]:null,s=new r4(n),a=new r4(e);for(let c=-1;;){if(s.done&&a.len||a.done&&s.len)throw new Error("Mismatched change set lengths");if(s.ins==-1&&a.ins==-1){let A=Math.min(s.len,a.len);RA(r,A,-1),s.forward(A),a.forward(A)}else if(a.ins>=0&&(s.ins<0||c==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!t))){let A=a.len;for(RA(r,a.ins,-1);A;){let m=Math.min(s.len,A);s.ins>=0&&c<s.i&&s.len<=m&&(RA(r,0,s.ins),o&&Ry(o,r,s.text),c=s.i),s.forward(m),A-=m}a.next()}else if(s.ins>=0){let A=0,m=s.len;for(;m;)if(a.ins==-1){let v=Math.min(m,a.len);A+=v,m-=v,a.forward(v)}else if(a.ins==0&&a.len<m)m-=a.len,a.next();else break;RA(r,A,c<s.i?s.ins:0),o&&c<s.i&&Ry(o,r,s.text),c=s.i,s.forward(s.len-m)}else{if(s.done&&a.done)return o?rc.createSet(r,o):Lg.create(r);throw new Error("Mismatched change set lengths")}}}function rie(n,e,t=!1){let i=[],r=t?[]:null,o=new r4(n),s=new r4(e);for(let a=!1;;){if(o.done&&s.done)return r?rc.createSet(i,r):Lg.create(i);if(o.ins==0)RA(i,o.len,0,a),o.next();else if(s.len==0&&!s.done)RA(i,0,s.ins,a),r&&Ry(r,i,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let c=Math.min(o.len2,s.len),A=i.length;if(o.ins==-1){let m=s.ins==-1?-1:s.off?0:s.ins;RA(i,c,m,a),r&&m&&Ry(r,i,s.text)}else s.ins==-1?(RA(i,o.off?0:o.len,c,a),r&&Ry(r,i,o.textBit(c))):(RA(i,o.off?0:o.len,s.off?0:s.ins,a),r&&!s.off&&Ry(r,i,s.text));a=(o.ins>c||s.ins>=0&&s.len>c)&&(a||i.length>A),o.forward2(c),s.forward(c)}}}}class r4{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?vs.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?vs.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class sb{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new sb(i,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return Sn.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Sn.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Sn.range(e.anchor,e.head)}static create(e,t,i){return new sb(e,t,i)}}class Sn{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Sn.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Sn([this.main],0)}addRange(e,t=!0){return Sn.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,Sn.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Sn(e.ranges.map(t=>sb.fromJSON(t)),e.main)}static single(e,t=e){return new Sn([Sn.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let o=e[r];if(o.empty?o.from<=i:o.from<i)return Sn.normalized(e.slice(),t);i=o.to}return new Sn(e,t)}static cursor(e,t=0,i,r){return sb.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i))|(r??16777215)<<6)}static range(e,t,i,r){let o=(i??16777215)<<6|(r==null?7:Math.min(6,r));return t<e?sb.create(t,e,48|o):sb.create(e,t,(t>e?8:0)|o)}static normalized(e,t=0){let i=e[t];e.sort((r,o)=>r.from-o.from),t=e.indexOf(i);for(let r=1;r<e.length;r++){let o=e[r],s=e[r-1];if(o.empty?o.from<=s.to:o.from<s.to){let a=s.from,c=Math.max(o.to,s.to);r<=t&&t--,e.splice(--r,2,o.anchor>o.head?Sn.range(c,a):Sn.range(a,c))}}return new Sn(e,t)}}function oie(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let fK=0;class ki{constructor(e,t,i,r,o){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=r,this.id=fK++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new ki(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:pK),!!e.static,e.enables)}of(e){return new nw([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new nw(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new nw(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function pK(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class nw{constructor(e,t,i,r){this.dependencies=e,this.facet=t,this.type=i,this.value=r,this.id=fK++}dynamicSlot(e){var t;let i=this.value,r=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,c=!1,A=!1,m=[];for(let v of this.dependencies)v=="doc"?c=!0:v=="selection"?A=!0:(((t=e[v.id])!==null&&t!==void 0?t:1)&1)==0&&m.push(e[v.id]);return{create(v){return v.values[s]=i(v),1},update(v,x){if(c&&x.docChanged||A&&(x.docChanged||x.selection)||DR(v,m)){let _=i(v);if(a?!BG(_,v.values[s],r):!r(_,v.values[s]))return v.values[s]=_,1}return 0},reconfigure:(v,x)=>{let _,O=x.config.address[o];if(O!=null){let P=yS(x,O);if(this.dependencies.every(F=>F instanceof ki?x.facet(F)===v.facet(F):F instanceof ac?x.field(F,!1)==v.field(F,!1):!0)||(a?BG(_=i(v),P,r):r(_=i(v),P)))return v.values[s]=P,0}else _=i(v);return v.values[s]=_,1}}}}function BG(n,e,t){if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(!t(n[i],e[i]))return!1;return!0}function DR(n,e){let t=!1;for(let i of e)p3(n,i)&1&&(t=!0);return t}function iEe(n,e,t){let i=t.map(c=>n[c.id]),r=t.map(c=>c.type),o=i.filter(c=>!(c&1)),s=n[e.id]>>1;function a(c){let A=[];for(let m=0;m<i.length;m++){let v=yS(c,i[m]);if(r[m]==2)for(let x of v)A.push(x);else A.push(v)}return e.combine(A)}return{create(c){for(let A of i)p3(c,A);return c.values[s]=a(c),1},update(c,A){if(!DR(c,o))return 0;let m=a(c);return e.compare(m,c.values[s])?0:(c.values[s]=m,1)},reconfigure(c,A){let m=DR(c,i),v=A.config.facets[e.id],x=A.facet(e);if(v&&!m&&pK(t,v))return c.values[s]=x,0;let _=a(c);return e.compare(_,x)?(c.values[s]=x,0):(c.values[s]=_,1)}}}const u5=ki.define({static:!0});class ac{constructor(e,t,i,r,o){this.id=e,this.createF=t,this.updateF=i,this.compareF=r,this.spec=o,this.provides=void 0}static define(e){let t=new ac(fK++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(u5).find(i=>i.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,r)=>{let o=i.values[t],s=this.updateF(o,r);return this.compareF(o,s)?0:(i.values[t]=s,1)},reconfigure:(i,r)=>{let o=i.facet(u5),s=r.facet(u5),a;return(a=o.find(c=>c.field==this))&&a!=s.find(c=>c.field==this)?(i.values[t]=a.create(i),1):r.config.address[this.id]!=null?(i.values[t]=r.field(this),0):(i.values[t]=this.create(i),1)}}}init(e){return[this,u5.of({field:this,create:e})]}get extension(){return this}}const Zv={lowest:4,low:3,default:2,high:1,highest:0};function A2(n){return e=>new sie(e,n)}const Qb={highest:A2(Zv.highest),high:A2(Zv.high),default:A2(Zv.default),low:A2(Zv.low),lowest:A2(Zv.lowest)};class sie{constructor(e,t){this.inner=e,this.prec=t}}class uM{of(e){return new PR(this,e)}reconfigure(e){return uM.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class PR{constructor(e,t){this.compartment=e,this.inner=t}}class gS{constructor(e,t,i,r,o,s){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let r=[],o=Object.create(null),s=new Map;for(let x of rEe(e,t,s))x instanceof ac?r.push(x):(o[x.facet.id]||(o[x.facet.id]=[])).push(x);let a=Object.create(null),c=[],A=[];for(let x of r)a[x.id]=A.length<<1,A.push(_=>x.slot(_));let m=i?.config.facets;for(let x in o){let _=o[x],O=_[0].facet,P=m&&m[x]||[];if(_.every(F=>F.type==0))if(a[O.id]=c.length<<1|1,pK(P,_))c.push(i.facet(O));else{let F=O.combine(_.map(j=>j.value));c.push(i&&O.compare(F,i.facet(O))?i.facet(O):F)}else{for(let F of _)F.type==0?(a[F.id]=c.length<<1|1,c.push(F.value)):(a[F.id]=A.length<<1,A.push(j=>F.dynamicSlot(j)));a[O.id]=A.length<<1,A.push(F=>iEe(F,O,_))}}let v=A.map(x=>x(a));return new gS(e,s,v,a,c,o)}}function rEe(n,e,t){let i=[[],[],[],[],[]],r=new Map;function o(s,a){let c=r.get(s);if(c!=null){if(c<=a)return;let A=i[c].indexOf(s);A>-1&&i[c].splice(A,1),s instanceof PR&&t.delete(s.compartment)}if(r.set(s,a),Array.isArray(s))for(let A of s)o(A,a);else if(s instanceof PR){if(t.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let A=e.get(s.compartment)||s.inner;t.set(s.compartment,A),o(A,a)}else if(s instanceof sie)o(s.inner,s.prec);else if(s instanceof ac)i[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof nw)i[a].push(s),s.facet.extensions&&o(s.facet.extensions,Zv.default);else{let A=s.extension;if(!A)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(A,a)}}return o(n,Zv.default),i.reduce((s,a)=>s.concat(a))}function p3(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function yS(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const aie=ki.define(),UR=ki.define({combine:n=>n.some(e=>e),static:!0}),lie=ki.define({combine:n=>n.length?n[0]:void 0,static:!0}),uie=ki.define(),cie=ki.define(),Aie=ki.define(),hie=ki.define({combine:n=>n.length?n[0]:!1});class l1{constructor(e,t){this.type=e,this.value=t}static define(){return new oEe}}class oEe{of(e){return new l1(this,e)}}class sEe{constructor(e){this.map=e}of(e){return new ao(this,e)}}class ao{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new ao(this.type,t)}is(e){return this.type==e}static define(e={}){return new sEe(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let r of e){let o=r.map(t);o&&i.push(o)}return i}}ao.reconfigure=ao.define();ao.appendConfig=ao.define();class sc{constructor(e,t,i,r,o,s){this.startState=e,this.changes=t,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&oie(i,t.newLength),o.some(a=>a.type==sc.time)||(this.annotations=o.concat(sc.time.of(Date.now())))}static create(e,t,i,r,o,s){return new sc(e,t,i,r,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(sc.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}sc.time=l1.define();sc.userEvent=l1.define();sc.addToHistory=l1.define();sc.remote=l1.define();function aEe(n,e){let t=[];for(let i=0,r=0;;){let o,s;if(i<n.length&&(r==e.length||e[r]>=n[i]))o=n[i++],s=n[i++];else if(r<e.length)o=e[r++],s=e[r++];else return t;!t.length||t[t.length-1]<o?t.push(o,s):t[t.length-1]<s&&(t[t.length-1]=s)}}function die(n,e,t){var i;let r,o,s;return t?(r=e.changes,o=rc.empty(e.changes.length),s=n.changes.compose(e.changes)):(r=e.changes.map(n.changes),o=n.changes.mapDesc(e.changes,!0),s=n.changes.compose(r)),{changes:s,selection:e.selection?e.selection.map(o):(i=n.selection)===null||i===void 0?void 0:i.map(r),effects:ao.mapEffects(n.effects,r).concat(ao.mapEffects(e.effects,o)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function KR(n,e,t){let i=e.selection,r=z_(e.annotations);return e.userEvent&&(r=r.concat(sc.userEvent.of(e.userEvent))),{changes:e.changes instanceof rc?e.changes:rc.of(e.changes||[],t,n.facet(lie)),selection:i&&(i instanceof Sn?i:Sn.single(i.anchor,i.head)),effects:z_(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function fie(n,e,t){let i=KR(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(t=!1);let s=!!e[o].sequential;i=die(i,KR(n,e[o],s?i.changes.newLength:n.doc.length),s)}let r=sc.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return uEe(t?lEe(r):r)}function lEe(n){let e=n.startState,t=!0;for(let r of e.facet(uie)){let o=r(n);if(o===!1){t=!1;break}Array.isArray(o)&&(t=t===!0?o:aEe(t,o))}if(t!==!0){let r,o;if(t===!1)o=n.changes.invertedDesc,r=rc.empty(e.doc.length);else{let s=n.changes.filter(t);r=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}n=sc.create(e,r,n.selection&&n.selection.map(o),ao.mapEffects(n.effects,o),n.annotations,n.scrollIntoView)}let i=e.facet(cie);for(let r=i.length-1;r>=0;r--){let o=i[r](n);o instanceof sc?n=o:Array.isArray(o)&&o.length==1&&o[0]instanceof sc?n=o[0]:n=fie(e,z_(o),!1)}return n}function uEe(n){let e=n.startState,t=e.facet(Aie),i=n;for(let r=t.length-1;r>=0;r--){let o=t[r](n);o&&Object.keys(o).length&&(i=die(i,KR(e,o,n.changes.newLength),!0))}return i==n?n:sc.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const cEe=[];function z_(n){return n==null?cEe:Array.isArray(n)?n:[n]}var ul=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(ul||(ul={}));const AEe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let LR;try{LR=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function hEe(n){if(LR)return LR.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||AEe.test(t)))return!0}return!1}function dEe(n){return e=>{if(!/\S/.test(e))return ul.Space;if(hEe(e))return ul.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return ul.Word;return ul.Other}}class ys{constructor(e,t,i,r,o,s){this.config=e,this.doc=t,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)p3(this,a<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return p3(this,i),yS(this,i)}update(...e){return fie(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:r}=t;for(let a of e.effects)a.is(uM.reconfigure)?(t&&(r=new Map,t.compartments.forEach((c,A)=>r.set(A,c)),t=null),r.set(a.value.compartment,a.value.extension)):a.is(ao.reconfigure)?(t=null,i=a.value):a.is(ao.appendConfig)&&(t=null,i=z_(i).concat(a.value));let o;t?o=e.startState.values.slice():(t=gS.resolve(i,r,this),o=new ys(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(c,A)=>A.reconfigure(c,this),null).values);let s=e.startState.facet(UR)?e.newSelection:e.newSelection.asSingle();new ys(t,e.newDoc,s,o,(a,c)=>c.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:Sn.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),r=this.changes(i.changes),o=[i.range],s=z_(i.effects);for(let a=1;a<t.ranges.length;a++){let c=e(t.ranges[a]),A=this.changes(c.changes),m=A.map(r);for(let x=0;x<a;x++)o[x]=o[x].map(m);let v=r.mapDesc(A,!0);o.push(c.range.map(v)),r=r.compose(m),s=ao.mapEffects(s,m).concat(ao.mapEffects(z_(c.effects),v))}return{changes:r,selection:Sn.create(o,t.mainIndex),effects:s}}changes(e=[]){return e instanceof rc?e:rc.of(e,this.doc.length,this.facet(ys.lineSeparator))}toText(e){return vs.of(e.split(this.facet(ys.lineSeparator)||kR))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(p3(this,t),yS(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof ac&&this.config.address[r.id]!=null&&(t[i]=r.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let o in i)if(Object.prototype.hasOwnProperty.call(e,o)){let s=i[o],a=e[o];r.push(s.init(c=>s.spec.fromJSON(a,c)))}}return ys.create({doc:e.doc,selection:Sn.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=gS.resolve(e.extensions||[],new Map),i=e.doc instanceof vs?e.doc:vs.of((e.doc||"").split(t.staticFacet(ys.lineSeparator)||kR)),r=e.selection?e.selection instanceof Sn?e.selection:Sn.single(e.selection.anchor,e.selection.head):Sn.single(0);return oie(r,i.length),t.staticFacet(UR)||(r=r.asSingle()),new ys(t,i,r,t.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(ys.tabSize)}get lineBreak(){return this.facet(ys.lineSeparator)||`
`}get readOnly(){return this.facet(hie)}phrase(e,...t){for(let i of this.facet(ys.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let o=+(r||1);return!o||o>t.length?i:t[o-1]})),e}languageDataAt(e,t,i=-1){let r=[];for(let o of this.facet(aie))for(let s of o(this,t,i))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){return dEe(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:r}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-i,a=e-i;for(;s>0;){let c=uA(t,s,!1);if(o(t.slice(c,s))!=ul.Word)break;s=c}for(;a<r;){let c=uA(t,a);if(o(t.slice(a,c))!=ul.Word)break;a=c}return s==a?null:Sn.range(s+i,a+i)}}ys.allowMultipleSelections=UR;ys.tabSize=ki.define({combine:n=>n.length?n[0]:4});ys.lineSeparator=lie;ys.readOnly=hie;ys.phrases=ki.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(r=>n[r]==e[r])}});ys.languageData=aie;ys.changeFilter=uie;ys.transactionFilter=cie;ys.transactionExtender=Aie;uM.reconfigure=ao.define();function bm(n,e,t={}){let i={};for(let r of n)for(let o of Object.keys(r)){let s=r[o],a=i[o];if(a===void 0)i[o]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(t,o))i[o]=t[o](a,s);else throw new Error("Config merge conflict for field "+o)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class kb{eq(e){return this==e}range(e,t=e){return FR.create(e,t,this)}}kb.prototype.startSide=kb.prototype.endSide=0;kb.prototype.point=!1;kb.prototype.mapMode=sh.TrackDel;let FR=class pie{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new pie(e,t,i)}};function zR(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class mK{constructor(e,t,i,r){this.from=e,this.to=t,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,r=0){let o=i?this.to:this.from;for(let s=r,a=o.length;;){if(s==a)return s;let c=s+a>>1,A=o[c]-e||(i?this.value[c].endSide:this.value[c].startSide)-t;if(c==s)return A>=0?s:a;A>=0?a=c:s=c+1}}between(e,t,i,r){for(let o=this.findIndex(t,-1e9,!0),s=this.findIndex(i,1e9,!1,o);o<s;o++)if(r(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,t){let i=[],r=[],o=[],s=-1,a=-1;for(let c=0;c<this.value.length;c++){let A=this.value[c],m=this.from[c]+e,v=this.to[c]+e,x,_;if(m==v){let O=t.mapPos(m,A.startSide,A.mapMode);if(O==null||(x=_=O,A.startSide!=A.endSide&&(_=t.mapPos(m,A.endSide),_<x)))continue}else if(x=t.mapPos(m,A.startSide),_=t.mapPos(v,A.endSide),x>_||x==_&&A.startSide>0&&A.endSide<=0)continue;(_-x||A.endSide-A.startSide)<0||(s<0&&(s=x),A.point&&(a=Math.max(a,_-x)),i.push(A),r.push(x-s),o.push(_-s))}return{mapped:i.length?new mK(r,o,i,a):null,pos:s}}}class Xo{constructor(e,t,i,r){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=r}static create(e,t,i,r){return new Xo(e,t,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:r=0,filterTo:o=this.length}=e,s=e.filter;if(t.length==0&&!s)return this;if(i&&(t=t.slice().sort(zR)),this.isEmpty)return t.length?Xo.of(t):this;let a=new mie(this,null,-1).goto(0),c=0,A=[],m=new t1;for(;a.value||c<t.length;)if(c<t.length&&(a.from-t[c].from||a.startSide-t[c].value.startSide)>=0){let v=t[c++];m.addInner(v.from,v.to,v.value)||A.push(v)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(c==t.length||this.chunkEnd(a.chunkIndex)<t[c].from)&&(!s||r>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&m.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||r>a.to||o<a.from||s(a.from,a.to,a.value))&&(m.addInner(a.from,a.to,a.value)||A.push(FR.create(a.from,a.to,a.value))),a.next());return m.finishInner(this.nextLayer.isEmpty&&!A.length?Xo.empty:this.nextLayer.update({add:A,filter:s,filterFrom:r,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],r=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],c=this.chunk[s],A=e.touchesRange(a,a+c.length);if(A===!1)r=Math.max(r,c.maxPoint),t.push(c),i.push(e.mapPos(a));else if(A===!0){let{mapped:m,pos:v}=c.map(a,e);m&&(r=Math.max(r,m.maxPoint),t.push(m),i.push(v))}}let o=this.nextLayer.map(e);return t.length==0?o:new Xo(i,t,o||Xo.empty,r)}between(e,t,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let o=this.chunkPos[r],s=this.chunk[r];if(t>=o&&e<=o+s.length&&s.between(o,e-o,t-o,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return o4.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return o4.from(e).goto(t)}static compare(e,t,i,r,o=-1){let s=e.filter(v=>v.maxPoint>0||!v.isEmpty&&v.maxPoint>=o),a=t.filter(v=>v.maxPoint>0||!v.isEmpty&&v.maxPoint>=o),c=IG(s,a,i),A=new h2(s,c,o),m=new h2(a,c,o);i.iterGaps((v,x,_)=>kG(A,v,m,x,_,r)),i.empty&&i.length==0&&kG(A,0,m,0,0,r)}static eq(e,t,i=0,r){r==null&&(r=999999999);let o=e.filter(m=>!m.isEmpty&&t.indexOf(m)<0),s=t.filter(m=>!m.isEmpty&&e.indexOf(m)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let a=IG(o,s),c=new h2(o,a,0).goto(i),A=new h2(s,a,0).goto(i);for(;;){if(c.to!=A.to||!jR(c.active,A.active)||c.point&&(!A.point||!c.point.eq(A.point)))return!1;if(c.to>r)return!0;c.next(),A.next()}}static spans(e,t,i,r,o=-1){let s=new h2(e,null,o).goto(t),a=t,c=s.openStart;for(;;){let A=Math.min(s.to,i);if(s.point){let m=s.activeForPoint(s.to),v=s.pointFrom<t?m.length+1:s.point.startSide<0?m.length:Math.min(m.length,c);r.point(a,A,s.point,m,v,s.pointRank),c=Math.min(s.openEnd(A),m.length)}else A>a&&(r.span(a,A,s.active,c),c=s.openEnd(A));if(s.to>i)return c+(s.point&&s.to>i?1:0);a=s.to,s.next()}}static of(e,t=!1){let i=new t1;for(let r of e instanceof FR?[e]:t?fEe(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return Xo.empty;let t=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=Xo.empty;r=r.nextLayer)t=new Xo(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}Xo.empty=new Xo([],[],null,-1);function fEe(n){if(n.length>1)for(let e=n[0],t=1;t<n.length;t++){let i=n[t];if(zR(e,i)>0)return n.slice().sort(zR);e=i}return n}Xo.empty.nextLayer=Xo.empty;class t1{finishChunk(e){this.chunks.push(new mK(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new t1)).add(e,t,i)}addInner(e,t,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(Xo.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Xo.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function IG(n,e,t){let i=new Map;for(let o of n)for(let s=0;s<o.chunk.length;s++)o.chunk[s].maxPoint<=0&&i.set(o.chunk[s],o.chunkPos[s]);let r=new Set;for(let o of e)for(let s=0;s<o.chunk.length;s++){let a=i.get(o.chunk[s]);a!=null&&(t?t.mapPos(a):a)==o.chunkPos[s]&&!t?.touchesRange(a,a+o.chunk[s].length)&&r.add(o.chunk[s])}return r}class mie{constructor(e,t,i,r=0){this.layer=e,this.skip=t,this.minPoint=i,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,i){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!i||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],i=e+t.from[this.rangeIndex];if(this.from=i,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class o4{constructor(e){this.heap=e}static from(e,t=null,i=-1){let r=[];for(let o=0;o<e.length;o++)for(let s=e[o];!s.isEmpty;s=s.nextLayer)s.maxPoint>=i&&r.push(new mie(s,t,i,o));return r.length==1?r[0]:new o4(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)e8(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)e8(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),e8(this.heap,0)}}}function e8(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let r=n[i];if(i+1<n.length&&r.compare(n[i+1])>=0&&(r=n[i+1],i++),t.compare(r)<0)break;n[i]=t,n[e]=r,e=i}}class h2{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=o4.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){c5(this.active,e),c5(this.activeTo,e),c5(this.activeRank,e),this.minActive=TG(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:r,rank:o}=this.cursor;for(;t<this.activeRank.length&&(o-this.activeRank[t]||r-this.activeTo[t])>0;)t++;A5(this.active,t,i),A5(this.activeTo,t,r),A5(this.activeRank,t,o),e&&A5(e,t,this.cursor.from),this.minActive=TG(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&c5(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let r=i.length-1;r>=0&&i[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function kG(n,e,t,i,r,o){n.goto(e),t.goto(i);let s=i+r,a=i,c=i-e;for(;;){let A=n.to+c-t.to,m=A||n.endSide-t.endSide,v=m<0?n.to+c:t.to,x=Math.min(v,s);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&jR(n.activeForPoint(n.to),t.activeForPoint(t.to))||o.comparePoint(a,x,n.point,t.point):x>a&&!jR(n.active,t.active)&&o.compareRange(a,x,n.active,t.active),v>s)break;(A||n.openEnd!=t.openEnd)&&o.boundChange&&o.boundChange(v),a=v,m<=0&&n.next(),m>=0&&t.next()}}function jR(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t]&&!n[t].eq(e[t]))return!1;return!0}function c5(n,e){for(let t=e,i=n.length-1;t<i;t++)n[t]=n[t+1];n.pop()}function A5(n,e,t){for(let i=n.length-1;i>=e;i--)n[i+1]=n[i];n[e]=t}function TG(n,e){let t=-1,i=1e9;for(let r=0;r<e.length;r++)(e[r]-i||n[r].endSide-n[t].endSide)<0&&(t=r,i=e[r]);return t}function Ux(n,e,t=n.length){let i=0;for(let r=0;r<t&&r<n.length;)n.charCodeAt(r)==9?(i+=e-i%e,r++):(i++,r=uA(n,r));return i}function NR(n,e,t,i){for(let r=0,o=0;;){if(o>=e)return r;if(r==n.length)break;o+=n.charCodeAt(r)==9?t-o%t:1,r=uA(n,r)}return i===!0?-1:n.length}const GR="ͼ",RG=typeof Symbol>"u"?"__"+GR:Symbol.for(GR),WR=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),DG=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class $y{constructor(e,t){this.rules=[];let{finish:i}=t||{};function r(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,a,c,A){let m=[],v=/^@(\w+)\b/.exec(s[0]),x=v&&v[1]=="keyframes";if(v&&a==null)return c.push(s[0]+";");for(let _ in a){let O=a[_];if(/&/.test(_))o(_.split(/,\s*/).map(P=>s.map(F=>P.replace(/&/,F))).reduce((P,F)=>P.concat(F)),O,c);else if(O&&typeof O=="object"){if(!v)throw new RangeError("The value of a property ("+_+") should be a primitive value.");o(r(_),O,m,x)}else O!=null&&m.push(_.replace(/_.*/,"").replace(/[A-Z]/g,P=>"-"+P.toLowerCase())+": "+O+";")}(m.length||x)&&c.push((i&&!v&&!A?s.map(i):s).join(", ")+" {"+m.join(" ")+"}")}for(let s in e)o(r(s),e[s],this.rules)}getRules(){return this.rules.join(`
`)}static newName(){let e=DG[RG]||1;return DG[RG]=e+1,GR+e.toString(36)}static mount(e,t,i){let r=e[WR],o=i&&i.nonce;r?o&&r.setNonce(o):r=new pEe(e,o),r.mount(Array.isArray(t)?t:[t],e)}}let PG=new Map;class pEe{constructor(e,t){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let o=PG.get(i);if(o)return e[WR]=o;this.sheet=new r.CSSStyleSheet,PG.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[WR]=this}mount(e,t){let i=this.sheet,r=0,o=0;for(let s=0;s<e.length;s++){let a=e[s],c=this.modules.indexOf(a);if(c<o&&c>-1&&(this.modules.splice(c,1),o--,c=-1),c==-1){if(this.modules.splice(o++,0,a),i)for(let A=0;A<a.rules.length;A++)i.insertRule(a.rules[A],r++)}else{for(;o<c;)r+=this.modules[o++].rules.length;r+=a.rules.length,o++}}if(i)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let s="";for(let c=0;c<this.modules.length;c++)s+=this.modules[c].getRules()+`
`;this.styleTag.textContent=s;let a=t.head||t;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Vy={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},s4={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},mEe=typeof navigator<"u"&&/Mac/.test(navigator.platform),gEe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var aA=0;aA<10;aA++)Vy[48+aA]=Vy[96+aA]=String(aA);for(var aA=1;aA<=24;aA++)Vy[aA+111]="F"+aA;for(var aA=65;aA<=90;aA++)Vy[aA]=String.fromCharCode(aA+32),s4[aA]=String.fromCharCode(aA);for(var t8 in Vy)s4.hasOwnProperty(t8)||(s4[t8]=Vy[t8]);function yEe(n){var e=mEe&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||gEe&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?s4:Vy)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Ma(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];typeof r=="string"?n.setAttribute(i,r):r!=null&&(n[i]=r)}e++}for(;e<arguments.length;e++)gie(n,arguments[e]);return n}function gie(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)gie(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}function a4(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function QR(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function iw(n,e){if(!e.anchorNode)return!1;try{return QR(n,e.anchorNode)}catch{return!1}}function l4(n){return n.nodeType==3?Rb(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function m3(n,e,t,i){return t?UG(n,e,t,i,-1)||UG(n,e,t,i,1):!1}function Tb(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function vS(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function UG(n,e,t,i,r){for(;;){if(n==t&&e==i)return!0;if(e==(r<0?0:Gg(n))){if(n.nodeName=="DIV")return!1;let o=n.parentNode;if(!o||o.nodeType!=1)return!1;e=Tb(n)+(r<0?0:1),n=o}else if(n.nodeType==1){if(n=n.childNodes[e+(r<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=r<0?Gg(n):0}else return!1}}function Gg(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function c6(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function vEe(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function yie(n,e){let t=e.width/n.offsetWidth,i=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-n.offsetHeight)<1)&&(i=1),{scaleX:t,scaleY:i}}function bEe(n,e,t,i,r,o,s,a){let c=n.ownerDocument,A=c.defaultView||window;for(let m=n,v=!1;m&&!v;)if(m.nodeType==1){let x,_=m==c.body,O=1,P=1;if(_)x=vEe(A);else{if(/^(fixed|sticky)$/.test(getComputedStyle(m).position)&&(v=!0),m.scrollHeight<=m.clientHeight&&m.scrollWidth<=m.clientWidth){m=m.assignedSlot||m.parentNode;continue}let Q=m.getBoundingClientRect();({scaleX:O,scaleY:P}=yie(m,Q)),x={left:Q.left,right:Q.left+m.clientWidth*O,top:Q.top,bottom:Q.top+m.clientHeight*P}}let F=0,j=0;if(r=="nearest")e.top<x.top?(j=e.top-(x.top+s),t>0&&e.bottom>x.bottom+j&&(j=e.bottom-x.bottom+s)):e.bottom>x.bottom&&(j=e.bottom-x.bottom+s,t<0&&e.top-j<x.top&&(j=e.top-(x.top+s)));else{let Q=e.bottom-e.top,V=x.bottom-x.top;j=(r=="center"&&Q<=V?e.top+Q/2-V/2:r=="start"||r=="center"&&t<0?e.top-s:e.bottom-V+s)-x.top}if(i=="nearest"?e.left<x.left?(F=e.left-(x.left+o),t>0&&e.right>x.right+F&&(F=e.right-x.right+o)):e.right>x.right&&(F=e.right-x.right+o,t<0&&e.left<x.left+F&&(F=e.left-(x.left+o))):F=(i=="center"?e.left+(e.right-e.left)/2-(x.right-x.left)/2:i=="start"==a?e.left-o:e.right-(x.right-x.left)+o)-x.left,F||j)if(_)A.scrollBy(F,j);else{let Q=0,V=0;if(j){let H=m.scrollTop;m.scrollTop+=j/P,V=(m.scrollTop-H)*P}if(F){let H=m.scrollLeft;m.scrollLeft+=F/O,Q=(m.scrollLeft-H)*O}e={left:e.left-Q,top:e.top-V,right:e.right-Q,bottom:e.bottom-V},Q&&Math.abs(Q-F)<1&&(i="nearest"),V&&Math.abs(V-j)<1&&(r="nearest")}if(_)break;(e.top<x.top||e.bottom>x.bottom||e.left<x.left||e.right>x.right)&&(e={left:Math.max(e.left,x.left),right:Math.min(e.right,x.right),top:Math.max(e.top,x.top),bottom:Math.min(e.bottom,x.bottom)}),m=m.assignedSlot||m.parentNode}else if(m.nodeType==11)m=m.host;else break}function CEe(n){let e=n.ownerDocument,t,i;for(let r=n.parentNode;r&&!(r==e.body||t&&i);)if(r.nodeType==1)!i&&r.scrollHeight>r.clientHeight&&(i=r),!t&&r.scrollWidth>r.clientWidth&&(t=r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;return{x:t,y:i}}class _Ee{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?Gg(t):0),i,Math.min(e.focusOffset,i?Gg(i):0))}set(e,t,i,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=r}}let FC=null;function vie(n){if(n.setActive)return n.setActive();if(FC)return n.focus(FC);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(FC==null?{get preventScroll(){return FC={preventScroll:!0},!0}}:void 0),!FC){FC=!1;for(let t=0;t<e.length;){let i=e[t++],r=e[t++],o=e[t++];i.scrollTop!=r&&(i.scrollTop=r),i.scrollLeft!=o&&(i.scrollLeft=o)}}}let KG;function Rb(n,e,t=e){let i=KG||(KG=document.createRange());return i.setEnd(n,t),i.setStart(n,e),i}function j_(n,e,t,i){let r={key:e,code:e,keyCode:t,which:t,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let o=new KeyboardEvent("keydown",r);o.synthetic=!0,n.dispatchEvent(o);let s=new KeyboardEvent("keyup",r);return s.synthetic=!0,n.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function xEe(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null}function bie(n){for(;n.attributes.length;)n.removeAttributeNode(n.attributes[0])}function MEe(n,e){let t=e.focusNode,i=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=i)return!1;for(i=Math.min(i,Gg(t));;)if(i){if(t.nodeType!=1)return!1;let r=t.childNodes[i-1];r.contentEditable=="false"?i--:(t=r,i=Gg(t))}else{if(t==n)return!0;i=Tb(t),t=t.parentNode}}function Cie(n){return n.scrollTop>Math.max(1,n.scrollHeight-n.clientHeight-4)}function _ie(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&i>0)return{node:t,offset:i};if(t.nodeType==1&&i>0){if(t.contentEditable=="false")return null;t=t.childNodes[i-1],i=Gg(t)}else if(t.parentNode&&!vS(t))i=Tb(t),t=t.parentNode;else return null}}function xie(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&i<t.nodeValue.length)return{node:t,offset:i};if(t.nodeType==1&&i<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[i],i=0}else if(t.parentNode&&!vS(t))i=Tb(t)+1,t=t.parentNode;else return null}}class PA{constructor(e,t,i=!0){this.node=e,this.offset=t,this.precise=i}static before(e,t){return new PA(e.parentNode,Tb(e),t)}static after(e,t){return new PA(e.parentNode,Tb(e)+1,t)}}const gK=[];class Sa{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let i of this.children){if(i==e)return t;t+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let i=this.dom,r=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=r?r.nextSibling:i.firstChild)){let a=Sa.get(o);(!a||!a.parent&&a.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,t),s.flags&=-8}if(o=r?r.nextSibling:i.firstChild,t&&!t.written&&t.node==i&&o!=s.dom&&(t.written=!0),s.dom.parentNode==i)for(;o&&o!=s.dom;)o=LG(o);else i.insertBefore(s.dom,o);r=s.dom}for(o=r?r.nextSibling:i.firstChild,o&&t&&t.node==i&&(t.written=!0);o;)o=LG(o)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,t),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let i;if(e==this.dom)i=this.dom.childNodes[t];else{let r=Gg(e)==0?0:t==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;r==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?r=-1:r=1),e=o}r<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!Sa.get(i);)i=i.nextSibling;if(!i)return this.length;for(let r=0,o=0;;r++){let s=this.children[r];if(s.dom==i)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,t,i=0){let r=-1,o=-1,s=-1,a=-1;for(let c=0,A=i,m=i;c<this.children.length;c++){let v=this.children[c],x=A+v.length;if(A<e&&x>t)return v.domBoundsAround(e,t,A);if(x>=e&&r==-1&&(r=c,o=A),A>t&&v.dom.parentNode==this.dom){s=c,a=m;break}m=x,A=x+v.breakAfter}return{from:o,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&s>=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=gK){this.markDirty();for(let r=e;r<t;r++){let o=this.children[r];o.parent==this&&i.indexOf(o)<0&&o.destroy()}i.length<250?this.children.splice(e,t-e,...i):this.children=[].concat(this.children.slice(0,e),i,this.children.slice(t));for(let r=0;r<i.length;r++)i[r].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new Mie(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,i,r,o,s){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}Sa.prototype.breakAfter=0;function LG(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class Mie{constructor(e,t,i){this.children=e,this.pos=t,this.i=i,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function wie(n,e,t,i,r,o,s,a,c){let{children:A}=n,m=A.length?A[e]:null,v=o.length?o[o.length-1]:null,x=v?v.breakAfter:s;if(!(e==i&&m&&!s&&!x&&o.length<2&&m.merge(t,r,o.length?v:null,t==0,a,c))){if(i<A.length){let _=A[i];_&&(r<_.length||_.breakAfter&&v?.breakAfter)?(e==i&&(_=_.split(r),r=0),!x&&v&&_.merge(0,r,v,!0,0,c)?o[o.length-1]=_:((r||_.children.length&&!_.children[0].length)&&_.merge(0,r,null,!1,0,c),o.push(_))):_?.breakAfter&&(v?v.breakAfter=1:s=1),i++}for(m&&(m.breakAfter=s,t>0&&(!s&&o.length&&m.merge(t,m.length,o[0],!1,a,0)?m.breakAfter=o.shift().breakAfter:(t<m.length||m.children.length&&m.children[m.children.length-1].length==0)&&m.merge(t,m.length,null,!1,a,0),e++));e<i&&o.length;)if(A[i-1].become(o[o.length-1]))i--,o.pop(),c=o.length?0:a;else if(A[e].become(o[0]))e++,o.shift(),a=o.length?0:c;else break;!o.length&&e&&i<A.length&&!A[e-1].breakAfter&&A[i].merge(0,0,A[e-1],!1,a,c)&&e--,(e<i||o.length)&&n.replaceChildren(e,i,o)}}function Sie(n,e,t,i,r,o){let s=n.childCursor(),{i:a,off:c}=s.findPos(t,1),{i:A,off:m}=s.findPos(e,-1),v=e-t;for(let x of i)v+=x.length;n.length+=v,wie(n,A,m,a,c,i,0,r,o)}let Zh=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},qR=typeof document<"u"?document:{documentElement:{style:{}}};const YR=/Edge\/(\d+)/.exec(Zh.userAgent),Eie=/MSIE \d/.test(Zh.userAgent),$R=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Zh.userAgent),A6=!!(Eie||$R||YR),FG=!A6&&/gecko\/(\d+)/i.test(Zh.userAgent),n8=!A6&&/Chrome\/(\d+)/.exec(Zh.userAgent),wEe="webkitFontSmoothing"in qR.documentElement.style,Oie=!A6&&/Apple Computer/.test(Zh.vendor),zG=Oie&&(/Mobile\/\w+/.test(Zh.userAgent)||Zh.maxTouchPoints>2);var Ii={mac:zG||/Mac/.test(Zh.platform),windows:/Win/.test(Zh.platform),linux:/Linux|X11/.test(Zh.platform),ie:A6,ie_version:Eie?qR.documentMode||6:$R?+$R[1]:YR?+YR[1]:0,gecko:FG,gecko_version:FG?+(/Firefox\/(\d+)/.exec(Zh.userAgent)||[0,0])[1]:0,chrome:!!n8,chrome_version:n8?+n8[1]:0,ios:zG,android:/Android\b/.test(Zh.userAgent),safari:Oie,webkit_version:wEe?+(/\bAppleWebKit\/(\d+)/.exec(Zh.userAgent)||[0,0])[1]:0,tabSize:qR.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const SEe=256;class fm extends Sa{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return this.flags&8||i&&(!(i instanceof fm)||this.length-(t-e)+i.length>SEe||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new fm(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new PA(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return EEe(this.dom,e,t)}}class n1 extends Sa{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let r of t)r.setParent(this)}setAttrs(e){if(bie(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,r,o,s){return i&&(!(i instanceof n1&&i.mark.eq(this.mark))||e&&o<=0||t<this.length&&s<=0)?!1:(Sie(this,e,t,i?i.children.slice():[],o-1,s-1),this.markDirty(),!0)}split(e){let t=[],i=0,r=-1,o=0;for(let a of this.children){let c=i+a.length;c>e&&t.push(i<e?a.split(e-i):a),r<0&&i>=e&&(r=o),i=c,o++}let s=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new n1(this.mark,t,s)}domAtPos(e){return Bie(this,e)}coordsAt(e,t){return kie(this,e,t)}}function EEe(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let r=e,o=e,s=0;e==0&&t<0||e==i&&t>=0?Ii.chrome||Ii.gecko||(e?(r--,s=1):o<i&&(o++,s=-1)):t<0?r--:o<i&&o++;let a=Rb(n,r,o).getClientRects();if(!a.length)return null;let c=a[(s?s<0:t>=0)?0:a.length-1];return Ii.safari&&!s&&c.width==0&&(c=Array.prototype.find.call(a,A=>A.width)||c),s?c6(c,s<0):c||null}class Dy extends Sa{static create(e,t,i){return new Dy(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=Dy.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,i,r,o,s){return i&&(!(i instanceof Dy)||!this.widget.compare(i.widget)||e>0&&o<=0||t<this.length&&s<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-t),!0)}become(e){return e instanceof Dy&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return vs.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,i=t&&t.state.doc,r=this.posAtStart;return i?i.slice(r,r+this.length):vs.empty}domAtPos(e){return(this.length?e==0:this.side>0)?PA.before(this.dom):PA.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let r=this.dom.getClientRects(),o=null;if(!r.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?r.length-1:0;o=r[a],!(e>0?a==0:a==r.length-1||o.top<o.bottom);a+=s?-1:1);return c6(o,!s)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class hx extends Sa{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof hx&&e.side==this.side}split(){return new hx(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?PA.before(this.dom):PA.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return vs.empty}get isHidden(){return!0}}fm.prototype.children=Dy.prototype.children=hx.prototype.children=gK;function Bie(n,e){let t=n.dom,{children:i}=n,r=0;for(let o=0;r<i.length;r++){let s=i[r],a=o+s.length;if(!(a==o&&s.getSide()<=0)){if(e>o&&e<a&&s.dom.parentNode==t)return s.domAtPos(e-o);if(e<=o)break;o=a}}for(let o=r;o>0;o--){let s=i[o-1];if(s.dom.parentNode==t)return s.domAtPos(s.length)}for(let o=r;o<i.length;o++){let s=i[o];if(s.dom.parentNode==t)return s.domAtPos(0)}return new PA(t,0)}function Iie(n,e,t){let i,{children:r}=n;t>0&&e instanceof n1&&r.length&&(i=r[r.length-1])instanceof n1&&i.mark.eq(e.mark)?Iie(i,e.children[0],t-1):(r.push(e),e.setParent(n)),n.length+=e.length}function kie(n,e,t){let i=null,r=-1,o=null,s=-1;function a(A,m){for(let v=0,x=0;v<A.children.length&&x<=m;v++){let _=A.children[v],O=x+_.length;O>=m&&(_.children.length?a(_,m-x):(!o||o.isHidden&&(t>0||BEe(o,_)))&&(O>m||x==O&&_.getSide()>0)?(o=_,s=m-x):(x<m||x==O&&_.getSide()<0&&!_.isHidden)&&(i=_,r=m-x)),x=O}}a(n,e);let c=(t<0?i:o)||i||o;return c?c.coordsAt(Math.max(0,c==i?r:s),t):OEe(n)}function OEe(n){let e=n.dom.lastChild;if(!e)return n.dom.getBoundingClientRect();let t=l4(e);return t[t.length-1]||null}function BEe(n,e){let t=n.coordsAt(0,1),i=e.coordsAt(0,1);return t&&i&&i.top<t.bottom}function VR(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const jG=Object.create(null);function bS(n,e,t){if(n==e)return!0;n||(n=jG),e||(e=jG);let i=Object.keys(n),r=Object.keys(e);if(i.length-(t&&i.indexOf(t)>-1?1:0)!=r.length-(t&&r.indexOf(t)>-1?1:0))return!1;for(let o of i)if(o!=t&&(r.indexOf(o)==-1||n[o]!==e[o]))return!1;return!0}function HR(n,e,t){let i=!1;if(e)for(let r in e)t&&r in t||(i=!0,r=="style"?n.style.cssText="":n.removeAttribute(r));if(t)for(let r in t)e&&e[r]==t[r]||(i=!0,r=="style"?n.style.cssText=t[r]:n.setAttribute(r,t[r]));return i}function IEe(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let i=n.attributes[t];e[i.name]=i.value}return e}class iv{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var uh=(function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n})(uh||(uh={}));class Er extends kb{constructor(e,t,i,r){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new cM(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return t+=i&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Hy(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:o,end:s}=Tie(e,t);i=(o?t?-3e8:-1:5e8)-1,r=(s?t?2e8:1:-6e8)+1}return new Hy(e,i,r,t,e.widget||null,!0)}static line(e){return new AM(e)}static set(e,t=!1){return Xo.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Er.none=Xo.empty;class cM extends Er{constructor(e){let{start:t,end:i}=Tie(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof cM&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&bS(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}cM.prototype.point=!1;class AM extends Er{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof AM&&this.spec.class==e.spec.class&&bS(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}AM.prototype.mapMode=sh.TrackBefore;AM.prototype.point=!0;class Hy extends Er{constructor(e,t,i,r,o,s){super(t,i,o,e),this.block=r,this.isReplace=s,this.mapMode=r?t<=0?sh.TrackBefore:sh.TrackAfter:sh.TrackDel}get type(){return this.startSide!=this.endSide?uh.WidgetRange:this.startSide<=0?uh.WidgetBefore:uh.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Hy&&kEe(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Hy.prototype.point=!0;function Tie(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function kEe(n,e){return n==e||!!(n&&e&&n.compare(e))}function rw(n,e,t,i=0){let r=t.length-1;r>=0&&t[r]+i>=n?t[r]=Math.max(t[r],e):t.push(n,e)}class Tu extends Sa{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,r,o,s){if(i){if(!(i instanceof Tu))return!1;this.dom||i.transferDOM(this)}return r&&this.setDeco(i?i.attrs:null),Sie(this,e,t,i?i.children.slice():[],o,s),!0}split(e){let t=new Tu;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:r}=this.childPos(e);r&&(t.append(this.children[i].split(r),0),this.children[i].merge(r,this.children[i].length,null,!1,0,0),i++);for(let o=i;o<this.children.length;o++)t.append(this.children[o],0);for(;i>0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){bS(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Iie(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=VR(t,this.attrs||{})),i&&(this.attrs=VR({class:i},this.attrs||{}))}domAtPos(e){return Bie(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?this.flags&4&&(bie(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(HR(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&Sa.get(r)instanceof n1;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=Sa.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!Ii.ios||!this.children.some(o=>o instanceof fm))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof fm)||/[^ -~]/.test(i.text))return null;let r=l4(i.dom);if(r.length!=1)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=kie(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,o=i.bottom-i.top;if(Math.abs(o-r.lineHeight)<2&&r.textHeight<o){let s=(o-r.textHeight)/2;return{top:i.top+s,bottom:i.bottom-s,left:i.left,right:i.left}}}return i}become(e){return e instanceof Tu&&this.children.length==0&&e.children.length==0&&bS(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let i=0,r=0;i<e.children.length;i++){let o=e.children[i],s=r+o.length;if(s>=t){if(o instanceof Tu)return o;if(s>t)break}r=s+o.breakAfter}return null}}class V0 extends Sa{constructor(e,t,i){super(),this.widget=e,this.length=t,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,r,o,s){return i&&(!(i instanceof V0)||!this.widget.compare(i.widget)||e>0&&o<=0||t<this.length&&s<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?PA.before(this.dom):PA.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let i=new V0(this.widget,t,this.deco);return i.breakAfter=this.breakAfter,i}get children(){return gK}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):vs.empty}domBoundsAround(){return null}become(e){return e instanceof V0&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);return i||(this.widget instanceof ZR?null:c6(this.dom.getBoundingClientRect(),this.length?e==0:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:i}=this.deco;return t==i?!1:e<0?t<0:i>0}}class ZR extends iv{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class g3{constructor(e,t,i,r){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof V0&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Tu),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(h5(new hx(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof V0)&&this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(h5(new fm(this.text.slice(this.textOff,this.textOff+r)),t),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,t,i,r){this.buildText(t-e,i,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof Hy){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(i instanceof Hy)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new V0(i.widget||dx.block,a,i));else{let c=Dy.create(i.widget||dx.inline,a,a?0:i.startSide),A=this.atCursorPos&&!c.isEditable&&o<=r.length&&(e<t||i.startSide>0),m=!c.isEditable&&(e<t||o>r.length||i.startSide<=0),v=this.getLine();this.pendingBuffer==2&&!A&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),A&&(v.append(h5(new hx(1),r),o),o=r.length+Math.max(0,o-r.length)),v.append(h5(c,r),o),this.atCursorPos=m,this.pendingBuffer=m?e<t||o>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=o)}static build(e,t,i,r,o){let s=new g3(e,t,i,o);return s.openEnd=Xo.spans(r,t,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function h5(n,e){for(let t of e)n=new n1(t,[n],n.length);return n}class dx extends iv{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}dx.inline=new dx("span");dx.block=new dx("div");var Za=(function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n})(Za||(Za={}));const Db=Za.LTR,yK=Za.RTL;function Rie(n){let e=[];for(let t=0;t<n.length;t++)e.push(1<<+n[t]);return e}const TEe=Rie("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),REe=Rie("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),XR=Object.create(null),sg=[];for(let n of["()","[]","{}"]){let e=n.charCodeAt(0),t=n.charCodeAt(1);XR[e]=t,XR[t]=-e}function Die(n){return n<=247?TEe[n]:1424<=n&&n<=1524?2:1536<=n&&n<=1785?REe[n-1536]:1774<=n&&n<=2220?4:8192<=n&&n<=8204?256:64336<=n&&n<=65023?4:1}const DEe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Py{get dir(){return this.level%2?yK:Db}constructor(e,t,i){this.from=e,this.to=t,this.level=i}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,i,r){let o=-1;for(let s=0;s<e.length;s++){let a=e[s];if(a.from<=t&&a.to>=t){if(a.level==i)return s;(o<0||(r!=0?r<0?a.from<t:a.to>t:e[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function Pie(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++){let i=n[t],r=e[t];if(i.from!=r.from||i.to!=r.to||i.direction!=r.direction||!Pie(i.inner,r.inner))return!1}return!0}const wa=[];function PEe(n,e,t,i,r){for(let o=0;o<=i.length;o++){let s=o?i[o-1].to:e,a=o<i.length?i[o].from:t,c=o?256:r;for(let A=s,m=c,v=c;A<a;A++){let x=Die(n.charCodeAt(A));x==512?x=m:x==8&&v==4&&(x=16),wa[A]=x==4?2:x,x&7&&(v=x),m=x}for(let A=s,m=c,v=c;A<a;A++){let x=wa[A];if(x==128)A<a-1&&m==wa[A+1]&&m&24?x=wa[A]=m:wa[A]=256;else if(x==64){let _=A+1;for(;_<a&&wa[_]==64;)_++;let O=A&&m==8||_<t&&wa[_]==8?v==1?1:8:256;for(let P=A;P<_;P++)wa[P]=O;A=_-1}else x==8&&v==1&&(wa[A]=1);m=x,x&7&&(v=x)}}}function UEe(n,e,t,i,r){let o=r==1?2:1;for(let s=0,a=0,c=0;s<=i.length;s++){let A=s?i[s-1].to:e,m=s<i.length?i[s].from:t;for(let v=A,x,_,O;v<m;v++)if(_=XR[x=n.charCodeAt(v)])if(_<0){for(let P=a-3;P>=0;P-=3)if(sg[P+1]==-_){let F=sg[P+2],j=F&2?r:F&4?F&1?o:r:0;j&&(wa[v]=wa[sg[P]]=j),a=P;break}}else{if(sg.length==189)break;sg[a++]=v,sg[a++]=x,sg[a++]=c}else if((O=wa[v])==2||O==1){let P=O==r;c=P?0:1;for(let F=a-3;F>=0;F-=3){let j=sg[F+2];if(j&2)break;if(P)sg[F+2]|=2;else{if(j&4)break;sg[F+2]|=4}}}}}function KEe(n,e,t,i){for(let r=0,o=i;r<=t.length;r++){let s=r?t[r-1].to:n,a=r<t.length?t[r].from:e;for(let c=s;c<a;){let A=wa[c];if(A==256){let m=c+1;for(;;)if(m==a){if(r==t.length)break;m=t[r++].to,a=r<t.length?t[r].from:e}else if(wa[m]==256)m++;else break;let v=o==1,x=(m<e?wa[m]:i)==1,_=v==x?v?1:2:i;for(let O=m,P=r,F=P?t[P-1].to:n;O>c;)O==F&&(O=t[--P].from,F=P?t[P-1].to:n),wa[--O]=_;c=m}else o=A,c++}}}function JR(n,e,t,i,r,o,s){let a=i%2?2:1;if(i%2==r%2)for(let c=e,A=0;c<t;){let m=!0,v=!1;if(A==o.length||c<o[A].from){let P=wa[c];P!=a&&(m=!1,v=P==16)}let x=!m&&a==1?[]:null,_=m?i:i+1,O=c;e:for(;;)if(A<o.length&&O==o[A].from){if(v)break e;let P=o[A];if(!m)for(let F=P.to,j=A+1;;){if(F==t)break e;if(j<o.length&&o[j].from==F)F=o[j++].to;else{if(wa[F]==a)break e;break}}if(A++,x)x.push(P);else{P.from>c&&s.push(new Py(c,P.from,_));let F=P.direction==Db!=!(_%2);eD(n,F?i+1:i,r,P.inner,P.from,P.to,s),c=P.to}O=P.to}else{if(O==t||(m?wa[O]!=a:wa[O]==a))break;O++}x?JR(n,c,O,i+1,r,x,s):c<O&&s.push(new Py(c,O,_)),c=O}else for(let c=t,A=o.length;c>e;){let m=!0,v=!1;if(!A||c>o[A-1].to){let P=wa[c-1];P!=a&&(m=!1,v=P==16)}let x=!m&&a==1?[]:null,_=m?i:i+1,O=c;e:for(;;)if(A&&O==o[A-1].to){if(v)break e;let P=o[--A];if(!m)for(let F=P.from,j=A;;){if(F==e)break e;if(j&&o[j-1].to==F)F=o[--j].from;else{if(wa[F-1]==a)break e;break}}if(x)x.push(P);else{P.to<c&&s.push(new Py(P.to,c,_));let F=P.direction==Db!=!(_%2);eD(n,F?i+1:i,r,P.inner,P.from,P.to,s),c=P.from}O=P.from}else{if(O==e||(m?wa[O-1]!=a:wa[O-1]==a))break;O--}x?JR(n,O,c,i+1,r,x,s):O<c&&s.push(new Py(O,c,_)),c=O}}function eD(n,e,t,i,r,o,s){let a=e%2?2:1;PEe(n,r,o,i,a),UEe(n,r,o,i,a),KEe(r,o,i,a),JR(n,r,o,e,t,i,s)}function LEe(n,e,t){if(!n)return[new Py(0,0,e==yK?1:0)];if(e==Db&&!t.length&&!DEe.test(n))return Uie(n.length);if(t.length)for(;n.length>wa.length;)wa[wa.length]=256;let i=[],r=e==Db?0:1;return eD(n,r,r,t,0,n.length,i),i}function Uie(n){return[new Py(0,n,0)]}let Kie="";function FEe(n,e,t,i,r){var o;let s=i.head-n.from,a=Py.find(e,s,(o=i.bidiLevel)!==null&&o!==void 0?o:-1,i.assoc),c=e[a],A=c.side(r,t);if(s==A){let x=a+=r?1:-1;if(x<0||x>=e.length)return null;c=e[a=x],s=c.side(!r,t),A=c.side(r,t)}let m=uA(n.text,s,c.forward(r,t));(m<c.from||m>c.to)&&(m=A),Kie=n.text.slice(Math.min(s,m),Math.max(s,m));let v=a==(r?e.length-1:0)?null:e[a+(r?1:-1)];return v&&m==A&&v.level+(r?0:1)<c.level?Sn.cursor(v.side(!r,t)+n.from,v.forward(r,t)?1:-1,v.level):Sn.cursor(m+n.from,c.forward(r,t)?-1:1,c.level)}function zEe(n,e,t){for(let i=e;i<t;i++){let r=Die(n.charCodeAt(i));if(r==1)return Db;if(r==2||r==4)return yK}return Db}const Lie=ki.define(),Fie=ki.define(),zie=ki.define(),jie=ki.define(),tD=ki.define(),Nie=ki.define(),Gie=ki.define(),vK=ki.define(),bK=ki.define(),Wie=ki.define({combine:n=>n.some(e=>e)}),Qie=ki.define({combine:n=>n.some(e=>e)}),qie=ki.define();class N_{constructor(e,t="nearest",i="nearest",r=5,o=5,s=!1){this.range=e,this.y=t,this.x=i,this.yMargin=r,this.xMargin=o,this.isSnapshot=s}map(e){return e.empty?this:new N_(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new N_(Sn.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const d5=ao.define({map:(n,e)=>n.map(e)}),Yie=ao.define();function lh(n,e,t){let i=n.facet(jie);i.length?i[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const N0=ki.define({combine:n=>n.length?n[0]:!0});let jEe=0;const __=ki.define({combine(n){return n.filter((e,t)=>{for(let i=0;i<t;i++)if(n[i].plugin==e.plugin)return!1;return!0})}});class lu{constructor(e,t,i,r,o){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=r,this.baseExtensions=o(this),this.extension=this.baseExtensions.concat(__.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(__.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:i,eventObservers:r,provide:o,decorations:s}=t||{};return new lu(jEe++,e,i,r,a=>{let c=[];return s&&c.push(u4.of(A=>{let m=A.plugin(a);return m?s(m):Er.none})),o&&c.push(o(a)),c})}static fromClass(e,t){return lu.define((i,r)=>new e(i,r),t)}}class i8{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(lh(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){lh(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){lh(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const $ie=ki.define(),CK=ki.define(),u4=ki.define(),Vie=ki.define(),h6=ki.define(),Hie=ki.define();function NG(n,e){let t=n.state.facet(Hie);if(!t.length)return t;let i=t.map(o=>o instanceof Function?o(n):o),r=[];return Xo.spans(i,e.from,e.to,{point(){},span(o,s,a,c){let A=o-e.from,m=s-e.from,v=r;for(let x=a.length-1;x>=0;x--,c--){let _=a[x].spec.bidiIsolate,O;if(_==null&&(_=zEe(e.text,A,m)),c>0&&v.length&&(O=v[v.length-1]).to==A&&O.direction==_)O.to=m,v=O.inner;else{let P={from:A,to:m,direction:_,inner:[]};v.push(P),v=P.inner}}}}),r}const Zie=ki.define();function _K(n){let e=0,t=0,i=0,r=0;for(let o of n.state.facet(Zie)){let s=o(n);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(t=Math.max(t,s.right)),s.top!=null&&(i=Math.max(i,s.top)),s.bottom!=null&&(r=Math.max(r,s.bottom)))}return{left:e,right:t,top:i,bottom:r}}const K2=ki.define();class np{constructor(e,t,i,r){this.fromA=e,this.toA=t,this.fromB=i,this.toB=r}join(e){return new np(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>i.toA)){if(r.toA<i.fromA)break;i=i.join(r),e.splice(t-1,1)}}return e.splice(t,0,i),e}static extendWithRanges(e,t){if(t.length==0)return e;let i=[];for(let r=0,o=0,s=0,a=0;;r++){let c=r==e.length?null:e[r],A=s-a,m=c?c.fromB:1e9;for(;o<t.length&&t[o]<m;){let v=t[o],x=t[o+1],_=Math.max(a,v),O=Math.min(m,x);if(_<=O&&new np(_+A,O+A,_,O).addToSet(i),x>m)break;o+=2}if(!c)return i;new np(c.fromA,c.toA,c.fromB,c.toB).addToSet(i),s=c.toA,a=c.toB}}}class CS{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=rc.empty(this.startState.doc.length);for(let o of i)this.changes=this.changes.compose(o.changes);let r=[];this.changes.iterChangedRanges((o,s,a,c)=>r.push(new np(o,s,a,c))),this.changedRanges=r}static create(e,t,i){return new CS(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class GG extends Sa{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Er.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Tu],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new np(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:A,toA:m})=>m<this.minWidthFrom||A>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?r=this.domChanged.newSel.head:!$Ee(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let o=r>-1?GEe(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:A,to:m}=this.hasComposition;i=new np(A,m,e.changes.mapPos(A,-1),e.changes.mapPos(m,1)).addToSet(i.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Ii.ie||Ii.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),c=qEe(s,a,e.changes);return i=np.extendWithRanges(i,c),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Ii.chrome||Ii.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||r.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.children)s instanceof V0&&s.widget instanceof ZR&&o.push(s.dom);r.updateGaps(o)}updateChildren(e,t,i){let r=i?i.range.addToSet(e.slice()):e,o=this.childCursor(t);for(let s=r.length-1;;s--){let a=s>=0?r[s]:null;if(!a)break;let{fromA:c,toA:A,fromB:m,toB:v}=a,x,_,O,P;if(i&&i.range.fromB<v&&i.range.toB>m){let H=g3.build(this.view.state.doc,m,i.range.fromB,this.decorations,this.dynamicDecorationMap),G=g3.build(this.view.state.doc,i.range.toB,v,this.decorations,this.dynamicDecorationMap);_=H.breakAtStart,O=H.openStart,P=G.openEnd;let Y=this.compositionView(i);G.breakAtStart?Y.breakAfter=1:G.content.length&&Y.merge(Y.length,Y.length,G.content[0],!1,G.openStart,0)&&(Y.breakAfter=G.content[0].breakAfter,G.content.shift()),H.content.length&&Y.merge(0,0,H.content[H.content.length-1],!0,0,H.openEnd)&&H.content.pop(),x=H.content.concat(Y).concat(G.content)}else({content:x,breakAtStart:_,openStart:O,openEnd:P}=g3.build(this.view.state.doc,m,v,this.decorations,this.dynamicDecorationMap));let{i:F,off:j}=o.findPos(A,1),{i:Q,off:V}=o.findPos(c,-1);wie(this,Q,V,F,j,x,_,O,P)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let i of t.effects)i.is(Yie)&&(this.editContextFormatting=i.value)}compositionView(e){let t=new fm(e.text.nodeValue);t.flags|=8;for(let{deco:r}of e.marks)t=new n1(r,[t],t.length);let i=new Tu;return i.append(t,0),i}fixCompositionDOM(e){let t=(o,s)=>{s.flags|=8|(s.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(s);let a=Sa.get(o);a&&a!=s&&(a.dom=null),s.setDOM(o)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];t(e.line,r);for(let o=e.marks.length-1;o>=-1;o--)i=r.childPos(i.off,1),r=r.children[i.i],t(o>=0?e.marks[o].node:e.text,r)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,o=!r&&!(this.view.state.facet(N0)||this.dom.tabIndex>-1)&&iw(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||t||o))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(a.anchor)),A=a.empty?c:this.moveToLine(this.domAtPos(a.head));if(Ii.gecko&&a.empty&&!this.hasComposition&&NEe(c)){let v=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(v,c.node.childNodes[c.offset]||null)),c=A=new PA(v,0),s=!0}let m=this.view.observer.selectionRange;(s||!m.focusNode||(!m3(c.node,c.offset,m.anchorNode,m.anchorOffset)||!m3(A.node,A.offset,m.focusNode,m.focusOffset))&&!this.suppressWidgetCursorChange(m,a))&&(this.view.observer.ignore(()=>{Ii.android&&Ii.chrome&&this.dom.contains(m.focusNode)&&YEe(m.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let v=a4(this.view.root);if(v)if(a.empty){if(Ii.gecko){let x=WEe(c.node,c.offset);if(x&&x!=3){let _=(x==1?_ie:xie)(c.node,c.offset);_&&(c=new PA(_.node,_.offset))}}v.collapse(c.node,c.offset),a.bidiLevel!=null&&v.caretBidiLevel!==void 0&&(v.caretBidiLevel=a.bidiLevel)}else if(v.extend){v.collapse(c.node,c.offset);try{v.extend(A.node,A.offset)}catch{}}else{let x=document.createRange();a.anchor>a.head&&([c,A]=[A,c]),x.setEnd(A.node,A.offset),x.setStart(c.node,c.offset),v.removeAllRanges(),v.addRange(x)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(c,A)),this.impreciseAnchor=c.precise?null:new PA(m.anchorNode,m.anchorOffset),this.impreciseHead=A.precise?null:new PA(m.focusNode,m.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&m3(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=a4(e.root),{anchorNode:r,anchorOffset:o}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let s=Tu.find(this,t.head);if(!s)return;let a=s.posAtStart;if(t.head==a||t.head==a+s.length)return;let c=this.coordsAt(t.head,-1),A=this.coordsAt(t.head,1);if(!c||!A||c.bottom>A.top)return;let m=this.domAtPos(t.head+t.assoc);i.collapse(m.node,m.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let v=e.observer.selectionRange;e.docView.posFromDOM(v.anchorNode,v.anchorOffset)!=t.from&&i.collapse(r,o)}moveToLine(e){let t=this.dom,i;if(e.node!=t)return e;for(let r=e.offset;!i&&r<t.childNodes.length;r++){let o=Sa.get(t.childNodes[r]);o instanceof Tu&&(i=o.domAtPos(0))}for(let r=e.offset-1;!i&&r>=0;r--){let o=Sa.get(t.childNodes[r]);o instanceof Tu&&(i=o.domAtPos(o.length))}return i?new PA(i.node,i.offset,!0):e}nearest(e){for(let t=e;t;){let i=Sa.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let r=this.children[t];if(i<r.length||r instanceof Tu)break;t++,i=0}return this.children[t].domAtPos(i)}coordsAt(e,t){let i=null,r=0;for(let o=this.length,s=this.children.length-1;s>=0;s--){let a=this.children[s],c=o-a.breakAfter,A=c-a.length;if(c<e)break;if(A<=e&&(A<e||a.covers(-1))&&(c>e||a.covers(1))&&(!i||a instanceof Tu&&!(i instanceof Tu&&t>=0)))i=a,r=A;else if(i&&A==e&&c==e&&a instanceof V0&&Math.abs(t)<2){if(a.deco.startSide<0)break;s&&(i=null)}o=A}return i?i.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),r=this.children[t];if(!(r instanceof Tu))return null;for(;r.children.length;){let{i:a,off:c}=r.childPos(i,1);for(;;a++){if(a==r.children.length)return null;if((r=r.children[a]).length)break}i=c}if(!(r instanceof fm))return null;let o=uA(r.text,i);if(o==i)return null;let s=Rb(r.dom,i,o).getClientRects();for(let a=0;a<s.length;a++){let c=s[a];if(a==s.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let t=[],{from:i,to:r}=e,o=this.view.contentDOM.clientWidth,s=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,c=this.view.textDirection==Za.LTR;for(let A=0,m=0;m<this.children.length;m++){let v=this.children[m],x=A+v.length;if(x>r)break;if(A>=i){let _=v.dom.getBoundingClientRect();if(t.push(_.height),s){let O=v.dom.lastChild,P=O?l4(O):[];if(P.length){let F=P[P.length-1],j=c?F.right-_.left:_.right-F.left;j>a&&(a=j,this.minWidth=o,this.minWidthFrom=A,this.minWidthTo=x)}}}A=x+v.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Za.RTL:Za.LTR}measureTextSize(){for(let o of this.children)if(o instanceof Tu){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),t,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=l4(e.firstChild)[0];t=e.getBoundingClientRect().height,i=o?o.width/27:7,r=o?o.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:r}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Mie(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,r=0;;r++){let o=r==t.viewports.length?null:t.viewports[r],s=o?o.from-1:this.length;if(s>i){let a=(t.lineBlockAt(s).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(Er.replace({widget:new ZR(a),block:!0,inclusive:!0,isBlockGap:!0}).range(i,s))}if(!o)break;i=o.to+1}return Er.set(e)}updateDeco(){let e=1,t=this.view.state.facet(u4).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),i=!1,r=this.view.state.facet(Vie).map((o,s)=>{let a=typeof o=="function";return a&&(i=!0),a?o(this.view):o});for(r.length&&(this.dynamicDecorationMap[e++]=i,t.push(Xo.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let A=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=A.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let A of this.view.state.facet(qie))try{if(A(this.view,e.range,e))return!0}catch(m){lh(this.view.state,m,"scroll handler")}let{range:t}=e,i=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),r;if(!i)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let o=_K(this.view),s={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom},{offsetWidth:a,offsetHeight:c}=this.view.scrollDOM;bEe(this.view.scrollDOM,s,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==Za.LTR)}}function NEe(n){return n.node.nodeType==1&&n.node.firstChild&&(n.offset==0||n.node.childNodes[n.offset-1].contentEditable=="false")&&(n.offset==n.node.childNodes.length||n.node.childNodes[n.offset].contentEditable=="false")}function Xie(n,e){let t=n.observer.selectionRange;if(!t.focusNode)return null;let i=_ie(t.focusNode,t.focusOffset),r=xie(t.focusNode,t.focusOffset),o=i||r;if(r&&i&&r.node!=i.node){let a=Sa.get(r.node);if(!a||a instanceof fm&&a.text!=r.node.nodeValue)o=r;else if(n.docView.lastCompositionAfterCursor){let c=Sa.get(i.node);!c||c instanceof fm&&c.text!=i.node.nodeValue||(o=r)}}if(n.docView.lastCompositionAfterCursor=o!=i,!o)return null;let s=e-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}function GEe(n,e,t){let i=Xie(n,t);if(!i)return null;let{node:r,from:o,to:s}=i,a=r.nodeValue;if(/[\n\r]/.test(a)||n.state.doc.sliceString(i.from,i.to)!=a)return null;let c=e.invertedDesc,A=new np(c.mapPos(o),c.mapPos(s),o,s),m=[];for(let v=r.parentNode;;v=v.parentNode){let x=Sa.get(v);if(x instanceof n1)m.push({node:v,deco:x.mark});else{if(x instanceof Tu||v.nodeName=="DIV"&&v.parentNode==n.contentDOM)return{range:A,text:r,marks:m,line:v};if(v!=n.contentDOM)m.push({node:v,deco:new cM({inclusive:!0,attributes:IEe(v),tagName:v.tagName.toLowerCase()})});else return null}}}function WEe(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e<n.childNodes.length&&n.childNodes[e].contentEditable=="false"?2:0)}let QEe=class{constructor(){this.changes=[]}compareRange(e,t){rw(e,t,this.changes)}comparePoint(e,t){rw(e,t,this.changes)}boundChange(e){rw(e,e,this.changes)}};function qEe(n,e,t){let i=new QEe;return Xo.compare(n,e,t,i),i.changes}function YEe(n,e){for(let t=n;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function $Ee(n,e){let t=!1;return e&&n.iterChangedRanges((i,r)=>{i<e.to&&r>e.from&&(t=!0)}),t}function VEe(n,e,t=1){let i=n.charCategorizer(e),r=n.doc.lineAt(e),o=e-r.from;if(r.length==0)return Sn.cursor(e);o==0?t=1:o==r.length&&(t=-1);let s=o,a=o;t<0?s=uA(r.text,o,!1):a=uA(r.text,o);let c=i(r.text.slice(s,a));for(;s>0;){let A=uA(r.text,s,!1);if(i(r.text.slice(A,s))!=c)break;s=A}for(;a<r.length;){let A=uA(r.text,a);if(i(r.text.slice(a,A))!=c)break;a=A}return Sn.range(s+r.from,a+r.from)}function HEe(n,e){return e.left>n?e.left-n:Math.max(0,n-e.right)}function ZEe(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function r8(n,e){return n.top<e.bottom-1&&n.bottom>e.top+1}function WG(n,e){return e<n.top?{top:e,left:n.left,right:n.right,bottom:n.bottom}:n}function QG(n,e){return e>n.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function nD(n,e,t){let i,r,o,s,a=!1,c,A,m,v;for(let O=n.firstChild;O;O=O.nextSibling){let P=l4(O);for(let F=0;F<P.length;F++){let j=P[F];r&&r8(r,j)&&(j=WG(QG(j,r.bottom),r.top));let Q=HEe(e,j),V=ZEe(t,j);if(Q==0&&V==0)return O.nodeType==3?qG(O,e,t):nD(O,e,t);(!i||s>V||s==V&&o>Q)&&(i=O,r=j,o=Q,s=V,a=Q?e<j.left?F>0:F<P.length-1:!0),Q==0?t>j.bottom&&(!m||m.bottom<j.bottom)?(c=O,m=j):t<j.top&&(!v||v.top>j.top)&&(A=O,v=j):m&&r8(m,j)?m=QG(m,j.bottom):v&&r8(v,j)&&(v=WG(v,j.top))}}if(m&&m.bottom>=t?(i=c,r=m):v&&v.top<=t&&(i=A,r=v),!i)return{node:n,offset:0};let x=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return qG(i,x,t);if(a&&i.contentEditable!="false")return nD(i,x,t);let _=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:n,offset:_}}function qG(n,e,t){let i=n.nodeValue.length,r=-1,o=1e9,s=0;for(let a=0;a<i;a++){let c=Rb(n,a,a+1).getClientRects();for(let A=0;A<c.length;A++){let m=c[A];if(m.top==m.bottom)continue;s||(s=e-m.left);let v=(m.top>t?m.top-t:t-m.bottom)-1;if(m.left-1<=e&&m.right+1>=e&&v<o){let x=e>=(m.left+m.right)/2,_=x;if((Ii.chrome||Ii.gecko)&&Rb(n,a).getBoundingClientRect().left==m.right&&(_=!x),v<=0)return{node:n,offset:a+(_?1:0)};r=a+(_?1:0),o=v}}}return{node:n,offset:r>-1?r:s>0?n.nodeValue.length:0}}function Jie(n,e,t,i=-1){var r,o;let s=n.contentDOM.getBoundingClientRect(),a=s.top+n.viewState.paddingTop,c,{docHeight:A}=n.viewState,{x:m,y:v}=e,x=v-a;if(x<0)return 0;if(x>A)return n.state.doc.length;for(let H=n.viewState.heightOracle.textHeight/2,G=!1;c=n.elementAtHeight(x),c.type!=uh.Text;)for(;x=i>0?c.bottom+H:c.top-H,!(x>=0&&x<=A);){if(G)return t?null:0;G=!0,i=-i}v=a+x;let _=c.from;if(_<n.viewport.from)return n.viewport.from==0?0:t?null:YG(n,s,c,m,v);if(_>n.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:YG(n,s,c,m,v);let O=n.dom.ownerDocument,P=n.root.elementFromPoint?n.root:O,F=P.elementFromPoint(m,v);F&&!n.contentDOM.contains(F)&&(F=null),F||(m=Math.max(s.left+1,Math.min(s.right-1,m)),F=P.elementFromPoint(m,v),F&&!n.contentDOM.contains(F)&&(F=null));let j,Q=-1;if(F&&((r=n.docView.nearest(F))===null||r===void 0?void 0:r.isEditable)!=!1){if(O.caretPositionFromPoint){let H=O.caretPositionFromPoint(m,v);H&&({offsetNode:j,offset:Q}=H)}else if(O.caretRangeFromPoint){let H=O.caretRangeFromPoint(m,v);H&&({startContainer:j,startOffset:Q}=H,(!n.contentDOM.contains(j)||Ii.safari&&XEe(j,Q,m)||Ii.chrome&&JEe(j,Q,m))&&(j=void 0))}j&&(Q=Math.min(Gg(j),Q))}if(!j||!n.docView.dom.contains(j)){let H=Tu.find(n.docView,_);if(!H)return x>c.top+c.height/2?c.to:c.from;({node:j,offset:Q}=nD(H.dom,m,v))}let V=n.docView.nearest(j);if(!V)return null;if(V.isWidget&&((o=V.dom)===null||o===void 0?void 0:o.nodeType)==1){let H=V.dom.getBoundingClientRect();return e.y<H.top||e.y<=H.bottom&&e.x<=(H.left+H.right)/2?V.posAtStart:V.posAtEnd}else return V.localPosFromDOM(j,Q)+V.posAtStart}function YG(n,e,t,i,r){let o=Math.round((i-e.left)*n.defaultCharacterWidth);if(n.lineWrapping&&t.height>n.defaultLineHeight*1.5){let a=n.viewState.heightOracle.textHeight,c=Math.floor((r-t.top-(n.defaultLineHeight-a)*.5)/a);o+=c*n.viewState.heightOracle.lineLength}let s=n.state.sliceDoc(t.from,t.to);return t.from+NR(s,o,n.state.tabSize)}function XEe(n,e,t){let i,r=n;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(;;){let o=r.nextSibling;if(o){if(o.nodeName=="BR")break;return!1}else{let s=r.parentNode;if(!s||s.nodeName=="DIV")break;r=s}}return Rb(n,i-1,i).getBoundingClientRect().right>t}function JEe(n,e,t){if(e!=0)return!1;for(let r=n;;){let o=r.parentNode;if(!o||o.nodeType!=1||o.firstChild!=r)return!1;if(o.classList.contains("cm-line"))break;r=o}let i=n.nodeType==1?n.getBoundingClientRect():Rb(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function iD(n,e,t){let i=n.lineBlockAt(e);if(Array.isArray(i.type)){let r;for(let o of i.type){if(o.from>e)break;if(!(o.to<e)){if(o.from<e&&o.to>e)return o;(!r||o.type==uh.Text&&(r.type!=o.type||(t<0?o.from<e:o.to>e)))&&(r=o)}}return r||i}return i}function e6e(n,e,t,i){let r=iD(n,e.head,e.assoc||-1),o=!i||r.type!=uh.Text||!(n.lineWrapping||r.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(o){let s=n.dom.getBoundingClientRect(),a=n.textDirectionAt(r.from),c=n.posAtCoords({x:t==(a==Za.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(c!=null)return Sn.cursor(c,t?-1:1)}return Sn.cursor(t?r.to:r.from,t?-1:1)}function $G(n,e,t,i){let r=n.state.doc.lineAt(e.head),o=n.bidiSpans(r),s=n.textDirectionAt(r.from);for(let a=e,c=null;;){let A=FEe(r,o,s,a,t),m=Kie;if(!A){if(r.number==(t?n.state.doc.lines:1))return a;m=`
`,r=n.state.doc.line(r.number+(t?1:-1)),o=n.bidiSpans(r),A=n.visualLineSide(r,!t)}if(c){if(!c(m))return a}else{if(!i)return A;c=i(m)}a=A}}function t6e(n,e,t){let i=n.state.charCategorizer(e),r=i(t);return o=>{let s=i(o);return r==ul.Space&&(r=s),r==s}}function n6e(n,e,t,i){let r=e.head,o=t?1:-1;if(r==(t?n.state.doc.length:0))return Sn.cursor(r,e.assoc);let s=e.goalColumn,a,c=n.contentDOM.getBoundingClientRect(),A=n.coordsAtPos(r,e.assoc||-1),m=n.documentTop;if(A)s==null&&(s=A.left-c.left),a=o<0?A.top:A.bottom;else{let _=n.viewState.lineBlockAt(r);s==null&&(s=Math.min(c.right-c.left,n.defaultCharacterWidth*(r-_.from))),a=(o<0?_.top:_.bottom)+m}let v=c.left+s,x=i??n.viewState.heightOracle.textHeight>>1;for(let _=0;;_+=10){let O=a+(x+_)*o,P=Jie(n,{x:v,y:O},!1,o);if(O<c.top||O>c.bottom||(o<0?P<r:P>r)){let F=n.docView.coordsForChar(P),j=!F||O<F.top?-1:1;return Sn.cursor(P,j,void 0,s)}}}function ow(n,e,t){for(;;){let i=0;for(let r of n)r.between(e-1,e+1,(o,s,a)=>{if(e>o&&e<s){let c=i||t||(e-o<s-e?-1:1);e=c<0?o:s,i=c}});if(!i)return e}}function ere(n,e){let t=null;for(let i=0;i<e.ranges.length;i++){let r=e.ranges[i],o=null;if(r.empty){let s=ow(n,r.from,0);s!=r.from&&(o=Sn.cursor(s,-1))}else{let s=ow(n,r.from,-1),a=ow(n,r.to,1);(s!=r.from||a!=r.to)&&(o=Sn.range(r.from==r.anchor?s:a,r.from==r.head?s:a))}o&&(t||(t=e.ranges.slice()),t[i]=o)}return t?Sn.create(t,e.mainIndex):e}function o8(n,e,t){let i=ow(n.state.facet(h6).map(r=>r(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:Sn.cursor(i,i<t.from?1:-1)}const L2="￿";class i6e{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(ys.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=L2}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let o=this.text.length;this.readNode(r);let s=r.nextSibling;if(s==t)break;let a=Sa.get(r),c=Sa.get(s);(a&&c?a.breakAfter:(a?a.breakAfter:vS(r))||vS(s)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>o)&&this.lineBreak(),r=s}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,a;if(this.lineSeparator?(o=t.indexOf(this.lineSeparator,i),s=this.lineSeparator.length):(a=r.exec(t))&&(o=a.index,s=a[0].length),this.append(t.slice(i,o<0?t.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=s-1);i=o+s}}readNode(e){if(e.cmIgnore)return;let t=Sa.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(r6e(e,i.node,i.offset)?t:0))}}function r6e(n,e,t){for(;;){if(!e||t<Gg(e))return!1;if(e==n)return!0;t=Tb(e)+1,e=e.parentNode}}class VG{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class o6e{constructor(e,t,i,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:o,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let a=o||s?[]:l6e(e),c=new i6e(a,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=u6e(a,this.bounds.from)}else{let a=e.observer.selectionRange,c=o&&o.node==a.focusNode&&o.offset==a.focusOffset||!QR(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),A=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!QR(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),m=e.viewport;if((Ii.ios||Ii.chrome)&&e.state.selection.main.empty&&c!=A&&(m.from>0||m.to<e.state.doc.length)){let v=Math.min(c,A),x=Math.max(c,A),_=m.from-v,O=m.to-x;(_==0||_==1||v==0)&&(O==0||O==-1||x==e.state.doc.length)&&(c=0,A=e.state.doc.length)}this.newSel=Sn.single(A,c)}}}function tre(n,e){let t,{newSel:i}=e,r=n.state.selection.main,o=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,c=r.from,A=null;(o===8||Ii.android&&e.text.length<a-s)&&(c=r.to,A="end");let m=a6e(n.state.doc.sliceString(s,a,L2),e.text,c-s,A);m&&(Ii.chrome&&o==13&&m.toB==m.from+2&&e.text.slice(m.from,m.toB)==L2+L2&&m.toB--,t={from:s+m.from,to:s+m.toA,insert:vs.of(e.text.slice(m.from,m.toB).split(L2))})}else i&&(!n.hasFocus&&n.state.facet(N0)||i.main.eq(r))&&(i=null);if(!t&&!i)return!1;if(!t&&e.typeOver&&!r.empty&&i&&i.main.empty?t={from:r.from,to:r.to,insert:n.state.doc.slice(r.from,r.to)}:(Ii.mac||Ii.android)&&t&&t.from==t.to&&t.from==r.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=Sn.single(i.main.anchor-1,i.main.head-1)),t={from:t.from,to:t.to,insert:vs.of([t.insert.toString().replace("."," ")])}):t&&t.from>=r.from&&t.to<=r.to&&(t.from!=r.from||t.to!=r.to)&&r.to-r.from-(t.to-t.from)<=4?t={from:r.from,to:r.to,insert:n.state.doc.slice(r.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,r.to))}:Ii.chrome&&t&&t.from==t.to&&t.from==r.head&&t.insert.toString()==`
`&&n.lineWrapping&&(i&&(i=Sn.single(i.main.anchor-1,i.main.head-1)),t={from:r.from,to:r.to,insert:vs.of([" "])}),t)return xK(n,t,i,o);if(i&&!i.main.eq(r)){let s=!1,a="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(s=!0),a=n.inputState.lastSelectionOrigin,a=="select.pointer"&&(i=ere(n.state.facet(h6).map(c=>c(n)),i))),n.dispatch({selection:i,scrollIntoView:s,userEvent:a}),!0}else return!1}function xK(n,e,t,i=-1){if(Ii.ios&&n.inputState.flushIOSKey(e))return!0;let r=n.state.selection.main;if(Ii.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&n.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&j_(n.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&j_(n.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&j_(n.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let s,a=()=>s||(s=s6e(n,e,t));return n.state.facet(Nie).some(c=>c(n,e.from,e.to,o,a))||n.dispatch(a()),!0}function s6e(n,e,t){let i,r=n.state,o=r.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let a=o.from<e.from?r.sliceDoc(o.from,e.from):"",c=o.to>e.to?r.sliceDoc(e.to,o.to):"";i=r.replaceSelection(n.state.toText(a+e.insert.sliceString(0,void 0,n.state.lineBreak)+c))}else{let a=r.changes(e),c=t&&t.main.to<=a.newLength?t.main:void 0;if(r.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let A=n.state.sliceDoc(e.from,e.to),m,v=t&&Xie(n,t.main.head);if(v){let O=e.insert.length-(e.to-e.from);m={from:v.from,to:v.to-O}}else m=n.state.doc.lineAt(o.head);let x=o.to-e.to,_=o.to-o.from;i=r.changeByRange(O=>{if(O.from==o.from&&O.to==o.to)return{changes:a,range:c||O.map(a)};let P=O.to-x,F=P-A.length;if(O.to-O.from!=_||n.state.sliceDoc(F,P)!=A||O.to>=m.from&&O.from<=m.to)return{range:O};let j=r.changes({from:F,to:P,insert:e.insert}),Q=O.to-o.to;return{changes:j,range:c?Sn.range(Math.max(0,c.anchor+Q),Math.max(0,c.head+Q)):O.map(j)}})}else i={changes:a,selection:c&&r.selection.replaceRange(c)}}let s="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,s+=".compose",n.inputState.compositionFirstChange&&(s+=".start",n.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:s,scrollIntoView:!0})}function a6e(n,e,t,i){let r=Math.min(n.length,e.length),o=0;for(;o<r&&n.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==r&&n.length==e.length)return null;let s=n.length,a=e.length;for(;s>0&&a>0&&n.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(i=="end"){let c=Math.max(0,o-Math.min(s,a));t-=s+c-o}if(s<o&&n.length<e.length){let c=t<=o&&t>=s?o-t:0;o-=c,a=o+(a-s),s=o}else if(a<o){let c=t<=o&&t>=a?o-t:0;o-=c,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}function l6e(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:r,focusOffset:o}=n.observer.selectionRange;return t&&(e.push(new VG(t,i)),(r!=t||o!=i)&&e.push(new VG(r,o))),e}function u6e(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?Sn.single(t+e,i+e):null}class c6e{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Ii.safari&&e.contentDOM.addEventListener("input",()=>null),Ii.gecko&&S6e(e.contentDOM.ownerDocument)}handleEvent(e){!y6e(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,t);for(let r of i.handlers){if(t.defaultPrevented)break;if(r(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=A6e(e),i=this.handlers,r=this.view.contentDOM;for(let o in t)if(o!="scroll"){let s=!t[o].handlers.length,a=i[o];a&&s!=!a.handlers.length&&(r.removeEventListener(o,this.handleEvent),a=null),a||r.addEventListener(o,this.handleEvent,{passive:s})}for(let o in i)o!="scroll"&&!t[o]&&r.removeEventListener(o,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&ire.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Ii.android&&Ii.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Ii.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=nre.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||h6e.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,j_(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Ii.safari&&!Ii.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function HG(n,e){return(t,i)=>{try{return e.call(n,i,t)}catch(r){lh(t.state,r)}}}function A6e(n){let e=Object.create(null);function t(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of n){let r=i.spec,o=r&&r.plugin.domEventHandlers,s=r&&r.plugin.domEventObservers;if(o)for(let a in o){let c=o[a];c&&t(a).handlers.push(HG(i.value,c))}if(s)for(let a in s){let c=s[a];c&&t(a).observers.push(HG(i.value,c))}}for(let i in pm)t(i).handlers.push(pm[i]);for(let i in op)t(i).observers.push(op[i]);return e}const nre=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],h6e="dthko",ire=[16,17,18,20,91,92,224,225],f5=6;function p5(n){return Math.max(0,n)*.7+8}function d6e(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class f6e{constructor(e,t,i,r){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=CEe(e.contentDOM),this.atoms=e.state.facet(h6).map(s=>s(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ys.allowMultipleSelections)&&p6e(e,t),this.dragging=g6e(e,t)&&sre(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&d6e(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,i=0,r=0,o=0,s=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:s}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:a}=this.scrollParents.y.getBoundingClientRect());let c=_K(this.view);e.clientX-c.left<=r+f5?t=-p5(r-e.clientX):e.clientX+c.right>=s-f5&&(t=p5(e.clientX-s)),e.clientY-c.top<=o+f5?i=-p5(o-e.clientY):e.clientY+c.bottom>=a-f5&&(i=p5(e.clientY-a)),this.setScrollSpeed(t,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,i=ere(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function p6e(n,e){let t=n.state.facet(Lie);return t.length?t[0](e):Ii.mac?e.metaKey:e.ctrlKey}function m6e(n,e){let t=n.state.facet(Fie);return t.length?t[0](e):Ii.mac?!e.altKey:!e.ctrlKey}function g6e(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=a4(n.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let o=0;o<r.length;o++){let s=r[o];if(s.left<=e.clientX&&s.right>=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function y6e(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=Sa.get(t))&&i.ignoreEvent(e))return!1;return!0}const pm=Object.create(null),op=Object.create(null),rre=Ii.ie&&Ii.ie_version<15||Ii.ios&&Ii.webkit_version<604;function v6e(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),ore(n,t.value)},50)}function d6(n,e,t){for(let i of n.facet(e))t=i(t,n);return t}function ore(n,e){e=d6(n.state,vK,e);let{state:t}=n,i,r=1,o=t.toText(e),s=o.lines==t.selection.ranges.length;if(rD!=null&&t.selection.ranges.every(c=>c.empty)&&rD==o.toString()){let c=-1;i=t.changeByRange(A=>{let m=t.doc.lineAt(A.from);if(m.from==c)return{range:A};c=m.from;let v=t.toText((s?o.line(r++).text:e)+t.lineBreak);return{changes:{from:m.from,insert:v},range:Sn.cursor(A.from+v.length)}})}else s?i=t.changeByRange(c=>{let A=o.line(r++);return{changes:{from:c.from,to:c.to,insert:A.text},range:Sn.cursor(c.from+A.length)}}):i=t.replaceSelection(o);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}op.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};pm.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);op.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};op.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};pm.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let i of n.state.facet(zie))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=_6e(n,e)),t){let i=!n.hasFocus;n.inputState.startMouseSelection(new f6e(n,e,t,i)),i&&n.observer.ignore(()=>{vie(n.contentDOM);let o=n.root.activeElement;o&&!o.contains(n.contentDOM)&&o.blur()});let r=n.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}else n.inputState.setSelectionOrigin("select.pointer");return!1};function ZG(n,e,t,i){if(i==1)return Sn.cursor(e,t);if(i==2)return VEe(n.state,e,t);{let r=Tu.find(n.docView,e),o=n.state.doc.lineAt(r?r.posAtEnd:e),s=r?r.posAtStart:o.from,a=r?r.posAtEnd:o.to;return a<n.state.doc.length&&a==o.to&&a++,Sn.range(s,a)}}let XG=(n,e,t)=>e>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function b6e(n,e,t,i){let r=Tu.find(n.docView,e);if(!r)return 1;let o=e-r.posAtStart;if(o==0)return 1;if(o==r.length)return-1;let s=r.coordsAt(o,-1);if(s&&XG(t,i,s))return-1;let a=r.coordsAt(o,1);return a&&XG(t,i,a)?1:s&&s.bottom>=i?-1:1}function JG(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:b6e(n,t,e.clientX,e.clientY)}}const C6e=Ii.ie&&Ii.ie_version<=11;let eW=null,tW=0,nW=0;function sre(n){if(!C6e)return n.detail;let e=eW,t=nW;return eW=n,nW=Date.now(),tW=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(tW+1)%3:1}function _6e(n,e){let t=JG(n,e),i=sre(e),r=n.state.selection;return{update(o){o.docChanged&&(t.pos=o.changes.mapPos(t.pos),r=r.map(o.changes))},get(o,s,a){let c=JG(n,o),A,m=ZG(n,c.pos,c.bias,i);if(t.pos!=c.pos&&!s){let v=ZG(n,t.pos,t.bias,i),x=Math.min(v.from,m.from),_=Math.max(v.to,m.to);m=x<m.from?Sn.range(x,_):Sn.range(_,x)}return s?r.replaceRange(r.main.extend(m.from,m.to)):a&&i==1&&r.ranges.length>1&&(A=x6e(r,c.pos))?A:a?r.addRange(m):Sn.create([m])}}}function x6e(n,e){for(let t=0;t<n.ranges.length;t++){let{from:i,to:r}=n.ranges[t];if(i<=e&&r>=e)return Sn.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}pm.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let r=n.docView.nearest(e.target);if(r&&r.isWidget){let o=r.posAtStart,s=o+r.length;(o>=t.to||s<=t.from)&&(t=Sn.range(o,s))}}let{inputState:i}=n;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",d6(n.state,bK,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};pm.dragend=n=>(n.inputState.draggedContent=null,!1);function iW(n,e,t,i){if(t=d6(n.state,vK,t),!t)return;let r=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=n.inputState,s=i&&o&&m6e(n,e)?{from:o.from,to:o.to}:null,a={from:r,insert:t},c=n.state.changes(s?[s,a]:a);n.focus(),n.dispatch({changes:c,selection:{anchor:c.mapPos(r,-1),head:c.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"}),n.inputState.draggedContent=null}pm.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let i=Array(t.length),r=0,o=()=>{++r==t.length&&iW(n,e,i.filter(s=>s!=null).join(n.state.lineBreak),!1)};for(let s=0;s<t.length;s++){let a=new FileReader;a.onerror=o,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(i[s]=a.result),o()},a.readAsText(t[s])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return iW(n,e,i,!0),!0}return!1};pm.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=rre?null:e.clipboardData;return t?(ore(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(v6e(n),!1)};function M6e(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function w6e(n){let e=[],t=[],i=!1;for(let r of n.selection.ranges)r.empty||(e.push(n.sliceDoc(r.from,r.to)),t.push(r));if(!e.length){let r=-1;for(let{from:o}of n.selection.ranges){let s=n.doc.lineAt(o);s.number>r&&(e.push(s.text),t.push({from:s.from,to:Math.min(n.doc.length,s.to+1)})),r=s.number}i=!0}return{text:d6(n,bK,e.join(n.lineBreak)),ranges:t,linewise:i}}let rD=null;pm.copy=pm.cut=(n,e)=>{let{text:t,ranges:i,linewise:r}=w6e(n.state);if(!t&&!r)return!1;rD=r?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let o=rre?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",t),!0):(M6e(n,t),!1)};const are=l1.define();function lre(n,e){let t=[];for(let i of n.facet(Gie)){let r=i(n,e);r&&t.push(r)}return t.length?n.update({effects:t,annotations:are.of(!0)}):null}function ure(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=lre(n.state,e);t?n.dispatch(t):n.update([])}},10)}op.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),ure(n)};op.blur=n=>{n.observer.clearSelectionRange(),ure(n)};op.compositionstart=op.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};op.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Ii.chrome&&Ii.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};op.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};pm.beforeinput=(n,e)=>{var t,i;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let o=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),s=e.getTargetRanges();if(o&&s.length){let a=s[0],c=n.posAtDOM(a.startContainer,a.startOffset),A=n.posAtDOM(a.endContainer,a.endOffset);return xK(n,{from:c,to:A,insert:n.state.toText(o)},null),!0}}let r;if(Ii.chrome&&Ii.android&&(r=nre.find(o=>o.inputType==e.inputType))&&(n.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let o=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>o+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Ii.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Ii.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>op.compositionend(n,e),20),!1};const rW=new Set;function S6e(n){rW.has(n)||(rW.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const oW=["pre-wrap","normal","pre-line","break-spaces"];let fx=!1;function sW(){fx=!1}class E6e{constructor(e){this.lineWrapping=e,this.doc=vs.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return oW.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i<e.length;i++){let r=e[i];r<0?i++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,i,r,o,s){let a=oW.indexOf(e)>-1,c=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=i,this.textHeight=r,this.lineLength=o,c){this.heightSamples={};for(let A=0;A<s.length;A++){let m=s[A];m<0?A++:this.heightSamples[Math.floor(m*10)]=!0}}return c}}class O6e{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class bg{constructor(e,t,i,r,o){this.from=e,this.length=t,this.top=i,this.height=r,this._content=o}get type(){return typeof this._content=="number"?uh.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Hy?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new bg(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Va=(function(n){return n[n.ByPos=0]="ByPos",n[n.ByHeight=1]="ByHeight",n[n.ByPosNoHeight=2]="ByPosNoHeight",n})(Va||(Va={}));const sw=.001;class ch{constructor(e,t,i=2){this.length=e,this.height=t,this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>sw&&(fx=!0),this.height=e)}replace(e,t,i){return ch.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,r){let o=this,s=i.doc;for(let a=r.length-1;a>=0;a--){let{fromA:c,toA:A,fromB:m,toB:v}=r[a],x=o.lineAt(c,Va.ByPosNoHeight,i.setDoc(t),0,0),_=x.to>=A?x:o.lineAt(A,Va.ByPosNoHeight,i,0,0);for(v+=_.to-A,A=_.to;a>0&&x.from<=r[a-1].toA;)c=r[a-1].fromA,m=r[a-1].fromB,a--,c<x.from&&(x=o.lineAt(c,Va.ByPosNoHeight,i,0,0));m+=x.from-c,c=x.from;let O=MK.build(i.setDoc(s),e,m,v);o=_S(o,o.replace(c,A,O))}return o.updateHeight(i,0)}static empty(){return new $d(0,0)}static of(e){if(e.length==1)return e[0];let t=0,i=e.length,r=0,o=0;for(;;)if(t==i)if(r>o*2){let a=e[t-1];a.break?e.splice(--t,1,a.left,null,a.right):e.splice(--t,1,a.left,a.right),i+=1+a.break,r-=a.size}else if(o>r*2){let a=e[i];a.break?e.splice(i,1,a.left,null,a.right):e.splice(i,1,a.left,a.right),i+=2+a.break,o-=a.size}else break;else if(r<o){let a=e[t++];a&&(r+=a.size)}else{let a=e[--i];a&&(o+=a.size)}let s=0;return e[t-1]==null?(s=1,t--):e[t]==null&&(s=1,i++),new B6e(ch.of(e.slice(0,t)),s,ch.of(e.slice(i)))}}function _S(n,e){return n==e?n:(n.constructor!=e.constructor&&(fx=!0),e)}ch.prototype.size=1;class cre extends ch{constructor(e,t,i){super(e,t),this.deco=i}blockAt(e,t,i,r){return new bg(r,this.length,i,this.height,this.deco||0)}lineAt(e,t,i,r,o){return this.blockAt(0,i,r,o)}forEachLine(e,t,i,r,o,s){e<=o+this.length&&t>=o&&s(this.blockAt(0,i,r,o))}updateHeight(e,t=0,i=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class $d extends cre{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,r){return new bg(r,this.length,i,this.height,this.breaks)}replace(e,t,i){let r=i[0];return i.length==1&&(r instanceof $d||r instanceof sA&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof sA?r=new $d(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):ch.of(i)}updateHeight(e,t=0,i=!1,r){return r&&r.from<=t&&r.more?this.setHeight(r.heights[r.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class sA extends ch{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,o=r-i+1,s,a=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*o);s=c/o,this.length>o+1&&(a=(this.height-c)/(this.length-o-1))}else s=this.height/o;return{firstLine:i,lastLine:r,perLine:s,perChar:a}}blockAt(e,t,i,r){let{firstLine:o,lastLine:s,perLine:a,perChar:c}=this.heightMetrics(t,r);if(t.lineWrapping){let A=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),m=t.doc.lineAt(A),v=a+m.length*c,x=Math.max(i,e-v/2);return new bg(m.from,m.length,x,v,0)}else{let A=Math.max(0,Math.min(s-o,Math.floor((e-i)/a))),{from:m,length:v}=t.doc.line(o+A);return new bg(m,v,i+a*A,a,0)}}lineAt(e,t,i,r,o){if(t==Va.ByHeight)return this.blockAt(e,i,r,o);if(t==Va.ByPosNoHeight){let{from:_,to:O}=i.doc.lineAt(e);return new bg(_,O-_,0,0,0)}let{firstLine:s,perLine:a,perChar:c}=this.heightMetrics(i,o),A=i.doc.lineAt(e),m=a+A.length*c,v=A.number-s,x=r+a*v+c*(A.from-o-v);return new bg(A.from,A.length,Math.max(r,Math.min(x,r+this.height-m)),m,0)}forEachLine(e,t,i,r,o,s){e=Math.max(e,o),t=Math.min(t,o+this.length);let{firstLine:a,perLine:c,perChar:A}=this.heightMetrics(i,o);for(let m=e,v=r;m<=t;){let x=i.doc.lineAt(m);if(m==e){let O=x.number-a;v+=c*O+A*(e-o-O)}let _=c+A*x.length;s(new bg(x.from,x.length,v,_,0)),v+=_,m=x.to+1}}replace(e,t,i){let r=this.length-t;if(r>0){let o=i[i.length-1];o instanceof sA?i[i.length-1]=new sA(o.length+r):i.push(null,new sA(r-1))}if(e>0){let o=i[0];o instanceof sA?i[0]=new sA(e+o.length):i.unshift(new sA(e-1),null)}return ch.of(i)}decomposeLeft(e,t){t.push(new sA(e-1),null)}decomposeRight(e,t){t.push(null,new sA(this.length-e-1))}updateHeight(e,t=0,i=!1,r){let o=t+this.length;if(r&&r.from<=t+this.length&&r.more){let s=[],a=Math.max(t,r.from),c=-1;for(r.from>t&&s.push(new sA(r.from-t-1).updateHeight(e,t));a<=o&&r.more;){let m=e.doc.lineAt(a).length;s.length&&s.push(null);let v=r.heights[r.index++];c==-1?c=v:Math.abs(v-c)>=sw&&(c=-2);let x=new $d(m,v);x.outdated=!1,s.push(x),a+=m+1}a<=o&&s.push(null,new sA(o-a).updateHeight(e,a));let A=ch.of(s);return(c<0||Math.abs(A.height-this.height)>=sw||Math.abs(c-this.heightMetrics(e,t).perLine)>=sw)&&(fx=!0),_S(this,A)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class B6e extends ch{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,r){let o=i+this.left.height;return e<o?this.left.blockAt(e,t,i,r):this.right.blockAt(e,t,o,r+this.left.length+this.break)}lineAt(e,t,i,r,o){let s=r+this.left.height,a=o+this.left.length+this.break,c=t==Va.ByHeight?e<s:e<a,A=c?this.left.lineAt(e,t,i,r,o):this.right.lineAt(e,t,i,s,a);if(this.break||(c?A.to<a:A.from>a))return A;let m=t==Va.ByPosNoHeight?Va.ByPosNoHeight:Va.ByPos;return c?A.join(this.right.lineAt(a,m,i,s,a)):this.left.lineAt(a,m,i,r,o).join(A)}forEachLine(e,t,i,r,o,s){let a=r+this.left.height,c=o+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,t,i,r,o,s),t>=c&&this.right.forEachLine(e,t,i,a,c,s);else{let A=this.lineAt(c,Va.ByPos,i,r,o);e<A.from&&this.left.forEachLine(e,A.from-1,i,r,o,s),A.to>=e&&A.from<=t&&s(A),t>A.to&&this.right.forEachLine(A.to+1,t,i,a,c,s)}}replace(e,t,i){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,i));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let a of i)o.push(a);if(e>0&&aW(o,s-1),t<this.length){let a=o.length;this.decomposeRight(t,o),aW(o,a)}return ch.of(o)}decomposeLeft(e,t){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(i++,e>=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<i&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ch.of(this.break?[e,null,t]:[e,t]):(this.left=_S(this.left,e),this.right=_S(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,r){let{left:o,right:s}=this,a=t+o.length+this.break,c=null;return r&&r.from<=t+o.length&&r.more?c=o=o.updateHeight(e,t,i,r):o.updateHeight(e,t,i),r&&r.from<=a+s.length&&r.more?c=s=s.updateHeight(e,a,i,r):s.updateHeight(e,a,i),c?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function aW(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof sA&&(i=n[e+1])instanceof sA&&n.splice(e-1,3,new sA(t.length+1+i.length))}const I6e=5;class MK{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof $d?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new $d(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e<t||i.heightRelevant){let r=i.widget?i.widget.estimatedHeight:0,o=i.widget?i.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let s=t-e;i.block?this.addBlock(new cre(s,r,i)):(s||o||r>=I6e)&&this.addLineDeco(r,o,s)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new $d(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new sA(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof $d)return e;let t=new $d(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof $d)&&!this.isCovered?this.nodes.push(new $d(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=e;for(let r of this.nodes)r instanceof $d&&r.updateHeight(this.oracle,i),i+=r?r.length:1;return this.nodes}static build(e,t,i,r){let o=new MK(i,e);return Xo.spans(t,i,r,o,0),o.finish(i)}}function k6e(n,e,t){let i=new T6e;return Xo.compare(n,e,t,i,0),i.changes}class T6e{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,i,r){(e<t||i&&i.heightRelevant||r&&r.heightRelevant)&&rw(e,t,this.changes,5)}}function R6e(n,e){let t=n.getBoundingClientRect(),i=n.ownerDocument,r=i.defaultView||window,o=Math.max(0,t.left),s=Math.min(r.innerWidth,t.right),a=Math.max(0,t.top),c=Math.min(r.innerHeight,t.bottom);for(let A=n.parentNode;A&&A!=i.body;)if(A.nodeType==1){let m=A,v=window.getComputedStyle(m);if((m.scrollHeight>m.clientHeight||m.scrollWidth>m.clientWidth)&&v.overflow!="visible"){let x=m.getBoundingClientRect();o=Math.max(o,x.left),s=Math.min(s,x.right),a=Math.max(a,x.top),c=Math.min(A==n.parentNode?r.innerHeight:c,x.bottom)}A=v.position=="absolute"||v.position=="fixed"?m.offsetParent:m.parentNode}else if(A.nodeType==11)A=A.host;else break;return{left:o-t.left,right:Math.max(o,s)-t.left,top:a-(t.top+e),bottom:Math.max(a,c)-(t.top+e)}}function D6e(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function P6e(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class s8{constructor(e,t,i,r){this.from=e,this.to=t,this.size=i,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++){let r=e[i],o=t[i];if(r.from!=o.from||r.to!=o.to||r.size!=o.size)return!1}return!0}draw(e,t){return Er.replace({widget:new U6e(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class U6e extends iv{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class lW{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=uW,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Za.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(CK).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new E6e(t),this.stateDeco=e.facet(u4).filter(i=>typeof i!="function"),this.heightMap=ch.empty().applyChanges(this.stateDeco,vs.empty,this.heightOracle.setDoc(e.doc),[new np(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Er.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let r=i?t.head:t.anchor;if(!e.some(({from:o,to:s})=>r>=o&&r<=s)){let{from:o,to:s}=this.lineBlockAt(r);e.push(new m5(o,s))}}return this.viewports=e.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?uW:new wK(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(F2(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(u4).filter(m=>typeof m!="function");let r=e.changedRanges,o=np.extendWithRanges(r,k6e(i,this.stateDeco,e?e.changes:rc.empty(this.state.doc.length))),s=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);sW(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=s||fx)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=s);let c=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let A=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(A||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Qie)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Za.RTL:Za.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),a=t.getBoundingClientRect(),c=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let A=0,m=0;if(a.width&&a.height){let{scaleX:H,scaleY:G}=yie(t,a);(H>.005&&Math.abs(this.scaleX-H)>.005||G>.005&&Math.abs(this.scaleY-G)>.005)&&(this.scaleX=H,this.scaleY=G,A|=16,s=c=!0)}let v=(parseInt(i.paddingTop)||0)*this.scaleY,x=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=v||this.paddingBottom!=x)&&(this.paddingTop=v,this.paddingBottom=x,A|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,A|=16);let _=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=_&&(this.scrollAnchorHeight=-1,this.scrollTop=_),this.scrolledToBottom=Cie(e.scrollDOM);let O=(this.printing?P6e:R6e)(t,this.paddingTop),P=O.top-this.pixelViewport.top,F=O.bottom-this.pixelViewport.bottom;this.pixelViewport=O;let j=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(j!=this.inView&&(this.inView=j,j&&(c=!0)),!this.inView&&!this.scrollTarget&&!D6e(e.dom))return 0;let Q=a.width;if((this.contentDOMWidth!=Q||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,A|=16),c){let H=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(H)&&(s=!0),s||r.lineWrapping&&Math.abs(Q-this.contentDOMWidth)>r.charWidth){let{lineHeight:G,charWidth:Y,textHeight:z}=e.docView.measureTextSize();s=G>0&&r.refresh(o,G,Y,z,Math.max(5,Q/Y),H),s&&(e.docView.minWidth=0,A|=16)}P>0&&F>0?m=Math.max(P,F):P<0&&F<0&&(m=Math.min(P,F)),sW();for(let G of this.viewports){let Y=G.from==this.viewport.from?H:e.docView.measureVisibleLineHeights(G);this.heightMap=(s?ch.empty().applyChanges(this.stateDeco,vs.empty,this.heightOracle,[new np(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new O6e(G.from,Y))}fx&&(A|=2)}let V=!this.viewportIsAppropriate(this.viewport,m)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return V&&(A&2&&(A|=this.updateScaler()),this.viewport=this.getViewport(m,this.scrollTarget),A|=this.updateForViewport()),(A&2||V)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),A|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),A}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,c=new m5(r.lineAt(s-i*1e3,Va.ByHeight,o,0,0).from,r.lineAt(a+(1-i)*1e3,Va.ByHeight,o,0,0).to);if(t){let{head:A}=t.range;if(A<c.from||A>c.to){let m=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),v=r.lineAt(A,Va.ByPos,o,0,0),x;t.y=="center"?x=(v.top+v.bottom)/2-m/2:t.y=="start"||t.y=="nearest"&&A<c.from?x=v.top:x=v.bottom-m,c=new m5(r.lineAt(x-1e3/2,Va.ByHeight,o,0,0).from,r.lineAt(x+m+1e3/2,Va.ByHeight,o,0,0).to)}}return c}mapViewport(e,t){let i=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new m5(this.heightMap.lineAt(i,Va.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Va.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},i=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,Va.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(t,Va.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:a}=this;return(e==0||r<=s-Math.max(10,Math.min(-i,250)))&&(t==this.state.doc.length||o>=a+Math.max(10,Math.min(i,250)))&&r>s-2*1e3&&o<a+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let i=[];for(let r of e)t.touchesRange(r.from,r.to)||i.push(new s8(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return i}ensureLineGaps(e,t){let i=this.heightOracle.lineWrapping,r=i?1e4:2e3,o=r>>1,s=r<<1;if(this.defaultTextDirection!=Za.LTR&&!i)return[];let a=[],c=(m,v,x,_)=>{if(v-m<o)return;let O=this.state.selection.main,P=[O.from];O.empty||P.push(O.to);for(let j of P)if(j>m&&j<v){c(m,j-10,x,_),c(j+10,v,x,_);return}let F=L6e(e,j=>j.from>=x.from&&j.to<=x.to&&Math.abs(j.from-m)<o&&Math.abs(j.to-v)<o&&!P.some(Q=>j.from<Q&&j.to>Q));if(!F){if(v<x.to&&t&&i&&t.visibleRanges.some(V=>V.from<=v&&V.to>=v)){let V=t.moveToLineBoundary(Sn.cursor(v),!1,!0).head;V>m&&(v=V)}let j=this.gapSize(x,m,v,_),Q=i||j<2e6?j:2e6;F=new s8(m,v,j,Q)}a.push(F)},A=m=>{if(m.length<s||m.type!=uh.Text)return;let v=K6e(m.from,m.to,this.stateDeco);if(v.total<s)return;let x=this.scrollTarget?this.scrollTarget.range.head:null,_,O;if(i){let P=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,F,j;if(x!=null){let Q=y5(v,x),V=((this.visibleBottom-this.visibleTop)/2+P)/m.height;F=Q-V,j=Q+V}else F=(this.visibleTop-m.top-P)/m.height,j=(this.visibleBottom-m.top+P)/m.height;_=g5(v,F),O=g5(v,j)}else{let P=v.total*this.heightOracle.charWidth,F=r*this.heightOracle.charWidth,j=0;if(P>2e6)for(let Y of e)Y.from>=m.from&&Y.from<m.to&&Y.size!=Y.displaySize&&Y.from*this.heightOracle.charWidth+j<this.pixelViewport.left&&(j=Y.size-Y.displaySize);let Q=this.pixelViewport.left+j,V=this.pixelViewport.right+j,H,G;if(x!=null){let Y=y5(v,x),z=((V-Q)/2+F)/P;H=Y-z,G=Y+z}else H=(Q-F)/P,G=(V+F)/P;_=g5(v,H),O=g5(v,G)}_>m.from&&c(m.from,_,m,v),O<m.to&&c(O,m.to,m,v)};for(let m of this.viewportLines)Array.isArray(m.type)?m.type.forEach(A):A(m);return a}gapSize(e,t,i,r){let o=y5(r,i)-y5(r,t);return this.heightOracle.lineWrapping?e.height*o:r.total*this.heightOracle.charWidth*o}updateLineGaps(e){s8.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Er.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let i=[];Xo.spans(t,this.viewport.from,this.viewport.to,{span(o,s){i.push({from:o,to:s})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let o=0;o<i.length&&!(r&8);o++){let s=this.visibleRanges[o],a=i[o];(s.from!=a.from||s.to!=a.to)&&(r|=4,e&&e.mapPos(s.from,-1)==a.from&&e.mapPos(s.to,1)==a.to||(r|=8))}return this.visibleRanges=i,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||F2(this.heightMap.lineAt(e,Va.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||F2(this.heightMap.lineAt(this.scaler.fromDOM(e),Va.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return F2(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class m5{constructor(e,t){this.from=e,this.to=t}}function K6e(n,e,t){let i=[],r=n,o=0;return Xo.spans(t,n,e,{span(){},point(s,a){s>r&&(i.push({from:r,to:s}),o+=s-r),r=a}},20),r<e&&(i.push({from:r,to:e}),o+=e-r),{total:o,ranges:i}}function g5({total:n,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let r=0;;r++){let{from:o,to:s}=e[r],a=s-o;if(i<=a)return o+i;i-=a}}function y5(n,e){let t=0;for(let{from:i,to:r}of n.ranges){if(e<=r){t+=e-i;break}t+=r-i}return t/n.total}function L6e(n,e){for(let t of n)if(e(t))return t}const uW={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class wK{constructor(e,t,i){let r=0,o=0,s=0;this.viewports=i.map(({from:a,to:c})=>{let A=t.lineAt(a,Va.ByPos,e,0,0).top,m=t.lineAt(c,Va.ByPos,e,0,0).bottom;return r+=m-A,{from:a,to:c,top:A,bottom:m,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let a of this.viewports)a.domTop=s+(a.top-o)*this.scale,s=a.domBottom=a.domTop+(a.bottom-a.top),o=a.bottom}toDOM(e){for(let t=0,i=0,r=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.top)return r+(e-i)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);i=o.bottom,r=o.domBottom}}fromDOM(e){for(let t=0,i=0,r=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.domTop)return i+(e-r)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);i=o.bottom,r=o.domBottom}}eq(e){return e instanceof wK?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,i)=>t.from==e.viewports[i].from&&t.to==e.viewports[i].to):!1}}function F2(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),i=e.toDOM(n.bottom);return new bg(n.from,n.length,t,i-t,Array.isArray(n._content)?n._content.map(r=>F2(r,e)):n._content)}const v5=ki.define({combine:n=>n.join(" ")}),oD=ki.define({combine:n=>n.indexOf(!0)>-1}),sD=$y.newName(),Are=$y.newName(),hre=$y.newName(),dre={"&light":"."+Are,"&dark":"."+hre};function aD(n,e,t){return new $y(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return n;if(!t||!t[r])throw new RangeError(`Unsupported selector: ${r}`);return t[r]}):n+" "+i}})}const F6e=aD("."+sD,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},dre),z6e={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},a8=Ii.ie&&Ii.ie_version<=11;class j6e{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new _Ee,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(Ii.ie&&Ii.ie_version<=11||Ii.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Ii.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Ii.chrome&&Ii.chrome_version<126)&&(this.editContext=new G6e(e),e.state.facet(N0)&&(e.contentDOM.editContext=this.editContext.editContext)),a8&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(N0)?i.root.activeElement!=this.dom:!iw(this.dom,r))return;let o=r.anchorNode&&i.docView.nearest(r.anchorNode);if(o&&o.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Ii.ie&&Ii.ie_version<=11||Ii.android&&Ii.chrome)&&!i.state.selection.main.empty&&r.focusNode&&m3(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=a4(e.root);if(!t)return!1;let i=Ii.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&N6e(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let r=iw(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&MEe(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let i=this.dom;i;)if(i.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);for(let i of this.scrollTargets=t)i.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,z6e),a8&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),a8&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var i;if(!this.delayedAndroidKey){let r=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&j_(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((i=this.delayedAndroidKey)===null||i===void 0)&&i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,r=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(r=!0),t==-1?{from:t,to:i}=s:(t=Math.min(s.from,t),i=Math.max(s.to,i)))}return{from:t,to:i,typeOver:r}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),r=this.selectionChanged&&iw(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new o6e(this.view,e,t,i);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let i=this.view.state,r=tre(this.view,t);return this.view.state==i&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let i=cW(t,e.previousSibling||e.target.previousSibling,-1),r=cW(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(N0)!=e.state.facet(N0)&&(e.view.contentDOM.editContext=e.state.facet(N0)?this.editContext.editContext:null))}destroy(){var e,t,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function cW(n,e,t){for(;e;){let i=Sa.get(e);if(i&&i.parent==n)return i;let r=e.parentNode;e=r!=n.dom?r:t>0?e.nextSibling:e.previousSibling}return null}function AW(n,e){let t=e.startContainer,i=e.startOffset,r=e.endContainer,o=e.endOffset,s=n.docView.domAtPos(n.state.selection.main.anchor);return m3(s.node,s.offset,r,o)&&([t,i,r,o]=[r,o,t,i]),{anchorNode:t,anchorOffset:i,focusNode:r,focusOffset:o}}function N6e(n,e){if(e.getComposedRanges){let r=e.getComposedRanges(n.root)[0];if(r)return AW(n,r)}let t=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),t=r.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",i,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",i,!0),t?AW(n,t):null}class G6e{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let r=e.state.selection.main,{anchor:o,head:s}=r,a=this.toEditorPos(i.updateRangeStart),c=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:a,drifted:!1});let A={from:a,to:c,insert:vs.of(i.text.split(`
`))};if(A.from==this.from&&o<this.from?A.from=o:A.to==this.to&&o>this.to&&(A.to=o),A.from==A.to&&!A.insert.length){let m=Sn.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));m.main.eq(r)||e.dispatch({selection:m,userEvent:"select"});return}if((Ii.mac||Ii.android)&&A.from==s-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(A={from:a,to:c,insert:vs.of([i.text.replace("."," ")])}),this.pendingContextChange=A,!e.state.readOnly){let m=this.to-this.from+(A.to-A.from+A.insert.length);xK(e,A,Sn.single(this.toEditorPos(i.selectionStart,m),this.toEditorPos(i.selectionEnd,m)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=i=>{let r=[],o=null;for(let s=this.toEditorPos(i.rangeStart),a=this.toEditorPos(i.rangeEnd);s<a;s++){let c=e.coordsForChar(s);o=c&&new DOMRect(c.left,c.top,c.right-c.left,c.bottom-c.top)||o||new DOMRect,r.push(o)}t.updateCharacterBounds(i.rangeStart,r)},this.handlers.textformatupdate=i=>{let r=[];for(let o of i.getTextFormats()){let s=o.underlineStyle,a=o.underlineThickness;if(s!="None"&&a!="None"){let c=this.toEditorPos(o.rangeStart),A=this.toEditorPos(o.rangeEnd);if(c<A){let m=`text-decoration: underline ${s=="Dashed"?"dashed ":s=="Squiggle"?"wavy ":""}${a=="Thin"?1:2}px`;r.push(Er.mark({attributes:{style:m}}).range(c,A))}}}e.dispatch({effects:Yie.of(Er.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let r=a4(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((o,s,a,c,A)=>{if(i)return;let m=A.length-(s-o);if(r&&s>=r.to)if(r.from==o&&r.to==s&&r.insert.eq(A)){r=this.pendingContextChange=null,t+=m,this.to+=m;return}else r=null,this.revertPending(e.state);if(o+=t,s+=t,s<=this.from)this.from+=m,this.to+=m;else if(o<this.to){if(o<this.from||s>this.to||this.to-this.from+A.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(s),A.toString()),this.to+=m}t+=m}),r&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class wi{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(r=>r.forEach(o=>i(o,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||xEe(e.parent)||document,this.viewState=new lW(e.state||ys.create(e)),e.scrollTo&&e.scrollTo.is(d5)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(__).map(r=>new i8(r));for(let r of this.plugins)r.update(this);this.observer=new j6e(this),this.inputState=new c6e(this),this.inputState.ensureHandlers(this.plugins),this.docView=new GG(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof sc?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,r,o=this.state;for(let x of e){if(x.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=x.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,a=0,c=null;e.some(x=>x.annotation(are))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,c=lre(o,s),c||(a=1));let A=this.observer.delayedAndroidKey,m=null;if(A?(this.observer.clearDelayedAndroidKey(),m=this.observer.readChange(),(m&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(m=null)):this.observer.clear(),o.facet(ys.phrases)!=this.state.facet(ys.phrases))return this.setState(o);r=CS.create(this,o,e),r.flags|=a;let v=this.viewState.scrollTarget;try{this.updateState=2;for(let x of e){if(v&&(v=v.map(x.changes)),x.scrollIntoView){let{main:_}=x.state.selection;v=new N_(_.empty?_:Sn.cursor(_.head,_.head>_.anchor?-1:1))}for(let _ of x.effects)_.is(d5)&&(v=_.value.clip(this.state))}this.viewState.update(r,v),this.bidiCache=xS.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(K2)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(x=>x.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(v5)!=r.state.facet(v5)&&(this.viewState.mustMeasureContent=!0),(t||i||v||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!r.empty)for(let x of this.state.facet(tD))try{x(r)}catch(_){lh(this.state,_,"update listener")}(c||m)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),m&&!tre(this,m)&&A.force&&j_(this.contentDOM,A.key,A.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new lW(e),this.plugins=e.facet(__).map(i=>new i8(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new GG(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(__),i=e.state.facet(__);if(t!=i){let r=[];for(let o of i){let s=t.indexOf(o);if(s<0)r.push(new i8(o));else{let a=this.plugins[s];a.mustUpdate=e,r.push(a)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r<this.plugins.length;r++)this.plugins[r].update(this);t!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(i){lh(this.state,i,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(s<0)if(Cie(i))o=-1,s=this.viewState.heightMap.height;else{let _=this.viewState.scrollAnchorAt(r);o=_.from,s=_.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let A=[];c&4||([this.measureRequests,A]=[A,this.measureRequests]);let m=A.map(_=>{try{return _.read(this)}catch(O){return lh(this.state,O),hW}}),v=CS.create(this,this.state,[]),x=!1;v.flags|=c,t?t.flags|=c:t=v,this.updateState=2,v.empty||(this.updatePlugins(v),this.inputState.update(v),this.updateAttrs(),x=this.docView.update(v),x&&this.docViewUpdate());for(let _=0;_<A.length;_++)if(m[_]!=hW)try{let O=A[_];O.write&&O.write(m[_],this)}catch(O){lh(this.state,O)}if(x&&this.docView.updateSelection(!0),!v.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let O=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-s;if(O>1||O<-1){r=r+O,i.scrollTop=r/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let a of this.state.facet(tD))a(t)}get themeClasses(){return sD+" "+(this.state.facet(oD)?hre:Are)+" "+this.state.facet(v5)}updateAttrs(){let e=dW(this,$ie,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(N0)?"true":"false",class:"cm-content",style:`${Ii.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),dW(this,CK,t);let i=this.observer.ignore(()=>{let r=HR(this.contentDOM,this.contentAttrs,t),o=HR(this.dom,this.editorAttrs,e);return r||o});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let r of i.effects)if(r.is(wi.announce)){t&&(this.announceDOM.textContent=""),t=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(K2);let e=this.state.facet(wi.cspNonce);$y.mount(this.root,this.styleModules.concat(F6e).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(i=>i.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return o8(this,e,$G(this,e,t,i))}moveByGroup(e,t){return o8(this,e,$G(this,e,t,i=>t6e(this,e.head,i)))}visualLineSide(e,t){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),o=i[t?i.length-1:0];return Sn.cursor(o.side(t,r)+e.from,o.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,i=!0){return e6e(this,e,t,i)}moveVertically(e,t,i){return o8(this,e,n6e(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Jie(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),o=this.bidiSpans(r),s=o[Py.find(o,e-r.from,-1,t)];return c6(i,s.dir==Za.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Wie)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>W6e)return Uie(e.length);let t=this.textDirectionAt(e.from),i;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==t&&(o.fresh||Pie(o.isolates,i=NG(this,e))))return o.order;i||(i=NG(this,e));let r=LEe(e.text,t,i);return this.bidiCache.push(new xS(e.from,e.to,t,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Ii.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{vie(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return d5.of(new N_(typeof e=="number"?Sn.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return d5.of(new N_(Sn.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return lu.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return lu.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=$y.newName(),r=[v5.of(i),K2.of(aD(`.${i}`,e))];return t&&t.dark&&r.push(oD.of(!0)),r}static baseTheme(e){return Qb.lowest(K2.of(aD("."+sD,e,dre)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),r=i&&Sa.get(i)||Sa.get(e);return((t=r?.rootView)===null||t===void 0?void 0:t.view)||null}}wi.styleModule=K2;wi.inputHandler=Nie;wi.clipboardInputFilter=vK;wi.clipboardOutputFilter=bK;wi.scrollHandler=qie;wi.focusChangeEffect=Gie;wi.perLineTextDirection=Wie;wi.exceptionSink=jie;wi.updateListener=tD;wi.editable=N0;wi.mouseSelectionStyle=zie;wi.dragMovesSelection=Fie;wi.clickAddsSelectionRange=Lie;wi.decorations=u4;wi.outerDecorations=Vie;wi.atomicRanges=h6;wi.bidiIsolatedRanges=Hie;wi.scrollMargins=Zie;wi.darkTheme=oD;wi.cspNonce=ki.define({combine:n=>n.length?n[0]:""});wi.contentAttributes=CK;wi.editorAttributes=$ie;wi.lineWrapping=wi.contentAttributes.of({class:"cm-lineWrapping"});wi.announce=ao.define();const W6e=4096,hW={};class xS{constructor(e,t,i,r,o,s){this.from=e,this.to=t,this.dir=i,this.isolates=r,this.fresh=o,this.order=s}static update(e,t){if(t.empty&&!e.some(o=>o.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:Za.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let s=e[o];s.dir==r&&!t.touchesRange(s.from,s.to)&&i.push(new xS(t.mapPos(s.from,1),t.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return i}}function dW(n,e,t){for(let i=n.state.facet(e),r=i.length-1;r>=0;r--){let o=i[r],s=typeof o=="function"?o(n):o;s&&VR(s,t)}return t}const Q6e=Ii.mac?"mac":Ii.windows?"win":Ii.linux?"linux":"key";function q6e(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let r,o,s,a;for(let c=0;c<t.length-1;++c){const A=t[c];if(/^(cmd|meta|m)$/i.test(A))a=!0;else if(/^a(lt)?$/i.test(A))r=!0;else if(/^(c|ctrl|control)$/i.test(A))o=!0;else if(/^s(hift)?$/i.test(A))s=!0;else if(/^mod$/i.test(A))e=="mac"?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+A)}return r&&(i="Alt-"+i),o&&(i="Ctrl-"+i),a&&(i="Meta-"+i),s&&(i="Shift-"+i),i}function b5(n,e,t){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t!==!1&&e.shiftKey&&(n="Shift-"+n),n}const Y6e=Qb.default(wi.domEventHandlers({keydown(n,e){return pre(fre(e.state),n,e,"editor")}})),SK=ki.define({enables:Y6e}),fW=new WeakMap;function fre(n){let e=n.facet(SK),t=fW.get(e);return t||fW.set(e,t=H6e(e.reduce((i,r)=>i.concat(r),[]))),t}function $6e(n,e,t){return pre(fre(n.state),e,n,t)}let xy=null;const V6e=4e3;function H6e(n,e=Q6e){let t=Object.create(null),i=Object.create(null),r=(s,a)=>{let c=i[s];if(c==null)i[s]=a;else if(c!=a)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,a,c,A,m)=>{var v,x;let _=t[s]||(t[s]=Object.create(null)),O=a.split(/ (?!$)/).map(j=>q6e(j,e));for(let j=1;j<O.length;j++){let Q=O.slice(0,j).join(" ");r(Q,!0),_[Q]||(_[Q]={preventDefault:!0,stopPropagation:!1,run:[V=>{let H=xy={view:V,prefix:Q,scope:s};return setTimeout(()=>{xy==H&&(xy=null)},V6e),!0}]})}let P=O.join(" ");r(P,!1);let F=_[P]||(_[P]={preventDefault:!1,stopPropagation:!1,run:((x=(v=_._any)===null||v===void 0?void 0:v.run)===null||x===void 0?void 0:x.slice())||[]});c&&F.run.push(c),A&&(F.preventDefault=!0),m&&(F.stopPropagation=!0)};for(let s of n){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let A of a){let m=t[A]||(t[A]=Object.create(null));m._any||(m._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:v}=s;for(let x in m)m[x].run.push(_=>v(_,lD))}let c=s[e]||s.key;if(c)for(let A of a)o(A,c,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(A,"Shift-"+c,s.shift,s.preventDefault,s.stopPropagation)}return t}let lD=null;function pre(n,e,t,i){lD=e;let r=yEe(e),o=Hh(r,0),s=vg(o)==r.length&&r!=" ",a="",c=!1,A=!1,m=!1;xy&&xy.view==t&&xy.scope==i&&(a=xy.prefix+" ",ire.indexOf(e.keyCode)<0&&(A=!0,xy=null));let v=new Set,x=F=>{if(F){for(let j of F.run)if(!v.has(j)&&(v.add(j),j(t)))return F.stopPropagation&&(m=!0),!0;F.preventDefault&&(F.stopPropagation&&(m=!0),A=!0)}return!1},_=n[i],O,P;return _&&(x(_[a+b5(r,e,!s)])?c=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Ii.windows&&e.ctrlKey&&e.altKey)&&!(Ii.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(O=Vy[e.keyCode])&&O!=r?(x(_[a+b5(O,e,!0)])||e.shiftKey&&(P=s4[e.keyCode])!=r&&P!=O&&x(_[a+b5(P,e,!1)]))&&(c=!0):s&&e.shiftKey&&x(_[a+b5(r,e,!0)])&&(c=!0),!c&&x(_._any)&&(c=!0)),A&&(c=!0),c&&m&&e.stopPropagation(),lD=null,c}class hM{constructor(e,t,i,r,o){this.className=e,this.left=t,this.top=i,this.width=r,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let o=mre(e);return[new hM(t,r.left-o.left,r.top-o.top,null,r.bottom-r.top)]}else return Z6e(e,t,i)}}function mre(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Za.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function pW(n,e,t,i){let r=n.coordsAtPos(e,t*2);if(!r)return i;let o=n.dom.getBoundingClientRect(),s=(r.top+r.bottom)/2,a=n.posAtCoords({x:o.left+1,y:s}),c=n.posAtCoords({x:o.right-1,y:s});return a==null||c==null?i:{from:Math.max(i.from,Math.min(a,c)),to:Math.min(i.to,Math.max(a,c))}}function Z6e(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),r=Math.min(t.to,n.viewport.to),o=n.textDirection==Za.LTR,s=n.contentDOM,a=s.getBoundingClientRect(),c=mre(n),A=s.querySelector(".cm-line"),m=A&&window.getComputedStyle(A),v=a.left+(m?parseInt(m.paddingLeft)+Math.min(0,parseInt(m.textIndent)):0),x=a.right-(m?parseInt(m.paddingRight):0),_=iD(n,i,1),O=iD(n,r,-1),P=_.type==uh.Text?_:null,F=O.type==uh.Text?O:null;if(P&&(n.lineWrapping||_.widgetLineBreaks)&&(P=pW(n,i,1,P)),F&&(n.lineWrapping||O.widgetLineBreaks)&&(F=pW(n,r,-1,F)),P&&F&&P.from==F.from&&P.to==F.to)return Q(V(t.from,t.to,P));{let G=P?V(t.from,null,P):H(_,!1),Y=F?V(null,t.to,F):H(O,!0),z=[];return(P||_).to<(F||O).from-(P&&F?1:0)||_.widgetLineBreaks>1&&G.bottom+n.defaultLineHeight/2<Y.top?z.push(j(v,G.bottom,x,Y.top)):G.bottom<Y.top&&n.elementAtHeight((G.bottom+Y.top)/2).type==uh.Text&&(G.bottom=Y.top=(G.bottom+Y.top)/2),Q(G).concat(z).concat(Q(Y))}function j(G,Y,z,se){return new hM(e,G-c.left,Y-c.top,z-G,se-Y)}function Q({top:G,bottom:Y,horizontal:z}){let se=[];for(let le=0;le<z.length;le+=2)se.push(j(z[le],G,z[le+1],Y));return se}function V(G,Y,z){let se=1e9,le=-1e9,me=[];function fe(ke,je,Ie,Qe,tt){let ht=n.coordsAtPos(ke,ke==z.to?-2:2),ce=n.coordsAtPos(Ie,Ie==z.from?2:-2);!ht||!ce||(se=Math.min(ht.top,ce.top,se),le=Math.max(ht.bottom,ce.bottom,le),tt==Za.LTR?me.push(o&&je?v:ht.left,o&&Qe?x:ce.right):me.push(!o&&Qe?v:ce.left,!o&&je?x:ht.right))}let _e=G??z.from,we=Y??z.to;for(let ke of n.visibleRanges)if(ke.to>_e&&ke.from<we)for(let je=Math.max(ke.from,_e),Ie=Math.min(ke.to,we);;){let Qe=n.state.doc.lineAt(je);for(let tt of n.bidiSpans(Qe)){let ht=tt.from+Qe.from,ce=tt.to+Qe.from;if(ht>=Ie)break;ce>je&&fe(Math.max(ht,je),G==null&&ht<=_e,Math.min(ce,Ie),Y==null&&ce>=we,tt.dir)}if(je=Qe.to+1,je>=Ie)break}return me.length==0&&fe(_e,G==null,we,Y==null,n.textDirection),{top:se,bottom:le,horizontal:me}}function H(G,Y){let z=a.top+(Y?G.top:G.bottom);return{top:z,bottom:z,horizontal:[]}}}function X6e(n,e){return n.constructor==e.constructor&&n.eq(e)}class J6e{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(aw)!=e.state.facet(aw)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(aw);for(;t<i.length&&i[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((t,i)=>!X6e(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[i].constructor&&r.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(r.draw(),t);for(;t;){let r=t.nextSibling;t.remove(),t=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const aw=ki.define();function gre(n){return[lu.define(e=>new J6e(e,n)),aw.of(n)]}const c4=ki.define({combine(n){return bm(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function eOe(n={}){return[c4.of(n),tOe,nOe,iOe,Qie.of(!0)]}function yre(n){return n.startState.facet(c4)!=n.state.facet(c4)}const tOe=gre({above:!0,markers(n){let{state:e}=n,t=e.facet(c4),i=[];for(let r of e.selection.ranges){let o=r==e.selection.main;if(r.empty||t.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=r.empty?r:Sn.cursor(r.head,r.head>r.anchor?-1:1);for(let c of hM.forRange(n,s,a))i.push(c)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=yre(n);return t&&mW(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){mW(e.state,n)},class:"cm-cursorLayer"});function mW(n,e){e.style.animationDuration=n.facet(c4).cursorBlinkRate+"ms"}const nOe=gre({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:hM.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||yre(n)},class:"cm-selectionLayer"}),iOe=Qb.highest(wi.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),vre=ao.define({map(n,e){return n==null?null:e.mapPos(n)}}),z2=ac.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(vre)?i.value:t,n)}}),rOe=lu.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(z2);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(z2)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(z2),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let i=n.scrollDOM.getBoundingClientRect();return{left:t.left-i.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-i.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(z2)!=n&&this.view.dispatch({effects:vre.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function oOe(){return[z2,rOe]}function gW(n,e,t,i,r){e.lastIndex=0;for(let o=n.iterRange(t,i),s=t,a;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;a=e.exec(o.value);)r(s+a.index,a)}function sOe(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:r,to:o}of t)r=Math.max(n.state.doc.lineAt(r).from,r-e),o=Math.min(n.state.doc.lineAt(o).to,o+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=o:i.push({from:r,to:o});return i}class aOe{constructor(e){const{regexp:t,decoration:i,decorate:r,boundary:o,maxLength:s=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(a,c,A,m)=>r(m,A,A+a[0].length,a,c);else if(typeof i=="function")this.addMatch=(a,c,A,m)=>{let v=i(a,c,A);v&&m(A,A+a[0].length,v)};else if(i)this.addMatch=(a,c,A,m)=>m(A,A+a[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let t=new t1,i=t.add.bind(t);for(let{from:r,to:o}of sOe(e,this.maxLength))gW(e.state.doc,this.regexp,r,o,(s,a)=>this.addMatch(a,e,s,i));return t.finish()}updateDeco(e,t){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((o,s,a,c)=>{c>=e.view.viewport.from&&a<=e.view.viewport.to&&(i=Math.min(a,i),r=Math.max(c,r))}),e.viewportMoved||r-i>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),i,r):t}updateRange(e,t,i,r){for(let o of e.visibleRanges){let s=Math.max(o.from,i),a=Math.min(o.to,r);if(a>=s){let c=e.state.doc.lineAt(s),A=c.to<a?e.state.doc.lineAt(a):c,m=Math.max(o.from,c.from),v=Math.min(o.to,A.to);if(this.boundary){for(;s>c.from;s--)if(this.boundary.test(c.text[s-1-c.from])){m=s;break}for(;a<A.to;a++)if(this.boundary.test(A.text[a-A.from])){v=a;break}}let x=[],_,O=(P,F,j)=>x.push(j.range(P,F));if(c==A)for(this.regexp.lastIndex=m-c.from;(_=this.regexp.exec(c.text))&&_.index<v-c.from;)this.addMatch(_,e,_.index+c.from,O);else gW(e.state.doc,this.regexp,m,v,(P,F)=>this.addMatch(F,e,P,O));t=t.update({filterFrom:m,filterTo:v,filter:(P,F)=>P<m||F>v,add:x})}}return t}}const uD=/x/.unicode!=null?"gu":"g",lOe=new RegExp(`[\0-\b
--Ÿ­؜\u2028\u2029\uFEFF-]`,uD),uOe={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let l8=null;function cOe(){var n;if(l8==null&&typeof document<"u"&&document.body){let e=document.body.style;l8=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return l8||!1}const lw=ki.define({combine(n){let e=bm(n,{render:null,specialChars:lOe,addSpecialChars:null});return(e.replaceTabs=!cOe())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,uD)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,uD)),e}});function AOe(n={}){return[lw.of(n),hOe()]}let yW=null;function hOe(){return yW||(yW=lu.fromClass(class{constructor(n){this.view=n,this.decorations=Er.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(lw)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new aOe({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:r}=t.state,o=Hh(e[0],0);if(o==9){let s=r.lineAt(i),a=t.state.tabSize,c=Ux(s.text,a,i-s.from);return Er.replace({widget:new mOe((a-c%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=Er.replace({widget:new pOe(n,o)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(lw);n.startState.facet(lw)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const dOe="•";function fOe(n){return n>=32?dOe:n==10?"␤":String.fromCharCode(9216+n)}class pOe extends iv{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=fOe(this.code),i=e.state.phrase("Control character")+" "+(uOe[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,t);if(r)return r;let o=document.createElement("span");return o.textContent=t,o.title=i,o.setAttribute("aria-label",i),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class mOe extends iv{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function gOe(){return vOe}const yOe=Er.line({class:"cm-activeLine"}),vOe=lu.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){let r=n.lineBlockAt(i.head);r.from>e&&(t.push(yOe.range(r.from)),e=r.from)}return Er.set(t)}},{decorations:n=>n.decorations}),cD=2e3;function bOe(n,e,t){let i=Math.min(e.line,t.line),r=Math.max(e.line,t.line),o=[];if(e.off>cD||t.off>cD||e.col<0||t.col<0){let s=Math.min(e.off,t.off),a=Math.max(e.off,t.off);for(let c=i;c<=r;c++){let A=n.doc.line(c);A.length<=a&&o.push(Sn.range(A.from+s,A.to+a))}}else{let s=Math.min(e.col,t.col),a=Math.max(e.col,t.col);for(let c=i;c<=r;c++){let A=n.doc.line(c),m=NR(A.text,s,n.tabSize,!0);if(m<0)o.push(Sn.cursor(A.to));else{let v=NR(A.text,a,n.tabSize);o.push(Sn.range(A.from+m,A.from+v))}}}return o}function COe(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function vW(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),r=t-i.from,o=r>cD?-1:r==i.length?COe(n,e.clientX):Ux(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:o,off:r}}function _Oe(n,e){let t=vW(n,e),i=n.state.selection;return t?{update(r){if(r.docChanged){let o=r.changes.mapPos(r.startState.doc.line(t.line).from),s=r.state.doc.lineAt(o);t={line:s.number,col:t.col,off:Math.min(t.off,s.length)},i=i.map(r.changes)}},get(r,o,s){let a=vW(n,r);if(!a)return i;let c=bOe(n.state,t,a);return c.length?s?Sn.create(c.concat(i.ranges)):Sn.create(c):i}}:null}function xOe(n){let e=(t=>t.altKey&&t.button==0);return wi.mouseSelectionStyle.of((t,i)=>e(i)?_Oe(t,i):null)}const MOe={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},wOe={style:"cursor: crosshair"};function SOe(n={}){let[e,t]=MOe[n.key||"Alt"],i=lu.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||t(r))},keyup(r){(r.keyCode==e||!t(r))&&this.set(!1)},mousemove(r){this.set(t(r))}}});return[i,wi.contentAttributes.of(r=>{var o;return!((o=r.plugin(i))===null||o===void 0)&&o.isDown?wOe:null})]}const d2="-10000px";class bre{constructor(e,t,i,r){this.facet=t,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(s=>s);let o=null;this.tooltipViews=this.tooltips.map(s=>o=i(s,o))}update(e,t){var i;let r=e.state.facet(this.facet),o=r.filter(c=>c);if(r===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let s=[],a=t?[]:null;for(let c=0;c<o.length;c++){let A=o[c],m=-1;if(A){for(let v=0;v<this.tooltips.length;v++){let x=this.tooltips[v];x&&x.create==A.create&&(m=v)}if(m<0)s[c]=this.createTooltipView(A,c?s[c-1]:null),a&&(a[c]=!!A.above);else{let v=s[c]=this.tooltipViews[m];a&&(a[c]=t[m]),v.update&&v.update(e)}}}for(let c of this.tooltipViews)s.indexOf(c)<0&&(this.removeTooltipView(c),(i=c.destroy)===null||i===void 0||i.call(c));return t&&(a.forEach((c,A)=>t[A]=c),t.length=a.length),this.input=r,this.tooltips=o,this.tooltipViews=s,!0}}function EOe(n){let e=n.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const u8=ki.define({combine:n=>{var e,t,i;return{position:Ii.ios?"absolute":((e=n.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(r=>r.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||EOe}}}),bW=new WeakMap,EK=lu.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(u8);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new bre(n,f6,(t,i)=>this.createTooltip(t,i),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet(u8);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),i=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",t.dom.appendChild(r)}return t.dom.style.position=this.position,t.dom.style.top=d2,t.dom.style.left="0px",this.container.insertBefore(t.dom,i),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(n=i.destroy)===null||n===void 0||n.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(Ii.gecko)t=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==d2&&o.style.left=="0px"){let s=o.getBoundingClientRect();t=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(t||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(n=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:n,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=_K(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((o,s)=>{let a=this.manager.tooltipViews[s];return a.getCoords?a.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(u8).tooltipSpace(this.view),scaleX:n,scaleY:e,makeAbsolute:t}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:t,space:i,scaleX:r,scaleY:o}=n,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let c=this.manager.tooltips[a],A=this.manager.tooltipViews[a],{dom:m}=A,v=n.pos[a],x=n.size[a];if(!v||c.clip!==!1&&(v.bottom<=Math.max(t.top,i.top)||v.top>=Math.min(t.bottom,i.bottom)||v.right<Math.max(t.left,i.left)-.1||v.left>Math.min(t.right,i.right)+.1)){m.style.top=d2;continue}let _=c.arrow?A.dom.querySelector(".cm-tooltip-arrow"):null,O=_?7:0,P=x.right-x.left,F=(e=bW.get(A))!==null&&e!==void 0?e:x.bottom-x.top,j=A.offset||BOe,Q=this.view.textDirection==Za.LTR,V=x.width>i.right-i.left?Q?i.left:i.right-x.width:Q?Math.max(i.left,Math.min(v.left-(_?14:0)+j.x,i.right-P)):Math.min(Math.max(i.left,v.left-P+(_?14:0)-j.x),i.right-P),H=this.above[a];!c.strictSide&&(H?v.top-F-O-j.y<i.top:v.bottom+F+O+j.y>i.bottom)&&H==i.bottom-v.bottom>v.top-i.top&&(H=this.above[a]=!H);let G=(H?v.top-i.top:i.bottom-v.bottom)-O;if(G<F&&A.resize!==!1){if(G<this.view.defaultLineHeight){m.style.top=d2;continue}bW.set(A,F),m.style.height=(F=G)/o+"px"}else m.style.height&&(m.style.height="");let Y=H?v.top-F-O-j.y:v.bottom+O+j.y,z=V+P;if(A.overlap!==!0)for(let se of s)se.left<z&&se.right>V&&se.top<Y+F&&se.bottom>Y&&(Y=H?se.top-F-2-O:se.bottom+O+2);if(this.position=="absolute"?(m.style.top=(Y-n.parent.top)/o+"px",CW(m,(V-n.parent.left)/r)):(m.style.top=Y/o+"px",CW(m,V/r)),_){let se=v.left+(Q?j.x:-j.x)-(V+14-7);_.style.left=se/r+"px"}A.overlap!==!0&&s.push({left:V,top:Y,right:z,bottom:Y+F}),m.classList.toggle("cm-tooltip-above",H),m.classList.toggle("cm-tooltip-below",!H),A.positioned&&A.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=d2}},{eventObservers:{scroll(){this.maybeMeasure()}}});function CW(n,e){let t=parseInt(n.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(n.style.left=e+"px")}const OOe=wi.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),BOe={x:0,y:0},f6=ki.define({enables:[EK,OOe]}),MS=ki.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class p6{static create(e){return new p6(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new bre(e,MS,(t,i)=>this.createHostedView(t,i),t=>t.dom.remove())}createHostedView(e,t){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(t===void 0)t=r;else if(t!==r)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const IOe=f6.compute([MS],n=>{let e=n.facet(MS);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var i;return(i=t.end)!==null&&i!==void 0?i:t.pos})),create:p6.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class kOe{constructor(e,t,i,r,o){this.view=e,this.source=t,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,i=e.docView.nearest(t.target);if(!i)return;let r,o=1;if(i instanceof Dy)r=i.posAtStart;else{if(r=e.posAtCoords(t),r==null)return;let a=e.coordsAtPos(r);if(!a||t.y<a.top||t.y>a.bottom||t.x<a.left-e.defaultCharacterWidth||t.x>a.right+e.defaultCharacterWidth)return;let c=e.bidiSpans(e.state.doc.lineAt(r)).find(m=>m.from<=r&&m.to>=r),A=c&&c.dir==Za.RTL?-1:1;o=t.x<a.left?-A:A}let s=this.source(e,r,o);if(s?.then){let a=this.pending={pos:r};s.then(c=>{this.pending==a&&(this.pending=null,c&&!(Array.isArray(c)&&!c.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(c)?c:[c])}))},c=>lh(e.state,c,"hover tooltip"))}else s&&!(Array.isArray(s)&&!s.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(s)?s:[s])})}get tooltip(){let e=this.view.plugin(EK),t=e?e.manager.tooltips.findIndex(i=>i.create==p6.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:o}=this;if(r.length&&o&&!TOe(o.dom,e)||this.pending){let{pos:s}=r[0]||this.pending,a=(i=(t=r[0])===null||t===void 0?void 0:t.end)!==null&&i!==void 0?i:s;(s==a?this.view.posAtCoords(this.lastMove)!=s:!ROe(this.view,s,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=i=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const C5=4;function TOe(n,e){let{left:t,right:i,top:r,bottom:o}=n.getBoundingClientRect(),s;if(s=n.querySelector(".cm-tooltip-arrow")){let a=s.getBoundingClientRect();r=Math.min(a.top,r),o=Math.max(a.bottom,o)}return e.clientX>=t-C5&&e.clientX<=i+C5&&e.clientY>=r-C5&&e.clientY<=o+C5}function ROe(n,e,t,i,r,o){let s=n.scrollDOM.getBoundingClientRect(),a=n.documentTop+n.documentPadding.top+n.contentHeight;if(s.left>i||s.right<i||s.top>r||Math.min(s.bottom,a)<r)return!1;let c=n.posAtCoords({x:i,y:r},!1);return c>=e&&c<=t}function DOe(n,e={}){let t=ao.define(),i=ac.define({create(){return[]},update(r,o){if(r.length&&(e.hideOnChange&&(o.docChanged||o.selection)?r=[]:e.hideOn&&(r=r.filter(s=>!e.hideOn(o,s))),o.docChanged)){let s=[];for(let a of r){let c=o.changes.mapPos(a.pos,-1,sh.TrackDel);if(c!=null){let A=Object.assign(Object.create(null),a);A.pos=c,A.end!=null&&(A.end=o.changes.mapPos(A.end)),s.push(A)}}r=s}for(let s of o.effects)s.is(t)&&(r=s.value),s.is(POe)&&(r=[]);return r},provide:r=>MS.from(r)});return{active:i,extension:[i,lu.define(r=>new kOe(r,n,i,t,e.hoverTime||300)),IOe]}}function Cre(n,e){let t=n.plugin(EK);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const POe=ao.define(),_W=ki.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function A4(n,e){let t=n.plugin(_re),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const _re=lu.fromClass(class{constructor(n){this.input=n.state.facet(h4),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(_W);this.top=new _5(n,!0,e.topContainer),this.bottom=new _5(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(_W);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new _5(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new _5(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(h4);if(t!=this.input){let i=t.filter(c=>c),r=[],o=[],s=[],a=[];for(let c of i){let A=this.specs.indexOf(c),m;A<0?(m=c(n.view),a.push(m)):(m=this.panels[A],m.update&&m.update(n)),r.push(m),(m.top?o:s).push(m)}this.specs=i,this.panels=r,this.top.sync(o),this.bottom.sync(s);for(let c of a)c.dom.classList.add("cm-panel"),c.mount&&c.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>wi.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class _5{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=xW(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=xW(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function xW(n){let e=n.nextSibling;return n.remove(),e}const h4=ki.define({enables:_re});class Wg extends kb{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Wg.prototype.elementClass="";Wg.prototype.toDOM=void 0;Wg.prototype.mapMode=sh.TrackBefore;Wg.prototype.startSide=Wg.prototype.endSide=-1;Wg.prototype.point=!0;const uw=ki.define(),UOe=ki.define(),KOe={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Xo.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},y3=ki.define();function xre(n){return[Mre(),y3.of({...KOe,...n})]}const MW=ki.define({combine:n=>n.some(e=>e)});function Mre(n){return[LOe]}const LOe=lu.fromClass(class{constructor(n){this.view=n,this.domAfter=null,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(y3).map(e=>new SW(n,e)),this.fixed=!n.state.facet(MW);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,i=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(i<(t.to-t.from)*.8)}if(n.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(MW)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let t=Xo.iter(this.view.state.facet(uw),this.view.viewport.from),i=[],r=this.gutters.map(o=>new FOe(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(o.type)){let s=!0;for(let a of o.type)if(a.type==uh.Text&&s){AD(t,i,a.from);for(let c of r)c.line(this.view,a,i);s=!1}else if(a.widget)for(let c of r)c.widget(this.view,a)}else if(o.type==uh.Text){AD(t,i,o.from);for(let s of r)s.line(this.view,o,i)}else if(o.widget)for(let s of r)s.widget(this.view,o);for(let o of r)o.finish();n&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(n){let e=n.startState.facet(y3),t=n.state.facet(y3),i=n.docChanged||n.heightChanged||n.viewportChanged||!Xo.eq(n.startState.facet(uw),n.state.facet(uw),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let r of this.gutters)r.update(n)&&(i=!0);else{i=!0;let r=[];for(let o of t){let s=e.indexOf(o);s<0?r.push(new SW(this.view,o)):(this.gutters[s].update(n),r.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),r.indexOf(o)<0&&o.destroy();for(let o of r)o.config.side=="after"?this.getDOMAfter().appendChild(o.dom):this.dom.appendChild(o.dom);this.gutters=r}return i}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:n=>wi.scrollMargins.of(e=>{let t=e.plugin(n);if(!t||t.gutters.length==0||!t.fixed)return null;let i=t.dom.offsetWidth*e.scaleX,r=t.domAfter?t.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Za.LTR?{left:i,right:r}:{right:i,left:r}})});function wW(n){return Array.isArray(n)?n:[n]}function AD(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class FOe{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Xo.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:r}=this,o=(t.top-this.height)/e.scaleY,s=t.height/e.scaleY;if(this.i==r.elements.length){let a=new wre(e,s,o,i);r.elements.push(a),r.dom.appendChild(a.dom)}else r.elements[this.i].update(e,s,o,i);this.height=t.bottom,this.i++}line(e,t,i){let r=[];AD(this.cursor,r,t.from),i.length&&(r=r.concat(i));let o=this.gutter.config.lineMarker(e,t,r);o&&r.unshift(o);let s=this.gutter;r.length==0&&!s.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t),r=i?[i]:null;for(let o of e.state.facet(UOe)){let s=o(e,t.widget,t);s&&(r||(r=[])).push(s)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class SW{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,r=>{let o=r.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let c=o.getBoundingClientRect();s=(c.top+c.bottom)/2}else s=r.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);t.domEventHandlers[i](e,a,r)&&r.preventDefault()});this.markers=wW(t.markers(e)),t.initialSpacer&&(this.spacer=new wre(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=wW(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!Xo.eq(this.markers,t,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class wre{constructor(e,t,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,r)}update(e,t,i,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),zOe(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let i="cm-gutterElement",r=this.dom.firstChild;for(let o=0,s=0;;){let a=s,c=o<t.length?t[o++]:null,A=!1;if(c){let m=c.elementClass;m&&(i+=" "+m);for(let v=s;v<this.markers.length;v++)if(this.markers[v].compare(c)){a=v,A=!0;break}}else a=this.markers.length;for(;s<a;){let m=this.markers[s++];if(m.toDOM){m.destroy(r);let v=r.nextSibling;r.remove(),r=v}}if(!c)break;c.toDOM&&(A?r=r.nextSibling:this.dom.insertBefore(c.toDOM(e),r)),A&&s++}this.dom.className=i,this.markers=t}destroy(){this.setMarkers(null,[])}}function zOe(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].compare(e[t]))return!1;return!0}const jOe=ki.define(),NOe=ki.define(),x_=ki.define({combine(n){return bm(n,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let i=Object.assign({},e);for(let r in t){let o=i[r],s=t[r];i[r]=o?(a,c,A)=>o(a,c,A)||s(a,c,A):s}return i}})}});class c8 extends Wg{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function A8(n,e){return n.state.facet(x_).formatNumber(e,n.state)}const GOe=y3.compute([x_],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(jOe)},lineMarker(e,t,i){return i.some(r=>r.toDOM)?null:new c8(A8(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,i)=>{for(let r of e.state.facet(NOe)){let o=r(e,t,i);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(x_)!=e.state.facet(x_),initialSpacer(e){return new c8(A8(e,EW(e.state.doc.lines)))},updateSpacer(e,t){let i=A8(t.view,EW(t.view.state.doc.lines));return i==e.number?e:new c8(i)},domEventHandlers:n.facet(x_).domEventHandlers,side:"before"}));function WOe(n={}){return[x_.of(n),Mre(),GOe]}function EW(n){let e=9;for(;e<n;)e=e*10+9;return e}const QOe=new class extends Wg{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},qOe=uw.compute(["selection"],n=>{let e=[],t=-1;for(let i of n.selection.ranges){let r=n.doc.lineAt(i.head).from;r>t&&(t=r,e.push(QOe.range(r)))}return Xo.of(e)});function YOe(){return qOe}const Sre=1024;let $Oe=0;class h8{constructor(e,t){this.from=e,this.to=t}}class To{constructor(e={}){this.id=$Oe++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=rd.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}To.closedBy=new To({deserialize:n=>n.split(" ")});To.openedBy=new To({deserialize:n=>n.split(" ")});To.group=new To({deserialize:n=>n.split(" ")});To.isolate=new To({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});To.contextHash=new To({perNode:!0});To.lookAhead=new To({perNode:!0});To.mounted=new To({perNode:!0});class wS{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[To.mounted.id]}}const VOe=Object.create(null);class rd{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):VOe,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new rd(e.name||"",t,e.id,i);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(r)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[o[0].id]=o[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(To.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(To.group),o=-1;o<(r?r.length:0);o++){let s=t[o<0?i.name:r[o]];if(s)return s}}}}rd.none=new rd("",Object.create(null),0,8);class OK{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let r=null;for(let o of e){let s=o(i);s&&(r||(r=Object.assign({},i.props)),r[s[0].id]=s[1])}t.push(r?new rd(i.name,r,i.id,i.flags):i)}return new OK(t)}}const x5=new WeakMap,OW=new WeakMap;var Kc;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays"})(Kc||(Kc={}));class Lu{constructor(e,t,i,r,o){if(this.type=e,this.children=t,this.positions=i,this.length=r,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,a]of o)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=wS.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let r=i.toString();r&&(t&&(t+=","),t+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new dD(this.topNode,e)}cursorAt(e,t=0,i=0){let r=x5.get(this)||this.topNode,o=new dD(r);return o.moveTo(e,t),x5.set(this,o._tree),o}get topNode(){return new ip(this,0,0,null)}resolve(e,t=0){let i=d4(x5.get(this)||this.topNode,e,t,!1);return x5.set(this,i),i}resolveInner(e,t=0){let i=d4(OW.get(this)||this.topNode,e,t,!0);return OW.set(this,i),i}resolveStack(e,t=0){return XOe(this,e,t)}iterate(e){let{enter:t,leave:i,from:r=0,to:o=this.length}=e,s=e.mode||0,a=(s&Kc.IncludeAnonymous)>0;for(let c=this.cursor(s|Kc.IncludeAnonymous);;){let A=!1;if(c.from<=o&&c.to>=r&&(!a&&c.type.isAnonymous||t(c)!==!1)){if(c.firstChild())continue;A=!0}for(;A&&i&&(a||!c.type.isAnonymous)&&i(c),!c.nextSibling();){if(!c.parent())return;A=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:kK(rd.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new Lu(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new Lu(rd.none,t,i,r)))}static build(e){return JOe(e)}}Lu.empty=new Lu(rd.none,[],[],0);class BK{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new BK(this.buffer,this.index)}}class Zy{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return rd.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],r=this.set.types[t],o=r.name;if(/\W/.test(o)&&!r.isError&&(o=JSON.stringify(o)),e+=4,i==e)return o;let s=[];for(;e<i;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,t,i,r,o){let{buffer:s}=this,a=-1;for(let c=e;c!=t&&!(Ere(o,r,s[c+1],s[c+2])&&(a=c,i>0));c=s[c+3]);return a}slice(e,t,i){let r=this.buffer,o=new Uint16Array(t-e),s=0;for(let a=e,c=0;a<t;){o[c++]=r[a++],o[c++]=r[a++]-i;let A=o[c++]=r[a++]-i;o[c++]=r[a++]-e,s=Math.max(s,A)}return new Zy(o,s,this.set)}}function Ere(n,e,t,i){switch(n){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function d4(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let s=!i&&n instanceof ip&&n.index<0?null:n.parent;if(!s)return n;n=s}let o=i?0:Kc.IgnoreOverlays;if(i)for(let s=n,a=s.parent;a;s=a,a=s.parent)s instanceof ip&&s.index<0&&((r=a.enter(e,t,o))===null||r===void 0?void 0:r.from)!=s.from&&(n=a);for(;;){let s=n.enter(e,t,o);if(!s)return n;n=s}}class Ore{cursor(e=0){return new dD(this,e)}getChild(e,t=null,i=null){let r=BW(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return BW(this,e,t,i)}resolve(e,t=0){return d4(this,e,t,!1)}resolveInner(e,t=0){return d4(this,e,t,!0)}matchContext(e){return hD(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(i=t,t=r.prevSibling):t=r}return i}get node(){return this}get next(){return this.parent}}class ip extends Ore{constructor(e,t,i,r){super(),this._tree=e,this.from=t,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,r,o=0){for(let s=this;;){for(let{children:a,positions:c}=s._tree,A=t>0?a.length:-1;e!=A;e+=t){let m=a[e],v=c[e]+s.from;if(Ere(r,i,v,v+m.length)){if(m instanceof Zy){if(o&Kc.ExcludeBuffers)continue;let x=m.findChild(0,m.buffer.length,t,i-v,r);if(x>-1)return new Uy(new HOe(s,m,e,v),null,x)}else if(o&Kc.IncludeAnonymous||!m.type.isAnonymous||IK(m)){let x;if(!(o&Kc.IgnoreMounts)&&(x=wS.get(m))&&!x.overlay)return new ip(x.tree,v,e,s);let _=new ip(m,v,e,s);return o&Kc.IncludeAnonymous||!_.type.isAnonymous?_:_.nextChild(t<0?m.children.length-1:0,t,i,r)}}}if(o&Kc.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+t:e=t<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let r;if(!(i&Kc.IgnoreOverlays)&&(r=wS.get(this._tree))&&r.overlay){let o=e-this.from;for(let{from:s,to:a}of r.overlay)if((t>0?s<=o:s<o)&&(t<0?a>=o:a>o))return new ip(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function BW(n,e,t,i){let r=n.cursor(),o=[];if(!r.firstChild())return o;if(t!=null){for(let s=!1;!s;)if(s=r.type.is(t),!r.nextSibling())return o}for(;;){if(i!=null&&r.type.is(i))return o;if(r.type.is(e)&&o.push(r.node),!r.nextSibling())return i==null?o:[]}}function hD(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class HOe{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class Uy extends Ore{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return o<0?null:new Uy(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&Kc.ExcludeBuffers)return null;let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new Uy(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Uy(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Uy(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,o=i.buffer[this.index+3];if(o>r){let s=i.buffer[this.index+1];e.push(i.slice(r,o,s)),t.push(0)}return new Lu(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Bre(n){if(!n.length)return null;let e=0,t=n[0];for(let o=1;o<n.length;o++){let s=n[o];(s.from>t.from||s.to<t.to)&&(t=s,e=o)}let i=t instanceof ip&&t.index<0?null:t.parent,r=n.slice();return i?r[e]=i:r.splice(e,1),new ZOe(r,t)}class ZOe{constructor(e,t){this.heads=e,this.node=t}get next(){return Bre(this.heads)}}function XOe(n,e,t){let i=n.resolveInner(e,t),r=null;for(let o=i instanceof ip?i:i.context.parent;o;o=o.parent)if(o.index<0){let s=o.parent;(r||(r=[i])).push(s.resolve(e,t)),o=s}else{let s=wS.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new ip(s.tree,s.overlay[0].from+o.from,-1,o);(r||(r=[i])).push(d4(a,e,t,!1))}}return r?Bre(r):i}class dD{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof ip)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof ip?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&Kc.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Kc.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Kc.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(r.buffer.buffer[o+3]<this.index)return!1;({index:t,parent:i}=r)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let o=t+e,s=e<0?-1:i._tree.children.length;o!=s;o+=e){let a=i._tree.children[o];if(this.mode&Kc.IncludeAnonymous||a instanceof Zy||!a.type.isAnonymous||IK(a))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==r){if(r==this.index)return s;t=s,i=o+1;break e}r=this.stack[--o]}for(let r=i;r<this.stack.length;r++)t=new Uy(this.buffer,t,this.stack[r]);return this.bufferNode=new Uy(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return hD(this.node.parent,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let r=e.length-1,o=this.stack.length-1;r>=0;o--){if(o<0)return hD(this._tree,e,r);let s=i[t.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[r]&&e[r]!=s.name)return!1;r--}}return!0}}function IK(n){return n.children.some(e=>e instanceof Zy||!e.type.isAnonymous||IK(e))}function JOe(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=Sre,reused:o=[],minRepeatType:s=i.types.length}=n,a=Array.isArray(t)?new BK(t,t.length):t,c=i.types,A=0,m=0;function v(G,Y,z,se,le,me){let{id:fe,start:_e,end:we,size:ke}=a,je=m,Ie=A;for(;ke<0;)if(a.next(),ke==-1){let Le=o[fe];z.push(Le),se.push(_e-G);return}else if(ke==-3){A=fe;return}else if(ke==-4){m=fe;return}else throw new RangeError(`Unrecognized record size: ${ke}`);let Qe=c[fe],tt,ht,ce=_e-G;if(we-_e<=r&&(ht=F(a.pos-Y,le))){let Le=new Uint16Array(ht.size-ht.skip),We=a.pos-ht.size,Me=Le.length;for(;a.pos>We;)Me=j(ht.start,Le,Me);tt=new Zy(Le,we-ht.start,i),ce=ht.start-G}else{let Le=a.pos-ke;a.next();let We=[],Me=[],dt=fe>=s?fe:-1,it=0,vt=we;for(;a.pos>Le;)dt>=0&&a.id==dt&&a.size>=0?(a.end<=vt-r&&(O(We,Me,_e,it,a.end,vt,dt,je,Ie),it=We.length,vt=a.end),a.next()):me>2500?x(_e,Le,We,Me):v(_e,Le,We,Me,dt,me+1);if(dt>=0&&it>0&&it<We.length&&O(We,Me,_e,it,_e,vt,dt,je,Ie),We.reverse(),Me.reverse(),dt>-1&&it>0){let Ut=_(Qe,Ie);tt=kK(Qe,We,Me,0,We.length,0,we-_e,Ut,Ut)}else tt=P(Qe,We,Me,we-_e,je-we,Ie)}z.push(tt),se.push(ce)}function x(G,Y,z,se){let le=[],me=0,fe=-1;for(;a.pos>Y;){let{id:_e,start:we,end:ke,size:je}=a;if(je>4)a.next();else{if(fe>-1&&we<fe)break;fe<0&&(fe=ke-r),le.push(_e,we,ke),me++,a.next()}}if(me){let _e=new Uint16Array(me*4),we=le[le.length-2];for(let ke=le.length-3,je=0;ke>=0;ke-=3)_e[je++]=le[ke],_e[je++]=le[ke+1]-we,_e[je++]=le[ke+2]-we,_e[je++]=je;z.push(new Zy(_e,le[2]-we,i)),se.push(we-G)}}function _(G,Y){return(z,se,le)=>{let me=0,fe=z.length-1,_e,we;if(fe>=0&&(_e=z[fe])instanceof Lu){if(!fe&&_e.type==G&&_e.length==le)return _e;(we=_e.prop(To.lookAhead))&&(me=se[fe]+_e.length+we)}return P(G,z,se,le,me,Y)}}function O(G,Y,z,se,le,me,fe,_e,we){let ke=[],je=[];for(;G.length>se;)ke.push(G.pop()),je.push(Y.pop()+z-le);G.push(P(i.types[fe],ke,je,me-le,_e-me,we)),Y.push(le-z)}function P(G,Y,z,se,le,me,fe){if(me){let _e=[To.contextHash,me];fe=fe?[_e].concat(fe):[_e]}if(le>25){let _e=[To.lookAhead,le];fe=fe?[_e].concat(fe):[_e]}return new Lu(G,Y,z,se,fe)}function F(G,Y){let z=a.fork(),se=0,le=0,me=0,fe=z.end-r,_e={size:0,start:0,skip:0};e:for(let we=z.pos-G;z.pos>we;){let ke=z.size;if(z.id==Y&&ke>=0){_e.size=se,_e.start=le,_e.skip=me,me+=4,se+=4,z.next();continue}let je=z.pos-ke;if(ke<0||je<we||z.start<fe)break;let Ie=z.id>=s?4:0,Qe=z.start;for(z.next();z.pos>je;){if(z.size<0)if(z.size==-3)Ie+=4;else break e;else z.id>=s&&(Ie+=4);z.next()}le=Qe,se+=ke,me+=Ie}return(Y<0||se==G)&&(_e.size=se,_e.start=le,_e.skip=me),_e.size>4?_e:void 0}function j(G,Y,z){let{id:se,start:le,end:me,size:fe}=a;if(a.next(),fe>=0&&se<s){let _e=z;if(fe>4){let we=a.pos-(fe-4);for(;a.pos>we;)z=j(G,Y,z)}Y[--z]=_e,Y[--z]=me-G,Y[--z]=le-G,Y[--z]=se}else fe==-3?A=se:fe==-4&&(m=se);return z}let Q=[],V=[];for(;a.pos>0;)v(n.start||0,n.bufferStart||0,Q,V,-1,0);let H=(e=n.length)!==null&&e!==void 0?e:Q.length?V[0]+Q[0].length:0;return new Lu(c[n.topID],Q.reverse(),V.reverse(),H)}const IW=new WeakMap;function cw(n,e){if(!n.isAnonymous||e instanceof Zy||e.type!=n)return 1;let t=IW.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof Lu)){t=1;break}t+=cw(n,i)}IW.set(e,t)}return t}function kK(n,e,t,i,r,o,s,a,c){let A=0;for(let O=i;O<r;O++)A+=cw(n,e[O]);let m=Math.ceil(A*1.5/8),v=[],x=[];function _(O,P,F,j,Q){for(let V=F;V<j;){let H=V,G=P[V],Y=cw(n,O[V]);for(V++;V<j;V++){let z=cw(n,O[V]);if(Y+z>=m)break;Y+=z}if(V==H+1){if(Y>m){let z=O[H];_(z.children,z.positions,0,z.children.length,P[H]+Q);continue}v.push(O[H])}else{let z=P[V-1]+O[V-1].length-G;v.push(kK(n,O,P,H,V,G,z,null,c))}x.push(G+Q-o)}}return _(e,t,i,r,0),(a||c)(v,x,s)}class yb{constructor(e,t,i,r,o=!1,s=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new yb(0,e.length,e,0,!1,i)];for(let o of t)o.to>e.length&&r.push(o);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],o=1,s=e.length?e[0]:null;for(let a=0,c=0,A=0;;a++){let m=a<t.length?t[a]:null,v=m?m.fromA:1e9;if(v-c>=i)for(;s&&s.from<v;){let x=s;if(c>=x.from||v<=x.to||A){let _=Math.max(x.from,c)-A,O=Math.min(x.to,v)-A;x=_>=O?null:new yb(_,O,x.tree,x.offset+A,a>0,!!m)}if(x&&r.push(x),s.to>v)break;s=o<e.length?e[o++]:null}if(!m)break;c=m.toA,A=m.toA-m.toB}return r}}class Ire{startParse(e,t,i){return typeof e=="string"&&(e=new eBe(e)),i=i?i.length?i.map(r=>new h8(r.from,r.to)):[new h8(0,0)]:[new h8(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let o=r.advance();if(o)return o}}}class eBe{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new To({perNode:!0});let tBe=0;class Yf{constructor(e,t,i,r){this.name=e,this.set=t,this.base=i,this.modified=r,this.id=tBe++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let i=typeof e=="string"?e:"?";if(e instanceof Yf&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let r=new Yf(i,[],null,[]);if(r.set.push(r),t)for(let o of t.set)r.set.push(o);return r}static defineModifier(e){let t=new SS(e);return i=>i.modified.indexOf(t)>-1?i:SS.get(i.base||i,i.modified.concat(t).sort((r,o)=>r.id-o.id))}}let nBe=0;class SS{constructor(e){this.name=e,this.instances=[],this.id=nBe++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(a=>a.base==e&&iBe(t,a.modified));if(i)return i;let r=[],o=new Yf(e.name,r,e,t);for(let a of t)a.instances.push(o);let s=rBe(t);for(let a of e.set)if(!a.modified.length)for(let c of s)r.push(SS.get(a,c));return o}}function iBe(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function rBe(n){let e=[[]];for(let t=0;t<n.length;t++)for(let i=0,r=e.length;i<r;i++)e.push(e[i].concat(n[t]));return e.sort((t,i)=>i.length-t.length)}function kre(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let r of t.split(" "))if(r){let o=[],s=2,a=r;for(let v=0;;){if(a=="..."&&v>0&&v+3==r.length){s=1;break}let x=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!x)throw new RangeError("Invalid path: "+r);if(o.push(x[0]=="*"?"":x[0][0]=='"'?JSON.parse(x[0]):x[0]),v+=x[0].length,v==r.length)break;let _=r[v++];if(v==r.length&&_=="!"){s=0;break}if(_!="/")throw new RangeError("Invalid path: "+r);a=r.slice(v)}let c=o.length-1,A=o[c];if(!A)throw new RangeError("Invalid path: "+r);let m=new ES(i,s,c>0?o.slice(0,c):null);e[A]=m.sort(e[A])}}return Tre.add(e)}const Tre=new To;class ES{constructor(e,t,i,r){this.tags=e,this.mode=t,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}ES.empty=new ES([],2,null);function Rre(n,e){let t=Object.create(null);for(let o of n)if(!Array.isArray(o.tag))t[o.tag.id]=o.class;else for(let s of o.tag)t[s.id]=o.class;let{scope:i,all:r=null}=e||{};return{style:o=>{let s=r;for(let a of o)for(let c of a.set){let A=t[c.id];if(A){s=s?s+" "+A:A;break}}return s},scope:i}}function oBe(n,e){let t=null;for(let i of n){let r=i.style(e);r&&(t=t?t+" "+r:r)}return t}function sBe(n,e,t,i=0,r=n.length){let o=new aBe(i,Array.isArray(e)?e:[e],t);o.highlightRange(n.cursor(),i,r,"",o.highlighters),o.flush(r)}class aBe{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,r,o){let{type:s,from:a,to:c}=e;if(a>=i||c<=t)return;s.isTop&&(o=this.highlighters.filter(_=>!_.scope||_.scope(s)));let A=r,m=lBe(e)||ES.empty,v=oBe(o,m.tags);if(v&&(A&&(A+=" "),A+=v,m.mode==1&&(r+=(r?" ":"")+v)),this.startSpan(Math.max(t,a),A),m.opaque)return;let x=e.tree&&e.tree.prop(To.mounted);if(x&&x.overlay){let _=e.node.enter(x.overlay[0].from+a,1),O=this.highlighters.filter(F=>!F.scope||F.scope(x.tree.type)),P=e.firstChild();for(let F=0,j=a;;F++){let Q=F<x.overlay.length?x.overlay[F]:null,V=Q?Q.from+a:c,H=Math.max(t,j),G=Math.min(i,V);if(H<G&&P)for(;e.from<G&&(this.highlightRange(e,H,G,r,o),this.startSpan(Math.min(G,e.to),A),!(e.to>=V||!e.nextSibling())););if(!Q||V>i)break;j=Q.to+a,j>t&&(this.highlightRange(_.cursor(),Math.max(t,Q.from+a),Math.min(i,j),"",O),this.startSpan(Math.min(i,j),A))}P&&e.parent()}else if(e.firstChild()){x&&(r="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,r,o),this.startSpan(Math.min(i,e.to),A)}while(e.nextSibling());e.parent()}}}function lBe(n){let e=n.type.prop(Tre);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const hi=Yf.define,M5=hi(),by=hi(),kW=hi(by),TW=hi(by),Cy=hi(),w5=hi(Cy),d8=hi(Cy),ug=hi(),Gv=hi(ug),ag=hi(),lg=hi(),fD=hi(),f2=hi(fD),S5=hi(),ln={comment:M5,lineComment:hi(M5),blockComment:hi(M5),docComment:hi(M5),name:by,variableName:hi(by),typeName:kW,tagName:hi(kW),propertyName:TW,attributeName:hi(TW),className:hi(by),labelName:hi(by),namespace:hi(by),macroName:hi(by),literal:Cy,string:w5,docString:hi(w5),character:hi(w5),attributeValue:hi(w5),number:d8,integer:hi(d8),float:hi(d8),bool:hi(Cy),regexp:hi(Cy),escape:hi(Cy),color:hi(Cy),url:hi(Cy),keyword:ag,self:hi(ag),null:hi(ag),atom:hi(ag),unit:hi(ag),modifier:hi(ag),operatorKeyword:hi(ag),controlKeyword:hi(ag),definitionKeyword:hi(ag),moduleKeyword:hi(ag),operator:lg,derefOperator:hi(lg),arithmeticOperator:hi(lg),logicOperator:hi(lg),bitwiseOperator:hi(lg),compareOperator:hi(lg),updateOperator:hi(lg),definitionOperator:hi(lg),typeOperator:hi(lg),controlOperator:hi(lg),punctuation:fD,separator:hi(fD),bracket:f2,angleBracket:hi(f2),squareBracket:hi(f2),paren:hi(f2),brace:hi(f2),content:ug,heading:Gv,heading1:hi(Gv),heading2:hi(Gv),heading3:hi(Gv),heading4:hi(Gv),heading5:hi(Gv),heading6:hi(Gv),contentSeparator:hi(ug),list:hi(ug),quote:hi(ug),emphasis:hi(ug),strong:hi(ug),link:hi(ug),monospace:hi(ug),strikethrough:hi(ug),inserted:hi(),deleted:hi(),changed:hi(),invalid:hi(),meta:S5,documentMeta:hi(S5),annotation:hi(S5),processingInstruction:hi(S5),definition:Yf.defineModifier("definition"),constant:Yf.defineModifier("constant"),function:Yf.defineModifier("function"),standard:Yf.defineModifier("standard"),local:Yf.defineModifier("local"),special:Yf.defineModifier("special")};for(let n in ln){let e=ln[n];e instanceof Yf&&(e.name=n)}Rre([{tag:ln.link,class:"tok-link"},{tag:ln.heading,class:"tok-heading"},{tag:ln.emphasis,class:"tok-emphasis"},{tag:ln.strong,class:"tok-strong"},{tag:ln.keyword,class:"tok-keyword"},{tag:ln.atom,class:"tok-atom"},{tag:ln.bool,class:"tok-bool"},{tag:ln.url,class:"tok-url"},{tag:ln.labelName,class:"tok-labelName"},{tag:ln.inserted,class:"tok-inserted"},{tag:ln.deleted,class:"tok-deleted"},{tag:ln.literal,class:"tok-literal"},{tag:ln.string,class:"tok-string"},{tag:ln.number,class:"tok-number"},{tag:[ln.regexp,ln.escape,ln.special(ln.string)],class:"tok-string2"},{tag:ln.variableName,class:"tok-variableName"},{tag:ln.local(ln.variableName),class:"tok-variableName tok-local"},{tag:ln.definition(ln.variableName),class:"tok-variableName tok-definition"},{tag:ln.special(ln.variableName),class:"tok-variableName2"},{tag:ln.definition(ln.propertyName),class:"tok-propertyName tok-definition"},{tag:ln.typeName,class:"tok-typeName"},{tag:ln.namespace,class:"tok-namespace"},{tag:ln.className,class:"tok-className"},{tag:ln.macroName,class:"tok-macroName"},{tag:ln.propertyName,class:"tok-propertyName"},{tag:ln.operator,class:"tok-operator"},{tag:ln.comment,class:"tok-comment"},{tag:ln.meta,class:"tok-meta"},{tag:ln.invalid,class:"tok-invalid"},{tag:ln.punctuation,class:"tok-punctuation"}]);var f8;const M_=new To;function uBe(n){return ki.define({combine:n?e=>e.concat(n):void 0})}const cBe=new To;class lm{constructor(e,t,i=[],r=""){this.data=e,this.name=r,ys.prototype.hasOwnProperty("tree")||Object.defineProperty(ys.prototype,"tree",{get(){return KA(this)}}),this.parser=t,this.extension=[Xy.of(this),ys.languageData.of((o,s,a)=>{let c=RW(o,s,a),A=c.type.prop(M_);if(!A)return[];let m=o.facet(A),v=c.type.prop(cBe);if(v){let x=c.resolve(s-c.from,a);for(let _ of v)if(_.test(x,o)){let O=o.facet(_.facet);return _.type=="replace"?O:O.concat(m)}}return m})].concat(i)}isActiveAt(e,t,i=-1){return RW(e,t,i).type.prop(M_)==this.data}findRegions(e){let t=e.facet(Xy);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],r=(o,s)=>{if(o.prop(M_)==this.data){i.push({from:s,to:s+o.length});return}let a=o.prop(To.mounted);if(a){if(a.tree.prop(M_)==this.data){if(a.overlay)for(let c of a.overlay)i.push({from:c.from+s,to:c.to+s});else i.push({from:s,to:s+o.length});return}else if(a.overlay){let c=i.length;if(r(a.tree,a.overlay[0].from+s),i.length>c)return}}for(let c=0;c<o.children.length;c++){let A=o.children[c];A instanceof Lu&&r(A,o.positions[c]+s)}};return r(KA(e),0),i}get allowsNesting(){return!0}}lm.setState=ao.define();function RW(n,e,t){let i=n.facet(Xy),r=KA(n).topNode;if(!i||i.allowsNesting)for(let o=r;o;o=o.enter(e,t,Kc.ExcludeBuffers))o.type.isTop&&(r=o);return r}class OS extends lm{constructor(e,t,i){super(e,t,[],i),this.parser=t}static define(e){let t=uBe(e.languageData);return new OS(t,e.parser.configure({props:[M_.add(i=>i.isTop?t:void 0)]}),e.name)}configure(e,t){return new OS(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function KA(n){let e=n.field(lm.state,!1);return e?e.tree:Lu.empty}class ABe{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e<i||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let p2=null;class BS{constructor(e,t,i=[],r,o,s,a,c){this.parser=e,this.state=t,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new BS(e,t,[],Lu.empty,0,i,[],null)}startParse(){return this.parser.startParse(new ABe(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Lu.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let r=this.parse.advance();if(r)if(this.fragments=this.withoutTempSkipped(yb.addTree(r,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(i=this.parse.stoppedAt)!==null&&i!==void 0?i:this.state.doc.length,this.tree=r,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(yb.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=p2;p2=this;try{return e()}finally{p2=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=DW(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:r,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((A,m,v,x)=>c.push({fromA:A,toA:m,fromB:v,toB:x})),i=yb.applyChanges(i,c),r=Lu.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let A of this.skipped){let m=e.mapPos(A.from,1),v=e.mapPos(A.to,-1);m<v&&a.push({from:m,to:v})}}}return new BS(this.parser,t,i,r,o,s,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let i=0;i<this.skipped.length;i++){let{from:r,to:o}=this.skipped[i];r<e.to&&o>e.from&&(this.fragments=DW(this.fragments,r,o),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Ire{createParse(t,i,r){let o=r[0].from,s=r[r.length-1].to;return{parsedPos:o,advance(){let c=p2;if(c){for(let A of r)c.tempSkipped.push(A);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=s,new Lu(rd.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return p2}}function DW(n,e,t){return yb.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class px{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new px(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=BS.create(e.facet(Xy).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new px(i)}}lm.state=ac.define({create:px.init,update(n,e){for(let t of e.effects)if(t.is(lm.setState))return t.value;return e.startState.facet(Xy)!=e.state.facet(Xy)?px.init(e.state):n.apply(e)}});let Dre=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Dre=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const p8=typeof navigator<"u"&&(!((f8=navigator.scheduling)===null||f8===void 0)&&f8.isInputPending)?()=>navigator.scheduling.isInputPending():null,hBe=lu.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(lm.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(lm.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Dre(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:r}}=this.view,o=i.field(lm.state);if(o.tree==o.context.tree&&o.context.isDone(r+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!p8?Math.max(25,e.timeRemaining()-5):1e9),a=o.context.treeLen<r&&i.doc.length>r+1e3,c=o.context.work(()=>p8&&p8()||Date.now()>s,r+(a?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:lm.setState.of(new px(o.context))})),this.chunkBudget>0&&!(c&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>lh(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Xy=ki.define({combine(n){return n.length?n[0]:null},enables:n=>[lm.state,hBe,wi.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class dBe{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const fBe=ki.define(),TK=ki.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function IS(n){let e=n.facet(TK);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function f4(n,e){let t="",i=n.tabSize,r=n.facet(TK)[0];if(r==" "){for(;e>=i;)t+=" ",e-=i;r=" "}for(let o=0;o<e;o++)t+=r;return t}function RK(n,e){n instanceof ys&&(n=new m6(n));for(let i of n.state.facet(fBe)){let r=i(n,e);if(r!==void 0)return r}let t=KA(n.state);return t.length>=e?pBe(n,t,e):null}class m6{constructor(e,t={}){this.state=e,this.options=t,this.unit=IS(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:o}=this.options;return r!=null&&r>=i.from&&r<=i.to?o&&r==e?{text:"",from:e}:(t<0?r<e:r<=e)?{text:i.text.slice(r-i.from),from:r}:{text:i.text.slice(0,r-i.from),from:i.from}:i}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:i,from:r}=this.lineAt(e,t);return i.slice(e-r,Math.min(i.length,e+100-r))}column(e,t=1){let{text:i,from:r}=this.lineAt(e,t),o=this.countColumn(i,e-r),s=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return s>-1&&(o+=s-this.countColumn(i,i.search(/\S|$/))),o}countColumn(e,t=e.length){return Ux(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:r}=this.lineAt(e,t),o=this.options.overrideIndentation;if(o){let s=o(r);if(s>-1)return s}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Pre=new To;function pBe(n,e,t){let i=e.resolveStack(t),r=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(r!=i.node){let o=[];for(let s=r;s&&!(s.from<i.node.from||s.to>i.node.to||s.from==i.node.from&&s.type==i.node.type);s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)i={node:o[s],next:i}}return Ure(i,n,t)}function Ure(n,e,t){for(let i=n;i;i=i.next){let r=gBe(i.node);if(r)return r(DK.create(e,t,i))}return 0}function mBe(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function gBe(n){let e=n.type.prop(Pre);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(To.closedBy))){let r=n.lastChild,o=r&&i.indexOf(r.name)>-1;return s=>CBe(s,!0,1,void 0,o&&!mBe(s)?r.from:void 0)}return n.parent==null?yBe:null}function yBe(){return 0}class DK extends m6{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.context=i}get node(){return this.context.node}static create(e,t,i){return new DK(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(vBe(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){return Ure(this.context.next,this.base,this.pos)}}function vBe(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function bBe(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let r=n.options.simulateBreak,o=n.state.doc.lineAt(t.from),s=r==null||r<=o.from?o.to:Math.min(o.to,r);for(let a=t.to;;){let c=e.childAfter(a);if(!c||c==i)return null;if(!c.type.isSkipped){if(c.from>=s)return null;let A=/^ */.exec(o.text.slice(t.to-o.from))[0].length;return{from:t.from,to:t.to+A}}a=c.to}}function CBe(n,e,t,i,r){let o=n.textAfter,s=o.match(/^\s*/)[0].length,a=i&&o.slice(s,s+i.length)==i||r==n.pos+s,c=bBe(n);return c?a?n.column(c.from):n.column(c.to):n.baseIndent+(a?0:n.unit*t)}function PW({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const _Be=200;function xBe(){return ys.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:i}=n.newSelection.main,r=t.lineAt(i);if(i>r.from+_Be)return n;let o=t.sliceString(r.from,i);if(!e.some(A=>A.test(o)))return n;let{state:s}=n,a=-1,c=[];for(let{head:A}of s.selection.ranges){let m=s.doc.lineAt(A);if(m.from==a)continue;a=m.from;let v=RK(s,m.from);if(v==null)continue;let x=/^\s*/.exec(m.text)[0],_=f4(s,v);x!=_&&c.push({from:m.from,to:m.from+x.length,insert:_})}return c.length?[n,{changes:c,sequential:!0}]:n})}const MBe=ki.define(),Kre=new To;function wBe(n){let e=n.firstChild,t=n.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?n.to:t.from}:null}function SBe(n,e,t){let i=KA(n);if(i.length<t)return null;let r=i.resolveStack(t,1),o=null;for(let s=r;s;s=s.next){let a=s.node;if(a.to<=t||a.from>t)continue;if(o&&a.from<e)break;let c=a.type.prop(Kre);if(c&&(a.to<i.length-50||i.length==n.doc.length||!EBe(a))){let A=c(a,n);A&&A.from<=t&&A.from>=e&&A.to>t&&(o=A)}}return o}function EBe(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function kS(n,e,t){for(let i of n.facet(MBe)){let r=i(n,e,t);if(r)return r}return SBe(n,e,t)}function Lre(n,e){let t=e.mapPos(n.from,1),i=e.mapPos(n.to,-1);return t>=i?void 0:{from:t,to:i}}const g6=ao.define({map:Lre}),dM=ao.define({map:Lre});function Fre(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(i=>i.from<=t&&i.to>=t)||e.push(n.lineBlockAt(t));return e}const Pb=ac.define({create(){return Er.none},update(n,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((t,i)=>n=UW(n,t,i)),n=n.map(e.changes);for(let t of e.effects)if(t.is(g6)&&!OBe(n,t.value.from,t.value.to)){let{preparePlaceholder:i}=e.state.facet(Nre),r=i?Er.replace({widget:new PBe(i(e.state,t.value))}):KW;n=n.update({add:[r.range(t.value.from,t.value.to)]})}else t.is(dM)&&(n=n.update({filter:(i,r)=>t.value.from!=i||t.value.to!=r,filterFrom:t.value.from,filterTo:t.value.to}));return e.selection&&(n=UW(n,e.selection.main.head)),n},provide:n=>wi.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(i,r)=>{t.push(i,r)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<n.length;){let i=n[t++],r=n[t++];if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid JSON for fold state");e.push(KW.range(i,r))}return Er.set(e,!0)}});function UW(n,e,t=e){let i=!1;return n.between(e,t,(r,o)=>{r<t&&o>e&&(i=!0)}),i?n.update({filterFrom:e,filterTo:t,filter:(r,o)=>r>=t||o<=e}):n}function TS(n,e,t){var i;let r=null;return(i=n.field(Pb,!1))===null||i===void 0||i.between(e,t,(o,s)=>{(!r||r.from>o)&&(r={from:o,to:s})}),r}function OBe(n,e,t){let i=!1;return n.between(e,e,(r,o)=>{r==e&&o==t&&(i=!0)}),i}function zre(n,e){return n.field(Pb,!1)?e:e.concat(ao.appendConfig.of(Gre()))}const BBe=n=>{for(let e of Fre(n)){let t=kS(n.state,e.from,e.to);if(t)return n.dispatch({effects:zre(n.state,[g6.of(t),jre(n,t)])}),!0}return!1},IBe=n=>{if(!n.state.field(Pb,!1))return!1;let e=[];for(let t of Fre(n)){let i=TS(n.state,t.from,t.to);i&&e.push(dM.of(i),jre(n,i,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function jre(n,e,t=!0){let i=n.state.doc.lineAt(e.from).number,r=n.state.doc.lineAt(e.to).number;return wi.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${i} ${n.state.phrase("to")} ${r}.`)}const kBe=n=>{let{state:e}=n,t=[];for(let i=0;i<e.doc.length;){let r=n.lineBlockAt(i),o=kS(e,r.from,r.to);o&&t.push(g6.of(o)),i=(o?n.lineBlockAt(o.to):r).to+1}return t.length&&n.dispatch({effects:zre(n.state,t)}),!!t.length},TBe=n=>{let e=n.state.field(Pb,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(i,r)=>{t.push(dM.of({from:i,to:r}))}),n.dispatch({effects:t}),!0},RBe=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:BBe},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:IBe},{key:"Ctrl-Alt-[",run:kBe},{key:"Ctrl-Alt-]",run:TBe}],DBe={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Nre=ki.define({combine(n){return bm(n,DBe)}});function Gre(n){return[Pb,LBe]}function Wre(n,e){let{state:t}=n,i=t.facet(Nre),r=s=>{let a=n.lineBlockAt(n.posAtDOM(s.target)),c=TS(n.state,a.from,a.to);c&&n.dispatch({effects:dM.of(c)}),s.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(n,r,e);let o=document.createElement("span");return o.textContent=i.placeholderText,o.setAttribute("aria-label",t.phrase("folded code")),o.title=t.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=r,o}const KW=Er.replace({widget:new class extends iv{toDOM(n){return Wre(n,null)}}});class PBe extends iv{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Wre(e,this.value)}}const UBe={openText:"⌄",closedText:"",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class m8 extends Wg{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function KBe(n={}){let e={...UBe,...n},t=new m8(e,!0),i=new m8(e,!1),r=lu.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Xy)!=s.state.facet(Xy)||s.startState.field(Pb,!1)!=s.state.field(Pb,!1)||KA(s.startState)!=KA(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let a=new t1;for(let c of s.viewportLineBlocks){let A=TS(s.state,c.from,c.to)?i:kS(s.state,c.from,c.to)?t:null;A&&a.add(c.from,c.from,A)}return a.finish()}}),{domEventHandlers:o}=e;return[r,xre({class:"cm-foldGutter",markers(s){var a;return((a=s.plugin(r))===null||a===void 0?void 0:a.markers)||Xo.empty},initialSpacer(){return new m8(e,!1)},domEventHandlers:{...o,click:(s,a,c)=>{if(o.click&&o.click(s,a,c))return!0;let A=TS(s.state,a.from,a.to);if(A)return s.dispatch({effects:dM.of(A)}),!0;let m=kS(s.state,a.from,a.to);return m?(s.dispatch({effects:g6.of(m)}),!0):!1}}}),Gre()]}const LBe=wi.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class fM{constructor(e,t){this.specs=e;let i;function r(a){let c=$y.newName();return(i||(i=Object.create(null)))["."+c]=a,c}const o=typeof t.all=="string"?t.all:t.all?r(t.all):void 0,s=t.scope;this.scope=s instanceof lm?a=>a.prop(M_)==s.data:s?a=>a==s:void 0,this.style=Rre(e.map(a=>({tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))})),{all:o}).style,this.module=i?new $y(i):null,this.themeType=t.themeType}static define(e,t){return new fM(e,t||{})}}const pD=ki.define(),Qre=ki.define({combine(n){return n.length?[n[0]]:null}});function g8(n){let e=n.facet(pD);return e.length?e:n.facet(Qre)}function qre(n,e){let t=[zBe],i;return n instanceof fM&&(n.module&&t.push(wi.styleModule.of(n.module)),i=n.themeType),e?.fallback?t.push(Qre.of(n)):i?t.push(pD.computeN([wi.darkTheme],r=>r.facet(wi.darkTheme)==(i=="dark")?[n]:[])):t.push(pD.of(n)),t}class FBe{constructor(e){this.markCache=Object.create(null),this.tree=KA(e.state),this.decorations=this.buildDeco(e,g8(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=KA(e.state),i=g8(e.state),r=i!=g8(e.startState),{viewport:o}=e.view,s=e.changes.mapPos(this.decoratedTo,1);t.length<o.to&&!r&&t.type==this.tree.type&&s>=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=o.to)}buildDeco(e,t){if(!t||!this.tree.length)return Er.none;let i=new t1;for(let{from:r,to:o}of e.visibleRanges)sBe(this.tree,t,(s,a,c)=>{i.add(s,a,this.markCache[c]||(this.markCache[c]=Er.mark({class:c})))},r,o);return i.finish()}}const zBe=Qb.high(lu.fromClass(FBe,{decorations:n=>n.decorations})),jBe=fM.define([{tag:ln.meta,color:"#404740"},{tag:ln.link,textDecoration:"underline"},{tag:ln.heading,textDecoration:"underline",fontWeight:"bold"},{tag:ln.emphasis,fontStyle:"italic"},{tag:ln.strong,fontWeight:"bold"},{tag:ln.strikethrough,textDecoration:"line-through"},{tag:ln.keyword,color:"#708"},{tag:[ln.atom,ln.bool,ln.url,ln.contentSeparator,ln.labelName],color:"#219"},{tag:[ln.literal,ln.inserted],color:"#164"},{tag:[ln.string,ln.deleted],color:"#a11"},{tag:[ln.regexp,ln.escape,ln.special(ln.string)],color:"#e40"},{tag:ln.definition(ln.variableName),color:"#00f"},{tag:ln.local(ln.variableName),color:"#30a"},{tag:[ln.typeName,ln.namespace],color:"#085"},{tag:ln.className,color:"#167"},{tag:[ln.special(ln.variableName),ln.macroName],color:"#256"},{tag:ln.definition(ln.propertyName),color:"#00c"},{tag:ln.comment,color:"#940"},{tag:ln.invalid,color:"#f00"}]),NBe=wi.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Yre=1e4,$re="()[]{}",Vre=ki.define({combine(n){return bm(n,{afterCursor:!0,brackets:$re,maxScanDistance:Yre,renderMatch:QBe})}}),GBe=Er.mark({class:"cm-matchingBracket"}),WBe=Er.mark({class:"cm-nonmatchingBracket"});function QBe(n){let e=[],t=n.matched?GBe:WBe;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const qBe=ac.define({create(){return Er.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet(Vre);for(let r of e.state.selection.ranges){if(!r.empty)continue;let o=Sg(e.state,r.head,-1,i)||r.head>0&&Sg(e.state,r.head-1,1,i)||i.afterCursor&&(Sg(e.state,r.head,1,i)||r.head<e.state.doc.length&&Sg(e.state,r.head+1,-1,i));o&&(t=t.concat(i.renderMatch(o,e.state)))}return Er.set(t,!0)},provide:n=>wi.decorations.from(n)}),YBe=[qBe,NBe];function $Be(n={}){return[Vre.of(n),YBe]}const VBe=new To;function mD(n,e,t){let i=n.prop(e<0?To.openedBy:To.closedBy);if(i)return i;if(n.name.length==1){let r=t.indexOf(n.name);if(r>-1&&r%2==(e<0?1:0))return[t[r+e]]}return null}function gD(n){let e=n.type.prop(VBe);return e?e(n.node):n}function Sg(n,e,t,i={}){let r=i.maxScanDistance||Yre,o=i.brackets||$re,s=KA(n),a=s.resolveInner(e,t);for(let c=a;c;c=c.parent){let A=mD(c.type,t,o);if(A&&c.from<c.to){let m=gD(c);if(m&&(t>0?e>=m.from&&e<m.to:e>m.from&&e<=m.to))return HBe(n,e,t,c,m,A,o)}}return ZBe(n,e,t,s,a.type,r,o)}function HBe(n,e,t,i,r,o,s){let a=i.parent,c={from:r.from,to:r.to},A=0,m=a?.cursor();if(m&&(t<0?m.childBefore(i.from):m.childAfter(i.to)))do if(t<0?m.to<=i.from:m.from>=i.to){if(A==0&&o.indexOf(m.type.name)>-1&&m.from<m.to){let v=gD(m);return{start:c,end:v?{from:v.from,to:v.to}:void 0,matched:!0}}else if(mD(m.type,t,s))A++;else if(mD(m.type,-t,s)){if(A==0){let v=gD(m);return{start:c,end:v&&v.from<v.to?{from:v.from,to:v.to}:void 0,matched:!1}}A--}}while(t<0?m.prevSibling():m.nextSibling());return{start:c,matched:!1}}function ZBe(n,e,t,i,r,o,s){let a=t<0?n.sliceDoc(e-1,e):n.sliceDoc(e,e+1),c=s.indexOf(a);if(c<0||c%2==0!=t>0)return null;let A={from:t<0?e-1:e,to:t>0?e+1:e},m=n.doc.iterRange(e,t>0?n.doc.length:0),v=0;for(let x=0;!m.next().done&&x<=o;){let _=m.value;t<0&&(x+=_.length);let O=e+x*t;for(let P=t>0?0:_.length-1,F=t>0?_.length:-1;P!=F;P+=t){let j=s.indexOf(_[P]);if(!(j<0||i.resolveInner(O+P,1).type!=r))if(j%2==0==t>0)v++;else{if(v==1)return{start:A,end:{from:O+P,to:O+P+1},matched:j>>1==c>>1};v--}}t>0&&(x+=_.length)}return m.done?{start:A,matched:!1}:null}const XBe=Object.create(null),LW=[rd.none],FW=[],zW=Object.create(null),JBe=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])JBe[n]=e8e(XBe,e);function y8(n,e){FW.indexOf(n)>-1||(FW.push(n),console.warn(e))}function e8e(n,e){let t=[];for(let a of e.split(" ")){let c=[];for(let A of a.split(".")){let m=n[A]||ln[A];m?typeof m=="function"?c.length?c=c.map(m):y8(A,`Modifier ${A} used at start of tag`):c.length?y8(A,`Tag ${A} used as modifier`):c=Array.isArray(m)?m:[m]:y8(A,`Unknown highlighting tag ${A}`)}for(let A of c)t.push(A)}if(!t.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+t.map(a=>a.id),o=zW[r];if(o)return o.id;let s=zW[r]=rd.define({id:LW.length,name:i,props:[kre({[i]:t})]});return LW.push(s),s.id}Za.RTL,Za.LTR;const t8e=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),i=UK(n.state,t.from);return i.line?n8e(n):i.block?r8e(n):!1};function PK(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let r=n(e,t);return r?(i(t.update(r)),!0):!1}}const n8e=PK(a8e,0),i8e=PK(Hre,0),r8e=PK((n,e)=>Hre(n,e,s8e(e)),0);function UK(n,e){let t=n.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const m2=50;function o8e(n,{open:e,close:t},i,r){let o=n.sliceDoc(i-m2,i),s=n.sliceDoc(r,r+m2),a=/\s*$/.exec(o)[0].length,c=/^\s*/.exec(s)[0].length,A=o.length-a;if(o.slice(A-e.length,A)==e&&s.slice(c,c+t.length)==t)return{open:{pos:i-a,margin:a&&1},close:{pos:r+c,margin:c&&1}};let m,v;r-i<=2*m2?m=v=n.sliceDoc(i,r):(m=n.sliceDoc(i,i+m2),v=n.sliceDoc(r-m2,r));let x=/^\s*/.exec(m)[0].length,_=/\s*$/.exec(v)[0].length,O=v.length-_-t.length;return m.slice(x,x+e.length)==e&&v.slice(O,O+t.length)==t?{open:{pos:i+x+e.length,margin:/\s/.test(m.charAt(x+e.length))?1:0},close:{pos:r-_-t.length,margin:/\s/.test(v.charAt(O-1))?1:0}}:null}function s8e(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),r=t.to<=i.to?i:n.doc.lineAt(t.to);r.from>i.from&&r.from==t.to&&(r=t.to==i.to+1?i:n.doc.lineAt(t.to-1));let o=e.length-1;o>=0&&e[o].to>i.from?e[o].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function Hre(n,e,t=e.selection.ranges){let i=t.map(o=>UK(e,o.from).block);if(!i.every(o=>o))return null;let r=t.map((o,s)=>o8e(e,i[s],o.from,o.to));if(n!=2&&!r.every(o=>o))return{changes:e.changes(t.map((o,s)=>r[s]?[]:[{from:o.from,insert:i[s].open+" "},{from:o.to,insert:" "+i[s].close}]))};if(n!=1&&r.some(o=>o)){let o=[];for(let s=0,a;s<r.length;s++)if(a=r[s]){let c=i[s],{open:A,close:m}=a;o.push({from:A.pos-c.open.length,to:A.pos+A.margin},{from:m.pos-m.margin,to:m.pos+c.close.length})}return{changes:o}}return null}function a8e(n,e,t=e.selection.ranges){let i=[],r=-1;for(let{from:o,to:s}of t){let a=i.length,c=1e9,A=UK(e,o).line;if(A){for(let m=o;m<=s;){let v=e.doc.lineAt(m);if(v.from>r&&(o==s||s>v.from)){r=v.from;let x=/^\s*/.exec(v.text)[0].length,_=x==v.length,O=v.text.slice(x,x+A.length)==A?x:-1;x<v.text.length&&x<c&&(c=x),i.push({line:v,comment:O,token:A,indent:x,empty:_,single:!1})}m=v.to+1}if(c<1e9)for(let m=a;m<i.length;m++)i[m].indent<i[m].line.text.length&&(i[m].indent=c);i.length==a+1&&(i[a].single=!0)}}if(n!=2&&i.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:c,indent:A,empty:m,single:v}of i)(v||!m)&&o.push({from:a.from+A,insert:c+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(n!=1&&i.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:a,token:c}of i)if(a>=0){let A=s.from+a,m=A+c.length;s.text[m-s.from]==" "&&m++,o.push({from:A,to:m})}return{changes:o}}return null}const yD=l1.define(),l8e=l1.define(),u8e=ki.define(),Zre=ki.define({combine(n){return bm(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,r)=>e(i,r)||t(i,r)})}}),Xre=ac.define({create(){return Eg.empty},update(n,e){let t=e.state.facet(Zre),i=e.annotation(yD);if(i){let c=ed.fromTransaction(e,i.selection),A=i.side,m=A==0?n.undone:n.done;return c?m=RS(m,m.length,t.minDepth,c):m=toe(m,e.startState.selection),new Eg(A==0?i.rest:m,A==0?m:i.rest)}let r=e.annotation(l8e);if((r=="full"||r=="before")&&(n=n.isolate()),e.annotation(sc.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let o=ed.fromTransaction(e),s=e.annotation(sc.time),a=e.annotation(sc.userEvent);return o?n=n.addChanges(o,s,a,t,e):e.selection&&(n=n.addSelection(e.startState.selection,s,a,t.newGroupDelay)),(r=="full"||r=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Eg(n.done.map(ed.fromJSON),n.undone.map(ed.fromJSON))}});function c8e(n={}){return[Xre,Zre.of(n),wi.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?Jre:e.inputType=="historyRedo"?vD:null;return i?(e.preventDefault(),i(t)):!1}})]}function y6(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let r=t.field(Xre,!1);if(!r)return!1;let o=r.pop(n,t,e);return o?(i(o),!0):!1}}const Jre=y6(0,!1),vD=y6(1,!1),A8e=y6(0,!0),h8e=y6(1,!0);class ed{constructor(e,t,i,r,o){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new ed(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new ed(e.changes&&rc.fromJSON(e.changes),[],e.mapped&&Lg.fromJSON(e.mapped),e.startSelection&&Sn.fromJSON(e.startSelection),e.selectionsAfter.map(Sn.fromJSON))}static fromTransaction(e,t){let i=Xf;for(let r of e.startState.facet(u8e)){let o=r(e);o.length&&(i=i.concat(o))}return!i.length&&e.changes.empty?null:new ed(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,Xf)}static selection(e){return new ed(void 0,Xf,void 0,void 0,e)}}function RS(n,e,t,i){let r=e+1>t+20?e-t-1:0,o=n.slice(r,e);return o.push(i),o}function d8e(n,e){let t=[],i=!1;return n.iterChangedRanges((r,o)=>t.push(r,o)),e.iterChangedRanges((r,o,s,a)=>{for(let c=0;c<t.length;){let A=t[c++],m=t[c++];a>=A&&s<=m&&(i=!0)}}),i}function f8e(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function eoe(n,e){return n.length?e.length?n.concat(e):n:e}const Xf=[],p8e=200;function toe(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-p8e));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),RS(n,n.length-1,1e9,t.setSelAfter(i)))}else return[ed.selection([e])]}function m8e(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function v8(n,e){if(!n.length)return n;let t=n.length,i=Xf;for(;t;){let r=g8e(n[t-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let o=n.slice(0,t);return o[t-1]=r,o}else e=r.mapped,t--,i=r.selectionsAfter}return i.length?[ed.selection(i)]:Xf}function g8e(n,e,t){let i=eoe(n.selectionsAfter.length?n.selectionsAfter.map(a=>a.map(e)):Xf,t);if(!n.changes)return ed.selection(i);let r=n.changes.map(e),o=e.mapDesc(n.changes,!0),s=n.mapped?n.mapped.composeDesc(o):o;return new ed(r,ao.mapEffects(n.effects,e),s,n.startSelection.map(o),i)}const y8e=/^(input\.type|delete)($|\.)/;class Eg{constructor(e,t,i=0,r=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Eg(this.done,this.undone):this}addChanges(e,t,i,r,o){let s=this.done,a=s[s.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!i||y8e.test(i))&&(!a.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(o,d8e(a.changes,e.changes))||i=="input.type.compose")?s=RS(s,s.length-1,r.minDepth,new ed(e.changes.compose(a.changes),eoe(ao.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,Xf)):s=RS(s,s.length,r.minDepth,e),new Eg(s,Xf,t,i)}addSelection(e,t,i,r){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Xf;return o.length>0&&t-this.prevTime<r&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&f8e(o[o.length-1],e)?this:new Eg(toe(this.done,e),this.undone,t,i)}addMapping(e){return new Eg(v8(this.done,e),v8(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,i){let r=e==0?this.done:this.undone;if(r.length==0)return null;let o=r[r.length-1],s=o.selectionsAfter[0]||t.selection;if(i&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:yD.of({side:e,rest:m8e(r),selection:s}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let a=r.length==1?Xf:r.slice(0,r.length-1);return o.mapped&&(a=v8(a,o.mapped)),t.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:yD.of({side:e,rest:a,selection:s}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Eg.empty=new Eg(Xf,Xf);const v8e=[{key:"Mod-z",run:Jre,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:vD,preventDefault:!0},{linux:"Ctrl-Shift-z",run:vD,preventDefault:!0},{key:"Mod-u",run:A8e,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:h8e,preventDefault:!0}];function Kx(n,e){return Sn.create(n.ranges.map(e),n.mainIndex)}function $g(n,e){return n.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Cm({state:n,dispatch:e},t){let i=Kx(n.selection,t);return i.eq(n.selection,!0)?!1:(e($g(n,i)),!0)}function v6(n,e){return Sn.cursor(e?n.to:n.from)}function noe(n,e){return Cm(n,t=>t.empty?n.moveByChar(t,e):v6(t,e))}function FA(n){return n.textDirectionAt(n.state.selection.main.head)==Za.LTR}const ioe=n=>noe(n,!FA(n)),roe=n=>noe(n,FA(n));function ooe(n,e){return Cm(n,t=>t.empty?n.moveByGroup(t,e):v6(t,e))}const b8e=n=>ooe(n,!FA(n)),C8e=n=>ooe(n,FA(n));function _8e(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function b6(n,e,t){let i=KA(n).resolveInner(e.head),r=t?To.closedBy:To.openedBy;for(let c=e.head;;){let A=t?i.childAfter(c):i.childBefore(c);if(!A)break;_8e(n,A,r)?i=A:c=t?A.to:A.from}let o=i.type.prop(r),s,a;return o&&(s=t?Sg(n,i.from,1):Sg(n,i.to,-1))&&s.matched?a=t?s.end.to:s.end.from:a=t?i.to:i.from,Sn.cursor(a,t?-1:1)}const x8e=n=>Cm(n,e=>b6(n.state,e,!FA(n))),M8e=n=>Cm(n,e=>b6(n.state,e,FA(n)));function soe(n,e){return Cm(n,t=>{if(!t.empty)return v6(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const aoe=n=>soe(n,!1),loe=n=>soe(n,!0);function uoe(n){let e=n.scrollDOM.clientHeight<n.scrollDOM.scrollHeight-2,t=0,i=0,r;if(e){for(let o of n.state.facet(wi.scrollMargins)){let s=o(n);s?.top&&(t=Math.max(s?.top,t)),s?.bottom&&(i=Math.max(s?.bottom,i))}r=n.scrollDOM.clientHeight-t-i}else r=(n.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:i,selfScroll:e,height:Math.max(n.defaultLineHeight,r-5)}}function coe(n,e){let t=uoe(n),{state:i}=n,r=Kx(i.selection,s=>s.empty?n.moveVertically(s,e,t.height):v6(s,e));if(r.eq(i.selection))return!1;let o;if(t.selfScroll){let s=n.coordsAtPos(i.selection.main.head),a=n.scrollDOM.getBoundingClientRect(),c=a.top+t.marginTop,A=a.bottom-t.marginBottom;s&&s.top>c&&s.bottom<A&&(o=wi.scrollIntoView(r.main.head,{y:"start",yMargin:s.top-c}))}return n.dispatch($g(i,r),{effects:o}),!0}const jW=n=>coe(n,!1),bD=n=>coe(n,!0);function rv(n,e,t){let i=n.lineBlockAt(e.head),r=n.moveToLineBoundary(e,t);if(r.head==e.head&&r.head!=(t?i.to:i.from)&&(r=n.moveToLineBoundary(e,t,!1)),!t&&r.head==i.from&&i.length){let o=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;o&&e.head!=i.from+o&&(r=Sn.cursor(i.from+o))}return r}const w8e=n=>Cm(n,e=>rv(n,e,!0)),S8e=n=>Cm(n,e=>rv(n,e,!1)),E8e=n=>Cm(n,e=>rv(n,e,!FA(n))),O8e=n=>Cm(n,e=>rv(n,e,FA(n))),B8e=n=>Cm(n,e=>Sn.cursor(n.lineBlockAt(e.head).from,1)),I8e=n=>Cm(n,e=>Sn.cursor(n.lineBlockAt(e.head).to,-1));function k8e(n,e,t){let i=!1,r=Kx(n.selection,o=>{let s=Sg(n,o.head,-1)||Sg(n,o.head,1)||o.head>0&&Sg(n,o.head-1,1)||o.head<n.doc.length&&Sg(n,o.head+1,-1);if(!s||!s.end)return o;i=!0;let a=s.start.from==o.head?s.end.to:s.end.from;return Sn.cursor(a)});return i?(e($g(n,r)),!0):!1}const T8e=({state:n,dispatch:e})=>k8e(n,e);function sp(n,e){let t=Kx(n.state.selection,i=>{let r=e(i);return Sn.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch($g(n.state,t)),!0)}function Aoe(n,e){return sp(n,t=>n.moveByChar(t,e))}const hoe=n=>Aoe(n,!FA(n)),doe=n=>Aoe(n,FA(n));function foe(n,e){return sp(n,t=>n.moveByGroup(t,e))}const R8e=n=>foe(n,!FA(n)),D8e=n=>foe(n,FA(n)),P8e=n=>sp(n,e=>b6(n.state,e,!FA(n))),U8e=n=>sp(n,e=>b6(n.state,e,FA(n)));function poe(n,e){return sp(n,t=>n.moveVertically(t,e))}const moe=n=>poe(n,!1),goe=n=>poe(n,!0);function yoe(n,e){return sp(n,t=>n.moveVertically(t,e,uoe(n).height))}const NW=n=>yoe(n,!1),GW=n=>yoe(n,!0),K8e=n=>sp(n,e=>rv(n,e,!0)),L8e=n=>sp(n,e=>rv(n,e,!1)),F8e=n=>sp(n,e=>rv(n,e,!FA(n))),z8e=n=>sp(n,e=>rv(n,e,FA(n))),j8e=n=>sp(n,e=>Sn.cursor(n.lineBlockAt(e.head).from)),N8e=n=>sp(n,e=>Sn.cursor(n.lineBlockAt(e.head).to)),WW=({state:n,dispatch:e})=>(e($g(n,{anchor:0})),!0),QW=({state:n,dispatch:e})=>(e($g(n,{anchor:n.doc.length})),!0),qW=({state:n,dispatch:e})=>(e($g(n,{anchor:n.selection.main.anchor,head:0})),!0),YW=({state:n,dispatch:e})=>(e($g(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),G8e=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),W8e=({state:n,dispatch:e})=>{let t=C6(n).map(({from:i,to:r})=>Sn.range(i,Math.min(r+1,n.doc.length)));return e(n.update({selection:Sn.create(t),userEvent:"select"})),!0},Q8e=({state:n,dispatch:e})=>{let t=Kx(n.selection,i=>{let r=KA(n),o=r.resolveStack(i.from,1);if(i.empty){let s=r.resolveStack(i.from,-1);s.node.from>=o.node.from&&s.node.to<=o.node.to&&(o=s)}for(let s=o;s;s=s.next){let{node:a}=s;if((a.from<i.from&&a.to>=i.to||a.to>i.to&&a.from<=i.from)&&s.next)return Sn.range(a.to,a.from)}return i});return t.eq(n.selection)?!1:(e($g(n,t)),!0)},q8e=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=Sn.create([t.main]):t.main.empty||(i=Sn.create([Sn.cursor(t.main.head)])),i?(e($g(n,i)),!0):!1};function pM(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,r=i.changeByRange(o=>{let{from:s,to:a}=o;if(s==a){let c=e(o);c<s?(t="delete.backward",c=E5(n,c,!1)):c>s&&(t="delete.forward",c=E5(n,c,!0)),s=Math.min(s,c),a=Math.max(a,c)}else s=E5(n,s,!1),a=E5(n,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:Sn.cursor(s,s<o.head?-1:1)}});return r.changes.empty?!1:(n.dispatch(i.update(r,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?wi.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function E5(n,e,t){if(n instanceof wi)for(let i of n.state.facet(wi.atomicRanges).map(r=>r(n)))i.between(e,e,(r,o)=>{r<e&&o>e&&(e=t?o:r)});return e}const voe=(n,e,t)=>pM(n,i=>{let r=i.from,{state:o}=n,s=o.doc.lineAt(r),a,c;if(t&&!e&&r>s.from&&r<s.from+200&&!/[^ \t]/.test(a=s.text.slice(0,r-s.from))){if(a[a.length-1]==" ")return r-1;let A=Ux(a,o.tabSize),m=A%IS(o)||IS(o);for(let v=0;v<m&&a[a.length-1-v]==" ";v++)r--;c=r}else c=uA(s.text,r-s.from,e,e)+s.from,c==r&&s.number!=(e?o.doc.lines:1)?c+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(s.text.slice(c-s.from,r-s.from))&&(c=uA(s.text,c-s.from,!1,!1)+s.from);return c}),CD=n=>voe(n,!1,!0),boe=n=>voe(n,!0,!1),Coe=(n,e)=>pM(n,t=>{let i=t.head,{state:r}=n,o=r.doc.lineAt(i),s=r.charCategorizer(i);for(let a=null;;){if(i==(e?o.to:o.from)){i==t.head&&o.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let c=uA(o.text,i-o.from,e)+o.from,A=o.text.slice(Math.min(i,c)-o.from,Math.max(i,c)-o.from),m=s(A);if(a!=null&&m!=a)break;(A!=" "||i!=t.head)&&(a=m),i=c}return i}),_oe=n=>Coe(n,!1),Y8e=n=>Coe(n,!0),$8e=n=>pM(n,e=>{let t=n.lineBlockAt(e.head).to;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),V8e=n=>pM(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),H8e=n=>pM(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),Z8e=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:vs.of(["",""])},range:Sn.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},X8e=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let r=i.from,o=n.doc.lineAt(r),s=r==o.from?r-1:uA(o.text,r-o.from,!1)+o.from,a=r==o.to?r+1:uA(o.text,r-o.from,!0)+o.from;return{changes:{from:s,to:a,insert:n.doc.slice(r,a).append(n.doc.slice(s,r))},range:Sn.cursor(a)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function C6(n){let e=[],t=-1;for(let i of n.selection.ranges){let r=n.doc.lineAt(i.from),o=n.doc.lineAt(i.to);if(!i.empty&&i.to==o.from&&(o=n.doc.lineAt(i.to-1)),t>=r.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(i)}else e.push({from:r.from,to:o.to,ranges:[i]});t=o.number+1}return e}function xoe(n,e,t){if(n.readOnly)return!1;let i=[],r=[];for(let o of C6(n)){if(t?o.to==n.doc.length:o.from==0)continue;let s=n.doc.lineAt(t?o.to+1:o.from-1),a=s.length+1;if(t){i.push({from:o.to,to:s.to},{from:o.from,insert:s.text+n.lineBreak});for(let c of o.ranges)r.push(Sn.range(Math.min(n.doc.length,c.anchor+a),Math.min(n.doc.length,c.head+a)))}else{i.push({from:s.from,to:o.from},{from:o.to,insert:n.lineBreak+s.text});for(let c of o.ranges)r.push(Sn.range(c.anchor-a,c.head-a))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:Sn.create(r,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const J8e=({state:n,dispatch:e})=>xoe(n,e,!1),e7e=({state:n,dispatch:e})=>xoe(n,e,!0);function Moe(n,e,t){if(n.readOnly)return!1;let i=[];for(let r of C6(n))t?i.push({from:r.from,insert:n.doc.slice(r.from,r.to)+n.lineBreak}):i.push({from:r.to,insert:n.lineBreak+n.doc.slice(r.from,r.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const t7e=({state:n,dispatch:e})=>Moe(n,e,!1),n7e=({state:n,dispatch:e})=>Moe(n,e,!0),i7e=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(C6(e).map(({from:r,to:o})=>(r>0?r--:o<e.doc.length&&o++,{from:r,to:o}))),i=Kx(e.selection,r=>{let o;if(n.lineWrapping){let s=n.lineBlockAt(r.head),a=n.coordsAtPos(r.head,r.assoc||1);a&&(o=s.bottom+n.documentTop-a.bottom+n.defaultLineHeight/2)}return n.moveVertically(r,!0,o)}).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function r7e(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=KA(n).resolveInner(e),i=t.childBefore(e),r=t.childAfter(e),o;return i&&r&&i.to<=e&&r.from>=e&&(o=i.type.prop(To.closedBy))&&o.indexOf(r.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(r.from).from&&!/\S/.test(n.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const $W=woe(!1),o7e=woe(!0);function woe(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:o,to:s}=r,a=e.doc.lineAt(o),c=!n&&o==s&&r7e(e,o);n&&(o=s=(s<=a.to?a:e.doc.lineAt(s)).to);let A=new m6(e,{simulateBreak:o,simulateDoubleBreak:!!c}),m=RK(A,o);for(m==null&&(m=Ux(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));s<a.to&&/\s/.test(a.text[s-a.from]);)s++;c?{from:o,to:s}=c:o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let v=["",f4(e,m)];return c&&v.push(f4(e,A.lineIndent(a.from,-1))),{changes:{from:o,to:s,insert:vs.of(v)},range:Sn.cursor(o+1+v[1].length)}});return t(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function KK(n,e){let t=-1;return n.changeByRange(i=>{let r=[];for(let s=i.from;s<=i.to;){let a=n.doc.lineAt(s);a.number>t&&(i.empty||i.to>a.from)&&(e(a,r,i),t=a.number),s=a.to+1}let o=n.changes(r);return{changes:r,range:Sn.range(o.mapPos(i.anchor,1),o.mapPos(i.head,1))}})}const s7e=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new m6(n,{overrideIndentation:o=>{let s=t[o];return s??-1}}),r=KK(n,(o,s,a)=>{let c=RK(i,o.from);if(c==null)return;/\S/.test(o.text)||(c=0);let A=/^\s*/.exec(o.text)[0],m=f4(n,c);(A!=m||a.from<o.from+A.length)&&(t[o.from]=c,s.push({from:o.from,to:o.from+A.length,insert:m}))});return r.changes.empty||e(n.update(r,{userEvent:"indent"})),!0},a7e=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(KK(n,(t,i)=>{i.push({from:t.from,insert:n.facet(TK)})}),{userEvent:"input.indent"})),!0),l7e=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(KK(n,(t,i)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let o=Ux(r,n.tabSize),s=0,a=f4(n,Math.max(0,o-IS(n)));for(;s<r.length&&s<a.length&&r.charCodeAt(s)==a.charCodeAt(s);)s++;i.push({from:t.from+s,to:t.from+r.length,insert:a.slice(s)})}),{userEvent:"delete.dedent"})),!0),u7e=n=>(n.setTabFocusMode(),!0),c7e=[{key:"Ctrl-b",run:ioe,shift:hoe,preventDefault:!0},{key:"Ctrl-f",run:roe,shift:doe},{key:"Ctrl-p",run:aoe,shift:moe},{key:"Ctrl-n",run:loe,shift:goe},{key:"Ctrl-a",run:B8e,shift:j8e},{key:"Ctrl-e",run:I8e,shift:N8e},{key:"Ctrl-d",run:boe},{key:"Ctrl-h",run:CD},{key:"Ctrl-k",run:$8e},{key:"Ctrl-Alt-h",run:_oe},{key:"Ctrl-o",run:Z8e},{key:"Ctrl-t",run:X8e},{key:"Ctrl-v",run:bD}],A7e=[{key:"ArrowLeft",run:ioe,shift:hoe,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:b8e,shift:R8e,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:E8e,shift:F8e,preventDefault:!0},{key:"ArrowRight",run:roe,shift:doe,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:C8e,shift:D8e,preventDefault:!0},{mac:"Cmd-ArrowRight",run:O8e,shift:z8e,preventDefault:!0},{key:"ArrowUp",run:aoe,shift:moe,preventDefault:!0},{mac:"Cmd-ArrowUp",run:WW,shift:qW},{mac:"Ctrl-ArrowUp",run:jW,shift:NW},{key:"ArrowDown",run:loe,shift:goe,preventDefault:!0},{mac:"Cmd-ArrowDown",run:QW,shift:YW},{mac:"Ctrl-ArrowDown",run:bD,shift:GW},{key:"PageUp",run:jW,shift:NW},{key:"PageDown",run:bD,shift:GW},{key:"Home",run:S8e,shift:L8e,preventDefault:!0},{key:"Mod-Home",run:WW,shift:qW},{key:"End",run:w8e,shift:K8e,preventDefault:!0},{key:"Mod-End",run:QW,shift:YW},{key:"Enter",run:$W,shift:$W},{key:"Mod-a",run:G8e},{key:"Backspace",run:CD,shift:CD},{key:"Delete",run:boe},{key:"Mod-Backspace",mac:"Alt-Backspace",run:_oe},{key:"Mod-Delete",mac:"Alt-Delete",run:Y8e},{mac:"Mod-Backspace",run:V8e},{mac:"Mod-Delete",run:H8e}].concat(c7e.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),h7e=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:x8e,shift:P8e},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:M8e,shift:U8e},{key:"Alt-ArrowUp",run:J8e},{key:"Shift-Alt-ArrowUp",run:t7e},{key:"Alt-ArrowDown",run:e7e},{key:"Shift-Alt-ArrowDown",run:n7e},{key:"Escape",run:q8e},{key:"Mod-Enter",run:o7e},{key:"Alt-l",mac:"Ctrl-l",run:W8e},{key:"Mod-i",run:Q8e,preventDefault:!0},{key:"Mod-[",run:l7e},{key:"Mod-]",run:a7e},{key:"Mod-Alt-\\",run:s7e},{key:"Shift-Mod-k",run:i7e},{key:"Shift-Mod-\\",run:T8e},{key:"Mod-/",run:t8e},{key:"Alt-A",run:i8e},{key:"Ctrl-m",mac:"Shift-Alt-m",run:u7e}].concat(A7e),VW=typeof String.prototype.normalize=="function"?n=>n.normalize("NFKD"):n=>n;class mx{constructor(e,t,i=0,r=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=o?a=>o(VW(a)):VW,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Hh(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=dK(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=vg(e);let r=this.normalize(t);if(r.length)for(let o=0,s=i;;o++){let a=r.charCodeAt(o),c=this.match(a,s,this.bufferPos+this.bufferStart);if(o==r.length-1){if(c)return this.value=c,this;break}s==i&&o<t.length&&t.charCodeAt(o)==a&&s++}}}match(e,t,i){let r=null;for(let o=0;o<this.matches.length;o+=2){let s=this.matches[o],a=!1;this.query.charCodeAt(s)==e&&(s==this.query.length-1?r={from:this.matches[o+1],to:i}:(this.matches[o]++,a=!0)),a||(this.matches.splice(o,2),o-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:i}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}typeof Symbol<"u"&&(mx.prototype[Symbol.iterator]=function(){return this});const Soe={from:-1,to:-1,match:/.*/.exec("")},LK="gm"+(/x/.unicode==null?"":"u");class Eoe{constructor(e,t,i,r=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=Soe,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new Ooe(e,t,i,r,o);this.re=new RegExp(t,LK+(i?.ignoreCase?"i":"")),this.test=i?.test,this.iter=e.iter();let s=e.lineAt(r);this.curLineStart=s.from,this.matchPos=DS(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,r=i+t[0].length;if(this.matchPos=DS(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<r||i>this.value.to)&&(!this.test||this.test(i,r,t)))return this.value={from:i,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const b8=new WeakMap;class G_{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,i){let r=b8.get(e);if(!r||r.from>=i||r.to<=t){let a=new G_(t,e.sliceString(t,i));return b8.set(e,a),a}if(r.from==t&&r.to==i)return r;let{text:o,from:s}=r;return s>t&&(o=e.sliceString(t,s)+o,s=t),r.to<i&&(o+=e.sliceString(r.to,i)),b8.set(e,new G_(s,o)),new G_(t,o.slice(t-s,i-s))}}class Ooe{constructor(e,t,i,r,o){this.text=e,this.to=o,this.done=!1,this.value=Soe,this.matchPos=DS(e,r),this.re=new RegExp(t,LK+(i?.ignoreCase?"i":"")),this.test=i?.test,this.flat=G_.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let i=this.flat.from+t.index,r=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,t)))return this.value={from:i,to:r,match:t},this.matchPos=DS(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=G_.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Eoe.prototype[Symbol.iterator]=Ooe.prototype[Symbol.iterator]=function(){return this});function d7e(n){try{return new RegExp(n,LK),!0}catch{return!1}}function DS(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e<t.to&&(i=t.text.charCodeAt(e-t.from))>=56320&&i<57344;)e++;return e}function _D(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=Ma("input",{class:"cm-textfield",name:"line",value:e}),i=Ma("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),n.dispatch({effects:v3.of(!1)}),n.focus()):o.keyCode==13&&(o.preventDefault(),r())},onsubmit:o=>{o.preventDefault(),r()}},Ma("label",n.state.phrase("Go to line"),": ",t)," ",Ma("button",{class:"cm-button",type:"submit"},n.state.phrase("go")),Ma("button",{name:"close",onclick:()=>{n.dispatch({effects:v3.of(!1)}),n.focus()},"aria-label":n.state.phrase("close"),type:"button"},["×"]));function r(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!o)return;let{state:s}=n,a=s.doc.lineAt(s.selection.main.head),[,c,A,m,v]=o,x=m?+m.slice(1):0,_=A?+A:a.number;if(A&&v){let F=_/100;c&&(F=F*(c=="-"?-1:1)+a.number/s.doc.lines),_=Math.round(s.doc.lines*F)}else A&&c&&(_=_*(c=="-"?-1:1)+a.number);let O=s.doc.line(Math.max(1,Math.min(s.doc.lines,_))),P=Sn.cursor(O.from+Math.max(0,Math.min(x,O.length)));n.dispatch({effects:[v3.of(!1),wi.scrollIntoView(P.from,{y:"center"})],selection:P}),n.focus()}return{dom:i}}const v3=ao.define(),HW=ac.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(v3)&&(n=t.value);return n},provide:n=>h4.from(n,e=>e?_D:null)}),f7e=n=>{let e=A4(n,_D);if(!e){let t=[v3.of(!0)];n.state.field(HW,!1)==null&&t.push(ao.appendConfig.of([HW,p7e])),n.dispatch({effects:t}),e=A4(n,_D)}return e&&e.dom.querySelector("input").select(),!0},p7e=wi.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),m7e={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},g7e=ki.define({combine(n){return bm(n,m7e,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function y7e(n){return[x7e,_7e]}const v7e=Er.mark({class:"cm-selectionMatch"}),b7e=Er.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function ZW(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=ul.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=ul.Word)}function C7e(n,e,t,i){return n(e.sliceDoc(t,t+1))==ul.Word&&n(e.sliceDoc(i-1,i))==ul.Word}const _7e=lu.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(g7e),{state:t}=n,i=t.selection;if(i.ranges.length>1)return Er.none;let r=i.main,o,s=null;if(r.empty){if(!e.highlightWordAroundCursor)return Er.none;let c=t.wordAt(r.head);if(!c)return Er.none;s=t.charCategorizer(r.head),o=t.sliceDoc(c.from,c.to)}else{let c=r.to-r.from;if(c<e.minSelectionLength||c>200)return Er.none;if(e.wholeWords){if(o=t.sliceDoc(r.from,r.to),s=t.charCategorizer(r.head),!(ZW(s,t,r.from,r.to)&&C7e(s,t,r.from,r.to)))return Er.none}else if(o=t.sliceDoc(r.from,r.to),!o)return Er.none}let a=[];for(let c of n.visibleRanges){let A=new mx(t.doc,o,c.from,c.to);for(;!A.next().done;){let{from:m,to:v}=A.value;if((!s||ZW(s,t,m,v))&&(r.empty&&m<=r.from&&v>=r.to?a.push(b7e.range(m,v)):(m>=r.to||v<=r.from)&&a.push(v7e.range(m,v)),a.length>e.maxMatches))return Er.none}}return Er.set(a)}},{decorations:n=>n.decorations}),x7e=wi.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),M7e=({state:n,dispatch:e})=>{let{selection:t}=n,i=Sn.create(t.ranges.map(r=>n.wordAt(r.head)||Sn.cursor(r.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function w7e(n,e){let{main:t,ranges:i}=n.selection,r=n.wordAt(t.head),o=r&&r.from==t.from&&r.to==t.to;for(let s=!1,a=new mx(n.doc,e,i[i.length-1].to);;)if(a.next(),a.done){if(s)return null;a=new mx(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),s=!0}else{if(s&&i.some(c=>c.from==a.value.from))continue;if(o){let c=n.wordAt(a.value.from);if(!c||c.from!=a.value.from||c.to!=a.value.to)continue}return a.value}}const S7e=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(o=>o.from===o.to))return M7e({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(o=>n.sliceDoc(o.from,o.to)!=i))return!1;let r=w7e(n,i);return r?(e(n.update({selection:n.selection.addRange(Sn.range(r.from,r.to),!1),effects:wi.scrollIntoView(r.to)})),!0):!1},Lx=ki.define({combine(n){return bm(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new L7e(e),scrollToMatch:e=>wi.scrollIntoView(e)})}});class Boe{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||d7e(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?`
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new I7e(this):new O7e(this)}getCursor(e,t=0,i){let r=e.doc?e:ys.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?p_(this,r,t,i):f_(this,r,t,i)}}class Ioe{constructor(e){this.spec=e}}function f_(n,e,t,i){return new mx(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:r=>r.toLowerCase(),n.wholeWord?E7e(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function E7e(n,e){return(t,i,r,o)=>((o>t||o+r.length<i)&&(o=Math.max(0,t-2),r=n.sliceString(o,Math.min(n.length,i+2))),(e(PS(r,t-o))!=ul.Word||e(US(r,t-o))!=ul.Word)&&(e(US(r,i-o))!=ul.Word||e(PS(r,i-o))!=ul.Word))}class O7e extends Ioe{constructor(e){super(e)}nextMatch(e,t,i){let r=f_(this.spec,e,i,e.doc.length).nextOverlapping();if(r.done){let o=Math.min(e.doc.length,t+this.spec.unquoted.length);r=f_(this.spec,e,0,o).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==i?null:r.value}prevMatchInRange(e,t,i){for(let r=i;;){let o=Math.max(t,r-1e4-this.spec.unquoted.length),s=f_(this.spec,e,o,r),a=null;for(;!s.nextOverlapping().done;)a=s.value;if(a)return a;if(o==t)return null;r-=1e4}}prevMatch(e,t,i){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=i)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let i=f_(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let o=f_(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}function p_(n,e,t,i){return new Eoe(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?B7e(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function PS(n,e){return n.slice(uA(n,e,!1),e)}function US(n,e){return n.slice(e,uA(n,e))}function B7e(n){return(e,t,i)=>!i[0].length||(n(PS(i.input,i.index))!=ul.Word||n(US(i.input,i.index))!=ul.Word)&&(n(US(i.input,i.index+i[0].length))!=ul.Word||n(PS(i.input,i.index+i[0].length))!=ul.Word)}class I7e extends Ioe{nextMatch(e,t,i){let r=p_(this.spec,e,i,e.doc.length).next();return r.done&&(r=p_(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,i){for(let r=1;;r++){let o=Math.max(t,i-r*1e4),s=p_(this.spec,e,o,i),a=null;for(;!s.next().done;)a=s.value;if(a&&(o==t||a.from>o+10))return a;if(o==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let o=+i.slice(0,r);if(o>0&&o<e.match.length)return e.match[o]+i.slice(r)}return t})}matchAll(e,t){let i=p_(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let o=p_(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}const p4=ao.define(),FK=ao.define(),Qy=ac.define({create(n){return new C8(xD(n).create(),null)},update(n,e){for(let t of e.effects)t.is(p4)?n=new C8(t.value.create(),n.panel):t.is(FK)&&(n=new C8(n.query,t.value?zK:null));return n},provide:n=>h4.from(n,e=>e.panel)});class C8{constructor(e,t){this.query=e,this.panel=t}}const k7e=Er.mark({class:"cm-searchMatch"}),T7e=Er.mark({class:"cm-searchMatch cm-searchMatch-selected"}),R7e=lu.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Qy))}update(n){let e=n.state.field(Qy);(e!=n.startState.field(Qy)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Er.none;let{view:t}=this,i=new t1;for(let r=0,o=t.visibleRanges,s=o.length;r<s;r++){let{from:a,to:c}=o[r];for(;r<s-1&&c>o[r+1].from-500;)c=o[++r].to;n.highlight(t.state,a,c,(A,m)=>{let v=t.state.selection.ranges.some(x=>x.from==A&&x.to==m);i.add(A,m,v?T7e:k7e)})}return i.finish()}},{decorations:n=>n.decorations});function mM(n){return e=>{let t=e.state.field(Qy,!1);return t&&t.query.spec.valid?n(e,t):Roe(e)}}const KS=mM((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let r=Sn.single(i.from,i.to),o=n.state.facet(Lx);return n.dispatch({selection:r,effects:[jK(n,i),o.scrollToMatch(r.main,n)],userEvent:"select.search"}),Toe(n),!0}),LS=mM((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,r=e.prevMatch(t,i,i);if(!r)return!1;let o=Sn.single(r.from,r.to),s=n.state.facet(Lx);return n.dispatch({selection:o,effects:[jK(n,r),s.scrollToMatch(o.main,n)],userEvent:"select.search"}),Toe(n),!0}),D7e=mM((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:Sn.create(t.map(i=>Sn.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),P7e=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:r}=t.main,o=[],s=0;for(let a=new mx(n.doc,n.sliceDoc(i,r));!a.next().done;){if(o.length>1e3)return!1;a.value.from==i&&(s=o.length),o.push(Sn.range(a.value.from,a.value.to))}return e(n.update({selection:Sn.create(o,s),userEvent:"select.search.matches"})),!0},XW=mM((n,{query:e})=>{let{state:t}=n,{from:i,to:r}=t.selection.main;if(t.readOnly)return!1;let o=e.nextMatch(t,i,i);if(!o)return!1;let s=o,a=[],c,A,m=[];s.from==i&&s.to==r&&(A=t.toText(e.getReplacement(s)),a.push({from:s.from,to:s.to,insert:A}),s=e.nextMatch(t,s.from,s.to),m.push(wi.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+".")));let v=n.state.changes(a);return s&&(c=Sn.single(s.from,s.to).map(v),m.push(jK(n,s)),m.push(t.facet(Lx).scrollToMatch(c.main,n))),n.dispatch({changes:v,selection:c,effects:m,userEvent:"input.replace"}),!0}),U7e=mM((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(r=>{let{from:o,to:s}=r;return{from:o,to:s,insert:e.getReplacement(r)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:wi.announce.of(i),userEvent:"input.replace.all"}),!0});function zK(n){return n.state.facet(Lx).createPanel(n)}function xD(n,e){var t,i,r,o,s;let a=n.selection.main,c=a.empty||a.to>a.from+100?"":n.sliceDoc(a.from,a.to);if(e&&!c)return e;let A=n.facet(Lx);return new Boe({search:((t=e?.literal)!==null&&t!==void 0?t:A.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(i=e?.caseSensitive)!==null&&i!==void 0?i:A.caseSensitive,literal:(r=e?.literal)!==null&&r!==void 0?r:A.literal,regexp:(o=e?.regexp)!==null&&o!==void 0?o:A.regexp,wholeWord:(s=e?.wholeWord)!==null&&s!==void 0?s:A.wholeWord})}function koe(n){let e=A4(n,zK);return e&&e.dom.querySelector("[main-field]")}function Toe(n){let e=koe(n);e&&e==n.root.activeElement&&e.select()}const Roe=n=>{let e=n.state.field(Qy,!1);if(e&&e.panel){let t=koe(n);if(t&&t!=n.root.activeElement){let i=xD(n.state,e.query.spec);i.valid&&n.dispatch({effects:p4.of(i)}),t.focus(),t.select()}}else n.dispatch({effects:[FK.of(!0),e?p4.of(xD(n.state,e.query.spec)):ao.appendConfig.of(z7e)]});return!0},Doe=n=>{let e=n.state.field(Qy,!1);if(!e||!e.panel)return!1;let t=A4(n,zK);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:FK.of(!1)}),!0},K7e=[{key:"Mod-f",run:Roe,scope:"editor search-panel"},{key:"F3",run:KS,shift:LS,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:KS,shift:LS,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Doe,scope:"editor search-panel"},{key:"Mod-Shift-l",run:P7e},{key:"Mod-Alt-g",run:f7e},{key:"Mod-d",run:S7e,preventDefault:!0}];class L7e{constructor(e){this.view=e;let t=this.query=e.state.field(Qy).query.spec;this.commit=this.commit.bind(this),this.searchField=Ma("input",{value:t.search,placeholder:Wd(e,"Find"),"aria-label":Wd(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ma("input",{value:t.replace,placeholder:Wd(e,"Replace"),"aria-label":Wd(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Ma("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Ma("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Ma("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(r,o,s){return Ma("button",{class:"cm-button",name:r,onclick:o,type:"button"},s)}this.dom=Ma("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>KS(e),[Wd(e,"next")]),i("prev",()=>LS(e),[Wd(e,"previous")]),i("select",()=>D7e(e),[Wd(e,"all")]),Ma("label",null,[this.caseField,Wd(e,"match case")]),Ma("label",null,[this.reField,Wd(e,"regexp")]),Ma("label",null,[this.wordField,Wd(e,"by word")]),...e.state.readOnly?[]:[Ma("br"),this.replaceField,i("replace",()=>XW(e),[Wd(e,"replace")]),i("replaceAll",()=>U7e(e),[Wd(e,"replace all")])],Ma("button",{name:"close",onclick:()=>Doe(e),"aria-label":Wd(e,"close"),type:"button"},["×"])])}commit(){let e=new Boe({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:p4.of(e)}))}keydown(e){$6e(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?LS:KS)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),XW(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(p4)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Lx).top}}function Wd(n,e){return n.state.phrase(e)}const O5=30,B5=/[\s\.,:;?!]/;function jK(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),r=n.state.doc.lineAt(t).to,o=Math.max(i.from,e-O5),s=Math.min(r,t+O5),a=n.state.sliceDoc(o,s);if(o!=i.from){for(let c=0;c<O5;c++)if(!B5.test(a[c+1])&&B5.test(a[c])){a=a.slice(c);break}}if(s!=r){for(let c=a.length-1;c>a.length-O5;c--)if(!B5.test(a[c-1])&&B5.test(a[c])){a=a.slice(0,c);break}}return wi.announce.of(`${n.state.phrase("current match")}. ${a} ${n.state.phrase("on line")} ${i.number}.`)}const F7e=wi.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),z7e=[Qy,Qb.low(R7e),F7e];class Poe{constructor(e,t,i,r){this.state=e,this.pos=t,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=KA(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),r=t.text.slice(i-t.from,this.pos-t.from),o=r.search(Uoe(e,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function JW(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function j7e(n){let e=Object.create(null),t=Object.create(null);for(let{label:r}of n){e[r[0]]=!0;for(let o=1;o<r.length;o++)t[r[o]]=!0}let i=JW(e)+JW(t)+"*$";return[new RegExp("^"+i),new RegExp(i)]}function N7e(n){let e=n.map(r=>typeof r=="string"?{label:r}:r),[t,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:j7e(e);return r=>{let o=r.matchBefore(i);return o||r.explicit?{from:o?o.from:r.pos,options:e,validFor:t}:null}}class eQ{constructor(e,t,i,r){this.completion=e,this.source=t,this.match=i,this.score=r}}function vb(n){return n.selection.main.from}function Uoe(n,e){var t;let{source:i}=n,r=e&&i[0]!="^",o=i[i.length-1]!="$";return!r&&!o?n:new RegExp(`${r?"^":""}(?:${i})${o?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const Koe=l1.define();function G7e(n,e,t,i){let{main:r}=n.selection,o=t-r.from,s=i-r.from;return{...n.changeByRange(a=>{if(a!=r&&t!=i&&n.sliceDoc(a.from+o,a.from+s)!=n.sliceDoc(t,i))return{range:a};let c=n.toText(e);return{changes:{from:a.from+o,to:i==r.from?a.to:a.from+s,insert:c},range:Sn.cursor(a.from+o+c.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const tQ=new WeakMap;function W7e(n){if(!Array.isArray(n))return n;let e=tQ.get(n);return e||tQ.set(n,e=N7e(n)),e}const FS=ao.define(),m4=ao.define();class Q7e{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let i=Hh(e,t),r=vg(i);this.chars.push(i);let o=e.slice(t,t+r),s=o.toUpperCase();this.folded.push(Hh(s==o?o.toLowerCase():s,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:i,any:r,precise:o,byWord:s}=this;if(t.length==1){let Q=Hh(e,0),V=vg(Q),H=V==e.length?0:-100;if(Q!=t[0])if(Q==i[0])H+=-200;else return null;return this.ret(H,[0,V])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=t.length,A=0;if(a<0){for(let Q=0,V=Math.min(e.length,200);Q<V&&A<c;){let H=Hh(e,Q);(H==t[A]||H==i[A])&&(r[A++]=Q),Q+=vg(H)}if(A<c)return null}let m=0,v=0,x=!1,_=0,O=-1,P=-1,F=/[a-z]/.test(e),j=!0;for(let Q=0,V=Math.min(e.length,200),H=0;Q<V&&v<c;){let G=Hh(e,Q);a<0&&(m<c&&G==t[m]&&(o[m++]=Q),_<c&&(G==t[_]||G==i[_]?(_==0&&(O=Q),P=Q+1,_++):_=0));let Y,z=G<255?G>=48&&G<=57||G>=97&&G<=122?2:G>=65&&G<=90?1:0:(Y=dK(G))!=Y.toLowerCase()?1:Y!=Y.toUpperCase()?2:0;(!Q||z==1&&F||H==0&&z!=0)&&(t[v]==G||i[v]==G&&(x=!0)?s[v++]=Q:s.length&&(j=!1)),H=z,Q+=vg(G)}return v==c&&s[0]==0&&j?this.result(-100+(x?-200:0),s,e):_==c&&O==0?this.ret(-200-e.length+(P==e.length?0:-100),[0,P]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):_==c?this.ret(-900-e.length,[O,P]):v==c?this.result(-100+(x?-200:0)+-700+(j?0:-1100),s,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,i){let r=[],o=0;for(let s of t){let a=s+(this.astral?vg(Hh(i,s)):1);o&&r[o-1]==s?r[o-1]=a:(r[o++]=s,r[o++]=a)}return this.ret(e-i.length,r)}}class q7e{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),i=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return i==null?null:(this.matched=[0,t.length],this.score=i+(e.length==this.pattern.length?0:-100),this)}}const Fc=ki.define({combine(n){return bm(n,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Y7e,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>nQ(e(i),t(i)),optionClass:(e,t)=>i=>nQ(e(i),t(i)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function nQ(n,e){return n?e?n+" "+e:n:e}function Y7e(n,e,t,i,r,o){let s=n.textDirection==Za.RTL,a=s,c=!1,A="top",m,v,x=e.left-r.left,_=r.right-e.right,O=i.right-i.left,P=i.bottom-i.top;if(a&&x<Math.min(O,_)?a=!1:!a&&_<Math.min(O,x)&&(a=!0),O<=(a?x:_))m=Math.max(r.top,Math.min(t.top,r.bottom-P))-e.top,v=Math.min(400,a?x:_);else{c=!0,v=Math.min(400,(s?e.right:r.right-e.left)-30);let Q=r.bottom-e.bottom;Q>=P||Q>e.top?m=t.bottom-e.top:(A="bottom",m=e.bottom-t.top)}let F=(e.bottom-e.top)/o.offsetHeight,j=(e.right-e.left)/o.offsetWidth;return{style:`${A}: ${m/F}px; max-width: ${v/j}px`,class:"cm-completionInfo-"+(c?s?"left-narrow":"right-narrow":a?"left":"right")}}function $7e(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,r,o){let s=document.createElement("span");s.className="cm-completionLabel";let a=t.displayLabel||t.label,c=0;for(let A=0;A<o.length;){let m=o[A++],v=o[A++];m>c&&s.appendChild(document.createTextNode(a.slice(c,m)));let x=s.appendChild(document.createElement("span"));x.appendChild(document.createTextNode(a.slice(m,v))),x.className="cm-completionMatchedText",c=v}return c<a.length&&s.appendChild(document.createTextNode(a.slice(c))),s},position:50},{render(t){if(!t.detail)return null;let i=document.createElement("span");return i.className="cm-completionDetail",i.textContent=t.detail,i},position:80}),e.sort((t,i)=>t.position-i.position).map(t=>t.render)}function _8(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let r=Math.floor(e/t);return{from:r*t,to:(r+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class V7e{constructor(e,t,i){this.view=e,this.stateField=t,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:o,selected:s}=r.open,a=e.state.facet(Fc);this.optionContent=$7e(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=_8(o.length,s,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",c=>{let{options:A}=e.state.field(t).open;for(let m=c.target,v;m&&m!=this.dom;m=m.parentNode)if(m.nodeName=="LI"&&(v=/-(\d+)$/.exec(m.id))&&+v[1]<A.length){this.applyCompletion(e,A[+v[1]]),c.preventDefault();return}}),this.dom.addEventListener("focusout",c=>{let A=e.state.field(this.stateField,!1);A&&A.tooltip&&e.state.facet(Fc).closeOnBlur&&c.relatedTarget!=e.contentDOM&&e.dispatch({effects:m4.of(null)})}),this.showOptions(o,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:o,selected:s,disabled:a}=i.open;(!r.open||r.open.options!=o)&&(this.range=_8(o.length,s,e.state.facet(Fc).maxRenderedOptions),this.showOptions(o,i.id)),this.updateSel(),a!=((t=r.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=_8(t.options.length,t.selected,this.view.state.facet(Fc).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:r}=i;if(!r)return;let o=typeof r=="string"?document.createTextNode(r):r(i);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,i)}).catch(s=>lh(this.view.state,s,"completion info")):this.addInfoPane(o,i)}}addInfoPane(e,t){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:o}=e;i.appendChild(r),this.infoDestroy=o||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&Z7e(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:s.clientWidth,bottom:s.clientHeight}}return r.top>Math.min(o.bottom,t.bottom)-10||r.bottom<Math.max(o.top,t.top)+10?null:this.view.state.facet(Fc).positionInfo(this.view,t,r,i,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,i){const r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",s=>{s.target==r&&s.preventDefault()});let o=null;for(let s=i.from;s<i.to;s++){let{completion:a,match:c}=e[s],{section:A}=a;if(A){let x=typeof A=="string"?A:A.name;if(x!=o&&(s>i.from||i.from==0))if(o=x,typeof A!="string"&&A.header)r.appendChild(A.header(A));else{let _=r.appendChild(document.createElement("completion-section"));_.textContent=x}}const m=r.appendChild(document.createElement("li"));m.id=t+"-"+s,m.setAttribute("role","option");let v=this.optionClass(a);v&&(m.className=v);for(let x of this.optionContent){let _=x(a,this.view.state,this.view,c);_&&m.appendChild(_)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function H7e(n,e){return t=>new V7e(t,n,e)}function Z7e(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect(),r=t.height/n.offsetHeight;i.top<t.top?n.scrollTop-=(t.top-i.top)/r:i.bottom>t.bottom&&(n.scrollTop+=(i.bottom-t.bottom)/r)}function iQ(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function X7e(n,e){let t=[],i=null,r=A=>{t.push(A);let{section:m}=A.completion;if(m){i||(i=[]);let v=typeof m=="string"?m:m.name;i.some(x=>x.name==v)||i.push(typeof m=="string"?{name:v}:m)}},o=e.facet(Fc);for(let A of n)if(A.hasResult()){let m=A.result.getMatch;if(A.result.filter===!1)for(let v of A.result.options)r(new eQ(v,A.source,m?m(v):[],1e9-t.length));else{let v=e.sliceDoc(A.from,A.to),x,_=o.filterStrict?new q7e(v):new Q7e(v);for(let O of A.result.options)if(x=_.match(O.label)){let P=O.displayLabel?m?m(O,x.matched):[]:x.matched;r(new eQ(O,A.source,P,x.score+(O.boost||0)))}}}if(i){let A=Object.create(null),m=0,v=(x,_)=>{var O,P;return((O=x.rank)!==null&&O!==void 0?O:1e9)-((P=_.rank)!==null&&P!==void 0?P:1e9)||(x.name<_.name?-1:1)};for(let x of i.sort(v))m-=1e5,A[x.name]=m;for(let x of t){let{section:_}=x.completion;_&&(x.score+=A[typeof _=="string"?_:_.name])}}let s=[],a=null,c=o.compareCompletions;for(let A of t.sort((m,v)=>v.score-m.score||c(m.completion,v.completion))){let m=A.completion;!a||a.label!=m.label||a.detail!=m.detail||a.type!=null&&m.type!=null&&a.type!=m.type||a.apply!=m.apply||a.boost!=m.boost?s.push(A):iQ(A.completion)>iQ(a)&&(s[s.length-1]=A),a=A.completion}return s}class w_{constructor(e,t,i,r,o,s){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=r,this.selected=o,this.disabled=s}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new w_(this.options,rQ(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,r,o,s){if(r&&!s&&e.some(A=>A.isPending))return r.setDisabled();let a=X7e(e,t);if(!a.length)return r&&e.some(A=>A.isPending)?r.setDisabled():null;let c=t.facet(Fc).selectOnOpen?0:-1;if(r&&r.selected!=c&&r.selected!=-1){let A=r.options[r.selected].completion;for(let m=0;m<a.length;m++)if(a[m].completion==A){c=m;break}}return new w_(a,rQ(i,c),{pos:e.reduce((A,m)=>m.hasResult()?Math.min(A,m.from):A,1e8),create:rIe,above:o.aboveCursor},r?r.timestamp:Date.now(),c,!1)}map(e){return new w_(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new w_(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class zS{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new zS(nIe,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(Fc),o=(i.override||t.languageDataAt("autocomplete",vb(t)).map(W7e)).map(c=>(this.active.find(m=>m.source==c)||new Jf(c,this.active.some(m=>m.state!=0)?1:0)).update(e,i));o.length==this.active.length&&o.every((c,A)=>c==this.active[A])&&(o=this.active);let s=this.open,a=e.effects.some(c=>c.is(NK));s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(c=>c.hasResult()&&e.changes.touchesRange(c.from,c.to))||!J7e(o,this.active)||a?s=w_.build(o,t,this.id,s,i,a):s&&s.disabled&&!o.some(c=>c.isPending)&&(s=null),!s&&o.every(c=>!c.isPending)&&o.some(c=>c.hasResult())&&(o=o.map(c=>c.hasResult()?new Jf(c.source,0):c));for(let c of e.effects)c.is(Foe)&&(s=s&&s.setSelected(c.value,this.id));return o==this.active&&s==this.open?this:new zS(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?eIe:tIe}}function J7e(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t<n.length&&!n[t].hasResult();)t++;for(;i<e.length&&!e[i].hasResult();)i++;let r=t==n.length,o=i==e.length;if(r||o)return r==o;if(n[t++].result!=e[i++].result)return!1}}const eIe={"aria-autocomplete":"list"},tIe={};function rQ(n,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":n};return e>-1&&(t["aria-activedescendant"]=n+"-"+e),t}const nIe=[];function Loe(n,e){if(n.isUserEvent("input.complete")){let i=n.annotation(Koe);if(i&&e.activateOnCompletion(i))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Jf{constructor(e,t,i=!1){this.source=e,this.state=t,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let i=Loe(e,t),r=this;(i&8||i&16&&this.touches(e))&&(r=new Jf(r.source,0)),i&4&&r.state==0&&(r=new Jf(this.source,1)),r=r.updateFor(e,i);for(let o of e.effects)if(o.is(FS))r=new Jf(r.source,1,o.value);else if(o.is(m4))r=new Jf(r.source,0);else if(o.is(NK))for(let s of o.value)s.source==r.source&&(r=s);return r}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(vb(e.state))}}class W_ extends Jf{constructor(e,t,i,r,o,s){super(e,3,t),this.limit=i,this.result=r,this.from=o,this.to=s}hasResult(){return!0}updateFor(e,t){var i;if(!(t&3))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let o=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),a=vb(e.state);if(a>s||!r||t&2&&(vb(e.startState)==this.from||a<this.limit))return new Jf(this.source,t&4?1:0);let c=e.changes.mapPos(this.limit);return iIe(r.validFor,e.state,o,s)?new W_(this.source,this.explicit,c,r,o,s):r.update&&(r=r.update(r,o,s,new Poe(e.state,a,!1)))?new W_(this.source,this.explicit,c,r,r.from,(i=r.to)!==null&&i!==void 0?i:vb(e.state)):new Jf(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new W_(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Jf(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function iIe(n,e,t,i){if(!n)return!1;let r=e.sliceDoc(t,i);return typeof n=="function"?n(r,t,i,e):Uoe(n,!0).test(r)}const NK=ao.define({map(n,e){return n.map(t=>t.map(e))}}),Foe=ao.define(),Xh=ac.define({create(){return zS.start()},update(n,e){return n.update(e)},provide:n=>[f6.from(n,e=>e.tooltip),wi.contentAttributes.from(n,e=>e.attrs)]});function GK(n,e){const t=e.completion.apply||e.completion.label;let i=n.state.field(Xh).active.find(r=>r.source==e.source);return i instanceof W_?(typeof t=="string"?n.dispatch({...G7e(n.state,t,i.from,i.to),annotations:Koe.of(e.completion)}):t(n,e.completion,i.from,i.to),!0):!1}const rIe=H7e(Xh,GK);function I5(n,e="option"){return t=>{let i=t.state.field(Xh,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp<t.state.facet(Fc).interactionDelay)return!1;let r=1,o;e=="page"&&(o=Cre(t,i.open.tooltip))&&(r=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=i.open.options,a=i.open.selected>-1?i.open.selected+r*(n?1:-1):n?0:s-1;return a<0?a=e=="page"?0:s-1:a>=s&&(a=e=="page"?s-1:0),t.dispatch({effects:Foe.of(a)}),!0}}const oIe=n=>{let e=n.state.field(Xh,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<n.state.facet(Fc).interactionDelay?!1:GK(n,e.open.options[e.open.selected])},x8=n=>n.state.field(Xh,!1)?(n.dispatch({effects:FS.of(!0)}),!0):!1,sIe=n=>{let e=n.state.field(Xh,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:m4.of(null)}),!0)};class aIe{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const lIe=50,uIe=1e3,cIe=lu.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(Xh).active)e.isPending&&this.startQuery(e)}update(n){let e=n.state.field(Xh),t=n.state.facet(Fc);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Xh)==e)return;let i=n.transactions.some(o=>{let s=Loe(o,t);return s&8||(o.selection||o.docChanged)&&!(s&3)});for(let o=0;o<this.running.length;o++){let s=this.running[o];if(i||s.context.abortOnDocChange&&n.docChanged||s.updates.length+n.transactions.length>lIe&&Date.now()-s.time>uIe){for(let a of s.context.abortListeners)try{a()}catch(c){lh(this.view.state,c)}s.context.abortListeners=null,this.running.splice(o--,1)}else s.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(o=>o.effects.some(s=>s.is(FS)))&&(this.pendingStart=!0);let r=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(s=>s.active.source==o.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let o of n.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(Xh);for(let t of e.active)t.isPending&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Fc).updateSyncTime))}startQuery(n){let{state:e}=this.view,t=vb(e),i=new Poe(e,t,n.explicit,this.view),r=new aIe(n,i);this.running.push(r),Promise.resolve(n.source(i)).then(o=>{r.context.aborted||(r.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:m4.of(null)}),lh(this.view.state,o)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Fc).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Fc),i=this.view.state.field(Xh);for(let r=0;r<this.running.length;r++){let o=this.running[r];if(o.done===void 0)continue;if(this.running.splice(r--,1),o.done){let a=vb(o.updates.length?o.updates[0].startState:this.view.state),c=Math.min(a,o.done.from+(o.active.explicit?0:1)),A=new W_(o.active.source,o.active.explicit,c,o.done,o.done.from,(n=o.done.to)!==null&&n!==void 0?n:a);for(let m of o.updates)A=A.update(m,t);if(A.hasResult()){e.push(A);continue}}let s=i.active.find(a=>a.source==o.active.source);if(s&&s.isPending)if(o.done==null){let a=new Jf(o.active.source,0);for(let c of o.updates)a=a.update(c,t);a.isPending||e.push(a)}else this.startQuery(s)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:NK.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Xh,!1);if(e&&e.tooltip&&this.view.state.facet(Fc).closeOnBlur){let t=e.open&&Cre(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:m4.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:FS.of(!1)}),20),this.composing=0}}}),AIe=typeof navigator=="object"&&/Win/.test(navigator.platform),hIe=Qb.highest(wi.domEventHandlers({keydown(n,e){let t=e.state.field(Xh,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(AIe&&n.altKey)||n.metaKey)return!1;let i=t.open.options[t.open.selected],r=t.active.find(s=>s.source==i.source),o=i.completion.commitCharacters||r.result.commitCharacters;return o&&o.indexOf(n.key)>-1&&GK(e,i),!1}})),dIe=wi.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"''"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),g4={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ab=ao.define({map(n,e){let t=e.mapPos(n,-1,sh.TrackAfter);return t??void 0}}),WK=new class extends kb{};WK.startSide=1;WK.endSide=-1;const zoe=ac.define({create(){return Xo.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:i=>i>=t.from&&i<=t.to})}for(let t of e.effects)t.is(ab)&&(n=n.update({add:[WK.range(t.value,t.value+1)]}));return n}});function fIe(){return[mIe,zoe]}const M8="()[]{}<>«»»«[]{}";function joe(n){for(let e=0;e<M8.length;e+=2)if(M8.charCodeAt(e)==n)return M8.charAt(e+1);return dK(n<128?n:n+1)}function Noe(n,e){return n.languageDataAt("closeBrackets",e)[0]||g4}const pIe=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),mIe=wi.inputHandler.of((n,e,t,i)=>{if((pIe?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let r=n.state.selection.main;if(i.length>2||i.length==2&&vg(Hh(i,0))==1||e!=r.from||t!=r.to)return!1;let o=vIe(n.state,i);return o?(n.dispatch(o),!0):!1}),gIe=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=Noe(n,n.selection.main.head).brackets||g4.brackets,r=null,o=n.changeByRange(s=>{if(s.empty){let a=bIe(n.doc,s.head);for(let c of i)if(c==a&&_6(n.doc,s.head)==joe(Hh(c,0)))return{changes:{from:s.head-c.length,to:s.head+c.length},range:Sn.cursor(s.head-c.length)}}return{range:r=s}});return r||e(n.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},yIe=[{key:"Backspace",run:gIe}];function vIe(n,e){let t=Noe(n,n.selection.main.head),i=t.brackets||g4.brackets;for(let r of i){let o=joe(Hh(r,0));if(e==r)return o==r?xIe(n,r,i.indexOf(r+r+r)>-1,t):CIe(n,r,o,t.before||g4.before);if(e==o&&Goe(n,n.selection.main.from))return _Ie(n,r,o)}return null}function Goe(n,e){let t=!1;return n.field(zoe).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function _6(n,e){let t=n.sliceString(e,e+2);return t.slice(0,vg(Hh(t,0)))}function bIe(n,e){let t=n.sliceString(e-2,e);return vg(Hh(t,0))==t.length?t:t.slice(1)}function CIe(n,e,t,i){let r=null,o=n.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:t,from:s.to}],effects:ab.of(s.to+e.length),range:Sn.range(s.anchor+e.length,s.head+e.length)};let a=_6(n.doc,s.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:e+t,from:s.head},effects:ab.of(s.head+e.length),range:Sn.cursor(s.head+e.length)}:{range:r=s}});return r?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function _Ie(n,e,t){let i=null,r=n.changeByRange(o=>o.empty&&_6(n.doc,o.head)==t?{changes:{from:o.head,to:o.head+t.length,insert:t},range:Sn.cursor(o.head+t.length)}:i={range:o});return i?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function xIe(n,e,t,i){let r=i.stringPrefixes||g4.stringPrefixes,o=null,s=n.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:ab.of(a.to+e.length),range:Sn.range(a.anchor+e.length,a.head+e.length)};let c=a.head,A=_6(n.doc,c),m;if(A==e){if(oQ(n,c))return{changes:{insert:e+e,from:c},effects:ab.of(c+e.length),range:Sn.cursor(c+e.length)};if(Goe(n,c)){let x=t&&n.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+x.length,insert:x},range:Sn.cursor(c+x.length)}}}else{if(t&&n.sliceDoc(c-2*e.length,c)==e+e&&(m=sQ(n,c-2*e.length,r))>-1&&oQ(n,m))return{changes:{insert:e+e+e+e,from:c},effects:ab.of(c+e.length),range:Sn.cursor(c+e.length)};if(n.charCategorizer(c)(A)!=ul.Word&&sQ(n,c,r)>-1&&!MIe(n,c,e,r))return{changes:{insert:e+e,from:c},effects:ab.of(c+e.length),range:Sn.cursor(c+e.length)}}return{range:o=a}});return o?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function oQ(n,e){let t=KA(n).resolveInner(e+1);return t.parent&&t.from==e}function MIe(n,e,t,i){let r=KA(n).resolveInner(e,-1),o=i.reduce((s,a)=>Math.max(s,a.length),0);for(let s=0;s<5;s++){let a=n.sliceDoc(r.from,Math.min(r.to,r.from+t.length+o)),c=a.indexOf(t);if(!c||c>-1&&i.indexOf(a.slice(0,c))>-1){let m=r.firstChild;for(;m&&m.from==r.from&&m.to-m.from>t.length+c;){if(n.sliceDoc(m.to-t.length,m.to)==t)return!1;m=m.firstChild}return!0}let A=r.to==e&&r.parent;if(!A)break;r=A}return!1}function sQ(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=ul.Word)return e;for(let r of t){let o=e-r.length;if(n.sliceDoc(o,e)==r&&i(n.sliceDoc(o-1,o))!=ul.Word)return o}return-1}function wIe(n={}){return[hIe,Xh,Fc.of(n),cIe,SIe,dIe]}const Woe=[{key:"Ctrl-Space",run:x8},{mac:"Alt-`",run:x8},{mac:"Alt-i",run:x8},{key:"Escape",run:sIe},{key:"ArrowDown",run:I5(!0)},{key:"ArrowUp",run:I5(!1)},{key:"PageDown",run:I5(!0,"page")},{key:"PageUp",run:I5(!1,"page")},{key:"Enter",run:oIe}],SIe=Qb.highest(SK.computeN([Fc],n=>n.facet(Fc).defaultKeymap?[Woe]:[]));class aQ{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class Xv{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let r=i.facet(Og).markerFilter;r&&(e=r(e,i));let o=e.slice().sort((m,v)=>m.from-v.from||m.to-v.to),s=new t1,a=[],c=0;for(let m=0;;){let v=m==o.length?null:o[m];if(!v&&!a.length)break;let x,_;for(a.length?(x=c,_=a.reduce((P,F)=>Math.min(P,F.to),v&&v.from>x?v.from:1e8)):(x=v.from,_=v.to,a.push(v),m++);m<o.length;){let P=o[m];if(P.from==x&&(P.to>P.from||P.to==x))a.push(P),m++,_=Math.min(P.to,_);else{_=Math.min(P.from,_);break}}let O=Zoe(a);if(a.some(P=>P.from==P.to||P.from==P.to-1&&i.doc.lineAt(P.from).to==P.from))s.add(x,x,Er.widget({widget:new UIe(O),diagnostics:a.slice()}));else{let P=a.reduce((F,j)=>j.markClass?F+" "+j.markClass:F,"");s.add(x,_,Er.mark({class:"cm-lintRange cm-lintRange-"+O+P,diagnostics:a.slice(),inclusiveEnd:a.some(F=>F.to>_)}))}c=_;for(let P=0;P<a.length;P++)a[P].to<=c&&a.splice(P--,1)}let A=s.finish();return new Xv(A,t,gx(A))}}function gx(n,e=null,t=0){let i=null;return n.between(t,1e9,(r,o,{spec:s})=>{if(!(e&&s.diagnostics.indexOf(e)<0))if(!i)i=new aQ(r,o,e||s.diagnostics[0]);else{if(s.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new aQ(i.from,o,i.diagnostic)}}),i}function Qoe(n,e){let t=e.pos,i=e.end||t,r=n.state.facet(Og).hideOn(n,t,i);if(r!=null)return r;let o=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(s=>s.is(x6))||n.changes.touchesRange(o.from,Math.max(o.to,i)))}function qoe(n,e){return n.field(of,!1)?e:e.concat(ao.appendConfig.of(ese))}function EIe(n,e){return{effects:qoe(n,[x6.of(e)])}}const x6=ao.define(),QK=ao.define(),Yoe=ao.define(),of=ac.define({create(){return new Xv(Er.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),i=null,r=n.panel;if(n.selected){let o=e.changes.mapPos(n.selected.from,1);i=gx(t,n.selected.diagnostic,o)||gx(t,null,o)}!t.size&&r&&e.state.facet(Og).autoPanel&&(r=null),n=new Xv(t,r,i)}for(let t of e.effects)if(t.is(x6)){let i=e.state.facet(Og).autoPanel?t.value.length?y4.open:null:n.panel;n=Xv.init(t.value,i,e.state)}else t.is(QK)?n=new Xv(n.diagnostics,t.value?y4.open:null,n.selected):t.is(Yoe)&&(n=new Xv(n.diagnostics,n.panel,t.value));return n},provide:n=>[h4.from(n,e=>e.panel),wi.decorations.from(n,e=>e.diagnostics)]}),OIe=Er.mark({class:"cm-lintRange cm-lintRange-active"});function BIe(n,e,t){let{diagnostics:i}=n.state.field(of),r,o=-1,s=-1;i.between(e-(t<0?1:0),e+(t>0?1:0),(c,A,{spec:m})=>{if(e>=c&&e<=A&&(c==A||(e>c||t>0)&&(e<A||t<0)))return r=m.diagnostics,o=c,s=A,!1});let a=n.state.facet(Og).tooltipFilter;return r&&a&&(r=a(r,n.state)),r?{pos:o,end:s,above:n.state.doc.lineAt(o).to<s,create(){return{dom:$oe(n,r)}}}:null}function $oe(n,e){return Ma("ul",{class:"cm-tooltip-lint"},e.map(t=>Hoe(n,t,!1)))}const IIe=n=>{let e=n.state.field(of,!1);(!e||!e.panel)&&n.dispatch({effects:qoe(n.state,[QK.of(!0)])});let t=A4(n,y4.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},lQ=n=>{let e=n.state.field(of,!1);return!e||!e.panel?!1:(n.dispatch({effects:QK.of(!1)}),!0)},kIe=n=>{let e=n.state.field(of,!1);if(!e)return!1;let t=n.state.selection.main,i=e.diagnostics.iter(t.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==t.from&&i.to==t.to)?!1:(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},TIe=[{key:"Mod-Shift-m",run:IIe,preventDefault:!0},{key:"F8",run:kIe}],RIe=lu.fromClass(class{constructor(n){this.view=n,this.timeout=-1,this.set=!0;let{delay:e}=n.state.facet(Og);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let n=Date.now();if(n<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-n);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet(Og);t.length&&DIe(t.map(i=>Promise.resolve(i(this.view))),i=>{this.view.state.doc==e.doc&&this.view.dispatch(EIe(this.view.state,i.reduce((r,o)=>r.concat(o))))},i=>{lh(this.view.state,i)})}}update(n){let e=n.state.facet(Og);(n.docChanged||e!=n.startState.facet(Og)||e.needsRefresh&&e.needsRefresh(n))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function DIe(n,e,t){let i=[],r=-1;for(let o of n)o.then(s=>{i.push(s),clearTimeout(r),i.length==n.length?e(i):r=setTimeout(()=>e(i),200)},t)}const Og=ki.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},bm(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?i=>e(i)||t(i):e:t}))}});function PIe(n,e={}){return[Og.of({source:n,config:e}),RIe,ese]}function Voe(n){let e=[];if(n)e:for(let{name:t}of n){for(let i=0;i<t.length;i++){let r=t[i];if(/[a-zA-Z]/.test(r)&&!e.some(o=>o.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function Hoe(n,e,t){var i;let r=t?Voe(e.actions):[];return Ma("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Ma("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((o,s)=>{let a=!1,c=x=>{if(x.preventDefault(),a)return;a=!0;let _=gx(n.state.field(of).diagnostics,e);_&&o.apply(n,_.from,_.to)},{name:A}=o,m=r[s]?A.indexOf(r[s]):-1,v=m<0?A:[A.slice(0,m),Ma("u",A.slice(m,m+1)),A.slice(m+1)];return Ma("button",{type:"button",class:"cm-diagnosticAction",onclick:c,onmousedown:c,"aria-label":` Action: ${A}${m<0?"":` (access key "${r[s]})"`}.`},v)}),e.source&&Ma("div",{class:"cm-diagnosticSource"},e.source))}class UIe extends iv{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Ma("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class uQ{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Hoe(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class y4{constructor(e){this.view=e,this.items=[];let t=r=>{if(r.keyCode==27)lQ(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=Voe(o.actions);for(let a=0;a<s.length;a++)if(s[a].toUpperCase().charCodeAt(0)==r.keyCode){let c=gx(this.view.state.field(of).diagnostics,o);c&&o.actions[a].apply(e,c.from,c.to)}}else return;r.preventDefault()},i=r=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(r.target)&&this.moveSelection(o)};this.list=Ma("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:i}),this.dom=Ma("div",{class:"cm-panel-lint"},this.list,Ma("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>lQ(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(of).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(of),i=0,r=!1,o=null,s=new Set;for(e.between(0,this.view.state.doc.length,(a,c,{spec:A})=>{for(let m of A.diagnostics){if(s.has(m))continue;s.add(m);let v=-1,x;for(let _=i;_<this.items.length;_++)if(this.items[_].diagnostic==m){v=_;break}v<0?(x=new uQ(this.view,m),this.items.splice(i,0,x),r=!0):(x=this.items[v],v>i&&(this.items.splice(i,v-i),r=!0)),t&&x.diagnostic==t.diagnostic?x.dom.hasAttribute("aria-selected")||(x.dom.setAttribute("aria-selected","true"),o=x):x.dom.hasAttribute("aria-selected")&&x.dom.removeAttribute("aria-selected"),i++}});i<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new uQ(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:c})=>{let A=c.height/this.list.offsetHeight;a.top<c.top?this.list.scrollTop-=(c.top-a.top)/A:a.bottom>c.bottom&&(this.list.scrollTop+=(a.bottom-c.bottom)/A)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(of),i=gx(t.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:Yoe.of(i)})}static open(e){return new y4(e)}}function Aw(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(n)}</svg>')`}function k5(n){return Aw(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${n}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const KIe=wi.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:k5("#d11")},".cm-lintRange-warning":{backgroundImage:k5("orange")},".cm-lintRange-info":{backgroundImage:k5("#999")},".cm-lintRange-hint":{backgroundImage:k5("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function LIe(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}function Zoe(n){let e="hint",t=1;for(let i of n){let r=LIe(i.severity);r>t&&(t=r,e=i.severity)}return e}class Xoe extends Wg{constructor(e){super(),this.diagnostics=e,this.severity=Zoe(e)}toDOM(e){let t=document.createElement("div");t.className="cm-lint-marker cm-lint-marker-"+this.severity;let i=this.diagnostics,r=e.state.facet(M6).tooltipFilter;return r&&(i=r(i,e.state)),i.length&&(t.onmouseover=()=>zIe(e,t,i)),t}}function FIe(n,e){let t=i=>{let r=e.getBoundingClientRect();if(!(i.clientX>r.left-10&&i.clientX<r.right+10&&i.clientY>r.top-10&&i.clientY<r.bottom+10)){for(let o=i.target;o;o=o.parentNode)if(o.nodeType==1&&o.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",t),n.state.field(Joe)&&n.dispatch({effects:qK.of(null)})}};window.addEventListener("mousemove",t)}function zIe(n,e,t){function i(){let s=n.elementAtHeight(e.getBoundingClientRect().top+5-n.documentTop);n.coordsAtPos(s.from)&&n.dispatch({effects:qK.of({pos:s.from,above:!1,clip:!1,create(){return{dom:$oe(n,t),getCoords:()=>e.getBoundingClientRect()}}})}),e.onmouseout=e.onmousemove=null,FIe(n,e)}let{hoverTime:r}=n.state.facet(M6),o=setTimeout(i,r);e.onmouseout=()=>{clearTimeout(o),e.onmouseout=e.onmousemove=null},e.onmousemove=()=>{clearTimeout(o),o=setTimeout(i,r)}}function jIe(n,e){let t=Object.create(null);for(let r of e){let o=n.lineAt(r.from);(t[o.from]||(t[o.from]=[])).push(r)}let i=[];for(let r in t)i.push(new Xoe(t[r]).range(+r));return Xo.of(i,!0)}const NIe=xre({class:"cm-gutter-lint",markers:n=>n.state.field(MD),widgetMarker:(n,e,t)=>{let i=[];return n.state.field(MD).between(t.from,t.to,(r,o,s)=>{r>t.from&&r<t.to&&i.push(...s.diagnostics)}),i.length?new Xoe(i):null}}),MD=ac.define({create(){return Xo.empty},update(n,e){n=n.map(e.changes);let t=e.state.facet(M6).markerFilter;for(let i of e.effects)if(i.is(x6)){let r=i.value;t&&(r=t(r||[],e.state)),n=jIe(e.state.doc,r.slice(0))}return n}}),qK=ao.define(),Joe=ac.define({create(){return null},update(n,e){return n&&e.docChanged&&(n=Qoe(e,n)?null:Object.assign(Object.assign({},n),{pos:e.changes.mapPos(n.pos)})),e.effects.reduce((t,i)=>i.is(qK)?i.value:t,n)},provide:n=>f6.from(n)}),GIe=wi.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:Aw('<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>')},".cm-lint-marker-warning":{content:Aw('<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>')},".cm-lint-marker-error":{content:Aw('<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>')}}),ese=[of,wi.decorations.compute([of],n=>{let{selected:e,panel:t}=n.field(of);return!e||!t||e.from==e.to?Er.none:Er.set([OIe.range(e.from,e.to)])}),DOe(BIe,{hideOn:Qoe}),KIe],M6=ki.define({combine(n){return bm(n,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function WIe(n={}){return[M6.of(n),MD,NIe,GIe,Joe]}const QIe=[WOe(),YOe(),AOe(),c8e(),KBe(),eOe(),oOe(),ys.allowMultipleSelections.of(!0),xBe(),qre(jBe,{fallback:!0}),$Be(),fIe(),wIe(),xOe(),SOe(),gOe(),y7e(),SK.of([...yIe,...h7e,...K7e,...v8e,...RBe,...Woe,...TIe])];var cQ={};class jS{constructor(e,t,i,r,o,s,a,c,A,m=0,v){this.p=e,this.stack=t,this.state=i,this.reducePos=r,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=c,this.curContext=A,this.lookAhead=m,this.parent=v}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let r=e.parser.context;return new jS(e,[],t,i,i,0,[],0,r?new AQ(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,r=e&65535,{parser:o}=this.p,s=this.reducePos<this.pos-25;s&&this.setLookAhead(this.pos);let a=o.dynamicPrecedence(r);if(a&&(this.score+=a),i==0){this.pushState(o.getGoto(this.state,r,!0),this.reducePos),r<o.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(r,this.reducePos);return}let c=this.stack.length-(i-1)*3-(e&262144?6:0),A=c?this.stack[c-2]:this.p.ranges[0].from,m=this.reducePos-A;m>=2e3&&!(!((t=this.p.parser.nodeSet.types[r])===null||t===void 0)&&t.isAnonymous)&&(A==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=m):this.p.lastBigReductionSize<m&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=A,this.p.lastBigReductionSize=m));let v=c?this.stack[c-1]:0,x=this.bufferBase+this.buffer.length-v;if(r<o.minRepeatTerm||e&131072){let _=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,A,_,x+4,!0)}if(e&262144)this.state=this.stack[c];else{let _=this.stack[c-3];this.state=o.getGoto(_,r,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(r,A)}storeNode(e,t,i,r=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,a=this.buffer.length;if(a==0&&s.parent&&(a=s.bufferBase-s.parent.bufferBase,s=s.parent),a>0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(t==i)return;if(s.buffer[a-2]>=t){s.buffer[a-2]=i;return}}}if(!o||this.pos==i)this.buffer.push(e,t,i,r);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0){let a=!1;for(let c=s;c>0&&this.buffer[c-2]>i;c-=4)if(this.buffer[c-1]>=0){a=!0;break}if(a)for(;s>0&&this.buffer[s-2]>i;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,r>4&&(r-=4)}this.buffer[s]=e,this.buffer[s+1]=t,this.buffer[s+2]=i,this.buffer[s+3]=r}}shift(e,t,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let o=e,{parser:s}=this.p;(r>this.pos||t<=s.maxNode)&&(this.pos=r,s.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,i),this.shiftContext(t,i),t<=s.maxNode&&this.buffer.push(t,i,r,4)}else this.pos=r,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,r,4)}apply(e,t,i,r){e&65536?this.reduce(e):this.shift(e,t,i,r)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new jS(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new qIe(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if((i&65536)==0)return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let r=[];for(let o=0,s;o<t.length;o+=2)(s=t[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&r.push(t[o],s);if(this.stack.length<120)for(let o=0;r.length<8&&o<t.length;o+=2){let s=t[o+1];r.some((a,c)=>c&1&&a==s)||r.push(t[o],s)}t=r}let i=[];for(let r=0;r<t.length&&i.length<4;r+=2){let o=t[r+1];if(o==this.state)continue;let s=this.split();s.pushState(o,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(t[r],this.pos),s.reducePos=this.pos,s.score-=200,i.push(s)}return i}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let i=t>>19,r=t&65535,o=this.stack.length-i*3;if(o<0||e.getGoto(this.stack[o],r,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;t=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(r,o)=>{if(!t.includes(r))return t.push(r),e.allActions(r,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-o;if(a>1){let c=s&65535,A=this.stack.length-a*3;if(A>=0&&e.getGoto(this.stack[A],c,!1)>=0)return a<<19|65536|c}}else{let a=i(s,o+1);if(a!=null)return a}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new AQ(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class AQ{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class qIe{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class NS{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new NS(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new NS(this.stack,this.pos,this.index)}}function T5(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let i=0,r=0;i<n.length;){let o=0;for(;;){let s=n.charCodeAt(i++),a=!1;if(s==126){o=65535;break}s>=92&&s--,s>=34&&s--;let c=s-32;if(c>=46&&(c-=46,a=!0),o+=c,a)break;o*=46}t?t[r++]=o:t=new e(o)}return t}class hw{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const hQ=new hw;class YIe{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=hQ,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,r=this.rangeIndex,o=this.pos+e;for(;o<i.from;){if(!r)return null;let s=this.ranges[--r];o-=i.from-s.to,i=s}for(;t<0?o>i.to:o>=i.to;){if(r==this.ranges.length-1)return null;let s=this.ranges[++r];o+=s.from-i.to,i=s}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,r;if(t>=0&&t<this.chunk.length)i=this.pos+e,r=this.chunk.charCodeAt(t);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(i=o,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let s=this.rangeIndex,a=this.range;for(;a.to<=i;)a=this.ranges[++s];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=hQ,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return i}}class Q_{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;$Ie(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}Q_.prototype.contextual=Q_.prototype.fallback=Q_.prototype.extend=!1;Q_.prototype.fallback=Q_.prototype.extend=!1;function $Ie(n,e,t,i,r,o){let s=0,a=1<<i,{dialect:c}=t.p.parser;e:for(;(a&n[s])!=0;){let A=n[s+1];for(let _=s+3;_<A;_+=2)if((n[_+1]&a)>0){let O=n[_];if(c.allows(O)&&(e.token.value==-1||e.token.value==O||VIe(O,e.token.value,r,o))){e.acceptToken(O);break}}let m=e.next,v=0,x=n[s+2];if(e.next<0&&x>v&&n[A+x*3-3]==65535){s=n[A+x*3-1];continue e}for(;v<x;){let _=v+x>>1,O=A+_+(_<<1),P=n[O],F=n[O+1]||65536;if(m<P)x=_;else if(m>=F)v=_+1;else{s=n[O+2],e.advance();continue e}}break}}function dQ(n,e,t){for(let i=e,r;(r=n[i])!=65535;i++)if(r==t)return i-e;return-1}function VIe(n,e,t,i){let r=dQ(t,i,e);return r<0||dQ(t,i,n)<r}const Qd=typeof process<"u"&&cQ&&/\bparse\b/.test(cQ.LOG);let w8=null;function fQ(n,e,t){let i=n.cursor(Kc.IncludeAnonymous);for(i.moveTo(e);;)if(!(t<0?i.childBefore(e):i.childAfter(e)))for(;;){if((t<0?i.to<e:i.from>e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(n.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:n.length}}class HIe{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?fQ(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?fQ(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let i=this.trees[t],r=this.index[t];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=i.children[r],s=this.start[t]+i.positions[r];if(s>e)return this.nextStart=s,null;if(o instanceof Lu){if(s==e){if(s<this.safeFrom)return null;let a=s+o.length;if(a<=this.safeTo){let c=o.prop(To.lookAhead);if(!c||a+c<this.fragment.to)return o}}this.index[t]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+o.length}}}class ZIe{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new hw)}getActions(e){let t=0,i=null,{parser:r}=e.p,{tokenizers:o}=r,s=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,c=0;for(let A=0;A<o.length;A++){if((1<<A&s)==0)continue;let m=o[A],v=this.tokens[A];if(!(i&&!m.fallback)&&((m.contextual||v.start!=e.pos||v.mask!=s||v.context!=a)&&(this.updateCachedToken(v,m,e),v.mask=s,v.context=a),v.lookAhead>v.end+25&&(c=Math.max(v.lookAhead,c)),v.value!=0)){let x=t;if(v.extended>-1&&(t=this.addActions(e,v.extended,v.end,t)),t=this.addActions(e,v.value,v.end,t),!m.extend&&(i=v,t>x))break}}for(;this.actions.length>t;)this.actions.pop();return c&&e.setLookAhead(c),!i&&e.pos==this.stream.end&&(i=new hw,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new hw,{pos:i,p:r}=e;return t.start=i,t.end=Math.min(i+1,r.stream.end),t.value=i==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,i){let r=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(r,e),i),e.value>-1){let{parser:o}=i.p;for(let s=0;s<o.specialized.length;s++)if(o.specialized[s]==e.value){let a=o.specializers[s](this.stream.read(e.start,e.end),i);if(a>=0&&i.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,i,r){for(let o=0;o<r;o+=3)if(this.actions[o]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=i,r}addActions(e,t,i,r){let{state:o}=e,{parser:s}=e.p,{data:a}=s;for(let c=0;c<2;c++)for(let A=s.stateSlot(o,c?2:1);;A+=3){if(a[A]==65535)if(a[A+1]==1)A=z0(a,A+2);else{r==0&&a[A+1]==2&&(r=this.putAction(z0(a,A+2),t,i,r));break}a[A]==t&&(r=this.putAction(z0(a,A+1),t,i,r))}return r}}class XIe{constructor(e,t,i,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new YIe(t,r),this.tokens=new ZIe(e,this.stream),this.topTerm=e.top[1];let{from:o}=r[0];this.stacks=[jS.start(this,e.top[0],o)],this.fragments=i.length&&this.stream.end-o>e.bufferLength*4?new HIe(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],r,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let a=e[s];for(;;){if(this.tokens.mainToken=null,a.pos>t)i.push(a);else{if(this.advanceStack(a,i,e))continue;{r||(r=[],o=[]),r.push(a);let c=this.tokens.getMainToken(a);o.push(c.value,c.end)}}break}}if(!i.length){let s=r&&eke(r);if(s)return Qd&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw Qd&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let s=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,o,i);if(s)return Qd&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(i.length>s)for(i.sort((a,c)=>c.score-a.score);i.length>s;)i.pop();i.some(a=>a.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let s=0;s<i.length-1;s++){let a=i[s];for(let c=s+1;c<i.length;c++){let A=i[c];if(a.sameState(A)||a.buffer.length>500&&A.buffer.length>500)if((a.score-A.score||a.buffer.length-A.buffer.length)>0)i.splice(c--,1);else{i.splice(s--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let s=1;s<i.length;s++)i[s].pos<this.minStackPos&&(this.minStackPos=i[s].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,i){let r=e.pos,{parser:o}=this,s=Qd?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let A=e.curContext&&e.curContext.tracker.strict,m=A?e.curContext.hash:0;for(let v=this.fragments.nodeAt(r);v;){let x=this.parser.nodeSet.types[v.type.id]==v.type?o.getGoto(e.state,v.type.id):-1;if(x>-1&&v.length&&(!A||(v.prop(To.contextHash)||0)==m))return e.useNode(v,x),Qd&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(v.type.id)})`),!0;if(!(v instanceof Lu)||v.children.length==0||v.positions[0]>0)break;let _=v.children[0];if(_ instanceof Lu&&v.positions[0]==0)v=_;else break}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),Qd&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let A=0;A<c.length;){let m=c[A++],v=c[A++],x=c[A++],_=A==c.length||!i,O=_?e:e.split(),P=this.tokens.mainToken;if(O.apply(m,v,P?P.start:O.pos,x),Qd&&console.log(s+this.stackID(O)+` (via ${(m&65536)==0?"shift":`reduce of ${o.getName(m&65535)}`} for ${o.getName(v)} @ ${r}${O==e?"":", split"})`),_)return!0;O.pos>r?t.push(O):i.push(O)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return pQ(e,t),!0}}runRecovery(e,t,i){let r=null,o=!1;for(let s=0;s<e.length;s++){let a=e[s],c=t[s<<1],A=t[(s<<1)+1],m=Qd?this.stackID(a)+" -> ":"";if(a.deadEnd&&(o||(o=!0,a.restart(),Qd&&console.log(m+this.stackID(a)+" (restarted)"),this.advanceFully(a,i))))continue;let v=a.split(),x=m;for(let _=0;v.forceReduce()&&_<10&&(Qd&&console.log(x+this.stackID(v)+" (via force-reduce)"),!this.advanceFully(v,i));_++)Qd&&(x=this.stackID(v)+" -> ");for(let _ of a.recoverByInsert(c))Qd&&console.log(m+this.stackID(_)+" (via recover-insert)"),this.advanceFully(_,i);this.stream.end>a.pos?(A==a.pos&&(A++,c=0),a.recoverByDelete(c,A),Qd&&console.log(m+this.stackID(a)+` (via recover-delete ${this.parser.getName(c)})`),pQ(a,i)):(!r||r.score<a.score)&&(r=a)}return r}stackToTree(e){return e.close(),Lu.build({buffer:NS.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(w8||(w8=new WeakMap)).get(e);return t||w8.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function pQ(n,e){for(let t=0;t<e.length;t++){let i=e[t];if(i.pos==n.pos&&i.sameState(n)){e[t].score<n.score&&(e[t]=n);return}}e.push(n)}class JIe{constructor(e,t,i){this.source=e,this.flags=t,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}}class GS extends Ire{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let a=0;a<e.repeatNodeCount;a++)t.push("");let i=Object.keys(e.topRules).map(a=>e.topRules[a][1]),r=[];for(let a=0;a<t.length;a++)r.push([]);function o(a,c,A){r[a].push([c,c.deserialize(String(A))])}if(e.nodeProps)for(let a of e.nodeProps){let c=a[0];typeof c=="string"&&(c=To[c]);for(let A=1;A<a.length;){let m=a[A++];if(m>=0)o(m,c,a[A++]);else{let v=a[A+-m];for(let x=-m;x>0;x--)o(a[A++],c,v);A++}}}this.nodeSet=new OK(t.map((a,c)=>rd.define({name:c>=this.minRepeatTerm?void 0:a,id:c,props:r[c],top:i.indexOf(c)>-1,error:c==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(c)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Sre;let s=T5(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(mQ),this.states=T5(e.states,Uint32Array),this.data=T5(e.stateData),this.goto=T5(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new Q_(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let r=new XIe(this,e,t,i);for(let o of this.wrappers)r=o(r,e,t,i);return r}getGoto(e,t,i=!1){let r=this.goto;if(t>=r[0])return-1;for(let o=r[t+1];;){let s=r[o++],a=s&1,c=r[o++];if(a&&i)return c;for(let A=o+(s>>1);o<A;o++)if(r[o]==e)return c;if(a)return-1}}hasAction(e,t){let i=this.data;for(let r=0;r<2;r++)for(let o=this.stateSlot(e,r?2:1),s;;o+=3){if((s=i[o])==65535)if(i[o+1]==1)s=i[o=z0(i,o+2)];else{if(i[o+1]==2)return z0(i,o+2);break}if(s==t||s==0)return z0(i,o+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),r=i?t(i):void 0;for(let o=this.stateSlot(e,1);r==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=z0(this.data,o+2);else break;r=t(z0(this.data,o+1))}return r}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=z0(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];t.some((o,s)=>s&1&&o==r)||t.push(this.data[i],r)}}return t}configure(e){let t=Object.assign(Object.create(GS.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(o=>o.from==i);return r?r.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,r)=>{let o=e.specializers.find(a=>a.from==i.external);if(!o)return i;let s=Object.assign(Object.assign({},i),{external:o.to});return t.specializers[r]=mQ(s),s})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let o of e.split(" ")){let s=t.indexOf(o);s>=0&&(i[s]=!0)}let r=null;for(let o=0;o<t.length;o++)if(!i[o])for(let s=this.dialects[t[o]],a;(a=this.data[s++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[a]=1;return new JIe(e,i,r)}static deserialize(e){return new GS(e)}}function z0(n,e){return n[e]|n[e+1]<<16}function eke(n){let e=null;for(let t of n){let i=t.p.stoppedAt;(t.pos==t.p.stream.end||i!=null&&t.pos>i)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function mQ(n){if(n.external){let e=n.extend?1:0;return(t,i)=>n.external(t,i)<<1|e}return n.get}const tke=kre({String:ln.string,Number:ln.number,"True False":ln.bool,PropertyName:ln.propertyName,Null:ln.null,", :":ln.separator,"[ ]":ln.squareBracket,"{ }":ln.brace}),nke=GS.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[tke],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),ike=()=>n=>{try{JSON.parse(n.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const t=rke(e,n.state.doc);return[{from:t,message:e.message,severity:"error",to:t}]}return[]};function rke(n,e){let t;return(t=n.message.match(/at position (\d+)/))?Math.min(+t[1],e.length):(t=n.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+t[1]).from+ +t[2]-1,e.length):0}const oke=OS.define({name:"json",parser:nke.configure({props:[Pre.add({Object:PW({except:/^\s*\}/}),Array:PW({except:/^\s*\]/})}),Kre.add({"Object Array":wBe})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function ske(){return new dBe(oke)}const ake="#e5c07b",gQ="#e06c75",lke="#56b6c2",uke="#ffffff",dw="#abb2bf",wD="#7d8799",cke="#61afef",Ake="#98c379",yQ="#d19a66",hke="#c678dd",dke="#21252b",vQ="#2c313a",bQ="#282c34",S8="#353a42",fke="#3E4451",CQ="#528bff",pke=wi.theme({"&":{color:dw,backgroundColor:bQ},".cm-content":{caretColor:CQ},".cm-cursor, .cm-dropCursor":{borderLeftColor:CQ},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:fke},".cm-panels":{backgroundColor:dke,color:dw},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:bQ,color:wD,border:"none"},".cm-activeLineGutter":{backgroundColor:vQ},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:S8},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:S8,borderBottomColor:S8},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:vQ,color:dw}}},{dark:!0}),mke=fM.define([{tag:ln.keyword,color:hke},{tag:[ln.name,ln.deleted,ln.character,ln.propertyName,ln.macroName],color:gQ},{tag:[ln.function(ln.variableName),ln.labelName],color:cke},{tag:[ln.color,ln.constant(ln.name),ln.standard(ln.name)],color:yQ},{tag:[ln.definition(ln.name),ln.separator],color:dw},{tag:[ln.typeName,ln.className,ln.number,ln.changed,ln.annotation,ln.modifier,ln.self,ln.namespace],color:ake},{tag:[ln.operator,ln.operatorKeyword,ln.url,ln.escape,ln.regexp,ln.link,ln.special(ln.string)],color:lke},{tag:[ln.meta,ln.comment],color:wD},{tag:ln.strong,fontWeight:"bold"},{tag:ln.emphasis,fontStyle:"italic"},{tag:ln.strikethrough,textDecoration:"line-through"},{tag:ln.link,color:wD,textDecoration:"underline"},{tag:ln.heading,fontWeight:"bold",color:gQ},{tag:[ln.atom,ln.bool,ln.special(ln.variableName)],color:yQ},{tag:[ln.processingInstruction,ln.string,ln.inserted],color:Ake},{tag:ln.invalid,color:uke}]),gke=[pke,qre(mke)];var fw={exports:{}},yke=fw.exports,_Q;function vke(){return _Q||(_Q=1,(function(n,e){(function(t,i){n.exports=i()})(yke,(function(){var t=typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function i(Te,Se){return Se={exports:{}},Te(Se,Se.exports),Se.exports}var r=i(function(Te){function Se(){var Ne=0,ut=1,rt=2,mt=3,Rt=4,Bt=5,$t=6,Rn=7,zn=8,ai=9,_n=10,Bn=11,dn=12,li=13,In=14,It=15,xe=16,oe=17,J=0,ne=1,ue=2,Ce=3,Ue=4;function He(y,gt){return 55296<=y.charCodeAt(gt)&&y.charCodeAt(gt)<=56319&&56320<=y.charCodeAt(gt+1)&&y.charCodeAt(gt+1)<=57343}function lt(y,gt){gt===void 0&&(gt=0);var Mt=y.charCodeAt(gt);if(55296<=Mt&&Mt<=56319&&gt<y.length-1){var Dt=Mt,ot=y.charCodeAt(gt+1);return 56320<=ot&&ot<=57343?(Dt-55296)*1024+(ot-56320)+65536:Dt}if(56320<=Mt&&Mt<=57343&&gt>=1){var Dt=y.charCodeAt(gt-1),ot=Mt;return 55296<=Dt&&Dt<=56319?(Dt-55296)*1024+(ot-56320)+65536:ot}return Mt}function be(y,gt,Mt){var Dt=[y].concat(gt).concat([Mt]),ot=Dt[Dt.length-2],bn=Mt,Gn=Dt.lastIndexOf(In);if(Gn>1&&Dt.slice(1,Gn).every(function($n){return $n==mt})&&[mt,li,oe].indexOf(y)==-1)return ue;var yn=Dt.lastIndexOf(Rt);if(yn>0&&Dt.slice(1,yn).every(function($n){return $n==Rt})&&[dn,Rt].indexOf(ot)==-1)return Dt.filter(function($n){return $n==Rt}).length%2==1?Ce:Ue;if(ot==Ne&&bn==ut)return J;if(ot==rt||ot==Ne||ot==ut)return bn==In&&gt.every(function($n){return $n==mt})?ue:ne;if(bn==rt||bn==Ne||bn==ut)return ne;if(ot==$t&&(bn==$t||bn==Rn||bn==ai||bn==_n))return J;if((ot==ai||ot==Rn)&&(bn==Rn||bn==zn))return J;if((ot==_n||ot==zn)&&bn==zn)return J;if(bn==mt||bn==It)return J;if(bn==Bt)return J;if(ot==dn)return J;var qn=Dt.indexOf(mt)!=-1?Dt.lastIndexOf(mt)-1:Dt.length-2;return[li,oe].indexOf(Dt[qn])!=-1&&Dt.slice(qn+1,-1).every(function($n){return $n==mt})&&bn==In||ot==It&&[xe,oe].indexOf(bn)!=-1?J:gt.indexOf(Rt)!=-1?ue:ot==Rt&&bn==Rt?J:ne}this.nextBreak=function(y,gt){if(gt===void 0&&(gt=0),gt<0)return 0;if(gt>=y.length-1)return y.length;for(var Mt=Ee(lt(y,gt)),Dt=[],ot=gt+1;ot<y.length;ot++)if(!He(y,ot-1)){var bn=Ee(lt(y,ot));if(be(Mt,Dt,bn))return ot;Dt.push(bn)}return y.length},this.splitGraphemes=function(y){for(var gt=[],Mt=0,Dt;(Dt=this.nextBreak(y,Mt))<y.length;)gt.push(y.slice(Mt,Dt)),Mt=Dt;return Mt<y.length&&gt.push(y.slice(Mt)),gt},this.iterateGraphemes=function(y){var gt=0,Mt={next:(function(){var Dt,ot;return(ot=this.nextBreak(y,gt))<y.length?(Dt=y.slice(gt,ot),gt=ot,{value:Dt,done:!1}):gt<y.length?(Dt=y.slice(gt),gt=y.length,{value:Dt,done:!1}):{value:void 0,done:!0}}).bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(Mt[Symbol.iterator]=function(){return Mt}),Mt},this.countGraphemes=function(y){for(var gt=0,Mt=0,Dt;(Dt=this.nextBreak(y,Mt))<y.length;)Mt=Dt,gt++;return Mt<y.length&&gt++,gt};function Ee(y){return 1536<=y&&y<=1541||y==1757||y==1807||y==2274||y==3406||y==69821||70082<=y&&y<=70083||y==72250||72326<=y&&y<=72329||y==73030?dn:y==13?Ne:y==10?ut:0<=y&&y<=9||11<=y&&y<=12||14<=y&&y<=31||127<=y&&y<=159||y==173||y==1564||y==6158||y==8203||8206<=y&&y<=8207||y==8232||y==8233||8234<=y&&y<=8238||8288<=y&&y<=8292||y==8293||8294<=y&&y<=8303||55296<=y&&y<=57343||y==65279||65520<=y&&y<=65528||65529<=y&&y<=65531||113824<=y&&y<=113827||119155<=y&&y<=119162||y==917504||y==917505||917506<=y&&y<=917535||917632<=y&&y<=917759||918e3<=y&&y<=921599?rt:768<=y&&y<=879||1155<=y&&y<=1159||1160<=y&&y<=1161||1425<=y&&y<=1469||y==1471||1473<=y&&y<=1474||1476<=y&&y<=1477||y==1479||1552<=y&&y<=1562||1611<=y&&y<=1631||y==1648||1750<=y&&y<=1756||1759<=y&&y<=1764||1767<=y&&y<=1768||1770<=y&&y<=1773||y==1809||1840<=y&&y<=1866||1958<=y&&y<=1968||2027<=y&&y<=2035||2070<=y&&y<=2073||2075<=y&&y<=2083||2085<=y&&y<=2087||2089<=y&&y<=2093||2137<=y&&y<=2139||2260<=y&&y<=2273||2275<=y&&y<=2306||y==2362||y==2364||2369<=y&&y<=2376||y==2381||2385<=y&&y<=2391||2402<=y&&y<=2403||y==2433||y==2492||y==2494||2497<=y&&y<=2500||y==2509||y==2519||2530<=y&&y<=2531||2561<=y&&y<=2562||y==2620||2625<=y&&y<=2626||2631<=y&&y<=2632||2635<=y&&y<=2637||y==2641||2672<=y&&y<=2673||y==2677||2689<=y&&y<=2690||y==2748||2753<=y&&y<=2757||2759<=y&&y<=2760||y==2765||2786<=y&&y<=2787||2810<=y&&y<=2815||y==2817||y==2876||y==2878||y==2879||2881<=y&&y<=2884||y==2893||y==2902||y==2903||2914<=y&&y<=2915||y==2946||y==3006||y==3008||y==3021||y==3031||y==3072||3134<=y&&y<=3136||3142<=y&&y<=3144||3146<=y&&y<=3149||3157<=y&&y<=3158||3170<=y&&y<=3171||y==3201||y==3260||y==3263||y==3266||y==3270||3276<=y&&y<=3277||3285<=y&&y<=3286||3298<=y&&y<=3299||3328<=y&&y<=3329||3387<=y&&y<=3388||y==3390||3393<=y&&y<=3396||y==3405||y==3415||3426<=y&&y<=3427||y==3530||y==3535||3538<=y&&y<=3540||y==3542||y==3551||y==3633||3636<=y&&y<=3642||3655<=y&&y<=3662||y==3761||3764<=y&&y<=3769||3771<=y&&y<=3772||3784<=y&&y<=3789||3864<=y&&y<=3865||y==3893||y==3895||y==3897||3953<=y&&y<=3966||3968<=y&&y<=3972||3974<=y&&y<=3975||3981<=y&&y<=3991||3993<=y&&y<=4028||y==4038||4141<=y&&y<=4144||4146<=y&&y<=4151||4153<=y&&y<=4154||4157<=y&&y<=4158||4184<=y&&y<=4185||4190<=y&&y<=4192||4209<=y&&y<=4212||y==4226||4229<=y&&y<=4230||y==4237||y==4253||4957<=y&&y<=4959||5906<=y&&y<=5908||5938<=y&&y<=5940||5970<=y&&y<=5971||6002<=y&&y<=6003||6068<=y&&y<=6069||6071<=y&&y<=6077||y==6086||6089<=y&&y<=6099||y==6109||6155<=y&&y<=6157||6277<=y&&y<=6278||y==6313||6432<=y&&y<=6434||6439<=y&&y<=6440||y==6450||6457<=y&&y<=6459||6679<=y&&y<=6680||y==6683||y==6742||6744<=y&&y<=6750||y==6752||y==6754||6757<=y&&y<=6764||6771<=y&&y<=6780||y==6783||6832<=y&&y<=6845||y==6846||6912<=y&&y<=6915||y==6964||6966<=y&&y<=6970||y==6972||y==6978||7019<=y&&y<=7027||7040<=y&&y<=7041||7074<=y&&y<=7077||7080<=y&&y<=7081||7083<=y&&y<=7085||y==7142||7144<=y&&y<=7145||y==7149||7151<=y&&y<=7153||7212<=y&&y<=7219||7222<=y&&y<=7223||7376<=y&&y<=7378||7380<=y&&y<=7392||7394<=y&&y<=7400||y==7405||y==7412||7416<=y&&y<=7417||7616<=y&&y<=7673||7675<=y&&y<=7679||y==8204||8400<=y&&y<=8412||8413<=y&&y<=8416||y==8417||8418<=y&&y<=8420||8421<=y&&y<=8432||11503<=y&&y<=11505||y==11647||11744<=y&&y<=11775||12330<=y&&y<=12333||12334<=y&&y<=12335||12441<=y&&y<=12442||y==42607||42608<=y&&y<=42610||42612<=y&&y<=42621||42654<=y&&y<=42655||42736<=y&&y<=42737||y==43010||y==43014||y==43019||43045<=y&&y<=43046||43204<=y&&y<=43205||43232<=y&&y<=43249||43302<=y&&y<=43309||43335<=y&&y<=43345||43392<=y&&y<=43394||y==43443||43446<=y&&y<=43449||y==43452||y==43493||43561<=y&&y<=43566||43569<=y&&y<=43570||43573<=y&&y<=43574||y==43587||y==43596||y==43644||y==43696||43698<=y&&y<=43700||43703<=y&&y<=43704||43710<=y&&y<=43711||y==43713||43756<=y&&y<=43757||y==43766||y==44005||y==44008||y==44013||y==64286||65024<=y&&y<=65039||65056<=y&&y<=65071||65438<=y&&y<=65439||y==66045||y==66272||66422<=y&&y<=66426||68097<=y&&y<=68099||68101<=y&&y<=68102||68108<=y&&y<=68111||68152<=y&&y<=68154||y==68159||68325<=y&&y<=68326||y==69633||69688<=y&&y<=69702||69759<=y&&y<=69761||69811<=y&&y<=69814||69817<=y&&y<=69818||69888<=y&&y<=69890||69927<=y&&y<=69931||69933<=y&&y<=69940||y==70003||70016<=y&&y<=70017||70070<=y&&y<=70078||70090<=y&&y<=70092||70191<=y&&y<=70193||y==70196||70198<=y&&y<=70199||y==70206||y==70367||70371<=y&&y<=70378||70400<=y&&y<=70401||y==70460||y==70462||y==70464||y==70487||70502<=y&&y<=70508||70512<=y&&y<=70516||70712<=y&&y<=70719||70722<=y&&y<=70724||y==70726||y==70832||70835<=y&&y<=70840||y==70842||y==70845||70847<=y&&y<=70848||70850<=y&&y<=70851||y==71087||71090<=y&&y<=71093||71100<=y&&y<=71101||71103<=y&&y<=71104||71132<=y&&y<=71133||71219<=y&&y<=71226||y==71229||71231<=y&&y<=71232||y==71339||y==71341||71344<=y&&y<=71349||y==71351||71453<=y&&y<=71455||71458<=y&&y<=71461||71463<=y&&y<=71467||72193<=y&&y<=72198||72201<=y&&y<=72202||72243<=y&&y<=72248||72251<=y&&y<=72254||y==72263||72273<=y&&y<=72278||72281<=y&&y<=72283||72330<=y&&y<=72342||72344<=y&&y<=72345||72752<=y&&y<=72758||72760<=y&&y<=72765||y==72767||72850<=y&&y<=72871||72874<=y&&y<=72880||72882<=y&&y<=72883||72885<=y&&y<=72886||73009<=y&&y<=73014||y==73018||73020<=y&&y<=73021||73023<=y&&y<=73029||y==73031||92912<=y&&y<=92916||92976<=y&&y<=92982||94095<=y&&y<=94098||113821<=y&&y<=113822||y==119141||119143<=y&&y<=119145||119150<=y&&y<=119154||119163<=y&&y<=119170||119173<=y&&y<=119179||119210<=y&&y<=119213||119362<=y&&y<=119364||121344<=y&&y<=121398||121403<=y&&y<=121452||y==121461||y==121476||121499<=y&&y<=121503||121505<=y&&y<=121519||122880<=y&&y<=122886||122888<=y&&y<=122904||122907<=y&&y<=122913||122915<=y&&y<=122916||122918<=y&&y<=122922||125136<=y&&y<=125142||125252<=y&&y<=125258||917536<=y&&y<=917631||917760<=y&&y<=917999?mt:127462<=y&&y<=127487?Rt:y==2307||y==2363||2366<=y&&y<=2368||2377<=y&&y<=2380||2382<=y&&y<=2383||2434<=y&&y<=2435||2495<=y&&y<=2496||2503<=y&&y<=2504||2507<=y&&y<=2508||y==2563||2622<=y&&y<=2624||y==2691||2750<=y&&y<=2752||y==2761||2763<=y&&y<=2764||2818<=y&&y<=2819||y==2880||2887<=y&&y<=2888||2891<=y&&y<=2892||y==3007||3009<=y&&y<=3010||3014<=y&&y<=3016||3018<=y&&y<=3020||3073<=y&&y<=3075||3137<=y&&y<=3140||3202<=y&&y<=3203||y==3262||3264<=y&&y<=3265||3267<=y&&y<=3268||3271<=y&&y<=3272||3274<=y&&y<=3275||3330<=y&&y<=3331||3391<=y&&y<=3392||3398<=y&&y<=3400||3402<=y&&y<=3404||3458<=y&&y<=3459||3536<=y&&y<=3537||3544<=y&&y<=3550||3570<=y&&y<=3571||y==3635||y==3763||3902<=y&&y<=3903||y==3967||y==4145||4155<=y&&y<=4156||4182<=y&&y<=4183||y==4228||y==6070||6078<=y&&y<=6085||6087<=y&&y<=6088||6435<=y&&y<=6438||6441<=y&&y<=6443||6448<=y&&y<=6449||6451<=y&&y<=6456||6681<=y&&y<=6682||y==6741||y==6743||6765<=y&&y<=6770||y==6916||y==6965||y==6971||6973<=y&&y<=6977||6979<=y&&y<=6980||y==7042||y==7073||7078<=y&&y<=7079||y==7082||y==7143||7146<=y&&y<=7148||y==7150||7154<=y&&y<=7155||7204<=y&&y<=7211||7220<=y&&y<=7221||y==7393||7410<=y&&y<=7411||y==7415||43043<=y&&y<=43044||y==43047||43136<=y&&y<=43137||43188<=y&&y<=43203||43346<=y&&y<=43347||y==43395||43444<=y&&y<=43445||43450<=y&&y<=43451||43453<=y&&y<=43456||43567<=y&&y<=43568||43571<=y&&y<=43572||y==43597||y==43755||43758<=y&&y<=43759||y==43765||44003<=y&&y<=44004||44006<=y&&y<=44007||44009<=y&&y<=44010||y==44012||y==69632||y==69634||y==69762||69808<=y&&y<=69810||69815<=y&&y<=69816||y==69932||y==70018||70067<=y&&y<=70069||70079<=y&&y<=70080||70188<=y&&y<=70190||70194<=y&&y<=70195||y==70197||70368<=y&&y<=70370||70402<=y&&y<=70403||y==70463||70465<=y&&y<=70468||70471<=y&&y<=70472||70475<=y&&y<=70477||70498<=y&&y<=70499||70709<=y&&y<=70711||70720<=y&&y<=70721||y==70725||70833<=y&&y<=70834||y==70841||70843<=y&&y<=70844||y==70846||y==70849||71088<=y&&y<=71089||71096<=y&&y<=71099||y==71102||71216<=y&&y<=71218||71227<=y&&y<=71228||y==71230||y==71340||71342<=y&&y<=71343||y==71350||71456<=y&&y<=71457||y==71462||72199<=y&&y<=72200||y==72249||72279<=y&&y<=72280||y==72343||y==72751||y==72766||y==72873||y==72881||y==72884||94033<=y&&y<=94078||y==119142||y==119149?Bt:4352<=y&&y<=4447||43360<=y&&y<=43388?$t:4448<=y&&y<=4519||55216<=y&&y<=55238?Rn:4520<=y&&y<=4607||55243<=y&&y<=55291?zn:y==44032||y==44060||y==44088||y==44116||y==44144||y==44172||y==44200||y==44228||y==44256||y==44284||y==44312||y==44340||y==44368||y==44396||y==44424||y==44452||y==44480||y==44508||y==44536||y==44564||y==44592||y==44620||y==44648||y==44676||y==44704||y==44732||y==44760||y==44788||y==44816||y==44844||y==44872||y==44900||y==44928||y==44956||y==44984||y==45012||y==45040||y==45068||y==45096||y==45124||y==45152||y==45180||y==45208||y==45236||y==45264||y==45292||y==45320||y==45348||y==45376||y==45404||y==45432||y==45460||y==45488||y==45516||y==45544||y==45572||y==45600||y==45628||y==45656||y==45684||y==45712||y==45740||y==45768||y==45796||y==45824||y==45852||y==45880||y==45908||y==45936||y==45964||y==45992||y==46020||y==46048||y==46076||y==46104||y==46132||y==46160||y==46188||y==46216||y==46244||y==46272||y==46300||y==46328||y==46356||y==46384||y==46412||y==46440||y==46468||y==46496||y==46524||y==46552||y==46580||y==46608||y==46636||y==46664||y==46692||y==46720||y==46748||y==46776||y==46804||y==46832||y==46860||y==46888||y==46916||y==46944||y==46972||y==47e3||y==47028||y==47056||y==47084||y==47112||y==47140||y==47168||y==47196||y==47224||y==47252||y==47280||y==47308||y==47336||y==47364||y==47392||y==47420||y==47448||y==47476||y==47504||y==47532||y==47560||y==47588||y==47616||y==47644||y==47672||y==47700||y==47728||y==47756||y==47784||y==47812||y==47840||y==47868||y==47896||y==47924||y==47952||y==47980||y==48008||y==48036||y==48064||y==48092||y==48120||y==48148||y==48176||y==48204||y==48232||y==48260||y==48288||y==48316||y==48344||y==48372||y==48400||y==48428||y==48456||y==48484||y==48512||y==48540||y==48568||y==48596||y==48624||y==48652||y==48680||y==48708||y==48736||y==48764||y==48792||y==48820||y==48848||y==48876||y==48904||y==48932||y==48960||y==48988||y==49016||y==49044||y==49072||y==49100||y==49128||y==49156||y==49184||y==49212||y==49240||y==49268||y==49296||y==49324||y==49352||y==49380||y==49408||y==49436||y==49464||y==49492||y==49520||y==49548||y==49576||y==49604||y==49632||y==49660||y==49688||y==49716||y==49744||y==49772||y==49800||y==49828||y==49856||y==49884||y==49912||y==49940||y==49968||y==49996||y==50024||y==50052||y==50080||y==50108||y==50136||y==50164||y==50192||y==50220||y==50248||y==50276||y==50304||y==50332||y==50360||y==50388||y==50416||y==50444||y==50472||y==50500||y==50528||y==50556||y==50584||y==50612||y==50640||y==50668||y==50696||y==50724||y==50752||y==50780||y==50808||y==50836||y==50864||y==50892||y==50920||y==50948||y==50976||y==51004||y==51032||y==51060||y==51088||y==51116||y==51144||y==51172||y==51200||y==51228||y==51256||y==51284||y==51312||y==51340||y==51368||y==51396||y==51424||y==51452||y==51480||y==51508||y==51536||y==51564||y==51592||y==51620||y==51648||y==51676||y==51704||y==51732||y==51760||y==51788||y==51816||y==51844||y==51872||y==51900||y==51928||y==51956||y==51984||y==52012||y==52040||y==52068||y==52096||y==52124||y==52152||y==52180||y==52208||y==52236||y==52264||y==52292||y==52320||y==52348||y==52376||y==52404||y==52432||y==52460||y==52488||y==52516||y==52544||y==52572||y==52600||y==52628||y==52656||y==52684||y==52712||y==52740||y==52768||y==52796||y==52824||y==52852||y==52880||y==52908||y==52936||y==52964||y==52992||y==53020||y==53048||y==53076||y==53104||y==53132||y==53160||y==53188||y==53216||y==53244||y==53272||y==53300||y==53328||y==53356||y==53384||y==53412||y==53440||y==53468||y==53496||y==53524||y==53552||y==53580||y==53608||y==53636||y==53664||y==53692||y==53720||y==53748||y==53776||y==53804||y==53832||y==53860||y==53888||y==53916||y==53944||y==53972||y==54e3||y==54028||y==54056||y==54084||y==54112||y==54140||y==54168||y==54196||y==54224||y==54252||y==54280||y==54308||y==54336||y==54364||y==54392||y==54420||y==54448||y==54476||y==54504||y==54532||y==54560||y==54588||y==54616||y==54644||y==54672||y==54700||y==54728||y==54756||y==54784||y==54812||y==54840||y==54868||y==54896||y==54924||y==54952||y==54980||y==55008||y==55036||y==55064||y==55092||y==55120||y==55148||y==55176?ai:44033<=y&&y<=44059||44061<=y&&y<=44087||44089<=y&&y<=44115||44117<=y&&y<=44143||44145<=y&&y<=44171||44173<=y&&y<=44199||44201<=y&&y<=44227||44229<=y&&y<=44255||44257<=y&&y<=44283||44285<=y&&y<=44311||44313<=y&&y<=44339||44341<=y&&y<=44367||44369<=y&&y<=44395||44397<=y&&y<=44423||44425<=y&&y<=44451||44453<=y&&y<=44479||44481<=y&&y<=44507||44509<=y&&y<=44535||44537<=y&&y<=44563||44565<=y&&y<=44591||44593<=y&&y<=44619||44621<=y&&y<=44647||44649<=y&&y<=44675||44677<=y&&y<=44703||44705<=y&&y<=44731||44733<=y&&y<=44759||44761<=y&&y<=44787||44789<=y&&y<=44815||44817<=y&&y<=44843||44845<=y&&y<=44871||44873<=y&&y<=44899||44901<=y&&y<=44927||44929<=y&&y<=44955||44957<=y&&y<=44983||44985<=y&&y<=45011||45013<=y&&y<=45039||45041<=y&&y<=45067||45069<=y&&y<=45095||45097<=y&&y<=45123||45125<=y&&y<=45151||45153<=y&&y<=45179||45181<=y&&y<=45207||45209<=y&&y<=45235||45237<=y&&y<=45263||45265<=y&&y<=45291||45293<=y&&y<=45319||45321<=y&&y<=45347||45349<=y&&y<=45375||45377<=y&&y<=45403||45405<=y&&y<=45431||45433<=y&&y<=45459||45461<=y&&y<=45487||45489<=y&&y<=45515||45517<=y&&y<=45543||45545<=y&&y<=45571||45573<=y&&y<=45599||45601<=y&&y<=45627||45629<=y&&y<=45655||45657<=y&&y<=45683||45685<=y&&y<=45711||45713<=y&&y<=45739||45741<=y&&y<=45767||45769<=y&&y<=45795||45797<=y&&y<=45823||45825<=y&&y<=45851||45853<=y&&y<=45879||45881<=y&&y<=45907||45909<=y&&y<=45935||45937<=y&&y<=45963||45965<=y&&y<=45991||45993<=y&&y<=46019||46021<=y&&y<=46047||46049<=y&&y<=46075||46077<=y&&y<=46103||46105<=y&&y<=46131||46133<=y&&y<=46159||46161<=y&&y<=46187||46189<=y&&y<=46215||46217<=y&&y<=46243||46245<=y&&y<=46271||46273<=y&&y<=46299||46301<=y&&y<=46327||46329<=y&&y<=46355||46357<=y&&y<=46383||46385<=y&&y<=46411||46413<=y&&y<=46439||46441<=y&&y<=46467||46469<=y&&y<=46495||46497<=y&&y<=46523||46525<=y&&y<=46551||46553<=y&&y<=46579||46581<=y&&y<=46607||46609<=y&&y<=46635||46637<=y&&y<=46663||46665<=y&&y<=46691||46693<=y&&y<=46719||46721<=y&&y<=46747||46749<=y&&y<=46775||46777<=y&&y<=46803||46805<=y&&y<=46831||46833<=y&&y<=46859||46861<=y&&y<=46887||46889<=y&&y<=46915||46917<=y&&y<=46943||46945<=y&&y<=46971||46973<=y&&y<=46999||47001<=y&&y<=47027||47029<=y&&y<=47055||47057<=y&&y<=47083||47085<=y&&y<=47111||47113<=y&&y<=47139||47141<=y&&y<=47167||47169<=y&&y<=47195||47197<=y&&y<=47223||47225<=y&&y<=47251||47253<=y&&y<=47279||47281<=y&&y<=47307||47309<=y&&y<=47335||47337<=y&&y<=47363||47365<=y&&y<=47391||47393<=y&&y<=47419||47421<=y&&y<=47447||47449<=y&&y<=47475||47477<=y&&y<=47503||47505<=y&&y<=47531||47533<=y&&y<=47559||47561<=y&&y<=47587||47589<=y&&y<=47615||47617<=y&&y<=47643||47645<=y&&y<=47671||47673<=y&&y<=47699||47701<=y&&y<=47727||47729<=y&&y<=47755||47757<=y&&y<=47783||47785<=y&&y<=47811||47813<=y&&y<=47839||47841<=y&&y<=47867||47869<=y&&y<=47895||47897<=y&&y<=47923||47925<=y&&y<=47951||47953<=y&&y<=47979||47981<=y&&y<=48007||48009<=y&&y<=48035||48037<=y&&y<=48063||48065<=y&&y<=48091||48093<=y&&y<=48119||48121<=y&&y<=48147||48149<=y&&y<=48175||48177<=y&&y<=48203||48205<=y&&y<=48231||48233<=y&&y<=48259||48261<=y&&y<=48287||48289<=y&&y<=48315||48317<=y&&y<=48343||48345<=y&&y<=48371||48373<=y&&y<=48399||48401<=y&&y<=48427||48429<=y&&y<=48455||48457<=y&&y<=48483||48485<=y&&y<=48511||48513<=y&&y<=48539||48541<=y&&y<=48567||48569<=y&&y<=48595||48597<=y&&y<=48623||48625<=y&&y<=48651||48653<=y&&y<=48679||48681<=y&&y<=48707||48709<=y&&y<=48735||48737<=y&&y<=48763||48765<=y&&y<=48791||48793<=y&&y<=48819||48821<=y&&y<=48847||48849<=y&&y<=48875||48877<=y&&y<=48903||48905<=y&&y<=48931||48933<=y&&y<=48959||48961<=y&&y<=48987||48989<=y&&y<=49015||49017<=y&&y<=49043||49045<=y&&y<=49071||49073<=y&&y<=49099||49101<=y&&y<=49127||49129<=y&&y<=49155||49157<=y&&y<=49183||49185<=y&&y<=49211||49213<=y&&y<=49239||49241<=y&&y<=49267||49269<=y&&y<=49295||49297<=y&&y<=49323||49325<=y&&y<=49351||49353<=y&&y<=49379||49381<=y&&y<=49407||49409<=y&&y<=49435||49437<=y&&y<=49463||49465<=y&&y<=49491||49493<=y&&y<=49519||49521<=y&&y<=49547||49549<=y&&y<=49575||49577<=y&&y<=49603||49605<=y&&y<=49631||49633<=y&&y<=49659||49661<=y&&y<=49687||49689<=y&&y<=49715||49717<=y&&y<=49743||49745<=y&&y<=49771||49773<=y&&y<=49799||49801<=y&&y<=49827||49829<=y&&y<=49855||49857<=y&&y<=49883||49885<=y&&y<=49911||49913<=y&&y<=49939||49941<=y&&y<=49967||49969<=y&&y<=49995||49997<=y&&y<=50023||50025<=y&&y<=50051||50053<=y&&y<=50079||50081<=y&&y<=50107||50109<=y&&y<=50135||50137<=y&&y<=50163||50165<=y&&y<=50191||50193<=y&&y<=50219||50221<=y&&y<=50247||50249<=y&&y<=50275||50277<=y&&y<=50303||50305<=y&&y<=50331||50333<=y&&y<=50359||50361<=y&&y<=50387||50389<=y&&y<=50415||50417<=y&&y<=50443||50445<=y&&y<=50471||50473<=y&&y<=50499||50501<=y&&y<=50527||50529<=y&&y<=50555||50557<=y&&y<=50583||50585<=y&&y<=50611||50613<=y&&y<=50639||50641<=y&&y<=50667||50669<=y&&y<=50695||50697<=y&&y<=50723||50725<=y&&y<=50751||50753<=y&&y<=50779||50781<=y&&y<=50807||50809<=y&&y<=50835||50837<=y&&y<=50863||50865<=y&&y<=50891||50893<=y&&y<=50919||50921<=y&&y<=50947||50949<=y&&y<=50975||50977<=y&&y<=51003||51005<=y&&y<=51031||51033<=y&&y<=51059||51061<=y&&y<=51087||51089<=y&&y<=51115||51117<=y&&y<=51143||51145<=y&&y<=51171||51173<=y&&y<=51199||51201<=y&&y<=51227||51229<=y&&y<=51255||51257<=y&&y<=51283||51285<=y&&y<=51311||51313<=y&&y<=51339||51341<=y&&y<=51367||51369<=y&&y<=51395||51397<=y&&y<=51423||51425<=y&&y<=51451||51453<=y&&y<=51479||51481<=y&&y<=51507||51509<=y&&y<=51535||51537<=y&&y<=51563||51565<=y&&y<=51591||51593<=y&&y<=51619||51621<=y&&y<=51647||51649<=y&&y<=51675||51677<=y&&y<=51703||51705<=y&&y<=51731||51733<=y&&y<=51759||51761<=y&&y<=51787||51789<=y&&y<=51815||51817<=y&&y<=51843||51845<=y&&y<=51871||51873<=y&&y<=51899||51901<=y&&y<=51927||51929<=y&&y<=51955||51957<=y&&y<=51983||51985<=y&&y<=52011||52013<=y&&y<=52039||52041<=y&&y<=52067||52069<=y&&y<=52095||52097<=y&&y<=52123||52125<=y&&y<=52151||52153<=y&&y<=52179||52181<=y&&y<=52207||52209<=y&&y<=52235||52237<=y&&y<=52263||52265<=y&&y<=52291||52293<=y&&y<=52319||52321<=y&&y<=52347||52349<=y&&y<=52375||52377<=y&&y<=52403||52405<=y&&y<=52431||52433<=y&&y<=52459||52461<=y&&y<=52487||52489<=y&&y<=52515||52517<=y&&y<=52543||52545<=y&&y<=52571||52573<=y&&y<=52599||52601<=y&&y<=52627||52629<=y&&y<=52655||52657<=y&&y<=52683||52685<=y&&y<=52711||52713<=y&&y<=52739||52741<=y&&y<=52767||52769<=y&&y<=52795||52797<=y&&y<=52823||52825<=y&&y<=52851||52853<=y&&y<=52879||52881<=y&&y<=52907||52909<=y&&y<=52935||52937<=y&&y<=52963||52965<=y&&y<=52991||52993<=y&&y<=53019||53021<=y&&y<=53047||53049<=y&&y<=53075||53077<=y&&y<=53103||53105<=y&&y<=53131||53133<=y&&y<=53159||53161<=y&&y<=53187||53189<=y&&y<=53215||53217<=y&&y<=53243||53245<=y&&y<=53271||53273<=y&&y<=53299||53301<=y&&y<=53327||53329<=y&&y<=53355||53357<=y&&y<=53383||53385<=y&&y<=53411||53413<=y&&y<=53439||53441<=y&&y<=53467||53469<=y&&y<=53495||53497<=y&&y<=53523||53525<=y&&y<=53551||53553<=y&&y<=53579||53581<=y&&y<=53607||53609<=y&&y<=53635||53637<=y&&y<=53663||53665<=y&&y<=53691||53693<=y&&y<=53719||53721<=y&&y<=53747||53749<=y&&y<=53775||53777<=y&&y<=53803||53805<=y&&y<=53831||53833<=y&&y<=53859||53861<=y&&y<=53887||53889<=y&&y<=53915||53917<=y&&y<=53943||53945<=y&&y<=53971||53973<=y&&y<=53999||54001<=y&&y<=54027||54029<=y&&y<=54055||54057<=y&&y<=54083||54085<=y&&y<=54111||54113<=y&&y<=54139||54141<=y&&y<=54167||54169<=y&&y<=54195||54197<=y&&y<=54223||54225<=y&&y<=54251||54253<=y&&y<=54279||54281<=y&&y<=54307||54309<=y&&y<=54335||54337<=y&&y<=54363||54365<=y&&y<=54391||54393<=y&&y<=54419||54421<=y&&y<=54447||54449<=y&&y<=54475||54477<=y&&y<=54503||54505<=y&&y<=54531||54533<=y&&y<=54559||54561<=y&&y<=54587||54589<=y&&y<=54615||54617<=y&&y<=54643||54645<=y&&y<=54671||54673<=y&&y<=54699||54701<=y&&y<=54727||54729<=y&&y<=54755||54757<=y&&y<=54783||54785<=y&&y<=54811||54813<=y&&y<=54839||54841<=y&&y<=54867||54869<=y&&y<=54895||54897<=y&&y<=54923||54925<=y&&y<=54951||54953<=y&&y<=54979||54981<=y&&y<=55007||55009<=y&&y<=55035||55037<=y&&y<=55063||55065<=y&&y<=55091||55093<=y&&y<=55119||55121<=y&&y<=55147||55149<=y&&y<=55175||55177<=y&&y<=55203?_n:y==9757||y==9977||9994<=y&&y<=9997||y==127877||127938<=y&&y<=127940||y==127943||127946<=y&&y<=127948||128066<=y&&y<=128067||128070<=y&&y<=128080||y==128110||128112<=y&&y<=128120||y==128124||128129<=y&&y<=128131||128133<=y&&y<=128135||y==128170||128372<=y&&y<=128373||y==128378||y==128400||128405<=y&&y<=128406||128581<=y&&y<=128583||128587<=y&&y<=128591||y==128675||128692<=y&&y<=128694||y==128704||y==128716||129304<=y&&y<=129308||129310<=y&&y<=129311||y==129318||129328<=y&&y<=129337||129341<=y&&y<=129342||129489<=y&&y<=129501?li:127995<=y&&y<=127999?In:y==8205?It:y==9792||y==9794||9877<=y&&y<=9878||y==9992||y==10084||y==127752||y==127806||y==127859||y==127891||y==127908||y==127912||y==127979||y==127981||y==128139||128187<=y&&y<=128188||y==128295||y==128300||y==128488||y==128640||y==128658?xe:128102<=y&&y<=128105?oe:Bn}return this}Te.exports&&(Te.exports=Se)}),o=new r,s=function(Se,Ne,ut){for(var rt=o.iterateGraphemes(Se.substring(Ne)),mt="",Rt=0;Rt<ut-Ne;Rt++){var Bt=rt.next();if(mt+=Bt.value,Bt.done)break}return mt},a=(function(Te,Se,Ne,ut,rt,mt,Rt){return{start:{line:Te,column:Se,offset:Ne},end:{line:ut,column:rt,offset:mt},source:Rt||null}}),c=i(function(Te,Se){(function(Ne,ut){Te.exports=ut()})(t,function(){var Ne="",ut,rt=mt;function mt(_n,Bn){if(typeof _n!="string")throw new TypeError("expected a string");if(Bn===1)return _n;if(Bn===2)return _n+_n;var dn=_n.length*Bn;if(ut!==_n||typeof ut>"u")ut=_n,Ne="";else if(Ne.length>=dn)return Ne.substr(0,dn);for(;dn>Ne.length&&Bn>1;)Bn&1&&(Ne+=_n),Bn>>=1,_n+=_n;return Ne+=_n,Ne=Ne.substr(0,dn),Ne}var Rt=function(Bn,dn,li){if(Bn==null||dn==null)return Bn;var In=String(Bn),It=typeof dn=="number"?dn:parseInt(dn,10);if(isNaN(It)||!isFinite(It))return In;var xe=In.length;if(xe>=It)return In;var oe=String(li);oe===""&&(oe=" ");for(var J=It-xe;oe.length<J;)oe+=oe;var ne=oe.length>J?oe.substr(0,J):oe;return ne+In},Bt=Object.assign||function(_n){for(var Bn=1;Bn<arguments.length;Bn++){var dn=arguments[Bn];for(var li in dn)Object.prototype.hasOwnProperty.call(dn,li)&&(_n[li]=dn[li])}return _n};function $t(_n,Bn,dn,li){var In=String(Bn),It=Rt(In,dn," "),xe=rt(" ",li.tabSize);return It+" | "+_n.replace(/\t/g,xe)}function Rn(_n,Bn,dn,li,In){return _n.slice(Bn,dn).map(function(It,xe){return $t(It,Bn+xe+1,li,In)}).join(`
`)}var zn={extraLines:2,tabSize:4},ai=function(Bn,dn,li,In){In=Bt({},zn,In);var It=Bn.split(/\r\n?|\n|\f/),xe=Math.max(1,dn-In.extraLines)-1,oe=Math.min(dn+In.extraLines,It.length),J=String(oe).length,ne=Rn(It,xe,dn,J,In),ue=$t(It[dn-1].substring(0,li-1),dn,J,In),Ce=rt(" ",ue.length)+"^",Ue=Rn(It,dn,oe,J,In);return[ne,Ce,Ue].filter(Boolean).join(`
`)};return ai})}),A=new Error().stack,m=(function(Te){var Se=Object.create(SyntaxError.prototype);return Object.assign(Se,Te,{name:"SyntaxError"}),Object.defineProperty(Se,"stack",{get:function(){return A?A.replace(/^(.+\n){1,3}/,String(Se)+`
`):""}}),Se}),v=(function(Te,Se,Ne,ut,rt){throw m({message:ut?Te+`
`+c(Se,ut,rt):Te,rawMessage:Te,source:Ne,line:ut,column:rt})}),x={unexpectedEnd:function(){return"Unexpected end of input"},unexpectedToken:function(Se){for(var Ne=arguments.length,ut=Array(Ne>1?Ne-1:0),rt=1;rt<Ne;rt++)ut[rt-1]=arguments[rt];return"Unexpected token <"+Se+"> at "+ut.filter(Boolean).join(":")}},_={unexpectedSymbol:function(Se){for(var Ne=arguments.length,ut=Array(Ne>1?Ne-1:0),rt=1;rt<Ne;rt++)ut[rt-1]=arguments[rt];return"Unexpected symbol <"+Se+"> at "+ut.filter(Boolean).join(":")}},O={LEFT_BRACE:0,RIGHT_BRACE:1,LEFT_BRACKET:2,RIGHT_BRACKET:3,COLON:4,COMMA:5,STRING:6,NUMBER:7,TRUE:8,FALSE:9,NULL:10},P={"{":O.LEFT_BRACE,"}":O.RIGHT_BRACE,"[":O.LEFT_BRACKET,"]":O.RIGHT_BRACKET,":":O.COLON,",":O.COMMA},F={true:O.TRUE,false:O.FALSE,null:O.NULL},j={_START_:0,START_QUOTE_OR_CHAR:1,ESCAPE:2},Q={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8},V={_START_:0,MINUS:1,ZERO:2,DIGIT:3,POINT:4,DIGIT_FRACTION:5,EXP:6,EXP_DIGIT_OR_SIGN:7};function H(Te){return Te>="1"&&Te<="9"}function G(Te){return Te>="0"&&Te<="9"}function Y(Te){return G(Te)||Te>="a"&&Te<="f"||Te>="A"&&Te<="F"}function z(Te){return Te==="e"||Te==="E"}function se(Te,Se,Ne,ut){var rt=Te.charAt(Se);if(rt==="\r")Se++,Ne++,ut=1,Te.charAt(Se)===`
`&&Se++;else if(rt===`
`)Se++,Ne++,ut=1;else if(rt===" "||rt===" ")Se++,ut++;else return null;return{index:Se,line:Ne,column:ut}}function le(Te,Se,Ne,ut){var rt=Te.charAt(Se);return rt in P?{type:P[rt],line:Ne,column:ut+1,index:Se+1,value:null}:null}function me(Te,Se,Ne,ut){for(var rt in F)if(F.hasOwnProperty(rt)&&Te.substr(Se,rt.length)===rt)return{type:F[rt],line:Ne,column:ut+rt.length,index:Se+rt.length,value:rt};return null}function fe(Te,Se,Ne,ut){for(var rt=Se,mt=j._START_;Se<Te.length;){var Rt=Te.charAt(Se);switch(mt){case j._START_:{if(Rt==='"')Se++,mt=j.START_QUOTE_OR_CHAR;else return null;break}case j.START_QUOTE_OR_CHAR:{if(Rt==="\\")Se++,mt=j.ESCAPE;else{if(Rt==='"')return Se++,{type:O.STRING,line:Ne,column:ut+Se-rt,index:Se,value:Te.slice(rt,Se)};Se++}break}case j.ESCAPE:{if(Rt in Q){if(Se++,Rt==="u")for(var Bt=0;Bt<4;Bt++){var $t=Te.charAt(Se);if($t&&Y($t))Se++;else return null}mt=j.START_QUOTE_OR_CHAR}else return null;break}}}}function _e(Te,Se,Ne,ut){var rt=Se,mt=Se,Rt=V._START_;e:for(;Se<Te.length;){var Bt=Te.charAt(Se);switch(Rt){case V._START_:{if(Bt==="-")Rt=V.MINUS;else if(Bt==="0")mt=Se+1,Rt=V.ZERO;else if(H(Bt))mt=Se+1,Rt=V.DIGIT;else return null;break}case V.MINUS:{if(Bt==="0")mt=Se+1,Rt=V.ZERO;else if(H(Bt))mt=Se+1,Rt=V.DIGIT;else return null;break}case V.ZERO:{if(Bt===".")Rt=V.POINT;else if(z(Bt))Rt=V.EXP;else break e;break}case V.DIGIT:{if(G(Bt))mt=Se+1;else if(Bt===".")Rt=V.POINT;else if(z(Bt))Rt=V.EXP;else break e;break}case V.POINT:{if(G(Bt))mt=Se+1,Rt=V.DIGIT_FRACTION;else break e;break}case V.DIGIT_FRACTION:{if(G(Bt))mt=Se+1;else if(z(Bt))Rt=V.EXP;else break e;break}case V.EXP:{if(Bt==="+"||Bt==="-")Rt=V.EXP_DIGIT_OR_SIGN;else if(G(Bt))mt=Se+1,Rt=V.EXP_DIGIT_OR_SIGN;else break e;break}case V.EXP_DIGIT_OR_SIGN:{if(G(Bt))mt=Se+1;else break e;break}}Se++}return mt>0?{type:O.NUMBER,line:Ne,column:ut+mt-rt,index:mt,value:Te.slice(rt,mt)}:null}var we=function(Se,Ne){for(var ut=1,rt=1,mt=0,Rt=[];mt<Se.length;){var Bt=[Se,mt,ut,rt],$t=se.apply(void 0,Bt);if($t){mt=$t.index,ut=$t.line,rt=$t.column;continue}var Rn=le.apply(void 0,Bt)||me.apply(void 0,Bt)||fe.apply(void 0,Bt)||_e.apply(void 0,Bt);if(Rn){var zn={type:Rn.type,value:Rn.value,loc:a(ut,rt,mt,Rn.line,Rn.column,Rn.index,Ne.source)};Rt.push(zn),mt=Rn.index,ut=Rn.line,rt=Rn.column}else v(_.unexpectedSymbol(s(Se,mt,mt+1),Ne.source,ut,rt),Se,Ne.source,ut,rt)}return Rt},ke={_START_:0,OPEN_OBJECT:1,PROPERTY:2,COMMA:3},je={_START_:0,KEY:1,COLON:2},Ie={_START_:0,OPEN_ARRAY:1,VALUE:2,COMMA:3},Qe={loc:!0,source:null};function tt(Te,Se,Ne){var ut=Se.length>0?Se[Se.length-1].loc.end:{line:1,column:1};v(x.unexpectedEnd(),Te,Ne.source,ut.line,ut.column)}function ht(Te){for(var Se=0,Ne=0;Ne<4;Ne++)Se=Se*16+parseInt(Te[Ne],16);return String.fromCharCode(Se)}var ce={b:"\b",f:"\f",n:`
`,r:"\r",t:" "},Le=['"',"\\","/"];function We(Te){for(var Se="",Ne=0;Ne<Te.length;Ne++){var ut=Te.charAt(Ne);if(ut==="\\"){Ne++;var rt=Te.charAt(Ne);if(rt==="u")Se+=ht(Te.substr(Ne+1,4)),Ne+=4;else if(Le.indexOf(rt)!==-1)Se+=rt;else if(rt in ce)Se+=ce[rt];else break}else Se+=ut}return Se}function Me(Te,Se,Ne,ut){for(var rt=void 0,mt={type:"Object",children:[]},Rt=ke._START_;Ne<Se.length;){var Bt=Se[Ne];switch(Rt){case ke._START_:{if(Bt.type===O.LEFT_BRACE)rt=Bt,Rt=ke.OPEN_OBJECT,Ne++;else return null;break}case ke.OPEN_OBJECT:{if(Bt.type===O.RIGHT_BRACE)return ut.loc&&(mt.loc=a(rt.loc.start.line,rt.loc.start.column,rt.loc.start.offset,Bt.loc.end.line,Bt.loc.end.column,Bt.loc.end.offset,ut.source)),{value:mt,index:Ne+1};var $t=dt(Te,Se,Ne,ut);mt.children.push($t.value),Rt=ke.PROPERTY,Ne=$t.index;break}case ke.PROPERTY:{if(Bt.type===O.RIGHT_BRACE)return ut.loc&&(mt.loc=a(rt.loc.start.line,rt.loc.start.column,rt.loc.start.offset,Bt.loc.end.line,Bt.loc.end.column,Bt.loc.end.offset,ut.source)),{value:mt,index:Ne+1};Bt.type===O.COMMA?(Rt=ke.COMMA,Ne++):v(x.unexpectedToken(s(Te,Bt.loc.start.offset,Bt.loc.end.offset),ut.source,Bt.loc.start.line,Bt.loc.start.column),Te,ut.source,Bt.loc.start.line,Bt.loc.start.column);break}case ke.COMMA:{var Rn=dt(Te,Se,Ne,ut);Rn?(Ne=Rn.index,mt.children.push(Rn.value),Rt=ke.PROPERTY):v(x.unexpectedToken(s(Te,Bt.loc.start.offset,Bt.loc.end.offset),ut.source,Bt.loc.start.line,Bt.loc.start.column),Te,ut.source,Bt.loc.start.line,Bt.loc.start.column);break}}}tt(Te,Se,ut)}function dt(Te,Se,Ne,ut){for(var rt=void 0,mt={type:"Property",key:null,value:null},Rt=je._START_;Ne<Se.length;){var Bt=Se[Ne];switch(Rt){case je._START_:{if(Bt.type===O.STRING){var $t={type:"Identifier",value:We(Te.slice(Bt.loc.start.offset+1,Bt.loc.end.offset-1)),raw:Bt.value};ut.loc&&($t.loc=Bt.loc),rt=Bt,mt.key=$t,Rt=je.KEY,Ne++}else return null;break}case je.KEY:{Bt.type===O.COLON?(Rt=je.COLON,Ne++):v(x.unexpectedToken(s(Te,Bt.loc.start.offset,Bt.loc.end.offset),ut.source,Bt.loc.start.line,Bt.loc.start.column),Te,ut.source,Bt.loc.start.line,Bt.loc.start.column);break}case je.COLON:{var Rn=Ut(Te,Se,Ne,ut);return mt.value=Rn.value,ut.loc&&(mt.loc=a(rt.loc.start.line,rt.loc.start.column,rt.loc.start.offset,Rn.value.loc.end.line,Rn.value.loc.end.column,Rn.value.loc.end.offset,ut.source)),{value:mt,index:Rn.index}}}}}function it(Te,Se,Ne,ut){for(var rt=void 0,mt={type:"Array",children:[]},Rt=Ie._START_,Bt=void 0;Ne<Se.length;)switch(Bt=Se[Ne],Rt){case Ie._START_:{if(Bt.type===O.LEFT_BRACKET)rt=Bt,Rt=Ie.OPEN_ARRAY,Ne++;else return null;break}case Ie.OPEN_ARRAY:{if(Bt.type===O.RIGHT_BRACKET)return ut.loc&&(mt.loc=a(rt.loc.start.line,rt.loc.start.column,rt.loc.start.offset,Bt.loc.end.line,Bt.loc.end.column,Bt.loc.end.offset,ut.source)),{value:mt,index:Ne+1};var $t=Ut(Te,Se,Ne,ut);Ne=$t.index,mt.children.push($t.value),Rt=Ie.VALUE;break}case Ie.VALUE:{if(Bt.type===O.RIGHT_BRACKET)return ut.loc&&(mt.loc=a(rt.loc.start.line,rt.loc.start.column,rt.loc.start.offset,Bt.loc.end.line,Bt.loc.end.column,Bt.loc.end.offset,ut.source)),{value:mt,index:Ne+1};Bt.type===O.COMMA?(Rt=Ie.COMMA,Ne++):v(x.unexpectedToken(s(Te,Bt.loc.start.offset,Bt.loc.end.offset),ut.source,Bt.loc.start.line,Bt.loc.start.column),Te,ut.source,Bt.loc.start.line,Bt.loc.start.column);break}case Ie.COMMA:{var Rn=Ut(Te,Se,Ne,ut);Ne=Rn.index,mt.children.push(Rn.value),Rt=Ie.VALUE;break}}tt(Te,Se,ut)}function vt(Te,Se,Ne,ut){var rt=Se[Ne],mt=null;switch(rt.type){case O.STRING:{mt=We(Te.slice(rt.loc.start.offset+1,rt.loc.end.offset-1));break}case O.NUMBER:{mt=Number(rt.value);break}case O.TRUE:{mt=!0;break}case O.FALSE:{mt=!1;break}case O.NULL:{mt=null;break}default:return null}var Rt={type:"Literal",value:mt,raw:rt.value};return ut.loc&&(Rt.loc=rt.loc),{value:Rt,index:Ne+1}}function Ut(Te,Se,Ne,ut){var rt=Se[Ne],mt=vt.apply(void 0,arguments)||Me.apply(void 0,arguments)||it.apply(void 0,arguments);if(mt)return mt;v(x.unexpectedToken(s(Te,rt.loc.start.offset,rt.loc.end.offset),ut.source,rt.loc.start.line,rt.loc.start.column),Te,ut.source,rt.loc.start.line,rt.loc.start.column)}var Pe=(function(Te,Se){Se=Object.assign({},Qe,Se);var Ne=we(Te,Se);Ne.length===0&&tt(Te,Ne,Se);var ut=Ut(Te,Ne,0,Se);if(ut.index===Ne.length)return ut.value;var rt=Ne[ut.index];v(x.unexpectedToken(s(Te,rt.loc.start.offset,rt.loc.end.offset),Se.source,rt.loc.start.line,rt.loc.start.column),Te,Se.source,rt.loc.start.line,rt.loc.start.column)});return Pe}))})(fw)),fw.exports}var bke=vke();const YK=Wl(bke);function _a(){var n="/home/runner/work/maputnik/maputnik/src/libs/json-path-to-position.ts",e="68bf9a3bcb07bd54be36702e0c3494ce552968d6",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/json-path-to-position.ts",statementMap:{0:{start:{line:2,column:2},end:{line:4,column:3}},1:{start:{line:3,column:4},end:{line:3,column:18}},2:{start:{line:5,column:2},end:{line:7,column:3}},3:{start:{line:6,column:4},end:{line:6,column:16}},4:{start:{line:8,column:2},end:{line:10,column:3}},5:{start:{line:9,column:4},end:{line:9,column:18}},6:{start:{line:11,column:14},end:{line:11,column:21}},7:{start:{line:12,column:2},end:{line:14,column:3}},8:{start:{line:13,column:4},end:{line:13,column:70}},9:{start:{line:15,column:18},end:{line:17,column:4}},10:{start:{line:16,column:4},end:{line:16,column:100}},11:{start:{line:18,column:2},end:{line:18,column:59}}},fnMap:{0:{name:"jsonPathToPosition",decl:{start:{line:1,column:16},end:{line:1,column:34}},loc:{start:{line:1,column:47},end:{line:19,column:1}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:15,column:37},end:{line:15,column:38}},loc:{start:{line:15,column:52},end:{line:17,column:3}},line:15}},branchMap:{0:{loc:{start:{line:2,column:2},end:{line:4,column:3}},type:"if",locations:[{start:{line:2,column:2},end:{line:4,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:2},1:{loc:{start:{line:5,column:2},end:{line:7,column:3}},type:"if",locations:[{start:{line:5,column:2},end:{line:7,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:5},2:{loc:{start:{line:8,column:2},end:{line:10,column:3}},type:"if",locations:[{start:{line:8,column:2},end:{line:10,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:8},3:{loc:{start:{line:12,column:2},end:{line:14,column:3}},type:"if",locations:[{start:{line:12,column:2},end:{line:14,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:12},4:{loc:{start:{line:16,column:11},end:{line:16,column:99}},type:"binary-expr",locations:[{start:{line:16,column:11},end:{line:16,column:29}},{start:{line:16,column:33},end:{line:16,column:68}},{start:{line:16,column:72},end:{line:16,column:99}}],line:16}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0,1:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/json-path-to-position.ts"],names:[],mappings:"AAEO,gBAAS,mBAAmB,MAAgB,MAA6C;AAC9F,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,MAAI,KAAK,SAAS,GAAG;AACnB,WAAO;AAAA,EACT;AACA,MAAI,EAAE,cAAc,OAAO;AACzB,WAAO;AAAA,EACT;AACA,QAAM,MAAM,KAAK,CAAC;AAClB,MAAI,IAAI,MAAM,UAAU,GAAG;AACzB,WAAO,mBAAmB,KAAK,MAAM,CAAC,GAAG,KAAK,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AAAA,EAClE;AACA,QAAM,UAAU,KAAK,SAAS,KAAK,CAAC,cAAc;AAChD,WACE,SAAS,aACT,UAAU,IAAI,SAAS,gBACvB,UAAU,IAAI,UAAU;AAAA,EAE5B,CAAC;AACD,SAAO,mBAAmB,KAAK,MAAM,CAAC,GAAG,SAAS,KAAK;AACzD;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"68bf9a3bcb07bd54be36702e0c3494ce552968d6"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return _a=function(){return s},s}_a();function SD(n,e){if(_a().f[0]++,_a().s[0]++,e)_a().b[0][1]++;else{_a().b[0][0]++,_a().s[1]++;return}if(_a().s[2]++,n.length<1)return _a().b[1][0]++,_a().s[3]++,e;if(_a().b[1][1]++,_a().s[4]++,"children"in e)_a().b[2][1]++;else{_a().b[2][0]++,_a().s[5]++;return}const t=(_a().s[6]++,n[0]);if(_a().s[7]++,t.match(/^[0-9]+$/))return _a().b[3][0]++,_a().s[8]++,SD(n.slice(1),e.children[+n[0]]);_a().b[3][1]++;const i=(_a().s[9]++,e.children.find(r=>(_a().f[1]++,_a().s[10]++,_a().b[4][0]++,"key"in r&&(_a().b[4][1]++,r.key.type==="Identifier")&&(_a().b[4][2]++,r.key.value===t))));return _a().s[11]++,SD(n.slice(1),i?.value)}function Tn(){var n="/home/runner/work/maputnik/maputnik/src/libs/codemirror-editor-factory.ts",e="fed5a4f9200b6a5cf90f61b2c7f89f45308868c6",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/codemirror-editor-factory.ts",statementMap:{0:{start:{line:11,column:22},end:{line:11,column:24}},1:{start:{line:12,column:2},end:{line:37,column:3}},2:{start:{line:13,column:29},end:{line:13,column:34}},3:{start:{line:14,column:4},end:{line:36,column:5}},4:{start:{line:15,column:6},end:{line:20,column:9}},5:{start:{line:22,column:19},end:{line:22,column:81}},6:{start:{line:23,column:19},end:{line:23,column:48}},7:{start:{line:24,column:6},end:{line:27,column:7}},8:{start:{line:25,column:8},end:{line:25,column:67}},9:{start:{line:26,column:8},end:{line:26,column:17}},10:{start:{line:28,column:6},end:{line:35,column:7}},11:{start:{line:29,column:8},end:{line:34,column:11}},12:{start:{line:38,column:2},end:{line:38,column:21}},13:{start:{line:41,column:2},end:{line:70,column:4}},14:{start:{line:42,column:17},end:{line:42,column:42}},15:{start:{line:43,column:4},end:{line:68,column:5}},16:{start:{line:44,column:25},end:{line:44,column:41}},17:{start:{line:45,column:18},end:{line:45,column:33}},18:{start:{line:46,column:31},end:{line:56,column:8}},19:{start:{line:57,column:27},end:{line:65,column:8}},20:{start:{line:58,column:8},end:{line:58,column:74}},21:{start:{line:60,column:32},end:{line:60,column:83}},22:{start:{line:61,column:8},end:{line:64,column:10}},23:{start:{line:66,column:6},end:{line:66,column:67}},24:{start:{line:69,column:4},end:{line:69,column:14}},25:{start:{line:73,column:2},end:{line:89,column:4}},26:{start:{line:74,column:17},end:{line:74,column:42}},27:{start:{line:75,column:4},end:{line:87,column:5}},28:{start:{line:76,column:25},end:{line:76,column:41}},29:{start:{line:77,column:18},end:{line:77,column:33}},30:{start:{line:78,column:31},end:{line:78,column:59}},31:{start:{line:79,column:27},end:{line:84,column:8}},32:{start:{line:80,column:8},end:{line:83,column:10}},33:{start:{line:85,column:6},end:{line:85,column:67}},34:{start:{line:88,column:4},end:{line:88,column:14}},35:{start:{line:92,column:2},end:{line:102,column:4}},36:{start:{line:93,column:17},end:{line:93,column:42}},37:{start:{line:94,column:23},end:{line:94,column:39}},38:{start:{line:95,column:16},end:{line:95,column:31}},39:{start:{line:96,column:16},end:{line:96,column:61}},40:{start:{line:97,column:4},end:{line:99,column:5}},41:{start:{line:98,column:6},end:{line:98,column:16}},42:{start:{line:100,column:19},end:{line:100,column:28}},43:{start:{line:101,column:4},end:{line:101,column:59}},44:{start:{line:105,column:23},end:{line:105,column:31}},45:{start:{line:105,column:29},end:{line:105,column:31}},46:{start:{line:106,column:2},end:{line:119,column:3}},47:{start:{line:108,column:6},end:{line:108,column:51}},48:{start:{line:109,column:6},end:{line:109,column:12}},49:{start:{line:111,column:6},end:{line:111,column:51}},50:{start:{line:112,column:6},end:{line:112,column:12}},51:{start:{line:114,column:6},end:{line:114,column:66}},52:{start:{line:115,column:6},end:{line:115,column:12}},53:{start:{line:117,column:6},end:{line:117,column:32}},54:{start:{line:117,column:29},end:{line:117,column:31}},55:{start:{line:118,column:6},end:{line:118,column:12}},56:{start:{line:120,column:2},end:{line:156,column:5}},57:{start:{line:133,column:8},end:{line:137,column:9}},58:{start:{line:134,column:22},end:{line:134,column:38}},59:{start:{line:135,column:24},end:{line:135,column:38}},60:{start:{line:136,column:10},end:{line:136,column:32}},61:{start:{line:138,column:8},end:{line:144,column:9}},62:{start:{line:139,column:10},end:{line:143,column:11}},63:{start:{line:140,column:12},end:{line:140,column:28}},64:{start:{line:142,column:12},end:{line:142,column:27}},65:{start:{line:148,column:27},end:{line:148,column:50}},66:{start:{line:149,column:8},end:{line:151,column:9}},67:{start:{line:150,column:10},end:{line:150,column:28}},68:{start:{line:152,column:8},end:{line:152,column:36}}},fnMap:{0:{name:"getDiagnosticsFromExpressionErrors",decl:{start:{line:10,column:9},end:{line:10,column:43}},loc:{start:{line:10,column:57},end:{line:39,column:1}},line:10},1:{name:"createMaplibreLayerLinter",decl:{start:{line:40,column:9},end:{line:40,column:34}},loc:{start:{line:40,column:37},end:{line:71,column:1}},line:40},2:{name:"(anonymous_2)",decl:{start:{line:41,column:9},end:{line:41,column:10}},loc:{start:{line:41,column:19},end:{line:70,column:3}},line:41},3:{name:"(anonymous_3)",decl:{start:{line:57,column:51},end:{line:57,column:52}},loc:{start:{line:57,column:60},end:{line:59,column:7}},line:57},4:{name:"(anonymous_4)",decl:{start:{line:59,column:13},end:{line:59,column:14}},loc:{start:{line:59,column:22},end:{line:65,column:7}},line:59},5:{name:"createMaplibreStyleLinter",decl:{start:{line:72,column:9},end:{line:72,column:34}},loc:{start:{line:72,column:37},end:{line:90,column:1}},line:72},6:{name:"(anonymous_6)",decl:{start:{line:73,column:9},end:{line:73,column:10}},loc:{start:{line:73,column:19},end:{line:89,column:3}},line:73},7:{name:"(anonymous_7)",decl:{start:{line:79,column:48},end:{line:79,column:49}},loc:{start:{line:79,column:57},end:{line:84,column:7}},line:79},8:{name:"createMaplibreExpressionLinter",decl:{start:{line:91,column:9},end:{line:91,column:39}},loc:{start:{line:91,column:46},end:{line:103,column:1}},line:91},9:{name:"(anonymous_9)",decl:{start:{line:92,column:9},end:{line:92,column:10}},loc:{start:{line:92,column:19},end:{line:102,column:3}},line:92},10:{name:"createEditor",decl:{start:{line:104,column:16},end:{line:104,column:28}},loc:{start:{line:104,column:36},end:{line:157,column:1}},line:104},11:{name:"(anonymous_11)",decl:{start:{line:105,column:23},end:{line:105,column:24}},loc:{start:{line:105,column:29},end:{line:105,column:31}},line:105},12:{name:"(anonymous_12)",decl:{start:{line:117,column:23},end:{line:117,column:24}},loc:{start:{line:117,column:29},end:{line:117,column:31}},line:117},13:{name:"(anonymous_13)",decl:{start:{line:132,column:35},end:{line:132,column:36}},loc:{start:{line:132,column:47},end:{line:145,column:7}},line:132},14:{name:"(anonymous_14)",decl:{start:{line:147,column:13},end:{line:147,column:14}},loc:{start:{line:147,column:23},end:{line:153,column:7}},line:147}},branchMap:{0:{loc:{start:{line:14,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:14,column:4},end:{line:36,column:5}},{start:{line:21,column:11},end:{line:36,column:5}}],line:14},1:{loc:{start:{line:17,column:12},end:{line:17,column:44}},type:"cond-expr",locations:[{start:{line:17,column:22},end:{line:17,column:40}},{start:{line:17,column:43},end:{line:17,column:44}}],line:17},2:{loc:{start:{line:24,column:6},end:{line:27,column:7}},type:"if",locations:[{start:{line:24,column:6},end:{line:27,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:24},3:{loc:{start:{line:28,column:6},end:{line:35,column:7}},type:"if",locations:[{start:{line:28,column:6},end:{line:35,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:28},4:{loc:{start:{line:97,column:4},end:{line:99,column:5}},type:"if",locations:[{start:{line:97,column:4},end:{line:99,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:97},5:{loc:{start:{line:106,column:2},end:{line:119,column:3}},type:"switch",locations:[{start:{line:107,column:4},end:{line:109,column:12}},{start:{line:110,column:4},end:{line:112,column:12}},{start:{line:113,column:4},end:{line:115,column:12}},{start:{line:116,column:4},end:{line:118,column:12}}],line:106},6:{loc:{start:{line:133,column:8},end:{line:137,column:9}},type:"if",locations:[{start:{line:133,column:8},end:{line:137,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:133},7:{loc:{start:{line:138,column:8},end:{line:144,column:9}},type:"if",locations:[{start:{line:138,column:8},end:{line:144,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:138},8:{loc:{start:{line:139,column:10},end:{line:143,column:11}},type:"if",locations:[{start:{line:139,column:10},end:{line:143,column:11}},{start:{line:141,column:17},end:{line:143,column:11}}],line:139},9:{loc:{start:{line:149,column:8},end:{line:151,column:9}},type:"if",locations:[{start:{line:149,column:8},end:{line:151,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:149}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0,0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/codemirror-editor-factory.ts"],names:[],mappings:"AAAA,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,aAAa,mBAAmB;AACzC,SAAS,MAAM,uBAAuB;AACtC,SAAS,QAAQ,kBAAmC;AACpD,SAAS,eAAe;AACxB,SAAS,YAA6C,wBAAwB;AAC9E,OAAO,eAAsD;AAC7D,SAAS,0BAA0B;AASnC,SAAS,mCAAmC,QAAuB,KAA+B;AAChG,QAAM,cAA4B,CAAC;AACnC,aAAW,SAAS,QAAQ;AAC1B,UAAM,EAAC,KAAK,QAAO,IAAI;AACvB,QAAI,CAAC,KAAK;AACR,kBAAY,KAAK;AAAA,QACf,MAAM;AAAA,QACN,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,SAAS;AAAA,QACnC,UAAU;AAAA,QACV;AAAA,MACF,CAAC;AAAA,IACH,OAAO;AACL,YAAM,OAAO,IAAI,QAAQ,YAAY,EAAE,EAAE,MAAM,WAAW,EAAE,OAAO,OAAO;AAC1E,YAAM,OAAO,mBAAmB,MAAM,GAAG;AACzC,UAAI,CAAC,MAAM;AACT,gBAAQ,KAAK,uCAAuC,KAAK;AACzD;AAAA,MACF;AACA,UAAI,KAAK,KAAK;AACZ,oBAAY,KAAK;AAAA,UACf,MAAM,KAAK,IAAI,MAAM;AAAA,UACrB,IAAI,KAAK,IAAI,IAAI;AAAA,UACjB,UAAU;AAAA,UACV;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,4BAA4B;AACnC,SAAO,CAAC,SAAqB;AAC3B,UAAM,OAAO,KAAK,MAAM,IAAI,SAAS;AAErC,QAAI;AAEF,YAAM,aAAa,KAAK,MAAM,IAAI;AAClC,YAAM,MAAM,UAAU,IAAI;AAG1B,YAAM,mBAAmB,iBAAiB;AAAA,QACxC,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,YAAY,CAAC;AAAA,QACb,WAAW,CAAC;AAAA,QACZ,UAAU;AAAA,QACV,UAAU;AAAA,QACV,UAAU;AAAA,UACR;AAAA,QACF;AAAA,MACF,CAAC;AAED,YAAM,eAAe,iBAClB,OAAO,SAAO;AAEb,eAAO,CAAC,IAAI,QAAQ,MAAM,sCAAsC;AAAA,MAClE,CAAC,EACA,IAAI,SAAO;AAEV,cAAM,kBAAkB,IAAI,QAAQ,QAAQ,iBAAiB,EAAE,EAAE,MAAM,GAAG;AAC1E,eAAO;AAAA,UACL,KAAK,gBAAgB,CAAC;AAAA,UACtB,SAAS,gBAAgB,CAAC;AAAA,QAC5B;AAAA,MACF,CAAC;AACH,aAAO,mCAAmC,cAAc,GAAG;AAAA,IAC7D,QAAQ;AAAA,IAER;AACA,WAAO,CAAC;AAAA,EACV;AACF;AAEA,SAAS,4BAA4B;AACnC,SAAO,CAAC,SAAqB;AAC3B,UAAM,OAAO,KAAK,MAAM,IAAI,SAAS;AAErC,QAAI;AAEF,YAAM,aAAa,KAAK,MAAM,IAAI;AAClC,YAAM,MAAM,UAAU,IAAI;AAG1B,YAAM,mBAAmB,iBAAiB,UAAU;AACpD,YAAM,eAAe,iBAAiB,IAAI,SAAO;AAC/C,eAAO;AAAA,UACL,KAAK,IAAI,QAAQ,MAAM,GAAG,EAAE,CAAC;AAAA,UAC7B,SAAS,IAAI;AAAA,QACf;AAAA,MACF,CAAC;AACD,aAAO,mCAAmC,cAAc,GAAG;AAAA,IAC7D,QAAQ;AAAA,IAER;AACA,WAAO,CAAC;AAAA,EACV;AACF;AAEA,SAAS,+BAA+B,MAAmC;AACzE,SAAO,CAAC,SAAqB;AAC3B,UAAM,OAAO,KAAK,MAAM,IAAI,SAAS;AACrC,UAAM,aAAa,KAAK,MAAM,IAAI;AAClC,UAAM,MAAM,UAAU,IAAI;AAC1B,UAAM,MAAM,WAAW,iBAAiB,YAAY,IAAI;AACxD,QAAI,KAAK,WAAW,SAAS;AAC3B,aAAO,CAAC;AAAA,IACV;AACA,UAAM,SAAS,IAAI;AACnB,WAAO,mCAAmC,QAAQ,GAAG;AAAA,EACvD;AACF;AAEO,gBAAS,aAAa,OAQd;AACb,MAAI,iBAAqD,MAAM,CAAC;AAChE,UAAQ,MAAM,UAAU;AAAA,IACtB,KAAK;AACH,uBAAiB,0BAA0B;AAC3C;AAAA,IACF,KAAK;AACH,uBAAiB,0BAA0B;AAC3C;AAAA,IACF,KAAK;AACH,uBAAiB,+BAA+B,MAAM,IAAI;AAC1D;AAAA,IACF,KAAK;AACH,uBAAiB,MAAM,CAAC;AACxB;AAAA,EACJ;AAEA,SAAO,IAAI,WAAW;AAAA,IACpB,KAAK,MAAM;AAAA,IACX,YAAY;AAAA,MACV;AAAA,MACA,KAAK;AAAA,MACL;AAAA,MACA,IAAI,YAAY,EAAE,GAAG,YAAY,QAAQ,GAAG,CAAC,CAAC;AAAA,MAC9C,WAAW,MAAM;AAAA,QACf,KAAK;AAAA,UACH,UAAU;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,MACD,WAAW,eAAe,GAAG,CAAC,WAAW;AACvC,YAAI,OAAO,YAAY;AACrB,gBAAM,MAAM,OAAO,MAAM;AACzB,gBAAM,QAAQ,IAAI,SAAS;AAC3B,gBAAM,SAAS,KAAK;AAAA,QACtB;AACA,YAAI,OAAO,cAAc;AACvB,cAAI,OAAO,KAAK,UAAU;AACxB,kBAAM,QAAQ;AAAA,UAChB,OAAO;AACL,kBAAM,OAAO;AAAA,UACf;AAAA,QACF;AAAA,MACF,CAAC;AAAA,MACD,WAAW;AAAA,MACX,OAAO,CAAC,SAAqB;AAC3B,cAAM,aAAa,gBAAgB,EAAE,IAAI;AACzC,YAAI,WAAW,SAAS,GAAG;AACzB,iBAAO;AAAA,QACT;AACA,eAAO,eAAe,IAAI;AAAA,MAC5B,CAAC;AAAA,IACH;AAAA,IACA,QAAQ,MAAM;AAAA,EAChB,CAAC;AACH;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"fed5a4f9200b6a5cf90f61b2c7f89f45308868c6"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Tn=function(){return s},s}Tn();function $K(n,e){Tn().f[0]++;const t=(Tn().s[0]++,[]);Tn().s[1]++;for(const i of n){const{key:r,message:o}=(Tn().s[2]++,i);if(Tn().s[3]++,!r)Tn().b[0][0]++,Tn().s[4]++,t.push({from:0,to:e.loc?(Tn().b[1][0]++,e.loc.end.offset):(Tn().b[1][1]++,0),severity:"error",message:o});else{Tn().b[0][1]++;const s=(Tn().s[5]++,r.replace(/^\[|\]$/g,"").split(/\.|[[\]]+/).filter(Boolean)),a=(Tn().s[6]++,SD(s,e));if(Tn().s[7]++,a)Tn().b[2][1]++;else{Tn().b[2][0]++,Tn().s[8]++,console.warn("Something went wrong parsing error:",i),Tn().s[9]++;continue}Tn().s[10]++,a.loc?(Tn().b[3][0]++,Tn().s[11]++,t.push({from:a.loc.start.offset,to:a.loc.end.offset,severity:"error",message:o})):Tn().b[3][1]++}}return Tn().s[12]++,t}function Cke(){return Tn().f[1]++,Tn().s[13]++,n=>{Tn().f[2]++;const e=(Tn().s[14]++,n.state.doc.toString());Tn().s[15]++;try{const t=(Tn().s[16]++,JSON.parse(e)),i=(Tn().s[17]++,YK(e)),r=(Tn().s[18]++,od({version:8,name:"Empty Style",metadata:{},sources:{},sprite:"",glyphs:"https://example.com/glyphs/{fontstack}/{range}.pbf",layers:[t]})),o=(Tn().s[19]++,r.filter(s=>(Tn().f[3]++,Tn().s[20]++,!s.message.match(/^layers\[0\]: source ".*" not found$/))).map(s=>{Tn().f[4]++;const a=(Tn().s[21]++,s.message.replace(/^layers\[0\]./,"").split(":"));return Tn().s[22]++,{key:a[0],message:a[1]}}));return Tn().s[23]++,$K(o,i)}catch{}return Tn().s[24]++,[]}}function _ke(){return Tn().f[5]++,Tn().s[25]++,n=>{Tn().f[6]++;const e=(Tn().s[26]++,n.state.doc.toString());Tn().s[27]++;try{const t=(Tn().s[28]++,JSON.parse(e)),i=(Tn().s[29]++,YK(e)),r=(Tn().s[30]++,od(t)),o=(Tn().s[31]++,r.map(s=>(Tn().f[7]++,Tn().s[32]++,{key:s.message.split(":")[0],message:s.message})));return Tn().s[33]++,$K(o,i)}catch{}return Tn().s[34]++,[]}}function xke(n){return Tn().f[8]++,Tn().s[35]++,e=>{Tn().f[9]++;const t=(Tn().s[36]++,e.state.doc.toString()),i=(Tn().s[37]++,JSON.parse(t)),r=(Tn().s[38]++,YK(t)),o=(Tn().s[39]++,tde.createExpression(i,n));if(Tn().s[40]++,o?.result!=="error")return Tn().b[4][0]++,Tn().s[41]++,[];Tn().b[4][1]++;const s=(Tn().s[42]++,o.value);return Tn().s[43]++,$K(s,r)}}function Mke(n){Tn().f[10]++,Tn().s[44]++;let e=()=>(Tn().f[11]++,Tn().s[45]++,[]);switch(Tn().s[46]++,n.lintType){case"style":Tn().b[5][0]++,Tn().s[47]++,e=_ke(),Tn().s[48]++;break;case"layer":Tn().b[5][1]++,Tn().s[49]++,e=Cke(),Tn().s[50]++;break;case"expression":Tn().b[5][2]++,Tn().s[51]++,e=xke(n.spec),Tn().s[52]++;break;case"json":Tn().b[5][3]++,Tn().s[53]++,e=()=>(Tn().f[12]++,Tn().s[54]++,[]),Tn().s[55]++;break}return Tn().s[56]++,new wi({doc:n.value,extensions:[QIe,ske(),gke,new uM().of(ys.tabSize.of(2)),wi.theme({"&":{fontSize:"9pt"}}),wi.updateListener.of(t=>{if(Tn().f[13]++,Tn().s[57]++,t.docChanged){Tn().b[6][0]++;const i=(Tn().s[58]++,t.state.doc),r=(Tn().s[59]++,i.toString());Tn().s[60]++,n.onChange(r)}else Tn().b[6][1]++;Tn().s[61]++,t.focusChanged?(Tn().b[7][0]++,Tn().s[62]++,t.view.hasFocus?(Tn().b[8][0]++,Tn().s[63]++,n.onFocus()):(Tn().b[8][1]++,Tn().s[64]++,n.onBlur())):Tn().b[7][1]++}),WIe(),PIe(t=>{Tn().f[14]++;const i=(Tn().s[65]++,ike()(t));return Tn().s[66]++,i.length>0?(Tn().b[9][0]++,Tn().s[67]++,i):(Tn().b[9][1]++,Tn().s[68]++,e(t))})],parent:n.parent})}function Ai(){var n="/home/runner/work/maputnik/maputnik/src/components/InputJson.tsx",e="b0265b7f9053a68791144187ad962abceb0b9d46",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputJson.tsx",statementMap:{0:{start:{line:8,column:24},end:{line:13,column:3}},1:{start:{line:15,column:8},end:{line:15,column:12}},2:{start:{line:16,column:22},end:{line:16,column:27}},3:{start:{line:18,column:4},end:{line:18,column:17}},4:{start:{line:19,column:4},end:{line:22,column:6}},5:{start:{line:25,column:4},end:{line:25,column:63}},6:{start:{line:28,column:4},end:{line:36,column:7}},7:{start:{line:32,column:27},end:{line:32,column:47}},8:{start:{line:33,column:21},end:{line:33,column:35}},9:{start:{line:34,column:20},end:{line:34,column:33}},10:{start:{line:38,column:12},end:{line:43,column:3}},11:{start:{line:39,column:4},end:{line:39,column:49}},12:{start:{line:39,column:28},end:{line:39,column:49}},13:{start:{line:40,column:4},end:{line:42,column:7}},14:{start:{line:44,column:11},end:{line:49,column:3}},15:{start:{line:45,column:4},end:{line:45,column:47}},16:{start:{line:45,column:27},end:{line:45,column:47}},17:{start:{line:46,column:4},end:{line:48,column:7}},18:{start:{line:51,column:4},end:{line:60,column:5}},19:{start:{line:52,column:6},end:{line:52,column:36}},20:{start:{line:53,column:6},end:{line:59,column:9}},21:{start:{line:62,column:13},end:{line:86,column:3}},22:{start:{line:63,column:4},end:{line:69,column:5}},23:{start:{line:64,column:6},end:{line:64,column:37}},24:{start:{line:65,column:6},end:{line:67,column:9}},25:{start:{line:68,column:6},end:{line:68,column:13}},26:{start:{line:70,column:20},end:{line:70,column:51}},27:{start:{line:71,column:4},end:{line:82,column:5}},28:{start:{line:73,column:6},end:{line:78,column:7}},29:{start:{line:74,column:8},end:{line:74,column:42}},30:{start:{line:76,column:8},end:{line:76,column:19}},31:{start:{line:77,column:8},end:{line:77,column:27}},32:{start:{line:79,column:6},end:{line:81,column:7}},33:{start:{line:80,column:8},end:{line:80,column:66}},34:{start:{line:80,column:33},end:{line:80,column:66}},35:{start:{line:83,column:4},end:{line:85,column:7}},36:{start:{line:88,column:18},end:{line:88,column:20}},37:{start:{line:89,column:4},end:{line:91,column:5}},38:{start:{line:90,column:6},end:{line:90,column:45}},39:{start:{line:92,column:4},end:{line:101,column:9}},40:{start:{line:97,column:10},end:{line:97,column:24}},41:{start:{line:104,column:18},end:{line:104,column:54}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:13},end:{line:9,column:14}},loc:{start:{line:9,column:19},end:{line:10,column:5}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:11,column:12},end:{line:11,column:13}},loc:{start:{line:11,column:18},end:{line:12,column:5}},line:11},2:{name:"(anonymous_2)",decl:{start:{line:17,column:2},end:{line:17,column:3}},loc:{start:{line:17,column:21},end:{line:23,column:3}},line:17},3:{name:"(anonymous_3)",decl:{start:{line:24,column:2},end:{line:24,column:3}},loc:{start:{line:24,column:22},end:{line:26,column:3}},line:24},4:{name:"(anonymous_4)",decl:{start:{line:27,column:2},end:{line:27,column:3}},loc:{start:{line:27,column:22},end:{line:37,column:3}},line:27},5:{name:"(anonymous_5)",decl:{start:{line:32,column:16},end:{line:32,column:17}},loc:{start:{line:32,column:27},end:{line:32,column:47}},line:32},6:{name:"(anonymous_6)",decl:{start:{line:33,column:15},end:{line:33,column:16}},loc:{start:{line:33,column:21},end:{line:33,column:35}},line:33},7:{name:"(anonymous_7)",decl:{start:{line:34,column:14},end:{line:34,column:15}},loc:{start:{line:34,column:20},end:{line:34,column:33}},line:34},8:{name:"(anonymous_8)",decl:{start:{line:38,column:12},end:{line:38,column:13}},loc:{start:{line:38,column:18},end:{line:43,column:3}},line:38},9:{name:"(anonymous_9)",decl:{start:{line:44,column:11},end:{line:44,column:12}},loc:{start:{line:44,column:17},end:{line:49,column:3}},line:44},10:{name:"(anonymous_10)",decl:{start:{line:50,column:2},end:{line:50,column:3}},loc:{start:{line:50,column:32},end:{line:61,column:3}},line:50},11:{name:"(anonymous_11)",decl:{start:{line:62,column:13},end:{line:62,column:14}},loc:{start:{line:62,column:21},end:{line:86,column:3}},line:62},12:{name:"(anonymous_12)",decl:{start:{line:87,column:2},end:{line:87,column:3}},loc:{start:{line:87,column:11},end:{line:102,column:3}},line:87},13:{name:"(anonymous_13)",decl:{start:{line:96,column:13},end:{line:96,column:14}},loc:{start:{line:96,column:21},end:{line:98,column:9}},line:96}},branchMap:{0:{loc:{start:{line:31,column:16},end:{line:31,column:46}},type:"binary-expr",locations:[{start:{line:31,column:16},end:{line:31,column:35}},{start:{line:31,column:39},end:{line:31,column:46}}],line:31},1:{loc:{start:{line:39,column:4},end:{line:39,column:49}},type:"if",locations:[{start:{line:39,column:4},end:{line:39,column:49}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:39},2:{loc:{start:{line:45,column:4},end:{line:45,column:47}},type:"if",locations:[{start:{line:45,column:4},end:{line:45,column:47}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:45},3:{loc:{start:{line:51,column:4},end:{line:60,column:5}},type:"if",locations:[{start:{line:51,column:4},end:{line:60,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:51},4:{loc:{start:{line:51,column:8},end:{line:51,column:69}},type:"binary-expr",locations:[{start:{line:51,column:8},end:{line:51,column:29}},{start:{line:51,column:33},end:{line:51,column:69}}],line:51},5:{loc:{start:{line:63,column:4},end:{line:69,column:5}},type:"if",locations:[{start:{line:63,column:4},end:{line:69,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:63},6:{loc:{start:{line:71,column:4},end:{line:82,column:5}},type:"if",locations:[{start:{line:71,column:4},end:{line:82,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:71},7:{loc:{start:{line:79,column:6},end:{line:81,column:7}},type:"if",locations:[{start:{line:79,column:6},end:{line:81,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:79},8:{loc:{start:{line:80,column:8},end:{line:80,column:66}},type:"if",locations:[{start:{line:80,column:8},end:{line:80,column:66}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:80},9:{loc:{start:{line:89,column:4},end:{line:91,column:5}},type:"if",locations:[{start:{line:89,column:4},end:{line:91,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:89}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputJson.tsx"],names:[],mappings:"AA2HM;AA3HN,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,SAA+B,uBAAuB;AAGtD,OAAO,qBAAqB;AAE5B,SAAQ,oBAAmB;AAoB3B,MAAM,0BAA0B,MAAM,UAAkD;AAAA,EACtF,OAAO,eAAe;AAAA,IACpB,SAAS,MAAM;AAAA,IAAC;AAAA,IAChB,QAAQ,MAAM;AAAA,IAAC;AAAA,EACjB;AAAA,EACA;AAAA,EACA,MAA6B;AAAA,EAC7B,oBAA6B;AAAA,EAE7B,YAAY,OAA+B;AACzC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,WAAW;AAAA,MACX,WAAW,KAAK,cAAc,KAAK,MAAM,KAAK;AAAA,IAChD;AAAA,EACF;AAAA,EAEA,cAAc,MAAW;AACvB,WAAO,gBAAgB,MAAM,EAAC,QAAQ,GAAG,WAAW,GAAE,CAAC;AAAA,EACzD;AAAA,EAEA,oBAAqB;AACnB,SAAK,QAAQ,aAAa;AAAA,MACxB,QAAQ,KAAK;AAAA,MACb,OAAO,KAAK,cAAc,KAAK,MAAM,KAAK;AAAA,MAC1C,UAAU,KAAK,MAAM,YAAY;AAAA,MACjC,UAAU,CAAC,UAAiB,KAAK,SAAS,KAAK;AAAA,MAC/C,SAAS,MAAM,KAAK,QAAQ;AAAA,MAC5B,QAAQ,MAAM,KAAK,OAAO;AAAA,MAC1B,MAAM,KAAK,MAAM;AAAA,IACnB,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,MAAM;AACd,QAAI,KAAK,MAAM,QAAS,MAAK,MAAM,QAAQ;AAC3C,SAAK,SAAS;AAAA,MACZ,WAAW;AAAA,IACb,CAAC;AAAA,EACH;AAAA,EAEA,SAAS,MAAM;AACb,QAAI,KAAK,MAAM,OAAQ,MAAK,MAAM,OAAO;AACzC,SAAK,SAAS;AAAA,MACZ,WAAW;AAAA,IACb,CAAC;AAAA,EACH;AAAA,EAEA,mBAAmB,WAA2B;AAC5C,QAAI,CAAC,KAAK,MAAM,aAAa,UAAU,UAAU,KAAK,MAAM,OAAO;AACjE,WAAK,oBAAoB;AACzB,WAAK,MAAO,SAAS;AAAA,QACnB,SAAS;AAAA,UACP,MAAM;AAAA,UACN,IAAI,KAAK,MAAO,MAAM,IAAI;AAAA,UAC1B,QAAQ,KAAK,cAAc,KAAK,MAAM,KAAK;AAAA,QAC7C;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,WAAW,CAAC,OAAgB;AAC1B,QAAI,KAAK,mBAAmB;AAC1B,WAAK,oBAAoB;AACzB,WAAK,SAAS;AAAA,QACZ,WAAW,KAAK,MAAO,MAAM,IAAI,SAAS;AAAA,MAC5C,CAAC;AACD;AAAA,IACF;AACA,UAAM,UAAU,KAAK,MAAO,MAAM,IAAI,SAAS;AAE/C,QAAI,KAAK,MAAM,cAAc,SAAS;AACpC,UAAI,aAAa;AACjB,UAAI;AACF,sBAAc,KAAK,MAAM,OAAO;AAAA,MAClC,SAAQ,MAAM;AACZ,cAAM;AACN,gBAAQ,KAAK,IAAI;AAAA,MACnB;AAEA,UAAI,CAAC,KAAK;AACR,YAAI,KAAK,MAAM,SAAU,MAAK,MAAM,SAAS,WAAW;AAAA,MAC1D;AAAA,IACF;AAEA,SAAK,SAAS;AAAA,MACZ,WAAW;AAAA,IACb,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,QAAQ,CAAC;AACf,QAAI,KAAK,MAAM,WAAW;AACxB,YAAM,YAAY,KAAK,MAAM;AAAA,IAC/B;AAEA,WAAO,oBAAC,SAAI,WAAU,eAAc,eAAY,eAAc,eAAY,QAAO,OAAO,EAAC,QAAQ,OAAM,GACrG;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,WAAW,wBAAwB,KAAK,MAAM,SAAS;AAAA,QAClE,KAAK,CAAC,OAAO;AAAC,eAAK,MAAM;AAAA,QAAG;AAAA,QAC5B;AAAA;AAAA,IACF,GACF;AAAA,EACF;AACF;AAEA,MAAM,YAAY,gBAAgB,EAAE,iBAAiB;AACrD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"b0265b7f9053a68791144187ad962abceb0b9d46"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Ai=function(){return s},s}Ai();class wke extends En.Component{static defaultProps=(Ai().s[0]++,{onFocus:()=>{Ai().f[0]++},onBlur:()=>{Ai().f[1]++}});_view;_el=(Ai().s[1]++,null);_cancelNextChange=(Ai().s[2]++,!1);constructor(e){Ai().f[2]++,Ai().s[3]++,super(e),Ai().s[4]++,this.state={isEditing:!1,prevValue:this.getPrettyJson(this.props.value)}}getPrettyJson(e){return Ai().f[3]++,Ai().s[5]++,VSe(e,{indent:2,maxLength:40})}componentDidMount(){Ai().f[4]++,Ai().s[6]++,this._view=Mke({parent:this._el,value:this.getPrettyJson(this.props.value),lintType:(Ai().b[0][0]++,this.props.lintType||(Ai().b[0][1]++,"layer")),onChange:e=>(Ai().f[5]++,Ai().s[7]++,this.onChange(e)),onFocus:()=>(Ai().f[6]++,Ai().s[8]++,this.onFocus()),onBlur:()=>(Ai().f[7]++,Ai().s[9]++,this.onBlur()),spec:this.props.spec})}onFocus=(Ai().s[10]++,()=>{Ai().f[8]++,Ai().s[11]++,this.props.onFocus?(Ai().b[1][0]++,Ai().s[12]++,this.props.onFocus()):Ai().b[1][1]++,Ai().s[13]++,this.setState({isEditing:!0})});onBlur=(Ai().s[14]++,()=>{Ai().f[9]++,Ai().s[15]++,this.props.onBlur?(Ai().b[2][0]++,Ai().s[16]++,this.props.onBlur()):Ai().b[2][1]++,Ai().s[17]++,this.setState({isEditing:!1})});componentDidUpdate(e){Ai().f[10]++,Ai().s[18]++,Ai().b[4][0]++,!this.state.isEditing&&(Ai().b[4][1]++,e.value!==this.props.value)?(Ai().b[3][0]++,Ai().s[19]++,this._cancelNextChange=!0,Ai().s[20]++,this._view.dispatch({changes:{from:0,to:this._view.state.doc.length,insert:this.getPrettyJson(this.props.value)}})):Ai().b[3][1]++}onChange=(Ai().s[21]++,e=>{if(Ai().f[11]++,Ai().s[22]++,this._cancelNextChange){Ai().b[5][0]++,Ai().s[23]++,this._cancelNextChange=!1,Ai().s[24]++,this.setState({prevValue:this._view.state.doc.toString()}),Ai().s[25]++;return}else Ai().b[5][1]++;const t=(Ai().s[26]++,this._view.state.doc.toString());if(Ai().s[27]++,this.state.prevValue!==t){Ai().b[6][0]++;let i,r;Ai().s[28]++;try{Ai().s[29]++,i=JSON.parse(t)}catch(o){Ai().s[30]++,r=o,Ai().s[31]++,console.warn(o)}Ai().s[32]++,r?Ai().b[7][1]++:(Ai().b[7][0]++,Ai().s[33]++,this.props.onChange?(Ai().b[8][0]++,Ai().s[34]++,this.props.onChange(i)):Ai().b[8][1]++)}else Ai().b[6][1]++;Ai().s[35]++,this.setState({prevValue:t})});render(){Ai().f[12]++;const e=(Ai().s[36]++,{});return Ai().s[37]++,this.props.maxHeight?(Ai().b[9][0]++,Ai().s[38]++,e.maxHeight=this.props.maxHeight):Ai().b[9][1]++,Ai().s[39]++,ie.jsx("div",{className:"json-editor","data-wd-key":"json-editor","aria-hidden":"true",style:{cursor:"text"},children:ie.jsx("div",{className:Yg("codemirror-container",this.props.className),ref:t=>{Ai().f[13]++,Ai().s[40]++,this._el=t},style:e})})}}const Ske=(Ai().s[41]++,Jo()(wke));function v4(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldJson.tsx",e="ee4be309accf3b6f15b0a988cbdadd67c7132608",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldJson.tsx",statementMap:{0:{start:{line:3,column:18},end:{line:5,column:1}},1:{start:{line:4,column:2},end:{line:4,column:54}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:3,column:18},end:{line:3,column:19}},loc:{start:{line:3,column:29},end:{line:5,column:1}},line:3}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldJson.tsx"],names:[],mappings:"AAOS;AAPT,OAAO,eAAsC;AAM7C,MAAM,YAAsC,CAAC,UAAU;AACrD,SAAO,oBAAC,aAAW,GAAG,OAAO;AAC/B;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ee4be309accf3b6f15b0a988cbdadd67c7132608"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return v4=function(){return s},s}v4();v4().s[0]++;const VK=n=>(v4().f[0]++,v4().s[1]++,ie.jsx(Ske,{...n}));function b4(n){return Lo({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 19a2 2 0 0 0 2 2c2 0 2 -4 3 -9s1 -9 3 -9a2 2 0 0 1 2 2"},child:[]},{tag:"path",attr:{d:"M5 12h6"},child:[]},{tag:"path",attr:{d:"M15 12l6 6"},child:[]},{tag:"path",attr:{d:"M15 18l6 -6"},child:[]}]})(n)}function w6(n){return Lo({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M28,64A12,12,0,0,1,40,52H216a12,12,0,0,1,0,24H40A12,12,0,0,1,28,64Zm12,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24Zm104,40H40a12,12,0,0,0,0,24H144a12,12,0,0,0,0-24Zm88,0H220V168a12,12,0,0,0-24,0v12H184a12,12,0,0,0,0,24h12v12a12,12,0,0,0,24,0V204h12a12,12,0,0,0,0-24Z"},child:[]}]})(n)}function bb(){var n="/home/runner/work/maputnik/maputnik/src/libs/filterops.ts",e="99dad9631fbee5fc23be2dafaf7c7eea92c38eac",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/filterops.ts",statementMap:{0:{start:{line:2,column:34},end:{line:2,column:56}},1:{start:{line:3,column:28},end:{line:3,column:41}},2:{start:{line:4,column:30},end:{line:4,column:123}},3:{start:{line:4,column:88},end:{line:4,column:122}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:80},end:{line:4,column:81}},loc:{start:{line:4,column:88},end:{line:4,column:122}},line:4}},branchMap:{},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/filterops.ts"],names:[],mappings:"AAAA,OAAO,YAAY;AAEZ,aAAM,qBAAqB,CAAC,OAAO,OAAO,MAAM;AAChD,aAAM,eAAe,CAAC,MAAM,KAAK;AACjC,aAAM,iBAAiB,OAC3B,KAAK,OAAO,gBAAgB,MAAM,EAClC,OAAO,QAAM,mBAAmB,QAAQ,EAAE,IAAI,CAAC;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"99dad9631fbee5fc23be2dafaf7c7eea92c38eac"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return bb=function(){return s},s}bb();const HK=(bb().s[0]++,["all","any","none"]);bb().s[1]++;const Eke=(bb().s[2]++,Object.keys(Jr.filter_operator.values).filter(n=>(bb().f[0]++,bb().s[3]++,HK.indexOf(n)<0)));function Vi(){var n="/home/runner/work/maputnik/maputnik/src/components/SingleFilterEditor.tsx",e="d18e3b448d830733ac17bcacd45f7c08e364baa2",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/SingleFilterEditor.tsx",statementMap:{0:{start:{line:8,column:2},end:{line:8,column:25}},1:{start:{line:8,column:16},end:{line:8,column:25}},2:{start:{line:9,column:2},end:{line:9,column:25}},3:{start:{line:9,column:16},end:{line:9,column:25}},4:{start:{line:10,column:2},end:{line:10,column:23}},5:{start:{line:13,column:19},end:{line:13,column:40}},6:{start:{line:14,column:2},end:{line:16,column:3}},7:{start:{line:15,column:4},end:{line:15,column:13}},8:{start:{line:17,column:2},end:{line:23,column:3}},9:{start:{line:18,column:4},end:{line:18,column:16}},10:{start:{line:19,column:9},end:{line:23,column:3}},11:{start:{line:20,column:4},end:{line:20,column:17}},12:{start:{line:22,column:4},end:{line:22,column:13}},13:{start:{line:26,column:2},end:{line:26,column:21}},14:{start:{line:27,column:2},end:{line:27,column:22}},15:{start:{line:28,column:2},end:{line:28,column:11}},16:{start:{line:31,column:24},end:{line:33,column:3}},17:{start:{line:35,column:20},end:{line:35,column:76}},18:{start:{line:36,column:4},end:{line:40,column:5}},19:{start:{line:37,column:6},end:{line:37,column:43}},20:{start:{line:38,column:11},end:{line:40,column:5}},21:{start:{line:39,column:6},end:{line:39,column:47}},22:{start:{line:41,column:4},end:{line:41,column:35}},23:{start:{line:44,column:14},end:{line:44,column:31}},24:{start:{line:45,column:21},end:{line:45,column:25}},25:{start:{line:46,column:25},end:{line:46,column:29}},26:{start:{line:47,column:23},end:{line:47,column:33}},27:{start:{line:48,column:4},end:{line:75,column:9}},28:{start:{line:54,column:72},end:{line:54,column:92}},29:{start:{line:55,column:41},end:{line:55,column:104}},30:{start:{line:63,column:37},end:{line:63,column:100}},31:{start:{line:72,column:27},end:{line:72,column:89}}},fnMap:{0:{name:"tryParseInt",decl:{start:{line:7,column:9},end:{line:7,column:20}},loc:{start:{line:7,column:24},end:{line:11,column:1}},line:7},1:{name:"tryParseBool",decl:{start:{line:12,column:9},end:{line:12,column:21}},loc:{start:{line:12,column:25},end:{line:24,column:1}},line:12},2:{name:"parseFilter",decl:{start:{line:25,column:9},end:{line:25,column:20}},loc:{start:{line:25,column:24},end:{line:29,column:1}},line:25},3:{name:"(anonymous_3)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:58},end:{line:42,column:3}},line:34},4:{name:"(anonymous_4)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:11},end:{line:76,column:3}},line:43},5:{name:"(anonymous_5)",decl:{start:{line:54,column:58},end:{line:54,column:59}},loc:{start:{line:54,column:72},end:{line:54,column:92}},line:54},6:{name:"(anonymous_6)",decl:{start:{line:55,column:20},end:{line:55,column:21}},loc:{start:{line:55,column:41},end:{line:55,column:104}},line:55},7:{name:"(anonymous_7)",decl:{start:{line:63,column:20},end:{line:63,column:21}},loc:{start:{line:63,column:37},end:{line:63,column:100}},line:63},8:{name:"(anonymous_8)",decl:{start:{line:72,column:20},end:{line:72,column:21}},loc:{start:{line:72,column:27},end:{line:72,column:89}},line:72}},branchMap:{0:{loc:{start:{line:8,column:2},end:{line:8,column:25}},type:"if",locations:[{start:{line:8,column:2},end:{line:8,column:25}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:8},1:{loc:{start:{line:9,column:2},end:{line:9,column:25}},type:"if",locations:[{start:{line:9,column:2},end:{line:9,column:25}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:9},2:{loc:{start:{line:14,column:2},end:{line:16,column:3}},type:"if",locations:[{start:{line:14,column:2},end:{line:16,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:14},3:{loc:{start:{line:17,column:2},end:{line:23,column:3}},type:"if",locations:[{start:{line:17,column:2},end:{line:23,column:3}},{start:{line:19,column:9},end:{line:23,column:3}}],line:17},4:{loc:{start:{line:19,column:9},end:{line:23,column:3}},type:"if",locations:[{start:{line:19,column:9},end:{line:23,column:3}},{start:{line:21,column:9},end:{line:23,column:3}}],line:19},5:{loc:{start:{line:36,column:4},end:{line:40,column:5}},type:"if",locations:[{start:{line:36,column:4},end:{line:40,column:5}},{start:{line:38,column:11},end:{line:40,column:5}}],line:36},6:{loc:{start:{line:36,column:8},end:{line:36,column:49}},type:"binary-expr",locations:[{start:{line:36,column:8},end:{line:36,column:26}},{start:{line:36,column:30},end:{line:36,column:49}}],line:36},7:{loc:{start:{line:38,column:11},end:{line:40,column:5}},type:"if",locations:[{start:{line:38,column:11},end:{line:40,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:38},8:{loc:{start:{line:67,column:6},end:{line:74,column:10}},type:"binary-expr",locations:[{start:{line:67,column:6},end:{line:67,column:27}},{start:{line:67,column:47},end:{line:74,column:10}}],line:67}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/SingleFilterEditor.tsx"],names:[],mappings:"AA+DW,SAEH,KAFG;AA/DX,OAAO,WAAW;AAElB,SAAQ,sBAAqB;AAC7B,OAAO,iBAAiB;AACxB,OAAO,uBAAuB;AAC9B,OAAO,iBAAiB;AAExB,SAAS,YAAY,GAAoB;AACvC,MAAI,MAAM,GAAI,QAAO;AACrB,MAAI,MAAM,CAAW,EAAG,QAAO;AAC/B,SAAO,WAAW,CAAW;AAC/B;AAEA,SAAS,aAAa,GAAqB;AACzC,QAAM,WAAY,OAAO,MAAO;AAChC,MAAG,CAAC,UAAU;AACZ,WAAO;AAAA,EACT;AAEA,MAAG,EAAE,MAAM,cAAc,GAAG;AAC1B,WAAO;AAAA,EACT,WACQ,EAAE,MAAM,eAAe,GAAG;AAChC,WAAO;AAAA,EACT,OACK;AACH,WAAO;AAAA,EACT;AACF;AAEA,SAAS,YAAY,GAA8B;AACjD,MAAI,YAAY,CAAQ;AACxB,MAAI,aAAa,CAAQ;AACzB,SAAO;AACT;AAQA,qBAAqB,2BAA2B,MAAM,UAAmC;AAAA,EACvF,OAAO,eAAe;AAAA,IACpB,YAAY,CAAC;AAAA,EACf;AAAA,EAEA,oBAAoB,UAAkB,cAAsB,YAAsB;AAChF,QAAI,YAAY,CAAC,UAAU,cAAc,GAAG,WAAW,IAAI,WAAW,CAAC;AACvE,QAAG,aAAa,SAAS,aAAa,QAAQ;AAC5C,kBAAY,CAAC,UAAU,YAAY;AAAA,IACrC,WAAU,WAAW,WAAW,GAAG;AACjC,kBAAY,CAAC,UAAU,cAAc,EAAE;AAAA,IACzC;AACA,SAAK,MAAM,SAAS,SAAS;AAAA,EAC/B;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,WAAW,EAAE,CAAC;AACpB,UAAM,eAAe,EAAE,CAAC;AACxB,UAAM,aAAa,EAAE,MAAM,CAAC;AAE5B,WAAO,qBAAC,SAAI,WAAU,iCACpB;AAAA,0BAAC,SAAI,WAAU,mCACb;AAAA,QAAC;AAAA;AAAA,UACC,cAAW;AAAA,UACX,OAAO;AAAA,UACP,SAAS,OAAO,KAAK,KAAK,MAAM,UAAW,EAAE,IAAI,cAAY,CAAC,UAAU,QAAQ,CAAC;AAAA,UACjF,UAAU,CAAC,oBAA4B,KAAK,oBAAoB,UAAU,iBAAiB,UAAU;AAAA;AAAA,MACvG,GACF;AAAA,MACA,oBAAC,SAAI,WAAU,mCACb;AAAA,QAAC;AAAA;AAAA,UACC,cAAW;AAAA,UACX,OAAO;AAAA,UACP,UAAU,CAAC,gBAAwB,KAAK,oBAAoB,aAAa,cAAc,UAAU;AAAA,UACjG,SAAS;AAAA;AAAA,MACX,GACF;AAAA,MACC,WAAW,SAAS,KACrB,oBAAC,SAAI,WAAU,+BACb;AAAA,QAAC;AAAA;AAAA,UACC,cAAW;AAAA,UACX,OAAO,WAAW,KAAK,GAAG;AAAA,UAC1B,UAAU,CAAC,MAAc,KAAK,oBAAoB,UAAU,cAAc,EAAE,MAAM,GAAG,CAAC;AAAA;AAAA,MACxF,GACF;AAAA,OAEF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d18e3b448d830733ac17bcacd45f7c08e364baa2"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Vi=function(){return s},s}Vi();function Oke(n){return Vi().f[0]++,Vi().s[0]++,n===""?(Vi().b[0][0]++,Vi().s[1]++,n):(Vi().b[0][1]++,Vi().s[2]++,isNaN(n)?(Vi().b[1][0]++,Vi().s[3]++,n):(Vi().b[1][1]++,Vi().s[4]++,parseFloat(n)))}function Bke(n){Vi().f[1]++;const e=(Vi().s[5]++,typeof n=="string");if(Vi().s[6]++,e)Vi().b[2][1]++;else return Vi().b[2][0]++,Vi().s[7]++,n;return Vi().s[8]++,n.match(/^\s*true\s*$/)?(Vi().b[3][0]++,Vi().s[9]++,!0):(Vi().b[3][1]++,Vi().s[10]++,n.match(/^\s*false\s*$/)?(Vi().b[4][0]++,Vi().s[11]++,!1):(Vi().b[4][1]++,Vi().s[12]++,n))}function Ike(n){return Vi().f[2]++,Vi().s[13]++,n=Oke(n),Vi().s[14]++,n=Bke(n),Vi().s[15]++,n}class kke extends En.Component{static defaultProps=(Vi().s[16]++,{properties:{}});onFilterPartChanged(e,t,i){Vi().f[3]++;let r=(Vi().s[17]++,[e,t,...i.map(Ike)]);Vi().s[18]++,Vi().b[6][0]++,e==="has"||(Vi().b[6][1]++,e==="!has")?(Vi().b[5][0]++,Vi().s[19]++,r=[e,t]):(Vi().b[5][1]++,Vi().s[20]++,i.length===0?(Vi().b[7][0]++,Vi().s[21]++,r=[e,t,""]):Vi().b[7][1]++),Vi().s[22]++,this.props.onChange(r)}render(){Vi().f[4]++;const e=(Vi().s[23]++,this.props.filter),t=(Vi().s[24]++,e[0]),i=(Vi().s[25]++,e[1]),r=(Vi().s[26]++,e.slice(2));return Vi().s[27]++,ie.jsxs("div",{className:"maputnik-filter-editor-single",children:[ie.jsx("div",{className:"maputnik-filter-editor-property",children:ie.jsx(lM,{"aria-label":"key",value:i,options:Object.keys(this.props.properties).map(o=>(Vi().f[5]++,Vi().s[28]++,[o,o])),onChange:o=>(Vi().f[6]++,Vi().s[29]++,this.onFilterPartChanged(t,o,r))})}),ie.jsx("div",{className:"maputnik-filter-editor-operator",children:ie.jsx(Wb,{"aria-label":"function",value:t,onChange:o=>(Vi().f[7]++,Vi().s[30]++,this.onFilterPartChanged(o,i,r)),options:Eke})}),(Vi().b[8][0]++,r.length>0&&(Vi().b[8][1]++,ie.jsx("div",{className:"maputnik-filter-editor-args",children:ie.jsx(dm,{"aria-label":"value",value:r.join(","),onChange:o=>(Vi().f[8]++,Vi().s[31]++,this.onFilterPartChanged(t,i,o.split(",")))})})))]})}}function q_(){var n="/home/runner/work/maputnik/maputnik/src/components/FilterEditorBlock.tsx",e="1beba484bbe354357d7ce4f43a423306cbd22032",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FilterEditorBlock.tsx",statementMap:{0:{start:{line:8,column:14},end:{line:8,column:26}},1:{start:{line:9,column:4},end:{line:20,column:9}},2:{start:{line:23,column:26},end:{line:23,column:70}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:11},end:{line:21,column:3}},line:7}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FilterEditorBlock.tsx"],names:[],mappings:"AAYW,SACL,KADK;AAZX,OAAO,WAAuC;AAC9C,OAAO,iBAAiB;AACxB,SAAQ,gBAAe;AACvB,SAA+B,uBAAuB;AAMtD,MAAM,kCAAkC,MAAM,UAA0C;AAAA,EACtF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SAAI,WAAU,gCACpB;AAAA,0BAAC,SAAI,WAAU,wCACZ,eAAK,MAAM,UACd;AAAA,MACA,oBAAC,SAAI,WAAU,uCACb;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAS,KAAK,MAAM;AAAA,UACpB,OAAO,EAAE,qBAAqB;AAAA,UAE9B,8BAAC,YAAS;AAAA;AAAA,MACZ,GACF;AAAA,OACF;AAAA,EACF;AACF;AAEA,MAAM,oBAAoB,gBAAgB,EAAE,yBAAyB;AACrE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1beba484bbe354357d7ce4f43a423306cbd22032"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return q_=function(){return s},s}q_();class Tke extends En.Component{render(){q_().f[0]++;const e=(q_().s[0]++,this.props.t);return q_().s[1]++,ie.jsxs("div",{className:"maputnik-filter-editor-block",children:[ie.jsx("div",{className:"maputnik-filter-editor-block-content",children:this.props.children}),ie.jsx("div",{className:"maputnik-filter-editor-block-action",children:ie.jsx(Js,{className:"maputnik-icon-button",onClick:this.props.onDelete,title:e("Delete filter block"),children:ie.jsx(Kb,{})})})]})}}const Rke=(q_().s[2]++,Jo()(Tke));var E8,xQ;function Dke(){if(xQ)return E8;xQ=1;var n="[object Symbol]",e="\\ud800-\\udfff",t="\\u0300-\\u036f\\ufe20-\\ufe23",i="\\u20d0-\\u20f0",r="\\ufe0e\\ufe0f",o="["+e+"]",s="["+t+i+"]",a="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+a+")",A="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",x="\\u200d",_=c+"?",O="["+r+"]?",P="(?:"+x+"(?:"+[A,m,v].join("|")+")"+O+_+")*",F=O+_+P,j="(?:"+[A+s+"?",s,m,v,o].join("|")+")",Q=RegExp(a+"(?="+a+")|"+j+F,"g"),V=RegExp("["+x+e+t+i+r+"]"),H=typeof window=="object"&&window&&window.Object===Object&&window,G=typeof self=="object"&&self&&self.Object===Object&&self,Y=H||G||Function("return this")();function z(it){return it.split("")}function se(it){return V.test(it)}function le(it){return se(it)?me(it):z(it)}function me(it){return it.match(Q)||[]}var fe=Object.prototype,_e=fe.toString,we=Y.Symbol,ke=we?we.prototype:void 0,je=ke?ke.toString:void 0;function Ie(it,vt,Ut){var Pe=-1,Te=it.length;vt<0&&(vt=-vt>Te?0:Te+vt),Ut=Ut>Te?Te:Ut,Ut<0&&(Ut+=Te),Te=vt>Ut?0:Ut-vt>>>0,vt>>>=0;for(var Se=Array(Te);++Pe<Te;)Se[Pe]=it[Pe+vt];return Se}function Qe(it){if(typeof it=="string")return it;if(Le(it))return je?je.call(it):"";var vt=it+"";return vt=="0"&&1/it==-1/0?"-0":vt}function tt(it,vt,Ut){var Pe=it.length;return Ut=Ut===void 0?Pe:Ut,!vt&&Ut>=Pe?it:Ie(it,vt,Ut)}function ht(it){return function(vt){vt=We(vt);var Ut=se(vt)?le(vt):void 0,Pe=Ut?Ut[0]:vt.charAt(0),Te=Ut?tt(Ut,1).join(""):vt.slice(1);return Pe[it]()+Te}}function ce(it){return!!it&&typeof it=="object"}function Le(it){return typeof it=="symbol"||ce(it)&&_e.call(it)==n}function We(it){return it==null?"":Qe(it)}function Me(it){return dt(We(it).toLowerCase())}var dt=ht("toUpperCase");return E8=Me,E8}var Pke=Dke();const ZK=Wl(Pke);function Ag(){var n="/home/runner/work/maputnik/maputnik/src/libs/label-from-field-name.ts",e="8b86d889d32efa9a6cc667b2fa3579002dfb58fc",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/label-from-field-name.ts",statementMap:{0:{start:{line:4,column:16},end:{line:4,column:36}},1:{start:{line:5,column:2},end:{line:9,column:3}},2:{start:{line:6,column:4},end:{line:6,column:52}},3:{start:{line:8,column:4},end:{line:8,column:22}},4:{start:{line:10,column:2},end:{line:10,column:27}}},fnMap:{0:{name:"labelFromFieldName",decl:{start:{line:2,column:24},end:{line:2,column:42}},loc:{start:{line:2,column:54},end:{line:11,column:1}},line:2}},branchMap:{0:{loc:{start:{line:5,column:2},end:{line:9,column:3}},type:"if",locations:[{start:{line:5,column:2},end:{line:9,column:3}},{start:{line:7,column:9},end:{line:9,column:3}}],line:5}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/label-from-field-name.ts"],names:[],mappings:"AAAA,OAAO,gBAAgB;AAEvB,wBAAwB,mBAAmB,WAAmB;AAC5D,MAAI;AACJ,QAAM,QAAQ,UAAU,MAAM,GAAG;AACjC,MAAI,MAAM,SAAS,GAAG;AACpB,YAAQ,UAAU,MAAM,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG;AAAA,EAChD,OACK;AACH,YAAQ;AAAA,EACV;AACA,SAAO,WAAW,KAAK;AACzB;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8b86d889d32efa9a6cc667b2fa3579002dfb58fc"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Ag=function(){return s},s}Ag();function S6(n){Ag().f[0]++;let e;const t=(Ag().s[0]++,n.split("-"));return Ag().s[1]++,t.length>1?(Ag().b[0][0]++,Ag().s[2]++,e=n.split("-").slice(1).join(" ")):(Ag().b[0][1]++,Ag().s[3]++,e=n),Ag().s[4]++,ZK(e)}function Pa(){var n="/home/runner/work/maputnik/maputnik/src/components/_ExpressionProperty.tsx",e="f3c39f8fe544a6a2222a261b9e084b8f7a77d2fb",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/_ExpressionProperty.tsx",statementMap:{0:{start:{line:10,column:24},end:{line:16,column:3}},1:{start:{line:18,column:4},end:{line:18,column:17}},2:{start:{line:19,column:4},end:{line:21,column:6}},3:{start:{line:24,column:34},end:{line:24,column:44}},4:{start:{line:25,column:25},end:{line:25,column:52}},5:{start:{line:26,column:42},end:{line:48,column:8}},6:{start:{line:49,column:16},end:{line:49,column:22}},7:{start:{line:50,column:4},end:{line:53,column:5}},8:{start:{line:51,column:23},end:{line:51,column:118}},9:{start:{line:52,column:6},end:{line:52,column:42}},10:{start:{line:54,column:4},end:{line:76,column:6}},11:{start:{line:79,column:27},end:{line:79,column:72}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:13},end:{line:12,column:14}},loc:{start:{line:12,column:19},end:{line:13,column:5}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:14,column:12},end:{line:14,column:13}},loc:{start:{line:14,column:18},end:{line:15,column:5}},line:14},2:{name:"(anonymous_2)",decl:{start:{line:17,column:2},end:{line:17,column:3}},loc:{start:{line:17,column:21},end:{line:22,column:3}},line:17},3:{name:"(anonymous_3)",decl:{start:{line:23,column:2},end:{line:23,column:3}},loc:{start:{line:23,column:11},end:{line:77,column:3}},line:23}},branchMap:{0:{loc:{start:{line:25,column:25},end:{line:25,column:52}},type:"cond-expr",locations:[{start:{line:25,column:35},end:{line:25,column:45}},{start:{line:25,column:48},end:{line:25,column:52}}],line:25},1:{loc:{start:{line:27,column:6},end:{line:37,column:7}},type:"binary-expr",locations:[{start:{line:27,column:6},end:{line:27,column:23}},{start:{line:27,column:43},end:{line:37,column:7}}],line:27},2:{loc:{start:{line:50,column:4},end:{line:53,column:5}},type:"if",locations:[{start:{line:50,column:4},end:{line:53,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:50},3:{loc:{start:{line:51,column:23},end:{line:51,column:118}},type:"cond-expr",locations:[{start:{line:51,column:46},end:{line:51,column:95}},{start:{line:51,column:98},end:{line:51,column:118}}],line:51}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_ExpressionProperty.tsx"],names:[],mappings:"AA6CM,mBASM,KATN;AA7CN,OAAO,WAAW;AAClB,SAAQ,UAAU,cAAa;AAC/B,SAA+B,uBAAuB;AAEtD,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,wBAAwB;AAC/B,OAAO,eAAe;AAmBtB,MAAM,mCAAmC,MAAM,UAA2C;AAAA,EACxF,OAAO,eAAe;AAAA,IACpB,QAAQ,CAAC;AAAA,IACT,SAAS,MAAM;AAAA,IAAC;AAAA,IAChB,QAAQ,MAAM;AAAA,IAAC;AAAA,EACjB;AAAA,EAEA,YAAY,OAAwC;AAClD,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,GAAG,OAAO,QAAO,IAAI,KAAK;AACjC,UAAM,eAAe,UAAU,CAAC,QAAQ,IAAI;AAE5C,UAAM,gBACJ,iCACG;AAAA,WAAK,MAAM,UACV;AAAA,QAAC;AAAA;AAAA,UAEC,SAAS,KAAK,MAAM;AAAA,UACpB,UAAU;AAAA,UACV,WAAU;AAAA,UACV,OAAO,EAAE,wBAAwB;AAAA,UAEjC,8BAAC,UAAO;AAAA;AAAA,QANJ;AAAA,MAON;AAAA,MAEF;AAAA,QAAC;AAAA;AAAA,UAEC,SAAS,KAAK,MAAM;AAAA,UACpB,WAAU;AAAA,UACV,OAAO,EAAE,mBAAmB;AAAA,UAE5B,8BAAC,YAAS;AAAA;AAAA,QALN;AAAA,MAMN;AAAA,OACF;AAEF,QAAI,QAAQ;AACZ,QAAI,KAAK,MAAM,QAAQ;AACrB,YAAM,WAAW,KAAK,MAAM,YAAY,KAAK,MAAM,YAAY,MAAM,KAAK,MAAM,YAAY,KAAK,MAAM;AACvG,cAAQ,KAAK,MAAM,OAAO,QAAQ;AAAA,IACpC;AACA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAW,KAAK,MAAM;AAAA,QACtB,OAAO,EAAE,mBAAmB,KAAK,MAAM,SAAS,CAAC;AAAA,QACjD,QAAQ;AAAA,QACR,UAAU;AAAA,QACV;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,UAAS;AAAA,YACT,MAAM,KAAK,MAAM;AAAA,YACjB,WAAU;AAAA,YACV,SAAS,KAAK,MAAM;AAAA,YACpB,QAAQ,KAAK,MAAM;AAAA,YACnB;AAAA,YACA,WAAW;AAAA,YACX,UAAU,KAAK,MAAM;AAAA;AAAA,QACvB;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,qBAAqB,gBAAgB,EAAE,0BAA0B;AACvE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f3c39f8fe544a6a2222a261b9e084b8f7a77d2fb"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Pa=function(){return s},s}Pa();class Uke extends En.Component{static defaultProps=(Pa().s[0]++,{errors:{},onFocus:()=>{Pa().f[0]++},onBlur:()=>{Pa().f[1]++}});constructor(e){Pa().f[2]++,Pa().s[1]++,super(e),Pa().s[2]++,this.state={jsonError:!1}}render(){Pa().f[3]++;const{t:e,value:t,canUndo:i}=(Pa().s[3]++,this.props),r=(Pa().s[4]++,i?(Pa().b[0][0]++,!i()):(Pa().b[0][1]++,!0)),o=(Pa().s[5]++,ie.jsxs(ie.Fragment,{children:[(Pa().b[1][0]++,this.props.onUndo&&(Pa().b[1][1]++,ie.jsx(Js,{onClick:this.props.onUndo,disabled:r,className:"maputnik-delete-stop",title:e("Revert from expression"),children:ie.jsx(Ife,{})},"undo_action"))),ie.jsx(Js,{onClick:this.props.onDelete,className:"maputnik-delete-stop",title:e("Delete expression"),children:ie.jsx(Kb,{})},"delete_action")]}));let s=(Pa().s[6]++,void 0);if(Pa().s[7]++,this.props.errors){Pa().b[2][0]++;const a=(Pa().s[8]++,this.props.fieldType?(Pa().b[3][0]++,this.props.fieldType+"."+this.props.fieldName):(Pa().b[3][1]++,this.props.fieldName));Pa().s[9]++,s=this.props.errors[a]}else Pa().b[2][1]++;return Pa().s[10]++,ie.jsx(Fs,{fieldSpec:this.props.fieldSpec,label:e(S6(this.props.fieldName)),action:o,wideMode:!0,error:s,children:ie.jsx(VK,{lintType:"expression",spec:this.props.fieldSpec,className:"maputnik-expression-editor",onFocus:this.props.onFocus,onBlur:this.props.onBlur,value:t,maxHeight:200,onChange:this.props.onChange})})}}const tse=(Pa().s[11]++,Jo()(Uke));function cn(){var n="/home/runner/work/maputnik/maputnik/src/components/FilterEditor.tsx",e="e47fcaaf47a881c798f8d8c8b2982ffb5ed75681",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FilterEditor.tsx",statementMap:{0:{start:{line:18,column:17},end:{line:18,column:40}},1:{start:{line:19,column:2},end:{line:21,column:3}},2:{start:{line:20,column:4},end:{line:20,column:18}},3:{start:{line:22,column:20},end:{line:22,column:29}},4:{start:{line:23,column:16},end:{line:23,column:31}},5:{start:{line:24,column:2},end:{line:27,column:3}},6:{start:{line:25,column:4},end:{line:25,column:24}},7:{start:{line:26,column:4},end:{line:26,column:32}},8:{start:{line:28,column:2},end:{line:28,column:35}},9:{start:{line:31,column:2},end:{line:31,column:65}},10:{start:{line:34,column:2},end:{line:55,column:4}},11:{start:{line:57,column:19},end:{line:61,column:1}},12:{start:{line:63,column:2},end:{line:65,column:3}},13:{start:{line:64,column:4},end:{line:64,column:16}},14:{start:{line:66,column:21},end:{line:66,column:42}},15:{start:{line:67,column:2},end:{line:67,column:38}},16:{start:{line:70,column:2},end:{line:70,column:52}},17:{start:{line:73,column:2},end:{line:75,column:3}},18:{start:{line:74,column:4},end:{line:74,column:97}},19:{start:{line:74,column:38},end:{line:74,column:59}},20:{start:{line:74,column:75},end:{line:74,column:84}},21:{start:{line:76,column:2},end:{line:76,column:15}},22:{start:{line:79,column:24},end:{line:81,column:3}},23:{start:{line:83,column:4},end:{line:83,column:17}},24:{start:{line:84,column:4},end:{line:87,column:6}},25:{start:{line:91,column:22},end:{line:91,column:58}},26:{start:{line:92,column:4},end:{line:92,column:35}},27:{start:{line:93,column:4},end:{line:93,column:35}},28:{start:{line:96,column:22},end:{line:96,column:58}},29:{start:{line:97,column:4},end:{line:97,column:39}},30:{start:{line:98,column:4},end:{line:98,column:35}},31:{start:{line:100,column:18},end:{line:104,column:3}},32:{start:{line:101,column:26},end:{line:101,column:62}},33:{start:{line:102,column:4},end:{line:102,column:43}},34:{start:{line:103,column:4},end:{line:103,column:39}},35:{start:{line:105,column:16},end:{line:109,column:3}},36:{start:{line:106,column:4},end:{line:108,column:7}},37:{start:{line:110,column:15},end:{line:114,column:3}},38:{start:{line:111,column:4},end:{line:113,column:7}},39:{start:{line:115,column:19},end:{line:121,column:3}},40:{start:{line:116,column:19},end:{line:116,column:46}},41:{start:{line:117,column:4},end:{line:117,column:47}},42:{start:{line:118,column:4},end:{line:120,column:7}},43:{start:{line:123,column:32},end:{line:123,column:75}},44:{start:{line:124,column:4},end:{line:137,column:5}},45:{start:{line:125,column:6},end:{line:128,column:8}},46:{start:{line:129,column:11},end:{line:137,column:5}},47:{start:{line:130,column:6},end:{line:132,column:8}},48:{start:{line:134,column:6},end:{line:136,column:8}},49:{start:{line:140,column:26},end:{line:140,column:36}},50:{start:{line:141,column:36},end:{line:141,column:46}},51:{start:{line:142,column:22},end:{line:144,column:5}},52:{start:{line:145,column:26},end:{line:145,column:33}},53:{start:{line:146,column:36},end:{line:146,column:112}},54:{start:{line:147,column:4},end:{line:270,column:5}},55:{start:{line:148,column:6},end:{line:161,column:11}},56:{start:{line:162,column:11},end:{line:270,column:5}},57:{start:{line:163,column:21},end:{line:163,column:48}},58:{start:{line:164,column:26},end:{line:164,column:35}},59:{start:{line:165,column:22},end:{line:165,column:37}},60:{start:{line:166,column:38},end:{line:174,column:10}},61:{start:{line:175,column:27},end:{line:188,column:8}},62:{start:{line:176,column:22},end:{line:176,column:50}},63:{start:{line:177,column:8},end:{line:187,column:29}},64:{start:{line:189,column:6},end:{line:240,column:11}},65:{start:{line:200,column:33},end:{line:200,column:63}},66:{start:{line:242,column:25},end:{line:242,column:35}},67:{start:{line:243,column:6},end:{line:269,column:11}},68:{start:{line:248,column:14},end:{line:248,column:59}},69:{start:{line:249,column:14},end:{line:249,column:49}},70:{start:{line:273,column:21},end:{line:273,column:60}}},fnMap:{0:{name:"combiningFilter",decl:{start:{line:17,column:9},end:{line:17,column:24}},loc:{start:{line:17,column:32},end:{line:29,column:1}},line:17},1:{name:"migrateFilter",decl:{start:{line:30,column:9},end:{line:30,column:22}},loc:{start:{line:30,column:31},end:{line:32,column:1}},line:30},2:{name:"createStyleFromFilter",decl:{start:{line:33,column:9},end:{line:33,column:30}},loc:{start:{line:33,column:39},end:{line:56,column:1}},line:33},3:{name:"checkIfSimpleFilter",decl:{start:{line:62,column:9},end:{line:62,column:28}},loc:{start:{line:62,column:37},end:{line:68,column:1}},line:62},4:{name:"hasCombiningFilter",decl:{start:{line:69,column:9},end:{line:69,column:27}},loc:{start:{line:69,column:36},end:{line:71,column:1}},line:69},5:{name:"hasNestedCombiningFilter",decl:{start:{line:72,column:9},end:{line:72,column:33}},loc:{start:{line:72,column:42},end:{line:77,column:1}},line:72},6:{name:"(anonymous_6)",decl:{start:{line:74,column:31},end:{line:74,column:32}},loc:{start:{line:74,column:38},end:{line:74,column:59}},line:74},7:{name:"(anonymous_7)",decl:{start:{line:74,column:68},end:{line:74,column:69}},loc:{start:{line:74,column:75},end:{line:74,column:84}},line:74},8:{name:"(anonymous_8)",decl:{start:{line:82,column:2},end:{line:82,column:3}},loc:{start:{line:82,column:21},end:{line:88,column:3}},line:82},9:{name:"(anonymous_9)",decl:{start:{line:90,column:2},end:{line:90,column:3}},loc:{start:{line:90,column:42},end:{line:94,column:3}},line:90},10:{name:"(anonymous_10)",decl:{start:{line:95,column:2},end:{line:95,column:3}},loc:{start:{line:95,column:30},end:{line:99,column:3}},line:95},11:{name:"(anonymous_11)",decl:{start:{line:100,column:18},end:{line:100,column:19}},loc:{start:{line:100,column:24},end:{line:104,column:3}},line:100},12:{name:"(anonymous_12)",decl:{start:{line:105,column:16},end:{line:105,column:17}},loc:{start:{line:105,column:25},end:{line:109,column:3}},line:105},13:{name:"(anonymous_13)",decl:{start:{line:110,column:15},end:{line:110,column:16}},loc:{start:{line:110,column:21},end:{line:114,column:3}},line:110},14:{name:"(anonymous_14)",decl:{start:{line:115,column:19},end:{line:115,column:20}},loc:{start:{line:115,column:25},end:{line:121,column:3}},line:115},15:{name:"(anonymous_15)",decl:{start:{line:122,column:2},end:{line:122,column:3}},loc:{start:{line:122,column:48},end:{line:138,column:3}},line:122},16:{name:"(anonymous_16)",decl:{start:{line:139,column:2},end:{line:139,column:3}},loc:{start:{line:139,column:11},end:{line:271,column:3}},line:139},17:{name:"(anonymous_17)",decl:{start:{line:175,column:39},end:{line:175,column:40}},loc:{start:{line:175,column:51},end:{line:188,column:7}},line:175},18:{name:"(anonymous_18)",decl:{start:{line:200,column:26},end:{line:200,column:27}},loc:{start:{line:200,column:33},end:{line:200,column:63}},line:200},19:{name:"(anonymous_19)",decl:{start:{line:247,column:22},end:{line:247,column:23}},loc:{start:{line:247,column:28},end:{line:250,column:13}},line:247}},branchMap:{0:{loc:{start:{line:18,column:17},end:{line:18,column:40}},type:"binary-expr",locations:[{start:{line:18,column:17},end:{line:18,column:29}},{start:{line:18,column:33},end:{line:18,column:40}}],line:18},1:{loc:{start:{line:19,column:2},end:{line:21,column:3}},type:"if",locations:[{start:{line:19,column:2},end:{line:21,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:19},2:{loc:{start:{line:24,column:2},end:{line:27,column:3}},type:"if",locations:[{start:{line:24,column:2},end:{line:27,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:24},3:{loc:{start:{line:63,column:2},end:{line:65,column:3}},type:"if",locations:[{start:{line:63,column:2},end:{line:65,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:63},4:{loc:{start:{line:63,column:6},end:{line:63,column:59}},type:"binary-expr",locations:[{start:{line:63,column:6},end:{line:63,column:25}},{start:{line:63,column:29},end:{line:63,column:59}}],line:63},5:{loc:{start:{line:73,column:2},end:{line:75,column:3}},type:"if",locations:[{start:{line:73,column:2},end:{line:75,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:73},6:{loc:{start:{line:124,column:4},end:{line:137,column:5}},type:"if",locations:[{start:{line:124,column:4},end:{line:137,column:5}},{start:{line:129,column:11},end:{line:137,column:5}}],line:124},7:{loc:{start:{line:124,column:8},end:{line:124,column:66}},type:"binary-expr",locations:[{start:{line:124,column:8},end:{line:124,column:28}},{start:{line:124,column:32},end:{line:124,column:66}}],line:124},8:{loc:{start:{line:129,column:11},end:{line:137,column:5}},type:"if",locations:[{start:{line:129,column:11},end:{line:137,column:5}},{start:{line:133,column:11},end:{line:137,column:5}}],line:129},9:{loc:{start:{line:129,column:15},end:{line:129,column:73}},type:"binary-expr",locations:[{start:{line:129,column:15},end:{line:129,column:34}},{start:{line:129,column:38},end:{line:129,column:73}}],line:129},10:{loc:{start:{line:146,column:36},end:{line:146,column:112}},type:"binary-expr",locations:[{start:{line:146,column:36},end:{line:146,column:55}},{start:{line:146,column:59},end:{line:146,column:112}}],line:146},11:{loc:{start:{line:147,column:4},end:{line:270,column:5}},type:"if",locations:[{start:{line:147,column:4},end:{line:270,column:5}},{start:{line:162,column:11},end:{line:270,column:5}}],line:147},12:{loc:{start:{line:162,column:11},end:{line:270,column:5}},type:"if",locations:[{start:{line:162,column:11},end:{line:270,column:5}},{start:{line:241,column:11},end:{line:270,column:5}}],line:162},13:{loc:{start:{line:186,column:10},end:{line:186,column:119}},type:"binary-expr",locations:[{start:{line:186,column:10},end:{line:186,column:15}},{start:{line:186,column:35},end:{line:186,column:119}}],line:186},14:{loc:{start:{line:235,column:30},end:{line:235,column:62}},type:"cond-expr",locations:[{start:{line:235,column:51},end:{line:235,column:53}},{start:{line:235,column:56},end:{line:235,column:62}}],line:235},15:{loc:{start:{line:257,column:8},end:{line:268,column:12}},type:"binary-expr",locations:[{start:{line:257,column:8},end:{line:257,column:38}},{start:{line:257,column:58},end:{line:268,column:12}}],line:257}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FilterEditor.tsx"],names:[],mappings:"AAkMQ,SAkDA,UAlDA,KAGA,YAHA;AAlMR,OAAO,WAAW;AAClB,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAQ,eAAc;AAEtB,SAAQ,SAAS,qBAAoB;AACrC,OAAO,YAAY;AAEnB,SAAQ,0BAAyB;AACjC,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,wBAAwB;AAC/B,OAAO,uBAAuB;AAC9B,OAAO,iBAAiB;AACxB,OAAO,SAAS;AAChB,OAAO,wBAAwB;AAC/B,SAA+B,uBAAuB;AAItD,SAAS,gBAAgB,OAAuF;AAC9G,QAAM,SAAS,MAAM,UAAU,CAAC,KAAK;AAErC,MAAI,CAAC,MAAM,QAAQ,MAAM,GAAG;AAC1B,WAAO;AAAA,EACT;AAEA,MAAI,cAAc,OAAO,CAAC;AAC1B,MAAI,UAAU,OAAO,MAAM,CAAC;AAE5B,MAAG,mBAAmB,QAAQ,WAAW,IAAI,GAAG;AAC9C,kBAAc;AACd,cAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AAAA,EAC5B;AAEA,SAAO,CAAC,aAAa,GAAG,OAAO;AACjC;AAEA,SAAS,cAAc,QAA6D;AAElF,SAAQ,QAAQ,sBAAsB,MAAM,CAAQ,EAAE,OAAO,CAAC,EAAU;AAC1E;AAEA,SAAS,sBAAsB,QAAuF;AACpH,SAAO;AAAA,IACL,MAAM;AAAA,IACN,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,YAAY,EAAC,qBAAqB,SAAQ;AAAA,IAC1C,WAAW;AAAA,MACT,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,UAAU;AAAA,IACV,UAAU;AAAA,MACR;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AACF;AAGA,SAAS,oBAAqB,QAA6D;AACzF,MAAI,OAAO,WAAW,KAAK,WAAW,SAAS,OAAO,CAAC,CAAC,GAAG;AACzD,WAAO;AAAA,EACT;AACA,QAAM,aAAa,cAAc,MAAM;AACvC,SAAO,CAAC,QAAQ,YAAY,MAAM;AACpC;AAEA,SAAS,mBAAmB,QAA6D;AACvF,SAAO,mBAAmB,QAAQ,OAAO,CAAC,CAAC,KAAK;AAClD;AAEA,SAAS,yBAAyB,QAA6D;AAC7F,MAAG,mBAAmB,MAAM,GAAG;AAC7B,WAAO,OAAO,MAAM,CAAC,EAAE,IAAI,OAAK,mBAAmB,CAAQ,CAAC,EAAE,OAAO,OAAK,KAAK,IAAI,EAAE,SAAS;AAAA,EAChG;AACA,SAAO;AACT;AAgBA,MAAM,6BAA6B,MAAM,UAAwD;AAAA,EAC/F,OAAO,eAAe;AAAA,IACpB,QAAQ,CAAC,KAAK;AAAA,EAChB;AAAA,EAEA,YAAa,OAAkC;AAC7C,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,SAAS;AAAA,MACT,qBAAqB,oBAAoB,gBAAgB,KAAK,CAAC;AAAA,IACjE;AAAA,EACF;AAAA;AAAA,EAGA,oBAAoB,WAAmB,SAAgB;AACrD,UAAM,YAAY,gBAAgB,KAAK,KAAK,EAAE,MAAM,CAAC;AACrD,cAAU,SAAS,IAAI;AACvB,SAAK,MAAM,SAAS,SAAS;AAAA,EAC/B;AAAA,EAEA,iBAAiB,WAAmB;AAClC,UAAM,YAAY,gBAAgB,KAAK,KAAK,EAAE,MAAM,CAAC;AACrD,cAAU,OAAO,YAAY,GAAG,CAAC;AACjC,SAAK,MAAM,SAAS,SAAS;AAAA,EAC/B;AAAA,EAEA,gBAAgB,MAAM;AACpB,UAAM,gBAAgB,gBAAgB,KAAK,KAAK,EAAE,MAAM,CAAC;AACzD,IAAC,cAAwB,KAAK,CAAC,MAAM,QAAQ,EAAE,CAAC;AAChD,SAAK,MAAM,SAAS,aAAa;AAAA,EACnC;AAAA,EAEA,cAAc,CAAC,QAAiB;AAC9B,SAAK,SAAS;AAAA,MACZ,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAAA,EAEA,aAAa,MAAM;AACjB,SAAK,SAAS;AAAA,MACZ,qBAAqB;AAAA,IACvB,CAAC;AAAA,EACH;AAAA,EAEA,iBAAiB,MAAM;AACrB,UAAM,SAAS,gBAAgB,KAAK,KAAK;AACzC,SAAK,MAAM,SAAS,cAAc,MAAM,CAAC;AACzC,SAAK,SAAS;AAAA,MACZ,qBAAqB;AAAA,IACvB,CAAC;AAAA,EACH;AAAA,EAEA,OAAO,yBAAyB,OAA4C,OAA0B;AACpG,UAAM,sBAAsB,oBAAoB,gBAAgB,KAAK,CAAC;AAGtE,QAAI,CAAC,uBAAuB,MAAM,wBAAwB,MAAM;AAC9D,aAAO;AAAA,QACL,qBAAqB;AAAA,QACrB,qBAAqB;AAAA,MACvB;AAAA,IACF,WACS,uBAAuB,MAAM,wBAAwB,OAAO;AACnE,aAAO;AAAA,QACL,qBAAqB;AAAA,MACvB;AAAA,IACF,OACK;AACH,aAAO;AAAA,QACL,qBAAqB;AAAA,MACvB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,QAAQ,EAAC,IAAI,KAAK;AACzB,UAAM,EAAC,oBAAmB,IAAI,KAAK;AACnC,UAAM,YAAU;AAAA,MACd,KAAK,OAAO,MAAM,OAAO,MAAM;AAAA,IACjC;AACA,UAAM,gBAAgB,CAAC,KAAK;AAE5B,UAAM,0BAA0B,uBAAuB,yBAAyB,gBAAgB,KAAK,KAAK,CAAC;AAE3G,QAAI,yBAAyB;AAC3B,aAAO,qBAAC,SAAI,WAAU,sCACpB;AAAA,4BAAC,OACE,YAAE,mCAAmC,GACxC;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,SAAS,KAAK;AAAA,YACd,OAAO,EAAE,uBAAuB;AAAA,YAEhC;AAAA,kCAAC,kBAAe;AAAA,cACf,EAAE,uBAAuB;AAAA;AAAA;AAAA,QAC5B;AAAA,SACF;AAAA,IACF,WACS,qBAAqB;AAC5B,YAAM,SAAS,gBAAgB,KAAK,KAAK;AACzC,YAAM,cAAc,OAAO,CAAC;AAC5B,YAAM,UAAU,OAAO,MAAM,CAAC;AAE9B,YAAM,UACJ,oBAAC,SACC;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,KAAK;AAAA,UACd,OAAO,EAAE,uBAAuB;AAAA,UAChC,WAAU;AAAA,UAEV,8BAAC,kBAAe;AAAA;AAAA,MAClB,GACF;AAGF,YAAM,eAAe,QAAQ,IAAI,CAAC,GAAG,QAAQ;AAC3C,cAAM,QAAQ,OAAQ,UAAU,MAAI,CAAC,GAAG;AAExC,eACE,qBAAC,SACC;AAAA,8BAAC,qBAA4B,UAAU,KAAK,iBAAiB,KAAK,MAAM,GAAG,GACzE;AAAA,YAAC;AAAA;AAAA,cACC,YAAY,KAAK,MAAM;AAAA,cACvB,QAAQ;AAAA,cACR,UAAU,KAAK,oBAAoB,KAAK,MAAM,MAAM,CAAC;AAAA;AAAA,UACvD,KALsB,GAMxB;AAAA,UACC,SACC,oBAAC,SAAgB,WAAU,yBAAyB,gBAAM,WAAjD,OAAyD;AAAA,aAT5D,SAAS,GAAG,EAWtB;AAAA,MAEJ,CAAC;AAGD,aACE,iCACE;AAAA;AAAA,UAAC;AAAA;AAAA,YAEC;AAAA,YACA,OAAO,EAAE,QAAQ;AAAA,YACjB,QAAQ;AAAA,YAER;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO;AAAA,gBACP,UAAU,CAAC,MAAqB,KAAK,oBAAoB,GAAG,CAAC;AAAA,gBAC7D,SAAS;AAAA,kBACP,CAAC,OAAO,EAAE,sBAAsB,CAAC;AAAA,kBACjC,CAAC,QAAQ,EAAE,mBAAmB,CAAC;AAAA,kBAC/B,CAAC,OAAO,EAAE,oBAAoB,CAAC;AAAA,gBACjC;AAAA;AAAA,YACF;AAAA;AAAA,UAbI;AAAA,QAcN;AAAA,QACC;AAAA,QACD;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YAEV;AAAA,cAAC;AAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACV,SAAS,KAAK;AAAA,gBAEd;AAAA,sCAAC,kBAAe,OAAO,EAAE,eAAe,cAAc,GAAG;AAAA,kBACxD,EAAE,YAAY;AAAA;AAAA;AAAA,YACjB;AAAA;AAAA,UAVI;AAAA,QAWN;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YACV,OAAO,EAAC,SAAS,KAAK,MAAM,UAAU,KAAK,OAAM;AAAA,YAEjD,8BAAC,OAAI,WAAsB;AAAA;AAAA,UAJvB;AAAA,QAKN;AAAA,SACF;AAAA,IAEJ,OACK;AACH,YAAM,EAAC,OAAM,IAAI,KAAK;AAEtB,aACE,iCACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,MAAM;AACd,mBAAK,SAAS,EAAC,qBAAqB,KAAI,CAAC;AACzC,mBAAK,MAAM,SAAS,aAAa;AAAA,YACnC;AAAA,YACA,WAAU;AAAA,YACV,OAAO;AAAA,YACP;AAAA,YACA,UAAU,KAAK,MAAM;AAAA;AAAA,QACvB;AAAA,QACC,KAAK,MAAM,uBACV,qBAAC,SAAI,WAAU,yBACZ;AAAA,YAAE,qCAAqC;AAAA,UACvC;AAAA,UACD;AAAA,YAAC;AAAA;AAAA,cACC,SAAS,KAAK;AAAA,cACd,WAAU;AAAA,cAET,YAAE,0BAA0B;AAAA;AAAA,UAC/B;AAAA,WACF;AAAA,SAEJ;AAAA,IAEJ;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e47fcaaf47a881c798f8d8c8b2982ffb5ed75681"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return cn=function(){return s},s}cn();function fy(n){cn().f[0]++;const e=(cn().s[0]++,cn().b[0][0]++,n.filter||(cn().b[0][1]++,["all"]));if(cn().s[1]++,Array.isArray(e))cn().b[1][1]++;else return cn().b[1][0]++,cn().s[2]++,e;let t=(cn().s[3]++,e[0]),i=(cn().s[4]++,e.slice(1));return cn().s[5]++,HK.indexOf(t)<0?(cn().b[2][0]++,cn().s[6]++,t="all",cn().s[7]++,i=[e.slice(0)]):cn().b[2][1]++,cn().s[8]++,[t,...i]}function Kke(n){return cn().f[1]++,cn().s[9]++,ede(Lke(n)).layers[0].filter}function Lke(n){return cn().f[2]++,cn().s[10]++,{id:"tmp",version:8,name:"Empty Style",metadata:{"maputnik:renderer":"mlgljs"},sources:{tmp:{type:"geojson",data:""}},sprite:"",glyphs:"https://orangemug.github.io/font-glyphs/glyphs/{fontstack}/{range}.pbf",layers:[{id:"tmp",type:"fill",source:"tmp",filter:n}]}}const Fke=(cn().s[11]++,["all","any","none"]);function MQ(n){if(cn().f[3]++,cn().s[12]++,cn().b[4][0]++,n.length===1&&(cn().b[4][1]++,Fke.includes(n[0])))return cn().b[3][0]++,cn().s[13]++,!0;cn().b[3][1]++;const e=(cn().s[14]++,Z2(n));return cn().s[15]++,!T4.isEqual(e,n)}function wQ(n){return cn().f[4]++,cn().s[16]++,HK.indexOf(n[0])>=0}function zke(n){return cn().f[5]++,cn().s[17]++,wQ(n)?(cn().b[5][0]++,cn().s[18]++,n.slice(1).map(e=>(cn().f[6]++,cn().s[19]++,wQ(e))).filter(e=>(cn().f[7]++,cn().s[20]++,e==!0)).length>0):(cn().b[5][1]++,cn().s[21]++,!1)}class jke extends En.Component{static defaultProps=(cn().s[22]++,{filter:["all"]});constructor(e){cn().f[8]++,cn().s[23]++,super(e),cn().s[24]++,this.state={showDoc:!1,displaySimpleFilter:MQ(fy(e))}}onFilterPartChanged(e,t){cn().f[9]++;const i=(cn().s[25]++,fy(this.props).slice(0));cn().s[26]++,i[e]=t,cn().s[27]++,this.props.onChange(i)}deleteFilterItem(e){cn().f[10]++;const t=(cn().s[28]++,fy(this.props).slice(0));cn().s[29]++,t.splice(e+1,1),cn().s[30]++,this.props.onChange(t)}addFilterItem=(cn().s[31]++,()=>{cn().f[11]++;const e=(cn().s[32]++,fy(this.props).slice(0));cn().s[33]++,e.push(["==","name",""]),cn().s[34]++,this.props.onChange(e)});onToggleDoc=(cn().s[35]++,e=>{cn().f[12]++,cn().s[36]++,this.setState({showDoc:e})});makeFilter=(cn().s[37]++,()=>{cn().f[13]++,cn().s[38]++,this.setState({displaySimpleFilter:!0})});makeExpression=(cn().s[39]++,()=>{cn().f[14]++;const e=(cn().s[40]++,fy(this.props));cn().s[41]++,this.props.onChange(Kke(e)),cn().s[42]++,this.setState({displaySimpleFilter:!1})});static getDerivedStateFromProps(e,t){cn().f[15]++;const i=(cn().s[43]++,MQ(fy(e)));return cn().s[44]++,cn().b[7][0]++,!i&&(cn().b[7][1]++,t.displaySimpleFilter===!0)?(cn().b[6][0]++,cn().s[45]++,{displaySimpleFilter:!1,valueIsSimpleFilter:!1}):(cn().b[6][1]++,cn().s[46]++,cn().b[9][0]++,i&&(cn().b[9][1]++,t.displaySimpleFilter===!1)?(cn().b[8][0]++,cn().s[47]++,{valueIsSimpleFilter:!0}):(cn().b[8][1]++,cn().s[48]++,{valueIsSimpleFilter:!1}))}render(){cn().f[16]++;const{errors:e,t}=(cn().s[49]++,this.props),{displaySimpleFilter:i}=(cn().s[50]++,this.state),r=(cn().s[51]++,{doc:Jr.layer.filter.doc+" Combine multiple filters together by using a compound filter."}),o=(cn().s[52]++,["all"]),s=(cn().s[53]++,cn().b[10][0]++,i&&(cn().b[10][1]++,zke(fy(this.props))));if(cn().s[54]++,s)return cn().b[11][0]++,cn().s[55]++,ie.jsxs("div",{className:"maputnik-filter-editor-unsupported",children:[ie.jsx("p",{children:t("Nested filters are not supported.")}),ie.jsxs(Js,{onClick:this.makeExpression,title:t("Convert to expression"),children:[ie.jsx(b4,{}),t("Upgrade to expression")]})]});if(cn().b[11][1]++,cn().s[56]++,i){cn().b[12][0]++;const a=(cn().s[57]++,fy(this.props)),c=(cn().s[58]++,a[0]),A=(cn().s[59]++,a.slice(1)),m=(cn().s[60]++,ie.jsx("div",{children:ie.jsx(Js,{onClick:this.makeExpression,title:t("Convert to expression"),className:"maputnik-make-zoom-function",children:ie.jsx(b4,{})})})),v=(cn().s[61]++,A.map((x,_)=>{cn().f[17]++;const O=(cn().s[62]++,e[`filter[${_+1}]`]);return cn().s[63]++,ie.jsxs("div",{children:[ie.jsx(Rke,{onDelete:this.deleteFilterItem.bind(this,_),children:ie.jsx(kke,{properties:this.props.properties,filter:x,onChange:this.onFilterPartChanged.bind(this,_+1)})},_),(cn().b[13][0]++,O&&(cn().b[13][1]++,ie.jsx("div",{className:"maputnik-inline-error",children:O.message},"error")))]},`block-${_}`)}));return cn().s[64]++,ie.jsxs(ie.Fragment,{children:[ie.jsx(Fs,{fieldSpec:r,label:t("Filter"),action:m,children:ie.jsx(Wb,{value:c,onChange:x=>(cn().f[18]++,cn().s[65]++,this.onFilterPartChanged(0,x)),options:[["all",t("every filter matches")],["none",t("no filter matches")],["any",t("any filter matches")]]})},"top"),v,ie.jsx("div",{className:"maputnik-filter-editor-add-wrapper",children:ie.jsxs(Js,{"data-wd-key":"layer-filter-button",className:"maputnik-add-filter",onClick:this.addFilterItem,children:[ie.jsx(w6,{style:{verticalAlign:"text-bottom"}}),t("Add filter")]})},"buttons"),ie.jsx("div",{className:"maputnik-doc-inline",style:{display:this.state.showDoc?(cn().b[14][0]++,""):(cn().b[14][1]++,"none")},children:ie.jsx(t6,{fieldSpec:r})},"doc")]})}else{cn().b[12][1]++;const{filter:a}=(cn().s[66]++,this.props);return cn().s[67]++,ie.jsxs(ie.Fragment,{children:[ie.jsx(tse,{onDelete:()=>{cn().f[19]++,cn().s[68]++,this.setState({displaySimpleFilter:!0}),cn().s[69]++,this.props.onChange(o)},fieldName:"filter",value:a,errors:e,onChange:this.props.onChange}),(cn().b[15][0]++,this.state.valueIsSimpleFilter&&(cn().b[15][1]++,ie.jsxs("div",{className:"maputnik-expr-infobox",children:[t("You've entered an old style filter.")," ",ie.jsx("button",{onClick:this.makeFilter,className:"maputnik-expr-infobox__button",children:t("Switch to filter editor.")})]})))]})}}}const Nke=(cn().s[70]++,Jo()(jke));var zC={},Gh={},jC={},O8,SQ;function nse(){if(SQ)return O8;SQ=1;var n=typeof window=="object"&&window&&window.Object===Object&&window;return O8=n,O8}var B8,EQ;function _m(){if(EQ)return B8;EQ=1;var n=nse(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=n||e||Function("return this")();return B8=t,B8}var I8,OQ;function gM(){if(OQ)return I8;OQ=1;var n=_m(),e=n.Symbol;return I8=e,I8}var k8,BQ;function Gke(){if(BQ)return k8;BQ=1;var n=gM(),e=Object.prototype,t=e.hasOwnProperty,i=e.toString,r=n?n.toStringTag:void 0;function o(s){var a=t.call(s,r),c=s[r];try{s[r]=void 0;var A=!0}catch{}var m=i.call(s);return A&&(a?s[r]=c:delete s[r]),m}return k8=o,k8}var T8,IQ;function Wke(){if(IQ)return T8;IQ=1;var n=Object.prototype,e=n.toString;function t(i){return e.call(i)}return T8=t,T8}var R8,kQ;function qb(){if(kQ)return R8;kQ=1;var n=gM(),e=Gke(),t=Wke(),i="[object Null]",r="[object Undefined]",o=n?n.toStringTag:void 0;function s(a){return a==null?a===void 0?r:i:o&&o in Object(a)?e(a):t(a)}return R8=s,R8}var D8,TQ;function uf(){if(TQ)return D8;TQ=1;var n=Array.isArray;return D8=n,D8}var P8,RQ;function Vg(){if(RQ)return P8;RQ=1;function n(e){return e!=null&&typeof e=="object"}return P8=n,P8}var U8,DQ;function Qke(){if(DQ)return U8;DQ=1;var n=qb(),e=uf(),t=Vg(),i="[object String]";function r(o){return typeof o=="string"||!e(o)&&t(o)&&n(o)==i}return U8=r,U8}var K8,PQ;function qke(){if(PQ)return K8;PQ=1;function n(e){return function(t,i,r){for(var o=-1,s=Object(t),a=r(t),c=a.length;c--;){var A=a[e?c:++o];if(i(s[A],A,s)===!1)break}return t}}return K8=n,K8}var L8,UQ;function ise(){if(UQ)return L8;UQ=1;var n=qke(),e=n();return L8=e,L8}var F8,KQ;function Yke(){if(KQ)return F8;KQ=1;function n(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}return F8=n,F8}var z8,LQ;function $ke(){if(LQ)return z8;LQ=1;var n=qb(),e=Vg(),t="[object Arguments]";function i(r){return e(r)&&n(r)==t}return z8=i,z8}var j8,FQ;function XK(){if(FQ)return j8;FQ=1;var n=$ke(),e=Vg(),t=Object.prototype,i=t.hasOwnProperty,r=t.propertyIsEnumerable,o=n((function(){return arguments})())?n:function(s){return e(s)&&i.call(s,"callee")&&!r.call(s,"callee")};return j8=o,j8}var j2={exports:{}},N8,zQ;function Vke(){if(zQ)return N8;zQ=1;function n(){return!1}return N8=n,N8}j2.exports;var jQ;function E6(){return jQ||(jQ=1,(function(n,e){var t=_m(),i=Vke(),r=e&&!e.nodeType&&e,o=r&&!0&&n&&!n.nodeType&&n,s=o&&o.exports===r,a=s?t.Buffer:void 0,c=a?a.isBuffer:void 0,A=c||i;n.exports=A})(j2,j2.exports)),j2.exports}var G8,NQ;function JK(){if(NQ)return G8;NQ=1;var n=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function t(i,r){var o=typeof i;return r=r??n,!!r&&(o=="number"||o!="symbol"&&e.test(i))&&i>-1&&i%1==0&&i<r}return G8=t,G8}var W8,GQ;function eL(){if(GQ)return W8;GQ=1;var n=9007199254740991;function e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=n}return W8=e,W8}var Q8,WQ;function Hke(){if(WQ)return Q8;WQ=1;var n=qb(),e=eL(),t=Vg(),i="[object Arguments]",r="[object Array]",o="[object Boolean]",s="[object Date]",a="[object Error]",c="[object Function]",A="[object Map]",m="[object Number]",v="[object Object]",x="[object RegExp]",_="[object Set]",O="[object String]",P="[object WeakMap]",F="[object ArrayBuffer]",j="[object DataView]",Q="[object Float32Array]",V="[object Float64Array]",H="[object Int8Array]",G="[object Int16Array]",Y="[object Int32Array]",z="[object Uint8Array]",se="[object Uint8ClampedArray]",le="[object Uint16Array]",me="[object Uint32Array]",fe={};fe[Q]=fe[V]=fe[H]=fe[G]=fe[Y]=fe[z]=fe[se]=fe[le]=fe[me]=!0,fe[i]=fe[r]=fe[F]=fe[o]=fe[j]=fe[s]=fe[a]=fe[c]=fe[A]=fe[m]=fe[v]=fe[x]=fe[_]=fe[O]=fe[P]=!1;function _e(we){return t(we)&&e(we.length)&&!!fe[n(we)]}return Q8=_e,Q8}var q8,QQ;function tL(){if(QQ)return q8;QQ=1;function n(e){return function(t){return e(t)}}return q8=n,q8}var N2={exports:{}};N2.exports;var qQ;function nL(){return qQ||(qQ=1,(function(n,e){var t=nse(),i=e&&!e.nodeType&&e,r=i&&!0&&n&&!n.nodeType&&n,o=r&&r.exports===i,s=o&&t.process,a=(function(){try{var c=r&&r.require&&r.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();n.exports=a})(N2,N2.exports)),N2.exports}var Y8,YQ;function iL(){if(YQ)return Y8;YQ=1;var n=Hke(),e=tL(),t=nL(),i=t&&t.isTypedArray,r=i?e(i):n;return Y8=r,Y8}var $8,$Q;function rse(){if($Q)return $8;$Q=1;var n=Yke(),e=XK(),t=uf(),i=E6(),r=JK(),o=iL(),s=Object.prototype,a=s.hasOwnProperty;function c(A,m){var v=t(A),x=!v&&e(A),_=!v&&!x&&i(A),O=!v&&!x&&!_&&o(A),P=v||x||_||O,F=P?n(A.length,String):[],j=F.length;for(var Q in A)(m||a.call(A,Q))&&!(P&&(Q=="length"||_&&(Q=="offset"||Q=="parent")||O&&(Q=="buffer"||Q=="byteLength"||Q=="byteOffset")||r(Q,j)))&&F.push(Q);return F}return $8=c,$8}var V8,VQ;function rL(){if(VQ)return V8;VQ=1;var n=Object.prototype;function e(t){var i=t&&t.constructor,r=typeof i=="function"&&i.prototype||n;return t===r}return V8=e,V8}var H8,HQ;function ose(){if(HQ)return H8;HQ=1;function n(e,t){return function(i){return e(t(i))}}return H8=n,H8}var Z8,ZQ;function Zke(){if(ZQ)return Z8;ZQ=1;var n=ose(),e=n(Object.keys,Object);return Z8=e,Z8}var X8,XQ;function Xke(){if(XQ)return X8;XQ=1;var n=rL(),e=Zke(),t=Object.prototype,i=t.hasOwnProperty;function r(o){if(!n(o))return e(o);var s=[];for(var a in Object(o))i.call(o,a)&&a!="constructor"&&s.push(a);return s}return X8=r,X8}var J8,JQ;function ap(){if(JQ)return J8;JQ=1;function n(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return J8=n,J8}var e7,eq;function oL(){if(eq)return e7;eq=1;var n=qb(),e=ap(),t="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",o="[object Proxy]";function s(a){if(!e(a))return!1;var c=n(a);return c==i||c==r||c==t||c==o}return e7=s,e7}var t7,tq;function Fx(){if(tq)return t7;tq=1;var n=oL(),e=eL();function t(i){return i!=null&&e(i.length)&&!n(i)}return t7=t,t7}var n7,nq;function yM(){if(nq)return n7;nq=1;var n=rse(),e=Xke(),t=Fx();function i(r){return t(r)?n(r):e(r)}return n7=i,n7}var i7,iq;function sse(){if(iq)return i7;iq=1;var n=ise(),e=yM();function t(i,r){return i&&n(i,r,e)}return i7=t,i7}var r7,rq;function O6(){if(rq)return r7;rq=1;function n(e){return e}return r7=n,r7}var o7,oq;function ase(){if(oq)return o7;oq=1;var n=O6();function e(t){return typeof t=="function"?t:n}return o7=e,o7}var s7,sq;function sL(){if(sq)return s7;sq=1;var n=sse(),e=ase();function t(i,r){return i&&n(i,e(r))}return s7=t,s7}var a7,aq;function aL(){if(aq)return a7;aq=1;var n=ose(),e=n(Object.getPrototypeOf,Object);return a7=e,a7}var l7,lq;function lse(){if(lq)return l7;lq=1;var n=qb(),e=aL(),t=Vg(),i="[object Object]",r=Function.prototype,o=Object.prototype,s=r.toString,a=o.hasOwnProperty,c=s.call(Object);function A(m){if(!t(m)||n(m)!=i)return!1;var v=e(m);if(v===null)return!0;var x=a.call(v,"constructor")&&v.constructor;return typeof x=="function"&&x instanceof x&&s.call(x)==c}return l7=A,l7}var u7,uq;function use(){if(uq)return u7;uq=1;function n(e,t){for(var i=-1,r=e==null?0:e.length,o=Array(r);++i<r;)o[i]=t(e[i],i,e);return o}return u7=n,u7}var c7,cq;function Jke(){if(cq)return c7;cq=1;function n(){this.__data__=[],this.size=0}return c7=n,c7}var A7,Aq;function vM(){if(Aq)return A7;Aq=1;function n(e,t){return e===t||e!==e&&t!==t}return A7=n,A7}var h7,hq;function B6(){if(hq)return h7;hq=1;var n=vM();function e(t,i){for(var r=t.length;r--;)if(n(t[r][0],i))return r;return-1}return h7=e,h7}var d7,dq;function eTe(){if(dq)return d7;dq=1;var n=B6(),e=Array.prototype,t=e.splice;function i(r){var o=this.__data__,s=n(o,r);if(s<0)return!1;var a=o.length-1;return s==a?o.pop():t.call(o,s,1),--this.size,!0}return d7=i,d7}var f7,fq;function tTe(){if(fq)return f7;fq=1;var n=B6();function e(t){var i=this.__data__,r=n(i,t);return r<0?void 0:i[r][1]}return f7=e,f7}var p7,pq;function nTe(){if(pq)return p7;pq=1;var n=B6();function e(t){return n(this.__data__,t)>-1}return p7=e,p7}var m7,mq;function iTe(){if(mq)return m7;mq=1;var n=B6();function e(t,i){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,i])):r[o][1]=i,this}return m7=e,m7}var g7,gq;function I6(){if(gq)return g7;gq=1;var n=Jke(),e=eTe(),t=tTe(),i=nTe(),r=iTe();function o(s){var a=-1,c=s==null?0:s.length;for(this.clear();++a<c;){var A=s[a];this.set(A[0],A[1])}}return o.prototype.clear=n,o.prototype.delete=e,o.prototype.get=t,o.prototype.has=i,o.prototype.set=r,g7=o,g7}var y7,yq;function rTe(){if(yq)return y7;yq=1;var n=I6();function e(){this.__data__=new n,this.size=0}return y7=e,y7}var v7,vq;function oTe(){if(vq)return v7;vq=1;function n(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}return v7=n,v7}var b7,bq;function sTe(){if(bq)return b7;bq=1;function n(e){return this.__data__.get(e)}return b7=n,b7}var C7,Cq;function aTe(){if(Cq)return C7;Cq=1;function n(e){return this.__data__.has(e)}return C7=n,C7}var _7,_q;function lTe(){if(_q)return _7;_q=1;var n=_m(),e=n["__core-js_shared__"];return _7=e,_7}var x7,xq;function uTe(){if(xq)return x7;xq=1;var n=lTe(),e=(function(){var i=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function t(i){return!!e&&e in i}return x7=t,x7}var M7,Mq;function cse(){if(Mq)return M7;Mq=1;var n=Function.prototype,e=n.toString;function t(i){if(i!=null){try{return e.call(i)}catch{}try{return i+""}catch{}}return""}return M7=t,M7}var w7,wq;function cTe(){if(wq)return w7;wq=1;var n=oL(),e=uTe(),t=ap(),i=cse(),r=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,s=Function.prototype,a=Object.prototype,c=s.toString,A=a.hasOwnProperty,m=RegExp("^"+c.call(A).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(x){if(!t(x)||e(x))return!1;var _=n(x)?m:o;return _.test(i(x))}return w7=v,w7}var S7,Sq;function ATe(){if(Sq)return S7;Sq=1;function n(e,t){return e?.[t]}return S7=n,S7}var E7,Eq;function Yb(){if(Eq)return E7;Eq=1;var n=cTe(),e=ATe();function t(i,r){var o=e(i,r);return n(o)?o:void 0}return E7=t,E7}var O7,Oq;function lL(){if(Oq)return O7;Oq=1;var n=Yb(),e=_m(),t=n(e,"Map");return O7=t,O7}var B7,Bq;function k6(){if(Bq)return B7;Bq=1;var n=Yb(),e=n(Object,"create");return B7=e,B7}var I7,Iq;function hTe(){if(Iq)return I7;Iq=1;var n=k6();function e(){this.__data__=n?n(null):{},this.size=0}return I7=e,I7}var k7,kq;function dTe(){if(kq)return k7;kq=1;function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}return k7=n,k7}var T7,Tq;function fTe(){if(Tq)return T7;Tq=1;var n=k6(),e="__lodash_hash_undefined__",t=Object.prototype,i=t.hasOwnProperty;function r(o){var s=this.__data__;if(n){var a=s[o];return a===e?void 0:a}return i.call(s,o)?s[o]:void 0}return T7=r,T7}var R7,Rq;function pTe(){if(Rq)return R7;Rq=1;var n=k6(),e=Object.prototype,t=e.hasOwnProperty;function i(r){var o=this.__data__;return n?o[r]!==void 0:t.call(o,r)}return R7=i,R7}var D7,Dq;function mTe(){if(Dq)return D7;Dq=1;var n=k6(),e="__lodash_hash_undefined__";function t(i,r){var o=this.__data__;return this.size+=this.has(i)?0:1,o[i]=n&&r===void 0?e:r,this}return D7=t,D7}var P7,Pq;function gTe(){if(Pq)return P7;Pq=1;var n=hTe(),e=dTe(),t=fTe(),i=pTe(),r=mTe();function o(s){var a=-1,c=s==null?0:s.length;for(this.clear();++a<c;){var A=s[a];this.set(A[0],A[1])}}return o.prototype.clear=n,o.prototype.delete=e,o.prototype.get=t,o.prototype.has=i,o.prototype.set=r,P7=o,P7}var U7,Uq;function yTe(){if(Uq)return U7;Uq=1;var n=gTe(),e=I6(),t=lL();function i(){this.size=0,this.__data__={hash:new n,map:new(t||e),string:new n}}return U7=i,U7}var K7,Kq;function vTe(){if(Kq)return K7;Kq=1;function n(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}return K7=n,K7}var L7,Lq;function T6(){if(Lq)return L7;Lq=1;var n=vTe();function e(t,i){var r=t.__data__;return n(i)?r[typeof i=="string"?"string":"hash"]:r.map}return L7=e,L7}var F7,Fq;function bTe(){if(Fq)return F7;Fq=1;var n=T6();function e(t){var i=n(this,t).delete(t);return this.size-=i?1:0,i}return F7=e,F7}var z7,zq;function CTe(){if(zq)return z7;zq=1;var n=T6();function e(t){return n(this,t).get(t)}return z7=e,z7}var j7,jq;function _Te(){if(jq)return j7;jq=1;var n=T6();function e(t){return n(this,t).has(t)}return j7=e,j7}var N7,Nq;function xTe(){if(Nq)return N7;Nq=1;var n=T6();function e(t,i){var r=n(this,t),o=r.size;return r.set(t,i),this.size+=r.size==o?0:1,this}return N7=e,N7}var G7,Gq;function uL(){if(Gq)return G7;Gq=1;var n=yTe(),e=bTe(),t=CTe(),i=_Te(),r=xTe();function o(s){var a=-1,c=s==null?0:s.length;for(this.clear();++a<c;){var A=s[a];this.set(A[0],A[1])}}return o.prototype.clear=n,o.prototype.delete=e,o.prototype.get=t,o.prototype.has=i,o.prototype.set=r,G7=o,G7}var W7,Wq;function MTe(){if(Wq)return W7;Wq=1;var n=I6(),e=lL(),t=uL(),i=200;function r(o,s){var a=this.__data__;if(a instanceof n){var c=a.__data__;if(!e||c.length<i-1)return c.push([o,s]),this.size=++a.size,this;a=this.__data__=new t(c)}return a.set(o,s),this.size=a.size,this}return W7=r,W7}var Q7,Qq;function R6(){if(Qq)return Q7;Qq=1;var n=I6(),e=rTe(),t=oTe(),i=sTe(),r=aTe(),o=MTe();function s(a){var c=this.__data__=new n(a);this.size=c.size}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=i,s.prototype.has=r,s.prototype.set=o,Q7=s,Q7}var q7,qq;function wTe(){if(qq)return q7;qq=1;var n="__lodash_hash_undefined__";function e(t){return this.__data__.set(t,n),this}return q7=e,q7}var Y7,Yq;function STe(){if(Yq)return Y7;Yq=1;function n(e){return this.__data__.has(e)}return Y7=n,Y7}var $7,$q;function ETe(){if($q)return $7;$q=1;var n=uL(),e=wTe(),t=STe();function i(r){var o=-1,s=r==null?0:r.length;for(this.__data__=new n;++o<s;)this.add(r[o])}return i.prototype.add=i.prototype.push=e,i.prototype.has=t,$7=i,$7}var V7,Vq;function OTe(){if(Vq)return V7;Vq=1;function n(e,t){for(var i=-1,r=e==null?0:e.length;++i<r;)if(t(e[i],i,e))return!0;return!1}return V7=n,V7}var H7,Hq;function BTe(){if(Hq)return H7;Hq=1;function n(e,t){return e.has(t)}return H7=n,H7}var Z7,Zq;function Ase(){if(Zq)return Z7;Zq=1;var n=ETe(),e=OTe(),t=BTe(),i=1,r=2;function o(s,a,c,A,m,v){var x=c&i,_=s.length,O=a.length;if(_!=O&&!(x&&O>_))return!1;var P=v.get(s),F=v.get(a);if(P&&F)return P==a&&F==s;var j=-1,Q=!0,V=c&r?new n:void 0;for(v.set(s,a),v.set(a,s);++j<_;){var H=s[j],G=a[j];if(A)var Y=x?A(G,H,j,a,s,v):A(H,G,j,s,a,v);if(Y!==void 0){if(Y)continue;Q=!1;break}if(V){if(!e(a,function(z,se){if(!t(V,se)&&(H===z||m(H,z,c,A,v)))return V.push(se)})){Q=!1;break}}else if(!(H===G||m(H,G,c,A,v))){Q=!1;break}}return v.delete(s),v.delete(a),Q}return Z7=o,Z7}var X7,Xq;function hse(){if(Xq)return X7;Xq=1;var n=_m(),e=n.Uint8Array;return X7=e,X7}var J7,Jq;function ITe(){if(Jq)return J7;Jq=1;function n(e){var t=-1,i=Array(e.size);return e.forEach(function(r,o){i[++t]=[o,r]}),i}return J7=n,J7}var eI,eY;function kTe(){if(eY)return eI;eY=1;function n(e){var t=-1,i=Array(e.size);return e.forEach(function(r){i[++t]=r}),i}return eI=n,eI}var tI,tY;function TTe(){if(tY)return tI;tY=1;var n=gM(),e=hse(),t=vM(),i=Ase(),r=ITe(),o=kTe(),s=1,a=2,c="[object Boolean]",A="[object Date]",m="[object Error]",v="[object Map]",x="[object Number]",_="[object RegExp]",O="[object Set]",P="[object String]",F="[object Symbol]",j="[object ArrayBuffer]",Q="[object DataView]",V=n?n.prototype:void 0,H=V?V.valueOf:void 0;function G(Y,z,se,le,me,fe,_e){switch(se){case Q:if(Y.byteLength!=z.byteLength||Y.byteOffset!=z.byteOffset)return!1;Y=Y.buffer,z=z.buffer;case j:return!(Y.byteLength!=z.byteLength||!fe(new e(Y),new e(z)));case c:case A:case x:return t(+Y,+z);case m:return Y.name==z.name&&Y.message==z.message;case _:case P:return Y==z+"";case v:var we=r;case O:var ke=le&s;if(we||(we=o),Y.size!=z.size&&!ke)return!1;var je=_e.get(Y);if(je)return je==z;le|=a,_e.set(Y,z);var Ie=i(we(Y),we(z),le,me,fe,_e);return _e.delete(Y),Ie;case F:if(H)return H.call(Y)==H.call(z)}return!1}return tI=G,tI}var nI,nY;function dse(){if(nY)return nI;nY=1;function n(e,t){for(var i=-1,r=t.length,o=e.length;++i<r;)e[o+i]=t[i];return e}return nI=n,nI}var iI,iY;function fse(){if(iY)return iI;iY=1;var n=dse(),e=uf();function t(i,r,o){var s=r(i);return e(i)?s:n(s,o(i))}return iI=t,iI}var rI,rY;function RTe(){if(rY)return rI;rY=1;function n(e,t){for(var i=-1,r=e==null?0:e.length,o=0,s=[];++i<r;){var a=e[i];t(a,i,e)&&(s[o++]=a)}return s}return rI=n,rI}var oI,oY;function pse(){if(oY)return oI;oY=1;function n(){return[]}return oI=n,oI}var sI,sY;function cL(){if(sY)return sI;sY=1;var n=RTe(),e=pse(),t=Object.prototype,i=t.propertyIsEnumerable,r=Object.getOwnPropertySymbols,o=r?function(s){return s==null?[]:(s=Object(s),n(r(s),function(a){return i.call(s,a)}))}:e;return sI=o,sI}var aI,aY;function mse(){if(aY)return aI;aY=1;var n=fse(),e=cL(),t=yM();function i(r){return n(r,t,e)}return aI=i,aI}var lI,lY;function DTe(){if(lY)return lI;lY=1;var n=mse(),e=1,t=Object.prototype,i=t.hasOwnProperty;function r(o,s,a,c,A,m){var v=a&e,x=n(o),_=x.length,O=n(s),P=O.length;if(_!=P&&!v)return!1;for(var F=_;F--;){var j=x[F];if(!(v?j in s:i.call(s,j)))return!1}var Q=m.get(o),V=m.get(s);if(Q&&V)return Q==s&&V==o;var H=!0;m.set(o,s),m.set(s,o);for(var G=v;++F<_;){j=x[F];var Y=o[j],z=s[j];if(c)var se=v?c(z,Y,j,s,o,m):c(Y,z,j,o,s,m);if(!(se===void 0?Y===z||A(Y,z,a,c,m):se)){H=!1;break}G||(G=j=="constructor")}if(H&&!G){var le=o.constructor,me=s.constructor;le!=me&&"constructor"in o&&"constructor"in s&&!(typeof le=="function"&&le instanceof le&&typeof me=="function"&&me instanceof me)&&(H=!1)}return m.delete(o),m.delete(s),H}return lI=r,lI}var uI,uY;function PTe(){if(uY)return uI;uY=1;var n=Yb(),e=_m(),t=n(e,"DataView");return uI=t,uI}var cI,cY;function UTe(){if(cY)return cI;cY=1;var n=Yb(),e=_m(),t=n(e,"Promise");return cI=t,cI}var AI,AY;function KTe(){if(AY)return AI;AY=1;var n=Yb(),e=_m(),t=n(e,"Set");return AI=t,AI}var hI,hY;function LTe(){if(hY)return hI;hY=1;var n=Yb(),e=_m(),t=n(e,"WeakMap");return hI=t,hI}var dI,dY;function D6(){if(dY)return dI;dY=1;var n=PTe(),e=lL(),t=UTe(),i=KTe(),r=LTe(),o=qb(),s=cse(),a="[object Map]",c="[object Object]",A="[object Promise]",m="[object Set]",v="[object WeakMap]",x="[object DataView]",_=s(n),O=s(e),P=s(t),F=s(i),j=s(r),Q=o;return(n&&Q(new n(new ArrayBuffer(1)))!=x||e&&Q(new e)!=a||t&&Q(t.resolve())!=A||i&&Q(new i)!=m||r&&Q(new r)!=v)&&(Q=function(V){var H=o(V),G=H==c?V.constructor:void 0,Y=G?s(G):"";if(Y)switch(Y){case _:return x;case O:return a;case P:return A;case F:return m;case j:return v}return H}),dI=Q,dI}var fI,fY;function FTe(){if(fY)return fI;fY=1;var n=R6(),e=Ase(),t=TTe(),i=DTe(),r=D6(),o=uf(),s=E6(),a=iL(),c=1,A="[object Arguments]",m="[object Array]",v="[object Object]",x=Object.prototype,_=x.hasOwnProperty;function O(P,F,j,Q,V,H){var G=o(P),Y=o(F),z=G?m:r(P),se=Y?m:r(F);z=z==A?v:z,se=se==A?v:se;var le=z==v,me=se==v,fe=z==se;if(fe&&s(P)){if(!s(F))return!1;G=!0,le=!1}if(fe&&!le)return H||(H=new n),G||a(P)?e(P,F,j,Q,V,H):t(P,F,z,j,Q,V,H);if(!(j&c)){var _e=le&&_.call(P,"__wrapped__"),we=me&&_.call(F,"__wrapped__");if(_e||we){var ke=_e?P.value():P,je=we?F.value():F;return H||(H=new n),V(ke,je,j,Q,H)}}return fe?(H||(H=new n),i(P,F,j,Q,V,H)):!1}return fI=O,fI}var pI,pY;function gse(){if(pY)return pI;pY=1;var n=FTe(),e=Vg();function t(i,r,o,s,a){return i===r?!0:i==null||r==null||!e(i)&&!e(r)?i!==i&&r!==r:n(i,r,o,s,t,a)}return pI=t,pI}var mI,mY;function zTe(){if(mY)return mI;mY=1;var n=R6(),e=gse(),t=1,i=2;function r(o,s,a,c){var A=a.length,m=A,v=!c;if(o==null)return!m;for(o=Object(o);A--;){var x=a[A];if(v&&x[2]?x[1]!==o[x[0]]:!(x[0]in o))return!1}for(;++A<m;){x=a[A];var _=x[0],O=o[_],P=x[1];if(v&&x[2]){if(O===void 0&&!(_ in o))return!1}else{var F=new n;if(c)var j=c(O,P,_,o,s,F);if(!(j===void 0?e(P,O,t|i,c,F):j))return!1}}return!0}return mI=r,mI}var gI,gY;function yse(){if(gY)return gI;gY=1;var n=ap();function e(t){return t===t&&!n(t)}return gI=e,gI}var yI,yY;function jTe(){if(yY)return yI;yY=1;var n=yse(),e=yM();function t(i){for(var r=e(i),o=r.length;o--;){var s=r[o],a=i[s];r[o]=[s,a,n(a)]}return r}return yI=t,yI}var vI,vY;function vse(){if(vY)return vI;vY=1;function n(e,t){return function(i){return i==null?!1:i[e]===t&&(t!==void 0||e in Object(i))}}return vI=n,vI}var bI,bY;function NTe(){if(bY)return bI;bY=1;var n=zTe(),e=jTe(),t=vse();function i(r){var o=e(r);return o.length==1&&o[0][2]?t(o[0][0],o[0][1]):function(s){return s===r||n(s,r,o)}}return bI=i,bI}var CI,CY;function P6(){if(CY)return CI;CY=1;var n=qb(),e=Vg(),t="[object Symbol]";function i(r){return typeof r=="symbol"||e(r)&&n(r)==t}return CI=i,CI}var _I,_Y;function AL(){if(_Y)return _I;_Y=1;var n=uf(),e=P6(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function r(o,s){if(n(o))return!1;var a=typeof o;return a=="number"||a=="symbol"||a=="boolean"||o==null||e(o)?!0:i.test(o)||!t.test(o)||s!=null&&o in Object(s)}return _I=r,_I}var xI,xY;function GTe(){if(xY)return xI;xY=1;var n=uL(),e="Expected a function";function t(i,r){if(typeof i!="function"||r!=null&&typeof r!="function")throw new TypeError(e);var o=function(){var s=arguments,a=r?r.apply(this,s):s[0],c=o.cache;if(c.has(a))return c.get(a);var A=i.apply(this,s);return o.cache=c.set(a,A)||c,A};return o.cache=new(t.Cache||n),o}return t.Cache=n,xI=t,xI}var MI,MY;function WTe(){if(MY)return MI;MY=1;var n=GTe(),e=500;function t(i){var r=n(i,function(s){return o.size===e&&o.clear(),s}),o=r.cache;return r}return MI=t,MI}var wI,wY;function QTe(){if(wY)return wI;wY=1;var n=WTe(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,t=/\\(\\)?/g,i=n(function(r){var o=[];return r.charCodeAt(0)===46&&o.push(""),r.replace(e,function(s,a,c,A){o.push(c?A.replace(t,"$1"):a||s)}),o});return wI=i,wI}var SI,SY;function qTe(){if(SY)return SI;SY=1;var n=gM(),e=use(),t=uf(),i=P6(),r=n?n.prototype:void 0,o=r?r.toString:void 0;function s(a){if(typeof a=="string")return a;if(t(a))return e(a,s)+"";if(i(a))return o?o.call(a):"";var c=a+"";return c=="0"&&1/a==-1/0?"-0":c}return SI=s,SI}var EI,EY;function YTe(){if(EY)return EI;EY=1;var n=qTe();function e(t){return t==null?"":n(t)}return EI=e,EI}var OI,OY;function bse(){if(OY)return OI;OY=1;var n=uf(),e=AL(),t=QTe(),i=YTe();function r(o,s){return n(o)?o:e(o,s)?[o]:t(i(o))}return OI=r,OI}var BI,BY;function U6(){if(BY)return BI;BY=1;var n=P6();function e(t){if(typeof t=="string"||n(t))return t;var i=t+"";return i=="0"&&1/t==-1/0?"-0":i}return BI=e,BI}var II,IY;function Cse(){if(IY)return II;IY=1;var n=bse(),e=U6();function t(i,r){r=n(r,i);for(var o=0,s=r.length;i!=null&&o<s;)i=i[e(r[o++])];return o&&o==s?i:void 0}return II=t,II}var kI,kY;function $Te(){if(kY)return kI;kY=1;var n=Cse();function e(t,i,r){var o=t==null?void 0:n(t,i);return o===void 0?r:o}return kI=e,kI}var TI,TY;function VTe(){if(TY)return TI;TY=1;function n(e,t){return e!=null&&t in Object(e)}return TI=n,TI}var RI,RY;function HTe(){if(RY)return RI;RY=1;var n=bse(),e=XK(),t=uf(),i=JK(),r=eL(),o=U6();function s(a,c,A){c=n(c,a);for(var m=-1,v=c.length,x=!1;++m<v;){var _=o(c[m]);if(!(x=a!=null&&A(a,_)))break;a=a[_]}return x||++m!=v?x:(v=a==null?0:a.length,!!v&&r(v)&&i(_,v)&&(t(a)||e(a)))}return RI=s,RI}var DI,DY;function ZTe(){if(DY)return DI;DY=1;var n=VTe(),e=HTe();function t(i,r){return i!=null&&e(i,r,n)}return DI=t,DI}var PI,PY;function XTe(){if(PY)return PI;PY=1;var n=gse(),e=$Te(),t=ZTe(),i=AL(),r=yse(),o=vse(),s=U6(),a=1,c=2;function A(m,v){return i(m)&&r(v)?o(s(m),v):function(x){var _=e(x,m);return _===void 0&&_===v?t(x,m):n(v,_,a|c)}}return PI=A,PI}var UI,UY;function JTe(){if(UY)return UI;UY=1;function n(e){return function(t){return t?.[e]}}return UI=n,UI}var KI,KY;function e9e(){if(KY)return KI;KY=1;var n=Cse();function e(t){return function(i){return n(i,t)}}return KI=e,KI}var LI,LY;function t9e(){if(LY)return LI;LY=1;var n=JTe(),e=e9e(),t=AL(),i=U6();function r(o){return t(o)?n(i(o)):e(o)}return LI=r,LI}var FI,FY;function n9e(){if(FY)return FI;FY=1;var n=NTe(),e=XTe(),t=O6(),i=uf(),r=t9e();function o(s){return typeof s=="function"?s:s==null?t:typeof s=="object"?i(s)?e(s[0],s[1]):n(s):r(s)}return FI=o,FI}var zI,zY;function i9e(){if(zY)return zI;zY=1;var n=Fx();function e(t,i){return function(r,o){if(r==null)return r;if(!n(r))return t(r,o);for(var s=r.length,a=i?s:-1,c=Object(r);(i?a--:++a<s)&&o(c[a],a,c)!==!1;);return r}}return zI=e,zI}var jI,jY;function _se(){if(jY)return jI;jY=1;var n=sse(),e=i9e(),t=e(n);return jI=t,jI}var NI,NY;function r9e(){if(NY)return NI;NY=1;var n=_se(),e=Fx();function t(i,r){var o=-1,s=e(i)?Array(i.length):[];return n(i,function(a,c,A){s[++o]=r(a,c,A)}),s}return NI=t,NI}var GI,GY;function o9e(){if(GY)return GI;GY=1;var n=use(),e=n9e(),t=r9e(),i=uf();function r(o,s){var a=i(o)?n:t;return a(o,e(s,3))}return GI=r,GI}var WY;function s9e(){if(WY)return jC;WY=1,Object.defineProperty(jC,"__esModule",{value:!0}),jC.flattenNames=void 0;var n=Qke(),e=c(n),t=sL(),i=c(t),r=lse(),o=c(r),s=o9e(),a=c(s);function c(m){return m&&m.__esModule?m:{default:m}}var A=jC.flattenNames=function m(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],x=[];return(0,a.default)(v,function(_){Array.isArray(_)?m(_).map(function(O){return x.push(O)}):(0,o.default)(_)?(0,i.default)(_,function(O,P){O===!0&&x.push(P),x.push(P+"-"+O)}):(0,e.default)(_)&&x.push(_)}),x};return jC.default=A,jC}var NC={},WI,QY;function xse(){if(QY)return WI;QY=1;function n(e,t){for(var i=-1,r=e==null?0:e.length;++i<r&&t(e[i],i,e)!==!1;);return e}return WI=n,WI}var QI,qY;function Mse(){if(qY)return QI;qY=1;var n=Yb(),e=(function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch{}})();return QI=e,QI}var qI,YY;function hL(){if(YY)return qI;YY=1;var n=Mse();function e(t,i,r){i=="__proto__"&&n?n(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}return qI=e,qI}var YI,$Y;function wse(){if($Y)return YI;$Y=1;var n=hL(),e=vM(),t=Object.prototype,i=t.hasOwnProperty;function r(o,s,a){var c=o[s];(!(i.call(o,s)&&e(c,a))||a===void 0&&!(s in o))&&n(o,s,a)}return YI=r,YI}var $I,VY;function bM(){if(VY)return $I;VY=1;var n=wse(),e=hL();function t(i,r,o,s){var a=!o;o||(o={});for(var c=-1,A=r.length;++c<A;){var m=r[c],v=s?s(o[m],i[m],m,o,i):void 0;v===void 0&&(v=i[m]),a?e(o,m,v):n(o,m,v)}return o}return $I=t,$I}var VI,HY;function a9e(){if(HY)return VI;HY=1;var n=bM(),e=yM();function t(i,r){return i&&n(r,e(r),i)}return VI=t,VI}var HI,ZY;function l9e(){if(ZY)return HI;ZY=1;function n(e){var t=[];if(e!=null)for(var i in Object(e))t.push(i);return t}return HI=n,HI}var ZI,XY;function u9e(){if(XY)return ZI;XY=1;var n=ap(),e=rL(),t=l9e(),i=Object.prototype,r=i.hasOwnProperty;function o(s){if(!n(s))return t(s);var a=e(s),c=[];for(var A in s)A=="constructor"&&(a||!r.call(s,A))||c.push(A);return c}return ZI=o,ZI}var XI,JY;function CM(){if(JY)return XI;JY=1;var n=rse(),e=u9e(),t=Fx();function i(r){return t(r)?n(r,!0):e(r)}return XI=i,XI}var JI,e$;function c9e(){if(e$)return JI;e$=1;var n=bM(),e=CM();function t(i,r){return i&&n(r,e(r),i)}return JI=t,JI}var G2={exports:{}};G2.exports;var t$;function Sse(){return t$||(t$=1,(function(n,e){var t=_m(),i=e&&!e.nodeType&&e,r=i&&!0&&n&&!n.nodeType&&n,o=r&&r.exports===i,s=o?t.Buffer:void 0,a=s?s.allocUnsafe:void 0;function c(A,m){if(m)return A.slice();var v=A.length,x=a?a(v):new A.constructor(v);return A.copy(x),x}n.exports=c})(G2,G2.exports)),G2.exports}var ek,n$;function Ese(){if(n$)return ek;n$=1;function n(e,t){var i=-1,r=e.length;for(t||(t=Array(r));++i<r;)t[i]=e[i];return t}return ek=n,ek}var tk,i$;function A9e(){if(i$)return tk;i$=1;var n=bM(),e=cL();function t(i,r){return n(i,e(i),r)}return tk=t,tk}var nk,r$;function Ose(){if(r$)return nk;r$=1;var n=dse(),e=aL(),t=cL(),i=pse(),r=Object.getOwnPropertySymbols,o=r?function(s){for(var a=[];s;)n(a,t(s)),s=e(s);return a}:i;return nk=o,nk}var ik,o$;function h9e(){if(o$)return ik;o$=1;var n=bM(),e=Ose();function t(i,r){return n(i,e(i),r)}return ik=t,ik}var rk,s$;function d9e(){if(s$)return rk;s$=1;var n=fse(),e=Ose(),t=CM();function i(r){return n(r,t,e)}return rk=i,rk}var ok,a$;function f9e(){if(a$)return ok;a$=1;var n=Object.prototype,e=n.hasOwnProperty;function t(i){var r=i.length,o=new i.constructor(r);return r&&typeof i[0]=="string"&&e.call(i,"index")&&(o.index=i.index,o.input=i.input),o}return ok=t,ok}var sk,l$;function dL(){if(l$)return sk;l$=1;var n=hse();function e(t){var i=new t.constructor(t.byteLength);return new n(i).set(new n(t)),i}return sk=e,sk}var ak,u$;function p9e(){if(u$)return ak;u$=1;var n=dL();function e(t,i){var r=i?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}return ak=e,ak}var lk,c$;function m9e(){if(c$)return lk;c$=1;var n=/\w*$/;function e(t){var i=new t.constructor(t.source,n.exec(t));return i.lastIndex=t.lastIndex,i}return lk=e,lk}var uk,A$;function g9e(){if(A$)return uk;A$=1;var n=gM(),e=n?n.prototype:void 0,t=e?e.valueOf:void 0;function i(r){return t?Object(t.call(r)):{}}return uk=i,uk}var ck,h$;function Bse(){if(h$)return ck;h$=1;var n=dL();function e(t,i){var r=i?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}return ck=e,ck}var Ak,d$;function y9e(){if(d$)return Ak;d$=1;var n=dL(),e=p9e(),t=m9e(),i=g9e(),r=Bse(),o="[object Boolean]",s="[object Date]",a="[object Map]",c="[object Number]",A="[object RegExp]",m="[object Set]",v="[object String]",x="[object Symbol]",_="[object ArrayBuffer]",O="[object DataView]",P="[object Float32Array]",F="[object Float64Array]",j="[object Int8Array]",Q="[object Int16Array]",V="[object Int32Array]",H="[object Uint8Array]",G="[object Uint8ClampedArray]",Y="[object Uint16Array]",z="[object Uint32Array]";function se(le,me,fe){var _e=le.constructor;switch(me){case _:return n(le);case o:case s:return new _e(+le);case O:return e(le,fe);case P:case F:case j:case Q:case V:case H:case G:case Y:case z:return r(le,fe);case a:return new _e;case c:case v:return new _e(le);case A:return t(le);case m:return new _e;case x:return i(le)}}return Ak=se,Ak}var hk,f$;function v9e(){if(f$)return hk;f$=1;var n=ap(),e=Object.create,t=(function(){function i(){}return function(r){if(!n(r))return{};if(e)return e(r);i.prototype=r;var o=new i;return i.prototype=void 0,o}})();return hk=t,hk}var dk,p$;function Ise(){if(p$)return dk;p$=1;var n=v9e(),e=aL(),t=rL();function i(r){return typeof r.constructor=="function"&&!t(r)?n(e(r)):{}}return dk=i,dk}var fk,m$;function b9e(){if(m$)return fk;m$=1;var n=D6(),e=Vg(),t="[object Map]";function i(r){return e(r)&&n(r)==t}return fk=i,fk}var pk,g$;function C9e(){if(g$)return pk;g$=1;var n=b9e(),e=tL(),t=nL(),i=t&&t.isMap,r=i?e(i):n;return pk=r,pk}var mk,y$;function _9e(){if(y$)return mk;y$=1;var n=D6(),e=Vg(),t="[object Set]";function i(r){return e(r)&&n(r)==t}return mk=i,mk}var gk,v$;function x9e(){if(v$)return gk;v$=1;var n=_9e(),e=tL(),t=nL(),i=t&&t.isSet,r=i?e(i):n;return gk=r,gk}var yk,b$;function M9e(){if(b$)return yk;b$=1;var n=R6(),e=xse(),t=wse(),i=a9e(),r=c9e(),o=Sse(),s=Ese(),a=A9e(),c=h9e(),A=mse(),m=d9e(),v=D6(),x=f9e(),_=y9e(),O=Ise(),P=uf(),F=E6(),j=C9e(),Q=ap(),V=x9e(),H=yM(),G=CM(),Y=1,z=2,se=4,le="[object Arguments]",me="[object Array]",fe="[object Boolean]",_e="[object Date]",we="[object Error]",ke="[object Function]",je="[object GeneratorFunction]",Ie="[object Map]",Qe="[object Number]",tt="[object Object]",ht="[object RegExp]",ce="[object Set]",Le="[object String]",We="[object Symbol]",Me="[object WeakMap]",dt="[object ArrayBuffer]",it="[object DataView]",vt="[object Float32Array]",Ut="[object Float64Array]",Pe="[object Int8Array]",Te="[object Int16Array]",Se="[object Int32Array]",Ne="[object Uint8Array]",ut="[object Uint8ClampedArray]",rt="[object Uint16Array]",mt="[object Uint32Array]",Rt={};Rt[le]=Rt[me]=Rt[dt]=Rt[it]=Rt[fe]=Rt[_e]=Rt[vt]=Rt[Ut]=Rt[Pe]=Rt[Te]=Rt[Se]=Rt[Ie]=Rt[Qe]=Rt[tt]=Rt[ht]=Rt[ce]=Rt[Le]=Rt[We]=Rt[Ne]=Rt[ut]=Rt[rt]=Rt[mt]=!0,Rt[we]=Rt[ke]=Rt[Me]=!1;function Bt($t,Rn,zn,ai,_n,Bn){var dn,li=Rn&Y,In=Rn&z,It=Rn&se;if(zn&&(dn=_n?zn($t,ai,_n,Bn):zn($t)),dn!==void 0)return dn;if(!Q($t))return $t;var xe=P($t);if(xe){if(dn=x($t),!li)return s($t,dn)}else{var oe=v($t),J=oe==ke||oe==je;if(F($t))return o($t,li);if(oe==tt||oe==le||J&&!_n){if(dn=In||J?{}:O($t),!li)return In?c($t,r(dn,$t)):a($t,i(dn,$t))}else{if(!Rt[oe])return _n?$t:{};dn=_($t,oe,li)}}Bn||(Bn=new n);var ne=Bn.get($t);if(ne)return ne;Bn.set($t,dn),V($t)?$t.forEach(function(Ue){dn.add(Bt(Ue,Rn,zn,Ue,$t,Bn))}):j($t)&&$t.forEach(function(Ue,He){dn.set(He,Bt(Ue,Rn,zn,He,$t,Bn))});var ue=It?In?m:A:In?G:H,Ce=xe?void 0:ue($t);return e(Ce||$t,function(Ue,He){Ce&&(He=Ue,Ue=$t[He]),t(dn,He,Bt(Ue,Rn,zn,He,$t,Bn))}),dn}return yk=Bt,yk}var vk,C$;function w9e(){if(C$)return vk;C$=1;var n=M9e(),e=1,t=4;function i(r){return n(r,e|t)}return vk=i,vk}var _$;function S9e(){if(_$)return NC;_$=1,Object.defineProperty(NC,"__esModule",{value:!0}),NC.mergeClasses=void 0;var n=sL(),e=o(n),t=w9e(),i=o(t),r=Object.assign||function(a){for(var c=1;c<arguments.length;c++){var A=arguments[c];for(var m in A)Object.prototype.hasOwnProperty.call(A,m)&&(a[m]=A[m])}return a};function o(a){return a&&a.__esModule?a:{default:a}}var s=NC.mergeClasses=function(c){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],m=c.default&&(0,i.default)(c.default)||{};return A.map(function(v){var x=c[v];return x&&(0,e.default)(x,function(_,O){m[O]||(m[O]={}),m[O]=r({},m[O],x[O])}),v}),m};return NC.default=s,NC}var GC={},x$;function E9e(){if(x$)return GC;x$=1,Object.defineProperty(GC,"__esModule",{value:!0}),GC.autoprefix=void 0;var n=sL(),e=i(n),t=Object.assign||function(s){for(var a=1;a<arguments.length;a++){var c=arguments[a];for(var A in c)Object.prototype.hasOwnProperty.call(c,A)&&(s[A]=c[A])}return s};function i(s){return s&&s.__esModule?s:{default:s}}var r={borderRadius:function(a){return{msBorderRadius:a,MozBorderRadius:a,OBorderRadius:a,WebkitBorderRadius:a,borderRadius:a}},boxShadow:function(a){return{msBoxShadow:a,MozBoxShadow:a,OBoxShadow:a,WebkitBoxShadow:a,boxShadow:a}},userSelect:function(a){return{WebkitTouchCallout:a,KhtmlUserSelect:a,MozUserSelect:a,msUserSelect:a,WebkitUserSelect:a,userSelect:a}},flex:function(a){return{WebkitBoxFlex:a,MozBoxFlex:a,WebkitFlex:a,msFlex:a,flex:a}},flexBasis:function(a){return{WebkitFlexBasis:a,flexBasis:a}},justifyContent:function(a){return{WebkitJustifyContent:a,justifyContent:a}},transition:function(a){return{msTransition:a,MozTransition:a,OTransition:a,WebkitTransition:a,transition:a}},transform:function(a){return{msTransform:a,MozTransform:a,OTransform:a,WebkitTransform:a,transform:a}},absolute:function(a){var c=a&&a.split(" ");return{position:"absolute",top:c&&c[0],right:c&&c[1],bottom:c&&c[2],left:c&&c[3]}},extend:function(a,c){var A=c[a];return A||{extend:a}}},o=GC.autoprefix=function(a){var c={};return(0,e.default)(a,function(A,m){var v={};(0,e.default)(A,function(x,_){var O=r[_];O?v=t({},v,O(x)):v[_]=x}),c[m]=v}),c};return GC.default=o,GC}var WC={},M$;function O9e(){if(M$)return WC;M$=1,Object.defineProperty(WC,"__esModule",{value:!0}),WC.hover=void 0;var n=Object.assign||function(c){for(var A=1;A<arguments.length;A++){var m=arguments[A];for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(c[v]=m[v])}return c},e=La(),t=i(e);function i(c){return c&&c.__esModule?c:{default:c}}function r(c,A){if(!(c instanceof A))throw new TypeError("Cannot call a class as a function")}function o(c,A){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:c}function s(c,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);c.prototype=Object.create(A&&A.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(c,A):c.__proto__=A)}var a=WC.hover=function(A){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return(function(v){s(x,v);function x(){var _,O,P,F;r(this,x);for(var j=arguments.length,Q=Array(j),V=0;V<j;V++)Q[V]=arguments[V];return F=(O=(P=o(this,(_=x.__proto__||Object.getPrototypeOf(x)).call.apply(_,[this].concat(Q))),P),P.state={hover:!1},P.handleMouseOver=function(){return P.setState({hover:!0})},P.handleMouseOut=function(){return P.setState({hover:!1})},P.render=function(){return t.default.createElement(m,{onMouseOver:P.handleMouseOver,onMouseOut:P.handleMouseOut},t.default.createElement(A,n({},P.props,P.state)))},O),o(P,F)}return x})(t.default.Component)};return WC.default=a,WC}var QC={},w$;function B9e(){if(w$)return QC;w$=1,Object.defineProperty(QC,"__esModule",{value:!0}),QC.active=void 0;var n=Object.assign||function(c){for(var A=1;A<arguments.length;A++){var m=arguments[A];for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(c[v]=m[v])}return c},e=La(),t=i(e);function i(c){return c&&c.__esModule?c:{default:c}}function r(c,A){if(!(c instanceof A))throw new TypeError("Cannot call a class as a function")}function o(c,A){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:c}function s(c,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);c.prototype=Object.create(A&&A.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(c,A):c.__proto__=A)}var a=QC.active=function(A){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return(function(v){s(x,v);function x(){var _,O,P,F;r(this,x);for(var j=arguments.length,Q=Array(j),V=0;V<j;V++)Q[V]=arguments[V];return F=(O=(P=o(this,(_=x.__proto__||Object.getPrototypeOf(x)).call.apply(_,[this].concat(Q))),P),P.state={active:!1},P.handleMouseDown=function(){return P.setState({active:!0})},P.handleMouseUp=function(){return P.setState({active:!1})},P.render=function(){return t.default.createElement(m,{onMouseDown:P.handleMouseDown,onMouseUp:P.handleMouseUp},t.default.createElement(A,n({},P.props,P.state)))},O),o(P,F)}return x})(t.default.Component)};return QC.default=a,QC}var R5={},S$;function I9e(){if(S$)return R5;S$=1,Object.defineProperty(R5,"__esModule",{value:!0});var n=function(t,i){var r={},o=function(a){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=c};return t===0&&o("first-child"),t===i-1&&o("last-child"),(t===0||t%2===0)&&o("even"),Math.abs(t%2)===1&&o("odd"),o("nth-child",t),r};return R5.default=n,R5}var E$;function xm(){if(E$)return Gh;E$=1,Object.defineProperty(Gh,"__esModule",{value:!0}),Gh.ReactCSS=Gh.loop=Gh.handleActive=Gh.handleHover=Gh.hover=void 0;var n=s9e(),e=x(n),t=S9e(),i=x(t),r=E9e(),o=x(r),s=O9e(),a=x(s),c=B9e(),A=x(c),m=I9e(),v=x(m);function x(O){return O&&O.__esModule?O:{default:O}}Gh.hover=a.default,Gh.handleHover=a.default,Gh.handleActive=A.default,Gh.loop=v.default;var _=Gh.ReactCSS=function(P){for(var F=arguments.length,j=Array(F>1?F-1:0),Q=1;Q<F;Q++)j[Q-1]=arguments[Q];var V=(0,e.default)(j),H=(0,i.default)(P,V);return(0,o.default)(H)};return Gh.default=_,Gh}var bk,O$;function kse(){if(O$)return bk;O$=1;var n=hL(),e=vM();function t(i,r,o){(o!==void 0&&!e(i[r],o)||o===void 0&&!(r in i))&&n(i,r,o)}return bk=t,bk}var Ck,B$;function k9e(){if(B$)return Ck;B$=1;var n=Fx(),e=Vg();function t(i){return e(i)&&n(i)}return Ck=t,Ck}var _k,I$;function Tse(){if(I$)return _k;I$=1;function n(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}return _k=n,_k}var xk,k$;function T9e(){if(k$)return xk;k$=1;var n=bM(),e=CM();function t(i){return n(i,e(i))}return xk=t,xk}var Mk,T$;function R9e(){if(T$)return Mk;T$=1;var n=kse(),e=Sse(),t=Bse(),i=Ese(),r=Ise(),o=XK(),s=uf(),a=k9e(),c=E6(),A=oL(),m=ap(),v=lse(),x=iL(),_=Tse(),O=T9e();function P(F,j,Q,V,H,G,Y){var z=_(F,Q),se=_(j,Q),le=Y.get(se);if(le){n(F,Q,le);return}var me=G?G(z,se,Q+"",F,j,Y):void 0,fe=me===void 0;if(fe){var _e=s(se),we=!_e&&c(se),ke=!_e&&!we&&x(se);me=se,_e||we||ke?s(z)?me=z:a(z)?me=i(z):we?(fe=!1,me=e(se,!0)):ke?(fe=!1,me=t(se,!0)):me=[]:v(se)||o(se)?(me=z,o(z)?me=O(z):(!m(z)||A(z))&&(me=r(se))):fe=!1}fe&&(Y.set(se,me),H(me,se,V,G,Y),Y.delete(se)),n(F,Q,me)}return Mk=P,Mk}var wk,R$;function D9e(){if(R$)return wk;R$=1;var n=R6(),e=kse(),t=ise(),i=R9e(),r=ap(),o=CM(),s=Tse();function a(c,A,m,v,x){c!==A&&t(A,function(_,O){if(x||(x=new n),r(_))i(c,A,O,m,a,v,x);else{var P=v?v(s(c,O),_,O+"",c,A,x):void 0;P===void 0&&(P=_),e(c,O,P)}},o)}return wk=a,wk}var Sk,D$;function P9e(){if(D$)return Sk;D$=1;function n(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}return Sk=n,Sk}var Ek,P$;function U9e(){if(P$)return Ek;P$=1;var n=P9e(),e=Math.max;function t(i,r,o){return r=e(r===void 0?i.length-1:r,0),function(){for(var s=arguments,a=-1,c=e(s.length-r,0),A=Array(c);++a<c;)A[a]=s[r+a];a=-1;for(var m=Array(r+1);++a<r;)m[a]=s[a];return m[r]=o(A),n(i,this,m)}}return Ek=t,Ek}var Ok,U$;function K9e(){if(U$)return Ok;U$=1;function n(e){return function(){return e}}return Ok=n,Ok}var Bk,K$;function L9e(){if(K$)return Bk;K$=1;var n=K9e(),e=Mse(),t=O6(),i=e?function(r,o){return e(r,"toString",{configurable:!0,enumerable:!1,value:n(o),writable:!0})}:t;return Bk=i,Bk}var Ik,L$;function F9e(){if(L$)return Ik;L$=1;var n=800,e=16,t=Date.now;function i(r){var o=0,s=0;return function(){var a=t(),c=e-(a-s);if(s=a,c>0){if(++o>=n)return arguments[0]}else o=0;return r.apply(void 0,arguments)}}return Ik=i,Ik}var kk,F$;function z9e(){if(F$)return kk;F$=1;var n=L9e(),e=F9e(),t=e(n);return kk=t,kk}var Tk,z$;function j9e(){if(z$)return Tk;z$=1;var n=O6(),e=U9e(),t=z9e();function i(r,o){return t(e(r,o,n),r+"")}return Tk=i,Tk}var Rk,j$;function N9e(){if(j$)return Rk;j$=1;var n=vM(),e=Fx(),t=JK(),i=ap();function r(o,s,a){if(!i(a))return!1;var c=typeof s;return(c=="number"?e(a)&&t(s,a.length):c=="string"&&s in a)?n(a[s],o):!1}return Rk=r,Rk}var Dk,N$;function G9e(){if(N$)return Dk;N$=1;var n=j9e(),e=N9e();function t(i){return n(function(r,o){var s=-1,a=o.length,c=a>1?o[a-1]:void 0,A=a>2?o[2]:void 0;for(c=i.length>3&&typeof c=="function"?(a--,c):void 0,A&&e(o[0],o[1],A)&&(c=a<3?void 0:c,a=1),r=Object(r);++s<a;){var m=o[s];m&&i(r,m,s,c)}return r})}return Dk=t,Dk}var Pk,G$;function Rse(){if(G$)return Pk;G$=1;var n=D9e(),e=G9e(),t=e(function(i,r,o){n(i,r,o)});return Pk=t,Pk}var Uk={},qC={},D5={},W$;function W9e(){return W$||(W$=1,Object.defineProperty(D5,"__esModule",{value:!0}),D5.calculateChange=function(e,t,i,r,o){var s=o.clientWidth,a=o.clientHeight,c=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,A=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,m=c-(o.getBoundingClientRect().left+window.pageXOffset),v=A-(o.getBoundingClientRect().top+window.pageYOffset);if(i==="vertical"){var x=void 0;if(v<0?x=0:v>a?x=1:x=Math.round(v*100/a)/100,t.a!==x)return{h:t.h,s:t.s,l:t.l,a:x,source:"rgb"}}else{var _=void 0;if(m<0?_=0:m>s?_=1:_=Math.round(m*100/s)/100,r!==_)return{h:t.h,s:t.s,l:t.l,a:_,source:"rgb"}}return null}),D5}var YC={},g2={},Q$;function Q9e(){if(Q$)return g2;Q$=1,Object.defineProperty(g2,"__esModule",{value:!0});var n={},e=g2.render=function(i,r,o,s){if(typeof document>"u"&&!s)return null;var a=s?new s:document.createElement("canvas");a.width=o*2,a.height=o*2;var c=a.getContext("2d");return c?(c.fillStyle=i,c.fillRect(0,0,a.width,a.height),c.fillStyle=r,c.fillRect(0,0,o,o),c.translate(o,o),c.fillRect(0,0,o,o),a.toDataURL()):null};return g2.get=function(i,r,o,s){var a=i+"-"+r+"-"+o+(s?"-server":"");if(n[a])return n[a];var c=e(i,r,o,s);return n[a]=c,c},g2}var q$;function fL(){if(q$)return YC;q$=1,Object.defineProperty(YC,"__esModule",{value:!0}),YC.Checkboard=void 0;var n=Object.assign||function(m){for(var v=1;v<arguments.length;v++){var x=arguments[v];for(var _ in x)Object.prototype.hasOwnProperty.call(x,_)&&(m[_]=x[_])}return m},e=La(),t=c(e),i=xm(),r=c(i),o=Q9e(),s=a(o);function a(m){if(m&&m.__esModule)return m;var v={};if(m!=null)for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&(v[x]=m[x]);return v.default=m,v}function c(m){return m&&m.__esModule?m:{default:m}}var A=YC.Checkboard=function(v){var x=v.white,_=v.grey,O=v.size,P=v.renderers,F=v.borderRadius,j=v.boxShadow,Q=v.children,V=(0,r.default)({default:{grid:{borderRadius:F,boxShadow:j,absolute:"0px 0px 0px 0px",background:"url("+s.get(x,_,O,P.canvas)+") center left"}}});return(0,e.isValidElement)(Q)?t.default.cloneElement(Q,n({},Q.props,{style:n({},Q.props.style,V.grid)})):t.default.createElement("div",{style:V.grid})};return A.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}},YC.default=A,YC}var Y$;function q9e(){if(Y$)return qC;Y$=1,Object.defineProperty(qC,"__esModule",{value:!0}),qC.Alpha=void 0;var n=Object.assign||function(F){for(var j=1;j<arguments.length;j++){var Q=arguments[j];for(var V in Q)Object.prototype.hasOwnProperty.call(Q,V)&&(F[V]=Q[V])}return F},e=(function(){function F(j,Q){for(var V=0;V<Q.length;V++){var H=Q[V];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(j,H.key,H)}}return function(j,Q,V){return Q&&F(j.prototype,Q),V&&F(j,V),j}})(),t=La(),i=v(t),r=xm(),o=v(r),s=W9e(),a=m(s),c=fL(),A=v(c);function m(F){if(F&&F.__esModule)return F;var j={};if(F!=null)for(var Q in F)Object.prototype.hasOwnProperty.call(F,Q)&&(j[Q]=F[Q]);return j.default=F,j}function v(F){return F&&F.__esModule?F:{default:F}}function x(F,j){if(!(F instanceof j))throw new TypeError("Cannot call a class as a function")}function _(F,j){if(!F)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:F}function O(F,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);F.prototype=Object.create(j&&j.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(F,j):F.__proto__=j)}var P=qC.Alpha=(function(F){O(j,F);function j(){var Q,V,H,G;x(this,j);for(var Y=arguments.length,z=Array(Y),se=0;se<Y;se++)z[se]=arguments[se];return G=(V=(H=_(this,(Q=j.__proto__||Object.getPrototypeOf(j)).call.apply(Q,[this].concat(z))),H),H.handleChange=function(le){var me=a.calculateChange(le,H.props.hsl,H.props.direction,H.props.a,H.container);me&&typeof H.props.onChange=="function"&&H.props.onChange(me,le)},H.handleMouseDown=function(le){H.handleChange(le),window.addEventListener("mousemove",H.handleChange),window.addEventListener("mouseup",H.handleMouseUp)},H.handleMouseUp=function(){H.unbindEventListeners()},H.unbindEventListeners=function(){window.removeEventListener("mousemove",H.handleChange),window.removeEventListener("mouseup",H.handleMouseUp)},V),_(H,G)}return e(j,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var V=this,H=this.props.rgb,G=(0,o.default)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+H.r+","+H.g+","+H.b+`, 0) 0%,
rgba(`+H.r+","+H.g+","+H.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:H.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+H.r+","+H.g+","+H.b+`, 0) 0%,
rgba(`+H.r+","+H.g+","+H.b+", 1) 100%)"},pointer:{left:0,top:H.a*100+"%"}},overwrite:n({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return i.default.createElement("div",{style:G.alpha},i.default.createElement("div",{style:G.checkboard},i.default.createElement(A.default,{renderers:this.props.renderers})),i.default.createElement("div",{style:G.gradient}),i.default.createElement("div",{style:G.container,ref:function(z){return V.container=z},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.default.createElement("div",{style:G.pointer},this.props.pointer?i.default.createElement(this.props.pointer,this.props):i.default.createElement("div",{style:G.slider}))))}}]),j})(t.PureComponent||t.Component);return qC.default=P,qC}var $C={},$$;function Y9e(){if($$)return $C;$$=1,Object.defineProperty($C,"__esModule",{value:!0}),$C.EditableInput=void 0;var n=(function(){function Q(V,H){for(var G=0;G<H.length;G++){var Y=H[G];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(V,Y.key,Y)}}return function(V,H,G){return H&&Q(V.prototype,H),G&&Q(V,G),V}})(),e=La(),t=o(e),i=xm(),r=o(i);function o(Q){return Q&&Q.__esModule?Q:{default:Q}}function s(Q,V,H){return V in Q?Object.defineProperty(Q,V,{value:H,enumerable:!0,configurable:!0,writable:!0}):Q[V]=H,Q}function a(Q,V){if(!(Q instanceof V))throw new TypeError("Cannot call a class as a function")}function c(Q,V){if(!Q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V&&(typeof V=="object"||typeof V=="function")?V:Q}function A(Q,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof V);Q.prototype=Object.create(V&&V.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}}),V&&(Object.setPrototypeOf?Object.setPrototypeOf(Q,V):Q.__proto__=V)}var m=1,v=38,x=40,_=[v,x],O=function(V){return _.indexOf(V)>-1},P=function(V){return Number(String(V).replace(/%/g,""))},F=1,j=$C.EditableInput=(function(Q){A(V,Q);function V(H){a(this,V);var G=c(this,(V.__proto__||Object.getPrototypeOf(V)).call(this));return G.handleBlur=function(){G.state.blurValue&&G.setState({value:G.state.blurValue,blurValue:null})},G.handleChange=function(Y){G.setUpdatedValue(Y.target.value,Y)},G.handleKeyDown=function(Y){var z=P(Y.target.value);if(!isNaN(z)&&O(Y.keyCode)){var se=G.getArrowOffset(),le=Y.keyCode===v?z+se:z-se;G.setUpdatedValue(le,Y)}},G.handleDrag=function(Y){if(G.props.dragLabel){var z=Math.round(G.props.value+Y.movementX);z>=0&&z<=G.props.dragMax&&G.props.onChange&&G.props.onChange(G.getValueObjectWithLabel(z),Y)}},G.handleMouseDown=function(Y){G.props.dragLabel&&(Y.preventDefault(),G.handleDrag(Y),window.addEventListener("mousemove",G.handleDrag),window.addEventListener("mouseup",G.handleMouseUp))},G.handleMouseUp=function(){G.unbindEventListeners()},G.unbindEventListeners=function(){window.removeEventListener("mousemove",G.handleDrag),window.removeEventListener("mouseup",G.handleMouseUp)},G.state={value:String(H.value).toUpperCase(),blurValue:String(H.value).toUpperCase()},G.inputId="rc-editable-input-"+F++,G}return n(V,[{key:"componentDidUpdate",value:function(G,Y){this.props.value!==this.state.value&&(G.value!==this.props.value||Y.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(G){return s({},this.props.label,G)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||m}},{key:"setUpdatedValue",value:function(G,Y){var z=this.props.label?this.getValueObjectWithLabel(G):G;this.props.onChange&&this.props.onChange(z,Y),this.setState({value:G})}},{key:"render",value:function(){var G=this,Y=(0,r.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return t.default.createElement("div",{style:Y.wrap},t.default.createElement("input",{id:this.inputId,style:Y.input,ref:function(se){return G.input=se},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?t.default.createElement("label",{htmlFor:this.inputId,style:Y.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),V})(e.PureComponent||e.Component);return $C.default=j,$C}var VC={},P5={},V$;function $9e(){return V$||(V$=1,Object.defineProperty(P5,"__esModule",{value:!0}),P5.calculateChange=function(e,t,i,r){var o=r.clientWidth,s=r.clientHeight,a=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,c=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,A=a-(r.getBoundingClientRect().left+window.pageXOffset),m=c-(r.getBoundingClientRect().top+window.pageYOffset);if(t==="vertical"){var v=void 0;if(m<0)v=359;else if(m>s)v=0;else{var x=-(m*100/s)+100;v=360*x/100}if(i.h!==v)return{h:v,s:i.s,l:i.l,a:i.a,source:"hsl"}}else{var _=void 0;if(A<0)_=0;else if(A>o)_=359;else{var O=A*100/o;_=360*O/100}if(i.h!==_)return{h:_,s:i.s,l:i.l,a:i.a,source:"hsl"}}return null}),P5}var H$;function V9e(){if(H$)return VC;H$=1,Object.defineProperty(VC,"__esModule",{value:!0}),VC.Hue=void 0;var n=(function(){function _(O,P){for(var F=0;F<P.length;F++){var j=P[F];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(O,j.key,j)}}return function(O,P,F){return P&&_(O.prototype,P),F&&_(O,F),O}})(),e=La(),t=c(e),i=xm(),r=c(i),o=$9e(),s=a(o);function a(_){if(_&&_.__esModule)return _;var O={};if(_!=null)for(var P in _)Object.prototype.hasOwnProperty.call(_,P)&&(O[P]=_[P]);return O.default=_,O}function c(_){return _&&_.__esModule?_:{default:_}}function A(_,O){if(!(_ instanceof O))throw new TypeError("Cannot call a class as a function")}function m(_,O){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:_}function v(_,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);_.prototype=Object.create(O&&O.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(_,O):_.__proto__=O)}var x=VC.Hue=(function(_){v(O,_);function O(){var P,F,j,Q;A(this,O);for(var V=arguments.length,H=Array(V),G=0;G<V;G++)H[G]=arguments[G];return Q=(F=(j=m(this,(P=O.__proto__||Object.getPrototypeOf(O)).call.apply(P,[this].concat(H))),j),j.handleChange=function(Y){var z=s.calculateChange(Y,j.props.direction,j.props.hsl,j.container);z&&typeof j.props.onChange=="function"&&j.props.onChange(z,Y)},j.handleMouseDown=function(Y){j.handleChange(Y),window.addEventListener("mousemove",j.handleChange),window.addEventListener("mouseup",j.handleMouseUp)},j.handleMouseUp=function(){j.unbindEventListeners()},F),m(j,Q)}return n(O,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var F=this,j=this.props.direction,Q=j===void 0?"horizontal":j,V=(0,r.default)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:Q==="vertical"});return t.default.createElement("div",{style:V.hue},t.default.createElement("div",{className:"hue-"+Q,style:V.container,ref:function(G){return F.container=G},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},t.default.createElement("style",null,`
.hue-horizontal {
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}
.hue-vertical {
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}
`),t.default.createElement("div",{style:V.pointer},this.props.pointer?t.default.createElement(this.props.pointer,this.props):t.default.createElement("div",{style:V.slider}))))}}]),O})(e.PureComponent||e.Component);return VC.default=x,VC}var HC={},Z$;function H9e(){if(Z$)return HC;Z$=1,Object.defineProperty(HC,"__esModule",{value:!0}),HC.Raised=void 0;var n=La(),e=c(n),t=s1(),i=c(t),r=xm(),o=c(r),s=Rse(),a=c(s);function c(m){return m&&m.__esModule?m:{default:m}}var A=HC.Raised=function(v){var x=v.zDepth,_=v.radius,O=v.background,P=v.children,F=v.styles,j=F===void 0?{}:F,Q=(0,o.default)((0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+x+"px "+x*4+"px rgba(0,0,0,.24)",borderRadius:_,background:O}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},j),{"zDepth-1":x===1});return e.default.createElement("div",{style:Q.wrap},e.default.createElement("div",{style:Q.bg}),e.default.createElement("div",{style:Q.content},P))};return A.propTypes={background:i.default.string,zDepth:i.default.oneOf([0,1,2,3,4,5]),radius:i.default.number,styles:i.default.object},A.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}},HC.default=A,HC}var ZC={},Kk,X$;function Z9e(){if(X$)return Kk;X$=1;var n=_m(),e=function(){return n.Date.now()};return Kk=e,Kk}var Lk,J$;function X9e(){if(J$)return Lk;J$=1;var n=/\s/;function e(t){for(var i=t.length;i--&&n.test(t.charAt(i)););return i}return Lk=e,Lk}var Fk,eV;function J9e(){if(eV)return Fk;eV=1;var n=X9e(),e=/^\s+/;function t(i){return i&&i.slice(0,n(i)+1).replace(e,"")}return Fk=t,Fk}var zk,tV;function eRe(){if(tV)return zk;tV=1;var n=J9e(),e=ap(),t=P6(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt;function c(A){if(typeof A=="number")return A;if(t(A))return i;if(e(A)){var m=typeof A.valueOf=="function"?A.valueOf():A;A=e(m)?m+"":m}if(typeof A!="string")return A===0?A:+A;A=n(A);var v=o.test(A);return v||s.test(A)?a(A.slice(2),v?2:8):r.test(A)?i:+A}return zk=c,zk}var jk,nV;function Dse(){if(nV)return jk;nV=1;var n=ap(),e=Z9e(),t=eRe(),i="Expected a function",r=Math.max,o=Math.min;function s(a,c,A){var m,v,x,_,O,P,F=0,j=!1,Q=!1,V=!0;if(typeof a!="function")throw new TypeError(i);c=t(c)||0,n(A)&&(j=!!A.leading,Q="maxWait"in A,x=Q?r(t(A.maxWait)||0,c):x,V="trailing"in A?!!A.trailing:V);function H(we){var ke=m,je=v;return m=v=void 0,F=we,_=a.apply(je,ke),_}function G(we){return F=we,O=setTimeout(se,c),j?H(we):_}function Y(we){var ke=we-P,je=we-F,Ie=c-ke;return Q?o(Ie,x-je):Ie}function z(we){var ke=we-P,je=we-F;return P===void 0||ke>=c||ke<0||Q&&je>=x}function se(){var we=e();if(z(we))return le(we);O=setTimeout(se,Y(we))}function le(we){return O=void 0,V&&m?H(we):(m=v=void 0,_)}function me(){O!==void 0&&clearTimeout(O),F=0,m=P=v=O=void 0}function fe(){return O===void 0?_:le(e())}function _e(){var we=e(),ke=z(we);if(m=arguments,v=this,P=we,ke){if(O===void 0)return G(P);if(Q)return clearTimeout(O),O=setTimeout(se,c),H(P)}return O===void 0&&(O=setTimeout(se,c)),_}return _e.cancel=me,_e.flush=fe,_e}return jk=s,jk}var Nk,iV;function tRe(){if(iV)return Nk;iV=1;var n=Dse(),e=ap(),t="Expected a function";function i(r,o,s){var a=!0,c=!0;if(typeof r!="function")throw new TypeError(t);return e(s)&&(a="leading"in s?!!s.leading:a,c="trailing"in s?!!s.trailing:c),n(r,o,{leading:a,maxWait:o,trailing:c})}return Nk=i,Nk}var U5={},rV;function nRe(){return rV||(rV=1,Object.defineProperty(U5,"__esModule",{value:!0}),U5.calculateChange=function(e,t,i){var r=i.getBoundingClientRect(),o=r.width,s=r.height,a=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,c=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,A=a-(i.getBoundingClientRect().left+window.pageXOffset),m=c-(i.getBoundingClientRect().top+window.pageYOffset);A<0?A=0:A>o&&(A=o),m<0?m=0:m>s&&(m=s);var v=A/o,x=1-m/s;return{h:t.h,s:v,v:x,a:t.a,source:"hsv"}}),U5}var oV;function iRe(){if(oV)return ZC;oV=1,Object.defineProperty(ZC,"__esModule",{value:!0}),ZC.Saturation=void 0;var n=(function(){function P(F,j){for(var Q=0;Q<j.length;Q++){var V=j[Q];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(F,V.key,V)}}return function(F,j,Q){return j&&P(F.prototype,j),Q&&P(F,Q),F}})(),e=La(),t=m(e),i=xm(),r=m(i),o=tRe(),s=m(o),a=nRe(),c=A(a);function A(P){if(P&&P.__esModule)return P;var F={};if(P!=null)for(var j in P)Object.prototype.hasOwnProperty.call(P,j)&&(F[j]=P[j]);return F.default=P,F}function m(P){return P&&P.__esModule?P:{default:P}}function v(P,F){if(!(P instanceof F))throw new TypeError("Cannot call a class as a function")}function x(P,F){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F&&(typeof F=="object"||typeof F=="function")?F:P}function _(P,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof F);P.prototype=Object.create(F&&F.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),F&&(Object.setPrototypeOf?Object.setPrototypeOf(P,F):P.__proto__=F)}var O=ZC.Saturation=(function(P){_(F,P);function F(j){v(this,F);var Q=x(this,(F.__proto__||Object.getPrototypeOf(F)).call(this,j));return Q.handleChange=function(V){typeof Q.props.onChange=="function"&&Q.throttle(Q.props.onChange,c.calculateChange(V,Q.props.hsl,Q.container),V)},Q.handleMouseDown=function(V){Q.handleChange(V);var H=Q.getContainerRenderWindow();H.addEventListener("mousemove",Q.handleChange),H.addEventListener("mouseup",Q.handleMouseUp)},Q.handleMouseUp=function(){Q.unbindEventListeners()},Q.throttle=(0,s.default)(function(V,H,G){V(H,G)},50),Q}return n(F,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var Q=this.container,V=window;!V.document.contains(Q)&&V.parent!==V;)V=V.parent;return V}},{key:"unbindEventListeners",value:function(){var Q=this.getContainerRenderWindow();Q.removeEventListener("mousemove",this.handleChange),Q.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var Q=this,V=this.props.style||{},H=V.color,G=V.white,Y=V.black,z=V.pointer,se=V.circle,le=(0,r.default)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:H,white:G,black:Y,pointer:z,circle:se}},{custom:!!this.props.style});return t.default.createElement("div",{style:le.color,ref:function(fe){return Q.container=fe},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},t.default.createElement("style",null,`
.saturation-white {
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
}
.saturation-black {
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
background: linear-gradient(to top, #000, rgba(0,0,0,0));
}
`),t.default.createElement("div",{style:le.white,className:"saturation-white"},t.default.createElement("div",{style:le.black,className:"saturation-black"}),t.default.createElement("div",{style:le.pointer},this.props.pointer?t.default.createElement(this.props.pointer,this.props):t.default.createElement("div",{style:le.circle}))))}}]),F})(e.PureComponent||e.Component);return ZC.default=O,ZC}var XC={},ih={},Gk,sV;function rRe(){if(sV)return Gk;sV=1;var n=xse(),e=_se(),t=ase(),i=uf();function r(o,s){var a=i(o)?n:e;return a(o,t(s))}return Gk=r,Gk}var Wk,aV;function oRe(){return aV||(aV=1,Wk=rRe()),Wk}var pw={exports:{}},sRe=pw.exports,lV;function aRe(){return lV||(lV=1,(function(n,e){(function(t,i){n.exports=i()})(sRe,(function(){function t(Pe){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Te){return typeof Te}:function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te},t(Pe)}var i=/^\s+/,r=/\s+$/;function o(Pe,Te){if(Pe=Pe||"",Te=Te||{},Pe instanceof o)return Pe;if(!(this instanceof o))return new o(Pe,Te);var Se=s(Pe);this._originalInput=Pe,this._r=Se.r,this._g=Se.g,this._b=Se.b,this._a=Se.a,this._roundA=Math.round(100*this._a)/100,this._format=Te.format||Se.format,this._gradientType=Te.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=Se.ok}o.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Te=this.toRgb();return(Te.r*299+Te.g*587+Te.b*114)/1e3},getLuminance:function(){var Te=this.toRgb(),Se,Ne,ut,rt,mt,Rt;return Se=Te.r/255,Ne=Te.g/255,ut=Te.b/255,Se<=.03928?rt=Se/12.92:rt=Math.pow((Se+.055)/1.055,2.4),Ne<=.03928?mt=Ne/12.92:mt=Math.pow((Ne+.055)/1.055,2.4),ut<=.03928?Rt=ut/12.92:Rt=Math.pow((ut+.055)/1.055,2.4),.2126*rt+.7152*mt+.0722*Rt},setAlpha:function(Te){return this._a=ke(Te),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var Te=m(this._r,this._g,this._b);return{h:Te.h*360,s:Te.s,v:Te.v,a:this._a}},toHsvString:function(){var Te=m(this._r,this._g,this._b),Se=Math.round(Te.h*360),Ne=Math.round(Te.s*100),ut=Math.round(Te.v*100);return this._a==1?"hsv("+Se+", "+Ne+"%, "+ut+"%)":"hsva("+Se+", "+Ne+"%, "+ut+"%, "+this._roundA+")"},toHsl:function(){var Te=c(this._r,this._g,this._b);return{h:Te.h*360,s:Te.s,l:Te.l,a:this._a}},toHslString:function(){var Te=c(this._r,this._g,this._b),Se=Math.round(Te.h*360),Ne=Math.round(Te.s*100),ut=Math.round(Te.l*100);return this._a==1?"hsl("+Se+", "+Ne+"%, "+ut+"%)":"hsla("+Se+", "+Ne+"%, "+ut+"%, "+this._roundA+")"},toHex:function(Te){return x(this._r,this._g,this._b,Te)},toHexString:function(Te){return"#"+this.toHex(Te)},toHex8:function(Te){return _(this._r,this._g,this._b,this._a,Te)},toHex8String:function(Te){return"#"+this.toHex8(Te)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(je(this._r,255)*100)+"%",g:Math.round(je(this._g,255)*100)+"%",b:Math.round(je(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(je(this._r,255)*100)+"%, "+Math.round(je(this._g,255)*100)+"%, "+Math.round(je(this._b,255)*100)+"%)":"rgba("+Math.round(je(this._r,255)*100)+"%, "+Math.round(je(this._g,255)*100)+"%, "+Math.round(je(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:_e[x(this._r,this._g,this._b,!0)]||!1},toFilter:function(Te){var Se="#"+O(this._r,this._g,this._b,this._a),Ne=Se,ut=this._gradientType?"GradientType = 1, ":"";if(Te){var rt=o(Te);Ne="#"+O(rt._r,rt._g,rt._b,rt._a)}return"progid:DXImageTransform.Microsoft.gradient("+ut+"startColorstr="+Se+",endColorstr="+Ne+")"},toString:function(Te){var Se=!!Te;Te=Te||this._format;var Ne=!1,ut=this._a<1&&this._a>=0,rt=!Se&&ut&&(Te==="hex"||Te==="hex6"||Te==="hex3"||Te==="hex4"||Te==="hex8"||Te==="name");return rt?Te==="name"&&this._a===0?this.toName():this.toRgbString():(Te==="rgb"&&(Ne=this.toRgbString()),Te==="prgb"&&(Ne=this.toPercentageRgbString()),(Te==="hex"||Te==="hex6")&&(Ne=this.toHexString()),Te==="hex3"&&(Ne=this.toHexString(!0)),Te==="hex4"&&(Ne=this.toHex8String(!0)),Te==="hex8"&&(Ne=this.toHex8String()),Te==="name"&&(Ne=this.toName()),Te==="hsl"&&(Ne=this.toHslString()),Te==="hsv"&&(Ne=this.toHsvString()),Ne||this.toHexString())},clone:function(){return o(this.toString())},_applyModification:function(Te,Se){var Ne=Te.apply(null,[this].concat([].slice.call(Se)));return this._r=Ne._r,this._g=Ne._g,this._b=Ne._b,this.setAlpha(Ne._a),this},lighten:function(){return this._applyModification(Q,arguments)},brighten:function(){return this._applyModification(V,arguments)},darken:function(){return this._applyModification(H,arguments)},desaturate:function(){return this._applyModification(P,arguments)},saturate:function(){return this._applyModification(F,arguments)},greyscale:function(){return this._applyModification(j,arguments)},spin:function(){return this._applyModification(G,arguments)},_applyCombination:function(Te,Se){return Te.apply(null,[this].concat([].slice.call(Se)))},analogous:function(){return this._applyCombination(le,arguments)},complement:function(){return this._applyCombination(Y,arguments)},monochromatic:function(){return this._applyCombination(me,arguments)},splitcomplement:function(){return this._applyCombination(se,arguments)},triad:function(){return this._applyCombination(z,[3])},tetrad:function(){return this._applyCombination(z,[4])}},o.fromRatio=function(Pe,Te){if(t(Pe)=="object"){var Se={};for(var Ne in Pe)Pe.hasOwnProperty(Ne)&&(Ne==="a"?Se[Ne]=Pe[Ne]:Se[Ne]=Le(Pe[Ne]));Pe=Se}return o(Pe,Te)};function s(Pe){var Te={r:0,g:0,b:0},Se=1,Ne=null,ut=null,rt=null,mt=!1,Rt=!1;return typeof Pe=="string"&&(Pe=vt(Pe)),t(Pe)=="object"&&(it(Pe.r)&&it(Pe.g)&&it(Pe.b)?(Te=a(Pe.r,Pe.g,Pe.b),mt=!0,Rt=String(Pe.r).substr(-1)==="%"?"prgb":"rgb"):it(Pe.h)&&it(Pe.s)&&it(Pe.v)?(Ne=Le(Pe.s),ut=Le(Pe.v),Te=v(Pe.h,Ne,ut),mt=!0,Rt="hsv"):it(Pe.h)&&it(Pe.s)&&it(Pe.l)&&(Ne=Le(Pe.s),rt=Le(Pe.l),Te=A(Pe.h,Ne,rt),mt=!0,Rt="hsl"),Pe.hasOwnProperty("a")&&(Se=Pe.a)),Se=ke(Se),{ok:mt,format:Pe.format||Rt,r:Math.min(255,Math.max(Te.r,0)),g:Math.min(255,Math.max(Te.g,0)),b:Math.min(255,Math.max(Te.b,0)),a:Se}}function a(Pe,Te,Se){return{r:je(Pe,255)*255,g:je(Te,255)*255,b:je(Se,255)*255}}function c(Pe,Te,Se){Pe=je(Pe,255),Te=je(Te,255),Se=je(Se,255);var Ne=Math.max(Pe,Te,Se),ut=Math.min(Pe,Te,Se),rt,mt,Rt=(Ne+ut)/2;if(Ne==ut)rt=mt=0;else{var Bt=Ne-ut;switch(mt=Rt>.5?Bt/(2-Ne-ut):Bt/(Ne+ut),Ne){case Pe:rt=(Te-Se)/Bt+(Te<Se?6:0);break;case Te:rt=(Se-Pe)/Bt+2;break;case Se:rt=(Pe-Te)/Bt+4;break}rt/=6}return{h:rt,s:mt,l:Rt}}function A(Pe,Te,Se){var Ne,ut,rt;Pe=je(Pe,360),Te=je(Te,100),Se=je(Se,100);function mt($t,Rn,zn){return zn<0&&(zn+=1),zn>1&&(zn-=1),zn<1/6?$t+(Rn-$t)*6*zn:zn<1/2?Rn:zn<2/3?$t+(Rn-$t)*(2/3-zn)*6:$t}if(Te===0)Ne=ut=rt=Se;else{var Rt=Se<.5?Se*(1+Te):Se+Te-Se*Te,Bt=2*Se-Rt;Ne=mt(Bt,Rt,Pe+1/3),ut=mt(Bt,Rt,Pe),rt=mt(Bt,Rt,Pe-1/3)}return{r:Ne*255,g:ut*255,b:rt*255}}function m(Pe,Te,Se){Pe=je(Pe,255),Te=je(Te,255),Se=je(Se,255);var Ne=Math.max(Pe,Te,Se),ut=Math.min(Pe,Te,Se),rt,mt,Rt=Ne,Bt=Ne-ut;if(mt=Ne===0?0:Bt/Ne,Ne==ut)rt=0;else{switch(Ne){case Pe:rt=(Te-Se)/Bt+(Te<Se?6:0);break;case Te:rt=(Se-Pe)/Bt+2;break;case Se:rt=(Pe-Te)/Bt+4;break}rt/=6}return{h:rt,s:mt,v:Rt}}function v(Pe,Te,Se){Pe=je(Pe,360)*6,Te=je(Te,100),Se=je(Se,100);var Ne=Math.floor(Pe),ut=Pe-Ne,rt=Se*(1-Te),mt=Se*(1-ut*Te),Rt=Se*(1-(1-ut)*Te),Bt=Ne%6,$t=[Se,mt,rt,rt,Rt,Se][Bt],Rn=[Rt,Se,Se,mt,rt,rt][Bt],zn=[rt,rt,Rt,Se,Se,mt][Bt];return{r:$t*255,g:Rn*255,b:zn*255}}function x(Pe,Te,Se,Ne){var ut=[ce(Math.round(Pe).toString(16)),ce(Math.round(Te).toString(16)),ce(Math.round(Se).toString(16))];return Ne&&ut[0].charAt(0)==ut[0].charAt(1)&&ut[1].charAt(0)==ut[1].charAt(1)&&ut[2].charAt(0)==ut[2].charAt(1)?ut[0].charAt(0)+ut[1].charAt(0)+ut[2].charAt(0):ut.join("")}function _(Pe,Te,Se,Ne,ut){var rt=[ce(Math.round(Pe).toString(16)),ce(Math.round(Te).toString(16)),ce(Math.round(Se).toString(16)),ce(We(Ne))];return ut&&rt[0].charAt(0)==rt[0].charAt(1)&&rt[1].charAt(0)==rt[1].charAt(1)&&rt[2].charAt(0)==rt[2].charAt(1)&&rt[3].charAt(0)==rt[3].charAt(1)?rt[0].charAt(0)+rt[1].charAt(0)+rt[2].charAt(0)+rt[3].charAt(0):rt.join("")}function O(Pe,Te,Se,Ne){var ut=[ce(We(Ne)),ce(Math.round(Pe).toString(16)),ce(Math.round(Te).toString(16)),ce(Math.round(Se).toString(16))];return ut.join("")}o.equals=function(Pe,Te){return!Pe||!Te?!1:o(Pe).toRgbString()==o(Te).toRgbString()},o.random=function(){return o.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function P(Pe,Te){Te=Te===0?0:Te||10;var Se=o(Pe).toHsl();return Se.s-=Te/100,Se.s=Ie(Se.s),o(Se)}function F(Pe,Te){Te=Te===0?0:Te||10;var Se=o(Pe).toHsl();return Se.s+=Te/100,Se.s=Ie(Se.s),o(Se)}function j(Pe){return o(Pe).desaturate(100)}function Q(Pe,Te){Te=Te===0?0:Te||10;var Se=o(Pe).toHsl();return Se.l+=Te/100,Se.l=Ie(Se.l),o(Se)}function V(Pe,Te){Te=Te===0?0:Te||10;var Se=o(Pe).toRgb();return Se.r=Math.max(0,Math.min(255,Se.r-Math.round(255*-(Te/100)))),Se.g=Math.max(0,Math.min(255,Se.g-Math.round(255*-(Te/100)))),Se.b=Math.max(0,Math.min(255,Se.b-Math.round(255*-(Te/100)))),o(Se)}function H(Pe,Te){Te=Te===0?0:Te||10;var Se=o(Pe).toHsl();return Se.l-=Te/100,Se.l=Ie(Se.l),o(Se)}function G(Pe,Te){var Se=o(Pe).toHsl(),Ne=(Se.h+Te)%360;return Se.h=Ne<0?360+Ne:Ne,o(Se)}function Y(Pe){var Te=o(Pe).toHsl();return Te.h=(Te.h+180)%360,o(Te)}function z(Pe,Te){if(isNaN(Te)||Te<=0)throw new Error("Argument to polyad must be a positive number");for(var Se=o(Pe).toHsl(),Ne=[o(Pe)],ut=360/Te,rt=1;rt<Te;rt++)Ne.push(o({h:(Se.h+rt*ut)%360,s:Se.s,l:Se.l}));return Ne}function se(Pe){var Te=o(Pe).toHsl(),Se=Te.h;return[o(Pe),o({h:(Se+72)%360,s:Te.s,l:Te.l}),o({h:(Se+216)%360,s:Te.s,l:Te.l})]}function le(Pe,Te,Se){Te=Te||6,Se=Se||30;var Ne=o(Pe).toHsl(),ut=360/Se,rt=[o(Pe)];for(Ne.h=(Ne.h-(ut*Te>>1)+720)%360;--Te;)Ne.h=(Ne.h+ut)%360,rt.push(o(Ne));return rt}function me(Pe,Te){Te=Te||6;for(var Se=o(Pe).toHsv(),Ne=Se.h,ut=Se.s,rt=Se.v,mt=[],Rt=1/Te;Te--;)mt.push(o({h:Ne,s:ut,v:rt})),rt=(rt+Rt)%1;return mt}o.mix=function(Pe,Te,Se){Se=Se===0?0:Se||50;var Ne=o(Pe).toRgb(),ut=o(Te).toRgb(),rt=Se/100,mt={r:(ut.r-Ne.r)*rt+Ne.r,g:(ut.g-Ne.g)*rt+Ne.g,b:(ut.b-Ne.b)*rt+Ne.b,a:(ut.a-Ne.a)*rt+Ne.a};return o(mt)},o.readability=function(Pe,Te){var Se=o(Pe),Ne=o(Te);return(Math.max(Se.getLuminance(),Ne.getLuminance())+.05)/(Math.min(Se.getLuminance(),Ne.getLuminance())+.05)},o.isReadable=function(Pe,Te,Se){var Ne=o.readability(Pe,Te),ut,rt;switch(rt=!1,ut=Ut(Se),ut.level+ut.size){case"AAsmall":case"AAAlarge":rt=Ne>=4.5;break;case"AAlarge":rt=Ne>=3;break;case"AAAsmall":rt=Ne>=7;break}return rt},o.mostReadable=function(Pe,Te,Se){var Ne=null,ut=0,rt,mt,Rt,Bt;Se=Se||{},mt=Se.includeFallbackColors,Rt=Se.level,Bt=Se.size;for(var $t=0;$t<Te.length;$t++)rt=o.readability(Pe,Te[$t]),rt>ut&&(ut=rt,Ne=o(Te[$t]));return o.isReadable(Pe,Ne,{level:Rt,size:Bt})||!mt?Ne:(Se.includeFallbackColors=!1,o.mostReadable(Pe,["#fff","#000"],Se))};var fe=o.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},_e=o.hexNames=we(fe);function we(Pe){var Te={};for(var Se in Pe)Pe.hasOwnProperty(Se)&&(Te[Pe[Se]]=Se);return Te}function ke(Pe){return Pe=parseFloat(Pe),(isNaN(Pe)||Pe<0||Pe>1)&&(Pe=1),Pe}function je(Pe,Te){tt(Pe)&&(Pe="100%");var Se=ht(Pe);return Pe=Math.min(Te,Math.max(0,parseFloat(Pe))),Se&&(Pe=parseInt(Pe*Te,10)/100),Math.abs(Pe-Te)<1e-6?1:Pe%Te/parseFloat(Te)}function Ie(Pe){return Math.min(1,Math.max(0,Pe))}function Qe(Pe){return parseInt(Pe,16)}function tt(Pe){return typeof Pe=="string"&&Pe.indexOf(".")!=-1&&parseFloat(Pe)===1}function ht(Pe){return typeof Pe=="string"&&Pe.indexOf("%")!=-1}function ce(Pe){return Pe.length==1?"0"+Pe:""+Pe}function Le(Pe){return Pe<=1&&(Pe=Pe*100+"%"),Pe}function We(Pe){return Math.round(parseFloat(Pe)*255).toString(16)}function Me(Pe){return Qe(Pe)/255}var dt=(function(){var Pe="[-\\+]?\\d+%?",Te="[-\\+]?\\d*\\.\\d+%?",Se="(?:"+Te+")|(?:"+Pe+")",Ne="[\\s|\\(]+("+Se+")[,|\\s]+("+Se+")[,|\\s]+("+Se+")\\s*\\)?",ut="[\\s|\\(]+("+Se+")[,|\\s]+("+Se+")[,|\\s]+("+Se+")[,|\\s]+("+Se+")\\s*\\)?";return{CSS_UNIT:new RegExp(Se),rgb:new RegExp("rgb"+Ne),rgba:new RegExp("rgba"+ut),hsl:new RegExp("hsl"+Ne),hsla:new RegExp("hsla"+ut),hsv:new RegExp("hsv"+Ne),hsva:new RegExp("hsva"+ut),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function it(Pe){return!!dt.CSS_UNIT.exec(Pe)}function vt(Pe){Pe=Pe.replace(i,"").replace(r,"").toLowerCase();var Te=!1;if(fe[Pe])Pe=fe[Pe],Te=!0;else if(Pe=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Se;return(Se=dt.rgb.exec(Pe))?{r:Se[1],g:Se[2],b:Se[3]}:(Se=dt.rgba.exec(Pe))?{r:Se[1],g:Se[2],b:Se[3],a:Se[4]}:(Se=dt.hsl.exec(Pe))?{h:Se[1],s:Se[2],l:Se[3]}:(Se=dt.hsla.exec(Pe))?{h:Se[1],s:Se[2],l:Se[3],a:Se[4]}:(Se=dt.hsv.exec(Pe))?{h:Se[1],s:Se[2],v:Se[3]}:(Se=dt.hsva.exec(Pe))?{h:Se[1],s:Se[2],v:Se[3],a:Se[4]}:(Se=dt.hex8.exec(Pe))?{r:Qe(Se[1]),g:Qe(Se[2]),b:Qe(Se[3]),a:Me(Se[4]),format:Te?"name":"hex8"}:(Se=dt.hex6.exec(Pe))?{r:Qe(Se[1]),g:Qe(Se[2]),b:Qe(Se[3]),format:Te?"name":"hex"}:(Se=dt.hex4.exec(Pe))?{r:Qe(Se[1]+""+Se[1]),g:Qe(Se[2]+""+Se[2]),b:Qe(Se[3]+""+Se[3]),a:Me(Se[4]+""+Se[4]),format:Te?"name":"hex8"}:(Se=dt.hex3.exec(Pe))?{r:Qe(Se[1]+""+Se[1]),g:Qe(Se[2]+""+Se[2]),b:Qe(Se[3]+""+Se[3]),format:Te?"name":"hex"}:!1}function Ut(Pe){var Te,Se;return Pe=Pe||{level:"AA",size:"small"},Te=(Pe.level||"AA").toUpperCase(),Se=(Pe.size||"small").toLowerCase(),Te!=="AA"&&Te!=="AAA"&&(Te="AA"),Se!=="small"&&Se!=="large"&&(Se="small"),{level:Te,size:Se}}return o}))})(pw)),pw.exports}var uV;function Pse(){if(uV)return ih;uV=1,Object.defineProperty(ih,"__esModule",{value:!0}),ih.isvalidColorString=ih.red=ih.getContrastingColor=ih.isValidHex=ih.toState=ih.simpleCheckForValidColor=void 0;var n=oRe(),e=r(n),t=aRe(),i=r(t);function r(s){return s&&s.__esModule?s:{default:s}}ih.simpleCheckForValidColor=function(a){var c=["r","g","b","a","h","s","l","v"],A=0,m=0;return(0,e.default)(c,function(v){if(a[v]&&(A+=1,isNaN(a[v])||(m+=1),v==="s"||v==="l")){var x=/^\d+%$/;x.test(a[v])&&(m+=1)}}),A===m?a:!1};var o=ih.toState=function(a,c){var A=a.hex?(0,i.default)(a.hex):(0,i.default)(a),m=A.toHsl(),v=A.toHsv(),x=A.toRgb(),_=A.toHex();m.s===0&&(m.h=c||0,v.h=c||0);var O=_==="000000"&&x.a===0;return{hsl:m,hex:O?"transparent":"#"+_,rgb:x,hsv:v,oldHue:a.h||c||m.h,source:a.source}};return ih.isValidHex=function(a){if(a==="transparent")return!0;var c=String(a).charAt(0)==="#"?1:0;return a.length!==4+c&&a.length<7+c&&(0,i.default)(a).isValid()},ih.getContrastingColor=function(a){if(!a)return"#fff";var c=o(a);if(c.hex==="transparent")return"rgba(0,0,0,0.4)";var A=(c.rgb.r*299+c.rgb.g*587+c.rgb.b*114)/1e3;return A>=128?"#000":"#fff"},ih.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}},ih.isvalidColorString=function(a,c){var A=a.replace("°","");return(0,i.default)(c+" ("+A+")")._ok},ih}var cV;function lRe(){if(cV)return XC;cV=1,Object.defineProperty(XC,"__esModule",{value:!0}),XC.ColorWrap=void 0;var n=Object.assign||function(O){for(var P=1;P<arguments.length;P++){var F=arguments[P];for(var j in F)Object.prototype.hasOwnProperty.call(F,j)&&(O[j]=F[j])}return O},e=(function(){function O(P,F){for(var j=0;j<F.length;j++){var Q=F[j];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(P,Q.key,Q)}}return function(P,F,j){return F&&O(P.prototype,F),j&&O(P,j),P}})(),t=La(),i=A(t),r=Dse(),o=A(r),s=Pse(),a=c(s);function c(O){if(O&&O.__esModule)return O;var P={};if(O!=null)for(var F in O)Object.prototype.hasOwnProperty.call(O,F)&&(P[F]=O[F]);return P.default=O,P}function A(O){return O&&O.__esModule?O:{default:O}}function m(O,P){if(!(O instanceof P))throw new TypeError("Cannot call a class as a function")}function v(O,P){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:O}function x(O,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);O.prototype=Object.create(P&&P.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(O,P):O.__proto__=P)}var _=XC.ColorWrap=function(P){var F=(function(j){x(Q,j);function Q(V){m(this,Q);var H=v(this,(Q.__proto__||Object.getPrototypeOf(Q)).call(this));return H.handleChange=function(G,Y){var z=a.simpleCheckForValidColor(G);if(z){var se=a.toState(G,G.h||H.state.oldHue);H.setState(se),H.props.onChangeComplete&&H.debounce(H.props.onChangeComplete,se,Y),H.props.onChange&&H.props.onChange(se,Y)}},H.handleSwatchHover=function(G,Y){var z=a.simpleCheckForValidColor(G);if(z){var se=a.toState(G,G.h||H.state.oldHue);H.props.onSwatchHover&&H.props.onSwatchHover(se,Y)}},H.state=n({},a.toState(V.color,0)),H.debounce=(0,o.default)(function(G,Y,z){G(Y,z)},100),H}return e(Q,[{key:"render",value:function(){var H={};return this.props.onSwatchHover&&(H.onSwatchHover=this.handleSwatchHover),i.default.createElement(P,n({},this.props,this.state,{onChange:this.handleChange},H))}}],[{key:"getDerivedStateFromProps",value:function(H,G){return n({},a.toState(H.color,G.oldHue))}}]),Q})(t.PureComponent||t.Component);return F.propTypes=n({},P.propTypes),F.defaultProps=n({},P.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),F};return XC.default=_,XC}var JC={},y2={},AV;function uRe(){if(AV)return y2;AV=1,Object.defineProperty(y2,"__esModule",{value:!0}),y2.handleFocus=void 0;var n=Object.assign||function(c){for(var A=1;A<arguments.length;A++){var m=arguments[A];for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(c[v]=m[v])}return c},e=(function(){function c(A,m){for(var v=0;v<m.length;v++){var x=m[v];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(A,x.key,x)}}return function(A,m,v){return m&&c(A.prototype,m),v&&c(A,v),A}})(),t=La(),i=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function o(c,A){if(!(c instanceof A))throw new TypeError("Cannot call a class as a function")}function s(c,A){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:c}function a(c,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);c.prototype=Object.create(A&&A.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(c,A):c.__proto__=A)}return y2.handleFocus=function(A){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return(function(v){a(x,v);function x(){var _,O,P,F;o(this,x);for(var j=arguments.length,Q=Array(j),V=0;V<j;V++)Q[V]=arguments[V];return F=(O=(P=s(this,(_=x.__proto__||Object.getPrototypeOf(x)).call.apply(_,[this].concat(Q))),P),P.state={focus:!1},P.handleFocus=function(){return P.setState({focus:!0})},P.handleBlur=function(){return P.setState({focus:!1})},O),s(P,F)}return e(x,[{key:"render",value:function(){return i.default.createElement(m,{onFocus:this.handleFocus,onBlur:this.handleBlur},i.default.createElement(A,n({},this.props,this.state)))}}]),x})(i.default.Component)},y2}var hV;function cRe(){if(hV)return JC;hV=1,Object.defineProperty(JC,"__esModule",{value:!0}),JC.Swatch=void 0;var n=Object.assign||function(v){for(var x=1;x<arguments.length;x++){var _=arguments[x];for(var O in _)Object.prototype.hasOwnProperty.call(_,O)&&(v[O]=_[O])}return v},e=La(),t=c(e),i=xm(),r=c(i),o=uRe(),s=fL(),a=c(s);function c(v){return v&&v.__esModule?v:{default:v}}var A=13,m=JC.Swatch=function(x){var _=x.color,O=x.style,P=x.onClick,F=P===void 0?function(){}:P,j=x.onHover,Q=x.title,V=Q===void 0?_:Q,H=x.children,G=x.focus,Y=x.focusStyle,z=Y===void 0?{}:Y,se=_==="transparent",le=(0,r.default)({default:{swatch:n({background:_,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},O,G?z:{})}}),me=function(je){return F(_,je)},fe=function(je){return je.keyCode===A&&F(_,je)},_e=function(je){return j(_,je)},we={};return j&&(we.onMouseOver=_e),t.default.createElement("div",n({style:le.swatch,onClick:me,title:V,tabIndex:0,onKeyDown:fe},we),H,se&&t.default.createElement(a.default,{borderRadius:le.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};return JC.default=(0,o.handleFocus)(m),JC}var dV;function Use(){return dV||(dV=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0});var e=q9e();Object.defineProperty(n,"Alpha",{enumerable:!0,get:function(){return A(e).default}});var t=fL();Object.defineProperty(n,"Checkboard",{enumerable:!0,get:function(){return A(t).default}});var i=Y9e();Object.defineProperty(n,"EditableInput",{enumerable:!0,get:function(){return A(i).default}});var r=V9e();Object.defineProperty(n,"Hue",{enumerable:!0,get:function(){return A(r).default}});var o=H9e();Object.defineProperty(n,"Raised",{enumerable:!0,get:function(){return A(o).default}});var s=iRe();Object.defineProperty(n,"Saturation",{enumerable:!0,get:function(){return A(s).default}});var a=lRe();Object.defineProperty(n,"ColorWrap",{enumerable:!0,get:function(){return A(a).default}});var c=cRe();Object.defineProperty(n,"Swatch",{enumerable:!0,get:function(){return A(c).default}});function A(m){return m&&m.__esModule?m:{default:m}}})(Uk)),Uk}var e_={},Qk,fV;function ARe(){if(fV)return Qk;fV=1;function n(e){return e===void 0}return Qk=n,Qk}var K5={},pV;function hRe(){if(pV)return K5;pV=1,Object.defineProperty(K5,"__esModule",{value:!0});var n=Object.assign||function(s){for(var a=1;a<arguments.length;a++){var c=arguments[a];for(var A in c)Object.prototype.hasOwnProperty.call(c,A)&&(s[A]=c[A])}return s},e=La(),t=i(e);function i(s){return s&&s.__esModule?s:{default:s}}function r(s,a){var c={};for(var A in s)a.indexOf(A)>=0||Object.prototype.hasOwnProperty.call(s,A)&&(c[A]=s[A]);return c}var o=24;return K5.default=function(s){var a=s.fill,c=a===void 0?"currentColor":a,A=s.width,m=A===void 0?o:A,v=s.height,x=v===void 0?o:v,_=s.style,O=_===void 0?{}:_,P=r(s,["fill","width","height","style"]);return t.default.createElement("svg",n({viewBox:"0 0 "+o+" "+o,style:n({fill:c,width:m,height:x},O)},P),t.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},K5}var mV;function dRe(){if(mV)return e_;mV=1,Object.defineProperty(e_,"__esModule",{value:!0}),e_.ChromeFields=void 0;var n=(function(){function Q(V,H){for(var G=0;G<H.length;G++){var Y=H[G];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(V,Y.key,Y)}}return function(V,H,G){return H&&Q(V.prototype,H),G&&Q(V,G),V}})(),e=La(),t=_(e),i=xm(),r=_(i),o=Pse(),s=x(o),a=ARe(),c=_(a),A=Use(),m=hRe(),v=_(m);function x(Q){if(Q&&Q.__esModule)return Q;var V={};if(Q!=null)for(var H in Q)Object.prototype.hasOwnProperty.call(Q,H)&&(V[H]=Q[H]);return V.default=Q,V}function _(Q){return Q&&Q.__esModule?Q:{default:Q}}function O(Q,V){if(!(Q instanceof V))throw new TypeError("Cannot call a class as a function")}function P(Q,V){if(!Q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V&&(typeof V=="object"||typeof V=="function")?V:Q}function F(Q,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof V);Q.prototype=Object.create(V&&V.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}}),V&&(Object.setPrototypeOf?Object.setPrototypeOf(Q,V):Q.__proto__=V)}var j=e_.ChromeFields=(function(Q){F(V,Q);function V(H){O(this,V);var G=P(this,(V.__proto__||Object.getPrototypeOf(V)).call(this));return G.toggleViews=function(){G.state.view==="hex"?G.setState({view:"rgb"}):G.state.view==="rgb"?G.setState({view:"hsl"}):G.state.view==="hsl"&&(G.props.hsl.a===1?G.setState({view:"hex"}):G.setState({view:"rgb"}))},G.handleChange=function(Y,z){Y.hex?s.isValidHex(Y.hex)&&G.props.onChange({hex:Y.hex,source:"hex"},z):Y.r||Y.g||Y.b?G.props.onChange({r:Y.r||G.props.rgb.r,g:Y.g||G.props.rgb.g,b:Y.b||G.props.rgb.b,source:"rgb"},z):Y.a?(Y.a<0?Y.a=0:Y.a>1&&(Y.a=1),G.props.onChange({h:G.props.hsl.h,s:G.props.hsl.s,l:G.props.hsl.l,a:Math.round(Y.a*100)/100,source:"rgb"},z)):(Y.h||Y.s||Y.l)&&(typeof Y.s=="string"&&Y.s.includes("%")&&(Y.s=Y.s.replace("%","")),typeof Y.l=="string"&&Y.l.includes("%")&&(Y.l=Y.l.replace("%","")),Y.s==1?Y.s=.01:Y.l==1&&(Y.l=.01),G.props.onChange({h:Y.h||G.props.hsl.h,s:Number((0,c.default)(Y.s)?G.props.hsl.s:Y.s),l:Number((0,c.default)(Y.l)?G.props.hsl.l:Y.l),source:"hsl"},z))},G.showHighlight=function(Y){Y.currentTarget.style.background="#eee"},G.hideHighlight=function(Y){Y.currentTarget.style.background="transparent"},H.hsl.a!==1&&H.view==="hex"?G.state={view:"rgb"}:G.state={view:H.view},G}return n(V,[{key:"render",value:function(){var G=this,Y=(0,r.default)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),z=void 0;return this.state.view==="hex"?z=t.default.createElement("div",{style:Y.fields,className:"flexbox-fix"},t.default.createElement("div",{style:Y.field},t.default.createElement(A.EditableInput,{style:{input:Y.input,label:Y.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?z=t.default.createElement("div",{style:Y.fields,className:"flexbox-fix"},t.default.createElement("div",{style:Y.field},t.default.createElement(A.EditableInput,{style:{input:Y.input,label:Y.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),t.default.createElement("div",{style:Y.field},t.default.createElement(A.EditableInput,{style:{input:Y.input,label:Y.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),t.default.createElement("div",{style:Y.field},t.default.createElement(A.EditableInput,{style:{input:Y.input,label:Y.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),t.default.createElement("div",{style:Y.alpha},t.default.createElement(A.EditableInput,{style:{input:Y.input,label:Y.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(z=t.default.createElement("div",{style:Y.fields,className:"flexbox-fix"},t.default.createElement("div",{style:Y.field},t.default.createElement(A.EditableInput,{style:{input:Y.input,label:Y.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),t.default.createElement("div",{style:Y.field},t.default.createElement(A.EditableInput,{style:{input:Y.input,label:Y.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),t.default.createElement("div",{style:Y.field},t.default.createElement(A.EditableInput,{style:{input:Y.input,label:Y.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),t.default.createElement("div",{style:Y.alpha},t.default.createElement(A.EditableInput,{style:{input:Y.input,label:Y.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),t.default.createElement("div",{style:Y.wrap,className:"flexbox-fix"},z,t.default.createElement("div",{style:Y.toggle},t.default.createElement("div",{style:Y.icon,onClick:this.toggleViews,ref:function(le){return G.icon=le}},t.default.createElement(v.default,{style:Y.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(G,Y){return G.hsl.a!==1&&Y.view==="hex"?{view:"rgb"}:null}}]),V})(t.default.Component);return j.defaultProps={view:"hex"},e_.default=j,e_}var t_={},gV;function fRe(){if(gV)return t_;gV=1,Object.defineProperty(t_,"__esModule",{value:!0}),t_.ChromePointer=void 0;var n=La(),e=r(n),t=xm(),i=r(t);function r(s){return s&&s.__esModule?s:{default:s}}var o=t_.ChromePointer=function(){var a=(0,i.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return e.default.createElement("div",{style:a.picker})};return t_.default=o,t_}var n_={},yV;function pRe(){if(yV)return n_;yV=1,Object.defineProperty(n_,"__esModule",{value:!0}),n_.ChromePointerCircle=void 0;var n=La(),e=r(n),t=xm(),i=r(t);function r(s){return s&&s.__esModule?s:{default:s}}var o=n_.ChromePointerCircle=function(){var a=(0,i.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return e.default.createElement("div",{style:a.picker})};return n_.default=o,n_}var vV;function mRe(){if(vV)return zC;vV=1,Object.defineProperty(zC,"__esModule",{value:!0}),zC.Chrome=void 0;var n=La(),e=P(n),t=s1(),i=P(t),r=xm(),o=P(r),s=Rse(),a=P(s),c=Use(),A=dRe(),m=P(A),v=fRe(),x=P(v),_=pRe(),O=P(_);function P(j){return j&&j.__esModule?j:{default:j}}var F=zC.Chrome=function(Q){var V=Q.width,H=Q.onChange,G=Q.disableAlpha,Y=Q.rgb,z=Q.hsl,se=Q.hsv,le=Q.hex,me=Q.renderers,fe=Q.styles,_e=fe===void 0?{}:fe,we=Q.className,ke=we===void 0?"":we,je=Q.defaultView,Ie=(0,o.default)((0,a.default)({default:{picker:{width:V,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+Y.r+", "+Y.g+", "+Y.b+", "+Y.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},_e),{disableAlpha:G});return e.default.createElement("div",{style:Ie.picker,className:"chrome-picker "+ke},e.default.createElement("div",{style:Ie.saturation},e.default.createElement(c.Saturation,{style:Ie.Saturation,hsl:z,hsv:se,pointer:O.default,onChange:H})),e.default.createElement("div",{style:Ie.body},e.default.createElement("div",{style:Ie.controls,className:"flexbox-fix"},e.default.createElement("div",{style:Ie.color},e.default.createElement("div",{style:Ie.swatch},e.default.createElement("div",{style:Ie.active}),e.default.createElement(c.Checkboard,{renderers:me}))),e.default.createElement("div",{style:Ie.toggles},e.default.createElement("div",{style:Ie.hue},e.default.createElement(c.Hue,{style:Ie.Hue,hsl:z,pointer:x.default,onChange:H})),e.default.createElement("div",{style:Ie.alpha},e.default.createElement(c.Alpha,{style:Ie.Alpha,rgb:Y,hsl:z,pointer:x.default,renderers:me,onChange:H})))),e.default.createElement(m.default,{rgb:Y,hsl:z,hex:le,view:je,onChange:H,disableAlpha:G})))};return F.propTypes={width:i.default.oneOfType([i.default.string,i.default.number]),disableAlpha:i.default.bool,styles:i.default.object,defaultView:i.default.oneOf(["hex","rgb","hsl"])},F.defaultProps={width:225,disableAlpha:!1,styles:{}},zC.default=(0,c.ColorWrap)(F),zC}var gRe=mRe();const yRe=Wl(gRe);function Cr(){var n="/home/runner/work/maputnik/maputnik/src/components/InputColor.tsx",e="04cff10f573f4461c1718b34a830d9c914f6fa95",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputColor.tsx",statementMap:{0:{start:{line:7,column:14},end:{line:7,column:23}},1:{start:{line:8,column:2},end:{line:8,column:56}},2:{start:{line:11,column:10},end:{line:13,column:3}},3:{start:{line:14,column:15},end:{line:14,column:19}},4:{start:{line:16,column:4},end:{line:16,column:17}},5:{start:{line:17,column:4},end:{line:17,column:75}},6:{start:{line:20,column:4},end:{line:20,column:27}},7:{start:{line:25,column:21},end:{line:39,column:3}},8:{start:{line:26,column:17},end:{line:26,column:32}},9:{start:{line:27,column:4},end:{line:38,column:5}},10:{start:{line:28,column:18},end:{line:28,column:46}},11:{start:{line:29,column:6},end:{line:32,column:8}},12:{start:{line:34,column:6},end:{line:37,column:8}},13:{start:{line:40,column:17},end:{line:42,column:3}},14:{start:{line:41,column:4},end:{line:41,column:62}},15:{start:{line:44,column:4},end:{line:49,column:5}},16:{start:{line:45,column:6},end:{line:45,column:43}},17:{start:{line:47,column:6},end:{line:47,column:49}},18:{start:{line:48,column:6},end:{line:48,column:39}},19:{start:{line:52,column:4},end:{line:52,column:47}},20:{start:{line:55,column:19},end:{line:55,column:42}},21:{start:{line:56,column:25},end:{line:56,column:44}},22:{start:{line:57,column:31},end:{line:63,column:5}},23:{start:{line:64,column:35},end:{line:99,column:5}},24:{start:{line:79,column:31},end:{line:79,column:67}},25:{start:{line:100,column:24},end:{line:102,column:5}},26:{start:{line:103,column:4},end:{line:124,column:9}},27:{start:{line:114,column:12},end:{line:114,column:36}},28:{start:{line:121,column:27},end:{line:121,column:56}}},fnMap:{0:{name:"formatColor",decl:{start:{line:6,column:9},end:{line:6,column:20}},loc:{start:{line:6,column:28},end:{line:9,column:1}},line:6},1:{name:"(anonymous_1)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:21},end:{line:18,column:3}},line:15},2:{name:"(anonymous_2)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:21},end:{line:21,column:3}},line:19},3:{name:"(anonymous_3)",decl:{start:{line:25,column:21},end:{line:25,column:22}},loc:{start:{line:25,column:27},end:{line:39,column:3}},line:25},4:{name:"(anonymous_4)",decl:{start:{line:40,column:17},end:{line:40,column:18}},loc:{start:{line:40,column:23},end:{line:42,column:3}},line:40},5:{name:"(anonymous_5)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:14},end:{line:50,column:3}},line:43},6:{name:"(anonymous_6)",decl:{start:{line:51,column:2},end:{line:51,column:3}},loc:{start:{line:51,column:14},end:{line:53,column:3}},line:51},7:{name:"(anonymous_7)",decl:{start:{line:54,column:2},end:{line:54,column:3}},loc:{start:{line:54,column:11},end:{line:125,column:3}},line:54},8:{name:"(anonymous_8)",decl:{start:{line:79,column:24},end:{line:79,column:25}},loc:{start:{line:79,column:31},end:{line:79,column:67}},line:79},9:{name:"(anonymous_9)",decl:{start:{line:113,column:15},end:{line:113,column:16}},loc:{start:{line:113,column:26},end:{line:115,column:11}},line:113},10:{name:"(anonymous_10)",decl:{start:{line:121,column:20},end:{line:121,column:21}},loc:{start:{line:121,column:27},end:{line:121,column:56}},line:121}},branchMap:{0:{loc:{start:{line:27,column:4},end:{line:38,column:5}},type:"if",locations:[{start:{line:27,column:4},end:{line:38,column:5}},{start:{line:33,column:11},end:{line:38,column:5}}],line:27},1:{loc:{start:{line:52,column:24},end:{line:52,column:45}},type:"cond-expr",locations:[{start:{line:52,column:35},end:{line:52,column:41}},{start:{line:52,column:44},end:{line:52,column:45}}],line:52},2:{loc:{start:{line:104,column:6},end:{line:104,column:39}},type:"binary-expr",locations:[{start:{line:104,column:6},end:{line:104,column:29}},{start:{line:104,column:33},end:{line:104,column:39}}],line:104},3:{loc:{start:{line:120,column:17},end:{line:120,column:57}},type:"cond-expr",locations:[{start:{line:120,column:36},end:{line:120,column:52}},{start:{line:120,column:55},end:{line:120,column:57}}],line:120}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputColor.tsx"],names:[],mappings:"AAsFmB,SAQb,KARa;AAtFnB,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,kBAAkB;AAEzB,OAAO,YAAY;AAEnB,SAAS,YAAY,OAA4B;AAC/C,QAAM,MAAM,MAAM;AAClB,SAAO,QAAQ,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC;AACpD;AAaA,qBAAqB,mBAAmB,MAAM,UAA2B;AAAA,EACvE,QAAQ;AAAA,IACN,cAAc;AAAA,EAChB;AAAA,EACA,aAAsC;AAAA,EAEtC,YAAa,OAAwB;AACnC,UAAM,KAAK;AACX,SAAK,kBAAkB,OAAO,SAAS,KAAK,iBAAiB,MAAK,EAAE;AAAA,EACtE;AAAA,EAEA,gBAAgB,GAAW;AACzB,SAAK,MAAM,SAAS,CAAC;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,mBAAmB,MAAM;AACvB,UAAM,OAAO,KAAK;AAClB,QAAG,MAAM;AACP,YAAM,MAAM,KAAK,sBAAsB;AACvC,aAAO;AAAA,QACL,KAAK,IAAI;AAAA,QACT,MAAM,IAAI,OAAO;AAAA,MACnB;AAAA,IACF,OAAO;AACL,aAAO;AAAA,QACL,KAAK;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAAA,EAEA,eAAe,MAAM;AACnB,SAAK,SAAS,EAAE,cAAc,CAAC,KAAK,MAAM,aAAa,CAAC;AAAA,EAC1D;AAAA,EAEA,IAAI,QAAQ;AAEV,QAAI;AACF,aAAO,MAAM,KAAK,MAAM,KAAK,EAAE,IAAI;AAAA,IACrC,SACM,KAAK;AACT,cAAQ,KAAK,yBAAyB,GAAG;AACzC,aAAO,MAAM,kBAAkB;AAAA,IACjC;AAAA,EACF;AAAA,EAEA,SAAU,GAAW;AACnB,SAAK,MAAM,SAAS,MAAM,KAAK,SAAY,CAAC;AAAA,EAC9C;AAAA,EAEA,SAAS;AACP,UAAM,SAAS,KAAK,iBAAiB;AACrC,UAAM,eAAe,KAAK,MAAM,OAAO;AACvC,UAAM,qBAAqB;AAAA,MACzB,GAAG,aAAa;AAAA,MAChB,GAAG,aAAa;AAAA,MAChB,GAAG,aAAa;AAAA;AAAA,MAEhB,GAAG,aAAa;AAAA,IAClB;AAEA,UAAM,SAAS;AAAA,MAAC;AAAA;AAAA,QACd,WAAU;AAAA,QACV,OAAO;AAAA,UACL,UAAU;AAAA,UACV,QAAQ;AAAA,UACR,MAAM,OAAO;AAAA,UACb,KAAK,OAAO;AAAA,QACd;AAAA,QACA;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO;AAAA,cACP,UAAU,OAAK,KAAK,gBAAgB,YAAY,CAAC,CAAC;AAAA;AAAA,UACpD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK;AAAA,cACd,OAAO;AAAA,gBACL,QAAQ;AAAA,gBACR,UAAU;AAAA,gBACV,KAAK;AAAA,gBACL,OAAO;AAAA,gBACP,QAAQ;AAAA,gBACR,MAAM;AAAA,cACR;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAEA,UAAM,cAAc;AAAA,MAClB,iBAAiB,KAAK,MAAM;AAAA,IAC9B;AAEA,WAAO,qBAAC,SAAI,WAAU,0BACnB;AAAA,WAAK,MAAM,gBAAgB;AAAA,MAC5B,oBAAC,SAAI,WAAU,yBAAwB,OAAO,aAAa;AAAA,MAC3D;AAAA,QAAC;AAAA;AAAA,UACC,cAAY,KAAK,MAAM,YAAY;AAAA,UACnC,YAAW;AAAA,UACX,cAAa;AAAA,UACb,WAAU;AAAA,UACV,KAAK,CAAC,UAAU;AAAC,iBAAK,aAAa;AAAA,UAAM;AAAA,UACzC,SAAS,KAAK;AAAA,UACd,OAAO,KAAK,MAAM;AAAA,UAClB,MAAM,KAAK,MAAM;AAAA,UACjB,aAAa,KAAK,MAAM;AAAA,UACxB,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,QAAQ;AAAA,UAC7C,UAAU,CAAC,MAAM,KAAK,SAAS,EAAE,OAAO,KAAK;AAAA;AAAA,MAC/C;AAAA,OACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"04cff10f573f4461c1718b34a830d9c914f6fa95"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Cr=function(){return s},s}Cr();function vRe(n){Cr().f[0]++;const e=(Cr().s[0]++,n.rgb);return Cr().s[1]++,`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`}class pL extends En.Component{state=(Cr().s[2]++,{pickerOpened:!1});colorInput=(Cr().s[3]++,null);constructor(e){Cr().f[1]++,Cr().s[4]++,super(e),Cr().s[5]++,this.onChangeNoCheck=qT.throttle(this.onChangeNoCheck,1e3/30)}onChangeNoCheck(e){Cr().f[2]++,Cr().s[6]++,this.props.onChange(e)}calcPickerOffset=(Cr().s[7]++,()=>{Cr().f[3]++;const e=(Cr().s[8]++,this.colorInput);if(Cr().s[9]++,e){Cr().b[0][0]++;const t=(Cr().s[10]++,e.getBoundingClientRect());return Cr().s[11]++,{top:t.top,left:t.left+196}}else return Cr().b[0][1]++,Cr().s[12]++,{top:160,left:555}});togglePicker=(Cr().s[13]++,()=>{Cr().f[4]++,Cr().s[14]++,this.setState({pickerOpened:!this.state.pickerOpened})});get color(){Cr().f[5]++,Cr().s[15]++;try{return Cr().s[16]++,Ru(this.props.value).rgb()}catch(e){return Cr().s[17]++,console.warn("Error parsing color: ",e),Cr().s[18]++,Ru("rgb(255,255,255)")}}onChange(e){Cr().f[6]++,Cr().s[19]++,this.props.onChange(e===""?(Cr().b[1][0]++,void 0):(Cr().b[1][1]++,e))}render(){Cr().f[7]++;const e=(Cr().s[20]++,this.calcPickerOffset()),t=(Cr().s[21]++,this.color.object()),i=(Cr().s[22]++,{r:t.r,g:t.g,b:t.b,a:t.alpha}),r=(Cr().s[23]++,ie.jsxs("div",{className:"maputnik-color-picker-offset",style:{position:"fixed",zIndex:1,left:e.left,top:e.top},children:[ie.jsx(yRe,{color:i,onChange:s=>(Cr().f[8]++,Cr().s[24]++,this.onChangeNoCheck(vRe(s)))}),ie.jsx("div",{className:"maputnik-color-picker-offset",onClick:this.togglePicker,style:{zIndex:-1,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}})]})),o=(Cr().s[25]++,{backgroundColor:this.props.value});return Cr().s[26]++,ie.jsxs("div",{className:"maputnik-color-wrapper",children:[(Cr().b[2][0]++,this.state.pickerOpened&&(Cr().b[2][1]++,r)),ie.jsx("div",{className:"maputnik-color-swatch",style:o}),ie.jsx("input",{"aria-label":this.props["aria-label"],spellCheck:"false",autoComplete:"off",className:"maputnik-color",ref:s=>{Cr().f[9]++,Cr().s[27]++,this.colorInput=s},onClick:this.togglePicker,style:this.props.style,name:this.props.name,placeholder:this.props.default,value:this.props.value?(Cr().b[3][0]++,this.props.value):(Cr().b[3][1]++,""),onChange:s=>(Cr().f[10]++,Cr().s[28]++,this.onChange(s.target.value))})]})}}function Xt(){var n="/home/runner/work/maputnik/maputnik/src/components/InputNumber.tsx",e="4f1ef08718bb93faa62aae09b5e3576a9aa3bb04",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputNumber.tsx",statementMap:{0:{start:{line:5,column:24},end:{line:7,column:3}},1:{start:{line:8,column:19},end:{line:8,column:24}},2:{start:{line:10,column:4},end:{line:10,column:17}},3:{start:{line:11,column:4},end:{line:16,column:6}},4:{start:{line:19,column:4},end:{line:24,column:5}},5:{start:{line:20,column:6},end:{line:23,column:8}},6:{start:{line:25,column:4},end:{line:25,column:16}},7:{start:{line:28,column:18},end:{line:28,column:77}},8:{start:{line:29,column:23},end:{line:29,column:49}},9:{start:{line:30,column:4},end:{line:39,column:5}},10:{start:{line:31,column:6},end:{line:31,column:58}},11:{start:{line:31,column:31},end:{line:31,column:58}},12:{start:{line:32,column:6},end:{line:34,column:9}},13:{start:{line:35,column:11},end:{line:39,column:5}},14:{start:{line:36,column:6},end:{line:38,column:9}},15:{start:{line:40,column:4},end:{line:42,column:7}},16:{start:{line:45,column:4},end:{line:47,column:5}},17:{start:{line:46,column:6},end:{line:46,column:18}},18:{start:{line:48,column:18},end:{line:48,column:20}},19:{start:{line:49,column:4},end:{line:51,column:5}},20:{start:{line:50,column:6},end:{line:50,column:19}},21:{start:{line:52,column:4},end:{line:54,column:5}},22:{start:{line:53,column:6},end:{line:53,column:19}},23:{start:{line:55,column:4},end:{line:57,column:5}},24:{start:{line:56,column:6},end:{line:56,column:19}},25:{start:{line:58,column:4},end:{line:58,column:16}},26:{start:{line:60,column:15},end:{line:74,column:3}},27:{start:{line:61,column:4},end:{line:61,column:38}},28:{start:{line:62,column:4},end:{line:64,column:5}},29:{start:{line:63,column:6},end:{line:63,column:13}},30:{start:{line:65,column:4},end:{line:73,column:5}},31:{start:{line:66,column:6},end:{line:72,column:7}},32:{start:{line:67,column:8},end:{line:67,column:43}},33:{start:{line:68,column:8},end:{line:68,column:56}},34:{start:{line:70,column:8},end:{line:70,column:33}},35:{start:{line:71,column:8},end:{line:71,column:46}},36:{start:{line:75,column:18},end:{line:100,column:3}},37:{start:{line:76,column:16},end:{line:76,column:42}},38:{start:{line:77,column:17},end:{line:77,column:37}},39:{start:{line:78,column:21},end:{line:78,column:26}},40:{start:{line:79,column:4},end:{line:95,column:5}},41:{start:{line:80,column:19},end:{line:80,column:31}},42:{start:{line:81,column:6},end:{line:94,column:7}},43:{start:{line:82,column:8},end:{line:86,column:9}},44:{start:{line:83,column:10},end:{line:83,column:42}},45:{start:{line:85,column:10},end:{line:85,column:42}},46:{start:{line:87,column:8},end:{line:87,column:27}},47:{start:{line:89,column:8},end:{line:93,column:9}},48:{start:{line:90,column:10},end:{line:90,column:31}},49:{start:{line:92,column:10},end:{line:92,column:40}},50:{start:{line:96,column:4},end:{line:96,column:32}},51:{start:{line:97,column:4},end:{line:97,column:70}},52:{start:{line:98,column:4},end:{line:98,column:41}},53:{start:{line:99,column:4},end:{line:99,column:56}},54:{start:{line:99,column:29},end:{line:99,column:56}},55:{start:{line:102,column:4},end:{line:185,column:5}},56:{start:{line:103,column:20},end:{line:103,column:81}},57:{start:{line:104,column:27},end:{line:104,column:82}},58:{start:{line:106,column:6},end:{line:110,column:7}},59:{start:{line:107,column:8},end:{line:107,column:38}},60:{start:{line:109,column:8},end:{line:109,column:27}},61:{start:{line:111,column:6},end:{line:165,column:11}},62:{start:{line:124,column:14},end:{line:124,column:41}},63:{start:{line:127,column:14},end:{line:127,column:67}},64:{start:{line:130,column:14},end:{line:130,column:69}},65:{start:{line:133,column:14},end:{line:137,column:17}},66:{start:{line:152,column:14},end:{line:152,column:47}},67:{start:{line:155,column:14},end:{line:155,column:47}},68:{start:{line:158,column:14},end:{line:158,column:48}},69:{start:{line:159,column:14},end:{line:159,column:32}},70:{start:{line:167,column:20},end:{line:167,column:81}},71:{start:{line:168,column:6},end:{line:184,column:8}},72:{start:{line:176,column:27},end:{line:176,column:59}},73:{start:{line:178,column:12},end:{line:178,column:45}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:2},end:{line:9,column:3}},loc:{start:{line:9,column:21},end:{line:17,column:3}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:48},end:{line:26,column:3}},line:18},2:{name:"(anonymous_2)",decl:{start:{line:27,column:2},end:{line:27,column:3}},loc:{start:{line:27,column:24},end:{line:43,column:3}},line:27},3:{name:"(anonymous_3)",decl:{start:{line:44,column:2},end:{line:44,column:3}},loc:{start:{line:44,column:13},end:{line:59,column:3}},line:44},4:{name:"(anonymous_4)",decl:{start:{line:60,column:15},end:{line:60,column:16}},loc:{start:{line:60,column:21},end:{line:74,column:3}},line:60},5:{name:"(anonymous_5)",decl:{start:{line:75,column:18},end:{line:75,column:19}},loc:{start:{line:75,column:25},end:{line:100,column:3}},line:75},6:{name:"(anonymous_6)",decl:{start:{line:101,column:2},end:{line:101,column:3}},loc:{start:{line:101,column:11},end:{line:186,column:3}},line:101},7:{name:"(anonymous_7)",decl:{start:{line:123,column:23},end:{line:123,column:24}},loc:{start:{line:123,column:29},end:{line:125,column:13}},line:123},8:{name:"(anonymous_8)",decl:{start:{line:126,column:27},end:{line:126,column:28}},loc:{start:{line:126,column:33},end:{line:128,column:13}},line:126},9:{name:"(anonymous_9)",decl:{start:{line:129,column:25},end:{line:129,column:26}},loc:{start:{line:129,column:31},end:{line:131,column:13}},line:129},10:{name:"(anonymous_10)",decl:{start:{line:132,column:20},end:{line:132,column:21}},loc:{start:{line:132,column:26},end:{line:138,column:13}},line:132},11:{name:"(anonymous_11)",decl:{start:{line:151,column:21},end:{line:151,column:22}},loc:{start:{line:151,column:29},end:{line:153,column:13}},line:151},12:{name:"(anonymous_12)",decl:{start:{line:154,column:22},end:{line:154,column:23}},loc:{start:{line:154,column:29},end:{line:156,column:13}},line:154},13:{name:"(anonymous_13)",decl:{start:{line:157,column:20},end:{line:157,column:21}},loc:{start:{line:157,column:28},end:{line:160,column:13}},line:157},14:{name:"(anonymous_14)",decl:{start:{line:176,column:20},end:{line:176,column:21}},loc:{start:{line:176,column:27},end:{line:176,column:59}},line:176},15:{name:"(anonymous_15)",decl:{start:{line:177,column:19},end:{line:177,column:20}},loc:{start:{line:177,column:25},end:{line:179,column:11}},line:177}},branchMap:{0:{loc:{start:{line:19,column:4},end:{line:24,column:5}},type:"if",locations:[{start:{line:19,column:4},end:{line:24,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:19},1:{loc:{start:{line:19,column:8},end:{line:19,column:53}},type:"binary-expr",locations:[{start:{line:19,column:8},end:{line:19,column:22}},{start:{line:19,column:26},end:{line:19,column:53}}],line:19},2:{loc:{start:{line:28,column:18},end:{line:28,column:77}},type:"cond-expr",locations:[{start:{line:28,column:59},end:{line:28,column:65}},{start:{line:28,column:68},end:{line:28,column:77}}],line:28},3:{loc:{start:{line:28,column:18},end:{line:28,column:56}},type:"binary-expr",locations:[{start:{line:28,column:18},end:{line:28,column:33}},{start:{line:28,column:37},end:{line:28,column:56}}],line:28},4:{loc:{start:{line:30,column:4},end:{line:39,column:5}},type:"if",locations:[{start:{line:30,column:4},end:{line:39,column:5}},{start:{line:35,column:11},end:{line:39,column:5}}],line:30},5:{loc:{start:{line:30,column:8},end:{line:30,column:41}},type:"binary-expr",locations:[{start:{line:30,column:8},end:{line:30,column:27}},{start:{line:30,column:31},end:{line:30,column:41}}],line:30},6:{loc:{start:{line:31,column:6},end:{line:31,column:58}},type:"if",locations:[{start:{line:31,column:6},end:{line:31,column:58}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:31},7:{loc:{start:{line:35,column:11},end:{line:39,column:5}},type:"if",locations:[{start:{line:35,column:11},end:{line:39,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:35},8:{loc:{start:{line:35,column:15},end:{line:35,column:49}},type:"binary-expr",locations:[{start:{line:35,column:15},end:{line:35,column:35}},{start:{line:35,column:39},end:{line:35,column:49}}],line:35},9:{loc:{start:{line:41,column:18},end:{line:41,column:53}},type:"cond-expr",locations:[{start:{line:41,column:36},end:{line:41,column:42}},{start:{line:41,column:45},end:{line:41,column:53}}],line:41},10:{loc:{start:{line:45,column:4},end:{line:47,column:5}},type:"if",locations:[{start:{line:45,column:4},end:{line:47,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:45},11:{loc:{start:{line:49,column:4},end:{line:51,column:5}},type:"if",locations:[{start:{line:49,column:4},end:{line:51,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:49},12:{loc:{start:{line:52,column:4},end:{line:54,column:5}},type:"if",locations:[{start:{line:52,column:4},end:{line:54,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:52},13:{loc:{start:{line:52,column:8},end:{line:52,column:56}},type:"binary-expr",locations:[{start:{line:52,column:8},end:{line:52,column:30}},{start:{line:52,column:34},end:{line:52,column:56}}],line:52},14:{loc:{start:{line:55,column:4},end:{line:57,column:5}},type:"if",locations:[{start:{line:55,column:4},end:{line:57,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:55},15:{loc:{start:{line:55,column:8},end:{line:55,column:56}},type:"binary-expr",locations:[{start:{line:55,column:8},end:{line:55,column:30}},{start:{line:55,column:34},end:{line:55,column:56}}],line:55},16:{loc:{start:{line:62,column:4},end:{line:64,column:5}},type:"if",locations:[{start:{line:62,column:4},end:{line:64,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:62},17:{loc:{start:{line:65,column:4},end:{line:73,column:5}},type:"if",locations:[{start:{line:65,column:4},end:{line:73,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:65},18:{loc:{start:{line:66,column:6},end:{line:72,column:7}},type:"if",locations:[{start:{line:66,column:6},end:{line:72,column:7}},{start:{line:69,column:13},end:{line:72,column:7}}],line:66},19:{loc:{start:{line:79,column:4},end:{line:95,column:5}},type:"if",locations:[{start:{line:79,column:4},end:{line:95,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:79},20:{loc:{start:{line:81,column:6},end:{line:94,column:7}},type:"if",locations:[{start:{line:81,column:6},end:{line:94,column:7}},{start:{line:88,column:13},end:{line:94,column:7}}],line:81},21:{loc:{start:{line:82,column:8},end:{line:86,column:9}},type:"if",locations:[{start:{line:82,column:8},end:{line:86,column:9}},{start:{line:84,column:15},end:{line:86,column:9}}],line:82},22:{loc:{start:{line:89,column:8},end:{line:93,column:9}},type:"if",locations:[{start:{line:89,column:8},end:{line:93,column:9}},{start:{line:91,column:15},end:{line:93,column:9}}],line:89},23:{loc:{start:{line:99,column:4},end:{line:99,column:56}},type:"if",locations:[{start:{line:99,column:4},end:{line:99,column:56}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:99},24:{loc:{start:{line:102,column:4},end:{line:185,column:5}},type:"if",locations:[{start:{line:102,column:4},end:{line:185,column:5}},{start:{line:166,column:11},end:{line:185,column:5}}],line:102},25:{loc:{start:{line:102,column:8},end:{line:102,column:205}},type:"binary-expr",locations:[{start:{line:102,column:8},end:{line:102,column:63}},{start:{line:102,column:67},end:{line:102,column:122}},{start:{line:102,column:126},end:{line:102,column:151}},{start:{line:102,column:155},end:{line:102,column:180}},{start:{line:102,column:184},end:{line:102,column:205}}],line:102},26:{loc:{start:{line:103,column:20},end:{line:103,column:81}},type:"cond-expr",locations:[{start:{line:103,column:41},end:{line:103,column:62}},{start:{line:103,column:65},end:{line:103,column:81}}],line:103},27:{loc:{start:{line:104,column:27},end:{line:104,column:82}},type:"cond-expr",locations:[{start:{line:104,column:59},end:{line:104,column:61}},{start:{line:104,column:64},end:{line:104,column:82}}],line:104},28:{loc:{start:{line:106,column:6},end:{line:110,column:7}},type:"if",locations:[{start:{line:106,column:6},end:{line:110,column:7}},{start:{line:108,column:13},end:{line:110,column:7}}],line:106},29:{loc:{start:{line:121,column:19},end:{line:121,column:58}},type:"cond-expr",locations:[{start:{line:121,column:38},end:{line:121,column:50}},{start:{line:121,column:53},end:{line:121,column:58}}],line:121},30:{loc:{start:{line:150,column:19},end:{line:150,column:58}},type:"cond-expr",locations:[{start:{line:150,column:43},end:{line:150,column:45}},{start:{line:150,column:48},end:{line:150,column:58}}],line:150},31:{loc:{start:{line:167,column:20},end:{line:167,column:81}},type:"cond-expr",locations:[{start:{line:167,column:41},end:{line:167,column:62}},{start:{line:167,column:65},end:{line:167,column:81}}],line:167},32:{loc:{start:{line:175,column:17},end:{line:175,column:46}},type:"cond-expr",locations:[{start:{line:175,column:36},end:{line:175,column:38}},{start:{line:175,column:41},end:{line:175,column:46}}],line:175}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0,0,0,0],26:[0,0],27:[0,0],28:[0,0],29:[0,0],30:[0,0],31:[0,0],32:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputNumber.tsx"],names:[],mappings:"AA8Ka,SACL,KADK;AA9Kb,OAAO,WAAwC;AAC/C,OAAO,sBAAsB;AA0B7B,qBAAqB,oBAAoB,MAAM,UAA8C;AAAA,EAC3F,OAAO,eAAe;AAAA,IACpB,WAAW;AAAA,EACb;AAAA,EACA,iBAA0B;AAAA,EAE1B,YAAY,OAAyB;AACnC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,MAAM,CAAC,iBAAiB;AAAA,MACxB,SAAS;AAAA,MACT,OAAO,MAAM;AAAA,MACb,YAAY,MAAM;AAAA,IACpB;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAAmC,OAAyB;AAC1F,QAAI,CAAC,MAAM,WAAW,MAAM,UAAU,MAAM,OAAO;AACjD,aAAO;AAAA,QACL,OAAO,MAAM;AAAA,QACb,YAAY,MAAM;AAAA,MACpB;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA,EAEA,YAAY,UAAuC;AACjD,UAAM,QAAS,aAAa,MAAM,aAAa,SAC7C,SAAY,CAAC;AAEf,UAAM,aAAa,KAAK,MAAM,UAAU;AACxC,QAAG,KAAK,QAAQ,KAAK,KAAK,YAAY;AACpC,UAAI,KAAK,MAAM,SAAU,MAAK,MAAM,SAAS,KAAK;AAClD,WAAK,SAAS;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACH,WACS,CAAC,KAAK,QAAQ,KAAK,KAAK,YAAY;AAC3C,WAAK,SAAS;AAAA,QACZ,OAAO;AAAA,MACT,CAAC;AAAA,IACH;AAEA,SAAK,SAAS;AAAA,MACZ,YAAY,aAAa,KAAK,SAAY;AAAA,IAC5C,CAAC;AAAA,EACH;AAAA,EAEA,QAAQ,GAAgC;AACtC,QAAI,MAAM,QAAW;AACnB,aAAO;AAAA,IACT;AAEA,UAAM,QAAQ,CAAC;AACf,QAAG,MAAM,KAAK,GAAG;AACf,aAAO;AAAA,IACT;AAEA,QAAG,CAAC,MAAM,KAAK,MAAM,GAAI,KAAK,QAAQ,KAAK,MAAM,KAAM;AACrD,aAAO;AAAA,IACT;AAEA,QAAG,CAAC,MAAM,KAAK,MAAM,GAAI,KAAK,QAAQ,KAAK,MAAM,KAAM;AACrD,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT;AAAA,EAEA,aAAa,MAAM;AACjB,SAAK,SAAS,EAAC,SAAS,MAAK,CAAC;AAE9B,QAAG,CAAC,KAAK,MAAM,OAAO;AACpB;AAAA,IACF;AAGA,QAAI,CAAC,KAAK,QAAQ,KAAK,MAAM,KAAK,GAAG;AACnC,UAAG,KAAK,QAAQ,KAAK,MAAM,KAAK,GAAG;AACjC,aAAK,YAAY,KAAK,MAAM,KAAK;AACjC,aAAK,SAAS,EAAC,YAAY,KAAK,MAAM,MAAK,CAAC;AAAA,MAC9C,OAAO;AACL,aAAK,YAAY,MAAS;AAC1B,aAAK,SAAS,EAAC,YAAY,OAAS,CAAC;AAAA,MACvC;AAAA,IACF;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,MAAqE;AACpF,QAAI,QAAQ,WAAW,EAAE,OAAO,KAAK;AACrC,UAAM,OAAO,KAAK,MAAM;AACxB,QAAI,aAAa;AAEjB,QAAG,MAAM;AAEP,YAAM,OAAO,QAAQ;AAGrB,UAAI,KAAK,gBAAgB;AAKvB,YAAI,QAAQ,CAAC,KAAK,MAAM,YAAa;AACnC,kBAAQ,KAAK,MAAM,QAAS;AAAA,QAC9B,OACK;AACH,kBAAQ,KAAK,MAAM,QAAS;AAAA,QAC9B;AACA,qBAAa;AAAA,MACf,OACK;AACH,YAAI,OAAO,OAAK,GAAG;AACjB,kBAAQ,QAAQ;AAAA,QAClB,OACK;AACH,kBAAQ,SAAS,OAAO;AAAA,QAC1B;AAAA,MACF;AAAA,IACF;AAEA,SAAK,iBAAiB;AAGtB,YAAQ,KAAK,IAAI,KAAK,MAAM,KAAM,KAAK,IAAI,KAAK,MAAM,KAAM,KAAK,CAAC;AAElE,SAAK,SAAS,EAAC,OAAO,WAAU,CAAC;AACjC,QAAI,KAAK,MAAM,SAAU,MAAK,MAAM,SAAS,KAAK;AAAA,EACpD;AAAA,EAEA,SAAS;AACP,QACE,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO,KAAK,KACtD,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO,KAAK,KACtD,KAAK,MAAM,QAAQ,UAAa,KAAK,MAAM,QAAQ,UACnD,KAAK,MAAM,YACX;AACA,YAAM,QAAQ,KAAK,MAAM,UAAU,KAAK,MAAM,aAAa,KAAK,MAAM;AACtE,YAAM,eAAe,KAAK,MAAM,YAAY,SAAY,KAAK,KAAK,MAAM;AACxE,UAAI;AACJ,UAAI,KAAK,MAAM,cAAc;AAC3B,qBAAa,KAAK,MAAM;AAAA,MAC1B,OACK;AACH,qBAAa;AAAA,MACf;AAEA,aAAO,qBAAC,SAAI,WAAU,6BACpB;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YAEV,MAAK;AAAA,YACL,KAAK,KAAK,MAAM;AAAA,YAChB,KAAK,KAAK,MAAM;AAAA,YAChB,MAAK;AAAA,YACL,YAAW;AAAA,YACX,OAAO,UAAU,SAAY,eAAe;AAAA,YAC5C,UAAU,KAAK;AAAA,YACf,WAAW,MAAM;AACf,mBAAK,iBAAiB;AAAA,YACxB;AAAA,YACA,eAAe,MAAM;AACnB,mBAAK,SAAS,EAAC,SAAS,MAAM,cAAc,KAAI,CAAC;AAAA,YACnD;AAAA,YACA,aAAa,MAAM;AAEjB,mBAAK,SAAS,EAAC,SAAS,OAAO,cAAc,MAAK,CAAC;AAAA,YACrD;AAAA,YACA,QAAQ,MAAM;AACZ,mBAAK,SAAS;AAAA,gBACZ,SAAS;AAAA,gBACT,cAAc;AAAA,gBACd,YAAY,KAAK,MAAM;AAAA,cACzB,CAAC;AAAA,YACH;AAAA,YACA,eAAa,KAAK,MAAM,aAAa,IAAI;AAAA;AAAA,UAzBrC;AAAA,QA0BN;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YAEC,MAAK;AAAA,YACL,YAAW;AAAA,YACX,WAAU;AAAA,YACV,aAAa,KAAK,MAAM,SAAS,SAAS;AAAA,YAC1C,OAAO,eAAe,SAAY,KAAK;AAAA,YACvC,SAAS,QAAM;AACb,mBAAK,SAAS,EAAC,SAAS,KAAI,CAAC;AAAA,YAC/B;AAAA,YACA,UAAU,OAAK;AACb,mBAAK,YAAY,EAAE,OAAO,KAAK;AAAA,YACjC;AAAA,YACA,QAAQ,QAAM;AACZ,mBAAK,SAAS,EAAC,SAAS,MAAK,CAAC;AAC9B,mBAAK,WAAW;AAAA,YAClB;AAAA,YACA,eAAa,KAAK,MAAM,aAAa,IAAI;AAAA;AAAA,UAhBrC;AAAA,QAkBN;AAAA,SACF;AAAA,IACF,OACK;AACH,YAAM,QAAQ,KAAK,MAAM,UAAU,KAAK,MAAM,aAAa,KAAK,MAAM;AAEtE,aAAO;AAAA,QAAC;AAAA;AAAA,UACN,cAAY,KAAK,MAAM,YAAY;AAAA,UACnC,YAAW;AAAA,UACX,WAAU;AAAA,UACV,aAAa,KAAK,MAAM,SAAS,SAAS;AAAA,UAC1C,OAAO,UAAU,SAAY,KAAK;AAAA,UAClC,UAAU,OAAK,KAAK,YAAY,EAAE,OAAO,KAAK;AAAA,UAC9C,SAAS,MAAM;AACb,iBAAK,SAAS,EAAC,SAAS,KAAI,CAAC;AAAA,UAC/B;AAAA,UACA,QAAQ,KAAK;AAAA,UACb,UAAU,KAAK,MAAM;AAAA,UACrB,eAAa,KAAK,MAAM,aAAa;AAAA;AAAA,MACvC;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4f1ef08718bb93faa62aae09b5e3576a9aa3bb04"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Xt=function(){return s},s}Xt();class i1 extends En.Component{static defaultProps=(Xt().s[0]++,{rangeStep:1});_keyboardEvent=(Xt().s[1]++,!1);constructor(e){Xt().f[0]++,Xt().s[2]++,super(e),Xt().s[3]++,this.state={uuid:+cx(),editing:!1,value:e.value,dirtyValue:e.value}}static getDerivedStateFromProps(e,t){return Xt().f[1]++,Xt().s[4]++,Xt().b[1][0]++,!t.editing&&(Xt().b[1][1]++,e.value!==t.value)?(Xt().b[0][0]++,Xt().s[5]++,{value:e.value,dirtyValue:e.value}):(Xt().b[0][1]++,Xt().s[6]++,null)}changeValue(e){Xt().f[2]++;const t=(Xt().s[7]++,Xt().b[3][0]++,e===""||(Xt().b[3][1]++,e===void 0)?(Xt().b[2][0]++,void 0):(Xt().b[2][1]++,+e)),i=(Xt().s[8]++,this.props.value!==t);Xt().s[9]++,Xt().b[5][0]++,this.isValid(t)&&(Xt().b[5][1]++,i)?(Xt().b[4][0]++,Xt().s[10]++,this.props.onChange?(Xt().b[6][0]++,Xt().s[11]++,this.props.onChange(t)):Xt().b[6][1]++,Xt().s[12]++,this.setState({value:t})):(Xt().b[4][1]++,Xt().s[13]++,Xt().b[8][0]++,!this.isValid(t)&&(Xt().b[8][1]++,i)?(Xt().b[7][0]++,Xt().s[14]++,this.setState({value:void 0})):Xt().b[7][1]++),Xt().s[15]++,this.setState({dirtyValue:e===""?(Xt().b[9][0]++,void 0):(Xt().b[9][1]++,e)})}isValid(e){if(Xt().f[3]++,Xt().s[16]++,e===void 0)return Xt().b[10][0]++,Xt().s[17]++,!0;Xt().b[10][1]++;const t=(Xt().s[18]++,+e);return Xt().s[19]++,isNaN(t)?(Xt().b[11][0]++,Xt().s[20]++,!1):(Xt().b[11][1]++,Xt().s[21]++,Xt().b[13][0]++,!isNaN(this.props.min)&&(Xt().b[13][1]++,t<this.props.min)?(Xt().b[12][0]++,Xt().s[22]++,!1):(Xt().b[12][1]++,Xt().s[23]++,Xt().b[15][0]++,!isNaN(this.props.max)&&(Xt().b[15][1]++,t>this.props.max)?(Xt().b[14][0]++,Xt().s[24]++,!1):(Xt().b[14][1]++,Xt().s[25]++,!0)))}resetValue=(Xt().s[26]++,()=>{if(Xt().f[4]++,Xt().s[27]++,this.setState({editing:!1}),Xt().s[28]++,this.state.value)Xt().b[16][1]++;else{Xt().b[16][0]++,Xt().s[29]++;return}Xt().s[30]++,this.isValid(this.state.value)?Xt().b[17][1]++:(Xt().b[17][0]++,Xt().s[31]++,this.isValid(this.props.value)?(Xt().b[18][0]++,Xt().s[32]++,this.changeValue(this.props.value),Xt().s[33]++,this.setState({dirtyValue:this.props.value})):(Xt().b[18][1]++,Xt().s[34]++,this.changeValue(void 0),Xt().s[35]++,this.setState({dirtyValue:void 0})))});onChangeRange=(Xt().s[36]++,e=>{Xt().f[5]++;let t=(Xt().s[37]++,parseFloat(e.target.value));const i=(Xt().s[38]++,this.props.rangeStep);let r=(Xt().s[39]++,t);if(Xt().s[40]++,i){Xt().b[19][0]++;const o=(Xt().s[41]++,t%i);Xt().s[42]++,this._keyboardEvent?(Xt().b[20][0]++,Xt().s[43]++,t<+this.state.dirtyValue?(Xt().b[21][0]++,Xt().s[44]++,t=this.state.value-i):(Xt().b[21][1]++,Xt().s[45]++,t=this.state.value+i),Xt().s[46]++,r=t):(Xt().b[20][1]++,Xt().s[47]++,o<i/2?(Xt().b[22][0]++,Xt().s[48]++,t=t-o):(Xt().b[22][1]++,Xt().s[49]++,t=t+(i-o)))}else Xt().b[19][1]++;Xt().s[50]++,this._keyboardEvent=!1,Xt().s[51]++,t=Math.max(this.props.min,Math.min(this.props.max,t)),Xt().s[52]++,this.setState({value:t,dirtyValue:r}),Xt().s[53]++,this.props.onChange?(Xt().b[23][0]++,Xt().s[54]++,this.props.onChange(t)):Xt().b[23][1]++});render(){if(Xt().f[6]++,Xt().s[55]++,Xt().b[25][0]++,Object.prototype.hasOwnProperty.call(this.props,"min")&&(Xt().b[25][1]++,Object.prototype.hasOwnProperty.call(this.props,"max"))&&(Xt().b[25][2]++,this.props.min!==void 0)&&(Xt().b[25][3]++,this.props.max!==void 0)&&(Xt().b[25][4]++,this.props.allowRange)){Xt().b[24][0]++;const e=(Xt().s[56]++,this.state.editing?(Xt().b[26][0]++,this.state.dirtyValue):(Xt().b[26][1]++,this.state.value)),t=(Xt().s[57]++,this.props.default===void 0?(Xt().b[27][0]++,""):(Xt().b[27][1]++,this.props.default));let i;return Xt().s[58]++,this.state.editingRange?(Xt().b[28][0]++,Xt().s[59]++,i=this.state.value):(Xt().b[28][1]++,Xt().s[60]++,i=e),Xt().s[61]++,ie.jsxs("div",{className:"maputnik-number-container",children:[ie.jsx("input",{className:"maputnik-number-range",type:"range",max:this.props.max,min:this.props.min,step:"any",spellCheck:"false",value:e===void 0?(Xt().b[29][0]++,t):(Xt().b[29][1]++,e),onChange:this.onChangeRange,onKeyDown:()=>{Xt().f[7]++,Xt().s[62]++,this._keyboardEvent=!0},onPointerDown:()=>{Xt().f[8]++,Xt().s[63]++,this.setState({editing:!0,editingRange:!0})},onPointerUp:()=>{Xt().f[9]++,Xt().s[64]++,this.setState({editing:!1,editingRange:!1})},onBlur:()=>{Xt().f[10]++,Xt().s[65]++,this.setState({editing:!1,editingRange:!1,dirtyValue:this.state.value})},"data-wd-key":this.props["data-wd-key"]+"-range"},"range"),ie.jsx("input",{type:"text",spellCheck:"false",className:"maputnik-number",placeholder:this.props.default?.toString(),value:i===void 0?(Xt().b[30][0]++,""):(Xt().b[30][1]++,i),onFocus:r=>{Xt().f[11]++,Xt().s[66]++,this.setState({editing:!0})},onChange:r=>{Xt().f[12]++,Xt().s[67]++,this.changeValue(r.target.value)},onBlur:r=>{Xt().f[13]++,Xt().s[68]++,this.setState({editing:!1}),Xt().s[69]++,this.resetValue()},"data-wd-key":this.props["data-wd-key"]+"-text"},"text")]})}else{Xt().b[24][1]++;const e=(Xt().s[70]++,this.state.editing?(Xt().b[31][0]++,this.state.dirtyValue):(Xt().b[31][1]++,this.state.value));return Xt().s[71]++,ie.jsx("input",{"aria-label":this.props["aria-label"],spellCheck:"false",className:"maputnik-number",placeholder:this.props.default?.toString(),value:e===void 0?(Xt().b[32][0]++,""):(Xt().b[32][1]++,e),onChange:t=>(Xt().f[14]++,Xt().s[72]++,this.changeValue(t.target.value)),onFocus:()=>{Xt().f[15]++,Xt().s[73]++,this.setState({editing:!0})},onBlur:this.resetValue,required:this.props.required,"data-wd-key":this.props["data-wd-key"]})}}}function hg(){var n="/home/runner/work/maputnik/maputnik/src/components/InputCheckbox.tsx",e="e85f7924976070cbab7795bce9cf0e191e4a6b5e",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputCheckbox.tsx",statementMap:{0:{start:{line:4,column:24},end:{line:6,column:3}},1:{start:{line:7,column:13},end:{line:9,column:3}},2:{start:{line:8,column:4},end:{line:8,column:43}},3:{start:{line:11,column:4},end:{line:26,column:9}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:13},end:{line:7,column:14}},loc:{start:{line:7,column:19},end:{line:9,column:3}},line:7},1:{name:"(anonymous_1)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:27,column:3}},line:10}},branchMap:{0:{loc:{start:{line:24,column:17},end:{line:24,column:53}},type:"cond-expr",locations:[{start:{line:24,column:36},end:{line:24,column:44}},{start:{line:24,column:47},end:{line:24,column:53}}],line:24}},s:{0:0,1:0,2:0,3:0},f:{0:0,1:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputCheckbox.tsx"],names:[],mappings:"AAkBW,SACL,KADK;AAlBX,OAAO,WAAW;AAQlB,qBAAqB,sBAAsB,MAAM,UAA8B;AAAA,EAC7E,OAAO,eAAe;AAAA,IACpB,OAAO;AAAA,EACT;AAAA,EAEA,WAAW,MAAM;AACf,SAAK,MAAM,SAAS,CAAC,KAAK,MAAM,KAAK;AAAA,EACvC;AAAA,EAEA,SAAS;AACP,WAAO,qBAAC,SAAI,WAAU,6BACpB;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAK;AAAA,UACL,OAAO,KAAK,MAAM;AAAA,UAClB,UAAU,KAAK;AAAA,UACf,SAAS,KAAK;AAAA,UACd,SAAS,KAAK,MAAM;AAAA;AAAA,MACtB;AAAA,MACA,oBAAC,SAAI,WAAU,yBACb,8BAAC,SAAI,OAAO;AAAA,QACV,SAAS,KAAK,MAAM,QAAQ,WAAW;AAAA,MACzC,GAAG,WAAU,0BAAyB,SAAQ,aAC5C,8BAAC,UAAK,GAAE,2CAA0C,GACpD,GACF;AAAA,OACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e85f7924976070cbab7795bce9cf0e191e4a6b5e"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return hg=function(){return s},s}hg();class Kse extends En.Component{static defaultProps=(hg().s[0]++,{value:!1});onChange=(hg().s[1]++,()=>{hg().f[0]++,hg().s[2]++,this.props.onChange(!this.props.value)});render(){return hg().f[1]++,hg().s[3]++,ie.jsxs("div",{className:"maputnik-checkbox-wrapper",children:[ie.jsx("input",{className:"maputnik-checkbox",type:"checkbox",style:this.props.style,onChange:this.onChange,onClick:this.onChange,checked:this.props.value}),ie.jsx("div",{className:"maputnik-checkbox-box",children:ie.jsx("svg",{style:{display:this.props.value?(hg().b[0][0]++,"inline"):(hg().b[0][1]++,"none")},className:"maputnik-checkbox-icon",viewBox:"0 0 32 32",children:ie.jsx("path",{d:"M1 14 L5 10 L13 18 L27 4 L31 8 L13 26 z"})})})]})}}function yi(){var n="/home/runner/work/maputnik/maputnik/src/components/InputArray.tsx",e="9ed81d69001830f70ea45ac1502cde5125167d89",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputArray.tsx",statementMap:{0:{start:{line:6,column:24},end:{line:9,column:3}},1:{start:{line:11,column:4},end:{line:11,column:17}},2:{start:{line:12,column:4},end:{line:16,column:6}},3:{start:{line:19,column:18},end:{line:19,column:20}},4:{start:{line:20,column:30},end:{line:20,column:62}},5:{start:{line:21,column:4},end:{line:28,column:7}},6:{start:{line:22,column:6},end:{line:27,column:7}},7:{start:{line:23,column:8},end:{line:23,column:34}},8:{start:{line:25,column:8},end:{line:25,column:34}},9:{start:{line:26,column:8},end:{line:26,column:46}},10:{start:{line:29,column:4},end:{line:32,column:6}},11:{start:{line:35,column:4},end:{line:38,column:7}},12:{start:{line:36,column:18},end:{line:36,column:26}},13:{start:{line:37,column:6},end:{line:37,column:45}},14:{start:{line:41,column:18},end:{line:41,column:43}},15:{start:{line:42,column:4},end:{line:42,column:26}},16:{start:{line:43,column:4},end:{line:51,column:7}},17:{start:{line:46,column:6},end:{line:50,column:7}},18:{start:{line:47,column:8},end:{line:47,column:35}},19:{start:{line:48,column:13},end:{line:50,column:7}},20:{start:{line:49,column:8},end:{line:49,column:36}},21:{start:{line:54,column:22},end:{line:54,column:32}},22:{start:{line:55,column:27},end:{line:57,column:6}},23:{start:{line:56,column:6},end:{line:56,column:42}},24:{start:{line:58,column:19},end:{line:84,column:6}},25:{start:{line:59,column:6},end:{line:83,column:7}},26:{start:{line:60,column:8},end:{line:70,column:10}},27:{start:{line:66,column:29},end:{line:66,column:51}},28:{start:{line:72,column:8},end:{line:82,column:10}},29:{start:{line:85,column:4},end:{line:85,column:89}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:21},end:{line:17,column:3}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:48},end:{line:33,column:3}},line:18},2:{name:"(anonymous_2)",decl:{start:{line:21,column:39},end:{line:21,column:40}},loc:{start:{line:21,column:49},end:{line:28,column:5}},line:21},3:{name:"(anonymous_3)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:20},end:{line:39,column:3}},line:34},4:{name:"(anonymous_4)",decl:{start:{line:35,column:53},end:{line:35,column:54}},loc:{start:{line:35,column:63},end:{line:38,column:5}},line:35},5:{name:"(anonymous_5)",decl:{start:{line:40,column:2},end:{line:40,column:3}},loc:{start:{line:40,column:29},end:{line:52,column:3}},line:40},6:{name:"(anonymous_6)",decl:{start:{line:45,column:7},end:{line:45,column:8}},loc:{start:{line:45,column:13},end:{line:51,column:5}},line:45},7:{name:"(anonymous_7)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:11},end:{line:86,column:3}},line:53},8:{name:"(anonymous_8)",decl:{start:{line:55,column:60},end:{line:55,column:61}},loc:{start:{line:55,column:69},end:{line:57,column:5}},line:55},9:{name:"(anonymous_9)",decl:{start:{line:58,column:59},end:{line:58,column:60}},loc:{start:{line:58,column:69},end:{line:84,column:5}},line:58},10:{name:"(anonymous_10)",decl:{start:{line:66,column:22},end:{line:66,column:23}},loc:{start:{line:66,column:29},end:{line:66,column:51}},line:66}},branchMap:{0:{loc:{start:{line:22,column:6},end:{line:27,column:7}},type:"if",locations:[{start:{line:22,column:6},end:{line:27,column:7}},{start:{line:24,column:13},end:{line:27,column:7}}],line:22},1:{loc:{start:{line:37,column:15},end:{line:37,column:43}},type:"binary-expr",locations:[{start:{line:37,column:15},end:{line:37,column:29}},{start:{line:37,column:33},end:{line:37,column:43}}],line:37},2:{loc:{start:{line:46,column:6},end:{line:50,column:7}},type:"if",locations:[{start:{line:46,column:6},end:{line:50,column:7}},{start:{line:48,column:13},end:{line:50,column:7}}],line:46},3:{loc:{start:{line:46,column:10},end:{line:46,column:55}},type:"binary-expr",locations:[{start:{line:46,column:10},end:{line:46,column:32}},{start:{line:46,column:36},end:{line:46,column:55}}],line:46},4:{loc:{start:{line:48,column:13},end:{line:50,column:7}},type:"if",locations:[{start:{line:48,column:13},end:{line:50,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:48},5:{loc:{start:{line:55,column:27},end:{line:57,column:6}},type:"binary-expr",locations:[{start:{line:55,column:27},end:{line:55,column:43}},{start:{line:55,column:47},end:{line:57,column:6}}],line:55},6:{loc:{start:{line:56,column:13},end:{line:56,column:41}},type:"binary-expr",locations:[{start:{line:56,column:13},end:{line:56,column:23}},{start:{line:56,column:27},end:{line:56,column:41}}],line:56},7:{loc:{start:{line:59,column:6},end:{line:83,column:7}},type:"if",locations:[{start:{line:59,column:6},end:{line:83,column:7}},{start:{line:71,column:13},end:{line:83,column:7}}],line:59},8:{loc:{start:{line:63,column:21},end:{line:63,column:91}},type:"cond-expr",locations:[{start:{line:63,column:61},end:{line:63,column:67}},{start:{line:63,column:70},end:{line:63,column:91}}],line:63},9:{loc:{start:{line:63,column:21},end:{line:63,column:58}},type:"binary-expr",locations:[{start:{line:63,column:21},end:{line:63,column:35}},{start:{line:63,column:39},end:{line:63,column:58}}],line:63},10:{loc:{start:{line:65,column:22},end:{line:65,column:51}},type:"cond-expr",locations:[{start:{line:65,column:39},end:{line:65,column:43}},{start:{line:65,column:46},end:{line:65,column:51}}],line:65},11:{loc:{start:{line:67,column:26},end:{line:67,column:70}},type:"binary-expr",locations:[{start:{line:67,column:26},end:{line:67,column:50}},{start:{line:67,column:54},end:{line:67,column:70}}],line:67},12:{loc:{start:{line:75,column:21},end:{line:75,column:91}},type:"cond-expr",locations:[{start:{line:75,column:61},end:{line:75,column:67}},{start:{line:75,column:70},end:{line:75,column:91}}],line:75},13:{loc:{start:{line:75,column:21},end:{line:75,column:58}},type:"binary-expr",locations:[{start:{line:75,column:21},end:{line:75,column:35}},{start:{line:75,column:39},end:{line:75,column:58}}],line:75},14:{loc:{start:{line:77,column:22},end:{line:77,column:51}},type:"cond-expr",locations:[{start:{line:77,column:39},end:{line:77,column:43}},{start:{line:77,column:46},end:{line:77,column:51}}],line:77},15:{loc:{start:{line:79,column:26},end:{line:79,column:70}},type:"binary-expr",locations:[{start:{line:79,column:26},end:{line:79,column:50}},{start:{line:79,column:54},end:{line:79,column:70}}],line:79}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputArray.tsx"],names:[],mappings:"AA0Fe;AA1Ff,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AAiBxB,qBAAqB,mBAAmB,MAAM,UAA4C;AAAA,EACxF,OAAO,eAAe;AAAA,IACpB,OAAO,CAAC;AAAA,IACR,SAAS,CAAC;AAAA,EACZ;AAAA,EAEA,YAAa,OAAwB;AACnC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,OAAO,KAAK,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA,MAE/B,mBAAmB,KAAK,MAAM,MAAM,MAAM,CAAC;AAAA,IAC7C;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAAkC,OAAwB;AACxF,UAAM,QAAe,CAAC;AACtB,UAAM,oBAAoB,MAAM,kBAAkB,MAAM,CAAC;AAEzD,UAAM,MAAM,MAAM,EAAE,KAAK,IAAI,EAAE,IAAI,CAAC,GAAG,MAAM;AAC3C,UAAI,MAAM,MAAM,CAAC,MAAM,MAAM,kBAAkB,CAAC,GAAG;AACjD,cAAM,CAAC,IAAI,MAAM,MAAM,CAAC;AAAA,MAC1B,OACK;AACH,cAAM,CAAC,IAAI,MAAM,MAAM,CAAC;AACxB,0BAAkB,CAAC,IAAI,MAAM,MAAM,CAAC;AAAA,MACtC;AAAA,IACF,CAAC;AAED,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,WAAW,OAAkB;AAC3B,WAAO,MAAM,KAAK,MAAM,MAAM,EAAE,KAAK,IAAI,EAAE,MAAM,CAAC,GAAG,MAAM;AACzD,YAAM,MAAM,MAAM,CAAC;AACnB,aAAO,EAAE,QAAQ,UAAa,QAAQ;AAAA,IACxC,CAAC;AAAA,EACH;AAAA,EAEA,YAAY,KAAa,UAAuC;AAC9D,UAAM,QAAQ,KAAK,MAAM,MAAM,MAAM,CAAC;AACtC,UAAM,GAAG,IAAI;AAEb,SAAK,SAAS;AAAA,MACZ;AAAA,IACF,GAAG,MAAM;AACP,UAAI,KAAK,WAAW,KAAK,KAAK,KAAK,MAAM,UAAU;AACjD,aAAK,MAAM,SAAS,KAAK;AAAA,MAC3B,WACS,KAAK,MAAM,UAAS;AAE3B,aAAK,MAAM,SAAS,MAAS;AAAA,MAC/B;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,MAAK,IAAI,KAAK;AAErB,UAAM,iBACJ,MAAM,SAAS,KACf,CAAC,MAAM,MAAM,SAAO;AAClB,aAAQ,QAAQ,MAAM,QAAQ;AAAA,IAChC,CAAC;AAGH,UAAM,SAAS,MAAM,KAAK,MAAM,MAAM,EAAE,KAAK,IAAI,EAAE,IAAI,CAAC,GAAG,MAAM;AAC/D,UAAG,KAAK,MAAM,SAAS,UAAU;AAC/B,eAAO;AAAA,UAAC;AAAA;AAAA,YAEN,SAAS,kBAAkB,CAAC,KAAK,MAAM,UAAU,SAAY,KAAK,MAAM,QAAQ,CAAC;AAAA,YACjF,OAAO,MAAM,CAAC;AAAA,YACd,UAAU,iBAAiB,OAAO;AAAA,YAClC,UAAU,CAAC,MAAM,KAAK,YAAY,GAAG,CAAC;AAAA,YACtC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,UAL9C;AAAA,QAMP;AAAA,MACF,OAAO;AACL,eAAO;AAAA,UAAC;AAAA;AAAA,YAEN,SAAS,kBAAkB,CAAC,KAAK,MAAM,UAAU,SAAY,KAAK,MAAM,QAAQ,CAAC;AAAA,YACjF,OAAO,MAAM,CAAC;AAAA,YACd,UAAU,iBAAiB,OAAO;AAAA,YAClC,UAAU,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,YACvC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,UAL9C;AAAA,QAMP;AAAA,MACF;AAAA,IACF,CAAC;AAED,WACE,oBAAC,SAAI,WAAU,kBACZ,kBACH;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"9ed81d69001830f70ea45ac1502cde5125167d89"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return yi=function(){return s},s}yi();class ED extends En.Component{static defaultProps=(yi().s[0]++,{value:[],default:[]});constructor(e){yi().f[0]++,yi().s[1]++,super(e),yi().s[2]++,this.state={value:this.props.value.slice(0),initialPropsValue:this.props.value.slice(0)}}static getDerivedStateFromProps(e,t){yi().f[1]++;const i=(yi().s[3]++,[]),r=(yi().s[4]++,t.initialPropsValue.slice(0));return yi().s[5]++,Array(e.length).fill(null).map((o,s)=>{yi().f[2]++,yi().s[6]++,e.value[s]===t.initialPropsValue[s]?(yi().b[0][0]++,yi().s[7]++,i[s]=t.value[s]):(yi().b[0][1]++,yi().s[8]++,i[s]=t.value[s],yi().s[9]++,r[s]=t.value[s])}),yi().s[10]++,{value:i,initialPropsValue:r}}isComplete(e){return yi().f[3]++,yi().s[11]++,Array(this.props.length).fill(null).every((t,i)=>{yi().f[4]++;const r=(yi().s[12]++,e[i]);return yi().s[13]++,yi().b[1][0]++,!(r===void 0||(yi().b[1][1]++,r===""))})}changeValue(e,t){yi().f[5]++;const i=(yi().s[14]++,this.state.value.slice(0));yi().s[15]++,i[e]=t,yi().s[16]++,this.setState({value:i},()=>{yi().f[6]++,yi().s[17]++,yi().b[3][0]++,this.isComplete(i)&&(yi().b[3][1]++,this.props.onChange)?(yi().b[2][0]++,yi().s[18]++,this.props.onChange(i)):(yi().b[2][1]++,yi().s[19]++,this.props.onChange?(yi().b[4][0]++,yi().s[20]++,this.props.onChange(void 0)):yi().b[4][1]++)})}render(){yi().f[7]++;const{value:e}=(yi().s[21]++,this.state),t=(yi().s[22]++,yi().b[5][0]++,e.length>0&&(yi().b[5][1]++,!e.every(r=>(yi().f[8]++,yi().s[23]++,yi().b[6][0]++,r===""||(yi().b[6][1]++,r===void 0))))),i=(yi().s[24]++,Array(this.props.length).fill(null).map((r,o)=>(yi().f[9]++,yi().s[25]++,this.props.type==="number"?(yi().b[7][0]++,yi().s[26]++,ie.jsx(i1,{default:(yi().b[9][0]++,t||(yi().b[9][1]++,!this.props.default)?(yi().b[8][0]++,void 0):(yi().b[8][1]++,this.props.default[o])),value:e[o],required:t?(yi().b[10][0]++,!0):(yi().b[10][1]++,!1),onChange:s=>(yi().f[10]++,yi().s[27]++,this.changeValue(o,s)),"aria-label":(yi().b[11][0]++,this.props["aria-label"]||(yi().b[11][1]++,this.props.label))},o)):(yi().b[7][1]++,yi().s[28]++,ie.jsx(dm,{default:(yi().b[13][0]++,t||(yi().b[13][1]++,!this.props.default)?(yi().b[12][0]++,void 0):(yi().b[12][1]++,this.props.default[o])),value:e[o],required:t?(yi().b[14][0]++,!0):(yi().b[14][1]++,!1),onChange:this.changeValue.bind(this,o),"aria-label":(yi().b[15][0]++,this.props["aria-label"]||(yi().b[15][1]++,this.props.label))},o)))));return yi().s[29]++,ie.jsx("div",{className:"maputnik-array",children:i})}}function ru(){var n="/home/runner/work/maputnik/maputnik/src/components/InputMultiInput.tsx",e="bdd7d8430a2c43402b1b125b74a343e39aea6a6c",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputMultiInput.tsx",statementMap:{0:{start:{line:6,column:18},end:{line:6,column:36}},1:{start:{line:7,column:4},end:{line:9,column:5}},2:{start:{line:8,column:6},end:{line:8,column:43}},3:{start:{line:8,column:35},end:{line:8,column:41}},4:{start:{line:10,column:26},end:{line:10,column:59}},5:{start:{line:11,column:19},end:{line:32,column:6}},6:{start:{line:12,column:6},end:{line:31,column:8}},7:{start:{line:22,column:34},end:{line:22,column:58}},8:{start:{line:33,column:4},end:{line:33,column:140}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:34,column:3}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:8,column:28},end:{line:8,column:29}},loc:{start:{line:8,column:35},end:{line:8,column:41}},line:8},2:{name:"(anonymous_2)",decl:{start:{line:11,column:31},end:{line:11,column:32}},loc:{start:{line:11,column:49},end:{line:32,column:5}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:22,column:26},end:{line:22,column:27}},loc:{start:{line:22,column:34},end:{line:22,column:58}},line:22}},branchMap:{0:{loc:{start:{line:7,column:4},end:{line:9,column:5}},type:"if",locations:[{start:{line:7,column:4},end:{line:9,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:7},1:{loc:{start:{line:7,column:8},end:{line:7,column:56}},type:"binary-expr",locations:[{start:{line:7,column:8},end:{line:7,column:26}},{start:{line:7,column:30},end:{line:7,column:56}}],line:7},2:{loc:{start:{line:10,column:26},end:{line:10,column:59}},type:"binary-expr",locations:[{start:{line:10,column:26},end:{line:10,column:42}},{start:{line:10,column:46},end:{line:10,column:59}}],line:10}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputMultiInput.tsx"],names:[],mappings:"AAoBa,SAIL,KAJK;AApBb,OAAO,WAAW;AAClB,OAAO,gBAAgB;AAUvB,qBAAqB,wBAAwB,MAAM,UAAgC;AAAA,EACjF,SAAS;AACP,QAAI,UAAU,KAAK,MAAM;AACzB,QAAG,QAAQ,SAAS,KAAK,CAAC,MAAM,QAAQ,QAAQ,CAAC,CAAC,GAAG;AACnD,gBAAU,QAAQ,IAAI,OAAK,CAAC,GAAG,CAAC,CAAC;AAAA,IACnC;AAEA,UAAM,gBAAgB,KAAK,MAAM,SAAS,QAAQ,CAAC,EAAE,CAAC;AACtD,UAAM,SAAS,QAAQ,IAAI,CAAC,CAAC,KAAK,KAAK,MAAK;AAC1C,aAAO;AAAA,QAAC;AAAA;AAAA,UAEN,WAAW,WAAW,mBAAmB,4BAA4B,EAAC,4BAA4B,QAAQ,cAAa,CAAC;AAAA,UAExH;AAAA;AAAA,cAAC;AAAA;AAAA,gBAAM,MAAK;AAAA,gBACV,MAAM,KAAK,MAAM;AAAA,gBACjB,UAAU,QAAM,KAAK,MAAM,SAAS,GAAG;AAAA,gBACvC,OAAO;AAAA,gBACP,SAAS,QAAQ;AAAA;AAAA,YACnB;AAAA,YACC;AAAA;AAAA;AAAA,QATI;AAAA,MAUP;AAAA,IACF,CAAC;AAED,WAAO,oBAAC,cAAS,WAAU,wBAAuB,cAAY,KAAK,MAAM,YAAY,GAClF,kBACH;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"bdd7d8430a2c43402b1b125b74a343e39aea6a6c"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return ru=function(){return s},s}ru();class bRe extends En.Component{render(){ru().f[0]++;let e=(ru().s[0]++,this.props.options);ru().s[1]++,ru().b[1][0]++,e.length>0&&(ru().b[1][1]++,!Array.isArray(e[0]))?(ru().b[0][0]++,ru().s[2]++,e=e.map(r=>(ru().f[1]++,ru().s[3]++,[r,r]))):ru().b[0][1]++;const t=(ru().s[4]++,ru().b[2][0]++,this.props.value||(ru().b[2][1]++,e[0][0])),i=(ru().s[5]++,e.map(([r,o])=>(ru().f[2]++,ru().s[6]++,ie.jsxs("label",{className:Yg("maputnik-button","maputnik-radio-as-button",{"maputnik-button-selected":r===t}),children:[ie.jsx("input",{type:"radio",name:this.props.name,onChange:s=>(ru().f[3]++,ru().s[7]++,this.props.onChange(r)),value:r,checked:r===t}),o]},r))));return ru().s[8]++,ie.jsx("fieldset",{className:"maputnik-multibutton","aria-label":this.props["aria-label"],children:i})}}function Ya(){var n="/home/runner/work/maputnik/maputnik/src/components/InputEnum.tsx",e="d905b5da4422f2b84d44f87b04fda3de421542f5",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputEnum.tsx",statementMap:{0:{start:{line:6,column:12},end:{line:6,column:13}},1:{start:{line:7,column:2},end:{line:9,column:5}},2:{start:{line:8,column:4},end:{line:8,column:24}},3:{start:{line:10,column:2},end:{line:10,column:13}},4:{start:{line:14,column:54},end:{line:14,column:64}},5:{start:{line:15,column:4},end:{line:36,column:5}},6:{start:{line:16,column:6},end:{line:25,column:8}},7:{start:{line:27,column:6},end:{line:35,column:8}}},fnMap:{0:{name:"optionsLabelLength",decl:{start:{line:5,column:9},end:{line:5,column:27}},loc:{start:{line:5,column:37},end:{line:11,column:1}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:7,column:18},end:{line:7,column:19}},loc:{start:{line:7,column:34},end:{line:9,column:3}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:13,column:2},end:{line:13,column:3}},loc:{start:{line:13,column:11},end:{line:37,column:3}},line:13}},branchMap:{0:{loc:{start:{line:15,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:15,column:4},end:{line:36,column:5}},{start:{line:26,column:11},end:{line:36,column:5}}],line:15},1:{loc:{start:{line:15,column:8},end:{line:15,column:64}},type:"binary-expr",locations:[{start:{line:15,column:8},end:{line:15,column:27}},{start:{line:15,column:31},end:{line:15,column:64}}],line:15},2:{loc:{start:{line:21,column:17},end:{line:21,column:44}},type:"binary-expr",locations:[{start:{line:21,column:17},end:{line:21,column:22}},{start:{line:21,column:26},end:{line:21,column:44}}],line:21},3:{loc:{start:{line:23,column:24},end:{line:23,column:57}},type:"binary-expr",locations:[{start:{line:23,column:24},end:{line:23,column:48}},{start:{line:23,column:52},end:{line:23,column:57}}],line:23},4:{loc:{start:{line:31,column:17},end:{line:31,column:44}},type:"binary-expr",locations:[{start:{line:31,column:17},end:{line:31,column:22}},{start:{line:31,column:26},end:{line:31,column:44}}],line:31},5:{loc:{start:{line:33,column:24},end:{line:33,column:57}},type:"binary-expr",locations:[{start:{line:33,column:24},end:{line:33,column:48}},{start:{line:33,column:52},end:{line:33,column:57}}],line:33}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0,1:0,2:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputEnum.tsx"],names:[],mappings:"AAgCa;AAhCb,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,qBAAqB;AAG5B,SAAS,mBAAmB,SAAgB;AAC1C,MAAI,MAAM;AACV,UAAQ,QAAQ,CAAC,CAAC,GAAG,KAAK,MAAM;AAC9B,WAAO,MAAM;AAAA,EACf,CAAC;AACD,SAAO;AACT;AAgBA,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,UAAM,EAAC,SAAS,OAAO,UAAU,MAAM,MAAK,IAAI,KAAK;AAErD,QAAG,QAAQ,UAAU,KAAK,mBAAmB,OAAO,KAAK,IAAI;AAC3D,aAAO;AAAA,QAAC;AAAA;AAAA,UACN;AAAA,UACA;AAAA,UACA,OAAQ,SAAS,KAAK,MAAM;AAAA,UAC5B;AAAA,UACA,cAAY,KAAK,MAAM,YAAY,KAAK;AAAA;AAAA,MAC1C;AAAA,IACF,OAAO;AACL,aAAO;AAAA,QAAC;AAAA;AAAA,UACN;AAAA,UACA,OAAQ,SAAS,KAAK,MAAM;AAAA,UAC5B;AAAA,UACA,cAAY,KAAK,MAAM,YAAY,KAAK;AAAA;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d905b5da4422f2b84d44f87b04fda3de421542f5"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Ya=function(){return s},s}Ya();function CRe(n){Ya().f[0]++;let e=(Ya().s[0]++,0);return Ya().s[1]++,n.forEach(([t,i])=>{Ya().f[1]++,Ya().s[2]++,e+=i.length}),Ya().s[3]++,e}class mL extends En.Component{render(){Ya().f[2]++;const{options:e,value:t,onChange:i,name:r,label:o}=(Ya().s[4]++,this.props);return Ya().s[5]++,Ya().b[1][0]++,e.length<=3&&(Ya().b[1][1]++,CRe(e)<=20)?(Ya().b[0][0]++,Ya().s[6]++,ie.jsx(bRe,{name:r,options:e,value:(Ya().b[2][0]++,t||(Ya().b[2][1]++,this.props.default)),onChange:i,"aria-label":(Ya().b[3][0]++,this.props["aria-label"]||(Ya().b[3][1]++,o))})):(Ya().b[0][1]++,Ya().s[7]++,ie.jsx(Wb,{options:e,value:(Ya().b[4][0]++,t||(Ya().b[4][1]++,this.props.default)),onChange:i,"aria-label":(Ya().b[5][0]++,this.props["aria-label"]||(Ya().b[5][1]++,o))}))}}function Y_(){var n="/home/runner/work/maputnik/maputnik/src/components/SmallError.tsx",e="f693e5bbe9d7e0de15b6fd90f13b77a5ebfddf0e",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/SmallError.tsx",statementMap:{0:{start:{line:7,column:14},end:{line:7,column:26}},1:{start:{line:8,column:4},end:{line:12,column:9}},2:{start:{line:15,column:19},end:{line:15,column:56}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:13,column:3}},line:6}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/SmallError.tsx"],names:[],mappings:"AAaM;AAbN,OAAO,WAAW;AAClB,SAA+B,uBAAuB;AACtD,OAAO;AAOP,MAAM,2BAA2B,MAAM,UAAmC;AAAA,EACxE,SAAU;AACR,UAAM,IAAI,KAAK,MAAM;AACrB,WACE,qBAAC,SAAI,WAAU,cACZ;AAAA,QAAE,QAAQ;AAAA,MAAE;AAAA,MAAE,KAAK,MAAM;AAAA,OAC5B;AAAA,EAEJ;AACF;AAEA,MAAM,aAAa,gBAAgB,EAAE,kBAAkB;AACvD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f693e5bbe9d7e0de15b6fd90f13b77a5ebfddf0e"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Y_=function(){return s},s}Y_();class _Re extends En.Component{render(){Y_().f[0]++;const e=(Y_().s[0]++,this.props.t);return Y_().s[1]++,ie.jsxs("div",{className:"SmallError",children:[e("Error:")," ",this.props.children]})}}const qk=(Y_().s[2]++,Jo()(_Re));function _r(){var n="/home/runner/work/maputnik/maputnik/src/components/InputUrl.tsx",e="447f54dcea7174dfde20df5fd4ad658ec6e8baa0",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputUrl.tsx",statementMap:{0:{start:{line:7,column:2},end:{line:9,column:3}},1:{start:{line:8,column:4},end:{line:8,column:11}},2:{start:{line:11,column:22},end:{line:18,column:3}},3:{start:{line:12,column:4},end:{line:17,column:5}},4:{start:{line:13,column:21},end:{line:13,column:34}},5:{start:{line:14,column:6},end:{line:14,column:29}},6:{start:{line:16,column:6},end:{line:16,column:20}},7:{start:{line:19,column:19},end:{line:19,column:35}},8:{start:{line:20,column:16},end:{line:20,column:53}},9:{start:{line:21,column:2},end:{line:41,column:3}},10:{start:{line:22,column:4},end:{line:34,column:5}},11:{start:{line:23,column:6},end:{line:26,column:14}},12:{start:{line:28,column:6},end:{line:33,column:14}},13:{start:{line:35,column:9},end:{line:41,column:3}},14:{start:{line:36,column:4},end:{line:40,column:12}},15:{start:{line:42,column:2},end:{line:42,column:15}},16:{start:{line:45,column:24},end:{line:48,column:3}},17:{start:{line:50,column:4},end:{line:50,column:17}},18:{start:{line:51,column:4},end:{line:53,column:6}},19:{start:{line:55,column:12},end:{line:60,column:3}},20:{start:{line:56,column:4},end:{line:58,column:7}},21:{start:{line:59,column:4},end:{line:59,column:52}},22:{start:{line:59,column:28},end:{line:59,column:52}},23:{start:{line:61,column:13},end:{line:66,column:3}},24:{start:{line:62,column:4},end:{line:64,column:7}},25:{start:{line:65,column:4},end:{line:65,column:29}},26:{start:{line:68,column:4},end:{line:79,column:9}},27:{start:{line:82,column:17},end:{line:82,column:52}}},fnMap:{0:{name:"validate",decl:{start:{line:6,column:9},end:{line:6,column:17}},loc:{start:{line:6,column:26},end:{line:43,column:1}},line:6},1:{name:"(anonymous_1)",decl:{start:{line:11,column:22},end:{line:11,column:23}},loc:{start:{line:11,column:32},end:{line:18,column:3}},line:11},2:{name:"(anonymous_2)",decl:{start:{line:46,column:13},end:{line:46,column:14}},loc:{start:{line:46,column:19},end:{line:47,column:5}},line:46},3:{name:"(anonymous_3)",decl:{start:{line:49,column:2},end:{line:49,column:3}},loc:{start:{line:49,column:21},end:{line:54,column:3}},line:49},4:{name:"(anonymous_4)",decl:{start:{line:55,column:12},end:{line:55,column:13}},loc:{start:{line:55,column:21},end:{line:60,column:3}},line:55},5:{name:"(anonymous_5)",decl:{start:{line:61,column:13},end:{line:61,column:14}},loc:{start:{line:61,column:22},end:{line:66,column:3}},line:61},6:{name:"(anonymous_6)",decl:{start:{line:67,column:2},end:{line:67,column:3}},loc:{start:{line:67,column:11},end:{line:80,column:3}},line:67}},branchMap:{0:{loc:{start:{line:7,column:2},end:{line:9,column:3}},type:"if",locations:[{start:{line:7,column:2},end:{line:9,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:7},1:{loc:{start:{line:21,column:2},end:{line:41,column:3}},type:"if",locations:[{start:{line:21,column:2},end:{line:41,column:3}},{start:{line:35,column:9},end:{line:41,column:3}}],line:21},2:{loc:{start:{line:22,column:4},end:{line:34,column:5}},type:"if",locations:[{start:{line:22,column:4},end:{line:34,column:5}},{start:{line:27,column:11},end:{line:34,column:5}}],line:22},3:{loc:{start:{line:35,column:9},end:{line:41,column:3}},type:"if",locations:[{start:{line:35,column:9},end:{line:41,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:35},4:{loc:{start:{line:35,column:13},end:{line:35,column:86}},type:"binary-expr",locations:[{start:{line:35,column:13},end:{line:35,column:21}},{start:{line:35,column:25},end:{line:35,column:45}},{start:{line:35,column:49},end:{line:35,column:86}}],line:35},5:{loc:{start:{line:59,column:4},end:{line:59,column:52}},type:"if",locations:[{start:{line:59,column:4},end:{line:59,column:52}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:59}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputUrl.tsx"],names:["url"],mappings:"AA4BU,SAAoC,KAApC;AA5BV,OAAO,WAAyB;AAChC,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,SAAS,OAA6B,uBAAuB;AAG7D,SAAS,SAAS,KAAa,GAAuC;AACpE,MAAI,QAAQ,IAAI;AACd;AAAA,EACF;AAEA,MAAI;AACJ,QAAM,cAAc,CAACA,SAAgB;AACnC,QAAI;AACF,YAAM,SAAS,IAAI,IAAIA,IAAG;AAC1B,aAAO,OAAO;AAAA,IAChB,SACO,MAAM;AACX,aAAO;AAAA,IACT;AAAA,EACF;AACA,QAAM,WAAW,YAAY,GAAG;AAChC,QAAM,QAAQ,OAAO,SAAS,aAAa;AAE3C,MAAI,CAAC,UAAU;AACb,QAAI,OAAO;AACT,cACE,oBAAC,cACC,+BAAC,SAAM,GAAM;AAAA;AAAA,QAAuB,oBAAC,UAAK,sBAAQ;AAAA,SAAO,GAC3D;AAAA,IAEJ,OAAO;AACL,cACE,oBAAC,cACC,+BAAC,SAAM,GAAM;AAAA;AAAA,QAAuB,oBAAC,UAAK,qBAAO;AAAA,QAAO;AAAA,QAAI,oBAAC,UAAK,sBAAQ;AAAA,SAAO,GACnF;AAAA,IAEJ;AAAA,EACF,WAEE,YACA,aAAa,WACb,OAAO,SAAS,aAAa,UAC7B;AACA,YACE,oBAAC,cACC,+BAAC,SAAM,GAAM;AAAA;AAAA,MACwE,oBAAC,UAAK,sBAAQ;AAAA,MAAO;AAAA,OAC1G,GACF;AAAA,EAEJ;AAEA,SAAO;AACT;AAsBA,MAAM,yBAAyB,MAAM,UAAgD;AAAA,EACnF,OAAO,eAAe;AAAA,IACpB,SAAS,MAAM;AAAA,IAAC;AAAA,EAClB;AAAA,EAEA,YAAa,OAA8B;AACzC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,OAAO,SAAS,MAAM,OAAO,MAAM,CAAC;AAAA,IACtC;AAAA,EACF;AAAA,EAEA,UAAU,CAAC,QAAgB;AACzB,SAAK,SAAS;AAAA,MACZ,OAAO,SAAS,KAAK,KAAK,MAAM,CAAC;AAAA,IACnC,CAAC;AACD,QAAI,KAAK,MAAM,QAAS,MAAK,MAAM,QAAQ,GAAG;AAAA,EAChD;AAAA,EAEA,WAAW,CAAC,QAAgB;AAC1B,SAAK,SAAS;AAAA,MACZ,OAAO,SAAS,KAAK,KAAK,MAAM,CAAC;AAAA,IACnC,CAAC;AACD,SAAK,MAAM,SAAS,GAAG;AAAA,EACzB;AAAA,EAEA,SAAU;AACR,WACE,qBAAC,SACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACE,GAAG,KAAK;AAAA,UACT,SAAS,KAAK;AAAA,UACd,UAAU,KAAK;AAAA,UACf,cAAY,KAAK,MAAM,YAAY;AAAA;AAAA,MACrC;AAAA,MACC,KAAK,MAAM;AAAA,OACd;AAAA,EAEJ;AACF;AAEA,MAAM,WAAW,gBAAgB,EAAE,gBAAgB;AACnD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"447f54dcea7174dfde20df5fd4ad658ec6e8baa0"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return _r=function(){return s},s}_r();function Yk(n,e){if(_r().f[0]++,_r().s[0]++,n===""){_r().b[0][0]++,_r().s[1]++;return}else _r().b[0][1]++;let t;_r().s[2]++;const i=s=>{_r().f[1]++,_r().s[3]++;try{const a=(_r().s[4]++,new URL(s));return _r().s[5]++,a.protocol}catch{_r().s[6]++;return}},r=(_r().s[7]++,i(n)),o=(_r().s[8]++,window.location.protocol==="https:");return _r().s[9]++,r?(_r().b[1][1]++,_r().s[13]++,_r().b[4][0]++,r&&(_r().b[4][1]++,r==="http:")&&(_r().b[4][2]++,window.location.protocol==="https:")?(_r().b[3][0]++,_r().s[14]++,t=ie.jsx(qk,{children:ie.jsxs(lb,{t:e,children:["CORS policy won't allow fetching resources served over http from https, use a ",ie.jsx("code",{children:"https://"})," domain"]})})):_r().b[3][1]++):(_r().b[1][0]++,_r().s[10]++,o?(_r().b[2][0]++,_r().s[11]++,t=ie.jsx(qk,{children:ie.jsxs(lb,{t:e,children:["Must provide protocol: ",ie.jsx("code",{children:"https://"})]})})):(_r().b[2][1]++,_r().s[12]++,t=ie.jsx(qk,{children:ie.jsxs(lb,{t:e,children:["Must provide protocol: ",ie.jsx("code",{children:"http://"})," or ",ie.jsx("code",{children:"https://"})]})}))),_r().s[15]++,t}class xRe extends En.Component{static defaultProps=(_r().s[16]++,{onInput:()=>{_r().f[2]++}});constructor(e){_r().f[3]++,_r().s[17]++,super(e),_r().s[18]++,this.state={error:Yk(e.value,e.t)}}onInput=(_r().s[19]++,e=>{_r().f[4]++,_r().s[20]++,this.setState({error:Yk(e,this.props.t)}),_r().s[21]++,this.props.onInput?(_r().b[5][0]++,_r().s[22]++,this.props.onInput(e)):_r().b[5][1]++});onChange=(_r().s[23]++,e=>{_r().f[5]++,_r().s[24]++,this.setState({error:Yk(e,this.props.t)}),_r().s[25]++,this.props.onChange(e)});render(){return _r().f[6]++,_r().s[26]++,ie.jsxs("div",{children:[ie.jsx(dm,{...this.props,onInput:this.onInput,onChange:this.onChange,"aria-label":this.props["aria-label"]}),this.state.error]})}}const gL=(_r().s[27]++,Jo()(xRe));function Hn(){var n="/home/runner/work/maputnik/maputnik/src/components/InputDynamicArray.tsx",e="705ac9c8c3dcb0aff320a53fac9b80bc280b1cbf",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputDynamicArray.tsx",statementMap:{0:{start:{line:15,column:19},end:{line:15,column:39}},1:{start:{line:16,column:4},end:{line:16,column:27}},2:{start:{line:17,column:4},end:{line:17,column:57}},3:{start:{line:17,column:29},end:{line:17,column:57}},4:{start:{line:20,column:4},end:{line:20,column:56}},5:{start:{line:22,column:13},end:{line:38,column:3}},6:{start:{line:23,column:19},end:{line:23,column:39}},7:{start:{line:24,column:4},end:{line:36,column:5}},8:{start:{line:25,column:6},end:{line:25,column:21}},9:{start:{line:26,column:11},end:{line:36,column:5}},10:{start:{line:27,column:6},end:{line:27,column:22}},11:{start:{line:28,column:11},end:{line:36,column:5}},12:{start:{line:29,column:28},end:{line:29,column:38}},13:{start:{line:30,column:27},end:{line:30,column:59}},14:{start:{line:31,column:6},end:{line:31,column:32}},15:{start:{line:32,column:11},end:{line:36,column:5}},16:{start:{line:33,column:6},end:{line:33,column:29}},17:{start:{line:35,column:6},end:{line:35,column:22}},18:{start:{line:37,column:4},end:{line:37,column:57}},19:{start:{line:37,column:29},end:{line:37,column:57}},20:{start:{line:40,column:19},end:{line:40,column:39}},21:{start:{line:41,column:4},end:{line:41,column:31}},22:{start:{line:42,column:4},end:{line:42,column:86}},23:{start:{line:42,column:29},end:{line:42,column:86}},24:{start:{line:45,column:14},end:{line:45,column:26}},25:{start:{line:46,column:22},end:{line:46,column:77}},26:{start:{line:47,column:19},end:{line:116,column:6}},27:{start:{line:48,column:45},end:{line:54,column:7}},28:{start:{line:56,column:6},end:{line:103,column:7}},29:{start:{line:57,column:8},end:{line:64,column:10}},30:{start:{line:65,column:13},end:{line:103,column:7}},31:{start:{line:66,column:8},end:{line:73,column:10}},32:{start:{line:74,column:13},end:{line:103,column:7}},33:{start:{line:75,column:24},end:{line:75,column:99}},34:{start:{line:75,column:78},end:{line:75,column:98}},35:{start:{line:76,column:8},end:{line:84,column:10}},36:{start:{line:85,column:13},end:{line:103,column:7}},37:{start:{line:86,column:8},end:{line:93,column:10}},38:{start:{line:95,column:8},end:{line:102,column:10}},39:{start:{line:104,column:6},end:{line:115,column:8}},40:{start:{line:117,column:4},end:{line:127,column:9}},41:{start:{line:130,column:26},end:{line:130,column:70}},42:{start:{line:134,column:14},end:{line:134,column:26}},43:{start:{line:135,column:4},end:{line:148,column:6}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:29},end:{line:18,column:3}},line:14},1:{name:"(anonymous_1)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:15},end:{line:21,column:3}},line:19},2:{name:"(anonymous_2)",decl:{start:{line:22,column:13},end:{line:22,column:14}},loc:{start:{line:22,column:19},end:{line:38,column:3}},line:22},3:{name:"(anonymous_3)",decl:{start:{line:39,column:2},end:{line:39,column:3}},loc:{start:{line:39,column:24},end:{line:43,column:3}},line:39},4:{name:"(anonymous_4)",decl:{start:{line:44,column:2},end:{line:44,column:3}},loc:{start:{line:44,column:11},end:{line:128,column:3}},line:44},5:{name:"(anonymous_5)",decl:{start:{line:47,column:35},end:{line:47,column:36}},loc:{start:{line:47,column:45},end:{line:116,column:5}},line:47},6:{name:"(anonymous_6)",decl:{start:{line:75,column:70},end:{line:75,column:71}},loc:{start:{line:75,column:78},end:{line:75,column:98}},line:75},7:{name:"(anonymous_7)",decl:{start:{line:133,column:2},end:{line:133,column:3}},loc:{start:{line:133,column:11},end:{line:149,column:3}},line:133}},branchMap:{0:{loc:{start:{line:17,column:4},end:{line:17,column:57}},type:"if",locations:[{start:{line:17,column:4},end:{line:17,column:57}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:17},1:{loc:{start:{line:20,column:11},end:{line:20,column:55}},type:"binary-expr",locations:[{start:{line:20,column:11},end:{line:20,column:27}},{start:{line:20,column:31},end:{line:20,column:49}},{start:{line:20,column:53},end:{line:20,column:55}}],line:20},2:{loc:{start:{line:24,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:24,column:4},end:{line:36,column:5}},{start:{line:26,column:11},end:{line:36,column:5}}],line:24},3:{loc:{start:{line:26,column:11},end:{line:36,column:5}},type:"if",locations:[{start:{line:26,column:11},end:{line:36,column:5}},{start:{line:28,column:11},end:{line:36,column:5}}],line:26},4:{loc:{start:{line:28,column:11},end:{line:36,column:5}},type:"if",locations:[{start:{line:28,column:11},end:{line:36,column:5}},{start:{line:32,column:11},end:{line:36,column:5}}],line:28},5:{loc:{start:{line:32,column:11},end:{line:36,column:5}},type:"if",locations:[{start:{line:32,column:11},end:{line:36,column:5}},{start:{line:34,column:11},end:{line:36,column:5}}],line:32},6:{loc:{start:{line:37,column:4},end:{line:37,column:57}},type:"if",locations:[{start:{line:37,column:4},end:{line:37,column:57}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:37},7:{loc:{start:{line:42,column:4},end:{line:42,column:86}},type:"if",locations:[{start:{line:42,column:4},end:{line:42,column:86}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:42},8:{loc:{start:{line:42,column:49},end:{line:42,column:84}},type:"cond-expr",locations:[{start:{line:42,column:69},end:{line:42,column:75}},{start:{line:42,column:78},end:{line:42,column:84}}],line:42},9:{loc:{start:{line:56,column:6},end:{line:103,column:7}},type:"if",locations:[{start:{line:56,column:6},end:{line:103,column:7}},{start:{line:65,column:13},end:{line:103,column:7}}],line:56},10:{loc:{start:{line:62,column:26},end:{line:62,column:70}},type:"binary-expr",locations:[{start:{line:62,column:26},end:{line:62,column:50}},{start:{line:62,column:54},end:{line:62,column:70}}],line:62},11:{loc:{start:{line:65,column:13},end:{line:103,column:7}},type:"if",locations:[{start:{line:65,column:13},end:{line:103,column:7}},{start:{line:74,column:13},end:{line:103,column:7}}],line:65},12:{loc:{start:{line:71,column:26},end:{line:71,column:70}},type:"binary-expr",locations:[{start:{line:71,column:26},end:{line:71,column:50}},{start:{line:71,column:54},end:{line:71,column:70}}],line:71},13:{loc:{start:{line:74,column:13},end:{line:103,column:7}},type:"if",locations:[{start:{line:74,column:13},end:{line:103,column:7}},{start:{line:85,column:13},end:{line:103,column:7}}],line:74},14:{loc:{start:{line:82,column:26},end:{line:82,column:70}},type:"binary-expr",locations:[{start:{line:82,column:26},end:{line:82,column:50}},{start:{line:82,column:54},end:{line:82,column:70}}],line:82},15:{loc:{start:{line:85,column:13},end:{line:103,column:7}},type:"if",locations:[{start:{line:85,column:13},end:{line:103,column:7}},{start:{line:94,column:13},end:{line:103,column:7}}],line:85},16:{loc:{start:{line:91,column:26},end:{line:91,column:70}},type:"binary-expr",locations:[{start:{line:91,column:26},end:{line:91,column:50}},{start:{line:91,column:54},end:{line:91,column:70}}],line:91},17:{loc:{start:{line:100,column:26},end:{line:100,column:70}},type:"binary-expr",locations:[{start:{line:100,column:26},end:{line:100,column:50}},{start:{line:100,column:54},end:{line:100,column:70}}],line:100}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputDynamicArray.tsx"],names:["v"],mappings:"AAwE4B,cA2Cf,YA3Ce;AAxE5B,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,SAAQ,gBAAe;AACvB,SAA+B,uBAAuB;AAEtD,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,mBAAmB;AAC1B,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB,OAAO,gBAAgB;AAkBvB,MAAM,kCAAkC,MAAM,UAA0C;AAAA,EACtF,YAAY,KAAa,UAAuC;AAC9D,UAAM,SAAS,KAAK,OAAO,MAAM,CAAC;AAClC,WAAO,GAAG,IAAI;AACd,QAAI,KAAK,MAAM,SAAU,MAAK,MAAM,SAAS,MAAM;AAAA,EACrD;AAAA,EAEA,IAAI,SAAS;AACX,WAAO,KAAK,MAAM,SAAS,KAAK,MAAM,WAAW,CAAC;AAAA,EACpD;AAAA,EAEA,WAAW,MAAM;AACf,UAAM,SAAS,KAAK,OAAO,MAAM,CAAC;AAClC,QAAI,KAAK,MAAM,SAAS,UAAU;AAChC,aAAO,KAAK,CAAC;AAAA,IACf,WACS,KAAK,MAAM,SAAS,OAAO;AAClC,aAAO,KAAK,EAAE;AAAA,IAChB,WACS,KAAK,MAAM,SAAS,QAAQ;AACnC,YAAM,EAAC,UAAS,IAAI,KAAK;AACzB,YAAM,eAAe,OAAO,KAAK,UAAW,MAAM,EAAE,CAAC;AACrD,aAAO,KAAK,YAAY;AAAA,IAC1B,WAAW,KAAK,MAAM,SAAS,SAAS;AACtC,aAAO,KAAK,SAAS;AAAA,IACvB,OAAO;AACL,aAAO,KAAK,EAAE;AAAA,IAChB;AAEA,QAAI,KAAK,MAAM,SAAU,MAAK,MAAM,SAAS,MAAM;AAAA,EACrD;AAAA,EAEA,YAAY,UAAkB;AAC5B,UAAM,SAAS,KAAK,OAAO,MAAM,CAAC;AAClC,WAAO,OAAO,UAAU,CAAC;AAEzB,QAAI,KAAK,MAAM,SAAU,MAAK,MAAM,SAAS,OAAO,SAAS,IAAI,SAAS,MAAS;AAAA,EACrF;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,YAAY,EAAE,GAAG,MAAM,KAAK,MAAM,MAAM,QAAQ,KAAK,MAAM,OAAO;AACxE,UAAM,SAAS,KAAK,OAAO,IAAI,CAAC,GAAG,MAAM;AACvC,YAAM,iBAAgB;AAAA,QAAC;AAAA;AAAA,UACrB,SAAS,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,UACrC,GAAG;AAAA;AAAA,MACN;AACA,UAAI;AACJ,UAAG,KAAK,MAAM,SAAS,OAAO;AAC5B,gBAAQ;AAAA,UAAC;AAAA;AAAA,YACP,OAAO;AAAA,YACP,UAAU,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,YACvC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,QACrD;AAAA,MACF,WACS,KAAK,MAAM,SAAS,UAAU;AACrC,gBAAQ;AAAA,UAAC;AAAA;AAAA,YACP,OAAO;AAAA,YACP,UAAU,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,YACvC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,QACrD;AAAA,MACF,WACS,KAAK,MAAM,SAAS,QAAQ;AACnC,cAAM,UAAU,OAAO,KAAK,KAAK,MAAM,WAAW,MAAM,EAAE,IAAI,CAAAA,OAAK,CAACA,IAAG,WAAWA,EAAC,CAAC,CAAC;AACrF,gBAAQ;AAAA,UAAC;AAAA;AAAA,YACP;AAAA,YACA,OAAO;AAAA,YACP,UAAU,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,YACvC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,QACrD;AAAA,MACF,WACS,KAAK,MAAM,SAAS,SAAS;AACpC,gBAAQ;AAAA,UAAC;AAAA;AAAA,YACP,OAAO;AAAA,YACP,UAAU,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,YACvC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,QACrD;AAAA,MACF,OACK;AACH,gBAAQ;AAAA,UAAC;AAAA;AAAA,YACP,OAAO;AAAA,YACP,UAAU,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,YACvC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,QACrD;AAAA,MACF;AAEA,aAAO;AAAA,QAAC;AAAA;AAAA,UACN,OAAO,KAAK,MAAM;AAAA,UAElB,WAAU;AAAA,UAEV;AAAA,gCAAC,SAAI,WAAU,+BACZ,0BACH;AAAA,YACA,oBAAC,SAAI,WAAU,gCACZ,iBACH;AAAA;AAAA;AAAA,QARK;AAAA,MASP;AAAA,IACF,CAAC;AAED,WACE,qBAAC,SAAI,WAAU,kBACZ;AAAA;AAAA,MACD;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAS,KAAK;AAAA,UAEb,YAAE,WAAW;AAAA;AAAA,MAChB;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,MAAM,oBAAoB,gBAAgB,EAAE,yBAAyB;AACrE,eAAe;AAMf,MAAM,+BAA+B,MAAM,UAAuC;AAAA,EAChF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,SAAS,KAAK,MAAM;AAAA,QACpB,OAAO,EAAE,mBAAmB;AAAA,QAE5B;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,oBAAC,YAAS;AAAA;AAAA,QACnB;AAAA;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"705ac9c8c3dcb0aff320a53fac9b80bc280b1cbf"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Hn=function(){return s},s}Hn();class MRe extends En.Component{changeValue(e,t){Hn().f[0]++;const i=(Hn().s[0]++,this.values.slice(0));Hn().s[1]++,i[e]=t,Hn().s[2]++,this.props.onChange?(Hn().b[0][0]++,Hn().s[3]++,this.props.onChange(i)):Hn().b[0][1]++}get values(){return Hn().f[1]++,Hn().s[4]++,Hn().b[1][0]++,this.props.value||(Hn().b[1][1]++,this.props.default)||(Hn().b[1][2]++,[])}addValue=(Hn().s[5]++,()=>{Hn().f[2]++;const e=(Hn().s[6]++,this.values.slice(0));if(Hn().s[7]++,this.props.type==="number")Hn().b[2][0]++,Hn().s[8]++,e.push(0);else if(Hn().b[2][1]++,Hn().s[9]++,this.props.type==="url")Hn().b[3][0]++,Hn().s[10]++,e.push("");else if(Hn().b[3][1]++,Hn().s[11]++,this.props.type==="enum"){Hn().b[4][0]++;const{fieldSpec:t}=(Hn().s[12]++,this.props),i=(Hn().s[13]++,Object.keys(t.values)[0]);Hn().s[14]++,e.push(i)}else Hn().b[4][1]++,Hn().s[15]++,this.props.type==="color"?(Hn().b[5][0]++,Hn().s[16]++,e.push("#000000")):(Hn().b[5][1]++,Hn().s[17]++,e.push(""));Hn().s[18]++,this.props.onChange?(Hn().b[6][0]++,Hn().s[19]++,this.props.onChange(e)):Hn().b[6][1]++});deleteValue(e){Hn().f[3]++;const t=(Hn().s[20]++,this.values.slice(0));Hn().s[21]++,t.splice(e,1),Hn().s[22]++,this.props.onChange?(Hn().b[7][0]++,Hn().s[23]++,this.props.onChange(t.length>0?(Hn().b[8][0]++,t):(Hn().b[8][1]++,void 0))):Hn().b[7][1]++}render(){Hn().f[4]++;const e=(Hn().s[24]++,this.props.t),t=(Hn().s[25]++,{t:e,i18n:this.props.i18n,tReady:this.props.tReady}),i=(Hn().s[26]++,this.values.map((r,o)=>{Hn().f[5]++;const s=(Hn().s[27]++,ie.jsx(wRe,{onClick:this.deleteValue.bind(this,o),...t}));let a;if(Hn().s[28]++,this.props.type==="url")Hn().b[9][0]++,Hn().s[29]++,a=ie.jsx(gL,{value:r,onChange:this.changeValue.bind(this,o),"aria-label":(Hn().b[10][0]++,this.props["aria-label"]||(Hn().b[10][1]++,this.props.label))});else if(Hn().b[9][1]++,Hn().s[30]++,this.props.type==="number")Hn().b[11][0]++,Hn().s[31]++,a=ie.jsx(i1,{value:r,onChange:this.changeValue.bind(this,o),"aria-label":(Hn().b[12][0]++,this.props["aria-label"]||(Hn().b[12][1]++,this.props.label))});else if(Hn().b[11][1]++,Hn().s[32]++,this.props.type==="enum"){Hn().b[13][0]++;const c=(Hn().s[33]++,Object.keys(this.props.fieldSpec?.values).map(A=>(Hn().f[6]++,Hn().s[34]++,[A,ZK(A)])));Hn().s[35]++,a=ie.jsx(mL,{options:c,value:r,onChange:this.changeValue.bind(this,o),"aria-label":(Hn().b[14][0]++,this.props["aria-label"]||(Hn().b[14][1]++,this.props.label))})}else Hn().b[13][1]++,Hn().s[36]++,this.props.type==="color"?(Hn().b[15][0]++,Hn().s[37]++,a=ie.jsx(pL,{value:r,onChange:this.changeValue.bind(this,o),"aria-label":(Hn().b[16][0]++,this.props["aria-label"]||(Hn().b[16][1]++,this.props.label))})):(Hn().b[15][1]++,Hn().s[38]++,a=ie.jsx(dm,{value:r,onChange:this.changeValue.bind(this,o),"aria-label":(Hn().b[17][0]++,this.props["aria-label"]||(Hn().b[17][1]++,this.props.label))}));return Hn().s[39]++,ie.jsxs("div",{style:this.props.style,className:"maputnik-array-block",children:[ie.jsx("div",{className:"maputnik-array-block-action",children:s}),ie.jsx("div",{className:"maputnik-array-block-content",children:a})]},o)}));return Hn().s[40]++,ie.jsxs("div",{className:"maputnik-array",children:[i,ie.jsx(Js,{className:"maputnik-array-add-value",onClick:this.addValue,children:e("Add value")})]})}}const mw=(Hn().s[41]++,Jo()(MRe));class wRe extends En.Component{render(){Hn().f[7]++;const e=(Hn().s[42]++,this.props.t);return Hn().s[43]++,ie.jsx(Js,{className:"maputnik-delete-stop",onClick:this.props.onClick,title:e("Remove array item"),children:ie.jsx(DU,{label:ie.jsx(Kb,{})})})}}function Us(){var n="/home/runner/work/maputnik/maputnik/src/components/InputFont.tsx",e="cd16dc68fc42c219caf080518fd74984d4f8d81e",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputFont.tsx",statementMap:{0:{start:{line:5,column:24},end:{line:7,column:3}},1:{start:{line:9,column:16},end:{line:9,column:60}},2:{start:{line:10,column:4},end:{line:14,column:5}},3:{start:{line:11,column:6},end:{line:11,column:28}},4:{start:{line:13,column:6},end:{line:13,column:17}},5:{start:{line:17,column:26},end:{line:17,column:46}},6:{start:{line:18,column:4},end:{line:18,column:34}},7:{start:{line:19,column:27},end:{line:19,column:92}},8:{start:{line:19,column:55},end:{line:19,column:67}},9:{start:{line:19,column:83},end:{line:19,column:91}},10:{start:{line:20,column:4},end:{line:20,column:40}},11:{start:{line:23,column:19},end:{line:39,column:6}},12:{start:{line:24,column:6},end:{line:38,column:8}},13:{start:{line:32,column:52},end:{line:32,column:58}},14:{start:{line:40,column:4},end:{line:40,column:87}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:15},end:{line:15,column:3}},line:8},1:{name:"(anonymous_1)",decl:{start:{line:16,column:2},end:{line:16,column:3}},loc:{start:{line:16,column:28},end:{line:21,column:3}},line:16},2:{name:"(anonymous_2)",decl:{start:{line:19,column:48},end:{line:19,column:49}},loc:{start:{line:19,column:55},end:{line:19,column:67}},line:19},3:{name:"(anonymous_3)",decl:{start:{line:19,column:76},end:{line:19,column:77}},loc:{start:{line:19,column:83},end:{line:19,column:91}},line:19},4:{name:"(anonymous_4)",decl:{start:{line:22,column:2},end:{line:22,column:3}},loc:{start:{line:22,column:11},end:{line:41,column:3}},line:22},5:{name:"(anonymous_5)",decl:{start:{line:23,column:35},end:{line:23,column:36}},loc:{start:{line:23,column:49},end:{line:39,column:5}},line:23},6:{name:"(anonymous_6)",decl:{start:{line:32,column:45},end:{line:32,column:46}},loc:{start:{line:32,column:52},end:{line:32,column:58}},line:32}},branchMap:{0:{loc:{start:{line:9,column:16},end:{line:9,column:60}},type:"binary-expr",locations:[{start:{line:9,column:16},end:{line:9,column:32}},{start:{line:9,column:36},end:{line:9,column:54}},{start:{line:9,column:58},end:{line:9,column:60}}],line:9},1:{loc:{start:{line:10,column:4},end:{line:14,column:5}},type:"if",locations:[{start:{line:10,column:4},end:{line:14,column:5}},{start:{line:12,column:11},end:{line:14,column:5}}],line:10},2:{loc:{start:{line:30,column:28},end:{line:30,column:71}},type:"binary-expr",locations:[{start:{line:30,column:28},end:{line:30,column:52}},{start:{line:30,column:56},end:{line:30,column:71}}],line:30}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputFont.tsx"],names:[],mappings:"AA6CQ;AA7CR,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAY9B,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,OAAO,eAAe;AAAA,IACpB,OAAO,CAAC;AAAA,EACV;AAAA,EAEA,IAAI,SAAS;AACX,UAAM,MAAM,KAAK,MAAM,SAAS,KAAK,MAAM,WAAW,CAAC;AAGvD,QAAI,IAAI,IAAI,SAAO,CAAC,MAAM,IAAG;AAC3B,aAAO,IAAI,OAAO,EAAE;AAAA,IACtB,OACK;AACH,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,WAAW,KAAa,UAAkB;AACxC,UAAM,gBAAgB,KAAK,OAAO,MAAM,CAAC;AACzC,kBAAc,GAAG,IAAI;AACrB,UAAM,iBAAiB,cACpB,OAAO,OAAK,MAAM,MAAS,EAC3B,OAAO,OAAK,MAAM,EAAE;AAEvB,SAAK,MAAM,SAAS,cAAc;AAAA,EACpC;AAAA,EAEA,SAAS;AACP,UAAM,SAAS,KAAK,OAAO,IAAI,CAAC,OAAO,MAAM;AAC3C,aAAO;AAAA,QAAC;AAAA;AAAA,UAGN;AAAA,YAAC;AAAA;AAAA,cACC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA,cACnD;AAAA,cACA,SAAS,KAAK,MAAM,OAAO,IAAI,OAAK,CAAC,GAAG,CAAC,CAAC;AAAA,cAC1C,UAAU,KAAK,WAAW,KAAK,MAAM,CAAC;AAAA;AAAA,UACxC;AAAA;AAAA,QAPK;AAAA,MAQP;AAAA,IACF,CAAC;AAED,WACE,oBAAC,QAAG,WAAU,iBACX,kBACH;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"cd16dc68fc42c219caf080518fd74984d4f8d81e"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Us=function(){return s},s}Us();class SRe extends En.Component{static defaultProps=(Us().s[0]++,{fonts:[]});get values(){Us().f[0]++;const e=(Us().s[1]++,Us().b[0][0]++,this.props.value||(Us().b[0][1]++,this.props.default)||(Us().b[0][2]++,[]));return Us().s[2]++,e[e.length-1]!==""?(Us().b[1][0]++,Us().s[3]++,e.concat("")):(Us().b[1][1]++,Us().s[4]++,e)}changeFont(e,t){Us().f[1]++;const i=(Us().s[5]++,this.values.slice(0));Us().s[6]++,i[e]=t;const r=(Us().s[7]++,i.filter(o=>(Us().f[2]++,Us().s[8]++,o!==void 0)).filter(o=>(Us().f[3]++,Us().s[9]++,o!=="")));Us().s[10]++,this.props.onChange(r)}render(){Us().f[4]++;const e=(Us().s[11]++,this.values.map((t,i)=>(Us().f[5]++,Us().s[12]++,ie.jsx("li",{children:ie.jsx(lM,{"aria-label":(Us().b[2][0]++,this.props["aria-label"]||(Us().b[2][1]++,this.props.name)),value:t,options:this.props.fonts?.map(r=>(Us().f[6]++,Us().s[13]++,[r,r])),onChange:this.changeFont.bind(this,i)})},i))));return Us().s[14]++,ie.jsx("ul",{className:"maputnik-font",children:e})}}function Yi(){var n="/home/runner/work/maputnik/maputnik/src/components/InputSpec.tsx",e="123acbe81166b3a98d021f01f94ef258a8456edf",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/InputSpec.tsx",statementMap:{0:{start:{line:13,column:23},end:{line:13,column:117}},1:{start:{line:16,column:24},end:{line:27,column:5}},2:{start:{line:25,column:30},end:{line:25,column:81}},3:{start:{line:28,column:4},end:{line:145,column:5}},4:{start:{line:30,column:8},end:{line:37,column:10}},5:{start:{line:39,column:24},end:{line:39,column:101}},6:{start:{line:39,column:82},end:{line:39,column:100}},7:{start:{line:40,column:8},end:{line:46,column:10}},8:{start:{line:51,column:8},end:{line:67,column:9}},9:{start:{line:52,column:26},end:{line:52,column:59}},10:{start:{line:53,column:10},end:{line:59,column:12}},11:{start:{line:57,column:42},end:{line:57,column:48}},12:{start:{line:61,column:10},end:{line:66,column:12}},13:{start:{line:69,column:8},end:{line:74,column:10}},14:{start:{line:76,column:8},end:{line:81,column:10}},15:{start:{line:83,column:8},end:{line:111,column:9}},16:{start:{line:84,column:10},end:{line:90,column:12}},17:{start:{line:92,column:10},end:{line:110,column:11}},18:{start:{line:93,column:12},end:{line:100,column:14}},19:{start:{line:102,column:12},end:{line:109,column:14}},20:{start:{line:113,column:8},end:{line:121,column:10}},21:{start:{line:123,column:8},end:{line:131,column:10}},22:{start:{line:133,column:8},end:{line:141,column:10}},23:{start:{line:143,column:8},end:{line:143,column:110}},24:{start:{line:144,column:8},end:{line:144,column:20}},25:{start:{line:148,column:4},end:{line:148,column:124}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:15},end:{line:146,column:3}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:25,column:16},end:{line:25,column:17}},loc:{start:{line:25,column:30},end:{line:25,column:81}},line:25},2:{name:"(anonymous_2)",decl:{start:{line:39,column:75},end:{line:39,column:76}},loc:{start:{line:39,column:82},end:{line:39,column:100}},line:39},3:{name:"(anonymous_3)",decl:{start:{line:57,column:35},end:{line:57,column:36}},loc:{start:{line:57,column:42},end:{line:57,column:48}},line:57},4:{name:"(anonymous_4)",decl:{start:{line:147,column:2},end:{line:147,column:3}},loc:{start:{line:147,column:11},end:{line:149,column:3}},line:147}},branchMap:{0:{loc:{start:{line:28,column:4},end:{line:145,column:5}},type:"switch",locations:[{start:{line:29,column:6},end:{line:37,column:10}},{start:{line:38,column:6},end:{line:47,column:7}},{start:{line:48,column:6},end:{line:48,column:27}},{start:{line:49,column:6},end:{line:49,column:23}},{start:{line:50,column:6},end:{line:67,column:9}},{start:{line:68,column:6},end:{line:74,column:10}},{start:{line:75,column:6},end:{line:81,column:10}},{start:{line:82,column:6},end:{line:111,column:9}},{start:{line:112,column:6},end:{line:121,column:10}},{start:{line:122,column:6},end:{line:131,column:10}},{start:{line:132,column:6},end:{line:141,column:10}},{start:{line:142,column:6},end:{line:144,column:20}}],line:28},1:{loc:{start:{line:39,column:36},end:{line:39,column:69}},type:"binary-expr",locations:[{start:{line:39,column:36},end:{line:39,column:63}},{start:{line:39,column:67},end:{line:39,column:69}}],line:39},2:{loc:{start:{line:51,column:8},end:{line:67,column:9}},type:"if",locations:[{start:{line:51,column:8},end:{line:67,column:9}},{start:{line:60,column:15},end:{line:67,column:9}}],line:51},3:{loc:{start:{line:52,column:26},end:{line:52,column:59}},type:"binary-expr",locations:[{start:{line:52,column:26},end:{line:52,column:53}},{start:{line:52,column:57},end:{line:52,column:59}}],line:52},4:{loc:{start:{line:83,column:8},end:{line:111,column:9}},type:"if",locations:[{start:{line:83,column:8},end:{line:111,column:9}},{start:{line:91,column:15},end:{line:111,column:9}}],line:83},5:{loc:{start:{line:92,column:10},end:{line:110,column:11}},type:"if",locations:[{start:{line:92,column:10},end:{line:110,column:11}},{start:{line:101,column:17},end:{line:110,column:11}}],line:92},6:{loc:{start:{line:119,column:19},end:{line:119,column:90}},type:"cond-expr",locations:[{start:{line:119,column:53},end:{line:119,column:69}},{start:{line:119,column:72},end:{line:119,column:90}}],line:119},7:{loc:{start:{line:129,column:19},end:{line:129,column:90}},type:"cond-expr",locations:[{start:{line:129,column:53},end:{line:129,column:69}},{start:{line:129,column:72},end:{line:129,column:90}}],line:129},8:{loc:{start:{line:138,column:19},end:{line:138,column:90}},type:"cond-expr",locations:[{start:{line:138,column:53},end:{line:138,column:69}},{start:{line:138,column:72},end:{line:138,column:90}}],line:138}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0,0,0,0,0,0,0,0,0,0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputSpec.tsx"],names:[],mappings:"AAyDQ;AAzDR,OAAO,WAAkC;AAEzC,OAAO,gBAA0C;AACjD,OAAO,iBAA4C;AACnD,OAAO,mBAAgD;AACvD,OAAO,iBAA4C;AACnD,OAAO,gBAA0C;AACjD,OAAO,uBAAwD;AAC/D,OAAO,eAAwC;AAC/C,OAAO,uBAAwD;AAC/D,OAAO,eAAwC;AAC/C,OAAO,gBAAgB;AAEvB,MAAM,iBAAiB,CAAC,sBAAsB,gBAAgB,gBAAgB,0BAA0B,YAAY;AA2BpH,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EAErE,aAAa;AACX,UAAM,cAAc;AAAA,MAClB,WAAW,KAAK,MAAM;AAAA,MACtB,OAAO,KAAK,MAAM;AAAA,MAClB,QAAQ,KAAK,MAAM;AAAA,MACnB,OAAO,KAAK,MAAM;AAAA,MAClB,OAAO,KAAK,MAAM;AAAA,MAClB,SAAS,KAAK,MAAM,WAAW;AAAA,MAC/B,MAAM,KAAK,MAAM;AAAA,MACjB,eAAe,sBAAsB,KAAK,MAAM;AAAA,MAChD,UAAU,CAAC,aAAmE,KAAK,MAAM,SAAU,KAAK,MAAM,WAAW,QAAQ;AAAA,MACjI,cAAc,KAAK,MAAM,YAAY;AAAA,IACvC;AACA,YAAO,KAAK,MAAM,WAAW,MAAM;AAAA,MACjC,KAAK;AAAU,eACb;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACJ,KAAK,KAAK,MAAM,UAAU;AAAA,YAC1B,KAAK,KAAK,MAAM,UAAU;AAAA;AAAA,QAC5B;AAAA,MAEF,KAAK,QAAQ;AACX,cAAM,UAAU,OAAO,KAAK,KAAK,MAAM,UAAU,UAAU,CAAC,CAAC,EAAE,IAAI,OAAK,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;AAE1F,eAAO;AAAA,UAAC;AAAA;AAAA,YACL,GAAG;AAAA,YACJ;AAAA;AAAA,QACF;AAAA,MACF;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,YAAI,eAAe,QAAQ,KAAK,MAAM,SAAU,KAAK,GAAG;AACtD,gBAAM,UAAU,KAAK,MAAM,UAAU,UAAU,CAAC;AAChD,iBAAO;AAAA,YAAC;AAAA;AAAA,cACL,GAAG;AAAA,cACJ,SAAS,QAAQ,IAAI,OAAK,CAAC,GAAG,CAAC,CAAC;AAAA;AAAA,UAClC;AAAA,QACF,OAAO;AACL,iBAAO;AAAA,YAAC;AAAA;AAAA,cACL,GAAG;AAAA;AAAA,UACN;AAAA,QACF;AAAA,MACF,KAAK;AAAS,eACZ;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA;AAAA,QACN;AAAA,MAEF,KAAK;AAAW,eACd;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA;AAAA,QACN;AAAA,MAEF,KAAK;AACH,YAAG,KAAK,MAAM,cAAc,aAAa;AACvC,iBAAO;AAAA,YAAC;AAAA;AAAA,cACL,GAAG;AAAA,cACJ,OAAO,KAAK,MAAM,UAAU;AAAA;AAAA,UAC9B;AAAA,QACF,OAAO;AACL,cAAI,KAAK,MAAM,UAAU,QAAQ;AAC/B,mBAAO;AAAA,cAAC;AAAA;AAAA,gBACL,GAAG;AAAA,gBACJ,MAAM,KAAK,MAAM,UAAU;AAAA,gBAC3B,QAAQ,KAAK,MAAM,UAAU;AAAA;AAAA,YAC/B;AAAA,UACF,OAAO;AACL,mBAAO;AAAA,cAAC;AAAA;AAAA,gBACL,GAAG;AAAA,gBACJ,WAAW,KAAK,MAAM;AAAA,gBACtB,MAAM,KAAK,MAAM,UAAU;AAAA;AAAA,YAC7B;AAAA,UACF;AAAA,QACF;AAAA,MACF,KAAK;AAAe,eAClB;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACJ,WAAW,KAAK,MAAM;AAAA,YACtB,MAAK;AAAA,YACL,OAAQ,MAAM,QAAQ,KAAK,MAAM,KAAK,IAAI,KAAK,MAAM,QAAQ,CAAC,KAAK,MAAM,KAAK;AAAA;AAAA,QAChF;AAAA,MAEF,KAAK;AAAc,eACjB;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACJ,WAAW,KAAK,MAAM;AAAA,YACtB,MAAK;AAAA,YACL,OAAQ,MAAM,QAAQ,KAAK,MAAM,KAAK,IAAI,KAAK,MAAM,QAAQ,CAAC,KAAK,MAAM,KAAK;AAAA;AAAA,QAChF;AAAA,MAEF,KAAK;AAAW,eACd;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACJ,MAAK;AAAA,YACL,OAAQ,MAAM,QAAQ,KAAK,MAAM,KAAK,IAAI,KAAK,MAAM,QAAQ,CAAC,KAAK,MAAM,KAAK;AAAA,YAC9E,QAAQ;AAAA;AAAA,QACV;AAAA,MAEF;AACE,gBAAQ,KAAK,6BAA6B,KAAK,MAAM,SAAS,UAAU,KAAK,MAAM,WAAW,IAAI,EAAE;AACpG,eAAO;AAAA,IACX;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WACE,oBAAC,SAAI,eAAa,gBAAc,KAAK,MAAM,WACxC,eAAK,WAAW,GACnB;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"123acbe81166b3a98d021f01f94ef258a8456edf"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Yi=function(){return s},s}Yi();const ERe=(Yi().s[0]++,["background-pattern","fill-pattern","line-pattern","fill-extrusion-pattern","icon-image"]);class $_ extends En.Component{childNodes(){Yi().f[0]++;const e=(Yi().s[1]++,{fieldSpec:this.props.fieldSpec,label:this.props.label,action:this.props.action,style:this.props.style,value:this.props.value,default:this.props.fieldSpec?.default,name:this.props.fieldName,"data-wd-key":"spec-field-input:"+this.props.fieldName,onChange:t=>(Yi().f[1]++,Yi().s[2]++,this.props.onChange(this.props.fieldName,t)),"aria-label":this.props["aria-label"]});switch(Yi().s[3]++,this.props.fieldSpec?.type){case"number":return Yi().b[0][0]++,Yi().s[4]++,ie.jsx(i1,{...e,min:this.props.fieldSpec.minimum,max:this.props.fieldSpec.maximum});case"enum":Yi().b[0][1]++;{const t=(Yi().s[5]++,Object.keys((Yi().b[1][0]++,this.props.fieldSpec.values||(Yi().b[1][1]++,[]))).map(i=>(Yi().f[2]++,Yi().s[6]++,[i,ZK(i)])));return Yi().s[7]++,ie.jsx(mL,{...e,options:t})}case"resolvedImage":Yi().b[0][2]++;case"formatted":Yi().b[0][3]++;case"string":if(Yi().b[0][4]++,Yi().s[8]++,ERe.indexOf(this.props.fieldName)>=0){Yi().b[2][0]++;const t=(Yi().s[9]++,Yi().b[3][0]++,this.props.fieldSpec.values||(Yi().b[3][1]++,[]));return Yi().s[10]++,ie.jsx(lM,{...e,options:t.map(i=>(Yi().f[3]++,Yi().s[11]++,[i,i]))})}else return Yi().b[2][1]++,Yi().s[12]++,ie.jsx(dm,{...e});case"color":return Yi().b[0][5]++,Yi().s[13]++,ie.jsx(pL,{...e});case"boolean":return Yi().b[0][6]++,Yi().s[14]++,ie.jsx(Kse,{...e});case"array":return Yi().b[0][7]++,Yi().s[15]++,this.props.fieldName==="text-font"?(Yi().b[4][0]++,Yi().s[16]++,ie.jsx(SRe,{...e,fonts:this.props.fieldSpec.values})):(Yi().b[4][1]++,Yi().s[17]++,this.props.fieldSpec.length?(Yi().b[5][0]++,Yi().s[18]++,ie.jsx(ED,{...e,type:this.props.fieldSpec.value,length:this.props.fieldSpec.length})):(Yi().b[5][1]++,Yi().s[19]++,ie.jsx(mw,{...e,fieldSpec:this.props.fieldSpec,type:this.props.fieldSpec.value})));case"numberArray":return Yi().b[0][8]++,Yi().s[20]++,ie.jsx(mw,{...e,fieldSpec:this.props.fieldSpec,type:"number",value:Array.isArray(this.props.value)?(Yi().b[6][0]++,this.props.value):(Yi().b[6][1]++,[this.props.value])});case"colorArray":return Yi().b[0][9]++,Yi().s[21]++,ie.jsx(mw,{...e,fieldSpec:this.props.fieldSpec,type:"color",value:Array.isArray(this.props.value)?(Yi().b[7][0]++,this.props.value):(Yi().b[7][1]++,[this.props.value])});case"padding":return Yi().b[0][10]++,Yi().s[22]++,ie.jsx(ED,{...e,type:"number",value:Array.isArray(this.props.value)?(Yi().b[8][0]++,this.props.value):(Yi().b[8][1]++,[this.props.value]),length:4});default:return Yi().b[0][11]++,Yi().s[23]++,console.warn(`No proper field input for ${this.props.fieldName} type: ${this.props.fieldSpec?.type}`),Yi().s[24]++,null}}render(){return Yi().f[4]++,Yi().s[25]++,ie.jsx("div",{"data-wd-key":"spec-field:"+this.props.fieldName,children:this.childNodes()})}}function Rc(){var n="/home/runner/work/maputnik/maputnik/src/components/Fieldset.tsx",e="92ea2bb9889070368abe40f809481200c126aae8",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/Fieldset.tsx",statementMap:{0:{start:{line:7,column:17},end:{line:30,column:1}},1:{start:{line:8,column:32},end:{line:8,column:53}},2:{start:{line:9,column:18},end:{line:9,column:67}},3:{start:{line:10,column:22},end:{line:12,column:3}},4:{start:{line:11,column:4},end:{line:11,column:20}},5:{start:{line:13,column:2},end:{line:29,column:7}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:17},end:{line:7,column:18}},loc:{start:{line:7,column:28},end:{line:30,column:1}},line:7},1:{name:"(anonymous_1)",decl:{start:{line:10,column:22},end:{line:10,column:23}},loc:{start:{line:10,column:31},end:{line:12,column:3}},line:10}},branchMap:{0:{loc:{start:{line:14,column:4},end:{line:21,column:8}},type:"binary-expr",locations:[{start:{line:14,column:4},end:{line:14,column:19}},{start:{line:14,column:39},end:{line:21,column:8}}],line:14},1:{loc:{start:{line:22,column:4},end:{line:25,column:32}},type:"binary-expr",locations:[{start:{line:22,column:4},end:{line:22,column:20}},{start:{line:22,column:40},end:{line:25,column:32}}],line:22},2:{loc:{start:{line:28,column:4},end:{line:28,column:198}},type:"binary-expr",locations:[{start:{line:28,column:4},end:{line:28,column:19}},{start:{line:28,column:39},end:{line:28,column:198}}],line:28},3:{loc:{start:{line:28,column:104},end:{line:28,column:125}},type:"cond-expr",locations:[{start:{line:28,column:114},end:{line:28,column:116}},{start:{line:28,column:119},end:{line:28,column:125}}],line:28}},s:{0:0,1:0,2:0,3:0,4:0,5:0},f:{0:0,1:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Fieldset.tsx"],names:[],mappings:"AAuBI,SAGM,KAHN;AAvBJ,OAAO,WAA0D;AACjE,OAAO,gBAAgB;AACvB,OAAO,mBAAmB;AAC1B,OAAO,SAAS;AAChB,OAAO,sBAAsB;AAU7B,MAAM,WAAoC,CAAC,UAAU;AACnD,QAAM,CAAC,SAAS,UAAU,IAAI,MAAM,SAAS,KAAK;AAClD,QAAM,UAAU,MAAM,OAAO,iBAAiB,iBAAiB,CAAC;AAEhE,QAAM,cAAc,CAAC,QAAiB;AACpC,eAAW,GAAG;AAAA,EAChB;AAEA,SACE,qBAAC,SAAI,WAAU,wBAAuB,MAAK,SAAQ,mBAAiB,QAAQ,SACzE;AAAA,UAAM,aACL,oBAAC,SAAI,WAAU,8BACb;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,MAAM;AAAA,QACb;AAAA,QACA,WAAW,MAAM;AAAA;AAAA,IACnB,GACF;AAAA,IAED,CAAC,MAAM,aACN,oBAAC,SAAI,WAAW,WAAW;AAAA,MACzB,8BAA8B;AAAA,MAC9B,+BAA+B,MAAM;AAAA,IACvC,CAAC,GACE,gBAAM,OACT;AAAA,IAEF,oBAAC,SAAI,WAAU,+BAA+B,gBAAM,QAAO;AAAA,IAC3D,oBAAC,SAAI,WAAU,gCAAgC,gBAAM,UAAS;AAAA,IAC7D,MAAM,aACL,oBAAC,SAAI,WAAU,uBAAsB,OAAO,EAAE,SAAS,UAAU,KAAK,OAAO,GAC3E,8BAAC,OAAI,WAAW,MAAM,WAAW,GACnC;AAAA,KAEJ;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"92ea2bb9889070368abe40f809481200c126aae8"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Rc=function(){return s},s}Rc();Rc().s[0]++;const My=n=>{Rc().f[0]++;const[e,t]=(Rc().s[1]++,En.useState(!1)),i=(Rc().s[2]++,En.useRef(cx("fieldset_label_")));Rc().s[3]++;const r=o=>{Rc().f[1]++,Rc().s[4]++,t(o)};return Rc().s[5]++,ie.jsxs("div",{className:"maputnik-input-block",role:"group","aria-labelledby":i.current,children:[(Rc().b[0][0]++,n.fieldSpec&&(Rc().b[0][1]++,ie.jsx("div",{className:"maputnik-input-block-label",children:ie.jsx(DU,{label:n.label,onToggleDoc:r,fieldSpec:n.fieldSpec})}))),(Rc().b[1][0]++,!n.fieldSpec&&(Rc().b[1][1]++,ie.jsx("div",{className:Yg({"maputnik-input-block-label":!0,"maputnik-input-block--error":n.error}),children:n.label}))),ie.jsx("div",{className:"maputnik-input-block-action",children:n.action}),ie.jsx("div",{className:"maputnik-input-block-content",children:n.children}),(Rc().b[2][0]++,n.fieldSpec&&(Rc().b[2][1]++,ie.jsx("div",{className:"maputnik-doc-inline",style:{display:e?(Rc().b[3][0]++,""):(Rc().b[3][1]++,"none")},children:ie.jsx(t6,{fieldSpec:n.fieldSpec})})))]})};function Ko(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldSpec.tsx",e="93d4690989e2b2b09b13eab9ee3382c32a103823",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldSpec.tsx",statementMap:{0:{start:{line:6,column:2},end:{line:34,column:3}},1:{start:{line:8,column:6},end:{line:8,column:19}},2:{start:{line:10,column:6},end:{line:10,column:74}},3:{start:{line:12,column:6},end:{line:12,column:19}},4:{start:{line:14,column:6},end:{line:14,column:22}},5:{start:{line:16,column:6},end:{line:16,column:19}},6:{start:{line:18,column:6},end:{line:18,column:19}},7:{start:{line:20,column:6},end:{line:20,column:19}},8:{start:{line:22,column:6},end:{line:22,column:19}},9:{start:{line:24,column:6},end:{line:24,column:19}},10:{start:{line:26,column:6},end:{line:26,column:22}},11:{start:{line:28,column:6},end:{line:28,column:22}},12:{start:{line:30,column:6},end:{line:30,column:22}},13:{start:{line:32,column:6},end:{line:32,column:58}},14:{start:{line:33,column:6},end:{line:33,column:19}},15:{start:{line:36,column:18},end:{line:39,column:1}},16:{start:{line:37,column:20},end:{line:37,column:55}},17:{start:{line:38,column:2},end:{line:38,column:190}}},fnMap:{0:{name:"getElementFromType",decl:{start:{line:5,column:9},end:{line:5,column:27}},loc:{start:{line:5,column:39},end:{line:35,column:1}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:36,column:18},end:{line:36,column:19}},loc:{start:{line:36,column:29},end:{line:39,column:1}},line:36}},branchMap:{0:{loc:{start:{line:6,column:2},end:{line:34,column:3}},type:"switch",locations:[{start:{line:7,column:4},end:{line:8,column:19}},{start:{line:9,column:4},end:{line:10,column:74}},{start:{line:11,column:4},end:{line:12,column:19}},{start:{line:13,column:4},end:{line:14,column:22}},{start:{line:15,column:4},end:{line:16,column:19}},{start:{line:17,column:4},end:{line:18,column:19}},{start:{line:19,column:4},end:{line:20,column:19}},{start:{line:21,column:4},end:{line:22,column:19}},{start:{line:23,column:4},end:{line:24,column:19}},{start:{line:25,column:4},end:{line:26,column:22}},{start:{line:27,column:4},end:{line:28,column:22}},{start:{line:29,column:4},end:{line:30,column:22}},{start:{line:31,column:4},end:{line:33,column:19}}],line:6},1:{loc:{start:{line:10,column:13},end:{line:10,column:73}},type:"cond-expr",locations:[{start:{line:10,column:57},end:{line:10,column:65}},{start:{line:10,column:68},end:{line:10,column:73}}],line:10}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0},f:{0:0,1:0},b:{0:[0,0,0,0,0,0,0,0,0,0,0,0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldSpec.tsx"],names:[],mappings:"AA2CM;AA3CN,OAAO,WAAgC;AACvC,OAAO,eAA4D;AACnE,OAAO,cAAsC;AAE7C,SAAS,mBAAmB,WAAyF;AACnH,UAAO,UAAU,MAAM;AAAA,IACrB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAQ,OAAO,KAAK,UAAU,MAAO,EAAE,UAAU,IAAI,WAAW;AAAA,IAClE,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,cAAQ,KAAK,uBAAuB,UAAU,IAAI;AAClD,aAAO;AAAA,EACX;AACF;AAIA,MAAM,YAAsC,CAAC,UAAU;AACrD,QAAM,YAAY,mBAAmB,MAAM,SAAU;AAErD,SACE,oBAAC,aAAU,OAAO,MAAM,OAAO,QAAQ,MAAM,QAAQ,WAAW,MAAM,WAAW,OAAO,MAAM,OAC5F,8BAAC,aAAW,GAAG,OAAO,GACxB;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"93d4690989e2b2b09b13eab9ee3382c32a103823"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Ko=function(){return s},s}Ko();function ORe(n){switch(Ko().f[0]++,Ko().s[0]++,n.type){case"color":return Ko().b[0][0]++,Ko().s[1]++,Fs;case"enum":return Ko().b[0][1]++,Ko().s[2]++,Object.keys(n.values).length<=3?(Ko().b[1][0]++,My):(Ko().b[1][1]++,Fs);case"boolean":return Ko().b[0][2]++,Ko().s[3]++,Fs;case"array":return Ko().b[0][3]++,Ko().s[4]++,My;case"resolvedImage":return Ko().b[0][4]++,Ko().s[5]++,Fs;case"number":return Ko().b[0][5]++,Ko().s[6]++,Fs;case"string":return Ko().b[0][6]++,Ko().s[7]++,Fs;case"formatted":return Ko().b[0][7]++,Ko().s[8]++,Fs;case"padding":return Ko().b[0][8]++,Ko().s[9]++,Fs;case"numberArray":return Ko().b[0][9]++,Ko().s[10]++,My;case"colorArray":return Ko().b[0][10]++,Ko().s[11]++,My;case"variableAnchorOffsetCollection":return Ko().b[0][11]++,Ko().s[12]++,My;default:return Ko().b[0][12]++,Ko().s[13]++,console.warn("No such type for: "+n.type),Ko().s[14]++,Fs}}Ko().s[15]++;const BRe=n=>{Ko().f[1]++;const e=(Ko().s[16]++,ORe(n.fieldSpec));return Ko().s[17]++,ie.jsx(e,{label:n.label,action:n.action,fieldSpec:n.fieldSpec,error:n.error,children:ie.jsx($_,{...n})})};function ou(){var n="/home/runner/work/maputnik/maputnik/src/components/_FunctionButtons.tsx",e="8e77c8fbe0fbc5796ba925837fc7526418b4854b",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/_FunctionButtons.tsx",statementMap:{0:{start:{line:9,column:14},end:{line:9,column:26}},1:{start:{line:10,column:4},end:{line:60,column:5}},2:{start:{line:11,column:52},end:{line:19,column:7}},3:{start:{line:20,column:50},end:{line:28,column:7}},4:{start:{line:30,column:6},end:{line:40,column:7}},5:{start:{line:31,column:8},end:{line:39,column:10}},6:{start:{line:41,column:6},end:{line:45,column:11}},7:{start:{line:46,column:11},end:{line:60,column:5}},8:{start:{line:47,column:51},end:{line:56,column:7}},9:{start:{line:57,column:6},end:{line:57,column:76}},10:{start:{line:59,column:6},end:{line:59,column:44}},11:{start:{line:63,column:29},end:{line:63,column:76}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:11},end:{line:61,column:3}},line:8}},branchMap:{0:{loc:{start:{line:10,column:4},end:{line:60,column:5}},type:"if",locations:[{start:{line:10,column:4},end:{line:60,column:5}},{start:{line:46,column:11},end:{line:60,column:5}}],line:10},1:{loc:{start:{line:30,column:6},end:{line:40,column:7}},type:"if",locations:[{start:{line:30,column:6},end:{line:40,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:30},2:{loc:{start:{line:46,column:11},end:{line:60,column:5}},type:"if",locations:[{start:{line:46,column:11},end:{line:60,column:5}},{start:{line:58,column:11},end:{line:60,column:5}}],line:46}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_FunctionButtons.tsx"],names:[],mappings:"AA0BU,cAsBG,YAtBH;AA1BV,OAAO,WAAW;AAElB,OAAO,iBAAiB;AACxB,SAAQ,aAAa,qBAAoB;AACzC,SAAS,sBAAsB;AAC/B,SAA+B,uBAAuB;AAUtD,MAAM,qCAAqC,MAAM,UAA6C;AAAA,EAC5F,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AAErB,QAAI,KAAK,MAAM,UAAU,YAAY,WAAW,SAAS,MAAM,GAAG;AAChE,YAAM,wBACJ;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAS,KAAK,MAAM;AAAA,UACpB,OAAO,EAAE,uBAAuB;AAAA,UAEhC,8BAAC,kBAAe;AAAA;AAAA,MAClB;AAGF,YAAM,sBAAsB;AAAA,QAAC;AAAA;AAAA,UAC3B,WAAU;AAAA,UACV,SAAS,KAAK,MAAM;AAAA,UACpB,OAAO,EAAE,uCAAuC;AAAA,UAEhD,8BAAC,eAAY;AAAA;AAAA,MACf;AAEA,UAAI;AACJ,UAAI,KAAK,MAAM,UAAU,eAAe,MAAM,eAAe;AAC3D,8BAAsB;AAAA,UAAC;AAAA;AAAA,YACrB,WAAU;AAAA,YACV,SAAS,KAAK,MAAM;AAAA,YACpB,OAAO,EAAE,mCAAmC;AAAA,YAE5C,8BAAC,iBAAc;AAAA;AAAA,QACjB;AAAA,MACF;AACA,aAAO,qBAAC,SACL;AAAA;AAAA,QACA;AAAA,QACA;AAAA,SACH;AAAA,IACF,WAAW,KAAK,MAAM,UAAU,YAAY,WAAW,SAAS,WAAW,GAAG;AAC5E,YAAM,uBAAuB;AAAA,QAAC;AAAA;AAAA,UAC5B,WAAU;AAAA,UACV,SAAS,KAAK,MAAM;AAAA,UACpB,OAAO,EAAE,4CAA4C;AAAA,UACrD,eAAY;AAAA,UAEZ,8BAAC,eAAY;AAAA;AAAA,MACf;AACA,aAAO,oBAAC,SAAK,gCAAqB;AAAA,IACpC,OAAO;AACL,aAAO,oBAAC,SAAI;AAAA,IACd;AAAA,EACF;AACF;AAEA,MAAM,uBAAuB,gBAAgB,EAAE,4BAA4B;AAC3E,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8e77c8fbe0fbc5796ba925837fc7526418b4854b"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return ou=function(){return s},s}ou();class IRe extends En.Component{render(){ou().f[0]++;const e=(ou().s[0]++,this.props.t);if(ou().s[1]++,this.props.fieldSpec.expression?.parameters.includes("zoom")){ou().b[0][0]++;const t=(ou().s[2]++,ie.jsx(Js,{className:"maputnik-make-zoom-function",onClick:this.props.onExpressionClick,title:e("Convert to expression"),children:ie.jsx(b4,{})})),i=(ou().s[3]++,ie.jsx(Js,{className:"maputnik-make-zoom-function",onClick:this.props.onZoomClick,title:e("Convert property into a zoom function"),children:ie.jsx(QF,{})}));let r;return ou().s[4]++,this.props.fieldSpec["property-type"]==="data-driven"?(ou().b[1][0]++,ou().s[5]++,r=ie.jsx(Js,{className:"maputnik-make-data-function",onClick:this.props.onDataClick,title:e("Convert property to data function"),children:ie.jsx(Tfe,{})})):ou().b[1][1]++,ou().s[6]++,ie.jsxs("div",{children:[t,r,i]})}else if(ou().b[0][1]++,ou().s[7]++,this.props.fieldSpec.expression?.parameters.includes("elevation")){ou().b[2][0]++;const t=(ou().s[8]++,ie.jsx(Js,{className:"maputnik-make-elevation-function",onClick:this.props.onElevationClick,title:e("Convert property into a elevation function"),"data-wd-key":"make-elevation-function",children:ie.jsx(QF,{})}));return ou().s[9]++,ie.jsx("div",{children:t})}else return ou().b[2][1]++,ou().s[10]++,ie.jsx("div",{})}}const kRe=(ou().s[11]++,Jo()(IRe));function dg(){var n="/home/runner/work/maputnik/maputnik/src/components/_SpecProperty.tsx",e="3e6c7200aa37e60f3f49ecaa91bce3a63befeb7e",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/_SpecProperty.tsx",statementMap:{0:{start:{line:7,column:24},end:{line:9,column:3}},1:{start:{line:11,column:45},end:{line:11,column:55}},2:{start:{line:12,column:40},end:{line:21,column:5}},3:{start:{line:22,column:18},end:{line:22,column:53}},4:{start:{line:23,column:4},end:{line:32,column:6}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:33,column:3}},line:10}},branchMap:{0:{loc:{start:{line:29,column:34},end:{line:29,column:60}},type:"binary-expr",locations:[{start:{line:29,column:34},end:{line:29,column:54}},{start:{line:29,column:58},end:{line:29,column:60}}],line:29}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_SpecProperty.tsx"],names:[],mappings:"AA6BwB;AA7BxB,OAAO,WAAW;AAElB,OAAO,eAAsC;AAC7C,OAAO,qBAAqB;AAE5B,OAAO,wBAAwB;AAgB/B,qBAAqB,qBAAqB,MAAM,UAA6B;AAAA,EAC3E,OAAO,eAAe;AAAA,IACpB,QAAQ,CAAC;AAAA,EACX;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,QAAQ,WAAW,UAAS,IAAI,KAAK;AAE5C,UAAM,cAAc;AAAA,MAAC;AAAA;AAAA,QACnB,WAAW,KAAK,MAAM;AAAA,QACtB,aAAa,KAAK,MAAM;AAAA,QACxB,aAAa,KAAK,MAAM;AAAA,QACxB,mBAAmB,KAAK,MAAM;AAAA,QAC9B,kBAAkB,KAAK,MAAM;AAAA;AAAA,IAC/B;AAEA,UAAM,QAAQ,OAAQ,YAAU,MAAI,SAAgB;AAEpD,WAAO;AAAA,MAAC;AAAA;AAAA,QACL,GAAG,KAAK;AAAA,QACT;AAAA,QACA,WAAW,KAAK,MAAM;AAAA,QACtB,OAAO,mBAAmB,KAAK,MAAM,aAAa,EAAE;AAAA,QACpD,QAAQ;AAAA;AAAA,IACV;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"3e6c7200aa37e60f3f49ecaa91bce3a63befeb7e"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return dg=function(){return s},s}dg();class TRe extends En.Component{static defaultProps=(dg().s[0]++,{errors:{}});render(){dg().f[0]++;const{errors:e,fieldName:t,fieldType:i}=(dg().s[1]++,this.props),r=(dg().s[2]++,ie.jsx(kRe,{fieldSpec:this.props.fieldSpec,onZoomClick:this.props.onZoomClick,onDataClick:this.props.onDataClick,onExpressionClick:this.props.onExpressionClick,onElevationClick:this.props.onElevationClick})),o=(dg().s[3]++,e[i+"."+t]);return dg().s[4]++,ie.jsx(BRe,{...this.props,error:o,fieldSpec:this.props.fieldSpec,label:S6((dg().b[0][0]++,this.props.fieldName||(dg().b[0][1]++,""))),action:r})}}function Qh(){var n="/home/runner/work/maputnik/maputnik/src/libs/sort-numerically.ts",e="e8906f642b33ab7d7a780fc0db870f7e4872d29c",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/sort-numerically.ts",statementMap:{0:{start:{line:2,column:12},end:{line:2,column:17}},1:{start:{line:3,column:12},end:{line:3,column:17}},2:{start:{line:4,column:2},end:{line:10,column:3}},3:{start:{line:5,column:4},end:{line:5,column:14}},4:{start:{line:6,column:9},end:{line:10,column:3}},5:{start:{line:7,column:4},end:{line:7,column:13}},6:{start:{line:9,column:4},end:{line:9,column:13}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:1,column:15},end:{line:1,column:16}},loc:{start:{line:1,column:36},end:{line:11,column:1}},line:1}},branchMap:{0:{loc:{start:{line:4,column:2},end:{line:10,column:3}},type:"if",locations:[{start:{line:4,column:2},end:{line:10,column:3}},{start:{line:6,column:9},end:{line:10,column:3}}],line:4},1:{loc:{start:{line:6,column:9},end:{line:10,column:3}},type:"if",locations:[{start:{line:6,column:9},end:{line:10,column:3}},{start:{line:8,column:9},end:{line:10,column:3}}],line:6}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/sort-numerically.ts"],names:[],mappings:"AAAA,wBAAwB,MAAuB,MAAsB;AACnE,QAAM,IAAI,CAAC;AACX,QAAM,IAAI,CAAC;AAEX,MAAG,IAAI,GAAG;AACR,WAAO;AAAA,EACT,WACQ,IAAI,GAAG;AACb,WAAO;AAAA,EACT,OACK;AACH,WAAO;AAAA,EACT;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e8906f642b33ab7d7a780fc0db870f7e4872d29c"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Qh=function(){return s},s}Qh();function Lse(n,e){Qh().f[0]++;const t=(Qh().s[0]++,+n),i=(Qh().s[1]++,+e);return Qh().s[2]++,t<i?(Qh().b[0][0]++,Qh().s[3]++,-1):(Qh().b[0][1]++,Qh().s[4]++,t>i?(Qh().b[1][0]++,Qh().s[5]++,1):(Qh().b[1][1]++,Qh().s[6]++,0))}function Hp(){var n="/home/runner/work/maputnik/maputnik/src/libs/spec-helper.ts",e="2f98128f0f990b67a049c58486c1fab4310fbcfa",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/spec-helper.ts",statementMap:{0:{start:{line:2,column:2},end:{line:4,column:3}},1:{start:{line:3,column:4},end:{line:3,column:24}},2:{start:{line:5,column:19},end:{line:11,column:3}},3:{start:{line:12,column:2},end:{line:12,column:35}}},fnMap:{0:{name:"findDefaultFromSpec",decl:{start:{line:1,column:16},end:{line:1,column:35}},loc:{start:{line:1,column:42},end:{line:13,column:1}},line:1}},branchMap:{0:{loc:{start:{line:2,column:2},end:{line:4,column:3}},type:"if",locations:[{start:{line:2,column:2},end:{line:4,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:2},1:{loc:{start:{line:12,column:9},end:{line:12,column:34}},type:"binary-expr",locations:[{start:{line:12,column:9},end:{line:12,column:28}},{start:{line:12,column:32},end:{line:12,column:34}}],line:12}},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/spec-helper.ts"],names:[],mappings:"AAGO,gBAAS,oBAAoB,MAAyE;AAC3G,MAAI,OAAO,UAAU,eAAe,KAAK,MAAM,SAAS,GAAG;AACzD,WAAO,KAAK;AAAA,EACd;AAEA,QAAM,WAAW;AAAA,IACf,SAAS;AAAA,IACT,UAAU;AAAA,IACV,WAAW;AAAA,IACX,UAAU;AAAA,IACV,SAAS,CAAC;AAAA,EACZ;AAEA,SAAO,SAAS,KAAK,IAAI,KAAK;AAChC;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2f98128f0f990b67a049c58486c1fab4310fbcfa"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Hp=function(){return s},s}Hp();function Nf(n){if(Hp().f[0]++,Hp().s[0]++,Object.prototype.hasOwnProperty.call(n,"default"))return Hp().b[0][0]++,Hp().s[1]++,n.default;Hp().b[0][1]++;const e=(Hp().s[2]++,{color:"#000000",string:"",boolean:!1,number:0,array:[]});return Hp().s[3]++,Hp().b[1][0]++,e[n.type]||(Hp().b[1][1]++,"")}function V_(){var n="/home/runner/work/maputnik/maputnik/src/components/_DeleteStopButton.tsx",e="03de18cded5f486201afd886787bbdda710eafe3",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/_DeleteStopButton.tsx",statementMap:{0:{start:{line:8,column:14},end:{line:8,column:26}},1:{start:{line:9,column:4},end:{line:17,column:6}},2:{start:{line:20,column:25},end:{line:20,column:68}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:11},end:{line:18,column:3}},line:7}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_DeleteStopButton.tsx"],names:[],mappings:"AAoBM;AApBN,OAAO,WAAW;AAElB,OAAO,iBAAiB;AACxB,SAAQ,gBAAe;AACvB,SAA+B,uBAAuB;AAQtD,MAAM,iCAAiC,MAAM,UAAyC;AAAA,EACpF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,SAAS,KAAK,MAAM;AAAA,QACpB,OAAO,EAAE,6BAA6B;AAAA,QAEtC,8BAAC,YAAS;AAAA;AAAA,IACZ;AAAA,EACF;AACF;AAEA,MAAM,mBAAmB,gBAAgB,EAAE,wBAAwB;AACnE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"03de18cded5f486201afd886787bbdda710eafe3"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return V_=function(){return s},s}V_();class RRe extends En.Component{render(){V_().f[0]++;const e=(V_().s[0]++,this.props.t);return V_().s[1]++,ie.jsx(Js,{className:"maputnik-delete-stop",onClick:this.props.onClick,title:e("Remove zoom level from stop"),children:ie.jsx(Kb,{})})}}const Fse=(V_().s[2]++,Jo()(RRe));function Zt(){var n="/home/runner/work/maputnik/maputnik/src/components/_DataProperty.tsx",e="a1f2034e8330e69a4f4de946d81cea8ff55472f7",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/_DataProperty.tsx",statementMap:{0:{start:{line:20,column:2},end:{line:29,column:3}},1:{start:{line:21,column:4},end:{line:28,column:7}},2:{start:{line:22,column:6},end:{line:27,column:7}},3:{start:{line:23,column:8},end:{line:25,column:9}},4:{start:{line:24,column:10},end:{line:24,column:33}},5:{start:{line:26,column:8},end:{line:26,column:39}},6:{start:{line:30,column:2},end:{line:30,column:17}},7:{start:{line:33,column:10},end:{line:35,column:3}},8:{start:{line:37,column:20},end:{line:37,column:55}},9:{start:{line:38,column:4},end:{line:42,column:5}},10:{start:{line:39,column:6},end:{line:41,column:9}},11:{start:{line:45,column:20},end:{line:45,column:45}},12:{start:{line:46,column:4},end:{line:50,column:5}},13:{start:{line:47,column:6},end:{line:49,column:8}},14:{start:{line:51,column:4},end:{line:51,column:16}},15:{start:{line:54,column:4},end:{line:56,column:5}},16:{start:{line:55,column:6},end:{line:55,column:27}},17:{start:{line:57,column:4},end:{line:59,column:5}},18:{start:{line:58,column:6},end:{line:58,column:24}},19:{start:{line:60,column:4},end:{line:60,column:25}},20:{start:{line:63,column:4},end:{line:67,column:5}},21:{start:{line:64,column:6},end:{line:64,column:83}},22:{start:{line:66,column:6},end:{line:66,column:53}},23:{start:{line:71,column:26},end:{line:76,column:70}},24:{start:{line:72,column:6},end:{line:75,column:8}},25:{start:{line:76,column:22},end:{line:76,column:69}},26:{start:{line:77,column:20},end:{line:77,column:22}},27:{start:{line:78,column:4},end:{line:80,column:7}},28:{start:{line:79,column:6},end:{line:79,column:30}},29:{start:{line:81,column:4},end:{line:83,column:7}},30:{start:{line:84,column:4},end:{line:84,column:50}},31:{start:{line:84,column:39},end:{line:84,column:48}},32:{start:{line:86,column:13},end:{line:106,column:3}},33:{start:{line:87,column:4},end:{line:104,column:5}},34:{start:{line:88,column:6},end:{line:91,column:8}},35:{start:{line:93,column:24},end:{line:93,column:61}},36:{start:{line:94,column:6},end:{line:103,column:8}},37:{start:{line:105,column:4},end:{line:105,column:42}},38:{start:{line:108,column:18},end:{line:108,column:56}},39:{start:{line:109,column:4},end:{line:115,column:6}},40:{start:{line:116,column:25},end:{line:116,column:53}},41:{start:{line:117,column:25},end:{line:120,column:5}},42:{start:{line:121,column:4},end:{line:121,column:54}},43:{start:{line:124,column:25},end:{line:127,column:5}},44:{start:{line:128,column:4},end:{line:130,column:5}},45:{start:{line:129,column:6},end:{line:129,column:34}},46:{start:{line:131,column:4},end:{line:131,column:60}},47:{start:{line:134,column:4},end:{line:141,column:5}},48:{start:{line:135,column:6},end:{line:135,column:42}},49:{start:{line:137,column:6},end:{line:140,column:9}},50:{start:{line:144,column:4},end:{line:148,column:5}},51:{start:{line:145,column:6},end:{line:145,column:43}},52:{start:{line:147,column:6},end:{line:147,column:40}},53:{start:{line:149,column:4},end:{line:149,column:58}},54:{start:{line:152,column:14},end:{line:152,column:26}},55:{start:{line:153,column:4},end:{line:155,column:5}},56:{start:{line:154,column:6},end:{line:154,column:78}},57:{start:{line:157,column:4},end:{line:205,column:5}},58:{start:{line:158,column:6},end:{line:204,column:9}},59:{start:{line:159,column:26},end:{line:159,column:77}},60:{start:{line:160,column:20},end:{line:160,column:40}},61:{start:{line:161,column:26},end:{line:161,column:79}},62:{start:{line:162,column:22},end:{line:162,column:29}},63:{start:{line:163,column:46},end:{line:163,column:122}},64:{start:{line:164,column:26},end:{line:169,column:9}},65:{start:{line:168,column:33},end:{line:168,column:97}},66:{start:{line:171,column:8},end:{line:175,column:9}},67:{start:{line:172,column:10},end:{line:172,column:73}},68:{start:{line:174,column:10},end:{line:174,column:73}},69:{start:{line:176,column:24},end:{line:176,column:28}},70:{start:{line:177,column:8},end:{line:188,column:9}},71:{start:{line:178,column:10},end:{line:187,column:15}},72:{start:{line:183,column:37},end:{line:183,column:101}},73:{start:{line:189,column:8},end:{line:203,column:18}},74:{start:{line:199,column:41},end:{line:199,column:110}},75:{start:{line:206,column:4},end:{line:306,column:12}},76:{start:{line:217,column:39},end:{line:217,column:67}},77:{start:{line:235,column:43},end:{line:235,column:68}},78:{start:{line:250,column:39},end:{line:250,column:83}},79:{start:{line:266,column:42},end:{line:266,column:85}},80:{start:{line:309,column:21},end:{line:309,column:60}}},fnMap:{0:{name:"setStopRefs",decl:{start:{line:18,column:9},end:{line:18,column:20}},loc:{start:{line:18,column:35},end:{line:31,column:1}},line:18},1:{name:"(anonymous_1)",decl:{start:{line:21,column:30},end:{line:21,column:31}},loc:{start:{line:21,column:45},end:{line:28,column:5}},line:21},2:{name:"(anonymous_2)",decl:{start:{line:36,column:2},end:{line:36,column:3}},loc:{start:{line:36,column:22},end:{line:43,column:3}},line:36},3:{name:"(anonymous_3)",decl:{start:{line:44,column:2},end:{line:44,column:3}},loc:{start:{line:44,column:48},end:{line:52,column:3}},line:44},4:{name:"(anonymous_4)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:34},end:{line:61,column:3}},line:53},5:{name:"(anonymous_5)",decl:{start:{line:62,column:2},end:{line:62,column:3}},loc:{start:{line:62,column:34},end:{line:68,column:3}},line:62},6:{name:"(anonymous_6)",decl:{start:{line:70,column:2},end:{line:70,column:3}},loc:{start:{line:70,column:26},end:{line:85,column:3}},line:70},7:{name:"(anonymous_7)",decl:{start:{line:71,column:36},end:{line:71,column:37}},loc:{start:{line:71,column:51},end:{line:76,column:5}},line:71},8:{name:"(anonymous_8)",decl:{start:{line:76,column:12},end:{line:76,column:13}},loc:{start:{line:76,column:22},end:{line:76,column:69}},line:76},9:{name:"(anonymous_9)",decl:{start:{line:78,column:26},end:{line:78,column:27}},loc:{start:{line:78,column:41},end:{line:80,column:5}},line:78},10:{name:"(anonymous_10)",decl:{start:{line:84,column:29},end:{line:84,column:30}},loc:{start:{line:84,column:39},end:{line:84,column:48}},line:84},11:{name:"(anonymous_11)",decl:{start:{line:86,column:13},end:{line:86,column:14}},loc:{start:{line:86,column:35},end:{line:106,column:3}},line:86},12:{name:"(anonymous_12)",decl:{start:{line:107,column:2},end:{line:107,column:3}},loc:{start:{line:107,column:41},end:{line:122,column:3}},line:107},13:{name:"(anonymous_13)",decl:{start:{line:123,column:2},end:{line:123,column:3}},loc:{start:{line:123,column:23},end:{line:132,column:3}},line:123},14:{name:"(anonymous_14)",decl:{start:{line:133,column:2},end:{line:133,column:3}},loc:{start:{line:133,column:26},end:{line:142,column:3}},line:133},15:{name:"(anonymous_15)",decl:{start:{line:143,column:2},end:{line:143,column:3}},loc:{start:{line:143,column:40},end:{line:150,column:3}},line:143},16:{name:"(anonymous_16)",decl:{start:{line:151,column:2},end:{line:151,column:3}},loc:{start:{line:151,column:11},end:{line:307,column:3}},line:151},17:{name:"(anonymous_17)",decl:{start:{line:158,column:46},end:{line:158,column:47}},loc:{start:{line:158,column:61},end:{line:204,column:7}},line:158},18:{name:"(anonymous_18)",decl:{start:{line:168,column:20},end:{line:168,column:21}},loc:{start:{line:168,column:33},end:{line:168,column:97}},line:168},19:{name:"(anonymous_19)",decl:{start:{line:183,column:24},end:{line:183,column:25}},loc:{start:{line:183,column:37},end:{line:183,column:101}},line:183},20:{name:"(anonymous_20)",decl:{start:{line:199,column:24},end:{line:199,column:25}},loc:{start:{line:199,column:41},end:{line:199,column:110}},line:199},21:{name:"(anonymous_21)",decl:{start:{line:217,column:26},end:{line:217,column:27}},loc:{start:{line:217,column:39},end:{line:217,column:67}},line:217},22:{name:"(anonymous_22)",decl:{start:{line:235,column:26},end:{line:235,column:27}},loc:{start:{line:235,column:43},end:{line:235,column:68}},line:235},23:{name:"(anonymous_23)",decl:{start:{line:250,column:26},end:{line:250,column:27}},loc:{start:{line:250,column:39},end:{line:250,column:83}},line:250},24:{name:"(anonymous_24)",decl:{start:{line:266,column:26},end:{line:266,column:27}},loc:{start:{line:266,column:42},end:{line:266,column:85}},line:266}},branchMap:{0:{loc:{start:{line:20,column:2},end:{line:29,column:3}},type:"if",locations:[{start:{line:20,column:2},end:{line:29,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:20},1:{loc:{start:{line:20,column:6},end:{line:20,column:38}},type:"binary-expr",locations:[{start:{line:20,column:6},end:{line:20,column:17}},{start:{line:20,column:21},end:{line:20,column:38}}],line:20},2:{loc:{start:{line:22,column:6},end:{line:27,column:7}},type:"if",locations:[{start:{line:22,column:6},end:{line:27,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:22},3:{loc:{start:{line:23,column:8},end:{line:25,column:9}},type:"if",locations:[{start:{line:23,column:8},end:{line:25,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:23},4:{loc:{start:{line:38,column:4},end:{line:42,column:5}},type:"if",locations:[{start:{line:38,column:4},end:{line:42,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:38},5:{loc:{start:{line:46,column:4},end:{line:50,column:5}},type:"if",locations:[{start:{line:46,column:4},end:{line:50,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:46},6:{loc:{start:{line:54,column:4},end:{line:56,column:5}},type:"if",locations:[{start:{line:54,column:4},end:{line:56,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:54},7:{loc:{start:{line:57,column:4},end:{line:59,column:5}},type:"if",locations:[{start:{line:57,column:4},end:{line:59,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:57},8:{loc:{start:{line:63,column:4},end:{line:67,column:5}},type:"if",locations:[{start:{line:63,column:4},end:{line:67,column:5}},{start:{line:65,column:11},end:{line:67,column:5}}],line:63},9:{loc:{start:{line:87,column:4},end:{line:104,column:5}},type:"if",locations:[{start:{line:87,column:4},end:{line:104,column:5}},{start:{line:92,column:11},end:{line:104,column:5}}],line:87},10:{loc:{start:{line:93,column:24},end:{line:93,column:61}},type:"cond-expr",locations:[{start:{line:93,column:55},end:{line:93,column:57}},{start:{line:93,column:60},end:{line:93,column:61}}],line:93},11:{loc:{start:{line:108,column:18},end:{line:108,column:56}},type:"binary-expr",locations:[{start:{line:108,column:18},end:{line:108,column:50}},{start:{line:108,column:54},end:{line:108,column:56}}],line:108},12:{loc:{start:{line:112,column:14},end:{line:112,column:58}},type:"cond-expr",locations:[{start:{line:112,column:41},end:{line:112,column:42}},{start:{line:112,column:45},end:{line:112,column:58}}],line:112},13:{loc:{start:{line:128,column:4},end:{line:130,column:5}},type:"if",locations:[{start:{line:128,column:4},end:{line:130,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:128},14:{loc:{start:{line:134,column:4},end:{line:141,column:5}},type:"if",locations:[{start:{line:134,column:4},end:{line:141,column:5}},{start:{line:136,column:11},end:{line:141,column:5}}],line:134},15:{loc:{start:{line:134,column:8},end:{line:134,column:70}},type:"binary-expr",locations:[{start:{line:134,column:8},end:{line:134,column:33}},{start:{line:134,column:37},end:{line:134,column:70}}],line:134},16:{loc:{start:{line:144,column:4},end:{line:148,column:5}},type:"if",locations:[{start:{line:144,column:4},end:{line:148,column:5}},{start:{line:146,column:11},end:{line:148,column:5}}],line:144},17:{loc:{start:{line:153,column:4},end:{line:155,column:5}},type:"if",locations:[{start:{line:153,column:4},end:{line:155,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:153},18:{loc:{start:{line:157,column:4},end:{line:205,column:5}},type:"if",locations:[{start:{line:157,column:4},end:{line:205,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:157},19:{loc:{start:{line:159,column:26},end:{line:159,column:77}},type:"cond-expr",locations:[{start:{line:159,column:56},end:{line:159,column:68}},{start:{line:159,column:71},end:{line:159,column:77}}],line:159},20:{loc:{start:{line:161,column:26},end:{line:161,column:79}},type:"cond-expr",locations:[{start:{line:161,column:56},end:{line:161,column:69}},{start:{line:161,column:72},end:{line:161,column:79}}],line:161},21:{loc:{start:{line:171,column:8},end:{line:175,column:9}},type:"if",locations:[{start:{line:171,column:8},end:{line:175,column:9}},{start:{line:173,column:15},end:{line:175,column:9}}],line:171},22:{loc:{start:{line:177,column:8},end:{line:188,column:9}},type:"if",locations:[{start:{line:177,column:8},end:{line:188,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:177},23:{loc:{start:{line:225,column:8},end:{line:240,column:9}},type:"binary-expr",locations:[{start:{line:225,column:8},end:{line:225,column:45}},{start:{line:225,column:65},end:{line:240,column:9}}],line:225},24:{loc:{start:{line:256,column:8},end:{line:271,column:9}},type:"binary-expr",locations:[{start:{line:256,column:8},end:{line:256,column:18}},{start:{line:256,column:38},end:{line:271,column:9}}],line:256},25:{loc:{start:{line:272,column:8},end:{line:280,column:15}},type:"binary-expr",locations:[{start:{line:272,column:8},end:{line:272,column:18}},{start:{line:272,column:38},end:{line:280,column:15}}],line:272},26:{loc:{start:{line:282,column:10},end:{line:292,column:11}},type:"binary-expr",locations:[{start:{line:282,column:10},end:{line:282,column:20}},{start:{line:282,column:40},end:{line:292,column:11}}],line:282}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_DataProperty.tsx"],names:[],mappings:"AAuO8B,cA8Bf,YA9Be;AAvO9B,OAAO,WAAW;AAClB,SAAQ,sBAAqB;AAC7B,SAAQ,sBAAqB;AAC7B,OAAO,YAAY;AAEnB,OAAO,iBAAiB;AACxB,OAAO,eAAe;AACtB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,qBAAqB;AAC5B,SAAQ,2BAA0B;AAClC,SAA+B,uBAAuB;AAEtD,OAAO,wBAAwB;AAC/B,OAAO,sBAAsB;AAK7B,SAAS,YAAY,OAAkC,OAA0B;AAE/E,MAAI;AAEJ,MAAG,MAAM,SAAS,MAAM,MAAM,OAAO;AACnC,UAAM,MAAM,MAAM,QAAQ,CAAC,MAAM,QAAQ;AACvC,UAAG,CAAC,OAAO,UAAU,eAAe,KAAK,MAAM,MAAM,GAAG,GAAG;AACzD,YAAG,CAAC,SAAS;AACX,oBAAU,EAAC,GAAG,MAAK;AAAA,QACrB;AACA,gBAAQ,GAAG,IAAI,OAAO,OAAO;AAAA,MAC/B;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AACT;AAgCA,MAAM,6BAA6B,MAAM,UAAwD;AAAA,EAC/F,QAAQ;AAAA,IACN,MAAM,CAAC;AAAA,EACT;AAAA,EAEA,oBAAoB;AAClB,UAAM,UAAU,YAAY,KAAK,OAAO,KAAK,KAAK;AAElD,QAAG,SAAS;AACV,WAAK,SAAS;AAAA,QACZ,MAAM;AAAA,MACR,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAA4C,OAA0B;AACpG,UAAM,UAAU,YAAY,OAAO,KAAK;AACxC,QAAG,SAAS;AACV,aAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA,EAEA,qBAAqB,WAAgB;AACnC,QAAI,UAAU,WAAW,cAAc;AACrC,aAAO;AAAA,IACT;AACA,QAAI,UAAU,SAAS,UAAU;AAC/B,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAAA,EAEA,qBAAqB,WAAgB;AACnC,QAAI,UAAU,WAAW,cAAc;AACrC,aAAO,CAAC,eAAe,eAAe,YAAY,eAAe,UAAU;AAAA,IAC7E,OACK;AACH,aAAO,CAAC,eAAe,YAAY,UAAU;AAAA,IAC/C;AAAA,EACF;AAAA;AAAA,EAGA,iBAAiB,OAAe;AAC9B,UAAM,gBAAgB,MACnB,IAAI,CAAC,MAAM,QAAQ;AAClB,aAAO;AAAA,QACL,KAAK,KAAK,MAAM,KAAK,GAAG;AAAA,QACxB,MAAM;AAAA,MACR;AAAA,IACF,CAAC,EAEA,KAAK,CAAC,GAAG,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC;AAGjE,UAAM,UAAU,CAAC;AACjB,kBACG,QAAQ,CAAC,MAAM,QAAO;AACrB,cAAQ,GAAG,IAAI,KAAK;AAAA,IACtB,CAAC;AAEH,SAAK,SAAS;AAAA,MACZ,MAAM;AAAA,IACR,CAAC;AAED,WAAO,cAAc,IAAI,CAAC,SAAS,KAAK,IAAI;AAAA,EAC9C;AAAA,EAEA,WAAW,CAAC,WAAmB,UAAe;AAC5C,QAAI,MAAM,SAAS,YAAY;AAC7B,cAAQ;AAAA,QACN,MAAM,MAAM;AAAA,QACZ,UAAU,MAAM;AAAA,MAClB;AAAA,IACF,OACK;AACH,YAAM,YAAY,MAAM,SAAS,gBAAgB,KAAK;AACtD,cAAQ;AAAA,QACN,UAAU;AAAA,QACV,MAAM,MAAM;AAAA;AAAA,QAEZ,OAAO;AAAA,UACL,CAAC,EAAC,MAAM,GAAG,OAAO,UAAS,GAAG,oBAAoB,KAAK,MAAM,SAAgB,CAAC;AAAA,UAC9E,CAAC,EAAC,MAAM,IAAI,OAAO,UAAS,GAAG,oBAAoB,KAAK,MAAM,SAAgB,CAAC;AAAA,QACjF;AAAA,QACA,GAAG;AAAA,MACL;AAAA,IACF;AACA,SAAK,MAAM,SAAU,WAAW,KAAK;AAAA,EACvC;AAAA,EAEA,WAAW,WAAmB,UAAuD,OAAe;AAClG,UAAM,QAAQ,KAAK,MAAM,OAAO,MAAM,MAAM,CAAC,KAAK,CAAC;AAEnD,UAAM,SAAS,IAAI;AAAA,MACjB;AAAA,QACE,OAAO,SAAS;AAAA,QAChB,MAAO,SAAS,SAAS,SAAa,IAAI,SAAS;AAAA,MACrD;AAAA,MACA;AAAA,IACF;AAEA,UAAM,eAAe,KAAK,iBAAiB,KAAK;AAEhD,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,OAAO;AAAA,IACT;AACA,SAAK,SAAS,KAAK,MAAM,WAAW,YAAY;AAAA,EAClD;AAAA,EAEA,WAAW,UAA8B;AACvC,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,MAAM;AAAA,IACR;AAEA,QAAI,aAAa,SAAS,QAAW;AACnC,aAAO,aAAa,MAAM;AAAA,IAC5B;AACA,SAAK,MAAM,SAAU,KAAK,MAAM,WAAW,YAAY;AAAA,EACzD;AAAA,EAEA,eAAe,SAAiB;AAC9B,QAAI,YAAY,iBAAiB,KAAK,MAAM,wBAAwB;AAClE,WAAK,MAAM,uBAAuB;AAAA,IACpC,OACK;AACH,WAAK,SAAS,KAAK,MAAM,WAAW;AAAA,QAClC,GAAG,KAAK,MAAM;AAAA,QACd,MAAM;AAAA,MACR,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,mBAAmB,UAAkC,SAAc;AACjE,QAAI,SAAS;AACX,WAAK,MAAM,MAAO,QAAQ,IAAI;AAAA,IAChC,OACK;AACH,aAAO,KAAK,MAAM,MAAO,QAAQ;AAAA,IACnC;AACA,SAAK,SAAS,KAAK,MAAM,WAAW,KAAK,MAAM,KAAK;AAAA,EACtD;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AAErB,QAAI,OAAO,KAAK,MAAM,OAAO,SAAS,aAAa;AACjD,WAAK,MAAM,MAAO,OAAO,KAAK,qBAAqB,KAAK,MAAM,SAAS;AAAA,IACzE;AAEA,QAAI;AACJ,QAAI,KAAK,MAAM,OAAO,OAAO;AAC3B,mBAAa,KAAK,MAAM,MAAM,MAAM,IAAI,CAAC,MAAM,QAAQ;AACrD,cAAM,YAAY,OAAO,KAAK,CAAC,MAAM,WAAW,KAAK,CAAC,EAAE,OAAO;AAC/D,cAAM,MAAO,KAAK,MAAM,KAAK,GAAG;AAChC,cAAM,YAAY,OAAO,KAAK,CAAC,MAAM,WAAW,KAAK,CAAC,EAAE,QAAQ,KAAK,CAAC;AACtE,cAAM,QAAQ,KAAK,CAAC;AACpB,cAAM,gBAAgB,oBAAC,oBAAiB,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,GAAG,GAAG;AAE3F,cAAM,YAAY;AAAA,UAChB,cAAc,EAAE,aAAa;AAAA,UAC7B,OAAO,EAAE,YAAY;AAAA,UACrB,OAAO;AAAA,UACP,UAAU,CAAC,YAAyC,KAAK,WAAW,KAAK,EAAE,MAAM,WAAW,OAAO,QAAkB,GAAG,KAAK;AAAA,QAC/H;AAEA,YAAI;AACJ,YAAG,KAAK,MAAM,OAAO,SAAS,eAAe;AAC3C,sBAAY,oBAAC,eAAa,GAAG,WAAW;AAAA,QAC1C,OACK;AACH,sBAAY,oBAAC,eAAa,GAAG,WAAW;AAAA,QAC1C;AAEA,YAAI,YAAY;AAChB,YAAG,cAAc,QAAW;AAC1B,sBAAY,oBAAC,SACX;AAAA,YAAC;AAAA;AAAA,cACC,cAAW;AAAA,cACX,OAAO;AAAA,cACP,UAAU,aAAW,KAAK,WAAW,KAAK,EAAC,MAAM,SAAS,OAAO,UAAS,GAAG,KAAK;AAAA,cAClF,KAAK;AAAA,cACL,KAAK;AAAA;AAAA,UACP,GACF;AAAA,QACF;AAEA,eAAO,qBAAC,QACN;AAAA,8BAAC,QACE,qBACH;AAAA,UACA,oBAAC,QACE,qBACH;AAAA,UACA,oBAAC,QACC;AAAA,YAAC;AAAA;AAAA,cACC,cAAY,EAAE,cAAc;AAAA,cAC5B,WAAW,KAAK,MAAM;AAAA,cACtB,WAAW,KAAK,MAAM;AAAA,cACtB;AAAA,cACA,UAAU,CAAC,GAAG,aAAa,KAAK,WAAW,KAAK,EAAC,MAAM,WAAW,OAAO,UAAS,GAAG,QAAkB;AAAA;AAAA,UACzG,GACF;AAAA,UACA,oBAAC,QACE,yBACH;AAAA,aAlBc,GAmBhB;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO,oBAAC,SAAI,WAAU,4BACpB,+BAAC,cAAS,WAAU,+BAClB;AAAA,0BAAC,YAAQ,6BAAmB,KAAK,MAAM,SAAS,GAAE;AAAA,MAClD,qBAAC,SAAI,WAAU,gCACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,UAAU;AAAA,YAGnB,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,KAAK,MAAM,MAAO;AAAA,gBACzB,UAAU,CAAC,YAAoB,KAAK,eAAe,OAAO;AAAA,gBAC1D,OAAO,EAAE,yDAAyD;AAAA,gBAClE,SAAS,KAAK,qBAAqB,KAAK,MAAM,SAAS;AAAA;AAAA,YACzD,GACF;AAAA;AAAA,UATI;AAAA,QAUN;AAAA,QACC,KAAK,MAAM,OAAO,SAAS,cAC1B;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,MAAM;AAAA,YAGf,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW;AAAA,gBACX,WAAW,OAAO,SAAS;AAAA,gBAC3B,OAAO,KAAK,MAAM,OAAO;AAAA,gBACzB,UAAU,CAAC,GAAG,aAAa,KAAK,WAAW,QAAkB;AAAA;AAAA,YAC/D,GACF;AAAA;AAAA,UATI;AAAA,QAUN;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YAGP,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,KAAK,MAAM,OAAO;AAAA,gBACzB,OAAO,EAAE,8CAA8C;AAAA,gBACvD,UAAU,aAAW,KAAK,mBAAmB,YAAY,OAAO;AAAA;AAAA,YAClE,GACF;AAAA;AAAA,UARI;AAAA,QASN;AAAA,QACC,cACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,SAAS;AAAA,YAGlB;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW,KAAK,MAAM;AAAA,gBACtB,WAAW,KAAK,MAAM;AAAA,gBACtB,OAAO,KAAK,MAAM,OAAO;AAAA,gBACzB,UAAU,CAAC,GAAG,YAAY,KAAK,mBAAmB,WAAW,OAAO;AAAA;AAAA,YACtE;AAAA;AAAA,UAPI;AAAA,QAQN;AAAA,QAED,cACC,oBAAC,SAAI,WAAU,0BACb,+BAAC,WAAM,WAAU,gCACf;AAAA,8BAAC,aAAS,YAAE,OAAO,GAAE;AAAA,UACrB,oBAAC,WACC,+BAAC,QACC;AAAA,gCAAC,QAAI,YAAE,MAAM,GAAE;AAAA,YACf,oBAAC,QAAI,YAAE,aAAa,GAAE;AAAA,YACtB,oBAAC,QAAG,SAAS,GAAI,YAAE,cAAc,GAAE;AAAA,aACrC,GACF;AAAA,UACA,oBAAC,WACE,sBACH;AAAA,WACF,GACF;AAAA,QAEF,qBAAC,SAAI,WAAU,oBACZ;AAAA,wBACC;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK,MAAM,WAAW,KAAK,IAAI;AAAA,cAExC;AAAA,oCAAC,kBAAe,OAAO,EAAE,eAAe,cAAc,GAAG;AAAA,gBACxD,EAAE,UAAU;AAAA;AAAA;AAAA,UACf;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK,MAAM,mBAAmB,KAAK,IAAI;AAAA,cAEhD;AAAA,oCAAC,kBAAe,OAAO,EAAE,eAAe,cAAc,GAAG;AAAA,gBACxD,EAAE,uBAAuB;AAAA;AAAA;AAAA,UAC5B;AAAA,WACF;AAAA,SACF;AAAA,OACF,GACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a1f2034e8330e69a4f4de946d81cea8ff55472f7"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Zt=function(){return s},s}Zt();function bV(n,e){Zt().f[0]++;let t;return Zt().s[0]++,Zt().b[1][0]++,n.value&&(Zt().b[1][1]++,n.value.stops)?(Zt().b[0][0]++,Zt().s[1]++,n.value.stops.forEach((i,r)=>{Zt().f[1]++,Zt().s[2]++,Object.prototype.hasOwnProperty.call(e.refs,r)?Zt().b[2][1]++:(Zt().b[2][0]++,Zt().s[3]++,t?Zt().b[3][1]++:(Zt().b[3][0]++,Zt().s[4]++,t={...e}),Zt().s[5]++,t[r]=cx("stop-"))})):Zt().b[0][1]++,Zt().s[6]++,t}class DRe extends En.Component{state=(Zt().s[7]++,{refs:{}});componentDidMount(){Zt().f[2]++;const e=(Zt().s[8]++,bV(this.props,this.state));Zt().s[9]++,e?(Zt().b[4][0]++,Zt().s[10]++,this.setState({refs:e})):Zt().b[4][1]++}static getDerivedStateFromProps(e,t){Zt().f[3]++;const i=(Zt().s[11]++,bV(e,t));return Zt().s[12]++,i?(Zt().b[5][0]++,Zt().s[13]++,{refs:i}):(Zt().b[5][1]++,Zt().s[14]++,null)}getFieldFunctionType(e){return Zt().f[4]++,Zt().s[15]++,e.expression.interpolated?(Zt().b[6][0]++,Zt().s[16]++,"exponential"):(Zt().b[6][1]++,Zt().s[17]++,e.type==="number"?(Zt().b[7][0]++,Zt().s[18]++,"interval"):(Zt().b[7][1]++,Zt().s[19]++,"categorical"))}getDataFunctionTypes(e){return Zt().f[5]++,Zt().s[20]++,e.expression.interpolated?(Zt().b[8][0]++,Zt().s[21]++,["interpolate","categorical","interval","exponential","identity"]):(Zt().b[8][1]++,Zt().s[22]++,["categorical","interval","identity"])}orderStopsByZoom(e){Zt().f[6]++;const t=(Zt().s[23]++,e.map((r,o)=>(Zt().f[7]++,Zt().s[24]++,{ref:this.state.refs[o],data:r})).sort((r,o)=>(Zt().f[8]++,Zt().s[25]++,Lse(r.data[0].zoom,o.data[0].zoom)))),i=(Zt().s[26]++,{});return Zt().s[27]++,t.forEach((r,o)=>{Zt().f[9]++,Zt().s[28]++,i[o]=r.ref}),Zt().s[29]++,this.setState({refs:i}),Zt().s[30]++,t.map(r=>(Zt().f[10]++,Zt().s[31]++,r.data))}onChange=(Zt().s[32]++,(e,t)=>{if(Zt().f[11]++,Zt().s[33]++,t.type==="identity")Zt().b[9][0]++,Zt().s[34]++,t={type:t.type,property:t.property};else{Zt().b[9][1]++;const i=(Zt().s[35]++,t.type==="categorical"?(Zt().b[10][0]++,""):(Zt().b[10][1]++,0));Zt().s[36]++,t={property:"",type:t.type,stops:[[{zoom:6,value:i},Nf(this.props.fieldSpec)],[{zoom:10,value:i},Nf(this.props.fieldSpec)]],...t}}Zt().s[37]++,this.props.onChange(e,t)});changeStop(e,t,i){Zt().f[12]++;const r=(Zt().s[38]++,Zt().b[11][0]++,this.props.value?.stops.slice(0)||(Zt().b[11][1]++,[]));Zt().s[39]++,r[e]=[{value:t.value,zoom:t.zoom===void 0?(Zt().b[12][0]++,0):(Zt().b[12][1]++,t.zoom)},i];const o=(Zt().s[40]++,this.orderStopsByZoom(r)),s=(Zt().s[41]++,{...this.props.value,stops:o});Zt().s[42]++,this.onChange(this.props.fieldName,s)}changeBase(e){Zt().f[13]++;const t=(Zt().s[43]++,{...this.props.value,base:e});Zt().s[44]++,t.base===void 0?(Zt().b[13][0]++,Zt().s[45]++,delete t.base):Zt().b[13][1]++,Zt().s[46]++,this.props.onChange(this.props.fieldName,t)}changeDataType(e){Zt().f[14]++,Zt().s[47]++,Zt().b[15][0]++,e==="interpolate"&&(Zt().b[15][1]++,this.props.onChangeToZoomFunction)?(Zt().b[14][0]++,Zt().s[48]++,this.props.onChangeToZoomFunction()):(Zt().b[14][1]++,Zt().s[49]++,this.onChange(this.props.fieldName,{...this.props.value,type:e}))}changeDataProperty(e,t){Zt().f[15]++,Zt().s[50]++,t?(Zt().b[16][0]++,Zt().s[51]++,this.props.value[e]=t):(Zt().b[16][1]++,Zt().s[52]++,delete this.props.value[e]),Zt().s[53]++,this.onChange(this.props.fieldName,this.props.value)}render(){Zt().f[16]++;const e=(Zt().s[54]++,this.props.t);Zt().s[55]++,typeof this.props.value?.type>"u"?(Zt().b[17][0]++,Zt().s[56]++,this.props.value.type=this.getFieldFunctionType(this.props.fieldSpec)):Zt().b[17][1]++;let t;return Zt().s[57]++,this.props.value?.stops?(Zt().b[18][0]++,Zt().s[58]++,t=this.props.value.stops.map((i,r)=>{Zt().f[17]++;const o=(Zt().s[59]++,typeof i[0]=="object"?(Zt().b[19][0]++,i[0].zoom):(Zt().b[19][1]++,void 0)),s=(Zt().s[60]++,this.state.refs[r]),a=(Zt().s[61]++,typeof i[0]=="object"?(Zt().b[20][0]++,i[0].value):(Zt().b[20][1]++,i[0])),c=(Zt().s[62]++,i[1]),A=(Zt().s[63]++,ie.jsx(Fse,{onClick:this.props.onDeleteStop?.bind(this,r)})),m=(Zt().s[64]++,{"aria-label":e("Input value"),label:e("Data value"),value:a,onChange:_=>(Zt().f[18]++,Zt().s[65]++,this.changeStop(r,{zoom:o,value:_},c))});let v;Zt().s[66]++,this.props.value?.type==="categorical"?(Zt().b[21][0]++,Zt().s[67]++,v=ie.jsx(dm,{...m})):(Zt().b[21][1]++,Zt().s[68]++,v=ie.jsx(i1,{...m}));let x=(Zt().s[69]++,null);return Zt().s[70]++,o!==void 0?(Zt().b[22][0]++,Zt().s[71]++,x=ie.jsx("div",{children:ie.jsx(i1,{"aria-label":"Zoom",value:o,onChange:_=>(Zt().f[19]++,Zt().s[72]++,this.changeStop(r,{zoom:_,value:a},c)),min:0,max:22})})):Zt().b[22][1]++,Zt().s[73]++,ie.jsxs("tr",{children:[ie.jsx("td",{children:x}),ie.jsx("td",{children:v}),ie.jsx("td",{children:ie.jsx($_,{"aria-label":e("Output value"),fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:c,onChange:(_,O)=>(Zt().f[20]++,Zt().s[74]++,this.changeStop(r,{zoom:o,value:a},O))})}),ie.jsx("td",{children:A})]},s)})):Zt().b[18][1]++,Zt().s[75]++,ie.jsx("div",{className:"maputnik-data-spec-block",children:ie.jsxs("fieldset",{className:"maputnik-data-spec-property",children:[ie.jsx("legend",{children:S6(this.props.fieldName)}),ie.jsxs("div",{className:"maputnik-data-fieldset-inner",children:[ie.jsx(Fs,{label:e("Function"),children:ie.jsx("div",{className:"maputnik-data-spec-property-input",children:ie.jsx(Wb,{value:this.props.value.type,onChange:i=>(Zt().f[21]++,Zt().s[76]++,this.changeDataType(i)),title:e("Select a type of data scale (default is 'categorical')."),options:this.getDataFunctionTypes(this.props.fieldSpec)})})},"function"),(Zt().b[23][0]++,this.props.value?.type!=="identity"&&(Zt().b[23][1]++,ie.jsx(Fs,{label:e("Base"),children:ie.jsx("div",{className:"maputnik-data-spec-property-input",children:ie.jsx($_,{fieldName:"base",fieldSpec:Jr.function.base,value:this.props.value?.base,onChange:(i,r)=>(Zt().f[22]++,Zt().s[77]++,this.changeBase(r))})})},"base"))),ie.jsx(Fs,{label:"Property",children:ie.jsx("div",{className:"maputnik-data-spec-property-input",children:ie.jsx(dm,{value:this.props.value?.property,title:e("Input a data property to base styles off of."),onChange:i=>(Zt().f[23]++,Zt().s[78]++,this.changeDataProperty("property",i))})})},"property"),(Zt().b[24][0]++,t&&(Zt().b[24][1]++,ie.jsx(Fs,{label:e("Default"),children:ie.jsx($_,{fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:this.props.value?.default,onChange:(i,r)=>(Zt().f[24]++,Zt().s[79]++,this.changeDataProperty("default",r))})},"default"))),(Zt().b[25][0]++,t&&(Zt().b[25][1]++,ie.jsx("div",{className:"maputnik-function-stop",children:ie.jsxs("table",{className:"maputnik-function-stop-table",children:[ie.jsx("caption",{children:e("Stops")}),ie.jsx("thead",{children:ie.jsxs("tr",{children:[ie.jsx("th",{children:e("Zoom")}),ie.jsx("th",{children:e("Input value")}),ie.jsx("th",{rowSpan:2,children:e("Output value")})]})}),ie.jsx("tbody",{children:t})]})}))),ie.jsxs("div",{className:"maputnik-toolbox",children:[(Zt().b[26][0]++,t&&(Zt().b[26][1]++,ie.jsxs(Js,{className:"maputnik-add-stop",onClick:this.props.onAddStop?.bind(this),children:[ie.jsx(w6,{style:{verticalAlign:"text-bottom"}}),e("Add stop")]}))),ie.jsxs(Js,{className:"maputnik-add-stop",onClick:this.props.onExpressionClick?.bind(this),children:[ie.jsx(b4,{style:{verticalAlign:"text-bottom"}}),e("Convert to expression")]})]})]})]})})}}const PRe=(Zt().s[80]++,Jo()(DRe));function Qn(){var n="/home/runner/work/maputnik/maputnik/src/components/_ZoomProperty.tsx",e="374899057a1493811ae396622fb1b276448ec163",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/_ZoomProperty.tsx",statementMap:{0:{start:{line:17,column:16},end:{line:17,column:18}},1:{start:{line:18,column:2},end:{line:29,column:3}},2:{start:{line:19,column:4},end:{line:28,column:7}},3:{start:{line:20,column:6},end:{line:27,column:7}},4:{start:{line:21,column:8},end:{line:23,column:9}},5:{start:{line:22,column:10},end:{line:22,column:33}},6:{start:{line:24,column:8},end:{line:24,column:39}},7:{start:{line:26,column:8},end:{line:26,column:39}},8:{start:{line:30,column:2},end:{line:30,column:17}},9:{start:{line:33,column:24},end:{line:35,column:3}},10:{start:{line:36,column:10},end:{line:38,column:3}},11:{start:{line:40,column:20},end:{line:40,column:55}},12:{start:{line:41,column:4},end:{line:45,column:5}},13:{start:{line:42,column:6},end:{line:44,column:9}},14:{start:{line:48,column:20},end:{line:48,column:45}},15:{start:{line:49,column:4},end:{line:53,column:5}},16:{start:{line:50,column:6},end:{line:52,column:8}},17:{start:{line:54,column:4},end:{line:54,column:16}},18:{start:{line:58,column:26},end:{line:63,column:60}},19:{start:{line:59,column:6},end:{line:62,column:8}},20:{start:{line:63,column:22},end:{line:63,column:59}},21:{start:{line:64,column:20},end:{line:64,column:22}},22:{start:{line:65,column:4},end:{line:67,column:7}},23:{start:{line:66,column:6},end:{line:66,column:30}},24:{start:{line:68,column:4},end:{line:70,column:7}},25:{start:{line:71,column:4},end:{line:71,column:50}},26:{start:{line:71,column:39},end:{line:71,column:48}},27:{start:{line:74,column:18},end:{line:74,column:49}},28:{start:{line:75,column:4},end:{line:75,column:41}},29:{start:{line:76,column:25},end:{line:76,column:53}},30:{start:{line:77,column:25},end:{line:80,column:5}},31:{start:{line:81,column:4},end:{line:81,column:60}},32:{start:{line:84,column:25},end:{line:87,column:5}},33:{start:{line:88,column:4},end:{line:90,column:5}},34:{start:{line:89,column:6},end:{line:89,column:34}},35:{start:{line:91,column:4},end:{line:91,column:60}},36:{start:{line:93,column:19},end:{line:97,column:3}},37:{start:{line:94,column:4},end:{line:96,column:5}},38:{start:{line:95,column:6},end:{line:95,column:46}},39:{start:{line:99,column:14},end:{line:99,column:26}},40:{start:{line:100,column:23},end:{line:133,column:6}},41:{start:{line:101,column:24},end:{line:101,column:31}},42:{start:{line:102,column:20},end:{line:102,column:27}},43:{start:{line:103,column:44},end:{line:103,column:120}},44:{start:{line:104,column:6},end:{line:132,column:8}},45:{start:{line:113,column:43},end:{line:113,column:87}},46:{start:{line:125,column:43},end:{line:125,column:88}},47:{start:{line:134,column:4},end:{line:200,column:12}},48:{start:{line:145,column:39},end:{line:145,column:67}},49:{start:{line:162,column:43},end:{line:162,column:68}},50:{start:{line:203,column:4},end:{line:207,column:5}},51:{start:{line:204,column:6},end:{line:204,column:83}},52:{start:{line:206,column:6},end:{line:206,column:29}},53:{start:{line:210,column:21},end:{line:210,column:60}}},fnMap:{0:{name:"setStopRefs",decl:{start:{line:16,column:9},end:{line:16,column:20}},loc:{start:{line:16,column:35},end:{line:31,column:1}},line:16},1:{name:"(anonymous_1)",decl:{start:{line:19,column:30},end:{line:19,column:31}},loc:{start:{line:19,column:45},end:{line:28,column:5}},line:19},2:{name:"(anonymous_2)",decl:{start:{line:39,column:2},end:{line:39,column:3}},loc:{start:{line:39,column:22},end:{line:46,column:3}},line:39},3:{name:"(anonymous_3)",decl:{start:{line:47,column:2},end:{line:47,column:3}},loc:{start:{line:47,column:48},end:{line:55,column:3}},line:47},4:{name:"(anonymous_4)",decl:{start:{line:57,column:2},end:{line:57,column:3}},loc:{start:{line:57,column:26},end:{line:72,column:3}},line:57},5:{name:"(anonymous_5)",decl:{start:{line:58,column:36},end:{line:58,column:37}},loc:{start:{line:58,column:51},end:{line:63,column:5}},line:58},6:{name:"(anonymous_6)",decl:{start:{line:63,column:12},end:{line:63,column:13}},loc:{start:{line:63,column:22},end:{line:63,column:59}},line:63},7:{name:"(anonymous_7)",decl:{start:{line:65,column:26},end:{line:65,column:27}},loc:{start:{line:65,column:41},end:{line:67,column:5}},line:65},8:{name:"(anonymous_8)",decl:{start:{line:71,column:29},end:{line:71,column:30}},loc:{start:{line:71,column:39},end:{line:71,column:48}},line:71},9:{name:"(anonymous_9)",decl:{start:{line:73,column:2},end:{line:73,column:3}},loc:{start:{line:73,column:45},end:{line:82,column:3}},line:73},10:{name:"(anonymous_10)",decl:{start:{line:83,column:2},end:{line:83,column:3}},loc:{start:{line:83,column:23},end:{line:92,column:3}},line:83},11:{name:"(anonymous_11)",decl:{start:{line:93,column:19},end:{line:93,column:20}},loc:{start:{line:93,column:29},end:{line:97,column:3}},line:93},12:{name:"(anonymous_12)",decl:{start:{line:98,column:2},end:{line:98,column:3}},loc:{start:{line:98,column:11},end:{line:201,column:3}},line:98},13:{name:"(anonymous_13)",decl:{start:{line:100,column:51},end:{line:100,column:52}},loc:{start:{line:100,column:66},end:{line:133,column:5}},line:100},14:{name:"(anonymous_14)",decl:{start:{line:113,column:26},end:{line:113,column:27}},loc:{start:{line:113,column:43},end:{line:113,column:87}},line:113},15:{name:"(anonymous_15)",decl:{start:{line:125,column:26},end:{line:125,column:27}},loc:{start:{line:125,column:43},end:{line:125,column:88}},line:125},16:{name:"(anonymous_16)",decl:{start:{line:145,column:26},end:{line:145,column:27}},loc:{start:{line:145,column:39},end:{line:145,column:67}},line:145},17:{name:"(anonymous_17)",decl:{start:{line:162,column:26},end:{line:162,column:27}},loc:{start:{line:162,column:43},end:{line:162,column:68}},line:162},18:{name:"(anonymous_18)",decl:{start:{line:202,column:2},end:{line:202,column:3}},loc:{start:{line:202,column:34},end:{line:208,column:3}},line:202}},branchMap:{0:{loc:{start:{line:18,column:2},end:{line:29,column:3}},type:"if",locations:[{start:{line:18,column:2},end:{line:29,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:18},1:{loc:{start:{line:18,column:6},end:{line:18,column:38}},type:"binary-expr",locations:[{start:{line:18,column:6},end:{line:18,column:17}},{start:{line:18,column:21},end:{line:18,column:38}}],line:18},2:{loc:{start:{line:20,column:6},end:{line:27,column:7}},type:"if",locations:[{start:{line:20,column:6},end:{line:27,column:7}},{start:{line:25,column:13},end:{line:27,column:7}}],line:20},3:{loc:{start:{line:21,column:8},end:{line:23,column:9}},type:"if",locations:[{start:{line:21,column:8},end:{line:23,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:21},4:{loc:{start:{line:41,column:4},end:{line:45,column:5}},type:"if",locations:[{start:{line:41,column:4},end:{line:45,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:41},5:{loc:{start:{line:49,column:4},end:{line:53,column:5}},type:"if",locations:[{start:{line:49,column:4},end:{line:53,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:49},6:{loc:{start:{line:88,column:4},end:{line:90,column:5}},type:"if",locations:[{start:{line:88,column:4},end:{line:90,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:88},7:{loc:{start:{line:94,column:4},end:{line:96,column:5}},type:"if",locations:[{start:{line:94,column:4},end:{line:96,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:94},8:{loc:{start:{line:94,column:8},end:{line:94,column:67}},type:"binary-expr",locations:[{start:{line:94,column:8},end:{line:94,column:30}},{start:{line:94,column:34},end:{line:94,column:67}}],line:94},9:{loc:{start:{line:203,column:4},end:{line:207,column:5}},type:"if",locations:[{start:{line:203,column:4},end:{line:207,column:5}},{start:{line:205,column:11},end:{line:207,column:5}}],line:203}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_ZoomProperty.tsx"],names:[],mappings:"AAiK4B,cACf,YADe;AAjK5B,OAAO,WAAW;AAClB,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,OAAO,YAAY;AACnB,SAA+B,uBAAuB;AAEtD,OAAO,iBAAiB;AACxB,OAAO,eAAe;AACtB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAElB,OAAO,sBAAsB;AAC7B,OAAO,wBAAwB;AAE/B,OAAO,YAAY;AACnB,OAAO,qBAAqB;AAS5B,SAAS,YAAY,OAAkC,OAA0B;AAE/E,MAAI,UAAmC,CAAC;AAExC,MAAG,MAAM,SAAU,MAAM,MAAwB,OAAO;AACtD,IAAC,MAAM,MAAwB,MAAM,QAAQ,CAAC,MAAM,QAAgB;AAClE,UAAG,OAAO,UAAU,eAAe,KAAK,CAAC,MAAM,MAAM,GAAG,GAAG;AACzD,YAAG,CAAC,SAAS;AACX,oBAAU,EAAC,GAAG,MAAK;AAAA,QACrB;AACA,gBAAQ,GAAG,IAAI,OAAO,OAAO;AAAA,MAC/B,OAAO;AACL,gBAAQ,GAAG,IAAI,MAAM,KAAK,GAAG;AAAA,MAC/B;AAAA,IACF,CAAC;AAAA,EACH;AACA,SAAO;AACT;AA4BA,MAAM,6BAA6B,MAAM,UAAwD;AAAA,EAC/F,OAAO,eAAe;AAAA,IACpB,QAAQ,CAAC;AAAA,EACX;AAAA,EAEA,QAAQ;AAAA,IACN,MAAM,CAAC;AAAA,EACT;AAAA,EAEA,oBAAoB;AAClB,UAAM,UAAU,YAAY,KAAK,OAAO,KAAK,KAAK;AAElD,QAAG,SAAS;AACV,WAAK,SAAS;AAAA,QACZ,MAAM;AAAA,MACR,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAA4C,OAA0B;AACpG,UAAM,UAAU,YAAY,OAAO,KAAK;AACxC,QAAG,SAAS;AACV,aAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA;AAAA,EAGA,iBAAiB,OAA+B;AAC9C,UAAM,gBAAgB,MACnB,IAAI,CAAC,MAAM,QAAQ;AAClB,aAAO;AAAA,QACL,KAAK,KAAK,MAAM,KAAK,GAAG;AAAA,QACxB,MAAM;AAAA,MACR;AAAA,IACF,CAAC,EAEA,KAAK,CAAC,GAAG,MAAM,gBAAgB,EAAE,KAAK,CAAC,GAAI,EAAE,KAAK,CAAC,CAAE,CAAC;AAGzD,UAAM,UAAkC,CAAC;AACzC,kBACG,QAAQ,CAAC,MAAM,QAAO;AACrB,cAAQ,GAAG,IAAI,KAAK;AAAA,IACtB,CAAC;AAEH,SAAK,SAAS;AAAA,MACZ,MAAM;AAAA,IACR,CAAC;AAED,WAAO,cAAc,IAAI,CAAC,SAAS,KAAK,IAAI;AAAA,EAC9C;AAAA,EAEA,eAAe,WAAmB,UAA8B,OAAe;AAC7E,UAAM,QAAS,KAAK,MAAM,MAAwB,MAAM,MAAM,CAAC;AAC/D,UAAM,SAAS,IAAI,CAAC,UAAU,KAAK;AAEnC,UAAM,eAAe,KAAK,iBAAiB,KAAK;AAEhD,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,OAAO;AAAA,IACT;AACA,SAAK,MAAM,SAAU,KAAK,MAAM,WAAW,YAAY;AAAA,EACzD;AAAA,EAEA,WAAW,UAA8B;AACvC,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,MAAM;AAAA,IACR;AAEA,QAAI,aAAa,SAAS,QAAW;AACnC,aAAO,aAAa,MAAM;AAAA,IAC5B;AACA,SAAK,MAAM,SAAU,KAAK,MAAM,WAAW,YAAY;AAAA,EACzD;AAAA,EAEA,iBAAiB,CAAC,SAAiB;AACjC,QAAI,SAAS,iBAAiB,KAAK,MAAM,wBAAwB;AAC/D,WAAK,MAAM,uBAAuB,IAAI;AAAA,IACxC;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,aAAa,KAAK,MAAM,OAAO,MAAM,IAAI,CAAC,MAAM,QAAQ;AAC5D,YAAM,YAAY,KAAK,CAAC;AACxB,YAAM,QAAQ,KAAK,CAAC;AACpB,YAAM,gBAAgB,oBAAC,oBAAiB,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,GAAG,GAAG;AAC3F,aAAO;AAAA,QAAC;AAAA;AAAA,UAGN;AAAA,gCAAC,QACC;AAAA,cAAC;AAAA;AAAA,gBACC,cAAY,EAAE,MAAM;AAAA,gBACpB,OAAO;AAAA,gBACP,UAAU,iBAAe,KAAK,eAAe,KAAK,aAAa,KAAK;AAAA,gBACpE,KAAK;AAAA,gBACL,KAAK;AAAA;AAAA,YACP,GACF;AAAA,YACA,oBAAC,QACC;AAAA,cAAC;AAAA;AAAA,gBACC,cAAY,EAAE,cAAc;AAAA,gBAC5B,WAAW,KAAK,MAAM;AAAA,gBACtB,WAAW,KAAK,MAAM;AAAA,gBACtB;AAAA,gBACA,UAAU,CAAC,GAAG,aAAa,KAAK,eAAe,KAAK,WAAW,QAAkB;AAAA;AAAA,YACnF,GACF;AAAA,YACA,oBAAC,QACE,yBACH;AAAA;AAAA;AAAA,QAtBK,GAAG,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC;AAAA,MAuB5B;AAAA,IACF,CAAC;AAGD,WAAO,oBAAC,SAAI,WAAU,4BACpB,+BAAC,cAAS,WAAU,+BAClB;AAAA,0BAAC,YAAQ,6BAAmB,KAAK,MAAM,SAAS,GAAE;AAAA,MAClD,qBAAC,SAAI,WAAU,gCACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,UAAU;AAAA,YAEnB,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO;AAAA,gBACP,UAAU,CAAC,YAAoB,KAAK,eAAe,OAAO;AAAA,gBAC1D,OAAO,EAAE,yDAAyD;AAAA,gBAClE,SAAS,KAAK,qBAAqB,KAAK,MAAM,SAAU;AAAA;AAAA,YAC1D,GACF;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,MAAM;AAAA,YAEf,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW;AAAA,gBACX,WAAW,OAAO,SAAS;AAAA,gBAC3B,OAAO,KAAK,MAAM,OAAO;AAAA,gBACzB,UAAU,CAAC,GAAG,aAAa,KAAK,WAAW,QAA8B;AAAA;AAAA,YAC3E,GACF;AAAA;AAAA,QACF;AAAA,QACA,oBAAC,SAAI,WAAU,0BACb,+BAAC,WAAM,WAAU,mEACf;AAAA,8BAAC,aAAS,YAAE,OAAO,GAAE;AAAA,UACrB,oBAAC,WACC,+BAAC,QACC;AAAA,gCAAC,QAAI,YAAE,MAAM,GAAE;AAAA,YACf,oBAAC,QAAG,SAAS,GAAI,YAAE,cAAc,GAAE;AAAA,aACrC,GACF;AAAA,UACA,oBAAC,WACE,sBACH;AAAA,WACF,GACF;AAAA,QACA,qBAAC,SAAI,WAAU,oBACb;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK,MAAM,WAAW,KAAK,IAAI;AAAA,cAExC;AAAA,oCAAC,kBAAe,OAAO,EAAE,eAAe,cAAc,GAAG;AAAA,gBACxD,EAAE,UAAU;AAAA;AAAA;AAAA,UACf;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK,MAAM,mBAAmB,KAAK,IAAI;AAAA,cAEhD;AAAA,oCAAC,kBAAe,OAAO,EAAE,eAAe,cAAc,GAAG;AAAA,gBACxD,EAAE,uBAAuB;AAAA;AAAA;AAAA,UAC5B;AAAA,WACF;AAAA,SACF;AAAA,OACF,GACF;AAAA,EACF;AAAA,EAEA,qBAAqB,WAGlB;AACD,QAAI,UAAU,eAAe,MAAM,eAAe;AAChD,aAAO,CAAC,eAAe,eAAe,YAAY,eAAe,UAAU;AAAA,IAC7E,OACK;AACH,aAAO,CAAC,aAAa;AAAA,IACvB;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"374899057a1493811ae396622fb1b276448ec163"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Qn=function(){return s},s}Qn();function CV(n,e){Qn().f[0]++;let t=(Qn().s[0]++,{});return Qn().s[1]++,Qn().b[1][0]++,n.value&&(Qn().b[1][1]++,n.value.stops)?(Qn().b[0][0]++,Qn().s[2]++,n.value.stops.forEach((i,r)=>{Qn().f[1]++,Qn().s[3]++,Object.prototype.hasOwnProperty.call(!e.refs,r)?(Qn().b[2][0]++,Qn().s[4]++,t?Qn().b[3][1]++:(Qn().b[3][0]++,Qn().s[5]++,t={...e}),Qn().s[6]++,t[r]=cx("stop-")):(Qn().b[2][1]++,Qn().s[7]++,t[r]=e.refs[r])})):Qn().b[0][1]++,Qn().s[8]++,t}class URe extends En.Component{static defaultProps=(Qn().s[9]++,{errors:{}});state=(Qn().s[10]++,{refs:{}});componentDidMount(){Qn().f[2]++;const e=(Qn().s[11]++,CV(this.props,this.state));Qn().s[12]++,e?(Qn().b[4][0]++,Qn().s[13]++,this.setState({refs:e})):Qn().b[4][1]++}static getDerivedStateFromProps(e,t){Qn().f[3]++;const i=(Qn().s[14]++,CV(e,t));return Qn().s[15]++,i?(Qn().b[5][0]++,Qn().s[16]++,{refs:i}):(Qn().b[5][1]++,Qn().s[17]++,null)}orderStopsByZoom(e){Qn().f[4]++;const t=(Qn().s[18]++,e.map((r,o)=>(Qn().f[5]++,Qn().s[19]++,{ref:this.state.refs[o],data:r})).sort((r,o)=>(Qn().f[6]++,Qn().s[20]++,Lse(r.data[0],o.data[0])))),i=(Qn().s[21]++,{});return Qn().s[22]++,t.forEach((r,o)=>{Qn().f[7]++,Qn().s[23]++,i[o]=r.ref}),Qn().s[24]++,this.setState({refs:i}),Qn().s[25]++,t.map(r=>(Qn().f[8]++,Qn().s[26]++,r.data))}changeZoomStop(e,t,i){Qn().f[9]++;const r=(Qn().s[27]++,this.props.value.stops.slice(0));Qn().s[28]++,r[e]=[t,i];const o=(Qn().s[29]++,this.orderStopsByZoom(r)),s=(Qn().s[30]++,{...this.props.value,stops:o});Qn().s[31]++,this.props.onChange(this.props.fieldName,s)}changeBase(e){Qn().f[10]++;const t=(Qn().s[32]++,{...this.props.value,base:e});Qn().s[33]++,t.base===void 0?(Qn().b[6][0]++,Qn().s[34]++,delete t.base):Qn().b[6][1]++,Qn().s[35]++,this.props.onChange(this.props.fieldName,t)}changeDataType=(Qn().s[36]++,e=>{Qn().f[11]++,Qn().s[37]++,Qn().b[8][0]++,e!=="interpolate"&&(Qn().b[8][1]++,this.props.onChangeToDataFunction)?(Qn().b[7][0]++,Qn().s[38]++,this.props.onChangeToDataFunction(e)):Qn().b[7][1]++});render(){Qn().f[12]++;const e=(Qn().s[39]++,this.props.t),t=(Qn().s[40]++,this.props.value?.stops.map((i,r)=>{Qn().f[13]++;const o=(Qn().s[41]++,i[0]),s=(Qn().s[42]++,i[1]),a=(Qn().s[43]++,ie.jsx(Fse,{onClick:this.props.onDeleteStop?.bind(this,r)}));return Qn().s[44]++,ie.jsxs("tr",{children:[ie.jsx("td",{children:ie.jsx(i1,{"aria-label":e("Zoom"),value:o,onChange:c=>(Qn().f[14]++,Qn().s[45]++,this.changeZoomStop(r,c,s)),min:0,max:22})}),ie.jsx("td",{children:ie.jsx($_,{"aria-label":e("Output value"),fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:s,onChange:(c,A)=>(Qn().f[15]++,Qn().s[46]++,this.changeZoomStop(r,o,A))})}),ie.jsx("td",{children:a})]},`${i[0]}-${i[1]}`)}));return Qn().s[47]++,ie.jsx("div",{className:"maputnik-data-spec-block",children:ie.jsxs("fieldset",{className:"maputnik-data-spec-property",children:[ie.jsx("legend",{children:S6(this.props.fieldName)}),ie.jsxs("div",{className:"maputnik-data-fieldset-inner",children:[ie.jsx(Fs,{label:e("Function"),children:ie.jsx("div",{className:"maputnik-data-spec-property-input",children:ie.jsx(Wb,{value:"interpolate",onChange:i=>(Qn().f[16]++,Qn().s[48]++,this.changeDataType(i)),title:e("Select a type of data scale (default is 'categorical')."),options:this.getDataFunctionTypes(this.props.fieldSpec)})})}),ie.jsx(Fs,{label:e("Base"),children:ie.jsx("div",{className:"maputnik-data-spec-property-input",children:ie.jsx($_,{fieldName:"base",fieldSpec:Jr.function.base,value:this.props.value?.base,onChange:(i,r)=>(Qn().f[17]++,Qn().s[49]++,this.changeBase(r))})})}),ie.jsx("div",{className:"maputnik-function-stop",children:ie.jsxs("table",{className:"maputnik-function-stop-table maputnik-function-stop-table--zoom",children:[ie.jsx("caption",{children:e("Stops")}),ie.jsx("thead",{children:ie.jsxs("tr",{children:[ie.jsx("th",{children:e("Zoom")}),ie.jsx("th",{rowSpan:2,children:e("Output value")})]})}),ie.jsx("tbody",{children:t})]})}),ie.jsxs("div",{className:"maputnik-toolbox",children:[ie.jsxs(Js,{className:"maputnik-add-stop",onClick:this.props.onAddStop?.bind(this),children:[ie.jsx(w6,{style:{verticalAlign:"text-bottom"}}),e("Add stop")]}),ie.jsxs(Js,{className:"maputnik-add-stop",onClick:this.props.onExpressionClick?.bind(this),children:[ie.jsx(b4,{style:{verticalAlign:"text-bottom"}}),e("Convert to expression")]})]})]})]})})}getDataFunctionTypes(e){return Qn().f[18]++,Qn().s[50]++,e["property-type"]==="data-driven"?(Qn().b[9][0]++,Qn().s[51]++,["interpolate","categorical","interval","exponential","identity"]):(Qn().b[9][1]++,Qn().s[52]++,["interpolate"])}}const KRe=(Qn().s[53]++,Jo()(URe));function pt(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldFunction.tsx",e="cec93a709e0799aecc929100cb853febe363652d",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldFunction.tsx",statementMap:{0:{start:{line:10,column:2},end:{line:10,column:78}},1:{start:{line:13,column:2},end:{line:13,column:74}},2:{start:{line:16,column:2},end:{line:18,column:5}},3:{start:{line:17,column:4},end:{line:17,column:52}},4:{start:{line:21,column:2},end:{line:21,column:123}},5:{start:{line:24,column:2},end:{line:26,column:5}},6:{start:{line:25,column:4},end:{line:25,column:83}},7:{start:{line:29,column:2},end:{line:29,column:64}},8:{start:{line:32,column:16},end:{line:32,column:47}},9:{start:{line:33,column:2},end:{line:33,column:38}},10:{start:{line:36,column:2},end:{line:38,column:3}},11:{start:{line:37,column:4},end:{line:37,column:37}},12:{start:{line:39,column:2},end:{line:39,column:15}},13:{start:{line:42,column:2},end:{line:62,column:3}},14:{start:{line:43,column:4},end:{line:43,column:19}},15:{start:{line:44,column:9},end:{line:62,column:3}},16:{start:{line:45,column:4},end:{line:45,column:19}},17:{start:{line:46,column:9},end:{line:62,column:3}},18:{start:{line:47,column:4},end:{line:47,column:19}},19:{start:{line:48,column:9},end:{line:62,column:3}},20:{start:{line:49,column:4},end:{line:49,column:19}},21:{start:{line:50,column:9},end:{line:62,column:3}},22:{start:{line:51,column:4},end:{line:51,column:19}},23:{start:{line:52,column:9},end:{line:62,column:3}},24:{start:{line:53,column:4},end:{line:53,column:19}},25:{start:{line:54,column:9},end:{line:62,column:3}},26:{start:{line:55,column:4},end:{line:55,column:19}},27:{start:{line:56,column:9},end:{line:62,column:3}},28:{start:{line:57,column:4},end:{line:57,column:27}},29:{start:{line:58,column:9},end:{line:62,column:3}},30:{start:{line:59,column:4},end:{line:59,column:27}},31:{start:{line:61,column:4},end:{line:61,column:24}},32:{start:{line:64,column:22},end:{line:302,column:1}},33:{start:{line:65,column:34},end:{line:67,column:3}},34:{start:{line:68,column:36},end:{line:68,column:57}},35:{start:{line:69,column:2},end:{line:73,column:48}},36:{start:{line:70,column:4},end:{line:72,column:5}},37:{start:{line:71,column:6},end:{line:71,column:61}},38:{start:{line:74,column:31},end:{line:82,column:3}},39:{start:{line:75,column:4},end:{line:77,column:5}},40:{start:{line:76,column:6},end:{line:76,column:27}},41:{start:{line:78,column:4},end:{line:80,column:5}},42:{start:{line:79,column:6},end:{line:79,column:24}},43:{start:{line:81,column:4},end:{line:81,column:25}},44:{start:{line:83,column:18},end:{line:99,column:3}},45:{start:{line:84,column:18},end:{line:84,column:44}},46:{start:{line:85,column:21},end:{line:85,column:44}},47:{start:{line:86,column:4},end:{line:93,column:5}},48:{start:{line:87,column:6},end:{line:90,column:9}},49:{start:{line:92,column:6},end:{line:92,column:49}},50:{start:{line:94,column:25},end:{line:97,column:5}},51:{start:{line:98,column:4},end:{line:98,column:50}},52:{start:{line:100,column:27},end:{line:104,column:3}},53:{start:{line:101,column:37},end:{line:101,column:42}},54:{start:{line:102,column:4},end:{line:102,column:49}},55:{start:{line:103,column:4},end:{line:103,column:25}},56:{start:{line:105,column:21},end:{line:116,column:3}},57:{start:{line:106,column:18},end:{line:106,column:44}},58:{start:{line:107,column:4},end:{line:107,column:29}},59:{start:{line:108,column:23},end:{line:111,column:5}},60:{start:{line:112,column:4},end:{line:114,column:5}},61:{start:{line:113,column:6},end:{line:113,column:33}},62:{start:{line:115,column:4},end:{line:115,column:50}},63:{start:{line:117,column:27},end:{line:146,column:3}},64:{start:{line:118,column:22},end:{line:118,column:27}},65:{start:{line:120,column:4},end:{line:144,column:5}},66:{start:{line:121,column:6},end:{line:136,column:7}},67:{start:{line:122,column:8},end:{line:127,column:10}},68:{start:{line:125,column:12},end:{line:125,column:83}},69:{start:{line:129,column:8},end:{line:135,column:10}},70:{start:{line:138,column:6},end:{line:143,column:8}},71:{start:{line:145,column:4},end:{line:145,column:46}},72:{start:{line:147,column:25},end:{line:159,column:3}},73:{start:{line:148,column:33},end:{line:148,column:38}},74:{start:{line:149,column:4},end:{line:158,column:5}},75:{start:{line:150,column:6},end:{line:153,column:9}},76:{start:{line:154,column:6},end:{line:154,column:27}},77:{start:{line:155,column:11},end:{line:158,column:5}},78:{start:{line:156,column:6},end:{line:156,column:42}},79:{start:{line:157,column:6},end:{line:157,column:27}},80:{start:{line:160,column:18},end:{line:163,column:3}},81:{start:{line:161,column:33},end:{line:161,column:38}},82:{start:{line:162,column:4},end:{line:162,column:140}},83:{start:{line:164,column:25},end:{line:175,column:3}},84:{start:{line:165,column:33},end:{line:165,column:38}},85:{start:{line:167,column:4},end:{line:173,column:5}},86:{start:{line:168,column:6},end:{line:168,column:67}},87:{start:{line:169,column:11},end:{line:173,column:5}},88:{start:{line:170,column:6},end:{line:170,column:43}},89:{start:{line:172,column:6},end:{line:172,column:65}},90:{start:{line:174,column:4},end:{line:174,column:48}},91:{start:{line:176,column:27},end:{line:214,column:3}},92:{start:{line:177,column:25},end:{line:177,column:62}},93:{start:{line:178,column:22},end:{line:178,column:61}},94:{start:{line:179,column:22},end:{line:179,column:27}},95:{start:{line:181,column:4},end:{line:212,column:5}},96:{start:{line:182,column:6},end:{line:201,column:7}},97:{start:{line:183,column:8},end:{line:190,column:10}},98:{start:{line:188,column:12},end:{line:188,column:106}},99:{start:{line:192,column:8},end:{line:200,column:10}},100:{start:{line:203,column:6},end:{line:211,column:8}},101:{start:{line:213,column:4},end:{line:213,column:46}},102:{start:{line:215,column:32},end:{line:226,column:3}},103:{start:{line:216,column:23},end:{line:224,column:5}},104:{start:{line:225,column:4},end:{line:225,column:48}},105:{start:{line:227,column:24},end:{line:229,column:3}},106:{start:{line:228,column:4},end:{line:228,column:23}},107:{start:{line:230,column:26},end:{line:232,column:3}},108:{start:{line:231,column:4},end:{line:231,column:24}},109:{start:{line:233,column:20},end:{line:233,column:120}},110:{start:{line:235,column:2},end:{line:300,column:3}},111:{start:{line:236,column:4},end:{line:251,column:6}},112:{start:{line:252,column:9},end:{line:300,column:3}},113:{start:{line:253,column:4},end:{line:267,column:6}},114:{start:{line:268,column:9},end:{line:300,column:3}},115:{start:{line:269,column:4},end:{line:283,column:6}},116:{start:{line:285,column:4},end:{line:299,column:6}},117:{start:{line:301,column:2},end:{line:301,column:141}}},fnMap:{0:{name:"isLiteralExpression",decl:{start:{line:9,column:9},end:{line:9,column:28}},loc:{start:{line:9,column:36},end:{line:11,column:1}},line:9},1:{name:"isGetExpression",decl:{start:{line:12,column:9},end:{line:12,column:24}},loc:{start:{line:12,column:32},end:{line:14,column:1}},line:12},2:{name:"isZoomField",decl:{start:{line:15,column:9},end:{line:15,column:20}},loc:{start:{line:15,column:28},end:{line:19,column:1}},line:15},3:{name:"(anonymous_3)",decl:{start:{line:16,column:168},end:{line:16,column:169}},loc:{start:{line:16,column:178},end:{line:18,column:3}},line:16},4:{name:"isIdentityProperty",decl:{start:{line:20,column:9},end:{line:20,column:27}},loc:{start:{line:20,column:35},end:{line:22,column:1}},line:20},5:{name:"isDataStopProperty",decl:{start:{line:23,column:9},end:{line:23,column:27}},loc:{start:{line:23,column:35},end:{line:27,column:1}},line:23},6:{name:"(anonymous_6)",decl:{start:{line:24,column:168},end:{line:24,column:169}},loc:{start:{line:24,column:178},end:{line:26,column:3}},line:24},7:{name:"isDataField",decl:{start:{line:28,column:9},end:{line:28,column:20}},loc:{start:{line:28,column:28},end:{line:30,column:1}},line:28},8:{name:"isPrimative",decl:{start:{line:31,column:9},end:{line:31,column:20}},loc:{start:{line:31,column:28},end:{line:34,column:1}},line:31},9:{name:"isArrayOfPrimatives",decl:{start:{line:35,column:9},end:{line:35,column:28}},loc:{start:{line:35,column:37},end:{line:40,column:1}},line:35},10:{name:"getDataType",decl:{start:{line:41,column:9},end:{line:41,column:20}},loc:{start:{line:41,column:44},end:{line:63,column:1}},line:41},11:{name:"(anonymous_11)",decl:{start:{line:64,column:22},end:{line:64,column:23}},loc:{start:{line:64,column:33},end:{line:302,column:1}},line:64},12:{name:"(anonymous_12)",decl:{start:{line:69,column:18},end:{line:69,column:19}},loc:{start:{line:69,column:24},end:{line:73,column:3}},line:69},13:{name:"(anonymous_13)",decl:{start:{line:74,column:31},end:{line:74,column:32}},loc:{start:{line:74,column:46},end:{line:82,column:3}},line:74},14:{name:"(anonymous_14)",decl:{start:{line:83,column:18},end:{line:83,column:19}},loc:{start:{line:83,column:24},end:{line:99,column:3}},line:83},15:{name:"(anonymous_15)",decl:{start:{line:100,column:27},end:{line:100,column:28}},loc:{start:{line:100,column:33},end:{line:104,column:3}},line:100},16:{name:"(anonymous_16)",decl:{start:{line:105,column:21},end:{line:105,column:22}},loc:{start:{line:105,column:34},end:{line:116,column:3}},line:105},17:{name:"(anonymous_17)",decl:{start:{line:117,column:27},end:{line:117,column:28}},loc:{start:{line:117,column:33},end:{line:146,column:3}},line:117},18:{name:"(anonymous_18)",decl:{start:{line:124,column:33},end:{line:124,column:34}},loc:{start:{line:124,column:43},end:{line:126,column:11}},line:124},19:{name:"(anonymous_19)",decl:{start:{line:147,column:25},end:{line:147,column:26}},loc:{start:{line:147,column:31},end:{line:159,column:3}},line:147},20:{name:"(anonymous_20)",decl:{start:{line:160,column:18},end:{line:160,column:19}},loc:{start:{line:160,column:24},end:{line:163,column:3}},line:160},21:{name:"(anonymous_21)",decl:{start:{line:164,column:25},end:{line:164,column:26}},loc:{start:{line:164,column:31},end:{line:175,column:3}},line:164},22:{name:"(anonymous_22)",decl:{start:{line:176,column:27},end:{line:176,column:28}},loc:{start:{line:176,column:33},end:{line:214,column:3}},line:176},23:{name:"(anonymous_23)",decl:{start:{line:187,column:33},end:{line:187,column:34}},loc:{start:{line:187,column:43},end:{line:189,column:11}},line:187},24:{name:"(anonymous_24)",decl:{start:{line:215,column:32},end:{line:215,column:33}},loc:{start:{line:215,column:38},end:{line:226,column:3}},line:215},25:{name:"(anonymous_25)",decl:{start:{line:227,column:24},end:{line:227,column:25}},loc:{start:{line:227,column:30},end:{line:229,column:3}},line:227},26:{name:"(anonymous_26)",decl:{start:{line:230,column:26},end:{line:230,column:27}},loc:{start:{line:230,column:32},end:{line:232,column:3}},line:230}},branchMap:{0:{loc:{start:{line:10,column:9},end:{line:10,column:77}},type:"binary-expr",locations:[{start:{line:10,column:9},end:{line:10,column:29}},{start:{line:10,column:33},end:{line:10,column:51}},{start:{line:10,column:55},end:{line:10,column:77}}],line:10},1:{loc:{start:{line:13,column:9},end:{line:13,column:73}},type:"binary-expr",locations:[{start:{line:13,column:9},end:{line:13,column:29}},{start:{line:13,column:33},end:{line:13,column:51}},{start:{line:13,column:55},end:{line:13,column:73}}],line:13},2:{loc:{start:{line:16,column:9},end:{line:18,column:4}},type:"binary-expr",locations:[{start:{line:16,column:9},end:{line:16,column:34}},{start:{line:16,column:38},end:{line:16,column:49}},{start:{line:16,column:53},end:{line:16,column:90}},{start:{line:16,column:94},end:{line:16,column:120}},{start:{line:16,column:124},end:{line:16,column:146}},{start:{line:16,column:150},end:{line:18,column:4}}],line:16},3:{loc:{start:{line:17,column:11},end:{line:17,column:51}},type:"binary-expr",locations:[{start:{line:17,column:11},end:{line:17,column:30}},{start:{line:17,column:34},end:{line:17,column:51}}],line:17},4:{loc:{start:{line:21,column:9},end:{line:21,column:122}},type:"binary-expr",locations:[{start:{line:21,column:9},end:{line:21,column:34}},{start:{line:21,column:38},end:{line:21,column:63}},{start:{line:21,column:67},end:{line:21,column:122}}],line:21},5:{loc:{start:{line:24,column:9},end:{line:26,column:4}},type:"binary-expr",locations:[{start:{line:24,column:9},end:{line:24,column:34}},{start:{line:24,column:38},end:{line:24,column:49}},{start:{line:24,column:53},end:{line:24,column:90}},{start:{line:24,column:94},end:{line:24,column:116}},{start:{line:24,column:120},end:{line:24,column:146}},{start:{line:24,column:150},end:{line:26,column:4}}],line:24},6:{loc:{start:{line:25,column:11},end:{line:25,column:82}},type:"binary-expr",locations:[{start:{line:25,column:11},end:{line:25,column:30}},{start:{line:25,column:34},end:{line:25,column:51}},{start:{line:25,column:55},end:{line:25,column:82}}],line:25},7:{loc:{start:{line:29,column:9},end:{line:29,column:63}},type:"binary-expr",locations:[{start:{line:29,column:9},end:{line:29,column:34}},{start:{line:29,column:38},end:{line:29,column:63}}],line:29},8:{loc:{start:{line:36,column:2},end:{line:38,column:3}},type:"if",locations:[{start:{line:36,column:2},end:{line:38,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:36},9:{loc:{start:{line:41,column:28},end:{line:41,column:42}},type:"default-arg",locations:[{start:{line:41,column:40},end:{line:41,column:42}}],line:41},10:{loc:{start:{line:42,column:2},end:{line:62,column:3}},type:"if",locations:[{start:{line:42,column:2},end:{line:62,column:3}},{start:{line:44,column:9},end:{line:62,column:3}}],line:42},11:{loc:{start:{line:44,column:9},end:{line:62,column:3}},type:"if",locations:[{start:{line:44,column:9},end:{line:62,column:3}},{start:{line:46,column:9},end:{line:62,column:3}}],line:44},12:{loc:{start:{line:46,column:9},end:{line:62,column:3}},type:"if",locations:[{start:{line:46,column:9},end:{line:62,column:3}},{start:{line:48,column:9},end:{line:62,column:3}}],line:46},13:{loc:{start:{line:46,column:13},end:{line:46,column:69}},type:"binary-expr",locations:[{start:{line:46,column:13},end:{line:46,column:39}},{start:{line:46,column:43},end:{line:46,column:69}}],line:46},14:{loc:{start:{line:48,column:9},end:{line:62,column:3}},type:"if",locations:[{start:{line:48,column:9},end:{line:62,column:3}},{start:{line:50,column:9},end:{line:62,column:3}}],line:48},15:{loc:{start:{line:48,column:13},end:{line:48,column:75}},type:"binary-expr",locations:[{start:{line:48,column:13},end:{line:48,column:45}},{start:{line:48,column:49},end:{line:48,column:75}}],line:48},16:{loc:{start:{line:50,column:9},end:{line:62,column:3}},type:"if",locations:[{start:{line:50,column:9},end:{line:62,column:3}},{start:{line:52,column:9},end:{line:62,column:3}}],line:50},17:{loc:{start:{line:52,column:9},end:{line:62,column:3}},type:"if",locations:[{start:{line:52,column:9},end:{line:62,column:3}},{start:{line:54,column:9},end:{line:62,column:3}}],line:52},18:{loc:{start:{line:54,column:9},end:{line:62,column:3}},type:"if",locations:[{start:{line:54,column:9},end:{line:62,column:3}},{start:{line:56,column:9},end:{line:62,column:3}}],line:54},19:{loc:{start:{line:56,column:9},end:{line:62,column:3}},type:"if",locations:[{start:{line:56,column:9},end:{line:62,column:3}},{start:{line:58,column:9},end:{line:62,column:3}}],line:56},20:{loc:{start:{line:58,column:9},end:{line:62,column:3}},type:"if",locations:[{start:{line:58,column:9},end:{line:62,column:3}},{start:{line:60,column:9},end:{line:62,column:3}}],line:58},21:{loc:{start:{line:70,column:4},end:{line:72,column:5}},type:"if",locations:[{start:{line:70,column:4},end:{line:72,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:70},22:{loc:{start:{line:75,column:4},end:{line:77,column:5}},type:"if",locations:[{start:{line:75,column:4},end:{line:77,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:75},23:{loc:{start:{line:78,column:4},end:{line:80,column:5}},type:"if",locations:[{start:{line:78,column:4},end:{line:80,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:78},24:{loc:{start:{line:86,column:4},end:{line:93,column:5}},type:"if",locations:[{start:{line:86,column:4},end:{line:93,column:5}},{start:{line:91,column:11},end:{line:93,column:5}}],line:86},25:{loc:{start:{line:112,column:4},end:{line:114,column:5}},type:"if",locations:[{start:{line:112,column:4},end:{line:114,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:112},26:{loc:{start:{line:120,column:4},end:{line:144,column:5}},type:"if",locations:[{start:{line:120,column:4},end:{line:144,column:5}},{start:{line:137,column:11},end:{line:144,column:5}}],line:120},27:{loc:{start:{line:121,column:6},end:{line:136,column:7}},type:"if",locations:[{start:{line:121,column:6},end:{line:136,column:7}},{start:{line:128,column:13},end:{line:136,column:7}}],line:121},28:{loc:{start:{line:125,column:34},end:{line:125,column:81}},type:"binary-expr",locations:[{start:{line:125,column:34},end:{line:125,column:41}},{start:{line:125,column:45},end:{line:125,column:81}}],line:125},29:{loc:{start:{line:140,column:14},end:{line:140,column:59}},type:"binary-expr",locations:[{start:{line:140,column:14},end:{line:140,column:19}},{start:{line:140,column:23},end:{line:140,column:59}}],line:140},30:{loc:{start:{line:141,column:15},end:{line:141,column:60}},type:"binary-expr",locations:[{start:{line:141,column:15},end:{line:141,column:20}},{start:{line:141,column:24},end:{line:141,column:60}}],line:141},31:{loc:{start:{line:149,column:4},end:{line:158,column:5}},type:"if",locations:[{start:{line:149,column:4},end:{line:158,column:5}},{start:{line:155,column:11},end:{line:158,column:5}}],line:149},32:{loc:{start:{line:155,column:11},end:{line:158,column:5}},type:"if",locations:[{start:{line:155,column:11},end:{line:158,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:155},33:{loc:{start:{line:162,column:11},end:{line:162,column:139}},type:"binary-expr",locations:[{start:{line:162,column:11},end:{line:162,column:33}},{start:{line:162,column:37},end:{line:162,column:63}},{start:{line:162,column:67},end:{line:162,column:85}},{start:{line:162,column:89},end:{line:162,column:109}},{start:{line:162,column:113},end:{line:162,column:139}}],line:162},34:{loc:{start:{line:167,column:4},end:{line:173,column:5}},type:"if",locations:[{start:{line:167,column:4},end:{line:173,column:5}},{start:{line:169,column:11},end:{line:173,column:5}}],line:167},35:{loc:{start:{line:167,column:8},end:{line:167,column:53}},type:"binary-expr",locations:[{start:{line:167,column:8},end:{line:167,column:33}},{start:{line:167,column:37},end:{line:167,column:53}}],line:167},36:{loc:{start:{line:169,column:11},end:{line:173,column:5}},type:"if",locations:[{start:{line:169,column:11},end:{line:173,column:5}},{start:{line:171,column:11},end:{line:173,column:5}}],line:169},37:{loc:{start:{line:172,column:31},end:{line:172,column:63}},type:"binary-expr",locations:[{start:{line:172,column:31},end:{line:172,column:36}},{start:{line:172,column:40},end:{line:172,column:63}}],line:172},38:{loc:{start:{line:178,column:22},end:{line:178,column:61}},type:"cond-expr",locations:[{start:{line:178,column:55},end:{line:178,column:57}},{start:{line:178,column:60},end:{line:178,column:61}}],line:178},39:{loc:{start:{line:181,column:4},end:{line:212,column:5}},type:"if",locations:[{start:{line:181,column:4},end:{line:212,column:5}},{start:{line:202,column:11},end:{line:212,column:5}}],line:181},40:{loc:{start:{line:182,column:6},end:{line:201,column:7}},type:"if",locations:[{start:{line:182,column:6},end:{line:201,column:7}},{start:{line:191,column:13},end:{line:201,column:7}}],line:182},41:{loc:{start:{line:188,column:57},end:{line:188,column:104}},type:"binary-expr",locations:[{start:{line:188,column:57},end:{line:188,column:64}},{start:{line:188,column:68},end:{line:188,column:104}}],line:188},42:{loc:{start:{line:208,column:42},end:{line:208,column:93}},type:"binary-expr",locations:[{start:{line:208,column:42},end:{line:208,column:53}},{start:{line:208,column:57},end:{line:208,column:93}}],line:208},43:{loc:{start:{line:209,column:43},end:{line:209,column:94}},type:"binary-expr",locations:[{start:{line:209,column:43},end:{line:209,column:54}},{start:{line:209,column:58},end:{line:209,column:94}}],line:209},44:{loc:{start:{line:233,column:20},end:{line:233,column:120}},type:"cond-expr",locations:[{start:{line:233,column:62},end:{line:233,column:89}},{start:{line:233,column:92},end:{line:233,column:120}}],line:233},45:{loc:{start:{line:235,column:2},end:{line:300,column:3}},type:"if",locations:[{start:{line:235,column:2},end:{line:300,column:3}},{start:{line:252,column:9},end:{line:300,column:3}}],line:235},46:{loc:{start:{line:252,column:9},end:{line:300,column:3}},type:"if",locations:[{start:{line:252,column:9},end:{line:300,column:3}},{start:{line:268,column:9},end:{line:300,column:3}}],line:252},47:{loc:{start:{line:268,column:9},end:{line:300,column:3}},type:"if",locations:[{start:{line:268,column:9},end:{line:300,column:3}},{start:{line:284,column:9},end:{line:300,column:3}}],line:268}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0,106:0,107:0,108:0,109:0,110:0,111:0,112:0,113:0,114:0,115:0,116:0,117:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0},b:{0:[0,0,0],1:[0,0,0],2:[0,0,0,0,0,0],3:[0,0],4:[0,0,0],5:[0,0,0,0,0,0],6:[0,0,0],7:[0,0],8:[0,0],9:[0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0,0],27:[0,0],28:[0,0],29:[0,0],30:[0,0],31:[0,0],32:[0,0],33:[0,0,0,0,0],34:[0,0],35:[0,0],36:[0,0],37:[0,0],38:[0,0],39:[0,0],40:[0,0],41:[0,0],42:[0,0],43:[0,0],44:[0,0],45:[0,0],46:[0,0],47:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldFunction.tsx"],names:[],mappings:"AAiVM;AAjVN,OAAO,WAAW;AAElB,OAAO,kBAAkB;AACzB,OAAO,kBAAiC;AACxC,OAAO,kBAAkB;AACzB,OAAO,wBAAwB;AAC/B,SAAQ,YAAY,qBAAoB;AACxC,SAAQ,2BAA0B;AAIlC,SAAS,oBAAoB,OAAY;AACvC,SAAQ,MAAM,QAAQ,KAAK,KAAK,MAAM,WAAW,KAAK,MAAM,CAAC,MAAM;AACrE;AAEA,SAAS,gBAAgB,OAAY;AACnC,SACE,MAAM,QAAQ,KAAK,KACnB,MAAM,WAAW,KACjB,MAAM,CAAC,MAAM;AAEjB;AAEA,SAAS,YAAY,OAAY;AAC/B,SACE,OAAO,UAAW,YAClB,MAAM,SACN,OAAO,MAAM,aAAc,eAC3B,MAAM,QAAQ,MAAM,KAAK,KACzB,MAAM,MAAM,SAAS,KACrB,MAAM,MAAM,MAAM,CAAC,SAAe;AAChC,WACE,MAAM,QAAQ,IAAI,KAClB,KAAK,WAAW;AAAA,EAEpB,CAAC;AAEL;AAEA,SAAS,mBAAmB,OAAY;AACtC,SACE,OAAO,UAAW,YAClB,MAAM,SAAS,cACf,OAAO,UAAU,eAAe,KAAK,OAAO,UAAU;AAE1D;AAEA,SAAS,mBAAmB,OAAY;AACtC,SACE,OAAO,UAAW,YAClB,MAAM,SACN,OAAO,MAAM,aAAc,eAC3B,MAAM,MAAM,SAAS,KACrB,MAAM,QAAQ,MAAM,KAAK,KACzB,MAAM,MAAM,MAAM,CAAC,SAAe;AAChC,WACE,MAAM,QAAQ,IAAI,KAClB,KAAK,WAAW,KAChB,OAAO,KAAK,CAAC,MAAO;AAAA,EAExB,CAAC;AAEL;AAEA,SAAS,YAAY,OAAY;AAC/B,SACE,mBAAmB,KAAK,KACxB,mBAAmB,KAAK;AAE5B;AAEA,SAAS,YAAY,OAAgD;AACnE,QAAM,QAAQ,CAAC,UAAU,WAAW,QAAQ;AAC5C,SAAO,MAAM,SAAS,OAAO,KAAM;AACrC;AAEA,SAAS,oBAAoB,QAAyD;AACpF,MAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,WAAO,OAAO,MAAM,WAAW;AAAA,EACjC;AACA,SAAO;AACT;AAEA,SAAS,YAAY,OAAY,YAAU,CAAC,GAAU;AACpD,MAAI,UAAU,QAAW;AACvB,WAAO;AAAA,EACT,WACS,YAAY,KAAK,GAAG;AAC3B,WAAO;AAAA,EACT,WACS,UAAU,SAAS,WAAW,oBAAoB,KAAK,GAAG;AACjE,WAAO;AAAA,EACT,WACS,UAAU,SAAS,iBAAiB,oBAAoB,KAAK,GAAG;AACvE,WAAO;AAAA,EACT,WACS,UAAU,SAAS,cAAc;AACxC,WAAO;AAAA,EACT,WACS,UAAU,SAAS,WAAW;AACrC,WAAO;AAAA,EACT,WACS,UAAU,SAAS,kCAAkC;AAC5D,WAAO;AAAA,EACT,WACS,YAAY,KAAK,GAAG;AAC3B,WAAO;AAAA,EACT,WACS,YAAY,KAAK,GAAG;AAC3B,WAAO;AAAA,EACT,OACK;AACH,WAAO;AAAA,EACT;AACF;AAgBA,MAAM,gBAA8C,CAAC,UAAU;AAC7D,QAAM,CAAC,UAAU,WAAW,IAAI,MAAM;AAAA,IACpC,YAAY,MAAM,OAAO,MAAM,SAAS;AAAA,EAC1C;AACA,QAAM,CAAC,WAAW,YAAY,IAAI,MAAM,SAAS,KAAK;AAEtD,QAAM,UAAU,MAAM;AACpB,QAAI,CAAC,WAAW;AACd,kBAAY,YAAY,MAAM,OAAO,MAAM,SAAS,CAAC;AAAA,IACvD;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,MAAM,WAAW,SAAS,CAAC;AAE5C,QAAM,uBAAuB,CAAC,cAAmB;AAC/C,QAAI,UAAU,WAAW,cAAc;AACrC,aAAO;AAAA,IACT;AACA,QAAI,UAAU,SAAS,UAAU;AAC/B,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAEA,QAAM,UAAU,MAAM;AACpB,UAAM,QAAQ,MAAM,MAAM,MAAM,MAAM,CAAC;AACvC,UAAM,WAAW,MAAM,MAAM,SAAS,CAAC;AACvC,QAAI,OAAO,SAAS,CAAC,MAAM,UAAU;AACnC,YAAM,KAAK;AAAA,QACT,EAAE,MAAM,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,SAAS,CAAC,EAAE,MAAM;AAAA,QACvD,SAAS,CAAC;AAAA,MACZ,CAAC;AAAA,IACH,OAAO;AACL,YAAM,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC;AAAA,IAC3C;AAEA,UAAM,eAAe;AAAA,MACnB,GAAG,MAAM;AAAA,MACT;AAAA,IACF;AAEA,UAAM,SAAS,MAAM,WAAW,YAAY;AAAA,EAC9C;AAEA,QAAM,mBAAmB,MAAM;AAC7B,UAAM,EAAE,WAAW,UAAU,IAAI;AACjC,UAAM,SAAS,WAAW,UAAU,OAAO;AAC3C,gBAAY,OAAO;AAAA,EACrB;AAEA,QAAM,aAAa,CAAC,YAAoB;AACtC,UAAM,QAAQ,MAAM,MAAM,MAAM,MAAM,CAAC;AACvC,UAAM,OAAO,SAAS,CAAC;AAEvB,QAAI,eAAoB;AAAA,MACtB,GAAG,MAAM;AAAA,MACT;AAAA,IACF;AAEA,QAAI,MAAM,WAAW,GAAG;AACtB,qBAAe,MAAM,CAAC,EAAE,CAAC;AAAA,IAC3B;AAEA,UAAM,SAAS,MAAM,WAAW,YAAY;AAAA,EAC9C;AAEA,QAAM,mBAAmB,MAAM;AAC7B,UAAM,EAAE,MAAM,IAAI;AAElB,QAAI;AACJ,QAAI,OAAO,UAAU,UAAU;AAC7B,UAAI,MAAM,OAAO;AACf,mBAAW;AAAA,UACT,MAAM,MAAM;AAAA,UACZ,OAAO,MAAM,MAAM,IAAI,CAAC,SAAe;AACrC,mBAAO,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK,oBAAoB,MAAM,SAAS,CAAC;AAAA,UACvE,CAAC;AAAA,QACH;AAAA,MACF,OAAO;AACL,mBAAW;AAAA,UACT,MAAM,MAAM;AAAA,UACZ,OAAO;AAAA,YACL,CAAC,GAAG,oBAAoB,MAAM,SAAS,CAAC;AAAA,YACxC,CAAC,IAAI,oBAAoB,MAAM,SAAS,CAAC;AAAA,UAC3C;AAAA,QACF;AAAA,MACF;AAAA,IACF,OAAO;AACL,iBAAW;AAAA,QACT,OAAO;AAAA,UACL,CAAC,GAAG,SAAS,oBAAoB,MAAM,SAAS,CAAC;AAAA,UACjD,CAAC,IAAI,SAAS,oBAAoB,MAAM,SAAS,CAAC;AAAA,QACpD;AAAA,MACF;AAAA,IACF;AAEA,UAAM,SAAS,MAAM,WAAW,QAAQ;AAAA,EAC1C;AAEA,QAAM,iBAAiB,MAAM;AAC3B,UAAM,EAAE,OAAO,UAAU,IAAI;AAE7B,QAAI,gBAAgB,KAAK,GAAG;AAC1B,YAAM,SAAS,WAAW;AAAA,QACxB,MAAM;AAAA,QACN,UAAU,MAAM,CAAC;AAAA,MACnB,CAAC;AACD,kBAAY,OAAO;AAAA,IACrB,WAAW,oBAAoB,KAAK,GAAG;AACrC,YAAM,SAAS,WAAW,MAAM,CAAC,CAAC;AAClC,kBAAY,OAAO;AAAA,IACrB;AAAA,EACF;AAEA,QAAM,UAAU,MAAM;AACpB,UAAM,EAAE,OAAO,UAAU,IAAI;AAC7B,WACE,gBAAgB,KAAK,KACrB,oBAAoB,KAAK,KACzB,YAAY,KAAK,KAChB,MAAM,QAAQ,KAAK,KAAK,UAAU,SAAS;AAAA,EAEhD;AAEA,QAAM,iBAAiB,MAAM;AAC3B,UAAM,EAAE,OAAO,UAAU,IAAI;AAC7B,QAAI;AAEJ,QAAI,OAAO,UAAU,YAAY,WAAW,OAAO;AACjD,mBAAa,cAAc,gBAAgB,OAAO,SAAS;AAAA,IAC7D,WAAW,mBAAmB,KAAK,GAAG;AACpC,mBAAa,CAAC,OAAO,MAAM,QAAQ;AAAA,IACrC,OAAO;AACL,mBAAa,CAAC,WAAW,SAAS,MAAM,UAAU,OAAO;AAAA,IAC3D;AACA,UAAM,SAAS,MAAM,WAAW,UAAU;AAAA,EAC5C;AAEA,QAAM,mBAAmB,MAAM;AAC7B,UAAM,eAAe,qBAAqB,MAAM,SAAS;AACzD,UAAM,YAAY,iBAAiB,gBAAgB,KAAK;AACxD,UAAM,EAAE,MAAM,IAAI;AAClB,QAAI;AAEJ,QAAI,OAAO,UAAU,UAAU;AAC7B,UAAI,MAAM,OAAO;AACf,mBAAW;AAAA,UACT,UAAU;AAAA,UACV,MAAM;AAAA,UACN,MAAM,MAAM;AAAA,UACZ,OAAO,MAAM,MAAM,IAAI,CAAC,SAAe;AACrC,mBAAO,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,OAAO,UAAU,GAAG,KAAK,CAAC,KAAK,oBAAoB,MAAM,SAAS,CAAC;AAAA,UAC9F,CAAC;AAAA,QACH;AAAA,MACF,OAAO;AACL,mBAAW;AAAA,UACT,UAAU;AAAA,UACV,MAAM;AAAA,UACN,MAAM,MAAM;AAAA,UACZ,OAAO;AAAA,YACL,CAAC,EAAE,MAAM,GAAG,OAAO,UAAU,GAAG,oBAAoB,MAAM,SAAS,CAAC;AAAA,YACpE,CAAC,EAAE,MAAM,IAAI,OAAO,UAAU,GAAG,oBAAoB,MAAM,SAAS,CAAC;AAAA,UACvE;AAAA,QACF;AAAA,MACF;AAAA,IACF,OAAO;AACL,iBAAW;AAAA,QACT,UAAU;AAAA,QACV,MAAM;AAAA,QACN,MAAM,MAAM;AAAA,QACZ,OAAO;AAAA,UACL,CAAC,EAAE,MAAM,GAAG,OAAO,UAAU,GAAG,MAAM,SAAS,oBAAoB,MAAM,SAAS,CAAC;AAAA,UACnF,CAAC,EAAE,MAAM,IAAI,OAAO,UAAU,GAAG,MAAM,SAAS,oBAAoB,MAAM,SAAS,CAAC;AAAA,QACtF;AAAA,MACF;AAAA,IACF;AAEA,UAAM,SAAS,MAAM,WAAW,QAAQ;AAAA,EAC1C;AAEA,QAAM,wBAAwB,MAAM;AAClC,UAAM,aAAa;AAAA,MACjB;AAAA,MACA,CAAC,QAAQ;AAAA,MACT,CAAC,WAAW;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAEA,UAAM,SAAS,MAAM,WAAW,UAAU;AAAA,EAC5C;AAEA,QAAM,gBAAgB,MAAM;AAC1B,iBAAa,IAAI;AAAA,EACnB;AAEA,QAAM,kBAAkB,MAAM;AAC5B,iBAAa,KAAK;AAAA,EACpB;AAEA,QAAM,YACJ,MAAM,UAAU,YAAY,MAAM,QAAQ,8BAA8B;AAE1E,MAAI;AAEJ,MAAI,aAAa,cAAc;AAC7B,gBACE;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,MAAM;AAAA,QACd,UAAU,MAAM,SAAS,KAAK,MAAM,MAAM,SAAS;AAAA,QACnD;AAAA,QACA,QAAQ;AAAA,QACR,UAAU;AAAA,QACV,WAAW,MAAM;AAAA,QACjB,WAAW,MAAM;AAAA,QACjB,WAAW,MAAM;AAAA,QACjB,OAAO,MAAM;AAAA,QACb,SAAS;AAAA,QACT,QAAQ;AAAA;AAAA,IACV;AAAA,EAEJ,WAAW,aAAa,iBAAiB;AACvC,gBACE;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,MAAM;AAAA,QACd,UAAU,MAAM,SAAS,KAAK,IAAI;AAAA,QAClC,WAAW,MAAM;AAAA,QACjB,WAAW,MAAM;AAAA,QACjB,WAAW,MAAM;AAAA,QACjB,OAAO,MAAM;AAAA,QACb,cAAc;AAAA,QACd,WAAW;AAAA,QACX,wBAAwB;AAAA,QACxB,mBAAmB;AAAA;AAAA,IACrB;AAAA,EAEJ,WAAW,aAAa,iBAAiB;AACvC,gBACE;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,MAAM;AAAA,QACd,UAAU,MAAM,SAAS,KAAK,IAAI;AAAA,QAClC,WAAW,MAAM;AAAA,QACjB,WAAW,MAAM;AAAA,QACjB,WAAW,MAAM;AAAA,QACjB,OAAO,MAAM;AAAA,QACb,cAAc;AAAA,QACd,WAAW;AAAA,QACX,wBAAwB;AAAA,QACxB,mBAAmB;AAAA;AAAA,IACrB;AAAA,EAEJ,OAAO;AACL,gBACE;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,MAAM;AAAA,QACd,UAAU,MAAM,SAAS,KAAK,IAAI;AAAA,QAClC,WAAW,MAAM;AAAA,QACjB,WAAW,MAAM;AAAA,QACjB,WAAW,MAAM;AAAA,QACjB,OAAO,MAAM;AAAA,QACb,aAAa;AAAA,QACb,aAAa;AAAA,QACb,mBAAmB;AAAA,QACnB,kBAAkB;AAAA;AAAA,IACpB;AAAA,EAEJ;AAEA,SACE,oBAAC,SAAI,WAAW,WAAW,eAAa,0BAA0B,MAAM,WACrE,qBACH;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"cec93a709e0799aecc929100cb853febe363652d"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return pt=function(){return s},s}pt();function _V(n){return pt().f[0]++,pt().s[0]++,pt().b[0][0]++,Array.isArray(n)&&(pt().b[0][1]++,n.length===2)&&(pt().b[0][2]++,n[0]==="literal")}function xV(n){return pt().f[1]++,pt().s[1]++,pt().b[1][0]++,Array.isArray(n)&&(pt().b[1][1]++,n.length===2)&&(pt().b[1][2]++,n[0]==="get")}function LRe(n){return pt().f[2]++,pt().s[2]++,pt().b[2][0]++,typeof n=="object"&&(pt().b[2][1]++,n.stops)&&(pt().b[2][2]++,typeof n.property>"u")&&(pt().b[2][3]++,Array.isArray(n.stops))&&(pt().b[2][4]++,n.stops.length>1)&&(pt().b[2][5]++,n.stops.every(e=>(pt().f[3]++,pt().s[3]++,pt().b[3][0]++,Array.isArray(e)&&(pt().b[3][1]++,e.length===2))))}function zse(n){return pt().f[4]++,pt().s[4]++,pt().b[4][0]++,typeof n=="object"&&(pt().b[4][1]++,n.type==="identity")&&(pt().b[4][2]++,Object.prototype.hasOwnProperty.call(n,"property"))}function FRe(n){return pt().f[5]++,pt().s[5]++,pt().b[5][0]++,typeof n=="object"&&(pt().b[5][1]++,n.stops)&&(pt().b[5][2]++,typeof n.property<"u")&&(pt().b[5][3]++,n.stops.length>1)&&(pt().b[5][4]++,Array.isArray(n.stops))&&(pt().b[5][5]++,n.stops.every(e=>(pt().f[6]++,pt().s[6]++,pt().b[6][0]++,Array.isArray(e)&&(pt().b[6][1]++,e.length===2)&&(pt().b[6][2]++,typeof e[0]=="object"))))}function zRe(n){return pt().f[7]++,pt().s[7]++,pt().b[7][0]++,zse(n)||(pt().b[7][1]++,FRe(n))}function yL(n){pt().f[8]++;const e=(pt().s[8]++,["string","boolean","number"]);return pt().s[9]++,e.includes(typeof n)}function MV(n){return pt().f[9]++,pt().s[10]++,Array.isArray(n)?(pt().b[8][0]++,pt().s[11]++,n.every(yL)):(pt().b[8][1]++,pt().s[12]++,!1)}function wV(n,e=(pt().b[9][0]++,{})){return pt().f[10]++,pt().s[13]++,n===void 0?(pt().b[10][0]++,pt().s[14]++,"value"):(pt().b[10][1]++,pt().s[15]++,yL(n)?(pt().b[11][0]++,pt().s[16]++,"value"):(pt().b[11][1]++,pt().s[17]++,pt().b[13][0]++,e.type==="array"&&(pt().b[13][1]++,MV(n))?(pt().b[12][0]++,pt().s[18]++,"value"):(pt().b[12][1]++,pt().s[19]++,pt().b[15][0]++,e.type==="numberArray"&&(pt().b[15][1]++,MV(n))?(pt().b[14][0]++,pt().s[20]++,"value"):(pt().b[14][1]++,pt().s[21]++,e.type==="colorArray"?(pt().b[16][0]++,pt().s[22]++,"value"):(pt().b[16][1]++,pt().s[23]++,e.type==="padding"?(pt().b[17][0]++,pt().s[24]++,"value"):(pt().b[17][1]++,pt().s[25]++,e.type==="variableAnchorOffsetCollection"?(pt().b[18][0]++,pt().s[26]++,"value"):(pt().b[18][1]++,pt().s[27]++,LRe(n)?(pt().b[19][0]++,pt().s[28]++,"zoom_function"):(pt().b[19][1]++,pt().s[29]++,zRe(n)?(pt().b[20][0]++,pt().s[30]++,"data_function"):(pt().b[20][1]++,pt().s[31]++,"expression")))))))))}pt().s[32]++;const jRe=n=>{pt().f[11]++;const[e,t]=(pt().s[33]++,En.useState(wV(n.value,n.fieldSpec))),[i,r]=(pt().s[34]++,En.useState(!1));pt().s[35]++,En.useEffect(()=>{pt().f[12]++,pt().s[36]++,i?pt().b[21][1]++:(pt().b[21][0]++,pt().s[37]++,t(wV(n.value,n.fieldSpec)))},[n.value,n.fieldSpec,i]),pt().s[38]++;const o=V=>(pt().f[13]++,pt().s[39]++,V.expression.interpolated?(pt().b[22][0]++,pt().s[40]++,"exponential"):(pt().b[22][1]++,pt().s[41]++,V.type==="number"?(pt().b[23][0]++,pt().s[42]++,"interval"):(pt().b[23][1]++,pt().s[43]++,"categorical")));pt().s[44]++;const s=()=>{pt().f[14]++;const V=(pt().s[45]++,n.value.stops.slice(0)),H=(pt().s[46]++,V[V.length-1]);pt().s[47]++,typeof H[0]=="object"?(pt().b[24][0]++,pt().s[48]++,V.push([{zoom:H[0].zoom+1,value:H[0].value},H[1]])):(pt().b[24][1]++,pt().s[49]++,V.push([H[0]+1,H[1]]));const G=(pt().s[50]++,{...n.value,stops:V});pt().s[51]++,n.onChange(n.fieldName,G)};pt().s[52]++;const a=()=>{pt().f[15]++;const{fieldSpec:V,fieldName:H}=(pt().s[53]++,n);pt().s[54]++,n.onChange(H,V.default),pt().s[55]++,t("value")};pt().s[56]++;const c=V=>{pt().f[16]++;const H=(pt().s[57]++,n.value.stops.slice(0));pt().s[58]++,H.splice(V,1);let G=(pt().s[59]++,{...n.value,stops:H});pt().s[60]++,H.length===1?(pt().b[25][0]++,pt().s[61]++,G=H[0][1]):pt().b[25][1]++,pt().s[62]++,n.onChange(n.fieldName,G)};pt().s[63]++;const A=()=>{pt().f[17]++;const{value:V}=(pt().s[64]++,n);let H;pt().s[65]++,typeof V=="object"?(pt().b[26][0]++,pt().s[66]++,V.stops?(pt().b[27][0]++,pt().s[67]++,H={base:V.base,stops:V.stops.map(G=>(pt().f[18]++,pt().s[68]++,[G[0].zoom,(pt().b[28][0]++,G[1]||(pt().b[28][1]++,Nf(n.fieldSpec)))]))}):(pt().b[27][1]++,pt().s[69]++,H={base:V.base,stops:[[6,Nf(n.fieldSpec)],[10,Nf(n.fieldSpec)]]})):(pt().b[26][1]++,pt().s[70]++,H={stops:[[6,(pt().b[29][0]++,V||(pt().b[29][1]++,Nf(n.fieldSpec)))],[10,(pt().b[30][0]++,V||(pt().b[30][1]++,Nf(n.fieldSpec)))]]}),pt().s[71]++,n.onChange(n.fieldName,H)};pt().s[72]++;const m=()=>{pt().f[19]++;const{value:V,fieldName:H}=(pt().s[73]++,n);pt().s[74]++,xV(V)?(pt().b[31][0]++,pt().s[75]++,n.onChange(H,{type:"identity",property:V[1]}),pt().s[76]++,t("value")):(pt().b[31][1]++,pt().s[77]++,_V(V)?(pt().b[32][0]++,pt().s[78]++,n.onChange(H,V[1]),pt().s[79]++,t("value")):pt().b[32][1]++)};pt().s[80]++;const v=()=>{pt().f[20]++;const{value:V,fieldSpec:H}=(pt().s[81]++,n);return pt().s[82]++,pt().b[33][0]++,xV(V)||(pt().b[33][1]++,_V(V))||(pt().b[33][2]++,yL(V))||(pt().b[33][3]++,Array.isArray(V)&&(pt().b[33][4]++,H.type==="array"))};pt().s[83]++;const x=()=>{pt().f[21]++;const{value:V,fieldSpec:H}=(pt().s[84]++,n);let G;pt().s[85]++,pt().b[35][0]++,typeof V=="object"&&(pt().b[35][1]++,"stops"in V)?(pt().b[34][0]++,pt().s[86]++,G=nde.convertFunction(V,H)):(pt().b[34][1]++,pt().s[87]++,zse(V)?(pt().b[36][0]++,pt().s[88]++,G=["get",V.property]):(pt().b[36][1]++,pt().s[89]++,G=["literal",(pt().b[37][0]++,V||(pt().b[37][1]++,n.fieldSpec.default))])),pt().s[90]++,n.onChange(n.fieldName,G)};pt().s[91]++;const _=()=>{pt().f[22]++;const V=(pt().s[92]++,o(n.fieldSpec)),H=(pt().s[93]++,V==="categorical"?(pt().b[38][0]++,""):(pt().b[38][1]++,0)),{value:G}=(pt().s[94]++,n);let Y;pt().s[95]++,typeof G=="object"?(pt().b[39][0]++,pt().s[96]++,G.stops?(pt().b[40][0]++,pt().s[97]++,Y={property:"",type:V,base:G.base,stops:G.stops.map(z=>(pt().f[23]++,pt().s[98]++,[{zoom:z[0],value:H},(pt().b[41][0]++,z[1]||(pt().b[41][1]++,Nf(n.fieldSpec)))]))}):(pt().b[40][1]++,pt().s[99]++,Y={property:"",type:V,base:G.base,stops:[[{zoom:6,value:H},Nf(n.fieldSpec)],[{zoom:10,value:H},Nf(n.fieldSpec)]]})):(pt().b[39][1]++,pt().s[100]++,Y={property:"",type:V,base:G.base,stops:[[{zoom:6,value:H},(pt().b[42][0]++,n.value||(pt().b[42][1]++,Nf(n.fieldSpec)))],[{zoom:10,value:H},(pt().b[43][0]++,n.value||(pt().b[43][1]++,Nf(n.fieldSpec)))]]}),pt().s[101]++,n.onChange(n.fieldName,Y)};pt().s[102]++;const O=()=>{pt().f[24]++;const V=(pt().s[103]++,["interpolate",["linear"],["elevation"],0,"black",2e3,"white"]);pt().s[104]++,n.onChange(n.fieldName,V)};pt().s[105]++;const P=()=>{pt().f[25]++,pt().s[106]++,r(!0)};pt().s[107]++;const F=()=>{pt().f[26]++,pt().s[108]++,r(!1)},j=(pt().s[109]++,n.fieldSpec.default===n.value?(pt().b[44][0]++,"maputnik-default-property"):(pt().b[44][1]++,"maputnik-modified-property"));let Q;return pt().s[110]++,e==="expression"?(pt().b[45][0]++,pt().s[111]++,Q=ie.jsx(tse,{errors:n.errors,onChange:n.onChange.bind(null,n.fieldName),canUndo:v,onUndo:m,onDelete:a,fieldType:n.fieldType,fieldName:n.fieldName,fieldSpec:n.fieldSpec,value:n.value,onFocus:P,onBlur:F})):(pt().b[45][1]++,pt().s[112]++,e==="zoom_function"?(pt().b[46][0]++,pt().s[113]++,Q=ie.jsx(KRe,{errors:n.errors,onChange:n.onChange.bind(null),fieldType:n.fieldType,fieldName:n.fieldName,fieldSpec:n.fieldSpec,value:n.value,onDeleteStop:c,onAddStop:s,onChangeToDataFunction:_,onExpressionClick:x})):(pt().b[46][1]++,pt().s[114]++,e==="data_function"?(pt().b[47][0]++,pt().s[115]++,Q=ie.jsx(PRe,{errors:n.errors,onChange:n.onChange.bind(null),fieldType:n.fieldType,fieldName:n.fieldName,fieldSpec:n.fieldSpec,value:n.value,onDeleteStop:c,onAddStop:s,onChangeToZoomFunction:A,onExpressionClick:x})):(pt().b[47][1]++,pt().s[116]++,Q=ie.jsx(TRe,{errors:n.errors,onChange:n.onChange.bind(null),fieldType:n.fieldType,fieldName:n.fieldName,fieldSpec:n.fieldSpec,value:n.value,onZoomClick:A,onDataClick:_,onExpressionClick:x,onElevationClick:O})))),pt().s[117]++,ie.jsx("div",{className:j,"data-wd-key":"spec-field-container:"+n.fieldName,children:Q})};function Lr(){var n="/home/runner/work/maputnik/maputnik/src/components/PropertyGroup.tsx",e="2b5da791871b9b38760c659b15188ae0aee85eaa",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/PropertyGroup.tsx",statementMap:{0:{start:{line:4,column:23},end:{line:4,column:117}},1:{start:{line:6,column:20},end:{line:6,column:60}},2:{start:{line:7,column:16},end:{line:7,column:49}},3:{start:{line:8,column:20},end:{line:8,column:36}},4:{start:{line:9,column:2},end:{line:14,column:3}},5:{start:{line:10,column:4},end:{line:13,column:6}},6:{start:{line:15,column:2},end:{line:20,column:3}},7:{start:{line:16,column:4},end:{line:19,column:6}},8:{start:{line:21,column:2},end:{line:21,column:19}},9:{start:{line:24,column:16},end:{line:24,column:48}},10:{start:{line:25,column:2},end:{line:25,column:49}},11:{start:{line:28,column:21},end:{line:31,column:3}},12:{start:{line:29,column:18},end:{line:29,column:80}},13:{start:{line:30,column:4},end:{line:30,column:51}},14:{start:{line:33,column:23},end:{line:33,column:33}},15:{start:{line:34,column:19},end:{line:52,column:6}},16:{start:{line:35,column:24},end:{line:35,column:87}},17:{start:{line:36,column:20},end:{line:36,column:48}},18:{start:{line:37,column:21},end:{line:37,column:50}},19:{start:{line:38,column:25},end:{line:38,column:82}},20:{start:{line:39,column:24},end:{line:39,column:63}},21:{start:{line:40,column:6},end:{line:51,column:8}},22:{start:{line:53,column:4},end:{line:53,column:98}}},fnMap:{0:{name:"getFieldSpec",decl:{start:{line:5,column:9},end:{line:5,column:21}},loc:{start:{line:5,column:50},end:{line:22,column:1}},line:5},1:{name:"getGroupName",decl:{start:{line:23,column:9},end:{line:23,column:21}},loc:{start:{line:23,column:50},end:{line:26,column:1}},line:23},2:{name:"(anonymous_2)",decl:{start:{line:28,column:21},end:{line:28,column:22}},loc:{start:{line:28,column:45},end:{line:31,column:3}},line:28},3:{name:"(anonymous_3)",decl:{start:{line:32,column:2},end:{line:32,column:3}},loc:{start:{line:32,column:11},end:{line:54,column:3}},line:32},4:{name:"(anonymous_4)",decl:{start:{line:34,column:46},end:{line:34,column:47}},loc:{start:{line:34,column:61},end:{line:52,column:5}},line:34}},branchMap:{0:{loc:{start:{line:9,column:2},end:{line:14,column:3}},type:"if",locations:[{start:{line:9,column:2},end:{line:14,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:9},1:{loc:{start:{line:15,column:2},end:{line:20,column:3}},type:"if",locations:[{start:{line:15,column:2},end:{line:20,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:15},2:{loc:{start:{line:24,column:16},end:{line:24,column:48}},type:"binary-expr",locations:[{start:{line:24,column:16},end:{line:24,column:42}},{start:{line:24,column:46},end:{line:24,column:48}}],line:24},3:{loc:{start:{line:25,column:9},end:{line:25,column:48}},type:"cond-expr",locations:[{start:{line:25,column:30},end:{line:25,column:37}},{start:{line:25,column:40},end:{line:25,column:48}}],line:25},4:{loc:{start:{line:36,column:20},end:{line:36,column:48}},type:"binary-expr",locations:[{start:{line:36,column:20},end:{line:36,column:42}},{start:{line:36,column:46},end:{line:36,column:48}}],line:36},5:{loc:{start:{line:37,column:21},end:{line:37,column:50}},type:"binary-expr",locations:[{start:{line:37,column:21},end:{line:37,column:44}},{start:{line:37,column:48},end:{line:37,column:50}}],line:37},6:{loc:{start:{line:38,column:25},end:{line:38,column:82}},type:"cond-expr",locations:[{start:{line:38,column:46},end:{line:38,column:62}},{start:{line:38,column:65},end:{line:38,column:82}}],line:38},7:{loc:{start:{line:39,column:24},end:{line:39,column:63}},type:"cond-expr",locations:[{start:{line:39,column:45},end:{line:39,column:52}},{start:{line:39,column:55},end:{line:39,column:63}}],line:39}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/PropertyGroup.tsx"],names:[],mappings:"AA4Da;AA5Db,OAAO,WAAW;AAElB,OAAO,mBAAmB;AAI1B,MAAM,iBAAiB,CAAC,sBAAsB,gBAAgB,gBAAgB,0BAA0B,YAAY;AAIpH,SAAS,aAAa,MAAW,WAAuC,WAAmB;AACzF,QAAM,YAAY,aAAa,MAAM,WAAW,SAAS;AACzD,QAAM,QAAQ,KAAK,YAAY,MAAM,SAAS;AAC9C,QAAM,YAAY,MAAM,SAAS;AACjC,MAAG,eAAe,QAAQ,SAAS,KAAK,GAAG;AACzC,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,KAAK,MAAM,OAAO;AAAA,IAC5B;AAAA,EACF;AACA,MAAG,cAAc,aAAa;AAC5B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,KAAK,MAAM,OAAO;AAAA,IAC5B;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,aAAa,MAAW,WAAuC,WAAuC;AAC7G,QAAM,QAAQ,KAAK,WAAW,SAAS,KAAK,CAAC;AAC7C,SAAQ,aAAa,QAAS,UAAU;AAC1C;AAUA,qBAAqB,sBAAsB,MAAM,UAA8B;AAAA,EAC7E,mBAAmB,CAAC,UAAkB,aAAkB;AACtD,UAAM,QAAQ,aAAa,KAAK,MAAM,MAAM,KAAK,MAAM,MAAM,MAAM,QAAQ;AAC3E,SAAK,MAAM,SAAS,OAAO,UAAU,QAAQ;AAAA,EAC/C;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,OAAM,IAAI,KAAK;AACtB,UAAM,SAAS,KAAK,MAAM,YAAY,IAAI,eAAa;AACrD,YAAM,YAAY,aAAa,KAAK,MAAM,MAAM,KAAK,MAAM,MAAM,MAAM,SAAS;AAEhF,YAAM,QAAQ,KAAK,MAAM,MAAM,SAAS,CAAC;AACzC,YAAM,SAAS,KAAK,MAAM,MAAM,UAAU,CAAC;AAC3C,YAAM,aAAa,aAAa,QAC5B,MAAM,SAA+B,IACrC,OAAO,SAAgC;AAC3C,YAAM,YAAY,aAAa,QAAQ,UAAU;AAEjD,aAAO;AAAA,QAAC;AAAA;AAAA,UACN;AAAA,UACA,UAAU,KAAK;AAAA,UAEf;AAAA,UACA,OAAO;AAAA,UACP;AAAA,UACA;AAAA;AAAA,QAJK;AAAA,MAKP;AAAA,IACF,CAAC;AAED,WAAO,oBAAC,SAAI,WAAU,2BACnB,kBACH;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2b5da791871b9b38760c659b15188ae0aee85eaa"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Lr=function(){return s},s}Lr();const NRe=(Lr().s[0]++,["background-pattern","fill-pattern","line-pattern","fill-extrusion-pattern","icon-image"]);function GRe(n,e,t){Lr().f[0]++;const i=(Lr().s[1]++,jse(n,e,t)),r=(Lr().s[2]++,n[i+"_"+e]),o=(Lr().s[3]++,r[t]);return Lr().s[4]++,NRe.indexOf(t)>=0?(Lr().b[0][0]++,Lr().s[5]++,{...o,values:n.$root.sprite.values}):(Lr().b[0][1]++,Lr().s[6]++,t==="text-font"?(Lr().b[1][0]++,Lr().s[7]++,{...o,values:n.$root.glyphs.values}):(Lr().b[1][1]++,Lr().s[8]++,o))}function jse(n,e,t){Lr().f[1]++;const i=(Lr().s[9]++,Lr().b[2][0]++,n["paint_"+e]||(Lr().b[2][1]++,{}));return Lr().s[10]++,t in i?(Lr().b[3][0]++,"paint"):(Lr().b[3][1]++,"layout")}class WRe extends En.Component{onPropertyChange=(Lr().s[11]++,(e,t)=>{Lr().f[2]++;const i=(Lr().s[12]++,jse(this.props.spec,this.props.layer.type,e));Lr().s[13]++,this.props.onChange(i,e,t)});render(){Lr().f[3]++;const{errors:e}=(Lr().s[14]++,this.props),t=(Lr().s[15]++,this.props.groupFields.map(i=>{Lr().f[4]++;const r=(Lr().s[16]++,GRe(this.props.spec,this.props.layer.type,i)),o=(Lr().s[17]++,Lr().b[4][0]++,this.props.layer.paint||(Lr().b[4][1]++,{})),s=(Lr().s[18]++,Lr().b[5][0]++,this.props.layer.layout||(Lr().b[5][1]++,{})),a=(Lr().s[19]++,i in o?(Lr().b[6][0]++,o[i]):(Lr().b[6][1]++,s[i])),c=(Lr().s[20]++,i in o?(Lr().b[7][0]++,"paint"):(Lr().b[7][1]++,"layout"));return Lr().s[21]++,ie.jsx(jRe,{errors:e,onChange:this.onPropertyChange,fieldName:i,value:a,fieldType:c,fieldSpec:r},i)}));return Lr().s[22]++,ie.jsx("div",{className:"maputnik-property-group",children:t})}}function S_(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerEditorGroup.tsx",e="6c9e07ebeb2e5c7112c0b70e483a0c61cf0ea981",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/LayerEditorGroup.tsx",statementMap:{0:{start:{line:12,column:4},end:{line:27,column:9}},1:{start:{line:18,column:27},end:{line:18,column:74}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:11,column:2},end:{line:11,column:3}},loc:{start:{line:11,column:11},end:{line:28,column:3}},line:11},1:{name:"(anonymous_1)",decl:{start:{line:18,column:19},end:{line:18,column:20}},loc:{start:{line:18,column:27},end:{line:18,column:74}},line:18}},branchMap:{},s:{0:0,1:0},f:{0:0,1:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerEditorGroup.tsx"],names:[],mappings:"AA2BQ,SACE,KADF;AA3BR,OAAO,WAAW;AAClB,SAAQ,iBAAiB,qBAAoB;AAC7C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaP,qBAAqB,yBAAyB,MAAM,UAAiC;AAAA,EACnF,SAAS;AACP,WAAO,qBAAC,iBAAc,MAAM,KAAK,MAAM,IACrC;AAAA;AAAA,QAAC;AAAA;AAAA,UAAqB,WAAU;AAAA,UAC9B,eAAa,wBAAsB,KAAK,MAAM,aAAa;AAAA,UAC3D,SAAS,QAAM,KAAK,MAAM,eAAe,CAAC,KAAK,MAAM,QAAQ;AAAA,UAE7D,+BAAC,uBAAoB,WAAU,uCAC7B;AAAA,gCAAC,UAAK,OAAO,EAAC,UAAU,GAAG,cAAc,SAAQ,GAAI,eAAK,MAAM,OAAM;AAAA,YACtE,oBAAC,iBAAc,MAAM,OAAO,WAAU,2FAA0F;AAAA,YAChI,oBAAC,mBAAgB,MAAM,OAAO,WAAU,6FAA4F;AAAA,aACtI;AAAA;AAAA,MACF;AAAA,MACA,oBAAC,sBACE,eAAK,MAAM,UACd;AAAA,OACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6c9e07ebeb2e5c7112c0b70e483a0c61cf0ea981"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return S_=function(){return s},s}S_();class QRe extends En.Component{render(){return S_().f[0]++,S_().s[0]++,ie.jsxs($ne,{uuid:this.props.id,children:[ie.jsx(Zne,{className:"maputnik-layer-editor-group","data-wd-key":"layer-editor-group:"+this.props["data-wd-key"],onClick:e=>(S_().f[1]++,S_().s[1]++,this.props.onActiveToggle(!this.props.isActive)),children:ie.jsxs(GSe,{className:"maputnik-layer-editor-group__button",children:[ie.jsx("span",{style:{flexGrow:1,alignContent:"center"},children:this.props.title}),ie.jsx(UX,{size:"2em",className:"maputnik-layer-editor-group__button__icon maputnik-layer-editor-group__button__icon--up"}),ie.jsx(PX,{size:"2em",className:"maputnik-layer-editor-group__button__icon maputnik-layer-editor-group__button__icon--down"})]})}),ie.jsx(YSe,{children:this.props.children})]})}}function Cb(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldMinZoom.tsx",e="331998a9ac6b18663bcbca1301c32952f465e1af",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldMinZoom.tsx",statementMap:{0:{start:{line:6,column:29},end:{line:29,column:1}},1:{start:{line:7,column:12},end:{line:7,column:19}},2:{start:{line:8,column:2},end:{line:28,column:4}},3:{start:{line:30,column:21},end:{line:30,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:29},end:{line:6,column:30}},loc:{start:{line:6,column:40},end:{line:29,column:1}},line:6}},branchMap:{},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldMinZoom.tsx"],names:[],mappings:"AAoBM;AAlBN,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,SAA+B,uBAAuB;AAQtD,MAAM,uBAA4D,CAAC,UAAU;AAC3E,QAAM,IAAI,MAAM;AAChB,SACE;AAAA,IAAC;AAAA;AAAA,MAAM,OAAO,EAAE,UAAU;AAAA,MAAG,WAAW,OAAO,MAAM;AAAA,MACnD,OAAO,MAAM;AAAA,MACb,eAAY;AAAA,MAEZ;AAAA,QAAC;AAAA;AAAA,UACC,YAAY;AAAA,UACZ,OAAO,MAAM;AAAA,UACb,UAAU,MAAM;AAAA,UAChB,KAAK,OAAO,MAAM,QAAQ;AAAA,UAC1B,KAAK,OAAO,MAAM,QAAQ;AAAA,UAC1B,SAAS,OAAO,MAAM,QAAQ;AAAA,UAC9B,eAAY;AAAA;AAAA,MACd;AAAA;AAAA,EACF;AAEJ;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"331998a9ac6b18663bcbca1301c32952f465e1af"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Cb=function(){return s},s}Cb();Cb().s[0]++;const qRe=n=>{Cb().f[0]++;const e=(Cb().s[1]++,n.t);return Cb().s[2]++,ie.jsx(Fs,{label:e("Min Zoom"),fieldSpec:Jr.layer.minzoom,error:n.error,"data-wd-key":"min-zoom",children:ie.jsx(i1,{allowRange:!0,value:n.value,onChange:n.onChange,min:Jr.layer.minzoom.minimum,max:Jr.layer.minzoom.maximum,default:Jr.layer.minzoom.minimum,"data-wd-key":"min-zoom.input"})})},YRe=(Cb().s[3]++,Jo()(qRe));function _b(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldMaxZoom.tsx",e="030101242d82e9c9c34c00cb0f1ee3a368ba29e3",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldMaxZoom.tsx",statementMap:{0:{start:{line:6,column:29},end:{line:29,column:1}},1:{start:{line:7,column:12},end:{line:7,column:19}},2:{start:{line:8,column:2},end:{line:28,column:4}},3:{start:{line:30,column:21},end:{line:30,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:29},end:{line:6,column:30}},loc:{start:{line:6,column:40},end:{line:29,column:1}},line:6}},branchMap:{},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldMaxZoom.tsx"],names:[],mappings:"AAoBM;AAlBN,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,SAA+B,uBAAuB;AAQtD,MAAM,uBAA4D,CAAC,UAAU;AAC3E,QAAM,IAAI,MAAM;AAChB,SACE;AAAA,IAAC;AAAA;AAAA,MAAM,OAAO,EAAE,UAAU;AAAA,MAAG,WAAW,OAAO,MAAM;AAAA,MACnD,OAAO,MAAM;AAAA,MACb,eAAY;AAAA,MAEZ;AAAA,QAAC;AAAA;AAAA,UACC,YAAY;AAAA,UACZ,OAAO,MAAM;AAAA,UACb,UAAU,MAAM;AAAA,UAChB,KAAK,OAAO,MAAM,QAAQ;AAAA,UAC1B,KAAK,OAAO,MAAM,QAAQ;AAAA,UAC1B,SAAS,OAAO,MAAM,QAAQ;AAAA,UAC9B,eAAY;AAAA;AAAA,MACd;AAAA;AAAA,EACF;AAEJ;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"030101242d82e9c9c34c00cb0f1ee3a368ba29e3"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return _b=function(){return s},s}_b();_b().s[0]++;const $Re=n=>{_b().f[0]++;const e=(_b().s[1]++,n.t);return _b().s[2]++,ie.jsx(Fs,{label:e("Max Zoom"),fieldSpec:Jr.layer.maxzoom,error:n.error,"data-wd-key":"max-zoom",children:ie.jsx(i1,{allowRange:!0,value:n.value,onChange:n.onChange,min:Jr.layer.maxzoom.minimum,max:Jr.layer.maxzoom.maximum,default:Jr.layer.maxzoom.maximum,"data-wd-key":"max-zoom.input"})})},VRe=(_b().s[3]++,Jo()($Re));function Ky(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldComment.tsx",e="bbd273b6557a5df907fed987aa83b7e8030607a2",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldComment.tsx",statementMap:{0:{start:{line:5,column:29},end:{line:31,column:1}},1:{start:{line:6,column:12},end:{line:6,column:19}},2:{start:{line:7,column:20},end:{line:11,column:3}},3:{start:{line:12,column:2},end:{line:30,column:4}},4:{start:{line:32,column:21},end:{line:32,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:29},end:{line:5,column:30}},loc:{start:{line:5,column:40},end:{line:31,column:1}},line:5}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldComment.tsx"],names:[],mappings:"AA2BM;AAzBN,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,SAA+B,uBAAuB;AAQtD,MAAM,uBAA4D,CAAC,UAAU;AAC3E,QAAM,IAAI,MAAM;AAChB,QAAM,YAAY;AAAA,IAChB,KAAK;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,EAAE,UAAU;AAAA,MACnB;AAAA,MACA,eAAY;AAAA,MACZ,OAAO,MAAM;AAAA,MAEb;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA,UACP,OAAO,MAAM;AAAA,UACb,UAAU,MAAM;AAAA,UAChB,SAAS,EAAE,YAAY;AAAA,UACvB,eAAY;AAAA;AAAA,MACd;AAAA;AAAA,EACF;AAEJ;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"bbd273b6557a5df907fed987aa83b7e8030607a2"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Ky=function(){return s},s}Ky();Ky().s[0]++;const HRe=n=>{Ky().f[0]++;const e=(Ky().s[1]++,n.t),t=(Ky().s[2]++,{doc:e("Comments for the current layer. This is non-standard and not in the spec.")});return Ky().s[3]++,ie.jsx(Fs,{label:e("Comments"),fieldSpec:t,"data-wd-key":"layer-comment",error:n.error,children:ie.jsx(dm,{multi:!0,value:n.value,onChange:n.onChange,default:e("Comment..."),"data-wd-key":"layer-comment.input"})})},ZRe=(Ky().s[4]++,Jo()(HRe));function E_(){var n="/home/runner/work/maputnik/maputnik/src/libs/format.ts",e="c45fbfac66e994b59070a295e5a7f219cd5d66ac",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/format.ts",statementMap:{0:{start:{line:2,column:2},end:{line:2,column:50}}},fnMap:{0:{name:"formatLayerId",decl:{start:{line:1,column:16},end:{line:1,column:29}},loc:{start:{line:1,column:34},end:{line:3,column:1}},line:1}},branchMap:{0:{loc:{start:{line:2,column:9},end:{line:2,column:49}},type:"cond-expr",locations:[{start:{line:2,column:21},end:{line:2,column:37}},{start:{line:2,column:40},end:{line:2,column:49}}],line:2}},s:{0:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/format.ts"],names:[],mappings:"AAAO,gBAAS,cAAe,IAAwB;AACrD,SAAO,OAAO,KAAK,mBAAmB,IAAI,EAAE;AAC9C;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c45fbfac66e994b59070a295e5a7f219cd5d66ac"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return E_=function(){return s},s}E_();function Nse(n){return E_().f[0]++,E_().s[0]++,n===""?(E_().b[0][0]++,"[empty_string]"):(E_().b[0][1]++,`'${n}'`)}function Ht(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerEditor.tsx",e="73c13e8dcd00ff99dc188c9ddae5c660be7ade84",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/LayerEditor.tsx",statementMap:{0:{start:{line:24,column:17},end:{line:24,column:19}},1:{start:{line:25,column:2},end:{line:30,column:5}},2:{start:{line:29,column:59},end:{line:29,column:82}},3:{start:{line:31,column:2},end:{line:36,column:5}},4:{start:{line:35,column:59},end:{line:35,column:80}},5:{start:{line:37,column:2},end:{line:42,column:5}},6:{start:{line:41,column:59},end:{line:41,column:80}},7:{start:{line:43,column:2},end:{line:48,column:5}},8:{start:{line:47,column:58},end:{line:47,column:79}},9:{start:{line:49,column:2},end:{line:54,column:5}},10:{start:{line:53,column:58},end:{line:53,column:79}},11:{start:{line:55,column:2},end:{line:55,column:16}},12:{start:{line:58,column:2},end:{line:60,column:3}},13:{start:{line:59,column:4},end:{line:59,column:14}},14:{start:{line:61,column:2},end:{line:63,column:3}},15:{start:{line:62,column:4},end:{line:62,column:37}},16:{start:{line:64,column:17},end:{line:64,column:19}},17:{start:{line:65,column:2},end:{line:72,column:3}},18:{start:{line:66,column:4},end:{line:71,column:7}},19:{start:{line:73,column:2},end:{line:80,column:3}},20:{start:{line:74,column:4},end:{line:79,column:7}},21:{start:{line:81,column:2},end:{line:81,column:16}},22:{start:{line:84,column:21},end:{line:88,column:3}},23:{start:{line:89,column:22},end:{line:93,column:3}},24:{start:{line:94,column:22},end:{line:98,column:3}},25:{start:{line:99,column:2},end:{line:99,column:96}},26:{start:{line:102,column:24},end:{line:109,column:3}},27:{start:{line:111,column:4},end:{line:111,column:17}},28:{start:{line:112,column:25},end:{line:112,column:27}},29:{start:{line:113,column:4},end:{line:115,column:5}},30:{start:{line:114,column:6},end:{line:114,column:39}},31:{start:{line:116,column:4},end:{line:116,column:34}},32:{start:{line:119,column:29},end:{line:119,column:54}},33:{start:{line:120,column:4},end:{line:124,column:5}},34:{start:{line:121,column:6},end:{line:123,column:7}},35:{start:{line:122,column:8},end:{line:122,column:45}},36:{start:{line:125,column:4},end:{line:127,column:6}},37:{start:{line:130,column:4},end:{line:133,column:6}},38:{start:{line:136,column:32},end:{line:139,column:5}},39:{start:{line:140,column:4},end:{line:142,column:7}},40:{start:{line:145,column:18},end:{line:145,column:20}},41:{start:{line:146,column:4},end:{line:148,column:5}},42:{start:{line:147,column:6},end:{line:147,column:62}},43:{start:{line:149,column:35},end:{line:149,column:45}},44:{start:{line:150,column:22},end:{line:150,column:24}},45:{start:{line:151,column:4},end:{line:157,column:7}},46:{start:{line:152,column:6},end:{line:156,column:7}},47:{start:{line:153,column:8},end:{line:155,column:10}},48:{start:{line:159,column:18},end:{line:159,column:34}},49:{start:{line:160,column:4},end:{line:162,column:5}},50:{start:{line:161,column:6},end:{line:161,column:63}},51:{start:{line:163,column:4},end:{line:267,column:5}},52:{start:{line:165,column:8},end:{line:229,column:13}},53:{start:{line:172,column:35},end:{line:172,column:112}},54:{start:{line:181,column:37},end:{line:184,column:15}},55:{start:{line:193,column:31},end:{line:193,column:69}},56:{start:{line:202,column:31},end:{line:202,column:75}},57:{start:{line:210,column:31},end:{line:210,column:70}},58:{start:{line:218,column:31},end:{line:218,column:70}},59:{start:{line:226,column:31},end:{line:226,column:104}},60:{start:{line:231,column:8},end:{line:239,column:16}},61:{start:{line:237,column:29},end:{line:237,column:67}},62:{start:{line:241,column:8},end:{line:250,column:10}},63:{start:{line:252,column:8},end:{line:264,column:10}},64:{start:{line:258,column:14},end:{line:261,column:16}},65:{start:{line:266,column:8},end:{line:266,column:49}},66:{start:{line:270,column:4},end:{line:273,column:7}},67:{start:{line:276,column:14},end:{line:276,column:26}},68:{start:{line:277,column:21},end:{line:277,column:23}},69:{start:{line:278,column:22},end:{line:278,column:43}},70:{start:{line:279,column:19},end:{line:296,column:6}},71:{start:{line:280,column:6},end:{line:280,column:70}},72:{start:{line:282,column:22},end:{line:282,column:30}},73:{start:{line:283,column:6},end:{line:283,column:29}},74:{start:{line:284,column:6},end:{line:295,column:8}},75:{start:{line:297,column:19},end:{line:297,column:48}},76:{start:{line:298,column:18},end:{line:326,column:5}},77:{start:{line:301,column:23},end:{line:301,column:71}},78:{start:{line:306,column:23},end:{line:306,column:68}},79:{start:{line:311,column:23},end:{line:311,column:80}},80:{start:{line:317,column:23},end:{line:317,column:41}},81:{start:{line:323,column:23},end:{line:323,column:40}},82:{start:{line:328,column:6},end:{line:328,column:30}},83:{start:{line:329,column:6},end:{line:329,column:26}},84:{start:{line:331,column:4},end:{line:377,column:9}},85:{start:{line:359,column:33},end:{line:359,column:42}},86:{start:{line:360,column:20},end:{line:360,column:201}},87:{start:{line:380,column:20},end:{line:380,column:58}}},fnMap:{0:{name:"getLayoutForSymbolType",decl:{start:{line:23,column:9},end:{line:23,column:31}},loc:{start:{line:23,column:35},end:{line:56,column:1}},line:23},1:{name:"(anonymous_1)",decl:{start:{line:29,column:52},end:{line:29,column:53}},loc:{start:{line:29,column:59},end:{line:29,column:82}},line:29},2:{name:"(anonymous_2)",decl:{start:{line:35,column:52},end:{line:35,column:53}},loc:{start:{line:35,column:59},end:{line:35,column:80}},line:35},3:{name:"(anonymous_3)",decl:{start:{line:41,column:52},end:{line:41,column:53}},loc:{start:{line:41,column:59},end:{line:41,column:80}},line:41},4:{name:"(anonymous_4)",decl:{start:{line:47,column:51},end:{line:47,column:52}},loc:{start:{line:47,column:58},end:{line:47,column:79}},line:47},5:{name:"(anonymous_5)",decl:{start:{line:53,column:51},end:{line:53,column:52}},loc:{start:{line:53,column:58},end:{line:53,column:79}},line:53},6:{name:"getLayoutForType",decl:{start:{line:57,column:9},end:{line:57,column:25}},loc:{start:{line:57,column:35},end:{line:82,column:1}},line:57},7:{name:"layoutGroups",decl:{start:{line:83,column:9},end:{line:83,column:21}},loc:{start:{line:83,column:36},end:{line:100,column:1}},line:83},8:{name:"(anonymous_8)",decl:{start:{line:103,column:20},end:{line:103,column:21}},loc:{start:{line:103,column:26},end:{line:104,column:5}},line:103},9:{name:"(anonymous_9)",decl:{start:{line:105,column:21},end:{line:105,column:22}},loc:{start:{line:105,column:27},end:{line:106,column:5}},line:105},10:{name:"(anonymous_10)",decl:{start:{line:107,column:22},end:{line:107,column:23}},loc:{start:{line:107,column:28},end:{line:108,column:5}},line:107},11:{name:"(anonymous_11)",decl:{start:{line:110,column:2},end:{line:110,column:3}},loc:{start:{line:110,column:21},end:{line:117,column:3}},line:110},12:{name:"(anonymous_12)",decl:{start:{line:118,column:2},end:{line:118,column:3}},loc:{start:{line:118,column:48},end:{line:128,column:3}},line:118},13:{name:"(anonymous_13)",decl:{start:{line:129,column:2},end:{line:129,column:3}},loc:{start:{line:129,column:44},end:{line:134,column:3}},line:129},14:{name:"(anonymous_14)",decl:{start:{line:135,column:2},end:{line:135,column:3}},loc:{start:{line:135,column:36},end:{line:143,column:3}},line:135},15:{name:"(anonymous_15)",decl:{start:{line:144,column:2},end:{line:144,column:3}},loc:{start:{line:144,column:32},end:{line:268,column:3}},line:144},16:{name:"(anonymous_16)",decl:{start:{line:151,column:19},end:{line:151,column:20}},loc:{start:{line:151,column:30},end:{line:157,column:5}},line:151},17:{name:"(anonymous_17)",decl:{start:{line:172,column:24},end:{line:172,column:25}},loc:{start:{line:172,column:35},end:{line:172,column:112}},line:172},18:{name:"(anonymous_18)",decl:{start:{line:181,column:24},end:{line:181,column:25}},loc:{start:{line:181,column:37},end:{line:184,column:15}},line:181},19:{name:"(anonymous_19)",decl:{start:{line:193,column:24},end:{line:193,column:25}},loc:{start:{line:193,column:31},end:{line:193,column:69}},line:193},20:{name:"(anonymous_20)",decl:{start:{line:202,column:24},end:{line:202,column:25}},loc:{start:{line:202,column:31},end:{line:202,column:75}},line:202},21:{name:"(anonymous_21)",decl:{start:{line:210,column:24},end:{line:210,column:25}},loc:{start:{line:210,column:31},end:{line:210,column:70}},line:210},22:{name:"(anonymous_22)",decl:{start:{line:218,column:24},end:{line:218,column:25}},loc:{start:{line:218,column:31},end:{line:218,column:70}},line:218},23:{name:"(anonymous_23)",decl:{start:{line:226,column:24},end:{line:226,column:25}},loc:{start:{line:226,column:31},end:{line:226,column:104}},line:226},24:{name:"(anonymous_24)",decl:{start:{line:237,column:22},end:{line:237,column:23}},loc:{start:{line:237,column:29},end:{line:237,column:67}},line:237},25:{name:"(anonymous_25)",decl:{start:{line:257,column:22},end:{line:257,column:23}},loc:{start:{line:257,column:34},end:{line:262,column:13}},line:257},26:{name:"(anonymous_26)",decl:{start:{line:269,column:2},end:{line:269,column:3}},loc:{start:{line:269,column:20},end:{line:274,column:3}},line:269},27:{name:"(anonymous_27)",decl:{start:{line:275,column:2},end:{line:275,column:3}},loc:{start:{line:275,column:11},end:{line:378,column:3}},line:275},28:{name:"(anonymous_28)",decl:{start:{line:279,column:53},end:{line:279,column:54}},loc:{start:{line:279,column:64},end:{line:281,column:5}},line:279},29:{name:"(anonymous_29)",decl:{start:{line:281,column:11},end:{line:281,column:12}},loc:{start:{line:281,column:22},end:{line:296,column:5}},line:281},30:{name:"(anonymous_30)",decl:{start:{line:301,column:17},end:{line:301,column:18}},loc:{start:{line:301,column:23},end:{line:301,column:71}},line:301},31:{name:"(anonymous_31)",decl:{start:{line:306,column:17},end:{line:306,column:18}},loc:{start:{line:306,column:23},end:{line:306,column:68}},line:306},32:{name:"(anonymous_32)",decl:{start:{line:311,column:17},end:{line:311,column:18}},loc:{start:{line:311,column:23},end:{line:311,column:80}},line:311},33:{name:"(anonymous_33)",decl:{start:{line:317,column:17},end:{line:317,column:18}},loc:{start:{line:317,column:23},end:{line:317,column:41}},line:317},34:{name:"(anonymous_34)",decl:{start:{line:323,column:17},end:{line:323,column:18}},loc:{start:{line:323,column:23},end:{line:323,column:40}},line:323},35:{name:"handleSelection",decl:{start:{line:327,column:13},end:{line:327,column:28}},loc:{start:{line:327,column:40},end:{line:330,column:5}},line:327},36:{name:"(anonymous_36)",decl:{start:{line:358,column:147},end:{line:358,column:148}},loc:{start:{line:358,column:155},end:{line:361,column:19}},line:358}},branchMap:{0:{loc:{start:{line:58,column:2},end:{line:60,column:3}},type:"if",locations:[{start:{line:58,column:2},end:{line:60,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:58},1:{loc:{start:{line:61,column:2},end:{line:63,column:3}},type:"if",locations:[{start:{line:61,column:2},end:{line:63,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:61},2:{loc:{start:{line:65,column:2},end:{line:72,column:3}},type:"if",locations:[{start:{line:65,column:2},end:{line:72,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:65},3:{loc:{start:{line:73,column:2},end:{line:80,column:3}},type:"if",locations:[{start:{line:73,column:2},end:{line:80,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:73},4:{loc:{start:{line:121,column:6},end:{line:123,column:7}},type:"if",locations:[{start:{line:121,column:6},end:{line:123,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:121},5:{loc:{start:{line:146,column:4},end:{line:148,column:5}},type:"if",locations:[{start:{line:146,column:4},end:{line:148,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:146},6:{loc:{start:{line:152,column:6},end:{line:156,column:7}},type:"if",locations:[{start:{line:152,column:6},end:{line:156,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:152},7:{loc:{start:{line:152,column:10},end:{line:152,column:96}},type:"binary-expr",locations:[{start:{line:152,column:10},end:{line:152,column:22}},{start:{line:152,column:26},end:{line:152,column:55}},{start:{line:152,column:59},end:{line:152,column:96}}],line:152},8:{loc:{start:{line:160,column:4},end:{line:162,column:5}},type:"if",locations:[{start:{line:160,column:4},end:{line:162,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:160},9:{loc:{start:{line:163,column:4},end:{line:267,column:5}},type:"switch",locations:[{start:{line:164,column:6},end:{line:229,column:13}},{start:{line:230,column:6},end:{line:239,column:16}},{start:{line:240,column:6},end:{line:250,column:10}},{start:{line:251,column:6},end:{line:264,column:10}},{start:{line:265,column:6},end:{line:266,column:49}}],line:163},10:{loc:{start:{line:187,column:10},end:{line:195,column:11}},type:"binary-expr",locations:[{start:{line:187,column:10},end:{line:187,column:48}},{start:{line:187,column:68},end:{line:195,column:11}}],line:187},11:{loc:{start:{line:196,column:10},end:{line:204,column:11}},type:"binary-expr",locations:[{start:{line:196,column:10},end:{line:196,column:60}},{start:{line:196,column:80},end:{line:204,column:11}}],line:196},12:{loc:{start:{line:226,column:83},end:{line:226,column:103}},type:"cond-expr",locations:[{start:{line:226,column:93},end:{line:226,column:99}},{start:{line:226,column:102},end:{line:226,column:103}}],line:226},13:{loc:{start:{line:280,column:15},end:{line:280,column:68}},type:"binary-expr",locations:[{start:{line:280,column:15},end:{line:280,column:41}},{start:{line:280,column:45},end:{line:280,column:68}}],line:280},14:{loc:{start:{line:297,column:19},end:{line:297,column:48}},type:"binary-expr",locations:[{start:{line:297,column:19},end:{line:297,column:42}},{start:{line:297,column:46},end:{line:297,column:48}}],line:297},15:{loc:{start:{line:310,column:14},end:{line:310,column:66}},type:"cond-expr",locations:[{start:{line:310,column:45},end:{line:310,column:54}},{start:{line:310,column:57},end:{line:310,column:66}}],line:310}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0,0],8:[0,0],9:[0,0,0,0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerEditor.tsx"],names:["layer"],mappings:"AAuN2B,SA4EL,UA3Ed,KADmB;AAvN3B,OAAO,WAAuB;AAC9B,SAAS,SAAS,QAAQ,MAAM,gBAAgB;AAChD,SAAQ,iBAAgB;AACxB,SAAQ,kBAAiB;AACzB,SAAS,mBAAmB;AAE5B,SAAQ,UAAS;AAEjB,OAAO,eAAe;AACtB,OAAO,kBAAkB;AACzB,OAAO,mBAAmB;AAC1B,OAAO,sBAAsB;AAC7B,OAAO,eAAe;AACtB,OAAO,aAAa;AACpB,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAC7B,SAAS,YAAY,sBAAsB;AAC3C,SAAQ,qBAAoB;AAC5B,SAA+B,uBAAuB;AAEtD,SAAS,yBAAyB;AAUlC,SAAS,uBAAuB,GAAqC;AACnE,QAAM,SAAgC,CAAC;AACvC,SAAO,KAAK;AAAA,IACV,OAAO,EAAE,2BAA2B;AAAA,IACpC,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ,OAAO,KAAK,GAAG,eAAe,CAAC,EAAE,OAAO,OAAK,EAAE,WAAW,SAAS,CAAC;AAAA,EAC9E,CAAC;AACD,SAAO,KAAK;AAAA,IACV,OAAO,EAAE,wBAAwB;AAAA,IACjC,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ,OAAO,KAAK,GAAG,eAAe,CAAC,EAAE,OAAO,OAAK,EAAE,WAAW,OAAO,CAAC;AAAA,EAC5E,CAAC;AACD,SAAO,KAAK;AAAA,IACV,OAAO,EAAE,wBAAwB;AAAA,IACjC,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ,OAAO,KAAK,GAAG,eAAe,CAAC,EAAE,OAAO,OAAK,EAAE,WAAW,OAAO,CAAC;AAAA,EAC5E,CAAC;AACD,SAAO,KAAK;AAAA,IACV,OAAO,EAAE,uBAAuB;AAAA,IAChC,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ,OAAO,KAAK,GAAG,cAAc,CAAC,EAAE,OAAO,OAAK,EAAE,WAAW,OAAO,CAAC;AAAA,EAC3E,CAAC;AACD,SAAO,KAAK;AAAA,IACV,OAAO,EAAE,uBAAuB;AAAA,IAChC,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ,OAAO,KAAK,GAAG,cAAc,CAAC,EAAE,OAAO,OAAK,EAAE,WAAW,OAAO,CAAC;AAAA,EAC3E,CAAC;AACD,SAAO;AACT;AAEA,SAAS,iBAAiB,MAAkC,GAAqC;AAC/F,MAAI,OAAO,KAAK,GAAG,MAAM,KAAK,MAAM,EAAE,QAAQ,IAAI,IAAI,GAAG;AACvD,WAAO,CAAC;AAAA,EACV;AACA,MAAI,SAAS,UAAU;AACrB,WAAO,uBAAuB,CAAC;AAAA,EACjC;AACA,QAAM,SAAgC,CAAC;AACvC,MAAI,OAAO,KAAK,GAAG,WAAW,IAAI,CAAC,EAAE,SAAS,GAAG;AAC/C,WAAO,KAAK;AAAA,MACV,OAAO,EAAE,kBAAkB;AAAA,MAC3B,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,QAAQ,OAAO,KAAK,GAAG,WAAW,IAAI,CAAC;AAAA,IACzC,CAAC;AAAA,EACH;AACA,MAAI,OAAO,KAAK,GAAG,YAAY,IAAI,CAAC,EAAE,SAAS,GAAG;AAChD,WAAO,KAAK;AAAA,MACV,OAAO,EAAE,mBAAmB;AAAA,MAC5B,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,QAAQ,OAAO,KAAK,GAAG,YAAY,IAAI,CAAC;AAAA,IAC1C,CAAC;AAAA,EACH;AACA,SAAO;AACT;AAEA,SAAS,aAAa,WAAuC,GAA8E;AACzI,QAAM,aAAa;AAAA,IACjB,IAAI;AAAA,IACJ,OAAO,EAAE,OAAO;AAAA,IAChB,MAAM;AAAA,EACR;AACA,QAAM,cAAc;AAAA,IAClB,IAAI;AAAA,IACJ,OAAO,EAAE,QAAQ;AAAA,IACjB,MAAM;AAAA,EACR;AACA,QAAM,cAAc;AAAA,IAClB,IAAI;AAAA,IACJ,OAAO,EAAE,aAAa;AAAA,IACtB,MAAM;AAAA,EACR;AACA,SAAO,CAAC,YAAY,WAAW,EAC5B,OAAO,iBAAiB,WAAW,CAAC,CAAC,EACrC,OAAO,CAAC,WAAW,CAAC;AACzB;AAwBA,MAAM,4BAA4B,MAAM,UAAsD;AAAA,EAC5F,OAAO,eAAe;AAAA,IACpB,gBAAgB,MAAM;AAAA,IAAC;AAAA,IACvB,iBAAiB,MAAM;AAAA,IAAC;AAAA,IACxB,kBAAkB,MAAM;AAAA,IAAC;AAAA,EAC3B;AAAA,EAEA,YAAY,OAAiC;AAC3C,UAAM,KAAK;AAEX,UAAM,eAAyC,CAAC;AAChD,eAAW,SAAS,aAAa,KAAK,MAAM,MAAM,MAAM,MAAM,CAAC,GAAG;AAChE,mBAAa,MAAM,KAAK,IAAI;AAAA,IAC9B;AAEA,SAAK,QAAQ,EAAE,aAAa;AAAA,EAC9B;AAAA,EAEA,OAAO,yBAAyB,OAA2C,OAAyB;AAClG,UAAM,mBAAmB,EAAE,GAAG,MAAM,aAAa;AAEjD,eAAW,SAAS,iBAAiB,MAAM,MAAM,MAAM,MAAM,CAAC,GAAG;AAC/D,UAAG,EAAE,MAAM,SAAS,mBAAmB;AACrC,yBAAiB,MAAM,KAAK,IAAI;AAAA,MAClC;AAAA,IACF;AAEA,WAAO;AAAA,MACL,cAAc;AAAA,IAChB;AAAA,EACF;AAAA,EAGA,eAAe,OAAwC,UAAkB,UAAe;AACtF,SAAK,MAAM;AAAA,MACT,KAAK,MAAM;AAAA,MACX,eAAe,KAAK,MAAM,OAAO,OAAO,UAAU,QAAQ;AAAA,IAC5D;AAAA,EACF;AAAA,EAEA,cAAc,YAAoB,QAAiB;AACjD,UAAM,sBAAsB;AAAA,MAC1B,GAAG,KAAK,MAAM;AAAA,MACd,CAAC,UAAU,GAAG;AAAA,IAChB;AACA,SAAK,SAAS;AAAA,MACZ,cAAc;AAAA,IAChB,CAAC;AAAA,EACH;AAAA,EAEA,gBAAgB,MAAc,QAAgC;AAC5D,QAAI,UAAU;AACd,QAAG,KAAK,MAAM,MAAM,UAAU;AAC5B,gBAAW,KAAK,MAAM,MAAM,SAAiB,kBAAkB;AAAA,IACjE;AACA,UAAM,EAAC,QAAQ,WAAU,IAAI,KAAK;AAElC,UAAM,YAA+B,CAAC;AACtC,WAAQ,QAAQ,WAAS;AACvB,UACE,MAAM,UACN,MAAM,OAAO,SAAS,WACtB,MAAM,OAAO,KAAK,SAAS,YAC3B;AACA,kBAAU,MAAM,OAAO,KAAK,GAAG,IAAI;AAAA,UACjC,SAAS,MAAM,OAAO,KAAK;AAAA,QAC7B;AAAA,MACF;AAAA,IACF,CAAC;AAED,QAAI;AACJ,UAAM,QAAQ,KAAK,MAAM;AACzB,QAAG,OAAO,UAAU,eAAe,KAAK,KAAK,MAAM,SAAS,MAAM,MAAM,GAAG;AACzE,uBAAiB,KAAK,MAAM,QAAQ,MAAM,MAAM,EAAE;AAAA,IACpD;AAEA,YAAO,MAAM;AAAA,MACX,KAAK;AAAS,eAAO,qBAAC,SACpB;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,OAAM;AAAA,cACN,OAAO,UAAU;AAAA,cACjB,UAAU,WAAS,KAAK,MAAM,gBAAgB,KAAK,MAAM,YAAY,KAAK,MAAM,MAAM,IAAI,KAAK;AAAA;AAAA,UACjG;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,UAAU;AAAA,cACV,OAAO,UAAU;AAAA,cACjB,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,UAAU,aAAW,KAAK,MAAM;AAAA,gBAC9B,KAAK,MAAM;AAAA,gBACX,WAAW,KAAK,MAAM,OAAO,OAAO;AAAA,cACtC;AAAA;AAAA,UACF;AAAA,UACC,KAAK,MAAM,MAAM,SAAS,gBAAgB;AAAA,YAAC;AAAA;AAAA,cAC1C,OAAO,UAAU;AAAA,cACjB,WAAW,OAAO,KAAK,KAAK,MAAM,OAAQ;AAAA,cAC1C,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,UAAU,OAAK,KAAK,eAAe,MAAM,UAAU,CAAC;AAAA;AAAA,UACtD;AAAA,UAEC,CAAC,kBAAkB,SAAS,KAAK,MAAM,MAAM,IAAI,KAClD;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,UAAU,cAAc;AAAA,cAC/B;AAAA,cACA,OAAQ,KAAK,MAAM,MAAc,cAAc;AAAA,cAC/C,UAAU,OAAK,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAAA;AAAA,UAC5D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,UAAU;AAAA,cACjB,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,UAAU,OAAK,KAAK,eAAe,MAAM,WAAW,CAAC;AAAA;AAAA,UACvD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,UAAU;AAAA,cACjB,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,UAAU,OAAK,KAAK,eAAe,MAAM,WAAW,CAAC;AAAA;AAAA,UACvD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,UAAU;AAAA,cACjB,OAAO;AAAA,cACP,UAAU,OAAK,KAAK,eAAe,YAAY,oBAAoB,KAAK,KAAM,SAAY,CAAC;AAAA;AAAA,UAC7F;AAAA,WACF;AAAA,MACA,KAAK;AAAU,eAAO,oBAAC,SACrB,8BAAC,SAAI,WAAU,kCACb;AAAA,UAAC;AAAA;AAAA,YACC,QAAQ;AAAA,YACR,QAAS,KAAK,MAAM,MAAc;AAAA,YAClC,YAAY,KAAK,MAAM,aAAc,KAAK,MAAM,MAAc,cAAc,CAAC;AAAA,YAC7E,UAAU,OAAK,KAAK,eAAe,MAAM,UAAU,CAAC;AAAA;AAAA,QACtD,GACF,GACF;AAAA,MACA,KAAK;AACH,eAAO;AAAA,UAAC;AAAA;AAAA,YACN,QAAQ;AAAA,YACR,OAAO,KAAK,MAAM;AAAA,YAClB,aAAa;AAAA,YACb,MAAM,KAAK,MAAM;AAAA,YACjB,UAAU,KAAK,eAAe,KAAK,IAAI;AAAA;AAAA,QACzC;AAAA,MACF,KAAK;AACH,eAAO;AAAA,UAAC;AAAA;AAAA,YACN,UAAS;AAAA,YACT,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,CAACA,WAA8B;AACvC,mBAAK,MAAM;AAAA,gBACT,KAAK,MAAM;AAAA,gBACXA;AAAA,cACF;AAAA,YACF;AAAA;AAAA,QACF;AAAA,MACF;AAAS,eAAO,gCAAE;AAAA,IACpB;AAAA,EACF;AAAA,EAEA,UAAU,QAAgB;AACxB,SAAK,MAAM,YAAY;AAAA,MACrB,UAAU,KAAK,MAAM;AAAA,MACrB,UAAU,KAAK,MAAM,aAAW;AAAA,IAClC,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AAErB,UAAM,WAAqB,CAAC;AAC5B,UAAM,YAAY,KAAK,MAAM,MAAM;AACnC,UAAM,SAAS,aAAa,WAAW,CAAC,EAAE,OAAO,WAAS;AACxD,aAAO,EAAE,cAAc,gBAAgB,MAAM,SAAS;AAAA,IACxD,CAAC,EAAE,IAAI,WAAS;AACd,YAAM,UAAU,MAAM;AACtB,eAAS,KAAK,OAAO;AACrB,aAAO;AAAA,QAAC;AAAA;AAAA,UACN,eAAa,MAAM;AAAA,UACnB,IAAI;AAAA,UAEJ,OAAO,MAAM;AAAA,UACb,UAAU,KAAK,MAAM,aAAa,MAAM,KAAK;AAAA,UAC7C,gBAAgB,KAAK,cAAc,KAAK,MAAM,MAAM,KAAK;AAAA,UAExD,eAAK,gBAAgB,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA,QALzC;AAAA,MAMP;AAAA,IACF,CAAC;AAED,UAAM,SAAS,KAAK,MAAM,MAAM,UAAU,CAAC;AAE3C,UAAM,QAKD;AAAA,MACH,QAAQ;AAAA,QACN,MAAM,EAAE,QAAQ;AAAA,QAChB,SAAS,MAAM,KAAK,MAAM,eAAe,KAAK,MAAM,UAAU;AAAA,QAC9D,OAAO;AAAA,MACT;AAAA,MACA,WAAW;AAAA,QACT,MAAM,EAAE,WAAW;AAAA,QACnB,SAAS,MAAM,KAAK,MAAM,YAAY,KAAK,MAAM,UAAU;AAAA,QAC3D,OAAO;AAAA,MACT;AAAA,MACA,MAAM;AAAA,QACJ,MAAO,OAAO,eAAe,SAAU,EAAE,MAAM,IAAI,EAAE,MAAM;AAAA,QAC3D,SAAS,MAAM,KAAK,MAAM,wBAAwB,KAAK,MAAM,UAAU;AAAA,QACvE,OAAO;AAAA,MACT;AAAA,MACA,aAAa;AAAA,QACX,MAAM,EAAE,eAAe;AAAA,QACvB,UAAU,KAAK,MAAM;AAAA,QACrB,SAAS,MAAM,KAAK,UAAU,EAAE;AAAA,QAChC,OAAO;AAAA,MACT;AAAA,MACA,eAAe;AAAA,QACb,MAAM,EAAE,iBAAiB;AAAA,QACzB,UAAU,KAAK,MAAM;AAAA,QACrB,SAAS,MAAM,KAAK,UAAU,CAAE;AAAA,QAChC,OAAO;AAAA,MACT;AAAA,IACF;AAEA,aAAS,gBAAgB,IAAY,OAA6B;AAChE,YAAM,gBAAgB;AACtB,YAAM,EAAE,EAAE,QAAQ;AAAA,IACpB;AAEA,WAAO,oBAAC,YAAY,UAAZ,EAAqB,OAAO,EAAC,MAAM,QAAQ,OAAO,UAAS,GACjE;AAAA,MAAC;AAAA;AAAA,QAAQ,WAAU;AAAA,QACjB,MAAK;AAAA,QACL,cAAY,EAAE,cAAc;AAAA,QAC5B,eAAY;AAAA,QAEZ;AAAA,8BAAC,YACC,+BAAC,SAAI,WAAU,gBACb;AAAA,gCAAC,QAAG,WAAU,uBACX,YAAE,sBAAsB,EAAE,SAAS,cAAc,KAAK,MAAM,MAAM,EAAE,EAAE,CAAC,GAC1E;AAAA,YACA,oBAAC,SAAI,WAAU,sBACb;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,aAAa;AAAA,gBACb,kBAAkB;AAAA,gBAElB;AAAA;AAAA,oBAAC;AAAA;AAAA,sBACC,IAAG;AAAA,sBACH,eAAY;AAAA,sBACZ,WAAU;AAAA,sBACV,OAAO;AAAA,sBACP,8BAAC,cAAW,WAAU,0BAAyB;AAAA;AAAA,kBACjD;AAAA,kBACA,oBAAC,QACC,8BAAC,QAAG,WAAU,mBACX,iBAAO,KAAK,KAAK,EAAE,IAAI,CAAC,OAAO;AAC9B,0BAAM,OAAO,MAAM,EAAE;AACrB,2BAAO,oBAAC,QACN,8BAAC,YAAS,OAAO,IAAI,WAAU,yBAAwB,eAAa,KAAK,OACtE,eAAK,MACR,KAHc,EAIhB;AAAA,kBACF,CAAC,GACH,GACF;AAAA;AAAA;AAAA,YACF,GACF;AAAA,aACF,GAEF;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,uBAAuB;AAAA,cACvB,mBAAmB;AAAA,cACnB,aAAa;AAAA,cAEZ;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IACF,GACF;AAAA,EACF;AACF;AAEA,MAAM,cAAc,gBAAgB,EAAE,mBAAmB;AACzD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"73c13e8dcd00ff99dc188c9ddae5c660be7ade84"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Ht=function(){return s},s}Ht();function XRe(n){Ht().f[0]++;const e=(Ht().s[0]++,[]);return Ht().s[1]++,e.push({title:n("General layout properties"),id:"General_layout_properties",type:"properties",fields:Object.keys($f.layout_symbol).filter(t=>(Ht().f[1]++,Ht().s[2]++,t.startsWith("symbol-")))}),Ht().s[3]++,e.push({title:n("Text layout properties"),id:"Text_layout_properties",type:"properties",fields:Object.keys($f.layout_symbol).filter(t=>(Ht().f[2]++,Ht().s[4]++,t.startsWith("text-")))}),Ht().s[5]++,e.push({title:n("Icon layout properties"),id:"Icon_layout_properties",type:"properties",fields:Object.keys($f.layout_symbol).filter(t=>(Ht().f[3]++,Ht().s[6]++,t.startsWith("icon-")))}),Ht().s[7]++,e.push({title:n("Text paint properties"),id:"Text_paint_properties",type:"properties",fields:Object.keys($f.paint_symbol).filter(t=>(Ht().f[4]++,Ht().s[8]++,t.startsWith("text-")))}),Ht().s[9]++,e.push({title:n("Icon paint properties"),id:"Icon_paint_properties",type:"properties",fields:Object.keys($f.paint_symbol).filter(t=>(Ht().f[5]++,Ht().s[10]++,t.startsWith("icon-")))}),Ht().s[11]++,e}function Gse(n,e){if(Ht().f[6]++,Ht().s[12]++,Object.keys($f.layer.type.values).indexOf(n)<0)return Ht().b[0][0]++,Ht().s[13]++,[];if(Ht().b[0][1]++,Ht().s[14]++,n==="symbol")return Ht().b[1][0]++,Ht().s[15]++,XRe(e);Ht().b[1][1]++;const t=(Ht().s[16]++,[]);return Ht().s[17]++,Object.keys($f["paint_"+n]).length>0?(Ht().b[2][0]++,Ht().s[18]++,t.push({title:e("Paint properties"),id:"Paint_properties",type:"properties",fields:Object.keys($f["paint_"+n])})):Ht().b[2][1]++,Ht().s[19]++,Object.keys($f["layout_"+n]).length>0?(Ht().b[3][0]++,Ht().s[20]++,t.push({title:e("Layout properties"),id:"Layout_properties",type:"properties",fields:Object.keys($f["layout_"+n])})):Ht().b[3][1]++,Ht().s[21]++,t}function SV(n,e){Ht().f[7]++;const t=(Ht().s[22]++,{id:"layer",title:e("Layer"),type:"layer"}),i=(Ht().s[23]++,{id:"filter",title:e("Filter"),type:"filter"}),r=(Ht().s[24]++,{id:"jsoneditor",title:e("JSON Editor"),type:"jsoneditor"});return Ht().s[25]++,[t,i].concat(Gse(n,e)).concat([r])}class JRe extends En.Component{static defaultProps=(Ht().s[26]++,{onLayerChanged:()=>{Ht().f[8]++},onLayerIdChange:()=>{Ht().f[9]++},onLayerDestroyed:()=>{Ht().f[10]++}});constructor(e){Ht().f[11]++,Ht().s[27]++,super(e);const t=(Ht().s[28]++,{});Ht().s[29]++;for(const i of SV(this.props.layer.type,e.t))Ht().s[30]++,t[i.title]=!0;Ht().s[31]++,this.state={editorGroups:t}}static getDerivedStateFromProps(e,t){Ht().f[12]++;const i=(Ht().s[32]++,{...t.editorGroups});Ht().s[33]++;for(const r of Gse(e.layer.type,e.t))Ht().s[34]++,r.title in i?Ht().b[4][1]++:(Ht().b[4][0]++,Ht().s[35]++,i[r.title]=!0);return Ht().s[36]++,{editorGroups:i}}changeProperty(e,t,i){Ht().f[13]++,Ht().s[37]++,this.props.onLayerChanged(this.props.layerIndex,rSe(this.props.layer,e,t,i))}onGroupToggle(e,t){Ht().f[14]++;const i=(Ht().s[38]++,{...this.state.editorGroups,[e]:t});Ht().s[39]++,this.setState({editorGroups:i})}renderGroupType(e,t){Ht().f[15]++;let i=(Ht().s[40]++,"");Ht().s[41]++,this.props.layer.metadata?(Ht().b[5][0]++,Ht().s[42]++,i=this.props.layer.metadata["maputnik:comment"]):Ht().b[5][1]++;const{errors:r,layerIndex:o}=(Ht().s[43]++,this.props),s=(Ht().s[44]++,{});Ht().s[45]++,r.forEach(A=>{Ht().f[16]++,Ht().s[46]++,Ht().b[7][0]++,A.parsed&&(Ht().b[7][1]++,A.parsed.type==="layer")&&(Ht().b[7][2]++,A.parsed.data.index==o)?(Ht().b[6][0]++,Ht().s[47]++,s[A.parsed.data.key]={message:A.parsed.data.message}):Ht().b[6][1]++});let a;const c=(Ht().s[48]++,this.props.layer);switch(Ht().s[49]++,Object.prototype.hasOwnProperty.call(this.props.sources,c.source)?(Ht().b[8][0]++,Ht().s[50]++,a=this.props.sources[c.source].layers):Ht().b[8][1]++,Ht().s[51]++,e){case"layer":return Ht().b[9][0]++,Ht().s[52]++,ie.jsxs("div",{children:[ie.jsx(Cne,{value:this.props.layer.id,wdKey:"layer-editor.layer-id",error:s.id,onChange:A=>(Ht().f[17]++,Ht().s[53]++,this.props.onLayerIdChange(this.props.layerIndex,this.props.layer.id,A))}),ie.jsx(bne,{disabled:!0,error:s.type,value:this.props.layer.type,onChange:A=>(Ht().f[18]++,Ht().s[54]++,this.props.onLayerChanged(this.props.layerIndex,iSe(this.props.layer,A)))}),(Ht().b[10][0]++,this.props.layer.type!=="background"&&(Ht().b[10][1]++,ie.jsx(Fne,{error:s.source,sourceIds:Object.keys(this.props.sources),value:this.props.layer.source,onChange:A=>(Ht().f[19]++,Ht().s[55]++,this.changeProperty(null,"source",A))}))),(Ht().b[11][0]++,!wR.includes(this.props.layer.type)&&(Ht().b[11][1]++,ie.jsx(zne,{error:s["source-layer"],sourceLayerIds:a,value:this.props.layer["source-layer"],onChange:A=>(Ht().f[20]++,Ht().s[56]++,this.changeProperty(null,"source-layer",A))}))),ie.jsx(YRe,{error:s.minzoom,value:this.props.layer.minzoom,onChange:A=>(Ht().f[21]++,Ht().s[57]++,this.changeProperty(null,"minzoom",A))}),ie.jsx(VRe,{error:s.maxzoom,value:this.props.layer.maxzoom,onChange:A=>(Ht().f[22]++,Ht().s[58]++,this.changeProperty(null,"maxzoom",A))}),ie.jsx(ZRe,{error:s.comment,value:i,onChange:A=>(Ht().f[23]++,Ht().s[59]++,this.changeProperty("metadata","maputnik:comment",A==""?(Ht().b[12][0]++,void 0):(Ht().b[12][1]++,A)))})]});case"filter":return Ht().b[9][1]++,Ht().s[60]++,ie.jsx("div",{children:ie.jsx("div",{className:"maputnik-filter-editor-wrapper",children:ie.jsx(Nke,{errors:s,filter:this.props.layer.filter,properties:this.props.vectorLayers[this.props.layer["source-layer"]],onChange:A=>(Ht().f[24]++,Ht().s[61]++,this.changeProperty(null,"filter",A))})})});case"properties":return Ht().b[9][2]++,Ht().s[62]++,ie.jsx(WRe,{errors:s,layer:this.props.layer,groupFields:t,spec:this.props.spec,onChange:this.changeProperty.bind(this)});case"jsoneditor":return Ht().b[9][3]++,Ht().s[63]++,ie.jsx(VK,{lintType:"layer",value:this.props.layer,onChange:A=>{Ht().f[25]++,Ht().s[64]++,this.props.onLayerChanged(this.props.layerIndex,A)}});default:return Ht().b[9][4]++,Ht().s[65]++,ie.jsx(ie.Fragment,{})}}moveLayer(e){Ht().f[26]++,Ht().s[66]++,this.props.onMoveLayer({oldIndex:this.props.layerIndex,newIndex:this.props.layerIndex+e})}render(){Ht().f[27]++;const e=(Ht().s[67]++,this.props.t),t=(Ht().s[68]++,[]),i=(Ht().s[69]++,this.props.layer.type),r=(Ht().s[70]++,SV(i,e).filter(c=>(Ht().f[28]++,Ht().s[71]++,Ht().b[13][0]++,!(i==="background"&&(Ht().b[13][1]++,c.type==="source")))).map(c=>{Ht().f[29]++;const A=(Ht().s[72]++,c.id);return Ht().s[73]++,t.push(A),Ht().s[74]++,ie.jsx(QRe,{"data-wd-key":c.title,id:A,title:c.title,isActive:this.state.editorGroups[c.title],onActiveToggle:this.onGroupToggle.bind(this,c.title),children:this.renderGroupType(c.type,c.fields)},A)})),o=(Ht().s[75]++,Ht().b[14][0]++,this.props.layer.layout||(Ht().b[14][1]++,{})),s=(Ht().s[76]++,{delete:{text:e("Delete"),handler:()=>(Ht().f[30]++,Ht().s[77]++,this.props.onLayerDestroy(this.props.layerIndex)),wdKey:"menu-delete-layer"},duplicate:{text:e("Duplicate"),handler:()=>(Ht().f[31]++,Ht().s[78]++,this.props.onLayerCopy(this.props.layerIndex)),wdKey:"menu-duplicate-layer"},hide:{text:o.visibility==="none"?(Ht().b[15][0]++,e("Show")):(Ht().b[15][1]++,e("Hide")),handler:()=>(Ht().f[32]++,Ht().s[79]++,this.props.onLayerVisibilityToggle(this.props.layerIndex)),wdKey:"menu-hide-layer"},moveLayerUp:{text:e("Move layer up"),disabled:this.props.isFirstLayer,handler:()=>(Ht().f[33]++,Ht().s[80]++,this.moveLayer(-1)),wdKey:"menu-move-layer-up"},moveLayerDown:{text:e("Move layer down"),disabled:this.props.isLastLayer,handler:()=>(Ht().f[34]++,Ht().s[81]++,this.moveLayer(1)),wdKey:"menu-move-layer-down"}});function a(c,A){Ht().f[35]++,Ht().s[82]++,A.stopPropagation(),Ht().s[83]++,s[c].handler()}return Ht().s[84]++,ie.jsx(H_.Provider,{value:{size:"14px",color:"#8e8e8e"},children:ie.jsxs("section",{className:"maputnik-layer-editor",role:"main","aria-label":e("Layer editor"),"data-wd-key":"layer-editor",children:[ie.jsx("header",{children:ie.jsxs("div",{className:"layer-header",children:[ie.jsx("h2",{className:"layer-header__title",children:e("Layer: {{layerId}}",{layerId:Nse(this.props.layer.id)})}),ie.jsx("div",{className:"layer-header__info",children:ie.jsxs(l5.Wrapper,{className:"more-menu",onSelection:a,closeOnSelection:!1,children:[ie.jsx(l5.Button,{id:"skip-target-layer-editor","data-wd-key":"skip-target-layer-editor",className:"more-menu__button",title:"Layer options",children:ie.jsx(Ffe,{className:"more-menu__button__svg"})}),ie.jsx(l5.Menu,{children:ie.jsx("ul",{className:"more-menu__menu",children:Object.keys(s).map(c=>{Ht().f[36]++;const A=(Ht().s[85]++,s[c]);return Ht().s[86]++,ie.jsx("li",{children:ie.jsx(l5.MenuItem,{value:c,className:"more-menu__menu__item","data-wd-key":A.wdKey,children:A.text})},c)})})})]})})]})}),ie.jsx(ISe,{allowMultipleExpanded:!0,allowZeroExpanded:!0,preExpanded:t,children:r})]})})}}const eDe=(Ht().s[87]++,Jo()(JRe));var EV=function(n,e,t){if(t||arguments.length===2)for(var i=0,r=e.length,o;i<r;i++)(o||!(i in e))&&(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return n.concat(o||Array.prototype.slice.call(e))},tDe=(function(){function n(e,t,i){this.name=e,this.version=t,this.os=i,this.type="browser"}return n})(),nDe=(function(){function n(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return n})(),iDe=(function(){function n(e,t,i,r){this.name=e,this.version=t,this.os=i,this.bot=r,this.type="bot-device"}return n})(),rDe=(function(){function n(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return n})(),oDe=(function(){function n(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return n})(),sDe=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,aDe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,OV=3,lDe=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",sDe]],BV=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function uDe(n){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new oDe:typeof navigator<"u"?ADe(navigator.userAgent):dDe()}function cDe(n){return n!==""&&lDe.reduce(function(e,t){var i=t[0],r=t[1];if(e)return e;var o=r.exec(n);return!!o&&[i,o]},!1)}function ADe(n){var e=cDe(n);if(!e)return null;var t=e[0],i=e[1];if(t==="searchbot")return new rDe;var r=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);r?r.length<OV&&(r=EV(EV([],r,!0),fDe(OV-r.length),!0)):r=[];var o=r.join("."),s=hDe(n),a=aDe.exec(n);return a&&a[1]?new iDe(t,o,s,a[1]):new tDe(t,o,s)}function hDe(n){for(var e=0,t=BV.length;e<t;e++){var i=BV[e],r=i[0],o=i[1],s=o.exec(n);if(s)return r}return null}function dDe(){var n=typeof process<"u"&&process.version;return n?new nDe(process.version.slice(1)):null}function fDe(n){for(var e=[],t=0;t<n;t++)e.push("0");return e}const pDe="maputnik",mDe="3.0.0",IV={name:pDe,version:mDe},gDe="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='1200'%20height='1200'%20viewBox='0%200%20100%20100'%3e%3cg%20class='map'%20stroke='%23000'%3e%3cuse%20xlink:href='%23ref-1--map__main'%20fill='%234eba6f'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--map__line1'%20fill='none'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--map__line2'%20fill='none'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--map__line3'%20fill='none'%3e%3c/use%3e%3c/g%3e%3cg%20class='palette'%3e%3cuse%20xlink:href='%23ref-1--palette__main'%20fill='%23fff'%20stroke='%23000'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__inner'%20fill='none'%20stroke='%23000'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__circle5'%20fill='%23f7c44c'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__circle4'%20fill='%234eba6f'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__circle3'%20fill='%23f7c44c'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__circle2'%20fill='%234eba6f'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__circle1'%20fill='%23f7c44c'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--palette__circle0'%20fill='%234eba6f'%3e%3c/use%3e%3c/g%3e%3cg%20class='brush'%20stroke='%23000'%3e%3cuse%20xlink:href='%23ref-1--brush__bottom'%20fill='%23f7c44c'%3e%3c/use%3e%3cuse%20xlink:href='%23ref-1--brush__top'%20fill='%23fff'%3e%3c/use%3e%3c/g%3e%3cdefs%3e%3cpath%20id='ref-1--map__main'%20stroke-width='2.366'%20stroke-linejoin='round'%20d='M18.84%207.717l15.44%207.542%2015.75-7.762%2015.7%207.857L81.005%207.67%2096.31%2054.052%2073.598%2062.12%2050.93%2053.872l-25.1%208.066-22.668-8.066z'%3e%3c/path%3e%3cpath%20id='ref-1--map__line1'%20d='M65.556%2015.07l7.647%2046.838'%20stroke-width='1.104'%3e%3c/path%3e%3cpath%20id='ref-1--map__line2'%20d='M50.261%207.422l.717%2046.6'%20stroke-width='1.104'%3e%3c/path%3e%3cpath%20id='ref-1--map__line3'%20d='M34.011%2015.07l-8.603%2046.6'%20stroke-width='1.104'%3e%3c/path%3e%3cpath%20id='ref-1--palette__main'%20stroke-width='2.3'%20d='M47.352%2030.887c7.993.226%2016.934%209.725%2017.954%2015.25%201.02%205.527-.743%2011.125-4.298%2013.875-3.554%202.75-8.6%202.905-8.723%208.302-.097%204.237%208.457%208.5%208.088%2015.653-.406%207.857-15.508%2013.15-30.943%206.102-8.556-3.906-14.249-13.653-13.385-26.238C16.833%2052.334%2022.32%2043.658%2027.382%2039c5.977-5.503%2011.977-8.337%2019.97-8.112z'%3e%3c/path%3e%3ccircle%20id='ref-1--palette__inner'%20stroke-width='2.3'%20cx='41.873'%20cy='61.901'%20r='6.389'%3e%3c/circle%3e%3ccircle%20id='ref-1--palette__circle5'%20cy='44.56'%20cx='54.347'%20r='4.336'%3e%3c/circle%3e%3ccircle%20id='ref-1--palette__circle4'%20cx='40.443'%20cy='41.555'%20r='4.336'%3e%3c/circle%3e%3ccircle%20id='ref-1--palette__circle3'%20r='4.336'%20cy='51.102'%20cx='29.651'%3e%3c/circle%3e%3ccircle%20id='ref-1--palette__circle2'%20cx='25.293'%20cy='65.836'%20r='4.336'%3e%3c/circle%3e%3ccircle%20id='ref-1--palette__circle1'%20r='4.336'%20cy='79.326'%20cx='32.764'%3e%3c/circle%3e%3ccircle%20id='ref-1--palette__circle0'%20cx='46.669'%20cy='80.571'%20r='4.336'%3e%3c/circle%3e%3cpath%20id='ref-1--brush__bottom'%20d='M76.333%2089.333c-1.645-9.794-4.375-35.26-4.32-37.887.056-2.627%202.52-4.34%205.36-4.317%202.842.022%205.098%201.87%205.314%204.27.107%201.2-1.576%2028.06-2.318%2037.844-.332%204.374-3.31%204.413-4.036.09z'%20stroke-width='2.3'%20stroke-linejoin='round'%3e%3c/path%3e%3cpath%20id='ref-1--brush__top'%20stroke-linejoin='round'%20stroke-width='2.3'%20d='M77.184%2026.428s-5.621%207.02-5.621%2011.978c0%204.957%202.206%206.878%205.81%206.878%203.606%200%205.148-1.708%205.29-6.736.142-5.028-5.479-12.12-5.479-12.12z'%3e%3c/path%3e%3c/defs%3e%3c/svg%3e";function hr(){var n="/home/runner/work/maputnik/maputnik/src/components/AppToolbar.tsx",e="a80f1c6002bb333b679e563f1e24ea304ffcd120",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/AppToolbar.tsx",statementMap:{0:{start:{line:19,column:16},end:{line:19,column:24}},1:{start:{line:20,column:41},end:{line:20,column:89}},2:{start:{line:23,column:4},end:{line:23,column:107}},3:{start:{line:28,column:4},end:{line:38,column:6}},4:{start:{line:43,column:4},end:{line:50,column:6}},5:{start:{line:55,column:4},end:{line:63,column:6}},6:{start:{line:67,column:10},end:{line:75,column:3}},7:{start:{line:77,column:4},end:{line:77,column:34}},8:{start:{line:80,column:4},end:{line:80,column:40}},9:{start:{line:82,column:11},end:{line:89,column:3}},10:{start:{line:83,column:4},end:{line:88,column:5}},11:{start:{line:84,column:6},end:{line:84,column:59}},12:{start:{line:86,column:17},end:{line:86,column:65}},13:{start:{line:87,column:6},end:{line:87,column:17}},14:{start:{line:91,column:14},end:{line:91,column:26}},15:{start:{line:92,column:18},end:{line:128,column:5}},16:{start:{line:129,column:24},end:{line:131,column:6}},17:{start:{line:130,column:6},end:{line:130,column:45}},18:{start:{line:132,column:4},end:{line:254,column:12}},19:{start:{line:143,column:33},end:{line:143,column:58}},20:{start:{line:152,column:33},end:{line:152,column:60}},21:{start:{line:161,column:33},end:{line:161,column:51}},22:{start:{line:217,column:33},end:{line:217,column:69}},23:{start:{line:220,column:38},end:{line:220,column:59}},24:{start:{line:221,column:20},end:{line:221,column:157}},25:{start:{line:223,column:115},end:{line:223,column:148}},26:{start:{line:224,column:20},end:{line:224,column:133}},27:{start:{line:240,column:33},end:{line:240,column:74}},28:{start:{line:243,column:18},end:{line:243,column:94}},29:{start:{line:257,column:19},end:{line:257,column:56}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:22,column:2},end:{line:22,column:3}},loc:{start:{line:22,column:11},end:{line:24,column:3}},line:22},1:{name:"(anonymous_1)",decl:{start:{line:27,column:2},end:{line:27,column:3}},loc:{start:{line:27,column:11},end:{line:39,column:3}},line:27},2:{name:"(anonymous_2)",decl:{start:{line:42,column:2},end:{line:42,column:3}},loc:{start:{line:42,column:11},end:{line:51,column:3}},line:42},3:{name:"(anonymous_3)",decl:{start:{line:54,column:2},end:{line:54,column:3}},loc:{start:{line:54,column:11},end:{line:64,column:3}},line:54},4:{name:"(anonymous_4)",decl:{start:{line:76,column:2},end:{line:76,column:3}},loc:{start:{line:76,column:23},end:{line:78,column:3}},line:76},5:{name:"(anonymous_5)",decl:{start:{line:79,column:2},end:{line:79,column:3}},loc:{start:{line:79,column:28},end:{line:81,column:3}},line:79},6:{name:"(anonymous_6)",decl:{start:{line:82,column:11},end:{line:82,column:12}},loc:{start:{line:82,column:23},end:{line:89,column:3}},line:82},7:{name:"(anonymous_7)",decl:{start:{line:90,column:2},end:{line:90,column:3}},loc:{start:{line:90,column:11},end:{line:255,column:3}},line:90},8:{name:"(anonymous_8)",decl:{start:{line:129,column:35},end:{line:129,column:36}},loc:{start:{line:129,column:45},end:{line:131,column:5}},line:129},9:{name:"(anonymous_9)",decl:{start:{line:143,column:25},end:{line:143,column:26}},loc:{start:{line:143,column:33},end:{line:143,column:58}},line:143},10:{name:"(anonymous_10)",decl:{start:{line:152,column:25},end:{line:152,column:26}},loc:{start:{line:152,column:33},end:{line:152,column:60}},line:152},11:{name:"(anonymous_11)",decl:{start:{line:161,column:25},end:{line:161,column:26}},loc:{start:{line:161,column:33},end:{line:161,column:51}},line:161},12:{name:"(anonymous_12)",decl:{start:{line:217,column:26},end:{line:217,column:27}},loc:{start:{line:217,column:33},end:{line:217,column:69}},line:217},13:{name:"(anonymous_13)",decl:{start:{line:220,column:31},end:{line:220,column:32}},loc:{start:{line:220,column:38},end:{line:220,column:59}},line:220},14:{name:"(anonymous_14)",decl:{start:{line:220,column:65},end:{line:220,column:66}},loc:{start:{line:220,column:75},end:{line:222,column:19}},line:220},15:{name:"(anonymous_15)",decl:{start:{line:223,column:108},end:{line:223,column:109}},loc:{start:{line:223,column:115},end:{line:223,column:148}},line:223},16:{name:"(anonymous_16)",decl:{start:{line:223,column:154},end:{line:223,column:155}},loc:{start:{line:223,column:164},end:{line:225,column:19}},line:223},17:{name:"(anonymous_17)",decl:{start:{line:240,column:26},end:{line:240,column:27}},loc:{start:{line:240,column:33},end:{line:240,column:74}},line:240},18:{name:"(anonymous_18)",decl:{start:{line:242,column:65},end:{line:242,column:66}},loc:{start:{line:242,column:83},end:{line:244,column:17}},line:242}},branchMap:{0:{loc:{start:{line:83,column:4},end:{line:88,column:5}},type:"if",locations:[{start:{line:83,column:4},end:{line:88,column:5}},{start:{line:85,column:11},end:{line:88,column:5}}],line:83}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/AppToolbar.tsx"],names:[],mappings:"AAiCW,SAAA,KAyLG,YAzLH;AAjCX,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,SAAQ,cAAa;AAErB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAO,aAAa;AAEpB,OAAO,kBAAkB;AACzB,SAAS,uBAA6C;AACtD,SAAS,0BAA0B;AAInC,MAAM,UAAU,OAAO;AACvB,MAAM,mCAAmC,CAAC,UAAU,SAAS,EAAE,QAAQ,QAAS,IAAI,IAAI;AAQxF,MAAM,iBAAiB,MAAM,UAAyB;AAAA,EACpD,SAAS;AACP,+BAAQ,QAAA,EAAK,WAAU,sBAAsB,UAAA,KAAK,MAAM,SAAA,CAAS;AAAA,EACnE;AACF;AASA,MAAM,oBAAoB,MAAM,UAA4B;AAAA,EAC1D,SAAS;AACP,WAAO;AAAA,MAAC;AAAA,MAAA;AAAA,QACN,WAAW,WAAW,yBAAyB,KAAK,MAAM,SAAS;AAAA,QACnE,MAAM,KAAK,MAAM;AAAA,QACjB,KAAI;AAAA,QACJ,QAAO;AAAA,QACP,eAAY;AAAA,QAEX,eAAK,MAAM;AAAA,MAAA;AAAA,IACd;AAAA,EACF;AACF;AAOA,MAAM,sBAAsB,MAAM,UAA8B;AAAA,EAC9D,SAAS;AACP,WAAO;AAAA,MAAC;AAAA,MAAA;AAAA,QACN,WAAU;AAAA,QACV,eAAa,KAAK,MAAM;AAAA,QAEvB,eAAK,MAAM;AAAA,MAAA;AAAA,IACd;AAAA,EACF;AACF;AAQA,MAAM,sBAAsB,MAAM,UAA8B;AAAA,EAC9D,SAAS;AACP,WAAO;AAAA,MAAC;AAAA,MAAA;AAAA,QACN,WAAU;AAAA,QACV,eAAa,KAAK,MAAM;AAAA,QACxB,SAAS,KAAK,MAAM;AAAA,QAEnB,eAAK,MAAM;AAAA,MAAA;AAAA,IACd;AAAA,EACF;AACF;AAmBA,MAAM,2BAA2B,MAAM,UAAmC;AAAA,EACxE,QAAQ;AAAA,IACN,QAAQ;AAAA,MACN,UAAU;AAAA,MACV,SAAS;AAAA,MACT,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QAAQ;AAAA,IACV;AAAA,EACF;AAAA,EAEA,gBAAgB,KAAe;AAC7B,SAAK,MAAM,cAAc,GAAG;AAAA,EAC9B;AAAA,EAEA,qBAAqB,KAAa;AAChC,SAAK,MAAM,KAAK,eAAe,GAAG;AAAA,EACpC;AAAA,EAEA,SAAS,CAAC,WAAmB;AAC3B,QAAI,WAAW,OAAO;AACnB,eAAS,cAAc,oBAAoB,EAAwB,MAAM;AAAA,IAC5E,OACK;AACH,YAAM,KAAK,SAAS,cAAc,kBAAgB,MAAM;AACxD,SAAG,MAAM;AAAA,IACX;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,QAAQ;AAAA,MACZ;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO,EAAE,KAAK;AAAA,MAChB;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO,EAAE,SAAS;AAAA,QAClB,UAAU,KAAK,MAAM,aAAa;AAAA,MACpC;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO,EAAE,qBAAqB;AAAA,QAC9B,UAAU,CAAC;AAAA,MACb;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO,EAAE,mBAAmB;AAAA,QAC5B,UAAU,CAAC;AAAA,MACb;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO,EAAE,mBAAmB;AAAA,QAC5B,UAAU,CAAC;AAAA,MACb;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO,EAAE,sBAAsB;AAAA,QAC/B,UAAU,CAAC;AAAA,MACb;AAAA,IACF;AAEA,UAAM,cAAc,MAAM,KAAK,CAAC,SAAS;AACvC,aAAO,KAAK,OAAO,KAAK,MAAM;AAAA,IAChC,CAAC;AAED,+BAAQ,OAAA,EAAI,WAAU,oBACpB,UAAA,qBAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UAGV,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACV,SAAS,CAAA,OAAM,KAAK,OAAO,YAAY;AAAA,gBAEtC,YAAE,aAAa;AAAA,cAAA;AAAA,YAClB;AAAA,YACA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACV,SAAS,CAAA,OAAM,KAAK,OAAO,cAAc;AAAA,gBAExC,YAAE,cAAc;AAAA,cAAA;AAAA,YACnB;AAAA,YACA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACV,SAAS,CAAA,OAAM,KAAK,OAAO,KAAK;AAAA,gBAE/B,YAAE,UAAU;AAAA,cAAA;AAAA,YACf;AAAA,YACA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,QAAO;AAAA,gBACP,KAAI;AAAA,gBACJ,MAAK;AAAA,gBAEL,UAAA;AAAA,kBAAA,oBAAC,SAAI,KAAK,cAAc,KAAK,EAAE,oBAAoB,EAAA,CAAG;AAAA,uCACrD,MAAA,EACC,UAAA;AAAA,oBAAA,oBAAC,QAAA,EAAK,WAAU,yBAAyB,UAAA,QAAQ,KAAA,CAAK;AAAA,oBACtD,qBAAC,QAAA,EAAK,WAAU,4BAA2B,UAAA;AAAA,sBAAA;AAAA,sBAAE,QAAQ;AAAA,oBAAA,EAAA,CAAQ;AAAA,kBAAA,EAAA,CAC/D;AAAA,gBAAA;AAAA,cAAA;AAAA,YACF;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,2BACC,OAAA,EAAI,WAAU,6BAA4B,MAAK,cAAa,cAAW,WACtE,UAAA;AAAA,QAAA,qBAAC,eAAA,EAAc,OAAM,YAAW,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,MAAM,GACjF,UAAA;AAAA,UAAA,oBAAC,iBAAA,CAAA,CAAgB;AAAA,UACjB,oBAAC,UAAA,EAAU,UAAA,EAAE,MAAM,EAAA,CAAE;AAAA,QAAA,EAAA,CACvB;AAAA,QACA,qBAAC,eAAA,EAAc,OAAM,cAAa,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,QAAQ,GACrF,UAAA;AAAA,UAAA,oBAAC,QAAA,CAAA,CAAO;AAAA,UACR,oBAAC,UAAA,EAAU,UAAA,EAAE,MAAM,EAAA,CAAE;AAAA,QAAA,EAAA,CACvB;AAAA,QACA,qBAAC,eAAA,EAAc,OAAM,eAAc,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,SAAS,GACvF,UAAA;AAAA,UAAA,oBAAC,UAAA,CAAA,CAAS;AAAA,UACV,oBAAC,UAAA,EAAU,UAAA,EAAE,cAAc,EAAA,CAAE;AAAA,QAAA,EAAA,CAC/B;AAAA,QACA,qBAAC,eAAA,EAAc,OAAM,gBAAe,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,UAAU,GACzF,UAAA;AAAA,UAAA,oBAAC,YAAA,CAAA,CAAW;AAAA,UACZ,oBAAC,UAAA,EAAU,UAAA,EAAE,gBAAgB,EAAA,CAAE;AAAA,QAAA,EAAA,CACjC;AAAA,QACA,qBAAC,eAAA,EAAc,OAAM,oBAAmB,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,aAAa,GAChG,UAAA;AAAA,UAAA,oBAAC,UAAA,CAAA,CAAS;AAAA,UACV,oBAAC,UAAA,EAAU,UAAA,EAAE,cAAc,EAAA,CAAE;AAAA,QAAA,EAAA,CAC/B;AAAA,QAEA,qBAAC,eAAA,EAAc,OAAM,eACnB,UAAA;AAAA,UAAA,oBAAC,cAAA,CAAA,CAAa;AAAA,+BACb,UAAA,EAAU,UAAA;AAAA,YAAA,EAAE,MAAM;AAAA,YACjB;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,eAAY;AAAA,gBACZ,UAAU,CAAC,MAAM,KAAK,gBAAgB,EAAE,OAAO,KAAiB;AAAA,gBAChE,OAAO,aAAa;AAAA,gBAEnB,UAAA;AAAA,kBAAA,MAAM,OAAO,OAAK,EAAE,UAAU,SAAS,EAAE,IAAI,CAAC,SAAS;AACtD,2BACE,oBAAC,UAAA,EAAqB,OAAO,KAAK,IAAI,UAAU,KAAK,UAAU,eAAa,KAAK,IAC9E,UAAA,KAAK,MAAA,GADK,KAAK,EAElB;AAAA,kBAEJ,CAAC;AAAA,kBACD,oBAAC,YAAA,EAAS,OAAO,EAAE,qBAAqB,GACrC,UAAA,MAAM,OAAO,CAAA,MAAK,EAAE,UAAU,qBAAqB,EAAE,IAAI,CAAC,SAAS;AAClE,2BACE,oBAAC,UAAA,EAAqB,OAAO,KAAK,IAAI,UAAU,KAAK,UAClD,UAAA,KAAK,MAAA,GADK,KAAK,EAElB;AAAA,kBAEJ,CAAC,EAAA,CACH;AAAA,gBAAA;AAAA,cAAA;AAAA,YACF;AAAA,UAAA,EAAA,CACF;AAAA,QAAA,EAAA,CACF;AAAA,QAEA,qBAAC,eAAA,EAAc,OAAM,gBACnB,UAAA;AAAA,UAAA,oBAAC,YAAA,CAAA,CAAW;AAAA,+BACX,UAAA,EAAS,UAAA;AAAA,YAAA;AAAA,YACR;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,eAAY;AAAA,gBACZ,UAAU,CAAC,MAAM,KAAK,qBAAqB,EAAE,OAAO,KAAK;AAAA,gBACzD,OAAO,KAAK,MAAM,KAAK;AAAA,gBAEtB,UAAA,OAAO,QAAQ,kBAAkB,EAAE,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM;AACxD,yBACE,oBAAC,UAAA,EAAkB,OAAO,MACvB,kBADU,IAEb;AAAA,gBAEJ,CAAC;AAAA,cAAA;AAAA,YACH;AAAA,UAAA,EAAA,CACF;AAAA,QAAA,EAAA,CACF;AAAA,QAEA,qBAAC,aAAA,EAAY,MAAM,6CACjB,UAAA;AAAA,UAAA,oBAAC,eAAA,CAAA,CAAc;AAAA,UACf,oBAAC,UAAA,EAAU,UAAA,EAAE,MAAM,EAAA,CAAE;AAAA,QAAA,EAAA,CACvB;AAAA,MAAA,EAAA,CACF;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,EACF;AACF;AAEA,MAAM,aAAa,gBAAgB,EAAE,kBAAkB;AACvD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a80f1c6002bb333b679e563f1e24ea304ffcd120"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return hr=function(){return s},s}hr();const yDe=(hr().s[0]++,uDe()),L5=(hr().s[1]++,["chrome","firefox"].indexOf(yDe.name)>-1);class py extends En.Component{render(){return hr().f[0]++,hr().s[2]++,ie.jsx("span",{className:"maputnik-icon-text",children:this.props.children})}}class vDe extends En.Component{render(){return hr().f[1]++,hr().s[3]++,ie.jsx("a",{className:Yg("maputnik-toolbar-link",this.props.className),href:this.props.href,rel:"noopener noreferrer",target:"_blank","data-wd-key":"toolbar:link",children:this.props.children})}}class kV extends En.Component{render(){return hr().f[2]++,hr().s[4]++,ie.jsx("div",{className:"maputnik-toolbar-select","data-wd-key":this.props.wdKey,children:this.props.children})}}class v2 extends En.Component{render(){return hr().f[3]++,hr().s[5]++,ie.jsx("button",{className:"maputnik-toolbar-action","data-wd-key":this.props.wdKey,onClick:this.props.onClick,children:this.props.children})}}class bDe extends En.Component{state=(hr().s[6]++,{isOpen:{settings:!1,sources:!1,open:!1,add:!1,export:!1}});handleSelection(e){hr().f[4]++,hr().s[7]++,this.props.onSetMapState(e)}handleLanguageChange(e){hr().f[5]++,hr().s[8]++,this.props.i18n.changeLanguage(e)}onSkip=(hr().s[9]++,e=>{if(hr().f[6]++,hr().s[10]++,e==="map")hr().b[0][0]++,hr().s[11]++,document.querySelector(".maplibregl-canvas").focus();else{hr().b[0][1]++;const t=(hr().s[12]++,document.querySelector("#skip-target-"+e));hr().s[13]++,t.focus()}});render(){hr().f[7]++;const e=(hr().s[14]++,this.props.t),t=(hr().s[15]++,[{id:"map",group:"general",title:e("Map")},{id:"inspect",group:"general",title:e("Inspect"),disabled:this.props.renderer==="ol"},{id:"filter-deuteranopia",group:"color-accessibility",title:e("Deuteranopia filter"),disabled:!L5},{id:"filter-protanopia",group:"color-accessibility",title:e("Protanopia filter"),disabled:!L5},{id:"filter-tritanopia",group:"color-accessibility",title:e("Tritanopia filter"),disabled:!L5},{id:"filter-achromatopsia",group:"color-accessibility",title:e("Achromatopsia filter"),disabled:!L5}]),i=(hr().s[16]++,t.find(r=>(hr().f[8]++,hr().s[17]++,r.id===this.props.mapState)));return hr().s[18]++,ie.jsx("nav",{className:"maputnik-toolbar",children:ie.jsxs("div",{className:"maputnik-toolbar__inner",children:[ie.jsxs("div",{className:"maputnik-toolbar-logo-container",children:[ie.jsx("button",{"data-wd-key":"root:skip:layer-list",className:"maputnik-toolbar-skip",onClick:r=>(hr().f[9]++,hr().s[19]++,this.onSkip("layer-list")),children:e("Layers list")}),ie.jsx("button",{"data-wd-key":"root:skip:layer-editor",className:"maputnik-toolbar-skip",onClick:r=>(hr().f[10]++,hr().s[20]++,this.onSkip("layer-editor")),children:e("Layer editor")}),ie.jsx("button",{"data-wd-key":"root:skip:map-view",className:"maputnik-toolbar-skip",onClick:r=>(hr().f[11]++,hr().s[21]++,this.onSkip("map")),children:e("Map view")}),ie.jsxs("a",{className:"maputnik-toolbar-logo",target:"blank",rel:"noreferrer noopener",href:"https://github.com/maplibre/maputnik",children:[ie.jsx("img",{src:gDe,alt:e("Maputnik on GitHub")}),ie.jsxs("h1",{children:[ie.jsx("span",{className:"maputnik-toolbar-name",children:IV.name}),ie.jsxs("span",{className:"maputnik-toolbar-version",children:["v",IV.version]})]})]})]}),ie.jsxs("div",{className:"maputnik-toolbar__actions",role:"navigation","aria-label":"Toolbar",children:[ie.jsxs(v2,{wdKey:"nav:open",onClick:this.props.onToggleModal.bind(this,"open"),children:[ie.jsx(wfe,{}),ie.jsx(py,{children:e("Open")})]}),ie.jsxs(v2,{wdKey:"nav:export",onClick:this.props.onToggleModal.bind(this,"export"),children:[ie.jsx(p9,{}),ie.jsx(py,{children:e("Save")})]}),ie.jsxs(v2,{wdKey:"nav:sources",onClick:this.props.onToggleModal.bind(this,"sources"),children:[ie.jsx(Pfe,{}),ie.jsx(py,{children:e("Data Sources")})]}),ie.jsxs(v2,{wdKey:"nav:settings",onClick:this.props.onToggleModal.bind(this,"settings"),children:[ie.jsx(Sfe,{}),ie.jsx(py,{children:e("Style Settings")})]}),ie.jsxs(v2,{wdKey:"nav:global-state",onClick:this.props.onToggleModal.bind(this,"globalState"),children:[ie.jsx(jfe,{}),ie.jsx(py,{children:e("Global State")})]}),ie.jsxs(kV,{wdKey:"nav:inspect",children:[ie.jsx(bfe,{}),ie.jsxs(py,{children:[e("View"),ie.jsxs("select",{className:"maputnik-select","data-wd-key":"maputnik-select",onChange:r=>(hr().f[12]++,hr().s[22]++,this.handleSelection(r.target.value)),value:i?.id,children:[t.filter(r=>(hr().f[13]++,hr().s[23]++,r.group==="general")).map(r=>(hr().f[14]++,hr().s[24]++,ie.jsx("option",{value:r.id,disabled:r.disabled,"data-wd-key":r.id,children:r.title},r.id))),ie.jsx("optgroup",{label:e("Color accessibility"),children:t.filter(r=>(hr().f[15]++,hr().s[25]++,r.group==="color-accessibility")).map(r=>(hr().f[16]++,hr().s[26]++,ie.jsx("option",{value:r.id,disabled:r.disabled,children:r.title},r.id)))})]})]})]}),ie.jsxs(kV,{wdKey:"nav:language",children:[ie.jsx(Mfe,{}),ie.jsxs(py,{children:["Language",ie.jsx("select",{className:"maputnik-select","data-wd-key":"maputnik-lang-select",onChange:r=>(hr().f[17]++,hr().s[27]++,this.handleLanguageChange(r.target.value)),value:this.props.i18n.language,children:Object.entries(nZ).map(([r,o])=>(hr().f[18]++,hr().s[28]++,ie.jsx("option",{value:r,children:o},r)))})]})]}),ie.jsxs(vDe,{href:"https://github.com/maplibre/maputnik/wiki",children:[ie.jsx(Cfe,{}),ie.jsx(py,{children:e("Help")})]})]})]})})}}const CDe=(hr().s[29]++,Jo()(bDe));function WS(){var n="/home/runner/work/maputnik/maputnik/src/components/ScrollContainer.tsx",e="d17a642b15310eb6111b086bd920c67ec86a8271",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/ScrollContainer.tsx",statementMap:{0:{start:{line:5,column:4},end:{line:5,column:113}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:2},end:{line:4,column:3}},loc:{start:{line:4,column:11},end:{line:6,column:3}},line:4}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ScrollContainer.tsx"],names:[],mappings:"AAQW;AARX,OAAO,WAAW;AAMlB,qBAAqB,wBAAwB,MAAM,UAAgC;AAAA,EACjF,SAAS;AACP,WAAO,oBAAC,SAAI,WAAU,6BACnB,eAAK,MAAM,UACd;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d17a642b15310eb6111b086bd920c67ec86a8271"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return WS=function(){return s},s}WS();class _De extends En.Component{render(){return WS().f[0]++,WS().s[0]++,ie.jsx("div",{className:"maputnik-scroll-container",children:this.props.children})}}function wy(){var n="/home/runner/work/maputnik/maputnik/src/components/AppLayout.tsx",e="ec06363f2da84c6363ddcdeb1250703aa92f5205",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/AppLayout.tsx",statementMap:{0:{start:{line:8,column:4},end:{line:8,column:46}},1:{start:{line:9,column:4},end:{line:18,column:12}},2:{start:{line:21,column:18},end:{line:21,column:54}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:11},end:{line:19,column:3}},line:7}},branchMap:{0:{loc:{start:{line:16,column:6},end:{line:16,column:123}},type:"binary-expr",locations:[{start:{line:16,column:6},end:{line:16,column:23}},{start:{line:16,column:43},end:{line:16,column:123}}],line:16}},s:{0:0,1:0,2:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/AppLayout.tsx"],names:[],mappings:"AAsBQ,SACE,KADF;AAtBR,OAAO,WAAW;AAClB,OAAO,qBAAqB;AAC5B,SAA+B,uBAAuB;AACtD,SAAS,mBAAmB;AAW5B,MAAM,0BAA0B,MAAM,UAAkC;AAAA,EAEtE,SAAS;AACP,aAAS,KAAK,MAAM,KAAK,MAAM,KAAK,IAAI;AAExC,WAAO,oBAAC,YAAY,UAAZ,EAAqB,OAAO,EAAC,MAAM,OAAM,GAC/C,+BAAC,SAAI,WAAU,mBACZ;AAAA,WAAK,MAAM;AAAA,MACZ,qBAAC,SAAI,WAAU,wBACb;AAAA,4BAAC,SAAI,WAAU,wBACZ,eAAK,MAAM,WACd;AAAA,QACA,oBAAC,SAAI,WAAU,0BACb,8BAAC,mBACE,eAAK,MAAM,aACd,GACF;AAAA,QACC,KAAK,MAAM;AAAA,SACd;AAAA,MACC,KAAK,MAAM,UAAU,oBAAC,SAAI,WAAU,0BAClC,eAAK,MAAM,QACd;AAAA,MAEC,KAAK,MAAM;AAAA,OACd,GACF;AAAA,EACF;AACF;AAEA,MAAM,YAAY,gBAAgB,EAAE,iBAAiB;AACrD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ec06363f2da84c6363ddcdeb1250703aa92f5205"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return wy=function(){return s},s}wy();class xDe extends En.Component{render(){return wy().f[0]++,wy().s[0]++,document.body.dir=this.props.i18n.dir(),wy().s[1]++,ie.jsx(H_.Provider,{value:{size:"14px"},children:ie.jsxs("div",{className:"maputnik-layout",children:[this.props.toolbar,ie.jsxs("div",{className:"maputnik-layout-main",children:[ie.jsx("div",{className:"maputnik-layout-list",children:this.props.layerList}),ie.jsx("div",{className:"maputnik-layout-drawer",children:ie.jsx(_De,{children:this.props.layerEditor})}),this.props.map]}),(wy().b[0][0]++,this.props.bottom&&(wy().b[0][1]++,ie.jsx("div",{className:"maputnik-layout-bottom",children:this.props.bottom}))),this.props.modals]})})}}const MDe=(wy().s[2]++,Jo()(xDe));function xa(){var n="/home/runner/work/maputnik/maputnik/src/components/AppMessagePanel.tsx",e="35d9aec71cb86113da5d8ac4f197fbf609a8818e",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/AppMessagePanel.tsx",statementMap:{0:{start:{line:6,column:24},end:{line:9,column:3}},1:{start:{line:11,column:38},end:{line:11,column:48}},2:{start:{line:12,column:19},end:{line:40,column:6}},3:{start:{line:14,column:6},end:{line:38,column:7}},4:{start:{line:15,column:27},end:{line:15,column:32}},5:{start:{line:16,column:24},end:{line:16,column:73}},6:{start:{line:17,column:8},end:{line:35,column:13}},7:{start:{line:30,column:31},end:{line:30,column:74}},8:{start:{line:37,column:8},end:{line:37,column:32}},9:{start:{line:39,column:6},end:{line:39,column:120}},10:{start:{line:41,column:18},end:{line:43,column:6}},11:{start:{line:42,column:6},end:{line:42,column:68}},12:{start:{line:44,column:4},end:{line:47,column:9}},13:{start:{line:50,column:24},end:{line:50,column:66}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:19},end:{line:7,column:20}},loc:{start:{line:7,column:25},end:{line:8,column:5}},line:7},1:{name:"(anonymous_1)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:48,column:3}},line:10},2:{name:"(anonymous_2)",decl:{start:{line:12,column:42},end:{line:12,column:43}},loc:{start:{line:12,column:58},end:{line:40,column:5}},line:12},3:{name:"(anonymous_3)",decl:{start:{line:30,column:25},end:{line:30,column:26}},loc:{start:{line:30,column:31},end:{line:30,column:74}},line:30},4:{name:"(anonymous_4)",decl:{start:{line:41,column:40},end:{line:41,column:41}},loc:{start:{line:41,column:50},end:{line:43,column:5}},line:41}},branchMap:{0:{loc:{start:{line:14,column:6},end:{line:38,column:7}},type:"if",locations:[{start:{line:14,column:6},end:{line:38,column:7}},{start:{line:36,column:13},end:{line:38,column:7}}],line:14},1:{loc:{start:{line:14,column:10},end:{line:14,column:55}},type:"binary-expr",locations:[{start:{line:14,column:10},end:{line:14,column:22}},{start:{line:14,column:26},end:{line:14,column:55}}],line:14},2:{loc:{start:{line:24,column:10},end:{line:34,column:14}},type:"binary-expr",locations:[{start:{line:24,column:10},end:{line:24,column:50}},{start:{line:24,column:70},end:{line:34,column:14}}],line:24}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/AppMessagePanel.tsx"],names:[],mappings:"AA6BY,SAIE,UAHM,KADR;AA7BZ,OAAO,WAAW;AAClB,SAAQ,qBAAoB;AAE5B,SAAS,OAA6B,uBAAuB;AAY7D,MAAM,gCAAgC,MAAM,UAAwC;AAAA,EAClF,OAAO,eAAe;AAAA,IACpB,eAAe,MAAM;AAAA,IAAC;AAAA,EACxB;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,GAAG,mBAAkB,IAAI,KAAK;AACrC,UAAM,SAAS,KAAK,MAAM,QAAQ,IAAI,CAAC,OAAO,QAAQ;AACpD,UAAI;AACJ,UAAI,MAAM,UAAU,MAAM,OAAO,SAAS,SAAS;AACjD,cAAM,EAAC,OAAM,IAAI;AACjB,cAAM,UAAU,KAAK,MAAM,UAAU,OAAO,OAAO,KAAK,KAAK,EAAE;AAC/D,kBACE,iCACE;AAAA,+BAAC,SAAM,GAAM;AAAA;AAAA,YACL,oBAAC,UAAM,wBAAc,OAAO,GAAE;AAAA,YAAO;AAAA,YAAG,OAAO,KAAK;AAAA,aAC5D;AAAA,UACC,uBAAuB,OAAO,KAAK,SAClC,iCAAE;AAAA;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS,MAAM,KAAK,MAAM,cAAe,OAAO,KAAK,KAAK;AAAA,gBAEzD,YAAE,iBAAiB;AAAA;AAAA,YACtB;AAAA,aACF;AAAA,WAEJ;AAAA,MAEJ,OACK;AACH,kBAAU,MAAM;AAAA,MAClB;AACA,aAAO,oBAAC,OAAqB,WAAU,gCACpC,qBADY,WAAS,GAExB;AAAA,IACF,CAAC;AAED,UAAM,QAAQ,KAAK,MAAM,OAAO,IAAI,CAAC,GAAG,MAAM;AAC5C,aAAO,oBAAC,OAAmB,eAAZ,UAAQ,CAAM;AAAA,IAC/B,CAAC;AAED,WAAO,qBAAC,SAAI,WAAU,0BACnB;AAAA;AAAA,MACA;AAAA,OACH;AAAA,EACF;AACF;AAEA,MAAM,kBAAkB,gBAAgB,EAAE,uBAAuB;AACjE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"35d9aec71cb86113da5d8ac4f197fbf609a8818e"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return xa=function(){return s},s}xa();class wDe extends En.Component{static defaultProps=(xa().s[0]++,{onLayerSelect:()=>{xa().f[0]++}});render(){xa().f[1]++;const{t:e,selectedLayerIndex:t}=(xa().s[1]++,this.props),i=(xa().s[2]++,this.props.errors?.map((o,s)=>{xa().f[2]++;let a;if(xa().s[3]++,xa().b[1][0]++,o.parsed&&(xa().b[1][1]++,o.parsed.type==="layer")){xa().b[0][0]++;const{parsed:c}=(xa().s[4]++,o),A=(xa().s[5]++,this.props.mapStyle?.layers[c.data.index].id);xa().s[6]++,a=ie.jsxs(ie.Fragment,{children:[ie.jsxs(lb,{t:e,children:["Layer ",ie.jsx("span",{children:Nse(A)}),": ",c.data.message]}),(xa().b[2][0]++,t!==c.data.index&&(xa().b[2][1]++,ie.jsxs(ie.Fragment,{children:[" — ",ie.jsx("button",{className:"maputnik-message-panel__switch-button",onClick:()=>(xa().f[3]++,xa().s[7]++,this.props.onLayerSelect(c.data.index)),children:e("switch to layer")})]})))]})}else xa().b[0][1]++,xa().s[8]++,a=o.message;return xa().s[9]++,ie.jsx("p",{className:"maputnik-message-panel-error",children:a},"error-"+s)})),r=(xa().s[10]++,this.props.infos?.map((o,s)=>(xa().f[4]++,xa().s[11]++,ie.jsx("p",{children:o},"info-"+s))));return xa().s[12]++,ie.jsxs("div",{className:"maputnik-message-panel",children:[i,r]})}}const SDe=(xa().s[13]++,Jo()(wDe));function C4(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldArray.tsx",e="6904abccc922d01222214bca1ee3bdee75077020",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldArray.tsx",statementMap:{0:{start:{line:4,column:19},end:{line:6,column:1}},1:{start:{line:5,column:2},end:{line:5,column:148}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:19},end:{line:4,column:20}},loc:{start:{line:4,column:30},end:{line:6,column:1}},line:4}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldArray.tsx"],names:[],mappings:"AAaM;AAbN,OAAO,gBAA0C;AACjD,OAAO,cAAc;AASrB,MAAM,aAAwC,CAAC,UAAU;AACvD,SACE,oBAAC,YAAS,OAAO,MAAM,OAAO,WAAW,MAAM,WAC7C,8BAAC,cAAY,GAAG,OAAO,GACzB;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6904abccc922d01222214bca1ee3bdee75077020"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return C4=function(){return s},s}C4();C4().s[0]++;const QS=n=>(C4().f[0]++,C4().s[1]++,ie.jsx(My,{label:n.label,fieldSpec:n.fieldSpec,children:ie.jsx(ED,{...n})}));function _4(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldNumber.tsx",e="4d2523cd21b202fb5e80e08624becdbab30e967f",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldNumber.tsx",statementMap:{0:{start:{line:4,column:20},end:{line:6,column:1}},1:{start:{line:5,column:2},end:{line:5,column:146}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:20},end:{line:4,column:21}},loc:{start:{line:4,column:31},end:{line:6,column:1}},line:4}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldNumber.tsx"],names:[],mappings:"AAeM;AAfN,OAAO,iBAA0C;AACjD,OAAO,WAAW;AAWlB,MAAM,cAA0C,CAAC,UAAU;AACzD,SACE,oBAAC,SAAM,OAAO,MAAM,OAAO,WAAW,MAAM,WAC1C,8BAAC,eAAa,GAAG,OAAO,GAC1B;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4d2523cd21b202fb5e80e08624becdbab30e967f"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return _4=function(){return s},s}_4();_4().s[0]++;const em=n=>(_4().f[0]++,_4().s[1]++,ie.jsx(Fs,{label:n.label,fieldSpec:n.fieldSpec,children:ie.jsx(i1,{...n})}));function x4(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldString.tsx",e="5d41bf44c48c380a773c8c6219651c4348518afa",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldString.tsx",statementMap:{0:{start:{line:4,column:20},end:{line:6,column:1}},1:{start:{line:5,column:2},end:{line:5,column:146}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:20},end:{line:4,column:21}},loc:{start:{line:4,column:31},end:{line:6,column:1}},line:4}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldString.tsx"],names:[],mappings:"AAcM;AAdN,OAAO,WAAW;AAClB,OAAO,iBAA0C;AAUjD,MAAM,cAA0C,CAAC,UAAU;AACzD,SACE,oBAAC,SAAM,OAAO,MAAM,OAAO,WAAW,MAAM,WAC1C,8BAAC,eAAa,GAAG,OAAO,GAC1B;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"5d41bf44c48c380a773c8c6219651c4348518afa"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return x4=function(){return s},s}x4();x4().s[0]++;const qh=n=>(x4().f[0]++,x4().s[1]++,ie.jsx(Fs,{label:n.label,fieldSpec:n.fieldSpec,children:ie.jsx(dm,{...n})}));function M4(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldUrl.tsx",e="6e4f23f735ab05a9622545421c68df85e4603d43",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldUrl.tsx",statementMap:{0:{start:{line:4,column:17},end:{line:6,column:1}},1:{start:{line:5,column:2},end:{line:5,column:143}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:17},end:{line:4,column:18}},loc:{start:{line:4,column:28},end:{line:6,column:1}},line:4}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldUrl.tsx"],names:[],mappings:"AAeM;AAfN,OAAO,cAAqD;AAC5D,OAAO,WAAW;AAWlB,MAAM,WAAoC,CAAC,UAAU;AACnD,SACE,oBAAC,SAAM,OAAO,MAAM,OAAO,WAAW,MAAM,WAC1C,8BAAC,YAAU,GAAG,OAAO,GACvB;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6e4f23f735ab05a9622545421c68df85e4603d43"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return M4=function(){return s},s}M4();M4().s[0]++;const yx=n=>(M4().f[0]++,M4().s[1]++,ie.jsx(Fs,{label:n.label,fieldSpec:n.fieldSpec,children:ie.jsx(gL,{...n})}));function w4(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldSelect.tsx",e="245ef066962174fcd1012332d28af93e7b97872c",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldSelect.tsx",statementMap:{0:{start:{line:4,column:20},end:{line:6,column:1}},1:{start:{line:5,column:2},end:{line:5,column:146}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:20},end:{line:4,column:21}},loc:{start:{line:4,column:31},end:{line:6,column:1}},line:4}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldSelect.tsx"],names:[],mappings:"AAeM;AAfN,OAAO,WAAW;AAClB,OAAO,iBAA0C;AAWjD,MAAM,cAA0C,CAAC,UAAU;AACzD,SACE,oBAAC,SAAM,OAAO,MAAM,OAAO,WAAW,MAAM,WAC1C,8BAAC,eAAa,GAAG,OAAO,GAC1B;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"245ef066962174fcd1012332d28af93e7b97872c"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return w4=function(){return s},s}w4();w4().s[0]++;const S4=n=>(w4().f[0]++,w4().s[1]++,ie.jsx(Fs,{label:n.label,fieldSpec:n.fieldSpec,children:ie.jsx(Wb,{...n})}));function E4(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldEnum.tsx",e="c3637509a0af6618b52e814bed4254c2e3fa3b7a",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldEnum.tsx",statementMap:{0:{start:{line:4,column:18},end:{line:6,column:1}},1:{start:{line:5,column:2},end:{line:5,column:147}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:18},end:{line:4,column:19}},loc:{start:{line:4,column:29},end:{line:6,column:1}},line:4}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldEnum.tsx"],names:[],mappings:"AAeM;AAfN,OAAO,eAAsC;AAC7C,OAAO,cAAc;AAWrB,MAAM,YAAsC,CAAC,UAAU;AACrD,SACE,oBAAC,YAAS,OAAO,MAAM,OAAO,WAAW,MAAM,WAC7C,8BAAC,aAAW,GAAG,OAAO,GACxB;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c3637509a0af6618b52e814bed4254c2e3fa3b7a"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return E4=function(){return s},s}E4();E4().s[0]++;const EDe=n=>(E4().f[0]++,E4().s[1]++,ie.jsx(My,{label:n.label,fieldSpec:n.fieldSpec,children:ie.jsx(mL,{...n})}));function O4(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldColor.tsx",e="81b03af9ad032d255df7823d843b73e8fa5e3f61",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldColor.tsx",statementMap:{0:{start:{line:4,column:19},end:{line:6,column:1}},1:{start:{line:5,column:2},end:{line:5,column:145}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:19},end:{line:4,column:20}},loc:{start:{line:4,column:30},end:{line:6,column:1}},line:4}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldColor.tsx"],names:[],mappings:"AAeM;AAfN,OAAO,WAAW;AAClB,OAAO,gBAAwC;AAW/C,MAAM,aAAwC,CAAC,UAAU;AACvD,SACE,oBAAC,SAAM,OAAO,MAAM,OAAO,WAAW,MAAM,WAC1C,8BAAC,cAAY,GAAG,OAAO,GACzB;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"81b03af9ad032d255df7823d843b73e8fa5e3f61"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return O4=function(){return s},s}O4();O4().s[0]++;const ODe=n=>(O4().f[0]++,O4().s[1]++,ie.jsx(Fs,{label:n.label,fieldSpec:n.fieldSpec,children:ie.jsx(pL,{...n})}));function B4(){var n="/home/runner/work/maputnik/maputnik/src/libs/field-spec-additional.ts",e="3fd72cd1ec4be346f0d6d854a97e371e1b9c2997",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/field-spec-additional.ts",statementMap:{0:{start:{line:1,column:13},end:{line:32,column:2}},1:{start:{line:1,column:21},end:{line:32,column:1}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:1,column:13},end:{line:1,column:14}},loc:{start:{line:1,column:21},end:{line:32,column:1}},line:1}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/field-spec-additional.ts"],names:[],mappings:"AAEA,MAAM,OAAO,CAAC,OAAkB;AAAA,EAC9B,UAAU;AAAA,IACR,uBAAuB;AAAA,MACrB,OAAO,EAAE,uBAAuB;AAAA,MAChC,KAAK,EAAE,yCAAyC;AAAA,MAChD,QAAQ;AAAA,MACR,gBAAgB,EAAE,YAAY;AAAA,IAChC;AAAA,IACA,4BAA4B;AAAA,MAC1B,OAAO,EAAE,4BAA4B;AAAA,MACrC,KAAK,EAAE,iDAAiD;AAAA,MACxD,QAAQ;AAAA,MACR,gBAAgB,EAAE,YAAY;AAAA,IAChC;AAAA,IACA,qBAAqB;AAAA,MACnB,OAAO,EAAE,qBAAqB;AAAA,MAC9B,KAAK,EAAE,0BAA0B;AAAA,MACjC,QAAQ;AAAA,MACR,gBAAgB,EAAE,YAAY;AAAA,IAChC;AAAA,IACA,yBAAyB;AAAA,MACvB,OAAO,EAAE,yBAAyB;AAAA,MAClC,KAAK,EAAE,8CAA8C;AAAA,MACrD,QAAQ;AAAA,MACR,gBAAgB,EAAE,YAAY;AAAA,IAChC;AAAA,IACA,gBAAgB;AAAA,MACd,OAAO,EAAE,gBAAgB;AAAA,MACzB,KAAK,EAAE,sDAAsD;AAAA,IAC/D;AAAA,EACF;AACF;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"3fd72cd1ec4be346f0d6d854a97e371e1b9c2997"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return B4=function(){return s},s}B4();B4().s[0]++;const Wse=n=>(B4().f[0]++,B4().s[1]++,{maputnik:{maptiler_access_token:{label:n("MapTiler Access Token"),doc:n("Public access token for MapTiler Cloud."),docUrl:"https://docs.maptiler.com/cloud/api/authentication-key/",docUrlLinkText:n("Learn More")},thunderforest_access_token:{label:n("Thunderforest Access Token"),doc:n("Public access token for Thunderforest services."),docUrl:"https://www.thunderforest.com/docs/apikeys/",docUrlLinkText:n("Learn More")},stadia_access_token:{label:n("Stadia Maps API Key"),doc:n("API key for Stadia Maps."),docUrl:"https://docs.stadiamaps.com/authentication/",docUrlLinkText:n("Learn More")},locationiq_access_token:{label:n("LocationIQ Access Token"),doc:n("Public access token for LocationIQ services."),docUrl:"https://docs.locationiq.com/docs/maps",docUrlLinkText:n("Learn More")},style_renderer:{label:n("Style Renderer"),doc:n("Choose the default Maputnik renderer for this style.")}}});function wn(){var n="/home/runner/work/maputnik/maputnik/src/components/modals/ModalSettings.tsx",e="99e5ed3645da84d03156e916f41e6bd97a8da4f4",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/modals/ModalSettings.tsx",statementMap:{0:{start:{line:16,column:23},end:{line:18,column:5}},1:{start:{line:19,column:4},end:{line:23,column:5}},2:{start:{line:20,column:6},end:{line:20,column:34}},3:{start:{line:22,column:6},end:{line:22,column:35}},4:{start:{line:24,column:4},end:{line:27,column:7}},5:{start:{line:30,column:18},end:{line:32,column:5}},6:{start:{line:33,column:4},end:{line:37,column:5}},7:{start:{line:34,column:6},end:{line:34,column:29}},8:{start:{line:36,column:6},end:{line:36,column:30}},9:{start:{line:38,column:4},end:{line:41,column:7}},10:{start:{line:44,column:20},end:{line:46,column:5}},11:{start:{line:47,column:4},end:{line:51,column:5}},12:{start:{line:48,column:6},end:{line:48,column:31}},13:{start:{line:50,column:6},end:{line:50,column:32}},14:{start:{line:52,column:4},end:{line:55,column:7}},15:{start:{line:58,column:23},end:{line:60,column:5}},16:{start:{line:61,column:4},end:{line:65,column:5}},17:{start:{line:62,column:6},end:{line:62,column:29}},18:{start:{line:64,column:6},end:{line:64,column:30}},19:{start:{line:66,column:4},end:{line:69,column:7}},20:{start:{line:72,column:25},end:{line:74,column:5}},21:{start:{line:75,column:4},end:{line:79,column:5}},22:{start:{line:76,column:6},end:{line:76,column:36}},23:{start:{line:78,column:6},end:{line:78,column:37}},24:{start:{line:80,column:4},end:{line:80,column:44}},25:{start:{line:83,column:21},end:{line:83,column:55}},26:{start:{line:84,column:54},end:{line:84,column:64}},27:{start:{line:85,column:16},end:{line:85,column:38}},28:{start:{line:86,column:18},end:{line:86,column:49}},29:{start:{line:87,column:23},end:{line:87,column:59}},30:{start:{line:88,column:20},end:{line:88,column:53}},31:{start:{line:89,column:23},end:{line:89,column:59}},32:{start:{line:90,column:4},end:{line:335,column:6}},33:{start:{line:105,column:35},end:{line:105,column:74}},34:{start:{line:115,column:35},end:{line:115,column:75}},35:{start:{line:125,column:35},end:{line:125,column:76}},36:{start:{line:135,column:35},end:{line:135,column:76}},37:{start:{line:145,column:35},end:{line:145,column:104}},38:{start:{line:155,column:35},end:{line:155,column:105}},39:{start:{line:165,column:35},end:{line:165,column:98}},40:{start:{line:175,column:35},end:{line:175,column:102}},41:{start:{line:187,column:35},end:{line:187,column:76}},42:{start:{line:197,column:35},end:{line:197,column:74}},43:{start:{line:207,column:35},end:{line:207,column:77}},44:{start:{line:217,column:35},end:{line:217,column:75}},45:{start:{line:229,column:35},end:{line:229,column:76}},46:{start:{line:239,column:35},end:{line:239,column:75}},47:{start:{line:249,column:35},end:{line:249,column:79}},48:{start:{line:261,column:35},end:{line:261,column:78}},49:{start:{line:271,column:35},end:{line:271,column:78}},50:{start:{line:281,column:35},end:{line:281,column:84}},51:{start:{line:291,column:35},end:{line:291,column:80}},52:{start:{line:301,column:35},end:{line:301,column:83}},53:{start:{line:316,column:35},end:{line:316,column:67}},54:{start:{line:330,column:35},end:{line:330,column:87}},55:{start:{line:338,column:22},end:{line:338,column:62}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:44},end:{line:28,column:3}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:29,column:2},end:{line:29,column:3}},loc:{start:{line:29,column:39},end:{line:42,column:3}},line:29},2:{name:"(anonymous_2)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:41},end:{line:56,column:3}},line:43},3:{name:"(anonymous_3)",decl:{start:{line:57,column:2},end:{line:57,column:3}},loc:{start:{line:57,column:30},end:{line:70,column:3}},line:57},4:{name:"(anonymous_4)",decl:{start:{line:71,column:2},end:{line:71,column:3}},loc:{start:{line:71,column:39},end:{line:81,column:3}},line:71},5:{name:"(anonymous_5)",decl:{start:{line:82,column:2},end:{line:82,column:3}},loc:{start:{line:82,column:11},end:{line:336,column:3}},line:82},6:{name:"(anonymous_6)",decl:{start:{line:105,column:24},end:{line:105,column:25}},loc:{start:{line:105,column:35},end:{line:105,column:74}},line:105},7:{name:"(anonymous_7)",decl:{start:{line:115,column:24},end:{line:115,column:25}},loc:{start:{line:115,column:35},end:{line:115,column:75}},line:115},8:{name:"(anonymous_8)",decl:{start:{line:125,column:24},end:{line:125,column:25}},loc:{start:{line:125,column:35},end:{line:125,column:76}},line:125},9:{name:"(anonymous_9)",decl:{start:{line:135,column:24},end:{line:135,column:25}},loc:{start:{line:135,column:35},end:{line:135,column:76}},line:135},10:{name:"(anonymous_10)",decl:{start:{line:145,column:24},end:{line:145,column:25}},loc:{start:{line:145,column:35},end:{line:145,column:104}},line:145},11:{name:"(anonymous_11)",decl:{start:{line:155,column:24},end:{line:155,column:25}},loc:{start:{line:155,column:35},end:{line:155,column:105}},line:155},12:{name:"(anonymous_12)",decl:{start:{line:165,column:24},end:{line:165,column:25}},loc:{start:{line:165,column:35},end:{line:165,column:98}},line:165},13:{name:"(anonymous_13)",decl:{start:{line:175,column:24},end:{line:175,column:25}},loc:{start:{line:175,column:35},end:{line:175,column:102}},line:175},14:{name:"(anonymous_14)",decl:{start:{line:187,column:24},end:{line:187,column:25}},loc:{start:{line:187,column:35},end:{line:187,column:76}},line:187},15:{name:"(anonymous_15)",decl:{start:{line:197,column:24},end:{line:197,column:25}},loc:{start:{line:197,column:35},end:{line:197,column:74}},line:197},16:{name:"(anonymous_16)",decl:{start:{line:207,column:24},end:{line:207,column:25}},loc:{start:{line:207,column:35},end:{line:207,column:77}},line:207},17:{name:"(anonymous_17)",decl:{start:{line:217,column:24},end:{line:217,column:25}},loc:{start:{line:217,column:35},end:{line:217,column:75}},line:217},18:{name:"(anonymous_18)",decl:{start:{line:229,column:24},end:{line:229,column:25}},loc:{start:{line:229,column:35},end:{line:229,column:76}},line:229},19:{name:"(anonymous_19)",decl:{start:{line:239,column:24},end:{line:239,column:25}},loc:{start:{line:239,column:35},end:{line:239,column:75}},line:239},20:{name:"(anonymous_20)",decl:{start:{line:249,column:24},end:{line:249,column:25}},loc:{start:{line:249,column:35},end:{line:249,column:79}},line:249},21:{name:"(anonymous_21)",decl:{start:{line:261,column:24},end:{line:261,column:25}},loc:{start:{line:261,column:35},end:{line:261,column:78}},line:261},22:{name:"(anonymous_22)",decl:{start:{line:271,column:24},end:{line:271,column:25}},loc:{start:{line:271,column:35},end:{line:271,column:78}},line:271},23:{name:"(anonymous_23)",decl:{start:{line:281,column:24},end:{line:281,column:25}},loc:{start:{line:281,column:35},end:{line:281,column:84}},line:281},24:{name:"(anonymous_24)",decl:{start:{line:291,column:24},end:{line:291,column:25}},loc:{start:{line:291,column:35},end:{line:291,column:80}},line:291},25:{name:"(anonymous_25)",decl:{start:{line:301,column:24},end:{line:301,column:25}},loc:{start:{line:301,column:35},end:{line:301,column:83}},line:301},26:{name:"(anonymous_26)",decl:{start:{line:316,column:24},end:{line:316,column:25}},loc:{start:{line:316,column:35},end:{line:316,column:67}},line:316},27:{name:"(anonymous_27)",decl:{start:{line:330,column:24},end:{line:330,column:25}},loc:{start:{line:330,column:35},end:{line:330,column:87}},line:330}},branchMap:{0:{loc:{start:{line:19,column:4},end:{line:23,column:5}},type:"if",locations:[{start:{line:19,column:4},end:{line:23,column:5}},{start:{line:21,column:11},end:{line:23,column:5}}],line:19},1:{loc:{start:{line:33,column:4},end:{line:37,column:5}},type:"if",locations:[{start:{line:33,column:4},end:{line:37,column:5}},{start:{line:35,column:11},end:{line:37,column:5}}],line:33},2:{loc:{start:{line:47,column:4},end:{line:51,column:5}},type:"if",locations:[{start:{line:47,column:4},end:{line:51,column:5}},{start:{line:49,column:11},end:{line:51,column:5}}],line:47},3:{loc:{start:{line:61,column:4},end:{line:65,column:5}},type:"if",locations:[{start:{line:61,column:4},end:{line:65,column:5}},{start:{line:63,column:11},end:{line:65,column:5}}],line:61},4:{loc:{start:{line:75,column:4},end:{line:79,column:5}},type:"if",locations:[{start:{line:75,column:4},end:{line:79,column:5}},{start:{line:77,column:11},end:{line:79,column:5}}],line:75},5:{loc:{start:{line:83,column:21},end:{line:83,column:55}},type:"binary-expr",locations:[{start:{line:83,column:21},end:{line:83,column:49}},{start:{line:83,column:53},end:{line:83,column:55}}],line:83},6:{loc:{start:{line:86,column:18},end:{line:86,column:49}},type:"binary-expr",locations:[{start:{line:86,column:18},end:{line:86,column:43}},{start:{line:86,column:47},end:{line:86,column:49}}],line:86},7:{loc:{start:{line:87,column:23},end:{line:87,column:59}},type:"binary-expr",locations:[{start:{line:87,column:23},end:{line:87,column:53}},{start:{line:87,column:57},end:{line:87,column:59}}],line:87},8:{loc:{start:{line:88,column:20},end:{line:88,column:53}},type:"binary-expr",locations:[{start:{line:88,column:20},end:{line:88,column:47}},{start:{line:88,column:51},end:{line:88,column:53}}],line:88},9:{loc:{start:{line:89,column:23},end:{line:89,column:59}},type:"binary-expr",locations:[{start:{line:89,column:23},end:{line:89,column:53}},{start:{line:89,column:57},end:{line:89,column:59}}],line:89},10:{loc:{start:{line:185,column:21},end:{line:185,column:42}},type:"binary-expr",locations:[{start:{line:185,column:21},end:{line:185,column:36}},{start:{line:185,column:40},end:{line:185,column:42}}],line:185},11:{loc:{start:{line:315,column:21},end:{line:315,column:55}},type:"binary-expr",locations:[{start:{line:315,column:21},end:{line:315,column:49}},{start:{line:315,column:53},end:{line:315,column:55}}],line:315},12:{loc:{start:{line:329,column:21},end:{line:329,column:62}},type:"binary-expr",locations:[{start:{line:329,column:21},end:{line:329,column:50}},{start:{line:329,column:54},end:{line:329,column:62}}],line:329}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/modals/ModalSettings.tsx"],names:[],mappings:"AAmIM,SACE,KADF;AAnIN,OAAO,WAAW;AAClB,OAAO,YAAY;AAEnB,SAA+B,uBAAuB;AAEtD,OAAO,gBAAgB;AACvB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,cAAc;AACrB,OAAO,iBAAiB;AACxB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,OAAO,WAAW;AAClB,OAAO,yBAAyB;AAWhC,MAAM,8BAA8B,MAAM,UAAsC;AAAA,EAC9E,yBAAyB,UAAyC,OAA2B;AAC3F,UAAM,aAAa;AAAA,MACjB,GAAG,KAAK,MAAM,SAAS;AAAA,IACzB;AAEA,QAAI,UAAU,QAAW;AACvB,aAAO,WAAW,QAAQ;AAAA,IAC5B,OACK;AACH,iBAAW,QAAQ,IAAI;AAAA,IACzB;AAEA,SAAK,MAAM,eAAe;AAAA,MACxB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,oBAAoB,UAAoC,OAAY;AAClE,UAAM,QAAQ;AAAA,MACZ,GAAG,KAAK,MAAM,SAAS;AAAA,IACzB;AAEA,QAAI,UAAU,QAAW;AACvB,aAAO,MAAM,QAAQ;AAAA,IACvB,OACK;AAEH,YAAM,QAAQ,IAAI;AAAA,IACpB;AAEA,SAAK,MAAM,eAAe;AAAA,MACxB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,sBAAsB,UAAsC,OAAY;AACtE,UAAM,UAAU;AAAA,MACd,GAAG,KAAK,MAAM,SAAS;AAAA,IACzB;AAEA,QAAI,UAAU,QAAW;AACvB,aAAO,QAAQ,QAAQ;AAAA,IACzB,OACK;AAEH,cAAQ,QAAQ,IAAI;AAAA,IACtB;AAEA,SAAK,MAAM,eAAe;AAAA,MACxB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,qBAAqB,OAAY;AAC/B,UAAM,aAAa;AAAA,MACjB,GAAG,KAAK,MAAM,SAAS;AAAA,IACzB;AAEA,QAAI,UAAU,QAAW;AACvB,aAAO,WAAW;AAAA,IACpB,OACK;AACH,iBAAW,OAAO;AAAA,IACpB;AAEA,SAAK,MAAM,eAAe;AAAA,MACxB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,oBAAoB,UAA8C,OAAY;AAC5E,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,IAChB;AAEA,QAAI,UAAU,QAAW;AAEvB,aAAO,aAAa,QAAQ;AAAA,IAC9B,OACK;AAEH,mBAAa,QAAQ,IAAI;AAAA,IAC3B;AACA,SAAK,MAAM,eAAe,YAAY;AAAA,EACxC;AAAA,EAEA,SAAS;AACP,UAAM,WAAW,KAAK,MAAM,SAAS,YAAY,CAAC;AAClD,UAAM,EAAC,GAAG,0BAA0B,SAAQ,IAAI,KAAK;AACrD,UAAM,MAAM,oBAAoB,CAAC;AAEjC,UAAM,QAAQ,KAAK,MAAM,SAAS,SAAS,CAAC;AAC5C,UAAM,aAAa,KAAK,MAAM,SAAS,cAAc,CAAC;AACtD,UAAM,UAAU,KAAK,MAAM,SAAS,WAAW,CAAC;AAChD,UAAM,aAAa,KAAK,MAAM,SAAS,cAAc,CAAC;AAEtD,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,gBAAgB;AAAA,QAEzB,+BAAC,SAAI,WAAU,kBACb;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,MAAM;AAAA,cACf,WAAW,OAAO,MAAM;AAAA,cACxB,eAAY;AAAA,cACZ,OAAO,KAAK,MAAM,SAAS;AAAA,cAC3B,UAAU,CAAC,UAAU,KAAK,oBAAoB,QAAQ,KAAK;AAAA;AAAA,UAC7D;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,OAAO;AAAA,cAChB,WAAW,EAAC,KAAK,EAAE,6DAA6D,EAAC;AAAA,cACjF,eAAY;AAAA,cACZ,OAAQ,KAAK,MAAM,SAAiB;AAAA,cACpC,UAAU,CAAC,UAAU,KAAK,oBAAoB,SAAS,KAAK;AAAA;AAAA,UAC9D;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAW,OAAO,MAAM;AAAA,cACxB,OAAO,EAAE,YAAY;AAAA,cACrB,eAAY;AAAA,cACZ,OAAO,KAAK,MAAM,SAAS;AAAA,cAC3B,UAAU,CAAC,UAAU,KAAK,oBAAoB,UAAU,KAAK;AAAA;AAAA,UAC/D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,YAAY;AAAA,cACrB,WAAW,OAAO,MAAM;AAAA,cACxB,eAAY;AAAA,cACZ,OAAO,KAAK,MAAM,SAAS;AAAA,cAC3B,UAAU,CAAC,UAAU,KAAK,oBAAoB,UAAU,KAAK;AAAA;AAAA,UAC/D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,IAAI,SAAS,sBAAsB;AAAA,cAC1C,WAAW,IAAI,SAAS;AAAA,cACxB,eAAY;AAAA,cACZ,OAAO,SAAS,oCAAoC;AAAA,cACpD,UAAU,CAAC,UAAU,yBAAyB,sCAAsC,KAAK;AAAA;AAAA,UAC3F;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,IAAI,SAAS,2BAA2B;AAAA,cAC/C,WAAW,IAAI,SAAS;AAAA,cACxB,eAAY;AAAA,cACZ,OAAO,SAAS,qCAAqC;AAAA,cACrD,UAAU,CAAC,UAAU,yBAAyB,uCAAuC,KAAK;AAAA;AAAA,UAC5F;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,IAAI,SAAS,oBAAoB;AAAA,cACxC,WAAW,IAAI,SAAS;AAAA,cACxB,eAAY;AAAA,cACZ,OAAO,SAAS,8BAA8B;AAAA,cAC9C,UAAU,CAAC,UAAU,yBAAyB,gCAAgC,KAAK;AAAA;AAAA,UACrF;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,IAAI,SAAS,wBAAwB;AAAA,cAC5C,WAAW,IAAI,SAAS;AAAA,cACxB,eAAY;AAAA,cACZ,OAAO,SAAS,kCAAkC;AAAA,cAClD,UAAU,CAAC,UAAU,yBAAyB,oCAAoC,KAAK;AAAA;AAAA,UACzF;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,QAAQ;AAAA,cACjB,WAAW,OAAO,MAAM;AAAA,cACxB,QAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAO,SAAS,UAAU,CAAC;AAAA,cAC3B,SAAS,CAAC,GAAG,CAAC;AAAA,cACd,UAAU,CAAC,UAAU,KAAK,oBAAoB,UAAU,KAAK;AAAA;AAAA,UAC/D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,MAAM;AAAA,cACf,WAAW,OAAO,MAAM;AAAA,cACxB,OAAO,SAAS;AAAA,cAChB,SAAS;AAAA,cACT,UAAU,CAAC,UAAU,KAAK,oBAAoB,QAAQ,KAAK;AAAA;AAAA,UAC7D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,SAAS;AAAA,cAClB,WAAW,OAAO,MAAM;AAAA,cACxB,OAAO,SAAS;AAAA,cAChB,SAAS,OAAO,MAAM,QAAQ;AAAA,cAC9B,UAAU,CAAC,UAAU,KAAK,oBAAoB,WAAW,KAAK;AAAA;AAAA,UAChE;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,OAAO;AAAA,cAChB,WAAW,OAAO,MAAM;AAAA,cACxB,OAAO,SAAS;AAAA,cAChB,SAAS,OAAO,MAAM,MAAM;AAAA,cAC5B,UAAU,CAAC,UAAU,KAAK,oBAAoB,SAAS,KAAK;AAAA;AAAA,UAC9D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,cAAc;AAAA,cACvB,WAAW,OAAO,MAAM;AAAA,cACxB,MAAK;AAAA,cACL,OAAO,MAAM;AAAA,cACb,SAAS,OAAO,KAAK,OAAO,MAAM,OAAO,MAAM;AAAA,cAC/C,SAAS,OAAO,MAAM,OAAO;AAAA,cAC7B,UAAU,CAAC,UAAU,KAAK,oBAAoB,UAAU,KAAK;AAAA;AAAA,UAC/D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,aAAa;AAAA,cACtB,WAAW,OAAO,MAAM;AAAA,cACxB,OAAO,MAAM;AAAA,cACb,SAAS,OAAO,MAAM,MAAM;AAAA,cAC5B,UAAU,CAAC,UAAU,KAAK,oBAAoB,SAAS,KAAK;AAAA;AAAA,UAC9D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,iBAAiB;AAAA,cAC1B,WAAW,OAAO,MAAM;AAAA,cACxB,OAAO,MAAM;AAAA,cACb,SAAS,OAAO,MAAM,UAAU;AAAA,cAChC,UAAU,CAAC,UAAU,KAAK,oBAAoB,aAAa,KAAK;AAAA;AAAA,UAClE;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,gBAAgB;AAAA,cACzB,WAAW,OAAO,MAAM;AAAA,cACxB,MAAK;AAAA,cACL,QAAQ,OAAO,MAAM,SAAS;AAAA,cAC9B,OAAO,MAAM;AAAA,cACb,SAAS,OAAO,MAAM,SAAS;AAAA,cAC/B,UAAU,CAAC,UAAU,KAAK,oBAAoB,YAAY,KAAK;AAAA;AAAA,UACjE;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,gBAAgB;AAAA,cACzB,WAAW,OAAO,QAAQ;AAAA,cAC1B,eAAY;AAAA,cACZ,OAAO,QAAQ;AAAA,cACf,UAAU,CAAC,UAAU,KAAK,sBAAsB,UAAU,KAAK;AAAA;AAAA,UACjE;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,sBAAsB;AAAA,cAC/B,WAAW,OAAO,QAAQ;AAAA,cAC1B,OAAO,QAAQ;AAAA,cACf,SAAS,OAAO,QAAQ,aAAa;AAAA,cACrC,UAAU,CAAC,UAAU,KAAK,sBAAsB,gBAAgB,KAAK;AAAA;AAAA,UACvE;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,kBAAkB;AAAA,cAC3B,WAAW,OAAO,WAAW;AAAA,cAC7B,OAAO,WAAW;AAAA,cAClB,SAAS,OAAO,WAAW,MAAM;AAAA,cACjC,UAAU,CAAC,UAAU,KAAK,yBAAyB,SAAS,KAAK;AAAA;AAAA,UACnE;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,qBAAqB;AAAA,cAC9B,WAAW,OAAO,WAAW;AAAA,cAC7B,OAAO,WAAW;AAAA,cAClB,SAAS,OAAO,WAAW,SAAS;AAAA,cACpC,UAAU,CAAC,UAAU,KAAK,yBAAyB,YAAY,KAAK;AAAA;AAAA,UACtE;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,YAAY;AAAA,cACrB,eAAY;AAAA,cACZ,SAAS;AAAA,gBACP,CAAC,IAAI,WAAW;AAAA,gBAChB,CAAC,YAAY,UAAU;AAAA,gBACvB,CAAC,SAAS,OAAO;AAAA,gBACjB,CAAC,wBAAwB,sBAAsB;AAAA,cACjD;AAAA,cACA,OAAO,YAAY,MAAM,SAAS,KAAK;AAAA,cACvC,UAAU,CAAC,UAAU,KAAK,qBAAqB,KAAK;AAAA;AAAA,UACtD;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,IAAI,SAAS,eAAe;AAAA,cACnC,WAAW,IAAI,SAAS;AAAA,cACxB,eAAY;AAAA,cACZ,SAAS;AAAA,gBACP,CAAC,UAAU,eAAe;AAAA,gBAC1B,CAAC,MAAM,EAAE,4BAA4B,CAAC;AAAA,cACxC;AAAA,cACA,OAAO,SAAS,mBAAmB,KAAK;AAAA,cACxC,UAAU,CAAC,UAAU,yBAAyB,qBAAqB,KAAK;AAAA;AAAA,UAC1E;AAAA,WACF;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,gBAAgB,gBAAgB,EAAE,qBAAqB;AAC7D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"99e5ed3645da84d03156e916f41e6bd97a8da4f4"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return wn=function(){return s},s}wn();class BDe extends En.Component{changeTransitionProperty(e,t){wn().f[0]++;const i=(wn().s[0]++,{...this.props.mapStyle.transition});wn().s[1]++,t===void 0?(wn().b[0][0]++,wn().s[2]++,delete i[e]):(wn().b[0][1]++,wn().s[3]++,i[e]=t),wn().s[4]++,this.props.onStyleChanged({...this.props.mapStyle,transition:i})}changeLightProperty(e,t){wn().f[1]++;const i=(wn().s[5]++,{...this.props.mapStyle.light});wn().s[6]++,t===void 0?(wn().b[1][0]++,wn().s[7]++,delete i[e]):(wn().b[1][1]++,wn().s[8]++,i[e]=t),wn().s[9]++,this.props.onStyleChanged({...this.props.mapStyle,light:i})}changeTerrainProperty(e,t){wn().f[2]++;const i=(wn().s[10]++,{...this.props.mapStyle.terrain});wn().s[11]++,t===void 0?(wn().b[2][0]++,wn().s[12]++,delete i[e]):(wn().b[2][1]++,wn().s[13]++,i[e]=t),wn().s[14]++,this.props.onStyleChanged({...this.props.mapStyle,terrain:i})}changeProjectionType(e){wn().f[3]++;const t=(wn().s[15]++,{...this.props.mapStyle.projection});wn().s[16]++,e===void 0?(wn().b[3][0]++,wn().s[17]++,delete t.type):(wn().b[3][1]++,wn().s[18]++,t.type=e),wn().s[19]++,this.props.onStyleChanged({...this.props.mapStyle,projection:t})}changeStyleProperty(e,t){wn().f[4]++;const i=(wn().s[20]++,{...this.props.mapStyle});wn().s[21]++,t===void 0?(wn().b[4][0]++,wn().s[22]++,delete i[e]):(wn().b[4][1]++,wn().s[23]++,i[e]=t),wn().s[24]++,this.props.onStyleChanged(i)}render(){wn().f[5]++;const e=(wn().s[25]++,wn().b[5][0]++,this.props.mapStyle.metadata||(wn().b[5][1]++,{})),{t,onChangeMetadataProperty:i,mapStyle:r}=(wn().s[26]++,this.props),o=(wn().s[27]++,Wse(t)),s=(wn().s[28]++,wn().b[6][0]++,this.props.mapStyle.light||(wn().b[6][1]++,{})),a=(wn().s[29]++,wn().b[7][0]++,this.props.mapStyle.transition||(wn().b[7][1]++,{})),c=(wn().s[30]++,wn().b[8][0]++,this.props.mapStyle.terrain||(wn().b[8][1]++,{})),A=(wn().s[31]++,wn().b[9][0]++,this.props.mapStyle.projection||(wn().b[9][1]++,{}));return wn().s[32]++,ie.jsx(a1,{"data-wd-key":"modal:settings",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:t("Style Settings"),children:ie.jsxs("div",{className:"modal:settings",children:[ie.jsx(qh,{label:t("Name"),fieldSpec:Jr.$root.name,"data-wd-key":"modal:settings.name",value:this.props.mapStyle.name,onChange:m=>(wn().f[6]++,wn().s[33]++,this.changeStyleProperty("name",m))}),ie.jsx(qh,{label:t("Owner"),fieldSpec:{doc:t("Owner ID of the style. Used by Mapbox or future style APIs.")},"data-wd-key":"modal:settings.owner",value:this.props.mapStyle.owner,onChange:m=>(wn().f[7]++,wn().s[34]++,this.changeStyleProperty("owner",m))}),ie.jsx(yx,{fieldSpec:Jr.$root.sprite,label:t("Sprite URL"),"data-wd-key":"modal:settings.sprite",value:this.props.mapStyle.sprite,onChange:m=>(wn().f[8]++,wn().s[35]++,this.changeStyleProperty("sprite",m))}),ie.jsx(yx,{label:t("Glyphs URL"),fieldSpec:Jr.$root.glyphs,"data-wd-key":"modal:settings.glyphs",value:this.props.mapStyle.glyphs,onChange:m=>(wn().f[9]++,wn().s[36]++,this.changeStyleProperty("glyphs",m))}),ie.jsx(qh,{label:o.maputnik.maptiler_access_token.label,fieldSpec:o.maputnik.maptiler_access_token,"data-wd-key":"modal:settings.maputnik:openmaptiles_access_token",value:e["maputnik:openmaptiles_access_token"],onChange:m=>(wn().f[10]++,wn().s[37]++,i("maputnik:openmaptiles_access_token",m))}),ie.jsx(qh,{label:o.maputnik.thunderforest_access_token.label,fieldSpec:o.maputnik.thunderforest_access_token,"data-wd-key":"modal:settings.maputnik:thunderforest_access_token",value:e["maputnik:thunderforest_access_token"],onChange:m=>(wn().f[11]++,wn().s[38]++,i("maputnik:thunderforest_access_token",m))}),ie.jsx(qh,{label:o.maputnik.stadia_access_token.label,fieldSpec:o.maputnik.stadia_access_token,"data-wd-key":"modal:settings.maputnik:stadia_access_token",value:e["maputnik:stadia_access_token"],onChange:m=>(wn().f[12]++,wn().s[39]++,i("maputnik:stadia_access_token",m))}),ie.jsx(qh,{label:o.maputnik.locationiq_access_token.label,fieldSpec:o.maputnik.locationiq_access_token,"data-wd-key":"modal:settings.maputnik:locationiq_access_token",value:e["maputnik:locationiq_access_token"],onChange:m=>(wn().f[13]++,wn().s[40]++,i("maputnik:locationiq_access_token",m))}),ie.jsx(QS,{label:t("Center"),fieldSpec:Jr.$root.center,length:2,type:"number",value:(wn().b[10][0]++,r.center||(wn().b[10][1]++,[])),default:[0,0],onChange:m=>(wn().f[14]++,wn().s[41]++,this.changeStyleProperty("center",m))}),ie.jsx(em,{label:t("Zoom"),fieldSpec:Jr.$root.zoom,value:r.zoom,default:0,onChange:m=>(wn().f[15]++,wn().s[42]++,this.changeStyleProperty("zoom",m))}),ie.jsx(em,{label:t("Bearing"),fieldSpec:Jr.$root.bearing,value:r.bearing,default:Jr.$root.bearing.default,onChange:m=>(wn().f[16]++,wn().s[43]++,this.changeStyleProperty("bearing",m))}),ie.jsx(em,{label:t("Pitch"),fieldSpec:Jr.$root.pitch,value:r.pitch,default:Jr.$root.pitch.default,onChange:m=>(wn().f[17]++,wn().s[44]++,this.changeStyleProperty("pitch",m))}),ie.jsx(EDe,{label:t("Light anchor"),fieldSpec:Jr.light.anchor,name:"light-anchor",value:s.anchor,options:Object.keys(Jr.light.anchor.values),default:Jr.light.anchor.default,onChange:m=>(wn().f[18]++,wn().s[45]++,this.changeLightProperty("anchor",m))}),ie.jsx(ODe,{label:t("Light color"),fieldSpec:Jr.light.color,value:s.color,default:Jr.light.color.default,onChange:m=>(wn().f[19]++,wn().s[46]++,this.changeLightProperty("color",m))}),ie.jsx(em,{label:t("Light intensity"),fieldSpec:Jr.light.intensity,value:s.intensity,default:Jr.light.intensity.default,onChange:m=>(wn().f[20]++,wn().s[47]++,this.changeLightProperty("intensity",m))}),ie.jsx(QS,{label:t("Light position"),fieldSpec:Jr.light.position,type:"number",length:Jr.light.position.length,value:s.position,default:Jr.light.position.default,onChange:m=>(wn().f[21]++,wn().s[48]++,this.changeLightProperty("position",m))}),ie.jsx(qh,{label:t("Terrain source"),fieldSpec:Jr.terrain.source,"data-wd-key":"modal:settings.maputnik:terrain_source",value:c.source,onChange:m=>(wn().f[22]++,wn().s[49]++,this.changeTerrainProperty("source",m))}),ie.jsx(em,{label:t("Terrain exaggeration"),fieldSpec:Jr.terrain.exaggeration,value:c.exaggeration,default:Jr.terrain.exaggeration.default,onChange:m=>(wn().f[23]++,wn().s[50]++,this.changeTerrainProperty("exaggeration",m))}),ie.jsx(em,{label:t("Transition delay"),fieldSpec:Jr.transition.delay,value:a.delay,default:Jr.transition.delay.default,onChange:m=>(wn().f[24]++,wn().s[51]++,this.changeTransitionProperty("delay",m))}),ie.jsx(em,{label:t("Transition duration"),fieldSpec:Jr.transition.duration,value:a.duration,default:Jr.transition.duration.default,onChange:m=>(wn().f[25]++,wn().s[52]++,this.changeTransitionProperty("duration",m))}),ie.jsx(S4,{label:t("Projection"),"data-wd-key":"modal:settings.projection",options:[["","Undefined"],["mercator","Mercator"],["globe","Globe"],["vertical-perspective","Vertical Perspective"]],value:(wn().b[11][0]++,A?.type?.toString()||(wn().b[11][1]++,"")),onChange:m=>(wn().f[26]++,wn().s[53]++,this.changeProjectionType(m))}),ie.jsx(S4,{label:o.maputnik.style_renderer.label,fieldSpec:o.maputnik.style_renderer,"data-wd-key":"modal:settings.maputnik:renderer",options:[["mlgljs","MapLibreGL JS"],["ol",t("Open Layers (experimental)")]],value:(wn().b[12][0]++,e["maputnik:renderer"]||(wn().b[12][1]++,"mlgljs")),onChange:m=>(wn().f[27]++,wn().s[54]++,i("maputnik:renderer",m))})]})})}}const IDe=(wn().s[55]++,Jo()(BDe));var gw={exports:{}},kDe=gw.exports,TV;function TDe(){return TV||(TV=1,(function(n,e){(function(t,i,r){n.exports=r(),n.exports.default=r()})("slugify",kDe,function(){var t=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","":"-","":"'","":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),i=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function r(o,s){if(typeof o!="string")throw new Error("slugify: string argument expected");s=typeof s=="string"?{replacement:s}:s||{};var a=i[s.locale]||{},c=s.replacement===void 0?"-":s.replacement,A=s.trim===void 0?!0:s.trim,m=o.normalize().split("").reduce(function(v,x){var _=a[x];return _===void 0&&(_=t[x]),_===void 0&&(_=x),_===c&&(_=" "),v+_.replace(s.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return s.strict&&(m=m.replace(/[^A-Za-z0-9\s]/g,"")),A&&(m=m.trim()),m=m.replace(/\s+/g,c),s.lower&&(m=m.toLowerCase()),m}return r.extend=function(o){Object.assign(t,o)},r})})(gw)),gw.exports}var RDe=TDe();const DDe=Wl(RDe);var yw={exports:{}},PDe=yw.exports,RV;function UDe(){return RV||(RV=1,(function(n,e){(function(t,i){i()})(PDe,function(){function t(A,m){return typeof m>"u"?m={autoBom:!1}:typeof m!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),m={autoBom:!m}),m.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(A.type)?new Blob(["\uFEFF",A],{type:A.type}):A}function i(A,m,v){var x=new XMLHttpRequest;x.open("GET",A),x.responseType="blob",x.onload=function(){c(x.response,m,v)},x.onerror=function(){console.error("could not download file")},x.send()}function r(A){var m=new XMLHttpRequest;m.open("HEAD",A,!1);try{m.send()}catch{}return 200<=m.status&&299>=m.status}function o(A){try{A.dispatchEvent(new MouseEvent("click"))}catch{var m=document.createEvent("MouseEvents");m.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),A.dispatchEvent(m)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof window=="object"&&window.global===window?window:void 0,a=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(A,m,v){var x=s.URL||s.webkitURL,_=document.createElement("a");m=m||A.name||"download",_.download=m,_.rel="noopener",typeof A=="string"?(_.href=A,_.origin===location.origin?o(_):r(_.href)?i(A,m,v):o(_,_.target="_blank")):(_.href=x.createObjectURL(A),setTimeout(function(){x.revokeObjectURL(_.href)},4e4),setTimeout(function(){o(_)},0))}:"msSaveOrOpenBlob"in navigator?function(A,m,v){if(m=m||A.name||"download",typeof A!="string")navigator.msSaveOrOpenBlob(t(A,v),m);else if(r(A))i(A,m,v);else{var x=document.createElement("a");x.href=A,x.target="_blank",setTimeout(function(){o(x)})}}:function(A,m,v,x){if(x=x||open("","_blank"),x&&(x.document.title=x.document.body.innerText="downloading..."),typeof A=="string")return i(A,m,v);var _=A.type==="application/octet-stream",O=/constructor/i.test(s.HTMLElement)||s.safari,P=/CriOS\/[\d]+/.test(navigator.userAgent);if((P||_&&O||a)&&typeof FileReader<"u"){var F=new FileReader;F.onloadend=function(){var V=F.result;V=P?V:V.replace(/^data:[^;]*;/,"data:attachment/file;"),x?x.location.href=V:location=V,x=null},F.readAsDataURL(A)}else{var j=s.URL||s.webkitURL,Q=j.createObjectURL(A);x?x.location=Q:location.href=Q,x=null,setTimeout(function(){j.revokeObjectURL(Q)},4e4)}});s.saveAs=c.saveAs=c,n.exports=c})})(yw)),yw.exports}var DV=UDe();const KDe="5.7.2",LDe="get_your_own_OpIi9ZULNHzrESv6T2vL",FDe="b71f7f0ba4064f5eb9e903859a9cf5c6",zDe="pk.put_your_api_key_here7bb23dffeb4",Qse={openmaptiles:LDe,thunderforest:FDe,locationiq:zDe};function Mn(){var n="/home/runner/work/maputnik/maputnik/src/libs/style.ts",e="16e079a55cdd4175ffeada8708d6c49d219f1229",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/style.ts",statementMap:{0:{start:{line:3,column:19},end:{line:7,column:2}},1:{start:{line:9,column:2},end:{line:9,column:52}},2:{start:{line:12,column:2},end:{line:14,column:3}},3:{start:{line:13,column:4},end:{line:13,column:28}},4:{start:{line:15,column:2},end:{line:15,column:15}},5:{start:{line:18,column:24},end:{line:22,column:4}},6:{start:{line:19,column:25},end:{line:19,column:37}},7:{start:{line:20,column:4},end:{line:20,column:36}},8:{start:{line:21,column:4},end:{line:21,column:24}},9:{start:{line:23,column:2},end:{line:26,column:4}},10:{start:{line:29,column:2},end:{line:32,column:4}},11:{start:{line:35,column:2},end:{line:35,column:69}},12:{start:{line:38,column:2},end:{line:42,column:3}},13:{start:{line:38,column:15},end:{line:38,column:16}},14:{start:{line:39,column:4},end:{line:41,column:5}},15:{start:{line:40,column:6},end:{line:40,column:15}},16:{start:{line:43,column:2},end:{line:43,column:14}},17:{start:{line:46,column:19},end:{line:46,column:42}},18:{start:{line:47,column:20},end:{line:47,column:67}},19:{start:{line:48,column:2},end:{line:50,column:3}},20:{start:{line:49,column:4},end:{line:49,column:37}},21:{start:{line:51,column:2},end:{line:51,column:21}},22:{start:{line:54,column:17},end:{line:54,column:45}},23:{start:{line:55,column:2},end:{line:55,column:31}},24:{start:{line:55,column:15},end:{line:55,column:31}},25:{start:{line:56,column:2},end:{line:56,column:57}},26:{start:{line:56,column:41},end:{line:56,column:57}},27:{start:{line:57,column:23},end:{line:57,column:33}},28:{start:{line:58,column:2},end:{line:64,column:3}},29:{start:{line:59,column:4},end:{line:59,column:37}},30:{start:{line:60,column:9},end:{line:64,column:3}},31:{start:{line:61,column:4},end:{line:61,column:30}},32:{start:{line:62,column:9},end:{line:64,column:3}},33:{start:{line:63,column:4},end:{line:63,column:34}},34:{start:{line:65,column:22},end:{line:65,column:68}},35:{start:{line:66,column:2},end:{line:68,column:3}},36:{start:{line:67,column:4},end:{line:67,column:20}},37:{start:{line:70,column:2},end:{line:74,column:3}},38:{start:{line:71,column:4},end:{line:71,column:55}},39:{start:{line:73,column:4},end:{line:73,column:57}},40:{start:{line:75,column:25},end:{line:81,column:3}},41:{start:{line:82,column:23},end:{line:85,column:3}},42:{start:{line:86,column:2},end:{line:86,column:22}},43:{start:{line:89,column:21},end:{line:89,column:29}},44:{start:{line:90,column:2},end:{line:92,column:5}},45:{start:{line:91,column:4},end:{line:91,column:76}},46:{start:{line:93,column:2},end:{line:101,column:3}},47:{start:{line:94,column:27},end:{line:94,column:73}},48:{start:{line:95,column:4},end:{line:100,column:5}},49:{start:{line:96,column:6},end:{line:99,column:8}},50:{start:{line:102,column:2},end:{line:102,column:22}},51:{start:{line:105,column:26},end:{line:107,column:3}},52:{start:{line:108,column:2},end:{line:108,column:63}},53:{start:{line:109,column:2},end:{line:109,column:64}},54:{start:{line:110,column:2},end:{line:110,column:57}},55:{start:{line:111,column:2},end:{line:111,column:61}},56:{start:{line:112,column:2},end:{line:115,column:4}}},fnMap:{0:{name:"generateId",decl:{start:{line:8,column:9},end:{line:8,column:19}},loc:{start:{line:8,column:22},end:{line:10,column:1}},line:8},1:{name:"ensureHasId",decl:{start:{line:11,column:9},end:{line:11,column:20}},loc:{start:{line:11,column:28},end:{line:16,column:1}},line:11},2:{name:"ensureHasNoInteractive",decl:{start:{line:17,column:9},end:{line:17,column:31}},loc:{start:{line:17,column:39},end:{line:27,column:1}},line:17},3:{name:"(anonymous_3)",decl:{start:{line:18,column:41},end:{line:18,column:42}},loc:{start:{line:18,column:52},end:{line:22,column:3}},line:18},4:{name:"ensureHasNoRefs",decl:{start:{line:28,column:9},end:{line:28,column:24}},loc:{start:{line:28,column:32},end:{line:33,column:1}},line:28},5:{name:"ensureStyleValidity",decl:{start:{line:34,column:9},end:{line:34,column:28}},loc:{start:{line:34,column:36},end:{line:36,column:1}},line:34},6:{name:"indexOfLayer",decl:{start:{line:37,column:9},end:{line:37,column:21}},loc:{start:{line:37,column:39},end:{line:44,column:1}},line:37},7:{name:"getAccessToken",decl:{start:{line:45,column:9},end:{line:45,column:23}},loc:{start:{line:45,column:52},end:{line:52,column:1}},line:45},8:{name:"replaceSourceAccessToken",decl:{start:{line:53,column:9},end:{line:53,column:33}},loc:{start:{line:53,column:67},end:{line:87,column:1}},line:53},9:{name:"replaceAccessTokens",decl:{start:{line:88,column:9},end:{line:88,column:28}},loc:{start:{line:88,column:50},end:{line:103,column:1}},line:88},10:{name:"(anonymous_10)",decl:{start:{line:90,column:40},end:{line:90,column:41}},loc:{start:{line:90,column:56},end:{line:92,column:3}},line:90},11:{name:"stripAccessTokens",decl:{start:{line:104,column:9},end:{line:104,column:26}},loc:{start:{line:104,column:37},end:{line:116,column:1}},line:104}},branchMap:{0:{loc:{start:{line:12,column:2},end:{line:14,column:3}},type:"if",locations:[{start:{line:12,column:2},end:{line:14,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:12},1:{loc:{start:{line:12,column:6},end:{line:12,column:35}},type:"binary-expr",locations:[{start:{line:12,column:6},end:{line:12,column:22}},{start:{line:12,column:26},end:{line:12,column:35}}],line:12},2:{loc:{start:{line:39,column:4},end:{line:41,column:5}},type:"if",locations:[{start:{line:39,column:4},end:{line:41,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:39},3:{loc:{start:{line:46,column:19},end:{line:46,column:42}},type:"binary-expr",locations:[{start:{line:46,column:19},end:{line:46,column:36}},{start:{line:46,column:40},end:{line:46,column:42}}],line:46},4:{loc:{start:{line:48,column:2},end:{line:50,column:3}},type:"if",locations:[{start:{line:48,column:2},end:{line:50,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:48},5:{loc:{start:{line:48,column:6},end:{line:48,column:40}},type:"binary-expr",locations:[{start:{line:48,column:6},end:{line:48,column:24}},{start:{line:48,column:28},end:{line:48,column:40}}],line:48},6:{loc:{start:{line:53,column:56},end:{line:53,column:65}},type:"default-arg",locations:[{start:{line:53,column:63},end:{line:53,column:65}}],line:53},7:{loc:{start:{line:55,column:2},end:{line:55,column:31}},type:"if",locations:[{start:{line:55,column:2},end:{line:55,column:31}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:55},8:{loc:{start:{line:56,column:2},end:{line:56,column:57}},type:"if",locations:[{start:{line:56,column:2},end:{line:56,column:57}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:56},9:{loc:{start:{line:56,column:6},end:{line:56,column:39}},type:"binary-expr",locations:[{start:{line:56,column:6},end:{line:56,column:24}},{start:{line:56,column:28},end:{line:56,column:39}}],line:56},10:{loc:{start:{line:58,column:2},end:{line:64,column:3}},type:"if",locations:[{start:{line:58,column:2},end:{line:64,column:3}},{start:{line:60,column:9},end:{line:64,column:3}}],line:58},11:{loc:{start:{line:58,column:6},end:{line:58,column:89}},type:"binary-expr",locations:[{start:{line:58,column:6},end:{line:58,column:46}},{start:{line:58,column:50},end:{line:58,column:89}}],line:58},12:{loc:{start:{line:60,column:9},end:{line:64,column:3}},type:"if",locations:[{start:{line:60,column:9},end:{line:64,column:3}},{start:{line:62,column:9},end:{line:64,column:3}}],line:60},13:{loc:{start:{line:60,column:13},end:{line:60,column:70}},type:"binary-expr",locations:[{start:{line:60,column:13},end:{line:60,column:28}},{start:{line:60,column:32},end:{line:60,column:70}}],line:60},14:{loc:{start:{line:62,column:9},end:{line:64,column:3}},type:"if",locations:[{start:{line:62,column:9},end:{line:64,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:62},15:{loc:{start:{line:62,column:13},end:{line:62,column:70}},type:"binary-expr",locations:[{start:{line:62,column:13},end:{line:62,column:28}},{start:{line:62,column:32},end:{line:62,column:70}}],line:62},16:{loc:{start:{line:66,column:2},end:{line:68,column:3}},type:"if",locations:[{start:{line:66,column:2},end:{line:68,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:66},17:{loc:{start:{line:70,column:2},end:{line:74,column:3}},type:"if",locations:[{start:{line:70,column:2},end:{line:74,column:3}},{start:{line:72,column:9},end:{line:74,column:3}}],line:70},18:{loc:{start:{line:88,column:39},end:{line:88,column:48}},type:"default-arg",locations:[{start:{line:88,column:46},end:{line:88,column:48}}],line:88},19:{loc:{start:{line:93,column:2},end:{line:101,column:3}},type:"if",locations:[{start:{line:93,column:2},end:{line:101,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:93},20:{loc:{start:{line:93,column:6},end:{line:93,column:114}},type:"binary-expr",locations:[{start:{line:93,column:6},end:{line:93,column:21}},{start:{line:93,column:26},end:{line:93,column:69}},{start:{line:93,column:73},end:{line:93,column:113}}],line:93},21:{loc:{start:{line:95,column:4},end:{line:100,column:5}},type:"if",locations:[{start:{line:95,column:4},end:{line:100,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:95}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0],19:[0,0],20:[0,0,0],21:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/style.ts"],names:[],mappings:"AAAA,SAAQ,mBAAkB;AAE1B,OAAO,YAAY;AAInB,MAAM,aAAa,oBAAoB;AAAA,EACrC,SAAS;AAAA,EACT,SAAS,CAAC;AAAA,EACV,QAAQ,CAAC;AACX,CAAC;AAED,SAAS,aAAa;AACpB,SAAO,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,GAAG,CAAC;AAClD;AAEA,SAAS,YAAY,OAAuE;AAC1F,MAAG,EAAE,QAAQ,UAAU,CAAC,MAAM,IAAI;AAChC,UAAM,KAAK,WAAW;AAAA,EACxB;AACA,SAAO;AACT;AAEA,SAAS,uBAAuB,OAAiC;AAC/D,QAAM,gBAAgB,MAAM,OAAO,IAAI,WAAS;AAC9C,UAAM,eAA2D,EAAE,GAAG,MAAM;AAC5E,WAAO,aAAa;AACpB,WAAO;AAAA,EACT,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ;AAAA,EACV;AACF;AAEA,SAAS,gBAAgB,OAAiC;AACxD,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ,YAAY,MAAM,MAAM;AAAA,EAClC;AACF;AAEA,SAAS,oBAAoB,OAAqD;AAChF,SAAO,uBAAuB,gBAAgB,YAAY,KAAK,CAAC,CAAC;AACnE;AAEA,SAAS,aAAa,QAA8B,SAAiB;AACnE,WAAS,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;AACtC,QAAG,OAAO,CAAC,EAAE,OAAO,SAAS;AAC3B,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,eAAe,YAAoB,UAA8B,MAAiC;AACzG,QAAM,WAAW,SAAS,YAAY,CAAC;AACvC,MAAI,cAAc,SAAS,YAAY,UAAU,eAAe;AAEhE,MAAG,KAAK,iBAAiB,CAAC,aAAa;AACrC,kBAAc,OAAO,UAAiC;AAAA,EACxD;AAEA,SAAO;AACT;AAEA,SAAS,yBAAyB,UAA8B,YAAoB,OAAK,CAAC,GAAG;AAC3F,QAAM,SAAS,SAAS,QAAQ,UAAU;AAC1C,MAAG,CAAC,OAAQ,QAAO;AACnB,MAAG,EAAE,SAAS,WAAW,CAAC,OAAO,IAAK,QAAO;AAE7C,MAAI,iBAAiB;AACrB,MAAG,eAAe,6BAA6B,eAAe,0BAA0B;AACtF,qBAAiB;AAAA,EACnB,WACU,SAAS,UAAW,OAAO,KAAK,MAAM,mBAAmB,GAAG;AAGpE,qBAAiB;AAAA,EACnB,WACU,SAAS,UAAW,OAAO,KAAK,MAAM,mBAAmB,GAAG;AACpE,qBAAiB;AAAA,EACnB;AAEA,QAAM,cAAc,eAAe,gBAAgB,UAAU,IAAI;AAEjE,MAAG,CAAC,aAAa;AAEf,WAAO;AAAA,EACT;AAEA,MAAI;AACJ,MAAI,kBAAkB,UAAU;AAI9B,gBAAY,GAAG,OAAO,GAAG,YAAY,WAAW;AAAA,EAClD,OAAO;AACL,gBAAY,OAAO,IAAI,QAAQ,SAAS,WAAW;AAAA,EACrD;AAEA,QAAM,iBAAiB;AAAA,IACrB,GAAG,SAAS;AAAA,IACZ,CAAC,UAAU,GAAG;AAAA,MACZ,GAAG;AAAA,MACH,KAAK;AAAA,IACP;AAAA,EACF;AACA,QAAM,eAAe;AAAA,IACnB,GAAG;AAAA,IACH,SAAS;AAAA,EACX;AACA,SAAO;AACT;AAEA,SAAS,oBAAoB,UAA8B,OAAK,CAAC,GAAG;AAClE,MAAI,eAAe;AAEnB,SAAO,KAAK,SAAS,OAAO,EAAE,QAAQ,CAAC,eAAe;AACpD,mBAAe,yBAAyB,cAAc,YAAY,IAAI;AAAA,EACxE,CAAC;AAED,MAAI,SAAS,WAAW,SAAS,OAAO,MAAM,oBAAoB,KAAK,SAAS,OAAO,MAAM,iBAAiB,IAAI;AAChH,UAAM,iBAAiB,eAAe,gBAAgB,UAAU,IAAI;AACpE,QAAI,gBAAgB;AAClB,qBAAe;AAAA,QACb,GAAG;AAAA,QACH,QAAQ,SAAS,OAAO,QAAQ,SAAS,cAAc;AAAA,MACzD;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEA,SAAS,kBAAkB,UAA8B;AACvD,QAAM,kBAAkB;AAAA,IACtB,GAAG,SAAS;AAAA,EACd;AACA,SAAO,gBAAgB,oCAAoC;AAC3D,SAAO,gBAAgB,qCAAqC;AAC5D,SAAO,gBAAgB,8BAA8B;AACrD,SAAO,gBAAgB,kCAAkC;AACzD,SAAO;AAAA,IACL,GAAG;AAAA,IACH,UAAU;AAAA,EACZ;AACF;AAEA,eAAe;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"16e079a55cdd4175ffeada8708d6c49d219f1229"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Mn=function(){return s},s}Mn();const jDe=(Mn().s[0]++,Yse({version:8,sources:{},layers:[]}));function qse(){return Mn().f[0]++,Mn().s[1]++,Math.random().toString(36).substring(2,9)}function NDe(n){return Mn().f[1]++,Mn().s[2]++,Mn().b[1][0]++,!("id"in n)||(Mn().b[1][1]++,!n.id)?(Mn().b[0][0]++,Mn().s[3]++,n.id=qse()):Mn().b[0][1]++,Mn().s[4]++,n}function GDe(n){Mn().f[2]++;const e=(Mn().s[5]++,n.layers.map(t=>{Mn().f[3]++;const i=(Mn().s[6]++,{...t});return Mn().s[7]++,delete i.interactive,Mn().s[8]++,i}));return Mn().s[9]++,{...n,layers:e}}function WDe(n){return Mn().f[4]++,Mn().s[10]++,{...n,layers:zce(n.layers)}}function Yse(n){return Mn().f[5]++,Mn().s[11]++,GDe(WDe(NDe(n)))}function QDe(n,e){Mn().f[6]++,Mn().s[12]++;for(let t=(Mn().s[13]++,0);t<n.length;t++){if(Mn().s[14]++,n[t].id===e)return Mn().b[2][0]++,Mn().s[15]++,t;Mn().b[2][1]++}return Mn().s[16]++,null}function vL(n,e,t){Mn().f[7]++;const i=(Mn().s[17]++,Mn().b[3][0]++,e.metadata||(Mn().b[3][1]++,{}));let r=(Mn().s[18]++,i[`maputnik:${n}_access_token`]);return Mn().s[19]++,Mn().b[5][0]++,t.allowFallback&&(Mn().b[5][1]++,!r)?(Mn().b[4][0]++,Mn().s[20]++,r=Qse[n]):Mn().b[4][1]++,Mn().s[21]++,r}function qDe(n,e,t=(Mn().b[6][0]++,{})){Mn().f[8]++;const i=(Mn().s[22]++,n.sources[e]);if(Mn().s[23]++,i)Mn().b[7][1]++;else return Mn().b[7][0]++,Mn().s[24]++,n;if(Mn().s[25]++,Mn().b[9][0]++,!("url"in i)||(Mn().b[9][1]++,!i.url))return Mn().b[8][0]++,Mn().s[26]++,n;Mn().b[8][1]++;let r=(Mn().s[27]++,e);Mn().s[28]++,Mn().b[11][0]++,e==="thunderforest_transport"||(Mn().b[11][1]++,e==="thunderforest_outdoors")?(Mn().b[10][0]++,Mn().s[29]++,r="thunderforest"):(Mn().b[10][1]++,Mn().s[30]++,Mn().b[13][0]++,"url"in i&&(Mn().b[13][1]++,i.url?.match(/\.stadiamaps\.com/))?(Mn().b[12][0]++,Mn().s[31]++,r="stadia"):(Mn().b[12][1]++,Mn().s[32]++,Mn().b[15][0]++,"url"in i&&(Mn().b[15][1]++,i.url?.match(/\.locationiq\.com/))?(Mn().b[14][0]++,Mn().s[33]++,r="locationiq"):Mn().b[14][1]++));const o=(Mn().s[34]++,vL(r,n,t));if(Mn().s[35]++,o)Mn().b[16][1]++;else return Mn().b[16][0]++,Mn().s[36]++,n;let s;Mn().s[37]++,r=="stadia"?(Mn().b[17][0]++,Mn().s[38]++,s=`${i.url}?api_key=${o}`):(Mn().b[17][1]++,Mn().s[39]++,s=i.url.replace("{key}",o));const a=(Mn().s[40]++,{...n.sources,[e]:{...i,url:s}}),c=(Mn().s[41]++,{...n,sources:a});return Mn().s[42]++,c}function YDe(n,e=(Mn().b[18][0]++,{})){Mn().f[9]++;let t=(Mn().s[43]++,n);if(Mn().s[44]++,Object.keys(n.sources).forEach(i=>{Mn().f[10]++,Mn().s[45]++,t=qDe(t,i,e)}),Mn().s[46]++,Mn().b[20][0]++,n.glyphs&&(Mn().b[20][1]++,n.glyphs.match(/\.tilehosting\.com/)||(Mn().b[20][2]++,n.glyphs.match(/\.maptiler\.com/)))){Mn().b[19][0]++;const i=(Mn().s[47]++,vL("openmaptiles",n,e));Mn().s[48]++,i?(Mn().b[21][0]++,Mn().s[49]++,t={...t,glyphs:n.glyphs.replace("{key}",i)}):Mn().b[21][1]++}else Mn().b[19][1]++;return Mn().s[50]++,t}function $De(n){Mn().f[11]++;const e=(Mn().s[51]++,{...n.metadata});return Mn().s[52]++,delete e["maputnik:openmaptiles_access_token"],Mn().s[53]++,delete e["maputnik:thunderforest_access_token"],Mn().s[54]++,delete e["maputnik:stadia_access_token"],Mn().s[55]++,delete e["maputnik:locationiq_access_token"],Mn().s[56]++,{...n,metadata:e}}const id={ensureStyleValidity:Yse,emptyStyle:jDe,indexOfLayer:QDe,generateId:qse,getAccessToken:vL,replaceAccessTokens:YDe,stripAccessTokens:$De};function ci(){var n="/home/runner/work/maputnik/maputnik/src/components/modals/ModalExport.tsx",e="0479ae849bf143a83f826f9fdcad7b323ec1b109",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/modals/ModalExport.tsx",statementMap:{0:{start:{line:14,column:28},end:{line:14,column:35}},1:{start:{line:15,column:36},end:{line:15,column:83}},2:{start:{line:18,column:4},end:{line:22,column:6}},3:{start:{line:25,column:4},end:{line:33,column:5}},4:{start:{line:26,column:6},end:{line:30,column:9}},5:{start:{line:32,column:6},end:{line:32,column:36}},6:{start:{line:36,column:23},end:{line:36,column:44}},7:{start:{line:37,column:22},end:{line:37,column:69}},8:{start:{line:38,column:17},end:{line:62,column:1}},9:{start:{line:63,column:17},end:{line:63,column:70}},10:{start:{line:64,column:23},end:{line:64,column:40}},11:{start:{line:65,column:4},end:{line:65,column:39}},12:{start:{line:68,column:23},end:{line:68,column:44}},13:{start:{line:69,column:4},end:{line:74,column:5}},14:{start:{line:70,column:19},end:{line:70,column:85}},15:{start:{line:71,column:25},end:{line:71,column:42}},16:{start:{line:72,column:6},end:{line:72,column:41}},17:{start:{line:73,column:6},end:{line:73,column:13}},18:{start:{line:75,column:21},end:{line:75,column:42}},19:{start:{line:76,column:4},end:{line:80,column:5}},20:{start:{line:77,column:6},end:{line:77,column:49}},21:{start:{line:78,column:6},end:{line:78,column:45}},22:{start:{line:79,column:6},end:{line:79,column:37}},23:{start:{line:79,column:30},end:{line:79,column:37}},24:{start:{line:81,column:21},end:{line:81,column:54}},25:{start:{line:82,column:4},end:{line:82,column:37}},26:{start:{line:83,column:4},end:{line:83,column:27}},27:{start:{line:84,column:4},end:{line:84,column:30}},28:{start:{line:87,column:23},end:{line:87,column:44}},29:{start:{line:88,column:23},end:{line:88,column:52}},30:{start:{line:89,column:4},end:{line:89,column:43}},31:{start:{line:90,column:4},end:{line:90,column:35}},32:{start:{line:90,column:28},end:{line:90,column:35}},33:{start:{line:91,column:21},end:{line:91,column:54}},34:{start:{line:92,column:4},end:{line:92,column:37}},35:{start:{line:93,column:4},end:{line:93,column:27}},36:{start:{line:94,column:4},end:{line:94,column:30}},37:{start:{line:97,column:23},end:{line:105,column:5}},38:{start:{line:106,column:23},end:{line:106,column:66}},39:{start:{line:107,column:4},end:{line:107,column:43}},40:{start:{line:108,column:4},end:{line:108,column:22}},41:{start:{line:111,column:25},end:{line:117,column:5}},42:{start:{line:118,column:4},end:{line:118,column:44}},43:{start:{line:121,column:14},end:{line:121,column:26}},44:{start:{line:122,column:16},end:{line:122,column:38}},45:{start:{line:123,column:4},end:{line:188,column:6}},46:{start:{line:191,column:20},end:{line:191,column:58}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:17,column:2},end:{line:17,column:3}},loc:{start:{line:17,column:19},end:{line:23,column:3}},line:17},1:{name:"(anonymous_1)",decl:{start:{line:24,column:2},end:{line:24,column:3}},loc:{start:{line:24,column:15},end:{line:34,column:3}},line:24},2:{name:"(anonymous_2)",decl:{start:{line:35,column:2},end:{line:35,column:3}},loc:{start:{line:35,column:15},end:{line:66,column:3}},line:35},3:{name:"(anonymous_3)",decl:{start:{line:67,column:2},end:{line:67,column:3}},loc:{start:{line:67,column:20},end:{line:85,column:3}},line:67},4:{name:"(anonymous_4)",decl:{start:{line:86,column:2},end:{line:86,column:3}},loc:{start:{line:86,column:22},end:{line:95,column:3}},line:86},5:{name:"(anonymous_5)",decl:{start:{line:96,column:2},end:{line:96,column:3}},loc:{start:{line:96,column:27},end:{line:109,column:3}},line:96},6:{name:"(anonymous_6)",decl:{start:{line:110,column:2},end:{line:110,column:3}},loc:{start:{line:110,column:42},end:{line:119,column:3}},line:110},7:{name:"(anonymous_7)",decl:{start:{line:120,column:2},end:{line:120,column:3}},loc:{start:{line:120,column:11},end:{line:189,column:3}},line:120}},branchMap:{0:{loc:{start:{line:25,column:4},end:{line:33,column:5}},type:"if",locations:[{start:{line:25,column:4},end:{line:33,column:5}},{start:{line:31,column:11},end:{line:33,column:5}}],line:25},1:{loc:{start:{line:37,column:22},end:{line:37,column:69}},type:"binary-expr",locations:[{start:{line:37,column:22},end:{line:37,column:46}},{start:{line:37,column:50},end:{line:37,column:69}}],line:37},2:{loc:{start:{line:69,column:4},end:{line:74,column:5}},type:"if",locations:[{start:{line:69,column:4},end:{line:74,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:69},3:{loc:{start:{line:76,column:4},end:{line:80,column:5}},type:"if",locations:[{start:{line:76,column:4},end:{line:80,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:76},4:{loc:{start:{line:79,column:6},end:{line:79,column:37}},type:"if",locations:[{start:{line:79,column:6},end:{line:79,column:37}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:79},5:{loc:{start:{line:90,column:4},end:{line:90,column:35}},type:"if",locations:[{start:{line:90,column:4},end:{line:90,column:35}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:90},6:{loc:{start:{line:140,column:24},end:{line:140,column:58}},type:"binary-expr",locations:[{start:{line:140,column:24},end:{line:140,column:52}},{start:{line:140,column:56},end:{line:140,column:58}}],line:140},7:{loc:{start:{line:149,column:24},end:{line:149,column:58}},type:"binary-expr",locations:[{start:{line:149,column:24},end:{line:149,column:52}},{start:{line:149,column:56},end:{line:149,column:58}}],line:149},8:{loc:{start:{line:158,column:24},end:{line:158,column:58}},type:"binary-expr",locations:[{start:{line:158,column:24},end:{line:158,column:52}},{start:{line:158,column:56},end:{line:158,column:58}}],line:158},9:{loc:{start:{line:167,column:24},end:{line:167,column:58}},type:"binary-expr",locations:[{start:{line:167,column:24},end:{line:167,column:52}},{start:{line:167,column:56},end:{line:167,column:58}}],line:167},10:{loc:{start:{line:177,column:12},end:{line:180,column:16}},type:"binary-expr",locations:[{start:{line:177,column:12},end:{line:177,column:39}},{start:{line:177,column:59},end:{line:180,column:16}}],line:177}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/modals/ModalExport.tsx"],names:[],mappings:"AAoKQ,cAKA,YALA;AApKR,OAAO,WAAW;AAClB,OAAO,aAAa;AACpB,SAAQ,cAAa;AACrB,SAAQ,eAAc;AACtB,SAAQ,cAAa;AACrB,SAAQ,OAAO,cAAa;AAC5B,SAA8B,uBAAsB;AAEpD,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,yBAAyB;AAIhC,MAAM,sBAAsB;AAC5B,MAAM,8BAA8B,OAAO,OAAO,uBAAuB;AAazE,MAAM,4BAA4B,MAAM,UAAoC;AAAA,EAE1E,iBAAiB;AACf,WAAO;AAAA,MACL,MAAM;AAAA,QACJ,MAAM,oBAAoB,KAAK,MAAM,QAAQ;AAAA,MAC/C;AAAA,IACF;AAAA,EACF;AAAA,EAEA,aAAa;AACX,QAAI,KAAK,MAAM,SAAS,MAAM;AAC5B,aAAO,QAAQ,KAAK,MAAM,SAAS,MAAM;AAAA,QACvC,aAAa;AAAA,QACb,QAAQ;AAAA,QACR,OAAO;AAAA,MACT,CAAC;AAAA,IACH,OAAO;AACL,aAAO,KAAK,MAAM,SAAS;AAAA,IAC7B;AAAA,EACF;AAAA,EAEA,aAAa;AACX,UAAM,aAAa,KAAK,eAAe;AACvC,UAAM,YAAY,KAAK,MAAM,SAAS,QAAQ,KAAK,MAAM,EAAE,KAAK;AAChE,UAAM,OAAO;AAAA;AAAA;AAAA;AAAA,WAIN,SAAS;AAAA;AAAA,+CAE2B,mBAAmB;AAAA,8CACpB,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAW/C,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQxB,UAAM,OAAO,IAAI,KAAK,CAAC,IAAI,GAAG,EAAC,MAAM,0BAAyB,CAAC;AAC/D,UAAM,aAAa,KAAK,WAAW;AACnC,WAAO,MAAM,aAAa,OAAO;AAAA,EACnC;AAAA,EAEA,MAAM,YAAY;AAChB,UAAM,aAAa,KAAK,eAAe;AAIvC,QAAI,CAAC,6BAA6B;AAChC,YAAM,OAAO,IAAI,KAAK,CAAC,UAAU,GAAG,EAAC,MAAM,iCAAgC,CAAC;AAC5E,YAAM,aAAa,KAAK,WAAW;AACnC,aAAO,MAAM,aAAa,OAAO;AACjC;AAAA,IACF;AAEA,QAAI,aAAa,KAAK,MAAM;AAC5B,QAAI,cAAc,MAAM;AACtB,mBAAa,MAAM,KAAK,iBAAiB;AACzC,WAAK,MAAM,gBAAgB,UAAU;AACrC,UAAI,cAAc,KAAM;AAAA,IAC1B;AAEA,UAAM,WAAW,MAAM,WAAW,eAAe;AACjD,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM;AACrB,SAAK,MAAM,aAAa;AAAA,EAC1B;AAAA,EAEA,MAAM,cAAc;AAClB,UAAM,aAAa,KAAK,eAAe;AAEvC,UAAM,aAAa,MAAM,KAAK,iBAAiB;AAC/C,SAAK,MAAM,gBAAgB,UAAU;AACrC,QAAI,cAAc,KAAM;AAExB,UAAM,WAAW,MAAM,WAAW,eAAe;AACjD,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM;AACrB,SAAK,MAAM,aAAa;AAAA,EAC1B;AAAA,EAEA,MAAM,mBAAyD;AAC7D,UAAM,aAAoC;AAAA,MACxC,OAAO;AAAA,QACL;AAAA,UACE,aAAa;AAAA,UACb,QAAQ,EAAC,oBAAoB,CAAC,OAAO,EAAC;AAAA,QACxC;AAAA,MACF;AAAA,MACA,eAAe,KAAK,WAAW;AAAA,IACjC;AAEA,UAAM,aAAa,MAAM,OAAO,mBAAmB,UAAU;AAC7D,SAAK,MAAM,gBAAgB,UAAU;AACrC,WAAO;AAAA,EACT;AAAA,EAEA,uBAAuB,UAAkB,OAAY;AACnD,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,UAAU;AAAA,QACR,GAAG,KAAK,MAAM,SAAS;AAAA,QACvB,CAAC,QAAQ,GAAG;AAAA,MACd;AAAA,IACF;AACA,SAAK,MAAM,eAAe,YAAY;AAAA,EACxC;AAAA,EAGA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,MAAM,oBAAoB,CAAC;AACjC,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,YAAY;AAAA,QACrB,WAAU;AAAA,QAGV,+BAAC,aAAQ,WAAU,0BACjB;AAAA,8BAAC,QAAI,YAAE,YAAY,GAAE;AAAA,UACrB,oBAAC,OACE,YAAE,uCAAuC,GAC5C;AAAA,UAEA,qBAAC,SACC;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,IAAI,SAAS,sBAAsB;AAAA,gBAC1C,WAAW,IAAI,SAAS;AAAA,gBACxB,QAAQ,KAAK,MAAM,SAAS,YAAY,CAAC,GAAU,oCAAoC;AAAA,gBACvF,UAAU,KAAK,uBAAuB,KAAK,MAAM,oCAAoC;AAAA;AAAA,YACvF;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,IAAI,SAAS,2BAA2B;AAAA,gBAC/C,WAAW,IAAI,SAAS;AAAA,gBACxB,QAAQ,KAAK,MAAM,SAAS,YAAY,CAAC,GAAU,qCAAqC;AAAA,gBACxF,UAAU,KAAK,uBAAuB,KAAK,MAAM,qCAAqC;AAAA;AAAA,YACxF;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,IAAI,SAAS,oBAAoB;AAAA,gBACxC,WAAW,IAAI,SAAS;AAAA,gBACxB,QAAQ,KAAK,MAAM,SAAS,YAAY,CAAC,GAAU,8BAA8B;AAAA,gBACjF,UAAU,KAAK,uBAAuB,KAAK,MAAM,8BAA8B;AAAA;AAAA,YACjF;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,IAAI,SAAS,wBAAwB;AAAA,gBAC5C,WAAW,IAAI,SAAS;AAAA,gBACxB,QAAQ,KAAK,MAAM,SAAS,YAAY,CAAC,GAAU,kCAAkC;AAAA,gBACrF,UAAU,KAAK,uBAAuB,KAAK,MAAM,kCAAkC;AAAA;AAAA,YACrF;AAAA,aACF;AAAA,UAEA,qBAAC,SAAI,WAAU,iCACb;AAAA,iCAAC,eAAY,SAAS,KAAK,UAAU,KAAK,IAAI,GAC5C;AAAA,kCAAC,UAAM;AAAA,cACN,EAAE,MAAM;AAAA,eACX;AAAA,YACC,+BACC,qBAAC,eAAY,SAAS,KAAK,YAAY,KAAK,IAAI,GAC9C;AAAA,kCAAC,UAAM;AAAA,cACN,EAAE,SAAS;AAAA,eACd;AAAA,YAGF,qBAAC,eAAY,SAAS,KAAK,WAAW,KAAK,IAAI,GAC7C;AAAA,kCAAC,SAAK;AAAA,cACL,EAAE,aAAa;AAAA,eAClB;AAAA,aACF;AAAA,WACF;AAAA;AAAA,IAEF;AAAA,EACF;AACF;AAEA,MAAM,cAAc,gBAAgB,EAAE,mBAAmB;AACzD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"0479ae849bf143a83f826f9fdcad7b323ec1b109"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return ci=function(){return s},s}ci();const PV=(ci().s[0]++,KDe),UV=(ci().s[1]++,typeof window.showSaveFilePicker=="function");class VDe extends En.Component{tokenizedStyle(){return ci().f[0]++,ci().s[2]++,$he(id.stripAccessTokens(id.replaceAccessTokens(this.props.mapStyle)))}exportName(){return ci().f[1]++,ci().s[3]++,this.props.mapStyle.name?(ci().b[0][0]++,ci().s[4]++,DDe(this.props.mapStyle.name,{replacement:"_",remove:/[*\-+~.()'"!:]/g,lower:!0})):(ci().b[0][1]++,ci().s[5]++,this.props.mapStyle.id)}createHtml(){ci().f[2]++;const e=(ci().s[6]++,this.tokenizedStyle()),t=(ci().s[7]++,ci().b[1][0]++,this.props.mapStyle.name||(ci().b[1][1]++,this.props.t("Map"))),i=(ci().s[8]++,`<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${t}</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://unpkg.com/maplibre-gl@${PV}/dist/maplibre-gl.js"><\/script>
<link href="https://unpkg.com/maplibre-gl@${PV}/dist/maplibre-gl.css" rel="stylesheet" />
<style>
body { margin: 0; padding: 0; }
#map { position: absolute; top: 0; bottom: 0; width: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script>
const map = new maplibregl.Map({
container: 'map',
style: ${e},
});
map.addControl(new maplibregl.NavigationControl());
<\/script>
</body>
</html>
`),r=(ci().s[9]++,new Blob([i],{type:"text/html;charset=utf-8"})),o=(ci().s[10]++,this.exportName());ci().s[11]++,DV.saveAs(r,o+".html")}async saveStyle(){ci().f[3]++;const e=(ci().s[12]++,this.tokenizedStyle());if(ci().s[13]++,UV)ci().b[2][1]++;else{ci().b[2][0]++;const r=(ci().s[14]++,new Blob([e],{type:"application/json;charset=utf-8"})),o=(ci().s[15]++,this.exportName());ci().s[16]++,DV.saveAs(r,o+".json"),ci().s[17]++;return}let t=(ci().s[18]++,this.props.fileHandle);if(ci().s[19]++,t==null)if(ci().b[3][0]++,ci().s[20]++,t=await this.createFileHandle(),ci().s[21]++,this.props.onSetFileHandle(t),ci().s[22]++,t==null){ci().b[4][0]++,ci().s[23]++;return}else ci().b[4][1]++;else ci().b[3][1]++;const i=(ci().s[24]++,await t.createWritable());ci().s[25]++,await i.write(e),ci().s[26]++,await i.close(),ci().s[27]++,this.props.onOpenToggle()}async saveStyleAs(){ci().f[4]++;const e=(ci().s[28]++,this.tokenizedStyle()),t=(ci().s[29]++,await this.createFileHandle());if(ci().s[30]++,this.props.onSetFileHandle(t),ci().s[31]++,t==null){ci().b[5][0]++,ci().s[32]++;return}else ci().b[5][1]++;const i=(ci().s[33]++,await t.createWritable());ci().s[34]++,await i.write(e),ci().s[35]++,await i.close(),ci().s[36]++,this.props.onOpenToggle()}async createFileHandle(){ci().f[5]++;const e=(ci().s[37]++,{types:[{description:"json",accept:{"application/json":[".json"]}}],suggestedName:this.exportName()}),t=(ci().s[38]++,await window.showSaveFilePicker(e));return ci().s[39]++,this.props.onSetFileHandle(t),ci().s[40]++,t}changeMetadataProperty(e,t){ci().f[6]++;const i=(ci().s[41]++,{...this.props.mapStyle,metadata:{...this.props.mapStyle.metadata,[e]:t}});ci().s[42]++,this.props.onStyleChanged(i)}render(){ci().f[7]++;const e=(ci().s[43]++,this.props.t),t=(ci().s[44]++,Wse(e));return ci().s[45]++,ie.jsx(a1,{"data-wd-key":"modal:export",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Save Style"),className:"maputnik-export-modal",children:ie.jsxs("section",{className:"maputnik-modal-section",children:[ie.jsx("h1",{children:e("Save Style")}),ie.jsx("p",{children:e("Save the JSON style to your computer.")}),ie.jsxs("div",{children:[ie.jsx(qh,{label:t.maputnik.maptiler_access_token.label,fieldSpec:t.maputnik.maptiler_access_token,value:(ci().b[6][0]++,this.props.mapStyle.metadata||(ci().b[6][1]++,{}))["maputnik:openmaptiles_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:openmaptiles_access_token")}),ie.jsx(qh,{label:t.maputnik.thunderforest_access_token.label,fieldSpec:t.maputnik.thunderforest_access_token,value:(ci().b[7][0]++,this.props.mapStyle.metadata||(ci().b[7][1]++,{}))["maputnik:thunderforest_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:thunderforest_access_token")}),ie.jsx(qh,{label:t.maputnik.stadia_access_token.label,fieldSpec:t.maputnik.stadia_access_token,value:(ci().b[8][0]++,this.props.mapStyle.metadata||(ci().b[8][1]++,{}))["maputnik:stadia_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:stadia_access_token")}),ie.jsx(qh,{label:t.maputnik.locationiq_access_token.label,fieldSpec:t.maputnik.locationiq_access_token,value:(ci().b[9][0]++,this.props.mapStyle.metadata||(ci().b[9][1]++,{}))["maputnik:locationiq_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:locationiq_access_token")})]}),ie.jsxs("div",{className:"maputnik-modal-export-buttons",children:[ie.jsxs(Js,{onClick:this.saveStyle.bind(this),children:[ie.jsx(p9,{}),e("Save")]}),(ci().b[10][0]++,UV&&(ci().b[10][1]++,ie.jsxs(Js,{onClick:this.saveStyleAs.bind(this),children:[ie.jsx(p9,{}),e("Save as")]}))),ie.jsxs(Js,{onClick:this.createHtml.bind(this),children:[ie.jsx(Kfe,{}),e("Create HTML")]})]})]})})}}const HDe=(ci().s[46]++,Jo()(VDe));function I4(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx",e="d4204cb1114c57682afd09034f9cc8268e27db52",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx",statementMap:{0:{start:{line:4,column:26},end:{line:6,column:1}},1:{start:{line:5,column:2},end:{line:5,column:127}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:26},end:{line:4,column:27}},loc:{start:{line:4,column:37},end:{line:6,column:1}},line:4}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx"],names:[],mappings:"AAUM;AAVN,OAAO,uBAAsD;AAC7D,OAAO,cAAc;AAMrB,MAAM,oBAAsD,CAAC,UAAU;AACrE,SACE,oBAAC,YAAS,OAAO,MAAM,OACrB,8BAAC,qBAAmB,GAAG,OAAO,GAChC;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d4204cb1114c57682afd09034f9cc8268e27db52"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return I4=function(){return s},s}I4();I4().s[0]++;const $se=n=>(I4().f[0]++,I4().s[1]++,ie.jsx(My,{label:n.label,children:ie.jsx(mw,{...n})}));function k4(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx",e="10be4a5b6db1d1fa2555f9b6247244050c0b65b8",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx",statementMap:{0:{start:{line:4,column:22},end:{line:6,column:1}},1:{start:{line:5,column:2},end:{line:5,column:120}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:22},end:{line:4,column:23}},loc:{start:{line:4,column:33},end:{line:6,column:1}},line:4}},branchMap:{},s:{0:0,1:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx"],names:[],mappings:"AAYM;AAZN,OAAO,WAAW;AAClB,OAAO,mBAA8C;AAQrD,MAAM,gBAA8C,CAAC,UAAU;AAC7D,SACE,oBAAC,SAAM,OAAO,MAAM,OAClB,8BAAC,iBAAe,GAAG,OAAO,GAC5B;AAEJ;AAEA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"10be4a5b6db1d1fa2555f9b6247244050c0b65b8"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return k4=function(){return s},s}k4();k4().s[0]++;const ZDe=n=>(k4().f[0]++,k4().s[1]++,ie.jsx(Fs,{label:n.label,children:ie.jsx(Kse,{...n})}));function gn(){var n="/home/runner/work/maputnik/maputnik/src/components/modals/ModalSourcesTypeEditor.tsx",e="1c36418517e1f333c2ed550c90b5a98669bcf70c",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/modals/ModalSourcesTypeEditor.tsx",statementMap:{0:{start:{line:15,column:14},end:{line:15,column:26}},1:{start:{line:16,column:4},end:{line:30,column:9}},2:{start:{line:23,column:29},end:{line:26,column:12}},3:{start:{line:35,column:4},end:{line:38,column:7}},4:{start:{line:41,column:18},end:{line:41,column:47}},5:{start:{line:42,column:4},end:{line:51,column:6}},6:{start:{line:54,column:14},end:{line:54,column:26}},7:{start:{line:55,column:4},end:{line:99,column:9}},8:{start:{line:66,column:32},end:{line:69,column:12}},9:{start:{line:80,column:33},end:{line:83,column:12}},10:{start:{line:92,column:33},end:{line:95,column:12}},11:{start:{line:102,column:27},end:{line:107,column:1}},12:{start:{line:102,column:34},end:{line:107,column:1}},13:{start:{line:110,column:14},end:{line:110,column:26}},14:{start:{line:111,column:24},end:{line:118,column:5}},15:{start:{line:112,column:26},end:{line:112,column:64}},16:{start:{line:113,column:6},end:{line:113,column:29}},17:{start:{line:114,column:6},end:{line:117,column:9}},18:{start:{line:119,column:4},end:{line:146,column:9}},19:{start:{line:126,column:29},end:{line:129,column:12}},20:{start:{line:133,column:8},end:{line:144,column:10}},21:{start:{line:141,column:31},end:{line:141,column:52}},22:{start:{line:151,column:14},end:{line:151,column:26}},23:{start:{line:152,column:24},end:{line:159,column:5}},24:{start:{line:153,column:26},end:{line:153,column:64}},25:{start:{line:154,column:6},end:{line:154,column:29}},26:{start:{line:155,column:6},end:{line:158,column:9}},27:{start:{line:160,column:23},end:{line:165,column:5}},28:{start:{line:161,column:6},end:{line:164,column:9}},29:{start:{line:166,column:4},end:{line:192,column:9}},30:{start:{line:179,column:8},end:{line:190,column:10}},31:{start:{line:187,column:31},end:{line:187,column:52}},32:{start:{line:197,column:14},end:{line:197,column:26}},33:{start:{line:198,column:4},end:{line:209,column:6}},34:{start:{line:204,column:28},end:{line:207,column:10}},35:{start:{line:214,column:14},end:{line:214,column:26}},36:{start:{line:215,column:4},end:{line:243,column:9}},37:{start:{line:223,column:12},end:{line:226,column:15}},38:{start:{line:236,column:12},end:{line:239,column:15}},39:{start:{line:248,column:14},end:{line:248,column:26}},40:{start:{line:249,column:4},end:{line:264,column:9}},41:{start:{line:257,column:29},end:{line:260,column:12}},42:{start:{line:269,column:14},end:{line:269,column:26}},43:{start:{line:270,column:24},end:{line:276,column:5}},44:{start:{line:277,column:4},end:{line:341,column:5}},45:{start:{line:279,column:8},end:{line:279,column:79}},46:{start:{line:281,column:8},end:{line:281,column:85}},47:{start:{line:283,column:8},end:{line:283,column:77}},48:{start:{line:285,column:8},end:{line:285,column:76}},49:{start:{line:287,column:8},end:{line:287,column:77}},50:{start:{line:289,column:8},end:{line:301,column:13}},51:{start:{line:294,column:36},end:{line:297,column:14}},52:{start:{line:303,column:8},end:{line:303,column:77}},53:{start:{line:305,column:8},end:{line:332,column:13}},54:{start:{line:311,column:38},end:{line:314,column:16}},55:{start:{line:325,column:38},end:{line:328,column:16}},56:{start:{line:334,column:8},end:{line:334,column:76}},57:{start:{line:336,column:8},end:{line:336,column:74}},58:{start:{line:338,column:8},end:{line:338,column:74}},59:{start:{line:340,column:8},end:{line:340,column:20}},60:{start:{line:344,column:31},end:{line:344,column:80}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:11},end:{line:31,column:3}},line:14},1:{name:"(anonymous_1)",decl:{start:{line:23,column:20},end:{line:23,column:21}},loc:{start:{line:23,column:29},end:{line:26,column:12}},line:23},2:{name:"(anonymous_2)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:24},end:{line:39,column:3}},line:34},3:{name:"(anonymous_3)",decl:{start:{line:40,column:2},end:{line:40,column:3}},loc:{start:{line:40,column:19},end:{line:52,column:3}},line:40},4:{name:"(anonymous_4)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:11},end:{line:100,column:3}},line:53},5:{name:"(anonymous_5)",decl:{start:{line:66,column:20},end:{line:66,column:21}},loc:{start:{line:66,column:32},end:{line:69,column:12}},line:66},6:{name:"(anonymous_6)",decl:{start:{line:80,column:20},end:{line:80,column:21}},loc:{start:{line:80,column:33},end:{line:83,column:12}},line:80},7:{name:"(anonymous_7)",decl:{start:{line:92,column:20},end:{line:92,column:21}},loc:{start:{line:92,column:33},end:{line:95,column:12}},line:92},8:{name:"(anonymous_8)",decl:{start:{line:102,column:27},end:{line:102,column:28}},loc:{start:{line:102,column:34},end:{line:107,column:1}},line:102},9:{name:"(anonymous_9)",decl:{start:{line:109,column:2},end:{line:109,column:3}},loc:{start:{line:109,column:11},end:{line:147,column:3}},line:109},10:{name:"(anonymous_10)",decl:{start:{line:111,column:24},end:{line:111,column:25}},loc:{start:{line:111,column:38},end:{line:118,column:5}},line:111},11:{name:"(anonymous_11)",decl:{start:{line:126,column:20},end:{line:126,column:21}},loc:{start:{line:126,column:29},end:{line:129,column:12}},line:126},12:{name:"(anonymous_12)",decl:{start:{line:132,column:32},end:{line:132,column:33}},loc:{start:{line:132,column:57},end:{line:145,column:7}},line:132},13:{name:"(anonymous_13)",decl:{start:{line:141,column:22},end:{line:141,column:23}},loc:{start:{line:141,column:31},end:{line:141,column:52}},line:141},14:{name:"(anonymous_14)",decl:{start:{line:150,column:2},end:{line:150,column:3}},loc:{start:{line:150,column:11},end:{line:193,column:3}},line:150},15:{name:"(anonymous_15)",decl:{start:{line:152,column:24},end:{line:152,column:25}},loc:{start:{line:152,column:38},end:{line:159,column:5}},line:152},16:{name:"(anonymous_16)",decl:{start:{line:160,column:23},end:{line:160,column:24}},loc:{start:{line:160,column:33},end:{line:165,column:5}},line:160},17:{name:"(anonymous_17)",decl:{start:{line:178,column:32},end:{line:178,column:33}},loc:{start:{line:178,column:57},end:{line:191,column:7}},line:178},18:{name:"(anonymous_18)",decl:{start:{line:187,column:22},end:{line:187,column:23}},loc:{start:{line:187,column:31},end:{line:187,column:52}},line:187},19:{name:"(anonymous_19)",decl:{start:{line:196,column:2},end:{line:196,column:3}},loc:{start:{line:196,column:11},end:{line:210,column:3}},line:196},20:{name:"(anonymous_20)",decl:{start:{line:204,column:18},end:{line:204,column:19}},loc:{start:{line:204,column:28},end:{line:207,column:10}},line:204},21:{name:"(anonymous_21)",decl:{start:{line:213,column:2},end:{line:213,column:3}},loc:{start:{line:213,column:11},end:{line:244,column:3}},line:213},22:{name:"(anonymous_22)",decl:{start:{line:222,column:20},end:{line:222,column:21}},loc:{start:{line:222,column:30},end:{line:227,column:11}},line:222},23:{name:"(anonymous_23)",decl:{start:{line:235,column:20},end:{line:235,column:21}},loc:{start:{line:235,column:33},end:{line:240,column:11}},line:235},24:{name:"(anonymous_24)",decl:{start:{line:247,column:2},end:{line:247,column:3}},loc:{start:{line:247,column:11},end:{line:265,column:3}},line:247},25:{name:"(anonymous_25)",decl:{start:{line:257,column:20},end:{line:257,column:21}},loc:{start:{line:257,column:29},end:{line:260,column:12}},line:257},26:{name:"(anonymous_26)",decl:{start:{line:268,column:2},end:{line:268,column:3}},loc:{start:{line:268,column:11},end:{line:342,column:3}},line:268},27:{name:"(anonymous_27)",decl:{start:{line:294,column:22},end:{line:294,column:23}},loc:{start:{line:294,column:36},end:{line:297,column:14}},line:294},28:{name:"(anonymous_28)",decl:{start:{line:311,column:24},end:{line:311,column:25}},loc:{start:{line:311,column:38},end:{line:314,column:16}},line:311},29:{name:"(anonymous_29)",decl:{start:{line:325,column:24},end:{line:325,column:25}},loc:{start:{line:325,column:38},end:{line:328,column:16}},line:325}},branchMap:{0:{loc:{start:{line:41,column:18},end:{line:41,column:47}},type:"binary-expr",locations:[{start:{line:41,column:18},end:{line:41,column:41}},{start:{line:41,column:45},end:{line:41,column:47}}],line:41},1:{loc:{start:{line:79,column:17},end:{line:79,column:47}},type:"binary-expr",locations:[{start:{line:79,column:17},end:{line:79,column:42}},{start:{line:79,column:46},end:{line:79,column:47}}],line:79},2:{loc:{start:{line:91,column:17},end:{line:91,column:48}},type:"binary-expr",locations:[{start:{line:91,column:17},end:{line:91,column:42}},{start:{line:91,column:46},end:{line:91,column:48}}],line:91},3:{loc:{start:{line:259,column:17},end:{line:259,column:72}},type:"cond-expr",locations:[{start:{line:259,column:48},end:{line:259,column:51}},{start:{line:259,column:54},end:{line:259,column:72}}],line:259},4:{loc:{start:{line:277,column:4},end:{line:341,column:5}},type:"switch",locations:[{start:{line:278,column:6},end:{line:279,column:79}},{start:{line:280,column:6},end:{line:281,column:85}},{start:{line:282,column:6},end:{line:283,column:77}},{start:{line:284,column:6},end:{line:285,column:76}},{start:{line:286,column:6},end:{line:287,column:77}},{start:{line:288,column:6},end:{line:301,column:13}},{start:{line:302,column:6},end:{line:303,column:77}},{start:{line:304,column:6},end:{line:332,column:13}},{start:{line:333,column:6},end:{line:334,column:76}},{start:{line:335,column:6},end:{line:336,column:74}},{start:{line:337,column:6},end:{line:338,column:74}},{start:{line:339,column:6},end:{line:340,column:20}}],line:277},5:{loc:{start:{line:298,column:19},end:{line:298,column:86}},type:"binary-expr",locations:[{start:{line:298,column:19},end:{line:298,column:45}},{start:{line:298,column:49},end:{line:298,column:86}}],line:298},6:{loc:{start:{line:315,column:21},end:{line:315,column:92}},type:"binary-expr",locations:[{start:{line:315,column:21},end:{line:315,column:47}},{start:{line:315,column:51},end:{line:315,column:92}}],line:315},7:{loc:{start:{line:329,column:21},end:{line:329,column:92}},type:"binary-expr",locations:[{start:{line:329,column:21},end:{line:329,column:47}},{start:{line:329,column:51},end:{line:329,column:92}}],line:329}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0,0,0,0,0,0,0,0,0,0],5:[0,0],6:[0,0],7:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/modals/ModalSourcesTypeEditor.tsx"],names:[],mappings:"AA6BW,SACL,KADK;AA7BX,OAAO,WAAW;AAClB,SAAQ,cAAa;AACrB,SAA+B,uBAAuB;AAGtD,OAAO,WAAW;AAClB,OAAO,cAAc;AACrB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,uBAAuB;AAC9B,OAAO,gBAAgB;AACvB,OAAO,eAAe;AACtB,OAAO,mBAAmB;AAc1B,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SACN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,cAAc;AAAA,UACvB,WAAW,OAAO,cAAc;AAAA,UAChC,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,UAAU,SAAO,KAAK,MAAM,SAAS;AAAA,YACnC,GAAG,KAAK,MAAM;AAAA,YACd;AAAA,UACF,CAAC;AAAA;AAAA,MACH;AAAA,MACC,KAAK,MAAM;AAAA,OACd;AAAA,EACF;AACF;AAaA,MAAM,4BAA4B,MAAM,UAAoC;AAAA,EAC1E,eAAe,OAAiB;AAC9B,SAAK,MAAM,SAAS;AAAA,MAClB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,iBAAiB;AACf,UAAM,QAAQ,KAAK,MAAM,OAAO,SAAS,CAAC;AAC1C,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,OAAO,KAAK,MAAM,EAAE,UAAU;AAAA,QAC9B,WAAW,OAAO,cAAc;AAAA,QAChC,MAAK;AAAA,QACL,OAAO;AAAA,QACP,UAAU,KAAK,eAAe,KAAK,IAAI;AAAA;AAAA,IACzC;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SACL;AAAA,WAAK,eAAe;AAAA,MACrB;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,aAAa;AAAA,UACtB,WAAW,OAAO,cAAc;AAAA,UAChC,SAAS;AAAA,YACP,CAAC,OAAO,mCAAmC;AAAA,YAC3C,CAAC,OAAO,yBAAyB;AAAA,UACnC;AAAA,UACA,UAAU,YAAU,KAAK,MAAM,SAAS;AAAA,YACtC,GAAG,KAAK,MAAM;AAAA,YACd;AAAA,UACF,CAAC;AAAA,UACD,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,eAAY;AAAA;AAAA,MACd;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,UAAU;AAAA,UACnB,WAAW,OAAO,cAAc;AAAA,UAChC,OAAO,KAAK,MAAM,OAAO,WAAW;AAAA,UACpC,UAAU,aAAW,KAAK,MAAM,SAAS;AAAA,YACvC,GAAG,KAAK,MAAM;AAAA,YACd;AAAA,UACF,CAAC;AAAA;AAAA,MACH;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,UAAU;AAAA,UACnB,WAAW,OAAO,cAAc;AAAA,UAChC,OAAO,KAAK,MAAM,OAAO,WAAW;AAAA,UACpC,UAAU,aAAW,KAAK,MAAM,SAAS;AAAA,YACvC,GAAG,KAAK,MAAM;AAAA,YACd;AAAA,UACF,CAAC;AAAA;AAAA,MACH;AAAA,MACC,KAAK,MAAM;AAAA,OACd;AAAA,EAEF;AACF;AAEA,MAAM,qBAAyE,CAAC,MAAO;AAAA,EACrF,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,WAAW;AAAA,EAC9C,EAAE,OAAO,EAAE,iBAAiB,GAAG,KAAK,YAAY;AAAA,EAChD,EAAE,OAAO,EAAE,oBAAoB,GAAG,KAAK,eAAe;AAAA,EACtD,EAAE,OAAO,EAAE,mBAAmB,GAAG,KAAK,cAAc;AACtD;AAUA,MAAM,0BAA0B,MAAM,UAAkC;AAAA,EACtE,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,cAAc,CAAC,KAAa,QAA0B;AAC1D,YAAM,cAAc,KAAK,MAAM,OAAO,YAAY,MAAM,CAAC;AACzD,kBAAY,GAAG,IAAI;AAEnB,WAAK,MAAM,SAAS;AAAA,QAClB,GAAG,KAAK,MAAM;AAAA,QACd;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO,qBAAC,SACN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,WAAW;AAAA,UACpB,WAAW,OAAO,aAAa;AAAA,UAC/B,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,UAAU,SAAO,KAAK,MAAM,SAAS;AAAA,YACnC,GAAG,KAAK,MAAM;AAAA,YACd;AAAA,UACF,CAAC;AAAA;AAAA,MACH;AAAA,MACC,mBAAmB,CAAC,EAAE,IAAI,CAAC,EAAC,OAAO,IAAG,GAAG,QAAQ;AAChD,eACE;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YAEA,QAAQ;AAAA,YACR,MAAK;AAAA,YACL,OAAO,KAAK,MAAM,OAAO,YAAY,GAAG;AAAA,YACxC,SAAS,CAAC,GAAG,CAAC;AAAA,YACd,UAAU,CAAC,QAA0B,YAAY,KAAK,GAAG;AAAA;AAAA,UALpD;AAAA,QAMP;AAAA,MAEJ,CAAC;AAAA,OACH;AAAA,EACF;AACF;AAUA,MAAM,0BAA0B,MAAM,UAAkC;AAAA,EACtE,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,cAAc,CAAC,KAAa,QAA0B;AAC1D,YAAM,cAAc,KAAK,MAAM,OAAO,YAAY,MAAM,CAAC;AACzD,kBAAY,GAAG,IAAI;AAEnB,WAAK,MAAM,SAAS;AAAA,QAClB,GAAG,KAAK,MAAM;AAAA,QACd;AAAA,MACF,CAAC;AAAA,IACH;AAEA,UAAM,aAAa,CAAC,SAAmB;AACrC,WAAK,MAAM,SAAS;AAAA,QAClB,GAAG,KAAK,MAAM;AAAA,QACd;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO,qBAAC,SACN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,WAAW;AAAA,UACpB,WAAW,OAAO,aAAa;AAAA,UAC/B,MAAK;AAAA,UACL,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,SAAS,CAAC;AAAA,UACV,UAAU;AAAA;AAAA,MACZ;AAAA,MACC,mBAAmB,CAAC,EAAE,IAAI,CAAC,EAAC,OAAO,IAAG,GAAG,QAAQ;AAChD,eACE;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YAEA,QAAQ;AAAA,YACR,MAAK;AAAA,YACL,OAAO,KAAK,MAAM,OAAO,YAAY,GAAG;AAAA,YACxC,SAAS,CAAC,GAAG,CAAC;AAAA,YACd,UAAU,CAAC,QAA0B,YAAY,KAAK,GAAG;AAAA;AAAA,UALpD;AAAA,QAMP;AAAA,MAEJ,CAAC;AAAA,OACH;AAAA,EACF;AACF;AASA,MAAM,+BAA+B,MAAM,UAAuC;AAAA,EAChF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,OAAO,EAAE,aAAa;AAAA,QACtB,WAAW,OAAO,eAAe;AAAA,QACjC,OAAO,KAAK,MAAM,OAAO;AAAA,QACzB,UAAU,UAAQ,KAAK,MAAM,SAAS;AAAA,UACpC,GAAG,KAAK,MAAM;AAAA,UACd;AAAA,QACF,CAAC;AAAA;AAAA,IACH;AAAA,EACF;AACF;AAUA,MAAM,qCAAqC,MAAM,UAA6C;AAAA,EAC5F,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SACN;AAAA,0BAAC,SAAM,OAAO,EAAE,SAAS,GAAG,WAAW,OAAO,eAAe,MAC3D;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,WAAW;AAAA,UACX,UAAS;AAAA,UACT,UAAU,UAAQ;AAChB,iBAAK,MAAM,SAAS;AAAA,cAClB,GAAG,KAAK,MAAM;AAAA,cACd;AAAA,YACF,CAAC;AAAA,UACH;AAAA;AAAA,MACF,GACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,SAAS;AAAA,UAClB,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,UAAU,aAAW;AACnB,iBAAK,MAAM,SAAS;AAAA,cAClB,GAAG,KAAK,MAAM;AAAA,cACd;AAAA,YACF,CAAC;AAAA,UACH;AAAA;AAAA,MACF;AAAA,OACF;AAAA,EACF;AACF;AAUA,MAAM,4BAA4B,MAAM,UAAoC;AAAA,EAC1E,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SACN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,aAAa;AAAA,UACtB,WAAW,OAAO,cAAc;AAAA,UAChC,OAAO,KAAK,MAAM,OAAO;AAAA,UACzB,eAAY;AAAA,UACZ,UAAU,CAAC,QAAgB,KAAK,MAAM,SAAS;AAAA,YAC7C,GAAG,KAAK,MAAM;AAAA,YACd,KAAK,IAAI,WAAW,YAAY,IAAI,MAAM,aAAa,GAAG;AAAA,UAC5D,CAAC;AAAA;AAAA,MACH;AAAA,MACC,KAAK,MAAM;AAAA,OACd;AAAA,EACF;AACF;AAQA,MAAM,uCAAuC,MAAM,UAA+C;AAAA,EAChG,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,cAAc;AAAA,MAClB,QAAQ,KAAK,MAAM;AAAA,MACnB,UAAU,KAAK,MAAM;AAAA,MACrB,GAAG,KAAK,MAAM;AAAA,MACd,MAAM,KAAK,MAAM;AAAA,MACjB,QAAQ,KAAK,MAAM;AAAA,IACrB;AACA,YAAO,KAAK,MAAM,MAAM;AAAA,MACtB,KAAK;AAAe,eAAO,oBAAC,0BAAwB,GAAG,aAAa;AAAA,MACpE,KAAK;AAAgB,eAAO,oBAAC,gCAA8B,GAAG,aAAa;AAAA,MAC3E,KAAK;AAAmB,eAAO,oBAAC,wBAAsB,GAAG,aAAa;AAAA,MACtE,KAAK;AAAe,eAAO,oBAAC,uBAAqB,GAAG,aAAa;AAAA,MACjE,KAAK;AAAmB,eAAO,oBAAC,wBAAsB,GAAG,aAAa;AAAA,MACtE,KAAK;AAAe,eAAO,oBAAC,uBAAqB,GAAG,aAClD;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,WAAW;AAAA,YACpB,WAAW,OAAO,cAAc;AAAA,YAChC,UAAU,cAAY,KAAK,MAAM,SAAS;AAAA,cACxC,GAAG,KAAK,MAAM;AAAA,cACd;AAAA,YACF,CAAC;AAAA,YACD,OAAO,KAAK,MAAM,OAAO,YAAY,OAAO,cAAc,SAAS;AAAA,YACnE,eAAY;AAAA;AAAA,QACd,GACF;AAAA,MACA,KAAK;AAAuB,eAAO,oBAAC,wBAAsB,GAAG,aAAa;AAAA,MAC1E,KAAK;AAAsB,eAAO,qBAAC,uBAAqB,GAAG,aACzD;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,WAAW;AAAA,cACpB,WAAW,OAAO,kBAAkB;AAAA,cACpC,UAAU,cAAY,KAAK,MAAM,SAAS;AAAA,gBACxC,GAAG,KAAK,MAAM;AAAA,gBACd;AAAA,cACF,CAAC;AAAA,cACD,OAAO,KAAK,MAAM,OAAO,YAAY,OAAO,kBAAkB,SAAS;AAAA,cACvE,eAAY;AAAA;AAAA,UACd;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,UAAU;AAAA,cACnB,WAAW,OAAO,kBAAkB;AAAA,cACpC,SAAS,OAAO,KAAK,OAAO,kBAAkB,SAAS,MAAM;AAAA,cAC7D,UAAU,cAAY,KAAK,MAAM,SAAS;AAAA,gBACxC,GAAG,KAAK,MAAM;AAAA,gBACd;AAAA,cACF,CAAC;AAAA,cACD,OAAO,KAAK,MAAM,OAAO,YAAY,OAAO,kBAAkB,SAAS;AAAA;AAAA,UACzE;AAAA,WACF;AAAA,MACA,KAAK;AAAkB,eAAO,oBAAC,uBAAqB,GAAG,aAAa;AAAA,MACpE,KAAK;AAAS,eAAO,oBAAC,qBAAmB,GAAG,aAAa;AAAA,MACzD,KAAK;AAAS,eAAO,oBAAC,qBAAmB,GAAG,aAAa;AAAA,MACzD;AAAS,eAAO;AAAA,IAClB;AAAA,EACF;AACF;AAEA,MAAM,yBAAyB,gBAAgB,EAAE,8BAA8B;AAC/E,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1c36418517e1f333c2ed550c90b5a98669bcf70c"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return gn=function(){return s},s}gn();class $k extends En.Component{render(){gn().f[0]++;const e=(gn().s[0]++,this.props.t);return gn().s[1]++,ie.jsxs("div",{children:[ie.jsx(yx,{label:e("TileJSON URL"),fieldSpec:ss.source_vector.url,value:this.props.source.url,onChange:t=>(gn().f[1]++,gn().s[2]++,this.props.onChange({...this.props.source,url:t}))}),this.props.children]})}}class Vk extends En.Component{changeTileUrls(e){gn().f[2]++,gn().s[3]++,this.props.onChange({...this.props.source,tiles:e})}renderTileUrls(){gn().f[3]++;const e=(gn().s[4]++,gn().b[0][0]++,this.props.source.tiles||(gn().b[0][1]++,[]));return gn().s[5]++,ie.jsx($se,{label:this.props.t("Tile URL"),fieldSpec:ss.source_vector.tiles,type:"url",value:e,onChange:this.changeTileUrls.bind(this)})}render(){gn().f[4]++;const e=(gn().s[6]++,this.props.t);return gn().s[7]++,ie.jsxs("div",{children:[this.renderTileUrls(),ie.jsx(S4,{label:e("Scheme Type"),fieldSpec:ss.source_vector.scheme,options:[["xyz","xyz (Slippy map tilenames scheme)"],["tms","tms (OSGeo spec scheme)"]],onChange:t=>(gn().f[5]++,gn().s[8]++,this.props.onChange({...this.props.source,scheme:t})),value:this.props.source.scheme,"data-wd-key":"modal:sources.add.scheme_type"}),ie.jsx(em,{label:e("Min Zoom"),fieldSpec:ss.source_vector.minzoom,value:(gn().b[1][0]++,this.props.source.minzoom||(gn().b[1][1]++,0)),onChange:t=>(gn().f[6]++,gn().s[9]++,this.props.onChange({...this.props.source,minzoom:t}))}),ie.jsx(em,{label:e("Max Zoom"),fieldSpec:ss.source_vector.maxzoom,value:(gn().b[2][0]++,this.props.source.maxzoom||(gn().b[2][1]++,22)),onChange:t=>(gn().f[7]++,gn().s[10]++,this.props.onChange({...this.props.source,maxzoom:t}))}),this.props.children]})}}gn().s[11]++;const Vse=n=>(gn().f[8]++,gn().s[12]++,[{label:n("Coord top left"),key:"top left"},{label:n("Coord top right"),key:"top right"},{label:n("Coord bottom right"),key:"bottom right"},{label:n("Coord bottom left"),key:"bottom left"}]);class XDe extends En.Component{render(){gn().f[9]++;const e=(gn().s[13]++,this.props.t);gn().s[14]++;const t=(i,r)=>{gn().f[10]++;const o=(gn().s[15]++,this.props.source.coordinates.slice(0));gn().s[16]++,o[i]=r,gn().s[17]++,this.props.onChange({...this.props.source,coordinates:o})};return gn().s[18]++,ie.jsxs("div",{children:[ie.jsx(yx,{label:e("Image URL"),fieldSpec:ss.source_image.url,value:this.props.source.url,onChange:i=>(gn().f[11]++,gn().s[19]++,this.props.onChange({...this.props.source,url:i}))}),Vse(e).map(({label:i,key:r},o)=>(gn().f[12]++,gn().s[20]++,ie.jsx(QS,{label:i,length:2,type:"number",value:this.props.source.coordinates[o],default:[0,0],onChange:s=>(gn().f[13]++,gn().s[21]++,t(o,s))},r)))]})}}class JDe extends En.Component{render(){gn().f[14]++;const e=(gn().s[22]++,this.props.t);gn().s[23]++;const t=(r,o)=>{gn().f[15]++;const s=(gn().s[24]++,this.props.source.coordinates.slice(0));gn().s[25]++,s[r]=o,gn().s[26]++,this.props.onChange({...this.props.source,coordinates:s})};gn().s[27]++;const i=r=>{gn().f[16]++,gn().s[28]++,this.props.onChange({...this.props.source,urls:r})};return gn().s[29]++,ie.jsxs("div",{children:[ie.jsx($se,{label:e("Video URL"),fieldSpec:ss.source_video.urls,type:"string",value:this.props.source.urls,default:[],onChange:i}),Vse(e).map(({label:r,key:o},s)=>(gn().f[17]++,gn().s[30]++,ie.jsx(QS,{label:r,length:2,type:"number",value:this.props.source.coordinates[s],default:[0,0],onChange:a=>(gn().f[18]++,gn().s[31]++,t(s,a))},o)))]})}}class ePe extends En.Component{render(){gn().f[19]++;const e=(gn().s[32]++,this.props.t);return gn().s[33]++,ie.jsx(yx,{label:e("GeoJSON URL"),fieldSpec:ss.source_geojson.data,value:this.props.source.data,onChange:t=>(gn().f[20]++,gn().s[34]++,this.props.onChange({...this.props.source,data:t}))})}}class tPe extends En.Component{render(){gn().f[21]++;const e=(gn().s[35]++,this.props.t);return gn().s[36]++,ie.jsxs("div",{children:[ie.jsx(Fs,{label:e("GeoJSON"),fieldSpec:ss.source_geojson.data,children:ie.jsx(VK,{value:this.props.source.data,maxHeight:200,lintType:"json",onChange:t=>{gn().f[22]++,gn().s[37]++,this.props.onChange({...this.props.source,data:t})}})}),ie.jsx(ZDe,{label:e("Cluster"),value:this.props.source.cluster,onChange:t=>{gn().f[23]++,gn().s[38]++,this.props.onChange({...this.props.source,cluster:t})}})]})}}class nPe extends En.Component{render(){gn().f[24]++;const e=(gn().s[39]++,this.props.t);return gn().s[40]++,ie.jsxs("div",{children:[ie.jsx(yx,{label:e("PMTiles URL"),fieldSpec:ss.source_vector.url,value:this.props.source.url,"data-wd-key":"modal:sources.add.source_url",onChange:t=>(gn().f[25]++,gn().s[41]++,this.props.onChange({...this.props.source,url:t.startsWith("pmtiles://")?(gn().b[3][0]++,t):(gn().b[3][1]++,`pmtiles://${t}`)}))}),this.props.children]})}}class iPe extends En.Component{render(){gn().f[26]++;const e=(gn().s[42]++,this.props.t),t=(gn().s[43]++,{source:this.props.source,onChange:this.props.onChange,t:this.props.t,i18n:this.props.i18n,tReady:this.props.tReady});switch(gn().s[44]++,this.props.mode){case"geojson_url":return gn().b[4][0]++,gn().s[45]++,ie.jsx(ePe,{...t});case"geojson_json":return gn().b[4][1]++,gn().s[46]++,ie.jsx(tPe,{...t});case"tilejson_vector":return gn().b[4][2]++,gn().s[47]++,ie.jsx($k,{...t});case"tile_vector":return gn().b[4][3]++,gn().s[48]++,ie.jsx(Vk,{...t});case"tilejson_raster":return gn().b[4][4]++,gn().s[49]++,ie.jsx($k,{...t});case"tile_raster":return gn().b[4][5]++,gn().s[50]++,ie.jsx(Vk,{...t,children:ie.jsx(em,{label:e("Tile Size"),fieldSpec:ss.source_raster.tileSize,onChange:i=>(gn().f[27]++,gn().s[51]++,this.props.onChange({...this.props.source,tileSize:i})),value:(gn().b[5][0]++,this.props.source.tileSize||(gn().b[5][1]++,ss.source_raster.tileSize.default)),"data-wd-key":"modal:sources.add.tile_size"})});case"tilejson_raster-dem":return gn().b[4][6]++,gn().s[52]++,ie.jsx($k,{...t});case"tilexyz_raster-dem":return gn().b[4][7]++,gn().s[53]++,ie.jsxs(Vk,{...t,children:[ie.jsx(em,{label:e("Tile Size"),fieldSpec:ss.source_raster_dem.tileSize,onChange:i=>(gn().f[28]++,gn().s[54]++,this.props.onChange({...this.props.source,tileSize:i})),value:(gn().b[6][0]++,this.props.source.tileSize||(gn().b[6][1]++,ss.source_raster_dem.tileSize.default)),"data-wd-key":"modal:sources.add.tile_size"}),ie.jsx(S4,{label:e("Encoding"),fieldSpec:ss.source_raster_dem.encoding,options:Object.keys(ss.source_raster_dem.encoding.values),onChange:i=>(gn().f[29]++,gn().s[55]++,this.props.onChange({...this.props.source,encoding:i})),value:(gn().b[7][0]++,this.props.source.encoding||(gn().b[7][1]++,ss.source_raster_dem.encoding.default))})]});case"pmtiles_vector":return gn().b[4][8]++,gn().s[56]++,ie.jsx(nPe,{...t});case"image":return gn().b[4][9]++,gn().s[57]++,ie.jsx(XDe,{...t});case"video":return gn().b[4][10]++,gn().s[58]++,ie.jsx(JDe,{...t});default:return gn().b[4][11]++,gn().s[59]++,null}}}const Hse=(gn().s[60]++,Jo()(iPe));function um(){var n="/home/runner/work/maputnik/maputnik/src/libs/source.ts",e="871503159abbdc3b3ae7b24cdaefb6478172c58b",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/source.ts",statementMap:{0:{start:{line:2,column:27},end:{line:2,column:50}},1:{start:{line:3,column:2},end:{line:3,column:36}},2:{start:{line:4,column:2},end:{line:7,column:4}},3:{start:{line:10,column:2},end:{line:10,column:50}},4:{start:{line:13,column:25},end:{line:16,column:3}},5:{start:{line:17,column:2},end:{line:20,column:4}}},fnMap:{0:{name:"deleteSource",decl:{start:{line:1,column:16},end:{line:1,column:28}},loc:{start:{line:1,column:49},end:{line:8,column:1}},line:1},1:{name:"addSource",decl:{start:{line:9,column:16},end:{line:9,column:25}},loc:{start:{line:9,column:54},end:{line:11,column:1}},line:9},2:{name:"changeSource",decl:{start:{line:12,column:16},end:{line:12,column:28}},loc:{start:{line:12,column:57},end:{line:21,column:1}},line:12}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/source.ts"],names:[],mappings:"AAGO,gBAAS,aAAa,UAAoC,UAAkB;AACjF,QAAM,mBAAmB,EAAE,GAAG,SAAS,QAAO;AAC9C,SAAO,iBAAiB,QAAQ;AAChC,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,EACX;AACF;AAGO,gBAAS,UAAU,UAAoC,UAAkB,QAA6B;AAC3G,SAAO,aAAa,UAAU,UAAU,MAAM;AAChD;AAEO,gBAAS,aAAa,UAAoC,UAAkB,QAA6B;AAC9G,QAAM,iBAAiB;AAAA,IACrB,GAAG,SAAS;AAAA,IACZ,CAAC,QAAQ,GAAG;AAAA,EACd;AACA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,EACX;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"871503159abbdc3b3ae7b24cdaefb6478172c58b"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return um=function(){return s},s}um();function rPe(n,e){um().f[0]++;const t=(um().s[0]++,{...n.sources});return um().s[1]++,delete t[e],um().s[2]++,{...n,sources:t}}function KV(n,e,t){return um().f[1]++,um().s[3]++,Zse(n,e,t)}function Zse(n,e,t){um().f[2]++;const i=(um().s[4]++,{...n.sources,[e]:t});return um().s[5]++,{...n,sources:i}}const oPe={type:"vector",url:"https://api.maptiler.com/tiles/v3-openmaptiles/tiles.json?key={key}",title:"OpenMapTiles v3"},sPe={type:"vector",url:"https://tile.thunderforest.com/thunderforest.transport-v2.json?apikey={key}",title:"Thunderforest Transport v2"},aPe={type:"vector",url:"https://tile.thunderforest.com/thunderforest.outdoors-v2.json?apikey={key}",title:"Thunderforest Outdoors v2"},lPe={type:"vector",url:"https://s3-eu-west-1.amazonaws.com/tiles.os.uk/v2/data/vector/open-zoomstack/config.json",title:"OS Open Zoomstack v2"},uPe={type:"vector",url:"https://tiles.locationiq.com/v3/pbf/tiles.json?key={key}",title:"LocationIQ"},LV={openmaptiles:oPe,thunderforest_transport:sPe,thunderforest_outdoors:aPe,open_zoomstack:lPe,locationiq:uPe};function Qt(){var n="/home/runner/work/maputnik/maputnik/src/components/modals/ModalSources.tsx",e="30dc2f79b5d8eab063b35a7a783386d299d39465",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/modals/ModalSources.tsx",statementMap:{0:{start:{line:16,column:4},end:{line:33,column:9}},1:{start:{line:20,column:23},end:{line:20,column:57}},2:{start:{line:37,column:2},end:{line:40,column:3}},3:{start:{line:38,column:4},end:{line:38,column:43}},4:{start:{line:38,column:22},end:{line:38,column:43}},5:{start:{line:39,column:4},end:{line:39,column:29}},6:{start:{line:41,column:2},end:{line:44,column:3}},7:{start:{line:42,column:4},end:{line:42,column:50}},8:{start:{line:42,column:22},end:{line:42,column:50}},9:{start:{line:43,column:4},end:{line:43,column:33}},10:{start:{line:45,column:2},end:{line:49,column:3}},11:{start:{line:46,column:4},end:{line:46,column:43}},12:{start:{line:46,column:22},end:{line:46,column:43}},13:{start:{line:47,column:4},end:{line:47,column:83}},14:{start:{line:47,column:59},end:{line:47,column:83}},15:{start:{line:48,column:4},end:{line:48,column:29}},16:{start:{line:50,column:2},end:{line:56,column:3}},17:{start:{line:51,column:4},end:{line:55,column:5}},18:{start:{line:52,column:6},end:{line:52,column:27}},19:{start:{line:54,column:6},end:{line:54,column:28}},20:{start:{line:57,column:2},end:{line:59,column:3}},21:{start:{line:58,column:4},end:{line:58,column:19}},22:{start:{line:60,column:2},end:{line:62,column:3}},23:{start:{line:61,column:4},end:{line:61,column:19}},24:{start:{line:63,column:2},end:{line:63,column:14}},25:{start:{line:67,column:14},end:{line:67,column:26}},26:{start:{line:68,column:4},end:{line:94,column:9}},27:{start:{line:80,column:27},end:{line:80,column:67}},28:{start:{line:99,column:4},end:{line:99,column:17}},29:{start:{line:100,column:4},end:{line:104,column:6}},30:{start:{line:107,column:19},end:{line:107,column:50}},31:{start:{line:108,column:25},end:{line:108,column:40}},32:{start:{line:109,column:4},end:{line:192,column:5}},33:{start:{line:111,column:8},end:{line:114,column:10}},34:{start:{line:116,column:8},end:{line:119,column:10}},35:{start:{line:121,column:8},end:{line:125,column:10}},36:{start:{line:127,column:8},end:{line:130,column:10}},37:{start:{line:132,column:8},end:{line:138,column:10}},38:{start:{line:140,column:8},end:{line:143,column:10}},39:{start:{line:145,column:8},end:{line:152,column:10}},40:{start:{line:154,column:8},end:{line:157,column:10}},41:{start:{line:159,column:8},end:{line:165,column:10}},42:{start:{line:167,column:8},end:{line:176,column:10}},43:{start:{line:178,column:8},end:{line:189,column:10}},44:{start:{line:191,column:8},end:{line:191,column:18}},45:{start:{line:194,column:10},end:{line:197,column:3}},46:{start:{line:195,column:33},end:{line:195,column:43}},47:{start:{line:196,column:4},end:{line:196,column:39}},48:{start:{line:198,column:19},end:{line:200,column:3}},49:{start:{line:199,column:4},end:{line:199,column:30}},50:{start:{line:202,column:14},end:{line:202,column:26}},51:{start:{line:203,column:32},end:{line:205,column:5}},52:{start:{line:206,column:4},end:{line:257,column:9}},53:{start:{line:213,column:27},end:{line:213,column:57}},54:{start:{line:235,column:30},end:{line:235,column:87}},55:{start:{line:262,column:27},end:{line:262,column:40}},56:{start:{line:263,column:4},end:{line:263,column:35}},57:{start:{line:264,column:4},end:{line:264,column:26}},58:{start:{line:267,column:28},end:{line:267,column:38}},59:{start:{line:268,column:22},end:{line:268,column:77}},60:{start:{line:269,column:26},end:{line:282,column:6}},61:{start:{line:270,column:21},end:{line:270,column:47}},62:{start:{line:271,column:6},end:{line:281,column:8}},63:{start:{line:276,column:29},end:{line:276,column:93}},64:{start:{line:277,column:26},end:{line:277,column:85}},65:{start:{line:283,column:27},end:{line:295,column:6}},66:{start:{line:283,column:75},end:{line:283,column:106}},67:{start:{line:284,column:21},end:{line:284,column:44}},68:{start:{line:285,column:6},end:{line:294,column:8}},69:{start:{line:291,column:26},end:{line:291,column:107}},70:{start:{line:296,column:4},end:{line:326,column:6}},71:{start:{line:319,column:45},end:{line:319,column:109}},72:{start:{line:329,column:21},end:{line:329,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:11},end:{line:34,column:3}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:20,column:17},end:{line:20,column:18}},loc:{start:{line:20,column:23},end:{line:20,column:57}},line:20},2:{name:"editorMode",decl:{start:{line:36,column:9},end:{line:36,column:19}},loc:{start:{line:36,column:28},end:{line:64,column:1}},line:36},3:{name:"(anonymous_3)",decl:{start:{line:66,column:2},end:{line:66,column:3}},loc:{start:{line:66,column:11},end:{line:95,column:3}},line:66},4:{name:"(anonymous_4)",decl:{start:{line:80,column:21},end:{line:80,column:22}},loc:{start:{line:80,column:27},end:{line:80,column:67}},line:80},5:{name:"(anonymous_5)",decl:{start:{line:98,column:2},end:{line:98,column:3}},loc:{start:{line:98,column:21},end:{line:105,column:3}},line:98},6:{name:"(anonymous_6)",decl:{start:{line:106,column:2},end:{line:106,column:3}},loc:{start:{line:106,column:22},end:{line:193,column:3}},line:106},7:{name:"(anonymous_7)",decl:{start:{line:194,column:10},end:{line:194,column:11}},loc:{start:{line:194,column:16},end:{line:197,column:3}},line:194},8:{name:"(anonymous_8)",decl:{start:{line:198,column:19},end:{line:198,column:20}},loc:{start:{line:198,column:31},end:{line:200,column:3}},line:198},9:{name:"(anonymous_9)",decl:{start:{line:201,column:2},end:{line:201,column:3}},loc:{start:{line:201,column:11},end:{line:258,column:3}},line:201},10:{name:"(anonymous_10)",decl:{start:{line:213,column:20},end:{line:213,column:21}},loc:{start:{line:213,column:27},end:{line:213,column:57}},line:213},11:{name:"(anonymous_11)",decl:{start:{line:235,column:20},end:{line:235,column:21}},loc:{start:{line:235,column:30},end:{line:235,column:87}},line:235},12:{name:"(anonymous_12)",decl:{start:{line:261,column:2},end:{line:261,column:3}},loc:{start:{line:261,column:21},end:{line:265,column:3}},line:261},13:{name:"(anonymous_13)",decl:{start:{line:266,column:2},end:{line:266,column:3}},loc:{start:{line:266,column:11},end:{line:327,column:3}},line:266},14:{name:"(anonymous_14)",decl:{start:{line:269,column:60},end:{line:269,column:61}},loc:{start:{line:269,column:74},end:{line:282,column:5}},line:269},15:{name:"(anonymous_15)",decl:{start:{line:276,column:20},end:{line:276,column:21}},loc:{start:{line:276,column:29},end:{line:276,column:93}},line:276},16:{name:"(anonymous_16)",decl:{start:{line:277,column:20},end:{line:277,column:21}},loc:{start:{line:277,column:26},end:{line:277,column:85}},line:277},17:{name:"(anonymous_17)",decl:{start:{line:283,column:61},end:{line:283,column:62}},loc:{start:{line:283,column:75},end:{line:283,column:106}},line:283},18:{name:"(anonymous_18)",decl:{start:{line:283,column:112},end:{line:283,column:113}},loc:{start:{line:283,column:126},end:{line:295,column:5}},line:283},19:{name:"(anonymous_19)",decl:{start:{line:291,column:20},end:{line:291,column:21}},loc:{start:{line:291,column:26},end:{line:291,column:107}},line:291},20:{name:"(anonymous_20)",decl:{start:{line:319,column:23},end:{line:319,column:24}},loc:{start:{line:319,column:45},end:{line:319,column:109}},line:319}},branchMap:{0:{loc:{start:{line:37,column:2},end:{line:40,column:3}},type:"if",locations:[{start:{line:37,column:2},end:{line:40,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:37},1:{loc:{start:{line:38,column:4},end:{line:38,column:43}},type:"if",locations:[{start:{line:38,column:4},end:{line:38,column:43}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:38},2:{loc:{start:{line:41,column:2},end:{line:44,column:3}},type:"if",locations:[{start:{line:41,column:2},end:{line:44,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:41},3:{loc:{start:{line:42,column:4},end:{line:42,column:50}},type:"if",locations:[{start:{line:42,column:4},end:{line:42,column:50}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:42},4:{loc:{start:{line:45,column:2},end:{line:49,column:3}},type:"if",locations:[{start:{line:45,column:2},end:{line:49,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:45},5:{loc:{start:{line:46,column:4},end:{line:46,column:43}},type:"if",locations:[{start:{line:46,column:4},end:{line:46,column:43}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:46},6:{loc:{start:{line:47,column:4},end:{line:47,column:83}},type:"if",locations:[{start:{line:47,column:4},end:{line:47,column:83}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:47},7:{loc:{start:{line:47,column:8},end:{line:47,column:57}},type:"binary-expr",locations:[{start:{line:47,column:8},end:{line:47,column:18}},{start:{line:47,column:22},end:{line:47,column:57}}],line:47},8:{loc:{start:{line:50,column:2},end:{line:56,column:3}},type:"if",locations:[{start:{line:50,column:2},end:{line:56,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:50},9:{loc:{start:{line:51,column:4},end:{line:55,column:5}},type:"if",locations:[{start:{line:51,column:4},end:{line:55,column:5}},{start:{line:53,column:11},end:{line:55,column:5}}],line:51},10:{loc:{start:{line:57,column:2},end:{line:59,column:3}},type:"if",locations:[{start:{line:57,column:2},end:{line:59,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:57},11:{loc:{start:{line:60,column:2},end:{line:62,column:3}},type:"if",locations:[{start:{line:60,column:2},end:{line:62,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:60},12:{loc:{start:{line:107,column:19},end:{line:107,column:50}},type:"binary-expr",locations:[{start:{line:107,column:19},end:{line:107,column:44}},{start:{line:107,column:48},end:{line:107,column:50}}],line:107},13:{loc:{start:{line:107,column:20},end:{line:107,column:36}},type:"binary-expr",locations:[{start:{line:107,column:20},end:{line:107,column:30}},{start:{line:107,column:34},end:{line:107,column:36}}],line:107},14:{loc:{start:{line:109,column:4},end:{line:192,column:5}},type:"switch",locations:[{start:{line:110,column:6},end:{line:114,column:10}},{start:{line:115,column:6},end:{line:119,column:10}},{start:{line:120,column:6},end:{line:125,column:10}},{start:{line:126,column:6},end:{line:130,column:10}},{start:{line:131,column:6},end:{line:138,column:10}},{start:{line:139,column:6},end:{line:143,column:10}},{start:{line:144,column:6},end:{line:152,column:10}},{start:{line:153,column:6},end:{line:157,column:10}},{start:{line:158,column:6},end:{line:165,column:10}},{start:{line:166,column:6},end:{line:176,column:10}},{start:{line:177,column:6},end:{line:189,column:10}},{start:{line:190,column:6},end:{line:191,column:18}}],line:109},15:{loc:{start:{line:123,column:19},end:{line:123,column:42}},type:"binary-expr",locations:[{start:{line:123,column:19},end:{line:123,column:33}},{start:{line:123,column:37},end:{line:123,column:42}}],line:123},16:{loc:{start:{line:129,column:15},end:{line:129,column:72}},type:"binary-expr",locations:[{start:{line:129,column:15},end:{line:129,column:25}},{start:{line:129,column:29},end:{line:129,column:72}}],line:129},17:{loc:{start:{line:134,column:17},end:{line:134,column:80}},type:"binary-expr",locations:[{start:{line:134,column:17},end:{line:134,column:29}},{start:{line:134,column:33},end:{line:134,column:80}}],line:134},18:{loc:{start:{line:135,column:19},end:{line:135,column:38}},type:"binary-expr",locations:[{start:{line:135,column:19},end:{line:135,column:33}},{start:{line:135,column:37},end:{line:135,column:38}}],line:135},19:{loc:{start:{line:136,column:19},end:{line:136,column:39}},type:"binary-expr",locations:[{start:{line:136,column:19},end:{line:136,column:33}},{start:{line:136,column:37},end:{line:136,column:39}}],line:136},20:{loc:{start:{line:137,column:18},end:{line:137,column:40}},type:"binary-expr",locations:[{start:{line:137,column:18},end:{line:137,column:31}},{start:{line:137,column:35},end:{line:137,column:40}}],line:137},21:{loc:{start:{line:142,column:15},end:{line:142,column:72}},type:"binary-expr",locations:[{start:{line:142,column:15},end:{line:142,column:25}},{start:{line:142,column:29},end:{line:142,column:72}}],line:142},22:{loc:{start:{line:147,column:17},end:{line:147,column:80}},type:"binary-expr",locations:[{start:{line:147,column:17},end:{line:147,column:29}},{start:{line:147,column:33},end:{line:147,column:80}}],line:147},23:{loc:{start:{line:148,column:19},end:{line:148,column:38}},type:"binary-expr",locations:[{start:{line:148,column:19},end:{line:148,column:33}},{start:{line:148,column:37},end:{line:148,column:38}}],line:148},24:{loc:{start:{line:149,column:19},end:{line:149,column:39}},type:"binary-expr",locations:[{start:{line:149,column:19},end:{line:149,column:33}},{start:{line:149,column:37},end:{line:149,column:39}}],line:149},25:{loc:{start:{line:150,column:18},end:{line:150,column:40}},type:"binary-expr",locations:[{start:{line:150,column:18},end:{line:150,column:31}},{start:{line:150,column:35},end:{line:150,column:40}}],line:150},26:{loc:{start:{line:151,column:20},end:{line:151,column:42}},type:"binary-expr",locations:[{start:{line:151,column:20},end:{line:151,column:35}},{start:{line:151,column:39},end:{line:151,column:42}}],line:151},27:{loc:{start:{line:156,column:15},end:{line:156,column:72}},type:"binary-expr",locations:[{start:{line:156,column:15},end:{line:156,column:25}},{start:{line:156,column:29},end:{line:156,column:72}}],line:156},28:{loc:{start:{line:161,column:17},end:{line:161,column:80}},type:"binary-expr",locations:[{start:{line:161,column:17},end:{line:161,column:29}},{start:{line:161,column:33},end:{line:161,column:80}}],line:161},29:{loc:{start:{line:162,column:19},end:{line:162,column:38}},type:"binary-expr",locations:[{start:{line:162,column:19},end:{line:162,column:33}},{start:{line:162,column:37},end:{line:162,column:38}}],line:162},30:{loc:{start:{line:163,column:19},end:{line:163,column:39}},type:"binary-expr",locations:[{start:{line:163,column:19},end:{line:163,column:33}},{start:{line:163,column:37},end:{line:163,column:39}}],line:163},31:{loc:{start:{line:164,column:20},end:{line:164,column:42}},type:"binary-expr",locations:[{start:{line:164,column:20},end:{line:164,column:35}},{start:{line:164,column:39},end:{line:164,column:42}}],line:164}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0,0,0,0,0,0,0,0,0,0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0,0],27:[0,0],28:[0,0],29:[0,0],30:[0,0],31:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/modals/ModalSources.tsx"],names:[],mappings:"AAiCU,cACA,YADA;AAjCV,OAAO,WAAW;AAClB,SAAQ,oBAAoB,gBAAe;AAC3C,OAAO,YAAY;AAEnB,SAA+B,uBAAuB;AAEtD,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,4BAAiD;AAExD,OAAO,WAAW;AAClB,SAAS,cAAc,WAAW,oBAAoB;AACtD,OAAO,mBAAmB;AAW1B,MAAM,qBAAqB,MAAM,UAA6B;AAAA,EAC5D,SAAS;AACP,WAAO,oBAAC,SAAI,WAAU,0BACpB;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,SAAS,MAAM,KAAK,MAAM,SAAS,KAAK,MAAM,EAAE;AAAA,QAEhD;AAAA,+BAAC,SAAI,WAAU,+BACb;AAAA,gCAAC,OAAE,WAAU,+BAA+B,eAAK,MAAM,OAAM;AAAA,YAC7D,qBAAC,OAAE,WAAU,6BAA4B;AAAA;AAAA,cAAE,KAAK,MAAM;AAAA,eAAG;AAAA,aAC3D;AAAA,UACA,oBAAC,UAAK,WAAU,kBAAiB;AAAA,UACjC,oBAAC,sBAAmB;AAAA;AAAA;AAAA,IACtB,GACF;AAAA,EACF;AACF;AAEA,SAAS,WAAW,QAA6B;AAC/C,MAAG,OAAO,SAAS,UAAU;AAC3B,QAAG,OAAO,MAAO,QAAO;AACxB,WAAO;AAAA,EACT;AACA,MAAG,OAAO,SAAS,cAAc;AAC/B,QAAG,OAAO,MAAO,QAAO;AACxB,WAAO;AAAA,EACT;AACA,MAAG,OAAO,SAAS,UAAU;AAC3B,QAAG,OAAO,MAAO,QAAO;AACxB,QAAG,OAAO,OAAO,OAAO,IAAI,WAAW,YAAY,EAAG,QAAO;AAC7D,WAAO;AAAA,EACT;AACA,MAAG,OAAO,SAAS,WAAW;AAC5B,QAAI,OAAO,OAAO,SAAU,UAAU;AACpC,aAAO;AAAA,IACT,OACK;AACH,aAAO;AAAA,IACT;AAAA,EACF;AACA,MAAG,OAAO,SAAS,SAAS;AAC1B,WAAO;AAAA,EACT;AACA,MAAG,OAAO,SAAS,SAAS;AAC1B,WAAO;AAAA,EACT;AACA,SAAO;AACT;AASA,MAAM,qCAAqC,MAAM,UAA6C;AAAA,EAC5F,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SAAI,WAAU,sCACpB;AAAA,2BAAC,SAAI,WAAU,6CACb;AAAA,6BAAC,UAAK,WAAU,gDAA+C;AAAA;AAAA,UAAE,KAAK,MAAM;AAAA,WAAS;AAAA,QACrF,oBAAC,UAAK,WAAU,kBAAiB;AAAA,QACjC;AAAA,UAAC;AAAA;AAAA,YACC,cAAY,EAAE,gCAAgC,EAAC,UAAU,KAAK,MAAM,SAAQ,CAAC;AAAA,YAC7E,WAAU;AAAA,YACV,SAAS,MAAK,KAAK,MAAM,SAAS,KAAK,MAAM,QAAQ;AAAA,YACrD,OAAO,EAAC,iBAAiB,cAAa;AAAA,YAEtC,8BAAC,YAAS;AAAA;AAAA,QACZ;AAAA,SACF;AAAA,MACA,oBAAC,SAAI,WAAU,8CACb;AAAA,QAAC;AAAA;AAAA,UACC,UAAU,KAAK,MAAM;AAAA,UACrB,MAAM,WAAW,KAAK,MAAM,MAAM;AAAA,UAClC,QAAQ,KAAK,MAAM;AAAA;AAAA,MACrB,GACF;AAAA,OACF;AAAA,EACF;AACF;AAYA,MAAM,kBAAkB,MAAM,UAA0C;AAAA,EACtE,YAAY,OAAuB;AACjC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,MAAM;AAAA,MACN,UAAU,MAAM,WAAW;AAAA,MAC3B,QAAQ,KAAK,cAAc,iBAAiB;AAAA,IAC9C;AAAA,EACF;AAAA,EAEA,cAAc,MAAuC;AACnD,UAAM,UAAU,KAAK,SAAS,CAAC,GAAG,UAAU,CAAC;AAC7C,UAAM,EAAC,SAAQ,IAAI,OAAO;AAE1B,YAAO,MAAM;AAAA,MACX,KAAK;AAAkB,eAAO;AAAA,UAC5B,MAAM;AAAA,UACN,KAAK,GAAG,QAAQ;AAAA,QAClB;AAAA,MACA,KAAK;AAAe,eAAO;AAAA,UACzB,MAAM;AAAA,UACN,MAAM,GAAG,QAAQ;AAAA,QACnB;AAAA,MACA,KAAK;AAAgB,eAAO;AAAA,UAC1B,MAAM;AAAA,UACN,SAAU,OAAsC,WAAW;AAAA,UAC3D,MAAM;AAAA,QACR;AAAA,MACA,KAAK;AAAmB,eAAO;AAAA,UAC7B,MAAM;AAAA,UACN,KAAM,OAAqC,OAAO,GAAG,QAAQ;AAAA,QAC/D;AAAA,MACA,KAAK;AAAe,eAAO;AAAA,UACzB,MAAM;AAAA,UACN,OAAQ,OAAqC,SAAS,CAAC,GAAG,QAAQ,kCAAkC;AAAA,UACpG,SAAU,OAAqC,WAAW;AAAA,UAC1D,SAAU,OAAqC,WAAW;AAAA,UAC1D,QAAS,OAAqC,UAAU;AAAA,QAC1D;AAAA,MACA,KAAK;AAAmB,eAAO;AAAA,UAC7B,MAAM;AAAA,UACN,KAAM,OAAqC,OAAO,GAAG,QAAQ;AAAA,QAC/D;AAAA,MACA,KAAK;AAAe,eAAO;AAAA,UACzB,MAAM;AAAA,UACN,OAAQ,OAAqC,SAAS,CAAC,GAAG,QAAQ,kCAAkC;AAAA,UACpG,SAAU,OAAqC,WAAW;AAAA,UAC1D,SAAU,OAAqC,WAAW;AAAA,UAC1D,QAAS,OAAqC,UAAU;AAAA,UACxD,UAAW,OAAqC,YAAY;AAAA,QAC9D;AAAA,MACA,KAAK;AAAuB,eAAO;AAAA,UACjC,MAAM;AAAA,UACN,KAAM,OAAwC,OAAO,GAAG,QAAQ;AAAA,QAClE;AAAA,MACA,KAAK;AAAsB,eAAO;AAAA,UAChC,MAAM;AAAA,UACN,OAAQ,OAAwC,SAAS,CAAC,GAAG,QAAQ,kCAAkC;AAAA,UACvG,SAAU,OAAwC,WAAW;AAAA,UAC7D,SAAU,OAAwC,WAAW;AAAA,UAC7D,UAAW,OAAwC,YAAY;AAAA,QACjE;AAAA,MACA,KAAK;AAAS,eAAO;AAAA,UACnB,MAAM;AAAA,UACN,KAAK,GAAG,QAAQ;AAAA,UAChB,aAAa;AAAA,YACX,CAAC,GAAE,CAAC;AAAA,YACJ,CAAC,GAAE,CAAC;AAAA,YACJ,CAAC,GAAE,CAAC;AAAA,YACJ,CAAC,GAAE,CAAC;AAAA,UACN;AAAA,QACF;AAAA,MACA,KAAK;AAAS,eAAO;AAAA,UACnB,MAAM;AAAA,UACN,MAAM;AAAA,YACJ,GAAG,QAAQ;AAAA,UACb;AAAA,UACA,aAAa;AAAA,YACX,CAAC,GAAE,CAAC;AAAA,YACJ,CAAC,GAAE,CAAC;AAAA,YACJ,CAAC,GAAE,CAAC;AAAA,YACJ,CAAC,GAAE,CAAC;AAAA,UACN;AAAA,QACF;AAAA,MACA;AAAS,eAAO,CAAC;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,QAAQ,MAAM;AACZ,UAAM,EAAC,QAAQ,SAAQ,IAAI,KAAK;AAChC,SAAK,MAAM,MAAM,UAAU,MAAM;AAAA,EACnC;AAAA,EAEA,iBAAiB,CAAC,WAAgC;AAChD,SAAK,SAAS,EAAC,OAAM,CAAC;AAAA,EACxB;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AAQrB,UAAM,sBAAsB;AAAA,MAC1B,KAAK,OAAO,cAAc,KAAK;AAAA,IACjC;AAEA,WAAO,qBAAC,SAAI,WAAU,uBACpB;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,WAAW;AAAA,UACpB,WAAW,EAAC,KAAK,EAAE,wFAAwF,EAAC;AAAA,UAC5G,OAAO,KAAK,MAAM;AAAA,UAClB,UAAU,CAAC,MAAc,KAAK,SAAS,EAAE,UAAU,EAAC,CAAC;AAAA,UACrD,eAAY;AAAA;AAAA,MACd;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,aAAa;AAAA,UACtB,WAAW;AAAA,UACX,SAAS;AAAA,YACP,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;AAAA,YACpC,CAAC,eAAe,EAAE,eAAe,CAAC;AAAA,YAClC,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;AAAA,YAC9C,CAAC,eAAe,EAAE,oBAAoB,CAAC;AAAA,YACvC,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;AAAA,YAC9C,CAAC,eAAe,EAAE,oBAAoB,CAAC;AAAA,YACvC,CAAC,uBAAuB,EAAE,2BAA2B,CAAC;AAAA,YACtD,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;AAAA,YACjD,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;AAAA,YACxC,CAAC,SAAS,EAAE,OAAO,CAAC;AAAA,YACpB,CAAC,SAAS,EAAE,OAAO,CAAC;AAAA,UACtB;AAAA,UACA,UAAU,UAAQ,KAAK,SAAS,EAAC,MAA0B,QAAQ,KAAK,cAAc,IAAkB,EAAC,CAAC;AAAA,UAC1G,OAAO,KAAK,MAAM;AAAA,UAClB,eAAY;AAAA;AAAA,MACd;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,UAAU,KAAK;AAAA,UACf,MAAM,KAAK,MAAM;AAAA,UACjB,QAAQ,KAAK,MAAM;AAAA;AAAA,MACrB;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAS,KAAK;AAAA,UACd,eAAY;AAAA,UAEX,YAAE,YAAY;AAAA;AAAA,MACjB;AAAA,OACF;AAAA,EACF;AACF;AASA,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,WAAW,QAAqE;AAC9E,UAAM,iBAAiB,EAAC,GAAG,OAAM;AACjC,WAAO,eAAe,OAAO;AAC7B,WAAO;AAAA,EACT;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,GAAG,SAAQ,IAAI,KAAK;AAC3B,UAAM,YAAY,EAAC,GAAG,MAAM,KAAK,MAAM,MAAM,QAAQ,KAAK,MAAM,OAAM;AACtE,UAAM,gBAAgB,OAAO,KAAK,SAAS,OAAO,EAAE,IAAI,cAAY;AAClE,YAAM,SAAS,SAAS,QAAQ,QAAQ;AACxC,aAAO;AAAA,QAAC;AAAA;AAAA,UAEN;AAAA,UACA;AAAA,UACA,UAAU,CAAC,QAA6B,KAAK,MAAM,eAAe,aAAa,UAAU,UAAU,GAAG,CAAC;AAAA,UACvG,UAAU,MAAM,KAAK,MAAM,eAAe,aAAa,UAAU,QAAQ,CAAC;AAAA,UACzE,GAAG;AAAA;AAAA,QALC;AAAA,MAMP;AAAA,IACF,CAAC;AAED,UAAM,iBAAiB,OAAO,KAAK,aAAa,EAAE,OAAO,CAAC,aAAqB,EAAE,YAAY,SAAS,QAAQ,EAAE,IAAI,CAAC,aAAqB;AACxI,YAAM,SAAS,cAAc,QAAsC;AACnE,aAAO;AAAA,QAAC;AAAA;AAAA,UAEN,IAAI;AAAA,UACJ,MAAM,OAAO;AAAA,UACb,OAAO,OAAO;AAAA,UACd,UAAU,MAAM,KAAK,MAAM,eAAe,UAAU,UAAU,UAAU,KAAK,WAAW,MAAM,CAAC,CAAC;AAAA;AAAA,QAJ3F;AAAA,MAKP;AAAA,IACF,CAAC;AAED,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,SAAS;AAAA,QAElB;AAAA,+BAAC,aAAQ,WAAU,0BACjB;AAAA,gCAAC,QAAI,YAAE,gBAAgB,GAAE;AAAA,YACxB;AAAA,aACH;AAAA,UAEA,qBAAC,aAAQ,WAAU,0BACjB;AAAA,gCAAC,QAAI,YAAE,sBAAsB,GAAE;AAAA,YAC/B,oBAAC,OACE,YAAE,0DAA0D,GAC/D;AAAA,YACA,oBAAC,SAAI,WAAU,2BAA0B,OAAO,EAAC,UAAU,IAAG,GAC3D,0BACH;AAAA,aACF;AAAA,UAEA,qBAAC,aAAQ,WAAU,0BACjB;AAAA,gCAAC,QAAI,YAAE,gBAAgB,GAAE;AAAA,YACzB,oBAAC,OAAG,YAAE,8FAA8F,GAAE;AAAA,YACtG;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,CAAC,UAAkB,WAAgC,KAAK,MAAM,eAAe,UAAU,UAAU,UAAU,MAAM,CAAC;AAAA,gBACxH,GAAG;AAAA;AAAA,YACN;AAAA,aACF;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"30dc2f79b5d8eab063b35a7a783386d299d39465"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Qt=function(){return s},s}Qt();class cPe extends En.Component{render(){return Qt().f[0]++,Qt().s[0]++,ie.jsx("div",{className:"maputnik-public-source",children:ie.jsxs(Js,{className:"maputnik-public-source-select",onClick:()=>(Qt().f[1]++,Qt().s[1]++,this.props.onSelect(this.props.id)),children:[ie.jsxs("div",{className:"maputnik-public-source-info",children:[ie.jsx("p",{className:"maputnik-public-source-name",children:this.props.title}),ie.jsxs("p",{className:"maputnik-public-source-id",children:["#",this.props.id]})]}),ie.jsx("span",{className:"maputnik-space"}),ie.jsx(DX,{})]})})}}function APe(n){return Qt().f[2]++,Qt().s[2]++,n.type==="raster"?(Qt().b[0][0]++,Qt().s[3]++,n.tiles?(Qt().b[1][0]++,Qt().s[4]++,"tile_raster"):(Qt().b[1][1]++,Qt().s[5]++,"tilejson_raster")):(Qt().b[0][1]++,Qt().s[6]++,n.type==="raster-dem"?(Qt().b[2][0]++,Qt().s[7]++,n.tiles?(Qt().b[3][0]++,Qt().s[8]++,"tilexyz_raster-dem"):(Qt().b[3][1]++,Qt().s[9]++,"tilejson_raster-dem")):(Qt().b[2][1]++,Qt().s[10]++,n.type==="vector"?(Qt().b[4][0]++,Qt().s[11]++,n.tiles?(Qt().b[5][0]++,Qt().s[12]++,"tile_vector"):(Qt().b[5][1]++,Qt().s[13]++,Qt().b[7][0]++,n.url&&(Qt().b[7][1]++,n.url.startsWith("pmtiles://"))?(Qt().b[6][0]++,Qt().s[14]++,"pmtiles_vector"):(Qt().b[6][1]++,Qt().s[15]++,"tilejson_vector"))):(Qt().b[4][1]++,Qt().s[16]++,n.type==="geojson"?(Qt().b[8][0]++,Qt().s[17]++,typeof n.data=="string"?(Qt().b[9][0]++,Qt().s[18]++,"geojson_url"):(Qt().b[9][1]++,Qt().s[19]++,"geojson_json")):(Qt().b[8][1]++,Qt().s[20]++,n.type==="image"?(Qt().b[10][0]++,Qt().s[21]++,"image"):(Qt().b[10][1]++,Qt().s[22]++,n.type==="video"?(Qt().b[11][0]++,Qt().s[23]++,"video"):(Qt().b[11][1]++,Qt().s[24]++,null))))))}class hPe extends En.Component{render(){Qt().f[3]++;const e=(Qt().s[25]++,this.props.t);return Qt().s[26]++,ie.jsxs("div",{className:"maputnik-active-source-type-editor",children:[ie.jsxs("div",{className:"maputnik-active-source-type-editor-header",children:[ie.jsxs("span",{className:"maputnik-active-source-type-editor-header-id",children:["#",this.props.sourceId]}),ie.jsx("span",{className:"maputnik-space"}),ie.jsx(Js,{"aria-label":e("Remove '{{sourceId}}' source",{sourceId:this.props.sourceId}),className:"maputnik-active-source-type-editor-header-delete",onClick:()=>(Qt().f[4]++,Qt().s[27]++,this.props.onDelete(this.props.sourceId)),style:{backgroundColor:"transparent"},children:ie.jsx(Kb,{})})]}),ie.jsx("div",{className:"maputnik-active-source-type-editor-content",children:ie.jsx(Hse,{onChange:this.props.onChange,mode:APe(this.props.source),source:this.props.source})})]})}}class dPe extends En.Component{constructor(e){Qt().f[5]++,Qt().s[28]++,super(e),Qt().s[29]++,this.state={mode:"tilejson_vector",sourceId:id.generateId(),source:this.defaultSource("tilejson_vector")}}defaultSource(e){Qt().f[6]++;const t=(Qt().s[30]++,Qt().b[12][0]++,(Qt().b[13][0]++,this.state||(Qt().b[13][1]++,{})).source||(Qt().b[12][1]++,{})),{protocol:i}=(Qt().s[31]++,window.location);switch(Qt().s[32]++,e){case"pmtiles_vector":return Qt().b[14][0]++,Qt().s[33]++,{type:"vector",url:`${i}//localhost:3000/file.pmtiles`};case"geojson_url":return Qt().b[14][1]++,Qt().s[34]++,{type:"geojson",data:`${i}//localhost:3000/geojson.json`};case"geojson_json":return Qt().b[14][2]++,Qt().s[35]++,{type:"geojson",cluster:(Qt().b[15][0]++,t.cluster||(Qt().b[15][1]++,!1)),data:""};case"tilejson_vector":return Qt().b[14][3]++,Qt().s[36]++,{type:"vector",url:(Qt().b[16][0]++,t.url||(Qt().b[16][1]++,`${i}//localhost:3000/tilejson.json`))};case"tile_vector":return Qt().b[14][4]++,Qt().s[37]++,{type:"vector",tiles:(Qt().b[17][0]++,t.tiles||(Qt().b[17][1]++,[`${i}//localhost:3000/{x}/{y}/{z}.pbf`])),minzoom:(Qt().b[18][0]++,t.minzoom||(Qt().b[18][1]++,0)),maxzoom:(Qt().b[19][0]++,t.maxzoom||(Qt().b[19][1]++,14)),scheme:(Qt().b[20][0]++,t.scheme||(Qt().b[20][1]++,"xyz"))};case"tilejson_raster":return Qt().b[14][5]++,Qt().s[38]++,{type:"raster",url:(Qt().b[21][0]++,t.url||(Qt().b[21][1]++,`${i}//localhost:3000/tilejson.json`))};case"tile_raster":return Qt().b[14][6]++,Qt().s[39]++,{type:"raster",tiles:(Qt().b[22][0]++,t.tiles||(Qt().b[22][1]++,[`${i}//localhost:3000/{x}/{y}/{z}.png`])),minzoom:(Qt().b[23][0]++,t.minzoom||(Qt().b[23][1]++,0)),maxzoom:(Qt().b[24][0]++,t.maxzoom||(Qt().b[24][1]++,14)),scheme:(Qt().b[25][0]++,t.scheme||(Qt().b[25][1]++,"xyz")),tileSize:(Qt().b[26][0]++,t.tileSize||(Qt().b[26][1]++,512))};case"tilejson_raster-dem":return Qt().b[14][7]++,Qt().s[40]++,{type:"raster-dem",url:(Qt().b[27][0]++,t.url||(Qt().b[27][1]++,`${i}//localhost:3000/tilejson.json`))};case"tilexyz_raster-dem":return Qt().b[14][8]++,Qt().s[41]++,{type:"raster-dem",tiles:(Qt().b[28][0]++,t.tiles||(Qt().b[28][1]++,[`${i}//localhost:3000/{x}/{y}/{z}.png`])),minzoom:(Qt().b[29][0]++,t.minzoom||(Qt().b[29][1]++,0)),maxzoom:(Qt().b[30][0]++,t.maxzoom||(Qt().b[30][1]++,14)),tileSize:(Qt().b[31][0]++,t.tileSize||(Qt().b[31][1]++,512))};case"image":return Qt().b[14][9]++,Qt().s[42]++,{type:"image",url:`${i}//localhost:3000/image.png`,coordinates:[[0,0],[0,0],[0,0],[0,0]]};case"video":return Qt().b[14][10]++,Qt().s[43]++,{type:"video",urls:[`${i}//localhost:3000/movie.mp4`],coordinates:[[0,0],[0,0],[0,0],[0,0]]};default:return Qt().b[14][11]++,Qt().s[44]++,{}}}onAdd=(Qt().s[45]++,()=>{Qt().f[7]++;const{source:e,sourceId:t}=(Qt().s[46]++,this.state);Qt().s[47]++,this.props.onAdd(t,e)});onChangeSource=(Qt().s[48]++,e=>{Qt().f[8]++,Qt().s[49]++,this.setState({source:e})});render(){Qt().f[9]++;const e=(Qt().s[50]++,this.props.t),t=(Qt().s[51]++,{doc:Jr.source_vector.type.doc});return Qt().s[52]++,ie.jsxs("div",{className:"maputnik-add-source",children:[ie.jsx(qh,{label:e("Source ID"),fieldSpec:{doc:e("Unique ID that identifies the source and is used in the layer to reference the source.")},value:this.state.sourceId,onChange:i=>(Qt().f[10]++,Qt().s[53]++,this.setState({sourceId:i})),"data-wd-key":"modal:sources.add.source_id"}),ie.jsx(S4,{label:e("Source Type"),fieldSpec:t,options:[["geojson_json",e("GeoJSON (JSON)")],["geojson_url",e("GeoJSON (URL)")],["tilejson_vector",e("Vector (TileJSON URL)")],["tile_vector",e("Vector (Tile URLs)")],["tilejson_raster",e("Raster (TileJSON URL)")],["tile_raster",e("Raster (Tile URLs)")],["tilejson_raster-dem",e("Raster DEM (TileJSON URL)")],["tilexyz_raster-dem",e("Raster DEM (XYZ URLs)")],["pmtiles_vector",e("Vector (PMTiles)")],["image",e("Image")],["video",e("Video")]],onChange:i=>(Qt().f[11]++,Qt().s[54]++,this.setState({mode:i,source:this.defaultSource(i)})),value:this.state.mode,"data-wd-key":"modal:sources.add.source_type"}),ie.jsx(Hse,{onChange:this.onChangeSource,mode:this.state.mode,source:this.state.source}),ie.jsx(Js,{className:"maputnik-add-source-button",onClick:this.onAdd,"data-wd-key":"modal:sources.add.add_source",children:e("Add Source")})]})}}class fPe extends En.Component{stripTitle(e){Qt().f[12]++;const t=(Qt().s[55]++,{...e});return Qt().s[56]++,delete t.title,Qt().s[57]++,t}render(){Qt().f[13]++;const{t:e,mapStyle:t}=(Qt().s[58]++,this.props),i=(Qt().s[59]++,{t:e,i18n:this.props.i18n,tReady:this.props.tReady}),r=(Qt().s[60]++,Object.keys(t.sources).map(s=>{Qt().f[14]++;const a=(Qt().s[61]++,t.sources[s]);return Qt().s[62]++,ie.jsx(hPe,{sourceId:s,source:a,onChange:c=>(Qt().f[15]++,Qt().s[63]++,this.props.onStyleChanged(Zse(t,s,c))),onDelete:()=>(Qt().f[16]++,Qt().s[64]++,this.props.onStyleChanged(rPe(t,s))),...i},s)})),o=(Qt().s[65]++,Object.keys(LV).filter(s=>(Qt().f[17]++,Qt().s[66]++,!(s in t.sources))).map(s=>{Qt().f[18]++;const a=(Qt().s[67]++,LV[s]);return Qt().s[68]++,ie.jsx(cPe,{id:s,type:a.type,title:a.title,onSelect:()=>(Qt().f[19]++,Qt().s[69]++,this.props.onStyleChanged(KV(t,s,this.stripTitle(a))))},s)}));return Qt().s[70]++,ie.jsxs(a1,{"data-wd-key":"modal:sources",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Sources"),children:[ie.jsxs("section",{className:"maputnik-modal-section",children:[ie.jsx("h1",{children:e("Active Sources")}),r]}),ie.jsxs("section",{className:"maputnik-modal-section",children:[ie.jsx("h1",{children:e("Choose Public Source")}),ie.jsx("p",{children:e("Add one of the publicly available sources to your style.")}),ie.jsx("div",{className:"maputnik-public-sources",style:{maxWidth:500},children:o})]}),ie.jsxs("section",{className:"maputnik-modal-section",children:[ie.jsx("h1",{children:e("Add New Source")}),ie.jsx("p",{children:e("Add a new source to your style. You can only choose the source type and id at creation time!")}),ie.jsx(dPe,{onAdd:(s,a)=>(Qt().f[20]++,Qt().s[71]++,this.props.onStyleChanged(KV(t,s,a))),...i})]})]})}}const pPe=(Qt().s[72]++,Jo()(fPe));function fg(){var n="/home/runner/work/maputnik/maputnik/src/components/modals/ModalLoading.tsx",e="14882741b03cd24dba8e21fe7c0f0c38039a7560",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/modals/ModalLoading.tsx",statementMap:{0:{start:{line:8,column:14},end:{line:8,column:26}},1:{start:{line:9,column:4},end:{line:22,column:6}},2:{start:{line:16,column:28},end:{line:16,column:49}},3:{start:{line:19,column:137},end:{line:19,column:159}},4:{start:{line:25,column:21},end:{line:25,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:11},end:{line:23,column:3}},line:7},1:{name:"(anonymous_1)",decl:{start:{line:16,column:22},end:{line:16,column:23}},loc:{start:{line:16,column:28},end:{line:16,column:49}},line:16},2:{name:"(anonymous_2)",decl:{start:{line:19,column:130},end:{line:19,column:131}},loc:{start:{line:19,column:137},end:{line:19,column:159}},line:19}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/modals/ModalLoading.tsx"],names:[],mappings:"AAkBW,SAOL,KAPK;AAlBX,OAAO,WAAW;AAClB,SAA+B,uBAAuB;AAEtD,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAWlB,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,oBAAoB;AAAA,QACpB,OAAO,KAAK,MAAM;AAAA,QAClB,cAAc,MAAM,KAAK,MAAM,SAAS;AAAA,QAExC;AAAA,8BAAC,OACE,eAAK,MAAM,SACd;AAAA,UACA,oBAAC,OAAE,WAAU,4BACX,8BAAC,eAAY,SAAS,CAAC,MAAM,KAAK,MAAM,SAAS,CAAC,GAC/C,YAAE,QAAQ,GACb,GACF;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"14882741b03cd24dba8e21fe7c0f0c38039a7560"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return fg=function(){return s},s}fg();class mPe extends En.Component{render(){fg().f[0]++;const e=(fg().s[0]++,this.props.t);return fg().s[1]++,ie.jsxs(a1,{"data-wd-key":"modal:loading",isOpen:this.props.isOpen,underlayClickExits:!1,title:this.props.title,onOpenToggle:()=>(fg().f[1]++,fg().s[2]++,this.props.onCancel()),children:[ie.jsx("p",{children:this.props.message}),ie.jsx("p",{className:"maputnik-dialog__buttons",children:ie.jsx(Js,{onClick:t=>(fg().f[2]++,fg().s[3]++,this.props.onCancel(t)),children:e("Cancel")})})]})}}const gPe=(fg().s[4]++,Jo()(mPe)),Xse=[{id:"0-empty-style",title:"Empty Style",url:"https://cdn.jsdelivr.net/gh/maputnik/editor@9cf74ca405d2be0608b57db8109cf3a6af5b9f49/src/config/empty-style.json",thumbnail:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAQAAAAHDYbIAAAAEUlEQVR42mP8/58BDhiJ4wAA974H/U5Xe1oAAAAASUVORK5CYII="},{id:"americana",title:"Americana",url:"https://americanamap.org/style.json",thumbnail:"https://github.com/maplibre/maputnik/assets/649392/23fa75ad-63e6-43f5-8837-03cdb0428bac"},{id:"aws-hybrid",title:"AWS Hybrid",url:"https://maps.geo.eu-west-1.amazonaws.com/v2/styles/Hybrid/descriptor?key=v1.public.eyJqdGkiOiJiOTNkYjBlZi04OWUzLTQxMGUtODFhMC0zYjZjZjVmZWZmMDgifYtukap0NBaJpcrS6Vit9j03GJgK9Bn-RSu5UCe3jkdSql2kKp3IEgLPtyLssbmKUdVO11sXddjK3ZOZy8V6QG0olv0K_1tOxyMIe4DAO3IV6H4VzHWiaXlbSakGiEgFLuHBdcfLDeMotye7N6rSRxuZb0CN9ytH9VjLly6-NEBRZezO_qPQyvdTFdeZsARIpL0f9YVpxPxPVvUcAWYCk5LpaPseRCDPrY5SlCdA1ZKqUA4F9RzxSTxB73Fel_SoNDkCNaux1VposBu791-uUpDzUpr7leKckrPXrpZ2hwnFbafVxFV9vq4fLTpB5KoBksuLfGNIwAx1RLLxWuMhE4c.ZGQzZDY2OGQtMWQxMy00ZTEwLWIyZGUtOGVjYzUzMjU3OGE4&color-scheme=Light",thumbnail:"https://maputnik.s3.eu-west-1.amazonaws.com/thumbnails/aws-hybrid.jpg"},{id:"aws-standard",title:"AWS Standard",url:"https://maps.geo.eu-west-1.amazonaws.com/v2/styles/Standard/descriptor?key=v1.public.eyJqdGkiOiJiOTNkYjBlZi04OWUzLTQxMGUtODFhMC0zYjZjZjVmZWZmMDgifYtukap0NBaJpcrS6Vit9j03GJgK9Bn-RSu5UCe3jkdSql2kKp3IEgLPtyLssbmKUdVO11sXddjK3ZOZy8V6QG0olv0K_1tOxyMIe4DAO3IV6H4VzHWiaXlbSakGiEgFLuHBdcfLDeMotye7N6rSRxuZb0CN9ytH9VjLly6-NEBRZezO_qPQyvdTFdeZsARIpL0f9YVpxPxPVvUcAWYCk5LpaPseRCDPrY5SlCdA1ZKqUA4F9RzxSTxB73Fel_SoNDkCNaux1VposBu791-uUpDzUpr7leKckrPXrpZ2hwnFbafVxFV9vq4fLTpB5KoBksuLfGNIwAx1RLLxWuMhE4c.ZGQzZDY2OGQtMWQxMy00ZTEwLWIyZGUtOGVjYzUzMjU3OGE4&color-scheme=Light",thumbnail:"https://maputnik.s3.eu-west-1.amazonaws.com/thumbnails/aws-standard.jpg"},{id:"dark-matter",title:"Dark Matter",url:"https://cdn.jsdelivr.net/gh/openmaptiles/dark-matter-gl-style@v1.9/style.json",thumbnail:"https://maputnik.github.io/thumbnails/dark-matter.png"},{id:"locationiq-streets",title:"LocationIQ Streets",url:"https://tiles.locationiq.com/v3/streets/vector.json?key={key}",thumbnail:"https://static-assets.locationiq.com/maputnik/locationiq-streets.png"},{id:"maptiler-basic-gl-style",title:"MapTiler Basic",url:"https://cdn.jsdelivr.net/gh/openmaptiles/klokantech-basic-gl-style@v1.10/style.json",thumbnail:"https://maputnik.github.io/thumbnails/klokantech-basic.png"},{id:"maptiler-toner-gl-style",title:"Toner",url:"https://cdn.jsdelivr.net/gh/openmaptiles/toner-gl-style@v1.0/style.json",thumbnail:"https://maputnik.github.io/thumbnails/toner.png"},{id:"osm-bright",title:"OSM Bright",url:"https://cdn.jsdelivr.net/gh/openmaptiles/osm-bright-gl-style@v1.11/style.json",thumbnail:"https://maputnik.github.io/thumbnails/osm-bright.png"},{id:"osm-liberty",title:"OSM Liberty",url:"https://maputnik.github.io/osm-liberty/style.json",thumbnail:"https://maputnik.github.io/thumbnails/osm-liberty.png"},{id:"osm-openmaptiles",title:"OSM OpenMapTiles",url:"https://api.maptiler.com/maps/openstreetmap/style.json?key=get_your_own_OpIi9ZULNHzrESv6T2vL",thumbnail:"https://openmaptiles.org/img/styles/openmaptiles.png"},{id:"positron",title:"Positron",url:"https://cdn.jsdelivr.net/gh/openmaptiles/positron-gl-style@v1.9/style.json",thumbnail:"https://maputnik.github.io/thumbnails/positron.png"},{id:"protomaps-light",title:"Protomaps Light",url:"https://api.protomaps.com/styles/v4/light/en.json?key=d828297496b11844",thumbnail:"https://github.com/user-attachments/assets/911f9765-4a7d-4736-9ec0-f2d4c90ae587"},{id:"stadia-outdoors",title:"Stadia Outdoors",url:"https://tiles.stadiamaps.com/styles/outdoors.json",thumbnail:"https://tiles.stadiamaps.com/static/outdoors.png?size=480x320&center=47.350259,8.49035&zoom=16"},{id:"versatiles-colorful",title:"Versatiles Colorful",url:"https://tiles.versatiles.org/assets/styles/colorful/style.json",thumbnail:"https://github.com/maplibre/maputnik/assets/649392/6cd69818-c541-46e4-a920-65fb4f654931"}];function vn(){var n="/home/runner/work/maputnik/maputnik/src/components/modals/ModalOpen.tsx",e="f3a6249e96d42fc8e59bc18fb123f3ec8de2b220",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/modals/ModalOpen.tsx",statementMap:{0:{start:{line:14,column:4},end:{line:37,column:9}},1:{start:{line:19,column:23},end:{line:19,column:58}},2:{start:{line:42,column:4},end:{line:42,column:17}},3:{start:{line:43,column:4},end:{line:45,column:6}},4:{start:{line:48,column:4},end:{line:50,column:7}},5:{start:{line:53,column:4},end:{line:53,column:31}},6:{start:{line:53,column:11},end:{line:53,column:31}},7:{start:{line:54,column:4},end:{line:60,column:5}},8:{start:{line:55,column:6},end:{line:55,column:39}},9:{start:{line:56,column:6},end:{line:59,column:9}},10:{start:{line:62,column:18},end:{line:99,column:3}},11:{start:{line:63,column:4},end:{line:63,column:22}},12:{start:{line:64,column:19},end:{line:64,column:24}},13:{start:{line:65,column:4},end:{line:90,column:7}},14:{start:{line:69,column:6},end:{line:69,column:29}},15:{start:{line:71,column:6},end:{line:73,column:7}},16:{start:{line:72,column:8},end:{line:72,column:15}},17:{start:{line:74,column:6},end:{line:77,column:9}},18:{start:{line:78,column:23},end:{line:78,column:54}},19:{start:{line:79,column:6},end:{line:79,column:48}},20:{start:{line:80,column:6},end:{line:80,column:39}},21:{start:{line:81,column:6},end:{line:81,column:26}},22:{start:{line:83,column:6},end:{line:87,column:9}},23:{start:{line:88,column:6},end:{line:88,column:25}},24:{start:{line:89,column:6},end:{line:89,column:61}},25:{start:{line:91,column:4},end:{line:98,column:7}},26:{start:{line:94,column:10},end:{line:94,column:26}},27:{start:{line:100,column:16},end:{line:103,column:3}},28:{start:{line:101,column:4},end:{line:101,column:23}},29:{start:{line:102,column:4},end:{line:102,column:44}},30:{start:{line:104,column:15},end:{line:131,column:3}},31:{start:{line:105,column:4},end:{line:105,column:22}},32:{start:{line:106,column:23},end:{line:114,column:5}},33:{start:{line:115,column:25},end:{line:115,column:68}},34:{start:{line:116,column:17},end:{line:116,column:43}},35:{start:{line:117,column:20},end:{line:117,column:37}},36:{start:{line:119,column:4},end:{line:126,column:5}},37:{start:{line:120,column:6},end:{line:120,column:37}},38:{start:{line:122,column:6},end:{line:124,column:9}},39:{start:{line:125,column:6},end:{line:125,column:13}},40:{start:{line:127,column:4},end:{line:127,column:51}},41:{start:{line:128,column:4},end:{line:128,column:49}},42:{start:{line:129,column:4},end:{line:129,column:24}},43:{start:{line:130,column:4},end:{line:130,column:16}},44:{start:{line:134,column:18},end:{line:156,column:3}},45:{start:{line:135,column:4},end:{line:135,column:23}},46:{start:{line:135,column:16},end:{line:135,column:23}},47:{start:{line:136,column:4},end:{line:136,column:35}},48:{start:{line:136,column:28},end:{line:136,column:35}},49:{start:{line:137,column:17},end:{line:137,column:25}},50:{start:{line:138,column:19},end:{line:138,column:35}},51:{start:{line:139,column:4},end:{line:139,column:22}},52:{start:{line:140,column:4},end:{line:140,column:37}},53:{start:{line:141,column:4},end:{line:154,column:6}},54:{start:{line:143,column:6},end:{line:150,column:7}},55:{start:{line:144,column:8},end:{line:144,column:48}},56:{start:{line:146,column:8},end:{line:148,column:11}},57:{start:{line:149,column:8},end:{line:149,column:15}},58:{start:{line:151,column:6},end:{line:151,column:53}},59:{start:{line:152,column:6},end:{line:152,column:39}},60:{start:{line:153,column:6},end:{line:153,column:26}},61:{start:{line:155,column:4},end:{line:155,column:50}},62:{start:{line:155,column:28},end:{line:155,column:49}},63:{start:{line:158,column:4},end:{line:160,column:7}},64:{start:{line:161,column:4},end:{line:161,column:22}},65:{start:{line:162,column:4},end:{line:162,column:30}},66:{start:{line:164,column:16},end:{line:168,column:3}},67:{start:{line:165,column:4},end:{line:167,column:7}},68:{start:{line:170,column:14},end:{line:170,column:26}},69:{start:{line:171,column:25},end:{line:182,column:6}},70:{start:{line:172,column:6},end:{line:181,column:8}},71:{start:{line:184,column:4},end:{line:189,column:5}},72:{start:{line:185,column:6},end:{line:188,column:11}},73:{start:{line:187,column:61},end:{line:187,column:78}},74:{start:{line:190,column:4},end:{line:272,column:9}},75:{start:{line:196,column:30},end:{line:196,column:49}},76:{start:{line:221,column:146},end:{line:221,column:180}},77:{start:{line:268,column:27},end:{line:268,column:56}},78:{start:{line:275,column:18},end:{line:275,column:54}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:13,column:2},end:{line:13,column:3}},loc:{start:{line:13,column:11},end:{line:38,column:3}},line:13},1:{name:"(anonymous_1)",decl:{start:{line:19,column:17},end:{line:19,column:18}},loc:{start:{line:19,column:23},end:{line:19,column:58}},line:19},2:{name:"(anonymous_2)",decl:{start:{line:41,column:2},end:{line:41,column:3}},loc:{start:{line:41,column:21},end:{line:46,column:3}},line:41},3:{name:"(anonymous_3)",decl:{start:{line:47,column:2},end:{line:47,column:3}},loc:{start:{line:47,column:15},end:{line:51,column:3}},line:47},4:{name:"(anonymous_4)",decl:{start:{line:52,column:2},end:{line:52,column:3}},loc:{start:{line:52,column:27},end:{line:61,column:3}},line:52},5:{name:"(anonymous_5)",decl:{start:{line:62,column:18},end:{line:62,column:19}},loc:{start:{line:62,column:32},end:{line:99,column:3}},line:62},6:{name:"(anonymous_6)",decl:{start:{line:68,column:12},end:{line:68,column:13}},loc:{start:{line:68,column:31},end:{line:70,column:5}},line:68},7:{name:"(anonymous_7)",decl:{start:{line:70,column:12},end:{line:70,column:13}},loc:{start:{line:70,column:22},end:{line:82,column:5}},line:70},8:{name:"(anonymous_8)",decl:{start:{line:82,column:13},end:{line:82,column:14}},loc:{start:{line:82,column:22},end:{line:90,column:5}},line:82},9:{name:"(anonymous_9)",decl:{start:{line:93,column:15},end:{line:93,column:16}},loc:{start:{line:93,column:26},end:{line:95,column:9}},line:93},10:{name:"(anonymous_10)",decl:{start:{line:100,column:16},end:{line:100,column:17}},loc:{start:{line:100,column:23},end:{line:103,column:3}},line:100},11:{name:"(anonymous_11)",decl:{start:{line:104,column:15},end:{line:104,column:16}},loc:{start:{line:104,column:27},end:{line:131,column:3}},line:104},12:{name:"(anonymous_12)",decl:{start:{line:134,column:18},end:{line:134,column:19}},loc:{start:{line:134,column:29},end:{line:156,column:3}},line:134},13:{name:"(anonymous_13)",decl:{start:{line:141,column:20},end:{line:141,column:21}},loc:{start:{line:141,column:27},end:{line:154,column:5}},line:141},14:{name:"(anonymous_14)",decl:{start:{line:155,column:21},end:{line:155,column:22}},loc:{start:{line:155,column:28},end:{line:155,column:49}},line:155},15:{name:"(anonymous_15)",decl:{start:{line:157,column:2},end:{line:157,column:3}},loc:{start:{line:157,column:17},end:{line:163,column:3}},line:157},16:{name:"(anonymous_16)",decl:{start:{line:164,column:16},end:{line:164,column:17}},loc:{start:{line:164,column:25},end:{line:168,column:3}},line:164},17:{name:"(anonymous_17)",decl:{start:{line:169,column:2},end:{line:169,column:3}},loc:{start:{line:169,column:11},end:{line:273,column:3}},line:169},18:{name:"(anonymous_18)",decl:{start:{line:171,column:42},end:{line:171,column:43}},loc:{start:{line:171,column:54},end:{line:182,column:5}},line:171},19:{name:"(anonymous_19)",decl:{start:{line:187,column:55},end:{line:187,column:56}},loc:{start:{line:187,column:61},end:{line:187,column:78}},line:187},20:{name:"(anonymous_20)",decl:{start:{line:196,column:24},end:{line:196,column:25}},loc:{start:{line:196,column:30},end:{line:196,column:49}},line:196},21:{name:"(anonymous_21)",decl:{start:{line:221,column:139},end:{line:221,column:140}},loc:{start:{line:221,column:146},end:{line:221,column:180}},line:221},22:{name:"(anonymous_22)",decl:{start:{line:268,column:20},end:{line:268,column:21}},loc:{start:{line:268,column:27},end:{line:268,column:56}},line:268}},branchMap:{0:{loc:{start:{line:53,column:4},end:{line:53,column:31}},type:"if",locations:[{start:{line:53,column:4},end:{line:53,column:31}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:53},1:{loc:{start:{line:54,column:4},end:{line:60,column:5}},type:"if",locations:[{start:{line:54,column:4},end:{line:60,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:54},2:{loc:{start:{line:71,column:6},end:{line:73,column:7}},type:"if",locations:[{start:{line:71,column:6},end:{line:73,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:71},3:{loc:{start:{line:135,column:4},end:{line:135,column:23}},type:"if",locations:[{start:{line:135,column:4},end:{line:135,column:23}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:135},4:{loc:{start:{line:136,column:4},end:{line:136,column:35}},type:"if",locations:[{start:{line:136,column:4},end:{line:136,column:35}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:136},5:{loc:{start:{line:184,column:4},end:{line:189,column:5}},type:"if",locations:[{start:{line:184,column:4},end:{line:189,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:184},6:{loc:{start:{line:203,column:53},end:{line:222,column:18}},type:"cond-expr",locations:[{start:{line:203,column:119},end:{line:215,column:15}},{start:{line:215,column:34},end:{line:222,column:18}}],line:203}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/modals/ModalOpen.tsx"],names:["style"],mappings:"AA4BQ,SACE,KADF;AA5BR,OAAO,WAA+B;AACtC,SAAQ,oBAAmB;AAC3B,SAAQ,0BAAyB;AACjC,SAAS,OAA6B,uBAAuB;AAE7D,OAAO,kBAAkB;AACzB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,cAAc;AAErB,OAAO,WAAW;AAClB,OAAO,kBAAkB;AASzB,MAAM,oBAAoB,MAAM,UAA4B;AAAA,EAC1D,SAAS;AACP,WAAO,oBAAC,SAAI,WAAU,yBACpB;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,cAAY,KAAK,MAAM;AAAA,QACvB,SAAS,MAAM,KAAK,MAAM,SAAS,KAAK,MAAM,GAAG;AAAA,QAEjD;AAAA,+BAAC,SAAI,WAAU,gCACb;AAAA,gCAAC,SAAK,eAAK,MAAM,OAAM;AAAA,YACvB,oBAAC,UAAK,WAAU,kBAAiB;AAAA,YACjC,oBAAC,sBAAmB;AAAA,aACtB;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,iBAAiB,OAAO,KAAK,MAAM,YAAY;AAAA,cACjD;AAAA;AAAA,UACD;AAAA;AAAA;AAAA,IACH,GACF;AAAA,EACF;AACF;AAgBA,MAAM,0BAA0B,MAAM,UAAkD;AAAA,EACtF,YAAY,OAA+B;AACzC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,EACF;AAAA,EAEA,aAAa;AACX,SAAK,SAAS;AAAA,MACZ,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAAA,EAEA,sBAAsB,GAAU;AAE9B,QAAG,EAAG,GAAE,gBAAgB;AAExB,QAAG,KAAK,MAAM,eAAe;AAC3B,WAAK,MAAM,cAAc,MAAM;AAC/B,WAAK,SAAS;AAAA,QACZ,eAAe;AAAA,QACf,kBAAkB;AAAA,MACpB,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,aAAqB;AACpC,SAAK,WAAW;AAEhB,QAAI,WAAoB;AAExB,UAAM,UAAU;AAAA,MACd,MAAM;AAAA,MACN,aAAa;AAAA,IACf,CAAC,EACE,KAAK,SAAS,UAAU;AACvB,aAAO,SAAS,KAAK;AAAA,IACvB,CAAC,EACA,KAAK,CAAC,SAAS;AACd,UAAG,UAAU;AACX;AAAA,MACF;AAEA,WAAK,SAAS;AAAA,QACZ,eAAe;AAAA,QACf,kBAAkB;AAAA,MACpB,CAAC;AAED,YAAM,WAAW,MAAM,oBAAoB,IAAI;AAC/C,cAAQ,IAAI,iBAAiB,SAAS,EAAE;AACxC,WAAK,MAAM,YAAY,QAAQ;AAC/B,WAAK,aAAa;AAAA,IACpB,CAAC,EACA,MAAM,CAAC,QAAQ;AACd,WAAK,SAAS;AAAA,QACZ,OAAO,oBAAoB,QAAQ;AAAA,QACnC,eAAe;AAAA,QACf,kBAAkB;AAAA,MACpB,CAAC;AACD,cAAQ,MAAM,GAAG;AACjB,cAAQ,KAAK,gCAAgC,QAAQ;AAAA,IACvD,CAAC;AAEH,SAAK,SAAS;AAAA,MACZ,eAAe;AAAA,QACb,OAAO,WAAW;AAChB,qBAAW;AAAA,QACb;AAAA,MACF;AAAA,MACA,kBAAkB;AAAA,IACpB,CAAC;AAAA,EACH;AAAA,EAEA,cAAc,CAAC,MAAkC;AAC/C,MAAE,eAAe;AACjB,SAAK,cAAc,KAAK,MAAM,QAAQ;AAAA,EACxC;AAAA,EAEA,aAAa,YAAY;AACvB,SAAK,WAAW;AAEhB,UAAM,aAAoC;AAAA,MACxC,OAAO;AAAA,QACL;AAAA,UACE,aAAa;AAAA,UACb,QAAQ,EAAE,oBAAoB,CAAC,OAAO,EAAE;AAAA,QAC1C;AAAA,MACF;AAAA,MACA,UAAU;AAAA,IACZ;AAEA,UAAM,CAAC,UAAU,IAAI,MAAM,OAAO,mBAAmB,UAAU;AAC/D,UAAM,OAAO,MAAM,WAAW,QAAQ;AACtC,UAAM,UAAU,MAAM,KAAK,KAAK;AAEhC,QAAI;AACJ,QAAI;AACF,iBAAW,KAAK,MAAM,OAAO;AAAA,IAC/B,SAAS,KAAK;AACZ,WAAK,SAAS;AAAA,QACZ,OAAQ,IAAc,SAAS;AAAA,MACjC,CAAC;AACD;AAAA,IACF;AACA,eAAW,MAAM,oBAAoB,QAAQ;AAE7C,SAAK,MAAM,YAAY,UAAU,UAAU;AAC3C,SAAK,aAAa;AAClB,WAAO;AAAA,EACT;AAAA;AAAA;AAAA,EAIA,gBAAgB,CAAC,UAA2B;AAC1C,QAAI,CAAC,MAAO;AACZ,QAAI,MAAM,WAAW,EAAG;AACxB,UAAM,OAAO,MAAM,CAAC;AACpB,UAAM,SAAS,IAAI,WAAW;AAC9B,SAAK,WAAW;AAEhB,WAAO,WAAW,MAAM,OAAO;AAC/B,WAAO,SAAS,OAAK;AACnB,UAAI;AACJ,UAAI;AACF,mBAAW,KAAK,MAAM,EAAE,QAAQ,MAAgB;AAAA,MAClD,SACM,KAAK;AACT,aAAK,SAAS;AAAA,UACZ,OAAQ,IAAc,SAAS;AAAA,QACjC,CAAC;AACD;AAAA,MACF;AACA,iBAAW,MAAM,oBAAoB,QAAQ;AAC7C,WAAK,MAAM,YAAY,QAAQ;AAC/B,WAAK,aAAa;AAAA,IACpB;AACA,WAAO,UAAU,OAAK,QAAQ,IAAI,EAAE,MAAM;AAAA,EAC5C;AAAA,EAEA,eAAe;AACb,SAAK,SAAS;AAAA,MACZ,UAAU;AAAA,IACZ,CAAC;AACD,SAAK,WAAW;AAChB,SAAK,MAAM,aAAa;AAAA,EAC1B;AAAA,EAEA,cAAc,CAAC,QAAgB;AAC7B,SAAK,SAAS;AAAA,MACZ,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,eAAe,aAAa,IAAI,CAAAA,WAAS;AAC7C,aAAO;AAAA,QAAC;AAAA;AAAA,UAEN,KAAKA,OAAM;AAAA,UACX,OAAOA,OAAM;AAAA,UACb,cAAcA,OAAM;AAAA,UACpB,UAAU,KAAK;AAAA;AAAA,QAJVA,OAAM;AAAA,MAKb;AAAA,IACF,CAAC;AAED,QAAI;AACJ,QAAG,KAAK,MAAM,OAAO;AACnB,qBACE,qBAAC,SAAI,WAAU,wBACZ;AAAA,aAAK,MAAM;AAAA,QACZ,oBAAC,OAAE,MAAK,KAAI,SAAS,MAAM,KAAK,WAAW,GAAG,WAAU,8BAA6B,eAAC;AAAA,SACxF;AAAA,IAEJ;AAEA,WACE,qBAAC,SACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,eAAY;AAAA,UACZ,QAAQ,KAAK,MAAM;AAAA,UACnB,cAAc,MAAM,KAAK,aAAa;AAAA,UACtC,OAAO,EAAE,YAAY;AAAA,UAEpB;AAAA;AAAA,YACD,qBAAC,aAAQ,WAAU,0BACjB;AAAA,kCAAC,QAAI,YAAE,kBAAkB,GAAE;AAAA,cAC3B,oBAAC,OAAG,YAAE,6CAA6C,GAAE;AAAA,cACrD,oBAAC,SACE,iBAAO,OAAO,uBAAuB,aACpC;AAAA,gBAAC;AAAA;AAAA,kBACC,eAAY;AAAA,kBACZ,WAAU;AAAA,kBACV,SAAS,KAAK;AAAA,kBAAY;AAAA,wCAAC,gBAAY;AAAA,oBAAE;AAAA,oBAAE,EAAE,YAAY;AAAA;AAAA;AAAA,cAC3D,IAEA,qBAAC,WACC;AAAA,qCAAC,OAAE,WAAU,0CAAyC,cAAY,EAAE,YAAY,GAAG;AAAA,sCAAC,gBAAa;AAAA,kBAAE;AAAA,kBAAE,EAAE,YAAY;AAAA,mBAAE;AAAA,gBACrH,oBAAC,WAAM,eAAY,yBAAwB,MAAK,QAAO,OAAO,EAAE,SAAS,OAAO,GAAG,UAAU,CAAC,MAAM,KAAK,cAAc,EAAE,OAAO,KAAK,GAAG;AAAA,iBAC1I,GAEJ;AAAA,eACF;AAAA,YAEA,oBAAC,aAAQ,WAAU,0BACjB,+BAAC,UAAK,UAAU,KAAK,aACnB;AAAA,kCAAC,QAAI,YAAE,eAAe,GAAE;AAAA,cACxB,oBAAC,OACC,+BAAC,SAAM,GAAM;AAAA;AAAA,gBACkC,oBAAC,OAAE,MAAK,2BAA0B,QAAO,UAAS,KAAI,uBAAsB,0BAAY;AAAA,gBAAI;AAAA,iBAC3I,GACF;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC,cAAY,EAAE,WAAW;AAAA,kBACzB,eAAY;AAAA,kBACZ,MAAK;AAAA,kBACL,WAAU;AAAA,kBACV,SAAS,EAAE,cAAc;AAAA,kBACzB,OAAO,KAAK,MAAM;AAAA,kBAClB,SAAS,KAAK;AAAA,kBACd,UAAU,KAAK;AAAA;AAAA,cACjB;AAAA,cACA,oBAAC,SACC;AAAA,gBAAC;AAAA;AAAA,kBACC,eAAY;AAAA,kBACZ,MAAK;AAAA,kBACL,WAAU;AAAA,kBACV,UAAU,KAAK,MAAM,SAAS,SAAS;AAAA,kBACxC;AAAA;AAAA,cAAa,GAChB;AAAA,eACF,GACF;AAAA,YAEA,qBAAC,aAAQ,WAAU,yDACjB;AAAA,kCAAC,QAAI,YAAE,gBAAgB,GAAE;AAAA,cACzB,oBAAC,OACE,YAAE,0DAA0D,GAC/D;AAAA,cACA,oBAAC,SAAI,WAAU,oCACZ,wBACH;AAAA,eACF;AAAA;AAAA;AAAA,MACF;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,QAAQ,CAAC,CAAC,KAAK,MAAM;AAAA,UACrB,OAAO,EAAE,eAAe;AAAA,UACxB,UAAU,CAAC,MAAa,KAAK,sBAAsB,CAAC;AAAA,UACpD,SAAS,EAAE,2BAA2B,EAAE,YAAY,KAAK,MAAM,iBAAiB,CAAC;AAAA;AAAA,MACnF;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,MAAM,YAAY,gBAAgB,EAAE,iBAAiB;AACrD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f3a6249e96d42fc8e59bc18fb123f3ec8de2b220"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return vn=function(){return s},s}vn();class yPe extends En.Component{render(){return vn().f[0]++,vn().s[0]++,ie.jsx("div",{className:"maputnik-public-style",children:ie.jsxs(Js,{className:"maputnik-public-style-button","aria-label":this.props.title,onClick:()=>(vn().f[1]++,vn().s[1]++,this.props.onSelect(this.props.url)),children:[ie.jsxs("div",{className:"maputnik-public-style-header",children:[ie.jsx("div",{children:this.props.title}),ie.jsx("span",{className:"maputnik-space"}),ie.jsx(DX,{})]}),ie.jsx("div",{className:"maputnik-public-style-thumbnail",style:{backgroundImage:`url(${this.props.thumbnailUrl})`}})]})})}}class vPe extends En.Component{constructor(e){vn().f[2]++,vn().s[2]++,super(e),vn().s[3]++,this.state={styleUrl:""}}clearError(){vn().f[3]++,vn().s[4]++,this.setState({error:null})}onCancelActiveRequest(e){vn().f[4]++,vn().s[5]++,e?(vn().b[0][0]++,vn().s[6]++,e.stopPropagation()):vn().b[0][1]++,vn().s[7]++,this.state.activeRequest?(vn().b[1][0]++,vn().s[8]++,this.state.activeRequest.abort(),vn().s[9]++,this.setState({activeRequest:null,activeRequestUrl:null})):vn().b[1][1]++}onStyleSelect=(vn().s[10]++,e=>{vn().f[5]++,vn().s[11]++,this.clearError();let t=(vn().s[12]++,!1);vn().s[13]++,fetch(e,{mode:"cors",credentials:"same-origin"}).then(function(i){return vn().f[6]++,vn().s[14]++,i.json()}).then(i=>{if(vn().f[7]++,vn().s[15]++,t){vn().b[2][0]++,vn().s[16]++;return}else vn().b[2][1]++;vn().s[17]++,this.setState({activeRequest:null,activeRequestUrl:null});const r=(vn().s[18]++,id.ensureStyleValidity(i));vn().s[19]++,console.log("Loaded style ",r.id),vn().s[20]++,this.props.onStyleOpen(r),vn().s[21]++,this.onOpenToggle()}).catch(i=>{vn().f[8]++,vn().s[22]++,this.setState({error:`Failed to load: '${e}'`,activeRequest:null,activeRequestUrl:null}),vn().s[23]++,console.error(i),vn().s[24]++,console.warn("Could not open the style URL",e)}),vn().s[25]++,this.setState({activeRequest:{abort:function(){vn().f[9]++,vn().s[26]++,t=!0}},activeRequestUrl:e})});onSubmitUrl=(vn().s[27]++,e=>{vn().f[10]++,vn().s[28]++,e.preventDefault(),vn().s[29]++,this.onStyleSelect(this.state.styleUrl)});onOpenFile=(vn().s[30]++,async()=>{vn().f[11]++,vn().s[31]++,this.clearError();const e=(vn().s[32]++,{types:[{description:"json",accept:{"application/json":[".json"]}}],multiple:!1}),[t]=(vn().s[33]++,await window.showOpenFilePicker(e)),i=(vn().s[34]++,await t.getFile()),r=(vn().s[35]++,await i.text());let o;vn().s[36]++;try{vn().s[37]++,o=JSON.parse(r)}catch(s){vn().s[38]++,this.setState({error:s.toString()}),vn().s[39]++;return}return vn().s[40]++,o=id.ensureStyleValidity(o),vn().s[41]++,this.props.onStyleOpen(o,t),vn().s[42]++,this.onOpenToggle(),vn().s[43]++,i});onFileChanged=(vn().s[44]++,e=>{if(vn().f[12]++,vn().s[45]++,e)vn().b[3][1]++;else{vn().b[3][0]++,vn().s[46]++;return}if(vn().s[47]++,e.length===0){vn().b[4][0]++,vn().s[48]++;return}else vn().b[4][1]++;const t=(vn().s[49]++,e[0]),i=(vn().s[50]++,new FileReader);vn().s[51]++,this.clearError(),vn().s[52]++,i.readAsText(t,"UTF-8"),vn().s[53]++,i.onload=r=>{vn().f[13]++;let o;vn().s[54]++;try{vn().s[55]++,o=JSON.parse(r.target?.result)}catch(s){vn().s[56]++,this.setState({error:s.toString()}),vn().s[57]++;return}vn().s[58]++,o=id.ensureStyleValidity(o),vn().s[59]++,this.props.onStyleOpen(o),vn().s[60]++,this.onOpenToggle()},vn().s[61]++,i.onerror=r=>(vn().f[14]++,vn().s[62]++,console.log(r.target))});onOpenToggle(){vn().f[15]++,vn().s[63]++,this.setState({styleUrl:""}),vn().s[64]++,this.clearError(),vn().s[65]++,this.props.onOpenToggle()}onChangeUrl=(vn().s[66]++,e=>{vn().f[16]++,vn().s[67]++,this.setState({styleUrl:e})});render(){vn().f[17]++;const e=(vn().s[68]++,this.props.t),t=(vn().s[69]++,Xse.map(r=>(vn().f[18]++,vn().s[70]++,ie.jsx(yPe,{url:r.url,title:r.title,thumbnailUrl:r.thumbnail,onSelect:this.onStyleSelect},r.id))));let i;return vn().s[71]++,this.state.error?(vn().b[5][0]++,vn().s[72]++,i=ie.jsxs("div",{className:"maputnik-modal-error",children:[this.state.error,ie.jsx("a",{href:"#",onClick:()=>(vn().f[19]++,vn().s[73]++,this.clearError()),className:"maputnik-modal-error-close",children:"×"})]})):vn().b[5][1]++,vn().s[74]++,ie.jsxs("div",{children:[ie.jsxs(a1,{"data-wd-key":"modal:open",isOpen:this.props.isOpen,onOpenToggle:()=>(vn().f[20]++,vn().s[75]++,this.onOpenToggle()),title:e("Open Style"),children:[i,ie.jsxs("section",{className:"maputnik-modal-section",children:[ie.jsx("h1",{children:e("Open local Style")}),ie.jsx("p",{children:e("Open a local JSON style from your computer.")}),ie.jsx("div",{children:typeof window.showOpenFilePicker=="function"?(vn().b[6][0]++,ie.jsxs(Js,{"data-wd-key":"modal:open.file.button",className:"maputnik-big-button",onClick:this.onOpenFile,children:[ie.jsx(qF,{})," ",e("Open Style")]})):(vn().b[6][1]++,ie.jsxs("label",{children:[ie.jsxs("a",{className:"maputnik-button maputnik-upload-button","aria-label":e("Open Style"),children:[ie.jsx(qF,{})," ",e("Open Style")]}),ie.jsx("input",{"data-wd-key":"modal:open.file.input",type:"file",style:{display:"none"},onChange:r=>(vn().f[21]++,vn().s[76]++,this.onFileChanged(r.target.files))})]}))})]}),ie.jsx("section",{className:"maputnik-modal-section",children:ie.jsxs("form",{onSubmit:this.onSubmitUrl,children:[ie.jsx("h1",{children:e("Load from URL")}),ie.jsx("p",{children:ie.jsxs(lb,{t:e,children:["Load from a URL. Note that the URL must have ",ie.jsx("a",{href:"https://enable-cors.org",target:"_blank",rel:"noopener noreferrer",children:"CORS enabled"}),"."]})}),ie.jsx(gL,{"aria-label":e("Style URL"),"data-wd-key":"modal:open.url.input",type:"text",className:"maputnik-input",default:e("Enter URL..."),value:this.state.styleUrl,onInput:this.onChangeUrl,onChange:this.onChangeUrl}),ie.jsx("div",{children:ie.jsx(Js,{"data-wd-key":"modal:open.url.button",type:"submit",className:"maputnik-big-button",disabled:this.state.styleUrl.length<1,children:"Load from URL"})})]})}),ie.jsxs("section",{className:"maputnik-modal-section maputnik-modal-section--shrink",children:[ie.jsx("h1",{children:e("Gallery Styles")}),ie.jsx("p",{children:e("Open one of the publicly available styles to start from.")}),ie.jsx("div",{className:"maputnik-style-gallery-container",children:t})]})]}),ie.jsx(gPe,{isOpen:!!this.state.activeRequest,title:e("Loading style"),onCancel:r=>(vn().f[22]++,vn().s[77]++,this.onCancelActiveRequest(r)),message:e("Loading: {{requestUrl}}",{requestUrl:this.state.activeRequestUrl})})]})}}const bPe=(vn().s[78]++,Jo()(vPe));function Wf(){var n="/home/runner/work/maputnik/maputnik/src/components/modals/ModalShortcuts.tsx",e="56c3984d0ef3534e088a574117d91f5af2db0afb",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/modals/ModalShortcuts.tsx",statementMap:{0:{start:{line:7,column:14},end:{line:7,column:26}},1:{start:{line:8,column:17},end:{line:41,column:5}},2:{start:{line:42,column:25},end:{line:115,column:5}},3:{start:{line:116,column:4},end:{line:145,column:6}},4:{start:{line:130,column:12},end:{line:133,column:22}},5:{start:{line:137,column:12},end:{line:141,column:22}},6:{start:{line:148,column:23},end:{line:148,column:64}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:146,column:3}},line:6},1:{name:"(anonymous_1)",decl:{start:{line:129,column:57},end:{line:129,column:58}},loc:{start:{line:129,column:72},end:{line:134,column:11}},line:129},2:{name:"(anonymous_2)",decl:{start:{line:136,column:65},end:{line:136,column:66}},loc:{start:{line:136,column:80},end:{line:142,column:11}},line:136}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/modals/ModalShortcuts.tsx"],names:[],mappings:"AAiBa,SAwCA,UAxCA,KAwCA,YAxCA;AAjBb,OAAO,WAAW;AAClB,SAAS,OAA6B,uBAAuB;AAE7D,OAAO,WAAW;AASlB,MAAM,+BAA+B,MAAM,UAAuC;AAAA,EAChF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,OAAO;AAAA,MACX;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,gBAAgB;AAAA,MAC1B;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,YAAY;AAAA,MACtB;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,cAAc;AAAA,MACxB;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,oBAAoB;AAAA,MAC9B;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,sBAAsB;AAAA,MAChC;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,gBAAgB;AAAA,MAC1B;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,WAAW;AAAA,MACrB;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,aAAa;AAAA,MACvB;AAAA,IACF;AAGA,UAAM,eAAe;AAAA,MACnB;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,+BAAgC;AAAA,MAC1C;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,eAAC;AAAA,WAAM;AAAA,QACtC,MAAM,EAAE,+BAAgC;AAAA,MAC1C;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,+BAAgC;AAAA,MAC1C;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,eAAC;AAAA,WAAM;AAAA,QACtC,MAAM,EAAE,+BAAgC;AAAA,MAC1C;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,gBAAE;AAAA,QACZ,MAAM,EAAE,uBAAwB;AAAA,MAClC;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,kBAAI;AAAA,QACd,MAAM,EAAE,yBAA0B;AAAA,MACpC;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,kBAAI;AAAA,QACd,MAAM,EAAE,yBAA0B;AAAA,MACpC;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,mBAAK;AAAA,QACf,MAAM,EAAE,0BAA2B;AAAA,MACrC;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,mBAAK;AAAA,WAAM;AAAA,QAC1C,MAAM,EAAE,sCAAuC;AAAA,MACjD;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,kBAAI;AAAA,WAAM;AAAA,QACzC,MAAM,EAAE,sCAAsC;AAAA,MAChD;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,gBAAE;AAAA,WAAM;AAAA,QACvC,MAAM,EAAE,mCAAmC;AAAA,MAC7C;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,kBAAI;AAAA,WAAM;AAAA,QACzC,MAAM,EAAE,mCAAmC;AAAA,MAC7C;AAAA,IACF;AAGA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,WAAW;AAAA,QAEpB,+BAAC,aAAQ,WAAU,mDACjB;AAAA,8BAAC,OACC,+BAAC,SAAM,GAAM;AAAA;AAAA,YACL,oBAAC,UAAK,iBAAG;AAAA,YAAO;AAAA,aACxB,GACF;AAAA,UACA,oBAAC,QACE,eAAK,IAAI,CAAC,MAAM,QAAQ;AACvB,mBAAO,qBAAC,SAAc,WAAU,sCAC9B;AAAA,kCAAC,QAAmB,eAAK,OAAhB,OAAK,GAAe;AAAA,cAC7B,oBAAC,QAAmB,eAAK,QAAhB,OAAK,GAAgB;AAAA,iBAFf,GAGjB;AAAA,UACF,CAAC,GACH;AAAA,UACA,oBAAC,OAAG,YAAE,8DAA8D,GAAE;AAAA,UACtE,oBAAC,QACE,uBAAa,IAAI,CAAC,MAAM,QAAQ;AAC/B,mBAAO,qBAAC,QACN;AAAA,kCAAC,UAAM,eAAK,KAAI;AAAA,cAAO;AAAA,cAAE,KAAK;AAAA,iBADhB,GAEhB;AAAA,UACF,CAAC,GACH;AAAA,WACF;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,iBAAiB,gBAAgB,EAAE,sBAAsB;AAC/D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"56c3984d0ef3534e088a574117d91f5af2db0afb"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Wf=function(){return s},s}Wf();class CPe extends En.Component{render(){Wf().f[0]++;const e=(Wf().s[0]++,this.props.t),t=(Wf().s[1]++,[{key:ie.jsx("kbd",{children:"?"}),text:e("Shortcuts menu")},{key:ie.jsx("kbd",{children:"o"}),text:e("Open modal")},{key:ie.jsx("kbd",{children:"e"}),text:e("Export modal")},{key:ie.jsx("kbd",{children:"d"}),text:e("Data Sources modal")},{key:ie.jsx("kbd",{children:"s"}),text:e("Style Settings modal")},{key:ie.jsx("kbd",{children:"i"}),text:e("Toggle inspect")},{key:ie.jsx("kbd",{children:"m"}),text:e("Focus map")},{key:ie.jsx("kbd",{children:"!"}),text:e("Debug modal")}]),i=(Wf().s[2]++,[{key:ie.jsx("kbd",{children:"+"}),text:e("Increase the zoom level by 1.")},{key:ie.jsxs(ie.Fragment,{children:[ie.jsx("kbd",{children:"Shift"})," + ",ie.jsx("kbd",{children:"+"})]}),text:e("Increase the zoom level by 2.")},{key:ie.jsx("kbd",{children:"-"}),text:e("Decrease the zoom level by 1.")},{key:ie.jsxs(ie.Fragment,{children:[ie.jsx("kbd",{children:"Shift"})," + ",ie.jsx("kbd",{children:"-"})]}),text:e("Decrease the zoom level by 2.")},{key:ie.jsx("kbd",{children:"Up"}),text:e("Pan up by 100 pixels.")},{key:ie.jsx("kbd",{children:"Down"}),text:e("Pan down by 100 pixels.")},{key:ie.jsx("kbd",{children:"Left"}),text:e("Pan left by 100 pixels.")},{key:ie.jsx("kbd",{children:"Right"}),text:e("Pan right by 100 pixels.")},{key:ie.jsxs(ie.Fragment,{children:[ie.jsx("kbd",{children:"Shift"})," + ",ie.jsx("kbd",{children:"Right"})]}),text:e("Increase the rotation by 15 degrees.")},{key:ie.jsxs(ie.Fragment,{children:[ie.jsx("kbd",{children:"Shift"})," + ",ie.jsx("kbd",{children:"Left"})]}),text:e("Decrease the rotation by 15 degrees.")},{key:ie.jsxs(ie.Fragment,{children:[ie.jsx("kbd",{children:"Shift"})," + ",ie.jsx("kbd",{children:"Up"})]}),text:e("Increase the pitch by 10 degrees.")},{key:ie.jsxs(ie.Fragment,{children:[ie.jsx("kbd",{children:"Shift"})," + ",ie.jsx("kbd",{children:"Down"})]}),text:e("Decrease the pitch by 10 degrees.")}]);return Wf().s[3]++,ie.jsx(a1,{"data-wd-key":"modal:shortcuts",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Shortcuts"),children:ie.jsxs("section",{className:"maputnik-modal-section maputnik-modal-shortcuts",children:[ie.jsx("p",{children:ie.jsxs(lb,{t:e,children:["Press ",ie.jsx("code",{children:"ESC"})," to lose focus of any active elements, then press one of:"]})}),ie.jsx("dl",{children:t.map((r,o)=>(Wf().f[1]++,Wf().s[4]++,ie.jsxs("div",{className:"maputnik-modal-shortcuts__shortcut",children:[ie.jsx("dt",{children:r.key},"dt"+o),ie.jsx("dd",{children:r.text},"dd"+o)]},o)))}),ie.jsx("p",{children:e("If the Map is in focused you can use the following shortcuts")}),ie.jsx("ul",{children:i.map((r,o)=>(Wf().f[2]++,Wf().s[5]++,ie.jsxs("li",{children:[ie.jsx("span",{children:r.key})," ",r.text]},o)))})]})})}}const _Pe=(Wf().s[6]++,Jo()(CPe));function su(){var n="/home/runner/work/maputnik/maputnik/src/components/modals/ModalDebug.tsx",e="c09f0bfde95742e69af0d091b2de9baefbfef43a",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/modals/ModalDebug.tsx",statementMap:{0:{start:{line:7,column:27},end:{line:7,column:37}},1:{start:{line:8,column:20},end:{line:8,column:48}},2:{start:{line:9,column:19},end:{line:9,column:49}},3:{start:{line:10,column:19},end:{line:10,column:49}},4:{start:{line:11,column:4},end:{line:53,column:6}},5:{start:{line:22,column:14},end:{line:26,column:27}},6:{start:{line:23,column:96},end:{line:23,column:153}},7:{start:{line:29,column:14},end:{line:33,column:27}},8:{start:{line:30,column:96},end:{line:30,column:153}},9:{start:{line:56,column:19},end:{line:56,column:56}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:54,column:3}},line:6},1:{name:"(anonymous_1)",decl:{start:{line:21,column:140},end:{line:21,column:141}},loc:{start:{line:21,column:156},end:{line:27,column:13}},line:21},2:{name:"(anonymous_2)",decl:{start:{line:23,column:89},end:{line:23,column:90}},loc:{start:{line:23,column:96},end:{line:23,column:153}},line:23},3:{name:"(anonymous_3)",decl:{start:{line:28,column:136},end:{line:28,column:137}},loc:{start:{line:28,column:152},end:{line:34,column:13}},line:28},4:{name:"(anonymous_4)",decl:{start:{line:30,column:89},end:{line:30,column:90}},loc:{start:{line:30,column:96},end:{line:30,column:153}},line:30}},branchMap:{0:{loc:{start:{line:21,column:12},end:{line:27,column:17}},type:"binary-expr",locations:[{start:{line:21,column:12},end:{line:21,column:44}},{start:{line:21,column:64},end:{line:27,column:17}}],line:21},1:{loc:{start:{line:28,column:12},end:{line:34,column:17}},type:"binary-expr",locations:[{start:{line:28,column:12},end:{line:28,column:40}},{start:{line:28,column:60},end:{line:34,column:17}}],line:28}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/modals/ModalDebug.tsx"],names:[],mappings:"AAuCQ,cAKQ,YALR;AAvCR,OAAO,WAAW;AAClB,SAAS,OAA6B,uBAAuB;AAE7D,OAAO,WAAW;AAqBlB,MAAM,2BAA2B,MAAM,UAAmC;AAAA,EACxE,SAAS;AACP,UAAM,EAAC,GAAG,QAAO,IAAI,KAAK;AAE1B,UAAM,UAAU,KAAK,MAAM,QAAQ,IAAI,IAAE;AACzC,UAAM,SAAS,CAAE,QAAQ,OAAO,IAAK,QAAQ,CAAC;AAC9C,UAAM,SAAS,CAAE,QAAQ,OAAO,IAAK,QAAQ,CAAC;AAE9C,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,OAAO;AAAA,QAEhB;AAAA,+BAAC,aAAQ,WAAU,mDACjB;AAAA,gCAAC,QAAI,YAAE,SAAS,GAAE;AAAA,YACjB,KAAK,MAAM,aAAa,YACvB,oBAAC,QACE,iBAAO,QAAQ,KAAK,MAAM,sBAAuB,EAAE,IAAI,CAAC,CAAC,KAAK,GAAG,MAAM;AACtE,qBAAO,oBAAC,QACN,+BAAC,WACC;AAAA,oCAAC,WAAM,MAAK,YAAW,SAAS,KAAK,UAAU,CAAC,MAAM,KAAK,MAAM,wBAAwB,KAAK,EAAE,OAAO,OAAO,GAAG;AAAA,gBAAE;AAAA,gBAAE;AAAA,iBACvH,KAHc,GAIhB;AAAA,YACF,CAAC,GACH;AAAA,YAED,KAAK,MAAM,aAAa,QACvB,oBAAC,QACE,iBAAO,QAAQ,KAAK,MAAM,sBAAuB,EAAE,IAAI,CAAC,CAAC,KAAK,GAAG,MAAM;AACtE,qBAAO,oBAAC,QACN,+BAAC,WACC;AAAA,oCAAC,WAAM,MAAK,YAAW,SAAS,KAAK,UAAU,CAAC,MAAM,KAAK,MAAM,wBAAwB,KAAK,EAAE,OAAO,OAAO,GAAG;AAAA,gBAAE;AAAA,gBAAE;AAAA,iBACvH,KAHc,GAIhB;AAAA,YACF,CAAC,GACH;AAAA,aAEJ;AAAA,UACA,qBAAC,aAAQ,WAAU,0BACjB;AAAA,gCAAC,QAAI,YAAE,OAAO,GAAE;AAAA,YAChB,oBAAC,OACC,+BAAC,SAAM,GACL;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,QAAO;AAAA,kBACP,KAAI;AAAA,kBACJ,MAAM,sCAAsC,OAAO,IAAI,MAAM,IAAI,MAAM;AAAA,kBACxE;AAAA;AAAA,cAED;AAAA,cAAI;AAAA,eACN,GACF;AAAA,aACF;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,aAAa,gBAAgB,EAAE,kBAAkB;AACvD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c09f0bfde95742e69af0d091b2de9baefbfef43a"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return su=function(){return s},s}su();class xPe extends En.Component{render(){su().f[0]++;const{t:e,mapView:t}=(su().s[0]++,this.props),i=(su().s[1]++,Math.round(t.zoom)+1),r=(su().s[2]++,+t.center.lng.toFixed(5)),o=(su().s[3]++,+t.center.lat.toFixed(5));return su().s[4]++,ie.jsxs(a1,{"data-wd-key":"modal:debug",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Debug"),children:[ie.jsxs("section",{className:"maputnik-modal-section maputnik-modal-shortcuts",children:[ie.jsx("h1",{children:e("Options")}),(su().b[0][0]++,this.props.renderer==="mlgljs"&&(su().b[0][1]++,ie.jsx("ul",{children:Object.entries(this.props.maplibreGlDebugOptions).map(([s,a])=>(su().f[1]++,su().s[5]++,ie.jsx("li",{children:ie.jsxs("label",{children:[ie.jsx("input",{type:"checkbox",checked:a,onChange:c=>(su().f[2]++,su().s[6]++,this.props.onChangeMaplibreGlDebug(s,c.target.checked))})," ",s]})},s)))}))),(su().b[1][0]++,this.props.renderer==="ol"&&(su().b[1][1]++,ie.jsx("ul",{children:Object.entries(this.props.openlayersDebugOptions).map(([s,a])=>(su().f[3]++,su().s[7]++,ie.jsx("li",{children:ie.jsxs("label",{children:[ie.jsx("input",{type:"checkbox",checked:a,onChange:c=>(su().f[4]++,su().s[8]++,this.props.onChangeOpenlayersDebug(s,c.target.checked))})," ",s]})},s)))})))]}),ie.jsxs("section",{className:"maputnik-modal-section",children:[ie.jsx("h1",{children:e("Links")}),ie.jsx("p",{children:ie.jsxs(lb,{t:e,children:[ie.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:`https://www.openstreetmap.org/#map=${i}/${o}/${r}`,children:"Open in OSM"}),". Opens the current view on openstreetmap.org"]})})]})]})}}const MPe=(su().s[9]++,Jo()(xPe));function vi(){var n="/home/runner/work/maputnik/maputnik/src/components/modals/ModalGlobalState.tsx",e="681e0b3080d4effb89e735abebd0878f77572d27",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/modals/ModalGlobalState.tsx",statementMap:{0:{start:{line:10,column:33},end:{line:116,column:1}},1:{start:{line:11,column:34},end:{line:18,column:3}},2:{start:{line:12,column:18},end:{line:12,column:32}},3:{start:{line:13,column:24},end:{line:13,column:41}},4:{start:{line:14,column:4},end:{line:17,column:8}},5:{start:{line:14,column:62},end:{line:17,column:5}},6:{start:{line:19,column:34},end:{line:31,column:3}},7:{start:{line:20,column:18},end:{line:20,column:39}},8:{start:{line:21,column:24},end:{line:21,column:26}},9:{start:{line:22,column:4},end:{line:28,column:5}},10:{start:{line:23,column:6},end:{line:27,column:7}},11:{start:{line:24,column:8},end:{line:26,column:10}},12:{start:{line:29,column:4},end:{line:29,column:77}},13:{start:{line:30,column:4},end:{line:30,column:32}},14:{start:{line:32,column:24},end:{line:40,column:3}},15:{start:{line:33,column:23},end:{line:33,column:48}},16:{start:{line:34,column:16},end:{line:34,column:17}},17:{start:{line:35,column:4},end:{line:37,column:5}},18:{start:{line:35,column:34},end:{line:35,column:57}},19:{start:{line:36,column:6},end:{line:36,column:14}},20:{start:{line:38,column:4},end:{line:38,column:60}},21:{start:{line:39,column:4},end:{line:39,column:40}},22:{start:{line:41,column:27},end:{line:45,column:3}},23:{start:{line:42,column:23},end:{line:42,column:48}},24:{start:{line:43,column:4},end:{line:43,column:32}},25:{start:{line:44,column:4},end:{line:44,column:40}},26:{start:{line:46,column:30},end:{line:50,column:3}},27:{start:{line:47,column:23},end:{line:47,column:48}},28:{start:{line:48,column:4},end:{line:48,column:41}},29:{start:{line:49,column:4},end:{line:49,column:40}},30:{start:{line:51,column:32},end:{line:55,column:3}},31:{start:{line:52,column:23},end:{line:52,column:48}},32:{start:{line:53,column:4},end:{line:53,column:45}},33:{start:{line:54,column:4},end:{line:54,column:40}},34:{start:{line:56,column:20},end:{line:56,column:45}},35:{start:{line:57,column:25},end:{line:85,column:14}},36:{start:{line:57,column:76},end:{line:85,column:13}},37:{start:{line:63,column:29},end:{line:63,column:68}},38:{start:{line:72,column:29},end:{line:72,column:70}},39:{start:{line:79,column:23},end:{line:79,column:46}},40:{start:{line:86,column:2},end:{line:115,column:4}},41:{start:{line:117,column:25},end:{line:117,column:68}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:33},end:{line:10,column:34}},loc:{start:{line:10,column:44},end:{line:116,column:1}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:11,column:34},end:{line:11,column:35}},loc:{start:{line:11,column:40},end:{line:18,column:3}},line:11},2:{name:"(anonymous_2)",decl:{start:{line:14,column:43},end:{line:14,column:44}},loc:{start:{line:14,column:62},end:{line:17,column:5}},line:14},3:{name:"(anonymous_3)",decl:{start:{line:19,column:34},end:{line:19,column:35}},loc:{start:{line:19,column:50},end:{line:31,column:3}},line:19},4:{name:"(anonymous_4)",decl:{start:{line:32,column:24},end:{line:32,column:25}},loc:{start:{line:32,column:30},end:{line:40,column:3}},line:32},5:{name:"(anonymous_5)",decl:{start:{line:35,column:27},end:{line:35,column:28}},loc:{start:{line:35,column:34},end:{line:35,column:57}},line:35},6:{name:"(anonymous_6)",decl:{start:{line:41,column:27},end:{line:41,column:28}},loc:{start:{line:41,column:38},end:{line:45,column:3}},line:41},7:{name:"(anonymous_7)",decl:{start:{line:46,column:30},end:{line:46,column:31}},loc:{start:{line:46,column:49},end:{line:50,column:3}},line:46},8:{name:"(anonymous_8)",decl:{start:{line:51,column:32},end:{line:51,column:33}},loc:{start:{line:51,column:53},end:{line:55,column:3}},line:51},9:{name:"(anonymous_9)",decl:{start:{line:57,column:39},end:{line:57,column:40}},loc:{start:{line:57,column:76},end:{line:85,column:13}},line:57},10:{name:"(anonymous_10)",decl:{start:{line:63,column:18},end:{line:63,column:19}},loc:{start:{line:63,column:29},end:{line:63,column:68}},line:63},11:{name:"(anonymous_11)",decl:{start:{line:72,column:18},end:{line:72,column:19}},loc:{start:{line:72,column:29},end:{line:72,column:70}},line:72},12:{name:"(anonymous_12)",decl:{start:{line:79,column:17},end:{line:79,column:18}},loc:{start:{line:79,column:23},end:{line:79,column:46}},line:79}},branchMap:{0:{loc:{start:{line:13,column:24},end:{line:13,column:41}},type:"binary-expr",locations:[{start:{line:13,column:24},end:{line:13,column:35}},{start:{line:13,column:39},end:{line:13,column:41}}],line:13},1:{loc:{start:{line:23,column:6},end:{line:27,column:7}},type:"if",locations:[{start:{line:23,column:6},end:{line:27,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:23},2:{loc:{start:{line:29,column:18},end:{line:29,column:76}},type:"cond-expr",locations:[{start:{line:29,column:56},end:{line:29,column:67}},{start:{line:29,column:70},end:{line:29,column:76}}],line:29},3:{loc:{start:{line:48,column:28},end:{line:48,column:40}},type:"binary-expr",locations:[{start:{line:48,column:28},end:{line:48,column:34}},{start:{line:48,column:38},end:{line:48,column:40}}],line:48},4:{loc:{start:{line:53,column:30},end:{line:53,column:44}},type:"binary-expr",locations:[{start:{line:53,column:30},end:{line:53,column:38}},{start:{line:53,column:42},end:{line:53,column:44}}],line:53},5:{loc:{start:{line:63,column:56},end:{line:63,column:67}},type:"binary-expr",locations:[{start:{line:63,column:56},end:{line:63,column:61}},{start:{line:63,column:65},end:{line:63,column:67}}],line:63},6:{loc:{start:{line:72,column:58},end:{line:72,column:69}},type:"binary-expr",locations:[{start:{line:72,column:58},end:{line:72,column:63}},{start:{line:72,column:67},end:{line:72,column:69}}],line:72},7:{loc:{start:{line:94,column:8},end:{line:97,column:12}},type:"binary-expr",locations:[{start:{line:94,column:8},end:{line:94,column:30}},{start:{line:94,column:50},end:{line:97,column:12}}],line:94},8:{loc:{start:{line:98,column:8},end:{line:101,column:12}},type:"binary-expr",locations:[{start:{line:98,column:8},end:{line:98,column:28}},{start:{line:98,column:48},end:{line:101,column:12}}],line:98}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/modals/ModalGlobalState.tsx"],names:["variables"],mappings:"AAsFI,SAEI,KAFJ,YAAA;AArFJ,SAAS,uBAA6C;AACtD,SAAS,gBAAgB;AACzB,OAAO,YAAY;AAEnB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,SAAS,sBAAsB;AAG/B,OAAO,SAAS;AAchB,MAAM,2BAAoE,CAAC,UAAU;AACnF,QAAM,0BAA0B,MAA6B;AAC3D,UAAM,QAAQ,MAAM;AACpB,UAAM,cAAc,MAAM,SAAS,CAAC;AAEpC,WAAO,OAAO,QAAQ,WAAW,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,OAAO;AAAA,MACxD;AAAA,MACA,OAAO,MAAM;AAAA,IACf,EAAE;AAAA,EACJ;AAEA,QAAM,0BAA0B,CAACA,eAAqC;AACpE,UAAM,QAAQ,EAAE,GAAG,MAAM,SAAS;AAGlC,UAAM,cAAmD,CAAC;AAC1D,eAAW,YAAYA,YAAW;AAChC,UAAI,SAAS,IAAI,KAAK,MAAM,IAAI;AAC9B,oBAAY,SAAS,GAAG,IAAI;AAAA,UAC1B,SAAS,SAAS;AAAA,QACpB;AAAA,MACF;AAAA,IACF;AAEA,UAAM,QAAQ,OAAO,KAAK,WAAW,EAAE,SAAS,IAAI,cAAc;AAElE,UAAM,eAAe,KAAK;AAAA,EAC5B;AAEA,QAAM,gBAAgB,MAAM;AAC1B,UAAMA,aAAY,wBAAwB;AAC1C,QAAI,QAAQ;AACZ,WAAOA,WAAU,KAAK,CAAA,MAAK,EAAE,QAAQ,MAAM,KAAK,EAAE,GAAG;AACnD;AAAA,IACF;AACAA,eAAU,KAAK,EAAE,KAAK,MAAM,KAAK,IAAI,OAAO,QAAQ,CAAC;AACrD,4BAAwBA,UAAS;AAAA,EACnC;AAEA,QAAM,mBAAmB,CAAC,UAAkB;AAC1C,UAAMA,aAAY,wBAAwB;AAC1CA,eAAU,OAAO,OAAO,CAAC;AACzB,4BAAwBA,UAAS;AAAA,EACnC;AAEA,QAAM,sBAAsB,CAAC,OAAe,WAAmB;AAC7D,UAAMA,aAAY,wBAAwB;AAC1CA,eAAU,KAAK,EAAE,MAAM,UAAU;AACjC,4BAAwBA,UAAS;AAAA,EACnC;AAEA,QAAM,wBAAwB,CAAC,OAAe,aAAqB;AACjE,UAAMA,aAAY,wBAAwB;AAE1CA,eAAU,KAAK,EAAE,QAAQ,YAAY;AACrC,4BAAwBA,UAAS;AAAA,EACnC;AAEA,QAAM,YAAY,wBAAwB;AAE1C,QAAM,iBAAiB,UAAU,IAAI,CAAC,UAAU,+BAC7C,MAAA,EACC,UAAA;AAAA,IAAA,oBAAC,MAAA,EACC,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,OAAO,MAAM,EAAE,KAAK;AAAA,QACpB,OAAO,SAAS;AAAA,QAChB,UAAU,CAAC,UAAU,oBAAoB,OAAO,SAAS,EAAE;AAAA,QAC3D,eAAa,+BAA+B;AAAA,MAAA;AAAA,IAC9C,EAAA,CACF;AAAA,wBACC,MAAA,EACC,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,OAAO,MAAM,EAAE,OAAO;AAAA,QACtB,OAAO,SAAS;AAAA,QAChB,UAAU,CAAC,UAAU,sBAAsB,OAAO,SAAS,EAAE;AAAA,QAC7D,eAAa,iCAAiC;AAAA,MAAA;AAAA,IAChD,EAAA,CACF;AAAA,wBACC,MAAA,EAAG,OAAO,EAAE,eAAe,SAAQ,GAClC,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAAS,MAAM,iBAAiB,KAAK;AAAA,QACrC,OAAO,MAAM,EAAE,iBAAiB;AAAA,QAChC,eAAY;AAAA,QAEZ,8BAAC,UAAA,CAAA,CAAS;AAAA,MAAA;AAAA,IACZ,EAAA,CACF;AAAA,EAAA,EAAA,GAzBO,KA0BT,CACD;AAED,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,QAAQ,MAAM;AAAA,MACd,cAAc,MAAM;AAAA,MACpB,OAAO,MAAM,EAAE,wBAAwB;AAAA,MAGtC,UAAA;AAAA,QAAA,UAAU,WAAW,KAChB,qBAAC,OAAA,EACC,UAAA;AAAA,UAAA,oBAAC,KAAA,EAAG,UAAA,MAAM,EAAE,2FAA2F,EAAA,CAAE;AAAA,UACzG,oBAAC,OAAA,EAAc,WAAU,uBACvB,UAAA,oBAAC,KAAA,EAAI,WAAW,OAAO,MAAM,MAAA,CAAO,EAAA,GAD7B,KAET;AAAA,QAAA,EAAA,CACF;AAAA,QAEL,UAAU,SAAS,KACpB,qBAAC,SAAA,EACC,UAAA;AAAA,UAAA,oBAAC,SAAA,CAAA,CACD;AAAA,UACA,oBAAC,WACE,UAAA,eAAA,CACH;AAAA,QAAA,EAAA,CACF;AAAA,4BAEC,OAAA,EACC,UAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,eAAY;AAAA,YAEZ,UAAA;AAAA,cAAA,oBAAC,gBAAA,CAAA,CAAe;AAAA,cACf,MAAM,EAAE,cAAc;AAAA,YAAA;AAAA,UAAA;AAAA,QACzB,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;AAEA,MAAM,mBAAmB,gBAAgB,EAAE,wBAAwB;AACnE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"681e0b3080d4effb89e735abebd0878f77572d27"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return vi=function(){return s},s}vi();vi().s[0]++;const wPe=n=>{vi().f[0]++,vi().s[1]++;const e=()=>{vi().f[1]++;const A=(vi().s[2]++,n.mapStyle),m=(vi().s[3]++,vi().b[0][0]++,A.state||(vi().b[0][1]++,{}));return vi().s[4]++,Object.entries(m).map(([v,x])=>(vi().f[2]++,vi().s[5]++,{key:v,value:x.default}))};vi().s[6]++;const t=A=>{vi().f[3]++;const m=(vi().s[7]++,{...n.mapStyle}),v=(vi().s[8]++,{});vi().s[9]++;for(const x of A)vi().s[10]++,x.key.trim()!==""?(vi().b[1][0]++,vi().s[11]++,v[x.key]={default:x.value}):vi().b[1][1]++;vi().s[12]++,m.state=Object.keys(v).length>0?(vi().b[2][0]++,v):(vi().b[2][1]++,void 0),vi().s[13]++,n.onStyleChanged(m)};vi().s[14]++;const i=()=>{vi().f[4]++;const A=(vi().s[15]++,e());let m=(vi().s[16]++,1);for(vi().s[17]++;A.find(v=>(vi().f[5]++,vi().s[18]++,v.key===`key${m}`));)vi().s[19]++,m++;vi().s[20]++,A.push({key:`key${m}`,value:"value"}),vi().s[21]++,t(A)};vi().s[22]++;const r=A=>{vi().f[6]++;const m=(vi().s[23]++,e());vi().s[24]++,m.splice(A,1),vi().s[25]++,t(m)};vi().s[26]++;const o=(A,m)=>{vi().f[7]++;const v=(vi().s[27]++,e());vi().s[28]++,v[A].key=(vi().b[3][0]++,m||(vi().b[3][1]++,"")),vi().s[29]++,t(v)};vi().s[30]++;const s=(A,m)=>{vi().f[8]++;const v=(vi().s[31]++,e());vi().s[32]++,v[A].value=(vi().b[4][0]++,m||(vi().b[4][1]++,"")),vi().s[33]++,t(v)},a=(vi().s[34]++,e()),c=(vi().s[35]++,a.map((A,m)=>(vi().f[9]++,vi().s[36]++,ie.jsxs("tr",{children:[ie.jsx("td",{children:ie.jsx(qh,{label:n.t("Key"),value:A.key,onChange:v=>(vi().f[10]++,vi().s[37]++,o(m,(vi().b[5][0]++,v||(vi().b[5][1]++,"")))),"data-wd-key":"global-state-variable-key:"+m})}),ie.jsx("td",{children:ie.jsx(qh,{label:n.t("Value"),value:A.value,onChange:v=>(vi().f[11]++,vi().s[38]++,s(m,(vi().b[6][0]++,v||(vi().b[6][1]++,"")))),"data-wd-key":"global-state-variable-value:"+m})}),ie.jsx("td",{style:{verticalAlign:"middle"},children:ie.jsx(Js,{onClick:()=>(vi().f[12]++,vi().s[39]++,r(m)),title:n.t("Remove variable"),"data-wd-key":"global-state-remove-variable",children:ie.jsx(Kb,{})})})]},m))));return vi().s[40]++,ie.jsxs(a1,{"data-wd-key":"modal:global-state",isOpen:n.isOpen,onOpenToggle:n.onOpenToggle,title:n.t("Global State Variables"),children:[(vi().b[7][0]++,a.length===0&&(vi().b[7][1]++,ie.jsxs("div",{children:[ie.jsx("p",{children:n.t("No global state variables defined. Add variables to create reusable values in your style.")}),ie.jsx("div",{className:"maputnik-doc-inline",children:ie.jsx(t6,{fieldSpec:Jr.$root.state})},"doc")]}))),(vi().b[8][0]++,a.length>0&&(vi().b[8][1]++,ie.jsxs("table",{children:[ie.jsx("thead",{}),ie.jsx("tbody",{children:c})]}))),ie.jsx("div",{children:ie.jsxs(Js,{onClick:i,"data-wd-key":"global-state-add-variable",children:[ie.jsx(w6,{}),n.t("Add Variable")]})})]})},SPe=(vi().s[41]++,Jo()(wPe));var Wv={},W2={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var EPe=W2.exports,FV;function OPe(){return FV||(FV=1,(function(n,e){(function(t){var i=e&&!e.nodeType&&e,r=n&&!n.nodeType&&n,o=typeof window=="object"&&window;(o.global===o||o.window===o||o.self===o)&&(t=o);var s,a=2147483647,c=36,A=1,m=26,v=38,x=700,_=72,O=128,P="-",F=/^xn--/,j=/[^\x20-\x7E]/,Q=/[\x2E\u3002\uFF0E\uFF61]/g,V={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},H=c-A,G=Math.floor,Y=String.fromCharCode,z;function se(ce){throw new RangeError(V[ce])}function le(ce,Le){for(var We=ce.length,Me=[];We--;)Me[We]=Le(ce[We]);return Me}function me(ce,Le){var We=ce.split("@"),Me="";We.length>1&&(Me=We[0]+"@",ce=We[1]),ce=ce.replace(Q,".");var dt=ce.split("."),it=le(dt,Le).join(".");return Me+it}function fe(ce){for(var Le=[],We=0,Me=ce.length,dt,it;We<Me;)dt=ce.charCodeAt(We++),dt>=55296&&dt<=56319&&We<Me?(it=ce.charCodeAt(We++),(it&64512)==56320?Le.push(((dt&1023)<<10)+(it&1023)+65536):(Le.push(dt),We--)):Le.push(dt);return Le}function _e(ce){return le(ce,function(Le){var We="";return Le>65535&&(Le-=65536,We+=Y(Le>>>10&1023|55296),Le=56320|Le&1023),We+=Y(Le),We}).join("")}function we(ce){return ce-48<10?ce-22:ce-65<26?ce-65:ce-97<26?ce-97:c}function ke(ce,Le){return ce+22+75*(ce<26)-((Le!=0)<<5)}function je(ce,Le,We){var Me=0;for(ce=We?G(ce/x):ce>>1,ce+=G(ce/Le);ce>H*m>>1;Me+=c)ce=G(ce/H);return G(Me+(H+1)*ce/(ce+v))}function Ie(ce){var Le=[],We=ce.length,Me,dt=0,it=O,vt=_,Ut,Pe,Te,Se,Ne,ut,rt,mt,Rt;for(Ut=ce.lastIndexOf(P),Ut<0&&(Ut=0),Pe=0;Pe<Ut;++Pe)ce.charCodeAt(Pe)>=128&&se("not-basic"),Le.push(ce.charCodeAt(Pe));for(Te=Ut>0?Ut+1:0;Te<We;){for(Se=dt,Ne=1,ut=c;Te>=We&&se("invalid-input"),rt=we(ce.charCodeAt(Te++)),(rt>=c||rt>G((a-dt)/Ne))&&se("overflow"),dt+=rt*Ne,mt=ut<=vt?A:ut>=vt+m?m:ut-vt,!(rt<mt);ut+=c)Rt=c-mt,Ne>G(a/Rt)&&se("overflow"),Ne*=Rt;Me=Le.length+1,vt=je(dt-Se,Me,Se==0),G(dt/Me)>a-it&&se("overflow"),it+=G(dt/Me),dt%=Me,Le.splice(dt++,0,it)}return _e(Le)}function Qe(ce){var Le,We,Me,dt,it,vt,Ut,Pe,Te,Se,Ne,ut=[],rt,mt,Rt,Bt;for(ce=fe(ce),rt=ce.length,Le=O,We=0,it=_,vt=0;vt<rt;++vt)Ne=ce[vt],Ne<128&&ut.push(Y(Ne));for(Me=dt=ut.length,dt&&ut.push(P);Me<rt;){for(Ut=a,vt=0;vt<rt;++vt)Ne=ce[vt],Ne>=Le&&Ne<Ut&&(Ut=Ne);for(mt=Me+1,Ut-Le>G((a-We)/mt)&&se("overflow"),We+=(Ut-Le)*mt,Le=Ut,vt=0;vt<rt;++vt)if(Ne=ce[vt],Ne<Le&&++We>a&&se("overflow"),Ne==Le){for(Pe=We,Te=c;Se=Te<=it?A:Te>=it+m?m:Te-it,!(Pe<Se);Te+=c)Bt=Pe-Se,Rt=c-Se,ut.push(Y(ke(Se+Bt%Rt,0))),Pe=G(Bt/Rt);ut.push(Y(ke(Pe,0))),it=je(We,mt,Me==dt),We=0,++Me}++We,++Le}return ut.join("")}function tt(ce){return me(ce,function(Le){return F.test(Le)?Ie(Le.slice(4).toLowerCase()):Le})}function ht(ce){return me(ce,function(Le){return j.test(Le)?"xn--"+Qe(Le):Le})}if(s={version:"1.4.1",ucs2:{decode:fe,encode:_e},decode:Ie,encode:Qe,toASCII:ht,toUnicode:tt},i&&r)if(n.exports==i)r.exports=s;else for(z in s)s.hasOwnProperty(z)&&(i[z]=s[z]);else t.punycode=s})(EPe)})(W2,W2.exports)),W2.exports}var Hk,zV;function zx(){return zV||(zV=1,Hk=TypeError),Hk}const BPe={},IPe=Object.freeze(Object.defineProperty({__proto__:null,default:BPe},Symbol.toStringTag,{value:"Module"})),kPe=ID(IPe);var Zk,jV;function K6(){if(jV)return Zk;jV=1;var n=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=n&&e&&typeof e.get=="function"?e.get:null,i=n&&Map.prototype.forEach,r=typeof Set=="function"&&Set.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=r&&o&&typeof o.get=="function"?o.get:null,a=r&&Set.prototype.forEach,c=typeof WeakMap=="function"&&WeakMap.prototype,A=c?WeakMap.prototype.has:null,m=typeof WeakSet=="function"&&WeakSet.prototype,v=m?WeakSet.prototype.has:null,x=typeof WeakRef=="function"&&WeakRef.prototype,_=x?WeakRef.prototype.deref:null,O=Boolean.prototype.valueOf,P=Object.prototype.toString,F=Function.prototype.toString,j=String.prototype.match,Q=String.prototype.slice,V=String.prototype.replace,H=String.prototype.toUpperCase,G=String.prototype.toLowerCase,Y=RegExp.prototype.test,z=Array.prototype.concat,se=Array.prototype.join,le=Array.prototype.slice,me=Math.floor,fe=typeof BigInt=="function"?BigInt.prototype.valueOf:null,_e=Object.getOwnPropertySymbols,we=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ke=typeof Symbol=="function"&&typeof Symbol.iterator=="object",je=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ke||!0)?Symbol.toStringTag:null,Ie=Object.prototype.propertyIsEnumerable,Qe=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(be){return be.__proto__}:null);function tt(be,Ee){if(be===1/0||be===-1/0||be!==be||be&&be>-1e3&&be<1e3||Y.call(/e/,Ee))return Ee;var y=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof be=="number"){var gt=be<0?-me(-be):me(be);if(gt!==be){var Mt=String(gt),Dt=Q.call(Ee,Mt.length+1);return V.call(Mt,y,"$&_")+"."+V.call(V.call(Dt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return V.call(Ee,y,"$&_")}var ht=kPe,ce=ht.custom,Le=mt(ce)?ce:null,We={__proto__:null,double:'"',single:"'"},Me={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Zk=function be(Ee,y,gt,Mt){var Dt=y||{};if($t(Dt,"quoteStyle")&&!$t(We,Dt.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if($t(Dt,"maxStringLength")&&(typeof Dt.maxStringLength=="number"?Dt.maxStringLength<0&&Dt.maxStringLength!==1/0:Dt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ot=$t(Dt,"customInspect")?Dt.customInspect:!0;if(typeof ot!="boolean"&&ot!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if($t(Dt,"indent")&&Dt.indent!==null&&Dt.indent!==" "&&!(parseInt(Dt.indent,10)===Dt.indent&&Dt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if($t(Dt,"numericSeparator")&&typeof Dt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var bn=Dt.numericSeparator;if(typeof Ee>"u")return"undefined";if(Ee===null)return"null";if(typeof Ee=="boolean")return Ee?"true":"false";if(typeof Ee=="string")return xe(Ee,Dt);if(typeof Ee=="number"){if(Ee===0)return 1/0/Ee>0?"0":"-0";var Gn=String(Ee);return bn?tt(Ee,Gn):Gn}if(typeof Ee=="bigint"){var yn=String(Ee)+"n";return bn?tt(Ee,yn):yn}var qn=typeof Dt.depth>"u"?5:Dt.depth;if(typeof gt>"u"&&(gt=0),gt>=qn&&qn>0&&typeof Ee=="object")return Ut(Ee)?"[Array]":"[Object]";var $n=Ue(Dt,gt);if(typeof Mt>"u")Mt=[];else if(ai(Mt,Ee)>=0)return"[Circular]";function mi(Fi,Cl,ra){if(Cl&&(Mt=le.call(Mt),Mt.push(Cl)),ra){var uo={depth:Dt.depth};return $t(Dt,"quoteStyle")&&(uo.quoteStyle=Dt.quoteStyle),be(Fi,uo,gt+1,Mt)}return be(Fi,Dt,gt+1,Mt)}if(typeof Ee=="function"&&!Te(Ee)){var ir=zn(Ee),di=lt(Ee,mi);return"[Function"+(ir?": "+ir:" (anonymous)")+"]"+(di.length>0?" { "+se.call(di,", ")+" }":"")}if(mt(Ee)){var Vn=ke?V.call(String(Ee),/^(Symbol\(.*\))_[^)]*$/,"$1"):we.call(Ee);return typeof Ee=="object"&&!ke?J(Vn):Vn}if(It(Ee)){for(var Fn="<"+G.call(String(Ee.nodeName)),Ti=Ee.attributes||[],on=0;on<Ti.length;on++)Fn+=" "+Ti[on].name+"="+dt(it(Ti[on].value),"double",Dt);return Fn+=">",Ee.childNodes&&Ee.childNodes.length&&(Fn+="..."),Fn+="</"+G.call(String(Ee.nodeName))+">",Fn}if(Ut(Ee)){if(Ee.length===0)return"[]";var qr=lt(Ee,mi);return $n&&!Ce(qr)?"["+He(qr,$n)+"]":"[ "+se.call(qr,", ")+" ]"}if(Se(Ee)){var Di=lt(Ee,mi);return!("cause"in Error.prototype)&&"cause"in Ee&&!Ie.call(Ee,"cause")?"{ ["+String(Ee)+"] "+se.call(z.call("[cause]: "+mi(Ee.cause),Di),", ")+" }":Di.length===0?"["+String(Ee)+"]":"{ ["+String(Ee)+"] "+se.call(Di,", ")+" }"}if(typeof Ee=="object"&&ot){if(Le&&typeof Ee[Le]=="function"&&ht)return ht(Ee,{depth:qn-gt});if(ot!=="symbol"&&typeof Ee.inspect=="function")return Ee.inspect()}if(_n(Ee)){var js=[];return i&&i.call(Ee,function(Fi,Cl){js.push(mi(Cl,Ee,!0)+" => "+mi(Fi,Ee))}),ue("Map",t.call(Ee),js,$n)}if(li(Ee)){var ea=[];return a&&a.call(Ee,function(Fi){ea.push(mi(Fi,Ee))}),ue("Set",s.call(Ee),ea,$n)}if(Bn(Ee))return ne("WeakMap");if(In(Ee))return ne("WeakSet");if(dn(Ee))return ne("WeakRef");if(ut(Ee))return J(mi(Number(Ee)));if(Rt(Ee))return J(mi(fe.call(Ee)));if(rt(Ee))return J(O.call(Ee));if(Ne(Ee))return J(mi(String(Ee)));if(typeof window<"u"&&Ee===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Ee===globalThis||typeof window<"u"&&Ee===window)return"{ [object globalThis] }";if(!Pe(Ee)&&!Te(Ee)){var Pn=lt(Ee,mi),Gi=Qe?Qe(Ee)===Object.prototype:Ee instanceof Object||Ee.constructor===Object,Li=Ee instanceof Object?"":"null prototype",Xi=!Gi&&je&&Object(Ee)===Ee&&je in Ee?Q.call(Rn(Ee),8,-1):Li?"Object":"",Oa=Gi||typeof Ee.constructor!="function"?"":Ee.constructor.name?Ee.constructor.name+" ":"",lo=Oa+(Xi||Li?"["+se.call(z.call([],Xi||[],Li||[]),": ")+"] ":"");return Pn.length===0?lo+"{}":$n?lo+"{"+He(Pn,$n)+"}":lo+"{ "+se.call(Pn,", ")+" }"}return String(Ee)};function dt(be,Ee,y){var gt=y.quoteStyle||Ee,Mt=We[gt];return Mt+be+Mt}function it(be){return V.call(String(be),/"/g,"&quot;")}function vt(be){return!je||!(typeof be=="object"&&(je in be||typeof be[je]<"u"))}function Ut(be){return Rn(be)==="[object Array]"&&vt(be)}function Pe(be){return Rn(be)==="[object Date]"&&vt(be)}function Te(be){return Rn(be)==="[object RegExp]"&&vt(be)}function Se(be){return Rn(be)==="[object Error]"&&vt(be)}function Ne(be){return Rn(be)==="[object String]"&&vt(be)}function ut(be){return Rn(be)==="[object Number]"&&vt(be)}function rt(be){return Rn(be)==="[object Boolean]"&&vt(be)}function mt(be){if(ke)return be&&typeof be=="object"&&be instanceof Symbol;if(typeof be=="symbol")return!0;if(!be||typeof be!="object"||!we)return!1;try{return we.call(be),!0}catch{}return!1}function Rt(be){if(!be||typeof be!="object"||!fe)return!1;try{return fe.call(be),!0}catch{}return!1}var Bt=Object.prototype.hasOwnProperty||function(be){return be in this};function $t(be,Ee){return Bt.call(be,Ee)}function Rn(be){return P.call(be)}function zn(be){if(be.name)return be.name;var Ee=j.call(F.call(be),/^function\s*([\w$]+)/);return Ee?Ee[1]:null}function ai(be,Ee){if(be.indexOf)return be.indexOf(Ee);for(var y=0,gt=be.length;y<gt;y++)if(be[y]===Ee)return y;return-1}function _n(be){if(!t||!be||typeof be!="object")return!1;try{t.call(be);try{s.call(be)}catch{return!0}return be instanceof Map}catch{}return!1}function Bn(be){if(!A||!be||typeof be!="object")return!1;try{A.call(be,A);try{v.call(be,v)}catch{return!0}return be instanceof WeakMap}catch{}return!1}function dn(be){if(!_||!be||typeof be!="object")return!1;try{return _.call(be),!0}catch{}return!1}function li(be){if(!s||!be||typeof be!="object")return!1;try{s.call(be);try{t.call(be)}catch{return!0}return be instanceof Set}catch{}return!1}function In(be){if(!v||!be||typeof be!="object")return!1;try{v.call(be,v);try{A.call(be,A)}catch{return!0}return be instanceof WeakSet}catch{}return!1}function It(be){return!be||typeof be!="object"?!1:typeof HTMLElement<"u"&&be instanceof HTMLElement?!0:typeof be.nodeName=="string"&&typeof be.getAttribute=="function"}function xe(be,Ee){if(be.length>Ee.maxStringLength){var y=be.length-Ee.maxStringLength,gt="... "+y+" more character"+(y>1?"s":"");return xe(Q.call(be,0,Ee.maxStringLength),Ee)+gt}var Mt=Me[Ee.quoteStyle||"single"];Mt.lastIndex=0;var Dt=V.call(V.call(be,Mt,"\\$1"),/[\x00-\x1f]/g,oe);return dt(Dt,"single",Ee)}function oe(be){var Ee=be.charCodeAt(0),y={8:"b",9:"t",10:"n",12:"f",13:"r"}[Ee];return y?"\\"+y:"\\x"+(Ee<16?"0":"")+H.call(Ee.toString(16))}function J(be){return"Object("+be+")"}function ne(be){return be+" { ? }"}function ue(be,Ee,y,gt){var Mt=gt?He(y,gt):se.call(y,", ");return be+" ("+Ee+") {"+Mt+"}"}function Ce(be){for(var Ee=0;Ee<be.length;Ee++)if(ai(be[Ee],`
`)>=0)return!1;return!0}function Ue(be,Ee){var y;if(be.indent===" ")y=" ";else if(typeof be.indent=="number"&&be.indent>0)y=se.call(Array(be.indent+1)," ");else return null;return{base:y,prev:se.call(Array(Ee+1),y)}}function He(be,Ee){if(be.length===0)return"";var y=`
`+Ee.prev+Ee.base;return y+se.call(be,","+y)+`
`+Ee.prev}function lt(be,Ee){var y=Ut(be),gt=[];if(y){gt.length=be.length;for(var Mt=0;Mt<be.length;Mt++)gt[Mt]=$t(be,Mt)?Ee(be[Mt],be):""}var Dt=typeof _e=="function"?_e(be):[],ot;if(ke){ot={};for(var bn=0;bn<Dt.length;bn++)ot["$"+Dt[bn]]=Dt[bn]}for(var Gn in be)$t(be,Gn)&&(y&&String(Number(Gn))===Gn&&Gn<be.length||ke&&ot["$"+Gn]instanceof Symbol||(Y.call(/[^\w$]/,Gn)?gt.push(Ee(Gn,be)+": "+Ee(be[Gn],be)):gt.push(Gn+": "+Ee(be[Gn],be))));if(typeof _e=="function")for(var yn=0;yn<Dt.length;yn++)Ie.call(be,Dt[yn])&&gt.push("["+Ee(Dt[yn])+"]: "+Ee(be[Dt[yn]],be));return gt}return Zk}var Xk,NV;function TPe(){if(NV)return Xk;NV=1;var n=K6(),e=zx(),t=function(a,c,A){for(var m=a,v;(v=m.next)!=null;m=v)if(v.key===c)return m.next=v.next,A||(v.next=a.next,a.next=v),v},i=function(a,c){if(a){var A=t(a,c);return A&&A.value}},r=function(a,c,A){var m=t(a,c);m?m.value=A:a.next={key:c,next:a.next,value:A}},o=function(a,c){return a?!!t(a,c):!1},s=function(a,c){if(a)return t(a,c,!0)};return Xk=function(){var c,A={assert:function(m){if(!A.has(m))throw new e("Side channel does not contain "+n(m))},delete:function(m){var v=c&&c.next,x=s(c,m);return x&&v&&v===x&&(c=void 0),!!x},get:function(m){return i(c,m)},has:function(m){return o(c,m)},set:function(m,v){c||(c={next:void 0}),r(c,m,v)}};return A},Xk}var Jk,GV;function Jse(){return GV||(GV=1,Jk=Object),Jk}var eT,WV;function RPe(){return WV||(WV=1,eT=Error),eT}var tT,QV;function DPe(){return QV||(QV=1,tT=EvalError),tT}var nT,qV;function PPe(){return qV||(qV=1,nT=RangeError),nT}var iT,YV;function UPe(){return YV||(YV=1,iT=ReferenceError),iT}var rT,$V;function KPe(){return $V||($V=1,rT=SyntaxError),rT}var oT,VV;function LPe(){return VV||(VV=1,oT=URIError),oT}var sT,HV;function FPe(){return HV||(HV=1,sT=Math.abs),sT}var aT,ZV;function zPe(){return ZV||(ZV=1,aT=Math.floor),aT}var lT,XV;function jPe(){return XV||(XV=1,lT=Math.max),lT}var uT,JV;function NPe(){return JV||(JV=1,uT=Math.min),uT}var cT,eH;function GPe(){return eH||(eH=1,cT=Math.pow),cT}var AT,tH;function WPe(){return tH||(tH=1,AT=Math.round),AT}var hT,nH;function QPe(){return nH||(nH=1,hT=Number.isNaN||function(e){return e!==e}),hT}var dT,iH;function qPe(){if(iH)return dT;iH=1;var n=QPe();return dT=function(t){return n(t)||t===0?t:t<0?-1:1},dT}var fT,rH;function YPe(){return rH||(rH=1,fT=Object.getOwnPropertyDescriptor),fT}var pT,oH;function eae(){if(oH)return pT;oH=1;var n=YPe();if(n)try{n([],"length")}catch{n=null}return pT=n,pT}var mT,sH;function $Pe(){if(sH)return mT;sH=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return mT=n,mT}var gT,aH;function VPe(){return aH||(aH=1,gT=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==r||a.enumerable!==!0)return!1}return!0}),gT}var yT,lH;function HPe(){if(lH)return yT;lH=1;var n=typeof Symbol<"u"&&Symbol,e=VPe();return yT=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},yT}var vT,uH;function tae(){return uH||(uH=1,vT=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),vT}var bT,cH;function nae(){if(cH)return bT;cH=1;var n=Jse();return bT=n.getPrototypeOf||null,bT}var CT,AH;function ZPe(){if(AH)return CT;AH=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,i="[object Function]",r=function(c,A){for(var m=[],v=0;v<c.length;v+=1)m[v]=c[v];for(var x=0;x<A.length;x+=1)m[x+c.length]=A[x];return m},o=function(c,A){for(var m=[],v=A,x=0;v<c.length;v+=1,x+=1)m[x]=c[v];return m},s=function(a,c){for(var A="",m=0;m<a.length;m+=1)A+=a[m],m+1<a.length&&(A+=c);return A};return CT=function(c){var A=this;if(typeof A!="function"||e.apply(A)!==i)throw new TypeError(n+A);for(var m=o(arguments,1),v,x=function(){if(this instanceof v){var j=A.apply(this,r(m,arguments));return Object(j)===j?j:this}return A.apply(c,r(m,arguments))},_=t(0,A.length-m.length),O=[],P=0;P<_;P++)O[P]="$"+P;if(v=Function("binder","return function ("+s(O,",")+"){ return binder.apply(this,arguments); }")(x),A.prototype){var F=function(){};F.prototype=A.prototype,v.prototype=new F,F.prototype=null}return v},CT}var _T,hH;function L6(){if(hH)return _T;hH=1;var n=ZPe();return _T=Function.prototype.bind||n,_T}var xT,dH;function bL(){return dH||(dH=1,xT=Function.prototype.call),xT}var MT,fH;function iae(){return fH||(fH=1,MT=Function.prototype.apply),MT}var wT,pH;function XPe(){return pH||(pH=1,wT=typeof Reflect<"u"&&Reflect&&Reflect.apply),wT}var ST,mH;function JPe(){if(mH)return ST;mH=1;var n=L6(),e=iae(),t=bL(),i=XPe();return ST=i||n.call(t,e),ST}var ET,gH;function rae(){if(gH)return ET;gH=1;var n=L6(),e=zx(),t=bL(),i=JPe();return ET=function(o){if(o.length<1||typeof o[0]!="function")throw new e("a function is required");return i(n,t,o)},ET}var OT,yH;function eUe(){if(yH)return OT;yH=1;var n=rae(),e=eae(),t;try{t=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var i=!!t&&e&&e(Object.prototype,"__proto__"),r=Object,o=r.getPrototypeOf;return OT=i&&typeof i.get=="function"?n([i.get]):typeof o=="function"?function(a){return o(a==null?a:r(a))}:!1,OT}var BT,vH;function tUe(){if(vH)return BT;vH=1;var n=tae(),e=nae(),t=eUe();return BT=n?function(r){return n(r)}:e?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return e(r)}:t?function(r){return t(r)}:null,BT}var IT,bH;function nUe(){if(bH)return IT;bH=1;var n=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=L6();return IT=t.call(n,e),IT}var kT,CH;function CL(){if(CH)return kT;CH=1;var n,e=Jse(),t=RPe(),i=DPe(),r=PPe(),o=UPe(),s=KPe(),a=zx(),c=LPe(),A=FPe(),m=zPe(),v=jPe(),x=NPe(),_=GPe(),O=WPe(),P=qPe(),F=Function,j=function(Te){try{return F('"use strict"; return ('+Te+").constructor;")()}catch{}},Q=eae(),V=$Pe(),H=function(){throw new a},G=Q?(function(){try{return arguments.callee,H}catch{try{return Q(arguments,"callee").get}catch{return H}}})():H,Y=HPe()(),z=tUe(),se=nae(),le=tae(),me=iae(),fe=bL(),_e={},we=typeof Uint8Array>"u"||!z?n:z(Uint8Array),ke={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":Y&&z?z([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":_e,"%AsyncGenerator%":_e,"%AsyncGeneratorFunction%":_e,"%AsyncIteratorPrototype%":_e,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":i,"%Float16Array%":typeof Float16Array>"u"?n:Float16Array,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":F,"%GeneratorFunction%":_e,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Y&&z?z(z([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Y||!z?n:z(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":Q,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":r,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Y||!z?n:z(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Y&&z?z(""[Symbol.iterator]()):n,"%Symbol%":Y?Symbol:n,"%SyntaxError%":s,"%ThrowTypeError%":G,"%TypedArray%":we,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet,"%Function.prototype.call%":fe,"%Function.prototype.apply%":me,"%Object.defineProperty%":V,"%Object.getPrototypeOf%":se,"%Math.abs%":A,"%Math.floor%":m,"%Math.max%":v,"%Math.min%":x,"%Math.pow%":_,"%Math.round%":O,"%Math.sign%":P,"%Reflect.getPrototypeOf%":le};if(z)try{null.error}catch(Te){var je=z(z(Te));ke["%Error.prototype%"]=je}var Ie=function Te(Se){var Ne;if(Se==="%AsyncFunction%")Ne=j("async function () {}");else if(Se==="%GeneratorFunction%")Ne=j("function* () {}");else if(Se==="%AsyncGeneratorFunction%")Ne=j("async function* () {}");else if(Se==="%AsyncGenerator%"){var ut=Te("%AsyncGeneratorFunction%");ut&&(Ne=ut.prototype)}else if(Se==="%AsyncIteratorPrototype%"){var rt=Te("%AsyncGenerator%");rt&&z&&(Ne=z(rt.prototype))}return ke[Se]=Ne,Ne},Qe={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},tt=L6(),ht=nUe(),ce=tt.call(fe,Array.prototype.concat),Le=tt.call(me,Array.prototype.splice),We=tt.call(fe,String.prototype.replace),Me=tt.call(fe,String.prototype.slice),dt=tt.call(fe,RegExp.prototype.exec),it=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,vt=/\\(\\)?/g,Ut=function(Se){var Ne=Me(Se,0,1),ut=Me(Se,-1);if(Ne==="%"&&ut!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(ut==="%"&&Ne!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var rt=[];return We(Se,it,function(mt,Rt,Bt,$t){rt[rt.length]=Bt?We($t,vt,"$1"):Rt||mt}),rt},Pe=function(Se,Ne){var ut=Se,rt;if(ht(Qe,ut)&&(rt=Qe[ut],ut="%"+rt[0]+"%"),ht(ke,ut)){var mt=ke[ut];if(mt===_e&&(mt=Ie(ut)),typeof mt>"u"&&!Ne)throw new a("intrinsic "+Se+" exists, but is not available. Please file an issue!");return{alias:rt,name:ut,value:mt}}throw new s("intrinsic "+Se+" does not exist!")};return kT=function(Se,Ne){if(typeof Se!="string"||Se.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ne!="boolean")throw new a('"allowMissing" argument must be a boolean');if(dt(/^%?[^%]*%?$/,Se)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ut=Ut(Se),rt=ut.length>0?ut[0]:"",mt=Pe("%"+rt+"%",Ne),Rt=mt.name,Bt=mt.value,$t=!1,Rn=mt.alias;Rn&&(rt=Rn[0],Le(ut,ce([0,1],Rn)));for(var zn=1,ai=!0;zn<ut.length;zn+=1){var _n=ut[zn],Bn=Me(_n,0,1),dn=Me(_n,-1);if((Bn==='"'||Bn==="'"||Bn==="`"||dn==='"'||dn==="'"||dn==="`")&&Bn!==dn)throw new s("property names with quotes must have matching quotes");if((_n==="constructor"||!ai)&&($t=!0),rt+="."+_n,Rt="%"+rt+"%",ht(ke,Rt))Bt=ke[Rt];else if(Bt!=null){if(!(_n in Bt)){if(!Ne)throw new a("base intrinsic for "+Se+" exists, but the property is not available.");return}if(Q&&zn+1>=ut.length){var li=Q(Bt,_n);ai=!!li,ai&&"get"in li&&!("originalValue"in li.get)?Bt=li.get:Bt=Bt[_n]}else ai=ht(Bt,_n),Bt=Bt[_n];ai&&!$t&&(ke[Rt]=Bt)}}return Bt},kT}var TT,_H;function oae(){if(_H)return TT;_H=1;var n=CL(),e=rae(),t=e([n("%String.prototype.indexOf%")]);return TT=function(r,o){var s=n(r,!!o);return typeof s=="function"&&t(r,".prototype.")>-1?e([s]):s},TT}var RT,xH;function sae(){if(xH)return RT;xH=1;var n=CL(),e=oae(),t=K6(),i=zx(),r=n("%Map%",!0),o=e("Map.prototype.get",!0),s=e("Map.prototype.set",!0),a=e("Map.prototype.has",!0),c=e("Map.prototype.delete",!0),A=e("Map.prototype.size",!0);return RT=!!r&&function(){var v,x={assert:function(_){if(!x.has(_))throw new i("Side channel does not contain "+t(_))},delete:function(_){if(v){var O=c(v,_);return A(v)===0&&(v=void 0),O}return!1},get:function(_){if(v)return o(v,_)},has:function(_){return v?a(v,_):!1},set:function(_,O){v||(v=new r),s(v,_,O)}};return x},RT}var DT,MH;function iUe(){if(MH)return DT;MH=1;var n=CL(),e=oae(),t=K6(),i=sae(),r=zx(),o=n("%WeakMap%",!0),s=e("WeakMap.prototype.get",!0),a=e("WeakMap.prototype.set",!0),c=e("WeakMap.prototype.has",!0),A=e("WeakMap.prototype.delete",!0);return DT=o?function(){var v,x,_={assert:function(O){if(!_.has(O))throw new r("Side channel does not contain "+t(O))},delete:function(O){if(o&&O&&(typeof O=="object"||typeof O=="function")){if(v)return A(v,O)}else if(i&&x)return x.delete(O);return!1},get:function(O){return o&&O&&(typeof O=="object"||typeof O=="function")&&v?s(v,O):x&&x.get(O)},has:function(O){return o&&O&&(typeof O=="object"||typeof O=="function")&&v?c(v,O):!!x&&x.has(O)},set:function(O,P){o&&O&&(typeof O=="object"||typeof O=="function")?(v||(v=new o),a(v,O,P)):i&&(x||(x=i()),x.set(O,P))}};return _}:i,DT}var PT,wH;function rUe(){if(wH)return PT;wH=1;var n=zx(),e=K6(),t=TPe(),i=sae(),r=iUe(),o=r||i||t;return PT=function(){var a,c={assert:function(A){if(!c.has(A))throw new n("Side channel does not contain "+e(A))},delete:function(A){return!!a&&a.delete(A)},get:function(A){return a&&a.get(A)},has:function(A){return!!a&&a.has(A)},set:function(A,m){a||(a=o()),a.set(A,m)}};return c},PT}var UT,SH;function _L(){if(SH)return UT;SH=1;var n=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return UT={default:t.RFC3986,formatters:{RFC1738:function(i){return n.call(i,e,"+")},RFC3986:function(i){return String(i)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},UT}var KT,EH;function aae(){if(EH)return KT;EH=1;var n=_L(),e=Object.prototype.hasOwnProperty,t=Array.isArray,i=(function(){for(var F=[],j=0;j<256;++j)F.push("%"+((j<16?"0":"")+j.toString(16)).toUpperCase());return F})(),r=function(j){for(;j.length>1;){var Q=j.pop(),V=Q.obj[Q.prop];if(t(V)){for(var H=[],G=0;G<V.length;++G)typeof V[G]<"u"&&H.push(V[G]);Q.obj[Q.prop]=H}}},o=function(j,Q){for(var V=Q&&Q.plainObjects?{__proto__:null}:{},H=0;H<j.length;++H)typeof j[H]<"u"&&(V[H]=j[H]);return V},s=function F(j,Q,V){if(!Q)return j;if(typeof Q!="object"&&typeof Q!="function"){if(t(j))j.push(Q);else if(j&&typeof j=="object")(V&&(V.plainObjects||V.allowPrototypes)||!e.call(Object.prototype,Q))&&(j[Q]=!0);else return[j,Q];return j}if(!j||typeof j!="object")return[j].concat(Q);var H=j;return t(j)&&!t(Q)&&(H=o(j,V)),t(j)&&t(Q)?(Q.forEach(function(G,Y){if(e.call(j,Y)){var z=j[Y];z&&typeof z=="object"&&G&&typeof G=="object"?j[Y]=F(z,G,V):j.push(G)}else j[Y]=G}),j):Object.keys(Q).reduce(function(G,Y){var z=Q[Y];return e.call(G,Y)?G[Y]=F(G[Y],z,V):G[Y]=z,G},H)},a=function(j,Q){return Object.keys(Q).reduce(function(V,H){return V[H]=Q[H],V},j)},c=function(F,j,Q){var V=F.replace(/\+/g," ");if(Q==="iso-8859-1")return V.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(V)}catch{return V}},A=1024,m=function(j,Q,V,H,G){if(j.length===0)return j;var Y=j;if(typeof j=="symbol"?Y=Symbol.prototype.toString.call(j):typeof j!="string"&&(Y=String(j)),V==="iso-8859-1")return escape(Y).replace(/%u[0-9a-f]{4}/gi,function(we){return"%26%23"+parseInt(we.slice(2),16)+"%3B"});for(var z="",se=0;se<Y.length;se+=A){for(var le=Y.length>=A?Y.slice(se,se+A):Y,me=[],fe=0;fe<le.length;++fe){var _e=le.charCodeAt(fe);if(_e===45||_e===46||_e===95||_e===126||_e>=48&&_e<=57||_e>=65&&_e<=90||_e>=97&&_e<=122||G===n.RFC1738&&(_e===40||_e===41)){me[me.length]=le.charAt(fe);continue}if(_e<128){me[me.length]=i[_e];continue}if(_e<2048){me[me.length]=i[192|_e>>6]+i[128|_e&63];continue}if(_e<55296||_e>=57344){me[me.length]=i[224|_e>>12]+i[128|_e>>6&63]+i[128|_e&63];continue}fe+=1,_e=65536+((_e&1023)<<10|le.charCodeAt(fe)&1023),me[me.length]=i[240|_e>>18]+i[128|_e>>12&63]+i[128|_e>>6&63]+i[128|_e&63]}z+=me.join("")}return z},v=function(j){for(var Q=[{obj:{o:j},prop:"o"}],V=[],H=0;H<Q.length;++H)for(var G=Q[H],Y=G.obj[G.prop],z=Object.keys(Y),se=0;se<z.length;++se){var le=z[se],me=Y[le];typeof me=="object"&&me!==null&&V.indexOf(me)===-1&&(Q.push({obj:Y,prop:le}),V.push(me))}return r(Q),j},x=function(j){return Object.prototype.toString.call(j)==="[object RegExp]"},_=function(j){return!j||typeof j!="object"?!1:!!(j.constructor&&j.constructor.isBuffer&&j.constructor.isBuffer(j))},O=function(j,Q){return[].concat(j,Q)},P=function(j,Q){if(t(j)){for(var V=[],H=0;H<j.length;H+=1)V.push(Q(j[H]));return V}return Q(j)};return KT={arrayToObject:o,assign:a,combine:O,compact:v,decode:c,encode:m,isBuffer:_,isRegExp:x,maybeMap:P,merge:s},KT}var LT,OH;function oUe(){if(OH)return LT;OH=1;var n=rUe(),e=aae(),t=_L(),i=Object.prototype.hasOwnProperty,r={brackets:function(F){return F+"[]"},comma:"comma",indices:function(F,j){return F+"["+j+"]"},repeat:function(F){return F}},o=Array.isArray,s=Array.prototype.push,a=function(P,F){s.apply(P,o(F)?F:[F])},c=Date.prototype.toISOString,A=t.default,m={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:A,formatter:t.formatters[A],indices:!1,serializeDate:function(F){return c.call(F)},skipNulls:!1,strictNullHandling:!1},v=function(F){return typeof F=="string"||typeof F=="number"||typeof F=="boolean"||typeof F=="symbol"||typeof F=="bigint"},x={},_=function P(F,j,Q,V,H,G,Y,z,se,le,me,fe,_e,we,ke,je,Ie,Qe){for(var tt=F,ht=Qe,ce=0,Le=!1;(ht=ht.get(x))!==void 0&&!Le;){var We=ht.get(F);if(ce+=1,typeof We<"u"){if(We===ce)throw new RangeError("Cyclic object value");Le=!0}typeof ht.get(x)>"u"&&(ce=0)}if(typeof le=="function"?tt=le(j,tt):tt instanceof Date?tt=_e(tt):Q==="comma"&&o(tt)&&(tt=e.maybeMap(tt,function(Rt){return Rt instanceof Date?_e(Rt):Rt})),tt===null){if(G)return se&&!je?se(j,m.encoder,Ie,"key",we):j;tt=""}if(v(tt)||e.isBuffer(tt)){if(se){var Me=je?j:se(j,m.encoder,Ie,"key",we);return[ke(Me)+"="+ke(se(tt,m.encoder,Ie,"value",we))]}return[ke(j)+"="+ke(String(tt))]}var dt=[];if(typeof tt>"u")return dt;var it;if(Q==="comma"&&o(tt))je&&se&&(tt=e.maybeMap(tt,se)),it=[{value:tt.length>0?tt.join(",")||null:void 0}];else if(o(le))it=le;else{var vt=Object.keys(tt);it=me?vt.sort(me):vt}var Ut=z?String(j).replace(/\./g,"%2E"):String(j),Pe=V&&o(tt)&&tt.length===1?Ut+"[]":Ut;if(H&&o(tt)&&tt.length===0)return Pe+"[]";for(var Te=0;Te<it.length;++Te){var Se=it[Te],Ne=typeof Se=="object"&&Se&&typeof Se.value<"u"?Se.value:tt[Se];if(!(Y&&Ne===null)){var ut=fe&&z?String(Se).replace(/\./g,"%2E"):String(Se),rt=o(tt)?typeof Q=="function"?Q(Pe,ut):Pe:Pe+(fe?"."+ut:"["+ut+"]");Qe.set(F,ce);var mt=n();mt.set(x,Qe),a(dt,P(Ne,rt,Q,V,H,G,Y,z,Q==="comma"&&je&&o(tt)?null:se,le,me,fe,_e,we,ke,je,Ie,mt))}}return dt},O=function(F){if(!F)return m;if(typeof F.allowEmptyArrays<"u"&&typeof F.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof F.encodeDotInKeys<"u"&&typeof F.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(F.encoder!==null&&typeof F.encoder<"u"&&typeof F.encoder!="function")throw new TypeError("Encoder has to be a function.");var j=F.charset||m.charset;if(typeof F.charset<"u"&&F.charset!=="utf-8"&&F.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var Q=t.default;if(typeof F.format<"u"){if(!i.call(t.formatters,F.format))throw new TypeError("Unknown format option provided.");Q=F.format}var V=t.formatters[Q],H=m.filter;(typeof F.filter=="function"||o(F.filter))&&(H=F.filter);var G;if(F.arrayFormat in r?G=F.arrayFormat:"indices"in F?G=F.indices?"indices":"repeat":G=m.arrayFormat,"commaRoundTrip"in F&&typeof F.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var Y=typeof F.allowDots>"u"?F.encodeDotInKeys===!0?!0:m.allowDots:!!F.allowDots;return{addQueryPrefix:typeof F.addQueryPrefix=="boolean"?F.addQueryPrefix:m.addQueryPrefix,allowDots:Y,allowEmptyArrays:typeof F.allowEmptyArrays=="boolean"?!!F.allowEmptyArrays:m.allowEmptyArrays,arrayFormat:G,charset:j,charsetSentinel:typeof F.charsetSentinel=="boolean"?F.charsetSentinel:m.charsetSentinel,commaRoundTrip:!!F.commaRoundTrip,delimiter:typeof F.delimiter>"u"?m.delimiter:F.delimiter,encode:typeof F.encode=="boolean"?F.encode:m.encode,encodeDotInKeys:typeof F.encodeDotInKeys=="boolean"?F.encodeDotInKeys:m.encodeDotInKeys,encoder:typeof F.encoder=="function"?F.encoder:m.encoder,encodeValuesOnly:typeof F.encodeValuesOnly=="boolean"?F.encodeValuesOnly:m.encodeValuesOnly,filter:H,format:Q,formatter:V,serializeDate:typeof F.serializeDate=="function"?F.serializeDate:m.serializeDate,skipNulls:typeof F.skipNulls=="boolean"?F.skipNulls:m.skipNulls,sort:typeof F.sort=="function"?F.sort:null,strictNullHandling:typeof F.strictNullHandling=="boolean"?F.strictNullHandling:m.strictNullHandling}};return LT=function(P,F){var j=P,Q=O(F),V,H;typeof Q.filter=="function"?(H=Q.filter,j=H("",j)):o(Q.filter)&&(H=Q.filter,V=H);var G=[];if(typeof j!="object"||j===null)return"";var Y=r[Q.arrayFormat],z=Y==="comma"&&Q.commaRoundTrip;V||(V=Object.keys(j)),Q.sort&&V.sort(Q.sort);for(var se=n(),le=0;le<V.length;++le){var me=V[le],fe=j[me];Q.skipNulls&&fe===null||a(G,_(fe,me,Y,z,Q.allowEmptyArrays,Q.strictNullHandling,Q.skipNulls,Q.encodeDotInKeys,Q.encode?Q.encoder:null,Q.filter,Q.sort,Q.allowDots,Q.serializeDate,Q.format,Q.formatter,Q.encodeValuesOnly,Q.charset,se))}var _e=G.join(Q.delimiter),we=Q.addQueryPrefix===!0?"?":"";return Q.charsetSentinel&&(Q.charset==="iso-8859-1"?we+="utf8=%26%2310003%3B&":we+="utf8=%E2%9C%93&"),_e.length>0?we+_e:""},LT}var FT,BH;function sUe(){if(BH)return FT;BH=1;var n=aae(),e=Object.prototype.hasOwnProperty,t=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},r=function(x){return x.replace(/&#(\d+);/g,function(_,O){return String.fromCharCode(parseInt(O,10))})},o=function(x,_,O){if(x&&typeof x=="string"&&_.comma&&x.indexOf(",")>-1)return x.split(",");if(_.throwOnLimitExceeded&&O>=_.arrayLimit)throw new RangeError("Array limit exceeded. Only "+_.arrayLimit+" element"+(_.arrayLimit===1?"":"s")+" allowed in an array.");return x},s="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",c=function(_,O){var P={__proto__:null},F=O.ignoreQueryPrefix?_.replace(/^\?/,""):_;F=F.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var j=O.parameterLimit===1/0?void 0:O.parameterLimit,Q=F.split(O.delimiter,O.throwOnLimitExceeded?j+1:j);if(O.throwOnLimitExceeded&&Q.length>j)throw new RangeError("Parameter limit exceeded. Only "+j+" parameter"+(j===1?"":"s")+" allowed.");var V=-1,H,G=O.charset;if(O.charsetSentinel)for(H=0;H<Q.length;++H)Q[H].indexOf("utf8=")===0&&(Q[H]===a?G="utf-8":Q[H]===s&&(G="iso-8859-1"),V=H,H=Q.length);for(H=0;H<Q.length;++H)if(H!==V){var Y=Q[H],z=Y.indexOf("]="),se=z===-1?Y.indexOf("="):z+1,le,me;se===-1?(le=O.decoder(Y,i.decoder,G,"key"),me=O.strictNullHandling?null:""):(le=O.decoder(Y.slice(0,se),i.decoder,G,"key"),me=n.maybeMap(o(Y.slice(se+1),O,t(P[le])?P[le].length:0),function(_e){return O.decoder(_e,i.decoder,G,"value")})),me&&O.interpretNumericEntities&&G==="iso-8859-1"&&(me=r(String(me))),Y.indexOf("[]=")>-1&&(me=t(me)?[me]:me);var fe=e.call(P,le);fe&&O.duplicates==="combine"?P[le]=n.combine(P[le],me):(!fe||O.duplicates==="last")&&(P[le]=me)}return P},A=function(x,_,O,P){var F=0;if(x.length>0&&x[x.length-1]==="[]"){var j=x.slice(0,-1).join("");F=Array.isArray(_)&&_[j]?_[j].length:0}for(var Q=P?_:o(_,O,F),V=x.length-1;V>=0;--V){var H,G=x[V];if(G==="[]"&&O.parseArrays)H=O.allowEmptyArrays&&(Q===""||O.strictNullHandling&&Q===null)?[]:n.combine([],Q);else{H=O.plainObjects?{__proto__:null}:{};var Y=G.charAt(0)==="["&&G.charAt(G.length-1)==="]"?G.slice(1,-1):G,z=O.decodeDotInKeys?Y.replace(/%2E/g,"."):Y,se=parseInt(z,10);!O.parseArrays&&z===""?H={0:Q}:!isNaN(se)&&G!==z&&String(se)===z&&se>=0&&O.parseArrays&&se<=O.arrayLimit?(H=[],H[se]=Q):z!=="__proto__"&&(H[z]=Q)}Q=H}return Q},m=function(_,O,P,F){if(_){var j=P.allowDots?_.replace(/\.([^.[]+)/g,"[$1]"):_,Q=/(\[[^[\]]*])/,V=/(\[[^[\]]*])/g,H=P.depth>0&&Q.exec(j),G=H?j.slice(0,H.index):j,Y=[];if(G){if(!P.plainObjects&&e.call(Object.prototype,G)&&!P.allowPrototypes)return;Y.push(G)}for(var z=0;P.depth>0&&(H=V.exec(j))!==null&&z<P.depth;){if(z+=1,!P.plainObjects&&e.call(Object.prototype,H[1].slice(1,-1))&&!P.allowPrototypes)return;Y.push(H[1])}if(H){if(P.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+P.depth+" and strictDepth is true");Y.push("["+j.slice(H.index)+"]")}return A(Y,O,P,F)}},v=function(_){if(!_)return i;if(typeof _.allowEmptyArrays<"u"&&typeof _.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof _.decodeDotInKeys<"u"&&typeof _.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(_.decoder!==null&&typeof _.decoder<"u"&&typeof _.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof _.charset<"u"&&_.charset!=="utf-8"&&_.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof _.throwOnLimitExceeded<"u"&&typeof _.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var O=typeof _.charset>"u"?i.charset:_.charset,P=typeof _.duplicates>"u"?i.duplicates:_.duplicates;if(P!=="combine"&&P!=="first"&&P!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var F=typeof _.allowDots>"u"?_.decodeDotInKeys===!0?!0:i.allowDots:!!_.allowDots;return{allowDots:F,allowEmptyArrays:typeof _.allowEmptyArrays=="boolean"?!!_.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:typeof _.allowPrototypes=="boolean"?_.allowPrototypes:i.allowPrototypes,allowSparse:typeof _.allowSparse=="boolean"?_.allowSparse:i.allowSparse,arrayLimit:typeof _.arrayLimit=="number"?_.arrayLimit:i.arrayLimit,charset:O,charsetSentinel:typeof _.charsetSentinel=="boolean"?_.charsetSentinel:i.charsetSentinel,comma:typeof _.comma=="boolean"?_.comma:i.comma,decodeDotInKeys:typeof _.decodeDotInKeys=="boolean"?_.decodeDotInKeys:i.decodeDotInKeys,decoder:typeof _.decoder=="function"?_.decoder:i.decoder,delimiter:typeof _.delimiter=="string"||n.isRegExp(_.delimiter)?_.delimiter:i.delimiter,depth:typeof _.depth=="number"||_.depth===!1?+_.depth:i.depth,duplicates:P,ignoreQueryPrefix:_.ignoreQueryPrefix===!0,interpretNumericEntities:typeof _.interpretNumericEntities=="boolean"?_.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:typeof _.parameterLimit=="number"?_.parameterLimit:i.parameterLimit,parseArrays:_.parseArrays!==!1,plainObjects:typeof _.plainObjects=="boolean"?_.plainObjects:i.plainObjects,strictDepth:typeof _.strictDepth=="boolean"?!!_.strictDepth:i.strictDepth,strictNullHandling:typeof _.strictNullHandling=="boolean"?_.strictNullHandling:i.strictNullHandling,throwOnLimitExceeded:typeof _.throwOnLimitExceeded=="boolean"?_.throwOnLimitExceeded:!1}};return FT=function(x,_){var O=v(_);if(x===""||x===null||typeof x>"u")return O.plainObjects?{__proto__:null}:{};for(var P=typeof x=="string"?c(x,O):x,F=O.plainObjects?{__proto__:null}:{},j=Object.keys(P),Q=0;Q<j.length;++Q){var V=j[Q],H=m(V,P[V],O,typeof x=="string");F=n.merge(F,H,O)}return O.allowSparse===!0?F:n.compact(F)},FT}var zT,IH;function aUe(){if(IH)return zT;IH=1;var n=oUe(),e=sUe(),t=_L();return zT={formats:t,parse:e,stringify:n},zT}var kH;function lUe(){if(kH)return Wv;kH=1;var n=OPe();function e(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var t=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,r=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,o=["<",">",'"',"`"," ","\r",`
`," "],s=["{","}","|","\\","^","`"].concat(o),a=["'"].concat(s),c=["%","/","?",";","#"].concat(a),A=["/","?","#"],m=255,v=/^[+a-z0-9A-Z_-]{0,63}$/,x=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},O={javascript:!0,"javascript:":!0},P={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},F=aUe();function j(G,Y,z){if(G&&typeof G=="object"&&G instanceof e)return G;var se=new e;return se.parse(G,Y,z),se}e.prototype.parse=function(G,Y,z){if(typeof G!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof G);var se=G.indexOf("?"),le=se!==-1&&se<G.indexOf("#")?"?":"#",me=G.split(le),fe=/\\/g;me[0]=me[0].replace(fe,"/"),G=me.join(le);var _e=G;if(_e=_e.trim(),!z&&G.split("#").length===1){var we=r.exec(_e);if(we)return this.path=_e,this.href=_e,this.pathname=we[1],we[2]?(this.search=we[2],Y?this.query=F.parse(this.search.substr(1)):this.query=this.search.substr(1)):Y&&(this.search="",this.query={}),this}var ke=t.exec(_e);if(ke){ke=ke[0];var je=ke.toLowerCase();this.protocol=je,_e=_e.substr(ke.length)}if(z||ke||_e.match(/^\/\/[^@/]+@[^@/]+/)){var Ie=_e.substr(0,2)==="//";Ie&&!(ke&&O[ke])&&(_e=_e.substr(2),this.slashes=!0)}if(!O[ke]&&(Ie||ke&&!P[ke])){for(var Qe=-1,tt=0;tt<A.length;tt++){var ht=_e.indexOf(A[tt]);ht!==-1&&(Qe===-1||ht<Qe)&&(Qe=ht)}var ce,Le;Qe===-1?Le=_e.lastIndexOf("@"):Le=_e.lastIndexOf("@",Qe),Le!==-1&&(ce=_e.slice(0,Le),_e=_e.slice(Le+1),this.auth=decodeURIComponent(ce)),Qe=-1;for(var tt=0;tt<c.length;tt++){var ht=_e.indexOf(c[tt]);ht!==-1&&(Qe===-1||ht<Qe)&&(Qe=ht)}Qe===-1&&(Qe=_e.length),this.host=_e.slice(0,Qe),_e=_e.slice(Qe),this.parseHost(),this.hostname=this.hostname||"";var We=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!We)for(var Me=this.hostname.split(/\./),tt=0,dt=Me.length;tt<dt;tt++){var it=Me[tt];if(it&&!it.match(v)){for(var vt="",Ut=0,Pe=it.length;Ut<Pe;Ut++)it.charCodeAt(Ut)>127?vt+="x":vt+=it[Ut];if(!vt.match(v)){var Te=Me.slice(0,tt),Se=Me.slice(tt+1),Ne=it.match(x);Ne&&(Te.push(Ne[1]),Se.unshift(Ne[2])),Se.length&&(_e="/"+Se.join(".")+_e),this.hostname=Te.join(".");break}}}this.hostname.length>m?this.hostname="":this.hostname=this.hostname.toLowerCase(),We||(this.hostname=n.toASCII(this.hostname));var ut=this.port?":"+this.port:"",rt=this.hostname||"";this.host=rt+ut,this.href+=this.host,We&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),_e[0]!=="/"&&(_e="/"+_e))}if(!_[je])for(var tt=0,dt=a.length;tt<dt;tt++){var mt=a[tt];if(_e.indexOf(mt)!==-1){var Rt=encodeURIComponent(mt);Rt===mt&&(Rt=escape(mt)),_e=_e.split(mt).join(Rt)}}var Bt=_e.indexOf("#");Bt!==-1&&(this.hash=_e.substr(Bt),_e=_e.slice(0,Bt));var $t=_e.indexOf("?");if($t!==-1?(this.search=_e.substr($t),this.query=_e.substr($t+1),Y&&(this.query=F.parse(this.query)),_e=_e.slice(0,$t)):Y&&(this.search="",this.query={}),_e&&(this.pathname=_e),P[je]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ut=this.pathname||"",Rn=this.search||"";this.path=ut+Rn}return this.href=this.format(),this};function Q(G){return typeof G=="string"&&(G=j(G)),G instanceof e?G.format():e.prototype.format.call(G)}e.prototype.format=function(){var G=this.auth||"";G&&(G=encodeURIComponent(G),G=G.replace(/%3A/i,":"),G+="@");var Y=this.protocol||"",z=this.pathname||"",se=this.hash||"",le=!1,me="";this.host?le=G+this.host:this.hostname&&(le=G+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(le+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(me=F.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var fe=this.search||me&&"?"+me||"";return Y&&Y.substr(-1)!==":"&&(Y+=":"),this.slashes||(!Y||P[Y])&&le!==!1?(le="//"+(le||""),z&&z.charAt(0)!=="/"&&(z="/"+z)):le||(le=""),se&&se.charAt(0)!=="#"&&(se="#"+se),fe&&fe.charAt(0)!=="?"&&(fe="?"+fe),z=z.replace(/[?#]/g,function(_e){return encodeURIComponent(_e)}),fe=fe.replace("#","%23"),Y+le+z+fe+se};function V(G,Y){return j(G,!1,!0).resolve(Y)}e.prototype.resolve=function(G){return this.resolveObject(j(G,!1,!0)).format()};function H(G,Y){return G?j(G,!1,!0).resolveObject(Y):Y}return e.prototype.resolveObject=function(G){if(typeof G=="string"){var Y=new e;Y.parse(G,!1,!0),G=Y}for(var z=new e,se=Object.keys(this),le=0;le<se.length;le++){var me=se[le];z[me]=this[me]}if(z.hash=G.hash,G.href==="")return z.href=z.format(),z;if(G.slashes&&!G.protocol){for(var fe=Object.keys(G),_e=0;_e<fe.length;_e++){var we=fe[_e];we!=="protocol"&&(z[we]=G[we])}return P[z.protocol]&&z.hostname&&!z.pathname&&(z.pathname="/",z.path=z.pathname),z.href=z.format(),z}if(G.protocol&&G.protocol!==z.protocol){if(!P[G.protocol]){for(var ke=Object.keys(G),je=0;je<ke.length;je++){var Ie=ke[je];z[Ie]=G[Ie]}return z.href=z.format(),z}if(z.protocol=G.protocol,!G.host&&!O[G.protocol]){for(var dt=(G.pathname||"").split("/");dt.length&&!(G.host=dt.shift()););G.host||(G.host=""),G.hostname||(G.hostname=""),dt[0]!==""&&dt.unshift(""),dt.length<2&&dt.unshift(""),z.pathname=dt.join("/")}else z.pathname=G.pathname;if(z.search=G.search,z.query=G.query,z.host=G.host||"",z.auth=G.auth,z.hostname=G.hostname||G.host,z.port=G.port,z.pathname||z.search){var Qe=z.pathname||"",tt=z.search||"";z.path=Qe+tt}return z.slashes=z.slashes||G.slashes,z.href=z.format(),z}var ht=z.pathname&&z.pathname.charAt(0)==="/",ce=G.host||G.pathname&&G.pathname.charAt(0)==="/",Le=ce||ht||z.host&&G.pathname,We=Le,Me=z.pathname&&z.pathname.split("/")||[],dt=G.pathname&&G.pathname.split("/")||[],it=z.protocol&&!P[z.protocol];if(it&&(z.hostname="",z.port=null,z.host&&(Me[0]===""?Me[0]=z.host:Me.unshift(z.host)),z.host="",G.protocol&&(G.hostname=null,G.port=null,G.host&&(dt[0]===""?dt[0]=G.host:dt.unshift(G.host)),G.host=null),Le=Le&&(dt[0]===""||Me[0]==="")),ce)z.host=G.host||G.host===""?G.host:z.host,z.hostname=G.hostname||G.hostname===""?G.hostname:z.hostname,z.search=G.search,z.query=G.query,Me=dt;else if(dt.length)Me||(Me=[]),Me.pop(),Me=Me.concat(dt),z.search=G.search,z.query=G.query;else if(G.search!=null){if(it){z.host=Me.shift(),z.hostname=z.host;var vt=z.host&&z.host.indexOf("@")>0?z.host.split("@"):!1;vt&&(z.auth=vt.shift(),z.hostname=vt.shift(),z.host=z.hostname)}return z.search=G.search,z.query=G.query,(z.pathname!==null||z.search!==null)&&(z.path=(z.pathname?z.pathname:"")+(z.search?z.search:"")),z.href=z.format(),z}if(!Me.length)return z.pathname=null,z.search?z.path="/"+z.search:z.path=null,z.href=z.format(),z;for(var Ut=Me.slice(-1)[0],Pe=(z.host||G.host||Me.length>1)&&(Ut==="."||Ut==="..")||Ut==="",Te=0,Se=Me.length;Se>=0;Se--)Ut=Me[Se],Ut==="."?Me.splice(Se,1):Ut===".."?(Me.splice(Se,1),Te++):Te&&(Me.splice(Se,1),Te--);if(!Le&&!We)for(;Te--;Te)Me.unshift("..");Le&&Me[0]!==""&&(!Me[0]||Me[0].charAt(0)!=="/")&&Me.unshift(""),Pe&&Me.join("/").substr(-1)!=="/"&&Me.push("");var Ne=Me[0]===""||Me[0]&&Me[0].charAt(0)==="/";if(it){z.hostname=Ne?"":Me.length?Me.shift():"",z.host=z.hostname;var vt=z.host&&z.host.indexOf("@")>0?z.host.split("@"):!1;vt&&(z.auth=vt.shift(),z.hostname=vt.shift(),z.host=z.hostname)}return Le=Le||z.host&&Me.length,Le&&!Ne&&Me.unshift(""),Me.length>0?z.pathname=Me.join("/"):(z.pathname=null,z.path=null),(z.pathname!==null||z.search!==null)&&(z.path=(z.pathname?z.pathname:"")+(z.search?z.search:"")),z.auth=G.auth||z.auth,z.slashes=z.slashes||G.slashes,z.href=z.format(),z},e.prototype.parseHost=function(){var G=this.host,Y=i.exec(G);Y&&(Y=Y[0],Y!==":"&&(this.port=Y.substr(1)),G=G.substr(0,G.length-Y.length)),G&&(this.hostname=G)},Wv.parse=j,Wv.resolve=V,Wv.resolveObject=H,Wv.format=Q,Wv.Url=e,Wv}var uUe=lUe();const TH=Wl(uUe);function ko(){var n="/home/runner/work/maputnik/maputnik/src/libs/metadata.ts",e="370277aff056c0894d7ae34686219318414cc635",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/metadata.ts",statementMap:{0:{start:{line:3,column:2},end:{line:16,column:5}},1:{start:{line:7,column:4},end:{line:9,column:5}},2:{start:{line:8,column:6},end:{line:8,column:60}},3:{start:{line:10,column:4},end:{line:10,column:27}},4:{start:{line:12,column:4},end:{line:12,column:13}},5:{start:{line:14,column:4},end:{line:14,column:95}},6:{start:{line:15,column:4},end:{line:15,column:21}},7:{start:{line:19,column:2},end:{line:19,column:34}},8:{start:{line:19,column:20},end:{line:19,column:34}},9:{start:{line:20,column:17},end:{line:20,column:42}},10:{start:{line:21,column:23},end:{line:21,column:57}},11:{start:{line:22,column:2},end:{line:26,column:3}},12:{start:{line:23,column:4},end:{line:23,column:41}},13:{start:{line:25,column:4},end:{line:25,column:69}},14:{start:{line:27,column:14},end:{line:27,column:35}},15:{start:{line:28,column:2},end:{line:28,column:24}},16:{start:{line:31,column:2},end:{line:31,column:30}},17:{start:{line:31,column:16},end:{line:31,column:30}},18:{start:{line:32,column:14},end:{line:32,column:31}},19:{start:{line:33,column:2},end:{line:33,column:57}},20:{start:{line:33,column:32},end:{line:33,column:55}}},fnMap:{0:{name:"loadJSON",decl:{start:{line:2,column:9},end:{line:2,column:17}},loc:{start:{line:2,column:41},end:{line:17,column:1}},line:2},1:{name:"(anonymous_1)",decl:{start:{line:6,column:10},end:{line:6,column:11}},loc:{start:{line:6,column:24},end:{line:11,column:3}},line:6},2:{name:"(anonymous_2)",decl:{start:{line:11,column:10},end:{line:11,column:11}},loc:{start:{line:11,column:20},end:{line:13,column:3}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:13,column:11},end:{line:13,column:12}},loc:{start:{line:13,column:17},end:{line:16,column:3}},line:13},4:{name:"downloadGlyphsMetadata",decl:{start:{line:18,column:16},end:{line:18,column:38}},loc:{start:{line:18,column:56},end:{line:29,column:1}},line:18},5:{name:"downloadSpriteMetadata",decl:{start:{line:30,column:16},end:{line:30,column:38}},loc:{start:{line:30,column:52},end:{line:34,column:1}},line:30},6:{name:"(anonymous_6)",decl:{start:{line:33,column:20},end:{line:33,column:21}},loc:{start:{line:33,column:32},end:{line:33,column:55}},line:33}},branchMap:{0:{loc:{start:{line:7,column:4},end:{line:9,column:5}},type:"if",locations:[{start:{line:7,column:4},end:{line:9,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:7},1:{loc:{start:{line:19,column:2},end:{line:19,column:34}},type:"if",locations:[{start:{line:19,column:2},end:{line:19,column:34}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:19},2:{loc:{start:{line:22,column:2},end:{line:26,column:3}},type:"if",locations:[{start:{line:22,column:2},end:{line:26,column:3}},{start:{line:24,column:9},end:{line:26,column:3}}],line:22},3:{loc:{start:{line:31,column:2},end:{line:31,column:30}},type:"if",locations:[{start:{line:31,column:2},end:{line:31,column:30}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:31}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/metadata.ts"],names:[],mappings:"AAAA,OAAO,YAAY;AAEnB,SAAS,SAAS,KAAa,cAAmB,IAA8B;AAC9E,QAAM,KAAK;AAAA,IACT,MAAM;AAAA,IACN,aAAa;AAAA,EACf,CAAC,EACE,KAAK,CAAC,aAAa;AAClB,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI,MAAM,iCAAiC,GAAG;AAAA,IACtD;AACA,WAAO,SAAS,KAAK;AAAA,EACvB,CAAC,EACA,KAAK,CAAC,SAAS;AACd,OAAG,IAAI;AAAA,EACT,CAAC,EACA,MAAM,MAAM;AACX,YAAQ,KAAK,+BAA+B,MAAM,2BAA2B,YAAY;AACzF,OAAG,YAAY;AAAA,EACjB,CAAC;AACL;AAEO,gBAAS,uBAAuB,aAAqB,IAA8B;AACxF,MAAG,CAAC,YAAa,QAAO,GAAG,CAAC,CAAC;AAI7B,QAAM,SAAS,OAAO,MAAM,WAAW;AACvC,QAAM,eAAe;AACrB,MAAG,OAAO,aAAa,cAAc;AACnC,WAAO,WAAW;AAAA,EACpB,OAAO;AACL,WAAO,WAAW,OAAO,SAAU,QAAQ,cAAc,OAAO;AAAA,EAClE;AACA,QAAM,MAAM,OAAO,OAAO,MAAM;AAEhC,WAAS,KAAK,CAAC,GAAG,EAAE;AACtB;AAEO,gBAAS,uBAAuB,SAAiB,IAA8B;AACpF,MAAG,CAAC,QAAS,QAAO,GAAG,CAAC,CAAC;AACzB,QAAM,MAAM,UAAU;AACtB,WAAS,KAAK,CAAC,GAAG,YAAU,GAAG,OAAO,KAAK,MAAM,CAAC,CAAC;AACrD;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"370277aff056c0894d7ae34686219318414cc635"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return ko=function(){return s},s}ko();function lae(n,e,t){ko().f[0]++,ko().s[0]++,fetch(n,{mode:"cors",credentials:"same-origin"}).then(i=>{if(ko().f[1]++,ko().s[1]++,i.ok)ko().b[0][1]++;else throw ko().b[0][0]++,ko().s[2]++,new Error("Failed to load metadata for "+n);return ko().s[3]++,i.json()}).then(i=>{ko().f[2]++,ko().s[4]++,t(i)}).catch(()=>{ko().f[3]++,ko().s[5]++,console.warn("Can not load metadata for "+n+", using default value "+e),ko().s[6]++,t(e)})}function cUe(n,e){if(ko().f[4]++,ko().s[7]++,n)ko().b[1][1]++;else return ko().b[1][0]++,ko().s[8]++,e([]);const t=(ko().s[9]++,TH.parse(n)),i=(ko().s[10]++,"/%7Bfontstack%7D/%7Brange%7D.pbf");ko().s[11]++,t.pathname===i?(ko().b[2][0]++,ko().s[12]++,t.pathname="/fontstacks.json"):(ko().b[2][1]++,ko().s[13]++,t.pathname=t.pathname.replace(i,".json"));const r=(ko().s[14]++,TH.format(t));ko().s[15]++,lae(r,[],e)}function AUe(n,e){if(ko().f[5]++,ko().s[16]++,n)ko().b[3][1]++;else return ko().b[3][0]++,ko().s[17]++,e([]);const t=(ko().s[18]++,n+".json");ko().s[19]++,lae(t,{},i=>(ko().f[6]++,ko().s[20]++,e(Object.keys(i))))}function ah(){var n="/home/runner/work/maputnik/maputnik/src/libs/diffmessage.ts",e="f92fa2abb31199d99fd3ae02d967dc6702faf862",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/diffmessage.ts",statementMap:{0:{start:{line:3,column:18},end:{line:3,column:47}},1:{start:{line:4,column:2},end:{line:4,column:70}},2:{start:{line:4,column:30},end:{line:4,column:68}},3:{start:{line:7,column:2},end:{line:7,column:71}},4:{start:{line:7,column:58},end:{line:7,column:69}},5:{start:{line:10,column:2},end:{line:10,column:71}},6:{start:{line:10,column:58},end:{line:10,column:69}}},fnMap:{0:{name:"diffMessages",decl:{start:{line:2,column:9},end:{line:2,column:21}},loc:{start:{line:2,column:47},end:{line:5,column:1}},line:2},1:{name:"(anonymous_1)",decl:{start:{line:4,column:21},end:{line:4,column:22}},loc:{start:{line:4,column:30},end:{line:4,column:68}},line:4},2:{name:"undoMessages",decl:{start:{line:6,column:16},end:{line:6,column:28}},loc:{start:{line:6,column:54},end:{line:8,column:1}},line:6},3:{name:"(anonymous_3)",decl:{start:{line:7,column:51},end:{line:7,column:52}},loc:{start:{line:7,column:58},end:{line:7,column:69}},line:7},4:{name:"redoMessages",decl:{start:{line:9,column:16},end:{line:9,column:28}},loc:{start:{line:9,column:54},end:{line:11,column:1}},line:9},5:{name:"(anonymous_5)",decl:{start:{line:10,column:51},end:{line:10,column:52}},loc:{start:{line:10,column:58},end:{line:10,column:69}},line:10}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/diffmessage.ts"],names:[],mappings:"AAAA,SAAQ,YAAW;AAGnB,SAAS,aAAa,aAAiC,YAAgC;AACrF,QAAM,UAAU,KAAK,aAAa,UAAU;AAC5C,SAAO,QAAQ,IAAI,SAAO,IAAI,UAAU,MAAM,IAAI,KAAK,KAAK,GAAG,CAAC;AAClE;AAEO,gBAAS,aAAa,aAAiC,YAAgC;AAC5F,SAAO,aAAa,aAAa,UAAU,EAAE,IAAI,OAAK,UAAU,CAAC;AACnE;AACO,gBAAS,aAAa,aAAiC,YAAgC;AAC5F,SAAO,aAAa,aAAa,UAAU,EAAE,IAAI,OAAK,UAAU,CAAC;AACnE;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f92fa2abb31199d99fd3ae02d967dc6702faf862"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return ah=function(){return s},s}ah();function uae(n,e){ah().f[0]++;const t=(ah().s[0]++,Qce(n,e));return ah().s[1]++,t.map(i=>(ah().f[1]++,ah().s[2]++,i.command+" "+i.args.join(" ")))}function hUe(n,e){return ah().f[2]++,ah().s[3]++,uae(n,e).map(t=>(ah().f[3]++,ah().s[4]++,"Undo "+t))}function dUe(n,e){return ah().f[4]++,ah().s[5]++,uae(n,e).map(t=>(ah().f[5]++,ah().s[6]++,"Redo "+t))}function nc(){var n="/home/runner/work/maputnik/maputnik/src/libs/urlopen.ts",e="d72dae9738057e855ea98626011f8090b99877cc",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/urlopen.ts",statementMap:{0:{start:{line:3,column:21},end:{line:3,column:50}},1:{start:{line:4,column:19},end:{line:4,column:55}},2:{start:{line:5,column:2},end:{line:8,column:3}},3:{start:{line:6,column:4},end:{line:6,column:44}},4:{start:{line:7,column:4},end:{line:7,column:75}},5:{start:{line:9,column:2},end:{line:9,column:18}},6:{start:{line:12,column:2},end:{line:12,column:41}},7:{start:{line:13,column:2},end:{line:23,column:3}},8:{start:{line:14,column:21},end:{line:17,column:6}},9:{start:{line:18,column:17},end:{line:18,column:38}},10:{start:{line:19,column:4},end:{line:19,column:43}},11:{start:{line:21,column:4},end:{line:21,column:63}},12:{start:{line:22,column:4},end:{line:22,column:28}}},fnMap:{0:{name:"getStyleUrlFromAddressbarAndRemoveItIfNeeded",decl:{start:{line:2,column:16},end:{line:2,column:60}},loc:{start:{line:2,column:63},end:{line:10,column:1}},line:2},1:{name:"loadStyleUrl",decl:{start:{line:11,column:22},end:{line:11,column:34}},loc:{start:{line:11,column:45},end:{line:24,column:1}},line:11}},branchMap:{0:{loc:{start:{line:5,column:2},end:{line:8,column:3}},type:"if",locations:[{start:{line:5,column:2},end:{line:8,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:5}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0},f:{0:0,1:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/urlopen.ts"],names:[],mappings:"AAAA,OAAO,WAAW;AAGX,gBAAS,+CAA8D;AAC5E,QAAM,aAAa,IAAI,IAAI,OAAO,SAAS,IAAI;AAC/C,QAAM,WAAW,WAAW,aAAa,IAAI,OAAO;AACpD,MAAI,UAAU;AACZ,eAAW,aAAa,OAAO,OAAO;AACtC,WAAO,QAAQ,aAAa,CAAC,GAAG,SAAS,OAAO,WAAW,SAAS,CAAC;AAAA,EACvE;AACA,SAAO;AACT;AAEA,sBAAsB,aAAa,UAAqD;AACtF,UAAQ,IAAI,iBAAiB,QAAQ;AACrC,MAAI;AACF,UAAM,WAAW,MAAM,MAAM,UAAU;AAAA,MACrC,MAAM;AAAA,MACN,aAAa;AAAA,IACf,CAAC;AACD,UAAM,OAAO,MAAM,SAAS,KAAK;AACjC,WAAO,MAAM,oBAAoB,IAAI;AAAA,EACvC,QAAQ;AACN,YAAQ,KAAK,oCAAoC,QAAQ;AACzD,WAAO,MAAM;AAAA,EACf;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d72dae9738057e855ea98626011f8090b99877cc"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return nc=function(){return s},s}nc();function fUe(){nc().f[0]++;const n=(nc().s[0]++,new URL(window.location.href)),e=(nc().s[1]++,n.searchParams.get("style"));return nc().s[2]++,e?(nc().b[0][0]++,nc().s[3]++,n.searchParams.delete("style"),nc().s[4]++,window.history.replaceState({},document.title,n.toString())):nc().b[0][1]++,nc().s[5]++,e}async function cae(n){nc().f[1]++,nc().s[6]++,console.log("Loading style",n),nc().s[7]++;try{const e=(nc().s[8]++,await fetch(n,{mode:"cors",credentials:"same-origin"})),t=(nc().s[9]++,await e.json());return nc().s[10]++,id.ensureStyleValidity(t)}catch{return nc().s[11]++,console.warn("Could not fetch default style: "+n),nc().s[12]++,id.emptyStyle}}/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var OD=function(n,e){return OD=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])},OD(n,e)};function Aae(n,e){OD(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function pUe(n){var e=typeof Symbol=="function"&&n[Symbol.iterator],t=0;return e?e.call(n):{next:function(){return n&&t>=n.length&&(n=void 0),{value:n&&n[t++],done:!n}}}}function mUe(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var i=t.call(n),r,o=[],s;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(s)throw s.error}}return o}function gUe(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(mUe(arguments[e]));return n}var hae=(function(){function n(e,t){this.target=t,this.type=e}return n})(),yUe=(function(n){Aae(e,n);function e(t,i){var r=n.call(this,"error",i)||this;return r.message=t.message,r.error=t,r}return e})(hae),vUe=(function(n){Aae(e,n);function e(t,i,r){t===void 0&&(t=1e3),i===void 0&&(i="");var o=n.call(this,"close",r)||this;return o.wasClean=!0,o.code=t,o.reason=i,o}return e})(hae);/*!
* Reconnecting WebSocket
* by Pedro Ladaria <pedro.ladaria@gmail.com>
* https://github.com/pladaria/reconnecting-websocket
* License MIT
*/var bUe=function(){if(typeof WebSocket<"u")return WebSocket},CUe=function(n){return typeof n<"u"&&!!n&&n.CLOSING===2},Qv={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0};(function(){function n(e,t,i){var r=this;i===void 0&&(i={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(o){r._debug("open event");var s=r._options.minUptime,a=s===void 0?Qv.minUptime:s;clearTimeout(r._connectTimeout),r._uptimeTimeout=setTimeout(function(){return r._acceptOpen()},a),r._ws.binaryType=r._binaryType,r._messageQueue.forEach(function(c){return r._ws.send(c)}),r._messageQueue=[],r.onopen&&r.onopen(o),r._listeners.open.forEach(function(c){return r._callEventListener(o,c)})},this._handleMessage=function(o){r._debug("message event"),r.onmessage&&r.onmessage(o),r._listeners.message.forEach(function(s){return r._callEventListener(o,s)})},this._handleError=function(o){r._debug("error event",o.message),r._disconnect(void 0,o.message==="TIMEOUT"?"timeout":void 0),r.onerror&&r.onerror(o),r._debug("exec error listeners"),r._listeners.error.forEach(function(s){return r._callEventListener(o,s)}),r._connect()},this._handleClose=function(o){r._debug("close event"),r._clearTimeouts(),r._shouldReconnect&&r._connect(),r.onclose&&r.onclose(o),r._listeners.close.forEach(function(s){return r._callEventListener(o,s)})},this._url=e,this._protocols=t,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(n,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(n,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CONNECTING",{get:function(){return n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"OPEN",{get:function(){return n.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSING",{get:function(){return n.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSED",{get:function(){return n.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(t,i){return typeof i=="string"?t+=i.length:i instanceof Blob?t+=i.size:t+=i.byteLength,t},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?n.CLOSED:n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),n.prototype.close=function(e,t){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)},n.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,t),this._connect())},n.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,i=t===void 0?Qv.maxEnqueuedMessages:t;this._messageQueue.length<i&&(this._debug("enqueue",e),this._messageQueue.push(e))}},n.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},n.prototype.dispatchEvent=function(e){var t,i,r=this._listeners[e.type];if(r)try{for(var o=pUe(r),s=o.next();!s.done;s=o.next()){var a=s.value;this._callEventListener(e,a)}}catch(c){t={error:c}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}return!0},n.prototype.removeEventListener=function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(function(i){return i!==t}))},n.prototype._debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._options.debug&&console.log.apply(console,gUe(["RWS>"],e))},n.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,i=t===void 0?Qv.reconnectionDelayGrowFactor:t,r=e.minReconnectionDelay,o=r===void 0?Qv.minReconnectionDelay:r,s=e.maxReconnectionDelay,a=s===void 0?Qv.maxReconnectionDelay:s,c=0;return this._retryCount>0&&(c=o*Math.pow(i,this._retryCount-1),c>a&&(c=a)),this._debug("next delay",c),c},n.prototype._wait=function(){var e=this;return new Promise(function(t){setTimeout(t,e._getNextDelay())})},n.prototype._getNextUrl=function(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){var t=e();if(typeof t=="string")return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},n.prototype._connect=function(){var e=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var t=this._options,i=t.maxRetries,r=i===void 0?Qv.maxRetries:i,o=t.connectionTimeout,s=o===void 0?Qv.connectionTimeout:o,a=t.WebSocket,c=a===void 0?bUe():a;if(this._retryCount>=r){this._debug("max retries reached",this._retryCount,">=",r);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!CUe(c))throw Error("No valid WebSocket class provided");this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(A){e._closeCalled||(e._debug("connect",{url:A,protocols:e._protocols}),e._ws=e._protocols?new c(A,e._protocols):new c(A),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},s))})}},n.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new yUe(Error("TIMEOUT"),this))},n.prototype._disconnect=function(e,t){if(e===void 0&&(e=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new vUe(e,t,this))}catch{}}},n.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},n.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},n.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},n.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},n.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},n})();function dae(){var n="/home/runner/work/maputnik/maputnik/src/libs/store/apistore.ts",e="511b7cd31edca7d05c4852901896ddb82085d1f5",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/store/apistore.ts",statementMap:{0:{start:{line:7,column:18},end:{line:7,column:24}},1:{start:{line:10,column:4},end:{line:11,column:7}},2:{start:{line:12,column:17},end:{line:12,column:37}},3:{start:{line:13,column:17},end:{line:13,column:28}},4:{start:{line:14,column:4},end:{line:14,column:45}},5:{start:{line:15,column:4},end:{line:15,column:50}},6:{start:{line:16,column:4},end:{line:16,column:37}},7:{start:{line:19,column:4},end:{line:27,column:5}},8:{start:{line:20,column:23},end:{line:20,column:79}},9:{start:{line:21,column:19},end:{line:21,column:40}},10:{start:{line:22,column:23},end:{line:22,column:27}},11:{start:{line:23,column:6},end:{line:23,column:39}},12:{start:{line:24,column:6},end:{line:24,column:32}},13:{start:{line:26,column:6},end:{line:26,column:54}},14:{start:{line:30,column:23},end:{line:30,column:67}},15:{start:{line:31,column:4},end:{line:42,column:6}},16:{start:{line:32,column:6},end:{line:32,column:26}},17:{start:{line:32,column:19},end:{line:32,column:26}},18:{start:{line:33,column:6},end:{line:33,column:52}},19:{start:{line:34,column:24},end:{line:34,column:40}},20:{start:{line:35,column:6},end:{line:39,column:7}},21:{start:{line:36,column:8},end:{line:36,column:41}},22:{start:{line:38,column:8},end:{line:38,column:27}},23:{start:{line:40,column:27},end:{line:40,column:65}},24:{start:{line:41,column:6},end:{line:41,column:44}},25:{start:{line:45,column:4},end:{line:53,column:5}},26:{start:{line:46,column:23},end:{line:48,column:8}},27:{start:{line:49,column:19},end:{line:49,column:40}},28:{start:{line:50,column:6},end:{line:50,column:45}},29:{start:{line:52,column:6},end:{line:52,column:92}},30:{start:{line:57,column:22},end:{line:61,column:5}},31:{start:{line:62,column:15},end:{line:62,column:26}},32:{start:{line:63,column:4},end:{line:72,column:7}},33:{start:{line:71,column:6},end:{line:71,column:38}},34:{start:{line:71,column:17},end:{line:71,column:38}},35:{start:{line:73,column:4},end:{line:73,column:20}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:2},end:{line:9,column:3}},loc:{start:{line:9,column:20},end:{line:17,column:3}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:10,column:58},end:{line:10,column:59}},loc:{start:{line:10,column:64},end:{line:11,column:5}},line:10},2:{name:"(anonymous_2)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:15},end:{line:28,column:3}},line:18},3:{name:"(anonymous_3)",decl:{start:{line:29,column:2},end:{line:29,column:3}},loc:{start:{line:29,column:23},end:{line:43,column:3}},line:29},4:{name:"(anonymous_4)",decl:{start:{line:31,column:27},end:{line:31,column:28}},loc:{start:{line:31,column:34},end:{line:42,column:5}},line:31},5:{name:"(anonymous_5)",decl:{start:{line:44,column:2},end:{line:44,column:3}},loc:{start:{line:44,column:25},end:{line:54,column:3}},line:44},6:{name:"(anonymous_6)",decl:{start:{line:56,column:2},end:{line:56,column:3}},loc:{start:{line:56,column:17},end:{line:74,column:3}},line:56},7:{name:"(anonymous_7)",decl:{start:{line:70,column:13},end:{line:70,column:14}},loc:{start:{line:70,column:29},end:{line:72,column:5}},line:70}},branchMap:{0:{loc:{start:{line:10,column:30},end:{line:11,column:6}},type:"binary-expr",locations:[{start:{line:10,column:30},end:{line:10,column:53}},{start:{line:10,column:58},end:{line:11,column:5}}],line:10},1:{loc:{start:{line:32,column:6},end:{line:32,column:26}},type:"if",locations:[{start:{line:32,column:6},end:{line:32,column:26}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:32},2:{loc:{start:{line:45,column:4},end:{line:53,column:5}},type:"if",locations:[{start:{line:45,column:4},end:{line:53,column:5}},{start:{line:51,column:11},end:{line:53,column:5}}],line:45},3:{loc:{start:{line:71,column:6},end:{line:71,column:38}},type:"if",locations:[{start:{line:71,column:6},end:{line:71,column:38}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:71}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/store/apistore.ts"],names:[],mappings:"AAAA,OAAO,WAAW;AAClB,SAAQ,cAAa;AACrB,OAAO,2BAA2B;AAO3B,aAAM,cAAqC;AAAA,EAEhD;AAAA,EACA;AAAA,EACA,gBAAoC;AAAA,EACpC;AAAA,EAEA,YAAY,MAA4B;AACtC,SAAK,qBAAqB,KAAK,uBAAuB,MAAM;AAAA,IAAC;AAC7D,UAAM,OAAO,OAAO,SAAS;AAC7B,UAAM,OAAO;AACb,SAAK,WAAW,UAAU,IAAI,IAAI,IAAI;AACtC,SAAK,eAAe,QAAQ,IAAI,IAAI,IAAI;AACxC,SAAK,OAAO,KAAK,KAAK,KAAK,IAAI;AAAA,EACjC;AAAA,EAEA,MAAM,OAAsB;AAC1B,QAAI;AACF,YAAM,WAAW,MAAM,MAAM,KAAK,WAAW,WAAW,EAAC,MAAM,OAAM,CAAC;AACtE,YAAM,OAAO,MAAM,SAAS,KAAK;AACjC,YAAM,WAAW;AACjB,WAAK,gBAAgB,SAAS,CAAC;AAC/B,WAAK,mBAAmB;AAAA,IAC1B,QAAQ;AACN,YAAM,IAAI,MAAM,8BAA8B;AAAA,IAChD;AAAA,EACF;AAAA,EAEA,qBAAqB;AACnB,UAAM,aAAa,IAAI,sBAAsB,KAAK,YAAY;AAC9D,eAAW,YAAY,OAAK;AAC1B,UAAG,CAAC,EAAE,KAAM;AACZ,cAAQ,IAAI,gCAAgC;AAC5C,UAAI,cAAc,MAAM;AACxB,UAAI;AACF,sBAAc,KAAK,MAAM,EAAE,IAAI;AAAA,MACjC,SAAQ,KAAK;AACX,gBAAQ,MAAM,GAAG;AAAA,MACnB;AACA,YAAM,eAAe,MAAM,oBAAoB,WAAW;AAC1D,WAAK,mBAAmB,YAAY;AAAA,IACtC;AAAA,EACF;AAAA,EAEA,MAAM,iBAAoD;AACxD,QAAG,KAAK,eAAe;AACrB,YAAM,WAAW,MAAM,MAAM,KAAK,WAAW,aAAa,KAAK,eAAe;AAAA,QAC5E,MAAM;AAAA,MACR,CAAC;AACD,YAAM,OAAO,MAAM,SAAS,KAAK;AACjC,aAAO,MAAM,oBAAoB,IAAI;AAAA,IACvC,OAAO;AACL,YAAM,IAAI,MAAM,oEAAoE;AAAA,IACtF;AAAA,EACF;AAAA;AAAA,EAGA,KAAK,UAAoC;AACvC,UAAM,YAAY;AAAA,MAChB,MAAM;AAAA,QACJ,MAAM,oBAAoB,QAAQ;AAAA,MACpC;AAAA,IACF;AAEA,UAAM,KAAK,SAAS;AACpB,UAAM,KAAK,WAAW,aAAa,IAAI;AAAA,MACrC,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,QACP,gBAAgB;AAAA,MAClB;AAAA,MACA,MAAM;AAAA,IACR,CAAC,EACE,MAAM,SAAS,OAAO;AACrB,UAAG,MAAO,SAAQ,MAAM,KAAK;AAAA,IAC/B,CAAC;AACH,WAAO;AAAA,EACT;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"511b7cd31edca7d05c4852901896ddb82085d1f5"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return dae=function(){return s},s}dae();function pi(){var n="/home/runner/work/maputnik/maputnik/src/libs/store/stylestore.ts",e="1506dd6f3469e4801b7fd940c02682bf4ad7b098",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/store/stylestore.ts",statementMap:{0:{start:{line:4,column:22},end:{line:4,column:32}},1:{start:{line:5,column:20},end:{line:5,column:27}},2:{start:{line:6,column:20},end:{line:9,column:1}},3:{start:{line:10,column:24},end:{line:10,column:44}},4:{start:{line:12,column:2},end:{line:12,column:39}},5:{start:{line:15,column:17},end:{line:15,column:19}},6:{start:{line:16,column:2},end:{line:21,column:3}},7:{start:{line:16,column:15},end:{line:16,column:16}},8:{start:{line:17,column:16},end:{line:17,column:42}},9:{start:{line:18,column:4},end:{line:20,column:5}},10:{start:{line:19,column:6},end:{line:19,column:32}},11:{start:{line:22,column:2},end:{line:22,column:16}},12:{start:{line:25,column:16},end:{line:25,column:30}},13:{start:{line:26,column:2},end:{line:26,column:86}},14:{start:{line:29,column:2},end:{line:31,column:3}},15:{start:{line:30,column:4},end:{line:30,column:41}},16:{start:{line:32,column:16},end:{line:32,column:30}},17:{start:{line:33,column:18},end:{line:33,column:26}},18:{start:{line:34,column:2},end:{line:34,column:17}},19:{start:{line:37,column:2},end:{line:37,column:57}},20:{start:{line:47,column:4},end:{line:47,column:40}},21:{start:{line:51,column:4},end:{line:56,column:5}},22:{start:{line:51,column:17},end:{line:51,column:18}},23:{start:{line:52,column:18},end:{line:52,column:44}},24:{start:{line:53,column:6},end:{line:55,column:7}},25:{start:{line:54,column:8},end:{line:54,column:44}},26:{start:{line:60,column:4},end:{line:62,column:5}},27:{start:{line:61,column:6},end:{line:61,column:32}},28:{start:{line:63,column:20},end:{line:63,column:67}},29:{start:{line:64,column:22},end:{line:64,column:68}},30:{start:{line:65,column:4},end:{line:67,column:5}},31:{start:{line:66,column:6},end:{line:66,column:35}},32:{start:{line:68,column:4},end:{line:68,column:30}},33:{start:{line:72,column:4},end:{line:72,column:51}},34:{start:{line:73,column:16},end:{line:73,column:37}},35:{start:{line:74,column:19},end:{line:77,column:5}},36:{start:{line:75,column:6},end:{line:75,column:65}},37:{start:{line:76,column:6},end:{line:76,column:67}},38:{start:{line:78,column:4},end:{line:89,column:5}},39:{start:{line:79,column:6},end:{line:79,column:15}},40:{start:{line:81,column:6},end:{line:88,column:7}},41:{start:{line:84,column:8},end:{line:84,column:21}},42:{start:{line:85,column:8},end:{line:85,column:17}},43:{start:{line:87,column:8},end:{line:87,column:16}},44:{start:{line:90,column:4},end:{line:90,column:20}}},fnMap:{0:{name:"loadDefaultStyle",decl:{start:{line:11,column:16},end:{line:11,column:32}},loc:{start:{line:11,column:35},end:{line:13,column:1}},line:11},1:{name:"loadStoredStyles",decl:{start:{line:14,column:9},end:{line:14,column:25}},loc:{start:{line:14,column:28},end:{line:23,column:1}},line:14},2:{name:"isStyleKey",decl:{start:{line:24,column:9},end:{line:24,column:19}},loc:{start:{line:24,column:25},end:{line:27,column:1}},line:24},3:{name:"fromKey",decl:{start:{line:28,column:9},end:{line:28,column:16}},loc:{start:{line:28,column:22},end:{line:35,column:1}},line:28},4:{name:"styleKey",decl:{start:{line:36,column:9},end:{line:36,column:17}},loc:{start:{line:36,column:27},end:{line:38,column:1}},line:36},5:{name:"(anonymous_5)",decl:{start:{line:46,column:2},end:{line:46,column:3}},loc:{start:{line:46,column:16},end:{line:48,column:3}},line:46},6:{name:"(anonymous_6)",decl:{start:{line:50,column:2},end:{line:50,column:3}},loc:{start:{line:50,column:10},end:{line:57,column:3}},line:50},7:{name:"(anonymous_7)",decl:{start:{line:59,column:2},end:{line:59,column:3}},loc:{start:{line:59,column:25},end:{line:69,column:3}},line:59},8:{name:"(anonymous_8)",decl:{start:{line:71,column:2},end:{line:71,column:3}},loc:{start:{line:71,column:17},end:{line:91,column:3}},line:71},9:{name:"(anonymous_9)",decl:{start:{line:74,column:19},end:{line:74,column:20}},loc:{start:{line:74,column:25},end:{line:77,column:5}},line:74}},branchMap:{0:{loc:{start:{line:18,column:4},end:{line:20,column:5}},type:"if",locations:[{start:{line:18,column:4},end:{line:20,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:18},1:{loc:{start:{line:26,column:9},end:{line:26,column:85}},type:"binary-expr",locations:[{start:{line:26,column:9},end:{line:26,column:27}},{start:{line:26,column:31},end:{line:26,column:57}},{start:{line:26,column:61},end:{line:26,column:85}}],line:26},2:{loc:{start:{line:29,column:2},end:{line:31,column:3}},type:"if",locations:[{start:{line:29,column:2},end:{line:31,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:29},3:{loc:{start:{line:53,column:6},end:{line:55,column:7}},type:"if",locations:[{start:{line:53,column:6},end:{line:55,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:53},4:{loc:{start:{line:60,column:4},end:{line:62,column:5}},type:"if",locations:[{start:{line:60,column:4},end:{line:62,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:60},5:{loc:{start:{line:65,column:4},end:{line:67,column:5}},type:"if",locations:[{start:{line:65,column:4},end:{line:67,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:65},6:{loc:{start:{line:81,column:6},end:{line:88,column:7}},type:"if",locations:[{start:{line:81,column:6},end:{line:88,column:7}},{start:{line:86,column:13},end:{line:88,column:7}}],line:81},7:{loc:{start:{line:81,column:10},end:{line:83,column:81}},type:"binary-expr",locations:[{start:{line:81,column:10},end:{line:81,column:35}},{start:{line:81,column:40},end:{line:81,column:53}},{start:{line:82,column:6},end:{line:82,column:21}},{start:{line:83,column:6},end:{line:83,column:37}},{start:{line:83,column:41},end:{line:83,column:80}}],line:81}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0,0,0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/store/stylestore.ts"],names:[],mappings:"AAAA,OAAO,WAAW;AAClB,SAAQ,oBAAmB;AAC3B,OAAO,mBAAmB;AAG1B,MAAM,gBAAgB;AACtB,MAAM,cAAc;AACpB,MAAM,cAAc;AAAA,EAClB,QAAQ,CAAC,eAAe,cAAc,EAAE,KAAK,GAAG;AAAA,EAChD,aAAa,CAAC,eAAe,cAAc,EAAE,KAAK,GAAG;AACvD;AAEA,MAAM,kBAAkB,cAAc,CAAC,EAAE;AAGlC,gBAAS,mBAAsD;AACpE,SAAO,aAAa,eAAe;AACrC;AAGA,SAAS,mBAAmB;AAC1B,QAAM,SAAS,CAAC;AAChB,WAAS,IAAI,GAAG,IAAI,OAAO,aAAa,QAAQ,KAAK;AACnD,UAAM,MAAM,OAAO,aAAa,IAAI,CAAC;AACrC,QAAG,WAAW,GAAI,GAAG;AACnB,aAAO,KAAK,QAAQ,GAAI,CAAC;AAAA,IAC3B;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,WAAW,KAAa;AAC/B,QAAM,QAAQ,IAAI,MAAM,GAAG;AAC3B,SAAO,MAAM,WAAW,KAAK,MAAM,CAAC,MAAM,iBAAiB,MAAM,CAAC,MAAM;AAC1E;AAGA,SAAS,QAAQ,KAAa;AAC5B,MAAG,CAAC,WAAW,GAAG,GAAG;AACnB,UAAM;AAAA,EACR;AAEA,QAAM,QAAQ,IAAI,MAAM,GAAG;AAC3B,QAAM,UAAU,MAAM,CAAC;AACvB,SAAO;AACT;AAGA,SAAS,SAAS,SAAiB;AACjC,SAAO,CAAC,eAAe,aAAa,OAAO,EAAE,KAAK,GAAG;AACvD;AAGO,aAAM,WAAkC;AAAA;AAAA;AAAA;AAAA,EAI7C;AAAA;AAAA;AAAA,EAIA,cAAc;AACZ,SAAK,YAAY,iBAAiB;AAAA,EACpC;AAAA;AAAA,EAGA,QAAQ;AACN,aAAS,IAAI,GAAG,IAAI,OAAO,aAAa,QAAQ,KAAK;AACnD,YAAM,MAAM,OAAO,aAAa,IAAI,CAAC;AACrC,UAAG,IAAI,WAAW,aAAa,GAAG;AAChC,eAAO,aAAa,WAAW,GAAG;AAAA,MACpC;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAGA,MAAM,iBAAoD;AACxD,QAAG,KAAK,UAAU,WAAW,GAAG;AAC9B,aAAO,iBAAiB;AAAA,IAC1B;AACA,UAAM,UAAU,OAAO,aAAa,QAAQ,YAAY,MAAM;AAC9D,UAAM,YAAY,OAAO,aAAa,QAAQ,SAAS,OAAO,CAAC;AAE/D,QAAI,WAAW;AACb,aAAO,KAAK,MAAM,SAAS;AAAA,IAC7B;AACA,WAAO,iBAAiB;AAAA,EAC1B;AAAA;AAAA,EAGA,KAAK,UAAoC;AACvC,eAAW,MAAM,oBAAoB,QAAQ;AAC7C,UAAM,MAAM,SAAS,SAAS,EAAE;AAEhC,UAAM,SAAS,MAAM;AACnB,aAAO,aAAa,QAAQ,KAAK,KAAK,UAAU,QAAQ,CAAC;AACzD,aAAO,aAAa,QAAQ,YAAY,QAAQ,SAAS,EAAE;AAAA,IAC7D;AAEA,QAAI;AACF,aAAO;AAAA,IACT,SAAS,GAAG;AAEV,UAAI,aAAa,iBACf,EAAE,SAAS;AAAA,MACX,EAAE,SAAS;AAAA,MACX,EAAE,SAAS,wBACX,EAAE,SAAS,+BACV;AACD,aAAK,MAAM;AACX,eAAO;AAAA,MACT,OAAO;AACL,cAAM;AAAA,MACR;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1506dd6f3469e4801b7fd940c02682bf4ad7b098"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return pi=function(){return s},s}pi();const F6=(pi().s[0]++,"maputnik"),fae=(pi().s[1]++,"style"),RH=(pi().s[2]++,{latest:[F6,"latest_style"].join(":")}),_Ue=(pi().s[3]++,Xse[0].url);function DH(){return pi().f[0]++,pi().s[4]++,cae(_Ue)}function xUe(){pi().f[1]++;const n=(pi().s[5]++,[]);pi().s[6]++;for(let e=(pi().s[7]++,0);e<window.localStorage.length;e++){const t=(pi().s[8]++,window.localStorage.key(e));pi().s[9]++,pae(t)?(pi().b[0][0]++,pi().s[10]++,n.push(MUe(t))):pi().b[0][1]++}return pi().s[11]++,n}function pae(n){pi().f[2]++;const e=(pi().s[12]++,n.split(":"));return pi().s[13]++,pi().b[1][0]++,e.length===3&&(pi().b[1][1]++,e[0]===F6)&&(pi().b[1][2]++,e[1]===fae)}function MUe(n){if(pi().f[3]++,pi().s[14]++,pae(n))pi().b[2][1]++;else throw pi().b[2][0]++,pi().s[15]++,"Key is not a valid style key";const e=(pi().s[16]++,n.split(":")),t=(pi().s[17]++,e[2]);return pi().s[18]++,t}function PH(n){return pi().f[4]++,pi().s[19]++,[F6,fae,n].join(":")}class wUe{mapStyles;constructor(){pi().f[5]++,pi().s[20]++,this.mapStyles=xUe()}purge(){pi().f[6]++,pi().s[21]++;for(let e=(pi().s[22]++,0);e<window.localStorage.length;e++){const t=(pi().s[23]++,window.localStorage.key(e));pi().s[24]++,t.startsWith(F6)?(pi().b[3][0]++,pi().s[25]++,window.localStorage.removeItem(t)):pi().b[3][1]++}}async getLatestStyle(){if(pi().f[7]++,pi().s[26]++,this.mapStyles.length===0)return pi().b[4][0]++,pi().s[27]++,DH();pi().b[4][1]++;const e=(pi().s[28]++,window.localStorage.getItem(RH.latest)),t=(pi().s[29]++,window.localStorage.getItem(PH(e)));return pi().s[30]++,t?(pi().b[5][0]++,pi().s[31]++,JSON.parse(t)):(pi().b[5][1]++,pi().s[32]++,DH())}save(e){pi().f[8]++,pi().s[33]++,e=id.ensureStyleValidity(e);const t=(pi().s[34]++,PH(e.id));pi().s[35]++;const i=()=>{pi().f[9]++,pi().s[36]++,window.localStorage.setItem(t,JSON.stringify(e)),pi().s[37]++,window.localStorage.setItem(RH.latest,e.id)};pi().s[38]++;try{pi().s[39]++,i()}catch(r){if(pi().s[40]++,pi().b[7][0]++,r instanceof DOMException&&(pi().b[7][1]++,r.code===22||(pi().b[7][2]++,r.code===1014)||(pi().b[7][3]++,r.name==="QuotaExceededError")||(pi().b[7][4]++,r.name==="NS_ERROR_DOM_QUOTA_REACHED")))pi().b[6][0]++,pi().s[41]++,this.purge(),pi().s[42]++,i();else throw pi().b[6][1]++,pi().s[43]++,r}return pi().s[44]++,e}}function rh(){var n="/home/runner/work/maputnik/maputnik/src/libs/store/style-store-factory.ts",e="2de8d55bfe17551e08818e39ce7b23b7139f970e",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/store/style-store-factory.ts",statementMap:{0:{start:{line:5,column:19},end:{line:5,column:65}},1:{start:{line:6,column:22},end:{line:6,column:118}},2:{start:{line:8,column:2},end:{line:20,column:3}},3:{start:{line:9,column:26},end:{line:11,column:6}},4:{start:{line:10,column:40},end:{line:10,column:81}},5:{start:{line:12,column:4},end:{line:17,column:5}},6:{start:{line:13,column:6},end:{line:13,column:33}},7:{start:{line:14,column:6},end:{line:14,column:33}},8:{start:{line:16,column:6},end:{line:16,column:36}},9:{start:{line:19,column:4},end:{line:19,column:34}},10:{start:{line:21,column:22},end:{line:21,column:100}},11:{start:{line:22,column:2},end:{line:22,column:66}},12:{start:{line:23,column:2},end:{line:23,column:20}}},fnMap:{0:{name:"createStyleStore",decl:{start:{line:4,column:22},end:{line:4,column:38}},loc:{start:{line:4,column:55},end:{line:24,column:1}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:10,column:26},end:{line:10,column:27}},loc:{start:{line:10,column:40},end:{line:10,column:81}},line:10}},branchMap:{0:{loc:{start:{line:6,column:22},end:{line:6,column:118}},type:"binary-expr",locations:[{start:{line:6,column:22},end:{line:6,column:30}},{start:{line:6,column:34},end:{line:6,column:118}}],line:6},1:{loc:{start:{line:8,column:2},end:{line:20,column:3}},type:"if",locations:[{start:{line:8,column:2},end:{line:20,column:3}},{start:{line:18,column:9},end:{line:20,column:3}}],line:8},2:{loc:{start:{line:21,column:22},end:{line:21,column:100}},type:"cond-expr",locations:[{start:{line:21,column:36},end:{line:21,column:64}},{start:{line:21,column:67},end:{line:21,column:100}}],line:21}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0},f:{0:0,1:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/store/style-store-factory.ts"],names:[],mappings:"AAEA,SAAS,8CAA8C,oBAAoB;AAC3E,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAE3B,sBAAsB,iBAAiB,gBAA8D;AACnG,QAAM,WAAW,6CAA6C;AAC9D,QAAM,cAAc,YAAY,OAAO,QAAQ,0BAA0B,WAAW,+BAA+B;AACnH,MAAI;AACJ,MAAI,OAAoD;AACtD,UAAM,gBAAgB,IAAI,cAAc;AAAA,MACtC,oBAAoB,CAAA,aAAY,eAAe,UAAU,EAAC,MAAM,MAAK,CAAC;AAAA,IACxE,CAAC;AACD,QAAI;AACF,YAAM,cAAc,KAAK;AACzB,mBAAa;AAAA,IACf,QAAQ;AACN,mBAAa,IAAI,WAAW;AAAA,IAC9B;AAAA,EACF,OAAO;AACL,iBAAa,IAAI,WAAW;AAAA,EAC9B;AACA,QAAM,cAAc,cAAc,MAAM,aAAa,QAAQ,IAAI,MAAM,WAAW,eAAe;AACjG,iBAAe,aAAa,EAAC,aAAa,MAAM,MAAM,MAAK,CAAC;AAC5D,SAAO;AACT;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2de8d55bfe17551e08818e39ce7b23b7139f970e"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return rh=function(){return s},s}rh();async function SUe(n){rh().f[0]++;const e=(rh().s[0]++,fUe()),t=(rh().s[1]++,rh().b[0][0]++,e&&(rh().b[0][1]++,window.confirm("Load style from URL: "+e+" and discard current changes?")));let i;rh().s[2]++,rh().b[1][1]++,rh().s[9]++,i=new wUe;const r=(rh().s[10]++,t?(rh().b[2][0]++,await cae(e)):(rh().b[2][1]++,await i.getLatestStyle()));return rh().s[11]++,n(r,{initialLoad:!0,save:!1}),rh().s[12]++,i}function Da(){var n="/home/runner/work/maputnik/maputnik/src/libs/revisions.ts",e="2443d70bd38cc3b176918d5f84a8a7d35a1ef2fe",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/revisions.ts",statementMap:{0:{start:{line:5,column:4},end:{line:5,column:38}},1:{start:{line:6,column:4},end:{line:6,column:50}},2:{start:{line:9,column:4},end:{line:9,column:53}},3:{start:{line:12,column:4},end:{line:12,column:43}},4:{start:{line:15,column:4},end:{line:15,column:66}},5:{start:{line:16,column:4},end:{line:16,column:34}},6:{start:{line:17,column:4},end:{line:17,column:22}},7:{start:{line:20,column:4},end:{line:22,column:5}},8:{start:{line:21,column:6},end:{line:21,column:24}},9:{start:{line:23,column:4},end:{line:23,column:24}},10:{start:{line:26,column:4},end:{line:28,column:5}},11:{start:{line:27,column:6},end:{line:27,column:24}},12:{start:{line:29,column:4},end:{line:29,column:24}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:2},end:{line:4,column:3}},loc:{start:{line:4,column:37},end:{line:7,column:3}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:15},end:{line:10,column:3}},line:8},2:{name:"(anonymous_2)",decl:{start:{line:11,column:2},end:{line:11,column:3}},loc:{start:{line:11,column:16},end:{line:13,column:3}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:24},end:{line:18,column:3}},line:14},4:{name:"(anonymous_4)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:9},end:{line:24,column:3}},line:19},5:{name:"(anonymous_5)",decl:{start:{line:25,column:2},end:{line:25,column:3}},loc:{start:{line:25,column:9},end:{line:30,column:3}},line:25}},branchMap:{0:{loc:{start:{line:4,column:14},end:{line:4,column:35}},type:"default-arg",locations:[{start:{line:4,column:33},end:{line:4,column:35}}],line:4},1:{loc:{start:{line:20,column:4},end:{line:22,column:5}},type:"if",locations:[{start:{line:20,column:4},end:{line:22,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:20},2:{loc:{start:{line:26,column:4},end:{line:28,column:5}},type:"if",locations:[{start:{line:26,column:4},end:{line:28,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:26}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/revisions.ts"],names:[],mappings:"AAEO,aAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,EAGA,YAAY,mBAAiB,CAAC,GAAG;AAC/B,SAAK,YAAY;AACjB,SAAK,aAAa,iBAAiB,SAAS;AAAA,EAC9C;AAAA,EAEA,IAAI,SAAS;AACX,WAAO,KAAK,UAAU,KAAK,UAAU,SAAS,CAAC;AAAA,EACjD;AAAA,EAEA,IAAI,UAAU;AACZ,WAAO,KAAK,UAAU,KAAK,UAAU;AAAA,EACvC;AAAA,EAEA,YAAY,UAAoC;AAG9C,SAAK,YAAY,KAAK,UAAU,MAAM,GAAG,KAAK,aAAa,CAAC;AAE5D,SAAK,UAAU,KAAK,QAAQ;AAC5B,SAAK;AAAA,EAEP;AAAA,EAEA,OAAO;AACL,QAAG,KAAK,aAAa,GAAG;AACtB,WAAK;AAAA,IACP;AACA,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,OAAO;AACL,QAAG,KAAK,aAAa,KAAK,UAAU,SAAS,GAAG;AAC9C,WAAK;AAAA,IACP;AACA,WAAO,KAAK;AAAA,EACd;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2443d70bd38cc3b176918d5f84a8a7d35a1ef2fe"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return Da=function(){return s},s}Da();class EUe{revisions;currentIdx;constructor(e=(Da().b[0][0]++,[])){Da().f[0]++,Da().s[0]++,this.revisions=e,Da().s[1]++,this.currentIdx=e.length-1}get latest(){return Da().f[1]++,Da().s[2]++,this.revisions[this.revisions.length-1]}get current(){return Da().f[2]++,Da().s[3]++,this.revisions[this.currentIdx]}addRevision(e){Da().f[3]++,Da().s[4]++,this.revisions=this.revisions.slice(0,this.currentIdx+1),Da().s[5]++,this.revisions.push(e),Da().s[6]++,this.currentIdx++}undo(){return Da().f[4]++,Da().s[7]++,this.currentIdx>0?(Da().b[1][0]++,Da().s[8]++,this.currentIdx--):Da().b[1][1]++,Da().s[9]++,this.current}redo(){return Da().f[5]++,Da().s[10]++,this.currentIdx<this.revisions.length-1?(Da().b[2][0]++,Da().s[11]++,this.currentIdx++):Da().b[2][1]++,Da().s[12]++,this.current}}var jT,UH;function OUe(){if(UH)return jT;UH=1;var n="Expected a function",e=NaN,t="[object Symbol]",i=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,c=typeof window=="object"&&window&&window.Object===Object&&window,A=typeof self=="object"&&self&&self.Object===Object&&self,m=c||A||Function("return this")(),v=Object.prototype,x=v.toString,_=Math.max,O=Math.min,P=function(){return m.Date.now()};function F(Y,z,se){var le,me,fe,_e,we,ke,je=0,Ie=!1,Qe=!1,tt=!0;if(typeof Y!="function")throw new TypeError(n);z=G(z)||0,Q(se)&&(Ie=!!se.leading,Qe="maxWait"in se,fe=Qe?_(G(se.maxWait)||0,z):fe,tt="trailing"in se?!!se.trailing:tt);function ht(Pe){var Te=le,Se=me;return le=me=void 0,je=Pe,_e=Y.apply(Se,Te),_e}function ce(Pe){return je=Pe,we=setTimeout(Me,z),Ie?ht(Pe):_e}function Le(Pe){var Te=Pe-ke,Se=Pe-je,Ne=z-Te;return Qe?O(Ne,fe-Se):Ne}function We(Pe){var Te=Pe-ke,Se=Pe-je;return ke===void 0||Te>=z||Te<0||Qe&&Se>=fe}function Me(){var Pe=P();if(We(Pe))return dt(Pe);we=setTimeout(Me,Le(Pe))}function dt(Pe){return we=void 0,tt&&le?ht(Pe):(le=me=void 0,_e)}function it(){we!==void 0&&clearTimeout(we),je=0,le=ke=me=we=void 0}function vt(){return we===void 0?_e:dt(P())}function Ut(){var Pe=P(),Te=We(Pe);if(le=arguments,me=this,ke=Pe,Te){if(we===void 0)return ce(ke);if(Qe)return we=setTimeout(Me,z),ht(ke)}return we===void 0&&(we=setTimeout(Me,z)),_e}return Ut.cancel=it,Ut.flush=vt,Ut}function j(Y,z,se){var le=!0,me=!0;if(typeof Y!="function")throw new TypeError(n);return Q(se)&&(le="leading"in se?!!se.leading:le,me="trailing"in se?!!se.trailing:me),F(Y,z,{leading:le,maxWait:z,trailing:me})}function Q(Y){var z=typeof Y;return!!Y&&(z=="object"||z=="function")}function V(Y){return!!Y&&typeof Y=="object"}function H(Y){return typeof Y=="symbol"||V(Y)&&x.call(Y)==t}function G(Y){if(typeof Y=="number")return Y;if(H(Y))return e;if(Q(Y)){var z=typeof Y.valueOf=="function"?Y.valueOf():Y;Y=Q(z)?z+"":z}if(typeof Y!="string")return Y===0?Y:+Y;Y=Y.replace(i,"");var se=o.test(Y);return se||s.test(Y)?a(Y.slice(2),se?2:8):r.test(Y)?e:+Y}return jT=j,jT}var BUe=OUe();const IUe=Wl(BUe);var Q2={exports:{}};Q2.exports;var KH;function kUe(){return KH||(KH=1,(function(n,e){var t=200,i="__lodash_hash_undefined__",r=1,o=2,s=9007199254740991,a="[object Arguments]",c="[object Array]",A="[object AsyncFunction]",m="[object Boolean]",v="[object Date]",x="[object Error]",_="[object Function]",O="[object GeneratorFunction]",P="[object Map]",F="[object Number]",j="[object Null]",Q="[object Object]",V="[object Promise]",H="[object Proxy]",G="[object RegExp]",Y="[object Set]",z="[object String]",se="[object Symbol]",le="[object Undefined]",me="[object WeakMap]",fe="[object ArrayBuffer]",_e="[object DataView]",we="[object Float32Array]",ke="[object Float64Array]",je="[object Int8Array]",Ie="[object Int16Array]",Qe="[object Int32Array]",tt="[object Uint8Array]",ht="[object Uint8ClampedArray]",ce="[object Uint16Array]",Le="[object Uint32Array]",We=/[\\^$.*+?()[\]{}|]/g,Me=/^\[object .+?Constructor\]$/,dt=/^(?:0|[1-9]\d*)$/,it={};it[we]=it[ke]=it[je]=it[Ie]=it[Qe]=it[tt]=it[ht]=it[ce]=it[Le]=!0,it[a]=it[c]=it[fe]=it[m]=it[_e]=it[v]=it[x]=it[_]=it[P]=it[F]=it[Q]=it[G]=it[Y]=it[z]=it[me]=!1;var vt=typeof window=="object"&&window&&window.Object===Object&&window,Ut=typeof self=="object"&&self&&self.Object===Object&&self,Pe=vt||Ut||Function("return this")(),Te=e&&!e.nodeType&&e,Se=Te&&!0&&n&&!n.nodeType&&n,Ne=Se&&Se.exports===Te,ut=Ne&&vt.process,rt=(function(){try{return ut&&ut.binding&&ut.binding("util")}catch{}})(),mt=rt&&rt.isTypedArray;function Rt(X,ve){for(var $e=-1,St=X==null?0:X.length,ri=0,kn=[];++$e<St;){var xi=X[$e];ve(xi,$e,X)&&(kn[ri++]=xi)}return kn}function Bt(X,ve){for(var $e=-1,St=ve.length,ri=X.length;++$e<St;)X[ri+$e]=ve[$e];return X}function $t(X,ve){for(var $e=-1,St=X==null?0:X.length;++$e<St;)if(ve(X[$e],$e,X))return!0;return!1}function Rn(X,ve){for(var $e=-1,St=Array(X);++$e<X;)St[$e]=ve($e);return St}function zn(X){return function(ve){return X(ve)}}function ai(X,ve){return X.has(ve)}function _n(X,ve){return X?.[ve]}function Bn(X){var ve=-1,$e=Array(X.size);return X.forEach(function(St,ri){$e[++ve]=[ri,St]}),$e}function dn(X,ve){return function($e){return X(ve($e))}}function li(X){var ve=-1,$e=Array(X.size);return X.forEach(function(St){$e[++ve]=St}),$e}var In=Array.prototype,It=Function.prototype,xe=Object.prototype,oe=Pe["__core-js_shared__"],J=It.toString,ne=xe.hasOwnProperty,ue=(function(){var X=/[^.]+$/.exec(oe&&oe.keys&&oe.keys.IE_PROTO||"");return X?"Symbol(src)_1."+X:""})(),Ce=xe.toString,Ue=RegExp("^"+J.call(ne).replace(We,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=Ne?Pe.Buffer:void 0,lt=Pe.Symbol,be=Pe.Uint8Array,Ee=xe.propertyIsEnumerable,y=In.splice,gt=lt?lt.toStringTag:void 0,Mt=Object.getOwnPropertySymbols,Dt=He?He.isBuffer:void 0,ot=dn(Object.keys,Object),bn=xo(Pe,"DataView"),Gn=xo(Pe,"Map"),yn=xo(Pe,"Promise"),qn=xo(Pe,"Set"),$n=xo(Pe,"WeakMap"),mi=xo(Object,"create"),ir=Mo(bn),di=Mo(Gn),Vn=Mo(yn),Fn=Mo(qn),Ti=Mo($n),on=lt?lt.prototype:void 0,qr=on?on.valueOf:void 0;function Di(X){var ve=-1,$e=X==null?0:X.length;for(this.clear();++ve<$e;){var St=X[ve];this.set(St[0],St[1])}}function js(){this.__data__=mi?mi(null):{},this.size=0}function ea(X){var ve=this.has(X)&&delete this.__data__[X];return this.size-=ve?1:0,ve}function Pn(X){var ve=this.__data__;if(mi){var $e=ve[X];return $e===i?void 0:$e}return ne.call(ve,X)?ve[X]:void 0}function Gi(X){var ve=this.__data__;return mi?ve[X]!==void 0:ne.call(ve,X)}function Li(X,ve){var $e=this.__data__;return this.size+=this.has(X)?0:1,$e[X]=mi&&ve===void 0?i:ve,this}Di.prototype.clear=js,Di.prototype.delete=ea,Di.prototype.get=Pn,Di.prototype.has=Gi,Di.prototype.set=Li;function Xi(X){var ve=-1,$e=X==null?0:X.length;for(this.clear();++ve<$e;){var St=X[ve];this.set(St[0],St[1])}}function Oa(){this.__data__=[],this.size=0}function lo(X){var ve=this.__data__,$e=xl(ve,X);if($e<0)return!1;var St=ve.length-1;return $e==St?ve.pop():y.call(ve,$e,1),--this.size,!0}function Fi(X){var ve=this.__data__,$e=xl(ve,X);return $e<0?void 0:ve[$e][1]}function Cl(X){return xl(this.__data__,X)>-1}function ra(X,ve){var $e=this.__data__,St=xl($e,X);return St<0?(++this.size,$e.push([X,ve])):$e[St][1]=ve,this}Xi.prototype.clear=Oa,Xi.prototype.delete=lo,Xi.prototype.get=Fi,Xi.prototype.has=Cl,Xi.prototype.set=ra;function uo(X){var ve=-1,$e=X==null?0:X.length;for(this.clear();++ve<$e;){var St=X[ve];this.set(St[0],St[1])}}function Fa(){this.size=0,this.__data__={hash:new Di,map:new(Gn||Xi),string:new Di}}function Fu(X){var ve=jo(this,X).delete(X);return this.size-=ve?1:0,ve}function So(X){return jo(this,X).get(X)}function AA(X){return jo(this,X).has(X)}function ta(X,ve){var $e=jo(this,X),St=$e.size;return $e.set(X,ve),this.size+=$e.size==St?0:1,this}uo.prototype.clear=Fa,uo.prototype.delete=Fu,uo.prototype.get=So,uo.prototype.has=AA,uo.prototype.set=ta;function xr(X){var ve=-1,$e=X==null?0:X.length;for(this.__data__=new uo;++ve<$e;)this.add(X[ve])}function Xa(X){return this.__data__.set(X,i),this}function cl(X){return this.__data__.has(X)}xr.prototype.add=xr.prototype.push=Xa,xr.prototype.has=cl;function Bs(X){var ve=this.__data__=new Xi(X);this.size=ve.size}function fa(){this.__data__=new Xi,this.size=0}function _l(X){var ve=this.__data__,$e=ve.delete(X);return this.size=ve.size,$e}function zc(X){return this.__data__.get(X)}function Ah(X){return this.__data__.has(X)}function hA(X,ve){var $e=this.__data__;if($e instanceof Xi){var St=$e.__data__;if(!Gn||St.length<t-1)return St.push([X,ve]),this.size=++$e.size,this;$e=this.__data__=new uo(St)}return $e.set(X,ve),this.size=$e.size,this}Bs.prototype.clear=fa,Bs.prototype.delete=_l,Bs.prototype.get=zc,Bs.prototype.has=Ah,Bs.prototype.set=hA;function Ns(X,ve){var $e=No(X),St=!$e&&ls(X),ri=!$e&&!St&&Mr(X),kn=!$e&&!St&&!ri&&el(X),xi=$e||St||ri||kn,Ki=xi?Rn(X.length,String):[],Ri=Ki.length;for(var Ei in X)ne.call(X,Ei)&&!(xi&&(Ei=="length"||ri&&(Ei=="offset"||Ei=="parent")||kn&&(Ei=="buffer"||Ei=="byteLength"||Ei=="byteOffset")||wl(Ei,Ri)))&&Ki.push(Ei);return Ki}function xl(X,ve){for(var $e=X.length;$e--;)if(es(X[$e][0],ve))return $e;return-1}function jc(X,ve,$e){var St=ve(X);return No(X)?St:Bt(St,$e(X))}function Ja(X){return X==null?X===void 0?le:j:gt&&gt in Object(X)?Wi(X):ju(X)}function Nc(X){return gr(X)&&Ja(X)==a}function Al(X,ve,$e,St,ri){return X===ve?!0:X==null||ve==null||!gr(X)&&!gr(ve)?X!==X&&ve!==ve:zu(X,ve,$e,St,Al,ri)}function zu(X,ve,$e,St,ri,kn){var xi=No(X),Ki=No(ve),Ri=xi?c:Fo(X),Ei=Ki?c:Fo(ve);Ri=Ri==a?Q:Ri,Ei=Ei==a?Q:Ei;var Or=Ri==Q,zr=Ei==Q,ji=Ri==Ei;if(ji&&Mr(X)){if(!Mr(ve))return!1;xi=!0,Or=!1}if(ji&&!Or)return kn||(kn=new Bs),xi||el(X)?Ml(X,ve,$e,St,ri,kn):cu(X,ve,Ri,$e,St,ri,kn);if(!($e&r)){var Ar=Or&&ne.call(X,"__wrapped__"),jr=zr&&ne.call(ve,"__wrapped__");if(Ar||jr){var Cs=Ar?X.value():X,Sr=jr?ve.value():ve;return kn||(kn=new Bs),ri(Cs,Sr,$e,St,kn)}}return ji?(kn||(kn=new Bs),zA(X,ve,$e,St,ri,kn)):!1}function Ba(X){if(!Ro(X)||er(X))return!1;var ve=us(X)?Ue:Me;return ve.test(Mo(X))}function lc(X){return gr(X)&&bs(X.length)&&!!it[Ja(X)]}function uu(X){if(!Sl(X))return ot(X);var ve=[];for(var $e in Object(X))ne.call(X,$e)&&$e!="constructor"&&ve.push($e);return ve}function Ml(X,ve,$e,St,ri,kn){var xi=$e&r,Ki=X.length,Ri=ve.length;if(Ki!=Ri&&!(xi&&Ri>Ki))return!1;var Ei=kn.get(X);if(Ei&&kn.get(ve))return Ei==ve;var Or=-1,zr=!0,ji=$e&o?new xr:void 0;for(kn.set(X,ve),kn.set(ve,X);++Or<Ki;){var Ar=X[Or],jr=ve[Or];if(St)var Cs=xi?St(jr,Ar,Or,ve,X,kn):St(Ar,jr,Or,X,ve,kn);if(Cs!==void 0){if(Cs)continue;zr=!1;break}if(ji){if(!$t(ve,function(Sr,za){if(!ai(ji,za)&&(Ar===Sr||ri(Ar,Sr,$e,St,kn)))return ji.push(za)})){zr=!1;break}}else if(!(Ar===jr||ri(Ar,jr,$e,St,kn))){zr=!1;break}}return kn.delete(X),kn.delete(ve),zr}function cu(X,ve,$e,St,ri,kn,xi){switch($e){case _e:if(X.byteLength!=ve.byteLength||X.byteOffset!=ve.byteOffset)return!1;X=X.buffer,ve=ve.buffer;case fe:return!(X.byteLength!=ve.byteLength||!kn(new be(X),new be(ve)));case m:case v:case F:return es(+X,+ve);case x:return X.name==ve.name&&X.message==ve.message;case G:case z:return X==ve+"";case P:var Ki=Bn;case Y:var Ri=St&r;if(Ki||(Ki=li),X.size!=ve.size&&!Ri)return!1;var Ei=xi.get(X);if(Ei)return Ei==ve;St|=o,xi.set(X,ve);var Or=Ml(Ki(X),Ki(ve),St,ri,kn,xi);return xi.delete(X),Or;case se:if(qr)return qr.call(X)==qr.call(ve)}return!1}function zA(X,ve,$e,St,ri,kn){var xi=$e&r,Ki=Ia(X),Ri=Ki.length,Ei=Ia(ve),Or=Ei.length;if(Ri!=Or&&!xi)return!1;for(var zr=Ri;zr--;){var ji=Ki[zr];if(!(xi?ji in ve:ne.call(ve,ji)))return!1}var Ar=kn.get(X);if(Ar&&kn.get(ve))return Ar==ve;var jr=!0;kn.set(X,ve),kn.set(ve,X);for(var Cs=xi;++zr<Ri;){ji=Ki[zr];var Sr=X[ji],za=ve[ji];if(St)var uc=xi?St(za,Sr,ji,ve,X,kn):St(Sr,za,ji,X,ve,kn);if(!(uc===void 0?Sr===za||ri(Sr,za,$e,St,kn):uc)){jr=!1;break}Cs||(Cs=ji=="constructor")}if(jr&&!Cs){var hu=X.constructor,Gs=ve.constructor;hu!=Gs&&"constructor"in X&&"constructor"in ve&&!(typeof hu=="function"&&hu instanceof hu&&typeof Gs=="function"&&Gs instanceof Gs)&&(jr=!1)}return kn.delete(X),kn.delete(ve),jr}function Ia(X){return jc(X,Si,Ql)}function jo(X,ve){var $e=X.__data__;return Au(ve)?$e[typeof ve=="string"?"string":"hash"]:$e.map}function xo(X,ve){var $e=_n(X,ve);return Ba($e)?$e:void 0}function Wi(X){var ve=ne.call(X,gt),$e=X[gt];try{X[gt]=void 0;var St=!0}catch{}var ri=Ce.call(X);return St&&(ve?X[gt]=$e:delete X[gt]),ri}var Ql=Mt?function(X){return X==null?[]:(X=Object(X),Rt(Mt(X),function(ve){return Ee.call(X,ve)}))}:ti,Fo=Ja;(bn&&Fo(new bn(new ArrayBuffer(1)))!=_e||Gn&&Fo(new Gn)!=P||yn&&Fo(yn.resolve())!=V||qn&&Fo(new qn)!=Y||$n&&Fo(new $n)!=me)&&(Fo=function(X){var ve=Ja(X),$e=ve==Q?X.constructor:void 0,St=$e?Mo($e):"";if(St)switch(St){case ir:return _e;case di:return P;case Vn:return V;case Fn:return Y;case Ti:return me}return ve});function wl(X,ve){return ve=ve??s,!!ve&&(typeof X=="number"||dt.test(X))&&X>-1&&X%1==0&&X<ve}function Au(X){var ve=typeof X;return ve=="string"||ve=="number"||ve=="symbol"||ve=="boolean"?X!=="__proto__":X===null}function er(X){return!!ue&&ue in X}function Sl(X){var ve=X&&X.constructor,$e=typeof ve=="function"&&ve.prototype||xe;return X===$e}function ju(X){return Ce.call(X)}function Mo(X){if(X!=null){try{return J.call(X)}catch{}try{return X+""}catch{}}return""}function es(X,ve){return X===ve||X!==X&&ve!==ve}var ls=Nc((function(){return arguments})())?Nc:function(X){return gr(X)&&ne.call(X,"callee")&&!Ee.call(X,"callee")},No=Array.isArray;function Go(X){return X!=null&&bs(X.length)&&!us(X)}var Mr=Dt||wr;function El(X,ve){return Al(X,ve)}function us(X){if(!Ro(X))return!1;var ve=Ja(X);return ve==_||ve==O||ve==A||ve==H}function bs(X){return typeof X=="number"&&X>-1&&X%1==0&&X<=s}function Ro(X){var ve=typeof X;return X!=null&&(ve=="object"||ve=="function")}function gr(X){return X!=null&&typeof X=="object"}var el=mt?zn(mt):lc;function Si(X){return Go(X)?Ns(X):uu(X)}function ti(){return[]}function wr(){return!1}n.exports=El})(Q2,Q2.exports)),Q2.exports}var TUe=kUe();const BD=Wl(TUe);function lr(){var n="/home/runner/work/maputnik/maputnik/src/libs/layerwatcher.ts",e="77d2098743f5a64765174c6e14fc4dc25f900f6c",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/libs/layerwatcher.ts",statementMap:{0:{start:{line:10,column:4},end:{line:11,column:7}},1:{start:{line:12,column:4},end:{line:13,column:7}},2:{start:{line:14,column:4},end:{line:14,column:23}},3:{start:{line:15,column:4},end:{line:15,column:28}},4:{start:{line:16,column:4},end:{line:16,column:90}},5:{start:{line:19,column:28},end:{line:19,column:48}},6:{start:{line:20,column:4},end:{line:22,column:7}},7:{start:{line:21,column:6},end:{line:21,column:88}},8:{start:{line:23,column:4},end:{line:25,column:5}},9:{start:{line:24,column:6},end:{line:24,column:42}},10:{start:{line:26,column:4},end:{line:26,column:48}},11:{start:{line:29,column:33},end:{line:29,column:58}},12:{start:{line:30,column:4},end:{line:43,column:7}},13:{start:{line:31,column:6},end:{line:42,column:9}},14:{start:{line:32,column:32},end:{line:32,column:71}},15:{start:{line:33,column:23},end:{line:33,column:53}},16:{start:{line:34,column:8},end:{line:40,column:11}},17:{start:{line:35,column:10},end:{line:39,column:13}},18:{start:{line:36,column:40},end:{line:36,column:75}},19:{start:{line:37,column:12},end:{line:37,column:71}},20:{start:{line:38,column:12},end:{line:38,column:64}},21:{start:{line:41,column:8},end:{line:41,column:60}},22:{start:{line:44,column:4},end:{line:46,column:5}},23:{start:{line:45,column:6},end:{line:45,column:52}},24:{start:{line:50,column:4},end:{line:50,column:25}},25:{start:{line:53,column:4},end:{line:53,column:30}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:2},end:{line:9,column:3}},loc:{start:{line:9,column:25},end:{line:17,column:3}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:10,column:52},end:{line:10,column:53}},loc:{start:{line:10,column:58},end:{line:11,column:5}},line:10},2:{name:"(anonymous_2)",decl:{start:{line:12,column:62},end:{line:12,column:63}},loc:{start:{line:12,column:68},end:{line:13,column:5}},line:12},3:{name:"(anonymous_3)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:18},end:{line:27,column:3}},line:18},4:{name:"(anonymous_4)",decl:{start:{line:20,column:48},end:{line:20,column:49}},loc:{start:{line:20,column:62},end:{line:22,column:5}},line:20},5:{name:"(anonymous_5)",decl:{start:{line:28,column:2},end:{line:28,column:3}},loc:{start:{line:28,column:32},end:{line:47,column:3}},line:28},6:{name:"(anonymous_6)",decl:{start:{line:30,column:39},end:{line:30,column:40}},loc:{start:{line:30,column:53},end:{line:43,column:5}},line:30},7:{name:"(anonymous_7)",decl:{start:{line:31,column:46},end:{line:31,column:47}},loc:{start:{line:31,column:65},end:{line:42,column:7}},line:31},8:{name:"(anonymous_8)",decl:{start:{line:34,column:58},end:{line:34,column:59}},loc:{start:{line:34,column:71},end:{line:40,column:9}},line:34},9:{name:"(anonymous_9)",decl:{start:{line:35,column:50},end:{line:35,column:51}},loc:{start:{line:35,column:68},end:{line:39,column:11}},line:35},10:{name:"(anonymous_10)",decl:{start:{line:49,column:2},end:{line:49,column:3}},loc:{start:{line:49,column:16},end:{line:51,column:3}},line:49},11:{name:"(anonymous_11)",decl:{start:{line:52,column:2},end:{line:52,column:3}},loc:{start:{line:52,column:21},end:{line:54,column:3}},line:52}},branchMap:{0:{loc:{start:{line:9,column:14},end:{line:9,column:23}},type:"default-arg",locations:[{start:{line:9,column:21},end:{line:9,column:23}}],line:9},1:{loc:{start:{line:10,column:27},end:{line:11,column:6}},type:"binary-expr",locations:[{start:{line:10,column:27},end:{line:10,column:47}},{start:{line:10,column:52},end:{line:11,column:5}}],line:10},2:{loc:{start:{line:12,column:32},end:{line:13,column:6}},type:"binary-expr",locations:[{start:{line:12,column:32},end:{line:12,column:57}},{start:{line:12,column:62},end:{line:13,column:5}}],line:12},3:{loc:{start:{line:23,column:4},end:{line:25,column:5}},type:"if",locations:[{start:{line:23,column:4},end:{line:25,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:23},4:{loc:{start:{line:31,column:7},end:{line:31,column:36}},type:"binary-expr",locations:[{start:{line:31,column:7},end:{line:31,column:30}},{start:{line:31,column:34},end:{line:31,column:36}}],line:31},5:{loc:{start:{line:32,column:32},end:{line:32,column:71}},type:"binary-expr",locations:[{start:{line:32,column:32},end:{line:32,column:65}},{start:{line:32,column:69},end:{line:32,column:71}}],line:32},6:{loc:{start:{line:36,column:40},end:{line:36,column:75}},type:"binary-expr",locations:[{start:{line:36,column:40},end:{line:36,column:69}},{start:{line:36,column:73},end:{line:36,column:75}}],line:36},7:{loc:{start:{line:44,column:4},end:{line:46,column:5}},type:"if",locations:[{start:{line:44,column:4},end:{line:46,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},b:{0:[0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/layerwatcher.ts"],names:[],mappings:"AAAA,OAAO,cAAc;AACrB,OAAO,aAAa;AAUpB,qBAAqB,aAAa;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,OAA4B,CAAC,GAAG;AAC1C,SAAK,kBAAkB,KAAK,oBAAoB,MAAM;AAAA,IAAC;AACvD,SAAK,uBAAuB,KAAK,yBAAyB,MAAM;AAAA,IAAC;AAEjE,SAAK,WAAW,CAAC;AACjB,SAAK,gBAAgB,CAAC;AAKtB,SAAK,oCAAoC,SAAS,KAAK,0BAA0B,GAAI;AAAA,EACvF;AAAA,EAEA,WAAW,KAAU;AACnB,UAAM,kBAAkB,EAAE,GAAG,KAAK,SAAS;AAE3C,WAAO,KAAK,IAAI,MAAM,YAAY,EAAE,QAAQ,cAAY;AAGtD,WAAK,SAAS,QAAQ,IAAI,IAAI,MAAM,aAAa,QAAQ,EAAE,QAAQ;AAAA,IACrE,CAAC;AAED,QAAG,CAAC,QAAQ,iBAAiB,KAAK,QAAQ,GAAG;AAC3C,WAAK,gBAAgB,KAAK,QAAQ;AAAA,IACpC;AAEA,SAAK,kCAAkC,GAAG;AAAA,EAC5C;AAAA,EAEA,yBAAyB,KAAU;AACjC,UAAM,uBAAuB,EAAE,GAAG,KAAK,cAAc;AAErD,WAAO,KAAK,KAAK,QAAQ,EAAE,QAAQ,cAAY;AAC7C,OAAC,KAAK,SAAS,QAAQ,KAAK,CAAC,GAAG,QAAQ,mBAAiB;AACvD,cAAM,kBAAkB,KAAK,cAAc,aAAa,KAAK,CAAC;AAC9D,cAAM,SAAS,EAAE,aAAa,cAAc;AAC5C,YAAI,oBAAoB,UAAU,MAAa,EAAE,QAAQ,aAAW;AAClE,iBAAO,KAAK,QAAQ,UAAU,EAAE,QAAQ,kBAAgB;AACtD,kBAAM,sBAAsB,gBAAgB,YAAY,KAAK,CAAC;AAC9D,gCAAoB,QAAQ,WAAW,YAAY,CAAC,IAAI,CAAC;AACzD,4BAAgB,YAAY,IAAI;AAAA,UAClC,CAAC;AAAA,QACH,CAAC;AAED,aAAK,cAAc,aAAa,IAAI;AAAA,MACtC,CAAC;AAAA,IACH,CAAC;AAED,QAAG,CAAC,QAAQ,sBAAsB,KAAK,aAAa,GAAG;AACrD,WAAK,qBAAqB,KAAK,aAAa;AAAA,IAC9C;AAAA,EAEF;AAAA;AAAA,EAGA,IAAI,UAAU;AACZ,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAI,eAAe;AACjB,WAAO,KAAK;AAAA,EACd;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"77d2098743f5a64765174c6e14fc4dc25f900f6c"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return lr=function(){return s},s}lr();class RUe{onSourcesChange;onVectorLayersChange;throttledAnalyzeVectorLayerFields;_sources;_vectorLayers;constructor(e=(lr().b[0][0]++,{})){lr().f[0]++,lr().s[0]++,this.onSourcesChange=(lr().b[1][0]++,e.onSourcesChange||(lr().b[1][1]++,()=>{lr().f[1]++})),lr().s[1]++,this.onVectorLayersChange=(lr().b[2][0]++,e.onVectorLayersChange||(lr().b[2][1]++,()=>{lr().f[2]++})),lr().s[2]++,this._sources={},lr().s[3]++,this._vectorLayers={},lr().s[4]++,this.throttledAnalyzeVectorLayerFields=IUe(this.analyzeVectorLayerFields,5e3)}analyzeMap(e){lr().f[3]++;const t=(lr().s[5]++,{...this._sources});lr().s[6]++,Object.keys(e.style.sourceCaches).forEach(i=>{lr().f[4]++,lr().s[7]++,this._sources[i]=e.style.sourceCaches[i]._source.vectorLayerIds}),lr().s[8]++,BD(t,this._sources)?lr().b[3][1]++:(lr().b[3][0]++,lr().s[9]++,this.onSourcesChange(this._sources)),lr().s[10]++,this.throttledAnalyzeVectorLayerFields(e)}analyzeVectorLayerFields(e){lr().f[5]++;const t=(lr().s[11]++,{...this._vectorLayers});lr().s[12]++,Object.keys(this._sources).forEach(i=>{lr().f[6]++,lr().s[13]++,(lr().b[4][0]++,this._sources[i]||(lr().b[4][1]++,[])).forEach(r=>{lr().f[7]++;const o=(lr().s[14]++,lr().b[5][0]++,this._vectorLayers[r]||(lr().b[5][1]++,{})),s=(lr().s[15]++,{sourceLayer:r});lr().s[16]++,e.querySourceFeatures(i,s).forEach(a=>{lr().f[8]++,lr().s[17]++,Object.keys(a.properties).forEach(c=>{lr().f[9]++;const A=(lr().s[18]++,lr().b[6][0]++,o[c]||(lr().b[6][1]++,{}));lr().s[19]++,A[a.properties[c]]={},lr().s[20]++,o[c]=A})}),lr().s[21]++,this._vectorLayers[r]=o})}),lr().s[22]++,BD(t,this._vectorLayers)?lr().b[7][1]++:(lr().b[7][0]++,lr().s[23]++,this.onVectorLayersChange(this._vectorLayers))}get sources(){return lr().f[10]++,lr().s[24]++,this._sources}get vectorLayers(){return lr().f[11]++,lr().s[25]++,this._vectorLayers}}function ge(){var n="/home/runner/work/maputnik/maputnik/src/components/App.tsx",e="87a98b95fe8a8cfc778c5f95c5bbfce78b8fc5aa",t=globalThis,i="__coverage__",r={path:"/home/runner/work/maputnik/maputnik/src/components/App.tsx",statementMap:{0:{start:{line:35,column:0},end:{line:35,column:30}},1:{start:{line:37,column:29},end:{line:37,column:60}},2:{start:{line:38,column:26},end:{line:38,column:54}},3:{start:{line:39,column:31},end:{line:39,column:64}},4:{start:{line:40,column:28},end:{line:40,column:58}},5:{start:{line:41,column:2},end:{line:58,column:3}},6:{start:{line:42,column:24},end:{line:42,column:95}},7:{start:{line:43,column:4},end:{line:45,column:5}},8:{start:{line:44,column:6},end:{line:44,column:47}},9:{start:{line:46,column:9},end:{line:58,column:3}},10:{start:{line:47,column:24},end:{line:47,column:96}},11:{start:{line:48,column:4},end:{line:50,column:5}},12:{start:{line:49,column:6},end:{line:49,column:47}},13:{start:{line:51,column:9},end:{line:58,column:3}},14:{start:{line:52,column:24},end:{line:52,column:93}},15:{start:{line:53,column:4},end:{line:55,column:5}},16:{start:{line:54,column:6},end:{line:54,column:47}},17:{start:{line:57,column:4},end:{line:57,column:15}},18:{start:{line:61,column:2},end:{line:70,column:4}},19:{start:{line:74,column:15},end:{line:74,column:19}},20:{start:{line:77,column:4},end:{line:77,column:17}},21:{start:{line:78,column:4},end:{line:78,column:45}},22:{start:{line:79,column:4},end:{line:79,column:38}},23:{start:{line:80,column:4},end:{line:114,column:6}},24:{start:{line:115,column:4},end:{line:117,column:7}},25:{start:{line:116,column:35},end:{line:116,column:69}},26:{start:{line:119,column:31},end:{line:192,column:3}},27:{start:{line:120,column:22},end:{line:177,column:5}},28:{start:{line:124,column:10},end:{line:124,column:40}},29:{start:{line:130,column:10},end:{line:130,column:35}},30:{start:{line:136,column:10},end:{line:136,column:37}},31:{start:{line:142,column:10},end:{line:142,column:38}},32:{start:{line:148,column:10},end:{line:148,column:39}},33:{start:{line:154,column:10},end:{line:154,column:42}},34:{start:{line:160,column:10},end:{line:162,column:12}},35:{start:{line:168,column:10},end:{line:168,column:63}},36:{start:{line:174,column:10},end:{line:174,column:36}},37:{start:{line:178,column:4},end:{line:191,column:7}},38:{start:{line:179,column:6},end:{line:190,column:7}},39:{start:{line:180,column:8},end:{line:180,column:24}},40:{start:{line:181,column:8},end:{line:181,column:30}},41:{start:{line:182,column:13},end:{line:190,column:7}},42:{start:{line:183,column:25},end:{line:185,column:10}},43:{start:{line:184,column:10},end:{line:184,column:41}},44:{start:{line:186,column:8},end:{line:189,column:9}},45:{start:{line:187,column:10},end:{line:187,column:44}},46:{start:{line:188,column:10},end:{line:188,column:29}},47:{start:{line:193,column:19},end:{line:211,column:3}},48:{start:{line:194,column:4},end:{line:210,column:5}},49:{start:{line:195,column:6},end:{line:201,column:7}},50:{start:{line:196,column:8},end:{line:196,column:27}},51:{start:{line:197,column:8},end:{line:197,column:22}},52:{start:{line:198,column:13},end:{line:201,column:7}},53:{start:{line:199,column:8},end:{line:199,column:27}},54:{start:{line:200,column:8},end:{line:200,column:22}},55:{start:{line:203,column:6},end:{line:209,column:7}},56:{start:{line:204,column:8},end:{line:204,column:27}},57:{start:{line:205,column:8},end:{line:205,column:22}},58:{start:{line:206,column:13},end:{line:209,column:7}},59:{start:{line:207,column:8},end:{line:207,column:27}},60:{start:{line:208,column:8},end:{line:208,column:22}},61:{start:{line:213,column:4},end:{line:213,column:102}},62:{start:{line:213,column:65},end:{line:213,column:100}},63:{start:{line:214,column:4},end:{line:214,column:60}},64:{start:{line:217,column:4},end:{line:217,column:63}},65:{start:{line:220,column:4},end:{line:220,column:41}},66:{start:{line:223,column:21},end:{line:223,column:55}},67:{start:{line:224,column:24},end:{line:224,column:93}},68:{start:{line:225,column:21},end:{line:225,column:110}},69:{start:{line:226,column:4},end:{line:228,column:7}},70:{start:{line:227,column:6},end:{line:227,column:80}},71:{start:{line:231,column:4},end:{line:233,column:7}},72:{start:{line:232,column:6},end:{line:232,column:80}},73:{start:{line:235,column:29},end:{line:249,column:3}},74:{start:{line:236,column:4},end:{line:240,column:5}},75:{start:{line:237,column:6},end:{line:239,column:9}},76:{start:{line:241,column:25},end:{line:247,column:5}},77:{start:{line:248,column:4},end:{line:248,column:38}},78:{start:{line:250,column:19},end:{line:373,column:3}},79:{start:{line:251,column:4},end:{line:256,column:6}},80:{start:{line:257,column:4},end:{line:259,column:5}},81:{start:{line:258,column:6},end:{line:258,column:71}},82:{start:{line:260,column:4},end:{line:262,column:5}},83:{start:{line:261,column:6},end:{line:261,column:71}},84:{start:{line:263,column:4},end:{line:267,column:5}},85:{start:{line:264,column:6},end:{line:266,column:7}},86:{start:{line:265,column:8},end:{line:265,column:63}},87:{start:{line:268,column:4},end:{line:270,column:5}},88:{start:{line:269,column:6},end:{line:269,column:44}},89:{start:{line:271,column:19},end:{line:271,column:51}},90:{start:{line:272,column:24},end:{line:272,column:26}},91:{start:{line:273,column:4},end:{line:284,column:5}},92:{start:{line:274,column:26},end:{line:274,column:42}},93:{start:{line:275,column:6},end:{line:283,column:9}},94:{start:{line:276,column:8},end:{line:281,column:9}},95:{start:{line:277,column:24},end:{line:279,column:11}},96:{start:{line:280,column:10},end:{line:280,column:34}},97:{start:{line:282,column:8},end:{line:282,column:40}},98:{start:{line:285,column:25},end:{line:336,column:6}},99:{start:{line:286,column:23},end:{line:286,column:109}},100:{start:{line:287,column:6},end:{line:300,column:7}},101:{start:{line:288,column:35},end:{line:288,column:43}},102:{start:{line:289,column:8},end:{line:299,column:10}},103:{start:{line:301,column:33},end:{line:301,column:100}},104:{start:{line:302,column:6},end:{line:315,column:7}},105:{start:{line:303,column:35},end:{line:303,column:53}},106:{start:{line:304,column:8},end:{line:314,column:10}},107:{start:{line:316,column:25},end:{line:316,column:88}},108:{start:{line:317,column:6},end:{line:335,column:7}},109:{start:{line:318,column:52},end:{line:318,column:62}},110:{start:{line:319,column:20},end:{line:319,column:78}},111:{start:{line:320,column:8},end:{line:330,column:10}},112:{start:{line:332,column:8},end:{line:334,column:10}},113:{start:{line:337,column:24},end:{line:337,column:30}},114:{start:{line:338,column:4},end:{line:352,column:5}},115:{start:{line:339,column:6},end:{line:339,column:42}},116:{start:{line:340,column:6},end:{line:351,column:7}},117:{start:{line:341,column:28},end:{line:341,column:33}},118:{start:{line:342,column:8},end:{line:350,column:9}},119:{start:{line:343,column:10},end:{line:349,column:11}},120:{start:{line:344,column:28},end:{line:344,column:49}},121:{start:{line:345,column:30},end:{line:345,column:69}},122:{start:{line:346,column:12},end:{line:346,column:44}},123:{start:{line:348,column:12},end:{line:348,column:46}},124:{start:{line:353,column:4},end:{line:355,column:5}},125:{start:{line:354,column:6},end:{line:354,column:40}},126:{start:{line:356,column:4},end:{line:358,column:5}},127:{start:{line:357,column:6},end:{line:357,column:40}},128:{start:{line:359,column:4},end:{line:361,column:5}},129:{start:{line:360,column:6},end:{line:360,column:47}},130:{start:{line:362,column:4},end:{line:364,column:5}},131:{start:{line:363,column:6},end:{line:363,column:31}},132:{start:{line:365,column:4},end:{line:372,column:7}},133:{start:{line:370,column:6},end:{line:370,column:26}},134:{start:{line:371,column:6},end:{line:371,column:27}},135:{start:{line:374,column:11},end:{line:381,column:3}},136:{start:{line:375,column:24},end:{line:375,column:49}},137:{start:{line:376,column:21},end:{line:376,column:67}},138:{start:{line:377,column:4},end:{line:377,column:61}},139:{start:{line:378,column:4},end:{line:380,column:7}},140:{start:{line:382,column:11},end:{line:389,column:3}},141:{start:{line:383,column:24},end:{line:383,column:49}},142:{start:{line:384,column:21},end:{line:384,column:67}},143:{start:{line:385,column:4},end:{line:385,column:61}},144:{start:{line:386,column:4},end:{line:388,column:7}},145:{start:{line:390,column:16},end:{line:404,column:3}},146:{start:{line:391,column:33},end:{line:391,column:37}},147:{start:{line:392,column:17},end:{line:392,column:43}},148:{start:{line:393,column:4},end:{line:393,column:53}},149:{start:{line:394,column:4},end:{line:394,column:53}},150:{start:{line:395,column:4},end:{line:395,column:38}},151:{start:{line:395,column:31},end:{line:395,column:38}},152:{start:{line:396,column:4},end:{line:400,column:5}},153:{start:{line:397,column:6},end:{line:399,column:9}},154:{start:{line:401,column:4},end:{line:401,column:29}},155:{start:{line:402,column:4},end:{line:402,column:49}},156:{start:{line:403,column:4},end:{line:403,column:32}},157:{start:{line:405,column:19},end:{line:411,column:3}},158:{start:{line:406,column:25},end:{line:409,column:5}},159:{start:{line:410,column:4},end:{line:410,column:38}},160:{start:{line:412,column:19},end:{line:417,column:3}},161:{start:{line:413,column:19},end:{line:413,column:45}},162:{start:{line:414,column:28},end:{line:414,column:43}},163:{start:{line:415,column:4},end:{line:415,column:37}},164:{start:{line:416,column:4},end:{line:416,column:41}},165:{start:{line:418,column:16},end:{line:425,column:3}},166:{start:{line:419,column:19},end:{line:419,column:45}},167:{start:{line:420,column:26},end:{line:420,column:41}},168:{start:{line:421,column:24},end:{line:421,column:55}},169:{start:{line:422,column:4},end:{line:422,column:46}},170:{start:{line:423,column:4},end:{line:423,column:48}},171:{start:{line:424,column:4},end:{line:424,column:39}},172:{start:{line:426,column:28},end:{line:435,column:3}},173:{start:{line:427,column:19},end:{line:427,column:45}},174:{start:{line:428,column:26},end:{line:428,column:41}},175:{start:{line:429,column:18},end:{line:429,column:45}},176:{start:{line:430,column:26},end:{line:430,column:70}},177:{start:{line:431,column:4},end:{line:431,column:88}},178:{start:{line:432,column:4},end:{line:432,column:33}},179:{start:{line:433,column:4},end:{line:433,column:33}},180:{start:{line:434,column:4},end:{line:434,column:39}},181:{start:{line:436,column:20},end:{line:443,column:3}},182:{start:{line:437,column:26},end:{line:437,column:61}},183:{start:{line:438,column:4},end:{line:441,column:6}},184:{start:{line:442,column:4},end:{line:442,column:39}},185:{start:{line:444,column:19},end:{line:448,column:3}},186:{start:{line:445,column:26},end:{line:445,column:61}},187:{start:{line:446,column:4},end:{line:446,column:33}},188:{start:{line:447,column:4},end:{line:447,column:39}},189:{start:{line:449,column:16},end:{line:453,column:3}},190:{start:{line:450,column:4},end:{line:452,column:27}},191:{start:{line:454,column:21},end:{line:468,column:3}},192:{start:{line:455,column:21},end:{line:455,column:44}},193:{start:{line:456,column:4},end:{line:467,column:5}},194:{start:{line:457,column:27},end:{line:463,column:7}},195:{start:{line:464,column:6},end:{line:464,column:26}},196:{start:{line:466,column:6},end:{line:466,column:22}},197:{start:{line:469,column:14},end:{line:473,column:3}},198:{start:{line:470,column:4},end:{line:470,column:34}},199:{start:{line:471,column:4},end:{line:471,column:47}},200:{start:{line:472,column:4},end:{line:472,column:34}},201:{start:{line:475,column:23},end:{line:475,column:25}},202:{start:{line:476,column:4},end:{line:515,column:5}},203:{start:{line:477,column:21},end:{line:477,column:53}},204:{start:{line:478,column:6},end:{line:514,column:7}},205:{start:{line:479,column:8},end:{line:479,column:93}},206:{start:{line:480,column:8},end:{line:482,column:9}},207:{start:{line:481,column:10},end:{line:481,column:38}},208:{start:{line:484,column:8},end:{line:487,column:10}},209:{start:{line:488,column:18},end:{line:488,column:28}},210:{start:{line:489,column:8},end:{line:493,column:9}},211:{start:{line:490,column:10},end:{line:490,column:62}},212:{start:{line:492,column:10},end:{line:492,column:63}},213:{start:{line:494,column:32},end:{line:501,column:9}},214:{start:{line:495,column:10},end:{line:497,column:11}},215:{start:{line:496,column:12},end:{line:496,column:19}},216:{start:{line:498,column:10},end:{line:500,column:11}},217:{start:{line:499,column:12},end:{line:499,column:50}},218:{start:{line:502,column:8},end:{line:513,column:9}},219:{start:{line:503,column:10},end:{line:510,column:11}},220:{start:{line:504,column:25},end:{line:504,column:77}},221:{start:{line:505,column:12},end:{line:505,column:34}},222:{start:{line:507,column:29},end:{line:507,column:63}},223:{start:{line:508,column:25},end:{line:508,column:46}},224:{start:{line:509,column:12},end:{line:509,column:34}},225:{start:{line:512,column:10},end:{line:512,column:78}},226:{start:{line:516,column:4},end:{line:521,column:5}},227:{start:{line:517,column:6},end:{line:517,column:51}},228:{start:{line:518,column:6},end:{line:520,column:9}},229:{start:{line:524,column:21},end:{line:524,column:55}},230:{start:{line:525,column:4},end:{line:525,column:53}},231:{start:{line:527,column:16},end:{line:531,column:3}},232:{start:{line:528,column:4},end:{line:530,column:7}},233:{start:{line:533,column:40},end:{line:533,column:50}},234:{start:{line:534,column:21},end:{line:545,column:5}},235:{start:{line:537,column:8},end:{line:539,column:11}},236:{start:{line:542,column:8},end:{line:542,column:44}},237:{start:{line:543,column:8},end:{line:543,column:28}},238:{start:{line:546,column:21},end:{line:546,column:40}},239:{start:{line:548,column:4},end:{line:570,column:5}},240:{start:{line:549,column:6},end:{line:557,column:8}},241:{start:{line:555,column:38},end:{line:555,column:66}},242:{start:{line:559,column:6},end:{line:569,column:8}},243:{start:{line:572,column:4},end:{line:574,column:5}},244:{start:{line:573,column:6},end:{line:573,column:63}},245:{start:{line:575,column:25},end:{line:575,column:27}},246:{start:{line:576,column:4},end:{line:578,column:5}},247:{start:{line:577,column:6},end:{line:577,column:52}},248:{start:{line:579,column:4},end:{line:579,column:160}},249:{start:{line:581,column:18},end:{line:599,column:3}},250:{start:{line:582,column:43},end:{line:582,column:53}},251:{start:{line:583,column:35},end:{line:583,column:45}},252:{start:{line:584,column:16},end:{line:584,column:38}},253:{start:{line:585,column:20},end:{line:585,column:50}},254:{start:{line:586,column:4},end:{line:586,column:70}},255:{start:{line:587,column:23},end:{line:587,column:122}},256:{start:{line:587,column:66},end:{line:587,column:91}},257:{start:{line:587,column:109},end:{line:587,column:121}},258:{start:{line:588,column:4},end:{line:592,column:5}},259:{start:{line:589,column:6},end:{line:589,column:58}},260:{start:{line:591,column:6},end:{line:591,column:39}},261:{start:{line:593,column:4},end:{line:597,column:5}},262:{start:{line:594,column:6},end:{line:594,column:38}},263:{start:{line:595,column:11},end:{line:597,column:5}},264:{start:{line:596,column:6},end:{line:596,column:46}},265:{start:{line:598,column:4},end:{line:598,column:71}},266:{start:{line:600,column:27},end:{line:645,column:3}},267:{start:{line:601,column:16},end:{line:601,column:38}},268:{start:{line:602,column:23},end:{line:602,column:52}},269:{start:{line:603,column:4},end:{line:615,column:5}},270:{start:{line:604,column:21},end:{line:604,column:42}},271:{start:{line:605,column:23},end:{line:605,column:25}},272:{start:{line:606,column:6},end:{line:608,column:9}},273:{start:{line:607,column:8},end:{line:607,column:35}},274:{start:{line:609,column:6},end:{line:614,column:9}},275:{start:{line:616,column:17},end:{line:616,column:45}},276:{start:{line:617,column:4},end:{line:619,column:5}},277:{start:{line:618,column:6},end:{line:618,column:29}},278:{start:{line:620,column:17},end:{line:620,column:46}},279:{start:{line:621,column:4},end:{line:644,column:5}},280:{start:{line:622,column:6},end:{line:643,column:7}},281:{start:{line:623,column:22},end:{line:623,column:37}},282:{start:{line:624,column:46},end:{line:627,column:9}},283:{start:{line:628,column:20},end:{line:628,column:24}},284:{start:{line:629,column:8},end:{line:634,column:9}},285:{start:{line:630,column:33},end:{line:630,column:63}},286:{start:{line:631,column:10},end:{line:633,column:11}},287:{start:{line:632,column:12},end:{line:632,column:26}},288:{start:{line:635,column:8},end:{line:640,column:9}},289:{start:{line:636,column:10},end:{line:639,column:13}},290:{start:{line:642,column:8},end:{line:642,column:26}},291:{start:{line:646,column:18},end:{line:651,column:3}},292:{start:{line:647,column:4},end:{line:650,column:27}},293:{start:{line:653,column:4},end:{line:658,column:27}},294:{start:{line:661,column:4},end:{line:661,column:60}},295:{start:{line:663,column:20},end:{line:665,column:3}},296:{start:{line:664,column:4},end:{line:664,column:34}},297:{start:{line:666,column:28},end:{line:673,column:3}},298:{start:{line:667,column:4},end:{line:672,column:7}},299:{start:{line:674,column:28},end:{line:681,column:3}},300:{start:{line:675,column:4},end:{line:680,column:7}},301:{start:{line:683,column:19},end:{line:683,column:51}},302:{start:{line:684,column:26},end:{line:684,column:92}},303:{start:{line:685,column:36},end:{line:698,column:5}},304:{start:{line:699,column:38},end:{line:713,column:5}},305:{start:{line:714,column:24},end:{line:733,column:14}},306:{start:{line:734,column:24},end:{line:744,column:14}},307:{start:{line:745,column:35},end:{line:814,column:8}},308:{start:{line:755,column:30},end:{line:755,column:55}},309:{start:{line:763,column:30},end:{line:763,column:59}},310:{start:{line:773,column:30},end:{line:773,column:58}},311:{start:{line:782,column:30},end:{line:782,column:56}},312:{start:{line:792,column:30},end:{line:792,column:54}},313:{start:{line:802,column:30},end:{line:802,column:57}},314:{start:{line:811,column:30},end:{line:811,column:61}},315:{start:{line:815,column:4},end:{line:825,column:6}}},fnMap:{0:{name:"setFetchAccessToken",decl:{start:{line:36,column:9},end:{line:36,column:28}},loc:{start:{line:36,column:44},end:{line:59,column:1}},line:36},1:{name:"updateRootSpec",decl:{start:{line:60,column:9},end:{line:60,column:23}},loc:{start:{line:60,column:52},end:{line:71,column:1}},line:60},2:{name:"(anonymous_2)",decl:{start:{line:76,column:2},end:{line:76,column:3}},loc:{start:{line:76,column:21},end:{line:118,column:3}},line:76},3:{name:"(anonymous_3)",decl:{start:{line:116,column:28},end:{line:116,column:29}},loc:{start:{line:116,column:35},end:{line:116,column:69}},line:116},4:{name:"(anonymous_4)",decl:{start:{line:119,column:31},end:{line:119,column:32}},loc:{start:{line:119,column:37},end:{line:192,column:3}},line:119},5:{name:"(anonymous_5)",decl:{start:{line:123,column:17},end:{line:123,column:18}},loc:{start:{line:123,column:23},end:{line:125,column:9}},line:123},6:{name:"(anonymous_6)",decl:{start:{line:129,column:17},end:{line:129,column:18}},loc:{start:{line:129,column:23},end:{line:131,column:9}},line:129},7:{name:"(anonymous_7)",decl:{start:{line:135,column:17},end:{line:135,column:18}},loc:{start:{line:135,column:23},end:{line:137,column:9}},line:135},8:{name:"(anonymous_8)",decl:{start:{line:141,column:17},end:{line:141,column:18}},loc:{start:{line:141,column:23},end:{line:143,column:9}},line:141},9:{name:"(anonymous_9)",decl:{start:{line:147,column:17},end:{line:147,column:18}},loc:{start:{line:147,column:23},end:{line:149,column:9}},line:147},10:{name:"(anonymous_10)",decl:{start:{line:153,column:17},end:{line:153,column:18}},loc:{start:{line:153,column:23},end:{line:155,column:9}},line:153},11:{name:"(anonymous_11)",decl:{start:{line:159,column:17},end:{line:159,column:18}},loc:{start:{line:159,column:23},end:{line:163,column:9}},line:159},12:{name:"(anonymous_12)",decl:{start:{line:167,column:17},end:{line:167,column:18}},loc:{start:{line:167,column:23},end:{line:169,column:9}},line:167},13:{name:"(anonymous_13)",decl:{start:{line:173,column:17},end:{line:173,column:18}},loc:{start:{line:173,column:23},end:{line:175,column:9}},line:173},14:{name:"(anonymous_14)",decl:{start:{line:178,column:44},end:{line:178,column:45}},loc:{start:{line:178,column:51},end:{line:191,column:5}},line:178},15:{name:"(anonymous_15)",decl:{start:{line:183,column:40},end:{line:183,column:41}},loc:{start:{line:183,column:55},end:{line:185,column:9}},line:183},16:{name:"(anonymous_16)",decl:{start:{line:193,column:19},end:{line:193,column:20}},loc:{start:{line:193,column:26},end:{line:211,column:3}},line:193},17:{name:"(anonymous_17)",decl:{start:{line:212,column:2},end:{line:212,column:3}},loc:{start:{line:212,column:28},end:{line:215,column:3}},line:212},18:{name:"(anonymous_18)",decl:{start:{line:213,column:45},end:{line:213,column:46}},loc:{start:{line:213,column:65},end:{line:213,column:100}},line:213},19:{name:"(anonymous_19)",decl:{start:{line:216,column:2},end:{line:216,column:3}},loc:{start:{line:216,column:25},end:{line:218,column:3}},line:216},20:{name:"(anonymous_20)",decl:{start:{line:219,column:2},end:{line:219,column:3}},loc:{start:{line:219,column:27},end:{line:221,column:3}},line:219},21:{name:"(anonymous_21)",decl:{start:{line:222,column:2},end:{line:222,column:3}},loc:{start:{line:222,column:27},end:{line:229,column:3}},line:222},22:{name:"(anonymous_22)",decl:{start:{line:226,column:37},end:{line:226,column:38}},loc:{start:{line:226,column:48},end:{line:228,column:5}},line:226},23:{name:"(anonymous_23)",decl:{start:{line:230,column:2},end:{line:230,column:3}},loc:{start:{line:230,column:23},end:{line:234,column:3}},line:230},24:{name:"(anonymous_24)",decl:{start:{line:231,column:36},end:{line:231,column:37}},loc:{start:{line:231,column:47},end:{line:233,column:5}},line:231},25:{name:"(anonymous_25)",decl:{start:{line:235,column:29},end:{line:235,column:30}},loc:{start:{line:235,column:50},end:{line:249,column:3}},line:235},26:{name:"(anonymous_26)",decl:{start:{line:250,column:19},end:{line:250,column:20}},loc:{start:{line:250,column:44},end:{line:373,column:3}},line:250},27:{name:"(anonymous_27)",decl:{start:{line:275,column:30},end:{line:275,column:31}},loc:{start:{line:275,column:48},end:{line:283,column:7}},line:275},28:{name:"(anonymous_28)",decl:{start:{line:285,column:56},end:{line:285,column:57}},loc:{start:{line:285,column:67},end:{line:336,column:5}},line:285},29:{name:"(anonymous_29)",decl:{start:{line:369,column:7},end:{line:369,column:8}},loc:{start:{line:369,column:13},end:{line:372,column:5}},line:369},30:{name:"(anonymous_30)",decl:{start:{line:374,column:11},end:{line:374,column:12}},loc:{start:{line:374,column:17},end:{line:381,column:3}},line:374},31:{name:"(anonymous_31)",decl:{start:{line:382,column:11},end:{line:382,column:12}},loc:{start:{line:382,column:17},end:{line:389,column:3}},line:382},32:{name:"(anonymous_32)",decl:{start:{line:390,column:16},end:{line:390,column:17}},loc:{start:{line:390,column:26},end:{line:404,column:3}},line:390},33:{name:"(anonymous_33)",decl:{start:{line:405,column:19},end:{line:405,column:20}},loc:{start:{line:405,column:38},end:{line:411,column:3}},line:405},34:{name:"(anonymous_34)",decl:{start:{line:412,column:19},end:{line:412,column:20}},loc:{start:{line:412,column:30},end:{line:417,column:3}},line:412},35:{name:"(anonymous_35)",decl:{start:{line:418,column:16},end:{line:418,column:17}},loc:{start:{line:418,column:27},end:{line:425,column:3}},line:418},36:{name:"(anonymous_36)",decl:{start:{line:426,column:28},end:{line:426,column:29}},loc:{start:{line:426,column:39},end:{line:435,column:3}},line:426},37:{name:"(anonymous_37)",decl:{start:{line:436,column:20},end:{line:436,column:21}},loc:{start:{line:436,column:46},end:{line:443,column:3}},line:436},38:{name:"(anonymous_38)",decl:{start:{line:444,column:19},end:{line:444,column:20}},loc:{start:{line:444,column:37},end:{line:448,column:3}},line:444},39:{name:"(anonymous_39)",decl:{start:{line:449,column:16},end:{line:449,column:17}},loc:{start:{line:449,column:30},end:{line:453,column:3}},line:449},40:{name:"(anonymous_40)",decl:{start:{line:454,column:21},end:{line:454,column:22}},loc:{start:{line:454,column:35},end:{line:468,column:3}},line:454},41:{name:"(anonymous_41)",decl:{start:{line:469,column:14},end:{line:469,column:15}},loc:{start:{line:469,column:40},end:{line:473,column:3}},line:469},42:{name:"(anonymous_42)",decl:{start:{line:474,column:2},end:{line:474,column:3}},loc:{start:{line:474,column:23},end:{line:522,column:3}},line:474},43:{name:"(anonymous_43)",decl:{start:{line:494,column:32},end:{line:494,column:33}},loc:{start:{line:494,column:42},end:{line:501,column:9}},line:494},44:{name:"(anonymous_44)",decl:{start:{line:523,column:2},end:{line:523,column:3}},loc:{start:{line:523,column:17},end:{line:526,column:3}},line:523},45:{name:"(anonymous_45)",decl:{start:{line:527,column:16},end:{line:527,column:17}},loc:{start:{line:527,column:29},end:{line:531,column:3}},line:527},46:{name:"(anonymous_46)",decl:{start:{line:532,column:2},end:{line:532,column:3}},loc:{start:{line:532,column:16},end:{line:580,column:3}},line:532},47:{name:"(anonymous_47)",decl:{start:{line:536,column:27},end:{line:536,column:28}},loc:{start:{line:536,column:42},end:{line:540,column:7}},line:536},48:{name:"(anonymous_48)",decl:{start:{line:541,column:20},end:{line:541,column:21}},loc:{start:{line:541,column:27},end:{line:544,column:7}},line:541},49:{name:"(anonymous_49)",decl:{start:{line:555,column:25},end:{line:555,column:26}},loc:{start:{line:555,column:38},end:{line:555,column:66}},line:555},50:{name:"(anonymous_50)",decl:{start:{line:581,column:18},end:{line:581,column:19}},loc:{start:{line:581,column:24},end:{line:599,column:3}},line:581},51:{name:"(anonymous_51)",decl:{start:{line:587,column:50},end:{line:587,column:51}},loc:{start:{line:587,column:66},end:{line:587,column:91}},line:587},52:{name:"(anonymous_52)",decl:{start:{line:587,column:100},end:{line:587,column:101}},loc:{start:{line:587,column:109},end:{line:587,column:121}},line:587},53:{name:"(anonymous_53)",decl:{start:{line:600,column:27},end:{line:600,column:28}},loc:{start:{line:600,column:41},end:{line:645,column:3}},line:600},54:{name:"(anonymous_54)",decl:{start:{line:606,column:21},end:{line:606,column:22}},loc:{start:{line:606,column:36},end:{line:608,column:7}},line:606},55:{name:"(anonymous_55)",decl:{start:{line:646,column:18},end:{line:646,column:19}},loc:{start:{line:646,column:29},end:{line:651,column:3}},line:646},56:{name:"(anonymous_56)",decl:{start:{line:652,column:2},end:{line:652,column:3}},loc:{start:{line:652,column:29},end:{line:659,column:3}},line:652},57:{name:"(anonymous_57)",decl:{start:{line:660,column:2},end:{line:660,column:3}},loc:{start:{line:660,column:25},end:{line:662,column:3}},line:660},58:{name:"(anonymous_58)",decl:{start:{line:663,column:20},end:{line:663,column:21}},loc:{start:{line:663,column:36},end:{line:665,column:3}},line:663},59:{name:"(anonymous_59)",decl:{start:{line:666,column:28},end:{line:666,column:29}},loc:{start:{line:666,column:44},end:{line:673,column:3}},line:666},60:{name:"(anonymous_60)",decl:{start:{line:674,column:28},end:{line:674,column:29}},loc:{start:{line:674,column:44},end:{line:681,column:3}},line:674},61:{name:"(anonymous_61)",decl:{start:{line:682,column:2},end:{line:682,column:3}},loc:{start:{line:682,column:11},end:{line:826,column:3}},line:682},62:{name:"(anonymous_62)",decl:{start:{line:755,column:24},end:{line:755,column:25}},loc:{start:{line:755,column:30},end:{line:755,column:55}},line:755},63:{name:"(anonymous_63)",decl:{start:{line:763,column:24},end:{line:763,column:25}},loc:{start:{line:763,column:30},end:{line:763,column:59}},line:763},64:{name:"(anonymous_64)",decl:{start:{line:773,column:24},end:{line:773,column:25}},loc:{start:{line:773,column:30},end:{line:773,column:58}},line:773},65:{name:"(anonymous_65)",decl:{start:{line:782,column:24},end:{line:782,column:25}},loc:{start:{line:782,column:30},end:{line:782,column:56}},line:782},66:{name:"(anonymous_66)",decl:{start:{line:792,column:24},end:{line:792,column:25}},loc:{start:{line:792,column:30},end:{line:792,column:54}},line:792},67:{name:"(anonymous_67)",decl:{start:{line:802,column:24},end:{line:802,column:25}},loc:{start:{line:802,column:30},end:{line:802,column:57}},line:802},68:{name:"(anonymous_68)",decl:{start:{line:811,column:24},end:{line:811,column:25}},loc:{start:{line:811,column:30},end:{line:811,column:61}},line:811}},branchMap:{0:{loc:{start:{line:41,column:2},end:{line:58,column:3}},type:"if",locations:[{start:{line:41,column:2},end:{line:58,column:3}},{start:{line:46,column:9},end:{line:58,column:3}}],line:41},1:{loc:{start:{line:41,column:6},end:{line:41,column:43}},type:"binary-expr",locations:[{start:{line:41,column:6},end:{line:41,column:24}},{start:{line:41,column:28},end:{line:41,column:43}}],line:41},2:{loc:{start:{line:43,column:4},end:{line:45,column:5}},type:"if",locations:[{start:{line:43,column:4},end:{line:45,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:43},3:{loc:{start:{line:46,column:9},end:{line:58,column:3}},type:"if",locations:[{start:{line:46,column:9},end:{line:58,column:3}},{start:{line:51,column:9},end:{line:58,column:3}}],line:46},4:{loc:{start:{line:48,column:4},end:{line:50,column:5}},type:"if",locations:[{start:{line:48,column:4},end:{line:50,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:48},5:{loc:{start:{line:51,column:9},end:{line:58,column:3}},type:"if",locations:[{start:{line:51,column:9},end:{line:58,column:3}},{start:{line:56,column:9},end:{line:58,column:3}}],line:51},6:{loc:{start:{line:53,column:4},end:{line:55,column:5}},type:"if",locations:[{start:{line:53,column:4},end:{line:55,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:53},7:{loc:{start:{line:161,column:12},end:{line:161,column:61}},type:"cond-expr",locations:[{start:{line:161,column:44},end:{line:161,column:53}},{start:{line:161,column:56},end:{line:161,column:61}}],line:161},8:{loc:{start:{line:179,column:6},end:{line:190,column:7}},type:"if",locations:[{start:{line:179,column:6},end:{line:190,column:7}},{start:{line:182,column:13},end:{line:190,column:7}}],line:179},9:{loc:{start:{line:182,column:13},end:{line:190,column:7}},type:"if",locations:[{start:{line:182,column:13},end:{line:190,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:182},10:{loc:{start:{line:182,column:17},end:{line:182,column:88}},type:"binary-expr",locations:[{start:{line:182,column:17},end:{line:182,column:44}},{start:{line:182,column:48},end:{line:182,column:88}}],line:182},11:{loc:{start:{line:186,column:8},end:{line:189,column:9}},type:"if",locations:[{start:{line:186,column:8},end:{line:189,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:186},12:{loc:{start:{line:194,column:4},end:{line:210,column:5}},type:"if",locations:[{start:{line:194,column:4},end:{line:210,column:5}},{start:{line:202,column:11},end:{line:210,column:5}}],line:194},13:{loc:{start:{line:195,column:6},end:{line:201,column:7}},type:"if",locations:[{start:{line:195,column:6},end:{line:201,column:7}},{start:{line:198,column:13},end:{line:201,column:7}}],line:195},14:{loc:{start:{line:195,column:10},end:{line:195,column:53}},type:"binary-expr",locations:[{start:{line:195,column:10},end:{line:195,column:19}},{start:{line:195,column:23},end:{line:195,column:33}},{start:{line:195,column:37},end:{line:195,column:53}}],line:195},15:{loc:{start:{line:198,column:13},end:{line:201,column:7}},type:"if",locations:[{start:{line:198,column:13},end:{line:201,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:198},16:{loc:{start:{line:198,column:17},end:{line:198,column:46}},type:"binary-expr",locations:[{start:{line:198,column:17},end:{line:198,column:26}},{start:{line:198,column:30},end:{line:198,column:46}}],line:198},17:{loc:{start:{line:203,column:6},end:{line:209,column:7}},type:"if",locations:[{start:{line:203,column:6},end:{line:209,column:7}},{start:{line:206,column:13},end:{line:209,column:7}}],line:203},18:{loc:{start:{line:203,column:10},end:{line:203,column:39}},type:"binary-expr",locations:[{start:{line:203,column:10},end:{line:203,column:19}},{start:{line:203,column:23},end:{line:203,column:39}}],line:203},19:{loc:{start:{line:206,column:13},end:{line:209,column:7}},type:"if",locations:[{start:{line:206,column:13},end:{line:209,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:206},20:{loc:{start:{line:206,column:17},end:{line:206,column:46}},type:"binary-expr",locations:[{start:{line:206,column:17},end:{line:206,column:26}},{start:{line:206,column:30},end:{line:206,column:46}}],line:206},21:{loc:{start:{line:223,column:21},end:{line:223,column:55}},type:"binary-expr",locations:[{start:{line:223,column:21},end:{line:223,column:49}},{start:{line:223,column:53},end:{line:223,column:55}}],line:223},22:{loc:{start:{line:224,column:24},end:{line:224,column:93}},type:"binary-expr",locations:[{start:{line:224,column:24},end:{line:224,column:70}},{start:{line:224,column:74},end:{line:224,column:93}}],line:224},23:{loc:{start:{line:225,column:21},end:{line:225,column:110}},type:"cond-expr",locations:[{start:{line:225,column:55},end:{line:225,column:96}},{start:{line:225,column:99},end:{line:225,column:110}}],line:225},24:{loc:{start:{line:236,column:4},end:{line:240,column:5}},type:"if",locations:[{start:{line:236,column:4},end:{line:240,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:236},25:{loc:{start:{line:236,column:8},end:{line:236,column:123}},type:"binary-expr",locations:[{start:{line:236,column:8},end:{line:236,column:40}},{start:{line:236,column:44},end:{line:236,column:123}}],line:236},26:{loc:{start:{line:250,column:30},end:{line:250,column:39}},type:"default-arg",locations:[{start:{line:250,column:37},end:{line:250,column:39}}],line:250},27:{loc:{start:{line:257,column:4},end:{line:259,column:5}},type:"if",locations:[{start:{line:257,column:4},end:{line:259,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:257},28:{loc:{start:{line:257,column:8},end:{line:257,column:62}},type:"binary-expr",locations:[{start:{line:257,column:8},end:{line:257,column:23}},{start:{line:257,column:27},end:{line:257,column:62}}],line:257},29:{loc:{start:{line:260,column:4},end:{line:262,column:5}},type:"if",locations:[{start:{line:260,column:4},end:{line:262,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:260},30:{loc:{start:{line:260,column:8},end:{line:260,column:62}},type:"binary-expr",locations:[{start:{line:260,column:8},end:{line:260,column:23}},{start:{line:260,column:27},end:{line:260,column:62}}],line:260},31:{loc:{start:{line:264,column:6},end:{line:266,column:7}},type:"if",locations:[{start:{line:264,column:6},end:{line:266,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:264},32:{loc:{start:{line:264,column:10},end:{line:264,column:69}},type:"binary-expr",locations:[{start:{line:264,column:10},end:{line:264,column:16}},{start:{line:264,column:20},end:{line:264,column:35}},{start:{line:264,column:39},end:{line:264,column:69}}],line:264},33:{loc:{start:{line:268,column:4},end:{line:270,column:5}},type:"if",locations:[{start:{line:268,column:4},end:{line:270,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:268},34:{loc:{start:{line:271,column:19},end:{line:271,column:51}},type:"binary-expr",locations:[{start:{line:271,column:19},end:{line:271,column:45}},{start:{line:271,column:49},end:{line:271,column:51}}],line:271},35:{loc:{start:{line:273,column:4},end:{line:284,column:5}},type:"if",locations:[{start:{line:273,column:4},end:{line:284,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:273},36:{loc:{start:{line:273,column:8},end:{line:273,column:35}},type:"binary-expr",locations:[{start:{line:273,column:8},end:{line:273,column:16}},{start:{line:273,column:20},end:{line:273,column:35}}],line:273},37:{loc:{start:{line:276,column:8},end:{line:281,column:9}},type:"if",locations:[{start:{line:276,column:8},end:{line:281,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:276},38:{loc:{start:{line:276,column:12},end:{line:276,column:56}},type:"binary-expr",locations:[{start:{line:276,column:12},end:{line:276,column:27}},{start:{line:276,column:31},end:{line:276,column:56}}],line:276},39:{loc:{start:{line:287,column:6},end:{line:300,column:7}},type:"if",locations:[{start:{line:287,column:6},end:{line:300,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:287},40:{loc:{start:{line:302,column:6},end:{line:315,column:7}},type:"if",locations:[{start:{line:302,column:6},end:{line:315,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:302},41:{loc:{start:{line:317,column:6},end:{line:335,column:7}},type:"if",locations:[{start:{line:317,column:6},end:{line:335,column:7}},{start:{line:331,column:13},end:{line:335,column:7}}],line:317},42:{loc:{start:{line:319,column:20},end:{line:319,column:78}},type:"cond-expr",locations:[{start:{line:319,column:40},end:{line:319,column:67}},{start:{line:319,column:70},end:{line:319,column:78}}],line:319},43:{loc:{start:{line:319,column:20},end:{line:319,column:37}},type:"binary-expr",locations:[{start:{line:319,column:20},end:{line:319,column:25}},{start:{line:319,column:29},end:{line:319,column:37}}],line:319},44:{loc:{start:{line:338,column:4},end:{line:352,column:5}},type:"if",locations:[{start:{line:338,column:4},end:{line:352,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:338},45:{loc:{start:{line:342,column:8},end:{line:350,column:9}},type:"if",locations:[{start:{line:342,column:8},end:{line:350,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:342},46:{loc:{start:{line:353,column:4},end:{line:355,column:5}},type:"if",locations:[{start:{line:353,column:4},end:{line:355,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:353},47:{loc:{start:{line:356,column:4},end:{line:358,column:5}},type:"if",locations:[{start:{line:356,column:4},end:{line:358,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:356},48:{loc:{start:{line:359,column:4},end:{line:361,column:5}},type:"if",locations:[{start:{line:359,column:4},end:{line:361,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:359},49:{loc:{start:{line:362,column:4},end:{line:364,column:5}},type:"if",locations:[{start:{line:362,column:4},end:{line:364,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:362},50:{loc:{start:{line:395,column:4},end:{line:395,column:38}},type:"if",locations:[{start:{line:395,column:4},end:{line:395,column:38}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:395},51:{loc:{start:{line:396,column:4},end:{line:400,column:5}},type:"if",locations:[{start:{line:396,column:4},end:{line:400,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:396},52:{loc:{start:{line:430,column:26},end:{line:430,column:70}},type:"cond-expr",locations:[{start:{line:430,column:46},end:{line:430,column:65}},{start:{line:430,column:68},end:{line:430,column:70}}],line:430},53:{loc:{start:{line:431,column:31},end:{line:431,column:87}},type:"cond-expr",locations:[{start:{line:431,column:69},end:{line:431,column:78}},{start:{line:431,column:81},end:{line:431,column:87}}],line:431},54:{loc:{start:{line:455,column:21},end:{line:455,column:44}},type:"binary-expr",locations:[{start:{line:455,column:21},end:{line:455,column:38}},{start:{line:455,column:42},end:{line:455,column:44}}],line:455},55:{loc:{start:{line:456,column:4},end:{line:467,column:5}},type:"if",locations:[{start:{line:456,column:4},end:{line:467,column:5}},{start:{line:465,column:11},end:{line:467,column:5}}],line:456},56:{loc:{start:{line:478,column:6},end:{line:514,column:7}},type:"if",locations:[{start:{line:478,column:6},end:{line:514,column:7}},{start:{line:483,column:13},end:{line:514,column:7}}],line:478},57:{loc:{start:{line:478,column:10},end:{line:478,column:56}},type:"binary-expr",locations:[{start:{line:478,column:10},end:{line:478,column:34}},{start:{line:478,column:38},end:{line:478,column:56}}],line:478},58:{loc:{start:{line:479,column:26},end:{line:479,column:92}},type:"binary-expr",locations:[{start:{line:479,column:26},end:{line:479,column:49}},{start:{line:479,column:53},end:{line:479,column:92}}],line:479},59:{loc:{start:{line:480,column:8},end:{line:482,column:9}},type:"if",locations:[{start:{line:480,column:8},end:{line:482,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:480},60:{loc:{start:{line:495,column:10},end:{line:497,column:11}},type:"if",locations:[{start:{line:495,column:10},end:{line:497,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:495},61:{loc:{start:{line:503,column:10},end:{line:510,column:11}},type:"if",locations:[{start:{line:503,column:10},end:{line:510,column:11}},{start:{line:506,column:17},end:{line:510,column:11}}],line:503},62:{loc:{start:{line:516,column:4},end:{line:521,column:5}},type:"if",locations:[{start:{line:516,column:4},end:{line:521,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:516},63:{loc:{start:{line:524,column:21},end:{line:524,column:55}},type:"binary-expr",locations:[{start:{line:524,column:21},end:{line:524,column:49}},{start:{line:524,column:53},end:{line:524,column:55}}],line:524},64:{loc:{start:{line:525,column:11},end:{line:525,column:52}},type:"binary-expr",locations:[{start:{line:525,column:11},end:{line:525,column:40}},{start:{line:525,column:44},end:{line:525,column:52}}],line:525},65:{loc:{start:{line:535,column:16},end:{line:535,column:41}},type:"binary-expr",locations:[{start:{line:535,column:16},end:{line:535,column:29}},{start:{line:535,column:33},end:{line:535,column:41}}],line:535},66:{loc:{start:{line:548,column:4},end:{line:570,column:5}},type:"if",locations:[{start:{line:548,column:4},end:{line:570,column:5}},{start:{line:558,column:11},end:{line:570,column:5}}],line:548},67:{loc:{start:{line:572,column:4},end:{line:574,column:5}},type:"if",locations:[{start:{line:572,column:4},end:{line:574,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:572},68:{loc:{start:{line:576,column:4},end:{line:578,column:5}},type:"if",locations:[{start:{line:576,column:4},end:{line:578,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:576},69:{loc:{start:{line:587,column:66},end:{line:587,column:91}},type:"cond-expr",locations:[{start:{line:587,column:81},end:{line:587,column:84}},{start:{line:587,column:87},end:{line:587,column:91}}],line:587},70:{loc:{start:{line:588,column:4},end:{line:592,column:5}},type:"if",locations:[{start:{line:588,column:4},end:{line:592,column:5}},{start:{line:590,column:11},end:{line:592,column:5}}],line:588},71:{loc:{start:{line:593,column:4},end:{line:597,column:5}},type:"if",locations:[{start:{line:593,column:4},end:{line:597,column:5}},{start:{line:595,column:11},end:{line:597,column:5}}],line:593},72:{loc:{start:{line:595,column:11},end:{line:597,column:5}},type:"if",locations:[{start:{line:595,column:11},end:{line:597,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:595},73:{loc:{start:{line:603,column:4},end:{line:615,column:5}},type:"if",locations:[{start:{line:603,column:4},end:{line:615,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:603},74:{loc:{start:{line:603,column:8},end:{line:603,column:39}},type:"binary-expr",locations:[{start:{line:603,column:8},end:{line:603,column:18}},{start:{line:603,column:22},end:{line:603,column:39}}],line:603},75:{loc:{start:{line:617,column:4},end:{line:619,column:5}},type:"if",locations:[{start:{line:617,column:4},end:{line:619,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:617},76:{loc:{start:{line:617,column:8},end:{line:617,column:27}},type:"binary-expr",locations:[{start:{line:617,column:8},end:{line:617,column:12}},{start:{line:617,column:16},end:{line:617,column:27}}],line:617},77:{loc:{start:{line:621,column:4},end:{line:644,column:5}},type:"if",locations:[{start:{line:621,column:4},end:{line:644,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:621},78:{loc:{start:{line:629,column:8},end:{line:634,column:9}},type:"if",locations:[{start:{line:629,column:8},end:{line:634,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:629},79:{loc:{start:{line:631,column:10},end:{line:633,column:11}},type:"if",locations:[{start:{line:631,column:10},end:{line:633,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:631},80:{loc:{start:{line:635,column:8},end:{line:640,column:9}},type:"if",locations:[{start:{line:635,column:8},end:{line:640,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:635},81:{loc:{start:{line:683,column:19},end:{line:683,column:51}},type:"binary-expr",locations:[{start:{line:683,column:19},end:{line:683,column:45}},{start:{line:683,column:49},end:{line:683,column:51}}],line:683},82:{loc:{start:{line:684,column:26},end:{line:684,column:92}},type:"cond-expr",locations:[{start:{line:684,column:46},end:{line:684,column:83}},{start:{line:684,column:86},end:{line:684,column:92}}],line:684},83:{loc:{start:{line:714,column:24},end:{line:733,column:14}},type:"cond-expr",locations:[{start:{line:714,column:56},end:{line:733,column:5}},{start:{line:733,column:8},end:{line:733,column:14}}],line:714},84:{loc:{start:{line:734,column:24},end:{line:744,column:14}},type:"cond-expr",locations:[{start:{line:734,column:97},end:{line:744,column:5}},{start:{line:744,column:8},end:{line:744,column:14}}],line:734}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0,106:0,107:0,108:0,109:0,110:0,111:0,112:0,113:0,114:0,115:0,116:0,117:0,118:0,119:0,120:0,121:0,122:0,123:0,124:0,125:0,126:0,127:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:0,136:0,137:0,138:0,139:0,140:0,141:0,142:0,143:0,144:0,145:0,146:0,147:0,148:0,149:0,150:0,151:0,152:0,153:0,154:0,155:0,156:0,157:0,158:0,159:0,160:0,161:0,162:0,163:0,164:0,165:0,166:0,167:0,168:0,169:0,170:0,171:0,172:0,173:0,174:0,175:0,176:0,177:0,178:0,179:0,180:0,181:0,182:0,183:0,184:0,185:0,186:0,187:0,188:0,189:0,190:0,191:0,192:0,193:0,194:0,195:0,196:0,197:0,198:0,199:0,200:0,201:0,202:0,203:0,204:0,205:0,206:0,207:0,208:0,209:0,210:0,211:0,212:0,213:0,214:0,215:0,216:0,217:0,218:0,219:0,220:0,221:0,222:0,223:0,224:0,225:0,226:0,227:0,228:0,229:0,230:0,231:0,232:0,233:0,234:0,235:0,236:0,237:0,238:0,239:0,240:0,241:0,242:0,243:0,244:0,245:0,246:0,247:0,248:0,249:0,250:0,251:0,252:0,253:0,254:0,255:0,256:0,257:0,258:0,259:0,260:0,261:0,262:0,263:0,264:0,265:0,266:0,267:0,268:0,269:0,270:0,271:0,272:0,273:0,274:0,275:0,276:0,277:0,278:0,279:0,280:0,281:0,282:0,283:0,284:0,285:0,286:0,287:0,288:0,289:0,290:0,291:0,292:0,293:0,294:0,295:0,296:0,297:0,298:0,299:0,300:0,301:0,302:0,303:0,304:0,305:0,306:0,307:0,308:0,309:0,310:0,311:0,312:0,313:0,314:0,315:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0],27:[0,0],28:[0,0],29:[0,0],30:[0,0],31:[0,0],32:[0,0,0],33:[0,0],34:[0,0],35:[0,0],36:[0,0],37:[0,0],38:[0,0],39:[0,0],40:[0,0],41:[0,0],42:[0,0],43:[0,0],44:[0,0],45:[0,0],46:[0,0],47:[0,0],48:[0,0],49:[0,0],50:[0,0],51:[0,0],52:[0,0],53:[0,0],54:[0,0],55:[0,0],56:[0,0],57:[0,0],58:[0,0],59:[0,0],60:[0,0],61:[0,0],62:[0,0],63:[0,0],64:[0,0],65:[0,0],66:[0,0],67:[0,0],68:[0,0],69:[0,0],70:[0,0],71:[0,0],72:[0,0],73:[0,0],74:[0,0],75:[0,0],76:[0,0],77:[0,0],78:[0,0],79:[0,0],80:[0,0],81:[0,0],82:[0,0],83:[0,0],84:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/App.tsx"],names:["shortcut","mapStyle"],mappings:"AAorBmB,SAAA,KAkNA,YAlNA;AAprBnB,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,SAAS;AAChB,SAAQ,aAAY;AACpB,SAAQ,wBAAuB;AAC/B,OAAO,UAAU;AACjB,SAAS,eAAe;AAExB,SAAQ,wBAAuB;AAC/B,OAAO,YAAY;AAEnB,OAAO,mBAAmB;AAC1B,OAAO,mBAAmB;AAC1B,OAAO,eAAe;AACtB,OAAO,iBAAiB;AACxB,OAAO,gBAAmC;AAC1C,OAAO,eAAe;AACtB,OAAO,kBAAkB;AAEzB,OAAO,mBAAmB;AAC1B,OAAO,iBAAiB;AACxB,OAAO,kBAAkB;AACzB,OAAO,eAAe;AACtB,OAAO,oBAAoB;AAC3B,OAAO,gBAAgB;AACvB,OAAO,sBAAsB;AAE7B,SAAQ,wBAAwB,8BAA6B;AAC7D,OAAO,WAAW;AAClB,SAAS,cAAc,oBAAoB;AAC3C,SAAS,wBAA0C;AACnD,SAAS,qBAAqB;AAC9B,OAAO,kBAAkB;AACzB,OAAO,YAAY;AACnB,OAAO,aAAa;AAKpB,OAAO,SAAS,OAAO;AAEvB,SAAS,oBAAoB,KAAa,UAA8B;AACtE,QAAM,qBAAqB,IAAI,MAAM,oBAAoB;AACzD,QAAM,kBAAkB,IAAI,MAAM,iBAAiB;AACnD,QAAM,uBAAuB,IAAI,MAAM,sBAAsB;AAC7D,QAAM,oBAAoB,IAAI,MAAM,mBAAmB;AACvD,MAAI,sBAAsB,iBAAiB;AACzC,UAAM,cAAc,MAAM,eAAe,gBAAgB,UAAU,EAAC,eAAe,KAAI,CAAC;AACxF,QAAI,aAAa;AACf,aAAO,IAAI,QAAQ,SAAS,WAAW;AAAA,IACzC;AAAA,EACF,WACS,sBAAsB;AAC7B,UAAM,cAAc,MAAM,eAAe,iBAAiB,UAAU,EAAC,eAAe,KAAI,CAAC;AACzF,QAAI,aAAa;AACf,aAAO,IAAI,QAAQ,SAAS,WAAW;AAAA,IACzC;AAAA,EACF,WACS,mBAAmB;AAC1B,UAAM,cAAc,MAAM,eAAe,cAAc,UAAU,EAAC,eAAe,KAAI,CAAC;AACtF,QAAI,aAAa;AACf,aAAO,IAAI,QAAQ,SAAS,WAAW;AAAA,IACzC;AAAA,EACF,OACK;AACH,WAAO;AAAA,EACT;AACF;AAEA,SAAS,eAAe,MAAW,WAAmB,WAAgB;AACpE,SAAO;AAAA,IACL,GAAG;AAAA,IACH,OAAO;AAAA,MACL,GAAG,KAAK;AAAA,MACR,CAAC,SAAS,GAAG;AAAA,QACX,GAAG,KAAK,MAAM,SAAS;AAAA,QACvB,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,EACF;AACF;AAwCA,qBAAqB,YAAY,MAAM,UAAyB;AAAA,EAC9D;AAAA,EACA,aAAiC;AAAA,EACjC;AAAA,EAEA,YAAY,OAAY;AACtB,UAAM,KAAK;AAEX,SAAK,gBAAgB,IAAI,cAAc;AACvC,SAAK,2BAA2B;AAEhC,SAAK,QAAQ;AAAA,MACX,QAAQ,CAAC;AAAA,MACT,OAAO,CAAC;AAAA,MACR,UAAU,MAAM;AAAA,MAChB,oBAAoB;AAAA,MACpB,SAAS,CAAC;AAAA,MACV,cAAc,CAAC;AAAA,MACf,UAAU;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,QACP,MAAM;AAAA,QACN,QAAQ;AAAA,UACN,KAAK;AAAA,UACL,KAAK;AAAA,QACP;AAAA,MACF;AAAA,MACA,QAAQ;AAAA,QACN,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,aAAa;AAAA,MACf;AAAA,MACA,wBAAwB;AAAA,QACtB,oBAAoB;AAAA,QACpB,oBAAoB;AAAA,QACpB,uBAAuB;AAAA,MACzB;AAAA,MACA,wBAAwB;AAAA,QACtB,cAAc;AAAA,MAChB;AAAA,MACA,YAAY;AAAA,IACd;AAEA,SAAK,eAAe,IAAI,aAAa;AAAA,MACnC,sBAAsB,CAAA,MAAK,KAAK,SAAS,EAAE,cAAc,EAAE,CAAC;AAAA,IAC9D,CAAC;AAAA,EACH;AAAA,EAEA,6BAA6B,MAAM;AACjC,UAAM,YAAY;AAAA,MAChB;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,WAAW;AAAA,QAC9B;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,MAAM;AAAA,QACzB;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,QAAQ;AAAA,QAC3B;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,SAAS;AAAA,QAC5B;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,UAAU;AAAA,QAC7B;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,aAAa;AAAA,QAChC;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK;AAAA,YACH,KAAK,MAAM,aAAa,QAAQ,YAAY;AAAA,UAC9C;AAAA,QACF;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACZ,mBAAS,cAAc,oBAAoB,EAAwB,MAAM;AAAA,QAC5E;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,eAAK,YAAY,OAAO;AAAA,QAC1B;AAAA,MACF;AAAA,IACF;AAEA,aAAS,KAAK,iBAAiB,SAAS,CAAC,MAAM;AAC7C,UAAG,EAAE,QAAQ,UAAU;AACpB,UAAE,OAAuB,KAAK;AAC/B,iBAAS,KAAK,MAAM;AAAA,MACtB,WACQ,KAAK,MAAM,OAAO,aAAa,SAAS,kBAAkB,SAAS,MAAM;AAC/E,cAAM,WAAW,UAAU,KAAK,CAACA,cAAa;AAC5C,iBAAQA,UAAS,QAAQ,EAAE;AAAA,QAC7B,CAAC;AAED,YAAG,UAAU;AACX,eAAK,SAAS,aAAa,KAAK;AAChC,mBAAS,QAAQ;AAAA,QACnB;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,iBAAiB,CAAC,MAAqB;AACrC,QAAG,UAAU,SAAS,YAAY,EAAE,QAAQ,KAAK,KAAK,GAAG;AACvD,UAAG,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,IAAI;AAC9C,UAAE,eAAe;AACjB,aAAK,OAAO;AAAA,MACd,WACQ,EAAE,WAAW,EAAE,YAAY,IAAI;AACrC,UAAE,eAAe;AACjB,aAAK,OAAO;AAAA,MACd;AAAA,IACF,OACK;AACH,UAAG,EAAE,WAAW,EAAE,YAAY,IAAI;AAChC,UAAE,eAAe;AACjB,aAAK,OAAO;AAAA,MACd,WACQ,EAAE,WAAW,EAAE,YAAY,IAAI;AACrC,UAAE,eAAe;AACjB,aAAK,OAAO;AAAA,MACd;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAM,oBAAoB;AACxB,SAAK,aAAa,MAAM,iBAAiB,CAAC,UAAU,SAAS,KAAK,eAAe,UAAU,IAAI,CAAC;AAChG,WAAO,iBAAiB,WAAW,KAAK,cAAc;AAAA,EACxD;AAAA,EAEA,uBAAuB;AACrB,WAAO,oBAAoB,WAAW,KAAK,cAAc;AAAA,EAC3D;AAAA,EAEA,UAAU,eAAyC;AACjD,SAAK,YAAY,KAAK,aAAa;AAAA,EACrC;AAAA,EAEA,YAAY,aAAqB;AAC/B,UAAM,WAAoC,KAAK,MAAM,SAAS,YAAY,CAAC;AAC3E,UAAM,cAAc,SAAS,oCAAoC,KAAK,OAAO;AAE7E,UAAM,WAAY,OAAO,gBAAgB,WAAW,YAAY,QAAQ,SAAS,WAAW,IAAG;AAC/F,2BAAuB,UAAU,CAAA,UAAS;AACxC,WAAK,SAAS,EAAE,MAAM,eAAe,KAAK,MAAM,MAAM,UAAU,KAAK,EAAC,CAAC;AAAA,IACzE,CAAC;AAAA,EACH;AAAA,EAEA,YAAY,SAAiB;AAC3B,2BAAuB,SAAS,CAAA,UAAS;AACvC,WAAK,SAAS,EAAE,MAAM,eAAe,KAAK,MAAM,MAAM,UAAU,KAAK,EAAC,CAAC;AAAA,IACzE,CAAC;AAAA,EACH;AAAA,EAEA,2BAA2B,CAAC,UAAkB,UAAe;AAE3D,QACE,aAAa,uBACb,UAAU,IAAI,KAAK,MAAM,UAAU,CAAC,YAAY,mBAAmB,GAAG,QAAQ,GAC9E;AACA,WAAK,SAAS;AAAA,QACZ,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAEA,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,UAAU;AAAA,QACR,GAAI,KAAK,MAAM,SAAiB;AAAA,QAChC,CAAC,QAAQ,GAAG;AAAA,MACd;AAAA,IACF;AAEA,SAAK,eAAe,YAAY;AAAA,EAClC;AAAA,EAEA,iBAAiB,CAAC,UAAoC,OAAyB,CAAC,MAAY;AAC1F,WAAO;AAAA,MACL,MAAM;AAAA,MACN,aAAa;AAAA,MACb,aAAa;AAAA,MACb,GAAG;AAAA,IACL;AAKA,QAAI,SAAS,UAAU,OAAO,SAAS,WAAW,UAAU;AAC1D,eAAS,SAAS,oBAAoB,SAAS,QAAQ,QAAQ;AAAA,IACjE;AAEA,QAAI,SAAS,UAAU,OAAO,SAAS,WAAW,UAAU;AAC1D,eAAS,SAAS,oBAAoB,SAAS,QAAQ,QAAQ;AAAA,IACjE;AAEA,eAAW,CAAC,WAAW,MAAM,KAAK,OAAO,QAAQ,SAAS,OAAO,GAAG;AAClE,UAAI,UAAU,SAAS,UAAU,OAAO,OAAO,QAAQ,UAAU;AAC/D,eAAO,MAAM,oBAAoB,OAAO,KAAK,QAAQ;AAAA,MACvD;AAAA,IACF;AAGA,QAAI,KAAK,aAAa;AACpB,WAAK,uBAAuB,QAAQ;AAAA,IACtC;AAEA,UAAM,SAA4B,iBAAiB,QAAQ,KAAK,CAAC;AAGjE,UAAM,cAA2C,CAAC;AAClD,QAAI,YAAY,SAAS,QAAQ;AAC/B,YAAM,cAAc,IAAI,OAAO,IAAI;AACnC,eAAS,OAAO,QAAQ,CAAC,OAAO,UAAU;AACxC,YAAI,MAAM,OAAO,MAAM,YAAY,IAAI,MAAM,EAAE,GAAG;AAChD,gBAAM,QAAQ,IAAI;AAAA,YAChB,UAAU,KAAK;AAAA,UACjB;AACA,sBAAY,KAAK,KAAK;AAAA,QACxB;AACA,oBAAY,IAAI,MAAM,IAAI,IAAI;AAAA,MAChC,CAAC;AAAA,IACH;AAEA,UAAM,eAA8B,YAAY,OAAO,MAAM,EAAE,IAAI,CAAA,UAAS;AAE1E,YAAM,WAAW,MAAM,QAAQ,MAAM,iEAAiE;AACtG,UAAI,UAAU;AACZ,cAAM,CAAC,EAAE,OAAO,OAAO,IAAI;AAC3B,eAAO;AAAA,UACL,SAAS,MAAM;AAAA,UACf,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,MAAM;AAAA,cACJ,OAAO,SAAS,OAAO,EAAE;AAAA,cACzB,KAAK;AAAA,cACL;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAGA,YAAM,qBAAqB,MAAM,QAAQ,MAAM,8CAA8C;AAC7F,UAAI,oBAAoB;AACtB,cAAM,CAAC,EAAE,OAAO,OAAO,IAAI;AAC3B,eAAO;AAAA,UACL,SAAS,MAAM;AAAA,UACf,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,MAAM;AAAA,cACJ,OAAO,SAAS,OAAO,EAAE;AAAA,cACzB,KAAK;AAAA,cACL;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAEA,YAAM,aAAa,MAAM,QAAQ,MAAM,0CAA0C;AACjF,UAAI,YAAY;AACd,cAAM,CAAC,EAAE,OAAO,OAAO,UAAU,OAAO,IAAI;AAC5C,cAAM,MAAO,SAAS,WAAY,CAAC,OAAO,QAAQ,EAAE,KAAK,GAAG,IAAI;AAChE,eAAO;AAAA,UACL,SAAS,MAAM;AAAA,UACf,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,MAAM;AAAA,cACJ,OAAO,SAAS,OAAO,EAAE;AAAA,cACzB;AAAA,cACA;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF,OACK;AACH,eAAO;AAAA,UACL,SAAS,MAAM;AAAA,QACjB;AAAA,MACF;AAAA,IACF,CAAC;AAED,QAAI,gBAAgD;AACpD,QAAI,OAAO,SAAS,GAAG;AACrB,sBAAgB,UAAU,QAAQ;AAElC,iBAAW,SAAS,QAAQ;AAC1B,cAAM,EAAC,QAAO,IAAI;AAClB,YAAI,SAAS;AACX,cAAI;AACF,kBAAM,UAAU,QAAQ,MAAM,GAAG,EAAE,CAAC;AAEpC,kBAAM,YAAY,QAAQ,MAAM,qBAAqB,EAAG,CAAC;AACzD,kBAAM,eAAe,SAAS;AAAA,UAChC,SACO,KAAK;AACV,oBAAQ,KAAK,UAAU,MAAM,GAAG;AAAA,UAClC;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,QAAG,SAAS,WAAW,KAAK,MAAM,SAAS,QAAQ;AACjD,WAAK,YAAY,SAAS,MAAgB;AAAA,IAC5C;AACA,QAAG,SAAS,WAAW,KAAK,MAAM,SAAS,QAAQ;AACjD,WAAK,YAAY,SAAS,MAAgB;AAAA,IAC5C;AAEA,QAAI,KAAK,aAAa;AACpB,WAAK,cAAc,YAAY,QAAQ;AAAA,IACzC;AACA,QAAI,KAAK,MAAM;AACb,WAAK,UAAU,QAAQ;AAAA,IACzB;AAEA,SAAK,SAAS;AAAA,MACZ,UAAU;AAAA,MACV;AAAA,MACA,QAAQ;AAAA,IACV,GAAG,MAAM;AACP,WAAK,aAAa;AAClB,WAAK,cAAc;AAAA,IACrB,CAAC;AAAA,EAEH;AAAA,EAEA,SAAS,MAAM;AACb,UAAM,cAAc,KAAK,cAAc,KAAK;AAE5C,UAAM,WAAW,aAAa,KAAK,MAAM,UAAU,WAAW;AAC9D,SAAK,eAAe,aAAa,EAAC,aAAa,MAAK,CAAC;AACrD,SAAK,SAAS;AAAA,MACZ,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAAA,EAEA,SAAS,MAAM;AACb,UAAM,cAAc,KAAK,cAAc,KAAK;AAC5C,UAAM,WAAW,aAAa,KAAK,MAAM,UAAU,WAAW;AAC9D,SAAK,eAAe,aAAa,EAAC,aAAa,MAAK,CAAC;AACrD,SAAK,SAAS;AAAA,MACZ,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAAA,EAEA,cAAc,CAAC,SAA+C;AAC5D,QAAI,EAAE,UAAU,SAAS,IAAI;AAC7B,QAAI,SAAS,KAAK,MAAM,SAAS;AACjC,eAAW,MAAM,UAAU,GAAG,OAAO,SAAO,CAAC;AAC7C,eAAW,MAAM,UAAU,GAAG,OAAO,SAAO,CAAC;AAC7C,QAAG,aAAa,SAAU;AAE1B,QAAI,aAAa,KAAK,MAAM,oBAAoB;AAC9C,WAAK,SAAS;AAAA,QACZ,oBAAoB;AAAA,MACtB,CAAC;AAAA,IACH;AAEA,aAAS,OAAO,MAAM,CAAC;AACvB,qBAAiB,QAAQ,UAAU,QAAQ;AAC3C,SAAK,eAAe,MAAM;AAAA,EAC5B;AAAA,EAEA,iBAAiB,CAAC,kBAAwC;AACxD,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,QAAQ;AAAA,IACV;AACA,SAAK,eAAe,YAAY;AAAA,EAClC;AAAA,EAEA,iBAAiB,CAAC,UAAkB;AAClC,UAAM,SAAS,KAAK,MAAM,SAAS;AACnC,UAAM,kBAAkB,OAAO,MAAM,CAAC;AACtC,oBAAgB,OAAO,OAAO,CAAC;AAC/B,SAAK,eAAe,eAAe;AAAA,EACrC;AAAA,EAEA,cAAc,CAAC,UAAkB;AAC/B,UAAM,SAAS,KAAK,MAAM,SAAS;AACnC,UAAM,gBAAgB,OAAO,MAAM,CAAC;AAEpC,UAAM,cAAc,UAAU,cAAc,KAAK,CAAC;AAClD,gBAAY,KAAK,YAAY,KAAK;AAClC,kBAAc,OAAO,OAAO,GAAG,WAAW;AAC1C,SAAK,eAAe,aAAa;AAAA,EACnC;AAAA,EAEA,0BAA0B,CAAC,UAAkB;AAC3C,UAAM,SAAS,KAAK,MAAM,SAAS;AACnC,UAAM,gBAAgB,OAAO,MAAM,CAAC;AAEpC,UAAM,QAAQ,EAAE,GAAG,cAAc,KAAK,EAAE;AACxC,UAAM,gBAAgB,YAAY,QAAQ,EAAC,GAAG,MAAM,OAAM,IAAI,CAAC;AAC/D,kBAAc,aAAa,cAAc,eAAe,SAAS,YAAY;AAE7E,UAAM,SAAS;AACf,kBAAc,KAAK,IAAI;AACvB,SAAK,eAAe,aAAa;AAAA,EACnC;AAAA,EAGA,kBAAkB,CAAC,OAAe,QAAgB,UAAkB;AAClE,UAAM,gBAAgB,KAAK,MAAM,SAAS,OAAO,MAAM,CAAC;AACxD,kBAAc,KAAK,IAAI;AAAA,MACrB,GAAG,cAAc,KAAK;AAAA,MACtB,IAAI;AAAA,IACN;AAEA,SAAK,eAAe,aAAa;AAAA,EACnC;AAAA,EAEA,iBAAiB,CAAC,OAAe,UAA8B;AAC7D,UAAM,gBAAgB,KAAK,MAAM,SAAS,OAAO,MAAM,CAAC;AACxD,kBAAc,KAAK,IAAI;AAEvB,SAAK,eAAe,aAAa;AAAA,EACnC;AAAA,EAEA,cAAc,CAAC,aAAuB;AACpC,SAAK,SAAS;AAAA,MACZ,UAAU;AAAA,IACZ,GAAG,KAAK,aAAa;AAAA,EACvB;AAAA,EAEA,mBAAmB,CAAC,aAAuC;AACzD,UAAM,WAAoC,SAAS,YAAY,CAAC;AAChE,QAAG,SAAS,mBAAmB,MAAM,QAAW;AAC9C,YAAM,eAAe;AAAA,QACnB,GAAG;AAAA,QACH,UAAU;AAAA,UACR,GAAG,SAAS;AAAA,UACZ,qBAAqB;AAAA,QACvB;AAAA,MACF;AACA,aAAO;AAAA,IACT,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,YAAY,CAAC,UAAoC,eAA4C;AAC3F,SAAK,SAAS,EAAC,WAAsB,CAAC;AACtC,eAAW,KAAK,iBAAiB,QAAQ;AACzC,SAAK,eAAe,QAAQ;AAAA,EAC9B;AAAA,EAEA,MAAM,eAAe;AACnB,UAAM,aAAwE,CAAC;AAC/E,eAAU,OAAO,OAAO,KAAK,KAAK,MAAM,SAAS,OAAO,GAAG;AACzD,YAAM,SAAS,KAAK,MAAM,SAAS,QAAQ,GAAG;AAC9C,UAAG,OAAO,SAAS,YAAY,EAAE,SAAS,SAAS;AACjD,mBAAW,GAAG,IAAI,KAAK,MAAM,QAAQ,GAAG,KAAK,EAAC,GAAG,KAAK,MAAM,SAAS,QAAQ,GAAG,EAAC;AACjF,YAAI,WAAW,GAAG,EAAE,WAAW,QAAW;AACxC,qBAAW,GAAG,EAAE,SAAS,CAAC;AAAA,QAC5B;AAAA,MACF,OAAO;AACL,mBAAW,GAAG,IAAI;AAAA,UAChB,MAAM,OAAO;AAAA,UACb,QAAQ,CAAC;AAAA,QACX;AAEA,YAAI,MAAM,OAAO;AAEjB,YAAI;AACF,gBAAM,oBAAoB,KAAM,KAAK,MAAM,QAAQ;AAAA,QACrD,SAAQ,KAAK;AACX,kBAAQ,KAAK,mCAAmC,GAAG;AAAA,QACrD;AAEA,cAAM,kBAAkB,CAAC,SAAa;AACpC,cAAG,CAAC,OAAO,UAAU,eAAe,KAAK,MAAM,eAAe,GAAG;AAC/D;AAAA,UACF;AAEA,qBAAU,SAAS,KAAK,eAAe;AACrC,uBAAW,GAAG,EAAE,OAAO,KAAK,MAAM,EAAE;AAAA,UACtC;AAAA,QACF;AAEA,YAAI;AACF,cAAI,IAAK,WAAW,YAAY,GAAG;AACjC,kBAAM,OAAO,MAAO,IAAI,QAAQ,IAAK,UAAU,EAAE,CAAC,EAAG,YAAY,EAAE;AACnE,4BAAgB,IAAI;AAAA,UACtB,OAAO;AACL,kBAAM,WAAW,MAAM,MAAM,KAAM,EAAE,MAAM,OAAO,CAAC;AACnD,kBAAM,OAAO,MAAM,SAAS,KAAK;AACjC,4BAAgB,IAAI;AAAA,UACtB;AAAA,QACF,SAAQ,KAAK;AACX,kBAAQ,MAAM,sCAAsC,GAAG,MAAM,GAAG,EAAE;AAAA,QACpE;AAAA,MACF;AAAA,IACF;AAEA,QAAG,CAAC,QAAQ,KAAK,MAAM,SAAS,UAAU,GAAG;AAC3C,cAAQ,MAAM,mBAAmB,UAAU;AAC3C,WAAK,SAAS;AAAA,QACZ,SAAS;AAAA,MACX,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,eAAgB;AACd,UAAM,WAAmC,KAAK,MAAM,SAAS,YAAY,CAAC;AAC1E,WAAO,SAAS,mBAAmB,KAAK;AAAA,EAC1C;AAAA,EAEA,cAAc,CAAC,YAMT;AACJ,SAAK,SAAS;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,cAAc;AACZ,UAAM,EAAC,UAAU,cAAa,IAAI,KAAK;AAEvC,UAAM,WAAW;AAAA,MACf,UAAW,iBAAiB;AAAA,MAC5B,qBAAqB,CAACC,cAAiC;AACrD,eAAO,MAAM,oBAAoBA,WAAU;AAAA,UACzC,eAAe;AAAA,QACjB,CAAC;AAAA,MACH;AAAA,MACA,cAAc,CAAC,MAAkB;AAC/B,aAAK,aAAa,WAAW,EAAE,GAAG;AAClC,aAAK,aAAa;AAAA,MACpB;AAAA,IACF;AAEA,UAAM,WAAW,KAAK,aAAa;AAEnC,QAAI;AAGJ,QAAG,aAAa,MAAM;AACpB,mBAAa;AAAA,QAAC;AAAA,QAAA;AAAA,UACX,GAAG;AAAA,UACJ,UAAU,KAAK;AAAA,UACf,cAAc,KAAK,MAAM,uBAAuB;AAAA,UAChD,eAAe,CAAC,YAAY,KAAK,cAAc,CAAC,OAAO;AAAA,QAAA;AAAA,MACzD;AAAA,IACF,OAAO;AAEL,mBAAa;AAAA,QAAC;AAAA,QAAA;AAAA,UAAe,GAAG;AAAA,UAC9B,UAAU,KAAK;AAAA,UACf,SAAS,KAAK,MAAM;AAAA,UACpB,oBAAoB,KAAK,MAAM,aAAa;AAAA,UAC5C,kBAAkB,KAAK,MAAM,SAAS,OAAO,KAAK,MAAM,kBAAkB;AAAA,UAC1E,eAAe,KAAK;AAAA,QAAA;AAAA,MAAe;AAAA,IACvC;AAEA,QAAI;AACJ,QAAG,KAAK,MAAM,SAAS,MAAM,UAAU,GAAG;AACxC,mBAAa,KAAK,MAAM,SAAS,QAAQ,YAAY,EAAE;AAAA,IACzD;AACA,UAAM,eAAkC,CAAC;AACzC,QAAI,YAAY;AACd,mBAAa,SAAS,SAAS,UAAU;AAAA,IAC3C;AAEA,WAAO,oBAAC,SAAI,OAAO,cAAc,WAAU,2BAA0B,eAAY,sBAC9E,UAAA,WAAA,CACH;AAAA,EACF;AAAA,EAEA,gBAAgB,MAAM;AACpB,UAAM,EAAC,UAAU,UAAU,OAAM,IAAI,KAAK;AAC1C,UAAM,EAAC,mBAAkB,IAAI,KAAK;AAClC,UAAM,MAAM,IAAI,IAAI,SAAS,IAAI;AACjC,UAAM,UAAU,KAAK,KAAK,UAAU,QAAQ,CAAC;AAC7C,QAAI,aAAa,IAAI,SAAS,GAAG,OAAO,IAAI,kBAAkB,EAAE;AAEhE,UAAM,aAAa,OAAO,QAAQ,MAAM,EACrC,IAAI,CAAC,CAAC,KAAK,GAAG,MAAO,QAAQ,OAAO,MAAM,IAAK,EAC/C,OAAO,CAAA,QAAO,QAAQ,IAAI;AAE7B,QAAI,WAAW,SAAS,GAAG;AACzB,UAAI,aAAa,IAAI,SAAS,WAAW,KAAK,GAAG,CAAC;AAAA,IACpD,OACK;AACH,UAAI,aAAa,OAAO,OAAO;AAAA,IACjC;AAEA,QAAI,aAAa,OAAO;AACtB,UAAI,aAAa,OAAO,MAAM;AAAA,IAChC,WACS,aAAa,WAAW;AAC/B,UAAI,aAAa,IAAI,QAAQ,SAAS;AAAA,IACxC;AAEA,YAAQ,aAAa,EAAC,mBAAkB,GAAG,YAAY,IAAI,IAAI;AAAA,EACjE;AAAA,EAEA,yBAAyB,CAAC,aAAiC;AACzD,UAAM,MAAM,IAAI,IAAI,SAAS,IAAI;AACjC,UAAM,aAAa,IAAI,aAAa,IAAI,OAAO;AAE/C,QAAI,cAAc,eAAe,IAAI;AACnC,YAAM,SAAS,WAAW,MAAM,GAAG;AACnC,YAAM,WAAqC,CAAC;AAC5C,aAAO,QAAQ,CAAA,cAAa;AAC1B,iBAAS,SAAS,IAAI;AAAA,MACxB,CAAC;AAED,WAAK,SAAS;AAAA,QACZ,QAAQ;AAAA,UACN,GAAG,KAAK,MAAM;AAAA,UACd,GAAG;AAAA,QACL;AAAA,MACF,CAAC;AAAA,IACH;AAEA,UAAM,OAAO,IAAI,aAAa,IAAI,MAAM;AACxC,QAAI,QAAQ,SAAS,IAAI;AACvB,WAAK,YAAY,IAAgB;AAAA,IACnC;AAEA,UAAM,OAAO,IAAI,aAAa,IAAI,OAAO;AACzC,QAAI,MAAM;AACR,UAAI;AACF,cAAM,QAAQ,KAAK,MAAM,GAAG;AAC5B,cAAM,CAAC,SAAS,kBAAkB,IAAI;AAAA,UACpC,MAAM,CAAC;AAAA,UACP,SAAS,MAAM,CAAC,GAAG,EAAE;AAAA,QACvB;AAEA,YAAI,QAAQ;AACZ,YAAI,YAAY,KAAK;AACnB,gBAAM,iBAAiB,KAAK,KAAK,UAAU,QAAQ,CAAC;AACpD,cAAI,mBAAmB,SAAS,SAAS,EAAE,GAAG;AAC5C,oBAAQ;AAAA,UACV;AAAA,QACF;AACA,YAAI,OAAO;AACT,eAAK,SAAS;AAAA,YACZ;AAAA,YACA,yBAAyB,SAAS,OAAO,kBAAkB,EAAE;AAAA,UAC/D,CAAC;AAAA,QACH;AAAA,MACF,SACO,KAAK;AACV,gBAAQ,KAAK,GAAG;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,UAAkB;AACjC,SAAK,SAAS;AAAA,MACZ,oBAAoB;AAAA,MACpB,yBAAyB,KAAK,MAAM,SAAS,OAAO,KAAK,EAAE;AAAA,IAC7D,GAAG,KAAK,aAAa;AAAA,EACvB;AAAA,EAEA,SAAS,WAAqC,OAAgB;AAC5D,SAAK,SAAS;AAAA,MACZ,QAAQ;AAAA,QACN,GAAG,KAAK,MAAM;AAAA,QACd,CAAC,SAAS,GAAG;AAAA,MACf;AAAA,IACF,GAAG,KAAK,aAAa;AAAA,EACvB;AAAA,EAEA,YAAY,WAAqC;AAC/C,SAAK,SAAS,WAAW,CAAC,KAAK,MAAM,OAAO,SAAS,CAAC;AAAA,EACxD;AAAA,EAEA,kBAAkB,CAAC,eAA4C;AAC7D,SAAK,SAAS,EAAE,WAAW,CAAC;AAAA,EAC9B;AAAA,EAEA,0BAA0B,CAAC,KAA+C,UAAmB;AAC3F,SAAK,SAAS;AAAA,MACZ,wBAAwB;AAAA,QACtB,GAAG,KAAK,MAAM;AAAA,QACd,CAAC,GAAG,GAAG;AAAA,MACT;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,0BAA0B,CAAC,KAA+C,UAAe;AACvF,SAAK,SAAS;AAAA,MACZ,wBAAwB;AAAA,QACtB,GAAG,KAAK,MAAM;AAAA,QACd,CAAC,GAAG,GAAG;AAAA,MACT;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,SAAS,KAAK,MAAM,SAAS,UAAU,CAAC;AAC9C,UAAM,gBAAgB,OAAO,SAAS,IAAI,OAAO,KAAK,MAAM,kBAAkB,IAAI;AAElF,UAAM,UAAU;AAAA,MAAC;AAAA,MAAA;AAAA,QACf,UAAU,KAAK,aAAa;AAAA,QAC5B,UAAU,KAAK,MAAM;AAAA,QACrB,UAAU,KAAK,MAAM;AAAA,QACrB,oBAAoB,KAAK,MAAM,aAAa;AAAA,QAC5C,SAAS,KAAK,MAAM;AAAA,QACpB,gBAAgB,KAAK;AAAA,QACrB,aAAa,KAAK;AAAA,QAClB,eAAe,KAAK;AAAA,QACpB,eAAe,KAAK,YAAY,KAAK,IAAI;AAAA,MAAA;AAAA,IAC3C;AAEA,UAAM,YAAY;AAAA,MAAC;AAAA,MAAA;AAAA,QACjB,aAAa,KAAK;AAAA,QAClB,gBAAgB,KAAK;AAAA,QACrB,aAAa,KAAK;AAAA,QAClB,yBAAyB,KAAK;AAAA,QAC9B,gBAAgB,KAAK;AAAA,QACrB,eAAe,KAAK;AAAA,QACpB,oBAAoB,KAAK,MAAM;AAAA,QAC/B;AAAA,QACA,SAAS,KAAK,MAAM;AAAA,QACpB,QAAQ,KAAK,MAAM;AAAA,MAAA;AAAA,IACrB;AAEA,UAAM,cAAc,gBAAgB;AAAA,MAAC;AAAA,MAAA;AAAA,QAEnC,OAAO;AAAA,QACP,YAAY,KAAK,MAAM;AAAA,QACvB,cAAc,KAAK,MAAM,qBAAqB;AAAA,QAC9C,aAAa,KAAK,MAAM,uBAAuB,KAAK,MAAM,SAAS,OAAO,SAAO;AAAA,QACjF,SAAS,KAAK,MAAM;AAAA,QACpB,cAAc,KAAK,MAAM;AAAA,QACzB,MAAM,KAAK,MAAM;AAAA,QACjB,aAAa,KAAK;AAAA,QAClB,gBAAgB,KAAK;AAAA,QACrB,gBAAgB,KAAK;AAAA,QACrB,aAAa,KAAK;AAAA,QAClB,yBAAyB,KAAK;AAAA,QAC9B,iBAAiB,KAAK;AAAA,QACtB,QAAQ,KAAK,MAAM;AAAA,MAAA;AAAA,MAdd,KAAK,MAAM;AAAA,IAelB,IAAK;AAEL,UAAM,cAAe,KAAK,MAAM,OAAO,SAAS,KAAK,MAAM,MAAM,SAAU,IAAI;AAAA,MAAC;AAAA,MAAA;AAAA,QAC9E,cAAc;AAAA,QACd,oBAAoB,KAAK,MAAM;AAAA,QAC/B,eAAe,KAAK;AAAA,QACpB,UAAU,KAAK,MAAM;AAAA,QACrB,QAAQ,KAAK,MAAM;AAAA,QACnB,OAAO,KAAK,MAAM;AAAA,MAAA;AAAA,IACpB,IAAK;AAGL,UAAM,8BAAU,OAAA,EACd,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAU,KAAK,aAAa;AAAA,UAC5B,wBAAwB,KAAK,MAAM;AAAA,UACnC,wBAAwB,KAAK,MAAM;AAAA,UACnC,yBAAyB,KAAK;AAAA,UAC9B,yBAAyB,KAAK;AAAA,UAC9B,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,cAAc,MAAM,KAAK,YAAY,OAAO;AAAA,UAC5C,SAAS,KAAK,MAAM;AAAA,QAAA;AAAA,MACtB;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,cAAc,MAAM,KAAK,YAAY,WAAW;AAAA,QAAA;AAAA,MAClD;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAU,KAAK,MAAM;AAAA,UACrB,gBAAgB,KAAK;AAAA,UACrB,0BAA0B,KAAK;AAAA,UAC/B,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,cAAc,MAAM,KAAK,YAAY,UAAU;AAAA,QAAA;AAAA,MACjD;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAU,KAAK,MAAM;AAAA,UACrB,gBAAgB,KAAK;AAAA,UACrB,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,cAAc,MAAM,KAAK,YAAY,QAAQ;AAAA,UAC7C,YAAY,KAAK,MAAM;AAAA,UACvB,iBAAiB,KAAK;AAAA,QAAA;AAAA,MACxB;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,aAAa,KAAK;AAAA,UAClB,cAAc,MAAM,KAAK,YAAY,MAAM;AAAA,UAC3C,YAAY,KAAK,MAAM;AAAA,QAAA;AAAA,MACzB;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAU,KAAK,MAAM;AAAA,UACrB,gBAAgB,KAAK;AAAA,UACrB,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,cAAc,MAAM,KAAK,YAAY,SAAS;AAAA,QAAA;AAAA,MAChD;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAU,KAAK,MAAM;AAAA,UACrB,gBAAgB,KAAK;AAAA,UACrB,QAAQ,KAAK,MAAM,OAAO;AAAA,UAC1B,cAAc,MAAM,KAAK,YAAY,aAAa;AAAA,QAAA;AAAA,MACpD;AAAA,IAAA,EAAA,CACF;AAEA,WAAO;AAAA,MAAC;AAAA,MAAA;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA,KAAK,KAAK,YAAY;AAAA,QACtB,QAAQ;AAAA,QACR;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"87a98b95fe8a8cfc778c5f95c5bbfce78b8fc5aa"},o=t[i]||(t[i]={});(!o[n]||o[n].hash!==e)&&(o[n]=r);var s=o[n];return ge=function(){return s},s}ge();ge().s[0]++;window.Buffer=Aue.Buffer;function F5(n,e){ge().f[0]++;const t=(ge().s[1]++,n.match(/\.tilehosting\.com/)),i=(ge().s[2]++,n.match(/\.maptiler\.com/)),r=(ge().s[3]++,n.match(/\.thunderforest\.com/)),o=(ge().s[4]++,n.match(/\.locationiq\.com/));if(ge().s[5]++,ge().b[1][0]++,t||(ge().b[1][1]++,i)){ge().b[0][0]++;const s=(ge().s[6]++,id.getAccessToken("openmaptiles",e,{allowFallback:!0}));if(ge().s[7]++,s)return ge().b[2][0]++,ge().s[8]++,n.replace("{key}",s);ge().b[2][1]++}else if(ge().b[0][1]++,ge().s[9]++,r){ge().b[3][0]++;const s=(ge().s[10]++,id.getAccessToken("thunderforest",e,{allowFallback:!0}));if(ge().s[11]++,s)return ge().b[4][0]++,ge().s[12]++,n.replace("{key}",s);ge().b[4][1]++}else if(ge().b[3][1]++,ge().s[13]++,o){ge().b[5][0]++;const s=(ge().s[14]++,id.getAccessToken("locationiq",e,{allowFallback:!0}));if(ge().s[15]++,s)return ge().b[6][0]++,ge().s[16]++,n.replace("{key}",s);ge().b[6][1]++}else return ge().b[5][1]++,ge().s[17]++,n}function LH(n,e,t){return ge().f[1]++,ge().s[18]++,{...n,$root:{...n.$root,[e]:{...n.$root[e],values:t}}}}class DUe extends En.Component{revisionStore;styleStore=(ge().s[19]++,null);layerWatcher;constructor(e){ge().f[2]++,ge().s[20]++,super(e),ge().s[21]++,this.revisionStore=new EUe,ge().s[22]++,this.configureKeyboardShortcuts(),ge().s[23]++,this.state={errors:[],infos:[],mapStyle:id.emptyStyle,selectedLayerIndex:0,sources:{},vectorLayers:{},mapState:"map",spec:Jr,mapView:{zoom:0,center:{lng:0,lat:0}},isOpen:{settings:!1,sources:!1,open:!1,shortcuts:!1,export:!1,debug:!1,globalState:!1},maplibreGlDebugOptions:{showTileBoundaries:!1,showCollisionBoxes:!1,showOverdrawInspector:!1},openlayersDebugOptions:{debugToolbox:!1},fileHandle:null},ge().s[24]++,this.layerWatcher=new RUe({onVectorLayersChange:t=>(ge().f[3]++,ge().s[25]++,this.setState({vectorLayers:t}))})}configureKeyboardShortcuts=(ge().s[26]++,()=>{ge().f[4]++;const e=(ge().s[27]++,[{key:"?",handler:()=>{ge().f[5]++,ge().s[28]++,this.toggleModal("shortcuts")}},{key:"o",handler:()=>{ge().f[6]++,ge().s[29]++,this.toggleModal("open")}},{key:"e",handler:()=>{ge().f[7]++,ge().s[30]++,this.toggleModal("export")}},{key:"d",handler:()=>{ge().f[8]++,ge().s[31]++,this.toggleModal("sources")}},{key:"s",handler:()=>{ge().f[9]++,ge().s[32]++,this.toggleModal("settings")}},{key:"g",handler:()=>{ge().f[10]++,ge().s[33]++,this.toggleModal("globalState")}},{key:"i",handler:()=>{ge().f[11]++,ge().s[34]++,this.setMapState(this.state.mapState==="map"?(ge().b[7][0]++,"inspect"):(ge().b[7][1]++,"map"))}},{key:"m",handler:()=>{ge().f[12]++,ge().s[35]++,document.querySelector(".maplibregl-canvas").focus()}},{key:"!",handler:()=>{ge().f[13]++,ge().s[36]++,this.toggleModal("debug")}}]);ge().s[37]++,document.body.addEventListener("keyup",t=>{if(ge().f[14]++,ge().s[38]++,t.key==="Escape")ge().b[8][0]++,ge().s[39]++,t.target.blur(),ge().s[40]++,document.body.focus();else if(ge().b[8][1]++,ge().s[41]++,ge().b[10][0]++,this.state.isOpen.shortcuts||(ge().b[10][1]++,document.activeElement===document.body)){ge().b[9][0]++;const i=(ge().s[42]++,e.find(r=>(ge().f[15]++,ge().s[43]++,r.key===t.key)));ge().s[44]++,i?(ge().b[11][0]++,ge().s[45]++,this.setModal("shortcuts",!1),ge().s[46]++,i.handler()):ge().b[11][1]++}else ge().b[9][1]++})});handleKeyPress=(ge().s[47]++,e=>{ge().f[16]++,ge().s[48]++,navigator.platform.toUpperCase().indexOf("MAC")>=0?(ge().b[12][0]++,ge().s[49]++,ge().b[14][0]++,e.metaKey&&(ge().b[14][1]++,e.shiftKey)&&(ge().b[14][2]++,e.keyCode===90)?(ge().b[13][0]++,ge().s[50]++,e.preventDefault(),ge().s[51]++,this.onRedo()):(ge().b[13][1]++,ge().s[52]++,ge().b[16][0]++,e.metaKey&&(ge().b[16][1]++,e.keyCode===90)?(ge().b[15][0]++,ge().s[53]++,e.preventDefault(),ge().s[54]++,this.onUndo()):ge().b[15][1]++)):(ge().b[12][1]++,ge().s[55]++,ge().b[18][0]++,e.ctrlKey&&(ge().b[18][1]++,e.keyCode===90)?(ge().b[17][0]++,ge().s[56]++,e.preventDefault(),ge().s[57]++,this.onUndo()):(ge().b[17][1]++,ge().s[58]++,ge().b[20][0]++,e.ctrlKey&&(ge().b[20][1]++,e.keyCode===89)?(ge().b[19][0]++,ge().s[59]++,e.preventDefault(),ge().s[60]++,this.onRedo()):ge().b[19][1]++))});async componentDidMount(){ge().f[17]++,ge().s[61]++,this.styleStore=await SUe((e,t)=>(ge().f[18]++,ge().s[62]++,this.onStyleChanged(e,t))),ge().s[63]++,window.addEventListener("keydown",this.handleKeyPress)}componentWillUnmount(){ge().f[19]++,ge().s[64]++,window.removeEventListener("keydown",this.handleKeyPress)}saveStyle(e){ge().f[20]++,ge().s[65]++,this.styleStore?.save(e)}updateFonts(e){ge().f[21]++;const t=(ge().s[66]++,ge().b[21][0]++,this.state.mapStyle.metadata||(ge().b[21][1]++,{})),i=(ge().s[67]++,ge().b[22][0]++,t["maputnik:openmaptiles_access_token"]||(ge().b[22][1]++,Qse.openmaptiles)),r=(ge().s[68]++,typeof e=="string"?(ge().b[23][0]++,e.replace("{key}",i)):(ge().b[23][1]++,e));ge().s[69]++,cUe(r,o=>{ge().f[22]++,ge().s[70]++,this.setState({spec:LH(this.state.spec,"glyphs",o)})})}updateIcons(e){ge().f[23]++,ge().s[71]++,AUe(e,t=>{ge().f[24]++,ge().s[72]++,this.setState({spec:LH(this.state.spec,"sprite",t)})})}onChangeMetadataProperty=(ge().s[73]++,(e,t)=>{ge().f[25]++,ge().s[74]++,ge().b[25][0]++,e==="maputnik:renderer"&&(ge().b[25][1]++,t!==fue(this.state.mapStyle,["metadata","maputnik:renderer"],"mlgljs"))?(ge().b[24][0]++,ge().s[75]++,this.setState({mapState:"map"})):ge().b[24][1]++;const i=(ge().s[76]++,{...this.state.mapStyle,metadata:{...this.state.mapStyle.metadata,[e]:t}});ge().s[77]++,this.onStyleChanged(i)});onStyleChanged=(ge().s[78]++,(e,t=(ge().b[26][0]++,{}))=>{ge().f[26]++,ge().s[79]++,t={save:!0,addRevision:!0,initialLoad:!1,...t},ge().s[80]++,ge().b[28][0]++,e.glyphs&&(ge().b[28][1]++,typeof e.glyphs=="string")?(ge().b[27][0]++,ge().s[81]++,e.glyphs=F5(e.glyphs,e)):ge().b[27][1]++,ge().s[82]++,ge().b[30][0]++,e.sprite&&(ge().b[30][1]++,typeof e.sprite=="string")?(ge().b[29][0]++,ge().s[83]++,e.sprite=F5(e.sprite,e)):ge().b[29][1]++,ge().s[84]++;for(const[a,c]of Object.entries(e.sources))ge().s[85]++,ge().b[32][0]++,c&&(ge().b[32][1]++,"url"in c)&&(ge().b[32][2]++,typeof c.url=="string")?(ge().b[31][0]++,ge().s[86]++,c.url=F5(c.url,e)):ge().b[31][1]++;ge().s[87]++,t.initialLoad?(ge().b[33][0]++,ge().s[88]++,this.getInitialStateFromUrl(e)):ge().b[33][1]++;const i=(ge().s[89]++,ge().b[34][0]++,od(e)||(ge().b[34][1]++,[])),r=(ge().s[90]++,[]);if(ge().s[91]++,ge().b[36][0]++,e&&(ge().b[36][1]++,e.layers)){ge().b[35][0]++;const a=(ge().s[92]++,new window.Map);ge().s[93]++,e.layers.forEach((c,A)=>{if(ge().f[27]++,ge().s[94]++,ge().b[38][0]++,c.id===""&&(ge().b[38][1]++,a.has(c.id))){ge().b[37][0]++;const m=(ge().s[95]++,new Error(`layers[${A}]: duplicate layer id [empty_string], previously used`));ge().s[96]++,r.push(m)}else ge().b[37][1]++;ge().s[97]++,a.set(c.id,!0)})}else ge().b[35][1]++;const o=(ge().s[98]++,r.concat(i).map(a=>{ge().f[28]++;const c=(ge().s[99]++,a.message.match(/layers\[(\d+)\]: (duplicate layer id "?(.*)"?, previously used)/));if(ge().s[100]++,c){ge().b[39][0]++;const[,v,x]=(ge().s[101]++,c);return ge().s[102]++,{message:a.message,parsed:{type:"layer",data:{index:parseInt(v,10),key:"id",message:x}}}}else ge().b[39][1]++;const A=(ge().s[103]++,a.message.match(/layers\[(\d+)\]: (source "(?:.*)" not found)/));if(ge().s[104]++,A){ge().b[40][0]++;const[,v,x]=(ge().s[105]++,A);return ge().s[106]++,{message:a.message,parsed:{type:"layer",data:{index:parseInt(v,10),key:"source",message:x}}}}else ge().b[40][1]++;const m=(ge().s[107]++,a.message.match(/layers\[(\d+)\]\.(?:(\S+)\.)?(\S+): (.*)/));if(ge().s[108]++,m){ge().b[41][0]++;const[,v,x,_,O]=(ge().s[109]++,m),P=(ge().s[110]++,ge().b[43][0]++,x&&(ge().b[43][1]++,_)?(ge().b[42][0]++,[x,_].join(".")):(ge().b[42][1]++,_));return ge().s[111]++,{message:a.message,parsed:{type:"layer",data:{index:parseInt(v,10),key:P,message:O}}}}else return ge().b[41][1]++,ge().s[112]++,{message:a.message}}));let s=(ge().s[113]++,void 0);if(ge().s[114]++,i.length>0){ge().b[44][0]++,ge().s[115]++,s=oF(e),ge().s[116]++;for(const a of i){const{message:c}=(ge().s[117]++,a);if(ge().s[118]++,c){ge().b[45][0]++,ge().s[119]++;try{const A=(ge().s[120]++,c.split(":")[0]),m=(ge().s[121]++,A.match(/^\S+?\[\d+\]\.[^[]+/)[0]);ge().s[122]++,T4.unset(s,m)}catch(A){ge().s[123]++,console.warn(c+" "+A)}}else ge().b[45][1]++}}else ge().b[44][1]++;ge().s[124]++,e.glyphs!==this.state.mapStyle.glyphs?(ge().b[46][0]++,ge().s[125]++,this.updateFonts(e.glyphs)):ge().b[46][1]++,ge().s[126]++,e.sprite!==this.state.mapStyle.sprite?(ge().b[47][0]++,ge().s[127]++,this.updateIcons(e.sprite)):ge().b[47][1]++,ge().s[128]++,t.addRevision?(ge().b[48][0]++,ge().s[129]++,this.revisionStore.addRevision(e)):ge().b[48][1]++,ge().s[130]++,t.save?(ge().b[49][0]++,ge().s[131]++,this.saveStyle(e)):ge().b[49][1]++,ge().s[132]++,this.setState({mapStyle:e,dirtyMapStyle:s,errors:o},()=>{ge().f[29]++,ge().s[133]++,this.fetchSources(),ge().s[134]++,this.setStateInUrl()})});onUndo=(ge().s[135]++,()=>{ge().f[30]++;const e=(ge().s[136]++,this.revisionStore.undo()),t=(ge().s[137]++,hUe(this.state.mapStyle,e));ge().s[138]++,this.onStyleChanged(e,{addRevision:!1}),ge().s[139]++,this.setState({infos:t})});onRedo=(ge().s[140]++,()=>{ge().f[31]++;const e=(ge().s[141]++,this.revisionStore.redo()),t=(ge().s[142]++,dUe(this.state.mapStyle,e));ge().s[143]++,this.onStyleChanged(e,{addRevision:!1}),ge().s[144]++,this.setState({infos:t})});onMoveLayer=(ge().s[145]++,e=>{ge().f[32]++;let{oldIndex:t,newIndex:i}=(ge().s[146]++,e),r=(ge().s[147]++,this.state.mapStyle.layers);if(ge().s[148]++,t=aF(t,0,r.length-1),ge().s[149]++,i=aF(i,0,r.length-1),ge().s[150]++,t===i){ge().b[50][0]++,ge().s[151]++;return}else ge().b[50][1]++;ge().s[152]++,t===this.state.selectedLayerIndex?(ge().b[51][0]++,ge().s[153]++,this.setState({selectedLayerIndex:i})):ge().b[51][1]++,ge().s[154]++,r=r.slice(0),ge().s[155]++,gue(r,t,i),ge().s[156]++,this.onLayersChange(r)});onLayersChange=(ge().s[157]++,e=>{ge().f[33]++;const t=(ge().s[158]++,{...this.state.mapStyle,layers:e});ge().s[159]++,this.onStyleChanged(t)});onLayerDestroy=(ge().s[160]++,e=>{ge().f[34]++;const t=(ge().s[161]++,this.state.mapStyle.layers),i=(ge().s[162]++,t.slice(0));ge().s[163]++,i.splice(e,1),ge().s[164]++,this.onLayersChange(i)});onLayerCopy=(ge().s[165]++,e=>{ge().f[35]++;const t=(ge().s[166]++,this.state.mapStyle.layers),i=(ge().s[167]++,t.slice(0)),r=(ge().s[168]++,oF(i[e]));ge().s[169]++,r.id=r.id+"-copy",ge().s[170]++,i.splice(e,0,r),ge().s[171]++,this.onLayersChange(i)});onLayerVisibilityToggle=(ge().s[172]++,e=>{ge().f[36]++;const t=(ge().s[173]++,this.state.mapStyle.layers),i=(ge().s[174]++,t.slice(0)),r=(ge().s[175]++,{...i[e]}),o=(ge().s[176]++,"layout"in r?(ge().b[52][0]++,{...r.layout}):(ge().b[52][1]++,{}));ge().s[177]++,o.visibility=o.visibility==="none"?(ge().b[53][0]++,"visible"):(ge().b[53][1]++,"none"),ge().s[178]++,r.layout=o,ge().s[179]++,i[e]=r,ge().s[180]++,this.onLayersChange(i)});onLayerIdChange=(ge().s[181]++,(e,t,i)=>{ge().f[37]++;const r=(ge().s[182]++,this.state.mapStyle.layers.slice(0));ge().s[183]++,r[e]={...r[e],id:i},ge().s[184]++,this.onLayersChange(r)});onLayerChanged=(ge().s[185]++,(e,t)=>{ge().f[38]++;const i=(ge().s[186]++,this.state.mapStyle.layers.slice(0));ge().s[187]++,i[e]=t,ge().s[188]++,this.onLayersChange(i)});setMapState=(ge().s[189]++,e=>{ge().f[39]++,ge().s[190]++,this.setState({mapState:e},this.setStateInUrl)});setDefaultValues=(ge().s[191]++,e=>{ge().f[40]++;const t=(ge().s[192]++,ge().b[54][0]++,e.metadata||(ge().b[54][1]++,{}));if(ge().s[193]++,t["maputnik:renderer"]===void 0){ge().b[55][0]++;const i=(ge().s[194]++,{...e,metadata:{...e.metadata,"maputnik:renderer":"mlgljs"}});return ge().s[195]++,i}else return ge().b[55][1]++,ge().s[196]++,e});openStyle=(ge().s[197]++,(e,t)=>{ge().f[41]++,ge().s[198]++,this.setState({fileHandle:t}),ge().s[199]++,e=this.setDefaultValues(e),ge().s[200]++,this.onStyleChanged(e)});async fetchSources(){ge().f[42]++;const e=(ge().s[201]++,{});ge().s[202]++;for(const t of Object.keys(this.state.mapStyle.sources)){const i=(ge().s[203]++,this.state.mapStyle.sources[t]);if(ge().s[204]++,ge().b[57][0]++,i.type!=="vector"||(ge().b[57][1]++,!("url"in i)))ge().b[56][0]++,ge().s[205]++,e[t]=(ge().b[58][0]++,this.state.sources[t]||(ge().b[58][1]++,{...this.state.mapStyle.sources[t]})),ge().s[206]++,e[t].layers===void 0?(ge().b[59][0]++,ge().s[207]++,e[t].layers=[]):ge().b[59][1]++;else{ge().b[56][1]++,ge().s[208]++,e[t]={type:i.type,layers:[]};let r=(ge().s[209]++,i.url);ge().s[210]++;try{ge().s[211]++,r=F5(r,this.state.mapStyle)}catch(s){ge().s[212]++,console.warn("Failed to setFetchAccessToken: ",s)}ge().s[213]++;const o=s=>{if(ge().f[43]++,ge().s[214]++,Object.prototype.hasOwnProperty.call(s,"vector_layers"))ge().b[60][1]++;else{ge().b[60][0]++,ge().s[215]++;return}ge().s[216]++;for(const a of s.vector_layers)ge().s[217]++,e[t].layers.push(a.id)};ge().s[218]++;try{if(ge().s[219]++,r.startsWith("pmtiles://")){ge().b[61][0]++;const s=(ge().s[220]++,await new VT(r.substring(10)).getTileJson(""));ge().s[221]++,o(s)}else{ge().b[61][1]++;const s=(ge().s[222]++,await fetch(r,{mode:"cors"})),a=(ge().s[223]++,await s.json());ge().s[224]++,o(a)}}catch(s){ge().s[225]++,console.error(`Failed to process source for url: '${r}', ${s}`)}}}ge().s[226]++,BD(this.state.sources,e)?ge().b[62][1]++:(ge().b[62][0]++,ge().s[227]++,console.debug("Setting sources",e),ge().s[228]++,this.setState({sources:e}))}_getRenderer(){ge().f[44]++;const e=(ge().s[229]++,ge().b[63][0]++,this.state.mapStyle.metadata||(ge().b[63][1]++,{}));return ge().s[230]++,ge().b[64][0]++,e["maputnik:renderer"]||(ge().b[64][1]++,"mlgljs")}onMapChange=(ge().s[231]++,e=>{ge().f[45]++,ge().s[232]++,this.setState({mapView:e})});mapRenderer(){ge().f[46]++;const{mapStyle:e,dirtyMapStyle:t}=(ge().s[233]++,this.state),i=(ge().s[234]++,{mapStyle:(ge().b[65][0]++,t||(ge().b[65][1]++,e)),replaceAccessTokens:c=>(ge().f[47]++,ge().s[235]++,id.replaceAccessTokens(c,{allowFallback:!0})),onDataChange:c=>{ge().f[48]++,ge().s[236]++,this.layerWatcher.analyzeMap(c.map),ge().s[237]++,this.fetchSources()}}),r=(ge().s[238]++,this._getRenderer());let o;ge().s[239]++,r==="ol"?(ge().b[66][0]++,ge().s[240]++,o=ie.jsx(m_e,{...i,onChange:this.onMapChange,debugToolbox:this.state.openlayersDebugOptions.debugToolbox,onLayerSelect:c=>(ge().f[49]++,ge().s[241]++,this.onLayerSelect(+c))})):(ge().b[66][1]++,ge().s[242]++,o=ie.jsx(Dpe,{...i,onChange:this.onMapChange,options:this.state.maplibreGlDebugOptions,inspectModeEnabled:this.state.mapState==="inspect",highlightedLayer:this.state.mapStyle.layers[this.state.selectedLayerIndex],onLayerSelect:this.onLayerSelect}));let s;ge().s[243]++,this.state.mapState.match(/^filter-/)?(ge().b[67][0]++,ge().s[244]++,s=this.state.mapState.replace(/^filter-/,"")):ge().b[67][1]++;const a=(ge().s[245]++,{});return ge().s[246]++,s?(ge().b[68][0]++,ge().s[247]++,a.filter=`url('#${s}')`):ge().b[68][1]++,ge().s[248]++,ie.jsx("div",{style:a,className:"maputnik-map__container","data-wd-key":"maplibre:container",children:o})}setStateInUrl=(ge().s[249]++,()=>{ge().f[50]++;const{mapState:e,mapStyle:t,isOpen:i}=(ge().s[250]++,this.state),{selectedLayerIndex:r}=(ge().s[251]++,this.state),o=(ge().s[252]++,new URL(location.href)),s=(ge().s[253]++,fF(JSON.stringify(t)));ge().s[254]++,o.searchParams.set("layer",`${s}~${r}`);const a=(ge().s[255]++,Object.entries(i).map(([c,A])=>(ge().f[51]++,ge().s[256]++,A===!0?(ge().b[69][0]++,c):(ge().b[69][1]++,null))).filter(c=>(ge().f[52]++,ge().s[257]++,c!==null)));ge().s[258]++,a.length>0?(ge().b[70][0]++,ge().s[259]++,o.searchParams.set("modal",a.join(","))):(ge().b[70][1]++,ge().s[260]++,o.searchParams.delete("modal")),ge().s[261]++,e==="map"?(ge().b[71][0]++,ge().s[262]++,o.searchParams.delete("view")):(ge().b[71][1]++,ge().s[263]++,e==="inspect"?(ge().b[72][0]++,ge().s[264]++,o.searchParams.set("view","inspect")):ge().b[72][1]++),ge().s[265]++,history.replaceState({selectedLayerIndex:r},"Maputnik",o.href)});getInitialStateFromUrl=(ge().s[266]++,e=>{ge().f[53]++;const t=(ge().s[267]++,new URL(location.href)),i=(ge().s[268]++,t.searchParams.get("modal"));if(ge().s[269]++,ge().b[74][0]++,i&&(ge().b[74][1]++,i!=="")){ge().b[73][0]++;const s=(ge().s[270]++,i.split(",")),a=(ge().s[271]++,{});ge().s[272]++,s.forEach(c=>{ge().f[54]++,ge().s[273]++,a[c]=!0}),ge().s[274]++,this.setState({isOpen:{...this.state.isOpen,...a}})}else ge().b[73][1]++;const r=(ge().s[275]++,t.searchParams.get("view"));ge().s[276]++,ge().b[76][0]++,r&&(ge().b[76][1]++,r!=="")?(ge().b[75][0]++,ge().s[277]++,this.setMapState(r)):ge().b[75][1]++;const o=(ge().s[278]++,t.searchParams.get("layer"));if(ge().s[279]++,o){ge().b[77][0]++,ge().s[280]++;try{const s=(ge().s[281]++,o.split("~")),[a,c]=(ge().s[282]++,[s[0],parseInt(s[1],10)]);let A=(ge().s[283]++,!0);if(ge().s[284]++,a!=="-"){ge().b[78][0]++;const m=(ge().s[285]++,fF(JSON.stringify(e)));ge().s[286]++,m!==parseInt(a,10)?(ge().b[79][0]++,ge().s[287]++,A=!1):ge().b[79][1]++}else ge().b[78][1]++;ge().s[288]++,A?(ge().b[80][0]++,ge().s[289]++,this.setState({selectedLayerIndex:c,selectedLayerOriginalId:e.layers[c].id})):ge().b[80][1]++}catch(s){ge().s[290]++,console.warn(s)}}else ge().b[77][1]++});onLayerSelect=(ge().s[291]++,e=>{ge().f[55]++,ge().s[292]++,this.setState({selectedLayerIndex:e,selectedLayerOriginalId:this.state.mapStyle.layers[e].id},this.setStateInUrl)});setModal(e,t){ge().f[56]++,ge().s[293]++,this.setState({isOpen:{...this.state.isOpen,[e]:t}},this.setStateInUrl)}toggleModal(e){ge().f[57]++,ge().s[294]++,this.setModal(e,!this.state.isOpen[e])}onSetFileHandle=(ge().s[295]++,e=>{ge().f[58]++,ge().s[296]++,this.setState({fileHandle:e})});onChangeOpenlayersDebug=(ge().s[297]++,(e,t)=>{ge().f[59]++,ge().s[298]++,this.setState({openlayersDebugOptions:{...this.state.openlayersDebugOptions,[e]:t}})});onChangeMaplibreGlDebug=(ge().s[299]++,(e,t)=>{ge().f[60]++,ge().s[300]++,this.setState({maplibreGlDebugOptions:{...this.state.maplibreGlDebugOptions,[e]:t}})});render(){ge().f[61]++;const e=(ge().s[301]++,ge().b[81][0]++,this.state.mapStyle.layers||(ge().b[81][1]++,[])),t=(ge().s[302]++,e.length>0?(ge().b[82][0]++,e[this.state.selectedLayerIndex]):(ge().b[82][1]++,void 0)),i=(ge().s[303]++,ie.jsx(CDe,{renderer:this._getRenderer(),mapState:this.state.mapState,mapStyle:this.state.mapStyle,inspectModeEnabled:this.state.mapState==="inspect",sources:this.state.sources,onStyleChanged:this.onStyleChanged,onStyleOpen:this.onStyleChanged,onSetMapState:this.setMapState,onToggleModal:this.toggleModal.bind(this)})),r=(ge().s[304]++,ie.jsx(lSe,{onMoveLayer:this.onMoveLayer,onLayerDestroy:this.onLayerDestroy,onLayerCopy:this.onLayerCopy,onLayerVisibilityToggle:this.onLayerVisibilityToggle,onLayersChange:this.onLayersChange,onLayerSelect:this.onLayerSelect,selectedLayerIndex:this.state.selectedLayerIndex,layers:e,sources:this.state.sources,errors:this.state.errors})),o=(ge().s[305]++,t?(ge().b[83][0]++,ie.jsx(eDe,{layer:t,layerIndex:this.state.selectedLayerIndex,isFirstLayer:this.state.selectedLayerIndex<1,isLastLayer:this.state.selectedLayerIndex===this.state.mapStyle.layers.length-1,sources:this.state.sources,vectorLayers:this.state.vectorLayers,spec:this.state.spec,onMoveLayer:this.onMoveLayer,onLayerChanged:this.onLayerChanged,onLayerDestroy:this.onLayerDestroy,onLayerCopy:this.onLayerCopy,onLayerVisibilityToggle:this.onLayerVisibilityToggle,onLayerIdChange:this.onLayerIdChange,errors:this.state.errors},this.state.selectedLayerOriginalId)):(ge().b[83][1]++,void 0)),s=(ge().s[306]++,this.state.errors.length+this.state.infos.length>0?(ge().b[84][0]++,ie.jsx(SDe,{currentLayer:t,selectedLayerIndex:this.state.selectedLayerIndex,onLayerSelect:this.onLayerSelect,mapStyle:this.state.mapStyle,errors:this.state.errors,infos:this.state.infos})):(ge().b[84][1]++,void 0)),a=(ge().s[307]++,ie.jsxs("div",{children:[ie.jsx(MPe,{renderer:this._getRenderer(),maplibreGlDebugOptions:this.state.maplibreGlDebugOptions,openlayersDebugOptions:this.state.openlayersDebugOptions,onChangeMaplibreGlDebug:this.onChangeMaplibreGlDebug,onChangeOpenlayersDebug:this.onChangeOpenlayersDebug,isOpen:this.state.isOpen.debug,onOpenToggle:()=>(ge().f[62]++,ge().s[308]++,this.toggleModal("debug")),mapView:this.state.mapView}),ie.jsx(_Pe,{isOpen:this.state.isOpen.shortcuts,onOpenToggle:()=>(ge().f[63]++,ge().s[309]++,this.toggleModal("shortcuts"))}),ie.jsx(IDe,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,onChangeMetadataProperty:this.onChangeMetadataProperty,isOpen:this.state.isOpen.settings,onOpenToggle:()=>(ge().f[64]++,ge().s[310]++,this.toggleModal("settings"))}),ie.jsx(HDe,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,isOpen:this.state.isOpen.export,onOpenToggle:()=>(ge().f[65]++,ge().s[311]++,this.toggleModal("export")),fileHandle:this.state.fileHandle,onSetFileHandle:this.onSetFileHandle}),ie.jsx(bPe,{isOpen:this.state.isOpen.open,onStyleOpen:this.openStyle,onOpenToggle:()=>(ge().f[66]++,ge().s[312]++,this.toggleModal("open")),fileHandle:this.state.fileHandle}),ie.jsx(pPe,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,isOpen:this.state.isOpen.sources,onOpenToggle:()=>(ge().f[67]++,ge().s[313]++,this.toggleModal("sources"))}),ie.jsx(SPe,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,isOpen:this.state.isOpen.globalState,onOpenToggle:()=>(ge().f[68]++,ge().s[314]++,this.toggleModal("globalState"))})]}));return ge().s[315]++,ie.jsx(MDe,{toolbar:i,layerList:r,layerEditor:o,map:this.mapRenderer(),bottom:s,modals:a})}}const PUe=jH.createRoot(document.querySelector("#app"));PUe.render(ie.jsx(H_.Provider,{value:{className:"react-icons"},children:ie.jsx(DUe,{})}));document.querySelector(".loading").style.display="none";
//# sourceMappingURL=index-BwCCyr0-.js.map