PageSourceSearch

https://www.flightaware.com/_next/static/chunks/9975e6ee-9744468091dd6644.js

js flightaware.com collected 2026-09-24 08:27:58 UTC 1,725,521 bytes, 273 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3570],{56801:(e,t,i)=>{i.d(t,{Gj:()=>uR,WN:()=>nN,ZC:()=>nF,sb:()=>rP,sw:()=>dk});var r=i(7620),a=i(93864),n=i(76933),o=i(65821),l=i(97509),s=i(63570),c=i(5832),u=i(40459);let h=r.createContext(null);function p(){let e=(0,r.useContext)(h)?.maps,t=(0,r.useContext)(E);return(0,r.useMemo)(()=>({...e,current:t?.map}),[e,t])}function d(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!d(e[i],t[i]))return!1;return!0}if(Array.isArray(t))return!1;if("object"==typeof e&&"object"==typeof t){let i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(let r of i)if(!t.hasOwnProperty(r)||!d(e[r],t[r]))return!1;return!0}return!1}function f(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function m(e,t){let i=t.viewState||t,r={};return"longitude"in i&&"latitude"in i&&(i.longitude!==e.center.lng||i.latitude!==e.center.lat)&&(r.center=new e.center.constructor(i.longitude,i.latitude)),"zoom"in i&&i.zoom!==e.zoom&&(r.zoom=i.zoom),"bearing"in i&&i.bearing!==e.bearing&&(r.bearing=i.bearing),"pitch"in i&&i.pitch!==e.pitch&&(r.pitch=i.pitch),i.padding&&e.padding&&!d(i.padding,e.padding)&&(r.padding=i.padding),r}let g=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function y(e){if(!e)return null;if("string"==typeof e||("toJS"in e&&(e=e.toJS()),!e.layers))return e;let t={};for(let i of e.layers)t[i.id]=i;let i=e.layers.map(e=>{let i=null;"interactive"in e&&(i=Object.assign({},e),delete i.interactive);let r=t[e.ref];if(r)for(let t of(i=i||Object.assign({},e),delete i.ref,g))t in r&&(i[t]=r[t]);return i||e});return{...e,layers:i}}let _={version:8,sources:{},layers:[]},b={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},x={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},v={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},w=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],z=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class S{constructor(e,t,i){this._map=null,this._internalUpdate=!1,this._hoveredFeatures=null,this._propsedCameraUpdate=null,this._styleComponents={},this._onEvent=e=>{let t=this.props[v[e.type]];t?t(e):"error"===e.type&&console.error(e.error)},this._onCameraEvent=e=>{if(this._internalUpdate)return;e.viewState=this._propsedCameraUpdate||f(this._map.transform);let t=this.props[x[e.type]];t&&t(e)},this._onCameraUpdate=e=>this._internalUpdate?e:(this._propsedCameraUpdate=f(e),m(e,this.props)),this._onPointerEvent=e=>{"mousemove"!==e.type&&"mouseout"!==e.type||this._updateHover(e);let t=this.props[b[e.type]];t&&(this.props.interactiveLayerIds&&"mouseover"!==e.type&&"mouseout"!==e.type&&(e.features=this._hoveredFeatures||this._queryRenderedFeatures(e.point)),t(e),delete e.features)},this._MapClass=e,this.props=t,this._initialize(i)}get map(){return this._map}setProps(e){let t=this.props;this.props=e;let i=this._updateSettings(e,t),r=this._updateSize(e),a=this._updateViewState(e);this._updateStyle(e,t),this._updateStyleComponents(e),this._updateHandlers(e,t),(i||r||a&&!this._map.isMoving())&&this.redraw()}static reuse(e,t){let i=S.savedMaps.pop();if(!i)return null;let r=i.map,a=r.getContainer();for(t.className=a.className;a.childNodes.length>0;)t.appendChild(a.childNodes[0]);r._container=t;let n=r._resizeObserver;n&&(n.disconnect(),n.observe(t)),i.setProps({...e,styleDiffing:!1}),r.resize();let{initialViewState:o}=e;return o&&(o.bounds?r.fitBounds(o.bounds,{...o.fitBoundsOptions,duration:0}):i._updateViewState(o)),r.isStyleLoaded()?r.fire("load"):r.once("style.load",()=>r.fire("load")),r._update(),i}_initialize(e){let{props:t}=this,{mapStyle:i=_}=t,r={...t,...t.initialViewState,container:e,style:y(i)},a=r.initialViewState||r.viewState||r;if(Object.assign(r,{center:[a.longitude||0,a.latitude||0],zoom:a.zoom||0,pitch:a.pitch||0,bearing:a.bearing||0}),t.gl){let e=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=e,t.gl)}let n=new this._MapClass(r);for(let e in a.padding&&n.setPadding(a.padding),t.cursor&&(n.getCanvas().style.cursor=t.cursor),n.transformCameraUpdate=this._onCameraUpdate,n.on("style.load",()=>{this._styleComponents={light:n.getLight(),sky:n.getSky(),projection:n.getProjection?.(),terrain:n.getTerrain()},this._updateStyleComponents(this.props)}),n.on("sourcedata",()=>{this._updateStyleComponents(this.props)}),b)n.on(e,this._onPointerEvent);for(let e in x)n.on(e,this._onCameraEvent);for(let e in v)n.on(e,this._onEvent);this._map=n}recycle(){let e=this.map.getContainer().querySelector("[mapboxgl-children]");e?.remove(),S.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){let e=this._map;e.style&&(e._frame&&(e._frame.cancel(),e._frame=null),e._render())}_updateSize(e){let{viewState:t}=e;if(t){let e=this._map;if(t.width!==e.transform.width||t.height!==e.transform.height)return e.resize(),!0}return!1}_updateViewState(e){let t=this._map,i=t.transform;if(!t.isMoving()){let r=m(i,e);if(Object.keys(r).length>0)return this._internalUpdate=!0,t.jumpTo(r),this._internalUpdate=!1,!0}return!1}_updateSettings(e,t){let i=this._map,r=!1;for(let a of w)if(a in e&&!d(e[a],t[a])){r=!0;let t=i[`set${a[0].toUpperCase()}${a.slice(1)}`];t?.call(i,e[a])}return r}_updateStyle(e,t){if(e.cursor!==t.cursor&&(this._map.getCanvas().style.cursor=e.cursor||""),e.mapStyle!==t.mapStyle){let{mapStyle:t=_,styleDiffing:i=!0}=e,r={diff:i};"localIdeographFontFamily"in e&&(r.localIdeographFontFamily=e.localIdeographFontFamily),this._map.setStyle(y(t),r)}}_updateStyleComponents({light:e,projection:t,sky:i,terrain:r}){let a=this._map,n=this._styleComponents;a.style._loaded&&(e&&!d(e,n.light)&&(n.light=e,a.setLight(e)),t&&!d(t,n.projection)&&t!==n.projection?.type&&(n.projection="string"==typeof t?{type:t}:t,a.setProjection?.(n.projection)),i&&!d(i,n.sky)&&(n.sky=i,a.setSky(i)),void 0===r||d(r,n.terrain)||r&&!a.getSource(r.source)||(n.terrain=r,a.setTerrain(r)))}_updateHandlers(e,t){let i=this._map;for(let r of z){let a=e[r]??!0;d(a,t[r]??!0)||(a?i[r].enable(a):i[r].disable())}}_queryRenderedFeatures(e){let t=this._map,{interactiveLayerIds:i=[]}=this.props;try{return t.queryRenderedFeatures(e,{layers:i.filter(t.getLayer.bind(t))})}catch{return[]}}_updateHover(e){let{props:t}=this;if(t.interactiveLayerIds&&(t.onMouseMove||t.onMouseEnter||t.onMouseLeave)){let t=e.type,i=this._hoveredFeatures?.length>0,r=this._queryRenderedFeatures(e.point),a=r.length>0;!a&&i&&(e.type="mouseleave",this._onPointerEvent(e)),this._hoveredFeatures=r,a&&!i&&(e.type="mouseenter",this._onPointerEvent(e)),e.type=t}else this._hoveredFeatures=null}}S.savedMaps=[];
1let T=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"],k="undefined"!=typeof document?r.useLayoutEffect:r.useEffect,E=r.createContext(null),M=r.forwardRef(function(e,t){let i=(0,r.useContext)(h),[a,n]=(0,r.useState)(null),o=(0,r.useRef)(),{current:l}=(0,r.useRef)({mapLib:null,map:null});(0,r.useEffect)(()=>{let t=e.mapLib,r,a=!0;return Promise.resolve(t||Promise.resolve().then(function(){return tE})).then(t=>{if(!a)return;if(!t)throw Error("Invalid mapLib");let s="Map"in t?t:t.default;if(!s.Map)throw Error("Invalid mapLib");!function(e,t){let{RTLTextPlugin:i,maxParallelImageRequests:r,workerCount:a,workerUrl:n}=t;if(i&&e.getRTLTextPluginStatus&&"unavailable"===e.getRTLTextPluginStatus()){let{pluginUrl:t,lazy:r=!0}="string"==typeof i?{pluginUrl:i}:i;e.setRTLTextPlugin(t,e=>{e&&console.error(e)},r)}void 0!==r&&e.setMaxParallelImageRequests(r),void 0!==a&&e.setWorkerCount(a),void 0!==n&&e.setWorkerUrl(n)}(s,e),e.reuseMaps&&(r=S.reuse(e,o.current)),r||(r=new S(s.Map,e,o.current)),l.map=function(e){if(!e)return null;let t=e.map,i={getMap:()=>t};for(let e of function(e){let t=new Set,i=e;for(;i;){for(let r of Object.getOwnPropertyNames(i))"_"!==r[0]&&"function"==typeof e[r]&&"fire"!==r&&"setEventedParent"!==r&&t.add(r);i=Object.getPrototypeOf(i)}return Array.from(t)}(t))e in i||T.includes(e)||(i[e]=t[e].bind(t));return i}(r),l.mapLib=s,n(r),i?.onMapMount(l.map,e.id)}).catch(t=>{let{onError:i}=e;i?i({type:"error",target:null,originalEvent:null,error:t}):console.error(t)}),()=>{a=!1,r&&(i?.onMapUnmount(e.id),e.reuseMaps?r.recycle():r.destroy())}},[]),k(()=>{a&&a.setProps(e)}),(0,r.useImperativeHandle)(t,()=>l.map,[a]);let s=(0,r.useMemo)(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return r.createElement("div",{id:e.id,ref:o,style:s},a&&r.createElement(E.Provider,{value:l},r.createElement("div",{"mapboxgl-children":"",style:{height:"100%"}},e.children)))}),P=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function I(e,t){if(!e||!t)return;let i=e.style;for(let e in t){let r=t[e];Number.isFinite(r)&&!P.test(e)?i[e]=`${r}px`:i[e]=r}}function A(e,t){if(e===t)return null;let i=C(e),r=C(t),a=[];for(let e of r)i.has(e)||a.push(e);for(let e of i)r.has(e)||a.push(e);return 0===a.length?null:a}function C(e){return new Set(e?e.trim().split(/\s+/):[])}(0,r.memo)((0,r.forwardRef)((e,t)=>{let{map:i,mapLib:a}=(0,r.useContext)(E),n=(0,r.useRef)({props:e}),o=(0,r.useMemo)(()=>{let t=!1;r.Children.forEach(e.children,e=>{e&&(t=!0)});let i={...e,element:t?document.createElement("div"):void 0},l=new a.Marker(i);return l.setLngLat([e.longitude,e.latitude]),l.getElement().addEventListener("click",e=>{n.current.props.onClick?.({type:"click",target:l,originalEvent:e})}),l.on("dragstart",e=>{e.lngLat=o.getLngLat(),n.current.props.onDragStart?.(e)}),l.on("drag",e=>{e.lngLat=o.getLngLat(),n.current.props.onDrag?.(e)}),l.on("dragend",e=>{e.lngLat=o.getLngLat(),n.current.props.onDragEnd?.(e)}),l},[]);(0,r.useEffect)(()=>(o.addTo(i.getMap()),()=>{o.remove()}),[]);let{longitude:s,latitude:c,offset:u,style:h,draggable:p=!1,popup:d=null,rotation:f=0,rotationAlignment:m="auto",pitchAlignment:g="auto"}=e;(0,r.useEffect)(()=>{I(o.getElement(),h)},[h]),(0,r.useImperativeHandle)(t,()=>o,[]);let y=n.current.props;o.getLngLat().lng===s&&o.getLngLat().lat===c||o.setLngLat([s,c]),u&&!function(e,t){let i=Array.isArray(e)?e[0]:e?e.x:0,r=Array.isArray(e)?e[1]:e?e.y:0,a=Array.isArray(t)?t[0]:t?t.x:0,n=Array.isArray(t)?t[1]:t?t.y:0;return i===a&&r===n}(o.getOffset(),u)&&o.setOffset(u),o.isDraggable()!==p&&o.setDraggable(p),o.getRotation()!==f&&o.setRotation(f),o.getRotationAlignment()!==m&&o.setRotationAlignment(m),o.getPitchAlignment()!==g&&o.setPitchAlignment(g),o.getPopup()!==d&&o.setPopup(d);let _=A(y.className,e.className);if(_)for(let e of _)o.toggleClassName(e);return n.current.props=e,(0,l.createPortal)(e.children,o.getElement())}
1));let R=(0,r.memo)((0,r.forwardRef)((e,t)=>{let{map:i,mapLib:a}=(0,r.useContext)(E),n=(0,r.useMemo)(()=>document.createElement("div"),[]),o=(0,r.useRef)({props:e}),s=(0,r.useMemo)(()=>{let t={...e},i=new a.Popup(t);return i.setLngLat([e.longitude,e.latitude]),i.once("open",e=>{o.current.props.onOpen?.(e)}),i},[]);if((0,r.useEffect)(()=>{let e=e=>{o.current.props.onClose?.(e)};return s.on("close",e),s.setDOMContent(n).addTo(i.getMap()),()=>{s.off("close",e),s.isOpen()&&s.remove()}},[]),(0,r.useEffect)(()=>{I(s.getElement(),e.style)},[e.style]),(0,r.useImperativeHandle)(t,()=>s,[]),s.isOpen()){let t=o.current.props;s.getLngLat().lng===e.longitude&&s.getLngLat().lat===e.latitude||s.setLngLat([e.longitude,e.latitude]),e.offset&&!d(t.offset,e.offset)&&s.setOffset(e.offset),t.anchor===e.anchor&&t.maxWidth===e.maxWidth||(s.options.anchor=e.anchor,s.setMaxWidth(e.maxWidth));let i=A(t.className,e.className);if(i)for(let e of i)s.toggleClassName(e);o.current.props=e}return(0,l.createPortal)(e.children,n)}));function L(e,t,i,a){let n=(0,r.useContext)(E),o=(0,r.useMemo)(()=>e(n),[]);return(0,r.useEffect)(()=>{let e="function"==typeof t?t:null,{map:i}=n;return i.hasControl(o)||i.addControl(o,t?.position),()=>{e&&e(n),i.hasControl(o)&&i.removeControl(o)}},[]),o}function D(e,t){if(!e)throw Error(t)}(0,r.memo)(function(e){let t=L(({mapLib:t})=>new t.AttributionControl(e),{position:e.position});return(0,r.useEffect)(()=>{I(t._container,e.style)},[e.style]),null}),(0,r.memo)(function(e){let t=L(({mapLib:t})=>new t.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return(0,r.useEffect)(()=>{I(t._controlContainer,e.style)},[e.style]),null}),(0,r.memo)((0,r.forwardRef)(function(e,t){let i=(0,r.useRef)({props:e}),a=L(({mapLib:t})=>{let r=new t.GeolocateControl(e),a=r._setupUI;return r._setupUI=()=>{r._container.hasChildNodes()||a()},r.on("geolocate",e=>{i.current.props.onGeolocate?.(e)}),r.on("error",e=>{i.current.props.onError?.(e)}),r.on("outofmaxbounds",e=>{i.current.props.onOutOfMaxBounds?.(e)}),r.on("trackuserlocationstart",e=>{i.current.props.onTrackUserLocationStart?.(e)}),r.on("trackuserlocationend",e=>{i.current.props.onTrackUserLocationEnd?.(e)}),r},{position:e.position});return i.current.props=e,(0,r.useImperativeHandle)(t,()=>a,[]),(0,r.useEffect)(()=>{I(a._container,e.style)},[e.style]),null})),(0,r.memo)(function(e){let t=L(({mapLib:t})=>new t.NavigationControl(e),{position:e.position});return(0,r.useEffect)(()=>{I(t._container,e.style)},[e.style]),null}),(0,r.memo)(function(e){let t=L(({mapLib:t})=>new t.ScaleControl(e),{position:e.position}),i=(0,r.useRef)(e),a=i.current;i.current=e;let{style:n}=e;return void 0!==e.maxWidth&&e.maxWidth!==a.maxWidth&&(t.options.maxWidth=e.maxWidth),void 0!==e.unit&&e.unit!==a.unit&&t.setUnit(e.unit),(0,r.useEffect)(()=>{I(t._container,n)},[n]),null}),(0,r.memo)(function(e){let t=L(({mapLib:t})=>new t.TerrainControl(e),{position:e.position});return(0,r.useEffect)(()=>{I(t._container,e.style)},[e.style]),null}),(0,r.memo)(function(e){let t=L(({mapLib:t})=>new t.LogoControl(e),{position:e.position});return(0,r.useEffect)(()=>{I(t._container,e.style)},[e.style]),null});let O=0;function F(e){let t=(0,r.useContext)(E).map.getMap(),i=(0,r.useRef)(e),[,a]=(0,r.useState)(0),n=(0,r.useMemo)(()=>e.id||"jsx-source-"+O++,[]);(0,r.useEffect)(()=>{if(t){let e=()=>setTimeout(()=>a(e=>e+1),0);return t.on("styledata",e),e(),()=>{if(t.off("styledata",e),t.style&&t.style._loaded&&t.getSource(n)){let e=t.getStyle()?.layers;if(e)for(let i of e)i.source===n&&t.removeLayer(i.id);t.removeSource(n)}}}},[t]);let o=t&&t.style&&t.getSource(n);return o?function(e,t,i){D(t.id===i.id,"source id changed"),D(t.type===i.type,"source type changed");let r="",a=0;for(let e in t)"children"===e||"id"===e||d(i[e],t[e])||(r=e,a++);if(!a)return;let n=t.type;if("geojson"===n)e.setData(t.data);else if("image"===n)e.updateImage({url:t.url,coordinates:t.coordinates});else switch(r){case"coordinates":e.setCoordinates?.(t.coordinates);break;case"url":e.setUrl?.(t.url);break;case"tiles":e.setTiles?.(t.tiles);break;default:console.warn(`Unable to update <Source> prop: ${r}`)}}(o,e,i.current):o=function(e,t,i){if(e.style&&e.style._loaded){let r={...i};return delete r.id,delete r.children,e.addSource(t,r),e.getSource(t)}return null}(t,n,e),i.current=e,o&&r.Children.map(e.children,e=>e&&(0,r.cloneElement)(e,{source:n}))||null}let j=0;function B(e){let t=(0,r.useContext)(E).map.getMap(),i=(0,r.useRef)(e),[,a]=(0,r.useState)(0),n=(0,r.useMemo)(()=>e.id||"jsx-layer-"+j++,[]);if((0,r.useEffect)(()=>
1{if(t){let e=()=>a(e=>e+1);return t.on("styledata",e),e(),()=>{t.off("styledata",e),t.style&&t.style._loaded&&t.getLayer(n)&&t.removeLayer(n)}}},[t]),t&&t.style&&t.getLayer(n))try{!function(e,t,i,r){if(D(i.id===r.id,"layer id changed"),D(i.type===r.type,"layer type changed"),"custom"===i.type||"custom"===r.type)return;let{layout:a={},paint:n={},filter:o,minzoom:l,maxzoom:s,beforeId:c}=i;if(c!==r.beforeId&&e.moveLayer(t,c),a!==r.layout){let i=r.layout||{};for(let r in a)d(a[r],i[r])||e.setLayoutProperty(t,r,a[r]);for(let r in i)a.hasOwnProperty(r)||e.setLayoutProperty(t,r,void 0)}if(n!==r.paint){let i=r.paint||{};for(let r in n)d(n[r],i[r])||e.setPaintProperty(t,r,n[r]);for(let r in i)n.hasOwnProperty(r)||e.setPaintProperty(t,r,void 0)}d(o,r.filter)||e.setFilter(t,o),l===r.minzoom&&s===r.maxzoom||e.setLayerZoomRange(t,l,s)}(t,n,e,i.current)}catch(e){console.warn(e)}else if(t.style&&t.style._loaded&&(!("source"in e)||t.getSource(e.source))){let i={...e,id:n};delete i.beforeId,t.addLayer(i,e.beforeId)}return i.current=e,null}var N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function U(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var V,$,Z,G,q,H,W,X,Y,K,J,Q,ee,et,ei,er,ea,en,eo,el,es,ec,eu,eh,ep,ed,ef,em,eg,ey,e_,eb,ex,ev,ew,ez,eS,eT,ek,eE,eM,eP,eI,eA,eC,eR,eL,eD,eO,eF,ej,eB,eN,eU,eV,e$,eZ,eG,eq,eH,eW,eX,eY,eK,eJ,eQ,e1,e0,e2,e3,e5,e6,e4,e8,e7,e9,te,tt,ti,tr,ta,tn,to,tl,ts,tc,tu,th,tp,td,tf,tm,tg,ty,t_,tb,tx,tv,tw,tz,tS,tT={exports:{}},tk=(V||(V=1,tT.exports=function(){var e={},t={};function i(i,r,a){if(t[i]=a,"index"===i){var n="var sharedModule = {}; ("+t.shared+")(sharedModule); ("+t.worker+")(sharedModule);",o={};return t.shared(o),t.index(e,o),"undefined"!=typeof window&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([n],{type:"text/javascript"}))),e}}return i("shared",["exports"],function(e){let t,i,r,a,n,o,l,s,c,u,h,p,d,f,m,g,y,_,b;function x(e,t,i,r){return new(i||(i=Promise))(function(a,n){function o(e){try{s(r.next(e))}catch(e){n(e)}}function l(e){try{s(r.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?a(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,l)}s((r=r.apply(e,t||[])).next())})}function v(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function w(){if(k)return T;function e(e,t){this.x=e,this.y=t}return k=1,T=e,e.prototype={clone:function(){return new e(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,i=e.y-this.y;return t*t+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),i=Math.sin(e),r=i*this.x+t*this.y;return this.x=t*this.x-i*this.y,this.y=r,this}
1,_rotateAround:function(e,t){var i=Math.cos(e),r=Math.sin(e),a=t.y+r*(this.x-t.x)+i*(this.y-t.y);return this.x=t.x+i*(this.x-t.x)-r*(this.y-t.y),this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},e.convert=function(t){return t instanceof e?t:Array.isArray(t)?new e(t[0],t[1]):t},T}"function"==typeof SuppressedError&&SuppressedError;var z,S,T,k,E,M,P=v(w()),I=v(function(){if(M)return E;function e(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 M=1,E=e,e.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(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var i=e,r=0;r<8;r++){var a=this.sampleCurveX(i)-e;if(Math.abs(a)<t)return i;var n=this.sampleCurveDerivativeX(i);if(1e-6>Math.abs(n))break;i-=a/n}var o=0,l=1;for(i=e,r=0;r<20&&!(Math.abs((a=this.sampleCurveX(i))-e)<t);r++)e>a?o=i:l=i,i=.5*(l-o)+o;return i},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},E}());function A(){return null==t&&(t="undefined"!=typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),t}function C(){if(null==i&&(i=!1,A())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let i=4*t;e.fillStyle=`rgb(${i},${i+1},${i+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){i=!0;break}}}return i||!1}var R="undefined"!=typeof Float32Array?Float32Array:Array;function L(){var e=new R(9);return R!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function D(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function O(){var e=new R(3);return R!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function F(e){return Math.hypot(e[0],e[1],e[2])}function j(e,t,i){var r=new R(3);return r[0]=e,r[1]=t,r[2]=i,r}function B(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e}function N(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function U(e,t,i){var r=t[0],a=t[1],n=t[2],o=i[0],l=i[1],s=i[2];return e[0]=a*s-n*l,e[1]=n*o-r*s,e[2]=r*l-a*o,e}function V(e,t,i){var r=t[0],a=t[1],n=t[2],o=t[3];return e[0]=i[0]*r+i[4]*a+i[8]*n+i[12]*o,e[1]=i[1]*r+i[5]*a+i[9]*n+i[13]*o,e[2]=i[2]*r+i[6]*a+i[10]*n+i[14]*o,e[3]=i[3]*r+i[7]*a+i[11]*n+i[15]*o,e}function $(){var e=new R(4);return R!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Z(e,t,i,r){var a=.5*Math.PI/180;t*=a,i*=a,r*=a;var n=Math.sin(t),o=Math.cos(t),l=Math.sin(i),s=Math.cos(i),c=Math.sin(r),u=Math.cos(r);return e[0]=n*s*u-o*l*c,e[1]=o*l*u+n*s*c,e[2]=o*s*c-n*l*u,e[3]=o*s*u+n*l*c,e}function G(){var e=new R(2);return R!=Float32Array&&(e[0]=0,e[1]=0),e}function q(e,t){var i=new R(2);return i[0]=e,i[1]=t,i}function H(e,t,i){return t*(8192/(e.tileSize*Math.pow(2,i-e.tileID.overscaledZ)))}function W(e,t){return(e%t+t)%t}function X(e,t,i){return e*(1-i)+t*i}function Y(e){if(e<=0)return 0;if(e>=1)return 1;let t=e*e,i=t*e;return 4*(e<.5?i:3*(e-t)+i-.75)}function K(e,t,i,r){let a=new I(e,t,i,r);return e=>a.solve(e)}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),O(),t4=new R(4),R!=Float32Array&&(t4[0]=0,t4[1]=0,t4[2]=0,t4[3]=0),O(),j(1,0,0),j(0,1,0),$(),$(),L(),G();let J=K(.25,.1,.25,1);function Q(e,t,i){return Math.min(i,Math.max(t,e))}function ee(e,t,i){let r=i-t,a=((e-t)%r+r)%r+t;return a===t?i:a}function et(e,...t){for(let i of t)for(let t in i)e[t]=i[t];return e}let ei=1;function er(e,t,i){let r={};for(let i in e)r[i]=t.call(this,e[i],i,e);return r}function ea(e,t,i){let r={};for(let i in e)t.call(this,e[i],i,e)&&(r[i]=e[i]);return r}function en(e){return Array.isArray(e)?e.map(en):"object"==typeof e&&e?er(e,en):e}let eo={};function el(e){eo[e]||("undefined"!=typeof console&&console.warn(e),eo[e]=!0)}function es(e,t,i){return(i.y-e.y)*(t.x-e.x)>(t.y-e.y)*(i.x-e.x)}function ec(e){return"undefined"!=typeof WorkerGlobalScope&&void 0!==e&&e instanceof WorkerGlobalScope}let eu=null;function eh(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap}let ep="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ed(e,t,i,r,a){return x(this,void 0,void 0,function*(){if("undefined"==typeof VideoFrame)throw Error("VideoFrame not supported");let n=new VideoFrame(e,{timestamp:0});try{let o=null==n?void 0:n.format;if(!o||!o.startsWith("BGR")&&!o.startsWith("RGB"))throw Error(`Unrecognized format ${o}`);let l=o.startsWith("BGR"),s=new Uint8ClampedArray(r*a*4);if(yield n.copyTo(s,function(e,t,i,r,a){let n=4*Math.max(-t,0),o=(Math.max(0,i)-i)*r*4+n,l=Math.max(0,t),s=Math.max(0,i);return{rect:{x:l,y:s,width:Math.min(e.width,t+r)-l,height:Math.min(e.height,i+a)-s},layout:[{offset:o,stride:4*r}]}}(e,t,i,r,a)),l)for(let e=0;e<s.length;e+=4){let t=s[e];s[e]=s[e+2],s[e+2]=t}return s}finally{n.close()}})}function ef(e,t,i,r){return e.addEventListener(t,i,r),{unsubscribe:()=>{e.removeEventListener(t,i,r)}}}function em(e){return e*Math.PI/180}function eg(e){return e/Math.PI*180}let ey={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0}
1,e_={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},eb="AbortError";function ex(){return Error(eb)}let ev={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function ew(e){return ev.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))]}let ez="global-dispatcher";class eS extends Error{constructor(e,t,i,r){super(`AJAXError: ${t} (${e}): ${i}`),this.status=e,this.statusText=t,this.url=i,this.body=r}}let eT=()=>ec(self)?self.worker&&self.worker.referrer:("blob:"===window.location.protocol?window.parent:window).location.href,ek=function(e,t){var i;if(/:\/\//.test(e.url)&&!/^https?:|^file:/.test(e.url)){let i=ew(e.url);if(i)return i(e,t);if(ec(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:ez},t)}if(!(/^file:/.test(i=e.url)||/^file:/.test(eT())&&!/^\w+:/.test(i))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(e,t){return x(this,void 0,void 0,function*(){let i,r,a=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:eT(),signal:t.signal});"json"!==e.type||a.headers.has("Accept")||a.headers.set("Accept","application/json");try{i=yield fetch(a)}catch(t){throw new eS(0,t.message,e.url,new Blob)}if(!i.ok){let t=yield i.blob();throw new eS(i.status,i.statusText,e.url,t)}r="arrayBuffer"===e.type||"image"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text();let n=yield r;if(t.signal.aborted)throw ex();return{data:n,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires")}})}(e,t);if(ec(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:ez},t)}return new Promise((i,r)=>{var a;let n=new XMLHttpRequest;for(let t in n.open(e.method||"GET",e.url,!0),"arrayBuffer"!==e.type&&"image"!==e.type||(n.responseType="arraybuffer"),e.headers)n.setRequestHeader(t,e.headers[t]);"json"===e.type&&(n.responseType="text",(null==(a=e.headers)?void 0:a.Accept)||n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===e.credentials,n.onerror=()=>{r(Error(n.statusText))},n.onload=()=>{if(!t.signal.aborted)if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){let t=n.response;if("json"===e.type)try{t=JSON.parse(n.response)}catch(e){return void r(e)}i({data:t,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires")})}else{let t=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});r(new eS(n.status,n.statusText,e.url,t))}},t.signal.addEventListener("abort",()=>{n.abort(),r(ex())}),n.send(e.body)})};function eE(e){if(!e||0>=e.indexOf("://")||0===e.indexOf("data:image/")||0===e.indexOf("blob:"))return!0;let t=new URL(e),i=window.location;return t.protocol===i.protocol&&t.host===i.host}function eM(e,t,i){i[e]&&-1!==i[e].indexOf(t)||(i[e]=i[e]||[],i[e].push(t))}function eP(e,t,i){if(i&&i[e]){let r=i[e].indexOf(t);-1!==r&&i[e].splice(r,1)}}class eI{constructor(e,t={}){et(this,t),this.type=e}}class eA extends eI{constructor(e,t={}){super("error",et({error:e},t))}}class eC{on(e,t){return this._listeners=this._listeners||{},eM(e,t,this._listeners),{unsubscribe:()=>{this.off(e,t)}}}off(e,t){return eP(e,t,this._listeners),eP(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners=this._oneTimeListeners||{},eM(e,t,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,t){"string"==typeof e&&(e=new eI(e,t||{}));let i=e.type;if(this.listens(i)){for(let t of(e.target=this,this._listeners&&this._listeners[i]?this._listeners[i].slice():[]))t.call(this,e);for(let t of this._oneTimeListeners&&this._oneTimeListeners[i]?this._oneTimeListeners[i].slice():[])eP(i,t,this._oneTimeListeners),t.call(this,e);let t=this._eventedParent;t&&(et(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),t.fire(e))}else e instanceof eA&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var eR={$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"}
vendor: 17,180 bytes, line 1
1,bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"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
vendor: 12,079 bytes, line 1
1","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number
1Array",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"}}};let eL=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function eD(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!eD(e[i],t[i]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e)if(!eD(e[i],t[i]))return!1;return!0}return e===t}function eO(e,t){e.push(t)}function eF(e,t,i){eO(i,{command:"addSource",args:[e,t[e]]})}function ej(e,t,i){eO(t,{command:"removeSource",args:[e]}),i[e]=!0}function eB(e,t,i,r,a,n){for(let o in t=t||{},e=e||{})Object.prototype.hasOwnProperty.call(e,o)&&(eD(e[o],t[o])||i.push({command:n,args:[r,o,t[o],a]}));for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!Object.prototype.hasOwnProperty.call(e,o)&&(eD(e[o],t[o])||i.push({command:n,args:[r,o,t[o],a]}))}function eN(e){return e.id}function eU(e,t){return e[t.id]=t,e}class eV{constructor(e,t,i,r){this.message=(e?`${e}: `:"")+i,r&&(this.identifier=r),null!=t&&t.__line__&&(this.line=t.__line__)}}function e$(e,...t){for(let i of t)for(let t in i)e[t]=i[t];return e}class eZ extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}class eG{constructor(e,t=[]){for(let[i,r]of(this.parent=e,this.bindings={},t))this.bindings[i]=r}concat(e){return new eG(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}let eq={kind:"null"},eH={kind:"number"},eW={kind:"string"},eX={kind:"boolean"},eY={kind:"color"},eK={kind:"projectionDefinition"},eJ={kind:"object"},eQ={kind:"value"},e1={kind:"collator"},e0={kind:"formatted"},e2={kind:"padding"},e3={kind:"colorArray"},e5={kind:"numberArray"},e6={kind:"resolvedImage"},e4={kind:"variableAnchorOffsetCollection"};function e8(e,t){return{kind:"array",itemType:e,N:t}}function e7(e){if("array"===e.kind){let t=e7(e.itemType);return"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}let e9=[eq,eH,eW,eX,eY,eK,e0,eJ,e8(eQ),e2,e5,e3,e6,e4];function te(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!te(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind){for(let e of e9)if(!te(e,t))return null}}return`Expected ${e7(e)} but found ${e7(t)} instead.`}function tt(e,t){return t.some(t=>t.kind===e.kind)}function ti(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}function tr(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}let ta=4/29,tn=6/29,to=6/29*3*(6/29),tl=6/29*(6/29)*(6/29),ts=Math.PI/180,tc=180/Math.PI;function tu(e){return(e%=360)<0&&(e+=360),e}function th([e,t,i,r]){let a,n,o=td((.2225045*(e=tp(e))+.7168786*(t=tp(t))+.0606169*(i=tp(i)))/1);
1e===t&&t===i?a=n=o:(a=td((.4360747*e+.3850649*t+.1430804*i)/.96422),n=td((.0139322*e+.0971045*t+.7141733*i)/.82521));let l=116*o-16;return[l<0?0:l,500*(a-o),200*(o-n),r]}function tp(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function td(e){return e>tl?Math.pow(e,1/3):e/to+ta}function tf([e,t,i,r]){let a=(e+16)/116,n=isNaN(t)?a:a+t/500,o=isNaN(i)?a:a-i/200;return a=+tg(a),[tm(3.1338561*(n=.96422*tg(n))-1.6168667*a-.4906146*(o=.82521*tg(o))),tm(-.9787684*n+1.9161415*a+.033454*o),tm(.0719453*n-.2289914*a+1.4052427*o),r]}function tm(e){return(e=e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)<0?0:e>1?1:e}function tg(e){return e>tn?e*e*e:to*(e-ta)}let ty=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function t_(e,t){return ty(e,t)?e[t]:void 0}function tb(e){return parseInt(e.padEnd(2,e),16)/255}function tx(e,t){return tv(t?e/100:e,0,1)}function tv(e,t,i){return Math.min(Math.max(t,e),i)}function tw(e){return!e.some(Number.isNaN)}let tz={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],ol
1ive:[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 tS(e,t,i){return e.map((e,r)=>e+i*(t[r]-e))}class tT{constructor(e,t,i,r=1,a=!0){this.r=e,this.g=t,this.b=i,this.a=r,a||(this.r*=r,this.g*=r,this.b*=r,r||this.overwriteGetter("rgb",[e,t,i,r]))}static parse(e){if(e instanceof tT)return e;if("string"!=typeof e)return;let t=function(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];let t=t_(tz,e);if(t){let[e,i,r]=t;return[e/255,i/255,r/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let t=e.length<6?1:2,i=1;return[tb(e.slice(i,i+=t)),tb(e.slice(i,i+=t)),tb(e.slice(i,i+=t)),tb(e.slice(i,i+t)||"ff")]}if(e.startsWith("rgb")){let t=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[e,i,r,a,n,o,l,s,c,u,h,p]=t,d=[a||" ",l||" ",u].join("");if("  "===d||"  /"===d||",,"===d||",,,"===d){let e=[r,o,c].join(""),t="%%%"===e?100:255*(""===e);if(t){let e=[tv(i/t,0,1),tv(n/t,0,1),tv(s/t,0,1),h?tx(+h,p):1];if(tw(e))return e}}return}}let i=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(i){let[e,t,r,a,n,o,l,s,c]=i,u=[r||" ",n||" ",l].join("");if("  "===u||"  /"===u||",,"===u||",,,"===u){let e=[+t,tv(+a,0,100),tv(+o,0,100),s?tx(+s,c):1];if(tw(e))return function([e,t,i,r]){function a(r){let a=(r+e/30)%12,n=t*Math.min(i,1-i);return i-n*Math.max(-1,Math.min(a-3,9-a,1))}return e=tu(e),t/=100,i/=100,[a(0),a(8),a(4),r]}(e)}}}(e);return t?new tT(...t,!1):void 0}get rgb(){let{r:e,g:t,b:i,a:r}=this,a=r||1/0;return this.overwriteGetter("rgb",[e/a,t/a,i/a,r])}get hcl(){return this.overwriteGetter("hcl",function(e){let[t,i,r,a]=th(e),n=Math.sqrt(i*i+r*r);return[Math.round(1e4*n)?tu(Math.atan2(r,i)*tc):NaN,n,t,a]}(this.rgb))}get lab(){return this.overwriteGetter("lab",th(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){let[e,t,i,r]=this.rgb;return`rgba(${[e,t,i].map(e=>Math.round(255*e)).join(",")},${r})`}static interpolate(e,t,i,r="rgb"){switch(r){case"rgb":{let[r,a,n,o]=tS(e.rgb,t.rgb,i);return new tT(r,a,n,o,!1)}case"hcl":{let r,a,[n,o,l,s]=e.hcl,[c,u,h,p]=t.hcl;if(isNaN(n)||isNaN(c))isNaN(n)?isNaN(c)?r=NaN:(r=c,1!==l&&0!==l||(a=u)):(r=n,1!==h&&0!==h||(a=o));else{let e=c-n;c>n&&e>180?e-=360:c<n&&n-c>180&&(e+=360),r=n+i*e}let[d,f,m,g]=function([e,t,i,r]){return tf([i,Math.cos(e=isNaN(e)?0:e*ts)*t,Math.sin(e)*t,r])}([r,null!=a?a:o+i*(u-o),l+i*(h-l),s+i*(p-s)]);return new tT(d,f,m,g,!1)}case"lab":{let[r,a,n,o]=tf(tS(e.lab,t.lab,i));return new tT(r,a,n,o,!1)}}}}tT.black=new tT(0,0,0,1),tT.white=new tT(1,1,1,1),tT.transparent=new tT(0,0,0,0),tT.red=new tT(1,0,0,1);class tk{constructor(e,t,i){this.sensitivity=e?t?"variant":"case":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}}let tE=["bottom","center","top"];class tM{constructor(e,t,i,r,a,n){this.text=e,this.image=t,this.scale=i,this.fontStack=r,this.textColor=a,this.verticalAlign=n}}class tP{constructor(e){this.sections=e}static fromString(e){return new tP([new tM(e,null,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(e){return e instanceof tP?e:tP.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}}class tI{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tI)return e;if("number"==typeof e)return new tI([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let t of e)if("number"!=typeof t)return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new tI(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,i){return new tI(tS(e.values,t.values,i))}}class tA{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tA)return e;if("number"==typeof e)return new tA([e]);if(Array.isArray(e)){for(let t of e)if("number"!=typeof t)return;return new tA(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,i){return new tA(tS(e.values,t.values,i))}}class tC{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tC)return e;if("string"==typeof e){let t=tT.parse(e);if(!t)return;return new tC([t])}if(!Array.isArray(e))return;let t=[];for(let i of e){if("string"!=typeof i)return;let e=tT.parse(i);if(!e)return;t.push(e)}return new tC(t)}toString(){return JSON.stringify(this.values)}static interpolate(e,t,i,r="rgb"){let a=[];if(e.values.length!=t.values.length)throw Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${t.values.length}), cannot interpolate.`);for(let n=0;n<e.values.length;n++)a.push(tT.interpolate(e.values[n],t.values[n],i,r));return new tC(a)}}
1class tR extends Error{constructor(e){super(e),this.name="RuntimeError"}toJSON(){return this.message}}let tL=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class tD{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tD)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let t=0;t<e.length;t+=2){let i=e[t],r=e[t+1];if("string"!=typeof i||!tL.has(i)||!Array.isArray(r)||2!==r.length||"number"!=typeof r[0]||"number"!=typeof r[1])return}return new tD(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,i){let r=e.values,a=t.values;if(r.length!==a.length)throw new tR(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);let n=[];for(let e=0;e<r.length;e+=2){if(r[e]!==a[e])throw new tR(`Cannot interpolate values containing mismatched anchors. from[${e}]: ${r[e]}, to[${e}]: ${a[e]}`);n.push(r[e]);let[t,o]=r[e+1],[l,s]=a[e+1];n.push([t+i*(l-t),o+i*(s-o)])}return new tD(n)}}class tO{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new tO({name:e,available:!1}):null}}class tF{constructor(e,t,i){this.from=e,this.to=t,this.transition=i}static interpolate(e,t,i){return new tF(e,t,i)}static parse(e){return e instanceof tF?e:Array.isArray(e)&&3===e.length&&"string"==typeof e[0]&&"string"==typeof e[1]&&"number"==typeof e[2]?new tF(e[0],e[1],e[2]):"object"==typeof e&&"string"==typeof e.from&&"string"==typeof e.to&&"number"==typeof e.transition?new tF(e.from,e.to,e.transition):"string"==typeof e?new tF(e,e,1):void 0}}function tj(e,t,i,r){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:`Invalid rgba value [${[e,t,i,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof r?[e,t,i,r]:[e,t,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function tB(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof tF||e instanceof tT||e instanceof tk||e instanceof tP||e instanceof tI||e instanceof tA||e instanceof tC||e instanceof tD||e instanceof tO)return!0;if(Array.isArray(e)){for(let t of e)if(!tB(t))return!1;return!0}if("object"==typeof e){for(let t in e)if(!tB(e[t]))return!1;return!0}return!1}function tN(e){if(null===e)return eq;if("string"==typeof e)return eW;if("boolean"==typeof e)return eX;if("number"==typeof e)return eH;if(e instanceof tT)return eY;if(e instanceof tF)return eK;if(e instanceof tk)return e1;if(e instanceof tP)return e0;if(e instanceof tI)return e2;if(e instanceof tA)return e5;if(e instanceof tC)return e3;if(e instanceof tD)return e4;if(e instanceof tO)return e6;if(Array.isArray(e)){let t,i=e.length;for(let i of e){let e=tN(i);if(t){if(t===e)continue;t=eQ;break}t=e}return e8(t||eQ,i)}return eJ}function tU(e){let t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof tT||e instanceof tF||e instanceof tP||e instanceof tI||e instanceof tA||e instanceof tC||e instanceof tD||e instanceof tO?e.toString():JSON.stringify(e)}class tV{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!tB(e[1]))return t.error("invalid value");let i=e[1],r=tN(i),a=t.expectedType;return"array"===r.kind&&0===r.N&&a&&"array"===a.kind&&("number"!=typeof a.N||0===a.N)&&(r=a),new tV(r,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}
1let t$={string:eW,number:eH,boolean:eX,object:eJ};class tZ{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,r=1,a=e[0];if("array"===a){let a,n;if(e.length>2){let i=e[1];if("string"!=typeof i||!(i in t$)||"object"===i)return t.error('The item type argument of "array" must be one of string, number, boolean',1);a=t$[i],r++}else a=eQ;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);n=e[2],r++}i=e8(a,n)}else{if(!t$[a])throw Error(`Types doesn't contain name = ${a}`);i=t$[a]}let n=[];for(;r<e.length;r++){let i=t.parse(e[r],r,eQ);if(!i)return null;n.push(i)}return new tZ(i,n)}evaluate(e){for(let t=0;t<this.args.length;t++){let i=this.args[t].evaluate(e);if(!te(this.type,tN(i)))return i;if(t===this.args.length-1)throw new tR(`Expected value to be of type ${e7(this.type)}, but found ${e7(tN(i))} instead.`)}throw Error()}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}let tG={"to-boolean":eX,"to-color":eY,"to-number":eH,"to-string":eW};class tq{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=e[0];if(!tG[i])throw Error(`Can't parse ${i} as it is not part of the known types`);if(("to-boolean"===i||"to-string"===i)&&2!==e.length)return t.error("Expected one argument.");let r=tG[i],a=[];for(let i=1;i<e.length;i++){let r=t.parse(e[i],i,eQ);if(!r)return null;a.push(r)}return new tq(r,a)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let t,i;for(let r of this.args){if(t=r.evaluate(e),i=null,t instanceof tT)return t;if("string"==typeof t){let i=e.parseColor(t);if(i)return i}else if(Array.isArray(t)&&!(i=t.length<3||t.length>4?`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:tj(t[0],t[1],t[2],t[3])))return new tT(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new tR(i||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"padding":{let t;for(let i of this.args){t=i.evaluate(e);let r=tI.parse(t);if(r)return r}throw new tR(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"numberArray":{let t;for(let i of this.args){t=i.evaluate(e);let r=tA.parse(t);if(r)return r}throw new tR(`Could not parse numberArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"colorArray":{let t;for(let i of this.args){t=i.evaluate(e);let r=tC.parse(t);if(r)return r}throw new tR(`Could not parse colorArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(let i of this.args){t=i.evaluate(e);let r=tD.parse(t);if(r)return r}throw new tR(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(let i of this.args){if(null===(t=i.evaluate(e)))return 0;let r=Number(t);if(!isNaN(r))return r}throw new tR(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return tP.fromString(tU(this.args[0].evaluate(e)));case"resolvedImage":return tO.fromString(tU(this.args[0].evaluate(e)));case"projectionDefinition":return this.args[0].evaluate(e);default:return tU(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}let tH=["Unknown","Point","LineString","Polygon"];class tW{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?"number"==typeof this.feature.type?tH[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=tT.parse(e),this._parseColorCache.set(e,t)),t}}class tX{constructor(e,t,i=[],r,a=new eG,n=[]){this.registry=e,this.path=i,this.key=i.map(e=>`[${e}]`).join(""),this.scope=a,this.errors=n,this.expectedType=r,this._isConstant=t}parse(e,t,i,r,a={}){return t?this.concat(t,i,r)._parse(e,a):this._parse(e,a)}_parse(e,t){function i(e,t,i){return"assert"===i?new tZ(t,[e]):"coerce"===i?new tq(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let r=e[0];if("string"!=typeof r)return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let a=this.registry[r];if(a){let r=a.parse(e,this);if(!r)return null;if(this.expectedType){let e=this.expectedType,a=r.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==a.kind){if("projectionDefinition"===e.kind&&["string","array"].includes(a.kind)||["color","formatted","resolvedImage"].includes(e.kind)&&["value","string"].includes(a.kind)||["padding","numberArray"].includes(e.kind)&&["value","number","array"].includes(a.kind)||"colorArray"===e.kind&&["value","string","array"].includes(a.kind)||"variableAnchorOffsetCollection"===e.kind&&["value","array"].includes(a.kind))r=i(r,e,t.typeAnnotation||"coerce");else if(this.checkSubtype(e,a))return null}else r=i(r,e,t.typeAnnotation||"assert")}if(!(r instanceof tV)&&"resolvedImage"!==r.type.kind&&this._isConstant(r)){let e=new tW;try{r=new tV(r.type,r.evaluate(e))}catch(e){return this.error(e.message),null}}return r}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,i){let r="number"==typeof e?this.path.concat(e):this.path,a=i?this.scope.concat(i):this.scope;return new tX(this.registry,this._isConstant,r,t||null,a,this.errors)}error(e,...t){let i=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new eZ(i,e))}checkSubtype(e,t){let i=te(e,t);return i&&this.error(i),i}}class tY{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let 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.`);let i=[];for(let r=1;r<e.length-1;r+=2){let a=e[r];if("string"!=typeof a)return t.error(`Expected string, but found ${typeof a} instead.`,r);if(/[^a-zA-Z0-9_]/.test(a))return t.error("Variable names must contain only alphanumeric characters or '_'.",r);let n=t.parse(e[r+1],r+1);if(!n)return null;i.push([a,n])}let r=t.parse(e[e.length-1],e.length-1,t.expectedType,i);return r?new tY(i,r):null}outputDefined(){return this.result.outputDefined()}}class tK{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");let i=e[1];return t.scope.has(i)?new tK(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 tJ{constructor(e,t,i){this.type=e,this.index=t,this.input=i}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let i=t.parse(e[1],1,eH),r=t.parse(e[2],2,e8(t.expectedType||eQ));return i&&r?new tJ(r.type.itemType,i,r):null}evaluate(e){let t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new tR(`Array index out of bounds: ${t} < 0.`);if(t>=i.length)throw new tR(`Array index out of bounds: ${t} > ${i.length-1}.`);if(t!==Math.floor(t))throw new tR(`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 tQ{constructor(e,t){this.type=eX,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let i=t.parse(e[1],1,eQ),r=t.parse(e[2],2,eQ);return i&&r?tt(i.type,[eX,eW,eH,eq,eQ])?new tQ(i,r):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${e7(i.type)} instead`):null}evaluate(e){let t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!i)return!1;if(!ti(t,["boolean","string","number","null"]))throw new tR(`Expected first argument to be of type boolean, string, number or null, but found ${e7(tN(t))} instead.`);if(!ti(i,["string","array"]))throw new tR(`Expected second argument to be of type array or string, but found ${e7(tN(i))} instead.`);return i.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class t1{constructor(e,t,i){this.type=eH,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.`);let i=t.parse(e[1],1,eQ),r=t.parse(e[2],2,eQ);if(!i||!r)return null;if(!tt(i.type,[eX,eW,eH,eq,eQ]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${e7(i.type)} instead`);if(4===e.length){let a=t.parse(e[3],3,eH);return a?new t1(i,r,a):null}return new t1(i,r)}evaluate(e){let t,i=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!ti(i,["boolean","string","number","null"]))throw new tR(`Expected first argument to be of type boolean, string, number or null, but found ${e7(tN(i))} instead.`);if(this.fromIndex&&(t=this.fromIndex.evaluate(e)),ti(r,["string"])){let e=r.indexOf(i,t);return -1===e?-1:[...r.slice(0,e)].length}if(ti(r,["array"]))return r.indexOf(i,t);throw new tR(`Expected second argument to be of type array or string, but found ${e7(tN(r))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class t0{constructor(e,t,i,r,a,n){this.inputType=e,this.type=t,this.input=i,this.cases=r,this.outputs=a,this.otherwise=n}static parse(e,t){let i,r;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.");t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);let a={},n=[];for(let o=2;o<e.length-1;o+=2){let l=e[o],s=e[o+1];Array.isArray(l)||(l=[l]);let c=t.concat(o);if(0===l.length)return c.error("Expected at least one branch label.");for(let e of l){if("number"!=typeof e&&"string"!=typeof e)return c.error("Branch labels must be numbers or strings.");if("number"==typeof e&&Math.abs(e)>Number.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return c.error("Numeric branch labels must be integer values.");if(i){if(c.checkSubtype(i,tN(e)))return null}else i=tN(e);if(void 0!==a[String(e)])return c.error("Branch labels must be unique.");a[String(e)]=n.length}let u=t.parse(s,o,r);if(!u)return null;r=r||u.type,n.push(u)}let o=t.parse(e[1],1,eQ);if(!o)return null;let l=t.parse(e[e.length-1],e.length-1,r);return l?"value"!==o.type.kind&&t.concat(1).checkSubtype(i,o.type)?null:new t0(i,r,o,a,n,l):null}evaluate(e){let t=this.input.evaluate(e);return(tN(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}
1eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}}class t2{constructor(e,t,i){this.type=e,this.branches=t,this.otherwise=i}static parse(e,t){let i;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.");t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);let r=[];for(let a=1;a<e.length-1;a+=2){let n=t.parse(e[a],a,eX);if(!n)return null;let o=t.parse(e[a+1],a+1,i);if(!o)return null;r.push([n,o]),i=i||o.type}let a=t.parse(e[e.length-1],e.length-1,i);if(!a)return null;if(!i)throw Error("Can't infer output type");return new t2(i,r,a)}evaluate(e){for(let[t,i]of this.branches)if(t.evaluate(e))return i.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(let[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 t3{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.`);let i=t.parse(e[1],1,eQ),r=t.parse(e[2],2,eH);if(!i||!r)return null;if(!tt(i.type,[e8(eQ),eW,eQ]))return t.error(`Expected first argument to be of type array or string, but found ${e7(i.type)} instead`);if(4===e.length){let a=t.parse(e[3],3,eH);return a?new t3(i.type,i,r,a):null}return new t3(i.type,i,r)}evaluate(e){let t,i=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(this.endIndex&&(t=this.endIndex.evaluate(e)),ti(i,["string"]))return[...i].slice(r,t).join("");if(ti(i,["array"]))return i.slice(r,t);throw new tR(`Expected first argument to be of type array or string, but found ${e7(tN(i))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function t5(e,t){let i=e.length-1,r,a,n=0,o=i,l=0;for(;n<=o;)if(r=e[l=Math.floor((n+o)/2)],a=e[l+1],r<=t){if(l===i||t<a)return l;n=l+1}else{if(!(r>t))throw new tR("Input is not a number.");o=l-1}return 0}class t6{constructor(e,t,i){for(let[r,a]of(this.type=e,this.input=t,this.labels=[],this.outputs=[],i))this.labels.push(r),this.outputs.push(a)}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.");let i=t.parse(e[1],1,eH);if(!i)return null;let r=[],a=null;t.expectedType&&"value"!==t.expectedType.kind&&(a=t.expectedType);for(let i=1;i<e.length;i+=2){let n=1===i?-1/0:e[i],o=e[i+1],l=i,s=i+1;if("number"!=typeof n)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(r.length&&r[r.length-1][0]>=n)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);let c=t.parse(o,s,a);if(!c)return null;a=a||c.type,r.push([n,c])}return new t6(a,i,r)}evaluate(e){let t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);let r=this.input.evaluate(e);if(r<=t[0])return i[0].evaluate(e);let a=t.length;return r>=t[a-1]?i[a-1].evaluate(e):i[t5(t,r)].evaluate(e)}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}var t4,t8,t7,t9,ie=(t8=function(){if(t9)return t7;function e(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 t9=1,t7=e,e.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(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var i=e,r=0;r<8;r++){var a=this.sampleCurveX(i)-e;if(Math.abs(a)<t)return i;var n=this.sampleCurveDerivativeX(i);if(1e-6>Math.abs(n))break;i-=a/n}var o=0,l=1;for(i=e,r=0;r<20&&!(Math.abs((a=this.sampleCurveX(i))-e)<t);r++)e>a?o=i:l=i,i=.5*(l-o)+o;return i}
1,solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},t7}())&&t8.__esModule&&Object.prototype.hasOwnProperty.call(t8,"default")?t8.default:t8;class it{constructor(e,t,i,r,a){for(let[n,o]of(this.type=e,this.operator=t,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[],a))this.labels.push(n),this.outputs.push(o)}static interpolationFactor(e,t,i,r){let a=0;if("exponential"===e.name)a=ii(t,e.base,i,r);else if("linear"===e.name)a=ii(t,1,i,r);else if("cubic-bezier"===e.name){let n=e.controlPoints;a=new ie(n[0],n[1],n[2],n[3]).solve(ii(t,1,i,r))}return a}static parse(e,t){let[i,r,a,...n]=e;if(!Array.isArray(r)||0===r.length)return t.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){let e=r[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:e}}else{if("cubic-bezier"!==r[0])return t.error(`Unknown interpolation type ${String(r[0])}`,1,0);{let e=r.slice(1);if(4!==e.length||e.some(e=>"number"!=typeof e||e<0||e>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:e}}}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(!(a=t.parse(a,2,eH)))return null;let o=[],l=null;"interpolate-hcl"!==i&&"interpolate-lab"!==i||t.expectedType==e3?t.expectedType&&"value"!==t.expectedType.kind&&(l=t.expectedType):l=eY;for(let e=0;e<n.length;e+=2){let i=n[e],r=n[e+1],a=e+3,s=e+4;if("number"!=typeof i)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',a);if(o.length&&o[o.length-1][0]>=i)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',a);let c=t.parse(r,s,l);if(!c)return null;l=l||c.type,o.push([i,c])}return tr(l,eH)||tr(l,eK)||tr(l,eY)||tr(l,e2)||tr(l,e5)||tr(l,e3)||tr(l,e4)||tr(l,e8(eH))?new it(l,i,r,a,o):t.error(`Type ${e7(l)} is not interpolatable.`)}evaluate(e){let t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);let r=this.input.evaluate(e);if(r<=t[0])return i[0].evaluate(e);let a=t.length;if(r>=t[a-1])return i[a-1].evaluate(e);let n=t5(t,r),o=it.interpolationFactor(this.interpolation,r,t[n],t[n+1]),l=i[n].evaluate(e),s=i[n+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return l+o*(s-l);case"color":return tT.interpolate(l,s,o);case"padding":return tI.interpolate(l,s,o);case"colorArray":return tC.interpolate(l,s,o);case"numberArray":return tA.interpolate(l,s,o);case"variableAnchorOffsetCollection":return tD.interpolate(l,s,o);case"array":return tS(l,s,o);case"projectionDefinition":return tF.interpolate(l,s,o)}case"interpolate-hcl":switch(this.type.kind){case"color":return tT.interpolate(l,s,o,"hcl");case"colorArray":return tC.interpolate(l,s,o,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return tT.interpolate(l,s,o,"lab");case"colorArray":return tC.interpolate(l,s,o,"lab")}}}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function ii(e,t,i,r){let a=r-i,n=e-i;return 0===a?0:1===t?n/a:(Math.pow(t,n)-1)/(Math.pow(t,a)-1)}let ir={color:tT.interpolate,number:function(e,t,i){return e+i*(t-e)},padding:tI.interpolate,numberArray:tA.interpolate,colorArray:tC.interpolate,variableAnchorOffsetCollection:tD.interpolate,array:tS};class ia{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,r=t.expectedType;r&&"value"!==r.kind&&(i=r);let a=[];for(let r of e.slice(1)){let e=t.parse(r,1+a.length,i,void 0,{typeAnnotation:"omit"});if(!e)return null;i=i||e.type,a.push(e)}if(!i)throw Error("No output type");return new ia(r&&a.some(e=>te(r,e.type))?eQ:i,a)}evaluate(e){let t,i=null,r=0;
1for(let a of this.args)if(r++,(i=a.evaluate(e))&&i instanceof tO&&!i.available&&(t||(t=i.name),i=null,r===this.args.length&&(i=t)),null!==i)break;return i}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}function io(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function il(e,t,i,r){return 0===r.compare(t,i)}function is(e,t,i){let r="=="!==e&&"!="!==e;return class a{constructor(e,t,i){this.type=eX,this.lhs=e,this.rhs=t,this.collator=i,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");let i=e[0],n=t.parse(e[1],1,eQ);if(!n)return null;if(!io(i,n.type))return t.concat(1).error(`"${i}" comparisons are not supported for type '${e7(n.type)}'.`);let o=t.parse(e[2],2,eQ);if(!o)return null;if(!io(i,o.type))return t.concat(2).error(`"${i}" comparisons are not supported for type '${e7(o.type)}'.`);if(n.type.kind!==o.type.kind&&"value"!==n.type.kind&&"value"!==o.type.kind)return t.error(`Cannot compare types '${e7(n.type)}' and '${e7(o.type)}'.`);r&&("value"===n.type.kind&&"value"!==o.type.kind?n=new tZ(o.type,[n]):"value"!==n.type.kind&&"value"===o.type.kind&&(o=new tZ(n.type,[o])));let l=null;if(4===e.length){if("string"!==n.type.kind&&"string"!==o.type.kind&&"value"!==n.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(l=t.parse(e[3],3,e1)))return null}return new a(n,o,l)}evaluate(a){let n=this.lhs.evaluate(a),o=this.rhs.evaluate(a);if(r&&this.hasUntypedArgument){let t=tN(n),i=tN(o);if(t.kind!==i.kind||"string"!==t.kind&&"number"!==t.kind)throw new tR(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${i.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){let e=tN(n),i=tN(o);if("string"!==e.kind||"string"!==i.kind)return t(a,n,o)}return this.collator?i(a,n,o,this.collator.evaluate(a)):t(a,n,o)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}let ic=is("==",function(e,t,i){return t===i},il),iu=is("!=",function(e,t,i){return t!==i},function(e,t,i,r){return!il(0,t,i,r)}),ih=is("<",function(e,t,i){return t<i},function(e,t,i,r){return 0>r.compare(t,i)}),ip=is(">",function(e,t,i){return t>i},function(e,t,i,r){return r.compare(t,i)>0}),id=is("<=",function(e,t,i){return t<=i},function(e,t,i,r){return 0>=r.compare(t,i)}),im=is(">=",function(e,t,i){return t>=i},function(e,t,i,r){return r.compare(t,i)>=0});class ig{constructor(e,t,i){this.type=e1,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");let i=e[1];if("object"!=typeof i||Array.isArray(i))return t.error("Collator options argument must be an object.");let r=t.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,eX);if(!r)return null;let a=t.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,eX);if(!a)return null;let n=null;return!i.locale||(n=t.parse(i.locale,1,eW))?new ig(r,a,n):null}evaluate(e){return new tk(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 iy{constructor(e,t,i,r,a){this.type=eW,this.number=e,this.locale=t,this.currency=i,this.minFractionDigits=r,this.maxFractionDigits=a}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");let i=t.parse(e[1],1,eH);if(!i)return null;let r=e[2];if("object"!=typeof r||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");let a=null;if(r.locale&&!(a=t.parse(r.locale,1,eW)))return null;let n=null;if(r.currency&&!(n=t.parse(r.currency,1,eW)))return null;let o=null;if(r["min-fraction-digits"]&&!(o=t.parse(r["min-fraction-digits"],1,eH)))return null;let l=null;return!r["max-fraction-digits"]||(l=t.parse(r["max-fraction-digits"],1,eH))?new iy(i,a,n,o,l):null}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 i_{constructor(e){this.type=e0,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let i=e[1];if(!Array.isArray(i)&&"object"==typeof i)return t.error("First argument must be an image or text section.");let r=[],a=!1;for(let i=1;i<=e.length-1;++i){let n=e[i];if(a&&"object"==typeof n&&!Array.isArray(n)){a=!1;let e=null;if(n["font-scale"]&&!(e=t.parse(n["font-scale"],1,eH)))return null;let i=null;if(n["text-font"]&&!(i=t.parse(n["text-font"],1,e8(eW))))return null;let o=null;if(n["text-color"]&&!(o=t.parse(n["text-color"],1,eY)))return null;let l=null;if(n["vertical-align"]){if("string"==typeof n["vertical-align"]&&!tE.includes(n["vertical-align"]))return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${n["vertical-align"]}' instead.`);if(!(l=t.parse(n["vertical-align"],1,eW)))return null}let s=r[r.length-1];s.scale=e,s.font=i,s.textColor=o,s.verticalAlign=l}else{let n=t.parse(e[i],1,eQ);if(!n)return null;let o=n.type.kind;if("string"!==o&&"value"!==o&&"null"!==o&&"resolvedImage"!==o)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");a=!0,r.push({content:n,scale:null,font:null,textColor:null,verticalAlign:null})}}return new i_(r)}evaluate(e){return new tP(this.sections.map(t=>{let i=t.content.evaluate(e);return tN(i)===e6?new tM("",i,null,null,null,t.verticalAlign?t.verticalAlign.evaluate(e):null):new tM(tU(i),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null,t.verticalAlign?t.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let 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 ib{constructor(e){this.type=e6,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");let i=t.parse(e[1],1,eW);return i?new ib(i):t.error("No image name provided.")}evaluate(e){let t=this.input.evaluate(e),i=tO.fromString(t);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(t)>-1),i}eachChild(e){e(this.input)}outputDefined(){return!1}}class ix{constructor(e){this.type=eH,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);let i=t.parse(e[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?t.error(`Expected argument of type string or array, but found ${e7(i.type)} instead.`):new ix(i):null}evaluate(e){let t=this.input.evaluate(e);if("string"==typeof t)return[...t].length;if(Array.isArray(t))return t.length;throw new tR(`Expected value to be of type string or array, but found ${e7(tN(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}function iv(e,t){let i=Math.pow(2,t.z);return[360*((e[0]/8192+t.x)/i)-180,360/Math.PI*Math.atan(Math.exp((180-360*((e[1]/8192+t.y)/i))*Math.PI/180)
1)-90]}function iw(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function iz(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function iS(e,t,i,r){var a,n;return 0!=(a=[r[0]-i[0],r[1]-i[1]])[0]*(n=[t[0]-e[0],t[1]-e[1]])[1]-a[1]*n[0]&&!(!iE(e,t,i,r)||!iE(i,r,e,t))}function iT(e,t,i=!1){var r,a;let n=!1;for(let o of t)for(let t=0;t<o.length-1;t++){if(function(e,t,i){let r=e[0]-t[0],a=e[1]-t[1],n=e[0]-i[0],o=e[1]-i[1];return r*o-n*a==0&&r*n<=0&&a*o<=0}(e,o[t],o[t+1]))return i;(r=o[t])[1]>e[1]!=(a=o[t+1])[1]>e[1]&&e[0]<(a[0]-r[0])*(e[1]-r[1])/(a[1]-r[1])+r[0]&&(n=!n)}return n}function ik(e,t){for(let i of e)if(!iT(i,t))return!1;for(let i=0;i<e.length-1;++i)if(function(e,t,i){for(let r of i)for(let i=0;i<r.length-1;++i)if(iS(e,t,r[i],r[i+1]))return!0;return!1}(e[i],e[i+1],t))return!1;return!0}function iE(e,t,i,r){let a=r[0]-i[0],n=r[1]-i[1],o=(e[0]-i[0])*n-a*(e[1]-i[1]),l=(t[0]-i[0])*n-a*(t[1]-i[1]);return o>0&&l<0||o<0&&l>0}function iM(e,t,i){let r=[];for(let a=0;a<e.length;a++){let n=[];for(let r=0;r<e[a].length;r++){let o=function(e,t){let i=(180+e[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,a=Math.pow(2,t.z);return[Math.round(i*a*8192),Math.round(r*a*8192)]}(e[a][r],i);iw(t,o),n.push(o)}r.push(n)}return r}function iP(e,t,i){let r=[];for(let a=0;a<e.length;a++){let n=iM(e[a],t,i);r.push(n)}return r}function iI(e,t,i,r){if(e[0]<i[0]||e[0]>i[2]){let t=.5*r,a=e[0]-i[0]>t?-r:i[0]-e[0]>t?r:0;0===a&&(a=e[0]-i[2]>t?-r:i[2]-e[0]>t?r:0),e[0]+=a}iw(t,e)}function iA(e,t,i,r){let a=8192*Math.pow(2,r.z),n=[8192*r.x,8192*r.y],o=[];for(let r of e)for(let e of r){let r=[e.x+n[0],e.y+n[1]];iI(r,t,i,a),o.push(r)}return o}function iC(e,t,i,r){let a=8192*Math.pow(2,r.z),n=[8192*r.x,8192*r.y],o=[];for(let i of e){let e=[];for(let r of i){let i=[r.x+n[0],r.y+n[1]];iw(t,i),e.push(i)}o.push(e)}if(t[2]-t[0]<=a/2)for(let e of(t[0]=t[1]=1/0,t[2]=t[3]=-1/0,o))for(let r of e)iI(r,t,i,a);return o}class iR{constructor(e,t){this.type=eX,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(tB(e[1])){let t=e[1];if("FeatureCollection"===t.type){let e=[];for(let i of t.features){let{type:t,coordinates:r}=i.geometry;"Polygon"===t&&e.push(r),"MultiPolygon"===t&&e.push(...r)}if(e.length)return new iR(t,{type:"MultiPolygon",coordinates:e})}else if("Feature"===t.type){let e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new iR(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new iR(t,t)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],a=e.canonicalID();if("Polygon"===t.type){let n=iM(t.coordinates,r,a),o=iA(e.geometry(),i,r,a);if(!iz(i,r))return!1;for(let e of o)if(!iT(e,n))return!1}if("MultiPolygon"===t.type){let n=iP(t.coordinates,r,a),o=iA(e.geometry(),i,r,a);if(!iz(i,r))return!1;for(let e of o)if(!function(e,t){for(let i of t)if(iT(e,i))return!0;return!1}(e,n))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],a=e.canonicalID();if("Polygon"===t.type){let n=iM(t.coordinates,r,a),o=iC(e.geometry(),i,r,a);if(!iz(i,r))return!1;for(let e of o)if(!ik(e,n))return!1}if("MultiPolygon"===t.type){let n=iP(t.coordinates,r,a),o=iC(e.geometry(),i,r,a);if(!iz(i,r))return!1;for(let e of o)if(!function(e,t){for(let i of t)if(ik(e,i))return!0;return!1}(e,n))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let iL=class{constructor(e=[],t=(e,t)=>e<t?-1:+(e>t)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let 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){let{data:t,compare:i}=this,r=t[e];for(;e>0;){let a=e-1>>1,n=t[a];if(i(r,n)>=0)break;t[e]=n,e=a}t[e]=r}_down(e){let{data:t,compare:i}=this,r=this.length>>1,a=t[e];for(;e<r;){let r=1+(e<<1),n=r+1;if(n<this.length&&0>i(t[n],t[r])&&(r=n),i(t[r],a)>=0)break;t[e]=t[r],e=r}t[e]=a}};function iD(e,t,i){let r=e[t];e[t]=e[i],e[i]=r}function iO(e,t){let i,r;if(e.length<=1)return[e];let a=[];for(let t of e){let e=function(e){let t=0;for(let i,r,a=0,n=e.length,o=n-1;a<n;o=a++)i=e[a],t+=((r=e[o]).x-i.x)*(i.y+r.y);return t}(t);0!==e&&(t.area=Math.abs(e),void 0===r&&(r=e<0),r===e<0?(i&&a.push(i),i=[t]):i.push(t))}if(i&&a.push(i),t>1)for(let e=0;e<a.length;e++)a[e].length<=t||(function e(t,i,r=0,a=t.length-1,n=function(e,t){return e<t?-1:+(e>t)}){for(;a>r;){if(a-r>600){let o=a-r+1,l=i-r+1,s=Math.log(o),c=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*c*(o-c)/o)*(l-o/2<0?-1:1);e(t,i,Math.max(r,Math.floor(i-l*c/o+u)),Math.min(a,Math.floor(i+(o-l)*c/o+u)),n)}let o=t[i],l=r,s=a;for(iD(t,r,i),n(t[a],o)>0&&iD(t,r,a);l<s;){for(iD(t,l,s),l++,s--;0>n(t[l],o);)l++;for(;n(t[s],o)>0;)s--}0===n(t[r],o)?iD(t,r,s):iD(t,++s,a),s<=i&&(r=s+1),i<=s&&(a=s-1)}}(a[e],t,1,a[e].length-1,iF),a[e]=a[e].slice(0,t));return a}function iF(e,t){return t.area-e.area}let ij=1/298.257223563*(2-1/298.257223563),iB=Math.PI/180;class iN{constructor(e){let t=6378.137*iB*1e3,i=Math.cos(e*iB),r=1/(1-ij*(1-i*i)),a=Math.sqrt(r);this.kx=t*a*i,this.ky=t*a*r*(1-ij)}distance(e,t){let 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,r,a,n,o=1/0;for(let l=0;l<e.length-1;l++){let s=e[l][0],c=e[l][1],u=this.wrap(e[l+1][0]-s)*this.kx,h=(e[l+1][1]-c)*this.ky,p=0;0===u&&0===h||((p=(this.wrap(t[0]-s)*this.kx*u+(t[1]-c)*this.ky*h)/(u*u+h*h))>1?(s=e[l+1][0],c=e[l+1][1]):p>0&&(s+=u/this.kx*p,c+=h/this.ky*p));let d=(u=this.wrap(t[0]-s)*this.kx)*u+(h=(t[1]-c)*this.ky)*h;d<o&&(o=d,i=s,r=c,a=l,n=p)}return{point:[i,r],index:a,t:Math.max(0,Math.min(1,n))}}wrap(e){for(;e<-180;)e+=360;for(;e>180;)e-=360;return e}}function iU(e,t){return t[0]-e[0]}function iV(e){return e[1]-e[0]+1}function i$(e,t){return e[1]>=e[0]&&e[1]<t}function iZ(e,t){if(e[0]>
1e[1])return[null,null];let i=iV(e);if(t){if(2===i)return[e,null];let t=Math.floor(i/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}if(1===i)return[e,null];let r=Math.floor(i/2)-1;return[[e[0],e[0]+r],[e[0]+r+1,e[1]]]}function iG(e,t){if(!i$(t,e.length))return[1/0,1/0,-1/0,-1/0];let i=[1/0,1/0,-1/0,-1/0];for(let r=t[0];r<=t[1];++r)iw(i,e[r]);return i}function iq(e){let t=[1/0,1/0,-1/0,-1/0];for(let i of e)for(let e of i)iw(t,e);return t}function iH(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function iW(e,t,i){if(!iH(e)||!iH(t))return NaN;let r=0,a=0;return e[2]<t[0]&&(r=t[0]-e[2]),e[0]>t[2]&&(r=e[0]-t[2]),e[1]>t[3]&&(a=e[1]-t[3]),e[3]<t[1]&&(a=t[1]-e[3]),i.distance([0,0],[r,a])}function iX(e,t,i){let r=i.pointOnLine(t,e);return i.distance(e,r.point)}function iY(e,t,i,r,a){return Math.min(Math.min(iX(e,[i,r],a),iX(t,[i,r],a)),Math.min(iX(i,[e,t],a),iX(r,[e,t],a)))}function iK(e,t){for(let i of e)for(let e of i)if(iT(e,t,!0))return!0;return!1}function iJ(e,t,i,r,a,n){if(!n)return;let o=iW(iG(r,n),a,i);o<t&&e.push([o,n,[0,0]])}function iQ(e,t,i,r,a,n,o){if(!n||!o)return;let l=iW(iG(r,n),iG(a,o),i);l<t&&e.push([l,n,o])}function i1(e,t,i,r,a=1/0){let n=Math.min(r.distance(e[0],i[0][0]),a);if(0===n)return n;let o=new iL([[0,[0,e.length-1],[0,0]]],iU),l=iq(i);for(;o.length>0;){let a=o.pop();if(a[0]>=n)continue;let s=a[1],c=t?50:100;if(iV(s)<=c){if(!i$(s,e.length))return NaN;if(t){let t=function(e,t,i,r){if(!i$(t,e.length))return NaN;for(let r=t[0];r<=t[1];++r)if(iT(e[r],i,!0))return 0;let a=1/0;for(let n=t[0];n<t[1];++n){let t=e[n],o=e[n+1];for(let e of i)for(let i=0,n=e.length,l=n-1;i<n;l=i++){let n=e[l],s=e[i];if(iS(t,o,n,s))return 0;a=Math.min(a,iY(t,o,n,s,r))}}return a}(e,s,i,r);if(isNaN(t)||0===t)return t;n=Math.min(n,t)}else for(let t=s[0];t<=s[1];++t)if(0===(n=Math.min(n,function(e,t,i){if(iT(e,t,!0))return 0;let r=1/0;for(let a of t){let t=a[0],n=a[a.length-1];if(t!==n&&0===(r=Math.min(r,iX(e,[n,t],i))))break;let o=i.pointOnLine(a,e);if(0===(r=Math.min(r,i.distance(e,o.point))))break}return r}(e[t],i,r))))return 0}else{let i=iZ(s,t);iJ(o,n,r,e,l,i[0]),iJ(o,n,r,e,l,i[1])}}return n}function i0(e,t,i,r,a,n=1/0){let o=Math.min(n,a.distance(e[0],i[0]));if(0===o)return o;let l=new iL([[0,[0,e.length-1],[0,i.length-1]]],iU);for(;l.length>0;){let n=l.pop();if(n[0]>=o)continue;let s=n[1],c=n[2],u=t?50:100,h=r?50:100;if(iV(s)<=u&&iV(c)<=h){if(!i$(s,e.length)&&i$(c,i.length))return NaN;if(t&&r)o=Math.min(o,function(e,t,i,r,a){if(!i$(t,e.length)||!i$(r,i.length))return 1/0;let n=1/0;for(let o=t[0];o<t[1];++o){let t=e[o],l=e[o+1];for(let e=r[0];e<r[1];++e){let r=i[e],o=i[e+1];if(iS(t,l,r,o))return 0;n=Math.min(n,iY(t,l,r,o,a))}}return n}(e,s,i,c,a));else if(t&&!r){let t=e.slice(s[0],s[1]+1);for(let e=c[0];e<=c[1];++e)if(0===(o=Math.min(o,iX(i[e],t,a))))return o}else if(!t&&r){let t=i.slice(c[0],c[1]+1);for(let i=s[0];i<=s[1];++i)if(0===(o=Math.min(o,iX(e[i],t,a))))return o}else o=Math.min(o,function(e,t,i,r,a){if(!i$(t,e.length)||!i$(r,i.length))return NaN;let n=1/0;for(let o=t[0];o<=t[1];++o)for(let t=r[0];t<=r[1];++t)if(0===(n=Math.min(n,a.distance(e[o],i[t]))))return n;return n}(e,s,i,c,a))}else{let n=iZ(s,t),u=iZ(c,r);iQ(l,o,a,e,i,n[0],u[0]),iQ(l,o,a,e,i,n[0],u[1]),iQ(l,o,a,e,i,n[1],u[0]),iQ(l,o,a,e,i,n[1],u[1])}}return o}function i2(e){return"MultiPolygon"===e.type?e.coordinates.map(e=>({type:"Polygon",coordinates:e})):"MultiLineString"===e.type?e.coordinates.map(e=>({type:"LineString",coordinates:e})):"MultiPoint"===e.type?e.coordinates.map(e=>({type:"Point",coordinates:e})):[e]}class i3{constructor(e,t){this.type=eH,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(tB(e[1])){let t=e[1];if("FeatureCollection"===t.type)return new i3(t,t.features.map(e=>i2(e.geometry)).flat());if("Feature"===t.type)return new i3(t,i2(t.geometry));if("type"in t&&"coordinates"in t)return new i3(t,i2(t))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let i=e.geometry(),r=i.flat().map(t=>iv([t.x,t.y],e.canonical));if(0===i.length)return NaN;let a=new iN(r[0][1]),n=1/0;for(let e of t){switch(e.type){case"Point":n=Math.min(n,i0(r,!1,[e.coordinates],!1,a,n));break;case"LineString":n=Math.min(n,i0(r,!1,e.coordinates,!0,a,n));break;case"Polygon":n=Math.min(n,i1(r,!1,e.coordinates,a,n))}if(0===n)break}return n}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let i=e.geometry(),r=i.flat().map(t=>iv([t.x,t.y],e.canonical));if(0===i.length)return NaN;let a=new iN(r[0][1]),n=1/0;for(let e of t){switch(e.type){case"Point":n=Math.min(n,i0(r,!0,[e.coordinates],!1,a,n));break;case"LineString":n=Math.min(n,i0(r,!0,e.coordinates,!0,a,n));break;case"Polygon":n=Math.min(n,i1(r,!0,e.coordinates,a,n))}if(0===n)break}return n}(e,this.geometries);if("Polygon"===e.geometryType())return function(e,t){let i=e.geometry();if(0===i.length||0===i[0].length)return NaN;let r=iO(i,0).map(t=>t.map(t=>t.map(t=>iv([t.x,t.y],e.canonical)))),a=new iN(r[0][0][0][1]),n=1/0;for(let e of t)for(let t of r){switch(e.type){case"Point":n=Math.min(n,i1([e.coordinates],!1,t,a,n));break;case"LineString":n=Math.min(n,i1(e.coordinates,!0,t,a,n));break;case"Polygon":n=Math.min(n,function(e,t,i,r=1/0){let a=iq(e),n=iq(t);if(r!==1/0&&iW(a,n,i)>=r)return r;if(iz(a,n)){if(iK(e,t))return 0}else if(iK(t,e))return 0;let o=1/0;for(let r of e)for(let e=0,a=r.length,n=a-1;e<a;n=e++){let a=r[n],l=r[e];for(let e of t)for(let t=0,r=e.length,n=r-1;t<r;n=t++){let r=e[n],s=e[t];if(iS(a,l,r,s))return 0;o=Math.min(o,iY(a,l,r,s,i))}}return o}(t,e.coordinates,a,n))}if(0===n)return n}return n}(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class i5{constructor(e){this.type=eQ,this.key=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);let i=e[1];return null==i?t.error("Global state property must be defined."):"str
1ing"!=typeof i?t.error(`Global state property must be string, but found ${typeof e[1]} instead.`):new i5(i)}evaluate(e){var t;let i=null==(t=e.globals)?void 0:t.globalState;return i&&0!==Object.keys(i).length?t_(i,this.key):null}eachChild(){}outputDefined(){return!1}}let i6={"==":ic,"!=":iu,">":ip,"<":ih,">=":im,"<=":id,array:tZ,at:tJ,boolean:tZ,case:t2,coalesce:ia,collator:ig,format:i_,image:ib,in:tQ,"index-of":t1,interpolate:it,"interpolate-hcl":it,"interpolate-lab":it,length:ix,let:tY,literal:tV,match:t0,number:tZ,"number-format":iy,object:tZ,slice:t3,step:t6,string:tZ,"to-boolean":tq,"to-color":tq,"to-number":tq,"to-string":tq,var:tK,within:iR,distance:i3,"global-state":i5};class i4{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){let i=e[0],r=i4.definitions[i];if(!r)return t.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);let a=Array.isArray(r)?r[0]:r.type,n=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,o=n.filter(([t])=>!Array.isArray(t)||t.length===e.length-1),l=null;for(let[r,n]of o){l=new tX(t.registry,re,t.path,null,t.scope);let o=[],s=!1;for(let t=1;t<e.length;t++){let i=e[t],a=Array.isArray(r)?r[t-1]:r.type,n=l.parse(i,1+o.length,a);if(!n){s=!0;break}o.push(n)}if(!s)if(Array.isArray(r)&&r.length!==o.length)l.error(`Expected ${r.length} arguments, but found ${o.length} instead.`);else{for(let e=0;e<o.length;e++){let t=Array.isArray(r)?r[e]:r.type,i=o[e];l.concat(e+1).checkSubtype(t,i.type)}if(0===l.errors.length)return new i4(i,a,n,o)}}if(1===o.length)t.errors.push(...l.errors);else{let i=(o.length?o:n).map(([e])=>Array.isArray(e)?`(${e.map(e7).join(", ")})`:`(${e7(e.type)}...)`).join(" | "),r=[];for(let i=1;i<e.length;i++){let a=t.parse(e[i],1+r.length);if(!a)return null;r.push(e7(a.type))}t.error(`Expected arguments of type ${i}, but found (${r.join(", ")}) instead.`)}return null}static register(e,t){for(let i in i4.definitions=t,t)e[i]=i4}}function i8(e,[t,i,r,a]){t=t.evaluate(e),i=i.evaluate(e),r=r.evaluate(e);let n=a?a.evaluate(e):1,o=tj(t,i,r,n);if(o)throw new tR(o);return new tT(t/255,i/255,r/255,n,!1)}function i7(e,t){let i=t[e];return void 0===i?null:i}function i9(e){return{type:e}}function re(e){if(e instanceof tK)return re(e.boundExpression);if(e instanceof i4&&"error"===e.name||e instanceof ig||e instanceof iR||e instanceof i3||e instanceof i5)return!1;let t=e instanceof tq||e instanceof tZ,i=!0;return e.eachChild(e=>{i=t?i&&re(e):i&&e instanceof tV}),!!i&&rt(e)&&rr(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function rt(e){if(e instanceof i4&&("get"===e.name&&1===e.args.length||"feature-state"===e.name||"has"===e.name&&1===e.args.length||"properties"===e.name||"geometry-type"===e.name||"id"===e.name||/^filter-/.test(e.name))||e instanceof iR||e instanceof i3)return!1;let t=!0;return e.eachChild(e=>{t&&!rt(e)&&(t=!1)}),t}function ri(e){if(e instanceof i4&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!ri(e)&&(t=!1)}),t}function rr(e,t){if(e instanceof i4&&t.indexOf(e.name)>=0)return!1;let i=!0;return e.eachChild(e=>{i&&!rr(e,t)&&(i=!1)}),i}function ra(e){return{result:"success",value:e}}function rn(e){return{result:"error",value:e}}function ro(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function rl(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function rs(e){return!!e.expression&&e.expression.interpolated}function rc(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function ru(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&tN(e)===eJ}function rh(e){return e}function rp(e,t,i){return void 0!==e?e:void 0!==t?t:void 0!==i?i:void 0}function rd(e,t,i,r,a){return rp(typeof i===a?r[i]:void 0,e.default,t.default)}function rf(e,t,i){if("number"!==rc(i))return rp(e.default,t.default);let r=e.stops.length;if(1===r||i<=e.stops[0][0])return e.stops[0][1];if(i>=e.stops[r-1][0])return e.stops[r-1][1];let a=t5(e.stops.map(e=>e[0]),i);return e.stops[a][1]}
1function rm(e,t,i){let r=void 0!==e.base?e.base:1;if("number"!==rc(i))return rp(e.default,t.default);let a=e.stops.length;if(1===a||i<=e.stops[0][0])return e.stops[0][1];if(i>=e.stops[a-1][0])return e.stops[a-1][1];let n=t5(e.stops.map(e=>e[0]),i),o=function(e,t,i,r){let a=r-i,n=e-i;return 0===a?0:1===t?n/a:(Math.pow(t,n)-1)/(Math.pow(t,a)-1)}(i,r,e.stops[n][0],e.stops[n+1][0]),l=e.stops[n][1],s=e.stops[n+1][1],c=ir[t.type]||rh;return"function"==typeof l.evaluate?{evaluate(...t){let i=l.evaluate.apply(void 0,t),r=s.evaluate.apply(void 0,t);if(void 0!==i&&void 0!==r)return c(i,r,o,e.colorSpace)}}:c(l,s,o,e.colorSpace)}function rg(e,t,i){switch(t.type){case"color":i=tT.parse(i);break;case"formatted":i=tP.fromString(i.toString());break;case"resolvedImage":i=tO.fromString(i.toString());break;case"padding":i=tI.parse(i);break;case"colorArray":i=tC.parse(i);break;case"numberArray":i=tA.parse(i);break;default:rc(i)===t.type||"enum"===t.type&&t.values[i]||(i=void 0)}return rp(i,e.default,t.default)}i4.register(i6,{error:[{kind:"error"},[eW],(e,[t])=>{throw new tR(t.evaluate(e))}],typeof:[eW,[eQ],(e,[t])=>
1e7(tN(t.evaluate(e)))],"to-rgba":[e8(eH,4),[eY],(e,[t])=>{let[i,r,a,n]=t.evaluate(e).rgb;return[255*i,255*r,255*a,n]}],rgb:[eY,[eH,eH,eH],i8],rgba:[eY,[eH,eH,eH,eH],i8],has:{type:eX,overloads:[[[eW],(e,[t])=>t.evaluate(e)in e.properties()],[[eW,eJ],(e,[t,i])=>t.evaluate(e)in i.evaluate(e)]]},get:{type:eQ,overloads:[[[eW],(e,[t])=>i7(t.evaluate(e),e.properties())],[[eW,eJ],(e,[t,i])=>i7(t.evaluate(e),i.evaluate(e))]]},"feature-state":[eQ,[eW],(e,[t])=>i7(t.evaluate(e),e.featureState||{})],properties:[eJ,[],e=>e.properties()],"geometry-type":[eW,[],e=>e.geometryType()],id:[eQ,[],e=>e.id()],zoom:[eH,[],e=>e.globals.zoom],"heatmap-density":[eH,[],e=>e.globals.heatmapDensity||0],elevation:[eH,[],e=>e.globals.elevation||0],"line-progress":[eH,[],e=>e.globals.lineProgress||0],accumulated:[eQ,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[eH,i9(eH),(e,t)=>{let i=0;for(let r of t)i+=r.evaluate(e);return i}],"*":[eH,i9(eH),(e,t)=>{let i=1;for(let r of t)i*=r.evaluate(e);return i}],"-":{type:eH,overloads:[[[eH,eH],(e,[t,i])=>t.evaluate(e)-i.evaluate(e)],[[eH],(e,[t])=>-t.evaluate(e)]]},"/":[eH,[eH,eH],(e,[t,i])=>t.evaluate(e)/i.evaluate(e)],"%":[eH,[eH,eH],(e,[t,i])=>t.evaluate(e)%i.evaluate(e)],ln2:[eH,[],()=>Math.LN2],pi:[eH,[],()=>Math.PI],e:[eH,[],()=>Math.E],"^":[eH,[eH,eH],(e,[t,i])=>Math.pow(t.evaluate(e),i.evaluate(e))],sqrt:[eH,[eH],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[eH,[eH],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[eH,[eH],(e,[t])=>Math.log(t.evaluate(e))],log2:[eH,[eH],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[eH,[eH],(e,[t])=>Math.sin(t.evaluate(e))],cos:[eH,[eH],(e,[t])=>Math.cos(t.evaluate(e))],tan:[eH,[eH],(e,[t])=>Math.tan(t.evaluate(e))],asin:[eH,[eH],(e,[t])=>Math.asin(t.evaluate(e))],acos:[eH,[eH],(e,[t])=>Math.acos(t.evaluate(e))],atan:[eH,[eH],(e,[t])=>Math.atan(t.evaluate(e))],min:[eH,i9(eH),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[eH,i9(eH),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[eH,[eH],(e,[t])=>Math.abs(t.evaluate(e))],round:[eH,[eH],(e,[t])=>{let i=t.evaluate(e);return i<0?-Math.round(-i):Math.round(i)}],floor:[eH,[eH],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[eH,[eH],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[eX,[eW,eQ],(e,[t,i])=>e.properties()[t.value]===i.value],"filter-id-==":[eX,[eQ],(e,[t])=>e.id()===t.value],"filter-type-==":[eX,[eW],(e,[t])=>e.geometryType()===t.value],"filter-<":[eX,[eW,eQ],(e,[t,i])=>{let r=e.properties()[t.value],a=i.value;return typeof r==typeof a&&r<a}],"filter-id-<":[eX,[eQ],(e,[t])=>{let i=e.id(),r=t.value;return typeof i==typeof r&&i<r}],"filter->":[eX,[eW,eQ],(e,[t,i])=>{let r=e.properties()[t.value],a=i.value;return typeof r==typeof a&&r>a}],"filter-id->":[eX,[eQ],(e,[t])=>{let i=e.id(),r=t.value;return typeof i==typeof r&&i>r}],"filter-<=":[eX,[eW,eQ],(e,[t,i])=>{let r=e.properties()[t.value],a=i.value;return typeof r==typeof a&&r<=a}],"filter-id-<=":[eX,[eQ],(e,[t])=>{let i=e.id(),r=t.value;return typeof i==typeof r&&i<=r}],"filter->=":[eX,[eW,eQ],(e,[t,i])=>{let r=e.properties()[t.value],a=i.value;return typeof r==typeof a&&r>=a}],"filter-id->=":[eX,[eQ],(e,[t])=>{let i=e.id(),r=t.value;return typeof i==typeof r&&i>=r}],"filter-has":[eX,[eQ],(e,[t])=>t.value in e.properties()],"filter-has-id":[eX,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[eX,[e8(eW)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[eX,[e8(eQ)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[eX,[eW,e8(eQ)],(e,[t,i])=>i.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[eX,[eW,e8(eQ)],(e,[t,i])=>(function(e,t,i,r){for(;i<=r;){let a=i+r>>1;if(t[a]===e)return!0;t[a]>e?r=a-1:i=a+1}return!1})(e.properties()[t.value],i.value,0,i.value.length-1)],all:{type:eX,overloads:[[[eX,eX],(e,[t,i])=>t.evaluate(e)&&i.evaluate(e)],[i9(eX),(e,t)=>{for(let i of t)if(!i.evaluate(e))return!1;return!0}]]},any:{type:eX,overloads:[[[eX,eX],(e,[t,i])=>t.evaluate(e)||i.evaluate(e)],[i9(eX),(e,t)=>{for(let i of t)if(i.evaluate(e))return!0;return!1}]]},"!":[eX,[eX],(e,[t])=>!t.evaluate(e)],"is-supported-script":[eX,[eW],(e,[t])=>{let i=e.globals&&e.globals.isSupportedScript;return!i||i(t.evaluate(e))}],upcase:[eW,[eW],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[eW,[eW],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[eW,i9(eQ),(e,t)=>t.map(t=>tU(t.evaluate(e))).join("")],"resolved-locale":[eW,[e1],(e,[t])=>t.evaluate(e).resolvedLocale()]});class ry{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new tW,this._defaultValue=t?function(e){if("color"===e.type&&ru(e.default))return new tT(0,0,0,0);switch(e.type){case"color":return tT.parse(e.default)||null;case"padding":return tI.parse(e.default)||null;case"numberArray":return tA.parse(e.default)||null;case"colorArray":return tC.parse(e.default)||null;case"variableAnchorOffsetCollection":return tD.parse(e.default)||null;case"projectionDefinition":return tF.parse(e.default)||null;default:return void 0===e.default?null:e.default}}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null}evaluateWithoutErrorHandling(e,t,i,r,a,n){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.canonical=r,this._evaluator.availableImages=a||null,this._evaluator.formattedSection=n,this.expression.evaluate(this._evaluator)}evaluate(e,t,i,r,a,n){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=i||null,this._evaluator.canonical=r,this._evaluator.availableImages=a||null,this._evaluator.formattedSection=n||null;try{let e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new tR(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}}}function r_(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in i6}function rb(e,t){let i=new tX(i6,re,[],t?function(e){let t={color:eY,string:eW,number:eH,enum:eW,boolean:eX,formatted:e0,padding:e2,numberArray:e5,colorArray:e3,projectionDefinition:eK,resolvedImage:e6,variableAnchorOffsetCollection:e4};return"array"===e.type?e8(t[e.value]||eQ,e.length):t[e.type]}(t):void 0),r=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return r?ra(new ry(r,t)):rn(i.errors)}class rx{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!ri(t.expression),this.globalStateRefs=rS(t.expression)}evaluateWithoutErrorHandling(e,t,i,r,a,n){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,r,a,n)}evaluate(e,t,i,r,a,n){return this._styleExpression.evaluate(e,t,i,r,a,n)}}class rv{constructor(e,t,i,r){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent="camera"!==e&&!ri(t.expression),this.globalStateRefs=rS(t.expression),this.interpolationType=r}evaluateWithoutErrorHandling(e,t,i,r,a,n){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,r,a,n)}evaluate(e,t,i,r,a,n){return this._styleExpression.evaluate(e,t,i,r,a,n)}interpolationFactor(e,t,i){return this.interpolationType?it.interpolationFactor(this.interpolationType,e,t,i):0}}function rw(e,t){let i=rb(e,t);if("error"===i.result)return i;let r=i.value.expression,a=rt(r);if(!a&&!ro(t))return rn([new eZ("","data expressions not supported")]);let n=rr(r,["zoom"]);if(!n&&!rl(t))return rn([new eZ("","zoom expressions not supported")]);let o=function e(t){let i=null;if(t instanceof tY)i=e(t.result);else if(t instanceof ia){for(let r of t.args)if(i=e(r))break}else(t instanceof t6||t instanceof it)&&t.input instanceof i4&&"zoom"===t.input.name&&(i=t);return i instanceof eZ||t.eachChild(t=>{let r=e(t);r instanceof eZ?i=r:!i&&r?i=new eZ("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):i&&r&&i!==r&&(i=new eZ("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),i}(r);return o||n?o instanceof eZ?rn([o]):o instanceof it&&!rs(t)?rn([new eZ("",'"interpolate" expressions cannot be used with this property')]):ra(o?new rv(a?"camera":"composite",i.value,o.labels,o instanceof it?o.interpolation:void 0):new rx(a?"constant":"source",i.value)):rn([new eZ("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class rz{constructor(e,t){this._parameters=e,this._specification=t,e$(this,function e(t,i){var r;let a,n,o=t.stops&&"object"==typeof t.stops[0][0],l=o||!(o||void 0!==t.property),s=t.type||(rs(i)?"exponential":"interval"),c=function(e){switch(e.type){case"color":return tT.parse;case"padding":return tI.parse;case"numberArray":return tA.parse;case"colorArray":return tC.parse;default:return null}}(i);if(c&&((t=e$({},t)).stops&&(t.stops=t.stops.map(e=>[e[0],c(e[1])])),t.default=c(t.default?t.default:i.default)),t.colorSpace&&"rgb"!==(r=t.colorSpace)&&"hcl"!==r&&"lab"!==r)throw Error(`Unknown color space: "${t.colorSpace}"`);let u=function(e){switch(e){case"exponential":return rm;case"interval":return rf;case"categorical":return rd;case"identity":return rg;default:throw Error(`Unknown function type "${e}"`)}}(s);if("categorical"===s){for(let e of(a=Object.create(null),t.stops))a[e[0]]=e[1];n=typeof t.stops[0][0]}if(o){let r={},a=[];for(let e=0;e<t.stops.length;e++){let i=t.stops[e],n=i[0].zoom;
1void 0===r[n]&&(r[n]={zoom:n,type:t.type,property:t.property,default:t.default,stops:[]},a.push(n)),r[n].stops.push([i[0].value,i[1]])}let n=[];for(let t of a)n.push([r[t].zoom,e(r[t],i)]);let o={name:"linear"};return{kind:"composite",interpolationType:o,interpolationFactor:it.interpolationFactor.bind(void 0,o),zoomStops:n.map(e=>e[0]),evaluate:({zoom:e},r)=>rm({stops:n,base:t.base},i,e).evaluate(e,r)}}if(l){let e="exponential"===s?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:e,interpolationFactor:it.interpolationFactor.bind(void 0,e),zoomStops:t.stops.map(e=>e[0]),evaluate:({zoom:e})=>u(t,i,e,a,n)}}return{kind:"source",evaluate(e,r){let o=r&&r.properties?r.properties[t.property]:void 0;return void 0===o?rp(t.default,i.default):u(t,i,o,a,n)}}}(this._parameters,this._specification))}static deserialize(e){return new rz(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function rS(e,t=new Set){return e instanceof i5&&t.add(e.key),e.eachChild(e=>{rS(e,t)}),t}function rT(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(let t of e.slice(1))if(!rT(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}let rk={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function rE(e){if(null==e)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};rT(e)||(e=function e(t){if(!t)return!0;let i=t[0];return t.length<=1?"any"!==i:"=="===i?rP(t[1],t[2],"=="):"!="===i?rC(rP(t[1],t[2],"==")):"<"===i||">"===i||"<="===i||">="===i?rP(t[1],t[2],i):"any"===i?["any"].concat(t.slice(1).map(e)):"all"===i?["all"].concat(t.slice(1).map(e)):"none"===i?["all"].concat(t.slice(1).map(e).map(rC)):"in"===i?rI(t[1],t.slice(2)):"!in"===i?rC(rI(t[1],t.slice(2))):"has"===i?rA(t[1]):"!has"!==i||rC(rA(t[1]))}(e));let t=rb(e,rk);if("error"===t.result)throw Error(t.value.map(e=>`${e.key}: ${e.message}`).join(", "));return{filter:(e,i,r)=>t.value.evaluate(e,i,{},r),needGeometry:function e(t){if(!Array.isArray(t))return!1;if("within"===t[0]||"distance"===t[0])return!0;for(let i=1;i<t.length;i++)if(e(t[i]))return!0;return!1}(e),getGlobalStateRefs:()=>rS(t.value.expression)}}function rM(e,t){return e<t?-1:+(e>t)}function rP(e,t,i){switch(e){case"$type":return[`filter-type-${i}`,t];case"$id":return[`filter-id-${i}`,t];default:return[`filter-${i}`,e,t]}}function rI(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(rM)]]:["filter-in-small",e,["literal",t]]}}function rA(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function rC(e){return["!",e]}function rR(e){let t=e.value;
1return t?[new eV(e.key,t,"constants have been deprecated as of v8")]:[]}function rL(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function rD(e){if(Array.isArray(e))return e.map(rD);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let t={};for(let i in e)t[i]=rD(e[i]);return t}return rL(e)}function rO(e){let t=e.key,i=e.value,r=e.valueSpec||{},a=e.objectElementValidators||{},n=e.style,o=e.styleSpec,l=e.validateSpec,s=[],c=rc(i);if("object"!==c)return[new eV(t,i,`object expected, ${c} found`)];for(let e in i){let c,u=e.split(".")[0],h=t_(r,u)||r["*"];if(t_(a,u))c=a[u];else if(t_(r,u))c=l;else if(a["*"])c=a["*"];else{if(!r["*"]){s.push(new eV(t,i[e],`unknown property "${e}"`));continue}c=l}s=s.concat(c({key:(t?`${t}.`:t)+e,value:i[e],valueSpec:h,style:n,styleSpec:o,object:i,objectKey:e,validateSpec:l},i))}for(let e in r)a[e]||r[e].required&&void 0===r[e].default&&void 0===i[e]&&s.push(new eV(t,i,`missing required property "${e}"`));return s}function rF(e){let t=e.value,i=e.valueSpec,r=e.style,a=e.styleSpec,n=e.key,o=e.arrayElementValidator||e.validateSpec;if("array"!==rc(t))return[new eV(n,t,`array expected, ${rc(t)} found`)];if(i.length&&t.length!==i.length)return[new eV(n,t,`array length ${i.length} expected, length ${t.length} found`)];if(i["min-length"]&&t.length<i["min-length"])return[new eV(n,t,`array length at least ${i["min-length"]} expected, length ${t.length} found`)];let l={type:i.value,values:i.values};a.$version<7&&(l.function=i.function),"object"===rc(i.value)&&(l=i.value);let s=[];for(let i=0;i<t.length;i++)s=s.concat(o({array:t,arrayIndex:i,value:t[i],valueSpec:l,validateSpec:e.validateSpec,style:r,styleSpec:a,key:`${n}[${i}]`}));return s}function rj(e){let t=e.key,i=e.value,r=e.valueSpec,a=rc(i);return"number"===a&&i!=i&&(a="NaN"),"number"!==a?[new eV(t,i,`number expected, ${a} found`)]:"minimum"in r&&i<r.minimum?[new eV(t,i,`${i} is less than the minimum value ${r.minimum}`)]:"maximum"in r&&i>r.maximum?[new eV(t,i,`${i} is greater than the maximum value ${r.maximum}`)]:[]}function rB(e){let t=e.valueSpec,i=rL(e.value.type),r,a,n,o={},l="categorical"!==i&&void 0===e.value.property,s="array"===rc(e.value.stops)&&"array"===rc(e.value.stops[0])&&"object"===rc(e.value.stops[0][0]),c=rO({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===i)return[new eV(e.key,e.value,'identity function may not have a "stops" property')];let t=[],r=e.value;return t=t.concat(rF({key:e.key,value:r,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:u})),"array"===rc(r)&&0===r.length&&t.push(new eV(e.key,r,"array must have at least one stop")),t},default:function(e){return e.validateSpec({key:e.key,value:e.value,valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===i&&l&&c.push(new eV(e.key,e.value,'missing required property "property"')),"identity"===i||e.value.stops||c.push(new eV(e.key,e.value,'missing required property "stops"')),"exponential"===i&&e.valueSpec.expression&&!rs(e.valueSpec)&&c.push(new eV(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l||ro(e.valueSpec)?l&&!rl(e.valueSpec)&&c.push(new eV(e.key,e.value,"zoom functions not supported")):c.push(new eV(e.key,e.value,"property functions not supported"))),("categorical"===i||s)&&void 0===e.value.property&&c.push(new eV(e.key,e.value,'"property" property is required')),c;function u(e){let i=[],r=e.value,l=e.key;if("array"!==rc(r))return[new eV(l,r,`array expected, ${rc(r)} found`)];if(2!==r.length)return[new eV(l,r,`array length 2 expected, length ${r.length} found`)];if(s){if("object"!==rc(r[0]))return[new eV(l,r,`object expected, ${rc(r[0])} found`)];if(void 0===r[0].zoom)return[new eV(l,r,"object stop key must have zoom")];if(void 0===r[0].value)return[new eV(l,r,"object stop key must have value")];if(n&&n>rL(r[0].zoom))return[new eV(l,r[0].zoom,"stop zoom values must appear in ascending order")];rL(r[0].zoom)!==n&&(n=rL(r[0].zoom),a=void 0,o={}),i=i.concat(rO({key:`${l}[0]`,value:r[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:rj,value:h}}))}else i=i.concat(h({key:`${l}[0]`,value:r[0],validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},r));return r_(rD(r[1]))?i.concat([new eV(`${l}[1]`,r[1],"expressions are not allowed in function stops.")]):i.concat(e.validateSpec({key:`${l}[1]`,value:r[1],valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function h(e,n){let l=rc(e.value),s=rL(e.value),c=null!==e.value?e.value:n;
1if(r){if(l!==r)return[new eV(e.key,c,`${l} stop domain type must match previous stop domain type ${r}`)]}else r=l;if("number"!==l&&"string"!==l&&"boolean"!==l)return[new eV(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==l&&"categorical"!==i){let r=`number expected, ${l} found`;return ro(t)&&void 0===i&&(r+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new eV(e.key,c,r)]}return"categorical"!==i||"number"!==l||isFinite(s)&&Math.floor(s)===s?"categorical"!==i&&"number"===l&&void 0!==a&&s<a?[new eV(e.key,c,"stop domain values must appear in ascending order")]:(a=s,"categorical"===i&&s in o?[new eV(e.key,c,"stop domain values must be unique")]:(o[s]=!0,[])):[new eV(e.key,c,`integer expected, found ${s}`)]}}function rN(e){let t=("property"===e.expressionContext?rw:rb)(rD(e.value),e.valueSpec);if("error"===t.result)return t.value.map(t=>new eV(`${e.key}${t.key}`,e.value,t.message));let i=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!i.outputDefined())return[new eV(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!ri(i))return[new eV(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!ri(i))return[new eV(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!rr(i,["zoom","feature-state"]))return[new eV(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!rt(i))return[new eV(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function rU(e){let t=e.key,i=e.value,r=rc(i);return"string"!==r?[new eV(t,i,`color expected, ${r} found`)]:tT.parse(String(i))?[]:[new eV(t,i,`color expected, "${i}" found`)]}function rV(e){let t=e.key,i=e.value,r=e.valueSpec,a=[];return Array.isArray(r.values)?-1===r.values.indexOf(rL(i))&&a.push(new eV(t,i,`expected one of [${r.values.join(", ")}], ${JSON.stringify(i)} found`)):-1===Object.keys(r.values).indexOf(rL(i))&&a.push(new eV(t,i,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(i)} found`)),a}function r$(e){return rT(rD(e.value))?rN(e$({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function e(t){let i=t.value,r=t.key;if("array"!==rc(i))return[new eV(r,i,`array expected, ${rc(i)} found`)];let a=t.styleSpec,n,o=[];
1if(i.length<1)return[new eV(r,i,"filter array must have at least 1 element")];switch(o=o.concat(rV({key:`${r}[0]`,value:i[0],valueSpec:a.filter_operator,style:t.style,styleSpec:t.styleSpec})),rL(i[0])){case"<":case"<=":case">":case">=":i.length>=2&&"$type"===rL(i[1])&&o.push(new eV(r,i,`"$type" cannot be use with operator "${i[0]}"`));case"==":case"!=":3!==i.length&&o.push(new eV(r,i,`filter array for operator "${i[0]}" must have 3 elements`));case"in":case"!in":i.length>=2&&"string"!==(n=rc(i[1]))&&o.push(new eV(`${r}[1]`,i[1],`string expected, ${n} found`));for(let e=2;e<i.length;e++)n=rc(i[e]),"$type"===rL(i[1])?o=o.concat(rV({key:`${r}[${e}]`,value:i[e],valueSpec:a.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==n&&"number"!==n&&"boolean"!==n&&o.push(new eV(`${r}[${e}]`,i[e],`string, number, or boolean expected, ${n} found`));break;case"any":case"all":case"none":for(let a=1;a<i.length;a++)o=o.concat(e({key:`${r}[${a}]`,value:i[a],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":n=rc(i[1]),2!==i.length?o.push(new eV(r,i,`filter array for "${i[0]}" operator must have 2 elements`)):"string"!==n&&o.push(new eV(`${r}[1]`,i[1],`string expected, ${n} found`))}return o}(e)}function rZ(e,t){let i,r=e.key,a=e.validateSpec,n=e.style,o=e.styleSpec,l=e.value,s=e.objectKey,c=o[`${t}_${e.layerType}`];if(!c)return[];let u=s.match(/^(.*)-transition$/);if("paint"===t&&u&&c[u[1]]&&c[u[1]].transition)return a({key:r,value:l,valueSpec:o.transition,style:n,styleSpec:o});let h=e.valueSpec||c[s];if(!h)return[new eV(r,l,`unknown property "${s}"`)];if("string"===rc(l)&&ro(h)&&!h.tokens&&(i=/^{([^}]+)}$/.exec(l)))return[new eV(r,l,`"${s}" does not support interpolation syntax
2Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(i[1])} }\`.`)];let p=[];return"symbol"===e.layerType&&("text-field"===s&&n&&!n.glyphs&&p.push(new eV(r,l,'use of "text-field" requires a style "glyphs" property')),"text-font"===s&&ru(rD(l))&&"identity"===rL(l.type)&&p.push(new eV(r,l,'"text-font" does not support identity functions'))),p.concat(a({key:e.key,value:l,valueSpec:h,style:n,styleSpec:o,expressionContext:"property",propertyType:t,propertyKey:s}))}function rG(e){return rZ(e,"paint")}function rq(e){return rZ(e,"layout")}function rH(e){let t=[],i=e.value,r=e.key,a=e.style,n=e.styleSpec;if("object"!==rc(i))return[new eV(r,i,`object expected, ${rc(i)} found`)];i.type||i.ref||t.push(new eV(r,i,'either "type" or "ref" is required'));let o=rL(i.type),l=rL(i.ref);if(i.id){let n=rL(i.id);for(let o=0;o<e.arrayIndex;o++){let e=a.layers[o];rL(e.id)===n&&t.push(new eV(r,i.id,`duplicate layer id "${i.id}", previously used at line ${e.id.__line__}`))}}if("ref"in i){let e;["type","source","source-layer","filter","layout"].forEach(e=>{e in i&&t.push(new eV(r,i[e],`"${e}" is prohibited for ref layers`))}),a.layers.forEach(t=>{rL(t.id)===l&&(e=t)}),e?e.ref?t.push(new eV(r,i.ref,"ref cannot reference another ref layer")):o=rL(e.type):t.push(new eV(r,i.ref,`ref layer "${l}" not found`))}else if("background"!==o)if(i.source){let e=a.sources&&a.sources[i.source],n=e&&rL(e.type);e?"vector"===n&&"raster"===o?t.push(new eV(r,i.source,`layer "${i.id}" requires a raster source`)):"raster-dem"!==n&&"hillshade"===o||"raster-dem"!==n&&"color-relief"===o?t.push(new eV(r,i.source,`layer "${i.id}" requires a raster-dem source`)):"raster"===n&&"raster"!==o?t.push(new eV(r,i.source,`layer "${i.id}" requires a vector source`)):"vector"!==n||i["source-layer"]?"raster-dem"===n&&"hillshade"!==o&&"color-relief"!==o?t.push(new eV(r,i.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):"line"===o&&i.paint&&i.paint["line-gradient"]&&("geojson"!==n||!e.lineMetrics)&&t.push(new eV(r,i,`layer "${i.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new eV(r,i,`layer "${i.id}" must specify a "source-layer"`)):t.push(new eV(r,i.source,`source "${i.source}" not found`))}else t.push(new eV(r,i,'missing required property "source"'));return t=t.concat(rO({key:r,value:i,valueSpec:n.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":()=>[],type:()=>e.validateSpec({key:`${r}.type`,value:i.type,valueSpec:n.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:i,objectKey:"type"}),filter:r$,layout:e=>rO({layer:i,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>rq(e$({layerType:o},e))}}),paint:e=>rO({layer:i,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>rG(e$({layerType:o},e))}})}}))}function rW(e){let t=e.value,i=e.key,r=rc(t);return"string"!==r?[new eV(i,t,`string expected, ${r} found`)]:[]}let rX={promoteId:function({key:e,value:t}
2){if("string"===rc(t))return rW({key:e,value:t});{let i=[];for(let r in t)i.push(...rW({key:`${e}.${r}`,value:t[r]}));return i}}};function rY(e){let t,i=e.value,r=e.key,a=e.styleSpec,n=e.style,o=e.validateSpec;if(!i.type)return[new eV(r,i,'"type" is required')];let l=rL(i.type);switch(l){case"vector":case"raster":return rO({key:r,value:i,valueSpec:a[`source_${l.replace("-","_")}`],style:e.style,styleSpec:a,objectElementValidators:rX,validateSpec:o});case"raster-dem":return function(e){var t;let i=null!=(t=e.sourceName)?t:"",r=e.value,a=e.styleSpec,n=a.source_raster_dem,o=e.style,l=[],s=rc(r);if(void 0===r)return l;if("object"!==s)return l.push(new eV("source_raster_dem",r,`object expected, ${s} found`)),l;let c="custom"===rL(r.encoding),u=["redFactor","greenFactor","blueFactor","baseShift"],h=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let t in r)!c&&u.includes(t)?l.push(new eV(t,r[t],`In "${i}": "${t}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):n[t]?l=l.concat(e.validateSpec({key:t,value:r[t],valueSpec:n[t],validateSpec:e.validateSpec,style:o,styleSpec:a})):l.push(new eV(t,r[t],`unknown property "${t}"`));return l}({sourceName:r,value:i,style:e.style,styleSpec:a,validateSpec:o});case"geojson":if(t=rO({key:r,value:i,valueSpec:a.source_geojson,style:n,styleSpec:a,validateSpec:o,objectElementValidators:rX}),i.cluster)for(let e in i.clusterProperties){let[a,n]=i.clusterProperties[e],o="string"==typeof a?[a,["accumulated"],["get",e]]:a;t.push(...rN({key:`${r}.${e}.map`,value:n,expressionContext:"cluster-map"})),t.push(...rN({key:`${r}.${e}.reduce`,value:o,expressionContext:"cluster-reduce"}))}return t;case"video":return rO({key:r,value:i,valueSpec:a.source_video,style:n,validateSpec:o,styleSpec:a});case"image":return rO({key:r,value:i,valueSpec:a.source_image,style:n,validateSpec:o,styleSpec:a});case"canvas":return[new eV(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return rV({key:`${r}.type`,value:i.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function rK(e){let t=e.value,i=e.styleSpec,r=i.light,a=e.style,n=[],o=rc(t);if(void 0===t)return n;if("object"!==o)return n.concat([new eV("light",t,`object expected, ${o} found`)]);for(let o in t){let l=o.match(/^(.*)-transition$/);n=n.concat(l&&r[l[1]]&&r[l[1]].transition?e.validateSpec({key:o,value:t[o],valueSpec:i.transition,validateSpec:e.validateSpec,style:a,styleSpec:i}):r[o]?e.validateSpec({key:o,value:t[o],valueSpec:r[o],validateSpec:e.validateSpec,style:a,styleSpec:i}):[new eV(o,t[o],`unknown property "${o}"`)])}return n}function rJ(e){let t=e.value,i=e.styleSpec,r=i.sky,a=e.style,n=rc(t);if(void 0===t)return[];if("object"!==n)return[new eV("sky",t,`object expected, ${n} found`)];let o=[];for(let n in t)o=o.concat(r[n]?e.validateSpec({key:n,value:t[n],valueSpec:r[n],style:a,styleSpec:i}):[new eV(n,t[n],`unknown property "${n}"`)]);return o}function rQ(e){let t=e.value,i=e.styleSpec,r=i.terrain,a=e.style,n=[],o=rc(t);if(void 0===t)return n;if("object"!==o)return n.concat([new eV("terrain",t,`object expected, ${o} found`)]);for(let o in t)n=n.concat(r[o]?e.validateSpec({key:o,value:t[o],valueSpec:r[o],validateSpec:e.validateSpec,style:a,styleSpec:i}):[new eV(o,t[o],`unknown property "${o}"`)]);return n}function r1(e){let t=[],i=e.value,r=e.key;if(Array.isArray(i)){let a=[],n=[];for(let o in i)i[o].id&&a.includes(i[o].id)&&t.push(new eV(r,i,`all the sprites' ids must be unique, but ${i[o].id} is duplicated`)),a.push(i[o].id),i[o].url&&n.includes(i[o].url)&&t.push(new eV(r,i,`all the sprites' URLs must be unique, but ${i[o].url} is duplicated`)),n.push(i[o].url),t=t.concat(rO({key:`${r}[${o}]`,value:i[o],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:e.validateSpec}));return t}return rW({key:r,value:i})}function r0(e){var t;return(t=e.value)&&t.constructor===Object?[]:[new eV(e.key,e.value,`object expected, ${rc(e.value)} found`)]}let r2={"*":()=>[],array:rF,boolean:function(e){let t=e.value,i=e.key,r=rc(t);return"boolean"!==r?[new eV(i,t,`boolean expected, ${r} found`)]:[]},number:rj,color:rU,constants:rR,enum:rV,filter:r$,function:rB,layer:rH,object:rO,source:rY,light:rK,sky:rJ,terrain:rQ,projection:function(e){let t=e.value,i=e.styleSpec,r=i.projection,a=e.style,n=rc(t);if(void 0===t)return[];if("object"!==n)return[new eV("projection",t,`object expected, ${n} found`)];let o=[];for(let n in t)o=o.concat(r[n]?e.validateSpec({key:n,value:t[n],valueSpec:r[n],style:a,styleSpec:i}):[new eV(n,t[n],`unknown property "${n}"`)]);return o},projectionDefinition:function(e){var t;let i=e.key,r=e.value,a=rc(r=r instanceof String?r.valueOf():r);return"array"!==a||Array.isArray(t=r)&&3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"number"==typeof t[2]||["interpolate","step","literal"].includes(r[0])?["array","string"].includes(a)?[]:[new eV(i,r,`projection expected, invalid type "${a}" found`)]:[new eV(i,r,`projection expected, invalid array ${JSON.stringify(r)} found`)]},string:rW,formatted:function(e){return 0===rW(e).length?[]:rN(e)},resolvedImage:function(e){return 0===rW(e).length?[]:rN(e)},padding:function(e){let t=e.key,i=e.value;if("array"===rc(i)){if(i.length<1||i.length>4)return[new eV(t,i,`padding requires 1 to 4 values; ${i.length} values found`)];let r={type:"number"},a=[];for(let n=0;n<i.length;n++)a=a.concat(e.validateSpec({key:`${t}[${n}]`,value:i[n],validateSpec:e.validateSpec,valueSpec:r}));return a}return rj({key:t,value:i,valueSpec:{}}
2)},numberArray:function(e){let t=e.key,i=e.value;if("array"===rc(i)){let r={type:"number"};if(i.length<1)return[new eV(t,i,"array length at least 1 expected, length 0 found")];let a=[];for(let n=0;n<i.length;n++)a=a.concat(e.validateSpec({key:`${t}[${n}]`,value:i[n],validateSpec:e.validateSpec,valueSpec:r}));return a}return rj({key:t,value:i,valueSpec:{}})},colorArray:function(e){let t=e.key,i=e.value;if("array"===rc(i)){if(i.length<1)return[new eV(t,i,"array length at least 1 expected, length 0 found")];let e=[];for(let r=0;r<i.length;r++)e=e.concat(rU({key:`${t}[${r}]`,value:i[r]}));return e}return rU({key:t,value:i})},variableAnchorOffsetCollection:function(e){let t=e.key,i=e.value,r=rc(i),a=e.styleSpec;if("array"!==r||i.length<1||i.length%2!=0)return[new eV(t,i,"variableAnchorOffsetCollection requires a non-empty array of even length")];let n=[];for(let r=0;r<i.length;r+=2)n=(n=n.concat(rV({key:`${t}[${r}]`,value:i[r],valueSpec:a.layout_symbol["text-anchor"]}))).concat(rF({key:`${t}[${r+1}]`,value:i[r+1],valueSpec:{length:2,value:"number"},validateSpec:e.validateSpec,style:e.style,styleSpec:a}));return n},sprite:r1,state:r0};function r3(e){let t=e.value,i=e.valueSpec,r=e.styleSpec;return e.validateSpec=r3,i.expression&&ru(rL(t))?rB(e):i.expression&&r_(rD(t))?rN(e):i.type&&r2[i.type]?r2[i.type](e):rO(e$({},e,{valueSpec:i.type?r[i.type]:i}))}function r5(e){let t=e.value,i=e.key,r=rW(e);return r.length||(-1===t.indexOf("{fontstack}")&&r.push(new eV(i,t,'"glyphs" url must include a "{fontstack}" token')),-1===t.indexOf("{range}")&&r.push(new eV(i,t,'"glyphs" url must include a "{range}" token'))),r}function r6(e,t=eR){let i=[];return i=i.concat(r3({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,validateSpec:r3,objectElementValidators:{glyphs:r5,"*":()=>[]}})),e.constants&&(i=i.concat(rR({key:"constants",value:e.constants}))),r8(i)}function r4(e){return function(t){return e({...t,validateSpec:r3})}}function r8(e){return[].concat(e).sort((e,t)=>e.line-t.line)}function r7(e){return function(...t){return r8(e.apply(this,t))}}r6.source=r7(r4(rY)),r6.sprite=r7(r4(r1)),r6.glyphs=r7(r4(r5)),r6.light=r7(r4(rK)),r6.sky=r7(r4(rJ)),r6.terrain=r7(r4(rQ)),r6.state=r7(r4(r0)),r6.layer=r7(r4(rH)),r6.filter=r7(r4(r$)),r6.paintProperty=r7(r4(rG)),r6.layoutProperty=r7(r4(rq));let r9=r6.light,ae=r6.sky,at=r6.paintProperty,ai=r6.layoutProperty;function ar(e,t){let i=!1;if(t&&t.length)for(let r of t)e.fire(new eA(Error(r.message))),i=!0;return i}class aa{constructor(e,t,i){let r=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let a=new Int32Array(this.arrayBuffer);e=a[0],this.d=(t=a[1])+2*(i=a[2]);for(let e=0;e<this.d*this.d;e++){let t=a[3+e],i=a[3+e+1];r.push(t===i?null:a.subarray(t,i))}let n=a[3+r.length+1];this.keys=a.subarray(a[3+r.length],n),this.bboxes=a.subarray(n),this.insert=this._insertReadonly}else{this.d=t+2*i;for(let e=0;e<this.d*this.d;e++)r.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=i,this.scale=t/e,this.uid=0;let a=i/t*e;this.min=-a,this.max=e+a}insert(e,t,i,r,a){this._forEachCell(t,i,r,a,this._insertCell,this.uid++,void 0,void 0),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(r),this.bboxes.push(a)}_insertReadonly(){throw Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(e,t,i,r,a,n){this.cells[a].push(n)}query(e,t,i,r,a){let n=this.min,o=this.max;if(e<=n&&t<=n&&o<=i&&o<=r&&!a)return Array.prototype.slice.call(this.keys);{let n=[];return this._forEachCell(e,t,i,r,this._queryCell,n,{},a),n}}_queryCell(e,t,i,r,a,n,o,l){let s=this.cells[a];if(null!==s){let a=this.keys,c=this.bboxes;for(let u=0;u<s.length;u++){let h=s[u];if(void 0===o[h]){let s=4*h;(l?l(c[s+0],c[s+1],c[s+2],c[s+3]):e<=c[s+2]&&t<=c[s+3]&&i>=c[s+0]&&r>=c[s+1])?(o[h]=!0,n.push(a[h])):o[h]=!1}}}}_forEachCell(e,t,i,r,a,n,o,l){let s=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(i),h=this._convertToCellCoord(r);for(let p=s;p<=u;p++)for(let s=c;s<=h;s++){let c=this.d*s+p;if((!l||l(this._convertFromCellCoord(p),this._convertFromCellCoord(s),this._convertFromCellCoord(p+1),this._convertFromCellCoord(s+1)))&&a.call(this,e,t,i,r,c,n,o,l))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,t=3+this.cells.length+1+1,i=0;for(let e=0;e<this.cells.length;e++)i+=this.cells[e].length;let r=new Int32Array(t+i+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;let a=t;for(let t=0;t<e.length;t++){let i=e[t];r[3+t]=a,r.set(i,a),a+=i.length}return r[3+e.length]=a,r.set(this.keys,a),a+=this.keys.length,r[3+e.length+1]=a,r.set(this.bboxes,a),a+=this.bboxes.length,r.buffer}static serialize(e,t){let i=e.toArrayBuffer();return t&&t.push(i),{buffer:i}}static deserialize(e){return new aa(e.buffer)}}let an={};function ao(e,t,i={}){if(an[e])throw Error(`${e} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}
2),an[e]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}}for(let e in ao("Object",Object),ao("Set",Set),ao("TransferableGridIndex",aa),ao("Color",tT),ao("Error",Error),ao("AJAXError",eS),ao("ResolvedImage",tO),ao("StylePropertyFunction",rz),ao("StyleExpression",ry,{omit:["_evaluator"]}),ao("ZoomDependentExpression",rv),ao("ZoomConstantExpression",rx),ao("CompoundExpression",i4,{omit:["_evaluate"]}),i6)i6[e]._classRegistryKey||ao(`Expression_${e}`,i6[e]);function al(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}function as(e){return e.$name||e.constructor._classRegistryKey}function ac(e){return!function(e){if(null===e||"object"!=typeof e)return!1;let t=as(e);return!(!t||"Object"===t)}(e)&&(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||al(e)||eh(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function au(e,t){if(ac(e))return(al(e)||eh(e))&&t&&t.push(e),ArrayBuffer.isView(e)&&t&&t.push(e.buffer),e instanceof ImageData&&t&&t.push(e.data.buffer),e;if(Array.isArray(e)){let i=[];for(let r of e)i.push(au(r,t));return i}if("object"!=typeof e)throw Error("can't serialize object of type "+typeof e);let i=as(e);if(!i)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!an[i])throw Error(`${i} is not registered.`);let{klass:r}=an[i],a=r.serialize?r.serialize(e,t):{};if(r.serialize){if(t&&a===t[t.length-1])throw Error("statically serialized object won't survive transfer of $name property")}else{for(let r in e){if(!e.hasOwnProperty(r)||an[i].omit.indexOf(r)>=0)continue;let n=e[r];a[r]=an[i].shallow.indexOf(r)>=0?n:au(n,t)}e instanceof Error&&(a.message=e.message)}if(a.$name)throw Error("$name property is reserved for worker serialization logic.");return"Object"!==i&&(a.$name=i),a}function ah(e){if(ac(e))return e;if(Array.isArray(e))return e.map(ah);if("object"!=typeof e)throw Error("can't deserialize object of type "+typeof e);let t=as(e)||"Object";if(!an[t])throw Error(`can't deserialize unregistered class ${t}`);let{klass:i}=an[t];if(!i)throw Error(`can't deserialize unregistered class ${t}`);if(i.deserialize)return i.deserialize(e);let r=Object.create(i.prototype);for(let i of Object.keys(e)){if("$name"===i)continue;let a=e[i];r[i]=an[t].shallow.indexOf(i)>=0?a:ah(a)}return r}class ap{constructor(){this.first=!0}update(e,t){let i=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<i&&(this.lastIntegerZoom=i,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=i,!0))}}let ad={"Latin-1 Supplement":e=>e>=128&&e<=255,"Hangul Jamo":e=>e>=4352&&e<=4607,Khmer:e=>e>=6016&&e<=6143,"General Punctuation":e=>e>=8192&&e<=8303,"Letterlike Symbols":e=>e>=8448&&e<=8527,"Number Forms":e=>e>=8528&&e<=8591,"Miscellaneous Technical":e=>e>=8960&&e<=9215,"Control Pictures":e=>e>=9216&&e<=9279,"Optical Character Recognition":e=>e>=9280&&e<=9311,"Enclosed Alphanumerics":e=>e>=9312&&e<=9471,"Geometric Shapes":e=>e>=9632&&e<=9727,"Miscellaneous Symbols":e=>e>=9728&&e<=9983,"Miscellaneous Symbols and Arrows":e=>e>=11008&&e<=11263,"Ideographic Description Characters":e=>e>=12272&&e<=12287,"CJK Symbols and Punctuation":e=>e>=12288&&e<=12351,Hiragana:e=>e>=12352&&e<=12447,Katakana:e=>e>=12448&&e<=12543,Kanbun:e=>e>=12688&&e<=12703,"CJK Strokes":e=>e>=12736&&e<=12783,"Enclosed CJK Letters and Months":e=>e>=12800&&e<=13055,"CJK Compatibility":e=>e>=13056&&e<=13311,"Yijing Hexagram Symbols":e=>e>=19904&&e<=19967,"CJK Unified Ideographs":e=>e>=19968&&e<=40959,"Hangul Syllables":e=>e>=44032&&e<=55215,"Private Use Area":e=>e>=57344&&e<=63743,"Vertical Forms":e=>e>=65040&&e<=65055,"CJK Compatibility Forms":e=>e>=65072&&e<=65103,"Small Form Variants":e=>e>=65104&&e<=65135,"Halfwidth and Fullwidth Forms":e=>e>=65280&&e<=65519};function af(e){for(let t of e)if(a_(t.charCodeAt(0)))return!0;return!1}function am(e){return RegExp(e.map(e=>{try{return RegExp(`\\p{sc=${e}}`,"u").source}catch(e){return null}}).filter(e=>e).join("|"),"u")}let ag=am(["Arab","Dupl","Mong","Ougr","Syrc"]),ay=am(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function a_(e){return!(746!==e&&747!==e&&(e<4352||!(ad["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||ad["CJK Compatibility"](e)||ad["CJK Strokes"](e)||!(!ad["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||ad["Enclosed CJK Letters and Months"](e)||ad["Ideographic Description Characters"](e)||ad.Kanbun(e)||ad.Katakana(e)&&12540!==e||!(!ad["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!ad["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||ad["Vertical Forms"](e)||ad["Yijing Hexagram Symbols"](e)||/\p{sc=Cans}/u.test(String.fromCodePoint(e))||/\p{sc=Hang}/u.test(String.fromCodePoint(e))||ay.test(String.fromCodePoint(e)))
2))}function ab(e){return!(a_(e)||ad["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||ad["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||ad["Letterlike Symbols"](e)||ad["Number Forms"](e)||ad["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||ad["Control Pictures"](e)&&9251!==e||ad["Optical Character Recognition"](e)||ad["Enclosed Alphanumerics"](e)||ad["Geometric Shapes"](e)||ad["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||ad["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||ad["CJK Symbols and Punctuation"](e)||ad.Katakana(e)||ad["Private Use Area"](e)||ad["CJK Compatibility Forms"](e)||ad["Small Form Variants"](e)||ad["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}let ax=am(["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 av(e){return ax.test(String.fromCodePoint(e))}let aw=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(e){this.pluginStatus=e.pluginStatus,this.pluginURL=e.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(e){if(aw.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getRTLTextPluginStatus(){return this.pluginStatus}syncState(e,t){return x(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if("loading"!==e.pluginStatus)return this.setState(e),e;let i=e.pluginURL,r=new Promise(e=>{this.loadScriptResolve=e});t(i);let a=new Promise(e=>setTimeout(()=>e(),this.TIMEOUT));if(yield Promise.race([r,a]),this.isParsed()){let e={pluginStatus:"loaded",pluginURL:i};return this.setState(e),e}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${i}`)})}};class az{constructor(e,t){this.zoom=e,t?(this.now=t.now||0,this.fadeDuration=t.fadeDuration||0,this.zoomHistory=t.zoomHistory||new ap,this.transition=t.transition||{},this.globalState=t.globalState||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ap,this.transition={},this.globalState={})}isSupportedScript(e){var t,i="loaded"===aw.getRTLTextPluginStatus();for(let r of e)if(t=r.charCodeAt(0),!i&&av(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||ad.Khmer(t))return!1;return!0}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let e=this.zoom,t=e-Math.floor(e),i=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*t}}}class aS{constructor(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(ru(e))return new rz(e,t);if(r_(e)){let i=rw(e,t);if("error"===i.result)throw Error(i.value.map(e=>`${e.key}: ${e.message}`).join(", "));return i.value}{let i=e;return"color"===t.type&&"string"==typeof e?i=tT.parse(e):"padding"===t.type&&("number"==typeof e||Array.isArray(e))?i=tI.parse(e):"numberArray"===t.type&&("number"==typeof e||Array.isArray(e))?i=tA.parse(e):"colorArray"===t.type&&("string"==typeof e||Array.isArray(e))?i=tC.parse(e):"variableAnchorOffsetCollection"===t.type&&Array.isArray(e)?i=tD.parse(e):"projectionDefinition"===t.type&&"string"==typeof e&&(i=tF.parse(e)),{globalStateRefs:new Set,kind:"constant",evaluate:()=>i}}}(void 0===t?e.specification.default:t,e.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}
2possiblyEvaluate(e,t,i){return this.property.possiblyEvaluate(this,e,t,i)}}class aT{constructor(e){this.property=e,this.value=new aS(e,void 0)}transitioned(e,t){return new aE(this.property,this.value,t,et({},e.transition,this.transition),e.now)}untransitioned(){return new aE(this.property,this.value,null,{},0)}}class ak{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return en(this._values[e].value.value)}setValue(e,t){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new aT(this._values[e].property)),this._values[e].value=new aS(this._values[e].property,null===t?void 0:en(t))}getTransition(e){return en(this._values[e].transition)}setTransition(e,t){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new aT(this._values[e].property)),this._values[e].transition=en(t)||void 0}serialize(){let e={};for(let t of Object.keys(this._values)){let i=this.getValue(t);void 0!==i&&(e[t]=i);let r=this.getTransition(t);void 0!==r&&(e[`${t}-transition`]=r)}return e}transitioned(e,t){let i=new aM(this._properties);for(let r of Object.keys(this._values))i._values[r]=this._values[r].transitioned(e,t._values[r]);return i}untransitioned(){let e=new aM(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class aE{constructor(e,t,i,r,a){this.property=e,this.value=t,this.begin=a+r.delay||0,this.end=this.begin+r.duration||0,e.specification.transition&&(r.delay||r.duration)&&(this.prior=i)}possiblyEvaluate(e,t,i){let r=e.now||0,a=this.value.possiblyEvaluate(e,t,i),n=this.prior;if(n){if(r>this.end||this.value.isDataDriven())return this.prior=null,a;if(r<this.begin)return n.possiblyEvaluate(e,t,i);{let o=(r-this.begin)/(this.end-this.begin);return this.property.interpolate(n.possiblyEvaluate(e,t,i),a,Y(o))}}return a}}class aM{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,t,i){let r=new aA(this._properties);for(let a of Object.keys(this._values))r._values[a]=this._values[a].possiblyEvaluate(e,t,i);return r}hasTransition(){for(let e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class aP{constructor(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)}hasValue(e){return void 0!==this._values[e].value}getValue(e){return en(this._values[e].value)}setValue(e,t){this._values[e]=new aS(this._values[e].property,null===t?void 0:en(t))}serialize(){let e={};for(let t of Object.keys(this._values)){let i=this.getValue(t);void 0!==i&&(e[t]=i)}return e}possiblyEvaluate(e,t,i){let r=new aA(this._properties);for(let a of Object.keys(this._values))r._values[a]=this._values[a].possiblyEvaluate(e,t,i);return r}}class aI{constructor(e,t,i){this.property=e,this.value=t,this.parameters=i}isConstant(){return"constant"===this.value.kind}constantOr(e){return"constant"===this.value.kind?this.value.value:e}evaluate(e,t,i,r){return this.property.evaluate(this.value,this.parameters,e,t,i,r)}}class aA{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class aC{constructor(e){this.specification=e}possiblyEvaluate(e,t){if(e.isDataDriven())throw Error("Value should not be data driven");return e.expression.evaluate(t)}interpolate(e,t,i){let r=ir[this.specification.type];return r?r(e,t,i):e}}class aR{constructor(e,t){this.specification=e,this.overrides=t}possiblyEvaluate(e,t,i,r){return new aI(this,"constant"===e.expression.kind||"camera"===e.expression.kind?{kind:"constant",value:e.expression.evaluate(t,null,{},i,r)}:e.expression,t)}interpolate(e,t,i){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new aI(this,{kind:"constant",value:void 0},e.parameters);let r=ir[this.specification.type];return r?new aI(this,{kind:"constant",value:r(e.value.value,t.value.value,i)},e.parameters):e}evaluate(e,t,i,r,a,n){return"constant"===e.kind?e.value:e.evaluate(t,i,r,a,n)}}class aL extends aR{possiblyEvaluate(e,t,i,r){if(void 0===e.value)return new aI(this,{kind:"constant",value:void 0},t);
2if("constant"===e.expression.kind){let a=e.expression.evaluate(t,null,{},i,r),n="resolvedImage"===e.property.specification.type&&"string"!=typeof a?a.name:a;return new aI(this,{kind:"constant",value:this._calculate(n,n,n,t)},t)}return"camera"===e.expression.kind?new aI(this,{kind:"constant",value:this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t)},t):new aI(this,e.expression,t)}evaluate(e,t,i,r,a,n){if("source"===e.kind){let o=e.evaluate(t,i,r,a,n);return this._calculate(o,o,o,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},i,r),e.evaluate({zoom:Math.floor(t.zoom)},i,r),e.evaluate({zoom:Math.floor(t.zoom)+1},i,r),t):e.value}_calculate(e,t,i,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}}interpolate(e){return e}}class aD{constructor(e){this.specification=e}possiblyEvaluate(e,t,i,r){if(void 0!==e.value){if("constant"===e.expression.kind){let a=e.expression.evaluate(t,null,{},i,r);return this._calculate(a,a,a,t)}return this._calculate(e.expression.evaluate(new az(Math.floor(t.zoom-1),t)),e.expression.evaluate(new az(Math.floor(t.zoom),t)),e.expression.evaluate(new az(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,i,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}}interpolate(e){return e}}class aO{constructor(e){this.specification=e}possiblyEvaluate(e,t,i,r){return!!e.expression.evaluate(t,null,{},i,r)}interpolate(){return!1}}class aF{constructor(e){for(let t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){let i=e[t];i.specification.overridable&&this.overridableProperties.push(t);let r=this.defaultPropertyValues[t]=new aS(i,void 0),a=this.defaultTransitionablePropertyValues[t]=new aT(i);this.defaultTransitioningPropertyValues[t]=a.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=r.possiblyEvaluate({})}}}ao("DataDrivenProperty",aR),ao("DataConstantProperty",aC),ao("CrossFadedDataDrivenProperty",aL),ao("CrossFadedProperty",aD),ao("ColorRampProperty",aO);let aj="-transition";class aB extends eC{constructor(e,t){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter,this._featureFilter=rE(e.filter)),t.layout&&(this._unevaluatedLayout=new aP(t.layout)),t.paint)){for(let i in this._transitionablePaint=new ak(t.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(let t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new aA(t.paint)}}setFilter(e){this.filter=e,this._featureFilter=rE(e)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)}getLayoutAffectingGlobalStateRefs(){let e=new Set;if(this._unevaluatedLayout)for(let t in this._unevaluatedLayout._values)for(let i of this._unevaluatedLayout._values[t].getGlobalStateRefs())e.add(i);for(let t of this._featureFilter.getGlobalStateRefs())e.add(t);return e}setLayoutProperty(e,t,i={}){null!=t&&this._validate(ai,`layers.${this.id}.layout.${e}`,e,t,i)||("visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t)}getPaintProperty(e){return e.endsWith(aj)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,t,i={}){if(null!=t&&this._validate(at,`layers.${this.id}.paint.${e}`,e,t,i))return!1;if(e.endsWith(aj))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let i=this._transitionablePaint._values[e],r="cross-faded-data-driven"===i.property.specification["property-type"],a=i.value.isDataDriven(),n=i.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let o=this._transitionablePaint._values[e].value;return o.isDataDriven()||a||r||this._handleOverridablePaintPropertyUpdate(e,n,o)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,i){return!1}
2isHidden(e){return!!(this.minzoom&&e<this.minzoom)||!!(this.maxzoom&&e>=this.maxzoom)||"none"===this.visibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){let e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),ea(e,(e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length))}_validate(e,t,i,r,a={}){return(!a||!1!==a.validate)&&ar(this,e.call(r6,{key:t,layerType:this.type,objectKey:i,value:r,styleSpec:eR,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let t=this.paint.get(e);if(t instanceof aI&&ro(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}}let aN={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class aU{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class aV{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function a$(e,t=1){let i=0,r=0;return{members:e.map(e=>{let a=aN[e.type].BYTES_PER_ELEMENT,n=i=aZ(i,Math.max(t,a)),o=e.components||1;return r=Math.max(r,a),i+=a*o,{name:e.name,type:e.type,components:o,offset:n}}),size:aZ(i,Math.max(r,t)),alignment:t}}function aZ(e,t){return Math.ceil(e/t)*t}class aG extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){let i=this.length;return this.resize(i+1),this.emplace(i,e,t)}emplace(e,t,i){let r=2*e;return this.int16[r+0]=t,this.int16[r+1]=i,e}}aG.prototype.bytesPerElement=4,ao("StructArrayLayout2i4",aG);class aq extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i){let r=this.length;return this.resize(r+1),this.emplace(r,e,t,i)}emplace(e,t,i,r){let a=3*e;return this.int16[a+0]=t,this.int16[a+1]=i,this.int16[a+2]=r,e}}aq.prototype.bytesPerElement=6,ao("StructArrayLayout3i6",aq);class aH extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i,r){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,r)}emplace(e,t,i,r,a){let n=4*e;return this.int16[n+0]=t,this.int16[n+1]=i,this.int16[n+2]=r,this.int16[n+3]=a,e}}aH.prototype.bytesPerElement=8,ao("StructArrayLayout4i8",aH);class aW extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,i,r,a,n)}emplace(e,t,i,r,a,n,o){let l=6*e;return this.int16[l+0]=t,this.int16[l+1]=i,this.int16[l+2]=r,this.int16[l+3]=a,this.int16[l+4]=n,this.int16[l+5]=o,e}}
2aW.prototype.bytesPerElement=12,ao("StructArrayLayout2i4i12",aW);class aX extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,i,r,a,n)}emplace(e,t,i,r,a,n,o){let l=4*e,s=8*e;return this.int16[l+0]=t,this.int16[l+1]=i,this.uint8[s+4]=r,this.uint8[s+5]=a,this.uint8[s+6]=n,this.uint8[s+7]=o,e}}aX.prototype.bytesPerElement=8,ao("StructArrayLayout2i4ub8",aX);class aY extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){let i=this.length;return this.resize(i+1),this.emplace(i,e,t)}emplace(e,t,i){let r=2*e;return this.float32[r+0]=t,this.float32[r+1]=i,e}}aY.prototype.bytesPerElement=8,ao("StructArrayLayout2f8",aY);class aK extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o,l,s,c){let u=this.length;return this.resize(u+1),this.emplace(u,e,t,i,r,a,n,o,l,s,c)}emplace(e,t,i,r,a,n,o,l,s,c,u){let h=10*e;return this.uint16[h+0]=t,this.uint16[h+1]=i,this.uint16[h+2]=r,this.uint16[h+3]=a,this.uint16[h+4]=n,this.uint16[h+5]=o,this.uint16[h+6]=l,this.uint16[h+7]=s,this.uint16[h+8]=c,this.uint16[h+9]=u,e}}aK.prototype.bytesPerElement=20,ao("StructArrayLayout10ui20",aK);class aJ extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o,l,s,c,u,h){let p=this.length;return this.resize(p+1),this.emplace(p,e,t,i,r,a,n,o,l,s,c,u,h)}emplace(e,t,i,r,a,n,o,l,s,c,u,h,p){let d=12*e;return this.int16[d+0]=t,this.int16[d+1]=i,this.int16[d+2]=r,this.int16[d+3]=a,this.uint16[d+4]=n,this.uint16[d+5]=o,this.uint16[d+6]=l,this.uint16[d+7]=s,this.int16[d+8]=c,this.int16[d+9]=u,this.int16[d+10]=h,this.int16[d+11]=p,e}}aJ.prototype.bytesPerElement=24,ao("StructArrayLayout4i4ui4i24",aJ);class aQ extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i){let r=this.length;return this.resize(r+1),this.emplace(r,e,t,i)}emplace(e,t,i,r){let a=3*e;return this.float32[a+0]=t,this.float32[a+1]=i,this.float32[a+2]=r,e}}aQ.prototype.bytesPerElement=12,ao("StructArrayLayout3f12",aQ);class a1 extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[+e+0]=t,e}}a1.prototype.bytesPerElement=4,ao("StructArrayLayout1ul4",a1);class a0 extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o,l,s){let c=this.length;return this.resize(c+1),this.emplace(c,e,t,i,r,a,n,o,l,s)}emplace(e,t,i,r,a,n,o,l,s,c){let u=10*e;return this.int16[u+0]=t,this.int16[u+1]=i,this.int16[u+2]=r,this.int16[u+3]=a,this.int16[u+4]=n,this.int16[u+5]=o,this.uint32[5*e+3]=l,this.uint16[u+8]=s,this.uint16[u+9]=c,e}}a0.prototype.bytesPerElement=20,ao("StructArrayLayout6i1ul2ui20",a0);class a2 extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,i,r,a,n)}emplace(e,t,i,r,a,n,o){let l=6*e;return this.int16[l+0]=t,this.int16[l+1]=i,this.int16[l+2]=r,this.int16[l+3]=a,this.int16[l+4]=n,this.int16[l+5]=o,e}}
2a2.prototype.bytesPerElement=12,ao("StructArrayLayout2i2i2i12",a2);class a3 extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,i,r,a)}emplace(e,t,i,r,a,n){let o=4*e,l=8*e;return this.float32[o+0]=t,this.float32[o+1]=i,this.float32[o+2]=r,this.int16[l+6]=a,this.int16[l+7]=n,e}}a3.prototype.bytesPerElement=16,ao("StructArrayLayout2f1f2i16",a3);class a5 extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,i,r,a,n)}emplace(e,t,i,r,a,n,o){let l=16*e,s=4*e,c=8*e;return this.uint8[l+0]=t,this.uint8[l+1]=i,this.float32[s+1]=r,this.float32[s+2]=a,this.int16[c+6]=n,this.int16[c+7]=o,e}}a5.prototype.bytesPerElement=16,ao("StructArrayLayout2ub2f2i16",a5);class a6 extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,i){let r=this.length;return this.resize(r+1),this.emplace(r,e,t,i)}emplace(e,t,i,r){let a=3*e;return this.uint16[a+0]=t,this.uint16[a+1]=i,this.uint16[a+2]=r,e}}a6.prototype.bytesPerElement=6,ao("StructArrayLayout3ui6",a6);class a4 extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o,l,s,c,u,h,p,d,f,m,g){let y=this.length;return this.resize(y+1),this.emplace(y,e,t,i,r,a,n,o,l,s,c,u,h,p,d,f,m,g)}emplace(e,t,i,r,a,n,o,l,s,c,u,h,p,d,f,m,g,y){let _=24*e,b=12*e,x=48*e;return this.int16[_+0]=t,this.int16[_+1]=i,this.uint16[_+2]=r,this.uint16[_+3]=a,this.uint32[b+2]=n,this.uint32[b+3]=o,this.uint32[b+4]=l,this.uint16[_+10]=s,this.uint16[_+11]=c,this.uint16[_+12]=u,this.float32[b+7]=h,this.float32[b+8]=p,this.uint8[x+36]=d,this.uint8[x+37]=f,this.uint8[x+38]=m,this.uint32[b+10]=g,this.int16[_+22]=y,e}}a4.prototype.bytesPerElement=48,ao("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",a4);class a8 extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o,l,s,c,u,h,p,d,f,m,g,y,_,b,x,v,w,z,S,T,k,E){let M=this.length;return this.resize(M+1),this.emplace(M,e,t,i,r,a,n,o,l,s,c,u,h,p,d,f,m,g,y,_,b,x,v,w,z,S,T,k,E)}emplace(e,t,i,r,a,n,o,l,s,c,u,h,p,d,f,m,g,y,_,b,x,v,w,z,S,T,k,E,M){let P=32*e,I=16*e;return this.int16[P+0]=t,this.int16[P+1]=i,this.int16[P+2]=r,this.int16[P+3]=a,this.int16[P+4]=n,this.int16[P+5]=o,this.int16[P+6]=l,this.int16[P+7]=s,this.uint16[P+8]=c,this.uint16[P+9]=u,this.uint16[P+10]=h,this.uint16[P+11]=p,this.uint16[P+12]=d,this.uint16[P+13]=f,this.uint16[P+14]=m,this.uint16[P+15]=g,this.uint16[P+16]=y,this.uint16[P+17]=_,this.uint16[P+18]=b,this.uint16[P+19]=x,this.uint16[P+20]=v,this.uint16[P+21]=w,this.uint16[P+22]=z,this.uint32[I+12]=S,this.float32[I+13]=T,this.float32[I+14]=k,this.uint16[P+30]=E,this.uint16[P+31]=M,e}}a8.prototype.bytesPerElement=64,ao("StructArrayLayout8i15ui1ul2f2ui64",a8);class a7 extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[+e+0]=t,e}}a7.prototype.bytesPerElement=4,ao("StructArrayLayout1f4",a7);class a9 extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i){let r=this.length;return this.resize(r+1),this.emplace(r,e,t,i)}emplace(e,t,i,r){let a=3*e;return this.uint16[6*e+0]=t,this.float32[a+1]=i,this.float32[a+2]=r,e}}a9.prototype.bytesPerElement=12,ao("StructArrayLayout1ui2f12",a9);class ne extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,i){let r=this.length;return this.resize(r+1),this.emplace(r,e,t,i)}emplace(e,t,i,r){let a=4*e;return this.uint32[2*e+0]=t,this.uint16[a+2]=i,this.uint16[a+3]=r,e}}ne.prototype.bytesPerElement=8,ao("StructArrayLayout1ul2ui8",ne);class nt extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){let i=this.length;return this.resize(i+1),this.emplace(i,e,t)}emplace(e,t,i){let r=2*e;return this.uint16[r+0]=t,this.uint16[r+1]=i,e}}nt.prototype.bytesPerElement=4,ao("StructArrayLayout2ui4",nt);class ni extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[+e+0]=t,e}}ni.prototype.bytesPerElement=2,ao("StructArrayLayout1ui2",ni);
2class nr extends aV{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i,r){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,r)}emplace(e,t,i,r,a){let n=4*e;return this.float32[n+0]=t,this.float32[n+1]=i,this.float32[n+2]=r,this.float32[n+3]=a,e}}nr.prototype.bytesPerElement=16,ao("StructArrayLayout4f16",nr);class na extends aU{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 P(this.anchorPointX,this.anchorPointY)}}na.prototype.size=20;class nn extends a0{get(e){return new na(this,e)}}ao("CollisionBoxArray",nn);class no extends aU{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}no.prototype.size=48;class nl extends a4{get(e){return new no(this,e)}}ao("PlacedSymbolArray",nl);class ns extends aU{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}ns.prototype.size=64;class nc extends a8{get(e){return new ns(this,e)}}ao("SymbolInstanceArray",nc);
2class nu extends a7{getoffsetX(e){return this.float32[+e+0]}}ao("GlyphOffsetArray",nu);class nh extends aq{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}ao("SymbolLineVertexArray",nh);class np extends aU{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]}}np.prototype.size=12;class nd extends a9{get(e){return new np(this,e)}}ao("TextAnchorOffsetArray",nd);class nf extends aU{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]}}nf.prototype.size=8;class nm extends ne{get(e){return new nf(this,e)}}ao("FeatureIndexArray",nm);class ng extends aG{}class ny extends aG{}class n_ extends aG{}class nb extends aW{}class nx extends aX{}class nv extends aY{}class nw extends aK{}class nz extends aJ{}class nS extends aQ{}class nT extends a1{}class nk extends a2{}class nE extends a5{}class nM extends a6{}class nP extends nt{}let{members:nI}=a$([{name:"a_pos",components:2,type:"Int16"}],4);class nA{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(e,t,i,r){let a=this.segments[this.segments.length-1];return e>nA.MAX_VERTEX_ARRAY_LENGTH&&el(`Max vertices per segment is ${nA.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${nA.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!a||a.vertexLength+e>nA.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==r?this.createNewSegment(t,i,r):a}createNewSegment(e,t,i){let r={vertexOffset:e.length,primitiveOffset:t.length,vertexLength:0,primitiveLength:0,vaos:{}};return void 0!==i&&(r.sortKey=i),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(r),r}getOrCreateLatestSegment(e,t,i){return this.prepareSegment(0,e,t,i)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,i,r){return new nA([{vertexOffset:e,primitiveOffset:t,vertexLength:i,primitiveLength:r,vaos:{},sortKey:0}])}}function nC(e,t){return 256*(e=Q(Math.floor(e),0,255))+Q(Math.floor(t),0,255)}nA.MAX_VERTEX_ARRAY_LENGTH=65535,ao("SegmentVector",nA);let nR=a$([{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 nL,nD,nO,nF={exports:{}},nj={exports:{}},nB={exports:{}},nN=v(function(){if(nO)return nF.exports;nO=1;var e=(nL||(nL=1,nj.exports=function(e,t){var i,r,a,n,o,l;for(r=e.length-(i=3&e.length),a=t,l=0;l<r;)o=255&e.charCodeAt(l)|(255&e.charCodeAt(++l))<<8|(255&e.charCodeAt(++l))<<16|(255&e.charCodeAt(++l))<<24,++l,a=27492+(65535&(n=5*(65535&(a=(a^=o=(65535&(o=(o=(65535&o)*0xcc9e2d51+(((o>>>16)*0xcc9e2d51&65535)<<16)|0)<<15|o>>>17))*0x1b873593+(((o>>>16)*0x1b873593&65535)<<16)|0)<<13|a>>>19))+((5*(a>>>16)&65535)<<16)|0))+((58964+(n>>>16)&65535)<<16);switch(o=0,i){case 3:o^=(255&e.charCodeAt(l+2))<<16;case 2:o^=(255&e.charCodeAt(l+1))<<8;case 1:a^=o=(65535&(o=(o=(65535&(o^=255&e.charCodeAt(l)))*0xcc9e2d51+(((o>>>16)*0xcc9e2d51&65535)<<16)|0)<<15|o>>>17))*0x1b873593+(((o>>>16)*0x1b873593&65535)<<16)|0}return a^=e.length,a=0x85ebca6b*(65535&(a^=a>>>16))+((0x85ebca6b*(a>>>16)&65535)<<16)|0,a=0xc2b2ae35*(65535&(a^=a>>>13))+((0xc2b2ae35*(a>>>16)&65535)<<16)|0,(a^=a>>>16)>>>0}),nj.exports),t=(nD||(nD=1,nB.exports=function(e,t){for(var i,r=e.length,a=t^r,n=0;r>=4;)i=0x5bd1e995*(65535&(i=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+((0x5bd1e995*(i>>>16)&65535)<<16),a=0x5bd1e995*(65535&a)+((0x5bd1e995*(a>>>16)&65535)<<16)^(i=0x5bd1e995*(65535&(i^=i>>>24))+((0x5bd1e995*(i>>>16)&65535)<<16)),r-=4,++n;switch(r){case 3:a^=(255&e.charCodeAt(n+2))<<16;case 2:a^=(255&e.charCodeAt(n+1))<<8;case 1:a=0x5bd1e995*(65535&(a^=255&e.charCodeAt(n)))+((0x5bd1e995*(a>>>16)&65535)<<16)}return a=0x5bd1e995*(65535&(a^=a>>>13))+((0x5bd1e995*(a>>>16)&65535)<<16),(a^=a>>>15)>>>0}
2),nB.exports);return nF.exports=e,nF.exports.murmur3=e,nF.exports.murmur2=t,nF.exports}());class nU{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,i,r){this.ids.push(nV(e)),this.positions.push(t,i,r)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let t=nV(e),i=0,r=this.ids.length-1;for(;i<r;){let e=i+r>>1;this.ids[e]>=t?r=e:i=e+1}let a=[];for(;this.ids[i]===t;)a.push({index:this.positions[3*i],start:this.positions[3*i+1],end:this.positions[3*i+2]}),i++;return a}static serialize(e,t){let i=new Float64Array(e.ids),r=new Uint32Array(e.positions);return function e(t,i,r,a){for(;r<a;){let n=t[r+a>>1],o=r-1,l=a+1;for(;;){do o++;while(t[o]<n);do l--;while(t[l]>n);if(o>=l)break;n$(t,o,l),n$(i,3*o,3*l),n$(i,3*o+1,3*l+1),n$(i,3*o+2,3*l+2)}l-r<a-l?(e(t,i,r,l),r=l+1):(e(t,i,l+1,a),a=l)}}(i,r,0,i.length-1),t&&t.push(i.buffer,r.buffer),{ids:i,positions:r}}static deserialize(e){let t=new nU;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t}}function nV(e){let t=+e;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:nN(String(e))}function n$(e,t,i){let r=e[t];e[t]=e[i],e[i]=r}ao("FeaturePositionMap",nU);class nZ{constructor(e,t){this.gl=e.gl,this.location=t}}class nG extends nZ{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))}}class nq extends nZ{constructor(e,t){super(e,t),this.current=[0,0,0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]&&e[3]===this.current[3]||(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))}}class nH extends nZ{constructor(e,t){super(e,t),this.current=tT.transparent}set(e){e.r===this.current.r&&e.g===this.current.g&&e.b===this.current.b&&e.a===this.current.a||(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))}}let nW=new Float32Array(16);function nX(e){return[nC(255*e.r,255*e.g),nC(255*e.b,255*e.a)]}class nY{constructor(e,t,i){this.value=e,this.uniformNames=t.map(e=>`u_${e}`),this.type=i}setUniform(e,t,i){e.set(i.constantOr(this.value))}getBinding(e,t,i){return"color"===this.type?new nH(e,t):new nG(e,t)}}class nK{constructor(e,t){this.uniformNames=t.map(e=>`u_${e}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setUniform(e,t,i,r){let a="u_pattern_to"===r?this.patternTo:"u_pattern_from"===r?this.patternFrom:"u_pixel_ratio_to"===r?this.pixelRatioTo:"u_pixel_ratio_from"===r?this.pixelRatioFrom:null;a&&e.set(a)}getBinding(e,t,i){return"u_pattern"===i.substr(0,9)?new nq(e,t):new nG(e,t)}}class nJ{constructor(e,t,i,r){this.expression=e,this.type=i,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===i?2:1,offset:0})),this.paintVertexArray=new r}populatePaintArray(e,t,i,r,a){let n=this.paintVertexArray.length,o=this.expression.evaluate(new az(0),t,{},r,[],a);this.paintVertexArray.resize(e),this._setPaintValue(n,e,o)}updatePaintArray(e,t,i,r){let a=this.expression.evaluate({zoom:0},i,r);this._setPaintValue(e,t,a)}_setPaintValue(e,t,i){if("color"===this.type){let r=nX(i);for(let i=e;i<t;i++)this.paintVertexArray.emplace(i,r[0],r[1])}else{for(let r=e;r<t;r++)this.paintVertexArray.emplace(r,i);this.maxValue=Math.max(this.maxValue,Math.abs(i))}}upload(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class nQ{constructor(e,t,i,r,a,n){this.expression=e,this.uniformNames=t.map(e=>`u_${e}_t`),this.type=i,this.useIntegerZoom=r,this.zoom=a,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===i?4:2,offset:0})),this.paintVertexArray=new n}populatePaintArray(e,t,i,r,a){let n=this.expression.evaluate(new az(this.zoom),t,{},r,[],a),o=this.expression.evaluate(new az(this.zoom+1),t,{},r,[],a),l=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(l,e,n,o)}updatePaintArray(e,t,i,r){let a=this.expression.evaluate({zoom:this.zoom},i,r),n=this.expression.evaluate({zoom:this.zoom+1},i,r);this._setPaintValue(e,t,a,n)}_setPaintValue(e,t,i,r){if("color"===this.type){let a=nX(i),n=nX(r);for(let i=e;i<t;i++)this.paintVertexArray.emplace(i,a[0],a[1],n[0],n[1])}else{for(let a=e;a<t;a++)this.paintVertexArray.emplace(a,i,r);this.maxValue=Math.max(this.maxValue,Math.abs(i),Math.abs(r))}}upload(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(e,t){let i=this.useIntegerZoom?Math.floor(t.zoom):t.zoom,r=Q(this.expression.interpolationFactor(i,this.zoom,this.zoom+1),0,1);e.set(r)}getBinding(e,t,i){return new nG(e,t)}}class n1{constructor(e,t,i,r,a,n){this.expression=e,this.type=t,this.useIntegerZoom=i,this.zoom=r,this.layerId=n,this.zoomInPaintVertexArray=new a,this.zoomOutPaintVertexArray=new a}populatePaintArray(e,t,i){let r=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(e),this.zoomOutPaintVertexArray.resize(e),this._setPaintValues(r,e,t.patterns&&t.patterns[this.layerId],i)}updatePaintArray(e,t,i,r,a){this._setPaintValues(e,t,i.patterns&&i.patterns[this.layerId],a)}_setPaintValues(e,t,i,r){if(!r||!i)return;let{min:a,mid:n,max:o}=i,l=r[a],s=r[n],c=r[o];if(l&&s&&c)for(let i=e;i<t;i++)this.zoomInPaintVertexArray.emplace(i,s.tl[0],s.tl[1],s.br[0],s.br[1],l.tl[0],l.tl[1],l.br[0],l.br[1],s.pixelRatio,l.pixelRatio),this.zoomOutPaintVertexArray.emplace(i,s.tl[0],s.tl[1],s.br[0],s.br[1],c.tl[0],c.tl[1],c.br[0],c.br[1],s.pixelRatio,c.pixelRatio)}upload(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,nR.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,nR.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class n0{constructor(e,t,i){this.binders={},this._buffers=[];let r=[];for(let a in e.paint._values){if(!i(a))continue;let n=e.paint.get(a);if(!(n instanceof aI&&ro(n.property.specification)))continue;let o=function(e,t){return({"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["ga
2pwidth"],"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"]})[e]||[e.replace(`${t}-`,"").replace(/-/g,"_")]}(a,e.type),l=n.value,s=n.property.specification.type,c=n.property.useIntegerZoom,u=n.property.specification["property-type"],h="cross-faded"===u||"cross-faded-data-driven"===u;if("constant"===l.kind)this.binders[a]=h?new nK(l.value,o):new nY(l.value,o,s),r.push(`/u_${a}`);else if("source"===l.kind||h){let i=n3(a,s,"source");this.binders[a]=h?new n1(l,s,c,t,i,e.id):new nJ(l,o,s,i),r.push(`/a_${a}`)}else{let e=n3(a,s,"composite");this.binders[a]=new nQ(l,o,s,c,t,e),r.push(`/z_${a}`)}}this.cacheKey=r.sort().join("")}getMaxValue(e){let t=this.binders[e];return t instanceof nJ||t instanceof nQ?t.maxValue:0}populatePaintArrays(e,t,i,r,a){for(let n in this.binders){let o=this.binders[n];(o instanceof nJ||o instanceof nQ||o instanceof n1)&&o.populatePaintArray(e,t,i,r,a)}}setConstantPatternPositions(e,t){for(let i in this.binders){let r=this.binders[i];r instanceof nK&&r.setConstantPatternPositions(e,t)}}updatePaintArrays(e,t,i,r,a){let n=!1;for(let o in e)for(let l of t.getPositions(o)){let t=i.feature(l.index);for(let i in this.binders){let s=this.binders[i];(s instanceof nJ||s instanceof nQ||s instanceof n1)&&!0===s.expression.isStateDependent&&(s.expression=r.paint.get(i).value,s.updatePaintArray(l.start,l.end,t,e[o],a),n=!0)}}return n}defines(){let e=[];for(let t in this.binders){let i=this.binders[t];(i instanceof nY||i instanceof nK)&&e.push(...i.uniformNames.map(e=>`#define HAS_UNIFORM_${e}`))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let i=this.binders[t];if(i instanceof nJ||i instanceof nQ)for(let t=0;t<i.paintVertexAttributes.length;t++)e.push(i.paintVertexAttributes[t].name);else if(i instanceof n1)for(let t=0;t<nR.members.length;t++)e.push(nR.members[t].name)}return e}getBinderUniforms(){let e=[];for(let t in this.binders){let i=this.binders[t];if(i instanceof nY||i instanceof nK||i instanceof nQ)for(let t of i.uniformNames)e.push(t)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){let i=[];for(let r in this.binders){let a=this.binders[r];if(a instanceof nY||a instanceof nK||a instanceof nQ){for(let n of a.uniformNames)if(t[n]){let o=a.getBinding(e,t[n],n);i.push({name:n,property:r,binding:o})}}}return i}setUniforms(e,t,i,r){for(let{name:e,property:a,binding:n}of t)this.binders[a].setUniform(n,r,i.get(a),e)}updatePaintBuffers(e){for(let t in this._buffers=[],this.binders){let i=this.binders[t];if(e&&i instanceof n1){let t=2===e.fromScale?i.zoomInPaintVertexBuffer:i.zoomOutPaintVertexBuffer;t&&this._buffers.push(t)}else(i instanceof nJ||i instanceof nQ)&&i.paintVertexBuffer&&this._buffers.push(i.paintVertexBuffer)}}upload(e){for(let t in this.binders){let i=this.binders[t];(i instanceof nJ||i instanceof nQ||i instanceof n1)&&i.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let t=this.binders[e];(t instanceof nJ||t instanceof nQ||t instanceof n1)&&t.destroy()}}}class n2{constructor(e,t,i=()=>!0){for(let r of(this.programConfigurations={},e))this.programConfigurations[r.id]=new n0(r,t,i);this.needsUpload=!1,this._featureMap=new nU,this._bufferOffset=0}populatePaintArrays(e,t,i,r,a,n){for(let i in this.programConfigurations)this.programConfigurations[i].populatePaintArrays(e,t,r,a,n);void 0!==t.id&&this._featureMap.add(t.id,i,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,i,r){for(let a of i)this.needsUpload=this.programConfigurations[a.id].updatePaintArrays(e,this._featureMap,t,a,r)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}}function n3(e,t,i){let r={"line-pattern":{source:nw,composite:nw},"fill-pattern":{source:nw,composite:nw},"fill-extrusion-pattern":{source:nw,composite:nw}}[e];return r&&r[i]||({color:{source:aY,composite:nr},number:{source:a7,composite:aY}})[t][i]}ao("ConstantBinder",nY),ao("CrossFadedConstantBinder",nK),ao("SourceExpressionBinder",nJ),ao("CrossFadedCompositeBinder",n1),ao("CompositeExpressionBinder",nQ),ao("ProgramConfiguration",n0,{omit:["_buffers"]}),ao("ProgramConfigurationSet",n2);let n5=-16383-1;function n6(e){let t=8192/e.extent,i=e.loadGeometry();for(let e=0;e<i.length;e++){let r=i[e];for(let e=0;e<r.length;e++){let i=r[e],a=Math.round(i.x*t),n=Math.round(i.y*t);i.x=Q(a,n5,16383),i.y=Q(n,n5,16383),(a<i.x||a>i.x+1||n<i.y||n>i.y+1)&&el("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return i}function n4(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?n6(e):[]}}class n8{constructor(e){this.zoom=e.zoom,this.globalState=e.globalState,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ny,this.indexArray=new nM,this.segments=new nA,this.programConfigurations=new n2(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,i){let r=this.layers[0],a=[],n=null,o=!1,l="heatmap"===r.type;
2"circle"===r.type&&(o=!(n=r.layout.get("circle-sort-key")).isConstant(),l=l||"map"===r.paint.get("circle-pitch-alignment"));let s=l?t.subdivisionGranularity.circle:1;for(let{feature:t,id:r,index:l,sourceLayerIndex:s}of e){let e=this.layers[0]._featureFilter.needGeometry,c=n4(t,e);if(!this.layers[0]._featureFilter.filter(new az(this.zoom,{globalState:this.globalState}),c,i))continue;let u=o?n.evaluate(c,{},i):void 0,h={id:r,properties:t.properties,type:t.type,sourceLayerIndex:s,index:l,geometry:e?c.geometry:n6(t),patterns:{},sortKey:u};a.push(h)}for(let r of(o&&a.sort((e,t)=>e.sortKey-t.sortKey),a)){let{geometry:a,index:n,sourceLayerIndex:o}=r,l=e[n].feature;this.addFeature(r,a,n,i,s),t.featureIndex.insert(l,a,n,o,this.index)}}update(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,nI),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,i,r,a=1){let n;switch(a){case 1:n=[0,7];break;case 3:n=[0,2,5,7];break;case 5:n=[0,1,3,4,6,7];break;case 7:n=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${a}; valid values are 1, 3, 5, 7.`)}let o=n.length;for(let i of t)for(let t of i){let i=t.x,r=t.y;if(i<0||i>=8192||r<0||r>=8192)continue;let a=this.segments.prepareSegment(o*o,this.layoutVertexArray,this.indexArray,e.sortKey),u=a.vertexLength;for(let e=0;e<o;e++)for(let t=0;t<o;t++){var l,s,c;l=this.layoutVertexArray,s=n[t],c=n[e],l.emplaceBack(-32768+8*i+s,-32768+8*r+c)}for(let e=0;e<o-1;e++)for(let t=0;t<o-1;t++){let i=u+e*o+t,r=u+(e+1)*o+t;this.indexArray.emplaceBack(i,r+1,i+1),this.indexArray.emplaceBack(i,r,r+1)}a.vertexLength+=o*o,a.primitiveLength+=(o-1)*(o-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,{},r)}}function n7(e,t){for(let i=0;i<e.length;i++)if(oa(t,e[i]))return!0;for(let i=0;i<t.length;i++)if(oa(e,t[i]))return!0;return!!oe(e,t)}function n9(e,t){if(1===e.length)return or(t,e[0]);for(let i=0;i<t.length;i++){let r=t[i];for(let t=0;t<r.length;t++)if(oa(e,r[t]))return!0}for(let i=0;i<e.length;i++)if(or(t,e[i]))return!0;for(let i=0;i<t.length;i++)if(oe(e,t[i]))return!0;return!1}function oe(e,t){if(0===e.length||0===t.length)return!1;for(let o=0;o<e.length-1;o++){let l=e[o],s=e[o+1];for(let e=0;e<t.length-1;e++){var i,r,a,n;if(i=l,r=s,a=t[e],es(i,a,n=t[e+1])!==es(r,a,n)&&es(i,r,a)!==es(i,r,n))return!0}}return!1}function ot(e,t,i){let r=i*i;if(1===t.length)return e.distSqr(t[0])<r;for(let i=1;i<t.length;i++)if(oi(e,t[i-1],t[i])<r)return!0;return!1}function oi(e,t,i){let r=t.distSqr(i);if(0===r)return e.distSqr(t);let a=((e.x-t.x)*(i.x-t.x)+(e.y-t.y)*(i.y-t.y))/r;return e.distSqr(a<0?t:a>1?i:i.sub(t)._mult(a)._add(t))}function or(e,t){let i,r,a,n=!1;for(let o=0;o<e.length;o++){i=e[o];for(let e=0,o=i.length-1;e<i.length;o=e++)r=i[e],a=i[o],r.y>t.y!=a.y>t.y&&t.x<(a.x-r.x)*(t.y-r.y)/(a.y-r.y)+r.x&&(n=!n)}return n}function oa(e,t){let i=!1;for(let r=0,a=e.length-1;r<e.length;a=r++){let n=e[r],o=e[a];n.y>t.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(i=!i)}return i}function on(e,t,i){let r=t.paint.get(e).value;return"constant"===r.kind?r.value:i.programConfigurations.get(t.id).getMaxValue(e)}function oo(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function ol(e,t,i,r,a){if(!t[0]&&!t[1])return e;let n=P.convert(t)._mult(a);"viewport"===i&&n._rotate(-r);let o=[];for(let t=0;t<e.length;t++)o.push(e[t].sub(n));return o}ao("CircleBucket",n8,{omit:["layers"]});var os={get paint(){return o=o||new aF({"circle-radius":new aR(eR.paint_circle["circle-radius"]),"circle-color":new aR(eR.paint_circle["circle-color"]),"circle-blur":new aR(eR.paint_circle["circle-blur"]),"circle-opacity":new aR(eR.paint_circle["circle-opacity"]),"circle-translate":new aC(eR.paint_circle["circle-translate"]),"circle-translate-anchor":new aC(eR.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new aC(eR.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new aC(eR.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new aR(eR.paint_circle["circle-stroke-width"]),"circle-stroke-color":new aR(eR.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new aR(eR.paint_circle["circle-stroke-opacity"])})},get layout(){return n=n||new aF({"circle-sort-key":new aR(eR.layout_circle["circle-sort-key"])})}};class oc extends aB{constructor(e){super(e,os)}createBucket(e){return new n8(e)}queryRadius(e){return on("circle-radius",this,e)+on("circle-stroke-width",this,e)+oo(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:i,geometry:r,transform:a,pixelsToTileUnits:n,unwrappedTileID:o,getElevation:l}){var s;let c=ol(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-a.bearingInRadians,n),u=this.paint.get("circle-radius").evaluate(t,i)+this.paint.get("circle-stroke-width").evaluate(t,i),h="map"===this.paint.get("circle-pitch-alignment"),p=h?c:c.map(e=>ou(e,a,o,l)),d=h?u*n:u;for(let e of r)for(let t of e){let e=h?t:ou(t,a,o,l),i=d,r=a.projectTileCoordinates(t.x,t.y,o,l).signedDistanceFromCamera;if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?i*=r/a.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(i*=a.cameraToCenterDistance/r),s=i,oa(p,e)||ot(e,p,s))return!0}return!1}}function ou(e,t,i,r){let a=t.projectTileCoordinates(e.x,e.y,i,r).point;return new P((.5*a.x+.5)*t.width,(-(.5*a.y)+.5)*t.height)}class oh extends n8{}ao("HeatmapBucket",oh,{omit:["layers"]});var op={get paint(){return l=l||new aF({"heatmap-radius":new aR(eR.paint_heatmap["heatmap-radius"]),"heatmap-weight":new aR(eR.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new aC(eR.paint_heatmap["heatmap-intensity"]),"heatmap-color":new aO(eR.paint_heatmap["heatmap-color"]),"heatmap-opacity":new aC(eR.paint_heatmap["heatmap-opacity"])})}};function od(e,{width:t,height:i},r,a){if(a){if(a instanceof Uint8ClampedArray)a=new Uint8Array(a.buffer);else if(a.length!==t*i*r)throw RangeError(`mismatched image size. expected: ${a.length} but got: ${t*i*r}`)}else a=new Uint8Array(t*i*r);return e.width=t,e.height=i,e.data=a,e}function of(e,{width:t,height:i},r){if(t===e.width&&i===e.height)return;let a=od({},{width:t,height:i},r);om(e,a,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,i)},r),e.width=t,e.height=i,e.data=a.data}function om(e,t,i,r,a,n){if(0===a.width||0===a.height)return t;if(a.width>e.width||a.height>e.height||i.x>e.width-a.width||i.y>e.height-a.height)throw RangeError("out of range source coordinates for image copy");if(a.width>t.width||a.height>t.height||r.x>t.width-a.width||r.y>t.height-a.height)throw RangeError("out of range destination coordinates for image copy");let o=e.data,l=t.data;if(o===l)throw Error("srcData equals dstData, so image is already copied");for(let s=0;s<a.height;s++){let c=((i.y+s)*e.width+i.x)*n,u=((r.y+s)*t.width+r.x)*n;for(let e=0;e<a.width*n;e++)l[u+e]=o[c+e]}return t}class og{constructor(e,t){od(this,e,1,t)}resize(e){of(this,e,1)}clone(){return new og({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,t,i,r,a){om(e,t,i,r,a,1)}}class oy{constructor(e,t){od(this,e,4,t)}resize(e){of(this,e,4)}replace(e,t){t?this.data.set(e):this.data=e instanceof Uint8ClampedArray?new Uint8Array(e.buffer):e}clone(){return new oy({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,t,i,r,a){om(e,t,i,r,a,4)}setPixel(e,t,i){let r=4*(e*this.width+t);this.data[r+0]=Math.round(255*i.r/i.a),this.data[r+1]=Math.round(255*i.g/i.a),this.data[r+2]=Math.round(255*i.b/i.a),this.data[r+3]=Math.round(255*i.a)}}function o_(e){let t={},i=e.resolution||256,r=e.clips?e.clips.length:1,a=e.image||new oy({width:i,height:r});
2if(Math.log(i)/Math.LN2%1!=0)throw Error(`width is not a power of 2 - ${i}`);let n=(r,n,o)=>{t[e.evaluationKey]=o;let l=e.expression.evaluate(t);a.setPixel(r/4/i,n/4,l)};if(e.clips)for(let t=0,a=0;t<r;++t,a+=4*i)for(let r=0,o=0;r<i;r++,o+=4){let l=r/(i-1),{start:s,end:c}=e.clips[t];n(a,o,s*(1-l)+c*l)}else for(let e=0,t=0;e<i;e++,t+=4)n(0,t,e/(i-1));return a}ao("AlphaImage",og),ao("RGBAImage",oy);let ob="big-fb";class ox extends aB{createBucket(e){return new oh(e)}constructor(e){super(e,op),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){"heatmap-color"===e&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=o_({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(ob)&&this.heatmapFbos.delete(ob)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}}var ov={get paint(){return s=s||new aF({"hillshade-illumination-direction":new aC(eR.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-altitude":new aC(eR.paint_hillshade["hillshade-illumination-altitude"]),"hillshade-illumination-anchor":new aC(eR.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new aC(eR.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new aC(eR.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new aC(eR.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new aC(eR.paint_hillshade["hillshade-accent-color"]),"hillshade-method":new aC(eR.paint_hillshade["hillshade-method"])})}};class ow extends aB{constructor(e){super(e,ov),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let e=this.paint.get("hillshade-illumination-direction").values,t=this.paint.get("hillshade-illumination-altitude").values,i=this.paint.get("hillshade-highlight-color").values,r=this.paint.get("hillshade-shadow-color").values,a=Math.max(e.length,t.length,i.length,r.length);e=e.concat(Array(a-e.length).fill(e.at(-1))),t=t.concat(Array(a-t.length).fill(t.at(-1))),i=i.concat(Array(a-i.length).fill(i.at(-1))),r=r.concat(Array(a-r.length).fill(r.at(-1)));let n=t.map(em);return{directionRadians:e.map(em),altitudeRadians:n,shadowColor:r,highlightColor:i}}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}}var oz={get paint(){return c=c||new aF({"color-relief-opacity":new aC(eR["paint_color-relief"]["color-relief-opacity"]),"color-relief-color":new aO(eR["paint_color-relief"]["color-relief-color"])})}};class oS{constructor(e,t,i,r){this.context=e,this.format=i,this.texture=e.gl.createTexture(),this.update(t,r)}update(e,t,i){let{width:r,height:a}=e,n=!(this.size&&this.size[0]===r&&this.size[1]===a||i),{context:o}=this,{gl:l}=o;if(this.useMipmap=!!(t&&t.useMipmap),l.bindTexture(l.TEXTURE_2D,this.texture),o.pixelStoreUnpackFlipY.set(!1),o.pixelStoreUnpack.set(1),o.pixelStoreUnpackPremultiplyAlpha.set(this.format===l.RGBA&&(!t||!1!==t.premultiply)),n)this.size=[r,a],e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||eh(e)?l.texImage2D(l.TEXTURE_2D,0,this.format,this.format,l.UNSIGNED_BYTE,e):l.texImage2D(l.TEXTURE_2D,0,this.format,r,a,0,this.format,l.UNSIGNED_BYTE,e.data);else{let{x:t,y:n}=i||{x:0,y:0};e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||eh(e)?l.texSubImage2D(l.TEXTURE_2D,0,t,n,l.RGBA,l.UNSIGNED_BYTE,e):l.texSubImage2D(l.TEXTURE_2D,0,t,n,r,a,l.RGBA,l.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&l.generateMipmap(l.TEXTURE_2D),o.pixelStoreUnpackFlipY.setDefault(),o.pixelStoreUnpack.setDefault(),o.pixelStoreUnpackPremultiplyAlpha.setDefault()}bind(e,t,i){let{context:r}=this,{gl:a}=r;a.bindTexture(a.TEXTURE_2D,this.texture),i!==a.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(i=a.LINEAR),e!==this.filter&&(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,e),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,i||e),this.filter=e),t!==this.wrap&&(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,t),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,t),this.wrap=t)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null}}class oT{constructor(e,t,i,r=1,a=1,n=1,o=0){if(this.uid=e,t.height!==t.width)throw RangeError("DEM tiles must be square");if(i&&!["mapbox","terrarium","custom"].includes(i))return void el(`"${i}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=t.height;let l=this.dim=t.height-2;switch(this.data=new Uint32Array(t.data.buffer),i){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;
2case"custom":this.redFactor=r,this.greenFactor=a,this.blueFactor=n,this.baseShift=o;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let e=0;e<l;e++)this.data[this._idx(-1,e)]=this.data[this._idx(0,e)],this.data[this._idx(l,e)]=this.data[this._idx(l-1,e)],this.data[this._idx(e,-1)]=this.data[this._idx(e,0)],this.data[this._idx(e,l)]=this.data[this._idx(e,l-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(l,-1)]=this.data[this._idx(l-1,0)],this.data[this._idx(-1,l)]=this.data[this._idx(0,l-1)],this.data[this._idx(l,l)]=this.data[this._idx(l-1,l-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let e=0;e<l;e++)for(let t=0;t<l;t++){let i=this.get(e,t);i>this.max&&(this.max=i),i<this.min&&(this.min=i)}}get(e,t){let i=new Uint8Array(this.data.buffer),r=4*this._idx(e,t);return this.unpack(i[r],i[r+1],i[r+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(e,t){if(e<-1||e>=this.dim+1||t<-1||t>=this.dim+1)throw RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)}unpack(e,t,i){return e*this.redFactor+t*this.greenFactor+i*this.blueFactor-this.baseShift}pack(e){return ok(e,this.getUnpackVector())}getPixels(){return new oy({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,t,i){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let r=t*this.dim,a=t*this.dim+this.dim,n=i*this.dim,o=i*this.dim+this.dim;switch(t){case -1:r=a-1;break;case 1:a=r+1}switch(i){case -1:n=o-1;break;case 1:o=n+1}let l=-t*this.dim,s=-i*this.dim;for(let t=n;t<o;t++)for(let i=r;i<a;i++)this.data[this._idx(i,t)]=e.data[this._idx(i+l,t+s)]}}function ok(e,t){let i=t[0],r=t[1],a=t[2],n=t[3],o=Math.min(i,r,a),l=Math.round((e+n)/o);return{r:Math.floor(l*o/i)%256,g:Math.floor(l*o/r)%256,b:Math.floor(l*o/a)%256}}ao("DEMData",oT);class oE extends aB{constructor(e){super(e,oz)}_createColorRamp(e){let t={elevationStops:[],colorStops:[]},i=this._transitionablePaint._values["color-relief-color"].value.expression;if(i instanceof rx&&i._styleExpression.expression instanceof it){this.colorRampExpression=i;let e=i._styleExpression.expression;for(let i of(t.elevationStops=e.labels,t.colorStops=[],t.elevationStops))t.colorStops.push(e.evaluate({globals:{elevation:i}}))}if(t.elevationStops.length<1&&(t.elevationStops=[0],t.colorStops=[tT.transparent]),t.elevationStops.length<2&&(t.elevationStops.push(t.elevationStops[0]+1),t.colorStops.push(t.colorStops[0])),t.elevationStops.length<=e)return t;let r={elevationStops:[],colorStops:[]},a=(t.elevationStops.length-1)/(e-1);for(let e=0;e<t.elevationStops.length-.5;e+=a)r.elevationStops.push(t.elevationStops[Math.round(e)]),r.colorStops.push(t.colorStops[Math.round(e)]);return el(`Too many colors in specification of ${this.id} color-relief layer, may not render properly.`),r}_colorRampChanged(){return this.colorRampExpression!=this._transitionablePaint._values["color-relief-color"].value.expression}getColorRampTextures(e,t,i){if(this.colorRampTextures&&!this._colorRampChanged())return this.colorRampTextures;let r=this._createColorRamp(t),a=new oy({width:r.colorStops.length,height:1}),n=new oy({width:r.colorStops.length,height:1});for(let e=0;e<r.elevationStops.length;e++){let t=ok(r.elevationStops[e],i);n.setPixel(0,e,new tT(t.r/255,t.g/255,t.b/255,1)),a.setPixel(0,e,r.colorStops[e])}return this.colorRampTextures={elevationTexture:new oS(e,n,e.gl.RGBA),colorTexture:new oS(e,a,e.gl.RGBA)},this.colorRampTextures}hasOffscreenPass(){return"none"!==this.visibility&&!!this.colorRampTextures}}let{members:oM}=a$([{name:"a_pos",components:2,type:"Int16"}],4);function oP(e,t,i){let r=i.patternDependencies,a=!1;for(let i of t){let t=i.paint.get(`${e}-pattern`);t.isConstant()||(a=!0);let n=t.constantOr(null);n&&(a=!0,r[n.to]=!0,r[n.from]=!0)}return a}function oI(e,t,i,r,a){let n=a.patternDependencies;for(let o of t){let t=o.paint.get(`${e}-pattern`).value;if("constant"!==t.kind){let e=t.evaluate({zoom:r-1},i,{},a.availableImages),l=t.evaluate({zoom:r},i,{},a.availableImages),s=t.evaluate({zoom:r+1},i,{},a.availableImages);e=e&&e.name?e.name:e,l=l&&l.name?l.name:l,s=s&&s.name?s.name:s,n[e]=!0,n[l]=!0,n[s]=!0,i.patterns[o.id]={min:e,mid:l,max:s}}}return i}function oA(e,t,i,r,a){let n;if(a===function(e,t,i,r){let a=0;for(let n=t,o=i-r;n<i;n+=r)a+=(e[o]-e[n])*(e[n+1]+e[o+1]),o=n;return a}(e,t,i,r)>0)for(let a=t;a<i;a+=r)n=oZ(a/r|0,e[a],e[a+1],n);else for(let a=i-r;a>=t;a-=r)n=oZ(a/r|0,e[a],e[a+1],n);return n&&oj(n,n.next)&&(oG(n),n=n.next),n}function oC(e,t){if(!e)return e;t||(t=e);let i,r=e;do if(i=!1,r.steiner||!oj(r,r.next)&&0!==oF(r.prev,r,r.next))r=r.next;else{if(oG(r),(r=t=r.prev)===r.next)break;
2i=!0}while(i||r!==t);return t}function oR(e,t){let i=e.x-t.x;return 0===i&&0==(i=e.y-t.y)&&(i=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)),i}function oL(e,t,i,r,a){return(e=0x55555555&((e=0x33333333&((e=0xf0f0f0f&((e=0xff00ff&((e=(e-i)*a|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=0x55555555&((t=0x33333333&((t=0xf0f0f0f&((t=0xff00ff&((t=(t-r)*a|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function oD(e,t,i,r,a,n,o,l){return(a-o)*(t-l)>=(e-o)*(n-l)&&(e-o)*(r-l)>=(i-o)*(t-l)&&(i-o)*(n-l)>=(a-o)*(r-l)}function oO(e,t,i,r,a,n,o,l){return(e!==o||t!==l)&&oD(e,t,i,r,a,n,o,l)}function oF(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function oj(e,t){return e.x===t.x&&e.y===t.y}function oB(e,t,i,r){let a=oU(oF(e,t,i)),n=oU(oF(e,t,r)),o=oU(oF(i,r,e)),l=oU(oF(i,r,t));return a!==n&&o!==l||!(0!==a||!oN(e,i,t))||!(0!==n||!oN(e,r,t))||!(0!==o||!oN(i,e,r))||!(0!==l||!oN(i,t,r))}function oN(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function oU(e){return e>0?1:e<0?-1:0}function oV(e,t){return 0>oF(e.prev,e,e.next)?oF(e,t,e.next)>=0&&oF(e,e.prev,t)>=0:0>oF(e,t,e.prev)||0>oF(e,e.next,t)}function o$(e,t){let i=oq(e.i,e.x,e.y),r=oq(t.i,t.x,t.y),a=e.next,n=t.prev;return e.next=t,t.prev=e,i.next=a,a.prev=i,r.next=i,i.prev=r,n.next=r,r.prev=n,r}function oZ(e,t,i,r){let a=oq(e,t,i);return r?(a.next=r.next,a.prev=r,r.next.prev=a,r.next=a):(a.prev=a,a.next=a),a}function oG(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function oq(e,t,i){return{i:e,x:t,y:i,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class oH{constructor(e,t){if(t>e)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=t}getGranularityForZoomLevel(e){return Math.max(Math.floor(this._baseZoomGranularity/(1<<e)),this._minGranularity,1)}}class oW{constructor(e){this.fill=e.fill,this.line=e.line,this.tile=e.tile,this.stencil=e.stencil,this.circle=e.circle}}oW.noSubdivision=new oW({fill:new oH(0,0),line:new oH(0,0),tile:new oH(0,0),stencil:new oH(0,0),circle:1}),ao("SubdivisionGranularityExpression",oH),ao("SubdivisionGranularitySetting",oW);class oX{constructor(e,t){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=e,this._granularityCellSize=8192/e,this._canonical=t}_getKey(e,t){return(e+=32768)<<16|t+32768}_vertexToIndex(e,t){if(e<-32768||t<-32768||e>32767||t>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let i=0|Math.round(e),r=0|Math.round(t),a=this._getKey(i,r);if(this._vertexDictionary.has(a))return this._vertexDictionary.get(a);let n=this._vertexBuffer.length/2;return this._vertexDictionary.set(a,n),this._vertexBuffer.push(i,r),n}_subdivideTrianglesScanline(e){if(this._granularity<2)return function(e,t){let i=[];for(let r=0;r<t.length;r+=3){let a=t[r],n=t[r+1],o=t[r+2],l=e[2*a],s=e[2*a+1];(e[2*n]-l)*(e[2*o+1]-s)-(e[2*n+1]-s)*(e[2*o]-l)>0?(i.push(a),i.push(o),i.push(n)):(i.push(a),i.push(n),i.push(o))}return i}(this._vertexBuffer,e);let t=[],i=e.length;for(let r=0;r<i;r+=3){let i=[e[r+0],e[r+1],e[r+2]],a=[this._vertexBuffer[2*e[r+0]+0],this._vertexBuffer[2*e[r+0]+1],this._vertexBuffer[2*e[r+1]+0],this._vertexBuffer[2*e[r+1]+1],this._vertexBuffer[2*e[r+2]+0],this._vertexBuffer[2*e[r+2]+1]],n=1/0,o=1/0,l=-1/0,s=-1/0;for(let e=0;e<3;e++){let t=a[2*e],i=a[2*e+1];n=Math.min(n,t),l=Math.max(l,t),o=Math.min(o,i),s=Math.max(s,i)}if(n===l||o===s)continue;let c=Math.floor(n/this._granularityCellSize),u=Math.ceil(l/this._granularityCellSize),h=Math.floor(o/this._granularityCellSize),p=Math.ceil(s/this._granularityCellSize);if(c!==u||h!==p)for(let e=h;e<p;e++){let r=this._scanlineGenerateVertexRingForCellRow(e,a,i);!function(e,t,i){if(0===t.length)throw Error("Subdivision vertex ring is empty.");let r=0,a=e[2*t[0]];for(let i=1;i<t.length;i++){let n=e[2*t[i]];n<a&&(a=n,r=i)}let n=t.length,o=r,l=(o+1)%n;for(;;){let r=o-1>=0?o-1:n-1,a=(l+1)%n,s=e[2*t[r]],c=e[2*t[a]],u=e[2*t[o]],h=e[2*t[o]+1],p=e[2*t[l]+1],d=!1;if(s<c)d=!0;else if(s>c)d=!1;else{let i=p-h,n=-(e[2*t[l]]-u),o=h<p?1:-1;((s-u)*i+(e[2*t[r]+1]-h)*n)*o>((c-u)*i+(e[2*t[a]+1]-h)*n)*o&&(d=!0)}if(d){let e=t[r],a=t[o],s=t[l];e!==a&&e!==s&&a!==s&&i.push(s,a,e),--o<0&&(o=n-1)}else{let e=t[a],r=t[o],s=t[l];e!==r&&e!==s&&r!==s&&i.push(s,r,e),++l>=n&&(l=0)}if(r===a)break}}(this._vertexBuffer,r,t)}else t.push(...i)}return t}_scanlineGenerateVertexRingForCellRow(e,t,i){let r=e*this._granularityCellSize,a=r+this._granularityCellSize,n=[];for(let e=0;e<3;e++){let o=t[2*e],l=t[2*e+1],s=t[2*(e+1)%6],c=t[(2*(e+1)+1)%6],u=t[2*(e+2)%6],h=t[(2*(e+2)+1)%6],p=s-o,d=c-l,f=0===p,m=0===d,g=(r-l)/d,y=(a-l)/d,_=Math.min(g,y),b=Math.max(g,y);if(!m&&(_>=1||b<=0)||m&&(l<r||l>a)){c>=r&&c<=a&&n.push(i[(e+1)%3]);continue}!m&&_>0&&n.push(this._vertexToIndex(o+p*_,l+d*_));let x=o+p*Math.max(_,0),v=o+p*Math.min(b,1);f||this._generateIntraEdgeVertices(n,o,l,s,c,x,v),!m&&b<1&&n.push(this._vertexToIndex(o+p*b,l+d*b)),(m||c>=r&&c<=a)&&n.push(i[(e+1)%3]),!m&&(c<=r||c>=a)&&this._generateInterEdgeVertices(n,o,l,s,c,u,h,v,r,a)}return n}_generateIntraEdgeVertices(e,t,i,r,a,n,o){let l=r-t,s=a-i,c=0===s,u=c?Math.min(t,r):Math.min(n,o),h=c?Math.max(t,r):Math.max(n,o),p=Math.floor(u/this._granularityCellSize)+1,d=Math.ceil(h/this._granularityCellSize)-1;
2if(c?t<r:n<o)for(let r=p;r<=d;r++){let a=r*this._granularityCellSize;e.push(this._vertexToIndex(a,i+s*(a-t)/l))}else for(let r=d;r>=p;r--){let a=r*this._granularityCellSize;e.push(this._vertexToIndex(a,i+s*(a-t)/l))}}_generateInterEdgeVertices(e,t,i,r,a,n,o,l,s,c){let u=o-a,h=(s-a)/u,p=(c-a)/u,d=Math.min(h,p),f=Math.max(h,p),m=r+(n-r)*d,g=Math.floor(Math.min(m,l)/this._granularityCellSize)+1,y=Math.ceil(Math.max(m,l)/this._granularityCellSize)-1,_=l<m,b=0===u;if(b&&(o===s||o===c))return;if(b||d>=1||f<=0){let e=i-o,r=n+(t-n)*Math.min((s-o)/e,(c-o)/e);g=Math.floor(Math.min(r,l)/this._granularityCellSize)+1,y=Math.ceil(Math.max(r,l)/this._granularityCellSize)-1,_=l<r}let x=a-i>0?c:s;if(_)for(let t=g;t<=y;t++)e.push(this._vertexToIndex(t*this._granularityCellSize,x));else for(let t=y;t>=g;t--)e.push(this._vertexToIndex(t*this._granularityCellSize,x))}_generateOutline(e){let t=[];for(let i of e){let e=oK(i,this._granularity,!0),r=this._pointArrayToIndices(e),a=[];for(let e=1;e<r.length;e++)a.push(r[e-1]),a.push(r[e]);t.push(a)}return t}_handlePoles(e){let t=!1,i=!1;this._canonical&&(0===this._canonical.y&&(t=!0),this._canonical.y===(1<<this._canonical.z)-1&&(i=!0)),(t||i)&&this._fillPoles(e,t,i)}_ensureNoPoleVertices(){let e=this._vertexBuffer;for(let t=0;t<e.length;t+=2){let i=e[t+1];-32768===i&&(e[t+1]=-32767),32767===i&&(e[t+1]=32766)}}_generatePoleQuad(e,t,i,r,a,n){r>a!=(-32768===n)?(e.push(t),e.push(i),e.push(this._vertexToIndex(r,n)),e.push(i),e.push(this._vertexToIndex(a,n))):(e.push(i),e.push(t),e.push(this._vertexToIndex(r,n)),e.push(this._vertexToIndex(a,n)),e.push(i)),e.push(this._vertexToIndex(r,n))}_fillPoles(e,t,i){let r=this._vertexBuffer,a=e.length;for(let n=2;n<a;n+=3){let a=e[n-2],o=e[n-1],l=e[n],s=r[2*a],c=r[2*a+1],u=r[2*o],h=r[2*o+1],p=r[2*l],d=r[2*l+1];t&&(0===c&&0===h&&this._generatePoleQuad(e,a,o,s,u,-32768),0===h&&0===d&&this._generatePoleQuad(e,o,l,u,p,-32768),0===d&&0===c&&this._generatePoleQuad(e,l,a,p,s,-32768)),i&&(8192===c&&8192===h&&this._generatePoleQuad(e,a,o,s,u,32767),8192===h&&8192===d&&this._generatePoleQuad(e,o,l,u,p,32767),8192===d&&8192===c&&this._generatePoleQuad(e,l,a,p,s,32767))}}_initializeVertices(e){for(let t=0;t<e.length;t+=2)this._vertexToIndex(e[t],e[t+1])}subdividePolygonInternal(e,t){let i;if(this._used)throw Error("Subdivision: multiple use not allowed.");this._used=!0;let{flattened:r,holeIndices:a}=function(e){let t=[],i=[];for(let r of e)if(0!==r.length){r!==e[0]&&t.push(i.length/2);for(let e=0;e<r.length;e++)i.push(r[e].x),i.push(r[e].y)}return{flattened:i,holeIndices:t}}(e);this._initializeVertices(r);try{let e=function(e,t,i=2){let r,a,n,o=t&&t.length,l=o?t[0]*i:e.length,s=oA(e,0,l,i,!0),c=[];if(!s||s.next===s.prev)return c;if(o&&(s=function(e,t,i,r){let a=[];for(let i=0,n=t.length;i<n;i++){let o=oA(e,t[i]*r,i<n-1?t[i+1]*r:e.length,r,!1);o===o.next&&(o.steiner=!0),a.push(function(e){let t=e,i=e;do(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next;while(t!==e);return i}(o))}a.sort(oR);for(let e=0;e<a.length;e++)i=function(e,t){let i=function(e,t){let i=t,r=e.x,a=e.y,n,o=-1/0;if(oj(e,i))return i;do{if(oj(e,i.next))return i.next;if(a<=i.y&&a>=i.next.y&&i.next.y!==i.y){let e=i.x+(a-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(e<=r&&e>o&&(o=e,n=i.x<i.next.x?i:i.next,e===r))return n}i=i.next}while(i!==t);if(!n)return null;let l=n,s=n.x,c=n.y,u=1/0;i=n;do{if(r>=i.x&&i.x>=s&&r!==i.x&&oD(a<c?r:o,a,s,c,a<c?o:r,a,i.x,i.y)){var h,p;let t=Math.abs(a-i.y)/(r-i.x);oV(i,e)&&(t<u||t===u&&(i.x>n.x||i.x===n.x&&(h=n,p=i,0>oF(h.prev,h,p.prev)&&0>oF(p.next,h,h.next))))&&(n=i,u=t)}i=i.next}while(i!==l);return n}(e,t);if(!i)return t;let r=o$(i,e);return oC(r,r.next),oC(i,i.next)}(a[e],i);return i}(e,t,s,i)),e.length>80*i){r=1/0,a=1/0;let t=-1/0,o=-1/0;for(let n=i;n<l;n+=i){let i=e[n],l=e[n+1];i<r&&(r=i),l<a&&(a=l),i>t&&(t=i),l>o&&(o=l)}n=Math.max(t-r,o-a),n=0!==n?32767/n:0}return function e(t,i,r,a,n,o,l){if(!t)return;!l&&o&&function(e,t,i,r){let a=e;do 0===a.z&&(a.z=oL(a.x,a.y,t,i,r)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next;while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,function(e){let t,i=1;do{let r,a=e;e=null;let n=null;for(t=0;a;){t++;let o=a,l=0;for(let e=0;e<i&&(l++,o=o.nextZ);e++);let s=i;for(;l>0||s>0&&o;)0!==l&&(0===s||!o||a.z<=o.z)?(r=a,a=a.nextZ,l--):(r=o,o=o.nextZ,s--),n?n.nextZ=r:e=r,r.prevZ=n,n=r;a=o}n.nextZ=null,i*=2}while(t>1)}(a)}(t,a,n,o);let s=t;for(;t.prev!==t.next;){let c=t.prev,u=t.next;if(o?function(e,t,i,r){let a=e.prev,n=e.next;if(oF(a,e,n)>=0)return!1;
2let o=a.x,l=e.x,s=n.x,c=a.y,u=e.y,h=n.y,p=Math.min(o,l,s),d=Math.min(c,u,h),f=Math.max(o,l,s),m=Math.max(c,u,h),g=oL(p,d,t,i,r),y=oL(f,m,t,i,r),_=e.prevZ,b=e.nextZ;for(;_&&_.z>=g&&b&&b.z<=y;){if(_.x>=p&&_.x<=f&&_.y>=d&&_.y<=m&&_!==a&&_!==n&&oO(o,c,l,u,s,h,_.x,_.y)&&oF(_.prev,_,_.next)>=0||(_=_.prevZ,b.x>=p&&b.x<=f&&b.y>=d&&b.y<=m&&b!==a&&b!==n&&oO(o,c,l,u,s,h,b.x,b.y)&&oF(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;_&&_.z>=g;){if(_.x>=p&&_.x<=f&&_.y>=d&&_.y<=m&&_!==a&&_!==n&&oO(o,c,l,u,s,h,_.x,_.y)&&oF(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;b&&b.z<=y;){if(b.x>=p&&b.x<=f&&b.y>=d&&b.y<=m&&b!==a&&b!==n&&oO(o,c,l,u,s,h,b.x,b.y)&&oF(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}(t,a,n,o):function(e){let t=e.prev,i=e.next;if(oF(t,e,i)>=0)return!1;let r=t.x,a=e.x,n=i.x,o=t.y,l=e.y,s=i.y,c=Math.min(r,a,n),u=Math.min(o,l,s),h=Math.max(r,a,n),p=Math.max(o,l,s),d=i.next;for(;d!==t;){if(d.x>=c&&d.x<=h&&d.y>=u&&d.y<=p&&oO(r,o,a,l,n,s,d.x,d.y)&&oF(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}(t))i.push(c.i,t.i,u.i),oG(t),t=u.next,s=u.next;else if((t=u)===s){l?1===l?e(t=function(e,t){let i=e;do{let r=i.prev,a=i.next.next;!oj(r,a)&&oB(r,i,i.next,a)&&oV(r,a)&&oV(a,r)&&(t.push(r.i,i.i,a.i),oG(i),oG(i.next),i=e=a),i=i.next}while(i!==e);return oC(i)}(oC(t),i),i,r,a,n,o,2):2===l&&function(t,i,r,a,n,o){let l=t;do{let t=l.next.next;for(;t!==l.prev;){var s,c;if(l.i!==t.i&&(s=l,c=t,s.next.i!==c.i&&s.prev.i!==c.i&&!function(e,t){let i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&oB(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}(s,c)&&(oV(s,c)&&oV(c,s)&&function(e,t){let i=e,r=!1,a=(e.x+t.x)/2,n=(e.y+t.y)/2;do i.y>n!=i.next.y>n&&i.next.y!==i.y&&a<(i.next.x-i.x)*(n-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next;while(i!==e);return r}(s,c)&&(oF(s.prev,s,c.prev)||oF(s,c.prev,c))||oj(s,c)&&oF(s.prev,s,s.next)>0&&oF(c.prev,c,c.next)>0))){let s=o$(l,t);return l=oC(l,l.next),s=oC(s,s.next),e(l,i,r,a,n,o,0),void e(s,i,r,a,n,o,0)}t=t.next}l=l.next}while(l!==t)}(t,i,r,a,n,o):e(oC(t),i,r,a,n,o,1);break}}}(s,c,i,r,a,n,0),c}(r,a),t=this._convertIndices(r,e);i=this._subdivideTrianglesScanline(t)}catch(e){console.error(e)}let n=[];return t&&(n=this._generateOutline(e)),this._ensureNoPoleVertices(),this._handlePoles(i),{verticesFlattened:this._vertexBuffer,indicesTriangles:i,indicesLineList:n}}_convertIndices(e,t){let i=[];for(let r=0;r<t.length;r++)i.push(this._vertexToIndex(e[2*t[r]],e[2*t[r]+1]));return i}_pointArrayToIndices(e){let t=[];for(let i=0;i<e.length;i++){let r=e[i];t.push(this._vertexToIndex(r.x,r.y))}return t}}function oY(e,t,i,r=!0){return new oX(i,t).subdividePolygonInternal(e,r)}function oK(e,t,i=!1){if(!e||e.length<1||e.length<2)return[];let r=e[0],a=e[e.length-1],n=i&&(r.x!==a.x||r.y!==a.y);if(t<2)return n?[...e,e[0]]:[...e];let o=Math.floor(8192/t),l=[];l.push(new P(e[0].x,e[0].y));let s=e.length,c=n?s:s-1;for(let t=0;t<c;t++){let i=e[t],r=t<s-1?e[t+1]:e[0],a=i.x,n=i.y,c=r.x,u=r.y,h=a!==c,p=n!==u;if(!h&&!p)continue;let d=c-a,f=u-n,m=Math.abs(d),g=Math.abs(f),y=a,_=n;for(;;){let e=d>0?(Math.floor(y/o)+1)*o:(Math.ceil(y/o)-1)*o,t=f>0?(Math.floor(_/o)+1)*o:(Math.ceil(_/o)-1)*o,i=Math.abs(y-e),r=Math.abs(_-t),a=Math.abs(_-u),n=h?i/m:1/0,s=p?r/g:1/0;if((Math.abs(y-c)<=i||!h)&&(a<=r||!p))break;if(n<s&&h||!p){let t=new P(y=e,Math.round(_+=f*n));l[l.length-1].x===t.x&&l[l.length-1].y===t.y||l.push(t)}else{let e=new P(Math.round(y+=d*s),_=t);l[l.length-1].x===e.x&&l[l.length-1].y===e.y||l.push(e)}}let b=new P(c,u);l[l.length-1].x===b.x&&l[l.length-1].y===b.y||l.push(b)}return l}function oJ(e,t,i,r,a,n,o,l,s){let c=a.length/2,u=o&&l&&s;if(c<nA.MAX_VERTEX_ARRAY_LENGTH){let h,p,d=t.prepareSegment(c,i,r),f=d.vertexLength;for(let e=0;e<n.length;e+=3)r.emplaceBack(f+n[e],f+n[e+1],f+n[e+2]);d.vertexLength+=c,d.primitiveLength+=n.length/3,u&&(h=(p=o.prepareSegment(c,i,l)).vertexLength,p.vertexLength+=c);for(let t=0;t<a.length;t+=2)e(a[t],a[t+1]);if(u)for(let e=0;e<s.length;e++){let t=s[e];for(let e=1;e<t.length;e+=2)l.emplaceBack(h+t[e-1],h+t[e]);p.primitiveLength+=t.length/2}}else!function(e,t,i,r,a,n){let o=[];for(let e=0;e<r.length/2;e++)o.push(-1);let l={count:0},s=0,c=e.getOrCreateLatestSegment(t,i),u=c.vertexLength;for(let h=2;h<a.length;h+=3){let p=a[h-2],d=a[h-1],f=a[h],m=o[p]<s,g=o[d]<s,y=o[f]<s;c.vertexLength+(+!!m+ +!!g+ +!!y)>nA.MAX_VERTEX_ARRAY_LENGTH&&(c=e.createNewSegment(t,i),s=l.count,m=!0,g=!0,y=!0,u=0);let _=oQ(o,r,n,l,p,m,c),b=oQ(o,r,n,l,d,g,c),x=oQ(o,r,n,l,f,y,c);i.emplaceBack(u+_-s,u+b-s,u+x-s),c.primitiveLength++}}(t,i,r,a,n,e),u&&function(e,t,i,r,a,n){let o=[];for(let e=0;e<r.length/2;e++)o.push(-1);let l={count:0},s=0,c=e.getOrCreateLatestSegment(t,i),u=c.vertexLength;for(let h=0;h<a.length;h++){let p=a[h];for(let d=1;d<a[h].length;d+=2){let a=p[d-1],h=p[d],f=o[a]<s,m=o[h]<s;c.vertexLength+(+!!f+ +!!m)>nA.MAX_VERTEX_ARRAY_LENGTH&&(c=e.createNewSegment(t,i),s=l.count,f=!0,m=!0,u=0);let g=oQ(o,r,n,l,a,f,c),y=oQ(o,r,n,l,h,m,c);i.emplaceBack(u+g-s,u+y-s),c.primitiveLength++}}}(o,i,l,a,s,e),t.forceNewSegmentOnNextPrepare(),null==o||o.forceNewSegmentOnNextPrepare()}function oQ(e,t,i,r,a,n,o){if(n){let n=r.count;return i(t[2*a],t[2*a+1]),e[a]=r.count,r.count++,o.vertexLength++,n}return e[a]}class o1{constructor(e){this.zoom=e.zoom,this.globalState=e.globalState,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new n_,this.indexArray=new nM,this.indexArray2=new nP,this.programConfigurations=new n2(e.layers,e.zoom),this.segments=new nA,this.segments2=new nA,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,i){this.hasPattern=oP("fill",this.layers,t);let r=this.layers[0].layout.get("fill-sort-key"),a=!r.isConstant(),n=[];for(let{feature:o,id:l,index:s,sourceLayerIndex:c}of e){let e=this.layers[0]._featureFilter.needGeometry,u=n4(o,e);if(!this.layers[0]._featureFilter.filter(new az(this.zoom,{globalState:this.globalState}),u,i))continue;let h=a?r.evaluate(u,{},i,t.availableImages):void 0,p={id:l,properties:o.properties,type:o.type,sourceLayerIndex:c,index:s,geometry:e?u.geometry:n6(o),patterns:{},sortKey:h};n.push(p)}for(let r of(a&&n.sort((e,t)=>
2e.sortKey-t.sortKey),n)){let{geometry:a,index:n,sourceLayerIndex:o}=r;if(this.hasPattern){let e=oI("fill",this.layers,r,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(r,a,n,i,{},t.subdivisionGranularity);t.featureIndex.insert(e[n].feature,a,n,o,this.index)}}update(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)}addFeatures(e,t,i){for(let r of this.patternFeatures)this.addFeature(r,r.geometry,r.index,t,i,e.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,oM),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}
2addFeature(e,t,i,r,a,n){for(let e of iO(t,500)){let t=oY(e,r,n.fill.getGranularityForZoomLevel(r.z)),i=this.layoutVertexArray;oJ((e,t)=>{i.emplaceBack(e,t)},this.segments,this.layoutVertexArray,this.indexArray,t.verticesFlattened,t.indicesTriangles,this.segments2,this.indexArray2,t.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,a,r)}}ao("FillBucket",o1,{omit:["layers","patternFeatures"]});var o0={get paint(){return h=h||new aF({"fill-antialias":new aC(eR.paint_fill["fill-antialias"]),"fill-opacity":new aR(eR.paint_fill["fill-opacity"]),"fill-color":new aR(eR.paint_fill["fill-color"]),"fill-outline-color":new aR(eR.paint_fill["fill-outline-color"]),"fill-translate":new aC(eR.paint_fill["fill-translate"]),"fill-translate-anchor":new aC(eR.paint_fill["fill-translate-anchor"]),"fill-pattern":new aL(eR.paint_fill["fill-pattern"])})},get layout(){return u=u||new aF({"fill-sort-key":new aR(eR.layout_fill["fill-sort-key"])})}};class o2 extends aB{constructor(e){super(e,o0)}recalculate(e,t){super.recalculate(e,t);let i=this.paint._values["fill-outline-color"];"constant"===i.value.kind&&void 0===i.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new o1(e)}queryRadius(){return oo(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:t,transform:i,pixelsToTileUnits:r}){return n9(ol(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-i.bearingInRadians,r),t)}isTileClipped(){return!0}}let o3=a$([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),o5=a$([{name:"a_centroid",components:2,type:"Int16"}],4),{members:o6}=o3;var o4,o8,o7,o9,le,lt,li,lr={};function la(){if(o8)return o4;o8=1;var e=w();function t(e,t,r,a,n){this.properties={},this.extent=r,this.type=0,this._pbf=e,this._geometry=-1,this._keys=a,this._values=n,e.readFields(i,this,t)}function i(e,t,i){1==e?t.id=i.readVarint():2==e?function(e,t){for(var i=e.readVarint()+e.pos;e.pos<i;){var r=t._keys[e.readVarint()],a=t._values[e.readVarint()];t.properties[r]=a}}(i,t):3==e?t.type=i.readVarint():4==e&&(t._geometry=i.pos)}return o4=t,t.types=["Unknown","Point","LineString","Polygon"],t.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var i,r=t.readVarint()+t.pos,a=1,n=0,o=0,l=0,s=[];t.pos<r;){if(n<=0){var c=t.readVarint();a=7&c,n=c>>3}if(n--,1===a||2===a)o+=t.readSVarint(),l+=t.readSVarint(),1===a&&(i&&s.push(i),i=[]),i.push(new e(o,l));else{if(7!==a)throw Error("unknown command "+a);i&&i.push(i[0].clone())}}return i&&s.push(i),s},t.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,r=0,a=0,n=0,o=1/0,l=-1/0,s=1/0,c=-1/0;e.pos<t;){if(r<=0){var u=e.readVarint();i=7&u,r=u>>3}if(r--,1===i||2===i)(a+=e.readSVarint())<o&&(o=a),a>l&&(l=a),(n+=e.readSVarint())<s&&(s=n),n>c&&(c=n);else if(7!==i)throw Error("unknown command "+i)}return[o,s,l,c]},t.prototype.toGeoJSON=function(e,i,r){var a,n,o=this.extent*Math.pow(2,r),l=this.extent*e,s=this.extent*i,c=this.loadGeometry(),u=t.types[this.type];function h(e){for(var t=0;t<e.length;t++){var i=e[t];e[t]=[360*(i.x+l)/o-180,360/Math.PI*Math.atan(Math.exp((180-360*(i.y+s)/o)*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(a=0;a<c.length;a++)p[a]=c[a][0];h(c=p);break;case 2:for(a=0;a<c.length;a++)h(c[a]);break;case 3:for(c=function(e){var t=e.length;if(t<=1)return[e];for(var i,r,a=[],n=0;n<t;n++){var o=function(e){for(var t,i,r=0,a=0,n=e.length,o=n-1;a<n;o=a++)r+=((i=e[o]).x-(t=e[a]).x)*(t.y+i.y);return r}(e[n]);0!==o&&(void 0===r&&(r=o<0),r===o<0?(i&&a.push(i),i=[e[n]]):i.push(e[n]))}return i&&a.push(i),a}(c),a=0;a<c.length;a++)for(n=0;n<c[a].length;n++)h(c[a][n])}1===c.length?c=c[0]:u="Multi"+u;var d={type:"Feature",geometry:{type:u,coordinates:c},properties:this.properties};return"id"in this&&(d.id=this.id),d},o4}function ln(){if(o9)return o7;o9=1;var e=la();function t(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(i,this,t),this.length=this._features.length}function i(e,t,i){15===e?t.version=i.readVarint():1===e?t.name=i.readString():5===e?t.extent=i.readVarint():2===e?t._features.push(i.pos):3===e?t._keys.push(i.readString()):4===e&&t._values.push(function(e){for(var t=null,i=e.readVarint()+e.pos;e.pos<i;){var r=e.readVarint()>>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}return t}(i))}return o7=t,t.prototype.feature=function(t){if(t<0||t>=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[t];var i=this._pbf.readVarint()+this._pbf.pos;return new e(this._pbf,i,this.extent,this._keys,this._values)},o7}function lo(){return li||(li=1,lr.VectorTile=function(){if(lt)return le;lt=1;var e=ln();function t(t,i,r){if(3===t){var a=new e(r,r.readVarint()+r.pos);a.length&&(i[a.name]=a)}}return le=function(e,i){this.layers=e.readFields(t,{},i)}}(),lr.VectorTileFeature=la(),lr.VectorTileLayer=ln()),lr}var ll=v(lo());let ls=ll.VectorTileFeature.types;function lc(e,t,i,r,a,n,o,l){e.emplaceBack(t,i,2*Math.floor(8192*r)+o,8192*a*2,8192*n*2,Math.round(l))}class lu{constructor(e){this.zoom=e.zoom,this.globalState=e.globalState,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new nb,this.centroidVertexArray=new ng,this.indexArray=new nM,this.programConfigurations=new n2(e.layers,e.zoom),this.segments=new nA,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,i){for(let{feature:r,id:a,index:n,sourceLayerIndex:o}of(this.features=[],this.hasPattern=oP("fill-extrusion",this.layers,t),e)){let e=this.layers[0]._featureFilter.needGeometry,l=n4(r,e);if(!this.layers[0]._featureFilter.filter(new az(this.zoom,{globalState:this.globalState}),l,i))continue;let s={id:a,sourceLayerIndex:o,index:n,geometry:e?l.geometry:n6(r),properties:r.properties,type:r.type,patterns:{}};this.hasPattern?this.features.push(oI("fill-extrusion",this.layers,s,this.zoom,t)):this.addFeature(s,s.geometry,n,i,{},t.subdivisionGranularity),t.featureIndex.insert(r,s.geometry,n,o,this.index,!0)}}addFeatures(e,t,i){for(let r of this.features){let{geometry:a}=r;this.addFeature(r,a,r.index,t,i,e.subdivisionGranularity)}}update(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,o6),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,o5.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,t,i,r,a,n){for(let i of iO(t,500)){let t={x:0,y:0,sampleCount:0},a=this.layoutVertexArray.length;this.processPolygon(t,r,e,i,n);let o=this.layoutVertexArray.length-a,l=Math.floor(t.x/t.sampleC
2ount),s=Math.floor(t.y/t.sampleCount);for(let e=0;e<o;e++)this.centroidVertexArray.emplaceBack(l,s)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,a,r)}processPolygon(e,t,i,r,a){if(r.length<1||lh(r[0]))return;for(let t of r)0!==t.length&&function(e,t){for(let i=0;i<t.length;i++){let r=t[i];i===t.length-1&&t[0].x===r.x&&t[0].y===r.y||(e.x+=r.x,e.y+=r.y,e.sampleCount++)}}(e,t);let n={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},o=a.fill.getGranularityForZoomLevel(t.z),l="Polygon"===ls[i.type];for(let e of r){if(0===e.length||lh(e))continue;let t=oK(e,o,l);this._generateSideFaces(t,n)}if(!l)return;let s=oY(r,t,o,!1),c=this.layoutVertexArray;oJ((e,t)=>{lc(c,e,t,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,s.verticesFlattened,s.indicesTriangles)}_generateSideFaces(e,t){let i=0;for(let n=1;n<e.length;n++){var r,a;let o=e[n],l=e[n-1];if(r=o,a=l,r.x===a.x&&(r.x<0||r.x>8192)||r.y===a.y&&(r.y<0||r.y>8192))continue;t.segment.vertexLength+4>nA.MAX_VERTEX_ARRAY_LENGTH&&(t.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let s=o.sub(l)._perp()._unit(),c=l.dist(o);i+c>32768&&(i=0),lc(this.layoutVertexArray,o.x,o.y,s.x,s.y,0,0,i),lc(this.layoutVertexArray,o.x,o.y,s.x,s.y,0,1,i),i+=c,lc(this.layoutVertexArray,l.x,l.y,s.x,s.y,0,0,i),lc(this.layoutVertexArray,l.x,l.y,s.x,s.y,0,1,i);let u=t.segment.vertexLength;this.indexArray.emplaceBack(u,u+2,u+1),this.indexArray.emplaceBack(u+1,u+2,u+3),t.segment.vertexLength+=4,t.segment.primitiveLength+=2}}}function lh(e){return e.every(e=>e.x<0)||e.every(e=>e.x>8192)||e.every(e=>e.y<0)||e.every(e=>e.y>8192)}ao("FillExtrusionBucket",lu,{omit:["layers","features"]});var lp={get paint(){return p=p||new aF({"fill-extrusion-opacity":new aC(eR["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new aR(eR["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new aC(eR["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new aC(eR["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new aL(eR["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new aR(eR["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new aR(eR["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new aC(eR["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class ld extends aB{constructor(e){super(e,lp)}createBucket(e){return new lu(e)}queryRadius(){return oo(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:i,geometry:r,transform:a,pixelsToTileUnits:n,pixelPosMatrix:o}){let l=ol(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-a.bearingInRadians,n),s=this.paint.get("fill-extrusion-height").evaluate(t,i),c=this.paint.get("fill-extrusion-base").evaluate(t,i),u=function(e,t){let i=[];for(let r of e){let e=[r.x,r.y,0,1];V(e,e,t),i.push(new P(e[0]/e[3],e[1]/e[3]))}return i}(l,o),h=function(e,t,i,r){let a=[],n=[],o=r[8]*t,l=r[9]*t,s=r[10]*t,c=r[11]*t,u=r[8]*i,h=r[9]*i,p=r[10]*i,d=r[11]*i;for(let t of e){let e=[],i=[];for(let a of t){let t=a.x,n=a.y,f=r[0]*t+r[4]*n+r[12],m=r[1]*t+r[5]*n+r[13],g=r[2]*t+r[6]*n+r[14],y=r[3]*t+r[7]*n+r[15],_=g+s,b=y+c,x=f+u,v=m+h,w=g+p,z=y+d,S=new P((f+o)/b,(m+l)/b);S.z=_/b,e.push(S);let T=new P(x/z,v/z);T.z=w/z,i.push(T)}a.push(e),n.push(i)}return[a,n]}(r,c,s,o);return function(e,t,i){let r=1/0;n9(i,t)&&(r=lm(i,t[0]));for(let a=0;a<t.length;a++){let n=t[a],o=e[a];for(let e=0;e<n.length-1;e++){let t=n[e],a=[t,n[e+1],o[e+1],o[e],t];n7(i,a)&&(r=Math.min(r,lm(i,a)))}}return r!==1/0&&r}(h[0],h[1],u)}}function lf(e,t){return e.x*t.x+e.y*t.y}function lm(e,t){if(1===e.length){let i,r=0,a=t[r++];for(;!i||a.equals(i);)if(!(i=t[r++]))return 1/0;for(;r<t.length;r++){let n=t[r],o=e[0],l=i.sub(a),s=n.sub(a),c=o.sub(a),u=lf(l,l),h=lf(l,s),p=lf(s,s),d=lf(c,l),f=lf(c,s),m=u*p-h*h,g=(p*d-h*f)/m,y=(u*f-h*d)/m,_=a.z*(1-g-y)+i.z*g+n.z*y;if(isFinite(_))return _}return 1/0}{let e=1/0;for(let i of t)e=Math.min(e,i.z);return e}}let{members:lg}=a$([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:ly}=a$([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),l_=ll.VectorTileFeature.types,lb=Math.cos(Math.PI/180*37.5);class lx{constructor(e){this.zoom=e.zoom,this.globalState=e.globalState,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={}
2,this.layers.forEach(e=>{this.gradients[e.id]={}}),this.layoutVertexArray=new nx,this.layoutVertexArray2=new nv,this.indexArray=new nM,this.programConfigurations=new n2(e.layers,e.zoom),this.segments=new nA,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,i){this.hasPattern=oP("line",this.layers,t);let r=this.layers[0].layout.get("line-sort-key"),a=!r.isConstant(),n=[];for(let{feature:t,id:o,index:l,sourceLayerIndex:s}of e){let e=this.layers[0]._featureFilter.needGeometry,c=n4(t,e);if(!this.layers[0]._featureFilter.filter(new az(this.zoom,{globalState:this.globalState}),c,i))continue;let u=a?r.evaluate(c,{},i):void 0,h={id:o,properties:t.properties,type:t.type,sourceLayerIndex:s,index:l,geometry:e?c.geometry:n6(t),patterns:{},sortKey:u};n.push(h)}for(let r of(a&&n.sort((e,t)=>e.sortKey-t.sortKey),n)){let{geometry:a,index:n,sourceLayerIndex:o}=r;if(this.hasPattern){let e=oI("line",this.layers,r,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(r,a,n,i,{},t.subdivisionGranularity);t.featureIndex.insert(e[n].feature,a,n,o,this.index)}}update(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)}addFeatures(e,t,i){for(let r of this.patternFeatures)this.addFeature(r,r.geometry,r.index,t,i,e.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,ly)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,lg),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,t,i,r,a,n){let o=this.layers[0].layout,l=o.get("line-join").evaluate(e,{}),s=o.get("line-cap"),c=o.get("line-miter-limit"),u=o.get("line-round-limit");for(let i of(this.lineClips=this.lineFeatureClips(e),t))this.addLine(i,e,l,s,c,u,r,n);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,a,r)}addLine(e,t,i,r,a,n,o,l){let s,c,u,h,p;if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e=oK(e,o?l.line.getGranularityForZoomLevel(o.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t<e.length-1;t++)this.totalDistance+=e[t].dist(e[t+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let d="Polygon"===l_[t.type],f=e.length;for(;f>=2&&e[f-1].equals(e[f-2]);)f--;let m=0;for(;m<f-1&&e[m].equals(e[m+1]);)m++;if(f<(d?3:2))return;"bevel"===i&&(a=1.05);let g=this.overscaling<=16?122880/(512*this.overscaling):0,y=this.segments.prepareSegment(10*f,this.layoutVertexArray,this.indexArray);this.e1=this.e2=-1,d&&(s=e[f-2],p=e[m].sub(s)._unit()._perp());for(let t=m;t<f;t++){if((u=t===f-1?d?e[m+1]:void 0:e[t+1])&&e[t].equals(u))continue;p&&(h=p),s&&(c=s),s=e[t],p=u?u.sub(s)._unit()._perp():h;let o=(h=h||p).add(p);0===o.x&&0===o.y||o._unit();let l=h.x*p.x+h.y*p.y,_=o.x*p.x+o.y*p.y,b=0!==_?1/_:1/0,x=2*Math.sqrt(2-2*_),v=_<lb&&c&&u,w=h.x*p.y-h.y*p.x>0;if(v&&t>m){let e=s.dist(c);if(e>2*g){let t=s.sub(s.sub(c)._mult(g/e)._round());this.updateDistance(c,t),this.addCurrentVertex(t,h,0,0,y),c=t}}let z=c&&u,S=z?i:d?"butt":r;if(z&&"round"===S&&(b<n?S="miter":b<=2&&(S="fakeround")),"miter"===S&&b>a&&(S="bevel"),"bevel"===S&&(b>2&&(S="flipbevel"),b<a&&(S="miter")),c&&this.updateDistance(c,s),"miter"===S)o._mult(b),this.addCurrentVertex(s,o,0,0,y);else if("flipbevel"===S){if(b>100)o=p.mult(-1);else{let e=b*h.add(p).mag()/h.sub(p).mag();o._perp()._mult(e*(w?-1:1))}this.addCurrentVertex(s,o,0,0,y),this.addCurrentVertex(s,o.mult(-1),0,0,y)}else if("bevel"===S||"fakeround"===S){let e=-Math.sqrt(b*b-1),t=w?e:0,i=w?0:e;if(c&&this.addCurrentVertex(s,h,t,i,y),"fakeround"===S){let e=Math.round(180*x/Math.PI/20);for(let t=1;t<e;t++){let i=t/e;if(.5!==i){let e=i-.5;i+=i*e*(i-1)*((1.0904+l*(l*(3.55645-1.43519*l)-3.2452))*e*e+(.848013+l*(.215638*l-1.06021)))}let r=p.sub(h)._mult(i)._add(h)._unit()._mult(w?-1:1);this.addHalfVertex(s,r.x,r.y,!1,w,0,y)}}u&&this.addCurrentVertex(s,p,-t,-i,y)}else if("butt"===S)this.addCurrentVertex(s,o,0,0,y);else if("square"===S){let e=c?1:-1;this.addCurrentVertex(s,o,e,e,y)}else"round"===S&&(c&&(this.addCurrentVertex(s,h,0,0,y),this.addCurrentVertex(s,h,1,1,y,!0)),u&&(this.addCurrentVertex(s,p,-1,-1,y,!0),this.addCurrentVertex(s,p,0,0,y)));if(v&&t<f-1){let e=s.dist(u);if(e>2*g){let t=s.add(u.sub(s)._mult(g/e)._round());this.updateDistance(s,t),this.addCurrentVertex(t,p,0,0,y),s=t}}}}addCurrentVertex(e,t,i,r,a,n=!1){let o=t.y*r-t.x,l=-t.y-t.x*r;this.addHalfVertex(e,t.x+t.y*i,t.y-t.x*i,n,!1,i,a),this.addHalfVertex(e,o,l,n,!0,-r,a),this.distance>16384&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,i,r,a,n))}addHalfVertex({x:e,y:t},i,r,a,n,o,l){let s=.5*(this.lineClips?32767*this.scaledDistance:this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+ +!!a,(t<<1)+ +!!n,Math.round(63*i)+128,Math.round(63*r)+128,1+(0===o?0:o<0?-1:1)|(63&s)<<2,s>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let c=l.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,c,this.e2),l.primitiveLength++),n?this.e2=c:this.e1=c}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}}ao("LineBucket",lx,{omit:["layers","patternFeatures"]});var lv={get paint(){return f=f||new aF({"line-opacity":new aR(eR.paint_line["line-opacity"]),"line-color":new aR(eR.paint_line["line-color"]),"line-translate":new aC(eR.paint_line["line-translate"]),"line-translate-anchor":new aC(eR.paint_line["line-translate-anchor"]),"line-width":new aR(eR.paint_line["line-width"]),"line-gap-width":new aR(eR.paint_line["line-gap-width"]),"line-offset":new aR(eR.paint_line["line-offset"]),"line-blur"
2:new aR(eR.paint_line["line-blur"]),"line-dasharray":new aD(eR.paint_line["line-dasharray"]),"line-pattern":new aL(eR.paint_line["line-pattern"]),"line-gradient":new aO(eR.paint_line["line-gradient"])})},get layout(){return d=d||new aF({"line-cap":new aC(eR.layout_line["line-cap"]),"line-join":new aR(eR.layout_line["line-join"]),"line-miter-limit":new aC(eR.layout_line["line-miter-limit"]),"line-round-limit":new aC(eR.layout_line["line-round-limit"]),"line-sort-key":new aR(eR.layout_line["line-sort-key"])})}};class lw extends aR{possiblyEvaluate(e,t){return t=new az(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,i,r){return t=et({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,i,r)}}class lz extends aB{constructor(e){super(e,lv),this.gradientVersion=0,m||((m=new lw(lv.paint.properties["line-width"].specification)).useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if("line-gradient"===e){let e=this.gradientExpression();this.stepInterpolant=void 0!==e._styleExpression&&e._styleExpression.expression instanceof t6,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=m.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new lx(e)}queryRadius(e){var t,i;return t=on("line-width",this,e),((i=on("line-gap-width",this,e))>0?i+2*t:t)/2+Math.abs(on("line-offset",this,e))+oo(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:i,geometry:r,transform:a,pixelsToTileUnits:n}){var o,l;let s=ol(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-a.bearingInRadians,n),c=n/2*(o=this.paint.get("line-width").evaluate(t,i),(l=this.paint.get("line-gap-width").evaluate(t,i))>0?l+2*o:o),u=this.paint.get("line-offset").evaluate(t,i);return u&&(r=function(e,t){let i=[];for(let r=0;r<e.length;r++){let a=e[r],n=[];for(let e=0;e<a.length;e++){let i=a[e-1],r=a[e],o=a[e+1],l=0===e?new P(0,0):r.sub(i)._unit()._perp(),s=e===a.length-1?new P(0,0):o.sub(r)._unit()._perp(),c=l._add(s)._unit(),u=c.x*s.x+c.y*s.y;0!==u&&c._mult(1/u),n.push(c._mult(t)._add(r))}i.push(n)}return i}(r,u*n)),function(e,t,i){for(let r=0;r<t.length;r++){let a=t[r];if(e.length>=3){for(let t=0;t<a.length;t++)if(oa(e,a[t]))return!0}if(function(e,t,i){if(e.length>1){if(oe(e,t))return!0;for(let r=0;r<t.length;r++)if(ot(t[r],e,i))return!0}for(let r=0;r<e.length;r++)if(ot(e[r],t,i))return!0;return!1}(e,a,i))return!0}return!1}(s,r,c)}isTileClipped(){return!0}}let lS=a$([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),lT=a$([{name:"a_projected_pos",components:3,type:"Float32"}],4);a$([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let lk=a$([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);a$([{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"}]);let lE=a$([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),lM=a$([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);a$([{name:"triangle",components:3,type:"Uint16"}]),a$([{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"}]),a$([{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"}]),a$([{type:"Float32",name:"offsetX"}]),a$([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),a$([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let lP={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","\xa2":"¢","\xa3":"£","\xa5":"¥","\xa6":"¦","\xac":"¬","\xaf":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var lI,lA,lC,lR={};function lL(){if(lC)return lA;lC=1,lA=t;var e=(lI||(lI=1,lR.read=function(e,t,i,r,a){var n,o,l=8*a-r-1,s=(1<<l)-1,
2c=s>>1,u=-7,h=i?a-1:0,p=i?-1:1,d=e[t+h];for(h+=p,n=d&(1<<-u)-1,d>>=-u,u+=l;u>0;n=256*n+e[t+h],h+=p,u-=8);for(o=n&(1<<-u)-1,n>>=-u,u+=r;u>0;o=256*o+e[t+h],h+=p,u-=8);if(0===n)n=1-c;else{if(n===s)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),n-=c}return(d?-1:1)*o*Math.pow(2,n-r)},lR.write=function(e,t,i,r,a,n){var o,l,s,c=8*n-a-1,u=(1<<c)-1,h=u>>1,p=5960464477539062e-23*(23===a),d=r?0:n-1,f=r?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(l=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-o))<1&&(o--,s*=2),(t+=o+h>=1?p/s:p*Math.pow(2,1-h))*s>=2&&(o++,s/=2),o+h>=u?(l=0,o=u):o+h>=1?(l=(t*s-1)*Math.pow(2,a),o+=h):(l=t*Math.pow(2,h-1)*Math.pow(2,a),o=0));a>=8;e[i+d]=255&l,d+=f,l/=256,a-=8);for(o=o<<a|l,c+=a;c>0;e[i+d]=255&o,d+=f,o/=256,c-=8);e[i+d-f]|=128*m}),lR);function t(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}t.Varint=0,t.Fixed64=1,t.Bytes=2,t.Fixed32=5;var i="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");function r(e){return e.type===t.Bytes?e.readVarint()+e.pos:e.pos+1}function a(e,t,i){var r=t<=16383?1:t<=2097151?2:t<=0xfffffff?3:Math.floor(Math.log(t)/(7*Math.LN2));i.realloc(r);for(var a=i.pos-1;a>=e;a--)i.buf[a+r]=i.buf[a]}function n(e,t){for(var i=0;i<e.length;i++)t.writeVarint(e[i])}function o(e,t){for(var i=0;i<e.length;i++)t.writeSVarint(e[i])}function l(e,t){for(var i=0;i<e.length;i++)t.writeFloat(e[i])}function s(e,t){for(var i=0;i<e.length;i++)t.writeDouble(e[i])}function c(e,t){for(var i=0;i<e.length;i++)t.writeBoolean(e[i])}function u(e,t){for(var i=0;i<e.length;i++)t.writeFixed32(e[i])}function h(e,t){for(var i=0;i<e.length;i++)t.writeSFixed32(e[i])}function p(e,t){for(var i=0;i<e.length;i++)t.writeFixed64(e[i])}function d(e,t){for(var i=0;i<e.length;i++)t.writeSFixed64(e[i])}function f(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+0x1000000*e[t+3]}function m(e,t,i){e[i]=t,e[i+1]=t>>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function g(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}return t.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos<i;){var r=this.readVarint(),a=r>>3,n=this.pos;this.type=7&r,e(a,t,this),this.pos===n&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=f(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=g(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=f(this.buf,this.pos)+0x100000000*f(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=f(this.buf,this.pos)+0x100000000*g(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var t=e.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=e.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(e){var t,i,r=this.buf;return t=127&(i=r[this.pos++]),i<128?t:(t|=(127&(i=r[this.pos++]))<<7,i<128?t:(t|=(127&(i=r[this.pos++]))<<14,i<128?t:(t|=(127&(i=r[this.pos++]))<<21,i<128?t:function(e,t,i){var r,a,n,o,l=i.buf;if(n=(112&(o=l[i.pos++]))>>4,o<128||(n|=(127&(o=l[i.pos++]))<<3,o<128)||(n|=(127&(o=l[i.pos++]))<<10,o<128)||(n|=(127&(o=l[i.pos++]))<<17,o<128)||(n|=(127&(o=l[i.pos++]))<<24,o<128)||(n|=(1&(o=l[i.pos++]))<<31,o<128)){return r=e,a=n,t?0x100000000*a+(r>>>0):0x100000000*(a>>>0)+(r>>>0)}throw Error("Expected varint not more than 10 bytes")}(t|=(15&(i=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?-((e+1)/2):e/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var e,t=this.readVarint()+this.pos,r=this.pos;return this.pos=t,t-r>=12&&i?(e=this.buf,i.decode(e.subarray(r,t))):function(e,t,i){for(var r="",a=t;a<i;){var n,o,l,s=e[a],c=null,u=s>239?4:s>223?3:s>191?2:1;if(a+u>i)break;1===u?s<128&&(c=s):2===u?128==(192&(n=e[a+1]))&&(c=(31&s)<<6|63&n)<=127&&(c=null):3===u?(o=e[a+2],128==(192&(n=e[a+1]))&&128==(192&o)&&((c=(15&s)<<12|(63&n)<<6|63&o)<=2047||c>
2=55296&&c<=57343)&&(c=null)):4===u&&(o=e[a+2],l=e[a+3],128==(192&(n=e[a+1]))&&128==(192&o)&&128==(192&l)&&((c=(15&s)<<18|(63&n)<<12|(63&o)<<6|63&l)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),a+=u}return r}(this.buf,r,t)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,i){if(this.type!==t.Bytes)return e.push(this.readVarint(i));var a=r(this);for(e=e||[];this.pos<a;)e.push(this.readVarint(i));return e},readPackedSVarint:function(e){if(this.type!==t.Bytes)return e.push(this.readSVarint());var i=r(this);for(e=e||[];this.pos<i;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==t.Bytes)return e.push(this.readBoolean());var i=r(this);for(e=e||[];this.pos<i;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==t.Bytes)return e.push(this.readFloat());var i=r(this);for(e=e||[];this.pos<i;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==t.Bytes)return e.push(this.readDouble());var i=r(this);for(e=e||[];this.pos<i;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==t.Bytes)return e.push(this.readFixed32());var i=r(this);for(e=e||[];this.pos<i;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==t.Bytes)return e.push(this.readSFixed32());var i=r(this);for(e=e||[];this.pos<i;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==t.Bytes)return e.push(this.readFixed64());var i=r(this);for(e=e||[];this.pos<i;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==t.Bytes)return e.push(this.readSFixed64());var i=r(this);for(e=e||[];this.pos<i;)e.push(this.readSFixed64());return e},skip:function(e){var i=7&e;if(i===t.Varint)for(;this.buf[this.pos++]>127;);else if(i===t.Bytes)this.pos=this.readVarint()+this.pos;else if(i===t.Fixed32)this.pos+=4;else{if(i!==t.Fixed64)throw Error("Unimplemented type: "+i);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var i=new Uint8Array(t);i.set(this.buf),this.buf=i,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),m(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),m(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),m(this.buf,-1&e,this.pos),m(this.buf,Math.floor(23283064365386963e-26*e),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),m(this.buf,-1&e,this.pos),m(this.buf,Math.floor(23283064365386963e-26*e),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>0xfffffff||e<0?function(e,t){var i,r,a,n,o;if(e>=0?(i=e%0x100000000|0,r=e/0x100000000|0):(r=~(-e/0x100000000),0xffffffff^(i=~(-e%0x100000000))?i=i+1|0:(i=0,r=r+1|0)),e>=0xffffffffffffffff||e<-0xffffffffffffffff)throw Error("Given varint doesn't fit into 10 bytes");t.realloc(10),a=i,t.buf[t.pos++]=127&a|128,a>>>=7,t.buf[t.pos++]=127&a|128,a>>>=7,t.buf[t.pos++]=127&a|128,a>>>=7,t.buf[t.pos++]=127&a|128,t.buf[t.pos]=127&(a>>>=7),o=(7&(n=r))<<4,t.buf[t.pos++]|=o|128*!!(n>>>=3),n&&(t.buf[t.pos++]=127&n|128*!!(n>>>=7),n&&(t.buf[t.pos++]=127&n|128*!!(n>>>=7),n&&(t.buf[t.pos++]=127&n|128*!!(n>>>=7),n&&(t.buf[t.pos++]=127&n|128*!!(n>>>=7),n&&(t.buf[t.pos++]=127&n)))))}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|128*(e>127),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|128*(e>127),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|128*(e>127),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?-(2*e)-1:2*e)},writeBoolean:function(e){this.writeVarint(!!e)},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,i){for(var r,a,n=0;n<t.length;n++){if((r=t.charCodeAt(n))>55295&&r<57344){if(!a){r>56319||n+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):a=r;continue}if(r<56320){e[i++]=239,e[i++]=191,e[i++]=189,a=r;continue}r=a-55296<<10|r-56320|65536,a=null}else a&&(e[i++]=239,e[i++]=191,e[i++]=189,a=null);r<128?e[i++]=r:(r<2048?e[i++]=r>>6|192:(r<65536?e[i++]=r>>12|224:(e[i++]=r>>18|240,e[i++]=r>>12&63|128),e[i++]=r>>6&63|128),e[i++]=63&r|128)}return i}(this.buf,e,this.pos);var i=this.pos-t;i>=128&&a(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),e.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),e.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i<t;i++)this.buf[this.pos++]=e[i]},writeRawMessage:function(e,t){this.pos++;var i=this.pos;e(t,this);var r=this.pos-i;r>=128&&a(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,i,r){this.writeTag(e,t.Bytes),this.writeRawMessage(i,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,n,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,o,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,c,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,l,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,s,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,u,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,h,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,p,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,d,t)},writeBytesField:function(e,i){this.writeTag(e,t.Bytes),this.writeBytes(i)},writeFixed32Field:function(e,i){this.writeTag(e,t.Fixed32),this.writeFixed32(i)},writeSFixed32Field:function(e,i){this.writeTag(e,t.Fixed32),this.writeSFixed32(i)},writeFixed64Field:function(e,i){this.writeTag(e,t.Fixed64),this.writeFixed64
2(i)},writeSFixed64Field:function(e,i){this.writeTag(e,t.Fixed64),this.writeSFixed64(i)},writeVarintField:function(e,i){this.writeTag(e,t.Varint),this.writeVarint(i)},writeSVarintField:function(e,i){this.writeTag(e,t.Varint),this.writeSVarint(i)},writeStringField:function(e,i){this.writeTag(e,t.Bytes),this.writeString(i)},writeFloatField:function(e,i){this.writeTag(e,t.Fixed32),this.writeFloat(i)},writeDoubleField:function(e,i){this.writeTag(e,t.Fixed64),this.writeDouble(i)},writeBooleanField:function(e,t){this.writeVarintField(e,!!t)}},lA}var lD,lO=v(lL());function lF(e,t,i){1===e&&i.readMessage(lj,t)}function lj(e,t,i){if(3===e){let{id:e,bitmap:r,width:a,height:n,left:o,top:l,advance:s}=i.readMessage(lB,{});t.push({id:e,bitmap:new og({width:a+6,height:n+6},r),metrics:{width:a,height:n,left:o,top:l,advance:s}})}}function lB(e,t,i){1===e?t.id=i.readVarint():2===e?t.bitmap=i.readBytes():3===e?t.width=i.readVarint():4===e?t.height=i.readVarint():5===e?t.left=i.readSVarint():6===e?t.top=i.readSVarint():7===e&&(t.advance=i.readVarint())}function lN(e){let t=0,i=0;for(let r of e)t+=r.w*r.h,i=Math.max(i,r.w);e.sort((e,t)=>t.h-e.h);let r=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}],a=0,n=0;for(let t of e)for(let e=r.length-1;e>=0;e--){let i=r[e];if(!(t.w>i.w||t.h>i.h)){if(t.x=i.x,t.y=i.y,n=Math.max(n,t.y+t.h),a=Math.max(a,t.x+t.w),t.w===i.w&&t.h===i.h){let t=r.pop();e<r.length&&(r[e]=t)}else t.h===i.h?(i.x+=t.w,i.w-=t.w):(t.w===i.w||r.push({x:i.x+t.w,y:i.y,w:i.w-t.w,h:t.h}),i.y+=t.h,i.h-=t.h);break}}return{w:a,h:n,fill:t/(a*n)||0}}class lU{constructor(e,{pixelRatio:t,version:i,stretchX:r,stretchY:a,content:n,textFitWidth:o,textFitHeight:l}){this.paddedRect=e,this.pixelRatio=t,this.stretchX=r,this.stretchY=a,this.content=n,this.version=i,this.textFitWidth=o,this.textFitHeight=l}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 lV{constructor(e,t){let i={},r={};this.haveRenderCallbacks=[];let a=[];this.addImages(e,i,a),this.addImages(t,r,a);let{w:n,h:o}=lN(a),l=new oy({width:n||1,height:o||1});for(let t in e){let r=e[t],a=i[t].paddedRect;oy.copy(r.data,l,{x:0,y:0},{x:a.x+1,y:a.y+1},r.data)}for(let e in t){let i=t[e],a=r[e].paddedRect,n=a.x+1,o=a.y+1,s=i.data.width,c=i.data.height;oy.copy(i.data,l,{x:0,y:0},{x:n,y:o},i.data),oy.copy(i.data,l,{x:0,y:c-1},{x:n,y:o-1},{width:s,height:1}),oy.copy(i.data,l,{x:0,y:0},{x:n,y:o+c},{width:s,height:1}),oy.copy(i.data,l,{x:s-1,y:0},{x:n-1,y:o},{width:1,height:c}),oy.copy(i.data,l,{x:0,y:0},{x:n+s,y:o},{width:1,height:c})}this.image=l,this.iconPositions=i,this.patternPositions=r}addImages(e,t,i){for(let r in e){let a=e[r],n={x:0,y:0,w:a.data.width+2,h:a.data.height+2};i.push(n),t[r]=new lU(n,a),a.hasRenderCallback&&this.haveRenderCallbacks.push(r)}}patchUpdatedImages(e,t){for(let i in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[i],e.getImage(i),t),this.patchUpdatedImage(this.patternPositions[i],e.getImage(i),t)}patchUpdatedImage(e,t,i){if(!e||!t||e.version===t.version)return;e.version=t.version;let[r,a]=e.tl;i.update(t.data,void 0,{x:r,y:a})}}ao("ImagePosition",lU),ao("ImageAtlas",lV),e.an=void 0,(lD=e.an||(e.an={}))[lD.none=0]="none",lD[lD.horizontal=1]="horizontal",lD[lD.vertical=2]="vertical",lD[lD.horizontalOnly=3]="horizontalOnly";class l${constructor(){this.scale=1,this.fontStack="",this.imageName=null,this.verticalAlign="bottom"}static forText(e,t,i){let r=new l$;return r.scale=e||1,r.fontStack=t,r.verticalAlign=i||"bottom",r}static forImage(e,t){let i=new l$;return i.imageName=e,i.verticalAlign=t||"bottom",i}}class lZ{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(e,t){let i=new lZ;for(let r=0;r<e.sections.length;r++){let a=e.sections[r];a.image?i.addImageSection(a):i.addTextSection(a,t)}return i}length(){return this.text.length}getSection(e){return this.sections[this.sectionIndex[e]]}getSectionIndex(e){return this.sectionIndex[e]}getCharCode(e){return this.text.charCodeAt(e)}verticalizePunctuation(){this.text=function(e){let t="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i+1)||null,a=e.charCodeAt(i-1)||null;t+=r&&ab(r)&&!lP[e[i+1]]||a&&ab(a)&&!lP[e[i-1]]||!lP[e[i]]?e[i]:lP[e[i]]}return t}(this.text)}trim(){let e=0;for(let t=0;t<this.text.length&&lq[this.text.charCodeAt(t)];t++)e++;let t=this.text.length;for(let i=this.text.length-1;i>=0&&i>=e&&lq[this.text.charCodeAt(i)];i--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){let i=new lZ;return i.text=this.text.substring(e,t),i.sectionIndex=this.sectionIndex.slice(e,t),i.sections=this.sections,i}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,t)=>
2Math.max(e,this.sections[t].scale),0)}getMaxImageSize(e){let t=0,i=0;for(let r=0;r<this.length();r++){let a=this.getSection(r);if(a.imageName){let r=e[a.imageName];if(!r)continue;let n=r.displaySize;t=Math.max(t,n[0]),i=Math.max(i,n[1])}}return{maxImageWidth:t,maxImageHeight:i}}addTextSection(e,t){this.text+=e.text,this.sections.push(l$.forText(e.scale,e.fontStack||t,e.verticalAlign));let i=this.sections.length-1;for(let t=0;t<e.text.length;++t)this.sectionIndex.push(i)}addImageSection(e){let t=e.image?e.image.name:"";if(0===t.length)return void el("Can't add FormattedSection with an empty image.");let i=this.getNextImageSectionCharCode();i?(this.text+=String.fromCharCode(i),this.sections.push(l$.forImage(t,e.verticalAlign)),this.sectionIndex.push(this.sections.length-1)):el("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function lG(t,i,r,a,n,o,l,s,c,u,h,p,d,f,m){let g,y=lZ.fromFeature(t,n);p===e.an.vertical&&y.verticalizePunctuation();let{processBidirectionalText:_,processStyledBidirectionalText:b}=aw;if(_&&1===y.sections.length)for(let e of(g=[],_(y.toString(),lJ(y,u,o,i,a,f)))){let t=new lZ;t.text=e,t.sections=y.sections;for(let i=0;i<e.length;i++)t.sectionIndex.push(0);g.push(t)}else if(b)for(let e of(g=[],b(y.text,y.sectionIndex,lJ(y,u,o,i,a,f)))){let t=new lZ;t.text=e[0],t.sectionIndex=e[1],t.sections=y.sections,g.push(t)}else g=function(e,t){let i=[],r=e.text,a=0;for(let r of t)i.push(e.substring(a,r)),a=r;return a<r.length&&i.push(e.substring(a,r.length)),i}(y,lJ(y,u,o,i,a,f));let x=[],v={positionedLines:x,text:y.toString(),top:h[1],bottom:h[1],left:h[0],right:h[0],writingMode:p,iconsInText:!1,verticalizable:!1};return function(t,i,r,a,n,o,l,s,c,u,h,p){let d=0,f=0,m=0,g=0,y="right"===s?1:.5*("left"!==s),_=24/p,b=0;for(let l of n){l.trim();let n=l.getMaxScale(),s={positionedGlyphs:[],lineOffset:0};t.positionedLines[b]=s;let p=s.positionedGlyphs,z=0;if(!l.length()){f+=o,++b;continue}let S=function(e,t,i){let r=24*t.getMaxScale(),{maxImageWidth:a,maxImageHeight:n}=t.getMaxImageSize(e),o=Math.max(r,n*i);return{verticalLineContentWidth:Math.max(r,a*i),horizontalLineContentHeight:o}}(a,l,_);for(let o=0;o<l.length();o++){var x,v,w;let s,m=l.getSection(o),g=l.getSectionIndex(o),y=l.getCharCode(o),b=(x=c,v=h,w=y,!(x===e.an.horizontal||!v&&!a_(w)||v&&(lq[w]||/\p{sc=Arab}/u.test(String.fromCodePoint(w)))));if(m.imageName){if(t.iconsInText=!0,m.scale=m.scale*_,!(s=function(e,t,i,r,a){let n,o=a[e.imageName];if(!o)return null;let l=o.paddedRect,s=o.displaySize,c={width:s[0],height:s[1],left:1,top:-3,advance:t?s[1]:s[0]};if(t)n=r.verticalLineContentWidth-s[1]*e.scale;else{let t=l1(e.verticalAlign);n=(r.horizontalLineContentHeight-s[1]*e.scale)*t}return{rect:l,metrics:c,baselineOffset:n,imageOffset:(t?s[0]:s[1])*e.scale-24*i}}(m,b,n,S,a)))continue;z=Math.max(z,s.imageOffset)}else if(!(s=function(e,t,i,r,a,n){let o,l=n[e.fontStack],s=function(e,t,i,r){if(e&&e.rect)return e;let a=t[i.fontStack],n=a&&a[r];return n?{rect:null,metrics:n.metrics}:null}(l&&l[t],a,e,t);if(null===s)return null;if(i)o=r.verticalLineContentWidth-24*e.scale;else{let t=l1(e.verticalAlign);o=(r.horizontalLineContentHeight-24*e.scale)*t}return{rect:s.rect,metrics:s.metrics,baselineOffset:o}}(m,y,b,S,i,r)))continue;let{rect:T,metrics:k,baselineOffset:E}=s;p.push({glyph:y,imageName:m.imageName,x:d,y:f+E+-17,vertical:b,scale:m.scale,fontStack:m.fontStack,sectionIndex:g,metrics:k,rect:T}),b?(t.verticalizable=!0,d+=(m.imageName?k.advance:24)*m.scale+u):d+=k.advance*m.scale+u}0!==p.length&&(m=Math.max(d-u,m),function(e,t,i,r){if(0===r)return;let a=e[i],n=(e[i].x+a.metrics.advance*a.scale)*r;for(let t=0;t<=i;t++)e[t].x-=n}(p,0,p.length-1,y)),d=0,s.lineOffset=Math.max(z,(n-1)*24);let T=o*n+z;f+=T,g=Math.max(T,g),++b}let{horizontalAlign:z,verticalAlign:S}=lQ(l);(function(e,t,i,r,a,n,o,l,s){let c=(t-i)*a,u=0;for(let t of(u=n!==o?-l*r- -17:-r*s*o+.5*o,e))for(let e of t.positionedGlyphs)e.x+=c,e.y+=u})(t.positionedLines,y,z,S,m,g,o,f,n.length),t.top+=-S*f,t.bottom=t.top+f,t.left+=-z*m,t.right=t.left+m}(v,i,r,a,g,l,s,c,p,u,d,m),!function(e){for(let t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}(x)&&v}let lq={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},lH={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},lW={40:!0};function lX(e,t,i,r,a,n){if(t.imageName){let e=r[t.imageName];return e?e.displaySize[0]*t.scale*24/n+a:0}{let r=i[t.fontStack],n=r&&r[e];return n?n.metrics.advance*t.scale+a:0}}function lY(e,t,i,r){let a=Math.pow(e-t,2);return r?e<t?a/2:2*a:a+Math.abs(i)*i}function lK(e,t,i,r,a,n){let o=null,l=lY(t,i,a,n);for(let e of r){let r=lY(t-e.x,i,a,n)+e.badness;r<=l&&(o=e,l=r)}return{index:e,x:t,priorBreak:o,badness:l}}function lJ(e,t,i,r,a,n){if(!e)return[];let o=[],l=function(e,t,i,r,a,n){let o=0;for(let i=0;i<e.length();i++){let l=e.getSection(i);o+=lX(e.getCharCode(i),l,r,a,t,n)}return o/Math.max(1,Math.ceil(o/i))}(e,t,i,r,a,n),s=e.text.indexOf("​")>=0,c=0;for(let i=0;i<e.length();i++){let u=e.getSection(i),h=e.getCharCode(i);if(lq[h]||(c+=lX(h,u,r,a,t,n)),i<e.length()-1){let t=!(h<11904)&&(!!ad["CJK Compatibility Forms"](h)||!!ad["CJK Compatibility"](h)||!!ad["CJK Strokes"](h)||!!ad["CJK Symbols and Punctuation"](h)||!!ad["Enclosed CJK Letters and Months"](h)||!!ad["Halfwidth and Fullwidth Forms"](h)||!!ad["Ideographic Description Characters"](h)||!!ad["Vertical Forms"](h)||ay.test(String.fromCodePoint(h)));(lH[h]||t||u.imageName||i!==e.length()-2&&lW[e.getCharCode(i+1)])&&o.push(lK(i+1,c,l,o,function(e,t,i){let r=0;return 10===e&&(r-=1e4),i&&(r+=150),40!==e&&65288!==e||(r+=50),41!==t&&65289!==t||(r+=50),r}(h,e.getCharCode(i+1),t&&s),!1))}}return function e(t){return t?e(t.priorBreak).concat(t.index):[]}(lK(e.length(),c,l,o,0,!0))}function lQ(e){let t=.5,i=.5;
2switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":i=1;break;case"top":case"top-right":case"top-left":i=0}return{horizontalAlign:t,verticalAlign:i}}function l1(e){switch(e){case"top":return 0;case"center":return .5;default:return 1}}function l0(e){var t,i;let r=e.left,a=e.top,n=e.right-r,o=e.bottom-a,l=null!=(t=e.image.textFitWidth)?t:"stretchOrShrink",s=null!=(i=e.image.textFitHeight)?i:"stretchOrShrink",c=(e.image.content[2]-e.image.content[0])/(e.image.content[3]-e.image.content[1]);if("proportional"===s){if("stretchOnly"===l&&n/o<c||"proportional"===l){let e=Math.ceil(o*c);r*=e/n,n=e}}else if("proportional"===l&&"stretchOnly"===s&&0!==c&&n/o>c){let e=Math.ceil(n/c);a*=e/o,o=e}return{x1:r,y1:a,x2:r+n,y2:a+o}}function l2(e,t,i,r,a,n){let o,l,s,c,u,h=e.image;if(h.content){let e=h.content,t=h.pixelRatio||1;o=[e[0]/t,e[1]/t,h.displaySize[0]-e[2]/t,h.displaySize[1]-e[3]/t]}let p=t.left*n,d=t.right*n;"width"===i||"both"===i?(u=a[0]+p-r[3],s=a[0]+d+r[1]):s=(u=a[0]+(p+d-h.displaySize[0])/2)+h.displaySize[0];let f=t.top*n,m=t.bottom*n;return"height"===i||"both"===i?(l=a[1]+f-r[0],c=a[1]+m+r[2]):c=(l=a[1]+(f+m-h.displaySize[1])/2)+h.displaySize[1],{image:h,top:l,right:s,bottom:c,left:u,collisionPadding:o}}function l3(e,t){let{expression:i}=t;if("constant"===i.kind)return{kind:"constant",layoutSize:i.evaluate(new az(e+1))};if("source"===i.kind)return{kind:"source"};{let{zoomStops:t,interpolationType:r}=i,a=0;for(;a<t.length&&t[a]<=e;)a++;let n=a=Math.max(0,a-1);for(;n<t.length&&t[n]<e+1;)n++;n=Math.min(t.length-1,n);let o=t[a],l=t[n];return"composite"===i.kind?{kind:"composite",minZoom:o,maxZoom:l,interpolationType:r}:{kind:"camera",minZoom:o,maxZoom:l,minSize:i.evaluate(new az(o)),maxSize:i.evaluate(new az(l)),interpolationType:r}}}function l5(e,t,i){let r="never",a=e.get(t);return a?r=a:e.get(i)&&(r="always"),r}let l6=ll.VectorTileFeature.types,l4=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function l8(e,t,i,r,a,n,o,l,s,c,u,h,p){let d=l?Math.min(32640,Math.round(l[0])):0,f=l?Math.min(32640,Math.round(l[1])):0;e.emplaceBack(t,i,Math.round(32*r),Math.round(32*a),n,o,(d<<1)+ +!!s,f,16*c,16*u,256*h,256*p)}function l7(e,t,i){e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i)}class l9{constructor(e){this.layoutVertexArray=new nz,this.indexArray=new nM,this.programConfigurations=e,this.segments=new nA,this.dynamicLayoutVertexArray=new nS,this.opacityVertexArray=new nT,this.hasVisibleVertices=!1,this.placedSymbolArray=new nl}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(e,t,i,r){this.isEmpty()||(i&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,lS.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,lT.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,l4,!0),this.opacityVertexBuffer.itemSize=1),(i||r)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}ao("SymbolBuffers",l9);class se{constructor(e,t,i){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new i,this.segments=new nA,this.collisionVertexArray=new nE}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,lk.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}ao("CollisionBuffers",se);class st{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.globalState=t.globalState,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let i=this.layers[0]._unevaluatedLayout._values;this.textSizeData=l3(this.zoom,i["text-size"]),this.iconSizeData=l3(this.zoom,i["icon-size"]);let r=this.layers[0].layout,a=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.canOverlap="never"!==l5(r,"text-overlap","text-allow-overlap")||"never"!==l5(r,"icon-overlap","icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==n&&!a.isConstant(),this.sortFeaturesByY=("viewport-y"===n||"auto"===n&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map(t=>e.an[t])),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.sourceID=t.sourceID}createArrays(){this.text=new l9(new n2(this.layers,this.zoom,e=>/^text/.test(e))),this.icon=new l9(new n2(this.layers,this.zoom,e=>/^icon/.test(e))),this.glyphOffsetArray=new nu,this.lineVertexArray=new nh,this.symbolInstances=new nc,this.textAnchorOffsets=new nd}calculateGlyphDependencies(e,t,i,r,a){for(let n=0;n<e.length;n++)if(t[e.charCodeAt(n)]=!0,(i||r)&&a){let i=lP[e.charAt(n)];
2i&&(t[i.charCodeAt(0)]=!0)}}populate(t,i,r){let a=this.layers[0],n=a.layout,o=n.get("text-font"),l=n.get("text-field"),s=n.get("icon-image"),c=("constant"!==l.value.kind||l.value.value instanceof tP&&!l.value.value.isEmpty()||l.value.value.toString().length>0)&&("constant"!==o.value.kind||o.value.value.length>0),u="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,h=n.get("symbol-sort-key");if(this.features=[],!c&&!u)return;let p=i.iconDependencies,d=i.glyphDependencies,f=i.availableImages,m=new az(this.zoom,{globalState:this.globalState});for(let{feature:i,id:l,index:s,sourceLayerIndex:g}of t){let t,y,_=a._featureFilter.needGeometry,b=n4(i,_);if(!a._featureFilter.filter(m,b,r))continue;if(_||(b.geometry=n6(i)),c){let e=a.getValueAndResolveTokens("text-field",b,r,f),i=tP.factory(e),n=this.hasRTLText=this.hasRTLText||function(e){for(let t of e.sections)if(function(e){for(let t of e)if(av(t.charCodeAt(0)))return!0;return!1}(t.text))return!0;return!1}(i);(!n||"unavailable"===aw.getRTLTextPluginStatus()||n&&aw.isParsed())&&(t=function(e,t,i){return e.sections.forEach(e=>{e.text=function(e,t,i){let r=t.layout.get("text-transform").evaluate(i,{});return"uppercase"===r?e=e.toLocaleUpperCase():"lowercase"===r&&(e=e.toLocaleLowerCase()),aw.applyArabicShaping&&(e=aw.applyArabicShaping(e)),e}(e.text,t,i)}),e}(i,a,b))}if(u){let e=a.getValueAndResolveTokens("icon-image",b,r,f);y=e instanceof tO?e:tO.fromString(e)}if(!t&&!y)continue;let x=this.sortFeaturesByKey?h.evaluate(b,{},r):void 0;if(this.features.push({id:l,text:t,icon:y,index:s,sourceLayerIndex:g,geometry:b.geometry,properties:i.properties,type:l6[i.type],sortKey:x}),y&&(p[y.name]=!0),t){let i=o.evaluate(b,{},r).join(","),a="viewport"!==n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");for(let r of(this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(e.an.vertical)>=0,t.sections))if(r.image)p[r.image.name]=!0;else{let e=af(t.toString()),n=r.fontStack||i,o=d[n]=d[n]||{};this.calculateGlyphDependencies(r.text,o,a,this.allowVerticalPlacement,e)}}}"line"===n.get("symbol-placement")&&(this.features=function(e){let t={},i={},r=[],a=0;function n(t){r.push(e[t]),a++}function o(e,t,a){let n=i[e];return delete i[e],i[t]=n,r[n].geometry[0].pop(),r[n].geometry[0]=r[n].geometry[0].concat(a[0]),n}function l(e,i,a){let n=t[i];return delete t[i],t[e]=n,r[n].geometry[0].shift(),r[n].geometry[0]=a[0].concat(r[n].geometry[0]),n}function s(e,t,i){let r=i?t[0][t[0].length-1]:t[0][0];return`${e}:${r.x}:${r.y}`}for(let c=0;c<e.length;c++){let u=e[c],h=u.geometry,p=u.text?u.text.toString():null;if(!p){n(c);continue}let d=s(p,h),f=s(p,h,!0);if(d in i&&f in t&&i[d]!==t[f]){let e=l(d,f,h),a=o(d,f,r[e].geometry);delete t[d],delete i[f],i[s(p,r[a].geometry,!0)]=a,r[e].geometry=null}else d in i?o(d,f,h):f in t?l(d,f,h):(n(c),t[d]=a-1,i[f]=a-1)}return r.filter(e=>e.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((e,t)=>
2e.sortKey-t.sortKey)}update(e,t,i){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,i),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,i))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){let i=this.lineVertexArray.length;if(void 0!==e.segment){let i=e.dist(t[e.segment+1]),r=e.dist(t[e.segment]),a={};for(let r=e.segment+1;r<t.length;r++)a[r]={x:t[r].x,y:t[r].y,tileUnitDistanceFromAnchor:i},r<t.length-1&&(i+=t[r+1].dist(t[r]));for(let i=e.segment||0;i>=0;i--)a[i]={x:t[i].x,y:t[i].y,tileUnitDistanceFromAnchor:r},i>0&&(r+=t[i-1].dist(t[i]));for(let e=0;e<t.length;e++){let t=a[e];this.lineVertexArray.emplaceBack(t.x,t.y,t.tileUnitDistanceFromAnchor)}}return{lineStartIndex:i,lineLength:this.lineVertexArray.length-i}}addSymbols(t,i,r,a,n,o,l,s,c,u,h,p){let d=t.indexArray,f=t.layoutVertexArray,m=t.segments.prepareSegment(4*i.length,f,d,this.canOverlap?o.sortKey:void 0),g=this.glyphOffsetArray.length,y=m.vertexLength,_=this.allowVerticalPlacement&&l===e.an.vertical?Math.PI/2:0,b=o.text&&o.text.sections;for(let e=0;e<i.length;e++){let{tl:a,tr:n,bl:l,br:c,tex:u,pixelOffsetTL:h,pixelOffsetBR:g,minFontScaleX:y,minFontScaleY:x,glyphOffset:v,isSDF:w,sectionIndex:z}=i[e],S=m.vertexLength,T=v[1];l8(f,s.x,s.y,a.x,T+a.y,u.x,u.y,r,w,h.x,h.y,y,x),l8(f,s.x,s.y,n.x,T+n.y,u.x+u.w,u.y,r,w,g.x,h.y,y,x),l8(f,s.x,s.y,l.x,T+l.y,u.x,u.y+u.h,r,w,h.x,g.y,y,x),l8(f,s.x,s.y,c.x,T+c.y,u.x+u.w,u.y+u.h,r,w,g.x,g.y,y,x),l7(t.dynamicLayoutVertexArray,s,_),d.emplaceBack(S,S+2,S+1),d.emplaceBack(S+1,S+2,S+3),m.vertexLength+=4,m.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(v[0]),e!==i.length-1&&z===i[e+1].sectionIndex||t.programConfigurations.populatePaintArrays(f.length,o,o.index,{},p,b&&b[z])}t.placedSymbolArray.emplaceBack(s.x,s.y,g,this.glyphOffsetArray.length-g,y,c,u,s.segment,r?r[0]:0,r?r[1]:0,a[0],a[1],l,0,!1,0,h)}_addCollisionDebugVertex(e,t,i,r,a,n){return t.emplaceBack(0,0),e.emplaceBack(i.x,i.y,r,a,Math.round(n.x),Math.round(n.y))}addCollisionDebugVertices(e,t,i,r,a,n,o){let l=a.segments.prepareSegment(4,a.layoutVertexArray,a.indexArray),s=l.vertexLength,c=a.layoutVertexArray,u=a.collisionVertexArray,h=o.anchorX,p=o.anchorY;this._addCollisionDebugVertex(c,u,n,h,p,new P(e,t)),this._addCollisionDebugVertex(c,u,n,h,p,new P(i,t)),this._addCollisionDebugVertex(c,u,n,h,p,new P(i,r)),this._addCollisionDebugVertex(c,u,n,h,p,new P(e,r)),l.vertexLength+=4;let d=a.indexArray;d.emplaceBack(s,s+1),d.emplaceBack(s+1,s+2),d.emplaceBack(s+2,s+3),d.emplaceBack(s+3,s),l.primitiveLength+=4}addDebugCollisionBoxes(e,t,i,r){for(let a=e;a<t;a++){let e=this.collisionBoxArray.get(a);this.addCollisionDebugVertices(e.x1,e.y1,e.x2,e.y2,r?this.textCollisionBox:this.iconCollisionBox,e.anchorPoint,i)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new se(nk,lE.members,nP),this.iconCollisionBox=new se(nk,lE.members,nP);for(let e=0;e<this.symbolInstances.length;e++){let t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}}_deserializeCollisionBoxesForSymbol(e,t,i,r,a,n,o,l,s){let c={};for(let r=t;r<i;r++){let t=e.get(r);c.textBox={x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,anchorPointX:t.anchorPointX,anchorPointY:t.anchorPointY},c.textFeatureIndex=t.featureIndex;break}for(let t=r;t<a;t++){let i=e.get(t);c.verticalTextBox={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2,anchorPointX:i.anchorPointX,anchorPointY:i.anch
2orPointY},c.verticalTextFeatureIndex=i.featureIndex;break}for(let t=n;t<o;t++){let i=e.get(t);c.iconBox={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2,anchorPointX:i.anchorPointX,anchorPointY:i.anchorPointY},c.iconFeatureIndex=i.featureIndex;break}for(let t=l;t<s;t++){let i=e.get(t);c.verticalIconBox={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2,anchorPointX:i.anchorPointX,anchorPointY:i.anchorPointY},c.verticalIconFeatureIndex=i.featureIndex;break}return c}deserializeCollisionBoxes(e){this.collisionArrays=[];for(let t=0;t<this.symbolInstances.length;t++){let i=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,i.textBoxStartIndex,i.textBoxEndIndex,i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i.iconBoxStartIndex,i.iconBoxEndIndex,i.verticalIconBoxStartIndex,i.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(e,t){let i=e.placedSymbolArray.get(t),r=i.vertexStartIndex+4*i.numGlyphs;for(let t=i.vertexStartIndex;t<r;t+=4)e.indexArray.emplaceBack(t,t+2,t+1),e.indexArray.emplaceBack(t+1,t+2,t+3)}getSortedSymbolIndexes(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;let t=Math.sin(e),i=Math.cos(e),r=[],a=[],n=[];for(let e=0;e<this.symbolInstances.length;++e){n.push(e);let o=this.symbolInstances.get(e);r.push(0|Math.round(t*o.anchorX+i*o.anchorY)),a.push(o.featureIndex)}return n.sort((e,t)=>r[e]-r[t]||a[t]-a[e]),n}addToSortKeyRanges(e,t){let i=this.sortKeyRanges[this.sortKeyRanges.length-1];i&&i.sortKey===t?i.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){for(let t of(this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[],this.symbolInstanceIndexes)){let e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex),[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex].forEach((e,t,i)=>{e>=0&&i.indexOf(e)===t&&this.addIndicesForPlacedSymbol(this.text,e)}),e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}ao("SymbolBucket",st,{omit:["layers","collisionBoxArray","features","compareText"]}),st.MAX_GLYPHS=65535,st.addDynamicAttributes=l7;var si={get paint(){return y=y||new aF({"icon-opacity":new aR(eR.paint_symbol["icon-opacity"]),"icon-color":new aR(eR.paint_symbol["icon-color"]),"icon-halo-color":new aR(eR.paint_symbol["icon-halo-color"]),"icon-halo-width":new aR(eR.paint_symbol["icon-halo-width"]),"icon-halo-blur":new aR(eR.paint_symbol["icon-halo-blur"]),"icon-translate":new aC(eR.paint_symbol["icon-translate"]),"icon-translate-anchor":new aC(eR.paint_symbol["icon-translate-anchor"]),"text-opacity":new aR(eR.paint_symbol["text-opacity"]),"text-color":new aR(eR.paint_symbol["text-color"],{runtimeType:eY,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new aR(eR.paint_symbol["text-halo-color"]),"text-halo-width":new aR(eR.paint_symbol["text-halo-width"]),"text-halo-blur":new aR(eR.paint_symbol["text-halo-blur"]),"text-translate":new aC(eR.paint_symbol["text-translate"]),"text-translate-anchor":new aC(eR.paint_symbol["text-translate-anchor"])})},get layout(){return g=g||new aF({"symbol-placement":new aC(eR.layout_symbol["symbol-placement"]),"symbol-spacing":new aC(eR.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new aC(eR.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new aR(eR.layout_symbol["symbol-sort-key"]),"symbol-z-order":new aC(eR.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new aC(eR.layout_symbol["icon-allow-overlap"]),"icon-overlap":new aC(eR.layout_symbol["icon-overlap"]),"icon-ignore-placement":new aC(eR.layout_symbol["icon-ignore-placement"]),"icon-optional":new aC(eR.layout_symbol["icon-optional"]),"icon-rotation-alignment":new aC(eR.layout_symbol["icon-rotation-alignment"]),"icon-size":new aR(eR.layout_symbol["icon-size"]),"icon-text-fit":new aC(eR.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new aC(eR.layout_symbol["icon-text-fit-padding"]),"icon-image":new aR(eR.layout_symbol["icon-image"]),"icon-rotate":new aR(eR.layout_symbol["icon-rotate"]),"icon-padding":new aR(eR.layout_symbol["icon-padding"]),"icon-keep-upright":new aC(eR.layout_symbol["icon-keep-upright"]),"icon-offset":new aR(eR.layout_symbol["icon-offset"]),"icon-anchor":new aR(eR.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new aC(eR.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new aC(eR.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new aC(eR.layout_symbol["text-rotation-alignment"]),"text-field":new aR(eR.layout_symbol["text-field"]),"text-font":new aR(eR.layout_symbol["text-font"]),"text-size":new aR(eR.layout_symbol["text-size"]),"text-max-width":new aR(eR.layout_symbol["text-max-width"]),"text-line-height":new aC(eR.layout_symbol["text-line-height"]),"text-letter-spacing":new aR(eR.layout_symbol["text-letter-spacing"]),"text-justify":new aR(eR.layout_symbol["text-justify"]),"text-radial-offset":new aR(eR.layout_symbol["text-radial-offset"]),"text-variable-anchor":new aC(eR.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new aR(eR.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new aR(eR.layout_symbol["text-anchor"]),"text-max-angle":new aC(eR.layout_symbol["text-max-angle"]),"text-writing-mode":new aC(eR.layout_symbol["text-writing-mode"]),"text-rotate":new aR(eR.layout_symbol["text-rotate"]),"text-padding":new aC(eR.layout_symbol["text-padding"]),"text-keep-upright":new aC(eR.layout_symbol["text-keep-upright"]),"text-transform":new aR(eR.layout_symbol["text-transform"]),"text-offset":new aR(eR.layout_symbol["text-offset"]),"text-allow-overlap":new aC(eR.layout_symbol["text-allow-overlap"]),"text-overlap":new aC(eR.layout_symbol["text-overlap"]),"text-ignore-placement":new aC(eR.layout_symbol["text-ignore-placement"]),"text-optional":new aC(eR.layout_symbol["text-optional"])})}};class sr{constructor(e){if(void 0===e.property.overrides)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:eq,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}ao("FormatSectionOverride",sr,{omit:["defaultValue"]});class sa extends aB{constructor(e){super(e,si)}recalculate(e,t){if(super.recalculate(e,t),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){let e=this.layout.get("text-writing-mode");if(e){let t=[];for(let i of e)0>t.indexOf(i)&&t.push(i);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,i,r){var a;let n=this.layout.get(e).evaluate(t,{},i,r),o=this._unevaluatedLayout._values[e];return o.isDataDriven()||r_(o.value)||!n?n:(a=t.properties,n.replace(/{([^{}]+)}/g,(e,t)=>a&&t in a?String(a[t]):""))}createBucket(e){return new st(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of si.paint.overridableProperties){if(!sa.hasPaintOverride(this.layout,e))continue;let t=this.paint.get(e),i=new ry(new sr(t),t.property.specification),r=null;r="constant"===t.value.kind||"source"===t.value.kind?new rx("source",i):new rv("composite",i,t.value.zoomStops),this.paint._values[e]=new aI(t.property,r,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,i){return!(!this.layout||t.isDataDriven()||i.isDataDriven())&&sa.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){let i=e.get("text-field"),r=si.paint.properties[t],a=!1,n=e=>{for(let t of e)if(r.overrides&&r.overrides.hasOverride(t))return void(a=!0)};if("constant"===i.value.kind&&i.value.value instanceof tP)n(i.value.value.sections);else if("source"===i.value.kind){let e=t=>{a||(t instanceof tV&&tN(t.value)===e0?n(t.value.sections):t instanceof i_?n(t.sections):t.eachChild(e))},t=i.value;t._styleExpression&&e(t._styleExpression.expression)}return a}}var sn={get paint(){return _=_||new aF({"background-color":new aC(eR.paint_background["background-color"]),"background-pattern":new aD(eR.paint_background["background-pattern"]),"background-opacity":new aC(eR.paint_background["background-opacity"])})}};class so extends aB{constructor(e){super(e,sn)}}var sl={get paint(){return b=b||new aF({"raster-opacity":new aC(eR.paint_raster["raster-opacity"]),"raster-hue-rotate":new aC(eR.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new aC(eR.paint_raster["raster-brightness-min"]),"raster-brightness-max":new aC(eR.paint_raster["raster-brightness-max"]),"raster-saturation":new aC(eR.paint_raster["raster-saturation"]),"raster-contrast":new aC(eR.paint_raster["raster-contrast"]),"raster-resampling":new aC(eR.paint_raster["raster-resampling"]),"raster-fade-duration":new aC(eR.paint_raster["raster-fade-duration"])})}};class ss extends aB{constructor(e){super(e,sl)}}class sc extends aB{constructor(e){super(e,{}),this.onAdd=e=>{this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},this.onRemove=e=>{this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}}class su{constructor(e){this._methodToThrottle=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(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=()=>{}}}let sh={once:!0};class sp{constructor(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new sp(ee(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let t=Math.PI/180,i=this.lat*t,r=e.lat*t;return 6371008.8*Math.acos(Math.min(Math.sin(i)*Math.sin(r)+Math.cos(i)*Math.cos(r)*Math.cos((e.lng-this.lng)*t),1))}static convert(e){if(e instanceof sp)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new sp(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new sp(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw 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>]")}}let sd=2*Math.PI*6371008.8;function sf(e){return sd*Math.cos(e*Math.PI/180)}function sm(e){return(180+e)/360}function sg(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function sy(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180)
2)-90}function s_(e,t){return e*sf(sy(t))}class sb{constructor(e,t,i=0){this.x=+e,this.y=+t,this.z=+i}static fromLngLat(e,t=0){let i=sp.convert(e);return new sb(sm(i.lng),sg(i.lat),t/sf(i.lat))}toLngLat(){return new sp(360*this.x-180,sy(this.y))}toAltitude(){return s_(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/sd*(1/Math.cos(sy(this.y)*Math.PI/180))}}function sx(e,t,i){var r=2*Math.PI*6378137/256/Math.pow(2,i);return[e*r-2*Math.PI*6378137/2,t*r-2*Math.PI*6378137/2]}class sv{constructor(e,t,i){if(!function(e,t,i){return!(e<0||e>25||i<0||i>=Math.pow(2,e)||t<0||t>=Math.pow(2,e))}(e,t,i))throw Error(`x=${t}, y=${i}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=t,this.y=i,this.key=sS(0,e,e,t,i)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,i){var r,a,n,o,l;let s=(a=this.y,n=this.z,o=sx(256*(r=this.x),256*(a=Math.pow(2,n)-a-1),n),l=sx(256*(r+1),256*(a+1),n),o[0]+","+o[1]+","+l[0]+","+l[1]),c=function(e,t,i){let r,a="";for(let n=e;n>0;n--)a+=(t&(r=1<<n-1)?1:0)+(i&r?2:0);return a}(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String("tms"===i?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,t>1?"@2x":"").replace(/{quadkey}/g,c).replace(/{bbox-epsg-3857}/g,s)}isChildOf(e){let t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){let t=Math.pow(2,this.z);return new P((e.x*t-this.x)*8192,(e.y*t-this.y)*8192)}toString(){return`${this.z}/${this.x}/${this.y}`}}class sw{constructor(e,t){this.wrap=e,this.canonical=t,this.key=sS(e,t.z,t.z,t.x,t.y)}}class sz{constructor(e,t,i,r,a){if(this.terrainRttPosMatrix32f=null,e<i)throw Error(`overscaledZ should be >= z; overscaledZ = ${e}; z = ${i}`);this.overscaledZ=e,this.wrap=t,this.canonical=new sv(i,+r,+a),this.key=sS(t,e,i,r,a)}clone(){return new sz(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let t=this.canonical.z-e;return e>this.canonical.z?new sz(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new sz(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}calculateScaledKey(e,t){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let i=this.canonical.z-e;return e>this.canonical.z?sS(this.wrap*t,e,this.canonical.z,this.canonical.x,this.canonical.y):sS(this.wrap*t,e,e,this.canonical.x>>i,this.canonical.y>>i)}isChildOf(e){if(e.wrap!==this.wrap)return!1;let t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ<this.overscaledZ&&e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new sz(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let t=this.canonical.z+1,i=2*this.canonical.x,r=2*this.canonical.y;return[new sz(t,this.wrap,t,i,r),new sz(t,this.wrap,t,i+1,r),new sz(t,this.wrap,t,i,r+1),new sz(t,this.wrap,t,i+1,r+1)]}isLessThan(e){return this.wrap<e.wrap||!(this.wrap>e.wrap)&&(this.overscaledZ<e.overscaledZ||!(this.overscaledZ>e.overscaledZ)&&(this.canonical.x<e.canonical.x||!(this.canonical.x>e.canonical.x)&&this.canonical.y<e.canonical.y))}wrapped(){return new sz(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(e){return new sz(this.overscaledZ,e,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new sw(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(e){return this.canonical.getTilePoint(new sb(e.x-this.wrap,e.y))}}function sS(e,t,i,r,a){(e*=2)<0&&(e=-1*e-1);let n=1<<i;return(n*n*e+n*a+r).toString(36)+i.toString(36)+t.toString(36)}ao("CanonicalTileID",sv),ao("OverscaledTileID",sz,{omit:["terrainRttPosMatrix32f"]});class sT{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(e){return this.minX=Math.min(this.minX,e.x),this.minY=Math.min(this.minY,e.y),this.maxX=Math.max(this.maxX,e.x),this.maxY=Math.max(this.maxY,e.y),this}expandBy(e){return this.minX-=e,this.minY-=e,this.maxX+=e,this.maxY+=e,(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(e){return this.expandBy(-e)}map(e){let t=new sT;return t.extend(e(new P(this.minX,this.minY))),t.extend(e(new P(this.maxX,this.minY))),t.extend(e(new P(this.minX,this.maxY))),t.extend(e(new P(this.maxX,this.maxY))),t}static fromPoints(e){let t=new sT;for(let i of e)t.extend(i);return t}contains(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(e){return!this.empty()&&!e.empty()&&e.minX>=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY}intersects(e){return!this.empty()&&!e.empty()&&e.minX<=this.maxX&&e.maxX>=this.minX&&e.minY<=this.maxY&&e.maxY>=this.minY}}class sk{constructor(e){this._stringToNumber={},this._numberToString=[];for(let t=0;t<e.length;t++){let i=e[t];this._stringToNumber[i]=t,this._numberToString[t]=i}}encode(e){return this._stringToNumber[e]}decode(e){if(e>=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class sE{constructor(e,t,i,r,a){this.type="Feature",this._vectorTileFeature=e,e._z=t,e._x=i,e._y=r,this.properties=e.properties,this.id=a}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&(e[t]=this[t]);return e}}class sM{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new aa(8192,16,0),this.grid3D=new aa(8192,16,0),this.featureIndexArray=new nm,this.promoteId=t}insert(e,t,i,r,a,n){let o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(i,r,a);let l=n?this.grid3D:this.grid;for(let e=0;e<t.length;e++){let i=t[e],r=[1/0,1/0,-1/0,-1/0];for(let e=0;e<i.length;e++){let t=i[e];r[0]=Math.min(r[0],t.x),r[1]=Math.min(r[1],t.y),r[2]=Math.max(r[2],t.x),r[3]=Math.max(r[3],t.y)}r[0]<8192&&r[1]<8192&&r[2]>=0&&r[3]>=0&&l.insert(o,r[0],r[1],r[2],r[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new ll.VectorTile(new lO(this.rawTileData)).layers,this.sourceLayerCoder=new sk(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(e,t,i,r){let a;this.loadVTLayers();let n=e.params,o=8192/e.tileSize/e.scale,l=rE(n.filter),s=e.queryGeometry,c=e.queryPadding*o,u=sT.fromPoints(s),h=this.grid.query(u.minX-c,u.minY-c,u.maxX+c,u.maxY+c),p=sT.fromPoints(e.cameraQueryGeometry).expandBy(c);for(let t of this.grid3D.query(p.minX,p.minY,p.maxX,p.maxY,(t,i,r,a)=>(function(e,t,i,r,a){for(let n of e)if(t<=n.x&&i<=n.y&&r>=n.x&&a>=n.y)return!0;let n=[new P(t,i),new P(t,a),new P(r,a),new P(r,i)];if(e.length>2){for(let t of n)if(oa(e,t))return!0}for(let t=0;t<e.length-1;t++)if(function(e,t,i){let r=i[0],a=i[2];if(e.x<r.x&&t.x<r.x||e.x>a.x&&t.x>a.x||e.y<r.y&&t.y<r.y||e.y>a.y&&t.y>a.y)return!1;let n=es(e,t,i[0]);return n!==es(e,t,i[1])||n!==es(e,t,i[2])||n!==es(e,t,i[3])}(e[t],e[t+1],n))return!0;return!1})(e.cameraQueryGeometry,t-c,i-c,r+c,a+c)))h.push(t);h.sort(sI);let d={};for(let c=0;c<h.length;c++){let u=h[c];if(u===a)continue;a=u;let p=this.featureIndexArray.get(u),f=null;
2this.loadMatchingFeature(d,p.bucketIndex,p.sourceLayerIndex,p.featureIndex,l,n.layers,n.availableImages,t,i,r,(t,i,r)=>(f||(f=n6(t)),i.queryIntersectsFeature({queryGeometry:s,feature:t,featureState:r,geometry:f,zoom:this.z,transform:e.transform,pixelsToTileUnits:o,pixelPosMatrix:e.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:e.getElevation})))}return d}loadMatchingFeature(e,t,i,r,a,n,o,l,s,c,u){let h=this.bucketLayerIDs[t];if(n&&!h.some(e=>n.has(e)))return;let p=this.sourceLayerCoder.decode(i),d=this.vtLayers[p].feature(r);if(a.needGeometry){let e=n4(d,!0);if(!a.filter(new az(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!a.filter(new az(this.tileID.overscaledZ),d))return;let f=this.getId(d,p);for(let t=0;t<h.length;t++){let i=h[t];if(n&&!n.has(i))continue;let a=l[i];if(!a)continue;let p={};f&&c&&(p=c.getState(a.sourceLayer||"_geojsonTileLayer",f));let m=et({},s[i]);m.paint=sP(m.paint,a.paint,d,p,o),m.layout=sP(m.layout,a.layout,d,p,o);let g=!u||u(d,a,p);if(!g)continue;let y=new sE(d,this.z,this.x,this.y,f);y.layer=m;let _=e[i];void 0===_&&(_=e[i]=[]),_.push({featureIndex:r,feature:y,intersectionZ:g})}}lookupSymbolFeatures(e,t,i,r,a,n,o,l){let s={};this.loadVTLayers();let c=rE(a);for(let a of e)this.loadMatchingFeature(s,i,r,a,c,n,o,l,t);return s}hasLayer(e){for(let t of this.bucketLayerIDs)for(let i of t)if(e===i)return!0;return!1}getId(e,t){var i;let r=e.id;return this.promoteId&&("boolean"==typeof(r=e.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[t]]
2)&&(r=Number(r)),void 0===r&&(null==(i=e.properties)?void 0:i.cluster)&&this.promoteId&&(r=Number(e.properties.cluster_id))),r}}function sP(e,t,i,r,a){return er(e,(e,n)=>{let o=t instanceof aA?t.get(n):null;return o&&o.evaluate?o.evaluate(i,r,a):o})}function sI(e,t){return t-e}function sA(e,t,i,r,a){let n=[];for(let o=0;o<e.length;o++){let l,s=e[o];for(let e=0;e<s.length-1;e++){let o=s[e],c=s[e+1];o.x<t&&c.x<t||(o.x<t?o=new P(t,o.y+(t-o.x)/(c.x-o.x)*(c.y-o.y))._round():c.x<t&&(c=new P(t,o.y+(t-o.x)/(c.x-o.x)*(c.y-o.y))._round()),o.y<i&&c.y<i||(o.y<i?o=new P(o.x+(i-o.y)/(c.y-o.y)*(c.x-o.x),i)._round():c.y<i&&(c=new P(o.x+(i-o.y)/(c.y-o.y)*(c.x-o.x),i)._round()),o.x>=r&&c.x>=r||(o.x>=r?o=new P(r,o.y+(r-o.x)/(c.x-o.x)*(c.y-o.y))._round():c.x>=r&&(c=new P(r,o.y+(r-o.x)/(c.x-o.x)*(c.y-o.y))._round()),o.y>=a&&c.y>=a||(o.y>=a?o=new P(o.x+(a-o.y)/(c.y-o.y)*(c.x-o.x),a)._round():c.y>=a&&(c=new P(o.x+(a-o.y)/(c.y-o.y)*(c.x-o.x),a)._round()),l&&o.equals(l[l.length-1])||(l=[o],n.push(l)),l.push(c)))))}}return n}ao("FeatureIndex",sM,{omit:["rawTileData","sourceLayerCoder"]});class sC extends P{constructor(e,t,i,r){super(e,t),this.angle=i,void 0!==r&&(this.segment=r)}clone(){return new sC(this.x,this.y,this.angle,this.segment)}}function sR(e,t,i,r,a){if(void 0===t.segment||0===i)return!0;let n=t,o=t.segment+1,l=0;for(;l>-i/2;){if(--o<0)return!1;l-=e[o].dist(n),n=e[o]}l+=e[o].dist(e[o+1]),o++;let s=[],c=0;for(;l<i/2;){let t=e[o],i=e[o+1];if(!i)return!1;let n=e[o-1].angleTo(t)-t.angleTo(i);for(n=Math.abs((n+3*Math.PI)%(2*Math.PI)-Math.PI),s.push({distance:l,angleDelta:n}),c+=n;l-s[0].distance>r;)c-=s.shift().angleDelta;if(c>a)return!1;o++,l+=t.dist(i)}return!0}function sL(e){let t=0;for(let i=0;i<e.length-1;i++)t+=e[i].dist(e[i+1]);return t}function sD(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function sO(e,t,i,r){let a=[],n=e.image,o=n.pixelRatio,l=n.paddedRect.w-2,s=n.paddedRect.h-2,c={x1:e.left,y1:e.top,x2:e.right,y2:e.bottom},u=n.stretchX||[[0,l]],h=n.stretchY||[[0,s]],p=(e,t)=>e+t[1]-t[0],d=u.reduce(p,0),f=h.reduce(p,0),m=l-d,g=s-f,y=0,_=d,b=0,x=f,v=0,w=m,z=0,S=g;if(n.content&&r){let t=n.content,i=t[2]-t[0],r=t[3]-t[1];(n.textFitWidth||n.textFitHeight)&&(c=l0(e)),y=sF(u,0,t[0]),b=sF(h,0,t[1]),_=sF(u,t[0],t[2]),x=sF(h,t[1],t[3]),v=t[0]-y,z=t[1]-b,w=i-_,S=r-x}let T=c.x1,k=c.y1,E=c.x2-T,M=c.y2-k,I=(e,r,a,l)=>{var s,c,u,h,p,m,g,I,A,C,R,L,D,O,F,j;let B=(s=e.stretch-y,s/_*E+T),N=(c=e.fixed-v,u=w,h=e.stretch,c-u*h/d),U=(p=r.stretch-b,p/x*M+k),V=(m=r.fixed-z,g=S,I=r.stretch,m-g*I/f),$=(A=a.stretch-y,A/_*E+T),Z=(C=a.fixed-v,R=w,L=a.stretch,C-R*L/d),G=(D=l.stretch-b,D/x*M+k),q=(O=l.fixed-z,F=S,j=l.stretch,O-F*j/f),H=new P(B,U),W=new P($,U),X=new P($,G),Y=new P(B,G),K=new P(N/o,V/o),J=new P(Z/o,q/o),Q=t*Math.PI/180;if(Q){let e=Math.sin(Q),t=Math.cos(Q),i=[t,-e,e,t];H._matMult(i),W._matMult(i),Y._matMult(i),X._matMult(i)}let ee=e.stretch+e.fixed,et=r.stretch+r.fixed;return{tl:H,tr:W,bl:Y,br:X,tex:{x:n.paddedRect.x+1+ee,y:n.paddedRect.y+1+et,w:a.stretch+a.fixed-ee,h:l.stretch+l.fixed-et},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:K,pixelOffsetBR:J,minFontScaleX:w/o/E,minFontScaleY:S/o/M,isSDF:i}};if(r&&(n.stretchX||n.stretchY)){let e=sj(u,m,d),t=sj(h,g,f);for(let i=0;i<e.length-1;i++){let r=e[i],n=e[i+1];for(let e=0;e<t.length-1;e++)a.push(I(r,t[e],n,t[e+1]))}}else a.push(I({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:l+1},{fixed:0,stretch:s+1}));return a}function sF(e,t,i){let r=0;for(let a of e)r+=Math.max(t,Math.min(i,a[1]))-Math.max(t,Math.min(i,a[0]));return r}function sj(e,t,i){let r=[{fixed:-1,stretch:0}];for(let[t,i]of e){let e=r[r.length-1];r.push({fixed:t-e.stretch,stretch:e.stretch}),r.push({fixed:t-e.stretch,stretch:e.stretch+(i-t)})}return r.push({fixed:t+1,stretch:i}),r}ao("Anchor",sC);class sB{constructor(e,t,i,r,a,n,o,l,s,c){var u;if(this.boxStartIndex=e.length,s){let e=n.top,t=n.bottom,i=n.collisionPadding;i&&(e-=i[1],t+=i[3]);let r=t-e;r>0&&(r=Math.max(10,r),this.circleDiameter=r)}else{let s=(null==(u=n.image)?void 0:u.content)&&(n.image.textFitWidth||n.image.textFitHeight)?l0(n):{x1:n.left,y1:n.top,x2:n.right,y2:n.bottom};s.y1=s.y1*o-l[0],s.y2=s.y2*o+l[2],s.x1=s.x1*o-l[3],s.x2=s.x2*o+l[1];let h=n.collisionPadding;if(h&&(s.x1-=h[0]*o,s.y1-=h[1]*o,s.x2+=h[2]*o,s.y2+=h[3]*o),c){let e=new P(s.x1,s.y1),t=new P(s.x2,s.y1),i=new P(s.x1,s.y2),r=new P(s.x2,s.y2),a=c*Math.PI/180;e._rotate(a),t._rotate(a),i._rotate(a),r._rotate(a),s.x1=Math.min(e.x,t.x,i.x,r.x),s.x2=Math.max(e.x,t.x,i.x,r.x),s.y1=Math.min(e.y,t.y,i.y,r.y),s.y2=Math.max(e.y,t.y,i.y,r.y)}e.emplaceBack(t.x,t.y,s.x1,s.y1,s.x2,s.y2,i,r,a)}this.boxEndIndex=e.length}}class sN{constructor(e=[],t=(e,t)=>e<t?-1:+(e>t)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let 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){let{data:t,compare:i}=this,r=t[e];for(;e>0;){let a=e-1>>1,n=t[a];if(i(r,n)>=0)break;t[e]=n,e=a}t[e]=r}_down(e){let{data:t,compare:i}=this,r=this.length>>1,a=t[e];for(;e<r;){let r=1+(e<<1),n=r+1;if(n<this.length&&0>i(t[n],t[r])&&(r=n),i(t[r],a)>=0)break;t[e]=t[r],e=r}t[e]=a}}function sU(e,t){return t.max-e.max}function sV(e,t,i,r){this.p=new P(e,t),this.h=i,this.d=function(e,t){let i=!1,r=1/0;for(let a=0;a<t.length;a++){let n=t[a];for(let t=0,a=n.length,o=a-1;t<a;o=t++){let a=n[t],l=n[o];a.y>e.y!=l.y>e.y&&e.x<(l.x-a.x)*(e.y-a.y)/(l.y-a.y)+a.x&&(i=!i),r=Math.min(r,oi(e,a,l))}}return(i?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}e.aD=void 0,(z=e.aD||(e.aD={}))[z.center=1]="center",z[z.left=2]="left",z[z.right=3]="right",z[z.top=4]="top",z[z.bottom=5]="bottom",z[z["top-left"]=6]="top-left",z[z["top-right"]=7]="top-right",z[z["bottom-left"]=8]="bottom-left",z[z["bottom-right"]=9]="bottom-right";let s$=1/0;function sZ(e,t){return t[1]!==s$?function(e,t,i){let r=0,a=0;switch(t=Math.abs(t),i=Math.abs(i),e){case"top-right":case"top-left":case"top":a=i-7;break;case"bottom-right":case"bottom-left":case"bottom":a=7-i}switch(e){case"top-right":case"bottom-right":case"right":r=-t;break;case"top-left":case"bottom-left":case"left":r=t}return[r,a]}(e,t[0],t[1]):function(e,t){let i=0,r=0;t<0&&(t=0);let a=t/Math.SQRT2;switch(e){case"top-right":case"top-left":r=a-7;break;case"bottom-right":case"bottom-left":r=7-a;break;case"bottom":r=7-t;break;case"top":r=t-7}switch(e){case"top-right":case"bottom-right":i=-a;break;case"top-left":case"bottom-left":i=a;break;case"left":i=t;break;case"right":i=-t}return[i,r]}(e,t[0])}function sG(e,t,i){var r;let a=e.layout,n=null==(r=a.get("text-variable-anchor-offset"))?void 0:r.evaluate(t,{},i);if(n){let e=n.values,t=[];for(let i=0;i<e.length;i+=2){let r=t[i]=e[i],a=e[i+1].map(e=>24*e);r.startsWith("top")?a[1]-=7:r.startsWith("bottom")&&(a[1]+=7),t[i+1]=a}return new tD(t)}let o=a.get("text-variable-anchor");if(o){let r;r=void 0!==e._unevaluatedLayout.getValue("text-radial-offset")?[24*a.get("text-radial-offset").evaluate(t,{},i),s$]:a.get("text-offset").evaluate(t,{},i).map(e=>24*e);let n=[];for(let e of o)n.push(e,sZ(e,r));return new tD(n)}return null}function sq(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function sH(e,t,i,r,a,n,o,l,s,c,u,h,p,d,f){let m=function(e,t,i,r,a,n,o,l){let s=r.layout.get("text-rotate").evaluate(n,{})*Math.PI/180,c=[];for(let e of t.positionedLines)for(let r of e.positionedGlyphs){if(!r.rect)continue;let n=r.rect||{},u=4,h=!0,p=1,d=0,f=(a||l)&&r.vertical,m=r.metrics.advance*r.scale/2;if(l&&t.verticalizable&&(d=e.lineOffset/2-(r.imageName?-(24-r.metrics.width*r.scale)/2:(r.scale-1)*24)),r.imageName){let e=o[r.imageName];h=e.sdf,u=1/(p=e.pixelRatio)}let g=a?[r.x+m,r.y]:[0,0],y=a?[0,0]:[r.x+m+i[0],r.y+i[1]-d],_=[0,0];f&&(_=y,y=[0,0]);let b=r.metrics.isDoubleResolution?2:1,x=(r.metrics.left-u)*r.scale-m+y[0],v=(-r.metrics.top-u)*r.scale+y[1],w=x+n.w/b*r.scale/p,z=v+n.h/b*r.scale/p,S=new P(x,v),T=new P(w,v),k=new P(x,z),E=new P(w,z);if(f){let e=new P(-m,m- -17),t=-Math.PI/2,i=12-m,a=new P(22-i,-(r.imageName?i:0)),n=new P(..._);
2S._rotateAround(t,e)._add(a)._add(n),T._rotateAround(t,e)._add(a)._add(n),k._rotateAround(t,e)._add(a)._add(n),E._rotateAround(t,e)._add(a)._add(n)}if(s){let e=Math.sin(s),t=Math.cos(s),i=[t,-e,e,t];S._matMult(i),T._matMult(i),k._matMult(i),E._matMult(i)}let M=new P(0,0),I=new P(0,0);c.push({tl:S,tr:T,bl:k,br:E,tex:n,writingMode:t.writingMode,glyphOffset:g,sectionIndex:r.sectionIndex,isSDF:h,pixelOffsetTL:M,pixelOffsetBR:I,minFontScaleX:0,minFontScaleY:0})}return c}(0,i,l,a,n,o,r,e.allowVerticalPlacement),g=e.textSizeData,y=null;for(let i of("source"===g.kind?(y=[128*a.layout.get("text-size").evaluate(o,{})])[0]>32640&&el(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`):"composite"===g.kind&&((y=[128*d.compositeTextSizes[0].evaluate(o,{},f),128*d.compositeTextSizes[1].evaluate(o,{},f)])[0]>32640||y[1]>32640)&&el(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`),e.addSymbols(e.text,m,y,l,n,o,c,t,s.lineStartIndex,s.lineLength,p,f),u))h[i]=e.text.placedSymbolArray.length-1;return 4*m.length}function sW(e){for(let t in e)return e[t];return null}let sX=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class sY{static from(e){if(!(e instanceof ArrayBuffer))throw Error("Data must be an instance of ArrayBuffer.");let[t,i]=new Uint8Array(e,0,2);if(219!==t)throw Error("Data does not appear to be in a KDBush format.");let r=i>>4;if(1!==r)throw Error(`Got v${r} data when expected v1.`);let a=sX[15&i];if(!a)throw Error("Unrecognized array type.");
2let[n]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new sY(o,n,a,e)}constructor(e,t=64,i=Float64Array,r){if(isNaN(e)||e<0)throw Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=i,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let a=sX.indexOf(this.ArrayType),n=2*e*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-o%8)%8;if(a<0)throw Error(`Unexpected typed array class: ${i}.`);r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+l,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+n+o+l),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+l,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+a]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=e,this.coords[this._pos++]=t,i}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return function e(t,i,r,a,n,o){if(n-a<=r)return;let l=a+n>>1;(function e(t,i,r,a,n,o){for(;n>a;){if(n-a>600){let l=n-a+1,s=r-a+1,c=Math.log(l),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(l-u)/l)*(s-l/2<0?-1:1);e(t,i,r,Math.max(a,Math.floor(r-s*u/l+h)),Math.min(n,Math.floor(r+(l-s)*u/l+h)),o)}let l=i[2*r+o],s=a,c=n;for(sK(t,i,a,r),i[2*n+o]>l&&sK(t,i,a,n);s<c;){for(sK(t,i,s,c),s++,c--;i[2*s+o]<l;)s++;for(;i[2*c+o]>l;)c--}i[2*a+o]===l?sK(t,i,a,c):sK(t,i,++c,n),c<=r&&(a=c+1),r<=c&&(n=c-1)}})(t,i,l,a,n,o),e(t,i,r,a,l-1,1-o),e(t,i,r,l+1,n,1-o)}(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,i,r){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:n,nodeSize:o}=this,l=[0,a.length-1,0],s=[];for(;l.length;){let c=l.pop()||0,u=l.pop()||0,h=l.pop()||0;if(u-h<=o){for(let o=h;o<=u;o++){let l=n[2*o],c=n[2*o+1];l>=e&&l<=i&&c>=t&&c<=r&&s.push(a[o])}continue}let p=h+u>>1,d=n[2*p],f=n[2*p+1];d>=e&&d<=i&&f>=t&&f<=r&&s.push(a[p]),(0===c?e<=d:t<=f)&&(l.push(h),l.push(p-1),l.push(1-c)),(0===c?i>=d:r>=f)&&(l.push(p+1),l.push(u),l.push(1-c))}return s}within(e,t,i){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:r,coords:a,nodeSize:n}=this,o=[0,r.length-1,0],l=[],s=i*i;for(;o.length;){let c=o.pop()||0,u=o.pop()||0,h=o.pop()||0;if(u-h<=n){for(let i=h;i<=u;i++)sQ(a[2*i],a[2*i+1],e,t)<=s&&l.push(r[i]);continue}let p=h+u>>1,d=a[2*p],f=a[2*p+1];sQ(d,f,e,t)<=s&&l.push(r[p]),(0===c?e-i<=d:t-i<=f)&&(o.push(h),o.push(p-1),o.push(1-c)),(0===c?e+i>=d:t+i>=f)&&(o.push(p+1),o.push(u),o.push(1-c))}return l}}function sK(e,t,i,r){sJ(e,i,r),sJ(t,2*i,2*r),sJ(t,2*i+1,2*r+1)}function sJ(e,t,i){let r=e[t];e[t]=e[i],e[i]=r}function sQ(e,t,i,r){let a=e-i,n=t-r;return a*a+n*n}e.cw=void 0,(S=e.cw||(e.cw={})).create="create",S.load="load",S.fullLoad="fullLoad";let s1=null,s0=[],s2=1e3/60,s3="loadTime",s5="fullLoadTime";e.$=8192,e.A=R,e.B=function([e,t,i]){return t+=90,{x:e*Math.cos(t*=Math.PI/180)*Math.sin(i*=Math.PI/180),y:e*Math.sin(t)*Math.sin(i),z:e*Math.cos(i)}},e.C=ir,e.D=aC,e.E=eC,e.F=az,e.G=ae,e.H=function(e){if(null==eu){let t=e.navigator?e.navigator.userAgent:null;eu=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return eu},e.I=lU,e.J=class{constructor(e,t){this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new su(()=>this.process()),this.subscription=ef(this.target,"message",e=>this.receive(e),!1),this.globalScope=ec(self)?e:window}registerMessageHandler(e,t){this.messageHandlers[e]=t}sendAsync(e,t){return new Promise((i,r)=>{let a=Math.round(1e18*Math.random()).toString(36).substring(0,10),n=t?ef(t.signal,"abort",()=>{null==n||n.unsubscribe(),delete this.resolveRejects[a];let t={id:a,type:"<cancel>",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(t)},sh):null;this.resolveRejects[a]={resolve:e=>{null==n||n.unsubscribe(),i(e)},reject:e=>{null==n||n.unsubscribe(),r(e)}};let o=[],l=Object.assign(Object.assign({},e),{id:a,sourceMapId:this.mapId,origin:location.origin,data:au(e.data,o)});this.target.postMessage(l,{transfer:o})})}receive(e){let t=e.data,i=t.id;if(!("file://"!==t.origin&&"file://"!==location.origin&&"resource://android"!==t.origin&&"resource://android"!==location.origin&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if("<cancel>"===t.type){delete this.tasks[i];let e=this.abortControllers[i];return delete this.abortControllers[i],void(e&&e.abort())}if(ec(self)||t.mustQueue)return this.tasks[i]=t,this.taskQueue.push(i),void this.invoker.trigger();this.processTask(i,t)}}process(){if(0===this.taskQueue.length)return;let e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(e,t)}processTask(e,t){return x(this,void 0,void 0,function*(){if("<response>"===t.type){let i=this.resolveRejects[e];if(delete this.resolveRejects[e],!i)return;return void(t.error?i.reject(ah(t.error)):i.resolve(ah(t.data)))}if(!this.messageHandlers[t.type])return void this.completeTask(e,Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let i=ah(t.data),r=new AbortController;this.abortControllers[e]=r;try{let a=yield this.messageHandlers[t.type](t.sourceMapId,i,r);this.completeTask(e,null,a)}catch(t){this.completeTask(e,t)}})}completeTask(e,t,i){let r=[];delete this.abortControllers[e];let a={id:e,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:t?au(t):null,data:au(i,r)};
2this.target.postMessage(a,{transfer:r})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.K=ez,e.L=function(){var e=new R(16);return R!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.M=function(e,t,i){var r,a,n,o,l,s,c,u,h,p,d,f,m=i[0],g=i[1],y=i[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(a=t[1],n=t[2],o=t[3],l=t[4],s=t[5],c=t[6],u=t[7],h=t[8],p=t[9],d=t[10],f=t[11],e[0]=r=t[0],e[1]=a,e[2]=n,e[3]=o,e[4]=l,e[5]=s,e[6]=c,e[7]=u,e[8]=h,e[9]=p,e[10]=d,e[11]=f,e[12]=r*m+l*g+h*y+t[12],e[13]=a*m+s*g+p*y+t[13],e[14]=n*m+c*g+d*y+t[14],e[15]=o*m+u*g+f*y+t[15]),e},e.N=function(e,t,i){var r=i[0],a=i[1],n=i[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.O=function(e,t,i){var r=t[0],a=t[1],n=t[2],o=t[3],l=t[4],s=t[5],c=t[6],u=t[7],h=t[8],p=t[9],d=t[10],f=t[11],m=t[12],g=t[13],y=t[14],_=t[15],b=i[0],x=i[1],v=i[2],w=i[3];return e[0]=b*r+x*l+v*h+w*m,e[1]=b*a+x*s+v*p+w*g,e[2]=b*n+x*c+v*d+w*y,e[3]=b*o+x*u+v*f+w*_,e[4]=(b=i[4])*r+(x=i[5])*l+(v=i[6])*h+(w=i[7])*m,e[5]=b*a+x*s+v*p+w*g,e[6]=b*n+x*c+v*d+w*y,e[7]=b*o+x*u+v*f+w*_,e[8]=(b=i[8])*r+(x=i[9])*l+(v=i[10])*h+(w=i[11])*m,e[9]=b*a+x*s+v*p+w*g,e[10]=b*n+x*c+v*d+w*y,e[11]=b*o+x*u+v*f+w*_,e[12]=(b=i[12])*r+(x=i[13])*l+(v=i[14])*h+(w=i[15])*m,e[13]=b*a+x*s+v*p+w*g,e[14]=b*n+x*c+v*d+w*y,e[15]=b*o+x*u+v*f+w*_,e},e.P=P,e.Q=function(e,t){let i={};for(let r=0;r<t.length;r++){let a=t[r];a in e&&(i[a]=e[a])}return i},e.R=oy,e.S=sp,e.T=oS,e.U=sg,e.V=sm,e.W=A,e.X=C,e.Y=ed,e.Z=sz,e._=x,e.a=ev,e.a$=function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e},e.a0=sb,e.a1=sT,e.a2=25,e.a3=sv,e.a4=e=>{let t=window.document.createElement("video");return t.muted=!0,new Promise(i=>{for(let r of(t.onloadstart=()=>{i(t)},e)){let e=window.document.createElement("source");eE(r)||(t.crossOrigin="Anonymous"),e.src=r,t.appendChild(e)}})},e.a5=eV,e.a6=function(){return ei++},e.a7=nn,e.a8=st,e.a9=rE,e.aA=24,e.aB=H,e.aC=function(e,t,i,r,a=!1){if(!i[0]&&!i[1])return[0,0];let n=a?"map"===r?-e.bearingInRadians:0:"viewport"===r?e.bearingInRadians:0;if(n){let e=Math.sin(n),t=Math.cos(n);i=[i[0]*t-i[1]*e,i[0]*e+i[1]*t]}return[a?i[0]:H(t,i[0],e.zoom),a?i[1]:H(t,i[1],e.zoom)]},e.aE=l5,e.aF=sq,e.aG=lQ,e.aH=sY,e.aI=a$,e.aJ=oW,e.aK=ng,e.aL=nA,e.aM=nM,e.aN=ee,e.aO=eg,e.aP=s_,e.aQ=N,e.aR=B,e.aS=function(e){var t=new R(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.aT=function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e},e.aU=function(e,t){var i=t[0],r=t[1],a=t[2],n=i*i+r*r+a*a;return n>0&&(n=1/Math.sqrt(n)),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e},e.aV=U,e.aW=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},e.aX=function(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e[3]=t[3]*i[3],e},e.aY=F,e.aZ=function(e,t,i){let r=t[0]*i[0]+t[1]*i[1]+t[2]*i[2];return 0===r?null:(-(e[0]*i[0]+e[1]*i[1]+e[2]*i[2])-i[3])/r},e.a_=F,e.aa=n4,e.ab=sE,e.ac=function(e){let t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(e,i,r,a)=>{let n=r||a;return t[i]=!n||n.toLowerCase(),""}),t["max-age"]){let e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t},e.ad=em,e.ae=function(e){return Math.pow(2,e)},e.af=D,e.ag=Q,e.ah=85.051129,e.ai=function(e,t){return e/sf(t)},e.aj=function(e){return Math.log(e)/Math.LN2},e.ak=function(e){var t=e[0],i=e[1];return t*t+i*i},e.al=function(e,t){let i=[];for(let r in e)r in t||i.push(r);return i},e.am=function(e,t){let i=0,r=0;if("constant"===e.kind)r=e.layoutSize;else if("source"!==e.kind){let{interpolationType:a,minZoom:n,maxZoom:o}=e,l=a?Q(it.interpolationFactor(a,t,n,o),0,1):0;"camera"===e.kind?r=ir.number(e.minSize,e.maxSize,l):i=l}return{uSizeT:i,uSize:r}},e.ao=function(e,{uSize:t,uSizeT:i},{lowerSize:r,upperSize:a}){return"source"===e.kind?r/128:"composite"===e.kind?ir.number(r/128,a/128,i):t},e.ap=function(e,t){var i=t[0],r=t[1],a=t[2],n=t[3],o=t[4],l=t[5],s=t[6],c=t[7],u=t[8],h=t[9],p=t[10],d=t[11],f=t[12],m=t[13],g=t[14],y=t[15],_=i*l-r*o,b=i*s-a*o,x=i*c-n*o,v=r*s-a*l,w=r*c-n*l,z=a*c-n*s,S=u*m-h*f,T=u*g-p*f,k=u*y-d*f,E=h*g-p*m,M=h*y-d*m,P=p*y-d*g,I=_*P-b*M+x*E+v*k-w*T+z*S;return I?(e[0]=(l*P-s*M+c*E)*(I=1/I),e[1]=(a*M-r*P-n*E)*I,e[2]=(m*z-g*w+y*v)*I,e[3]=(p*w-h*z-d*v)*I,e[4]=(s*k-o*P-c*T)*I,e[5]=(i*P-a*k+n*T)*I,e[6]=(g*x-f*z-y*b)*I,e[7]=(u*z-p*x+d*b)*I,e[8]=(o*M-l*k+c*S)*I,e[9]=(r*k-i*M-n*S)*I,e[10]=(f*w-m*x+y*_)*I,e[11]=(h*x-u*w-d*_)*I,e[12]=(l*T-o*E-s*S)*I,e[13]=(i*E-r*T+a*S)*I,e[14]=(m*b-f*v-g*_)*I,e[15]=(u*v-h*b+p*_)*I,e):null},e.aq=G,e.ar=function(e){return Math.hypot(e[0],e[1])},e.as=function(e){return e[0]=0,e[1]=0,e},e.at=function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e},e.au=l7,e.av=V,e.aw=function(e,t,i,r){let a=t.y-e.y,n=t.x-e.x,o=r.y-i.y,l=r.x-i.x,s=o*n-l*a;if(0===s)return null;
2let c=(l*(e.y-i.y)-o*(e.x-i.x))/s;return new P(e.x+c*n,e.y+c*a)},e.ax=sA,e.ay=n7,e.az=function(e){let t=1/0,i=1/0,r=-1/0,a=-1/0;for(let n of e)t=Math.min(t,n.x),i=Math.min(i,n.y),r=Math.max(r,n.x),a=Math.max(a,n.y);return[t,i,r,a]},e.b=eh,e.b$=lM,e.b0=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]},e.b1=sw,e.b2=sS,e.b3=function(e,t,i,r,a){var n,o=1/Math.tan(t/2);return e[0]=o/i,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=a&&a!==1/0?(e[10]=(a+r)*(n=1/(r-a)),e[14]=2*a*r*n):(e[10]=-1,e[14]=-2*r),e},e.b4=function(e){var t=new R(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.b5=function(e,t,i){var r=Math.sin(i),a=Math.cos(i),n=t[0],o=t[1],l=t[2],s=t[3],c=t[4],u=t[5],h=t[6],p=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=n*a+c*r,e[1]=o*a+u*r,e[2]=l*a+h*r,e[3]=s*a+p*r,e[4]=c*a-n*r,e[5]=u*a-o*r,e[6]=h*a-l*r,e[7]=p*a-s*r,e},e.b6=function(e,t,i){var r=Math.sin(i),a=Math.cos(i),n=t[4],o=t[5],l=t[6],s=t[7],c=t[8],u=t[9],h=t[10],p=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=n*a+c*r,e[5]=o*a+u*r,e[6]=l*a+h*r,e[7]=s*a+p*r,e[8]=c*a-n*r,e[9]=u*a-o*r,e[10]=h*a-l*r,e[11]=p*a-s*r,e},e.b7=function(){let e=new Float32Array(16);return D(e),e},e.b8=function(){let e=new Float64Array(16);return D(e),e},e.b9=function(){return new Float64Array(16)},e.bA=function(e){return e[0]=0,e[1]=0,e[2]=0,e},e.bB=function(e,t,i,r){let a=Math.sqrt(e*e+t*t),n=Math.sqrt(i*i+r*r);e/=a,t/=a;let o=Math.acos(e*(i/=n)+t*(r/=n));return-t*i+e*r>0?o:-o},e.bC=function(e,t){let i=W(e,2*Math.PI),r=W(t,2*Math.PI);return Math.min(Math.abs(i-r),Math.abs(i-r+2*Math.PI),Math.abs(i-r-2*Math.PI))},e.bD=function(){let e={},t=eR.$version;for(let i in eR.$root){let r=eR.$root[i];if(r.required){let a=null;null!=(a="version"===i?t:"array"===r.type?[]:{})&&(e[i]=a)}}return e},e.bE=ap,e.bF=eT,e.bG=function e(t,i){if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],i[r]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==i){if("object"!=typeof i||Object.keys(t).length!==Object.keys(i).length)return!1;for(let r in t)if(!e(t[r],i[r]))return!1;return!0}return t===i},e.bH=function(e){e=e.slice();let t=Object.create(null);for(let i=0;i<e.length;i++)t[e[i].id]=e[i];for(let i=0;i<e.length;i++)"ref"in e[i]&&(e[i]=function(e,t){let i={};for(let t in e)"ref"!==t&&(i[t]=e[t]);return eL.forEach(e=>{e in t&&(i[e]=t[e])}),i}(e[i],t[e[i].ref]));return e},e.bI=function(e){if("custom"===e.type)return new sc(e);switch(e.type){case"background":return new so(e);case"circle":return new oc(e);case"color-relief":return new oE(e);case"fill":return new o2(e);case"fill-extrusion":return new ld(e);case"heatmap":return new ox(e);case"hillshade":return new ow(e);case"line":return new lz(e);case"raster":return new ss(e);case"symbol":return new sa(e)}},e.bJ=en,e.bK=function(e,t){if(!e)return[{command:"setStyle",args:[t]}];let i=[];try{if(!eD(e.version,t.version))return[{command:"setStyle",args:[t]}];eD(e.center,t.center)||i.push({command:"setCenter",args:[t.center]}),eD(e.state,t.state)||i.push({command:"setGlobalState",args:[t.state]}),eD(e.centerAltitude,t.centerAltitude)||i.push({command:"setCenterAltitude",args:[t.centerAltitude]}),eD(e.zoom,t.zoom)||i.push({command:"setZoom",args:[t.zoom]}),eD(e.bearing,t.bearing)||i.push({command:"setBearing",args:[t.bearing]}),eD(e.pitch,t.pitch)||i.push({command:"setPitch",args:[t.pitch]}),eD(e.roll,t.roll)||i.push({command:"setRoll",args:[t.roll]}),eD(e.sprite,t.sprite)||i.push({command:"setSprite",args:[t.sprite]}),eD(e.glyphs,t.glyphs)||i.push({command:"setGlyphs",args:[t.glyphs]}),eD(e.transition,t.transition)||i.push({command:"setTransition",args:[t.transition]}),eD(e.light,t.light)||i.push({command:"setLight",args:[t.light]}),eD(e.terrain,t.terrain)||i.push({command:"setTerrain",args:[t.terrain]}),eD(e.sky,t.sky)||i.push({command:"setSky",args:[t.sky]}),eD(e.projection,t.projection)||i.push({command:"setProjection",args:[t.projection]});let r={},a=[];!function(e,t,i,r){let a;for(a in t=t||{},e=e||{})Object.prototype.hasOwnProperty.call(e,a)&&(Object.prototype.hasOwnProperty.call(t,a)||ej(a,i,r));for(a in t){var n;Object.prototype.hasOwnProperty.call(t,a)&&(Object.prototype.hasOwnProperty.call(e,a)?eD(e[a],t[a])||("geojson"===e[a].type&&"geojson"===t[a].type&&function(e,t,i){let r;for(r in e[i])if(Object.prototype.hasOwnProperty.call(e[i],r)&&"data"!==r&&!eD(e[i][r],t[i][r]))return!1;for(r in t[i])if(Object.prototype.hasOwnProperty.call(t[i],r)&&"data"!==r&&!eD(e[i][r],t[i][r]))return!1;return!0}(e,t,a)?eO(i,{command:"setGeoJSONSourceData",args:[a,t[a].data]}):(n=t,ej(a,i,r),eF(a,n,i))):eF(a,t,i))}}(e.sources,t.sources,a,r);let n=[];
2e.layers&&e.layers.forEach(e=>{"source"in e&&r[e.source]?i.push({command:"removeLayer",args:[e.id]}):n.push(e)}),i=i.concat(a),function(e,t,i){let r,a,n,o,l;t=t||[];let s=(e=e||[]).map(eN),c=t.map(eN),u=e.reduce(eU,{}),h=t.reduce(eU,{}),p=s.slice(),d=Object.create(null);for(let e=0,t=0;e<s.length;e++)r=s[e],Object.prototype.hasOwnProperty.call(h,r)?t++:(eO(i,{command:"removeLayer",args:[r]}),p.splice(p.indexOf(r,t),1));for(let e=0,t=0;e<c.length;e++)r=c[c.length-1-e],p[p.length-1-e]!==r&&(Object.prototype.hasOwnProperty.call(u,r)?(eO(i,{command:"removeLayer",args:[r]}),p.splice(p.lastIndexOf(r,p.length-t),1)):t++,o=p[p.length-e],eO(i,{command:"addLayer",args:[h[r],o]}),p.splice(p.length-e,0,r),d[r]=!0);for(let e=0;e<c.length;e++)if(a=u[r=c[e]],n=h[r],!d[r]&&!eD(a,n))if(eD(a.source,n.source)&&eD(a["source-layer"],n["source-layer"])&&eD(a.type,n.type)){for(l in eB(a.layout,n.layout,i,r,null,"setLayoutProperty"),eB(a.paint,n.paint,i,r,null,"setPaintProperty"),eD(a.filter,n.filter)||eO(i,{command:"setFilter",args:[r,n.filter]}),eD(a.minzoom,n.minzoom)&&eD(a.maxzoom,n.maxzoom)||eO(i,{command:"setLayerZoomRange",args:[r,n.minzoom,n.maxzoom]}),a)Object.prototype.hasOwnProperty.call(a,l)&&"layout"!==l&&"paint"!==l&&"filter"!==l&&"metadata"!==l&&"minzoom"!==l&&"maxzoom"!==l&&(0===l.indexOf("paint.")?eB(a[l],n[l],i,r,l.slice(6),"setPaintProperty"):eD(a[l],n[l])||eO(i,{command:"setLayerProperty",args:[r,l,n[l]]}));for(l in n)Object.prototype.hasOwnProperty.call(n,l)&&!Object.prototype.hasOwnProperty.call(a,l)&&"layout"!==l&&"paint"!==l&&"filter"!==l&&"metadata"!==l&&"minzoom"!==l&&"maxzoom"!==l&&(0===l.indexOf("paint.")?eB(a[l],n[l],i,r,l.slice(6),"setPaintProperty"):eD(a[l],n[l])||eO(i,{command:"setLayerProperty",args:[r,l,n[l]]}))}else eO(i,{command:"removeLayer",args:[r]}),o=p[p.lastIndexOf(r)+1],eO(i,{command:"addLayer",args:[n,o]})}(n,t.layers,i)}catch(e){console.warn("Unable to compute style diff:",e),i=[{command:"setStyle",args:[t]}]}return i},e.bL=function(e){let t=[],i=e.id;return void 0===i&&t.push({message:`layers.${i}: missing required property "id"`}),void 0===e.render&&t.push({message:`layers.${i}: missing required method "render"`}),e.renderingMode&&"2d"!==e.renderingMode&&"3d"!==e.renderingMode&&t.push({message:`layers.${i}: property "renderingMode" must be either "2d" or "3d"`}),t},e.bM=er,e.bN=ea,e.bO=class extends nZ{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))}},e.bP=nH,e.bQ=class extends nZ{constructor(e,t){super(e,t),this.current=nW}set(e){if(e[12]!==this.current[12]||e[0]!==this.current[0])return this.current=e,void this.gl.uniformMatrix4fv(this.location,!1,e);for(let t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}}},e.bR=nq,e.bS=class extends nZ{constructor(e,t){super(e,t),this.current=[0,0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]||(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))}},e.bT=class extends nZ{constructor(e,t){super(e,t),this.current=[0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]||(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))}},e.bU=L,e.bV=function(e,t){var i=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=i,e[2]=0,e[3]=-i,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},e.bW=function(e,t,i){var r=t[0],a=t[1],n=t[2];return e[0]=r*i[0]+a*i[3]+n*i[6],e[1]=r*i[1]+a*i[4]+n*i[7],e[2]=r*i[2]+a*i[5]+n*i[8],e},e.bX=function(e,t,i,r,a,n,o){var l=1/(t-i),s=1/(r-a),c=1/(n-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+i)*l,e[13]=(a+r)*s,e[14]=(o+n)*c,e[15]=1,e},e.bY=class extends nZ{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(4*e.length);for(let i=0;i<e.length;i++)t[4*i]=e[i].r,t[4*i+1]=e[i].g,t[4*i+2]=e[i].b,t[4*i+3]=e[i].a;this.gl.uniform4fv(this.location,t)}}},e.bZ=class extends nZ{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(e);this.gl.uniform1fv(this.location,t)}}},e.b_=class extends a3{},e.ba=function(e,t,i){let r=new Float64Array(4);return Z(r,e,t-90,i),r},e.bb=function(e,t,i,r){var a,n,o,l,s,c=t[0],u=t[1],h=t[2],p=t[3],d=i[0],f=i[1],m=i[2],g=i[3];return(n=c*d+u*f+h*m+p*g)<0&&(n=-n,d=-d,f=-f,m=-m,g=-g),1-n>1e-6?(o=Math.sin(a=Math.acos(n)),l=Math.sin((1-r)*a)/o,s=Math.sin(r*a)/o):(l=1-r,s=r),e[0]=l*c+s*d,e[1]=l*u+s*f,e[2]=l*h+s*m,e[3]=l*p+s*g,e},e.bc=function(e){var t,i,r,a,n,o,l,s,c,u,h,p,d,f,m,g;let y,_,b=new Float64Array(9);s=(t=e[0])*(n=t+t),c=(i=e[1])*n,h=(r=e[2])*n,p=r*(o=i+i),f=(a=e[3])*n,m=a*o,g=a*(l=r+r),b[0]=1-(u=i*o)-(d=r*l),b[3]=c-g,b[6]=h+m,b[1]=c+g,b[4]=1-s-d,b[7]=p-f,b[2]=h-m,b[5]=p+f,b[8]=1-s-u;let x=eg(-Math.asin(Q(b[2],-1,1)));return .001>Math.hypot(b[5],b[8])?(y=0,_=-eg(Math.atan2(b[3],b[4]))):(y=eg(0===b[5]&&0===b[8]?0:Math.atan2(b[5],b[8])),_=eg(0===b[1]&&0===b[0]?0:Math.atan2(b[1],b[0]))),{roll:y,pitch:x+90,bearing:_}},e.bd=function(e,t){return e.roll==t.roll&&e.pitch==t.pitch&&e.bearing==t.bearing},e.be=tT,e.bf=nG,e.bg=-32768,e.bh=32767,e.bi=oH,e.bj=X,e.bk=Y,e.bl=tF,e.bm=function(e,t,i,r,a){return X(r,a,Q((e-t)/(i-t),0,1))},e.bn=W,e.bo=function(){return new Float64Array(3)},e.bp=function(e,t,i,r){return e[0]=t[0]+i[0]*r,e[1]=t[1]+i[1]*r,e[2]=t[2]+i[2]*r,e},e.bq=Z,e.br=function(e,t,i){var r=i[0],a=i[1],n=i[2],o=t[0],l=t[1],s=t[2],c=a*s-n*l,u=n*o-r*s,h=r*l-a*o,p=a*h-n*u,d=n*c-r*h,f=r*u-a*c,m=2*i[3];return u*=m,h*=m,d*=2,f*=2,e[0]=o+(c*=m)+(p*=2),e[1]=l+u+d,e[2]=s+h+f,e},e.bs=function(e,t,i){var r,a,n,o,l,s,c;let u=(r=[e[0],e[1],e[2],t[0],t[1],t[2],i[0],i[1],i[2]])[0]*((c=r[8])*(n=r[4])-(o=r[5])*(s=r[7]))+r[1]*(-c*(a=r[3])+o*(l=r[6])
2)+r[2]*(s*a-n*l);if(0===u)return null;let h=U([],[t[0],t[1],t[2]],[i[0],i[1],i[2]]),p=U([],[i[0],i[1],i[2]],[e[0],e[1],e[2]]),d=U([],[e[0],e[1],e[2]],[t[0],t[1],t[2]]),f=N([],h,-e[3]);return B(f,f,N([],p,-t[3])),B(f,f,N([],d,-i[3])),N(f,f,1/u),f},e.bt=6371008.8,e.bu=function(){return new Float64Array(4)},e.bv=function(e,t,i,r){var a=[],n=[];return a[0]=t[0]-i[0],a[1]=t[1]-i[1],a[2]=t[2]-i[2],n[0]=a[0]*Math.cos(r)-a[1]*Math.sin(r),n[1]=a[0]*Math.sin(r)+a[1]*Math.cos(r),n[2]=a[2],e[0]=n[0]+i[0],e[1]=n[1]+i[1],e[2]=n[2]+i[2],e},e.bw=function(e,t,i,r){var a=[],n=[];return a[0]=t[0]-i[0],a[1]=t[1]-i[1],a[2]=t[2]-i[2],n[0]=a[0],n[1]=a[1]*Math.cos(r)-a[2]*Math.sin(r),n[2]=a[1]*Math.sin(r)+a[2]*Math.cos(r),e[0]=n[0]+i[0],e[1]=n[1]+i[1],e[2]=n[2]+i[2],e},e.bx=function(e,t,i,r){var a=[],n=[];return a[0]=t[0]-i[0],a[1]=t[1]-i[1],a[2]=t[2]-i[2],n[0]=a[2]*Math.sin(r)+a[0]*Math.cos(r),n[1]=a[1],n[2]=a[2]*Math.cos(r)-a[0]*Math.sin(r),e[0]=n[0]+i[0],e[1]=n[1]+i[1],e[2]=n[2]+i[2],e},e.by=function(e,t,i){var r=Math.sin(i),a=Math.cos(i),n=t[0],o=t[1],l=t[2],s=t[3],c=t[8],u=t[9],h=t[10],p=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=n*a-c*r,e[1]=o*a-u*r,e[2]=l*a-h*r,e[3]=s*a-p*r,e[8]=n*r+c*a,e[9]=o*r+u*a,e[10]=l*r+h*a,e[11]=s*r+p*a,e},e.bz=function(e,t){let i=W(e,360),r=W(t,360),a=r-i,n=r>i?a-360:a+360;return Math.abs(a)<Math.abs(n)?a:n},e.c=ex,e.c0=class extends a6{},e.c1=ob,e.c2=function(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},e.c3=o_,e.c4=function(e,t,i){var r=t[0],a=t[1],n=t[2],o=i[3]*r+i[7]*a+i[11]*n+i[15];return e[0]=(i[0]*r+i[4]*a+i[8]*n+i[12])/(o=o||1),e[1]=(i[1]*r+i[5]*a+i[9]*n+i[13])/o,e[2]=(i[2]*r+i[6]*a+i[10]*n+i[14])/o,e},e.c5=class extends aH{},e.c6=class extends ni{},e.c7=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},e.c8=function(e,t){var i=e[0],r=e[1],a=e[2],n=e[3],o=e[4],l=e[5],s=e[6],c=e[7],u=e[8],h=e[9],p=e[10],d=e[11],f=e[12],m=e[13],g=e[14],y=e[15],_=t[0],b=t[1],x=t[2],v=t[3],w=t[4],z=t[5],S=t[6],T=t[7],k=t[8],E=t[9],M=t[10],P=t[11],I=t[12],A=t[13],C=t[14],R=t[15];return Math.abs(i-_)<=1e-6*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(r-b)<=1e-6*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(a-x)<=1e-6*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(n-v)<=1e-6*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(o-w)<=1e-6*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(l-z)<=1e-6*Math.max(1,Math.abs(l),Math.abs(z))&&Math.abs(s-S)<=1e-6*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(c-T)<=1e-6*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(u-k)<=1e-6*Math.max(1,Math.abs(u),Math.abs(k))&&Math.abs(h-E)<=1e-6*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(p-M)<=1e-6*Math.max(1,Math.abs(p),Math.abs(M))&&Math.abs(d-P)<=1e-6*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(f-I)<=1e-6*Math.max(1,Math.abs(f),Math.abs(I))&&Math.abs(m-A)<=1e-6*Math.max(1,Math.abs(m),Math.abs(A))&&Math.abs(g-C)<=1e-6*Math.max(1,Math.abs(g),Math.abs(C))&&Math.abs(y-R)<=1e-6*Math.max(1,Math.abs(y),Math.abs(R))},e.c9=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.cA=function(e){delete ev.REGISTERED_PROTOCOLS[e]},e.cB=function(e,t){let i={};for(let r=0;r<e.length;r++){let a=t&&t[e[r].id]||function(e){let t="";for(let i of eL)t+=`/${function e(t){let i=typeof t;if("number"===i||"boolean"===i||"string"===i||null==t)return JSON.stringify(t);if(Array.isArray(t)){let i="[";for(let r of t)i+=`${e(r)},`;return`${i}]`}let r=Object.keys(t).sort(),a="{";for(let i=0;i<r.length;i++)a+=`${JSON.stringify(r[i])}:${e(t[r[i]])},`;return`${a}}`}(e[i])}`;return t}(e[r]);t&&(t[e[r].id]=a);let n=i[a];n||(n=i[a]=[]),n.push(e[r])}let r=[];for(let e in i)r.push(i[e]);return r},e.cC=ao,e.cD=sk,e.cE=sM,e.cF=lV,e.cG=function(t){t.bucket.createArrays(),t.bucket.tilePixelRatio=8192/(512*t.bucket.overscaling),t.bucket.compareText={},t.bucket.iconsNeedLinear=!1;let i=t.bucket.layers[0],r=i.layout,a=i._unevaluatedLayout._values,n={layoutIconSize:a["icon-size"].possiblyEvaluate(new az(t.bu
2cket.zoom+1),t.canonical),layoutTextSize:a["text-size"].possiblyEvaluate(new az(t.bucket.zoom+1),t.canonical),textMaxSize:a["text-size"].possiblyEvaluate(new az(18))};if("composite"===t.bucket.textSizeData.kind){let{minZoom:e,maxZoom:i}=t.bucket.textSizeData;n.compositeTextSizes=[a["text-size"].possiblyEvaluate(new az(e),t.canonical),a["text-size"].possiblyEvaluate(new az(i),t.canonical)]}if("composite"===t.bucket.iconSizeData.kind){let{minZoom:e,maxZoom:i}=t.bucket.iconSizeData;n.compositeIconSizes=[a["icon-size"].possiblyEvaluate(new az(e),t.canonical),a["icon-size"].possiblyEvaluate(new az(i),t.canonical)]}let o=24*r.get("text-line-height"),l="viewport"!==r.get("text-rotation-alignment")&&"point"!==r.get("symbol-placement"),s=r.get("text-keep-upright"),c=r.get("text-size");for(let a of t.bucket.features){let u=r.get("text-font").evaluate(a,{},t.canonical).join(","),h=c.evaluate(a,{},t.canonical),p=n.layoutTextSize.evaluate(a,{},t.canonical),d=n.layoutIconSize.evaluate(a,{},t.canonical),f={horizontal:{},vertical:void 0},m=a.text,g,y=[0,0];if(m){let n=m.toString(),c=24*r.get("text-letter-spacing").evaluate(a,{},t.canonical),d=!function(e){for(let i of e){var t;if(t=i.charCodeAt(0),ag.test(String.fromCodePoint(t)))return!1}return!0}(n)?0:c,g=r.get("text-anchor").evaluate(a,{},t.canonical),_=sG(i,a,t.canonical);if(!_){let e=r.get("text-radial-offset").evaluate(a,{},t.canonical);y=e?sZ(g,[24*e,s$]):r.get("text-offset").evaluate(a,{},t.canonical).map(e=>24*e)}let b=l?"center":r.get("text-justify").evaluate(a,{},t.canonical),x="point"===r.get("symbol-placement")?24*r.get("text-max-width").evaluate(a,{},t.canonical):1/0,v=()=>{t.bucket.allowVerticalPlacement&&af(n)&&(f.vertical=lG(m,t.glyphMap,t.glyphPositions,t.imagePositions,u,x,o,g,"left",d,y,e.an.vertical,!0,p,h))};if(!l&&_){let i=new Set;if("auto"===b)for(let e=0;e<_.values.length;e+=2)i.add(sq(_.values[e]));else i.add(b);let r=!1;for(let a of i)if(!f.horizontal[a])if(r)f.horizontal[a]=f.horizontal[0];else{let i=lG(m,t.glyphMap,t.glyphPositions,t.imagePositions,u,x,o,"center",a,d,y,e.an.horizontal,!1,p,h);i&&(f.horizontal[a]=i,r=1===i.positionedLines.length)}v()}else{"auto"===b&&(b=sq(g));let i=lG(m,t.glyphMap,t.glyphPositions,t.imagePositions,u,x,o,g,b,d,y,e.an.horizontal,!1,p,h);i&&(f.horizontal[b]=i),v(),af(n)&&l&&s&&(f.vertical=lG(m,t.glyphMap,t.glyphPositions,t.imagePositions,u,x,o,g,b,d,y,e.an.vertical,!1,p,h))}}let _=!1;if(a.icon&&a.icon.name){let e=t.imageMap[a.icon.name];e&&(g=function(e,t,i){let{horizontalAlign:r,verticalAlign:a}=lQ(i),n=t[0]-e.displaySize[0]*r,o=t[1]-e.displaySize[1]*a;return{image:e,top:o,bottom:o+e.displaySize[1],left:n,right:n+e.displaySize[0]}}(t.imagePositions[a.icon.name],r.get("icon-offset").evaluate(a,{},t.canonical),r.get("icon-anchor").evaluate(a,{},t.canonical)),_=!!e.sdf,void 0===t.bucket.sdfIcons?t.bucket.sdfIcons=_:t.bucket.sdfIcons!==_&&el("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(e.pixelRatio!==t.bucket.pixelRatio||0!==r.get("icon-rotate").constantOr(1))&&(t.bucket.iconsNeedLinear=!0))}let b=sW(f.horizontal)||f.vertical;t.bucket.iconsInText=!!b&&b.iconsInText,(b||g)&&function(t,i,r,a,n,o,l,s,c,u,h,p){let d,f=o.textMaxSize.evaluate(i,{});void 0===f&&(f=l);let m=t.layers[0].layout,g=m.get("icon-offset").evaluate(i,{},h),y=sW(r.horizontal),_=l/24,b=t.tilePixelRatio*_,x=t.tilePixelRatio*f/24,v=t.tilePixelRatio*s,w=t.tilePixelRatio*m.get("symbol-spacing"),z=m.get("text-padding")*t.tilePixelRatio,S=function(e,t,i,r=1){let a=e.get("icon-padding").evaluate(t,{},i),n=a&&a.values;return[n[0]*r,n[1]*r,n[2]*r,n[3]*r]}(m,i,h,t.tilePixelRatio),T=m.get("text-max-angle")/180*Math.PI,k="viewport"!==m.get("text-rotation-alignment")&&"point"!==m.get("symbol-placement"),E="map"===m.get("icon-rotation-alignment")&&"point"!==m.get("symbol-placement"),M=m.get("symbol-placement"),I=w/2,A=m.get("icon-text-fit");a&&"none"!==A&&(t.allowVerticalPlacement&&r.vertical&&(d=l2(a,r.vertical,A,m.get("icon-text-fit-padding"),g,_)),y&&(a=l2(a,y,A,m.get("icon-text-fit-padding"),g,_)));let C=h?p.line.getGranularityForZoomLevel(h.z):1,R=(s,p)=>{p.x<0||p.x>=8192||p.y<0||p.y>=8192||function(t,i,r,a,n,o,l,s,c,u,h,p,d,f,m,g,y,_,b,x,v,w,z,S,T){let k=t.addToLineVertexArray(i,r),E,M,P,I,A=0,C=0,R=0,L=0,D=-1,O=-1,F={},j=nN("");if(t.allowVerticalPlacement&&a.vertical){let e=s.layout.get("text-rotate").evaluate(v,{},S)+90;P=new sB(c,i,u,h,p,a.vertical,d,f,m,e),l&&(I=new sB(c,i,u,h,p,l,y,_,m,e))}if(n){let r=s.layout.get("icon-rotate").evaluate(v,{}),a="none"!==s.layout.get("icon-text-fit"),o=sO(n,r,z,a),d=l?sO(l,r,z,a):void 0;M=new sB(c,i,u,h,p,n,y,_,!1,r),A=4*o.length;let f=t.iconSizeData,m=null;"source"===f.kind?(m=[128*s.layout.get("icon-size").evaluate(v,{})])[0]>32640&&el(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`):"composite"===f.kind&&((m=[128*w.compositeIconSizes[0].evaluate(v,{},S),128*w.compositeIconSizes[1].evaluate(v,{},S)])[0]>32640||m[1]>32640)&&el(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`),t.addSymbols(t.icon,o,m,x,b,v,e.an.none,i,k.lineStartIndex,k.lineLength,-1,S),D=t.icon.placedSymbolArray.length-1,d&&(C=4*d.length,t.addSymbols(t.icon,d,m,x,b,v,e.an.vertical,i,k.lineStartIndex,k.lineLength,-1,S),O=t.icon.placedSymbolArray.length-1)}let B=Object.keys(a.horizontal);for(let r of B){let n=a.horizontal[r];if(!E){j=nN(n.text);E=new sB(c,i,u,h,p,n,d,f,m,s.layout.get("text-rotate").evaluate(v,{},S))}let l=1===n.positionedLines.length;if(R+=sH(t,i,n,o,s,m,v,g,k,a.vertical?e.an.horizontal:e.an.horizontalOnly,l?B:[r],F,D,w,S),l)break}a.vertical&&(L+=sH(t,i,a.vertical,o,s,m,v,g,k,e.an.vertical,["vertical"],F,O,w,S));let N=E?E.boxStartIndex:t.collisionBoxArray.length,U=E?E.boxEndIndex:t.collisionBoxArray.length,V=P?P.boxStartIndex:t.collisionBoxArray.length,$=P?P.boxEndIndex:t.collisionBoxArray.length,Z=M?M.boxStartIndex:t.collisionBoxArray.length,G=M?M.boxEndIndex:t.collisionBoxArray.length,q=I?I.boxStartIndex:t.collisionBoxArray.length,H=I?I.boxEndIndex:t.collisionBoxArray.length,W=-1,X=(e,t)=>e&&e.circleDiameter?Math.max(e.circleDiameter,t):t;W=X(E,-1),W=X(P,W),W=X(M,W);let Y=+((W=X(I,W))>-1);Y&&(W*=T/24),t.glyphOffsetArray.length>=st.MAX_GLYPHS&&el("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==v.sortKey&&t.addToSortKey
2Ranges(t.symbolInstances.length,v.sortKey);let K=sG(s,v,S),[J,Q]=function(t,i){let r=t.length,a=null==i?void 0:i.values;if((null==a?void 0:a.length)>0)for(let i=0;i<a.length;i+=2){let r=a[i+1];t.emplaceBack(e.aD[a[i]],r[0],r[1])}return[r,t.length]}(t.textAnchorOffsets,K);t.symbolInstances.emplaceBack(i.x,i.y,F.right>=0?F.right:-1,F.center>=0?F.center:-1,F.left>=0?F.left:-1,F.vertical||-1,D,O,j,N,U,V,$,Z,G,q,H,u,R,L,A,C,Y,0,d,W,J,Q)}(t,p,s,r,a,n,d,t.layers[0],t.collisionBoxArray,i.index,i.sourceLayerIndex,t.index,b,[z,z,z,z],k,c,v,S,E,g,i,o,u,h,l)};if("line"===M)for(let e of sA(i.geometry,0,0,8192,8192)){let i=oK(e,C);for(let e of function(e,t,i,r,a,n,o,l,s){let c=r?.6*24*o:0,u=sD(r,a),h=u*o,p=0===e[0].x||8192===e[0].x||0===e[0].y||8192===e[0].y;return t-h<t/4&&(t=h+t/4),function e(t,i,r,a,n,o,l,s,c){let u=o/2,h=sL(t),p=0,d=i-r,f=[];for(let e=0;e<t.length-1;e++){let i=t[e],l=t[e+1],s=i.dist(l),m=l.angleTo(i);for(;d+r<p+s;){let g=((d+=r)-p)/s,y=ir.number(i.x,l.x,g),_=ir.number(i.y,l.y,g);if(y>=0&&y<c&&_>=0&&_<c&&d-u>=0&&d+u<=h){let i=new sC(y,_,m,e);i._round(),a&&!sR(t,i,o,a,n)||f.push(i)}}p+=s}return s||f.length||l||(f=e(t,p/2,r,a,n,o,l,!0,c)),f}(e,p?t/2*l%t:(u/2+48)*o*l%t,t,c,i,h,p,!1,s)}(i,w,T,r.vertical||y,a,24,x,t.overscaling,8192))y&&function(e,t,i,r){let a=e.compareText;if(t in a){let e=a[t];for(let t=e.length-1;t>=0;t--)if(r.dist(e[t])<i)return!0}else a[t]=[];return a[t].push(r),!1}(t,y.text,I,e)||R(i,e)}else if("line-center"===M){for(let e of i.geometry)if(e.length>1){let t=oK(e,C),i=function(e,t,i,r,a,n){let o=i?.6*24*n:0,l=sD(i,r)*n,s=0,c=sL(e)/2;for(let i=0;i<e.length-1;i++){let r=e[i],a=e[i+1],n=r.dist(a);if(s+n>c){let u=(c-s)/n,h=new sC(ir.number(r.x,a.x,u),ir.number(r.y,a.y,u),a.angleTo(r),i);return h._round(),!o||sR(e,h,l,o,t)?h:void 0}s+=n}}(t,T,r.vertical||y,a,0,x);i&&R(t,i)}}else if("Polygon"===i.type)for(let e of iO(i.geometry,0)){let t=function(e,t=1,i=!1){let r=sT.fromPoints(e[0]),a=Math.min(r.width(),r.height()),n=a/2,o=new sN([],sU),{minX:l,minY:s,maxX:c,maxY:u}=r;if(0===a)return new P(l,s);for(let t=l;t<c;t+=a)for(let i=s;i<u;i+=a)o.push(new sV(t+n,i+n,n,e));let h=function(e){let t=0,i=0,r=0,a=e[0];for(let e=0,n=a.length,o=n-1;e<n;o=e++){let n=a[e],l=a[o],s=n.x*l.y-l.x*n.y;i+=(n.x+l.x)*s,r+=(n.y+l.y)*s,t+=3*s}return new sV(i/t,r/t,0,e)}(e),p=o.length;for(;o.length;){let r=o.pop();(r.d>h.d||!h.d)&&(h=r,i&&console.log("found best %d after %d probes",Math.round(1e4*r.d)/1e4,p)),r.max-h.d<=t||(n=r.h/2,o.push(new sV(r.p.x-n,r.p.y-n,n,e)),o.push(new sV(r.p.x+n,r.p.y-n,n,e)),o.push(new sV(r.p.x-n,r.p.y+n,n,e)),o.push(new sV(r.p.x+n,r.p.y+n,n,e)),p+=4)}return i&&(console.log(`num probes: ${p}`),console.log(`best distance: ${h.d}`)),h.p}(e,16);R(oK(e[0],C,!0),new sC(t.x,t.y,0))}else if("LineString"===i.type)for(let e of i.geometry){let t=oK(e,C);R(t,new sC(t[0].x,t[0].y,0))}else if("Point"===i.type)for(let e of i.geometry)for(let t of e)R([t],new sC(t.x,t.y,0))}(t.bucket,a,f,g,t.imageMap,n,p,d,y,_,t.canonical,t.subdivisionGranularity)}t.showCollisionBoxes&&t.bucket.generateCollisionDebugBuffers()},e.cH=lx,e.cI=o1,e.cJ=lu,e.cK=ll,e.cL=lO,e.cM=class{constructor(e){this._marks={start:[e.url,"start"].join("#"),end:[e.url,"end"].join("#"),measure:e.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let e=performance.getEntriesByName(this._marks.measure);return 0===e.length&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),e=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),e}},e.cN=function(e,t,i,n,o){return x(this,void 0,void 0,function*(){if(C())try{return yield ed(e,t,i,n,o)}catch(e){}let l=e.width,s=e.height;r&&a||(a=(r=new OffscreenCanvas(l,s)).getContext("2d",{willReadFrequently:!0})),r.width=l,r.height=s,a.drawImage(e,0,0,l,s);let c=a.getImageData(t,i,n,o);return a.clearRect(0,0,l,s),c.data})},e.cO=oT,e.cP=v,e.cQ=w,e.cR=lo,e.cS=lL,e.cT=rb,e.cU=aw,e.ca=e=>"symbol"===e.type,e.cb=e=>"circle"===e.type,e.cc=e=>"heatmap"===e.type,e.cd=e=>"line"===e.type,e.ce=e=>"fill"===e.type,e.cf=e=>"fill-extrusion"===e.type,e.cg=e=>"hillshade"===e.type,e.ch=e=>"color-relief"===e.type,e.ci=e=>"raster"===e.type,e.cj=e=>"background"===e.type,e.ck=e=>"custom"===e.type,e.cl=K,e.cm=function(e,t,i){let r=q(t.x-i.x,t.y-i.y),a=q(e.x-i.x,e.y-i.y);return eg(Math.atan2(r[0]*a[1]-r[1]*a[0],r[0]*a[0]+r[1]*a[1]))},e.cn=J,e.co=function(e,t){return e_[t]&&(e instanceof MouseEvent||e instanceof WheelEvent)},e.cp=function(e,t){return ey[t]&&"touches"in e},e.cq=function(e){return ey[e]||e_[e]},e.cr=function(e,t,i){var r=t[0],a=t[1];return e[0]=i[0]*r+i[4]*a+i[12],e[1]=i[1]*r+i[5]*a+i[13],e},e.cs=function(e,t){let{x:i,y:r}=sb.fromLngLat(t);return!(e<0||e>25||r<0||r>=1||i<0||i>=1)},e.ct=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10
2]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.cu=class extends aq{},e.cv={mark(e){performance.mark(e)},frame(e){null!=s1&&s0.push(e-s1),s1=e},clearMetrics(){for(let t in s1=null,s0=[],performance.clearMeasures(s3),performance.clearMeasures(s5),e.cw)performance.clearMarks(e.cw[t])},getPerformanceMetrics(){performance.measure(s3,e.cw.create,e.cw.load),performance.measure(s5,e.cw.create,e.cw.fullLoad);let t=performance.getEntriesByName(s3)[0].duration,i=performance.getEntriesByName(s5)[0].duration,r=s0.length,a=1/(s0.reduce((e,t)=>e+t,0)/r/1e3),n=s0.filter(e=>e>s2).reduce((e,t)=>e+(t-s2)/s2,0);return{loadTime:t,fullLoadTime:i,fps:a,percentDroppedFrames:n/(r+n)*100,totalFrames:r}}},e.cx=function(e){return e.message===eb},e.cy=eS,e.cz=function(e,t){ev.REGISTERED_PROTOCOLS[e]=t},e.d=eE,e.e=et,e.f=e=>x(void 0,void 0,void 0,function*(){if(0===e.byteLength)return createImageBitmap(new ImageData(1,1));let t=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(t)}catch(e){throw Error(`Could not load image because of ${e.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),e.g=ew,e.h=e=>new Promise((t,i)=>{let r=new Image;r.onload=()=>{t(r),URL.revokeObjectURL(r.src),r.onload=null,window.requestAnimationFrame(()=>{r.src=ep})},r.onerror=()=>i(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."));let a=new Blob([new Uint8Array(e)],{type:"image/png"});r.src=e.byteLength?URL.createObjectURL(a):ep}),e.i=ec,e.j=(e,t)=>ek(et(e,{type:"json"}),t),e.k=eA,e.l=eI,e.m=ek,e.n=(e,t)=>ek(et(e,{type:"arrayBuffer"}),t),e.o=function(e){return new lO(e).readFields(lF,[])},e.p=lN,e.q=og,e.r=aF,e.s=ef,e.t=ak,e.u=ad,e.v=eR,e.w=el,e.x=r9,e.y=ar,e.z=r6}),i("worker",["./shared"],function(e){class t{constructor(e){this.keyCache={},e&&this.replace(e)}replace(e){this._layerConfigs={},this._layers={},this.update(e,[])}update(t,i){for(let i of t){this._layerConfigs[i.id]=i;let t=this._layers[i.id]=e.bI(i);t._featureFilter=e.a9(t.filter),this.keyCache[i.id]&&delete this.keyCache[i.id]}for(let e of i)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];for(let t of(this.familiesBySource={},e.cB(Object.values(this._layerConfigs),this.keyCache))){let e=t.map(e=>this._layers[e.id]),i=e[0];if("none"===i.visibility)continue;let r=i.source||"",a=this.familiesBySource[r];a||(a=this.familiesBySource[r]={});let n=i.sourceLayer||"_geojsonTileLayer",o=a[n];o||(o=a[n]=[]),o.push(e)}}}class i{constructor(t){let i={},r=[];for(let e in t){let a=t[e],n=i[e]={};for(let e in a){let t=a[+e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;let i={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};r.push(i),n[e]={rect:i,metrics:t.metrics}}}let{w:a,h:n}=e.p(r),o=new e.q({width:a||1,height:n||1});for(let r in t){let a=t[r];for(let t in a){let n=a[+t];if(!n||0===n.bitmap.width||0===n.bitmap.height)continue;let l=i[r][t].rect;e.q.copy(n.bitmap,o,{x:0,y:0},{x:l.x+1,y:l.y+1},n.bitmap)}}this.image=o,this.positions=i}}e.cC("GlyphAtlas",i);class r{constructor(t){this.tileID=new e.Z(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[],this.globalState=t.globalState}parse(t,r,n,o,l){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=t,this.collisionBoxArray=new e.a7;let s=new e.cD(Object.keys(t.layers).sort()),c=new e.cE(this.tileID,this.promoteId);c.bucketLayerIDs=[];let u={},h={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:n,subdivisionGranularity:l},p=r.familiesBySource[this.source];for(let i in p){let r=t.layers[i];if(!r)continue;1===r.version&&e.w(`Vector tile source "${this.source}" layer "${i}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let o=s.encode(i),l=[];for(let e=0;e<r.length;e++){let t=r.feature(e),a=c.getId(t,i);l.push({feature:t,id:a,index:e,sourceLayerIndex:o})}for(let t of p[i]){let i=t[0];i.source!==this.source&&e.w(`layer.source = ${i.source} does not equal this.source = ${this.source}`),i.minzoom&&this.zoom<Math.floor(i.minzoom)||i.maxzoom&&this.zoom>=i.maxzoom||"none"!==i.visibility&&(a(t,this.zoom,n),(u[i.id]=i.createBucket({index:c.bucketLayerIDs.length,layers:t,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:o,sourceID:this.source,globalState:this.globalState})).populate(l,h,this.tileID.canonical),c.bucketLayerIDs.push(t.map(e=>e.id)))}}let d=e.bM(h.glyphDependencies,e=>Object.keys(e).map(Number));
2this.inFlightDependencies.forEach(e=>null==e?void 0:e.abort()),this.inFlightDependencies=[];let f=Promise.resolve({});if(Object.keys(d).length){let e=new AbortController;this.inFlightDependencies.push(e),f=o.sendAsync({type:"GG",data:{stacks:d,source:this.source,tileID:this.tileID,type:"glyphs"}},e)}let m=Object.keys(h.iconDependencies),g=Promise.resolve({});if(m.length){let e=new AbortController;this.inFlightDependencies.push(e),g=o.sendAsync({type:"GI",data:{icons:m,source:this.source,tileID:this.tileID,type:"icons"}},e)}let y=Object.keys(h.patternDependencies),_=Promise.resolve({});if(y.length){let e=new AbortController;this.inFlightDependencies.push(e),_=o.sendAsync({type:"GI",data:{icons:y,source:this.source,tileID:this.tileID,type:"patterns"}},e)}let[b,x,v]=yield Promise.all([f,g,_]),w=new i(b),z=new e.cF(x,v);for(let t in u){let i=u[t];i instanceof e.a8?(a(i.layers,this.zoom,n),e.cG({bucket:i,glyphMap:b,glyphPositions:w.positions,imageMap:x,imagePositions:z.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:h.subdivisionGranularity})):i.hasPattern&&(i instanceof e.cH||i instanceof e.cI||i instanceof e.cJ)&&(a(i.layers,this.zoom,n),i.addFeatures(h,this.tileID.canonical,z.patternPositions))}return this.status="done",{buckets:Object.values(u).filter(e=>!e.isEmpty()),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:w.image,imageAtlas:z,glyphMap:this.returnDependencies?b:null,iconMap:this.returnDependencies?x:null,glyphPositions:this.returnDependencies?w.positions:null}})}}function a(t,i,r){let a=new e.F(i);for(let e of t)e.recalculate(a,r)}class n{constructor(e,t,i){this.actor=e,this.layerIndex=t,this.availableImages=i,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(t,i){return e._(this,void 0,void 0,function*(){let r=yield e.n(t.request,i);try{return{vectorTile:new e.cK.VectorTile(new e.cL(r.data)),rawData:r.data,cacheControl:r.cacheControl,expires:r.expires}}catch(a){let e=new Uint8Array(r.data),i=`Unable to parse the tile at ${t.request.url}, `;throw Error(i+=31===e[0]&&139===e[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${a.message}`)}})}loadTile(t){return e._(this,void 0,void 0,function*(){let i=t.uid,a=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.cM(t.request),n=new r(t);this.loading[i]=n;let o=new AbortController;n.abort=o;try{let r=yield this.loadVectorTile(t,o);if(delete this.loading[i],!r)return null;let l=r.rawData,s={};r.expires&&(s.expires=r.expires),r.cacheControl&&(s.cacheControl=r.cacheControl);let c={};if(a){let e=a.finish();e&&(c.resourceTiming=JSON.parse(JSON.stringify(e)))}n.vectorTile=r.vectorTile;let u=n.parse(r.vectorTile,this.layerIndex,this.availableImages,this.actor,t.subdivisionGranularity);this.loaded[i]=n,this.fetching[i]={rawTileData:l,cacheControl:s,resourceTiming:c};try{let t=yield u;return e.e({rawTileData:l.slice(0)},t,s,c)}finally{delete this.fetching[i]}}catch(e){throw delete this.loading[i],n.status="done",this.loaded[i]=n,e}})}reloadTile(t){return e._(this,void 0,void 0,function*(){let i=t.uid;if(!this.loaded||!this.loaded[i])throw Error("Should not be trying to reload a tile that was never loaded or has been removed");let r=this.loaded[i];if(r.showCollisionBoxes=t.showCollisionBoxes,r.globalState=t.globalState,"parsing"===r.status){let a,n=yield r.parse(r.vectorTile,this.layerIndex,this.availableImages,this.actor,t.subdivisionGranularity);if(this.fetching[i]){let{rawTileData:t,cacheControl:r,resourceTiming:o}=this.fetching[i];delete this.fetching[i],a=e.e({rawTileData:t.slice(0)},n,r,o)}else a=n;return a}if("done"===r.status&&r.vectorTile)return r.parse(r.vectorTile,this.layerIndex,this.availableImages,this.actor,t.subdivisionGranularity)})}abortTile(t){return e._(this,void 0,void 0,function*(){let e=this.loading,i=t.uid;e&&e[i]&&e[i].abort&&(e[i].abort.abort(),delete e[i])})}removeTile(t){return e._(this,void 0,void 0,function*(){this.loaded&&this.loaded[t.uid]&&delete this.loaded[t.uid]})}}class o{constructor(){this.loaded={}}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:i,encoding:r,rawImageData:a,redFactor:n,greenFactor:o,blueFactor:l,baseShift:s}=t,c=a.width+2,u=a.height+2,h=e.b(a)?new e.R({width:c,height:u},(yield e.cN(a,-1,-1,c,u))):a,p=new e.cO(i,h,r,n,o,l,s);return this.loaded=this.loaded||{},this.loaded[i]=p,p})}removeTile(e){let t=this.loaded,i=e.uid;t&&t[i]&&delete t[i]}}var l,s,c,u=function(){if(c)return s;function e(e,i){if(0!==e.length){t(e[0],i);for(var r=1;r<e.length;r++)t(e[r],!i)}}function t(e,t){for(var i=0,r=0,a=0,n=e.length,o=n-1;a<n;o=a++){var l=(e[a][0]-e[o][0])*(e[o][1]+e[a][1]),s=i+l;r+=Math.abs(i)>=Math.abs(l)?i-s+l:l-s+i,i=s}i+r>=0!=!!t&&e.reverse()}return c=1,s=function t(i,r){var a,n=i&&i.type;if("FeatureCollection"===n)for(a=0;a<i.features.length;a++)t(i.features[a],r);else if("GeometryCollection"===n)for(a=0;a<i.geometries.length;a++)t(i.geometries[a],r);else if("Feature"===n)t(i.geometry,r);else if("Polygon"===n)e(i.coordinates,r);else if("MultiPolygon"===n)for(a=0;a<i.coordinates.length;a++)e(i.coordinates[a],r);return i}}(),h=e.cP(u);let p=e.cK.VectorTileFeature.prototype.toGeoJSON;class d{constructor(t){this._feature=t,this.extent=e.$,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=p
2arseInt(t.id,10))}loadGeometry(){if(1===this._feature.type){let t=[];for(let i of this._feature.geometry)t.push([new e.P(i[0],i[1])]);return t}{let t=[];for(let i of this._feature.geometry){let r=[];for(let t of i)r.push(new e.P(t[0],t[1]));t.push(r)}return t}}toGeoJSON(e,t,i){return p.call(this,e,t,i)}}class f{constructor(t){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.$,this.length=t.length,this._features=t}feature(e){return new d(this._features[e])}}var m,g,y,_={exports:{}},b=function(){if(y)return _.exports;y=1;var t=e.cS(),i=function(){if(g)return m;g=1;var t=e.cQ(),i=e.cR().VectorTileFeature;function r(e,t){this.options=t||{},this.features=e,this.length=e.length}function a(e,t){this.id="number"==typeof e.id?e.id:void 0,this.type=e.type,this.rawGeometry=1===e.type?[e.geometry]:e.geometry,this.properties=e.tags,this.extent=t||4096}return m=r,r.prototype.feature=function(e){return new a(this.features[e],this.options.extent)},a.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var i=0;i<e.length;i++){for(var r=e[i],a=[],n=0;n<r.length;n++)a.push(new t(r[n][0],r[n][1]));this.geometry.push(a)}return this.geometry},a.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var e=this.geometry,t=1/0,i=-1/0,r=1/0,a=-1/0,n=0;n<e.length;n++)for(var o=e[n],l=0;l<o.length;l++){var s=o[l];t=Math.min(t,s.x),i=Math.max(i,s.x),r=Math.min(r,s.y),a=Math.max(a,s.y)}return[t,r,i,a]},a.prototype.toGeoJSON=i.prototype.toGeoJSON,m}();function r(e){var i=new t;return function(e,t){for(var i in e.layers)t.writeMessage(3,a,e.layers[i])}(e,i),i.finish()}function a(e,t){t.writeVarintField(15,e.version||1),t.writeStringField(1,e.name||""),t.writeVarintField(5,e.extent||4096);var i,r={keys:[],values:[],keycache:{},valuecache:{}};for(i=0;i<e.length;i++)r.feature=e.feature(i),t.writeMessage(2,n,r);var a=r.keys;for(i=0;i<a.length;i++)t.writeStringField(3,a[i]);var o=r.values;for(i=0;i<o.length;i++)t.writeMessage(4,s,o[i])}function n(e,t){var i=e.feature;void 0!==i.id&&t.writeVarintField(1,i.id),t.writeMessage(2,o,e),t.writeVarintField(3,i.type),t.writeMessage(4,l,i)}function o(e,t){var i=e.feature,r=e.keys,a=e.values,n=e.keycache,o=e.valuecache;for(var l in i.properties){var s=i.properties[l],c=n[l];if(null!==s){void 0===c&&(r.push(l),n[l]=c=r.length-1),t.writeVarint(c);var u=typeof s;"string"!==u&&"boolean"!==u&&"number"!==u&&(s=JSON.stringify(s));var h=u+":"+s,p=o[h];void 0===p&&(a.push(s),o[h]=p=a.length-1),t.writeVarint(p)}}}function l(e,t){for(var i=e.loadGeometry(),r=e.type,a=0,n=0,o=i.length,l=0;l<o;l++){var s=i[l],c=1;1===r&&(c=s.length),t.writeVarint((c<<3)+1);for(var u=3===r?s.length-1:s.length,h=0;h<u;h++){1===h&&1!==r&&t.writeVarint((u-1<<3)+2);var p=s[h].x-a,d=s[h].y-n;t.writeVarint(p<<1^p>>31),t.writeVarint(d<<1^d>>31),a+=p,n+=d}3===r&&t.writeVarint(15)}}function s(e,t){var i=typeof e;"string"===i?t.writeStringField(1,e):"boolean"===i?t.writeBooleanField(7,e):"number"===i&&(e%1!=0?t.writeDoubleField(3,e):e<0?t.writeSVarintField(6,e):t.writeVarintField(5,e))}return _.exports=r,_.exports.fromVectorTileJs=r,_.exports.fromGeojsonVt=function(e,t){t=t||{};var a={};for(var n in e)a[n]=new i(e[n].features,t),a[n].name=n,a[n].version=t.version,a[n].extent=t.extent;return r({layers:a})},_.exports.GeoJSONWrapper=i,_.exports}(),x=e.cP(b);let v={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},w=Math.fround||(l=new Float32Array(1),e=>(l[0]=+e,l[0]));class z{constructor(e){this.options=Object.assign(Object.create(v),e),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){let{log:t,minZoom:i,maxZoom:r}=this.options;t&&console.time("total time");let a=`prepare ${e.length} points`;t&&console.time(a),this.points=e;let n=[];for(let t=0;t<e.length;t++){let i=e[t];if(!i.geometry)continue;let[r,a]=i.geometry.coordinates,o=w(k(r)),l=w(E(a));n.push(o,l,1/0,t,-1,1),this.options.reduce&&n.push(0)}let o=this.trees[r+1]=this._createTree(n);t&&console.timeEnd(a);for(let e=r;e>=i;e--){let i=+Date.now();o=this.trees[e]=this._createTree(this._cluster(o,e)),t&&console.log("z%d: %d clusters in %dms",e,o.numItems,Date.now()-i)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let i=((e[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,e[1])),a=180===e[2]?180:((e[2]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)i=-180,a=180;else if(i>
2a){let e=this.getClusters([i,r,180,n],t),o=this.getClusters([-180,r,a,n],t);return e.concat(o)}let o=this.trees[this._limitZoom(t)],l=o.range(k(i),E(n),k(a),E(r)),s=o.data,c=[];for(let e of l){let t=this.stride*e;c.push(s[t+5]>1?S(s,t,this.clusterProps):this.points[s[t+3]])}return c}getChildren(e){let t=this._getOriginId(e),i=this._getOriginZoom(e),r="No cluster with the specified id.",a=this.trees[i];if(!a)throw Error(r);let n=a.data;if(t*this.stride>=n.length)throw Error(r);let o=this.options.radius/(this.options.extent*Math.pow(2,i-1)),l=a.within(n[t*this.stride],n[t*this.stride+1],o),s=[];for(let t of l){let i=t*this.stride;n[i+4]===e&&s.push(n[i+5]>1?S(n,i,this.clusterProps):this.points[n[i+3]])}if(0===s.length)throw Error(r);return s}getLeaves(e,t,i){let r=[];return this._appendLeaves(r,e,t=t||10,i=i||0,0),r}getTile(e,t,i){let r=this.trees[this._limitZoom(e)],a=Math.pow(2,e),{extent:n,radius:o}=this.options,l=o/n,s=(i-l)/a,c=(i+1+l)/a,u={features:[]};return this._addTileFeatures(r.range((t-l)/a,s,(t+1+l)/a,c),r.data,t,i,a,u),0===t&&this._addTileFeatures(r.range(1-l/a,s,1,c),r.data,a,i,a,u),t===a-1&&this._addTileFeatures(r.range(0,s,l/a,c),r.data,-1,i,a,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){let i=this.getChildren(e);if(t++,1!==i.length)break;e=i[0].properties.cluster_id}return t}_appendLeaves(e,t,i,r,a){for(let n of this.getChildren(t)){let t=n.properties;if(t&&t.cluster?a+t.point_count<=r?a+=t.point_count:a=this._appendLeaves(e,t.cluster_id,i,r,a):a<r?a++:e.push(n),e.length===i)break}return a}_createTree(t){let i=new e.aH(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let e=0;e<t.length;e+=this.stride)i.add(t[e],t[e+1]);return i.finish(),i.data=t,i}_addTileFeatures(e,t,i,r,a,n){for(let o of e){let e,l,s,c,u=o*this.stride,h=t[u+5]>1;if(h)e=T(t,u,this.clusterProps),l=t[u],s=t[u+1];else{let i=this.points[t[u+3]];e=i.properties;let[r,a]=i.geometry.coordinates;l=k(r),s=E(a)}let p={type:1,geometry:[[Math.round(this.options.extent*(l*a-i)),Math.round(this.options.extent*(s*a-r))]],tags:e};void 0!==(c=h||this.options.generateId?t[u+3]:this.points[t[u+3]].id)&&(p.id=c),n.features.push(p)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){let{radius:i,extent:r,reduce:a,minPoints:n}=this.options,o=i/(r*Math.pow(2,t)),l=e.data,s=[],c=this.stride;for(let i=0;i<l.length;i+=c){if(l[i+2]<=t)continue;l[i+2]=t;let r=l[i],u=l[i+1],h=e.within(l[i],l[i+1],o),p=l[i+5],d=p;for(let e of h){let i=e*c;l[i+2]>t&&(d+=l[i+5])}if(d>p&&d>=n){let e,n=r*p,o=u*p,f=-1,m=(i/c<<5)+(t+1)+this.points.length;for(let r of h){let s=r*c;if(l[s+2]<=t)continue;l[s+2]=t;let u=l[s+5];n+=l[s]*u,o+=l[s+1]*u,l[s+4]=m,a&&(e||(e=this._map(l,i,!0),f=this.clusterProps.length,this.clusterProps.push(e)),a(e,this._map(l,s)))}l[i+4]=m,s.push(n/d,o/d,1/0,m,-1,d),a&&s.push(f)}else{for(let e=0;e<c;e++)s.push(l[i+e]);if(d>1)for(let e of h){let i=e*c;if(!(l[i+2]<=t)){l[i+2]=t;for(let e=0;e<c;e++)s.push(l[i+e])}}}}return s}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,i){if(e[t+5]>1){let r=this.clusterProps[e[t+6]];return i?Object.assign({},r):r}let r=this.points[e[t+3]].properties,a=this.options.map(r);return i&&a===r?Object.assign({},a):a}}function S(e,t,i){return{type:"Feature",id:e[t+3],properties:T(e,t,i),geometry:{type:"Point",coordinates:[360*(e[t]-.5),360*Math.atan(Math.exp((180-360*e[t+1])*Math.PI/180))/Math.PI-90]}}}function T(e,t,i){let r=e[t+5],a=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?Math.round(r/100)/10+"k":r,n=e[t+6];return Object.assign(-1===n?{}:Object.assign({},i[n]),{cluster:!0,cluster_id:e[t+3],point_count:r,point_count_abbreviated:a})}function k(e){return e/360+.5}function E(e){let t=Math.sin(e*Math.PI/180),i=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return i<0?0:i>1?1:i}function M(e,t,i,r){let a={id:null==e?null:e,type:t,geometry:i,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===t||"MultiPoint"===t||"LineString"===t)P(a,i);else if("Polygon"===t)P(a,i[0]);else if("MultiLineString"===t)for(let e of i)P(a,e);else if("MultiPolygon"===t)for(let e of i)P(a,e[0]);return a}function P(e,t){for(let i=0;i<t.length;i+=3)e.minX=Math.min(e.minX,t[i]),e.minY=Math.min(e.minY,t[i+1]),e.maxX=Math.max(e.maxX,t[i]),e.maxY=Math.max(e.maxY,t[i+1])}function I(e,t,i,r){if(!t.geometry)return;let a=t.geometry.coordinates;if(a&&0===a.length)return;let n=t.geometry.type,o=Math.pow(i.tolerance/((1<<i.maxZoom)*i.extent),2),l=[],s=t.id;if(i.promoteId?s=t.properties[i.promoteId]:i.generateId&&(s=r||0),"Point"===n)A(a,l);else if("MultiPoint"===n)for(let e of a)A(e,l);else if("LineString"===n)C(a,l,o,!1);else if("MultiLineString"===n){if(i.lineMetrics){for(let i of a)C(i,l=[],o,!1),e.push(M(s,"LineString",l,t.properties));return}
2R(a,l,o,!1)}else if("Polygon"===n)R(a,l,o,!0);else{if("MultiPolygon"!==n){if("GeometryCollection"===n){for(let a of t.geometry.geometries)I(e,{id:s,geometry:a,properties:t.properties},i,r);return}throw Error("Input data is not a valid GeoJSON object.")}for(let e of a){let t=[];R(e,t,o,!0),l.push(t)}}e.push(M(s,n,l,t.properties))}function A(e,t){t.push(e[0]/360+.5,L(e[1]),0)}function C(e,t,i,r){let a,n,o=0;for(let i=0;i<e.length;i++){let l=e[i][0]/360+.5,s=L(e[i][1]);t.push(l,s,0),i>0&&(o+=r?(a*s-l*n)/2:Math.sqrt(Math.pow(l-a,2)+Math.pow(s-n,2))),a=l,n=s}let l=t.length-3;t[2]=1,function e(t,i,r,a){let n=a,o=i+(r-i>>1),l,s=r-i,c=t[i],u=t[i+1],h=t[r],p=t[r+1];for(let e=i+3;e<r;e+=3){let i=function(e,t,i,r,a,n){let o=a-i,l=n-r;if(0!==o||0!==l){let s=((e-i)*o+(t-r)*l)/(o*o+l*l);s>1?(i=a,r=n):s>0&&(i+=o*s,r+=l*s)}return(o=e-i)*o+(l=t-r)*l}(t[e],t[e+1],c,u,h,p);if(i>n)l=e,n=i;else if(i===n){let t=Math.abs(e-o);t<s&&(l=e,s=t)}}n>a&&(l-i>3&&e(t,i,l,a),t[l+2]=n,r-l>3&&e(t,l,r,a))}(t,0,l,i),t[l+2]=1,t.size=Math.abs(o),t.start=0,t.end=t.size}function R(e,t,i,r){for(let a=0;a<e.length;a++){let n=[];C(e[a],n,i,r),t.push(n)}}function L(e){let t=Math.sin(e*Math.PI/180),i=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return i<0?0:i>1?1:i}function D(e,t,i,r,a,n,o,l){if(r/=t,n>=(i/=t)&&o<r)return e;if(o<i||n>=r)return null;let s=[];for(let t of e){let e=t.geometry,n=t.type,o=0===a?t.minX:t.minY,f=0===a?t.maxX:t.maxY;if(o>=i&&f<r){s.push(t);continue}if(f<i||o>=r)continue;let m=[];if("Point"===n||"MultiPoint"===n){var c=e,u=m,h=i,p=r,d=a;for(let e=0;e<c.length;e+=3){let t=c[e+d];t>=h&&t<=p&&B(u,c[e],c[e+1],c[e+2])}}else if("LineString"===n)O(e,m,i,r,a,!1,l.lineMetrics);else if("MultiLineString"===n)j(e,m,i,r,a,!1);else if("Polygon"===n)j(e,m,i,r,a,!0);else if("MultiPolygon"===n)for(let t of e){let e=[];j(t,e,i,r,a,!0),e.length&&m.push(e)}if(m.length){if(l.lineMetrics&&"LineString"===n){for(let e of m)s.push(M(t.id,n,e,t.tags));continue}"LineString"!==n&&"MultiLineString"!==n||(1===m.length?(n="LineString",m=m[0]):n="MultiLineString"),"Point"!==n&&"MultiPoint"!==n||(n=3===m.length?"Point":"MultiPoint"),s.push(M(t.id,n,m,t.tags))}}return s.length?s:null}function O(e,t,i,r,a,n,o){let l=F(e),s=0===a?N:U,c,u,h=e.start;for(let p=0;p<e.length-3;p+=3){let d=e[p],f=e[p+1],m=e[p+2],g=e[p+3],y=e[p+4],_=0===a?d:f,b=0===a?g:y,x=!1;o&&(c=Math.sqrt(Math.pow(d-g,2)+Math.pow(f-y,2))),_<i?b>i&&(u=s(l,d,f,g,y,i),o&&(l.start=h+c*u)):_>r?b<r&&(u=s(l,d,f,g,y,r),o&&(l.start=h+c*u)):B(l,d,f,m),b<i&&_>=i&&(u=s(l,d,f,g,y,i),x=!0),b>r&&_<=r&&(u=s(l,d,f,g,y,r),x=!0),!n&&x&&(o&&(l.end=h+c*u),t.push(l),l=F(e)),o&&(h+=c)}let p=e.length-3,d=e[p],f=e[p+1],m=0===a?d:f;m>=i&&m<=r&&B(l,d,f,e[p+2]),p=l.length-3,n&&p>=3&&(l[p]!==l[0]||l[p+1]!==l[1])&&B(l,l[0],l[1],l[2]),l.length&&t.push(l)}function F(e){let t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function j(e,t,i,r,a,n){for(let o of e)O(o,t,i,r,a,n,!1)}function B(e,t,i,r){e.push(t,i,r)}function N(e,t,i,r,a,n){let o=(n-t)/(r-t);return B(e,n,i+(a-i)*o,1),o}function U(e,t,i,r,a,n){let o=(n-i)/(a-i);return B(e,t+(r-t)*o,n,1),o}function V(e,t){let i=[];for(let r=0;r<e.length;r++){let a,n=e[r],o=n.type;if("Point"===o||"MultiPoint"===o||"LineString"===o)a=$(n.geometry,t);else if("MultiLineString"===o||"Polygon"===o)for(let e of(a=[],n.geometry))a.push($(e,t));else if("MultiPolygon"===o)for(let e of(a=[],n.geometry)){let i=[];for(let r of e)i.push($(r,t));a.push(i)}i.push(M(n.id,o,a,n.tags))}return i}function $(e,t){let i=[];i.size=e.size,void 0!==e.start&&(i.start=e.start,i.end=e.end);for(let r=0;r<e.length;r+=3)i.push(e[r]+t,e[r+1],e[r+2]);return i}function Z(e,t){if(e.transformed)return e;let i=1<<e.z,r=e.x,a=e.y;for(let n of e.features){let e=n.geometry,o=n.type;if(n.geometry=[],1===o)for(let o=0;o<e.length;o+=2)n.geometry.push(G(e[o],e[o+1],t,i,r,a));else for(let o=0;o<e.length;o++){let l=[];for(let n=0;n<e[o].length;n+=2)l.push(G(e[o][n],e[o][n+1],t,i,r,a));n.geometry.push(l)}}return e.transformed=!0,e}function G(e,t,i,r,a,n){return[Math.round(i*(e*r-a)),Math.round(i*(t*r-n))]}function q(e,t,i,r,a,n){let o=r*r;if(r>0&&t.size<(a?o:r))return void(i.numPoints+=t.length/3);let l=[];for(let e=0;e<t.length;e+=3)(0===r||t[e+2]>o)&&(i.numSimplified++,l.push(t[e],t[e+1])),i.numPoints++;a&&function(e,t){let i=0;for(let t=0,r=e.length,a=r-2;t<r;a=t,t+=2)i+=(e[t]-e[a])*(e[t+1]+e[a+1]);if(i>0===t)for(let t=0,i=e.length;t<i/2;t+=2){let r=e[t],a=e[t+1];
2e[t]=e[i-2-t],e[t+1]=e[i-1-t],e[i-2-t]=r,e[i-1-t]=a}}(l,n),e.push(l)}let H={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class W{constructor(e,t){let i=(t=this.options=function(e,t){for(let i in t)e[i]=t[i];return e}(Object.create(H),t)).debug;if(i&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw Error("promoteId and generateId cannot be used together.");let r=function(e,t){let i=[];if("FeatureCollection"===e.type)for(let r=0;r<e.features.length;r++)I(i,e.features[r],t,r);else I(i,"Feature"===e.type?e:{geometry:e},t);return i}(e,t);this.tiles={},this.tileCoords=[],i&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(r=function(e,t){let i=t.buffer/t.extent,r=e,a=D(e,1,-1-i,i,0,-1,2,t),n=D(e,1,1-i,2+i,0,-1,2,t);return(a||n)&&(r=D(e,1,-i,1+i,0,-1,2,t)||[],a&&(r=V(a,1).concat(r)),n&&(r=r.concat(V(n,-1)))),r}(r,t)).length&&this.splitTile(r,0,0,0),i&&(r.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(e,t,i,r,a,n,o){let l=[e,t,i,r],s=this.options,c=s.debug;for(;l.length;){r=l.pop(),i=l.pop(),t=l.pop(),e=l.pop();let u=1<<t,h=X(t,i,r),p=this.tiles[h];if(!p&&(c>1&&console.time("creation"),p=this.tiles[h]=function(e,t,i,r,a){let n=t===a.maxZoom?0:a.tolerance/((1<<t)*a.extent),o={features:[],numPoints:0,numSimplified:0,numFeatures:e.length,source:null,x:i,y:r,z:t,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(let t of e)!function(e,t,i,r){let a=t.geometry,n=t.type,o=[];if(e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),"Point"===n||"MultiPoint"===n)for(let t=0;t<a.length;t+=3)o.push(a[t],a[t+1]),e.numPoints++,e.numSimplified++;else if("LineString"===n)q(o,a,e,i,!1,!1);else if("MultiLineString"===n||"Polygon"===n)for(let t=0;t<a.length;t++)q(o,a[t],e,i,"Polygon"===n,0===t);else if("MultiPolygon"===n)for(let t=0;t<a.length;t++){let r=a[t];for(let t=0;t<r.length;t++)q(o,r[t],e,i,!0,0===t)}if(o.length){let i=t.tags||null;if("LineString"===n&&r.lineMetrics){for(let e in i={},t.tags)i[e]=t.tags[e];i.mapbox_clip_start=a.start/a.size,i.mapbox_clip_end=a.end/a.size}let l={geometry:o,type:"Polygon"===n||"MultiPolygon"===n?3:"LineString"===n||"MultiLineString"===n?2:1,tags:i};null!==t.id&&(l.id=t.id),e.features.push(l)}}(o,t,n,a);return o}(e,t,i,r,s),this.tileCoords.push({z:t,x:i,y:r}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,i,r,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));let e=`z${t}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}if(p.source=e,null==a){if(t===s.indexMaxZoom||p.numPoints<=s.indexMaxPoints)continue}else{if(t===s.maxZoom||t===a)continue;if(null!=a){let e=a-t;if(i!==n>>e||r!==o>>e)continue}}if(p.source=null,0===e.length)continue;c>1&&console.time("clipping");let d=.5*s.buffer/s.extent,f=.5-d,m=.5+d,g=1+d,y=null,_=null,b=null,x=null,v=D(e,u,i-d,i+m,0,p.minX,p.maxX,s),w=D(e,u,i+f,i+g,0,p.minX,p.maxX,s);e=null,v&&(y=D(v,u,r-d,r+m,1,p.minY,p.maxY,s),_=D(v,u,r+f,r+g,1,p.minY,p.maxY,s),v=null),w&&(b=D(w,u,r-d,r+m,1,p.minY,p.maxY,s),x=D(w,u,r+f,r+g,1,p.minY,p.maxY,s),w=null),c>1&&console.timeEnd("clipping"),l.push(y||[],t+1,2*i,2*r),l.push(_||[],t+1,2*i,2*r+1),l.push(b||[],t+1,2*i+1,2*r),l.push(x||[],t+1,2*i+1,2*r+1)}}getTile(e,t,i){e*=1,t*=1,i*=1;let{extent:r,debug:a}=this.options;if(e<0||e>24)return null;let n=1<<e,o=X(e,t=t+n&n-1,i);if(this.tiles[o])return Z(this.tiles[o],r);a>1&&console.log("drilling down to z%d-%d-%d",e,t,i);let l,s=e,c=t,u=i;for(;!l&&s>0;)s--,c>>=1,u>>=1,l=this.tiles[X(s,c,u)];return l&&l.source?(a>1&&(console.log("found parent tile z%d-%d-%d",s,c,u),console.time("drilling down")),this.splitTile(l.source,s,c,u,e,t,i),a>1&&console.timeEnd("drilling down"),this.tiles[o]?Z(this.tiles[o],r):null):null}}function X(e,t,i){return 32*((1<<e)*i+t)+e}function Y(e,t){return t?e.properties[t]:e.id}function K(e,t){if(null==e)return!0;
2if("Feature"===e.type)return null!=Y(e,t);if("FeatureCollection"===e.type){let i=new Set;for(let r of e.features){let e=Y(r,t);if(null==e||i.has(e))return!1;i.add(e)}return!0}return!1}function J(e,t){let i=new Map;if(null==e);else if("Feature"===e.type)i.set(Y(e,t),e);else for(let r of e.features)i.set(Y(r,t),r);return i}class Q extends n{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(t,i){return e._(this,void 0,void 0,function*(){let e=t.tileID.canonical;if(!this._geoJSONIndex)throw Error("Unable to parse the data into a cluster or geojson");let i=this._geoJSONIndex.getTile(e.z,e.x,e.y);if(!i)return null;let r=new f(i.features),a=x(r);return 0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),{vectorTile:r,rawData:a.buffer}})}loadData(t){return e._(this,void 0,void 0,function*(){var i,r;null==(r=this._pendingRequest)||r.abort();let a=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.cM(t.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(t,this._pendingRequest),this._geoJSONIndex=t.cluster?new z(function({superclusterOptions:t,clusterProperties:i}){if(!i||!t)return t;let r={},a={},n={accumulated:null,zoom:0},o={properties:null},l=Object.keys(i);for(let t of l){let[n,o]=i[t],l=e.cT(o),s=e.cT("string"==typeof n?[n,["accumulated"],["get",t]]:n);r[t]=l.value,a[t]=s.value}return t.map=e=>{o.properties=e;let t={};for(let e of l)t[e]=r[e].evaluate(n,o);return t},t.reduce=(e,t)=>{for(let i of(o.properties=t,l))n.accumulated=e[i],e[i]=a[i].evaluate(n,o)},t}(t)).load((yield this._pendingData).features):(i=yield this._pendingData,new W(i,t.geojsonVtOptions)),this.loaded={};let r={};if(a){let e=a.finish();e&&(r.resourceTiming={},r.resourceTiming[t.source]=JSON.parse(JSON.stringify(e)))}return r}catch(t){if(delete this._pendingRequest,e.cx(t))return{abandoned:!0};throw t}})}getData(){return e._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(e){let t=this.loaded;return t&&t[e.uid]?super.reloadTile(e):this.loadTile(e)}loadAndProcessGeoJSON(t,i){return e._(this,void 0,void 0,function*(){let r=yield this.loadGeoJSON(t,i);if(delete this._pendingRequest,"object"!=typeof r)throw Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`);if(h(r,!0),t.filter){let i=e.cT(t.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===i.result)throw Error(i.value.map(e=>`${e.key}: ${e.message}`).join(", "));r={type:"FeatureCollection",features:r.features.filter(e=>i.value.evaluate({zoom:0},e))}}return r})}loadGeoJSON(t,i){return e._(this,void 0,void 0,function*(){let{promoteId:r}=t;if(t.request){let a=yield e.j(t.request,i);return this._dataUpdateable=K(a.data,r)?J(a.data,r):void 0,a.data}if("string"==typeof t.data)try{let e=JSON.parse(t.data);return this._dataUpdateable=K(e,r)?J(e,r):void 0,e}catch(e){throw Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`)}if(!t.dataDiff)throw Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw Error(`Cannot update existing geojson data in ${t.source}`);return function(e,t,i){var r,a,n,o;if(t.removeAll&&e.clear(),t.remove)for(let i of t.remove)e.delete(i);if(t.add)for(let r of t.add){let t=Y(r,i);null!=t&&e.set(t,r)}if(t.update)for(let i of t.update){let t=e.get(i.id);if(null==t)continue;let l=!i.removeAllProperties&&((null==(r=i.removeProperties)?void 0:r.length)>0||(null==(a=i.addOrUpdateProperties)?void 0:a.length)>0);if((i.newGeometry||i.removeAllProperties||l)&&(t=Object.assign({},t),e.set(i.id,t),l&&(t.properties=Object.assign({},t.properties))),i.newGeometry&&(t.geometry=i.newGeometry),i.removeAllProperties)t.properties={};else if((null==(n=i.removeProperties)?void 0:n.length)>0)for(let e of i.removeProperties)Object.prototype.hasOwnProperty.call(t.properties,e)&&delete t.properties[e];if((null==(o=i.addOrUpdateProperties)?void 0:o.length)>0)for(let{key:e,value:r}of i.addOrUpdateProperties)t.properties[e]=r}}(this._dataUpdateable,t.dataDiff,r),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(t){return e._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(e){return this._geoJSONIndex.getClusterExpansionZoom(e.clusterId)}getClusterChildren(e){return this._geoJSONIndex.getChildren(e.clusterId)}getClusterLeaves(e){return this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset)}}class ee{constructor(t){this.self=t,this.actor=new e.J(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={}
2,this.self.registerWorkerSource=(e,t)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=t},this.self.addProtocol=e.cz,this.self.removeProtocol=e.cA,this.self.registerRTLTextPlugin=t=>{e.cU.setMethods(t)},this.actor.registerMessageHandler("LDT",(e,t)=>this._getDEMWorkerSource(e,t.source).loadTile(t)),this.actor.registerMessageHandler("RDT",(t,i)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(t,i.source).removeTile(i)})),this.actor.registerMessageHandler("GCEZ",(t,i)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,i.type,i.source).getClusterExpansionZoom(i)})),this.actor.registerMessageHandler("GCC",(t,i)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,i.type,i.source).getClusterChildren(i)})),this.actor.registerMessageHandler("GCL",(t,i)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,i.type,i.source).getClusterLeaves(i)})),this.actor.registerMessageHandler("LD",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadData(t)),this.actor.registerMessageHandler("GD",(e,t)=>this._getWorkerSource(e,t.type,t.source).getData()),this.actor.registerMessageHandler("LT",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadTile(t)),this.actor.registerMessageHandler("RT",(e,t)=>this._getWorkerSource(e,t.type,t.source).reloadTile(t)),this.actor.registerMessageHandler("AT",(e,t)=>this._getWorkerSource(e,t.type,t.source).abortTile(t)),this.actor.registerMessageHandler("RMT",(e,t)=>this._getWorkerSource(e,t.type,t.source).removeTile(t)),this.actor.registerMessageHandler("RS",(t,i)=>e._(this,void 0,void 0,function*(){if(!this.workerSources[t]||!this.workerSources[t][i.type]||!this.workerSources[t][i.type][i.source])return;let e=this.workerSources[t][i.type][i.source];delete this.workerSources[t][i.type][i.source],void 0!==e.removeSource&&e.removeSource(i)})),this.actor.registerMessageHandler("RM",t=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[t],delete this.availableImages[t],delete this.workerSources[t],delete this.demWorkerSources[t]})),this.actor.registerMessageHandler("SR",(t,i)=>e._(this,void 0,void 0,function*(){this.referrer=i})),this.actor.registerMessageHandler("SRPS",(e,t)=>this._syncRTLPluginState(e,t)),this.actor.registerMessageHandler("IS",(t,i)=>e._(this,void 0,void 0,function*(){this.self.importScripts(i)})),this.actor.registerMessageHandler("SI",(e,t)=>this._setImages(e,t)),this.actor.registerMessageHandler("UL",(t,i)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(t).update(i.layers,i.removedIds)})),this.actor.registerMessageHandler("SL",(t,i)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(t).replace(i)}))}_setImages(t,i){return e._(this,void 0,void 0,function*(){for(let e in this.availableImages[t]=i,this.workerSources[t]){let r=this.workerSources[t][e];for(let e in r)r[e].availableImages=i}})}_syncRTLPluginState(t,i){return e._(this,void 0,void 0,function*(){return yield e.cU.syncState(i,this.self.importScripts)})}_getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}_getLayerIndex(e){let i=this.layerIndexes[e];return i||(i=this.layerIndexes[e]=new t),i}_getWorkerSource(e,t,i){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][i]){let r={sendAsync:(t,i)=>(t.targetMapId=e,this.actor.sendAsync(t,i))};switch(t){case"vector":this.workerSources[e][t][i]=new n(r,this._getLayerIndex(e),this._getAvailableImages(e));break;case"geojson":this.workerSources[e][t][i]=new Q(r,this._getLayerIndex(e),this._getAvailableImages(e));break;default:this.workerSources[e][t][i]=new this.externalWorkerSourceTypes[t](r,this._getLayerIndex(e),this._getAvailableImages(e))}}return this.workerSources[e][t][i]}_getDEMWorkerSource(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new o),this.demWorkerSources[e][t]}}return e.i(self)&&(self.worker=new ee(self)),ee}),i("index",["exports","./shared"],function(e,t){let i,r,a,n,o,l,s;var c,u="5.6.1";function h(){var e=new t.A(4);return t.A!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}let p={now:"undefined"!=typeof performance&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(e,i,r){let a=requestAnimationFrame(e=>{n(),i(e)}),{unsubscribe:n}=t.s(e.signal,"abort",()=>{n(),cancelAnimationFrame(a),r(t.c())},!1)},frameAsync(e){return new Promise((t,i)=>{this.frame(e,t,i)})},getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){let t=window.document.createElement("canvas"),i=t.getContext("2d",{willReadFrequently:!0});if(!i)throw Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,i.drawImage(e,0,0,e.width,e.height),i},resolveURL:e=>(i||(i=document.createElement("a")),i.href=e,i.href),hardwareConcurrency:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(null==r&&(r=matchMedia("(prefers-reduced-motion: reduce)")),r.matches)}};class d{static testProp(e){if(!d.docStyle)return e[0];for(let t=0;t<e.length;t++)if(e[t]in d.docStyle)return e[t];return e[0]}static create(e,t,i){let r=window.document.createElement(e);return void 0!==t&&(r.className=t),i&&i.appendChild(r),r}static createNS(e,t){return window.document.createElementNS(e,t)}static disableDrag(){d.docStyle&&d.selectProp&&(d.userSelect=d.docStyle[d.selectProp],d.docStyle[d.selectProp]="none")}static enableDrag(){d.docStyle&&d.selectProp&&(d.docStyle[d.selectProp]=d.userSelect)}static setTransform(e,t){e.style[d.transformProp]=t}static addEventListener(e,t,i,r={}){e.addEventListener(t,i,"passive"in r?r:r.capture)}static removeEventListener(e,t,i,r={}){e.removeEventListener(t,i,"passive"in r?r:r.capture)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",d.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",d.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",d.suppressClickInternal,!0)},0)}static getScale(e){let t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}static getPoint(e,i,r){let a=i.boundingClientRect;return new t.P((r.clientX-a.left)/i.x-e.clientLeft,(r.clientY-a.top)/i.y-e.clientTop)}static mousePos(e,t){let i=d.getScale(e);return d.getPoint(e,i,t)}static touchPos(e,t){let i=[],r=d.getScale(e);for(let a=0;a<t.length;a++)i.push(d.getPoint(e,r,t[a]));return i}static mouseButton(e){return e.button}static remove(e){e.parentNode&&e.parentNode.removeChild(e)}static sanitize(e){let t=(new DOMParser).parseFromString(e,"text/html").body||document.createElement("body");for(let e of t.querySelectorAll("script"))e.remove();return d.clean(t),t.innerHTML}static isPossiblyDangerous(e,t){let i=t.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(e)||!i.includes("javascript:")&&!i.includes("data:"))||!!e.startsWith("on")||void 0}static clean(e){for(let t of e.children)d.removeAttributes(t),d.clean(t)}static removeAttributes(e){for(let{name:t,value:i}of e.attributes)d.isPossiblyDangerous(t,i)&&e.removeAttribute(t)}}d.docStyle="undefined"!=typeof window&&window.document&&window.document.documentElement.style,d.selectProp=d.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),d.transformProp=d.testProp(["transform","WebkitTransform"]);
2let f={supported:!1,testSupport:function(e){!y&&g&&(_?b(e):m=e)}},m,g,y=!1,_=!1;function b(e){let t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,g),e.isContextLost())return;f.supported=!0}catch(e){}e.deleteTexture(t),y=!0}"undefined"!=typeof document&&((g=document.createElement("img")).onload=()=>{m&&b(m),m=null,_=!0},g.onerror=()=>{y=!0,m=null},g.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(e){let i,r,a,n;e.resetRequestQueue=()=>{i=[],r=0,a=0,n={}},e.addThrottleControl=e=>{let t=a++;return n[t]=e,t},e.removeThrottleControl=e=>{delete n[e],l()},e.getImage=(e,r,a=!0)=>new Promise((n,o)=>{f.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),t.e(e,{type:"image"}),i.push({abortController:r,requestParameters:e,supportImageRefresh:a,state:"queued",onError:e=>{o(e)},onSuccess:e=>{n(e)}}),l()});let o=e=>t._(this,void 0,void 0,function*(){var i;e.state="running";let{requestParameters:a,supportImageRefresh:n,onError:o,onSuccess:c,abortController:u}=e,h=!1===n&&!t.i(self)&&!t.g(a.url)&&(!a.headers||Object.keys(a.headers).reduce((e,t)=>e&&"accept"===t,!0));r++;let p=h?s(a,u):t.m(a,u);try{let r=yield p;delete e.abortController,e.state="completed",r.data instanceof HTMLImageElement||t.b(r.data)?c(r):r.data&&c({data:yield(i=r.data,"function"==typeof createImageBitmap?t.f(i):t.h(i)),cacheControl:r.cacheControl,expires:r.expires})}catch(t){delete e.abortController,o(t)}finally{r--,l()}}),l=()=>{let e=(()=>{for(let e of Object.keys(n))if(n[e]())return!0;return!1})()?t.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let t=r;t<e&&i.length>0;t++){let e=i.shift();e.abortController.signal.aborted?t--:o(e)}},s=(e,i)=>new Promise((r,a)=>{let n=new Image,o=e.url,l=e.credentials;l&&"include"===l?n.crossOrigin="use-credentials":(l&&"same-origin"===l||!t.d(o))&&(n.crossOrigin="anonymous"),i.signal.addEventListener("abort",()=>{n.src="",a(t.c())}),n.fetchPriority="high",n.onload=()=>{n.onerror=n.onload=null,r({data:n})},n.onerror=()=>{n.onerror=n.onload=null,i.signal.aborted||a(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."))},n.src=o})}(c||(c={})),c.resetRequestQueue();class x{constructor(e){this._transformRequestFn=e}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function v(e){let t=[];if("string"==typeof e)t.push({id:"default",url:e});else if(e&&e.length>0){let i=[];for(let{id:r,url:a}of e){let e=`${r}${a}`;-1===i.indexOf(e)&&(i.push(e),t.push({id:r,url:a}))}}return t}function w(e,t,i){try{let r=new URL(e);return r.pathname+=`${t}${i}`,r.toString()}catch(t){throw Error(`Invalid sprite URL "${e}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}class z extends t.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:e,promiseResolve:t}of this.requestors)t(this._getImagesForIds(e));this.requestors=[]}}getImage(e){let i=this.images[e];if(i&&!i.data&&i.spriteData){let e=i.spriteData;i.data=new t.R({width:e.width,height:e.height},e.context.getImageData(e.x,e.y,e.width,e.height).data),i.spriteData=null}return i}addImage(e,t){if(this.images[e])throw Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t)}_validate(e,i){let r=!0,a=i.data||i.spriteData;return this._validateStretch(i.stretchX,a&&a.width)||(this.fire(new t.k(Error(`Image "${e}" has invalid "stretchX" value`))),r=!1),this._validateStretch(i.stretchY,a&&a.height)||(this.fire(new t.k(Error(`Image "${e}" has invalid "stretchY" value`))),r=!1),this._validateContent(i.content,i)||(this.fire(new t.k(Error(`Image "${e}
2" has invalid "content" value`))),r=!1),r}_validateStretch(e,t){if(!e)return!0;let i=0;for(let r of e){if(r[0]<i||r[1]<r[0]||t<r[1])return!1;i=r[1]}return!0}_validateContent(e,t){if(!e)return!0;if(4!==e.length)return!1;let i=t.spriteData,r=i&&i.width||t.data.width,a=i&&i.height||t.data.height;return!(e[0]<0||r<e[0]||e[1]<0||a<e[1]||e[2]<0||r<e[2]||e[3]<0||a<e[3]||e[2]<e[0]||e[3]<e[1])}updateImage(e,t,i=!0){let r=this.getImage(e);if(i&&(r.data.width!==t.data.width||r.data.height!==t.data.height))throw Error(`size mismatch between old image (${r.data.width}x${r.data.height}) and new image (${t.data.width}x${t.data.height}).`);t.version=r.version+1,this.images[e]=t,this.updatedImages[e]=!0}removeImage(e){let t=this.images[e];delete this.images[e],delete this.patterns[e],t.userImage&&t.userImage.onRemove&&t.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e){return new Promise((t,i)=>{let r=!0;if(!this.isLoaded())for(let t of e)this.images[t]||(r=!1);this.isLoaded()||r?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t})})}_getImagesForIds(e){let i={};for(let r of e){let e=this.getImage(r);e||(this.fire(new t.l("styleimagemissing",{id:r})),e=this.getImage(r)),e?i[r]={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)}:t.w(`Image "${r}" 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 i}getPixelSize(){let{width:e,height:t}=this.atlasImage;return{width:e,height:t}}getPattern(e){let i=this.patterns[e],r=this.getImage(e);if(!r)return null;if(i&&i.position.version===r.version)return i.position;if(i)i.position.version=r.version;else{let i={w:r.data.width+2,h:r.data.height+2,x:0,y:0},a=new t.I(i,r);this.patterns[e]={bin:i,position:a}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){let i=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.T(e,this.atlasImage,i.RGBA),this.atlasTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}_updatePatternAtlas(){let e=[];for(let t in this.patterns)e.push(this.patterns[t].bin);let{w:i,h:r}=t.p(e),a=this.atlasImage;for(let e in a.resize({width:i||1,height:r||1}),this.patterns){let{bin:i}=this.patterns[e],r=i.x+1,n=i.y+1,o=this.getImage(e).data,l=o.width,s=o.height;t.R.copy(o,a,{x:0,y:0},{x:r,y:n},{width:l,height:s}),t.R.copy(o,a,{x:0,y:s-1},{x:r,y:n-1},{width:l,height:1}),t.R.copy(o,a,{x:0,y:0},{x:r,y:n+s},{width:l,height:1}),t.R.copy(o,a,{x:l-1,y:0},{x:r-1,y:n},{width:1,height:s}),t.R.copy(o,a,{x:0,y:0},{x:r+l,y:n},{width:1,height:s})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let i of e){if(this.callbackDispatchedThisFrame[i])continue;this.callbackDispatchedThisFrame[i]=!0;let e=this.getImage(i);e||t.w(`Image with ID: "${i}" was not found`),function(e){let{userImage:t}=e;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}(e)&&this.updateImage(i,e)}}}function S(e,t,i,r,a,n,o,l,s){for(let c=t;c<t+r;c++)T(e,i*n+c,n,a,o,l,s);for(let c=i;c<i+a;c++)T(e,c*n+t,1,r,o,l,s)}function T(e,t,i,r,a,n,o){n[0]=0,o[0]=-1e20,o[1]=1e20,a[0]=e[t];for(let l=1,s=0,c=0;l<r;l++){a[l]=e[t+l*i];let r=l*l;do{let e=n[s];c=(a[l]-a[e]+r-e*e)/(l-e)/2}while(c<=o[s]&&--s>-1);n[++s]=l,o[s]=c,o[s+1]=1e20}for(let l=0,s=0;l<r;l++){for(;o[s+1]<l;)s++;let r=n[s],c=l-r;e[t+l*i]=a[r]+c*c}}class k{constructor(e,t){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={}}setURL(e){this.url=e}getGlyphs(e){return t._(this,void 0,void 0,function*(){let t=[];for(let i in e)for(let r of e[i])t.push(this._getAndCacheGlyphsPromise(i,r));let i=yield Promise.all(t),r={};for(let{stack:e,id:t,glyph:a}of i)r[e]||(r[e]={}),r[e][t]=a&&{id:a.id,bitmap:a.bitmap.clone(),metrics:a.metrics};return r})}
2_getAndCacheGlyphsPromise(e,i){return t._(this,void 0,void 0,function*(){let t=this.entries[e];t||(t=this.entries[e]={glyphs:{},requests:{},ranges:{}});let r=t.glyphs[i];if(void 0!==r)return{stack:e,id:i,glyph:r};if(r=this._tinySDF(t,e,i))return t.glyphs[i]=r,{stack:e,id:i,glyph:r};let a=Math.floor(i/256);if(256*a>65535)throw Error("glyphs > 65535 not supported");if(t.ranges[a])return{stack:e,id:i,glyph:r};if(!this.url)throw Error("glyphsUrl is not set");if(!t.requests[a]){let i=k.loadGlyphRange(e,a,this.url,this.requestManager);t.requests[a]=i}let n=yield t.requests[a];for(let e in n)this._doesCharSupportLocalGlyph(+e)||(t.glyphs[+e]=n[+e]);return t.ranges[a]=!0,{stack:e,id:i,glyph:n[i]||null}})}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&(/\p{Ideo}|\p{sc=Hang}|\p{sc=Hira}|\p{sc=Kana}/u.test(String.fromCodePoint(e))||t.u["CJK Unified Ideographs"](e)||t.u["Hangul Syllables"](e)||t.u.Hiragana(e)||t.u.Katakana(e)||t.u["CJK Symbols and Punctuation"](e)||t.u["Halfwidth and Fullwidth Forms"](e))}_tinySDF(e,i,r){let a=this.localIdeographFontFamily;if(!a||!this._doesCharSupportLocalGlyph(r))return;let n=e.tinySDF;if(!n){let t="400";/bold/i.test(i)?t="900":/medium/i.test(i)?t="500":/light/i.test(i)&&(t="200"),n=e.tinySDF=new k.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:a,fontWeight:t})}let o=n.draw(String.fromCharCode(r));return{id:r,bitmap:new t.q({width:o.width||60,height:o.height||60},o.data),metrics:{width:o.glyphWidth/2||24,height:o.glyphHeight/2||24,left:o.glyphLeft/2+.5||0,top:o.glyphTop/2-27.5||-8,advance:o.glyphAdvance/2||24,isDoubleResolution:!0}}}}k.loadGlyphRange=function(e,i,r,a){return t._(this,void 0,void 0,function*(){let n=256*i,o=n+255,l=a.transformRequest(r.replace("{fontstack}",e).replace("{range}",`${n}-${o}`),"Glyphs"),s=yield t.n(l,new AbortController);if(!s||!s.data)throw Error(`Could not load glyph range. range: ${i}, ${n}-${o}`);let c={};for(let e of t.o(s.data))c[e.id]=e;return c})},k.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:i=8,cutoff:r=.25,fontFamily:a="sans-serif",fontWeight:n="normal",fontStyle:o="normal"}={}){this.buffer=t,this.cutoff=r,this.radius=i;let l=this.size=e+4*t,s=this._createCanvas(l),c=this.ctx=s.getContext("2d",{willReadFrequently:!0});c.font=`${o} ${n} ${e}px ${a}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(l*l),this.gridInner=new Float64Array(l*l),this.f=new Float64Array(l),this.z=new Float64Array(l+1),this.v=new Uint16Array(l)}_createCanvas(e){let t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){let{width:t,actualBoundingBoxAscent:i,actualBoundingBoxDescent:r,actualBoundingBoxLeft:a,actualBoundingBoxRight:n}=this.ctx.measureText(e),o=Math.ceil(i),l=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(n-a))),s=Math.min(this.size-this.buffer,o+Math.ceil(r)),c=l+2*this.buffer,u=s+2*this.buffer,h=Math.max(c*u,0),p=new Uint8ClampedArray(h),d={data:p,width:c,height:u,glyphWidth:l,glyphHeight:s,glyphTop:o,glyphLeft:0,glyphAdvance:t};if(0===l||0===s)return d;let{ctx:f,buffer:m,gridInner:g,gridOuter:y}=this;f.clearRect(m,m,l,s),f.fillText(e,m,m+o);let _=f.getImageData(m,m,l,s);y.fill(1e20,0,h),g.fill(0,0,h);for(let e=0;e<s;e++)for(let t=0;t<l;t++){let i=_.data[4*(e*l+t)+3]/255;if(0===i)continue;let r=(e+m)*c+t+m;if(1===i)y[r]=0,g[r]=1e20;else{let e=.5-i;y[r]=e>0?e*e:0,g[r]=e<0?e*e:0}}S(y,0,0,c,u,c,this.f,this.v,this.z),S(g,m,m,l,s,c,this.f,this.v,this.z);for(let e=0;e<h;e++){let t=Math.sqrt(y[e])-Math.sqrt(g[e]);p[e]=Math.round(255-255*(t/this.radius+this.cutoff))}return d}};class E{constructor(){this.specification=t.v.light.position}possiblyEvaluate(e,i){return t.B(e.expression.evaluate(i))}interpolate(e,i,r){return{x:t.C.number(e.x,i.x,r),y:t.C.number(e.y,i.y,r),z:t.C.number(e.z,i.z,r)}}}class M extends t.E{constructor(e){super(),a=a||new t.r({anchor:new t.D(t.v.light.anchor),position:new E,color:new t.D(t.v.light.color),intensity:new t.D(t.v.light.intensity)}),this._transitionable=new t.t(a),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(e,i={}
2){if(!this._validate(t.x,e,i))for(let t in e){let i=e[t];t.endsWith("-transition")?this._transitionable.setTransition(t.slice(0,-11),i):this._transitionable.setValue(t,i)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,i,r){return(!r||!1!==r.validate)&&t.y(this,e.call(t.z,{value:i,style:{glyphs:!0,sprite:!0},styleSpec:t.v}))}}let P=new t.r({"sky-color":new t.D(t.v.sky["sky-color"]),"horizon-color":new t.D(t.v.sky["horizon-color"]),"fog-color":new t.D(t.v.sky["fog-color"]),"fog-ground-blend":new t.D(t.v.sky["fog-ground-blend"]),"horizon-fog-blend":new t.D(t.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new t.D(t.v.sky["sky-horizon-blend"]),"atmosphere-blend":new t.D(t.v.sky["atmosphere-blend"])});class I extends t.E{constructor(e){super(),this._transitionable=new t.t(P),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new t.F(0))}setSky(e,i={}){if(!this._validate(t.G,e,i))for(let t in e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0}),e){let i=e[t];t.endsWith("-transition")?this._transitionable.setTransition(t.slice(0,-11),i):this._transitionable.setValue(t,i)}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,i,r={}){return!1!==(null==r?void 0:r.validate)&&t.y(this,e.call(t.z,t.e({value:i,style:{glyphs:!0,sprite:!0},styleSpec:t.v})))}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}}class A{constructor(e,t){this.width=e,this.height=t,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,t){let i=e.join(",")+String(t);return this.dashEntry[i]||(this.dashEntry[i]=this.addDash(e,t)),this.dashEntry[i]}getDashRanges(e,t,i){let r=[],a=e.length%2==1?-e[e.length-1]*i:0,n=e[0]*i,o=!0;r.push({left:a,right:n,isDash:o,zeroLength:0===e[0]});let l=e[0];for(let t=1;t<e.length;t++){o=!o;let s=e[t];a=l*i,l+=s,n=l*i,r.push({left:a,right:n,isDash:o,zeroLength:0===s})}return r}addRoundDash(e,t,i){let r=t/2;for(let t=-i;t<=i;t++){let a=this.width*(this.nextRow+i+t),n=0,o=e[0];for(let l=0;l<this.width;l++){let s;l/o.right>1&&(o=e[++n]);let c=Math.min(Math.abs(l-o.left),Math.abs(l-o.right)),u=t/i*(r+1);if(o.isDash){let e=r-Math.abs(u);s=Math.sqrt(c*c+e*e)}else s=r-Math.sqrt(c*c+u*u);this.data[a+l]=Math.max(0,Math.min(255,s+128))}}}addRegularDash(e){for(let t=e.length-1;t>=0;--t){let i=e[t],r=e[t+1];i.zeroLength?e.splice(t,1):r&&r.isDash===i.isDash&&(r.left=i.left,e.splice(t,1))}let t=e[0],i=e[e.length-1];t.isDash===i.isDash&&(t.left=i.left-this.width,i.right=t.right+this.width);let r=this.width*this.nextRow,a=0,n=e[0];for(let t=0;t<this.width;t++){t/n.right>1&&(n=e[++a]);let i=Math.min(Math.abs(t-n.left),Math.abs(t-n.right));this.data[r+t]=Math.max(0,Math.min(255,(n.isDash?i:-i)+128))}}addDash(e,i){let r=7*!!i,a=2*r+1;if(this.nextRow+a>this.height)return t.w("LineAtlas out of space"),null;let n=0;for(let t=0;t<e.length;t++)n+=e[t];if(0!==n){let t=this.width/n,a=this.getDashRanges(e,this.width,t);i?this.addRoundDash(a,t,r):this.addRegularDash(a)}let o={y:(this.nextRow+r+.5)/this.height,height:2*r/this.height,width:n};return this.nextRow+=a,this.dirty=!0,o}bind(e){let t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,this.data))}}let C="maplibre_preloaded_worker_pool";class R{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];this.workers.length<R.workerCount;)this.workers.push(new Worker(t.a.WORKER_URL));return this.active[e]=!0,this.workers.slice()}release(e){delete this.active[e],0===this.numActive()&&(this.workers.forEac
2h(e=>{e.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[C]}numActive(){return Object.keys(this.active).length}}let L=Math.floor(p.hardwareConcurrency/2);function D(){return n||(n=new R),n}R.workerCount=t.H(globalThis)?Math.max(Math.min(L,3),1):1;class O{constructor(e,i){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=i;let r=this.workerPool.acquire(i);for(let e=0;e<r.length;e++){let a=new t.J(r[e],i);a.name=`Worker ${e}`,this.actors.push(a)}if(!this.actors.length)throw Error("No actors found")}broadcast(e,t){let i=[];for(let r of this.actors)i.push(r.sendAsync({type:e,data:t}));return Promise.all(i)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.actors.forEach(e=>{e.remove()}),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,t){for(let i of this.actors)i.registerMessageHandler(e,t)}}function F(){return o||(o=new O(D(),t.K)).registerMessageHandler("GR",(e,i,r)=>t.m(i,r)),o}function j(e,t){let i=e.tileID,r=t.tileID;return i.overscaledZ-r.overscaledZ||i.canonical.y-r.canonical.y||i.wrap-r.wrap||i.canonical.x-r.canonical.x}function B(e,t){let i=e.feature,r=t.getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=r}function N(e,i,r){return t._(this,void 0,void 0,function*(){let a=e;if(e.url?a=(yield t.j(i.transformRequest(e.url,"Source"),r)).data:yield p.frameAsync(r),!a)return null;let n=t.Q(t.e(a,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in a&&a.vector_layers&&(n.vectorLayerIds=a.vector_layers.map(e=>e.id)),n})}class U{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof t.S?new t.S(e.lng,e.lat):t.S.convert(e),this}setSouthWest(e){return this._sw=e instanceof t.S?new t.S(e.lng,e.lat):t.S.convert(e),this}extend(e){let i,r,a=this._sw,n=this._ne;if(e instanceof t.S)i=e,r=e;else{if(!(e instanceof U))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(U.convert(e)):this.extend(t.S.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(t.S.convert(e)):this;if(i=e._sw,r=e._ne,!i||!r)return this}return a||n?(a.lng=Math.min(i.lng,a.lng),a.lat=Math.min(i.lat,a.lat),n.lng=Math.max(r.lng,n.lng),n.lat=Math.max(r.lat,n.lat)):(this._sw=new t.S(i.lng,i.lat),this._ne=new t.S(r.lng,r.lat)),this}getCenter(){return new t.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 t.S(this.getWest(),this.getNorth())}getSouthEast(){return new t.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(e){let{lng:i,lat:r}=t.S.convert(e),a=this._sw.lng<=i&&i<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=i&&i>=this._ne.lng),this._sw.lat<=r&&r<=this._ne.lat&&a}static convert(e){return e instanceof U?e:e?new U(e):e}static fromLngLat(e,i=0){let r=360*i/0x2637f09,a=r/Math.cos(Math.PI/180*e.lat);return new U(new t.S(e.lng-a,e.lat-r),new t.S(e.lng+a,e.lat+r))}adjustAntiMeridian(){let e=new t.S(this._sw.lng,this._sw.lat),i=new t.S(this._ne.lng,this._ne.lat);return new U(e,e.lng>i.lng?new t.S(i.lng+360,i.lat):i)}}class V{constructor(e,t,i){this.bounds=U.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=i||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){let i=Math.pow(2,e.z),r=Math.floor(t.V(this.bounds.getWest())*i),a=Math.floor(t.U(this.bounds.getNorth())*i),n=Math.ceil(t.V(this.bounds.getE
2ast())*i),o=Math.ceil(t.U(this.bounds.getSouth())*i);return e.x>=r&&e.x<n&&e.y>=a&&e.y<o}}class $ extends t.E{constructor(e,i,r,a){if(super(),this.id=e,this.dispatcher=r,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.e(this,t.Q(i,["url","scheme","tileSize","promoteId"])),this._options=t.e({type:"vector"},i),this._collectResourceTiming=i.collectResourceTiming,512!==this.tileSize)throw Error("vector tile sources must have a tileSize of 512");this.setEventedParent(a)}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let e=yield N(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),e&&(t.e(this,e),e.bounds&&(this.tileBounds=new V(e.bounds,this.minzoom,this.maxzoom)),this.fire(new t.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.l("data",{dataType:"source",sourceDataType:"content"})))}catch(e){this._tileJSONRequest=null,this.fire(new t.k(e))}})}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.abort(),e(),this.load()}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),i={request:this.map._requestManager.transformRequest(t,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.t
2ype,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,globalState:this.map.getGlobalState()};i.request.collectResourceTiming=this._collectResourceTiming;let r="RT";if(e.actor&&"expired"!==e.state){if("loading"===e.state)return new Promise((t,i)=>{e.reloadPromise={resolve:t,reject:i}})}else e.actor=this.dispatcher.getActor(),r="LT";e.abortController=new AbortController;try{let t=yield e.actor.sendAsync({type:r,data:i},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,t)}catch(t){if(delete e.abortController,e.aborted)return;if(t&&404!==t.status)throw t;this._afterTileLoadWorkerResponse(e,null)}})}_afterTileLoadWorkerResponse(e,t){if(t&&t.resourceTiming&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.loadVectorData(t,this.map.painter),e.reloadPromise){let t=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(t.resolve).catch(t.reject)}}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.t
2ype,source:this.id}}))})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Z extends t.E{constructor(e,i,r,a){super(),this.id=e,this.dispatcher=r,this.setEventedParent(a),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.e({type:"raster"},i),t.e(this,t.Q(i,["url","scheme","tileSize"]))}load(){return t._(this,arguments,void 0,function*(e=!1){this._loaded=!1,this.fire(new t.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let i=yield N(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,i&&(t.e(this,i),i.bounds&&(this.tileBounds=new V(i.bounds,this.minzoom,this.maxzoom)),this.fire(new t.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(e){this._tileJSONRequest=null,this.fire(new t.k(e))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return t.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return t._(this,void 0,void 0,function*(){let i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{let r=yield c.getImage(this.map._requestManager.transformRequest(i,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(r&&r.data){this.map._refreshExpiredTiles&&(r.cacheControl||r.expires)&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires});let i=this.map.painter.context,a=i.gl,n=r.data;e.texture=this.map.painter.getTileTexture(n.width),e.texture?e.texture.update(n,{useMipmap:!0}):(e.texture=new t.T(i,n,a.RGBA,{useMipmap:!0}),e.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}}class G extends Z{constructor(e,i,r,a){super(e,i,r,a),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},i),this.encoding=i.encoding||"mapbox",this.redFactor=i.redFactor,this.greenFactor=i.greenFactor,this.blueFactor=i.blueFactor,this.baseShift=i.baseShift}loadTile(e){return t._(this,void 0,void 0,function*(){let i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r=this.map._requestManager.transformRequest(i,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let i=yield c.getImage(r,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(i&&i.data){let r=i.data;this.map._refreshExpiredTiles&&(i.cacheControl||i.expires)&&e.setExpiryData({cacheControl:i.cacheControl,expires:i.expires});let a=t.b(r)&&t.W()?r:yield this.readImageNow(r),n={type:this.type,uid:e.uid,source:this.id,rawImageData:a,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||"expired"===e.state){e.actor=this.dispatcher.getActor();let t=yield e.actor.sendAsync({type:"LDT",data:n});e.dem=t,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}readImageNow(e){return t._(this,void 0,void 0,function*(){if("undefined"!=typeof VideoFrame&&t.X()){let i=e.width+2,r=e.height+2;try{return new t.R({width:i,height:r},(yield t.Y(e,-1,-1,i,r)))}catch(e){}}return p.getImageData(e,1)})}_getNeighboringTiles(e){let i=e.canonical,r=Math.pow(2,i.z),a=(i.x-1+r)%r,n=0===i.x?e.wrap-1:e.wrap,o=(i.x+1+r)%r,l=i.x+1===r?e.wrap+1:e.wrap,s={};return s[new t.Z(e.overscaledZ,n,i.z,a,i.y).key]={backfilled:!1},s[new t.Z(e.overscaledZ,l,i.z,o,i.y).key]={backfilled:!1},i.y>0&&(s[new t.Z(e.overscaledZ,n,i.z,a,i.y-1).key]={backfilled:!1},s[new t.Z(e.overscaledZ,e.wrap,i.z,i.x,i.y-1).key]={backfilled:!1},s[new t.Z(e.overscaledZ,l,i.z,o,i.y-1).key]={backfilled:!1}),i.y+1<r&&(s[new t.Z(e.overscaledZ,n,i.z,a,i.y+1).key]={backfilled:!1},s[new t.Z(e.overscaledZ,e.wrap,i.z,i.x,i.y+1).key]={backfilled:!1},s[new t.Z(e.overscaledZ,l,i.z,o,i.y+1).key]={backfilled:!1}),s}unloadTile(e){return t._(this,void 0,void 0,function*(){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&(yield e.actor.sendAsync({type:"RDT",data:{type:this.t
2ype,uid:e.uid,source:this.id}}))})}}class q extends t.E{constructor(e,i,r,a){super(),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=r.getActor(),this.setEventedParent(a),this._data=i.data,this._options=t.e({},i),this._collectResourceTiming=i.collectResourceTiming,void 0!==i.maxzoom&&(this.maxzoom=i.maxzoom),i.type&&(this.type=i.type),i.attribution&&(this.attribution=i.attribution),this.promoteId=i.promoteId,void 0!==i.clusterMaxZoom&&this.maxzoom<=i.clusterMaxZoom&&t.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${i.clusterMaxZoom}".`),this.workerOptions=t.e({source:this.id,cluster:i.cluster||!1,geojsonVtOptions:{buffer:this._pixelsToTileUnits(void 0!==i.buffer?i.buffer:128),tolerance:this._pixelsToTileUnits(void 0!==i.tolerance?i.tolerance:.375),extent:t.$,maxZoom:this.maxzoom,lineMetrics:i.lineMetrics||!1,generateId:i.generateId||!1},superclusterOptions:{maxZoom:this._getClusterMaxZoom(i.clusterMaxZoom),minPoints:Math.max(2,i.clusterMinPoints||2),extent:t.$,radius:this._pixelsToTileUnits(i.clusterRadius||50),log:!1,generateId:i.generateId||!1},clusterProperties:i.clusterProperties,filter:i.filter},i.workerOptions),"string"==typeof this.promoteId&&(this.workerOptions.promoteId=this.promoteId)}_pixelsToTileUnits(e){return e*(t.$/this.tileSize)}_getClusterMaxZoom(e){let i=e?Math.round(e):this.maxzoom-1;return Number.isInteger(e)||void 0===e||t.w(`Integer expected for option 'clusterMaxZoom': provided value "${e}" rounded to "${i}"`),i}load(){return t._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(e){this.map=e,this.load()}setData(e){return this._data=e,this._updateWorkerData(),this}updateData(e){return this._updateWorkerData(e),this}getData(){return t._(this,void 0,void 0,function*(){let e=t.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:e})})}getCoordinatesFromGeometry(e){return"GeometryCollection"===e.type?e.geometries.map(e=>e.coordinates).flat(1/0):e.coordinates.flat(1/0)}getBounds(){return t._(this,void 0,void 0,function*(){let e,t=new U,i=yield this.getData();switch(i.type){case"FeatureCollection":e=i.features.map(e=>this.getCoordinatesFromGeometry(e.geometry)).flat(1/0);break;case"Feature":e=this.getCoordinatesFromGeometry(i.geometry);break;default:e=this.getCoordinatesFromGeometry(i)}if(0==e.length)return t;for(let i=0;i<e.length-1;i+=2)t.extend([e[i],e[i+1]]);return t})}setClusterOptions(e){return this.workerOptions.cluster=e.cluster,e&&(void 0!==e.clusterRadius&&(this.workerOptions.superclusterOptions.radius=this._pixelsToTileUnits(e.clusterRadius)),void 0!==e.clusterMaxZoom&&(this.workerOptions.superclusterOptions.maxZoom=this._getClusterMaxZoom(e.clusterMa
2xZoom))),this._updateWorkerData(),this}getClusterExpansionZoom(e){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})}getClusterChildren(e){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})}getClusterLeaves(e,t,i){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:t,offset:i}})}_updateWorkerData(e){return t._(this,void 0,void 0,function*(){let i=t.e({type:this.type},this.workerOptions);e?i.dataDiff=e:"string"==typeof this._data?(i.request=this.map._requestManager.transformRequest(p.resolveURL(this._data),"Source"),i.request.collectResourceTiming=this._collectResourceTiming):i.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new t.l("dataloading",{dataType:"source"}));try{let e=yield this.actor.sendAsync({type:"LD",data:i});if(this._pendingLoads--,this._removed||e.abandoned)return void this.fire(new t.l("dataabort",{dataType:"source"}));let r=null;e.resourceTiming&&e.resourceTiming[this.id]&&(r=e.resourceTiming[this.id].slice(0));let a={dataType:"source"};this._collectResourceTiming&&r&&r.length>0&&t.e(a,{resourceTiming:r}),this.fire(new t.l("data",Object.assign(Object.assign({},a),{sourceDataType:"metadata"}))),this.fire(new t.l("data",Object.assign(Object.assign({},a),{sourceDataType:"content"})))}catch(e){if(this._pendingLoads--,this._removed)return void this.fire(new t.l("dataabort",{dataType:"source"}));this.fire(new t.k(e))}})}loaded(){return 0===this._pendingLoads}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.actor?"RT":"LT";e.actor=this.actor;let i={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,globalState:this.map.getGlobalState()};e.abortController=new AbortController;let r=yield this.actor.sendAsync({type:t,data:i},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(r,this.map.painter,"RT"===t)})}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.t
2ype,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return t.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class H extends t.E{constructor(e,t,i,r){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=i,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(r),this.options=t}load(e){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let t=yield c.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,t&&t.data&&(this.image=t.data,e&&(this.coordinates=e),this._finishLoading())}catch(e){this._request=null,this._loaded=!0,this.fire(new t.k(e))}})}loaded(){return this._loaded}updateImage(e){return e.url&&(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally(()=>{this.texture=null})),this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.l("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){var i;this.coordinates=e;let r=e.map(t.a0.fromLngLat);return this.tileID=function(e){let i=t.a1.fromPoints(e),r=Math.max(0,Math.floor(-Math.log(Math.max(i.width(),i.height()))/Math.LN2)),a=Math.pow(2,r);return new t.a3(r,Math.floor((i.minX+i.maxX)/2*a),Math.floor((i.minY+i.maxY)/2*a))}(r),this.terrainTileRanges=this._getOverlappingTileRanges(r),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=r.map(e=>this.tileID.getTilePoint(e)._round()),this.flippedWindingOrder=((i=this.tileCoords)[1].x-i[0].x)*(i[2].y-i[0].y)-(i[1].y-i[0].y)*(i[2].x-i[0].x)<0,this.fire(new t.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;let e=this.map.painter.context,i=e.gl;this.texture||(this.texture=new t.T(e,this.image,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let r=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,r=!0)}r&&this.fire(new t.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return t._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){let{minX:i,minY:r,maxX:a,maxY:n}=t.a1.fromPoints(e),o={};for(let e=0;e<=t.a2;e++){let t=Math.pow(2,e),l=Math.floor(i*t),s=Math.floor(r*t),c=Math.floor(a*t),u=Math.floor(n*t);o[e]={minTileX:l,minTileY:s,maxTileX:c,maxTileY:u}}return o}}class W extends H{constructor(e,t,i,r){super(e,t,i,r),this.roundZoom=!0,this.type="video",this.options=t}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1;let e=this.options;for(let t of(this.urls=[],e.urls))this.urls.push(this.map._requestManager.transformRequest(t,"Source").url);try{let e=yield t.a4(this.urls);if(this._loaded=!0,!e)return;this.video=e,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(e){this.fire(new t.k(e))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let i=this.video.seekable;e<i.start(0)||e>i.end(0)?this.fire(new t.k(new t.a5(`sources.${this.id}`,null,`Playback for this video can be set only between the ${i.start(0)} and ${i.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;let e=this.map.painter.context,i=e.gl;this.texture?this.video.paused||(this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,this.video)):(this.texture=new t.T(e,this.video,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let r=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,r=!0)}r&&this.fire(new t.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 X extends H{constructor(e,i,r,a){super(e,i,r,a),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some(e=>!Array.isArray(e)||2!==e.length||e.some(e=>"number"!=typeof e))||this.fire(new t.k(new t.a5(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.k(new t.a5(`sources.${e}`,null,'missing required property "coordinates"'))),i.animate&&"boolean"!=typeof i.animate&&this.fire(new t.k(new t.a5(`sources.${e}
2`,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"==typeof i.canvas||i.canvas instanceof HTMLCanvasElement||this.fire(new t.k(new t.a5(`sources.${e}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.k(new t.a5(`sources.${e}`,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate}load(){return t._(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 t.k(Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||0===Object.keys(this.tiles).length)return;let i=this.map.painter.context,r=i.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.T(i,this.canvas,r.RGBA,{premultiply:!0});let a=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,a=!0)}a&&this.fire(new t.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}let Y={},K=e=>{switch(e){case"geojson":return q;case"image":return H;case"raster":return Z;case"raster-dem":return G;case"vector":return $;case"video":return W;case"canvas":return X}return Y[e]},J="RTLPluginLoaded";class Q extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=F()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(e=>{throw this.status="error",e})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return t._(this,arguments,void 0,function*(e,t=!1){if(this.url)throw Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=p.resolveURL(e),!this.url)throw Error(`requested url ${e} is invalid`);if("unavailable"===this.status){if(!t)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()})}_requestImport(){return t._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new t.l(J))})}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let ee=null;function et(){return ee||(ee=new Q),ee}class ei{constructor(e,i){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=t.a6(),this.uses=0,this.tileSize=i,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){let t=e+this.timeAdded;t<this.fadeEndTime||(this.fadeEndTime=t)}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(e,i,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){for(let a in e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(e,t){let i={};if(!t)return i;for(let r of e){let e=r.layerIds.map(e=>
2t.getLayer(e)).filter(Boolean);if(0!==e.length)for(let t of(r.layers=e,r.stateDependentLayerIds&&(r.stateDependentLayers=r.stateDependentLayerIds.map(t=>e.filter(e=>e.id===t)[0])),e))i[t.id]=r}return i}(e.buckets,null==i?void 0:i.style),this.hasSymbolBuckets=!1,this.buckets){let e=this.buckets[a];if(e instanceof t.a8){if(this.hasSymbolBuckets=!0,!r)break;e.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let e in this.buckets){let i=this.buckets[e];if(i instanceof t.a8&&i.hasRTLText){this.hasRTLText=!0,et().lazyLoad();break}}for(let e in this.queryPadding=0,this.buckets){let t=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,i.style.getLayer(e).queryRadius(t))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new t.a7}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let t in this.buckets){let i=this.buckets[t];i.uploadPending()&&i.upload(e)}let i=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new t.T(e,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new t.T(e,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,i,r,a,n,o,l,s,c,u){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:a,scale:n,tileSize:this.tileSize,pixelPosMatrix:c,transform:l,params:o,queryPadding:this.queryPadding*s,getElevation:u},e,t,i):{}}querySourceFeatures(e,i){let r=this.latestFeatureIndex;if(!r||!r.rawTileData)return;let a=r.loadVTLayers(),n=i&&i.sourceLayer?i.sourceLayer:"",o=a._geojsonTileLayer||a[n];if(!o)return;let l=t.a9(i&&i.filter),{z:s,x:c,y:u}=this.tileID.canonical,h={z:s,x:c,y:u};for(let i=0;i<o.length;i++){let a=o.feature(i);if(l.needGeometry){let e=t.aa(a,!0);if(!l.filter(new t.F(this.tileID.overscaledZ),e,this.tileID.canonical))continue}else if(!l.filter(new t.F(this.tileID.overscaledZ),a))continue;let p=r.getId(a,n),d=new t.ab(a,s,c,u,p);d.tile=h,e.push(d)}}hasData(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(e){let i=this.expirationTime;if(e.cacheControl){let i=t.ac(e.cacheControl);i["max-age"]&&(this.expirationTime=Date.now()+1e3*i["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){let e=Date.now(),t=!1;if(this.expirationTime>e)t=!1;else if(i)if(this.expirationTime<i)t=!0;else{let r=this.expirationTime-i;r?this.expirationTime=e+Math.max(r,3e4):t=!0}else t=!0;t?(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(),0x7fffffff)}setFeatureState(e,t){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||0===Object.keys(e).length)return;let i=this.latestFeatureIndex.loadVTLayers();for(let r in this.buckets){if(!t.style.hasLayer(r))continue;let a=this.buckets[r],n=a.layers[0].sourceLayer||"_geojsonTileLayer",o=i[n],l=e[n];if(!o||!l||0===Object.keys(l).length)continue;a.update(l,o,this.imageAtlas&&this.imageAtlas.patternPositions||{});let s=t&&t.style&&t.style.getLayer(r);s&&(this.queryPadding=Math.max(this.queryPadding,s.queryRadius(a)))}}holdingForFade(){return void 0!==this.symbolFadeHoldUntil}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<p.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(e){this.symbolFadeHoldUntil=p.now()+e}
2setDependencies(e,t){let i={};for(let e of t)i[e]=!0;this.dependencies[e]=i}hasDependency(e,t){for(let i of e){let e=this.dependencies[i];if(e){for(let i of t)if(e[i])return!0}}return!1}}class er{constructor(e,t){this.max=e,this.onRemove=t,this.reset()}reset(){for(let e in this.data)for(let t of this.data[e])t.timeout&&clearTimeout(t.timeout),this.onRemove(t.value);return this.data={},this.order=[],this}add(e,t,i){let r=e.wrapped().key;void 0===this.data[r]&&(this.data[r]=[]);let a={value:t,timeout:void 0};if(void 0!==i&&(a.timeout=setTimeout(()=>{this.remove(e,a)},i)),this.data[r].push(a),this.order.push(r),this.order.length>this.max){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){let t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;let i=e.wrapped().key,r=void 0===t?0:this.data[i].indexOf(t),a=this.data[i][r];return this.data[i].splice(r,1),a.timeout&&clearTimeout(a.timeout),0===this.data[i].length&&delete this.data[i],this.onRemove(a.value),this.order.splice(this.order.indexOf(i),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){let t=[];for(let i in this.data)for(let r of this.data[i])e(r.value)||t.push(r);for(let e of t)this.remove(e.value.tileID,e)}}class ea{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,i,r){let a=String(i);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][a]=this.stateChanges[e][a]||{},t.e(this.stateChanges[e][a],r),null===this.deletedStates[e])for(let t in this.deletedStates[e]={},this.state[e])t!==a&&(this.deletedStates[e][t]=null);else if(this.deletedStates[e]&&null===this.deletedStates[e][a])for(let t in this.deletedStates[e][a]={},this.state[e][a])r[t]||(this.deletedStates[e][a][t]=null);else for(let t in r)this.deletedStates[e]&&this.deletedStates[e][a]&&null===this.deletedStates[e][a][t]&&delete this.deletedStates[e][a][t]}removeFeatureState(e,t,i){if(null===this.deletedStates[e])return;let r=String(t);if(this.deletedStates[e]=this.deletedStates[e]||{},i&&void 0!==t)null!==this.deletedStates[e][r]&&(this.deletedStates[e][r]=this.deletedStates[e][r]||{},this.deletedStates[e][r][i]=null);else if(void 0!==t)if(this.stateChanges[e]&&this.stateChanges[e][r])for(i in this.deletedStates[e][r]={},this.stateChanges[e][r])this.deletedStates[e][r][i]=null;else this.deletedStates[e][r]=null;else this.deletedStates[e]=null}getState(e,i){let r=String(i),a=t.e({},(this.state[e]||{})[r],(this.stateChanges[e]||{})[r]);if(null===this.deletedStates[e])return{};if(this.deletedStates[e]){let t=this.deletedStates[e][i];if(null===t)return{};for(let e in t)delete a[e]}return a}initializeTileState(e,t){e.setFeatureState(this.state,t)}coalesceChanges(e,i){let r={};for(let e in this.stateChanges){this.state[e]=this.state[e]||{};let i={};for(let r in this.stateChanges[e])this.state[e][r]||(this.state[e][r]={}),t.e(this.state[e][r],this.stateChanges[e][r]),i[r]=this.state[e][r];r[e]=i}for(let e in this.deletedStates){this.state[e]=this.state[e]||{};let i={};if(null===this.deletedStates[e])for(let t in this.state[e])i[t]={},this.state[e][t]={};else for(let t in this.deletedStates[e]){if(null===this.deletedStates[e][t])this.state[e][t]={};else for(let i of Object.keys(this.deletedStates[e][t]))delete this.state[e][t][i];i[t]=this.state[e][t]}r[e]=r[e]||{},t.e(r[e],i)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(let t in e)e[t].setFeatureState(r,i)}}function en(e,i){let r=t.ag(i.lat,-t.ah,t.ah);return new t.P(t.V(i.lng)*e,t.U(r)*e)}function eo(e,i){return new t.a0(i.x/e,i.y/e).toLngLat()}function el(e){return e.cameraToCenterDistance*Math.min(.85*Math.tan(t.ad(90-e.pitch)),Math.tan(t.ad(89.25-e.pitch)))}function es(e,i){let r=e.canonical,a=i/t.ae(r.z),n=r.x+Math.pow(2,r.z)*e.wrap,o=t.af(new Float64Array(16));return t.M(o,o,[n*a,r.y*a,0]),t.N(o,o,[a/t.$,a/t.$,1]),o}function ec(e,i,r,a,n){let o=t.a0.fromLngLat(e,i),l=n*t.ai(1,e.lat),s=l*Math.cos(t.ad(r)),c=Math.sqrt(l*l-s*s),u=c*Math.sin(t.ad(-a)),h=c*Math.cos(t.ad(-a));return new t.a0(o.x+u,o.y+h,o.z+s)}function eu(e,t,i){let r=0,a=(i-t)/10;for(let n=0;n<10;n++)r+=a*Math.pow(Math.cos(t+(n+.5)/10*(i-t)),e);return r}function eh(e,i){return function(r,a,n,o,l){let s=2*((e-1)/t.aj(Math.cos(t.ad(89.25-l))/Math.cos(t.ad(89.25)))-1),c=Math.acos(n/o),u=2*eu(s-1,0,t.ad(l/2)),h=Math.min(t.ad(89.25),c+t.ad(l/2)),p=eu(s-1,Math.min(h,c-t.ad(l/2)),h),d=Math.atan(a/n),f=Math.hypot(a,n),m=r;return m+=t.aj(o/f/Math.max(.5,Math.cos(t.ad(l/2)))),m+=s*t.aj(Math.cos(d))/2,m-=t.aj(Math.max(1,p/u/i))/2}}let ep=eh(9.314,3);function ed(e,i){return Math.max(0,(i.roundZoom?Math.round:Math.floor)(e.zoom+t.aj(e.tileSize/i.tileSize)))}function ef(e,i){let r=e.getCameraFrustum(),a=e.getClippingPlane(),n=e.screenPointToMercatorCoordinate(e.getCameraPoint()),o=t.a0.fromLngLat(e.center,e.elevation);n.z=o.z+Math.cos(e.pitchInRadians)*e.cameraToCenterDistance/e.worldSize;let l=e.getCoveringTilesDetailsProvider(),s=l.allowVariableZoom(e,i),c=ed(e,i),u=i.minzoom||0,h=void 0!==i.maxzoom?i.maxzoom:e.maxZoom,p=Math.min(Math.max(0,c),h),d=Math.pow(2,p),f=[d*n.x,d*n.y,0],m=[d*o.x,d*o.y,0],g=Math.hypot(o.x-n.x,o.y-n.y),y=Math.abs(o.z-n.z),_=Math.hypot(g,y),b=e=>({zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),x=[],v=[];
2if(e.renderWorldCopies&&l.allowWorldCopies())for(let e=1;e<=3;e++)x.push(b(-e)),x.push(b(e));for(x.push(b(0));x.length>0;){let d=x.pop(),g=d.x,b=d.y,w=d.fullyVisible,z={x:g,y:b,z:d.zoom},S=l.getTileBoundingVolume(z,d.wrap,e.elevation,i);if(!w){let e=function(e,t,i){let r=t.intersectsFrustum(e);if(!i||0===r)return r;let a=t.intersectsPlane(i);return 0===a?0:2===r&&2===a?2:1}(r,S,a);if(0===e)continue;w=2===e}let T=l.distanceToTile2d(n.x,n.y,z,S),k=c;s&&(k=(i.calculateTileZoom||ep)(e.zoom+t.aj(e.tileSize/i.tileSize),T,y,_,e.fov));let E=Math.min(k=Math.max(0,k=(i.roundZoom?Math.round:Math.floor)(k)),h);if(d.wrap=l.getWrap(o,z,d.wrap),d.zoom>=E){if(d.zoom<u)continue;let e=p-d.zoom,r=f[0]-.5-(g<<e),a=f[1]-.5-(b<<e),n=i.reparseOverscaled?Math.max(d.zoom,k):d.zoom;v.push({tileID:new t.Z(d.zoom===h?n:d.zoom,d.wrap,d.zoom,g,b),distanceSq:t.ak([m[0]-.5-g,m[1]-.5-b]),tileDistanceToCamera:Math.sqrt(r*r+a*a)})}else for(let e=0;e<4;e++)x.push({zoom:d.zoom+1,x:(g<<1)+e%2,y:(b<<1)+(e>>1),wrap:d.wrap,fullyVisible:w})}return v.sort((e,t)=>e.distanceSq-t.distanceSq).map(e=>e.tileID)}let em=t.a1.fromPoints([new t.P(0,0),new t.P(t.$,t.$)]);class eg extends t.E{constructor(e,t,i){super(),this.id=e,this.dispatcher=i,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,i,r)=>{let a=new(K(t.type))(e,t,i,r);if(a.id!==e)throw Error(`Expected Source id to be ${e} instead of ${a.id}`);return a})(e,t,i,this),this._tiles={},this._cache=new er(0,e=>this._unloadTile(e)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new ea,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let e in this._tiles){let t=this._tiles[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,i,r){return t._(this,void 0,void 0,function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,i,r)}catch(i){e.state="errored",404!==i.status?this._source.fire(new t.k(i,{tile:e})):this.update(this.transform,this.terrain)}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new t.l("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){for(let t in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){let i=this._tiles[t];i.upload(e),i.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(e=>e.tileID).sort(ey).map(e=>e.key)}getRenderableIds(e){let i=[];for(let t in this._tiles)this._isIdRenderable(t,e)&&i.push(this._tiles[t]);return e?i.sort((e,i)=>{let r=e.tileID,a=i.tileID,n=new t.P(r.canonical.x,r.canonical.y)._rotate(-this.transform.bearingInRadians),o=new t.P(a.canonical.x,a.canonical.y)._rotate(-this.transform.bearingInRadians);return r.overscaledZ-a.overscaledZ||o.y-n.y||o.x-n.x}).map(e=>e.tileID.key):i.map(e=>e.tileID).sort(ey).map(e=>e.key)}hasRenderableParent(e){let t=this.findLoadedParent(e,0);return!!t&&this._isIdRenderable(t.tileID.key)}_isIdRenderable(e,t){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(t||!this._tiles[e].holdingForFade())}reload(e){if(this._paused)this._shouldReloadOnResume=!0;else for(let t in this._cache.reset(),this._tiles)e?this._reloadTile(t,"expired"):"errored"!==this._tiles[t].state&&this._reloadTile(t,"reloading")}_reloadTile(e,i){return t._(this,void 0,void 0,function*(){let t=this._tiles[e];t&&("loading"!==t.state&&(t.state=i),yield this._loadTile(t,e,i))})}_tileLoaded(e,i,r){e.timeAdded=p.now(),"expired"===r&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(i,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new t.l("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){let t=this.getRenderableIds();for(let r=0;r<t.length;r++){let a=t[r];if(e.neighboringTiles&&e.neighboringTiles[a]){let t=this.getTileByID(a);i(e,t),i(t,e)}}function i(e,t){e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0;
2let i=t.tileID.canonical.x-e.tileID.canonical.x,r=t.tileID.canonical.y-e.tileID.canonical.y,a=Math.pow(2,e.tileID.canonical.z),n=t.tileID.key;0===i&&0===r||Math.abs(r)>1||(Math.abs(i)>1&&(1===Math.abs(i+a)?i+=a:1===Math.abs(i-a)&&(i-=a)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,i,r),e.neighboringTiles&&e.neighboringTiles[n]&&(e.neighboringTiles[n].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,t,i,r){for(let a in this._tiles){let n=this._tiles[a];if(r[a]||!n.hasData()||n.tileID.overscaledZ<=t||n.tileID.overscaledZ>i)continue;let o=n.tileID;for(;n&&n.tileID.overscaledZ>t+1;){let e=n.tileID.scaledTo(n.tileID.overscaledZ-1);(n=this._tiles[e.key])&&n.hasData()&&(o=e)}let l=o;for(;l.overscaledZ>t;)if(e[(l=l.scaledTo(l.overscaledZ-1)).key]||e[l.canonical.key]){r[o.key]=o;break}}}findLoadedParent(e,t){if(e.key in this._loadedParentTiles){let i=this._loadedParentTiles[e.key];return i&&i.tileID.overscaledZ>=t?i:null}for(let i=e.overscaledZ-1;i>=t;i--){let t=e.scaledTo(i),r=this._getLoadedTile(t);if(r)return r}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){let t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){let i=Math.floor((Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1)*(null===this._maxTileCacheZoomLevels?t.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),r="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(r)}handleWrapJump(e){let t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);if(this._prevLng=e,t){let e={};for(let i in this._tiles){let r=this._tiles[i];r.tileID=r.tileID.unwrapTo(r.tileID.wrap+t),e[r.tileID.key]=r}for(let t in this._tiles=e,this._timers)clearTimeout(this._timers[t]),delete this._timers[t];for(let e in this._tiles)this._setTileReloadTimer(e,this._tiles[e])}}_updateCoveredAndRetainedTiles(e,t,i,r,a,n){let o={},l={},s=Object.keys(e),c=p.now();for(let i of s){let r=e[i],a=this._tiles[i];if(!a||0!==a.fadeEndTime&&a.fadeEndTime<=c)continue;let n=this.findLoadedParent(r,t),s=this.findLoadedSibling(r),u=n||s||null;u&&(this._addTile(u.tileID),o[u.tileID.key]=u.tileID),l[i]=r}for(let t in this._retainLoadedChildren(l,r,i,e),o)e[t]||(this._coveredTiles[t]=!0,e[t]=o[t]);if(n){let t={},i={};for(let e of a)this._tiles[e.key].hasData()?t[e.key]=e:i[e.key]=e;for(let r in i){let a=i[r].children(this._source.maxzoom);this._tiles[a[0].key]&&this._tiles[a[1].key]&&this._tiles[a[2].key]&&this._tiles[a[3].key]&&(t[a[0].key]=e[a[0].key]=a[0],t[a[1].key]=e[a[1].key]=a[1],t[a[2].key]=e[a[2].key]=a[2],t[a[3].key]=e[a[3].key]=a[3],delete i[r])}for(let r in i){let a=i[r],n=this.findLoadedParent(a,this._source.minzoom),o=this.findLoadedSibling(a),l=n||o||null;if(l)for(let i in t[l.tileID.key]=e[l.tileID.key]=l.tileID,t)t[i].isChildOf(l.tileID)&&delete t[i]}for(let e in this._tiles)t[e]||(this._coveredTiles[e]=!0)}}update(e,i){let r;if(!this._sourceLoaded||this._paused)return;this.transform=e,this.terrain=i,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?r=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(e=>new t.Z(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)):(r=ef(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:i,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(r=r.filter(e=>this._source.hasTile(e)))):r=[];let a=ed(e,this._source),n=Math.max(a-eg.maxOverzooming,this._source.minzoom),o=Math.max(a+eg.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let e={};for(let t of r)if(t.canonical.z>this._source.minzoom){let i=t.scaledTo(t.canonical.z-1);e[i.key]=i;let r=t.scaledTo(Math.max(this._source.minzoom,Math.min(t.canonical.z,5)));e[r.key]=r}r=r.concat(Object.values(e))}let l=0===r.length&&!this._updated&&this._didEmitContent;this._updated=!0,l&&this.fire(new t.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let s=this._updateRetainedTiles(r,a);for(let e in e_(this._source.type)&&this._updateCoveredAndRetainedTiles(s,n,o,a,r,i),s)this._tiles[e].clearFadeHold();for(let e of t.al(this._tiles,s)){let t=this._tiles[e];t.hasSymbolBuckets&&!t.holdingForFade()?t.setHoldDuration(this.map._fadeDuration):t.hasSymbolBuckets&&!t.symbolFadeFinished()||this._removeTile(e)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,t){var i;let r={},a={},n=Math.max(t-eg.maxOverzooming,this._source.minzoom),o=Math.max(t+eg.maxUnderzooming,this._source.minzoom),l={};for(let i of e){let e=this._addTile(i);r[i.key]=i,e.hasData()||t<this._source.maxzoom&&(l[i.key]=i)}for(let s of(this._retainLoadedChildren(l,t,o,r),e)){let e=this._tiles[s.key];if(e.hasData())continue;if(t+1>
2this._source.maxzoom){let e=s.children(this._source.maxzoom)[0],t=this.getTile(e);if(t&&t.hasData()){r[e.key]=e;continue}}else{let e=s.children(this._source.maxzoom);if(r[e[0].key]&&r[e[1].key]&&r[e[2].key]&&r[e[3].key])continue}let o=e.wasRequested();for(let t=s.overscaledZ-1;t>=n;--t){let n=s.scaledTo(t);if(a[n.key])break;if(a[n.key]=!0,(e=this.getTile(n))||!o||(e=this._addTile(n)),e){let t=e.hasData();if((t||!(null==(i=this.map)?void 0:i.cancelPendingTileRequestsWhileZooming)||o)&&(r[n.key]=n),o=e.wasRequested(),t)break}}}return r}_updateLoadedParentTileCache(){for(let e in this._loadedParentTiles={},this._tiles){let t=[],i,r=this._tiles[e].tileID;for(;r.overscaledZ>0;){if(r.key in this._loadedParentTiles){i=this._loadedParentTiles[r.key];break}t.push(r.key);let e=r.scaledTo(r.overscaledZ-1);if(i=this._getLoadedTile(e))break;r=e}for(let e of t)this._loadedParentTiles[e]=i}}_updateLoadedSiblingTileCache(){for(let e in this._loadedSiblingTiles={},this._tiles){let t=this._tiles[e].tileID,i=this._getLoadedTile(t);this._loadedSiblingTiles[t.key]=i}}_addTile(e){let i=this._tiles[e.key];if(i)return i;(i=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,i),i.tileID=e,this._state.initializeTileState(i,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,i)));let r=i;return i||(i=new ei(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(i,e.key,i.state)),i.uses++,this._tiles[e.key]=i,r||this._source.fire(new t.l("dataloading",{tile:i,coord:i.tileID,dataType:"source"})),i}_setTileReloadTimer(e,t){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);let i=t.getExpiryTimeout();i&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},i))}refreshTiles(e){for(let t in this._tiles)(this._isIdRenderable(t)||"errored"==this._tiles[t].state)&&e.some(e=>e.equals(this._tiles[t].tileID.canonical))&&this._reloadTile(t,"expired")}_removeTile(e){let t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}_dataHandler(e){let t=e.sourceDataType;"source"===e.dataType&&"metadata"===t&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===e.dataType&&"content"===t&&(this.reload(e.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){for(let e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,i,r){let a=[],n=this.transform;if(!n)return a;let o=n.getCoveringTilesDetailsProvider().allowWorldCopies(),l=r?n.getCameraQueryGeometry(e):e,s=e=>n.screenPointToMercatorCoordinate(e,this.terrain),c=this.transformBbox(e,s,!o),u=this.transformBbox(l,s,!o),h=this.getIds(),p=t.a1.fromPoints(u);for(let e=0;e<h.length;e++){let r=this._tiles[h[e]];if(r.holdingForFade())continue;let l=o?[r.tileID]:[r.tileID.unwrapTo(-1),r.tileID.unwrapTo(0)],s=Math.pow(2,n.zoom-r.tileID.overscaledZ),d=i*r.queryPadding*t.$/r.tileSize/s;for(let e of l){let i=p.map(i=>e.getTilePoint(new t.a0(i.x,i.y)));if(i.expandBy(d),i.intersects(em)){let t=c.map(t=>e.getTilePoint(t)),i=u.map(t=>e.getTilePoint(t));a.push({tile:r,tileID:o?e:e.unwrapTo(0),queryGeometry:t,cameraQueryGeometry:i,scale:s})}}}return a}transformBbox(e,i,r){let a=e.map(i);if(r){let r=t.a1.fromPoints(e);r.shrinkBy(.001*Math.min(r.width(),r.height()));let n=r.map(i);t.a1.fromPoints(a).covers(n)||(a=a.map(e=>e.x>.5?new t.a0(e.x-1,e.y,e.z):e))}return a}getVisibleCoordinates(e){let t=this.getRenderableIds(e).map(e=>this._tiles[e].tileID);return this.transform&&this.transform.populateCache(t),t}hasTransition(){if(this._source.hasTransition())return!0;if(e_(this._source.type)){let e=p.now();for(let t in this._tiles)if(this._tiles[t].fadeEndTime>=e)return!0}return!1}setFeatureState(e,t,i){this._state.updateState(e=e||"_geojsonTileLayer",t,i)}removeFeatureState(e,t,i){this._state.removeFeatureState(e=e||"_geojsonTileLayer",t,i)}getFeatureState(e,t){return this._state.getState(e=e||"_geojsonTileLayer",t)}
2setDependencies(e,t,i){let r=this._tiles[e];r&&r.setDependencies(t,i)}reloadTilesForDependencies(e,t){for(let i in this._tiles)this._tiles[i].hasDependency(e,t)&&this._reloadTile(i,"reloading");this._cache.filter(i=>!i.hasDependency(e,t))}}function ey(e,t){let i=Math.abs(2*e.wrap)-(e.wrap<0),r=Math.abs(2*t.wrap)-(t.wrap<0);return e.overscaledZ-t.overscaledZ||r-i||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function e_(e){return"raster"===e||"image"===e||"video"===e}eg.maxOverzooming=10,eg.maxUnderzooming=3;class eb{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let e=1;e<this.points.length;e++)this._distances[e]=this._distances[e-1]+this.points[e].dist(this.points[e-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(t||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(e){if(1===this.points.length)return this.points[0];e=t.ag(e,0,1);let i=1,r=this._distances[i],a=e*this.paddedLength+this.padding;for(;r<a&&i<this._distances.length;)r=this._distances[++i];let n=i-1,o=this._distances[n],l=r-o,s=l>0?(a-o)/l:0;return this.points[n].mult(1-s).add(this.points[i].mult(s))}}function ex(e,t){let i=!0;return"always"===e||"never"!==e&&"never"!==t||(i=!1),i}class ev{constructor(e,t,i){let r=this.boxCells=[],a=this.circleCells=[];this.xCellCount=Math.ceil(e/i),this.yCellCount=Math.ceil(t/i);for(let e=0;e<this.xCellCount*this.yCellCount;e++)r.push([]),a.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=t,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/t,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,t,i,r,a){this._forEachCell(t,i,r,a,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(r),this.bboxes.push(a)}insertCircle(e,t,i,r){this._forEachCell(t-r,i-r,t+r,i+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(i),this.circles.push(r)}_insertBoxCell(e,t,i,r,a,n){this.boxCells[a].push(n)}_insertCircleCell(e,t,i,r,a,n){this.circleCells[a].push(n)}_query(e,t,i,r,a,n,o){if(i<0||e>this.width||r<0||t>this.height)return[];let l=[];if(e<=0&&t<=0&&this.width<=i&&this.height<=r){if(a)return[{key:null,x1:e,y1:t,x2:i,y2:r}];for(let e=0;e<this.boxKeys.length;e++)l.push({key:this.boxKeys[e],x1:this.bboxes[4*e],y1:this.bboxes[4*e+1],x2:this.bboxes[4*e+2],y2:this.bboxes[4*e+3]});for(let e=0;e<this.circleKeys.length;e++){let t=this.circles[3*e],i=this.circles[3*e+1],r=this.circles[3*e+2];l.push({key:this.circleKeys[e],x1:t-r,y1:i-r,x2:t+r,y2:i+r})}}else this._forEachCell(e,t,i,r,this._queryCell,l,{hitTest:a,overlapMode:n,seenUids:{box:{},circle:{}}},o);return l}query(e,t,i,r){return this._query(e,t,i,r,!1,null)}hitTest(e,t,i,r,a,n){return this._query(e,t,i,r,!0,a,n).length>0}hitTestCircle(e,t,i,r,a){let n=e-i,o=e+i,l=t-i,s=t+i;if(o<0||n>this.width||s<0||l>this.height)return!1;let c=[];return this._forEachCell(n,l,o,s,this._queryCellCircle,c,{hitTest:!0,overlapMode:r,circle:{x:e,y:t,radius:i},seenUids:{box:{},circle:{}}},a),c.length>0}_queryCell(e,t,i,r,a,n,o,l){let{seenUids:s,hitTest:c,overlapMode:u}=o,h=this.boxCells[a];if(null!==h){let a=this.bboxes;for(let o of h)if(!s.box[o]){s.box[o]=!0;let h=4*o,p=this.boxKeys[o];if(e<=a[h+2]&&t<=a[h+3]&&i>=a[h+0]&&r>=a[h+1]&&(!l||l(p))&&(!c||!ex(u,p.overlapMode))&&(n.push({key:p,x1:a[h],y1:a[h+1],x2:a[h+2],y2:a[h+3]}),c))return!0}}let p=this.circleCells[a];if(null!==p){let a=this.circles;for(let o of p)if(!s.circle[o]){s.circle[o]=!0;let h=3*o,p=this.circleKeys[o];if(this._circleAndRectCollide(a[h],a[h+1],a[h+2],e,t,i,r)&&(!l||l(p))&&(!c||!ex(u,p.overlapMode))){let e=a[h],t=a[h+1],i=a[h+2];if(n.push({key:p,x1:e-i,y1:t-i,x2:e+i,y2:t+i}),c)return!0}}}return!1}_queryCellCircle(e,t,i,r,a,n,o,l){let{circle:s,seenUids:c,overlapMode:u}=o,h=this.boxCells[a];if(null!==h){let e=this.bboxes;for(let t of h)if(!c.box[t]){c.box[t]=!0;let i=4*t,r=this.boxKeys[t];if(this._circleAndRectCollide(s.x,s.y,s.radius,e[i+0],e[i+1],e[i+2],e[i+3])&&(!l||l(r))&&!ex(u,r.overlapMode))return n.push(!0),!0}}let p=this.circleCells[a];if(null!==p){let e=this.circles;for(let t of p)if(!c.circle[t]){c.circle[t]=!0;let i=3*t,r=this.circleKeys[t];
2if(this._circlesCollide(e[i],e[i+1],e[i+2],s.x,s.y,s.radius)&&(!l||l(r))&&!ex(u,r.overlapMode))return n.push(!0),!0}}}_forEachCell(e,t,i,r,a,n,o,l){let s=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(i),h=this._convertToYCellCoord(r);for(let p=s;p<=u;p++)for(let s=c;s<=h;s++)if(a.call(this,e,t,i,r,this.xCellCount*s+p,n,o,l))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,i,r,a,n){let o=r-e,l=a-t,s=i+n;return s*s>o*o+l*l}_circleAndRectCollide(e,t,i,r,a,n,o){let l=(n-r)/2,s=Math.abs(e-(r+l));if(s>l+i)return!1;let c=(o-a)/2,u=Math.abs(t-(a+c));if(u>c+i)return!1;if(s<=l||u<=c)return!0;let h=s-l,p=u-c;return h*h+p*p<=i*i}}function ew(e,i,r){var a,n,o,l,s;let c=t.L();if(!e){let{vecSouth:e,vecEast:t}=ez(i),r=h();r[0]=t[0],r[1]=t[1],r[2]=e[0],r[3]=e[1],(s=(a=r[0])*(l=r[3])-(o=r[2])*(n=r[1]))&&(r[0]=l*(s=1/s),r[1]=-n*s,r[2]=-o*s,r[3]=a*s),c[0]=r[0],c[1]=r[1],c[4]=r[2],c[5]=r[3]}return t.N(c,c,[1/r,1/r,1]),c}function ez(e){let i=Math.cos(e.rollInRadians),r=Math.sin(e.rollInRadians),a=Math.cos(e.pitchInRadians),n=Math.cos(e.bearingInRadians),o=Math.sin(e.bearingInRadians),l=t.aq();l[0]=-n*a*r-o*i,l[1]=-o*a*r+n*i;let s=t.ar(l);s<1e-9?t.as(l):t.at(l,l,1/s);let c=t.aq();c[0]=n*a*i-o*r,c[1]=o*a*i+n*r;let u=t.ar(c);return u<1e-9?t.as(c):t.at(c,c,1/u),{vecEast:c,vecSouth:l}}function eS(e,i,r,a){let n;a?(n=[e,i,a(e,i),1],t.av(n,n,r)):eF(n=[e,i,0,1],n,r);let o=n[3];return{point:new t.P(n[0]/o,n[1]/o),signedDistanceFromCamera:o,isOccluded:!1}}function eT(e,t,i,r,a,n,o,l){let s=n.glyphStartIndex+n.numGlyphs,c=n.lineStartIndex,u=n.lineStartIndex+n.lineLength,h=t.getoffsetX(n.glyphStartIndex),p=t.getoffsetX(s-1),d=eL(e*h,i,r,a,n.segment,c,u,l,o);if(!d)return null;let f=eL(e*p,i,r,a,n.segment,c,u,l,o);return f?l.projectionCache.anyProjectionOccluded?null:{first:d,last:f}:null}function ek(e,i,r,a){return e===t.an.horizontal&&Math.abs(r.y-i.y)>Math.abs(r.x-i.x)*a?{useVertical:!0}:(e===t.an.vertical?i.y<r.y:i.x>r.x)?{needsFlipping:!0}:null}function eE(e){let i,{projectionContext:r,pitchedLabelPlaneMatrixInverse:a,symbol:n,fontSize:o,flip:l,keepUpright:s,glyphOffsetArray:c,dynamicLayoutVertexArray:u,aspectRatio:h,rotateToLine:p}=e,d=o/24,f=n.lineOffsetX*d,m=n.lineOffsetY*d;if(n.numGlyphs>1){let e=n.glyphStartIndex+n.numGlyphs,t=n.lineStartIndex,o=n.lineStartIndex+n.lineLength,u=eT(d,c,f,m,l,n,p,r);if(!u)return{notEnoughRoom:!0};let g=eA(u.first.point.x,u.first.point.y,r,a),y=eA(u.last.point.x,u.last.point.y,r,a);if(s&&!l){let e=ek(n.writingMode,g,y,h);if(e)return e}i=[u.first];for(let a=n.glyphStartIndex+1;a<e-1;a++){let e=eL(d*c.getoffsetX(a),f,m,l,n.segment,t,o,r,p);if(!e)return{notEnoughRoom:!0};i.push(e)}i.push(u.last)}else{if(s&&!l){let e=eI(r.tileAnchorPoint.x,r.tileAnchorPoint.y,r).point,i=n.lineStartIndex+n.segment+1,o=new t.P(r.lineVertexArray.getx(i),r.lineVertexArray.gety(i)),l=eI(o.x,o.y,r),s=l.signedDistanceFromCamera>0?l.point:eM(r.tileAnchorPoint,o,e,1,r),c=eA(e.x,e.y,r,a),u=eA(s.x,s.y,r,a),p=ek(n.writingMode,c,u,h);if(p)return p}let e=eL(d*c.getoffsetX(n.glyphStartIndex),f,m,l,n.segment,n.lineStartIndex,n.lineStartIndex+n.lineLength,r,p);if(!e||r.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};i=[e]}for(let e of i)t.au(u,e.point,e.angle);return{}}function eM(e,t,i,r,a){let n=e.add(e.sub(t)._unit()),o=eI(n.x,n.y,a).point,l=i.sub(o);return i.add(l._mult(r/l.mag()))}function eP(e,i,r){let a=i.projectionCache;if(a.projections[e])return a.projections[e];let n=new t.P(i.lineVertexArray.getx(e),i.lineVertexArray.gety(e)),o=eI(n.x,n.y,i);if(o.signedDistanceFromCamera>0)return a.projections[e]=o.point,a.anyProjectionOccluded=a.anyProjectionOccluded||o.isOccluded,o.point;let l=e-r.direction;return eM(0===r.distanceFromAnchor?i.tileAnchorPoint:new t.P(i.lineVertexArray.getx(l),i.lineVertexArray.gety(l)),n,r.previousVertex,r.absOffsetX-r.distanceFromAnchor+1,i)}function eI(e,t,i){let r,a=e+i.translation[0],n=t+i.translation[1];
2return i.pitchWithMap?(r=eS(a,n,i.pitchedLabelPlaneMatrix,i.getElevation)).isOccluded=!1:((r=i.transform.projectTileCoordinates(a,n,i.unwrappedTileID,i.getElevation)).point.x=(.5*r.point.x+.5)*i.width,r.point.y=(-(.5*r.point.y)+.5)*i.height),r}function eA(e,i,r,a){if(r.pitchWithMap){let n=[e,i,0,1];return t.av(n,n,a),r.transform.projectTileCoordinates(n[0]/n[3],n[1]/n[3],r.unwrappedTileID,r.getElevation).point}return{x:e/r.width*2-1,y:1-i/r.height*2}}function eC(e,t,i){return i.transform.projectTileCoordinates(e,t,i.unwrappedTileID,i.getElevation)}function eR(e,t,i){return e._unit()._perp()._mult(t*i)}function eL(e,i,r,a,n,o,l,s,c){let u,h=a?e-i:e+i,p=h>0?1:-1,d=0;a&&(p*=-1,d=Math.PI),p<0&&(d+=Math.PI);let f,m=p>0?o+n:o+n+1;s.projectionCache.cachedAnchorPoint?f=s.projectionCache.cachedAnchorPoint:(f=eI(s.tileAnchorPoint.x,s.tileAnchorPoint.y,s).point,s.projectionCache.cachedAnchorPoint=f);let g,y,_=f,b=f,x=0,v=0,w=Math.abs(h),z=[];for(;x+v<=w;){if((m+=p)<o||m>=l)return null;x+=v,b=_,y=g;let e={absOffsetX:w,direction:p,distanceFromAnchor:x,previousVertex:b};if(_=eP(m,s,e),0===r)z.push(b),u=_.sub(b);else{let i,a=_.sub(b);i=0===a.mag()?eR(eP(m+p,s,e).sub(_),r,p):eR(a,r,p),y||(y=b.add(i)),g=function(e,i,r,a,n,o,l,s,c){if(s.projectionCache.offsets[e])return s.projectionCache.offsets[e];let u=r.add(i);if(e+c.direction<a||e+c.direction>=n)return s.projectionCache.offsets[e]=u,u;let h=eP(e+c.direction,s,c),p=eR(h.sub(r),l,c.direction),d=r.add(p),f=h.add(p);return s.projectionCache.offsets[e]=t.aw(o,u,d,f)||u,s.projectionCache.offsets[e]}(m,i,_,o,l,y,r,s,e),z.push(y),u=g.sub(y)}v=u.mag()}let S=u._mult((w-x)/v)._add(y||b),T=d+Math.atan2(_.y-b.y,_.x-b.x);return z.push(S),{point:S,angle:c?T:0,path:z}}let eD=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function eO(e,t){for(let i=0;i<e;i++){let e=t.length;t.resize(e+4),t.float32.set(eD,3*e)}}function eF(e,t,i){let r=t[0],a=t[1];return e[0]=i[0]*r+i[4]*a+i[12],e[1]=i[1]*r+i[5]*a+i[13],e[3]=i[3]*r+i[7]*a+i[15],e}class ej{constructor(e,t=new ev(e.width+200,e.height+200,25),i=new ev(e.width+200,e.height+200,25)){this.transform=e,this.grid=t,this.ignoredGrid=i,this.pitchFactor=Math.cos(e.pitch*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+100,this.screenBottomBoundary=e.height+100,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,t,i,r,a,n,o,l,s,c,u,h){let p,d=this.projectAndGetPerspectiveRatio(e.anchorPointX+l[0],e.anchorPointY+l[1],a,c,h),f=i*d.perspectiveRatio;if(n||o)p=this._projectCollisionBox(e,f,r,a,n,o,l,d,c,u,h);else{let t=d.x+(u?u.x*f:0),i=d.y+(u?u.y*f:0);p={allPointsOccluded:!1,box:[t+e.x1*f,i+e.y1*f,t+e.x2*f,i+e.y2*f]}}let[m,g,y,_]=p.box,b=n?p.allPointsOccluded:d.isOccluded,x=b;return x||(x=d.perspectiveRatio<this.perspectiveRatioCutoff),x||(x=!this.isInsideGrid(m,g,y,_)),x||"always"!==t&&this.grid.hitTest(m,g,y,_,t,s)?{box:[m,g,y,_],placeable:!1,offscreen:!1,occluded:b}:{box:[m,g,y,_],placeable:!0,offscreen:this.isOffscreen(m,g,y,_),occluded:b}}placeCollisionCircles(e,i,r,a,n,o,l,s,c,u,h,p,d,f){let m=[],g=new t.P(i.anchorX,i.anchorY),y=this.getPerspectiveRatio(g.x,g.y,o,f),_=(c?n*this.transform.getPitchedTextCorrection(i.anchorX,i.anchorY,o)/y:n*y)/t.aA,b={getElevation:f,pitchedLabelPlaneMatrix:l,lineVertexArray:r,pitchWithMap:c,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:g,unwrappedTileID:o,width:this.transform.width,height:this.transform.height,translation:d},x=eT(_,a,i.lineOffsetX*_,i.lineOffsetY*_,!1,i,!1,b),v=!1,w=!1,z=!0;if(x){let i=.5*h*y+p,r=new t.P(-100,-100),a=new t.P(this.screenRightBoundary,this.screenBottomBoundary),n=new eb,o=x.first,l=x.last,d=[];for(let e=o.path.length-1;e>=1;e--)d.push(o.path[e]);for(let e=1;e<l.path.length;e++)d.push(l.path[e]);let f=2.5*i;if(c){let e=this.projectPathToScreenSpace(d,b);d=e.some(e=>e.signedDistanceFromCamera<=0)?[]:e.map(e=>e.point)}let g=[];if(d.length>0){let e=d[0].clone(),i=d[0].clone();for(let t=1;t<d.length;t++)e.x=Math.min(e.x,d[t].x),e.y=Math.min(e.y,d[t].y),i.x=Math.max(i.x,d[t].x),i.y=Math.max(i.y,d[t].y);g=e.x>=r.x&&i.x<=a.x&&e.y>=r.y&&i.y<=a.y?[d]:i.x<r.x||e.x>a.x||i.y<r.y||e.y>a.y?[]:t.ax([d],r.x,r.y,a.x,a.y)}for(let t of g){n.reset(t,.25*i);let r=0;r=n.length<=.5*i?1:Math.ceil(n.paddedLength/f)+1;for(let t=0;t<r;t++){let a=t/Math.max(r-1,1),o=n.lerp(a),l=o.x+100,c=o.y+100;m.push(l,c,i,0);let h=l-i,p=c-i,d=l+i,f=c+i;if(z=z&&this.isOffscreen(h,p,d,f),w=w||this.isInsideGrid(h,p,d,f),"always"!==e&&this.grid.hitTestCircle(l,c,i,e,u)&&(v=!0,!s))return{circles:[],offscreen:!1,collisionDetected:v}}}}return{circles:!s&&v||!w||y<this.perspectiveRatioCutoff?[]:m,offscreen:z,collisionDetected:v}}projectPathToScreenSpace(e,i){return function(e){let t=0,i=0,r=0,a=0;for(let n=0;n<e.length;n++)e[n].isOccluded?(r=n+1,a=0):++a>i&&(i=a,t=r);return e.slice(t,t+i)}(function(e,i){let r=t.L();
2return t.ap(r,i.pitchedLabelPlaneMatrix),e.map(e=>{let t=eS(e.x,e.y,r,i.getElevation),a=i.transform.projectTileCoordinates(t.point.x,t.point.y,i.unwrappedTileID,i.getElevation);return a.point.x=(.5*a.point.x+.5)*i.width,a.point.y=(-(.5*a.point.y)+.5)*i.height,a})}(e,i))}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};let i=[],r=new t.a1;for(let a of e){let e=new t.P(a.x+100,a.y+100);r.extend(e),i.push(e)}let{minX:a,minY:n,maxX:o,maxY:l}=r,s=this.grid.query(a,n,o,l).concat(this.ignoredGrid.query(a,n,o,l)),c={},u={};for(let e of s){let r=e.key;if(void 0===c[r.bucketInstanceId]&&(c[r.bucketInstanceId]={}),c[r.bucketInstanceId][r.featureIndex])continue;let a=[new t.P(e.x1,e.y1),new t.P(e.x2,e.y1),new t.P(e.x2,e.y2),new t.P(e.x1,e.y2)];t.ay(i,a)&&(c[r.bucketInstanceId][r.featureIndex]=!0,void 0===u[r.bucketInstanceId]&&(u[r.bucketInstanceId]=[]),u[r.bucketInstanceId].push(r.featureIndex))}return u}insertCollisionBox(e,t,i,r,a,n){(i?this.ignoredGrid:this.grid).insert({bucketInstanceId:r,featureIndex:a,collisionGroupID:n,overlapMode:t},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,i,r,a,n){let o=i?this.ignoredGrid:this.grid,l={bucketInstanceId:r,featureIndex:a,collisionGroupID:n,overlapMode:t};for(let t=0;t<e.length;t+=4)o.insertCircle(l,e[t],e[t+1],e[t+2])}projectAndGetPerspectiveRatio(e,i,r,a,n){if(n){let r;a?(r=[e,i,a(e,i),1],t.av(r,r,n)):eF(r=[e,i,0,1],r,n);let o=r[3];return{x:(r[0]/o+1)/2*this.transform.width+100,y:(-r[1]/o+1)/2*this.transform.height+100,perspectiveRatio:.5+this.transform.cameraToCenterDistance/o*.5,isOccluded:!1,signedDistanceFromCamera:o}}{let t=this.transform.projectTileCoordinates(e,i,r,a);return{x:(t.point.x+1)/2*this.transform.width+100,y:(1-t.point.y)/2*this.transform.height+100,perspectiveRatio:.5+this.transform.cameraToCenterDistance/t.signedDistanceFromCamera*.5,isOccluded:t.isOccluded,signedDistanceFromCamera:t.signedDistanceFromCamera}}}getPerspectiveRatio(e,t,i,r){let a=this.transform.projectTileCoordinates(e,t,i,r);return .5+this.transform.cameraToCenterDistance/a.signedDistanceFromCamera*.5}isOffscreen(e,t,i,r){return i<100||e>=this.screenRightBoundary||r<100||t>this.screenBottomBoundary}isInsideGrid(e,t,i,r){return i>=0&&e<this.gridRightBoundary&&r>=0&&t<this.gridBottomBoundary}getViewportMatrix(){let e=t.af([]);return t.M(e,e,[-100,-100,0]),e}_projectCollisionBox(e,i,r,a,n,o,l,s,c,u,h){let p=1,d=0,f=0,m=1,g=e.anchorPointX+l[0],y=e.anchorPointY+l[1];if(o&&!n){let e=this.projectAndGetPerspectiveRatio(g+1,y,a,c,h),t=e.x-s.x,i=Math.atan((e.y-s.y)/t)+(t<0?Math.PI:0),r=Math.sin(i),n=Math.cos(i);p=n,d=r,f=-r,m=n}else if(!o&&n){let e=ez(this.transform);p=e.vecEast[0],d=e.vecEast[1],f=e.vecSouth[0],m=e.vecSouth[1]}let _=s.x,b=s.y,x=i;n&&(_=g,b=y,x=Math.pow(2,-(this.transform.zoom-r.overscaledZ))*this.transform.getPitchedTextCorrection(g,y,a),u||(x*=t.ag(.5+s.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),u&&(_+=p*u.x*x+f*u.y*x,b+=d*u.x*x+m*u.y*x);let v=e.x1*x,w=e.x2*x,z=(v+w)/2,S=e.y1*x,T=e.y2*x,k=(S+T)/2,E=[];for(let{offsetX:e,offsetY:i}of[{offsetX:v,offsetY:S},{offsetX:z,offsetY:S},{offsetX:w,offsetY:S},{offsetX:w,offsetY:k},{offsetX:w,offsetY:T},{offsetX:z,offsetY:T},{offsetX:v,offsetY:T},{offsetX:v,offsetY:k}])E.push(new t.P(_+p*e+f*i,b+d*e+m*i));let M=!1;if(n){let e=E.map(e=>this.projectAndGetPerspectiveRatio(e.x,e.y,a,c,h));M=e.some(e=>!e.isOccluded),E=e.map(e=>new t.P(e.x,e.y))}else M=!0;return{box:t.az(E),allPointsOccluded:!M}}}class eB{constructor(e,t,i,r){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):r&&i?1:0,this.placed=i}isHidden(){return 0===this.opacity&&!this.placed}}class eN{constructor(e,t,i,r,a){this.text=new eB(e?e.text:null,t,i,a),this.icon=new eB(e?e.icon:null,t,r,a)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class eU{constructor(e,t,i){this.text=e,this.icon=t,this.skipFade=i}}class eV{constructor(e,t,i,r,a){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=i,this.bucketIndex=r,this.tileID=a}}class e${constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:e=>e.collisionGroupID===t}}return this.collisionGroups[e]}}function eZ(e,i,r,a,n){let{horizontalAlign:o,verticalAlign:l}=t.aG(e);return new t.P(-(o-.5)*i+a[0]*n,-(l-.5)*r+a[1]*n)}class eG{constructor(e,t,i,r,a){this.transform=e.clone(),this.terrain=t,this.collisionIndex=new ej(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=i,this.retainedQueryData={},this.collisionGroups=new e$(r),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=a,a&&(a.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let t=this.terrain;return t?(i,r)=>t.getElevation(e,i,r):null}getBucketParts(e,i,r,a){let n=r.getBucket(i),o=r.latestFeatureIndex;if(!n||!o||i.id!==n.layerIds[0])return;let l=r.collisionBoxArray,s=n.layers[0].layout,c=n.layers[0].paint,u=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ
2),h=r.tileSize/t.$,p=r.tileID.toUnwrapped(),d="map"===s.get("text-rotation-alignment"),f=t.aB(r,1,this.transform.zoom),m=t.aC(this.collisionIndex.transform,r,c.get("text-translate"),c.get("text-translate-anchor")),g=t.aC(this.collisionIndex.transform,r,c.get("icon-translate"),c.get("icon-translate-anchor")),y=ew(d,this.transform,f);this.retainedQueryData[n.bucketInstanceId]=new eV(n.bucketInstanceId,o,n.sourceLayerIndex,n.index,r.tileID);let _={bucket:n,layout:s,translationText:m,translationIcon:g,unwrappedTileID:p,pitchedLabelPlaneMatrix:y,scale:u,textPixelRatio:h,holdingForFade:r.holdingForFade(),collisionBoxArray:l,partiallyEvaluatedTextSize:t.am(n.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(n.sourceID)};if(a)for(let t of n.sortKeyRanges){let{sortKey:i,symbolInstanceStart:r,symbolInstanceEnd:a}=t;e.push({sortKey:i,symbolInstanceStart:r,symbolInstanceEnd:a,parameters:_})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:n.symbolInstances.length,parameters:_})}attemptAnchorPlacement(e,i,r,a,n,o,l,s,c,u,h,p,d,f,m,g,y,_,b,x){let v=t.aD[e.textAnchor],w=[e.textOffset0,e.textOffset1],z=eZ(v,r,a,w,n),S=this.collisionIndex.placeCollisionBox(i,p,s,c,u,l,o,g,h.predicate,b,z,x);if((!_||this.collisionIndex.placeCollisionBox(_,p,s,c,u,l,o,y,h.predicate,b,z,x).placeable)&&S.placeable){let e;if(this.prevPlacement&&this.prevPlacement.variableOffsets[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID].text&&(e=this.prevPlacement.variableOffsets[d.crossTileID].anchor),0===d.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[d.crossTileID]={textOffset:w,width:r,height:a,anchor:v,textBoxScale:n,prevAnchor:e},this.markUsedJustification(f,v,d,m),f.allowVerticalPlacement&&(this.markUsedOrientation(f,m,d),this.placedOrientations[d.crossTileID]=m),{shift:z,placedGlyphBoxes:S}}}placeLayerBucketPart(e,i,r){let{bucket:a,layout:n,translationText:o,translationIcon:l,unwrappedTileID:s,pitchedLabelPlaneMatrix:c,textPixelRatio:u,holdingForFade:h,collisionBoxArray:p,partiallyEvaluatedTextSize:d,collisionGroup:f}=e.parameters,m=n.get("text-optional"),g=n.get("icon-optional"),y=t.aE(n,"text-overlap","text-allow-overlap"),_="always"===y,b=t.aE(n,"icon-overlap","icon-allow-overlap"),x="always"===b,v="map"===n.get("text-rotation-alignment"),w="map"===n.get("text-pitch-alignment"),z="none"!==n.get("icon-text-fit"),S="viewport-y"===n.get("symbol-z-order"),T=_&&(x||!a.hasIconData()||g),k=x&&(_||!a.hasTextData()||m);!a.collisionArrays&&p&&a.deserializeCollisionBoxes(p);let E=this.retainedQueryData[a.bucketInstanceId].tileID,M=this._getTerrainElevationFunc(E),P=this.transform.getFastPathSimpleProjectionMatrix(E),I=(e,p,x)=>{var S,I;if(i[e.crossTileID])return;if(h)return void(this.placements[e.crossTileID]=new eU(!1,!1,!1));let A=!1,C=!1,R=!0,L=null,D={box:null,placeable:!1,offscreen:null,occluded:!1},O={placeable:!1},F=null,j=null,B=null,N=0,U=0,V=0;p.textFeatureIndex?N=p.textFeatureIndex:e.useRuntimeCollisionCircles&&(N=e.featureIndex),p.verticalTextFeatureIndex&&(U=p.verticalTextFeatureIndex);let $=p.textBox;if($){let i=i=>{let r=t.an.horizontal;if(a.allowVerticalPlacement&&!i&&this.prevPlacement){let t=this.prevPlacement.placedOrientations[e.crossTileID];t&&(this.placedOrientations[e.crossTileID]=t,r=t,this.markUsedOrientation(a,r,e))}return r},n=(i,r)=>{if(a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&p.verticalTextBox){for(let e of a.writingModes)if(e===t.an.vertical?O=D=r():D=i(),D&&D.placeable)break}else D=i()},c=e.textAnchorOffsetStartIndex,h=e.textAnchorOffsetEndIndex;if(h===c){let r=(t,i)=>{let r=this.collisionIndex.placeCollisionBox(t,y,u,E,s,w,v,o,f.predicate,M,void 0,P);return r&&r.placeable&&(this.markUsedOrientation(a,i,e),this.placedOrientations[e.crossTileID]=i),r};n(()=>r($,t.an.horizontal),()=>{let i=p.verticalTextBox;return a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&i?r(i,t.an.vertical):{box:null,offscreen:null}}),i(D&&D.placeable)}else{let d=t.aD[null==(I=null==(S=this.prevPlacement)?void 0:S.variableOffsets[e.crossTileID])?void 0:I.anchor],m=(t,i,n)=>{let p=t.x2-t.x1,m=t.y2-t.y1,g=e.textBoxScale,_=z&&"never"===b?i:null,x=null,S="never"===y?1:2,T="never";d&&S++;for(let i=0;i<S;i++){for(let i=c;i<h;i++){let r=a.textAnchorOffsets.get(i);if(d&&r.textAnchor!==d)continue;let c=this.attemptAnchorPlacement(r,t,p,m,g,v,w,u,E,s,f,T,e,a,n,o,l,_,M);if(c&&(x=c.placedGlyphBoxes)&&x.placeable)return A=!0,L=c.shift,x}d?d=null:T=y}return r&&!x&&(x={box:this.collisionIndex.placeCollisionBox($,"always",u,E,s,w,v,o,f.predicate,M,void 0,P).box,offscreen:!1,placeable:!1,occluded:!1}),x};n(()=>m($,p.iconBox,t.an.horizontal),()=>{let i=p.verticalTextBox;return a.allowVerticalPlacement&&(!D||!D.placeable)&&e.numVerticalGlyphVertices>0&&i?m(i,p.verticalIconBox,t.an.vertical):{box:null,occluded:!0,offscreen:null}}),D&&(A=D.placeable,R=D.offscreen);let g=i(D&&D.placeable);if(!A&&this.prevPlacement){let t=this.prevPlacement.variableOffsets[e.crossTileID];t&&(this.variableOffsets[e.crossTileID]=t,this.markUsedJustification(a,t.anchor,e,g))}}}if(A=(F=D)&&F.placeable,R=F&&F.offscreen,e.useRuntimeCollisionCircles){let i=a.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),l=t.ao(a.textSizeData,d,i),u=n.get("text-padding");(j=this.collisionIndex.placeCollisionCircles(y,i,a.lineVertexArray,a.glyphOffsetArray,l,s,c,r,w,f.predicate,e.collisionCircleDiameter,u,o,M)).circles.length&&j.collisionDetected&&!r&&t.w("Collisions detected, but collision boxes are not shown"),A=_||j.circles.length>0&&!j.collisionDetected,R=R&&j.offscreen}if(p.iconFeatureIndex&&(V=p.iconFeatureIndex),p.iconBox){let e=e=>this.collisionIndex.placeCollisionBox(e,b,u,E,s,w,v,l,f.predicate,M,z&&L?L:void 0,P);C=O&&O.placeable&&p.verticalIconBox?(B=e(p.verticalIconBox)).placeable:(B=e(p.iconBox)).placeable,R=R&&B.offscreen}let Z=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,G=g||0===e.numIconVertices;Z||G?G?Z||(C=C&&A):A=C&&A:C=A=C&&A;let q=C&&B.placeable;if(A&&F.placeable&&this.collisionIndex.insertCollisionBox(F.box,y,n.get("text-ignore-placement"),a.bucketInstanceId,O&&O.placeable&&U?U:N,f.ID),q&&this.collisionIndex.insertCollisionBox(B.box,b,n.get("icon-ignore-placement"),a.bucketInstanceId,V,f.ID),j&&A&&this.collisionIndex.insertCollisionCircles(j.circles,y,n.get("text-ignore-placement"),a.bucketInstanceId,N,f.ID),r&&this.storeCollisionData(a.bucketInstanceId,x,p,F,B,j),0===e.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");if(0===a.bucketInstanceId)throw Error("bucket.bucketInstanceId can't be 0");this.placements[e.crossTileID]=new eU((A||T)&&!(null==F?void 0:F.occluded),(C||k)&&!(null==B?void 0:B.occluded),R||a.justReloaded),i[e.crossTileID]=!0};if(S){if(0!==e.symbolInstanceStart)throw Error("bucket.bucketInstanceId should be 0");
2let t=a.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let e=t.length-1;e>=0;--e){let i=t[e];I(a.symbolInstances.get(i),a.collisionArrays[i],i)}}else for(let t=e.symbolInstanceStart;t<e.symbolInstanceEnd;t++)I(a.symbolInstances.get(t),a.collisionArrays[t],t);a.justReloaded=!1}storeCollisionData(e,t,i,r,a,n){if(i.textBox||i.iconBox){let n,o;this.collisionBoxArrays.has(e)?n=this.collisionBoxArrays.get(e):(n=new Map,this.collisionBoxArrays.set(e,n)),n.has(t)?o=n.get(t):(o={text:null,icon:null},n.set(t,o)),i.textBox&&(o.text=r.box),i.iconBox&&(o.icon=a.box)}if(n){let t=this.collisionCircleArrays[e];void 0===t&&(t=this.collisionCircleArrays[e]=[]);for(let e=0;e<n.circles.length;e+=4)t.push(n.circles[e+0]-100),t.push(n.circles[e+1]-100),t.push(n.circles[e+2]),t.push(+!!n.collisionDetected)}}markUsedJustification(e,i,r,a){let n;for(let o of(n=a===t.an.vertical?r.verticalPlacedTextSymbolIndex:({left:r.leftJustifiedTextSymbolIndex,center:r.centerJustifiedTextSymbolIndex,right:r.rightJustifiedTextSymbolIndex})[t.aF(i)],[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex,r.verticalPlacedTextSymbolIndex]))o>=0&&(e.text.placedSymbolArray.get(o).crossTileID=n>=0&&o!==n?0:r.crossTileID)}markUsedOrientation(e,i,r){let a=i===t.an.horizontal||i===t.an.horizontalOnly?i:0,n=i===t.an.vertical?i:0;for(let t of[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex])e.text.placedSymbolArray.get(t).placedOrientation=a;r.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=n)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let t=this.prevPlacement,i=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;let r=t?t.symbolFadeChange(e):1,a=t?t.opacities:{},n=t?t.variableOffsets:{},o=t?t.placedOrientations:{};for(let e in this.placements){let t=this.placements[e],n=a[e];n?(this.opacities[e]=new eN(n,r,t.text,t.icon),i=i||t.text!==n.text.placed||t.icon!==n.icon.placed):(this.opacities[e]=new eN(null,r,t.text,t.icon,t.skipFade),i=i||t.text||t.icon)}for(let e in a){let t=a[e];if(!this.opacities[e]){let a=new eN(t,r,!1,!1);a.isHidden()||(this.opacities[e]=a,i=i||t.text.placed||t.icon.placed)}}for(let e in n)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=n[e]);for(let e in o)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=o[e]);if(t&&void 0===t.lastPlacementChangeTime)throw Error("Last placement time for previous placement is not defined");i?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){let i={};for(let r of t){let t=r.getBucket(e);t&&r.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,r.tileID,i,r.collisionBoxArray)}}updateBucketOpacities(e,i,r,a){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let n=e.layers[0],o=n.layout,l=new eN(null,0,!1,!1,!0),s=o.get("text-allow-overlap"),c=o.get("icon-allow-overlap"),u=n._unevaluatedLayout.hasValue("text-variable-anchor")||n._unevaluatedLayout.hasValue("text-variable-anchor-offset"),h="map"===o.get("text-rotation-alignment"),p="map"===o.get("text-pitch-alignment"),d="none"!==o.get("icon-text-fit"),f=new eN(null,0,s&&(c||!e.hasIconData()||o.get("icon-optional")),c&&(s||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&a&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(a);let m=(e,t,i)=>{for(let r=0;r<t/4;r++)e.opacityVertexArray.emplaceBack(i);e.hasVisibleVertices=e.hasVisibleVertices||i!==eW},g=this.collisionBoxArrays.get(e.bucketInstanceId);for(let i=0;i<e.symbolInstances.length;i++){let a=e.symbolInstances.get(i),{numHorizontalGlyphVertices:n,numVerticalGlyphVertices:o,crossTileID:s}=a,c=this.opacities[s];r[s]?c=l:c||(c=f,this.opacities[s]=c),r[s]=!0;let y=a.numIconVertices>0,_=this.placedOrientations[a.crossTileID],b=_===t.an.vertical,x=_===t.an.horizontal||_===t.an.horizontalOnly;if(n>0||o>0){let t=eH(c.text);m(e.text,n,b?eW:t),m(e.text,o,x?eW:t);let i=c.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEac
2h(t=>{t>=0&&(e.text.placedSymbolArray.get(t).hidden=i||b?1:0)}),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=i||x?1:0);let r=this.variableOffsets[a.crossTileID];r&&this.markUsedJustification(e,r.anchor,a,_);let l=this.placedOrientations[a.crossTileID];l&&(this.markUsedJustification(e,"left",a,l),this.markUsedOrientation(e,l,a))}if(y){let t=eH(c.icon),i=!(d&&a.verticalPlacedIconSymbolIndex&&b);a.placedIconSymbolIndex>=0&&(m(e.icon,a.numIconVertices,i?t:eW),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=c.icon.isHidden()),a.verticalPlacedIconSymbolIndex>=0&&(m(e.icon,a.numVerticalIconVertices,i?eW:t),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=c.icon.isHidden())}let v=g&&g.has(i)?g.get(i):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let r=e.collisionArrays[i];if(r){let i=new t.P(0,0);if(r.textBox||r.verticalTextBox){let t=!0;if(u){let e=this.variableOffsets[s];e?(i=eZ(e.anchor,e.width,e.height,e.textOffset,e.textBoxScale),h&&i._rotate(p?-this.transform.bearingInRadians:this.transform.bearingInRadians)):t=!1}if(r.textBox||r.verticalTextBox){let a;r.textBox&&(a=b),r.verticalTextBox&&(a=x),eq(e.textCollisionBox.collisionVertexArray,c.text.placed,!t||a,v.text,i.x,i.y)}}if(r.iconBox||r.verticalIconBox){let t,a=!!(!x&&r.verticalIconBox);r.iconBox&&(t=a),r.verticalIconBox&&(t=!a),eq(e.iconCollisionBox.collisionVertexArray,c.icon.placed,t,v.icon,d?i.x:0,d?i.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,t){let i=this.zoomAtLastRecencyCheck===t?1-this.zoomAdjustment(t):1;return this.zoomAtLastRecencyCheck=t,this.commitTime+this.fadeDuration*i>e}setStale(){this.stale=!0}}function eq(e,t,i,r,a,n){r&&0!==r.length||(r=[0,0,0,0]);let o=r[0]-100,l=r[1]-100,s=r[2]-100,c=r[3]-100;e.emplaceBack(+!!t,+!!i,a||0,n||0,o,l),e.emplaceBack(+!!t,+!!i,a||0,n||0,s,l),e.emplaceBack(+!!t,+!!i,a||0,n||0,s,c),e.emplaceBack(+!!t,+!!i,a||0,n||0,o,c)}function eH(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 0xffffffff;let t=+!!e.placed,i=Math.floor(127*e.opacity);return 0x2000000*i+0x1000000*t+131072*i+65536*t+512*i+256*t+2*i+t}let eW=0;class eX{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,i,r,a){let n=this._bucketParts;for(;this._currentTileIndex<e.length;)if(t.getBucketParts(n,r,e[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,a())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,n.sort((e,t)=>
2e.sortKey-t.sortKey));this._currentPartIndex<n.length;)if(t.placeLayerBucketPart(n[this._currentPartIndex],this._seenCrossTileIDs,i),this._currentPartIndex++,a())return!0;return!1}}class eY{constructor(e,t,i,r,a,n,o,l){this.placement=new eG(e,t,n,o,l),this._currentPlacementIndex=i.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=a,this._done=!1}isDone(){return this._done}continuePlacement(e,t,i){let r=p.now(),a=()=>!this._forceFullPlacement&&p.now()-r>2;for(;this._currentPlacementIndex>=0;){let r=t[e[this._currentPlacementIndex]],n=this.placement.collisionIndex.transform.zoom;if("symbol"===r.type&&(!r.minzoom||r.minzoom<=n)&&(!r.maxzoom||r.maxzoom>n)){if(this._inProgressLayer||(this._inProgressLayer=new eX(r)),this._inProgressLayer.continuePlacement(i[r.source],this.placement,this._showCollisionBoxes,r,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}let eK=512/t.$/2;class eJ{constructor(e,i,r){this.tileID=e,this.bucketInstanceId=r,this._symbolsByKey={};let a=new Map;for(let e=0;e<i.length;e++){let t=i.get(e),r=t.key,n=a.get(r);n?n.push(t):a.set(r,[t])}for(let[e,i]of a){let r={positions:i.map(e=>({x:Math.floor(e.anchorX*eK),y:Math.floor(e.anchorY*eK)})),crossTileIDs:i.map(e=>e.crossTileID)};if(r.positions.length>128){let e=new t.aH(r.positions.length,16,Uint16Array);for(let{x:t,y:i}of r.positions)e.add(t,i);e.finish(),delete r.positions,r.index=e}this._symbolsByKey[e]=r}}getScaledCoordinates(e,i){let{x:r,y:a,z:n}=this.tileID.canonical,{x:o,y:l,z:s}=i.canonical,c=eK/Math.pow(2,s-n),u=(l*t.$+e.anchorY)*c,h=a*t.$*eK;return{x:Math.floor((o*t.$+e.anchorX)*c-r*t.$*eK),y:Math.floor(u-h)}}findMatches(e,t,i){let r=this.tileID.canonical.z<t.canonical.z?1:Math.pow(2,this.tileID.canonical.z-t.canonical.z);for(let a=0;a<e.length;a++){let n=e.get(a);if(n.crossTileID)continue;let o=this._symbolsByKey[n.key];if(!o)continue;let l=this.getScaledCoordinates(n,t);if(o.index)for(let e of o.index.range(l.x-r,l.y-r,l.x+r,l.y+r).sort()){let t=o.crossTileIDs[e];if(!i[t]){i[t]=!0,n.crossTileID=t;break}}else if(o.positions)for(let e=0;e<o.positions.length;e++){let t=o.positions[e],a=o.crossTileIDs[e];if(Math.abs(t.x-l.x)<=r&&Math.abs(t.y-l.y)<=r&&!i[a]){i[a]=!0,n.crossTileID=a;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:e})=>e)}}class eQ{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class e1{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let t=Math.round((e-this.lng)/360);if(0!==t)for(let e in this.indexes){let i=this.indexes[e],r={};for(let e in i){let a=i[e];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+t),r[a.tileID.key]=a}this.indexes[e]=r}this.lng=e}addBucket(e,t,i){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let e=0;e<t.symbolInstances.length;e++)t.symbolInstances.get(e).crossTileID=0;this.usedCrossTileIDs[e.overscaledZ]||(this.usedCrossTileIDs[e.overscaledZ]={});let r=this.usedCrossTileIDs[e.overscaledZ];for(let i in this.indexes){let a=this.indexes[i];if(Number(i)>e.overscaledZ)for(let i in a){let n=a[i];n.tileID.isChildOf(e)&&n.findMatches(t.symbolInstances,e,r)}else{let n=a[e.scaledTo(Number(i)).key];n&&n.findMatches(t.symbolInstances,e,r)}}for(let e=0;e<t.symbolInstances.length;e++){let a=t.symbolInstances.get(e);a.crossTileID||(a.crossTileID=i.generate(),r[a.crossTileID]=!0)}return void 0===this.indexes[e.overscaledZ]&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new eJ(e,t.symbolInstances,t.bucketInstanceId),!0}removeBucketCrossTileIDs(e,t){for(let i of t.getCrossTileIDsLists())for(let t of i)delete this.usedCrossTileIDs[e][t]}removeStaleBuckets(e){let t=!1;for(let i in this.indexes){let r=this.indexes[i];for(let a in r)e[r[a].bucketInstanceId]||(this.removeBucketCrossTileIDs(i,r[a]),delete r[a],t=!0)}return t}}class e0{constructor(){this.layerIndexes={},this.crossTileIDs=new eQ,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(e,t,i){let r=this.layerIndexes[e.id];void 0===r&&(r=this.layerIndexes[e.id]=new e1);let a=!1,n={};
2for(let o of(r.handleWrapJump(i),t)){let t=o.getBucket(e);t&&e.id===t.layerIds[0]&&(t.bucketInstanceId||(t.bucketInstanceId=++this.maxBucketInstanceId),r.addBucket(o.tileID,t,this.crossTileIDs)&&(a=!0),n[t.bucketInstanceId]=!0)}return r.removeStaleBuckets(n)&&(a=!0),a}pruneUnusedLayers(e){let t={};for(let i in e.forEach(e=>{t[e]=!0}),this.layerIndexes)t[i]||delete this.layerIndexes[i]}}var e2="void main() {fragColor=vec4(1.0);}";let e3={prelude:e5("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nout highp vec4 fragColor;","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 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\n);}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\n);}\n#ifdef TERRAIN3D\nuniform 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;\n#endif\nconst 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) {\n#ifdef TERRAIN3D\nhighp 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));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 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;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\n#ifdef GLOBE\nif ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}\n#endif\nvec2 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;\n#else\nreturn 0.0;\n#endif\n}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;"),projectionMercator:e5("","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:e5("","#define GLOBE_RADIUS 6371008.8\nuniform 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\n);}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); \nif (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\n);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:e5("uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:e5("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;
2uniform 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;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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:e5("in vec3 v_data;in float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 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;}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 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) {\n#ifdef GLOBE\nvec3 center_vector=projectToSphere(circle_center);\n#endif\nfloat 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 {\n#ifdef GLOBE\nvec4 projected_center=interpolateProjection(circle_center,center_vector,ele);\n#else\nvec4 projected_center=projectTileWithElevation(circle_center,ele);\n#endif\ncorner_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);}\n#ifdef GLOBE\nvec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);\n#else\ngl_Position=projectTileWithElevation(corner_position,ele);\n#endif\n} 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:e5(e2,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:e5("uniform highp float u_intensity;in vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 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);\n#ifdef GLOBE\nvec2 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);\n#else\ngl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));\n#endif\n}"),heatmapTexture:e5("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;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(0.0);\n#endif\n}","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:e5("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:e5("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:e5("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform 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\n{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));\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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:e5("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:e5(e2,"in vec2 a_pos;void main() {\n#ifdef GLOBE\ngl_Position=projectTileFor3D(a_pos,0.0);\n#else\ngl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);\n#endif\n}"),fill:e5("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\nfragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_fill_translate;in vec2 a_pos;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);}"),fillOutline:e5("in vec2 v_pos;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}"),fillOutlinePattern:e5("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;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 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;\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}"),fillPattern:e5("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=patte
2rn_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:e5("in vec4 v_color;void main() {fragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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;\n#ifdef TERRAIN3D\nin vec2 a_centroid;\n#endif\nout vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=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;\n#ifdef GLOBE\nvec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\n#else\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\n#endif\nfloat 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);\n#ifdef GLOBE\nmat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);\n#endif\ndirectional=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:e5("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;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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;\n#ifdef TERRAIN3D\nin vec2 a_centroid;\n#endif\n#ifdef GLOBE\nout vec3 v_sphere_pos;\n#endif\nout vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=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;\n#ifdef GLOBE\nvec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\n#else\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\n#endif\nvec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: 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:e5("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform 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/p
2ow(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);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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:e5("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];\n#define PI 3.141592653589793\n#define STANDARD 0\n#define COMBINED 1\n#define IGOR 2\n#define MULTIDIRECTIONAL 3\n#define BASIC 4\nfloat 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\n{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\n{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);}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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:e5("uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nin 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;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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);
2float 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;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat 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;\n#endif\nv_width2=vec2(outset,inset);}"),lineGradient:e5("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;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nin 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;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat 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;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:e5("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform 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;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 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;\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin 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;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat 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);
2float 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;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat 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;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:e5("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;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat 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);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin 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;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat 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;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat 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;\n#endif\nv_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:e5("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);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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;\n#ifdef GLOBE\nif (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}\n#endif\nv_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:e5("uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 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 ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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;\n#ifdef GLOBE\nif(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);}\n#endif\nvec4 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:e5("#define SDF_PX 8.0\nuniform 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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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 ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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;\n#ifdef GLOBE\nif(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);}\n#endif\nvec4 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:e5("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform 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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: i
2nitialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat 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;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\nreturn;}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);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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 ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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;\n#ifdef GLOBE\nif(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);}\n#endif\nvec4 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:e5("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);
2float 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:e5("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:e5("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:e5("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:e5("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\n);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:e5("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);}")};
2function e5(e,t){let i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r=t.match(/in ([\w]+) ([\w]+)/g),a=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),n=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=n?n.concat(a):a,l={};return{fragmentSource:e=e.replace(i,(e,t,i,r,a)=>(l[a]=!0,"define"===t?`
3#ifndef HAS_UNIFORM_u_${a}
4in ${i} ${r} ${a};
5#else
6uniform ${i} ${r} u_${a};
7#endif
8`:`
9#ifdef HAS_UNIFORM_u_${a}
10    ${i} ${r} ${a} = u_${a};
11#endif
12`)),vertexSource:t=t.replace(i,(e,t,i,r,a)=>{let n="float"===r?"vec2":"vec4",o=a.match(/color/)?"color":n;return l[a]?"define"===t?`
13#ifndef HAS_UNIFORM_u_${a}
14uniform lowp float u_${a}_t;
15in ${i} ${n} a_${a};
16out ${i} ${r} ${a};
17#else
18uniform ${i} ${r} u_${a};
19#endif
20`:"vec4"===o?`
21#ifndef HAS_UNIFORM_u_${a}
22    ${a} = a_${a};
23#else
24    ${i} ${r} ${a} = u_${a};
25#endif
26`:`
27#ifndef HAS_UNIFORM_u_${a}
28    ${a} = unpack_mix_${o}(a_${a}, u_${a}_t);
29#else
30    ${i} ${r} ${a} = u_${a};
31#endif
32`:"define"===t?`
33#ifndef HAS_UNIFORM_u_${a}
34uniform lowp float u_${a}_t;
35in ${i} ${n} a_${a};
36#else
37uniform ${i} ${r} u_${a};
38#endif
39`:"vec4"===o?`
40#ifndef HAS_UNIFORM_u_${a}
41    ${i} ${r} ${a} = a_${a};
42#else
43    ${i} ${r} ${a} = u_${a};
44#endif
45`:`
46#ifndef HAS_UNIFORM_u_${a}
47    ${i} ${r} ${a} = unpack_mix_${o}(a_${a}, u_${a}_t);
48#else
49    ${i} ${r} ${a} = u_${a};
50#endif
51`}),staticAttributes:r,staticUniforms:o}}class e6{constructor(e,t,i){this.vertexBuffer=e,this.indexBuffer=t,this.segments=i}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var e4=t.aI([{name:"a_pos",type:"Int16",components:2}]);let e8="#define PROJECTION_MERCATOR",e7="mercator";class e9{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return e7}get shaderDefine(){return e8}get shaderPreludeCode(){return e3.projectionMercator}get vertexShaderPreludeCode(){return e3.projectionMercator.vertexSource}get subdivisionGranularity(){return t.aJ.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,i,r,a,n){if(this._cachedMesh)return this._cachedMesh;let o=new t.aK;o.emplaceBack(0,0),o.emplaceBack(t.$,0),o.emplaceBack(0,t.$),o.emplaceBack(t.$,t.$);let l=e.createVertexBuffer(o,e4.members),s=t.aL.simpleSegment(0,0,4,2),c=new t.aM;c.emplaceBack(1,0,2),c.emplaceBack(1,2,3);let u=e.createIndexBuffer(c);return this._cachedMesh=new e6(l,u,s),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(e){}}class te{constructor(e=0,t=0,i=0,r=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(i)||i<0||isNaN(r)||r<0)throw Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=i,this.right=r}interpolate(e,i,r){return null!=i.top&&null!=e.top&&(this.top=t.C.number(e.top,i.top,r)),null!=i.bottom&&null!=e.bottom&&(this.bottom=t.C.number(e.bottom,i.bottom,r)),null!=i.left&&null!=e.left&&(this.left=t.C.number(e.left,i.left,r)),null!=i.right&&null!=e.right&&(this.right=t.C.number(e.right,i.right,r)),this}getCenter(e,i){let r=t.ag((this.left+e-this.right)/2,0,e),a=t.ag((this.top+i-this.bottom)/2,0,i);return new t.P(r,a)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new te(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function tt(e,t){if(!e.renderWorldCopies||e.lngRange)return;let i=t.lng-e.center.lng;t.lng+=i>180?-360:360*(i<-180)}function ti(e){return Math.max(0,Math.floor(e))}class tr{constructor(e,i,r,a,n,o){this._callbacks=e,this._tileSize=512,this._renderWorldCopies=void 0===o||!!o,this._minZoom=i||0,this._maxZoom=r||22,this._minPitch=null==a?0:a,this._maxPitch=null==n?60:n,this.setMaxBounds(),this._width=0,this._height=0,this._center=new t.S(0,0),this._elevation=0,this._zoom=0,this._tileZoom=ti(this._zoom),this._scale=t.ae(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new te,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,i,r){this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=ti(this._zoom),this._scale=t.ae(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new te(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!r&&e.autoCalculateNearFarZ,i&&this._constrain(),this._calcMatrices()}
51get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){var i,r,a,n,o,l,s,c,u;let p=t.aN(e,-180,180)*Math.PI/180;this._bearingInRadians!==p&&(this._unmodified=!1,this._bearingInRadians=p,this._calcMatrices(),this._rotationMatrix=h(),i=this._rotationMatrix,a=-this._bearingInRadians,n=(r=this._rotationMatrix)[0],o=r[1],l=r[2],s=r[3],c=Math.sin(a),u=Math.cos(a),i[0]=n*u+l*c,i[1]=o*u+s*c,i[2]=-(n*c)+l*u,i[3]=-(o*c)+s*u)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let i=t.ag(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==i&&(this._unmodified=!1,this._pitchInRadians=i,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){let t=e/180*Math.PI;this._rollInRadians!==t&&(this._unmodified=!1,this._rollInRadians=t,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return t.aO(this._fovInRadians)}setFov(e){e=t.ag(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=t.ad(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){let i=this.getConstrained(this._center,e).zoom;this._zoom!==i&&(this._unmodified=!1,this._zoom=i,this._tileZoom=Math.max(0,Math.floor(i)),this._scale=t.ae(i),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,t){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=t,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,i){this._unmodified=!1,this._edgeInsets.interpolate(e,t,i),this._constrain(),this._calcMatrices()}resize(e,t,i=!0){this._width=e,this._height=t,i&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&2===this._latRange.length&&this._lngRange&&2===this._lngRange.length?new U([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-t.ah,t.ah])}getConstrained(e,t){return this._callbacks.getConstrained(e,t)}getCameraQueryGeometry(e,i){if(1===i.length)return[i[0],e];{let{minX:r,minY:a,maxX:n,maxY:o}=t.a1.fromPoints(i).extend(e);return[new t.P(r,a),new t.P(n,a),new t.P(n,o),new t.P(r,o),new t.P(r,a)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:t,zoom:i}=this.getConstrained(this.center,this.zoom);this.setCenter(t),this.setZoom(i),this._unmodified=e,this._constraining=!1}
51_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=t.af(new Float64Array(16));t.N(e,e,[this._width/2,-this._height/2,1]),t.M(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=t.af(new Float64Array(16)),t.N(e,e,[1,-1,1]),t.M(e,e,[-1,-1,0]),t.N(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,i,r,a){let n,o=void 0!==r?r:this.bearing,l=a=void 0!==a?a:this.pitch,s=t.a0.fromLngLat(e,i),c=-Math.cos(t.ad(l)),u=Math.sin(t.ad(l)),h=u*Math.sin(t.ad(o)),p=-u*Math.cos(t.ad(o)),d=this.elevation,f=i-d;c*f>=0||.1>Math.abs(c)?d=i+(n=1e4)*c:n=-f/c;let m,g,y=t.aP(1,s.y),_=0;do{if((_+=1)>10)break;g=n/y,y=1/(m=new t.a0(s.x+h*g,s.y+p*g)).meterInMercatorCoordinateUnits()}while(Math.abs(n-g*y)>1e-12);return{center:m.toLngLat(),elevation:d,zoom:t.aj(this.height/2/Math.tan(this.fovInRadians/2)/g/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;let i=t.ai(1,this.center.lat)*this.worldSize,r=this.cameraToCenterDistance/i,a=t.a0.fromLngLat(this.center,this.elevation),n=ec(this.center,this.elevation,this.pitch,this.bearing,r);this._elevation=e;let o=this.calculateCenterFromCameraLngLatAlt(n.toLngLat(),t.aP(n.z,a.y),this.bearing,this.pitch);this._elevation=o.elevation,this._center=o.center,this.setZoom(o.zoom)}getCameraPoint(){let e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let e=t.ai(1,this.center.lat)*this.worldSize;return ec(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];let i=e.canonical.z>=0?1<<e.canonical.z:Math.pow(2,e.canonical.z);return[e.canonical.x/i,e.canonical.y/i,1/i/t.$,1/i/t.$]}}class ta{constructor(e,i){this.min=e,this.max=i,this.center=t.aQ([],t.aR([],this.min,this.max),.5)}quadrant(e){let i=[e%2==0,e<2],r=t.aS(this.min),a=t.aS(this.max);for(let e=0;e<i.length;e++)r[e]=i[e]?this.min[e]:this.center[e],a[e]=i[e]?this.center[e]:this.max[e];return a[2]=this.max[2],new ta(r,a)}distanceX(e){return Math.max(Math.min(this.max[0],e[0]),this.min[0])-e[0]}distanceY(e){return Math.max(Math.min(this.max[1],e[1]),this.min[1])-e[1]}intersectsFrustum(e){let t=!0;for(let i=0;i<e.planes.length;i++){let r=this.intersectsPlane(e.planes[i]);if(0===r)return 0;1===r&&(t=!1)}return t?2:e.aabb.min[0]>this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]<this.min[0]||e.aabb.max[1]<this.min[1]||e.aabb.max[2]<this.min[2]?0:1}intersectsPlane(e){let t=e[3],i=e[3];for(let r=0;r<3;r++)e[r]>0?(t+=e[r]*this.min[r],i+=e[r]*this.max[r]):(i+=e[r]*this.min[r],t+=e[r]*this.max[r]);return t>=0?2:i<0?0:1}}class tn{distanceToTile2d(e,t,i,r){return Math.hypot(r.distanceX([e,t]),r.distanceY([e,t]))}getWrap(e,t,i){return i}getTileBoundingVolume(e,i,r,a){var n,o;let l=r,s=r;if(null==a?void 0:a.terrain){let c=new t.Z(e.z,i,e.z,e.x,e.y),u=a.terrain.getMinMaxElevation(c);l=null!=(n=u.minElevation)?n:r,s=null!=(o=u.maxElevation)?o:r}let c=1<<e.z;return new ta([i+e.x/c,e.y/c,l],[i+(e.x+1)/c,(e.y+1)/c,s])}allowVariableZoom(e,i){let r=e.fov*(Math.abs(Math.cos(e.rollInRadians))*e.height+Math.abs(Math.sin(e.rollInRadians))*e.width)/e.height,a=t.ag(78.5-r/2,0,60);return!!i.terrain||e.pitch>a}allowWorldCopies(){return!0}prepareNextFrame(){}}class to{constructor(e,t,i){this.points=e,this.planes=t,this.aabb=i}static fromInvProjectionMatrix(e,i=1,r=0,a,n){let o=n?[[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]],l=Math.pow(2,r),s=[[-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(r=>(function(e,i,r,a){let n=t.av([],e,i),o=1/n[3]/r*a;return t.aX(n,n,[o,o,1/n[3],o])})(r,e,i,l));a&&function(e,i,r,a){let n=4*!!a,o=4*!a,l=0,s=[],c=[];for(let i=0;i<4;i++){let r=t.aT([],e[i+o],e[i+n]),a=t.aY(r);t.aQ(r,r,1/a),s.push(a),c.push(r)}for(let i=0;i<4;
51i++){let a=t.aZ(e[i+n],c[i],r);l=null!==a&&a>=0?Math.max(l,a):Math.max(l,s[i])}let u=function(e,i){let r=t.aT([],e[i[0]],e[i[1]]),a=t.aT([],e[i[2]],e[i[1]]),n=[0,0,0,0];return t.aU(n,t.aV([],r,a)),n[3]=-t.aW(n,e[i[0]]),n}(e,i),h=function(e,i){let r=t.a_(e),a=t.a$([],e,1/r),n=t.aT([],i,t.aQ([],a,t.aW(i,a))),o=t.a_(n);if(o>0){let e=Math.sqrt(1-a[3]*a[3]),r=t.aQ([],a,-a[3]),l=t.aR([],r,t.aQ([],n,e/o));return t.b0(i,l)}return null}(r,u);null!==h&&(l=Math.min(l,h/t.aW(c[0],u)));for(let t=0;t<4;t++){let i=Math.min(l,s[t]);e[t+o]=[e[t+n][0]+c[t][0]*i,e[t+n][1]+c[t][1]*i,e[t+n][2]+c[t][2]*i,1]}}(s,o[0],a,n);let c=o.map(e=>{let i=t.aT([],s[e[0]],s[e[1]]),r=t.aT([],s[e[2]],s[e[1]]),a=t.aU([],t.aV([],i,r)),n=-t.aW(a,s[e[1]]);return a.concat(n)}),u=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let e of s)for(let t=0;t<3;t++)u[t]=Math.min(u[t],e[t]),h[t]=Math.max(h[t],e[t]);return new to(s,c,new ta(u,h))}}class tl{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,i){return this._helper.interpolatePadding(e,t,i)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,i=!0){this._helper.resize(e,t,i)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,t){}constructor(e,t,i,r,a){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new tr({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,t)=>this.getConstrained(e,t)},e,t,i,r,a),this._coveringTilesDetailsProvider=new tn}clone(){let e=new tl;return e.apply(this),e}apply(e,t,i){this._helper.apply(e,t,i)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(e){let i=[new t.b1(0,e)];if(this._helper._renderWorldCopies){let r=this.screenPointToMercatorCoordinate(new t.P(0,0)),a=this.screenPointToMercatorCoordinate(new t.P(this._helper._width,0)),n=this.screenPointToMercatorCoordinate(new t.P(this._helper._width,this._helper._height)),o=this.screenPointToMercatorCoordinate(new t.P(0,this._helper._height)),l=Math.floor(Math.min(r.x,a.x,n.x,o.x)),s=Math.floor(Math.max(r.x,a.x,n.x,o.x));for(let r=l-1;r<=s+1;r++)0!==r&&i.push(new t.b1(r,e))}return i}getCameraFrustum(){return to.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){let t=this.screenPointToLocation(this.centerPoint,e),i=e?e.getElevationForLngLatZoom(t,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(i)}setLocationAtPoint(e,i){let r=t.ai(this.elevation,this.center.lat),a=this.screenPointToMercatorCoordinateAtZ(i,r),n=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,r),o=t.a0.fromLngLat(e),l=new t.a0(o.x-(a.x-n.x),o.y-(a.y-n.y)
51);this.setCenter(null==l?void 0:l.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,i){return i?this.coordinatePoint(t.a0.fromLngLat(e),i.getElevationForLngLatZoom(e,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(t.a0.fromLngLat(e))}screenPointToLocation(e,t){var i;return null==(i=this.screenPointToMercatorCoordinate(e,t))?void 0:i.toLngLat()}screenPointToMercatorCoordinate(e,t){if(t){let i=t.pointCoordinate(e);if(null!=i)return i}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,i){let r=i||0,a=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.av(a,a,this._pixelMatrixInverse),t.av(n,n,this._pixelMatrixInverse);let o=a[3],l=n[3],s=a[1]/o,c=n[1]/l,u=a[2]/o,h=n[2]/l,p=u===h?0:(r-u)/(h-u);return new t.a0(t.C.number(a[0]/o,n[0]/l,p)/this.worldSize,t.C.number(s,c,p)/this.worldSize,r)}coordinatePoint(e,i=0,r=this._pixelMatrix){let a=[e.x*this.worldSize,e.y*this.worldSize,i,1];return t.av(a,a,r),new t.P(a[0]/a[3],a[1]/a[3])}getBounds(){let e=Math.max(0,this._helper._height/2-el(this));return(new U).extend(this.screenPointToLocation(new t.P(0,e))).extend(this.screenPointToLocation(new t.P(this._helper._width,e))).extend(this.screenPointToLocation(new t.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new t.P(0,this._helper._height)))}isPointOnMapSurface(e,t){return t?null!=t.pointCoordinate(e):e.y>this.height/2-el(this)}calculatePosMatrix(e,i=!1,r){var a;let n=null!=(a=e.key)?a:t.b2(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),o=i?this._alignedPosMatrixCache:this._posMatrixCache;if(o.has(n)){let e=o.get(n);return r?e.f32:e.f64}let l=es(e,this.worldSize);t.O(l,i?this._alignedProjMatrix:this._viewProjMatrix,l);let s={f64:l,f32:new Float32Array(l)};return o.set(n,s),r?s.f32:s.f64}calculateFogMatrix(e){let i=e.key,r=this._fogMatrixCacheF32;if(r.has(i))return r.get(i);let a=es(e,this.worldSize);return t.O(a,this._fogMatrix,a),r.set(i,new Float32Array(a)),r.get(i)}getConstrained(e,i){let r,a;i=t.ag(+i,this.minZoom,this.maxZoom);let n={center:new t.S(e.lng,e.lat),zoom:i},o=this._helper._lngRange;this._helper._renderWorldCopies||null!==o||(o=[-(180-1e-10),180-1e-10]);let l=this.tileSize*t.ae(n.zoom),s=0,c=l,u=0,h=l,p=0,d=0,{x:f,y:m}=this.size;if(this._helper._latRange){let e=this._helper._latRange;s=t.U(e[1])*l,(c=t.U(e[0])*l)-s<m&&(p=m/(c-s))}o&&(u=t.aN(t.V(o[0])*l,0,l),(h=t.aN(t.V(o[1])*l,0,l))<u&&(h+=l),h-u<f&&(d=f/(h-u)));let{x:g,y:y}=en(l,e),_=Math.max(d||0,p||0);if(_)return n.center=eo(l,new t.P(d?(h+u)/2:g,p?(c+s)/2:y)).wrap(),n.zoom+=t.aj(_),n;if(this._helper._latRange){let e=m/2;y-e<s&&(a=s+e),y+e>c&&(a=c-e)}if(o){let e=(u+h)/2,i=g;
51this._helper._renderWorldCopies&&(i=t.aN(g,e-l/2,e+l/2));let a=f/2;i-a<u&&(r=u+a),i+a>h&&(r=h-a)}return(void 0!==r||void 0!==a)&&(n.center=eo(l,new t.P(null!=r?r:g,null!=a?a:y)).wrap()),n}calculateCenterFromCameraLngLatAlt(e,t,i,r){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,i,r)}_calculateNearFarZIfNeeded(e,i,r){if(!this._helper.autoCalculateNearFarZ)return;let a=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),n=e-a*this._helper._pixelPerMeter/Math.cos(i),o=a<0?n:e,l=Math.PI/2+this.pitchInRadians,s=t.ad(this.fov)*(Math.abs(Math.cos(t.ad(this.roll)))*this.height+Math.abs(Math.sin(t.ad(this.roll)))*this.width)/this.height*(.5+r.y/this.height),c=Math.sin(s)*o/Math.sin(t.ag(Math.PI-l-s,.01,Math.PI-.01)),u=el(this),h=Math.atan(u/this._helper.cameraToCenterDistance),p=t.ad(.75),d=h>p?2*h*(.5+r.y/(2*u)):p,f=Math.min(c,Math.sin(d)*o/Math.sin(t.ag(Math.PI-l-d,.01,Math.PI-.01)));this._helper._farZ=1.01*(Math.cos(Math.PI/2-i)*f+o),this._helper._nearZ=this._helper._height/50}_calcMatrices(){let e;if(!this._helper._height)return;let i=this.centerOffset,r=en(this.worldSize,this.center),a=r.x,n=r.y;this._helper._pixelPerMeter=t.ai(1,this.center.lat)*this.worldSize;let o=t.ad(Math.min(this.pitch,89.25)),l=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(o));this._calculateNearFarZIfNeeded(l,o,i),e=new Float64Array(16),t.b3(e,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),t.ap(this._invProjMatrix,e),e[8]=-(2*i.x)/this._helper._width,e[9]=2*i.y/this._helper._height,this._projectionMatrix=t.b4(e),t.N(e,e,[1,-1,1]),t.M(e,e,[0,0,-this._helper.cameraToCenterDistance]),t.b5(e,e,-this.rollInRadians),t.b6(e,e,this.pitchInRadians),t.b5(e,e,-this.bearingInRadians),t.M(e,e,[-a,-n,0]),this._mercatorMatrix=t.N([],e,[this.worldSize,this.worldSize,this.worldSize]),t.N(e,e,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=t.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,e),t.M(e,e,[0,0,-this.elevation]),this._viewProjMatrix=e,this._invViewProjMatrix=t.ap([],e);let s=[0,0,-1,1];t.av(s,s,this._invViewProjMatrix),this._cameraPosition=[s[0]/s[3],s[1]/s[3],s[2]/s[3]],this._fogMatrix=new Float64Array(16),t.b3(this._fogMatrix,this.fovInRadians,this.width/this.height,l,this._helper._farZ),this._fogMatrix[8]=-(2*i.x)/this.width,this._fogMatrix[9]=2*i.y/this.height,t.N(this._fogMatrix,this._fogMatrix,[1,-1,1]),t.M(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),t.b5(this._fogMatrix,this._fogMatrix,-this.rollInRadians),t.b6(this._fogMatrix,this._fogMatrix,this.pitchInRadians),t.b5(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),t.M(this._fogMatrix,this._fogMatrix,[-a,-n,0]),t.N(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),t.M(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=t.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,e);let c=this._helper._width%2/2,u=this._helper._height%2/2,h=Math.cos(this.bearingInRadians),p=Math.sin(-this.bearingInRadians),d=a-Math.round(a)+h*c+p*u,f=n-Math.round(n)+h*u+p*c,m=new Float64Array(e);if(t.M(m,m,[d>.5?d-1:d,f>.5?f-1:f,0]),this._alignedProjMatrix=m,!(e=t.ap(new Float64Array(16),this._pixelMatrix)))throw Error("failed to invert matrix");this._pixelMatrixInverse=e,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let e=this.screenPointToMercatorCoordinate(new t.P(0,0)),i=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.av(i,i,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let e=t.ai(1,this.center.lat)*this.worldSize;return ec(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,i){let r=t.a0.fromLngLat(e),a=[r.x*this.worldSize,r.y*this.worldSize,i,1];return t.av(a,a,this._viewProjMatrix),a[2]/a[3]}getProjectionData(e){let i,{overscaledTileID:r,aligned:a,applyTerrainMatrix:n}=e,o=this._helper.getMercatorTileCoordinates(r),l=r?this.calculatePosMatrix(r,a,!0):null;return{mainMatrix:i=r&&r.terrainRttPosMatrix32f&&n?r.terrainRttPosMatrix32f:l||t.b7(),tileMercatorCoords:o,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:i}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,t,i){return 1}transformLightDirection(e){return t.aS(e)}getRayDirectionFromPixel(e){throw Error("Not implemented.")}projectTileCoordinates(e,i,r,a){let n,o=this.calculatePosMatrix(r);a?(n=[e,i,a(e,i),1],t.av(n,n,o)):eF(n=[e,i,0,1],n,o);let l=n[3];return{point:new t.P(n[0]/l,n[1]/l),signedDistanceFromCamera:l,isOccluded:!1}}populateCache(e){for(let t of e)this.calculatePosMatrix(t)}getMatrixForModel(e,i){let r=t.a0.fromLngLat(e,i),a=r.meterInMercatorCoordinateUnits(),n=t.b8();return t.M(n,n,[r.x,r.y,r.z]),t.b5(n,n,Math.PI),t.b6(n,n,Math.PI/2),t.N(n,n,[-a,a,a]),n}getProjectionDataForCustomLayer(e=!0){let i=new t.Z(0,0,0,0,0),r=this.getProjectionData({overscaledTileID:i,applyGlobeMatrix:e}),a=es(i,this.worldSize);t.O(a,this._viewProjMatrix,a),r.tileMercatorCoords=[0,0,1,1];let n=[t.$,t.$,this.worldSize/this._helper.pixelsPerMeter],o=t.b9();return t.N(o,a,n),r.fallbackMatrix=o,r.mainMatrix=o,r}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function ts(){t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function tc(e){if(e.useSlerp)if(e.k<1){let i=t.ba(e.startEulerAngles.roll,e.startEulerAngles.pitch,e.startEulerAngles.bearing),r=t.ba(e.endEulerAngles.roll,e.endEulerAngles.pitch,e.endEulerAngles.bearing),a=new Float64Array(4);t.bb(a,i,r,e.k);let n=t.bc(a);e.tr.setRoll(n.roll),e.tr.setPitch(n.pitch),e.tr.setBearing(n.bearing)}else e.tr.setRoll(e.endEulerAngles.roll),e.tr.setPitch(e.endEulerAngles.pitch),e.tr.setBearing(e.endEulerAngles.bearing);else e.tr.setRoll(t.C.number(e.startEulerAngles.roll,e.endEulerAngles.roll,e.k)),e.tr.setPitch(t.C.number(e.startEulerAngles.pitch,e.endEulerAngles.pitch,e.k)),e.tr.setBearing(t.C.number(e.startEulerAngles.bearing,e.endEulerAngles.bearing,e.k))}function tu(e,i,r,a,n){let o=n.padding,l=en(n.worldSize,r.getNorthWest()),s=en(n.worldSize,r.getNorthEast()),c=en(n.worldSize,r.getSouthEast()),u=en(n.worldSize,r.getSouthWest
51()),h=t.ad(-a),p=l.rotate(h),d=s.rotate(h),f=c.rotate(h),m=u.rotate(h),g=new t.P(Math.max(p.x,d.x,m.x,f.x),Math.max(p.y,d.y,m.y,f.y)),y=new t.P(Math.min(p.x,d.x,m.x,f.x),Math.min(p.y,d.y,m.y,f.y)),_=g.sub(y),b=(n.width-(o.left+o.right+i.left+i.right))/_.x,x=(n.height-(o.top+o.bottom+i.top+i.bottom))/_.y;if(x<0||b<0)return void ts();let v=Math.min(t.aj(n.scale*Math.min(b,x)),e.maxZoom),w=t.P.convert(e.offset),z=new t.P((i.left-i.right)/2,(i.top-i.bottom)/2).rotate(t.ad(a)),S=w.add(z).mult(n.scale/t.ae(v));return{center:eo(n.worldSize,l.add(c).div(2).sub(S)),zoom:v,bearing:a}}class th{get useGlobeControls(){return!1}handlePanInertia(e,t){return{easingOffset:e,easingCenter:t.center}}handleMapControlsRollPitchBearingZoom(e,t){e.bearingDelta&&t.setBearing(t.bearing+e.bearingDelta),e.pitchDelta&&t.setPitch(t.pitch+e.pitchDelta),e.rollDelta&&t.setRoll(t.roll+e.rollDelta),e.zoomDelta&&t.setZoom(t.zoom+e.zoomDelta)}handleMapControlsPan(e,t,i){.01>e.around.distSqr(t.centerPoint)||t.setLocationAtPoint(i,e.around)}cameraForBoxAndBearing(e,t,i,r,a){return tu(e,t,i,r,a)}handleJumpToCenterZoom(e,i){e.zoom!==(void 0!==i.zoom?+i.zoom:e.zoom)&&e.setZoom(+i.zoom),void 0!==i.center&&e.setCenter(t.S.convert(i.center))}handleEaseTo(e,i){let r=e.zoom,a=e.padding,n={roll:e.roll,pitch:e.pitch,bearing:e.bearing},o={roll:void 0===i.roll?e.roll:i.roll,pitch:void 0===i.pitch?e.pitch:i.pitch,bearing:void 0===i.bearing?e.bearing:i.bearing},l=void 0!==i.zoom,s=!e.isPaddingEqual(i.padding),c=!1,u=l?+i.zoom:e.zoom,h=e.centerPoint.add(i.offsetAsPoint),p=e.screenPointToLocation(h),{center:d,zoom:f}=e.getConstrained(t.S.convert(i.center||p),null!=u?u:r);tt(e,d);let m=en(e.worldSize,p),g=en(e.worldSize,d).sub(m),y=t.ae(f-r);return{easeFunc:l=>{if(c&&e.setZoom(t.C.number(r,f,l)),t.bd(n,o)||tc({startEulerAngles:n,endEulerAngles:o,tr:e,k:l,useSlerp:n.roll!=o.roll}),s&&(e.interpolatePadding(a,i.padding,l),h=e.centerPoint.add(i.offsetAsPoint)),i.around)e.setLocationAtPoint(i.around,i.aroundPoint);else{let i=t.ae(e.zoom-r),a=Math.pow(f>r?Math.min(2,y):Math.max(.5,y),1-l),n=eo(e.worldSize,m.add(g.mult(l*a)).mult(i));e.setLocationAtPoint(e.renderWorldCopies?n.wrap():n,h)}},isZooming:c=f!==r,elevationCenter:d}}handleFlyTo(e,i){let r,a=void 0!==i.zoom,n=e.zoom,o=e.getConstrained(t.S.convert(i.center||i.locationAtOffset),a?+i.zoom:n),l=o.center,s=o.zoom;tt(e,l);let c=en(e.worldSize,i.locationAtOffset),u=en(e.worldSize,l).sub(c),h=u.mag(),p=t.ae(s-n);if(void 0!==i.minZoom){let a=Math.min(+i.minZoom,n,s),o=e.getConstrained(l,a).zoom;r=t.ae(o-n)}return{easeFunc:(i,r,a,o)=>{e.setZoom(1===i?s:n+t.aj(r));let h=1===i?l:eo(e.worldSize,c.add(u.mult(a)).mult(r));e.setLocationAtPoint(e.renderWorldCopies?h.wrap():h,o)},scaleOfZoom:p,targetCenter:l,scaleOfMinZoom:r,pixelPathLength:h}}}class tp{constructor(e,t,i){this.blendFunction=e,this.blendColor=t,this.mask=i}}tp.Replace=[1,0],tp.disabled=new tp(tp.Replace,t.be.transparent,[!1,!1,!1,!1]),tp.unblended=new tp(tp.Replace,t.be.transparent,[!0,!0,!0,!0]),tp.alphaBlended=new tp([1,771],t.be.transparent,[!0,!0,!0,!0]);class td{constructor(e,t,i){this.enable=e,this.mode=t,this.frontFace=i}}td.disabled=new td(!1,1029,2305),td.backCCW=new td(!0,1029,2305),td.frontCCW=new td(!0,1028,2305);class tf{constructor(e,t,i){this.func=e,this.mask=t,this.range=i}}tf.ReadOnly=!1,tf.ReadWrite=!0,tf.disabled=new tf(519,tf.ReadOnly,[0,1]);class tm{constructor(e,t,i,r,a,n){this.test=e,this.ref=t,this.mask=i,this.fail=r,this.depthFail=a,this.pass=n}}tm.disabled=new tm({func:519,mask:0},0,0,7680,7680,7680);let tg=new WeakMap;function ty(e){var t;if(tg.has(e))return tg.get(e);{let i=null==(t=e.getParameter(e.VERSION))?void 0:t.startsWith("WebGL 2.0");return tg.set(e,i),i}}class t_{get awaitingQuery(){return!!this._readbackQueue}constructor(e){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=e;let i=e.context,r=i.gl;this._texFormat=r.RGBA,this._texType=r.UNSIGNED_BYTE;let a=new t.aK;a.emplaceBack(-1,-1),a.emplaceBack(2,-1),a.emplaceBack(-1,2);let n=new t.aM;n.emplaceBack(0,1,2),this._fullscreenTriangle=new e6(i.createVertexBuffer(a,e4.members),i.createIndexBuffer(n),t.aL.simpleSegment(0,0,a.length,n.length)),this._resultBuffer=new Uint8Array(4),i.activeTexture.set(r.TEXTURE1);let o=r.createTexture();r.bindTexture(r.TEXTURE_2D,o),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texImage2D(r.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=i.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(o),ty(r)&&(this._pbo=r.createBuffer(),r.bindBuffer(r.PIXEL_PACK_BUFFER,this._pbo),r.bufferData(r.PIXEL_PACK_BUFFER,4,r.STREAM_READ),r.bindBuffer(r.PIXEL_PACK_BUFFER,null))}destroy(){let e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,t){let i=this._updateCount;return this._readbackQueue?i>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():i>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,t),this._updateCount++,this._measuredError}_bindFramebuffer(){let e=this._cachedRenderContext.context,t=e.gl;e.activeTexture.set(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,i){let r=this._cachedRenderContext.context,a=r.gl;if(this._bindFramebuffer(),r.viewport.set([0,0,this._texWidth,this._texHeight]),r.clear({color:t.be.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(r,a.TRIANGLES,tf.disabled,tm.disabled,tp.unblended,td.disabled,{u_input:e,u_output_expected:i},null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&ty(a)){a.bindBuffer(a.PIXEL_PACK_BUFFER,this._pbo),a.readBuffer(a.COLOR_ATTACHMENT0),a.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),a.bindBuffer(a.PIXEL_PACK_BUFFER,null);let e=a.fenceSync(a.SYNC_GPU_COMMANDS_COMPLETE,0);a.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:e}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&ty(e)){let i=e.clientWaitSync(this._readbackQueue.sync,0,0);if(i===e.WAIT_FAILED)return t.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(i===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=t_._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let t;return t=0+(e[0]/256+e[1]/65536+e[2]/0x1000000),e[3]<127&&(t=-t),t/128}}let tb=t.$/128;function tx(e,i){let r=void 0!==e.granularity?Math.max(e.granularity,1):1,a=r+2*!!e.generateBorders,n=r+(e.extendToNorthPole||e.generateBorders?1:0)+(e.extendToSouthPole||e.generateBorders?1:0),o=a+1,l=n+1,s=e.generateBorders?-1:0,c=e.generateBorders||e.extendToNorthPole?-1:0,u=r+ +!!e.generateBorders,h=r+(e.generateBorders||e.extendToSouthPole?1:0),p=a*n*6,d=o*l>65536;if(d&&"16bit"===i)throw Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let f=d||"32bit"===i,m=new Int16Array(o*l*2),g=0;for(let i=c;
51i<=h;i++)for(let a=s;a<=u;a++){let n=a/r*t.$;-1===a&&(n=-tb),a===r+1&&(n=t.$+tb);let o=i/r*t.$;-1===i&&(o=e.extendToNorthPole?t.bg:-tb),i===r+1&&(o=e.extendToSouthPole?t.bh:t.$+tb),m[g++]=n,m[g++]=o}let y=f?new Uint32Array(p):new Uint16Array(p),_=0;for(let e=0;e<n;e++)for(let t=0;t<a;t++){let i=t+1+e*o,r=t+(e+1)*o,a=t+1+(e+1)*o;y[_++]=t+e*o,y[_++]=r,y[_++]=i,y[_++]=i,y[_++]=r,y[_++]=a}return{vertices:m.buffer.slice(0),indices:y.buffer.slice(0),uses32bitIndices:f}}let tv=new t.aJ({fill:new t.bi(128,2),line:new t.bi(512,0),tile:new t.bi(128,32),stencil:new t.bi(128,1),circle:3});class tw{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 e3.projectionGlobe}get vertexShaderPreludeCode(){return e3.projectionMercator.vertexSource}get subdivisionGranularity(){return tv}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(e){this._errorMeasurement||(this._errorMeasurement=new t_(e));let i=t.U(this._errorQueryLatitudeDegrees),r=2*Math.atan(Math.exp(Math.PI-i*Math.PI*2))-.5*Math.PI,a=this._errorMeasurement.updateErrorLoop(i,r),n=p.now();a!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=a,this._errorMeasurementLastChangeTime=n);let o=Math.min(Math.max((n-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=t.bj(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,t.bk(o))}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,t,i,r,a){let n=("stencil"===a?tv.stencil:tv.tile).getGranularityForZoomLevel(t.z);return this._getMesh(e,{granularity:n,generateBorders:i,extendToNorthPole:0===t.y&&r,extendToSouthPole:t.y===(1<<t.z)-1&&r})}_getMesh(e,i){let r=this._getMeshKey(i);if(r in this._tileMeshCache)return this._tileMeshCache[r];let a=function(e,i){let r=tx(i,"16bit"),a=t.aK.deserialize({arrayBuffer:r.vertices,length:r.vertices.byteLength/2/2}),n=t.aM.deserialize({arrayBuffer:r.indices,length:r.indices.byteLength/2/3});return new e6(e.createVertexBuffer(a,e4.members),e.createIndexBuffer(n),t.aL.simpleSegment(0,0,a.length,n.length))}(e,i);return this._tileMeshCache[r]=a,a}recalculate(e){}hasTransition(){let e=p.now();return(e-this._errorMeasurementLastChangeTime)/1e3<.7||this._errorMeasurement&&this._errorMeasurement.awaitingQuery}setErrorQueryLatitudeDegrees(e){this._errorQueryLatitudeDegrees=e}}let tz=new t.r({type:new t.D(t.v.projection.type)});class tS extends t.E{constructor(e){super(),this._transitionable=new t.t(tz),this.setProjection(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new t.F(0)),this._mercatorProjection=new e9,this._verticalPerspectiveProjection=new tw}get transitionState(){let e=this.properties.get("type");if("string"==typeof e&&"mercator"===e)return 0;if("string"==typeof e&&"vertical-perspective"===e)return 1;if(e instanceof t.bl){if("vertical-perspective"===e.from&&"mercator"===e.to)return 1-e.transition;if("mercator"===e.from&&"vertical-perspective"===e.to)return e.transition}return 1}get useGlobeRendering(){return this.transitionState>0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,t,i,r,a){return this.currentProjection.getMeshFromTileID(e,t,i,r,a)}setProjection(e){this._transitionable.setValue("type",(null==e?void 0:e.type)||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function tT(e){return 2*Math.PI*tM(e.worldSize,e.center.lat)}function tk(e,i,r,a,n){let o=1/(1<<n),l=i/t.$*o+a*o,s=t.bn((e/t.$*o+r*o)*Math.PI*2+Math.PI,2*Math.PI),c=2*Math.atan(Math.exp(Math.PI-l*Math.PI*2))-.5*Math.PI,u=Math.cos(c),h=new Float64Array(3);return h[0]=Math.sin(s)*u,h[1]=Math.sin(c),h[2]=Math.cos(s)*u,h}function tE(e){return function(e,t){let i=Math.cos(t),r=new Float64Array(3);return r[0]=Math.sin(e)*i,r[1]=Math.sin(t),r[2]=Math.cos(e)*i,r}(e.lng*Math.PI/180,e.lat*Math.PI/180)}function tM(e,t){return e/(2*Math.PI)/Math.cos(t*Math.PI/180)}function tP(e){let i=Math.asin(e[1])/Math.PI*180,r=Math.sqrt(e[0]*e[0]+e[2]*e[2]);if(r>1e-6){let a=e[0]/r,n=Math.acos(e[2]/r),o=(a>0?n:-n)/Math.PI*180;return new t.S(t.aN(o,-180,180),i)}return new t.S(0,i)}function tI(e){return Math.cos(e*Math.PI/180)}function tA(e,i){let r=tI(e),a=tI(i);return t.aj(a/r)}function tC(e,i){let r=e.rotate(i.bearingInRadians),a=i.zoom+tA(i.center.lat,0),n=t.bj(1/tI(i.center.lat),1/tI(Math.min(Math.abs(i.center.lat),60)),t.bm(a,7,3,0,1)),o=360/tT({worldSize:i.worldSize,center:{lat:i.center.lat}});return new t.S(i.center.lng-r.x*o*n,t.ag(i.center.lat+r.y*o,-t.ah,t.ah))}function tR(e){let t=.5*e,i=Math.sin(t),r=Math.cos(t);return Math.log(i+r)-Math.log(r-i)}function tL(e,i,r,a){let n=e.lat+r*a;if(Math.abs(r)>1){let o=(Math.sign(e.lat+r)!==Math.sign(e.lat)?-Math.abs(e.lat):Math.abs(e.lat))*Math.PI/180,l=Math.abs(e.lat+r)*Math.PI/180,s=tR(o+a*(l-o)),c=tR(o),u=tR(l);return new t.S(e.lng+(s-c)/(u-c)*i,n)}return new t.S(e.lng+i*a,n)}class tD{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;let e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,t,i,r){let a=`${e.z}_${e.x}_${e.y}_${(null==r?void 0:r.terrain)?"t":""}`,n=this._cache.get(a);if(n)return n;let o=this._cachePrevious.get(a);if(o)return this._cache.set(a,o),o;let l=this._boundingVolumeFactory(e,t,i,r);return this._cache.set(a,l),this._hadAnyChanges=!0,l}}class tO{constructor(e,t,i,r){this.min=i,this.max=r,this.points=e,this.planes=t}static fromAabb(e,t){let i=[];for(let r=0;r<8;r++)i.push([1&~r?e[0]:t[0],1==(r>>1&1)?t[1]:e[1],1==(r>>2&1)?t[2]:e[2]]);return new tO(i,[[-1,0,0,t[0]],[1,0,0,-e[0]],[0,-1,0,t[1]],[0,1,0,-e[1]],[0,0,-1,t[2]],[0,0,1,-e[2]]],e,t)}static fromCenterSizeAngles(e,i,r){let a=t.bq([],r[0],r[1],r[2]),n=t.br([],[i[0],0,0],a),o=t.br([],[0,i[1],0],a),l=t.br([],[0,0,i[2]],a),s=[...e],c=[...e];for(let t=0;t<8;t++)for(let i=0;i<3;i++){let r=e[i]+n[i]*(1&~t?-1:1)+o[i]*(1==(t>>1&1)?1:-1)+l[i]*(1==(t>>2&1)?1:-1);s[i]=Math.min(s[i],r),c[i]=Math.max(c[i],r)}let u=[];for(let i=0;i<8;i++){let r=[...e];t.aR(r,r,t.aQ([],n,1&~i?-1:1)),t.aR(r,r,t.aQ([],o,1==(i>>1&1)?1:-1)),t.aR(r,r,t.aQ([],l,1==(i>>2&1)?1:-1)),u.push(r)}return new tO(u,[[...n,-t.aW(n,u[0])],[...o,-t.aW(o,u[0])],[...l,-t.aW(l,u[0])],[-n[0],-n[1],-n[2],-t.aW(n,u[7])],[-o[0],-o[1],-o[2],-t.aW(o,u[7])],[-l[0],-l[1],-l[2],-t.aW(l,u[7])]],s,c)}intersectsFrustum(e){let t=!0,i=this.points.length,r=this.planes.length,a=e.plane
51s.length,n=e.points.length;for(let r=0;r<a;r++){let a=e.planes[r],n=0;for(let e=0;e<i;e++){let t=this.points[e];a[0]*t[0]+a[1]*t[1]+a[2]*t[2]+a[3]>=0&&n++}if(0===n)return 0;n<i&&(t=!1)}if(t)return 2;for(let t=0;t<r;t++){let i=this.planes[t],r=0;for(let t=0;t<n;t++){let a=e.points[t];i[0]*a[0]+i[1]*a[1]+i[2]*a[2]+i[3]>=0&&r++}if(0===r)return 0}return 1}intersectsPlane(e){let t=this.points.length,i=0;for(let r=0;r<t;r++){let t=this.points[r];e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]>=0&&i++}return i===t?2:+(0!==i)}}function tF(e,t,i){let r=e-t;return r<0?-r:Math.max(0,r-i)}function tj(e,t,i,r,a){let n=e-i;return Math.max(n<0?Math.min(-n,1+n-a):n>1?Math.min(Math.max(n-a,0),1-n):0,tF(t,r,a))}class tB{constructor(){this._boundingVolumeCache=new tD(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,t,i,r){let a=1<<i.z,n=1/a,o=i.x/a,l=i.y/a;return Math.min(Math.min(Math.min(2,tj(e,t,o,l,n)),tj(e,t,o+.5,-l-n,n)),tj(e,t,o+.5,2-l-n,n))}getWrap(e,t,i){let r=1<<t.z,a=1/r,n=t.x/r,o=tF(e.x,n,a),l=tF(e.x,n-1,a),s=tF(e.x,n+1,a),c=Math.min(o,l,s);return c===s?1:c===l?-1:0}allowVariableZoom(e,t){return ed(e,t)>4}allowWorldCopies(){return!1}getTileBoundingVolume(e,t,i,r){return this._boundingVolumeCache.getTileBoundingVolume(e,t,i,r)}_computeTileBoundingVolume(e,i,r,a){var n,o;let l=r,s=r;if(null==a?void 0:a.terrain){let c=new t.Z(e.z,i,e.z,e.x,e.y),u=a.terrain.getMinMaxElevation(c);l=null!=(n=u.minElevation)?n:r,s=null!=(o=u.maxElevation)?o:r}if(l/=t.bt,s/=t.bt,l+=1,s+=1,e.z<=0)return tO.fromAabb([-s,-s,-s],[s,s,s]);if(1===e.z)return tO.fromAabb([0===e.x?-s:0,0===e.y?0:-s,-s],[0===e.x?0:s,0===e.y?s:0,s]);{let i=[tk(0,0,e.x,e.y,e.z),tk(t.$,0,e.x,e.y,e.z),tk(t.$,t.$,e.x,e.y,e.z),tk(0,t.$,e.x,e.y,e.z)],r=[];for(let e of i)r.push(t.aQ([],e,s));if(s!==l)for(let e of i)r.push(t.aQ([],e,l));0===e.y&&r.push([0,1,0]),e.y===(1<<e.z)-1&&r.push([0,-1,0]);let a=[1,1,1],n=[-1,-1,-1];for(let e of r)for(let t=0;t<3;t++)a[t]=Math.min(a[t],e[t]),n[t]=Math.max(n[t],e[t]);let o=tk(t.$/2,t.$/2,e.x,e.y,e.z),c=t.aV([],[0,1,0],o);t.aU(c,c);let u=t.aV([],o,c);t.aU(u,u);let h=t.aV([],i[2],i[1]);t.aU(h,h);let p=t.aV([],i[0],i[3]);t.aU(p,p),r.push(t.aQ([],o,s)),e.y>=(1<<e.z)/2&&r.push(t.aQ([],tk(t.$/2,0,e.x,e.y,e.z),s)),e.y<(1<<e.z)/2&&r.push(t.aQ([],tk(t.$/2,t.$,e.x,e.y,e.z),s));let d=tN(o,r),f=tN(u,r),m=[-o[0],-o[1],-o[2],d.max],g=[o[0],o[1],o[2],-d.min],y=[-u[0],-u[1],-u[2],f.max],_=[u[0],u[1],u[2],-f.min],b=[...h,0],x=[...p,0],v=[];return 0===e.y?v.push(t.bs(x,b,m),t.bs(x,b,g)):v.push(t.bs(y,b,m),t.bs(y,b,g),t.bs(y,x,m),t.bs(y,x,g)),e.y===(1<<e.z)-1?v.push(t.bs(x,b,m),t.bs(x,b,g)):v.push(t.bs(_,b,m),t.bs(_,b,g),t.bs(_,x,m),t.bs(_,x,g)),new tO(v,[m,g,y,_,b,x],a,n)}}}function tN(e,i){let r=1/0,a=-1/0;for(let n of i){let i=t.aW(e,n);r=Math.min(r,i),a=Math.max(a,i)}return{min:r,max:a}}class tU{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,i){return this._helper.interpolatePadding(e,t,i)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t){this._helper.resize(e,t)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}
51overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e){}constructor(){this._cachedClippingPlane=t.bu(),this._projectionMatrix=t.b8(),this._globeViewProjMatrix32f=t.b7(),this._globeViewProjMatrixNoCorrection=t.b8(),this._globeViewProjMatrixNoCorrectionInverted=t.b8(),this._globeProjMatrixInverted=t.b8(),this._cameraPosition=t.bo(),this._globeLatitudeErrorCorrectionRadians=0,this._helper=new tr({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,t)=>this.getConstrained(e,t)}),this._coveringTilesDetailsProvider=new tB}clone(){let e=new tU;return e.apply(this),e}apply(e,t){this._globeLatitudeErrorCorrectionRadians=t||0,this._helper.apply(e)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let e=t.bo();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){let{overscaledTileID:t,applyGlobeMatrix:i}=e,r=this._helper.getMercatorTileCoordinates(t);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:r,clippingPlane:this._cachedClippingPlane,projectionTransition:+!!i,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){let i=this.pitchInRadians,r=this.cameraToCenterDistance/e,a=Math.sin(i)*r,n=Math.cos(i)*r+1,o=1/Math.sqrt(a*a+n*n)*1,l=-a,s=n,c=Math.sqrt(l*l+s*s),u=[0,l/=c,s/=c];t.bv(u,u,[0,0,0],-this.bearingInRadians),t.bw(u,u,[0,0,0],-1*this.center.lat*Math.PI/180),t.bx(u,u,[0,0,0],this.center.lng*Math.PI/180);let h=1/t.aY(u);return t.aQ(u,u,h),[...u,-o*h]}isLocationOccluded(e){return!this.isSurfacePointVisible(tE(e))}transformLightDirection(e){let i=this._helper._center.lng*Math.PI/180,r=this._helper._center.lat*Math.PI/180,a=Math.cos(r),n=[Math.sin(i)*a,Math.sin(r),Math.cos(i)*a],o=[n[2],0,-n[0]],l=[0,0,0];t.aV(l,o,n),t.aU(o,o),t.aU(l,l);let s=[0,0,0];return t.aU(s,[o[0]*e[0]+l[0]*e[1]+n[0]*e[2],o[1]*e[0]+l[1]*e[1]+n[1]*e[2],o[2]*e[0]+l[2]*e[1]+n[2]*e[2]]),s}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,i,r){var a;let n=function(e,i,r){let a=1/(1<<r.z);return new t.a0(e/t.$*a+r.x*a,i/t.$*a+r.y*a)}(e,i,r.canonical),o=(a=n.y,[t.bn(n.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-a*Math.PI*2))-.5*Math.PI]);return this.getCircleRadiusCorrection()/Math.cos(o[1])}projectTileCoordinates(e,i,r,a){let n=r.canonical,o=tk(e,i,n.x,n.y,n.z),l=1+(a?a(e,i):0)/t.bt,s=[o[0]*l,o[1]*l,o[2]*l,1];t.av(s,s,this._globeViewProjMatrixNoCorrection);let c=this._cachedClippingPlane,u=c[0]*o[0]+c[1]*o[1]+c[2]*o[2]+c[3]<0;return{point:new t.P(s[0]/s[3],s[1]/s[3]),signedDistanceFromCamera:s[3],isOccluded:u}}
51_calcMatrices(){if(!this._helper._width||!this._helper._height)return;let e=tM(this.worldSize,this.center.lat),i=t.b9(),r=t.b9();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*e),t.b3(i,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);let a=this.centerOffset;i[8]=-(2*a.x)/this._helper._width,i[9]=2*a.y/this._helper._height,this._projectionMatrix=t.b4(i),this._globeProjMatrixInverted=t.b9(),t.ap(this._globeProjMatrixInverted,i),t.M(i,i,[0,0,-this.cameraToCenterDistance]),t.b5(i,i,this.rollInRadians),t.b6(i,i,-this.pitchInRadians),t.b5(i,i,this.bearingInRadians),t.M(i,i,[0,0,-e]);let n=t.bo();n[0]=e,n[1]=e,n[2]=e,t.b6(r,i,this.center.lat*Math.PI/180),t.by(r,r,-this.center.lng*Math.PI/180),t.N(r,r,n),this._globeViewProjMatrixNoCorrection=r,t.b6(i,i,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),t.by(i,i,-this.center.lng*Math.PI/180),t.N(i,i,n),this._globeViewProjMatrix32f=new Float32Array(i),this._globeViewProjMatrixNoCorrectionInverted=t.b9(),t.ap(this._globeViewProjMatrixNoCorrectionInverted,r);let o=t.bo();this._cameraPosition=t.bo(),this._cameraPosition[2]=this.cameraToCenterDistance/e,t.bv(this._cameraPosition,this._cameraPosition,o,-this.rollInRadians),t.bw(this._cameraPosition,this._cameraPosition,o,this.pitchInRadians),t.bv(this._cameraPosition,this._cameraPosition,o,-this.bearingInRadians),t.aR(this._cameraPosition,this._cameraPosition,[0,0,1]),t.bw(this._cameraPosition,this._cameraPosition,o,-this.center.lat*Math.PI/180),t.bx(this._cameraPosition,this._cameraPosition,o,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(e);let l=t.b4(this._globeViewProjMatrixNoCorrectionInverted);t.N(l,l,[1,1,-1]),this._cachedFrustum=to.fromInvProjectionMatrix(l,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(e){t.w("calculateFogMatrix is not supported on globe projection.");let i=t.b9();return t.af(i),i}getVisibleUnwrappedCoordinates(e){return[new t.b1(0,e)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){e&&t.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,i){if(!this._globeViewProjMatrixNoCorrection)return 1;let r=tE(e);t.aQ(r,r,1+i/t.bt);let a=t.bu();return t.av(a,[r[0],r[1],r[2],1],this._globeViewProjMatrixNoCorrection),a[2]/a[3]}populateCache(e){}getBounds(){let e=.5*this.width,i=.5*this.height,r=[new t.P(0,0),new t.P(e,0),new t.P(this.width,0),new t.P(this.width,i),new t.P(this.width,this.height),new t.P(e,this.height),new t.P(0,this.height),new t.P(0,i)],a=[];for(let e of r)a.push(this.unprojectScreenPoint(e));let n=0,o=0,l=0,s=0,c=this.center;for(let e of a){let i=t.bz(c.lng,e.lng),r=t.bz(c.lat,e.lat);i<o&&(o=i),i>n&&(n=i),r<s&&(s=r),r>l&&(l=r)}let u=[c.lng+o,c.lat+s,c.lng+n,c.lat+l];return this.isSurfacePointOnScreen([0,1,0])&&(u[3]=90,u[0]=-180,u[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(u[1]=-90,u[0]=-180,u[2]=180),new U(u)}getConstrained(e,i){let r=t.ag(e.lat,-t.ah,t.ah),a=t.ag(+i,this.minZoom+tA(0,r),this.maxZoom);return{center:new t.S(e.lng,r),zoom:a}}calculateCenterFromCameraLngLatAlt(e,t,i,r){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,i,r)}setLocationAtPoint(e,i){let r,a,n=tE(this.unprojectScreenPoint(i)),o=tE(e),l=t.bo();t.bA(l);let s=t.bo();t.bx(s,n,l,-this.center.lng*Math.PI/180),t.bw(s,s,l,this.center.lat*Math.PI/180);let c=o[0]*o[0]+o[2]*o[2],u=s[0]*s[0];if(c<u)return;let h=Math.sqrt(c-u),p=t.bB(o[0],o[2],s[0],h),d=t.bB(o[0],o[2],s[0],-h),f=t.bo();t.bx(f,o,l,-p);let m=t.bB(f[1],f[2],s[1],s[2]),g=t.bo();t.bx(g,o,l,-d);let y=t.bB(g[1],g[2],s[1],s[2]),_=.5*Math.PI,b=m>=-_&&m<=_,x=y>=-_&&y<=_;if(b&&x){let e=this.center.lng*Math.PI/180,i=this.center.lat*Math.PI/180;t.bC(p,e)+t.bC(m,i)<t.bC(d,e)+t.bC(y,i)?(r=p,a=m):(r=d,a=y)}else if(b)r=p,a=m;else{if(!x)return;r=d,a=y}let v=r/Math.PI*180,w=a/Math.PI*180,z=this.center.lat;this.setCenter(new t.S(v,t.ag(w,-90,90))),this.setZoom(this.zoom+tA(z,this.center.lat))}locationToScreenPoint(e,i){let r=tE(e);if(i){let a=i.getElevationForLngLatZoom(e,this._helper._tileZoom);t.aQ(r,r,1+a/t.bt)}return this._projectSurfacePointToScreen(r)}_projectSurfacePointToScreen(e){let i=t.bu();return t.av(i,[...e,1],this._globeViewProjMatrixNoCorrection),i[0]/=i[3],i[1]/=i[3],new t.P((.5*i[0]+.5)*this.width,(-(.5*i[1])+.5)*this.height)}screenPointToMercatorCoordinate(e,i){if(i){let t=i.pointCoordinate(e);if(t)return t}return t.a0.fromLngLat(this.unprojectScreenPoint(e))}screenPointToLocation(e,t){var i;return null==(i=this.screenPointToMercatorCoordinate(e,t))?void 0:i.toLngLat()}
51isPointOnMapSurface(e,t){let i=this._cameraPosition,r=this.getRayDirectionFromPixel(e);return!!this.rayPlanetIntersection(i,r)}getRayDirectionFromPixel(e){let i=t.bu();i[0]=e.x/this.width*2-1,i[1]=-1*(e.y/this.height*2-1),i[2]=1,i[3]=1,t.av(i,i,this._globeViewProjMatrixNoCorrectionInverted),i[0]/=i[3],i[1]/=i[3],i[2]/=i[3];let r=t.bo();r[0]=i[0]-this._cameraPosition[0],r[1]=i[1]-this._cameraPosition[1],r[2]=i[2]-this._cameraPosition[2];let a=t.bo();return t.aU(a,r),a}isSurfacePointVisible(e){let t=this._cachedClippingPlane;return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]>=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;let i=t.bu();return t.av(i,[...e,1],this._globeViewProjMatrixNoCorrection),i[0]/=i[3],i[1]/=i[3],i[2]/=i[3],i[0]>-1&&i[0]<1&&i[1]>-1&&i[1]<1&&i[2]>-1&&i[2]<1}rayPlanetIntersection(e,i){let r=t.aW(e,i),a=t.bo(),n=t.bo();t.aQ(n,i,r),t.aT(a,e,n);let o=1-t.aW(a,a);if(o<0)return null;let l=t.aW(e,e)-1,s=-r+(r<0?1:-1)*Math.sqrt(o),c=l/s;return{tMin:Math.min(c,s),tMax:Math.max(c,s)}}unprojectScreenPoint(e){let i=this._cameraPosition,r=this.getRayDirectionFromPixel(e),a=this.rayPlanetIntersection(i,r);if(a){let e=t.bo();t.aR(e,i,[r[0]*a.tMin,r[1]*a.tMin,r[2]*a.tMin]);let n=t.bo();return t.aU(n,e),tP(n)}let n=this._cachedClippingPlane,o=n[0]*r[0]+n[1]*r[1]+n[2]*r[2],l=-t.b0(n,i)/o,s=t.bo();if(l>0)t.aR(s,i,[r[0]*l,r[1]*l,r[2]*l]);else{let e=t.bo();t.aR(e,i,[2*r[0],2*r[1],2*r[2]]);let a=t.b0(this._cachedClippingPlane,e);t.aT(s,e,[this._cachedClippingPlane[0]*a,this._cachedClippingPlane[1]*a,this._cachedClippingPlane[2]*a])}let c=function(e){let i=t.bo();return i[0]=-(e[0]*e[3]),i[1]=-(e[1]*e[3]),i[2]=-(e[2]*e[3]),{center:i,radius:Math.sqrt(1-e[3]*e[3])}}(n);return tP(function(e,i,r){let a=t.bo();t.aT(a,r,e);let n=t.bo();return t.bp(n,e,a,i/t.a_(a)),n}(c.center,c.radius,s))}getMatrixForModel(e,i){let r=t.S.convert(e),a=1/t.bt,n=t.b8();return t.by(n,n,r.lng/180*Math.PI),t.b6(n,n,-r.lat/180*Math.PI),t.M(n,n,[0,0,1+i/t.bt]),t.b6(n,n,.5*Math.PI),t.N(n,n,[a,a,a]),n}getProjectionDataForCustomLayer(e=!0){let i=this.getProjectionData({overscaledTileID:new t.Z(0,0,0,0,0),applyGlobeMatrix:e});return i.tileMercatorCoords=[0,0,1,1],i}getFastPathSimpleProjectionMatrix(e){}}class tV{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,i){return this._helper.interpolatePadding(e,t,i)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,i=!0){this._helper.resize(e,t,i)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e,t){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=t,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 tr({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,t)=>this.getConstrained(e,t)}),this._globeness=1,this._mercatorTransform=new tl,this._verticalPerspectiveTransform=new tU}clone(){let e=new tV;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this),e}apply(e){this._helper.apply(e),this._mercatorTransform.apply(this),this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){let t=this._mercatorTransform.getProjectionData(e),i=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?i.mainMatrix:t.mainMatrix,clippingPlane:i.clippingPlane,tileMercatorCoords:i.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:t.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return t.bj(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return t.bj(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,i,r){let a=this._mercatorTransform.getPitchedTextCorrection(e,i,r),n=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,i,r);return t.bj(a,n,this._globeness)}projectTileCoordinates(e,t,i,r){return this.currentTransform.projectTileCoordinates(e,t,i,r)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,t){return this.currentTransform.lngLatToCameraDepth(e,t)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}getConstrained(e,t){return this.currentTransform.getConstrained(e,t)}calculateCenterFromCameraLngLatAlt(e,t,i,r){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,i,r)}setLocationAtPoint(e,t){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(e,t),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(e,t),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(e,t){return this.currentTransform.locationToScreenPoint(e,t)}screenPointToMercatorCoordinate(e,t){return this.currentTransform.screenPointToMercatorCoordinate(e,t)}screenPointToLocation(e,t){return this.currentTransform.screenPointToLocation(e,t)}
51isPointOnMapSurface(e,t){return this.currentTransform.isPointOnMapSurface(e,t)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,t){return this.currentTransform.getMatrixForModel(e,t)}getProjectionDataForCustomLayer(e=!0){let t=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return t;let i=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return i.fallbackMatrix=t.mainMatrix,i}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class t${get useGlobeControls(){return!0}handlePanInertia(e,i){let r=tC(e,i);return Math.abs(r.lng-i.center.lng)>180&&(r.lng=i.center.lng+179.5*Math.sign(r.lng-i.center.lng)),{easingCenter:r,easingOffset:new t.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,i){let r=e.around,a=i.screenPointToLocation(r);e.bearingDelta&&i.setBearing(i.bearing+e.bearingDelta),e.pitchDelta&&i.setPitch(i.pitch+e.pitchDelta),e.rollDelta&&i.setRoll(i.roll+e.rollDelta);let n=i.zoom;e.zoomDelta&&i.setZoom(i.zoom+e.zoomDelta);let o=i.zoom-n;if(0===o)return;let l=t.bz(i.center.lng,a.lng),s=l/(Math.abs(l/180)+1),c=t.bz(i.center.lat,a.lat),u=i.getRayDirectionFromPixel(r),h=i.cameraPosition,p=-1*t.aW(h,u),d=t.bo();t.aR(d,h,[u[0]*p,u[1]*p,u[2]*p]);let f=Math.exp(-(.5*Math.max(t.aY(d)-1-.3,0))),m=tM(i.worldSize,i.center.lat)/Math.min(i.width,i.height),g=t.bm(m,.9,.5,1,.25),y=(1-t.ae(-o))*Math.min(f,g),_=i.center.lat,b=i.zoom,x=new t.S(i.center.lng+s*y,t.ag(i.center.lat+c*y,-t.ah,t.ah));i.setLocationAtPoint(a,r);let v=i.center,w=Math.pow(Math.max(t.bm(Math.abs(l),45,85,0,1),t.bm(m,.75,.35,0,1)),.25),z=t.bz(v.lng,x.lng),S=t.bz(v.lat,x.lat);i.setCenter(new t.S(v.lng+z*w,v.lat+S*w).wrap()),i.setZoom(b+tA(_,i.center.lat))}handleMapControlsPan(e,t,i){if(!e.panDelta)return;let r=t.center.lat,a=t.zoom;t.setCenter(tC(e.panDelta,t).wrap()),t.setZoom(a+tA(r,t.center.lat))}cameraForBoxAndBearing(e,i,r,a,n){let o=tu(e,i,r,a,n),l=i.left/n.width*2-1,s=(n.width-i.right)/n.width*2-1,c=-(i.top/n.height*2)+1,u=-((n.height-i.bottom)/n.height*2)+1,h=0>t.bz(r.getWest(),r.getEast()),p=h?r.getEast():r.getWest(),d=h?r.getWest():r.getEast(),f=Math.max(r.getNorth(),r.getSouth()),m=Math.min(r.getNorth(),r.getSouth()),g=p+.5*t.bz(p,d),y=f+.5*t.bz(f,m),_=n.clone();_.setCenter(o.center),_.setBearing(o.bearing),_.setPitch(0),_.setRoll(0),_.setZoom(o.zoom);let b=_.modelViewProjectionMatrix,x=[tE(r.getNorthWest()),tE(r.getNorthEast()),tE(r.getSouthWest
51()),tE(r.getSouthEast()),tE(new t.S(d,y)),tE(new t.S(p,y)),tE(new t.S(g,f)),tE(new t.S(g,m))],v=tE(o.center),w=1/0;for(let e of x)l<0&&(w=t$.getLesserNonNegativeNonNull(w,t$.solveVectorScale(e,v,b,"x",l))),s>0&&(w=t$.getLesserNonNegativeNonNull(w,t$.solveVectorScale(e,v,b,"x",s))),c>0&&(w=t$.getLesserNonNegativeNonNull(w,t$.solveVectorScale(e,v,b,"y",c))),u<0&&(w=t$.getLesserNonNegativeNonNull(w,t$.solveVectorScale(e,v,b,"y",u)));if(Number.isFinite(w)&&0!==w)return o.zoom=_.zoom+t.aj(w),o;ts()}handleJumpToCenterZoom(e,i){let r=e.center.lat,a=e.getConstrained(i.center?t.S.convert(i.center):e.center,e.zoom).center;e.setCenter(a.wrap());let n=void 0!==i.zoom?+i.zoom:e.zoom+tA(r,a.lat);e.zoom!==n&&e.setZoom(n)}handleEaseTo(e,i){let r=e.zoom,a=e.center,n=e.padding,o={roll:e.roll,pitch:e.pitch,bearing:e.bearing},l={roll:void 0===i.roll?e.roll:i.roll,pitch:void 0===i.pitch?e.pitch:i.pitch,bearing:void 0===i.bearing?e.bearing:i.bearing},s=void 0!==i.zoom,c=!e.isPaddingEqual(i.padding),u=!1,h=i.center?t.S.convert(i.center):a,p=e.getConstrained(h,r).center;tt(e,p);let d=e.clone();d.setCenter(p),d.setZoom(s?+i.zoom:r+tA(a.lat,h.lat)),d.setBearing(i.bearing);let f=new t.P(t.ag(e.centerPoint.x+i.offsetAsPoint.x,0,e.width),t.ag(e.centerPoint.y+i.offsetAsPoint.y,0,e.height));d.setLocationAtPoint(p,f);let m=(i.offset&&i.offsetAsPoint.mag())>0?d.center:p,g=s?+i.zoom:r+tA(a.lat,m.lat),y=r+tA(a.lat,0),_=g+tA(m.lat,0),b=t.bz(a.lng,m.lng),x=t.bz(a.lat,m.lat),v=t.ae(_-y);return{easeFunc:r=>{if(t.bd(o,l)||tc({startEulerAngles:o,endEulerAngles:l,tr:e,k:r,useSlerp:o.roll!=l.roll}),c&&e.interpolatePadding(n,i.padding,r),i.around)t.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(i.around,i.aroundPoint);else{let t=Math.pow(_>y?Math.min(2,v):Math.max(.5,v),1-r),i=tL(a,b,x,r*t);e.setCenter(i.wrap())}if(u){let i=t.C.number(y,_,r)+tA(0,e.center.lat);e.setZoom(i)}},isZooming:u=g!==r,elevationCenter:m}}handleFlyTo(e,i){let r,a=void 0!==i.zoom,n=e.center,o=e.zoom,l=e.padding,s=!e.isPaddingEqual(i.padding),c=e.getConstrained(t.S.convert(i.center||i.locationAtOffset),o).center,u=a?+i.zoom:e.zoom+tA(e.center.lat,c.lat),h=e.clone();h.setCenter(c),h.setZoom(u),h.setBearing(i.bearing);let p=new t.P(t.ag(e.centerPoint.x+i.offsetAsPoint.x,0,e.width),t.ag(e.centerPoint.y+i.offsetAsPoint.y,0,e.height));h.setLocationAtPoint(c,p);let d=h.center;tt(e,d);let f=function(e,i,r){let a=tE(i),n=tE(r);return Math.acos(t.aW(a,n))/(2*Math.PI)*tT(e)}(e,n,d),m=o+tA(n.lat,0),g=u+tA(d.lat,0),y=t.ae(g-m);if("number"==typeof i.minZoom){let a=Math.min(+i.minZoom+tA(d.lat,0),m,g)+tA(0,d.lat),n=e.getConstrained(d,a).zoom+tA(d.lat,0);r=t.ae(n-m)}let _=t.bz(n.lng,d.lng),b=t.bz(n.lat,d.lat);return{easeFunc:(r,a,o,c)=>{let h=tL(n,_,b,o);s&&e.interpolatePadding(l,i.padding,r);let p=1===r?d:h;e.setCenter(p.wrap());let f=m+t.aj(a);e.setZoom(1===r?u:f+tA(0,p.lat))},scaleOfZoom:y,targetCenter:d,scaleOfMinZoom:r,pixelPathLength:f}}static solveVectorScale(e,t,i,r,a){let n="x"===r?[i[0],i[4],i[8],i[12]]:[i[1],i[5],i[9],i[13]],o=[i[3],i[7],i[11],i[15]],l=e[0]*n[0]+e[1]*n[1]+e[2]*n[2],s=e[0]*o[0]+e[1]*o[1]+e[2]*o[2],c=t[0]*n[0]+t[1]*n[1]+t[2]*n[2],u=t[0]*o[0]+t[1]*o[1]+t[2]*o[2];return c+a*s===l+a*u||o[3]*(l-c)+n[3]*(u-s)+l*u==c*s?null:(c+n[3]-a*u-a*o[3])/(c-l-a*u+a*s)}static getLesserNonNegativeNonNull(e,t){return null!==t&&t>=0&&t<e?t:e}}class tZ{constructor(e){this._globe=e,this._mercatorCameraHelper=new th,this._verticalPerspectiveCameraHelper=new t$}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(e,t){return this.currentHelper.handlePanInertia(e,t)}handleMapControlsRollPitchBearingZoom(e,t){return this.currentHelper.handleMapControlsRollPitchBearingZoom(e,t)}handleMapControlsPan(e,t,i){this.currentHelper.handleMapControlsPan(e,t,i)}cameraForBoxAndBearing(e,t,i,r,a){return this.currentHelper.cameraForBoxAndBearing(e,t,i,r,a)}handleJumpToCenterZoom(e,t){this.currentHelper.handleJumpToCenterZoom(e,t)}handleEaseTo(e,t){return this.currentHelper.handleEaseTo(e,t)}handleFlyTo(e,t){return this.currentHelper.handleFlyTo(e,t)}}
51let tG=(e,i)=>t.y(e,i&&i.filter(e=>"source.canvas"!==e.identifier)),tq=t.bD();class tH extends t.E{constructor(e,i={}){super(),this._rtlPluginLoaded=()=>{for(let e in this.sourceCaches){let t=this.sourceCaches[e].getSource().type;"vector"!==t&&"geojson"!==t||this.sourceCaches[e].reload()}},this.map=e,this.dispatcher=new O(D(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(e,t)=>this.getGlyphs(e,t)),this.dispatcher.registerMessageHandler("GI",(e,t)=>this.getImages(e,t)),this.imageManager=new z,this.imageManager.setEventedParent(this),this.glyphManager=new k(e._requestManager,i.localIdeographFontFamily),this.lineAtlas=new A(256,512),this.crossTileSymbolIndex=new e0,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.bE,this._loaded=!1,this._availableImages=[],this._globalState={},this._resetUpdates(),this.dispatcher.broadcast("SR",t.bF()),et().on(J,this._rtlPluginLoaded),this.on("data",e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;let t=this.sourceCaches[e.sourceId];if(!t)return;let i=t.getSource();if(i&&i.vectorLayerIds)for(let e in this._layers){let t=this._layers[e];t.source===i.id&&this._validateLayer(t)}})}setGlobalStateProperty(e,i){var r,a,n;this._checkLoaded();let o=null===i?null!=(n=null==(a=null==(r=this.stylesheet.state)?void 0:r[e])?void 0:a.default)?n:null:i;if(t.bG(o,this._globalState[e]))return this;this._globalState[e]=o;let l=this._findGlobalStateAffectedSources([e]);for(let e in this.sourceCaches)l.has(e)&&(this._reloadSource(e),this._changed=!0)}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();let i=[];for(let r in e)t.bG(this._globalState[r],e[r].default)||(i.push(r),this._globalState[r]=e[r].default);let r=this._findGlobalStateAffectedSources(i);for(let e in this.sourceCaches)r.has(e)&&(this._reloadSource(e),this._changed=!0)}_findGlobalStateAffectedSources(e){if(0===e.length)return new Set;let t=new Set;for(let i in this._layers){let r=this._layers[i],a=r.getLayoutAffectingGlobalStateRefs();for(let i of e)a.has(i)&&t.add(r.source)}return t}loadURL(e,i={},r){this.fire(new t.l("dataloading",{dataType:"style"})),i.validate="boolean"!=typeof i.validate||i.validate;let a=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;let n=this._loadStyleRequest;t.j(a,this._loadStyleRequest).then(e=>{this._loadStyleRequest=null,this._load(e.data,i,r)}).catch(e=>{this._loadStyleRequest=null,e&&!n.signal.aborted&&this.fire(new t.k(e))})}loadJSON(e,i={},r){this.fire(new t.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,p.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,i.validate=!1!==i.validate,this._load(e,i,r)}).catch(()=>{})}loadEmpty(){this.fire(new t.l("dataloading",{dataType:"style"})),this._load(tq,{validate:!1})}_load(e,i,r){var a,n,o;let l=i.transformStyle?i.transformStyle(r,e):e;if(!i.validate||!tG(this,t.z(l))){for(let e in this._loaded=!0,this.stylesheet=l,l.sources)this.addSource(e,l.sources[e],{validate:!1});l.sprite?this._loadSprite(l.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(l.glyphs),this._createLayers(),this.light=new M(this.stylesheet.light),this._setProjectionInternal((null==(a=this.stylesheet.projection)?void 0:a.type)||"mercator"),this.sky=new I(this.stylesheet.sky),this.map.setTerrain(null!=(n=this.stylesheet.terrain)?n:null),this.setGlobalState(null!=(o=this.stylesheet.state)?o:null),this.fire(new t.l("data",{dataType:"style"})),this.fire(new t.l("style.load"))}}_createLayers(){let e=t.bH(this.stylesheet.layers);for(let i of(this.dispatcher.broadcast("SL",e),this._order=e.map(e=>e.id),this._layers={},this._serializedLayers=null,e)){let e=t.bI(i);e.setEventedParent(this,{layer:{id:i.id}}),this._layers[i.id]=e}}_loadSprite(e,i=!1,r){let a;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,(function(e,i,r,a){return t._(this,void 0,void 0,function*(){let n=v(e),o=r>1?"@2x":"",l={},s={};for(let{id:e,url:r}of n){let n=i.transformRequest(w(r,o,".json"),"SpriteJSON");l[e]=t.j(n,a);let u=i.transformRequest(w(r,o,".png"),"SpriteImage");s[e]=c.getImage(u,a)}return yield Promise.all([...Object.values(l),...Object.values(s)]),function(e,i){return t._(this,void 0,void 0,function*(){let t={};for(let r in e){t[r]={};let a=p.getImageCanvasContext((yield i[r]).data),n=(yield e[r]).data;for(let e in n){let{width:i,height:o,x:l,y:s,sdf:c,pixelRatio:u,stretchX:h,stretchY:p,content:d,textFitWidth:f,textFitHeight:m}=n[e];t[r][e]={data:null,pixelRatio:u,sdf:c,stretchX:h,stretchY:p,content:d,textFitWidth:f,textFitHeight:m,spriteData:{width:i,height:o,x:l,y:s,context:a}}}}return t})}(l,s)})})(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(e=>{if(this._spriteRequest=null,e)for(let t in e){for(let i of(this._spritesImagesIds[t]=[],this._spritesImagesIds[t]?this._spritesImagesIds[t].filter(t=>!(t in e)):[]))this.imageManager.removeImage(i),this._changedImages[i]=!0;for(let r in e[t]){let a="default"===t?r:`${t}:${r}`;this._spritesImagesIds[t].push(a),a in this.imageManager.images?this.imageManager.updateImage(a,e[t][r],!1):this.imageManager.addImage(a,e[t][r]),i&&(this._changedImages[a]=!0)}}}).catch(e=>{this._spriteRequest=null,a=e,this.fire(new t.k(a))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),i&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.l("data",{dataType:"style"})),r&&r(a)})}_unloadSprite(){for(let e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.l("data",{dataType:"style"}))}_validateLayer(e){let i=this.sourceCaches[e.source];if(!i)return;let r=e.sourceLayer;if(!r)return;let a=i.getSource();("geojson"===a.type||a.vectorLayerIds&&-1===a.vectorLayerIds.indexOf(r))&&this.fire(new t.k(Error(`Source layer "${r}" does not exist on source "${a.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,i=!1){let r=this._serializedAllLayers();if(!e||0===e.length)return Object.values(i?t.bJ(r):r);let a=[];for(let n of e)if(r[n]){let e=i?t.bJ(r[n]):r[n];a.push(e)}return a}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;for(let t of(e=this._serializedLayers={},Object.keys(this._layers))){let i=this._layers[t];
51"custom"!==i.type&&(e[t]=i.serialize())}return e}hasTransitions(){var e,t,i;if((null==(e=this.light)?void 0:e.hasTransition())||(null==(t=this.sky)?void 0:t.hasTransition())||(null==(i=this.projection)?void 0:i.hasTransition()))return!0;for(let e in this.sourceCaches)if(this.sourceCaches[e].hasTransition())return!0;for(let e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw Error("Style is not done loading.")}update(e){if(!this._loaded)return;let i=this._changed;if(i){let t=Object.keys(this._updatedLayers),i=Object.keys(this._removedLayers);for(let e in(t.length||i.length)&&this._updateWorkerLayers(t,i),this._updatedSources){let t=this._updatedSources[e];if("reload"===t)this._reloadSource(e);else{if("clear"!==t)throw Error(`Invalid action ${t}`);this._clearSource(e)}}for(let t in this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs(),this._updatedPaintProps)this._layers[t].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}let r={};for(let e in this.sourceCaches){let t=this.sourceCaches[e];r[e]=t.used,t.used=!1}for(let t of this._order){let i=this._layers[t];i.recalculate(e,this._availableImages),!i.isHidden(e.zoom)&&i.source&&(this.sourceCaches[i.source].used=!0)}for(let e in r){let i=this.sourceCaches[e];!!r[e]!=!!i.used&&i.fire(new t.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:e}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,i&&this.fire(new t.l("data",{dataType:"style"}))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,i={}){var r;this._checkLoaded();let a=this.serialize();if(e=i.transformStyle?i.transformStyle(a,e):e,(null==(r=i.validate)||r)&&tG(this,t.z(e)))return!1;(e=t.bJ(e)).layers=t.bH(e.layers);let n=t.bK(a,e),o=this._getOperationsToPerform(n);if(o.unimplemented.length>0)throw Error(`Unimplemented: ${o.unimplemented.join(", ")}.`);if(0===o.operations.length)return!1;for(let e of o.operations)e();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){let t=[],i=[];for(let r of e)switch(r.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":t.push(()=>this.addLayer.apply(this,r.args));break;case"removeLayer":t.push(()=>this.removeLayer.apply(this,r.args));break;case"setPaintProperty":t.push(()=>this.setPaintProperty.apply(this,r.args));break;case"setLayoutProperty":t.push(()=>this.setLayoutProperty.apply(this,r.args));break;case"setFilter":t.push(()=>this.setFilter.apply(this,r.args));break;case"addSource":t.push(()=>this.addSource.apply(this,r.args));break;case"removeSource":t.push(()=>this.removeSource.apply(this,r.args));break;case"setLayerZoomRange":t.push(()=>this.setLayerZoomRange.apply(this,r.args));break;case"setLight":t.push(()=>this.setLight.apply(this,r.args));break;case"setGeoJSONSourceData":t.push(()=>this.setGeoJSONSourceData.apply(this,r.args));break;case"setGlyphs":t.push(()=>this.setGlyphs.apply(this,r.args));break;case"setSprite":t.push(()=>this.setSprite.apply(this,r.args));break;case"setTerrain":t.push(()=>this.map.setTerrain.apply(this,r.args));break;case"setSky":t.push(()=>this.setSky.apply(this,r.args));break;case"setProjection":this.setProjection.apply(this,r.args);break;case"setGlobalState":t.push(()=>this.setGlobalState.apply(this,r.args));break;case"setTransition":t.push(()=>{});break;default:i.push(r.command)}return{operations:t,unimplemented:i}}addImage(e,i){if(this.getImage(e))return this.fire(new t.k(Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,i),this._afterImageUpdated(e)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new t.k(Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.l("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,i,r={}){if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw Error(`Source "${e}" already exists.`);if(!i.type)throw Error(`The type property must be defined, but only the following properties were given: ${Ob
51ject.keys(i).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(i.type)>=0&&this._validate(t.z.source,`sources.${e}`,i,null,r))return;this.map&&this.map._collectResourceTiming&&(i.collectResourceTiming=!0);let a=this.sourceCaches[e]=new eg(e,i,this.dispatcher);a.style=this,a.setEventedParent(this,()=>({isSourceLoaded:a.loaded(),source:a.serialize(),sourceId:e})),a.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw Error("There is no source with this ID");for(let i in this._layers)if(this._layers[i].source===e)return this.fire(new t.k(Error(`Source "${e}" cannot be removed while layer "${i}" is using it.`)));let i=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],i.fire(new t.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw Error(`There is no source with this ID=${e}`);let i=this.sourceCaches[e].getSource();if("geojson"!==i.type)throw Error(`geojsonSource.type is ${i.type}, which is !== 'geojson`);i.setData(t),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,i,r={}){let a;this._checkLoaded();let n=e.id;if(this.getLayer(n))return void this.fire(new t.k(Error(`Layer "${n}" already exists on this map.`)));if("custom"===e.type){if(tG(this,t.bL(e)))return;a=t.bI(e)}else{if("source"in e&&"object"==typeof e.source&&(this.addSource(n,e.source),e=t.bJ(e),e=t.e(e,{source:n})),this._validate(t.z.layer,`layers.${n}`,e,{arrayIndex:-1},r))return;a=t.bI(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:n}})}let o=i?this._order.indexOf(i):this._order.length;if(i&&-1===o)this.fire(new t.k(Error(`Cannot add layer "${n}" before non-existing layer "${i}".`)));else{if(this._order.splice(o,0,n),this._layerOrderChanged=!0,this._layers[n]=a,this._removedLayers[n]&&a.source&&"custom"!==a.type){let e=this._removedLayers[n];delete this._removedLayers[n],e.type!==a.type?this._updatedSources[a.source]="clear":(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause())}this._updateLayer(a),a.onAdd&&a.onAdd(this.map)}}moveLayer(e,i){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new t.k(Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===i)return;let r=this._order.indexOf(e);this._order.splice(r,1);let a=i?this._order.indexOf(i):this._order.length;i&&-1===a?this.fire(new t.k(Error(`Cannot move layer "${e}" before non-existing layer "${i}".`))):(this._order.splice(a,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();let i=this._layers[e];if(!i)return void this.fire(new t.k(Error(`Cannot remove non-existing layer "${e}".`)));i.setEventedParent(null);let r=this._order.indexOf(e);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=i,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],i.onRemove&&i.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,i,r){this._checkLoaded();let a=this.getLayer(e);a?a.minzoom===i&&a.maxzoom===r||(null!=i&&(a.minzoom=i),null!=r&&(a.maxzoom=r),this._updateLayer(a)):this.fire(new t.k(Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,i,r={}){this._checkLoaded();let a=this.getLayer(e);if(a){if(!t.bG(a.filter,i))return null==i?(a.setFilter(void 0),void this._updateLayer(a)):void(this._validate(t.z.filter,`layers.${a.id}.filter`,i,null,r)||(a.setFilter(t.bJ(i)),this._updateLayer(a)))}else this.fire(new t.k(Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return t.bJ(this.getLayer(e).filter)}setLayoutProperty(e,i,r,a={}){this._checkLoaded();let n=this.getLayer(e);n?t.bG(n.getLayoutProperty(i),r)||(n.setLayoutProperty(i,r,a),this._updateLayer(n)):this.fire(new t.k(Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,i){let r=this.getLayer(e);if(r)return r.getLayoutProperty(i);this.fire(new t.k(Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,i,r,a={}){this._checkLoaded();let n=this.getLayer(e);n?t.bG(n.getPaintProperty(i),r)||(n.setPaintProperty(i,r,a)&&this._updateLayer(n),this._changed=!0,this._updatedPaintProps[e]=!0,this._serializedLayers=null):this.fire(new t.k(Error(`Cannot style non-existing layer "${e}".`)))}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,i){this._checkLoaded();let r=e.source,a=e.sourceLayer,n=this.sourceCaches[r];if(void 0===n)return void this.fire(new t.k(Error(`The source '${r}' does not exist in the map's style.`)));
51let o=n.getSource().type;"geojson"===o&&a?this.fire(new t.k(Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||a?(void 0===e.id&&this.fire(new t.k(Error("The feature id parameter must be provided."))),n.setFeatureState(a,e.id,i)):this.fire(new t.k(Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,i){this._checkLoaded();let r=e.source,a=this.sourceCaches[r];if(void 0===a)return void this.fire(new t.k(Error(`The source '${r}' does not exist in the map's style.`)));let n=a.getSource().type,o="vector"===n?e.sourceLayer:void 0;"vector"!==n||o?i&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.k(Error("A feature id is required to remove its specific state property."))):a.removeFeatureState(o,e.id,i):this.fire(new t.k(Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();let i=e.source,r=e.sourceLayer,a=this.sourceCaches[i];if(void 0!==a)return"vector"!==a.getSource().type||r?(void 0===e.id&&this.fire(new t.k(Error("The feature id parameter must be provided."))),a.getFeatureState(r,e.id)):void this.fire(new t.k(Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.k(Error(`The source '${i}' does not exist in the map's style.`)))}getTransition(){return t.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let e=t.bM(this.sourceCaches,e=>e.serialize()),i=this._serializeByIds(this._order,!0),r=this.map.getTerrain()||void 0,a=this.stylesheet;return t.bN({version:a.version,name:a.name,metadata:a.metadata,light:a.light,sky:a.sky,center:a.center,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,sprite:a.sprite,glyphs:a.glyphs,transition:a.transition,projection:a.projection,sources:e,layers:i,terrain:r},e=>void 0!==e)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let t=e=>"fill-extrusion"===this._layers[e].type,i={},r=[];for(let a=this._order.length-1;a>=0;a--){let n=this._order[a];if(t(n))for(let t of(i[n]=a,e)){let e=t[n];if(e)for(let t of e)r.push(t)}}r.sort((e,t)=>t.intersectionZ-e.intersectionZ);let a=[];for(let n=this._order.length-1;n>=0;n--){let o=this._order[n];if(t(o))for(let e=r.length-1;e>=0;e--){let t=r[e].feature;if(i[t.layer.id]<n)break;a.push(t),r.pop()}else for(let t of e){let e=t[o];if(e)for(let t of e)a.push(t.feature)}}return a}queryRenderedFeatures(e,i,r){i&&i.filter&&this._validate(t.z.filter,"queryRenderedFeatures.filter",i.filter,null,i);let a={};if(i&&i.layers){if(!(Array.isArray(i.layers)||i.layers instanceof Set))return this.fire(new t.k(Error("parameters.layers must be an Array or a Set of strings"))),[];for(let e of i.layers){let i=this._layers[e];if(!i)return this.fire(new t.k(Error(`The layer '${e}' does not exist in the map's style and cannot be queried for features.`))),[];a[i.source]=!0}}let n=[];i.availableImages=this._availableImages;let o=this._serializedAllLayers(),l=i.layers instanceof Set?i.layers:Array.isArray(i.layers)?new Set(i.layers):null,s=Object.assign(Object.assign({},i),{layers:l});for(let l in this.sourceCaches)i.layers&&!a[l]||n.push(function(e,i,r,a,n,o,l){let s=function(e,t,i){if(e)for(let r of e){let e=t[r];if(e&&e.source===i&&"fill-extrusion"===e.type)return!0}else for(let e in t){let r=t[e];if(r.source===i&&"fill-extrusion"===r.type)return!0}return!1}(null!=(p=null==n?void 0:n.layers)?p:null,i,e.id),c=o.maxPitchScaleFactor(),u=e.tilesIn(a,c,s);u.sort(j);let h=[];for(let a of u)h.push({wrappedTileID:a.tileID.wrapped().key,queryResults:a.tile.queryRenderedFeatures(i,r,e._state,a.queryGeometry,a.cameraQueryGeometry,a.scale,n,o,c,function(e,i){let r=t.L();return t.M(r,r,[1,1,0]),t.N(r,r,[.5*e.width,.5*e.height,1]),e.calculatePosMatrix?t.O(r,r,e.calculatePosMatrix(i.toUnwrapped())):r}(e.transform,a.tileID),l?(e,t)=>l(a.tileID,e,t):void 0)});var p,d=function(e){let t={},i={};for(let r of e){let e=r.queryResults,a=r.wrappedTileID,n=i[a]=i[a]||{};for(let i in e){let r=e[i],a=n[i]=n[i]||{},o=t[i]=t[i]||[];for(let e of r)a[e.featureIndex]||(a[e.featureIndex]=!0,o.push(e))}}return t}(h);for(let t in d)for(let i of d[t])B(i,e);return d}(this.sourceCaches[l],this._layers,o,e,s,r,this.map.terrain?(e,t,i)=>this.map.terrain.getElevation(e,t,i):void 0));return this.placement&&n.push(function(e,t,i,r,a,n,o){let l={},s=n.queryRenderedSymbols(r),c=[];for(let e of Object.keys(s).map(Number))c.push(o[e]);for(let i of(c.sort(j),c)){let r=i.featureIndex.lookupSymbolFeatures(s[i.bucketInstanceId],t,i.bucketIndex,i.sourceLayerIndex,a.filter,a.layers,a.availableImages,e);for(let e in r){let t=l[e]=l[e]||[],a=r[e];for(let e of(a.sort((e,t)=>
51{let r=i.featureSortOrder;if(r){let i=r.indexOf(e.featureIndex);return r.indexOf(t.featureIndex)-i}return t.featureIndex-e.featureIndex}),a))t.push(e)}}for(let t in l)for(let r of l[t])B(r,i[e[t].source]);return l}(this._layers,o,this.sourceCaches,e,s,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(n)}querySourceFeatures(e,i){i&&i.filter&&this._validate(t.z.filter,"querySourceFeatures.filter",i.filter,null,i);let r=this.sourceCaches[e];return r?function(e,t){let i=e.getRenderableIds().map(t=>e.getTileByID(t)),r=[],a={};for(let e=0;e<i.length;e++){let n=i[e],o=n.tileID.canonical.key;a[o]||(a[o]=!0,n.querySourceFeatures(r,t))}return r}(r,i):[]}getLight(){return this.light.getLight()}setLight(e,i={}){this._checkLoaded();let r=this.light.getLight(),a=!1;for(let i in e)if(!t.bG(e[i],r[i])){a=!0;break}if(!a)return;let n={now:p.now(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,i),this.light.updateTransitions(n)}getProjection(){var e;return null==(e=this.stylesheet)?void 0:e.projection}setProjection(e){if(this._checkLoaded(),this.projection){if(this.projection.name===e.type)return;this.projection.destroy(),delete this.projection}this.stylesheet.projection=e,this._setProjectionInternal(e.type)}getSky(){var e;return null==(e=this.stylesheet)?void 0:e.sky}setSky(e,i={}){this._checkLoaded();let r=this.getSky(),a=!1;if(!e&&!r)return;if(e&&!r)a=!0;else if(!e&&r)a=!0;else for(let i in e)if(!t.bG(e[i],r[i])){a=!0;break}if(!a)return;let n={now:p.now(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,i),this.sky.updateTransitions(n)}_setProjectionInternal(e){let i=function(e){if(Array.isArray(e)){let t=new tS({type:e});return{projection:t,transform:new tV,cameraHelper:new tZ(t)}}switch(e){case"mercator":return{projection:new e9,transform:new tl,cameraHelper:new th};case"globe":{let e=new tS({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:e,transform:new tV,cameraHelper:new tZ(e)}}case"vertical-perspective":return{projection:new tw,transform:new tU,cameraHelper:new t$};default:return t.w(`Unknown projection name: ${e}. Falling back to mercator projection.`),{projection:new e9,transform:new tl,cameraHelper:new th}}}(e);for(let e in this.projection=i.projection,this.map.migrateProjection(i.transform,i.cameraHelper),this.sourceCaches)this.sourceCaches[e].reload()}_validate(e,i,r,a,n={}){return(!n||!1!==n.validate)&&tG(this,e.call(t.z,t.e({key:i,style:this.serialize(),value:r,styleSpec:t.v},a)))}_remove(e=!0){for(let e in this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),et().off(J,this._rtlPluginLoaded),this._layers)this._layers[e].setEventedParent(null);for(let e in this.sourceCaches){let t=this.sourceCaches[e];t.setEventedParent(null),t.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.sourceCaches[e].clearTiles()}_reloadSource(e){this.sourceCaches[e].resume(),this.sourceCaches[e].reload()}_updateSources(e){for(let t in this.sourceCaches)this.sourceCaches[t].update(e,this.map.terrain)}_generateCollisionBoxes(){for(let e in this.sourceCaches)this._reloadSource(e)}_updatePlacement(e,t,i,r,a=!1){let n=!1,o=!1,l={};for(let t of this._order){let i=this._layers[t];if("symbol"!==i.type)continue;if(!l[i.source]){let e=this.sourceCaches[i.source];l[i.source]=e.getRenderableIds(!0).map(t=>e.getTileByID(t)).sort((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1))}let r=this.crossTileSymbolIndex.addLayer(i,l[i.source],e.center.lng);n=n||r}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((a=a||this._layerOrderChanged||0===i)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(p.now(),e.zoom))&&(this.pauseablePlacement=new eY(e,this.map.terrain,this._order,a,t,i,r,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(p.now()),o=!0),n&&this.pauseablePlacement.placement.setStale()),o||n)for(let e of this._order){let t=this._layers[e];
51"symbol"===t.type&&this.placement.updateLayerOpacities(t,l[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(p.now())}_releaseSymbolFadeTiles(){for(let e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,i){return t._(this,void 0,void 0,function*(){let e=yield this.imageManager.getImages(i.icons);this._updateTilesForChangedImages();let t=this.sourceCaches[i.source];return t&&t.setDependencies(i.tileID.key,i.type,i.icons),e})}getGlyphs(e,i){return t._(this,void 0,void 0,function*(){let e=yield this.glyphManager.getGlyphs(i.stacks),t=this.sourceCaches[i.source];return t&&t.setDependencies(i.tileID.key,i.type,[""]),e})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,i={}){this._checkLoaded(),e&&this._validate(t.z.glyphs,"glyphs",e,null,i)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}addSprite(e,i,r={},a){this._checkLoaded();let n=[{id:e,url:i}],o=[...v(this.stylesheet.sprite),...n];this._validate(t.z.sprite,"sprite",o,null,r)||(this.stylesheet.sprite=o,this._loadSprite(n,!0,a))}removeSprite(e){this._checkLoaded();let i=v(this.stylesheet.sprite);if(i.find(t=>t.id===e)){if(this._spritesImagesIds[e])for(let t of this._spritesImagesIds[e])this.imageManager.removeImage(t),this._changedImages[t]=!0;i.splice(i.findIndex(t=>t.id===e),1),this.stylesheet.sprite=i.length>0?i:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.l("data",{dataType:"style"}))}else this.fire(new t.k(Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return v(this.stylesheet.sprite)}setSprite(e,i={},r){this._checkLoaded(),e&&this._validate(t.z.sprite,"sprite",e,null,i)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,r):(this._unloadSprite(),r&&r(null)))}}var tW=t.aI([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class tX{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,i,r,a,n,o,l,s){this.context=e;let c=this.boundPaintVertexBuffers.length!==r.length;for(let e=0;!c&&e<r.length;e++)this.boundPaintVertexBuffers[e]!==r[e]&&(c=!0);!this.vao||this.boundProgram!==t||this.boundLayoutVertexBuffer!==i||c||this.boundIndexBuffer!==a||this.boundVertexOffset!==n||this.boundDynamicVertexBuffer!==o||this.boundDynamicVertexBuffer2!==l||this.boundDynamicVertexBuffer3!==s?this.freshBind(t,i,r,a,n,o,l,s):(e.bindVertexArray.set(this.vao),o&&o.bind(),a&&a.dynamicDraw&&a.bind(),l&&l.bind(),s&&s.bind())}freshBind(e,t,i,r,a,n,o,l){let s=e.numAttributes,c=this.context,u=c.gl;for(let s of(this.vao&&this.destroy(),this.vao=c.createVertexArray(),c.bindVertexArray.set(this.vao),this.boundProgram=e,this.boundLayoutVertexBuffer=t,this.boundPaintVertexBuffers=i,this.boundIndexBuffer=r,this.boundVertexOffset=a,this.boundDynamicVertexBuffer=n,this.boundDynamicVertexBuffer2=o,this.boundDynamicVertexBuffer3=l,t.enableAttributes(u,e),i))s.enableAttributes(u,e);for(let r of(n&&n.enableAttributes(u,e),o&&o.enableAttributes(u,e),l&&l.enableAttributes(u,e),t.bind(),t.setVertexAttribPointers(u,e,a),i))r.bind(),r.setVertexAttribPointers(u,e,a);n&&(n.bind(),n.setVertexAttribPointers(u,e,a)),r&&r.bind(),o&&(o.bind(),o.setVertexAttribPointers(u,e,a)),l&&(l.bind(),l.setVertexAttribPointers(u,e,a)),c.currentNumAttributes=s}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}let tY=(e,i,r,a,n)=>({u_texture:0,u_ele_delta:e,u_fog_matrix:i,u_fog_color:r?r.properties.get("fog-color"):t.be.white,u_fog_ground_blend:r?r.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:n?0:r?r.calculateFogBlendOpacity(a):0,u_horizon_color:r?r.properties.get("horizon-color"):t.be.white,u_horizon_fog_blend:r?r.properties.get("horizon-fog-blend"):1,u_is_globe_mode:+!!n}),tK={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 tJ(e){let t=[];for(let i=0;i<e.length;i++){if(null===e[i])continue;let r=e[i].split(" ");t.push(r.pop())}return t}class tQ{constructor(e,i,r,a,n,o,l,s,c=[]){let u=e.gl;this.program=u.createProgram();let h=tJ(i.staticAttributes),p=r?r.getBinderAttributes():[],d=h.concat(p),f=e3.prelude.staticUniforms?tJ(e3.prelude.staticUniforms):[],m=l.staticUniforms?tJ(l.staticUniforms):[],g=i.staticUniforms?tJ(i.staticUniforms):[],y=r?r.getBinderUniforms():[],_=f.concat(m).concat(g).concat(y),b=[];for(let e of _)0>b.indexOf(e)&&b.push(e);let x=r?r.defines():[];ty(u)&&x.unshift("#version 300 es"),n&&x.push("#define OVERDRAW_INSPECTOR;"),o&&x.push("#define TERRAIN3D;"),s&&x.push(s),c&&x.push(...c);let v=x.concat(e3.prelude.fragmentSource,l.fragmentSource,i.fragmentSource).join("\n"),w=x.concat(e3.prelude.vertexSource,l.vertexSource,i.vertexSource).join("\n");ty(u)||(v=v.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D("),w=w.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D("));let z=u.createShader(u.FRAGMENT_SHADER);if(u.isContextLost())return void(this.failedToCreate=!0);if(u.shaderSource(z,v),u.compileShader(z),!u.getShaderParameter(z,u.COMPILE_STATUS))throw Error(`Could not compile fragment shader: ${u.getShaderInfoLog(z)}`);u.attachShader(this.program,z);let S=u.createShader(u.VERTEX_SHADER);if(u.isContextLost())return void(this.failedToCreate=!0);if(u.shaderSource(S,w),u.compileShader(S),!u.getShaderParameter(S,u.COMPILE_STATUS))throw Error(`Could not compile vertex shader: ${u.getShaderInfoLog(S)}`);u.attachShader(this.program,S),this.attributes={};let T={};this.numAttributes=d.length;for(let e=0;e<this.numAttributes;e++)d[e]&&(u.bindAttribLocation(this.program,e,d[e]),this.attributes[d[e]]=e);if(u.linkProgram(this.program),!u.getProgramParameter(this.program,u.
51LINK_STATUS))throw Error(`Program failed to link: ${u.getProgramInfoLog(this.program)}`);u.deleteShader(S),u.deleteShader(z);for(let e=0;e<b.length;e++){let t=b[e];if(t&&!T[t]){let e=u.getUniformLocation(this.program,t);e&&(T[t]=e)}}this.fixedUniforms=a(e,T),this.terrainUniforms=((e,i)=>({u_depth:new t.bO(e,i.u_depth),u_terrain:new t.bO(e,i.u_terrain),u_terrain_dim:new t.bf(e,i.u_terrain_dim),u_terrain_matrix:new t.bQ(e,i.u_terrain_matrix),u_terrain_unpack:new t.bR(e,i.u_terrain_unpack),u_terrain_exaggeration:new t.bf(e,i.u_terrain_exaggeration)}))(e,T),this.projectionUniforms=((e,i)=>({u_projection_matrix:new t.bQ(e,i.u_projection_matrix),u_projection_tile_mercator_coords:new t.bR(e,i.u_projection_tile_mercator_coords),u_projection_clipping_plane:new t.bR(e,i.u_projection_clipping_plane),u_projection_transition:new t.bf(e,i.u_projection_transition),u_projection_fallback_matrix:new t.bQ(e,i.u_projection_fallback_matrix)}))(e,T),this.binderUniforms=r?r.getUniforms(e,T):[]}draw(e,t,i,r,a,n,o,l,s,c,u,h,p,d,f,m,g,y,_){let b=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(i),e.setStencilMode(r),e.setColorMode(a),e.setCullFace(n),l)for(let t in e.activeTexture.set(b.TEXTURE2),b.bindTexture(b.TEXTURE_2D,l.depthTexture),e.activeTexture.set(b.TEXTURE3),b.bindTexture(b.TEXTURE_2D,l.texture),this.terrainUniforms)this.terrainUniforms[t].set(l[t]);if(s)for(let e in s)this.projectionUniforms[tK[e]].set(s[e]);if(o)for(let e in this.fixedUniforms)this.fixedUniforms[e].set(o[e]);m&&m.setUniforms(e,this.binderUniforms,d,{zoom:f});let x=0;switch(t){case b.LINES:x=2;break;case b.TRIANGLES:x=3;break;case b.LINE_STRIP:x=1}for(let i of p.get()){let r=i.vaos||(i.vaos={});(r[c]||(r[c]=new tX)).bind(e,this,u,m?m.getPaintVertexBuffers():[],h,i.vertexOffset,g,y,_),b.drawElements(t,i.primitiveLength*x,b.UNSIGNED_SHORT,i.primitiveOffset*x*2)}}}function t1(e,i,r){let a=1/t.aB(r,1,i.transform.tileZoom),n=Math.pow(2,r.tileID.overscaledZ),o=r.tileSize*Math.pow(2,i.transform.tileZoom)/n,l=o*(r.tileID.canonical.x+r.tileID.wrap*n),s=o*r.tileID.canonical.y;return{u_image:0,u_texsize:r.imageAtlasTexture.size,u_scale:[a,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[l>>16,s>>16],u_pixel_coord_lower:[65535&l,65535&s]}}let t0=(e,i,r,a)=>{let n=e.style.light,o=n.properties.get("position"),l=[o.x,o.y,o.z],s=t.bU();"viewport"===n.properties.get("anchor")&&t.bV(s,e.transform.bearingInRadians),t.bW(l,l,s);let c=e.transform.transformLightDirection(l),u=n.properties.get("color");return{u_lightpos:l,u_lightpos_globe:c,u_lightintensity:n.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+i,u_opacity:r,u_fill_translate:a}},t2=(e,i,r,a,n,o,l)=>t.e(t0(e,i,r,a),t1(o,e,l),{u_height_factor:-Math.pow(2,n.overscaledZ)/l.tileSize/8}),t3=(e,i,r,a)=>t.e(t1(i,e,r),{u_fill_translate:a}),t5=(e,t)=>({u_world:e,u_fill_translate:t}),t6=(e,i,r,a,n)=>t.e(t3(e,i,r,n),{u_world:a}),t4=(e,i,r,a,n)=>{let o=e.transform,l,s,c=0;if("map"===r.paint.get("circle-pitch-alignment")){let e=t.aB(i,1,o.zoom);l=!0,s=[e,e],c=e/(t.$*Math.pow(2,i.tileID.overscaledZ))*2*Math.PI*n}else l=!1,s=o.pixelsToGLUnits;return{u_camera_to_center_distance:o.cameraToCenterDistance,u_scale_with_map:+("map"===r.paint.get("circle-pitch-scale")),u_pitch_with_map:+l,u_device_pixel_ratio:e.pixelRatio,u_extrude_scale:s,u_globe_extrude_scale:c,u_translate:a}},t8=e=>({u_pixel_extrude_scale:[1/e.width,1/e.height]}),t7=e=>({u_viewport_size:[e.width,e.height]}),t9=(e,t=1)=>({u_color:e,u_overlay:0,u_overlay_scale:t}),ie=(e,i,r,a)=>{let n=t.aB(e,1,i)/(t.$*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*a;return{u_extrude_scale:t.aB(e,1,i),u_intensity:r,u_globe_extrude_scale:n}},it=(e,i,r,a)=>{let n=t.L();t.bX(n,0,e.width,e.height,0,0,1);let o=e.context.gl;return{u_matrix:n,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:r,u_color_ramp:a,u_opacity:i.paint.get("heatmap-opacity")}},ii=(e,i,r)=>{let a,n=r.paint.get("hillshade-accent-color");switch(r.paint.get("hillshade-method")){case"basic":a=4;break;case"combined":a=1;break;case"igor":a=2;break;case"multidirectional":a=3;break;default:a=0}let o=r.getIlluminationProperties();for(let t=0;t<o.directionRadians.length;t++)"viewport"===r.paint.get("hillshade-illumination-anchor")&&(o.directionRadians[t]+=e.transform.bearingInRadians);return{u_image:0,u_latrange:function(e,i){let r=Math.pow(2,i.canonical.z),a=i.canonical.y;return[new t.a0(0,a/r).toLngLat().lat,new t.a0(0,(a+1)/r).toLngLat().lat]}(0,i.tileID),u_exaggeration:r.paint.get("hillshade-exaggeration"),u_altitudes:o.altitudeRadians,u_azimuths:o.directionRadians,u_accent:n,u_method:a,u_highlights:o.highlightColor,u_shadows:o.shadowColor}},ir=(e,i)=>{let r=i.stride,a=t.L();return t.bX(a,0,t.$,-t.$,0,0,1),t.M(a,a,[0,-t.$,0]),{u_matrix:a,u_image:1,u_dimension:[r,r],u_zoom:e.overscaledZ,u_unpack:i.getUnpackVector()}},ia=(e,t,i=0)=>({u_image:0,u_unpack:t.getUnpackVector(),u_dimension:[t.stride,t.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:i,u_opacity:e.paint.get("color-relief-opacity")}),io=(e,i,r,a)=>{let n=e.transform;return{u_translation:ih(e,i,r),u_ratio:a/t.aB(i,1,n.zoom),u_device_pixel_ratio:e.pixelRatio,u_units_to_pixels:[1/n.pixelsToGLUnits[0],1/n.pixelsToGLUnits[1]]}},il=(e,i,r,a,n)=>t.e(io(e,i,r,a),{u_image:0,u_image_height:n}),is=(e,i,r,a,n)=>{let o=e.transform,l=iu(i,o);return{u_translation:ih(e,i,r),u_texsize:i.imageAtlasTexture.size,u_ratio:a/t.aB(i,1,o.zoom),u_device_pixel_ratio:e.pixelRatio,u_image:0,u_scale:[l,n.fromScale,n.toScale],u_fade:n.t,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},ic=(e,i,r,a,n,o)=>
51{let l=e.lineAtlas,s=iu(i,e.transform),c="round"===r.layout.get("line-cap"),u=l.getDash(n.from,c),h=l.getDash(n.to,c),p=u.width*o.fromScale,d=h.width*o.toScale;return t.e(io(e,i,r,a),{u_patternscale_a:[s/p,-u.height/2],u_patternscale_b:[s/d,-h.height/2],u_sdfgamma:l.width/(256*Math.min(p,d)*e.pixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:h.y,u_mix:o.t})};function iu(e,i){return 1/t.aB(e,1,i.tileZoom)}function ih(e,i,r){return t.aC(e.transform,i,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}let ip=(e,t,i,r,a)=>{var n,o;return{u_tl_parent:e,u_scale_parent:t,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.opacity*r.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:r.paint.get("raster-brightness-min"),u_brightness_high:r.paint.get("raster-brightness-max"),u_saturation_factor:(o=r.paint.get("raster-saturation"))>0?1-1/(1.001-o):-o,u_contrast_factor:(n=r.paint.get("raster-contrast"))>0?1/(1-n):1+n,u_spin_weights:function(e){let t=Math.sin(e*=Math.PI/180),i=Math.cos(e);return[(2*i+1)/3,(-Math.sqrt(3)*t-i+1)/3,(Math.sqrt(3)*t-i+1)/3]}(r.paint.get("raster-hue-rotate")),u_coords_top:[a[0].x,a[0].y,a[1].x,a[1].y],u_coords_bottom:[a[3].x,a[3].y,a[2].x,a[2].y]}},id=(e,t,i,r,a,n,o,l,s,c,u,h,p)=>{let d=o.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:d.cameraToCenterDistance,u_pitch:d.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:d.width/d.height,u_fade_change:o.options.fadeDuration?o.symbolFadeChange:1,u_label_plane_matrix:l,u_coord_matrix:s,u_is_text:+u,u_pitch_with_map:+r,u_is_along_line:a,u_is_variable_anchor:n,u_texsize:h,u_texture:0,u_translation:c,u_pitched_scale:p}},im=(e,i,r,a,n,o,l,s,c,u,h,p,d,f)=>{let m=l.transform;return t.e(id(e,i,r,a,n,o,l,s,c,u,h,p,f),{u_gamma_scale:a?Math.cos(m.pitch*Math.PI/180)*m.cameraToCenterDistance:1,u_device_pixel_ratio:l.pixelRatio,u_is_halo:1})},ig=(e,i,r,a,n,o,l,s,c,u,h,p,d)=>t.e(im(e,i,r,a,n,o,l,s,c,u,!0,h,0,d),{u_texsize_icon:p,u_texture_icon:1}),iy=(e,t)=>({u_opacity:e,u_color:t}),i_=(e,i,r,a,n)=>t.e(function(e,i,r,a){let n=r.imageManager.getPattern(e.from.toString()),o=r.imageManager.getPattern(e.to.toString()),{width:l,height:s}=r.imageManager.getPixelSize(),c=Math.pow(2,a.tileID.overscaledZ),u=a.tileSize*Math.pow(2,r.transform.tileZoom)/c,h=u*(a.tileID.canonical.x+a.tileID.wrap*c),p=u*a.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:n.tl,u_pattern_br_a:n.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[l,s],u_mix:i.t,u_pattern_size_a:n.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:i.fromScale,u_scale_b:i.toScale,u_tile_units_to_pixels:1/t.aB(a,1,r.transform.tileZoom),u_pixel_coord_upper:[h>>16,p>>16],u_pixel_coord_lower:[65535&h,65535&p]}}(r,n,i,a),{u_opacity:e}),ib=(e,t)=>{},ix={fillExtrusion:(e,i)=>({u_lightpos:new t.bS(e,i.u_lightpos),u_lightpos_globe:new t.bS(e,i.u_lightpos_globe),u_lightintensity:new t.bf(e,i.u_lightintensity),u_lightcolor:new t.bS(e,i.u_lightcolor),u_vertical_gradient:new t.bf(e,i.u_vertical_gradient),u_opacity:new t.bf(e,i.u_opacity),u_fill_translate:new t.bT(e,i.u_fill_translate)}),fillExtrusionPattern:(e,i)=>({u_lightpos:new t.bS(e,i.u_lightpos),u_lightpos_globe:new t.bS(e,i.u_lightpos_globe),u_lightintensity:new t.bf(e,i.u_lightintensity),u_lightcolor:new t.bS(e,i.u_lightcolor),u_vertical_gradient:new t.bf(e,i.u_vertical_gradient),u_height_factor:new t.bf(e,i.u_height_factor),u_opacity:new t.bf(e,i.u_opacity),u_fill_translate:new t.bT(e,i.u_fill_translate),u_image:new t.bO(e,i.u_image),u_texsize:new t.bT(e,i.u_texsize),u_pixel_coord_upper:new t.bT(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.bT(e,i.u_pixel_coord_lower),u_scale:new t.bS(e,i.u_scale),u_fade:new t.bf(e,i.u_fade)}),fill:(e,i)=>({u_fill_translate:new t.bT(e,i.u_fill_translate)}),fillPattern:(e,i)=>({u_image:new t.bO(e,i.u_image),u_texsize:new t.bT(e,i.u_texsize),u_pixel_coord_upper:new t.bT(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.bT(e,i.u_pixel_coord_lower),u_scale:new t.bS(e,i.u_scale),u_fade:new t.bf(e,i.u_fade),u_fill_translate:new t.bT(e,i.u_fill_translate)}),fillOutline:(e,i)=>({u_world:new t.bT(e,i.u_world),u_fill_translate:new t.bT(e,i.u_fill_translate)}),fillOutlinePattern:(e,i)=>({u_world:new t.bT(e,i.u_world),u_image:new t.bO(e,i.u_image),u_texsize:new t.bT(e,i.u_texsize),u_pixel_coord_upper:new t.bT(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.bT(e,i.u_pixel_coord_lower),u_scale:new t.bS(e,i.u_scale),u_fade:new t.bf(e,i.u_fade),u_fill_translate:new t.bT(e,i.u_fill_translate)}),circle:(e,i)=>({u_camera_to_center_distance:new t.bf(e,i.u_camera_to_center_distance),u_scale_with_map:new t.bO(e,i.u_scale_with_map),u_pitch_with_map:new t.bO(e,i.u_pitch_with_map),u_extrude_scale:new t.bT(e,i.u_extrude_scale),u_device_pixel_ratio:new t.bf(e,i.u_device_pixel_ratio),u_globe_extrude_scale:new t.bf(e,i.u_globe_extrude_scale),u_translate:new t.bT(e,i.u_translate)}),collisionBox:(e,i)=>({u_pixel_extrude_scale:new t.bT(e,i.u_pixel_extrude_scale)}),collisionCircle:(e,i)=>({u_viewport_size:new t.bT(e,i.u_viewport_size)}),debug:(e,i)=>({u_color:new t.bP(e,i.u_color),u_overlay:new t.bO(e,i.u_overlay),u_overlay_scale:new t.bf(e,i.u_overlay_scale)}),depth:ib,clippingMask:ib,heatmap:(e,i)=>({u_extrude_scale:new t.bf(e,i.u_extrude_scale),u_intensity:new t.bf(e,i.u_intensity),u_globe_extrude_scale:new t.bf(e,i.u_globe_extrude_scale)}),heatmapTexture:(e,i)=>({u_matrix:new t.bQ(e,i.u_matrix),u_world:new t.bT(e,i.u_world),u_image:new t.bO(e,i.u_image),u_color_ramp:new t.bO(e,i.u_color_ramp),u_opacity:new t.bf(e,i.u_opacity)}),hillshade:(e,i)=>({u_image:new t.bO(e,i.u_image),u_latrange:new t.bT(e,i.u_latrange),u_exaggeration:new t.bf(e,i.u_exaggeration),u_altitudes:new t.bZ(e,i.u_altitudes),u_azimuths:new t.bZ(e,i.u_azimuths),u_accent:new t.bP(e,i.u_accent),u_method:new t.bO(e,i.u_method),u_shadows:new t.bY(e,i.u_shadows),u_highlights:new t.bY(e,i.u_highlights)}),hillshadePrepare:(e,i)=>({u_matrix:new t.bQ(e,i.u_matrix),u_image:new t.bO(e,i.u_image),u_dimension:new t.bT(e,i.u_dimension),u_zoom:new t.bf(e,i.u_zoom),u_unpack:new t.bR(e,i.u_unpack)}),colorRelief:(e,i)=>({u_image:new t.bO(e,i.u_image),u_unpack:new t.bR(e,i.u_unpack),u_dimension:new t.bT(e,i.u_dimension),u_elevation_stops:new t.bO(e,i.u_elevation_stops),u_color_stops:new t.bO(e,i.u_color_stops),u_color_ramp_size:new t.bO(e,i.u_color_ramp_size),u_opacity:new t.bf(e,i.u_opacity)}),line:(e,i)=>({u_translation:new t.bT(e,i.u_translation),u_ratio:new t.bf(e,i.u_ratio),u_device_pixel_ratio:new t.bf(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.bT(e,i.u_units_to_pixels)}),lineGradient:(e,i)=>({u_translation:new t.bT(e,i.u_translation),u_ratio:new t.bf(e,i.u_ratio),u_device_pixel_ratio:new t.bf(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.bT(e,i.u_units_to_pixels),u_image:new t.bO(e,i.u_image),u_image_height:new t.bf(e,i.u_image_height)}),linePattern:(e,i)=>({u_translation:new t.bT(e,i.u_translation),u_texsize:new t.bT(e,i.u_texsize),u_ratio:new t.bf(e,i.u_ratio),u_device_pixel_ratio:new t.bf(e,i.u_device_pixel_ratio),u_image:new t.bO(e,i.u_image),u_units_to_pixels:new t.bT(e,i.u_units_to_pixels),u_scale:new t.bS(e,i.u_scale),u_fade:new t.bf(e,i.u_fade)}),lineSDF:(e,i)=>({u_translation:new t.bT(e,i.u_translation),u_ratio:new t.bf(e,i.u_ratio),u_device_pixel_ratio:new t.bf(e,i.u_device_pixel_ratio),u_units_to_pixels:new t.bT(e,i.u_units_to_pixels),u_patternscale_a:new t.bT(e,i.u_patternscale_a),u_patternscale_b:new t.bT(e,i.u_patternscale_b),u_sdfgamma:new t.bf(e,i.u_sdfgamma),u_image:new t.bO(e,i.u_image),u_tex_y_a:new t.bf(e,i.u_tex_y_a),u_tex_y_b:new t.bf(e,i.u_tex_y_b),u_mix:new t.bf(e,i.u_mix)}),raster:(e,i)=>({u_tl_parent:new t.bT(e,i.u_tl_parent),u_scale_parent:new t.bf(e,i.u_scale_parent),u_buffer_scale:new t.bf(e,i.u_buffer_scale),u_fade_t:new t.bf(e,i.u_fade_t),u_opacity:new t.bf(e,i.u_opacity),u_image0:new t.bO(e,i.u_image0),u_image1:new t.bO(e,i.u_image1),u_brightness_low:new t.bf(e,i.u_brightness_low),u_brightness_high:new t.bf(e,i.u_brightness_high),u_saturation_factor:new t.bf(e,i.u_saturation_factor),u_contrast_factor:new t.bf(e,i.u_contrast_factor),u_spin_weights:new t.bS(e,i.u_spin_weights),u_coords_top:new t.bR(e,i.u_coords_top),u_coords_bottom:new t.bR(e,i.u_coords_bottom)}),symbolIcon:(e,i)=>({u_is_size_zoom_constant:new t.bO(e,i.u_is_size_zoom_constant),u_is_size_feature_constant:new t.bO(e,i.u_is_size_feature_constant),u_size_t:new t.bf(e,i.u_size_t),u_size:new t.bf(e,i.u_size),u_camera_to_center_distance:new t.bf(e,i.u_camera_to_center_distance),u_pitch:new t.bf(e,i.u_pitch),u_rotate_symbol:new t.bO(e,i.u_rotate_symbol),u_aspect_ratio:new t.bf(e,i.u_aspect_ratio),u_fade_change:new t.bf(e,i.u_fade_change),u_label_plane_matrix:new t.bQ(e,i.u_label_plane_matrix
51),u_coord_matrix:new t.bQ(e,i.u_coord_matrix),u_is_text:new t.bO(e,i.u_is_text),u_pitch_with_map:new t.bO(e,i.u_pitch_with_map),u_is_along_line:new t.bO(e,i.u_is_along_line),u_is_variable_anchor:new t.bO(e,i.u_is_variable_anchor),u_texsize:new t.bT(e,i.u_texsize),u_texture:new t.bO(e,i.u_texture),u_translation:new t.bT(e,i.u_translation),u_pitched_scale:new t.bf(e,i.u_pitched_scale)}),symbolSDF:(e,i)=>({u_is_size_zoom_constant:new t.bO(e,i.u_is_size_zoom_constant),u_is_size_feature_constant:new t.bO(e,i.u_is_size_feature_constant),u_size_t:new t.bf(e,i.u_size_t),u_size:new t.bf(e,i.u_size),u_camera_to_center_distance:new t.bf(e,i.u_camera_to_center_distance),u_pitch:new t.bf(e,i.u_pitch),u_rotate_symbol:new t.bO(e,i.u_rotate_symbol),u_aspect_ratio:new t.bf(e,i.u_aspect_ratio),u_fade_change:new t.bf(e,i.u_fade_change),u_label_plane_matrix:new t.bQ(e,i.u_label_plane_matrix),u_coord_matrix:new t.bQ(e,i.u_coord_matrix),u_is_text:new t.bO(e,i.u_is_text),u_pitch_with_map:new t.bO(e,i.u_pitch_with_map),u_is_along_line:new t.bO(e,i.u_is_along_line),u_is_variable_anchor:new t.bO(e,i.u_is_variable_anchor),u_texsize:new t.bT(e,i.u_texsize),u_texture:new t.bO(e,i.u_texture),u_gamma_scale:new t.bf(e,i.u_gamma_scale),u_device_pixel_ratio:new t.bf(e,i.u_device_pixel_ratio),u_is_halo:new t.bO(e,i.u_is_halo),u_translation:new t.bT(e,i.u_translation),u_pitched_scale:new t.bf(e,i.u_pitched_scale)}),symbolTextAndIcon:(e,i)=>({u_is_size_zoom_constant:new t.bO(e,i.u_is_size_zoom_constant),u_is_size_feature_constant:new t.bO(e,i.u_is_size_feature_constant),u_size_t:new t.bf(e,i.u_size_t),u_size:new t.bf(e,i.u_size),u_camera_to_center_distance:new t.bf(e,i.u_camera_to_center_distance),u_pitch:new t.bf(e,i.u_pitch),u_rotate_symbol:new t.bO(e,i.u_rotate_symbol),u_aspect_ratio:new t.bf(e,i.u_aspect_ratio),u_fade_change:new t.bf(e,i.u_fade_change),u_label_plane_matrix:new t.bQ(e,i.u_label_plane_matrix),u_coord_matrix:new t.bQ(e,i.u_coord_matrix),u_is_text:new t.bO(e,i.u_is_text),u_pitch_with_map:new t.bO(e,i.u_pitch_with_map),u_is_along_line:new t.bO(e,i.u_is_along_line),u_is_variable_anchor:new t.bO(e,i.u_is_variable_anchor),u_texsize:new t.bT(e,i.u_texsize),u_texsize_icon:new t.bT(e,i.u_texsize_icon),u_texture:new t.bO(e,i.u_texture),u_texture_icon:new t.bO(e,i.u_texture_icon),u_gamma_scale:new t.bf(e,i.u_gamma_scale),u_device_pixel_ratio:new t.bf(e,i.u_device_pixel_ratio),u_is_halo:new t.bO(e,i.u_is_halo),u_translation:new t.bT(e,i.u_translation),u_pitched_scale:new t.bf(e,i.u_pitched_scale)}),background:(e,i)=>({u_opacity:new t.bf(e,i.u_opacity),u_color:new t.bP(e,i.u_color)}),backgroundPattern:(e,i)=>({u_opacity:new t.bf(e,i.u_opacity),u_image:new t.bO(e,i.u_image),u_pattern_tl_a:new t.bT(e,i.u_pattern_tl_a),u_pattern_br_a:new t.bT(e,i.u_pattern_br_a),u_pattern_tl_b:new t.bT(e,i.u_pattern_tl_b),u_pattern_br_b:new t.bT(e,i.u_pattern_br_b),u_texsize:new t.bT(e,i.u_texsize),u_mix:new t.bf(e,i.u_mix),u_pattern_size_a:new t.bT(e,i.u_pattern_size_a),u_pattern_size_b:new t.bT(e,i.u_pattern_size_b),u_scale_a:new t.bf(e,i.u_scale_a),u_scale_b:new t.bf(e,i.u_scale_b),u_pixel_coord_upper:new t.bT(e,i.u_pixel_coord_upper),u_pixel_coord_lower:new t.bT(e,i.u_pixel_coord_lower),u_tile_units_to_pixels:new t.bf(e,i.u_tile_units_to_pixels)}),terrain:(e,i)=>({u_texture:new t.bO(e,i.u_texture),u_ele_delta:new t.bf(e,i.u_ele_delta),u_fog_matrix:new t.bQ(e,i.u_fog_matrix),u_fog_color:new t.bP(e,i.u_fog_color),u_fog_ground_blend:new t.bf(e,i.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.bf(e,i.u_fog_ground_blend_opacity),u_horizon_color:new t.bP(e,i.u_horizon_color),u_horizon_fog_blend:new t.bf(e,i.u_horizon_fog_blend),u_is_globe_mode:new t.bf(e,i.u_is_globe_mode)}),terrainDepth:(e,i)=>({u_ele_delta:new t.bf(e,i.u_ele_delta)}),terrainCoords:(e,i)=>({u_texture:new t.bO(e,i.u_texture),u_terrain_coords_id:new t.bf(e,i.u_terrain_coords_id),u_ele_delta:new t.bf(e,i.u_ele_delta)}),projectionErrorMeasurement:(e,i)=>({u_input:new t.bf(e,i.u_input),u_output_expected:new t.bf(e,i.u_output_expected)}),atmosphere:(e,i)=>({u_sun_pos:new t.bS(e,i.u_sun_pos),u_atmosphere_blend:new t.bf(e,i.u_atmosphere_blend),u_globe_position:new t.bS(e,i.u_globe_position),u_globe_radius:new t.bf(e,i.u_globe_radius),u_inv_proj_matrix:new t.bQ(e,i.u_inv_proj_matrix)}),sky:(e,i)=>({u_sky_color:new t.bP(e,i.u_sky_color),u_horizon_color:new t.bP(e,i.u_horizon_color),u_horizon:new t.bT(e,i.u_horizon),u_horizon_normal:new t.bT(e,i.u_horizon_normal),u_sky_horizon_blend:new t.bf(e,i.u_sky_horizon_blend),u_sky_blend:new t.bf(e,i.u_sky_blend)})};class iv{constructor(e,t,i){this.context=e;let r=e.gl;this.buffer=r.createBuffer(),this.dynamicDraw=!!i,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let t=this.context.gl;if(!this.dynamicDraw)throw Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let iw={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class iz{constructor(e,t,i,r){this.length=t.length,this.attributes=i,this.itemSize=t.bytesPerElement,this.dynamicDraw=r,this.context=e;let a=e.gl;this.buffer=a.createBuffer(),e.bindVertexBuffer.set(this.buffer),a.bufferData(a.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}
51enableAttributes(e,t){for(let i=0;i<this.attributes.length;i++){let r=t.attributes[this.attributes[i].name];void 0!==r&&e.enableVertexAttribArray(r)}}setVertexAttribPointers(e,t,i){for(let r=0;r<this.attributes.length;r++){let a=this.attributes[r],n=t.attributes[a.name];void 0!==n&&e.vertexAttribPointer(n,a.components,e[iw[a.type]],!1,this.itemSize,a.offset+this.itemSize*(i||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class iS{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class iT extends iS{getDefault(){return t.be.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class ik extends iS{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class iE extends iS{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class iM extends iS{getDefault(){return[!0,!0,!0,!0]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class iP extends iS{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class iI extends iS{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class iA extends iS{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){let t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class iC extends iS{getDefault(){let e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class iR extends iS{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.current=e,this.dirty=!1}}class iL extends iS{getDefault(){return[0,1]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class iD extends iS{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),this.current=e,this.dirty=!1}}class iO extends iS{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class iF extends iS{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.BLEND):t.disable(t.BLEND),this.current=e,this.dirty=!1}}class ij extends iS{getDefault(){let e=this.gl;return[e.ONE,e.ZERO]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class iB extends iS{getDefault(){return t.be.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class iN extends iS{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class iU extends iS{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),this.current=e,this.dirty=!1}}class iV extends iS{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class i$ extends iS{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class iZ extends iS{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class iG extends iS{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class iq extends iS{getDefault(){let e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class iH extends iS{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class iW extends iS{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class iX extends iS{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class iY extends iS{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class iK extends iS{getDefault(){return null}set(e){let t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class iJ extends iS{getDefault(){return null}set(e){var t;if(e===this.current&&!this.dirty)return;let i=this.gl;ty(i)?i.bindVertexArray(e):null==(t=i.getExtension("OES_vertex_array_object"))||t.bindVertexArrayOES(e),this.current=e,this.dirty=!1}}class iQ extends iS{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class i1 extends iS{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class i0 extends iS{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class i2 extends iS{constructor(e,t){super(e),this.context=e,this.parent=t}getDefault(){return null}}class i3 extends i2{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class i5 extends i2{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class i6 extends i2{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}let i4="Framebuffer is not complete";class i8{constructor(e,t,i,r,a){this.context=e,this.width=t,this.height=i;let n=e.gl,o=this.framebuffer=n.createFramebuffer();
51if(this.colorAttachment=new i3(e,o),r)this.depthAttachment=a?new i6(e,o):new i5(e,o);else if(a)throw Error("Stencil cannot be set without depth");if(n.checkFramebufferStatus(n.FRAMEBUFFER)!==n.FRAMEBUFFER_COMPLETE)throw Error(i4)}destroy(){let e=this.context.gl,t=this.colorAttachment.get();if(t&&e.deleteTexture(t),this.depthAttachment){let t=this.depthAttachment.get();t&&e.deleteRenderbuffer(t)}e.deleteFramebuffer(this.framebuffer)}}class i7{constructor(e){var t,i;if(this.gl=e,this.clearColor=new iT(this),this.clearDepth=new ik(this),this.clearStencil=new iE(this),this.colorMask=new iM(this),this.depthMask=new iP(this),this.stencilMask=new iI(this),this.stencilFunc=new iA(this),this.stencilOp=new iC(this),this.stencilTest=new iR(this),this.depthRange=new iL(this),this.depthTest=new iD(this),this.depthFunc=new iO(this),this.blend=new iF(this),this.blendFunc=new ij(this),this.blendColor=new iB(this),this.blendEquation=new iN(this),this.cullFace=new iU(this),this.cullFaceSide=new iV(this),this.frontFace=new i$(this),this.program=new iZ(this),this.activeTexture=new iG(this),this.viewport=new iq(this),this.bindFramebuffer=new iH(this),this.bindRenderbuffer=new iW(this),this.bindTexture=new iX(this),this.bindVertexBuffer=new iY(this),this.bindElementBuffer=new iK(this),this.bindVertexArray=new iJ(this),this.pixelStoreUnpack=new iQ(this),this.pixelStoreUnpackPremultiplyAlpha=new i1(this),this.pixelStoreUnpackFlipY=new i0(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),ty(e)){this.HALF_FLOAT=e.HALF_FLOAT;let r=e.getExtension("EXT_color_buffer_half_float");this.RGBA16F=null!=(t=e.RGBA16F)?t:null==r?void 0:r.RGBA16F_EXT,this.RGB16F=null!=(i=e.RGB16F)?i:null==r?void 0:r.RGB16F_EXT,e.getExtension("EXT_color_buffer_float")}else{e.getExtension("EXT_color_buffer_half_float"),e.getExtension("OES_texture_half_float_linear");let t=e.getExtension("OES_texture_half_float");this.HALF_FLOAT=null==t?void 0:t.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(e,t){return new iv(this,e,t)}createVertexBuffer(e,t,i){return new iz(this,e,t,i)}createRenderbuffer(e,t,i){let r=this.gl,a=r.createRenderbuffer();return this.bindRenderbuffer.set(a),r.renderbufferStorage(r.RENDERBUFFER,e,t,i),this.bindRenderbuffer.set(null),a}createFramebuffer(e,t,i,r){return new i8(this,e,t,i,r)}clear({color:e,depth:t,stencil:i}){let r=this.gl,a=0;e&&(a|=r.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==t&&(a|=r.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(t),this.depthMask.set(!0)),void 0!==i&&(a|=r.STENCIL_BUFFER_BIT,this.clearStencil.set(i),this.stencilMask.set(255)),r.clear(a)}setCullFace(e){!1===e.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)}setColorMode(e){t.bG(e.blendFunction,tp.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){var e;return ty(this.gl)?this.gl.createVertexArray():null==(e=this.gl.getExtension("OES_vertex_array_object"))?void 0:e.createVertexArrayOES()}deleteVertexArray(e){var t;return ty(this.gl)?this.gl.deleteVertexArray(e):null==(t=this.gl.getExtension("OES_vertex_array_object"))?void 0:t.deleteVertexArrayOES(e)}unbindVAO(){this.bindVertexArray.set(null)}}function i9(e,i,r,a,n){let o=e.context,s=e.transform,c=o.gl,u=e.useProgram("collisionBox"),h=[],p=0,d=0;for(let t=0;t<a.length;t++){let l=a[t],f=i.getTile(l).getBucket(r);
51if(!f)continue;let m=n?f.textCollisionBox:f.iconCollisionBox,g=f.collisionCircleArray;g.length>0&&(h.push({circleArray:g,circleOffset:d,coord:l}),p+=g.length/4,d=p),m&&u.draw(o,c.LINES,tf.disabled,tm.disabled,e.colorModeForRenderPass(),td.disabled,t8(e.transform),e.style.map.terrain&&e.style.map.terrain.getTerrainData(l),s.getProjectionData({overscaledTileID:l,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),r.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,null,e.transform.zoom,null,null,m.collisionVertexBuffer)}if(!n||!h.length)return;let f=e.useProgram("collisionCircle"),m=new t.b_;m.resize(4*p),m._trim();let g=0;for(let e of h)for(let t=0;t<e.circleArray.length/4;t++){let i=4*t,r=e.circleArray[i+0],a=e.circleArray[i+1],n=e.circleArray[i+2],o=e.circleArray[i+3];m.emplace(g++,r,a,n,o,0),m.emplace(g++,r,a,n,o,1),m.emplace(g++,r,a,n,o,2),m.emplace(g++,r,a,n,o,3)}(!l||l.length<2*p)&&(l=function(e){let i=2*e,r=new t.c0;r.resize(i),r._trim();for(let e=0;e<i;e++){let t=6*e;r.uint16[t+0]=4*e+0,r.uint16[t+1]=4*e+1,r.uint16[t+2]=4*e+2,r.uint16[t+3]=4*e+2,r.uint16[t+4]=4*e+3,r.uint16[t+5]=4*e+0}return r}(p));let y=o.createIndexBuffer(l,!0),_=o.createVertexBuffer(m,t.b$.members,!0);for(let i of h){let a=t7(e.transform);f.draw(o,c.TRIANGLES,tf.disabled,tm.disabled,e.colorModeForRenderPass(),td.disabled,a,e.style.map.terrain&&e.style.map.terrain.getTerrainData(i.coord),null,r.id,_,y,t.aL.simpleSegment(0,2*i.circleOffset,i.circleArray.length,i.circleArray.length/2),null,e.transform.zoom,null,null,null)}_.destroy(),y.destroy()}let re=t.af(new Float32Array(16));function rt(e,i,r,a,n,o,l,s,c,u,h,p,d){let f=e.context,m=f.gl,g=e.transform,y="map"===s,_="map"===c,b="viewport"!==s&&"point"!==r.layout.get("symbol-placement"),x=y&&!_&&!b,v=!r.layout.get("symbol-sort-key").isConstant(),w=!1,z=e.getDepthModeForSublayer(0,tf.ReadOnly),S=r._unevaluatedLayout.hasValue("text-variable-anchor")||r._unevaluatedLayout.hasValue("text-variable-anchor-offset"),T=[],k=g.getCircleRadiusCorrection();for(let s of a){let a=i.getTile(s),c=a.getBucket(r);if(!c)continue;let h=n?c.text:c.icon;if(!h||!h.segments.get().length||!h.hasVisibleVertices)continue;let p=h.programConfigurations.get(r.id),f=n||c.sdfIcons,z=n?c.textSizeData:c.iconSizeData,E=_||0!==g.pitch,M=e.useProgram(c.iconsInText&&n?"symbolTextAndIcon":f?"symbolSDF":"symbolIcon",p),P=t.am(z,g.zoom),I=e.style.map.terrain&&e.style.map.terrain.getTerrainData(s),A,C,R,L,D=[0,0],O=null;if(n)C=a.glyphAtlasTexture,R=m.LINEAR,A=a.glyphAtlasTexture.size,c.iconsInText&&(D=a.imageAtlasTexture.size,O=a.imageAtlasTexture,L=E||e.options.rotating||e.options.zooming||"composite"===z.kind||"camera"===z.kind?m.LINEAR:m.NEAREST);else{let t=1!==r.layout.get("icon-size").constantOr(0)||c.iconsNeedLinear;C=a.imageAtlasTexture,R=f||e.options.rotating||e.options.zooming||t||E?m.LINEAR:m.NEAREST,A=a.imageAtlasTexture.size}let F=t.aB(a,1,e.transform.zoom),j=ew(y,e.transform,F),B=t.L();t.ap(B,j);let N=function(e,i,r,a){if(e){let e=t.L();if(!i){let{vecSouth:t,vecEast:i}=ez(r);e[0]=i[0],e[1]=i[1],e[4]=t[0],e[5]=t[1]}return t.N(e,e,[a,a,1]),e}return r.pixelsToClipSpaceMatrix}(_,y,e.transform,F),U=t.aC(g,a,o,l),V=g.getProjectionData({overscaledTileID:s,applyGlobeMatrix:!d,applyTerrainMatrix:!0}),$=S&&c.hasTextData(),Z="none"!==r.layout.get("icon-text-fit")&&$&&c.hasIconData();if(b){let i=e.style.map.terrain?(t,i)=>e.style.map.terrain.getElevation(s,t,i):null;!function(e,i,r,a,n,o,l,s,c,u,h,p,d){let f=r?e.textSizeData:e.iconSizeData,m=t.am(f,i.transform.zoom),g=[256/i.width*2+1,256/i.height*2+1],y=r?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;y.clear();let _=e.lineVertexArray,b=r?e.text.placedSymbolArray:e.icon.placedSymbolArray,x=i.transform.width/i.transform.height,v=!1;for(let r=0;r<b.length;r++){var w;let z=b.get(r);if(z.hidden||z.writingMode===t.an.vertical&&!v){eO(z.numGlyphs,y);continue}v=!1;let S=new t.P(z.anchorX,z.anchorY),T={getElevation:d,pitchedLabelPlaneMatrix:a,lineVertexArray:_,pitchWithMap:o,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:i.transform,tileAnchorPoint:S,unwrappedTileID:c,width:u,height:h,translation:p},k=eC(z.anchorX,z.anchorY,T);if(w=k.point,!(w.x>=-g[0]&&w.x<=g[0]&&w.y>=-g[1])||!(w.y<=g[1])){eO(z.numGlyphs,y);continue}let E=.5+i.transform.cameraToCenterDistance/k.signedDistanceFromCamera*.5,M=t.ao(f,m,z),P=o?M*i.transform.getPitchedTextCorrection(z.anchorX,z.anchorY,c)/E:M*E,I=eE({projectionContext:T,pitchedLabelPlaneMatr
51ixInverse:n,symbol:z,fontSize:P,flip:!1,keepUpright:l,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:y,aspectRatio:x,rotateToLine:s});v=I.useVertical,(I.notEnoughRoom||v||I.needsFlipping&&eE({projectionContext:T,pitchedLabelPlaneMatrixInverse:n,symbol:z,fontSize:P,flip:!0,keepUpright:l,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:y,aspectRatio:x,rotateToLine:s}).notEnoughRoom)&&eO(z.numGlyphs,y)}r?e.text.dynamicLayoutVertexBuffer.updateData(y):e.icon.dynamicLayoutVertexBuffer.updateData(y)}(c,e,n,j,B,_,u,"map"===r.layout.get("text-rotation-alignment"),s.toUnwrapped(),g.width,g.height,U,i)}let G=n&&S||Z,q=b||G?re:_?j:e.transform.clipSpaceToPixelsMatrix,H=f&&0!==r.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(1),W={program:M,buffers:h,uniformValues:f?c.iconsInText?ig(z.kind,P,x,_,b,G,e,q,N,U,A,D,k):im(z.kind,P,x,_,b,G,e,q,N,U,n,A,0,k):id(z.kind,P,x,_,b,G,e,q,N,U,n,A,k),projectionData:V,atlasTexture:C,atlasTextureIcon:O,atlasInterpolation:R,atlasInterpolationIcon:L,isSDF:f,hasHalo:H};if(v&&c.canOverlap)for(let e of(w=!0,h.segments.get()))T.push({segments:new t.aL([e]),sortKey:e.sortKey,state:W,terrainData:I});else T.push({segments:h.segments,sortKey:0,state:W,terrainData:I})}for(let t of(w&&T.sort((e,t)=>
51e.sortKey-t.sortKey),T)){let i=t.state;if(f.activeTexture.set(m.TEXTURE0),i.atlasTexture.bind(i.atlasInterpolation,m.CLAMP_TO_EDGE),i.atlasTextureIcon&&(f.activeTexture.set(m.TEXTURE1),i.atlasTextureIcon&&i.atlasTextureIcon.bind(i.atlasInterpolationIcon,m.CLAMP_TO_EDGE)),i.isSDF){let a=i.uniformValues;i.hasHalo&&(a.u_is_halo=1,ri(i.buffers,t.segments,r,e,i.program,z,h,p,a,i.projectionData,t.terrainData)),a.u_is_halo=0}ri(i.buffers,t.segments,r,e,i.program,z,h,p,i.uniformValues,i.projectionData,t.terrainData)}}function ri(e,t,i,r,a,n,o,l,s,c,u){let h=r.context;a.draw(h,h.gl.TRIANGLES,n,o,l,td.backCCW,s,u,c,i.id,e.layoutVertexBuffer,e.indexBuffer,t,i.paint,r.transform.zoom,e.programConfigurations.get(i.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function rr(e,t,i){var r,a;let n=e.gl,o=n.createTexture();n.bindTexture(n.TEXTURE_2D,o),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR);let l=null!=(r=e.HALF_FLOAT)?r:n.UNSIGNED_BYTE,s=null!=(a=e.RGBA16F)?a:n.RGBA;n.texImage2D(n.TEXTURE_2D,0,s,t,i,0,n.RGBA,l,null);let c=e.createFramebuffer(t,i,!1,!1);return c.colorAttachment.set(o),c}function ra(e,i){return i.colorRampTexture||(i.colorRampTexture=new t.T(e,i.colorRamp,e.gl.RGBA)),i.colorRampTexture}function rn(e,t,i,r,a){if(!i||!r||!r.imageAtlas)return;let n=r.imageAtlas.patternPositions,o=n[i.to.toString()],l=n[i.from.toString()];if(!o&&l&&(o=l),!l&&o&&(l=o),!o||!l){let e=a.getPaintProperty(t);o=n[e],l=n[e]}o&&l&&e.setConstantPatternPositions(o,l)}function ro(e,i,r,a,n,o,l,s){let c,u,h,p,d,f=e.context.gl,m="fill-pattern",g=r.paint.get(m),y=g&&g.constantOr(1),_=r.getCrossfadeParameters(),b=e.transform,x=r.paint.get("fill-translate"),v=r.paint.get("fill-translate-anchor");l?(u=y&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",c=f.LINES):(u=y?"fillPattern":"fill",c=f.TRIANGLES);let w=g.constantOr(null);for(let g of a){let a=i.getTile(g);if(y&&!a.patternsLoaded())continue;let z=a.getBucket(r);if(!z)continue;let S=z.programConfigurations.get(r.id),T=e.useProgram(u,S),k=e.style.map.terrain&&e.style.map.terrain.getTerrainData(g);y&&(e.context.activeTexture.set(f.TEXTURE0),a.imageAtlasTexture.bind(f.LINEAR,f.CLAMP_TO_EDGE),S.updatePaintBuffers(_)),rn(S,m,w,a,r);let E=b.getProjectionData({overscaledTileID:g,applyGlobeMatrix:!s,applyTerrainMatrix:!0}),M=t.aC(b,a,x,v);if(l){p=z.indexBuffer2,d=z.segments2;let t=[f.drawingBufferWidth,f.drawingBufferHeight];h="fillOutlinePattern"===u&&y?t6(e,_,a,t,M):t5(t,M)}else p=z.indexBuffer,d=z.segments,h=y?t3(e,_,a,M):{u_fill_translate:M};let P=e.stencilModeForClipping(g);T.draw(e.context,c,n,P,o,td.backCCW,h,k,E,r.id,z.layoutVertexBuffer,p,d,r.paint,e.transform.zoom,S)}}function rl(e,i,r,a,n,o,l,s){let c=e.context,u=c.gl,h="fill-extrusion-pattern",p=r.paint.get(h),d=p.constantOr(1),f=r.getCrossfadeParameters(),m=r.paint.get("fill-extrusion-opacity"),g=p.constantOr(null),y=e.transform;for(let p of a){let a=i.getTile(p),_=a.getBucket(r);if(!_)continue;let b=e.style.map.terrain&&e.style.map.terrain.getTerrainData(p),x=_.programConfigurations.get(r.id),v=e.useProgram(d?"fillExtrusionPattern":"fillExtrusion",x);d&&(e.context.activeTexture.set(u.TEXTURE0),a.imageAtlasTexture.bind(u.LINEAR,u.CLAMP_TO_EDGE),x.updatePaintBuffers(f));let w=y.getProjectionData({overscaledTileID:p,applyGlobeMatrix:!s,applyTerrainMatrix:!0});rn(x,h,g,a,r);let z=t.aC(y,a,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),S=r.paint.get("fill-extrusion-vertical-gradient"),T=d?t2(e,S,m,z,p,f,a):t0(e,S,m,z);v.draw(c,c.gl.TRIANGLES,n,o,l,td.backCCW,T,b,w,r.id,_.layoutVertexBuffer,_.indexBuffer,_.segments,r.paint,e.transform.zoom,x,e.style.map.terrain&&_.centroidVertexBuffer)}}function rs(e,t,i,r,a,n,o,l,s){var c;let u=e.style.projection,h=e.context,p=e.transform,d=h.gl,f=[`#define NUM_ILLUMINATION_SOURCES ${i.paint.get("hillshade-highlight-color").values.length}`],m=e.useProgram("hillshade",null,!1,f),g=!e.options.moving;for(let f of r){let r=t.getTile(f),y=r.fbo;if(!y)continue;let _=u.getMeshFromTileID(h,f.canonical,l,!0,"raster"),b=null==(c=e.style.map.terrain)?void 0:c.getTerrainData(f);h.activeTexture.set(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,y.colorAttachment.get());let x=p.getProjectionData({overscaledTileID:f,aligned:g,applyGlobeMatrix:!s,applyTerrainMatrix:!0});m.draw(h,d.TRIANGLES,n,a[f.overscaledZ],o,td.backCCW,ii(e,r,i),b,x,i.id,_.vertexBuffer,_.indexBuffer,_.segments)}}function rc(e,i,r,a,n,o,l,s,c){var u;let h=e.style.projection,p=e.context,d=e.transform,f=p.gl,m=e.useProgram("colorRelief"),g=!e.options.moving,y=!0,_=0;for(let b of a){let a=i.getTile(b),x=a.dem;if(y){let e=f.getParameter(f.MAX_TEXTURE_SIZE),{elevationTexture:t,colorTexture:i}=r.getColorRampTextures(p,e,x.getUnpackVector());p.activeTexture.set(f.TEXTURE1),t.bind(f.NEAREST,f.CLAMP_TO_EDGE),p.activeTexture.set(f.TEXTURE4),i.bind(f.LINEAR,f.CLAMP_TO_EDGE),y=!1,_=t.size[0]}if(!x||!x.data)continue;
51let v=x.stride,w=x.getPixels();if(p.activeTexture.set(f.TEXTURE0),p.pixelStoreUnpackPremultiplyAlpha.set(!1),a.demTexture=a.demTexture||e.getTileTexture(v),a.demTexture){let e=a.demTexture;e.update(w,{premultiply:!1}),e.bind(f.LINEAR,f.CLAMP_TO_EDGE)}else a.demTexture=new t.T(p,w,f.RGBA,{premultiply:!1}),a.demTexture.bind(f.LINEAR,f.CLAMP_TO_EDGE);let z=h.getMeshFromTileID(p,b.canonical,s,!0,"raster"),S=null==(u=e.style.map.terrain)?void 0:u.getTerrainData(b),T=d.getProjectionData({overscaledTileID:b,aligned:g,applyGlobeMatrix:!c,applyTerrainMatrix:!0});m.draw(p,f.TRIANGLES,o,n[b.overscaledZ],l,td.backCCW,ia(r,a.dem,_),S,T,r.id,z.vertexBuffer,z.indexBuffer,z.segments)}}let ru=[new t.P(0,0),new t.P(t.$,0),new t.P(t.$,t.$),new t.P(0,t.$)];function rh(e,i,r,a,n,o,l,s,c=!1,u=!1){let h=a[a.length-1].overscaledZ,d=e.context,f=d.gl,m=e.useProgram("raster"),g=e.transform,y=e.style.projection,_=e.colorModeForRenderPass(),b=!e.options.moving;for(let x of a){let a,v,w=e.getDepthModeForSublayer(x.overscaledZ-h,1===r.paint.get("raster-opacity")?tf.ReadWrite:tf.ReadOnly,f.LESS),z=i.getTile(x);z.registerFadeDuration(r.paint.get("raster-fade-duration"));let S=i.findLoadedParent(x,0),T=i.findLoadedSibling(x),k=function(e,i,r,a,n,o){let l=a.paint.get("raster-fade-duration");if(!o&&l>0){let a=p.now(),o=(a-e.timeAdded)/l,s=i?(a-i.timeAdded)/l:-1,c=r.getSource(),u=ed(n,{tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!i||Math.abs(i.tileID.overscaledZ-u)>Math.abs(e.tileID.overscaledZ-u),d=h&&e.refreshedUponExpiration?1:t.ag(h?o:1-s,0,1);return e.refreshedUponExpiration&&o>=1&&(e.refreshedUponExpiration=!1),i?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}(z,S||T||null,i,r,e.transform,e.style.map.terrain),E="nearest"===r.paint.get("raster-resampling")?f.NEAREST:f.LINEAR;d.activeTexture.set(f.TEXTURE0),z.texture.bind(E,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),d.activeTexture.set(f.TEXTURE1),S?(S.texture.bind(E,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),a=Math.pow(2,S.tileID.overscaledZ-z.tileID.overscaledZ),v=[z.tileID.canonical.x*a%1,z.tileID.canonical.y*a%1]):z.texture.bind(E,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),z.texture.useMipmap&&d.extTextureFilterAnisotropic&&e.transform.pitch>20&&f.texParameterf(f.TEXTURE_2D,d.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,d.extTextureFilterAnisotropicMax);let M=e.style.map.terrain&&e.style.map.terrain.getTerrainData(x),P=g.getProjectionData({overscaledTileID:x,aligned:b,applyGlobeMatrix:!u,applyTerrainMatrix:!0}),I=ip(v||[0,0],a||1,k,r,s),A=y.getMeshFromTileID(d,x.canonical,o,l,"raster");m.draw(d,f.TRIANGLES,w,n?n[x.overscaledZ]:tm.disabled,_,c?td.frontCCW:td.backCCW,I,M,P,r.id,A.vertexBuffer,A.indexBuffer,A.segments)}}let rp=new t.be(1,0,0,1),rd=new t.be(0,1,0,1),rf=new t.be(0,0,1,1),rm=new t.be(1,0,1,1),rg=new t.be(0,1,1,1);function ry(e,t,i,r){rb(e,0,t+i/2,e.transform.width,i,r)}function r_(e,t,i,r){rb(e,t-i/2,0,i,e.transform.height,r)}function rb(e,t,i,r,a,n){let o=e.context,l=o.gl;l.enable(l.SCISSOR_TEST),l.scissor(t*e.pixelRatio,i*e.pixelRatio,r*e.pixelRatio,a*e.pixelRatio),o.clear({color:n}),l.disable(l.SCISSOR_TEST)}function rx(e,t,i,r){let{isRenderingGlobe:a}=r,n=e.context,o=n.gl,l=e.transform,s=e.colorModeForRenderPass(),c=e.getDepthModeFor3D(),u=e.useProgram("terrain");for(let r of(n.bindFramebuffer.set(null),n.viewport.set([0,0,e.width,e.height]),i)){let i=t.getTerrainMesh(r.tileID),h=e.renderToTexture.getTexture(r),p=t.getTerrainData(r.tileID);n.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,h.texture);let d=tY(t.getMeshFrameDelta(l.zoom),l.calculateFogMatrix(r.tileID.toUnwrapped()),e.style.sky,l.pitch,a),f=l.getProjectionData({overscaledTileID:r.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});u.draw(n,o.TRIANGLES,c,tm.disabled,s,td.backCCW,d,p,f,"terrain",i.vertexBuffer,i.indexBuffer,i.segments)}}function rv(e,i){if(!i.mesh){let r=new t.aK;r.emplaceBack(-1,-1),r.emplaceBack(1,-1),r.emplaceBack(1,1),r.emplaceBack(-1,1);let a=new t.aM;a.emplaceBack(0,1,2),a.emplaceBack(0,2,3),i.mesh=new e6(e.createVertexBuffer(r,e4.members),e.createIndexBuffer(a),t.aL.simpleSegment(0,0,r.length,a.length))}return i.mesh}class rw{constructor(e,i){this.context=new i7(e),this.transform=i,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.af(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=eg.maxUnderzooming+eg.maxOverzooming+1,this.depthEpsilon=1/65536,this.crossTileSymbolIndex=new e0}resize(e,t,i){if(this.width=Math.floor(e*i),this.height=Math.floor(t*i),this.pixelRatio=i,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let e of this.style._order)this.style._layers[e].resize()}setup(){let e=this.context,i=new t.aK;i.emplaceBack(0,0),i.emplaceBack(t.$,0),i.emplaceBack(0,t.$),i.emplaceBack(t.$,t.$),this.tileExtentBuffer=e.createVertexBuffer(i,e4.members),this.tileExtentSegments=t.aL.simpleSegment(0,0,4,2);let r=new t.aK;r.emplaceBack(0,0),r.emplaceBack(t.$,0),r.emplaceBack(0,t.$),r.emplaceBack(t.$,t.$),this.debugBuffer=e.createVertexBuffer(r,e4.members),this.debugSegments=t.aL.simpleSegment(0,0,4,5);let a=new t.c5;a.emplaceBack(0,0,0,0),a.emplaceBack(t.$,0,t.$,0),a.emplaceBack(0,t.$,0,t.$),a.emplaceBack(t.$,t.$,t.$,t.$),this.rasterBoundsBuffer=e.createVertexBuffer(a,tW.members),this.rasterBoundsSegments=t.aL.simpleSegment(0,0,4,2);let n=new t.aK;n.emplaceBack(0,0),n.emplaceBack(t.$,0),n.emplaceBack(0,t.$),n.emplaceBack(t.$,t.$),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(n,e4.members),this.rasterBoundsSegmentsPosOnly=t.aL.simpleSegment(0,0,4,5);let o=new t.aK;
51o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,e4.members),this.viewportSegments=t.aL.simpleSegment(0,0,4,2);let l=new t.c6;l.emplaceBack(0),l.emplaceBack(1),l.emplaceBack(3),l.emplaceBack(2),l.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(l);let s=new t.aM;s.emplaceBack(1,0,2),s.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s);let c=this.context.gl;this.stencilClearMode=new tm({func:c.ALWAYS,mask:0},0,255,c.ZERO,c.ZERO,c.ZERO),this.tileExtentMesh=new e6(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let e=this.context,i=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let r=t.L();t.bX(r,0,this.width,this.height,0,0,1),t.N(r,r,[i.drawingBufferWidth,i.drawingBufferHeight,0]),this.useProgram("clippingMask",null,!0).draw(e,i.TRIANGLES,tf.disabled,this.stencilClearMode,tp.disabled,td.disabled,null,null,{mainMatrix:r,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:r},"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,t,i){if(this.currentStencilSource===e.source||!e.isTileClipped()||!t||!t.length)return;this.currentStencilSource=e.source,this.nextStencilID+t.length>256&&this.clearStencil();let r=this.context;r.setColorMode(tp.disabled),r.setDepthMode(tf.disabled);let a={};for(let e of t)a[e.key]=this.nextStencilID++;this._renderTileMasks(a,t,i,!0),this._renderTileMasks(a,t,i,!1),this._tileClippingMaskIDs=a}_renderTileMasks(e,t,i,r){let a=this.context,n=a.gl,o=this.style.projection,l=this.transform,s=this.useProgram("clippingMask");for(let c of t){let t=e[c.key],u=this.style.map.terrain&&this.style.map.terrain.getTerrainData(c),h=o.getMeshFromTileID(this.context,c.canonical,r,!0,"stencil"),p=l.getProjectionData({overscaledTileID:c,applyGlobeMatrix:!i,applyTerrainMatrix:!0});s.draw(a,n.TRIANGLES,tf.disabled,new tm({func:n.ALWAYS,mask:0},t,255,n.KEEP,n.KEEP,n.REPLACE),tp.disabled,i?td.disabled:td.backCCW,null,u,p,"$clipping",h.vertexBuffer,h.indexBuffer,h.segments)}}_renderTilesDepthBuffer(){let e=this.context,t=e.gl,i=this.style.projection,r=this.transform,a=this.useProgram("depth"),n=this.getDepthModeFor3D();for(let o of ef(r,{tileSize:r.tileSize})){let l=this.style.map.terrain&&this.style.map.terrain.getTerrainData(o),s=i.getMeshFromTileID(this.context,o.canonical,!0,!0,"raster"),c=r.getProjectionData({overscaledTileID:o,applyGlobeMatrix:!0,applyTerrainMatrix:!0});a.draw(e,t.TRIANGLES,n,tm.disabled,tp.disabled,td.backCCW,null,l,c,"$clipping",s.vertexBuffer,s.indexBuffer,s.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,t=this.context.gl;return new tm({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)}stencilModeForClipping(e){let t=this.context.gl;return new tm({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){let t=this.context.gl,i=e.sort((e,t)=>t.overscaledZ-e.overscaledZ),r=i[i.length-1].overscaledZ,a=i[0].overscaledZ-r+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();let e={};for(let i=0;i<a;i++)e[i+r]=new tm({func:t.GEQUAL,mask:255},i+this.nextStencilID,255,t.KEEP,t.KEEP,t.REPLACE);return this.nextStencilID+=a,[e,i]}return[{[r]:tm.disabled},i]}stencilConfigForOverlapTwoPass(e){let t=this.context.gl,i=e.sort((e,t)=>t.overscaledZ-e.overscaledZ),r=i[i.length-1].overscaledZ,a=i[0].overscaledZ-r+1;if(this.clearStencil(),a>1){let e={},n={};for(let i=0;i<a;i++)e[i+r]=new tm({func:t.GREATER,mask:255},a+1+i,255,t.KEEP,t.KEEP,t.REPLACE),n[i+r]=new tm({func:t.GREATER,mask:255},1+i,255,t.KEEP,t.KEEP,t.REPLACE);return this.nextStencilID=2*a+1,[e,n,i]}return this.nextStencilID=3,[{[r]:new tm({func:t.GREATER,mask:255},2,255,t.KEEP,t.KEEP,t.REPLACE)},{[r]:new tm({func:t.GREATER,mask:255},1,255,t.KEEP,t.KEEP,t.REPLACE)},i]}colorModeForRenderPass(){let e=this.context.gl;if(this._showOverdrawInspector){let i=1/8;return new tp([e.CONSTANT_COLOR,e.ONE],new t.be(i,i,i,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?tp.unblended:tp.alphaBlended}getDepthModeForSublayer(e,t,i){if(!this.opaquePassEnabledForLayer())return tf.disabled;let r=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new tf(i||this.context.gl.LEQUAL,t,[r,r])}getDepthModeFor3D(){return new tf(this.context.gl.LEQUAL,tf.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(e,i){var r,a;this.style=e,this.options=i,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(p.now()),this.imageManager.beginFrame();let n=this.style._order,o=this.style.sourceCaches,l={},s={},c={},u={isRenderingToTexture:!1,isRenderingGlobe:(null==(r=e.projection)?void 0:r.transitionState)>0};
51for(let e in o){let t=o[e];t.used&&t.prepare(this.context),l[e]=t.getVisibleCoordinates(!1),s[e]=l[e].slice().reverse(),c[e]=t.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let e=0;e<n.length;e++)if(this.style._layers[n[e]].is3D()){this.opaquePassCutoff=e;break}for(let e of(this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen",n)){let t=this.style._layers[e];if(!t.hasOffscreenPass()||t.isHidden(this.transform.zoom))continue;let i=s[t.source];("custom"===t.type||i.length)&&this.renderLayer(this,o[t.source],t,i,u)}if(null==(a=this.style.projection)||a.updateGPUdependent({context:this.context,useProgram:e=>this.useProgram(e)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:i.showOverdrawInspector?t.be.black:t.be.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(e,t){let i=e.context,r=i.gl,a=((e,t,i)=>{let r=Math.cos(t.rollInRadians),a=Math.sin(t.rollInRadians),n=el(t),o=t.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:e.properties.get("sky-color"),u_horizon_color:e.properties.get("horizon-color"),u_horizon:[(t.width/2-n*a)*i,(t.height/2+n*r)*i],u_horizon_normal:[-a,r],u_sky_horizon_blend:e.properties.get("sky-horizon-blend")*t.height/2*i,u_sky_blend:o}})(t,e.style.map.transform,e.pixelRatio),n=new tf(r.LEQUAL,tf.ReadWrite,[0,1]),o=tm.disabled,l=e.colorModeForRenderPass(),s=e.useProgram("sky"),c=rv(i,t);s.draw(i,r.TRIANGLES,n,o,l,td.disabled,a,null,void 0,"sky",c.vertexBuffer,c.indexBuffer,c.segments)}(this,this.style.sky),this._showOverdrawInspector=i.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=n.length-1;this.currentLayer>=0;this.currentLayer--){let e=this.style._layers[n[this.currentLayer]],t=o[e.source],i=l[e.source];this._renderTileClippingMasks(e,i,!1),this.renderLayer(this,t,e,i,u)}this.renderPass="translucent";let h=!1;for(this.currentLayer=0;this.currentLayer<n.length;this.currentLayer++){let e=this.style._layers[n[this.currentLayer]],t=o[e.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(e,u))continue;this.opaquePassEnabledForLayer()||h||(h=!0,u.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());let i=("symbol"===e.type?c:s)[e.source];this._renderTileClippingMasks(e,l[e.source],!!this.renderToTexture),this.renderLayer(this,t,e,i,u)}if(u.isRenderingGlobe&&function(e,i,r){let a=e.context,n=a.gl,o=e.useProgram("atmosphere"),l=new tf(n.LEQUAL,tf.ReadOnly,[0,1]),s=e.transform,c=function(e,i){let r=e.properties.get("position"),a=[-r.x,-r.y,-r.z],n=t.af(new Float64Array(16));return"map"===e.properties.get("anchor")&&(t.b5(n,n,i.rollInRadians),t.b6(n,n,-i.pitchInRadians),t.b5(n,n,i.bearingInRadians),t.b6(n,n,i.center.lat*Math.PI/180),t.by(n,n,-i.center.lng*Math.PI/180)),t.c4(a,a,n),a}(r,e.transform),u=s.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),h=i.properties.get("atmosphere-blend")*u.projectionTransition;if(0===h)return;let p=tM(s.worldSize,s.center.lat),d=s.inverseProjectionMatrix,f=new Float64Array(4);f[3]=1,t.av(f,f,s.modelViewProjectionMatrix),f[0]/=f[3],f[1]/=f[3],f[2]/=f[3],f[3]=1,t.av(f,f,d),f[0]/=f[3],f[1]/=f[3],f[2]/=f[3],f[3]=1;let m={u_sun_pos:c,u_atmosphere_blend:h,u_globe_position:[f[0],f[1],f[2]],u_globe_radius:p,u_inv_proj_matrix:d},g=rv(a,i);o.draw(a,n.TRIANGLES,l,tm.disabled,tp.alphaBlended,td.disabled,m,null,null,"atmosphere",g.vertexBuffer,g.indexBuffer,g.segments)}(this,this.style.sky,this.style.light),this.options.showTileBoundaries){let e=function(e,t){let i=null,r=Object.values(e._layers).flatMap(i=>i.source&&!i.isHidden(t)?[e.sourceCaches[i.source]]:[]),a=r.filter(e=>"vector"===e.getSource().type),n=r.filter(e=>"vector"!==e.getSource().type),o=e=>{(!i||i.getSource().maxzoom<e.getSource().maxzoom)&&(i=e)};
51return a.forEach(e=>o(e)),i||n.forEach(e=>o(e)),i}(this.style,this.transform.zoom);e&&function(e,i,r){for(let a=0;a<r.length;a++)!function(e,i,r){let a=e.context,n=a.gl,o=e.useProgram("debug"),l=tf.disabled,s=tm.disabled,c=e.colorModeForRenderPass(),u="$debug",h=e.style.map.terrain&&e.style.map.terrain.getTerrainData(r);a.activeTexture.set(n.TEXTURE0);let p=i.getTileByID(r.key).latestRawTileData,d=Math.floor((p&&p.byteLength||0)/1024),f=512/Math.min(i.getTile(r).tileSize,512)*(r.overscaledZ/e.transform.zoom)*.5,m=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(m+=` => ${r.overscaledZ}`),function(e,t){e.initDebugOverlayCanvas();let i=e.debugOverlayCanvas,r=e.context.gl,a=e.debugOverlayCanvas.getContext("2d");a.clearRect(0,0,i.width,i.height),a.shadowColor="white",a.shadowBlur=2,a.lineWidth=1.5,a.strokeStyle="white",a.textBaseline="top",a.font="bold 36px Open Sans, sans-serif",a.fillText(t,5,5),a.strokeText(t,5,5),e.debugOverlayTexture.update(i),e.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}(e,`${m} ${d}kB`);let g=e.transform.getProjectionData({overscaledTileID:r,applyGlobeMatrix:!0,applyTerrainMatrix:!0});o.draw(a,n.TRIANGLES,l,s,tp.alphaBlended,td.disabled,t9(t.be.transparent,f),null,g,u,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),o.draw(a,n.LINE_STRIP,l,s,c,td.disabled,t9(t.be.red),h,g,u,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}(e,i,r[a])}(this,e,e.getVisibleCoordinates())}this.options.showPadding&&function(e){var t,i;let r=e.transform.padding;ry(e,e.transform.height-(r.top||0),3,rp),ry(e,r.bottom||0,3,rd),r_(e,r.left||0,3,rf),r_(e,e.transform.width-(r.right||0),3,rm);let a=e.transform.centerPoint;t=a.x,i=e.transform.height-a.y,rb(e,t-1,i-10,2,20,rg),rb(e,t-10,i-1,20,2,rg)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(e){if(!this.style||!this.style.map||!this.style.map.terrain)return;let i=this.terrainFacilitator.matrix,r=this.transform.modelViewProjectionMatrix,a=this.terrainFacilitator.dirty;a||(a=e?!t.c7(i,r):!t.c8(i,r)),a||(a=this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)),a&&(t.c9(i,r),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(e,i){let r=e.context,a=r.gl,n=e.transform,o=tp.unblended,l=new tf(a.LEQUAL,tf.ReadWrite,[0,1]),s=i.sourceCache.getRenderableTiles(),c=e.useProgram("terrainDepth");for(let u of(r.bindFramebuffer.set(i.getFramebuffer("depth").framebuffer),r.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),r.clear({color:t.be.transparent,depth:1}),s)){let e=i.getTerrainMesh(u.tileID),t=i.getTerrainData(u.tileID),s=n.getProjectionData({overscaledTileID:u.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),h={u_ele_delta:i.getMeshFrameDelta(n.zoom)};c.draw(r,a.TRIANGLES,l,tm.disabled,o,td.backCCW,h,t,s,"terrain",e.vertexBuffer,e.indexBuffer,e.segments)}r.bindFramebuffer.set(null),r.viewport.set([0,0,e.width,e.height])}(this,this.style.map.terrain),function(e,i){let r=e.context,a=r.gl,n=e.transform,o=tp.unblended,l=new tf(a.LEQUAL,tf.ReadWrite,[0,1]),s=i.getCoordsTexture(),c=i.sourceCache.getRenderableTiles(),u=e.useProgram("terrainCoords");for(let h of(r.bindFramebuffer.set(i.getFramebuffer("coords").framebuffer),r.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),r.clear({color:t.be.transparent,depth:1}),i.coordsIndex=[],c)){let e=i.getTerrainMesh(h.tileID),t=i.getTerrainData(h.tileID);r.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,s.texture);let c={u_terrain_coords_id:(255-i.coordsIndex.length)/255,u_texture:0,u_ele_delta:i.getMeshFrameDelta(n.zoom)},p=n.getProjectionData({overscaledTileID:h.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});u.draw(r,a.TRIANGLES,l,tm.disabled,o,td.backCCW,c,t,p,"terrain",e.vertexBuffer,e.indexBuffer,e.segments),i.coordsIndex.push(h.tileID.key)}r.bindFramebuffer.set(null),r.viewport.set([0,0,e.width,e.height])}(this,this.style.map.terrain))}renderLayer(e,i,r,a,n){r.isHidden(this.transform.zoom)||("background"===r.type||"custom"===r.type||(a||[]).length)&&(this.id=r.id,t.ca(r)?function(e,i,r,a,n,o){if("translucent"!==e.renderPass)return;let{isRenderingToTexture:l}=o,s=tm.disabled,c=e.colorModeForRenderPass();(r._unevaluatedLayout.hasValue("text-variable-anchor")||r._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(e,i,r,a,n,o,l,s,c){let u=i.transform,h=i.style.map.terrain,p="map"===n,d="map"===o;for(let n of e){let e=a.getTile(n),o=e.getBucket(r);
51if(!o||!o.text||!o.text.segments.get().length)continue;let f=t.am(o.textSizeData,u.zoom),m=t.aB(e,1,i.transform.zoom),g=ew(p,i.transform,m),y="none"!==r.layout.get("icon-text-fit")&&o.hasIconData();if(f){let i=Math.pow(2,u.zoom-e.tileID.overscaledZ),r=h?(e,t)=>h.getElevation(n,e,t):null;!function(e,i,r,a,n,o,l,s,c,u,h,p){let d=e.text.placedSymbolArray,f=e.text.dynamicLayoutVertexArray,m=e.icon.dynamicLayoutVertexArray,g={};f.clear();for(let m=0;m<d.length;m++){let y=d.get(m),_=y.hidden||!y.crossTileID||e.allowVerticalPlacement&&!y.placedOrientation?null:a[y.crossTileID];if(_){let a=new t.P(y.anchorX,y.anchorY),d={getElevation:p,width:n.width,height:n.height,pitchedLabelPlaneMatrix:o,pitchWithMap:r,transform:n,tileAnchorPoint:a,translation:u,unwrappedTileID:h},m=r?eC(a.x,a.y,d):eI(a.x,a.y,d),b=.5+n.cameraToCenterDistance/m.signedDistanceFromCamera*.5,x=t.ao(e.textSizeData,s,y)*b/t.aA;r&&(x*=e.tilePixelRatio/l);let{width:v,height:w,anchor:z,textOffset:S,textBoxScale:T}=_,k=function(e,i,r,a,n,o){let{horizontalAlign:l,verticalAlign:s}=t.aG(e);return new t.P((-(l-.5)*i/n+a[0])*o,(-(s-.5)*r/n+a[1])*o)}(z,v,w,S,T,x),E=n.getPitchedTextCorrection(a.x+u[0],a.y+u[1],h),M=function(e,i,r,a,n,o){let l=i.tileAnchorPoint.add(new t.P(i.translation[0],i.translation[1]));if(i.pitchWithMap){let e=a.mult(o);r||(e=e.rotate(-n));let t=l.add(e);return eS(t.x,t.y,i.pitchedLabelPlaneMatrix,i.getElevation).point}if(r){let t=eI(i.tileAnchorPoint.x+1,i.tileAnchorPoint.y,i).point.sub(e),r=Math.atan(t.y/t.x)+(t.x<0?Math.PI:0);return e.add(a.rotate(r))}return e.add(a)}(m.point,d,i,k,-n.bearingInRadians,E),P=e.allowVerticalPlacement&&y.placedOrientation===t.an.vertical?Math.PI/2:0;for(let e=0;e<y.numGlyphs;e++)t.au(f,M,P);c&&y.associatedIconIndex>=0&&(g[y.associatedIconIndex]={shiftedAnchor:M,angle:P})}else eO(y.numGlyphs,f)}if(c){m.clear();let i=e.icon.placedSymbolArray;for(let e=0;e<i.length;e++){let r=i.get(e);if(r.hidden)eO(r.numGlyphs,m);else{let i=g[e];if(i)for(let e=0;e<r.numGlyphs;e++)t.au(m,i.shiftedAnchor,i.angle);else eO(r.numGlyphs,m)}}e.icon.dynamicLayoutVertexBuffer.updateData(m)}e.text.dynamicLayoutVertexBuffer.updateData(f)}(o,p,d,c,u,g,i,f,y,t.aC(u,e,l,s),n.toUnwrapped(),r)}}}(a,e,r,i,r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),n),0!==r.paint.get("icon-opacity").constantOr(1)&&rt(e,i,r,a,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),s,c,l),0!==r.paint.get("text-opacity").constantOr(1)&&rt(e,i,r,a,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),s,c,l),i.map.showCollisionBoxes&&(i9(e,i,r,a,!0),i9(e,i,r,a,!1))}(e,i,r,a,this.style.placement.variableOffsets,n):t.cb(r)?function(e,i,r,a,n){if("translucent"!==e.renderPass)return;let{isRenderingToTexture:o}=n,l=r.paint.get("circle-opacity"),s=r.paint.get("circle-stroke-width"),c=r.paint.get("circle-stroke-opacity"),u=!r.layout.get("circle-sort-key").isConstant();if(0===l.constantOr(1)&&(0===s.constantOr(1)||0===c.constantOr(1)))return;let h=e.context,p=h.gl,d=e.transform,f=e.getDepthModeForSublayer(0,tf.ReadOnly),m=tm.disabled,g=e.colorModeForRenderPass(),y=[],_=d.getCircleRadiusCorrection();for(let n=0;n<a.length;n++){let l=a[n],s=i.getTile(l),c=s.getBucket(r);if(!c)continue;let h=r.paint.get("circle-translate"),p=r.paint.get("circle-translate-anchor"),f=t.aC(d,s,h,p),m=c.programConfigurations.get(r.id),g=e.useProgram("circle",m),b=c.layoutVertexBuffer,x=c.indexBuffer,v=e.style.map.terrain&&e.style.map.terrain.getTerrainData(l),w={programConfiguration:m,program:g,layoutVertexBuffer:b,indexBuffer:x,uniformValues:t4(e,s,r,f,_),terrainData:v,projectionData:d.getProjectionData({overscaledTileID:l,applyGlobeMatrix:!o,applyTerrainMatrix:!0})};if(u)for(let e of c.segments.get())y.push({segments:new t.aL([e]),sortKey:e.sortKey,state:w});else y.push({segments:c.segments,sortKey:0,state:w})}for(let t of(u&&y.sort((e,t)=>
51e.sortKey-t.sortKey),y)){let{programConfiguration:i,program:a,layoutVertexBuffer:n,indexBuffer:o,uniformValues:l,terrainData:s,projectionData:c}=t.state;a.draw(h,p.TRIANGLES,f,m,g,td.backCCW,l,s,c,r.id,n,o,t.segments,r.paint,e.transform.zoom,i)}}(e,i,r,a,n):t.cc(r)?function(e,i,r,a,n){if(0===r.paint.get("heatmap-opacity"))return;let o=e.context,{isRenderingToTexture:l,isRenderingGlobe:s}=n;if(e.style.map.terrain){for(let n of a){let a=i.getTile(n);i.hasRenderableParent(n)||("offscreen"===e.renderPass?function(e,i,r,a,n){let o=e.context,l=o.gl,s=tm.disabled,c=new tp([l.ONE,l.ONE],t.be.transparent,[!0,!0,!0,!0]),u=i.getBucket(r);if(!u)return;let h=a.key,p=r.heatmapFbos.get(h);p||(p=rr(o,i.tileSize,i.tileSize),r.heatmapFbos.set(h,p)),o.bindFramebuffer.set(p.framebuffer),o.viewport.set([0,0,i.tileSize,i.tileSize]),o.clear({color:t.be.transparent});let d=u.programConfigurations.get(r.id),f=e.useProgram("heatmap",d,!n),m=e.transform.getProjectionData({overscaledTileID:i.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),g=e.style.map.terrain.getTerrainData(a);f.draw(o,l.TRIANGLES,tf.disabled,s,c,td.disabled,ie(i,e.transform.zoom,r.paint.get("heatmap-intensity"),1),g,m,r.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,r.paint,e.transform.zoom,d)}(e,a,r,n,s):"translucent"===e.renderPass&&function(e,t,i,r,a){let n=e.context,o=n.gl,l=e.transform;n.setColorMode(e.colorModeForRenderPass());let s=ra(n,t),c=i.key,u=t.heatmapFbos.get(c);if(!u)return;n.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,u.colorAttachment.get()),n.activeTexture.set(o.TEXTURE1),s.bind(o.LINEAR,o.CLAMP_TO_EDGE);let h=l.getProjectionData({overscaledTileID:i,applyTerrainMatrix:a,applyGlobeMatrix:!r});e.useProgram("heatmapTexture").draw(n,o.TRIANGLES,tf.disabled,tm.disabled,e.colorModeForRenderPass(),td.disabled,it(e,t,0,1),null,h,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,l.zoom),u.destroy(),t.heatmapFbos.delete(c)}(e,r,n,l,s))}o.viewport.set([0,0,e.width,e.height])}else"offscreen"===e.renderPass?function(e,i,r,a){let n=e.context,o=n.gl,l=e.transform,s=tm.disabled,c=new tp([o.ONE,o.ONE],t.be.transparent,[!0,!0,!0,!0]);(function(e,i,r){let a=e.gl;e.activeTexture.set(a.TEXTURE1),e.viewport.set([0,0,i.width/4,i.height/4]);let n=r.heatmapFbos.get(t.c1);n?(a.bindTexture(a.TEXTURE_2D,n.colorAttachment.get()),e.bindFramebuffer.set(n.framebuffer)):(n=rr(e,i.width/4,i.height/4),r.heatmapFbos.set(t.c1,n))})(n,e,r),n.clear({color:t.be.transparent});for(let t=0;t<a.length;t++){let u=a[t];if(i.hasRenderableParent(u))continue;let h=i.getTile(u),p=h.getBucket(r);if(!p)continue;let d=p.programConfigurations.get(r.id),f=e.useProgram("heatmap",d),m=l.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),g=l.getCircleRadiusCorrection();f.draw(n,o.TRIANGLES,tf.disabled,s,c,td.backCCW,ie(h,l.zoom,r.paint.get("heatmap-intensity"),g),null,m,r.id,p.layoutVertexBuffer,p.indexBuffer,p.segments,r.paint,l.zoom,d)}n.viewport.set([0,0,e.width,e.height])}(e,i,r,a):"translucent"===e.renderPass&&function(e,i){let r=e.context,a=r.gl;r.setColorMode(e.colorModeForRenderPass());let n=i.heatmapFbos.get(t.c1);n&&(r.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,n.colorAttachment.get()),r.activeTexture.set(a.TEXTURE1),ra(r,i).bind(a.LINEAR,a.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(r,a.TRIANGLES,tf.disabled,tm.disabled,e.colorModeForRenderPass(),td.disabled,it(e,i,0,1),null,null,i.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,i.paint,e.transform.zoom))}(e,r)}(e,i,r,a,n):t.cd(r)?function(e,i,r,a,n){if("translucent"!==e.renderPass)return;let{isRenderingToTexture:o}=n,l=r.paint.get("line-opacity"),s=r.paint.get("line-width");if(0===l.constantOr(1)||0===s.constantOr(1))return;let c=e.getDepthModeForSublayer(0,tf.ReadOnly),u=e.colorModeForRenderPass(),h=r.paint.get("line-dasharray"),p=r.paint.get("line-pattern"),d=p.constantOr(1),f=r.paint.get("line-gradient"),m=r.getCrossfadeParameters(),g=d?"linePattern":h?"lineSDF":f?"lineGradient":"line",y=e.context,_=y.gl,b=e.transform,x=!0;for(let n of a){let a=i.getTile(n);if(d&&!a.patternsLoaded())continue;let l=a.getBucket(r);
51if(!l)continue;let s=l.programConfigurations.get(r.id),v=e.context.program.get(),w=e.useProgram(g,s),z=x||w.program!==v,S=e.style.map.terrain&&e.style.map.terrain.getTerrainData(n),T=p.constantOr(null);if(T&&a.imageAtlas){let e=a.imageAtlas,t=e.patternPositions[T.to.toString()],i=e.patternPositions[T.from.toString()];t&&i&&s.setConstantPatternPositions(t,i)}let k=b.getProjectionData({overscaledTileID:n,applyGlobeMatrix:!o,applyTerrainMatrix:!0}),E=b.getPixelScale(),M=d?is(e,a,r,E,m):h?ic(e,a,r,E,h,m):f?il(e,a,r,E,l.lineClipsArray.length):io(e,a,r,E);if(d)y.activeTexture.set(_.TEXTURE0),a.imageAtlasTexture.bind(_.LINEAR,_.CLAMP_TO_EDGE),s.updatePaintBuffers(m);else if(h&&(z||e.lineAtlas.dirty))y.activeTexture.set(_.TEXTURE0),e.lineAtlas.bind(y);else if(f){let a=l.gradients[r.id],o=a.texture;if(r.gradientVersion!==a.version){let s=256;if(r.stepInterpolant){let r=i.getSource().maxzoom,a=n.canonical.z===r?Math.ceil(1<<e.transform.maxZoom-n.canonical.z):1;s=t.ag(t.c2(l.maxLineLength/t.$*1024*a),256,y.maxTextureSize)}a.gradient=t.c3({expression:r.gradientExpression(),evaluationKey:"lineProgress",resolution:s,image:a.gradient||void 0,clips:l.lineClipsArray}),a.texture?a.texture.update(a.gradient):a.texture=new t.T(y,a.gradient,_.RGBA),a.version=r.gradientVersion,o=a.texture}y.activeTexture.set(_.TEXTURE0),o.bind(r.stepInterpolant?_.NEAREST:_.LINEAR,_.CLAMP_TO_EDGE)}let P=e.stencilModeForClipping(n);w.draw(y,_.TRIANGLES,c,P,u,td.disabled,M,S,k,r.id,l.layoutVertexBuffer,l.indexBuffer,l.segments,r.paint,e.transform.zoom,s,l.layoutVertexBuffer2),x=!1}}(e,i,r,a,n):t.ce(r)?function(e,i,r,a,n){let o=r.paint.get("fill-color"),l=r.paint.get("fill-opacity");if(0===l.constantOr(1))return;let{isRenderingToTexture:s}=n,c=e.colorModeForRenderPass(),u=r.paint.get("fill-pattern"),h=e.opaquePassEnabledForLayer()&&!u.constantOr(1)&&1===o.constantOr(t.be.transparent).a&&1===l.constantOr(0)?"opaque":"translucent";if(e.renderPass===h){let t=e.getDepthModeForSublayer(1,"opaque"===e.renderPass?tf.ReadWrite:tf.ReadOnly);ro(e,i,r,a,t,c,!1,s)}if("translucent"===e.renderPass&&r.paint.get("fill-antialias")){let t=e.getDepthModeForSublayer(2*!!r.getPaintProperty("fill-outline-color"),tf.ReadOnly);ro(e,i,r,a,t,c,!0,s)}}(e,i,r,a,n):t.cf(r)?function(e,t,i,r,a){let n=i.paint.get("fill-extrusion-opacity");if(0===n)return;let{isRenderingToTexture:o}=a;if("translucent"===e.renderPass){let a=new tf(e.context.gl.LEQUAL,tf.ReadWrite,e.depthRangeFor3D);if(1!==n||i.paint.get("fill-extrusion-pattern").constantOr(1))rl(e,t,i,r,a,tm.disabled,tp.disabled,o),rl(e,t,i,r,a,e.stencilModeFor3D(),e.colorModeForRenderPass(),o);else{let n=e.colorModeForRenderPass();rl(e,t,i,r,a,tm.disabled,n,o)}}}(e,i,r,a,n):t.cg(r)?function(e,i,r,a,n){if("offscreen"!==e.renderPass&&"translucent"!==e.renderPass)return;let{isRenderingToTexture:o}=n,l=e.context,s=e.style.projection.useSubdivision,c=e.getDepthModeForSublayer(0,tf.ReadOnly),u=e.colorModeForRenderPass();if("offscreen"===e.renderPass)!function(e,i,r,a,n,o,l){let s=e.context,c=s.gl;for(let u of r){let r=i.getTile(u),h=r.dem;if(!h||!h.data||!r.needsHillshadePrepare)continue;let p=h.dim,d=h.stride,f=h.getPixels();if(s.activeTexture.set(c.TEXTURE1),s.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(d),r.demTexture){let e=r.demTexture;e.update(f,{premultiply:!1}),e.bind(c.NEAREST,c.CLAMP_TO_EDGE)}else r.demTexture=new t.T(s,f,c.RGBA,{premultiply:!1}),r.demTexture.bind(c.NEAREST,c.CLAMP_TO_EDGE);s.activeTexture.set(c.TEXTURE0);let m=r.fbo;if(!m){let e=new t.T(s,{width:p,height:p,data:null},c.RGBA);e.bind(c.LINEAR,c.CLAMP_TO_EDGE),(m=r.fbo=s.createFramebuffer(p,p,!0,!1)).colorAttachment.set(e.texture)}s.bindFramebuffer.set(m.framebuffer),s.viewport.set([0,0,p,p]),e.useProgram("hillshadePrepare").draw(s,c.TRIANGLES,n,o,l,td.disabled,ir(r.tileID,h),null,null,a.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),r.needsHillshadePrepare=!1}}(e,i,a,r,c,tm.disabled,u),l.viewport.set([0,0,e.width,e.height]);else if("translucent"===e.renderPass)if(s){let[t,n,l]=e.stencilConfigForOverlapTwoPass(a);rs(e,i,r,l,t,c,u,!1,o),rs(e,i,r,l,n,c,u,!0,o)}else{let[t,n]=e.getStencilConfigForOverlapAndUpdateStencilID(a);rs(e,i,r,n,t,c,u,!1,o)}}(e,i,r,a,n):t.ch(r)?function(e,t,i,r,a){if("translucent"!==e.renderPass||!r.length)return;let{isRenderingToTexture:n}=a,o=e.style.projection.useSubdivision,l=e.getDepthModeForSublayer(0,tf.ReadOnly),s=e.colorModeForRenderPass();if(o){let[a,o,c]=e.stencilConfigForOverlapTwoPass(r);rc(e,t,i,c,a,l,s,!1,n),rc(e,t,i,c,o,l,s,!0,n)}else{let[a,o]=e.getStencilConfigForOverlapAndUpdateStencilID(r);rc(e,t,i,o,a,l,s,!1,n)}}(e,i,r,a,n):t.ci(r)?function(e,t,i,r,a){if("translucent"!==e.renderPass||0===i.paint.get("raster-opacity")||!r.length)return;let{isRenderingToTexture:n}=a,o=t.getSource(),l=e.style.projection.useSubdivision;if(o instanceof H)rh(e,t,i,r,null,!1,!1,o.tileCoords,o.flippedWindingOrder,n);else if(l){let[a,o,l]=e.stencilConfigForOverlapTwoPass(r);rh(e,t,i,l,a,!1,!0,ru,!1,n),rh(e,t,i,l,o,!0,!0,ru,!1,n)}else{let[a,o]=e.getStencilConfigForOverlapAndUpdateStencilID(r);rh(e,t,i,o,a,!1,!0,ru,!1,n)}}(e,i,r,a,n):t.cj(r)?function(e,t,i,r,a){let n=i.paint.get("background-color"),o=i.paint.get("background-opacity");if(0===o)return;let{isRenderingToTexture:l}=a,s=e.context,c=s.gl,u=e.style.projection,h=e.transform,p=h.tileSize,d=i.paint.get("background-pattern");if(e.isPatternMissing(d))return;let f=!d&&1===n.a&&1===o&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass!==f)return;let m=tm.disabled,g=e.getDepthModeForSublayer(0,"opaque"===f?tf.ReadWrite:tf.ReadOnly),y=e.colorModeForRenderPass(),_=e.useProgram(d?"backgroundPattern":"background"),b=r||ef(h,{tileSize:p,terrain:e.style.map.terrain});d&&(s.activeTexture.set(c.TEXTURE0),e.imageManager.bind(e.context));let x=i.getCrossfadeParameters();for(let t of b){let r=h.getProjectionData({overscaledTileID:t,applyGlobeMatrix:!l,applyTerrainMatrix:!0}),a=d?i_(o,e,d,{tileID:t,tileSize:p},x):iy(o,n),f=e.style.map.terrain&&e.style.map.terrain.getTerrainData(t),b=u.getMeshFromTileID(s,t.canonical,!1,!0,"raster");_.draw(s,c.TRIANGLES,g,m,y,td.backCCW,a,f,r,i.id,b.vertexBuffer,b.indexBuffer,b.segments)}}(e,0,r,a,n):t.ck(r)&&function(e,t,i,r){let{isRenderingGlobe:a}=r,n=e.context,o=i.implementation,l=e.style.projection,s=e.transform,c=s.getProjectionDataForCustomLayer(a),u={farZ:s.farZ,nearZ:s.nearZ,fov:s.fov*Math.PI/180,modelViewProjectionMatrix:s.modelViewProjectionMatrix,projectionMatrix:s.projectionMatrix,shaderData:{variantName:l.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
52uniform mat4 u_projection_matrix;
53${l.shaderPreludeCode.vertexSource}`,define:l.shaderDefine},defaultProjectionData:c},h=o.renderingMode?o.renderingMode:"2d";
53if("offscreen"===e.renderPass){let t=o.prerender;t&&(e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),t.call(o,n.gl,u),n.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),n.setStencilMode(tm.disabled);let t="3d"===h?e.getDepthModeFor3D():e.getDepthModeForSublayer(0,tf.ReadOnly);n.setDepthMode(t),o.render(n.gl,u),n.setDirty(),e.setBaseState(),n.bindFramebuffer.set(null)}}(e,0,r,n))}saveTileTexture(e){let t=this._tileTextures[e.size[0]];t?t.push(e):this._tileTextures[e.size[0]]=[e]}getTileTexture(e){let t=this._tileTextures[e];return t&&t.length>0?t.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let t=this.imageManager.getPattern(e.from.toString()),i=this.imageManager.getPattern(e.to.toString());return!t||!i}useProgram(e,t,i=!1,r=[]){this.cache=this.cache||{};let a=!!this.style.map.terrain,n=this.style.projection,o=i?e3.projectionMercator:n.shaderPreludeCode,l=i?e8:n.shaderDefine,s=e+(t?t.cacheKey:"")+`/${i?e7:n.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(a?"/terrain":"")+(r?`/${r.join("/")}`:"");return this.cache[s]||(this.cache[s]=new tQ(this.context,e3[e],t,ix[e],this._showOverdrawInspector,a,o,l,r)),this.cache[s]}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(){let e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:t}=this.context.gl;return this.width!==e||this.height!==t}}function rz(e,t){let i,r=!1,a=null,n=null,o=()=>{a=null,r&&(e.apply(n,i),a=setTimeout(o,t),r=!1)};return(...e)=>(r=!0,n=this,i=e,a||o(),a)}class rS{constructor(e){this._getCurrentHash=()=>{let e=window.location.hash.replace("#","");if(this._hashName){let t;return e.split("&").map(e=>e.split("=")).forEach(e=>{e[0]===this._hashName&&(t=e)}),(t&&t[1]||"").split("/")}return e.split("/")},this._onHashChange=()=>{let e=this._getCurrentHash();if(!this._isValidHash(e))return!1;let t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0},this._updateHashUnthrottled=()=>{let e=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,e)},this._removeHash=()=>{let e=this._getCurrentHash();if(0===e.length)return;let t=e.join("/"),i=t;i.split("&").length>0&&(i=i.split("&")[0]),this._hashName&&(i=`${this._hashName}=${t}`);let r=window.location.hash.replace(i,"");r.startsWith("#&")?r=r.slice(0,1)+r.slice(2):"#"===r&&(r="");let a=window.location.href.replace(/(#.+)?$/,r);a=a.replace("&&","&"),window.history.replaceState(window.history.state,null,a)},this._updateHash=rz(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(e){let t=this._map.getCenter(),i=Math.round(100*this._map.getZoom())/100,r=Math.pow(10,Math.ceil((i*Math.LN2+Math.log(512/360/.5))/Math.LN10)),a=Math.round(t.lng*r)/r,n=Math.round(t.lat*r)/r,o=this._map.getBearing(),l=this._map.getPitch(),s="";if(s+=e?`/${a}/${n}/${i}`:`${i}/${n}/${a}
53`,(o||l)&&(s+="/"+Math.round(10*o)/10),l&&(s+=`/${Math.round(l)}`),this._hashName){let e=this._hashName,t=!1,i=window.location.hash.slice(1).split("&").map(i=>{let r=i.split("=")[0];return r===e?(t=!0,`${r}=${s}`):i}).filter(e=>e);return t||i.push(`${e}=${s}`),`#${i.join("&")}`}return`#${s}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new t.S(+e[2],+e[1])}catch(e){return!1}let i=+e[0],r=+(e[3]||0),a=+(e[4]||0);return i>=this._map.getMinZoom()&&i<=this._map.getMaxZoom()&&r>=-180&&r<=180&&a>=this._map.getMinPitch()&&a<=this._map.getMaxPitch()}}let rT={linearity:.3,easing:t.cl(0,0,.3,1)},rk=t.e({deceleration:2500,maxSpeed:1400},rT),rE=t.e({deceleration:20,maxSpeed:1400},rT),rM=t.e({deceleration:1e3,maxSpeed:360},rT),rP=t.e({deceleration:1e3,maxSpeed:90},rT),rI=t.e({deceleration:1e3,maxSpeed:360},rT);class rA{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:p.now(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,t=p.now();for(;e.length>0&&t-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let i={zoom:0,bearing:0,pitch:0,roll:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:e}of this._inertiaBuffer)i.zoom+=e.zoomDelta||0,i.bearing+=e.bearingDelta||0,i.pitch+=e.pitchDelta||0,i.roll+=e.rollDelta||0,e.panDelta&&i.pan._add(e.panDelta),e.around&&(i.around=e.around),e.pinchAround&&(i.pinchAround=e.pinchAround);let r=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,a={};if(i.pan.mag()){let n=rR(i.pan.mag(),r,t.e({},rk,e||{})),o=i.pan.mult(n.amount/i.pan.mag()),l=this._map.cameraHelper.handlePanInertia(o,this._map.transform);a.center=l.easingCenter,a.offset=l.easingOffset,rC(a,n)}if(i.zoom){let e=rR(i.zoom,r,rE);a.zoom=this._map.transform.zoom+e.amount,rC(a,e)}if(i.bearing){let e=rR(i.bearing,r,rM);
53a.bearing=this._map.transform.bearing+t.ag(e.amount,-179,179),rC(a,e)}if(i.pitch){let e=rR(i.pitch,r,rP);a.pitch=this._map.transform.pitch+e.amount,rC(a,e)}if(i.roll){let e=rR(i.roll,r,rI);a.roll=this._map.transform.roll+t.ag(e.amount,-179,179),rC(a,e)}if(a.zoom||a.bearing){let e=void 0===i.pinchAround?i.around:i.pinchAround;a.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),t.e(a,{noMoveStart:!0})}}function rC(e,t){(!e.duration||e.duration<t.duration)&&(e.duration=t.duration,e.easing=t.easing)}function rR(e,i,r){let{maxSpeed:a,linearity:n,deceleration:o}=r,l=t.ag(e*n/(i/1e3),-a,a),s=Math.abs(l)/(o*n);return{easing:r.easing,duration:1e3*s,amount:s/2*l}}class rL extends t.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,i,r,a={}){r=r instanceof MouseEvent?r:new MouseEvent(e,r);let n=d.mousePos(i.getCanvas(),r);super(e,t.e({point:n,lngLat:i.unproject(n),originalEvent:r},a)),this._defaultPrevented=!1,this.target=i}}class rD extends t.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,i,r){let a="touchend"===e?r.changedTouches:r.touches,n=d.touchPos(i.getCanvasContainer(),a),o=n.map(e=>i.unproject(e)),l=n.reduce((e,t,i,r)=>e.add(t.div(r.length)),new t.P(0,0));super(e,{points:n,point:l,lngLats:o,lngLat:i.unproject(l),originalEvent:r}),this._defaultPrevented=!1}}class rO extends t.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,i){super(e,{originalEvent:i}),this._defaultPrevented=!1}}class rF{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new rO(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new rL(e.type,this._map,e))}mouseup(e){this._map.fire(new rL(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new rL(e.type,this._map,e))}dblclick(e){return this._firePreventable(new rL(e.type,this._map,e))}mouseover(e){this._map.fire(new rL(e.type,this._map,e))}mouseout(e){this._map.fire(new rL(e.type,this._map,e))}touchstart(e){return this._firePreventable(new rD(e.type,this._map,e))}touchmove(e){this._map.fire(new rD(e.type,this._map,e))}touchend(e){this._map.fire(new rD(e.type,this._map,e))}touchcancel(e){this._map.fire(new rD(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class rj{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new rL(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new rL("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new rL(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class rB{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.screenPointToLocation(t.P.convert(e),this._map.terrain)}}class rN{constructor(e,t){this._map=e,this._tr=new rB(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(d.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active||this._lastPos.equals(t)||!this._box&&t.dist(this._startPos)<this._clickTolerance)return;let i=this._startPos;this._lastPos=t,this._box||(this._box=d.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",e));let r=Math.min(i.x,t.x),a=Math.max(i.x,t.x),n=Math.min(i.y,t.y),o=Math.max(i.y,t.y);d.setTransform(this._box,`translate(${r}px,${n}px)`),this._box.style.width=a-r+"px",this._box.style.height=o-n+"px"}mouseupWindow(e,i){if(!this._active||0!==e.button)return;let r=this._startPos;if(this.reset(),d.suppressClick(),r.x!==i.x||r.y!==i.y)return this._map.fire(new t.l("boxzoomend",{originalEvent:e})),{cameraAnimation:e=>e.fitScreenCoordinates(r,i,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}
53keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(d.remove(this._box),this._box=null),d.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,i){return this._map.fire(new t.l(e,{originalEvent:i}))}}function rU(e,t){if(e.length!==t.length)throw Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);let i={};for(let r=0;r<e.length;r++)i[e[r].identifier]=t[r];return i}class rV{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,i,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=function(e){let i=new t.P(0,0);for(let t of e)i._add(t);return i.div(e.length)}(i),this.touches=rU(r,i)))}touchmove(e,t,i){if(this.aborted||!this.centroid)return;let r=rU(i,t);for(let e in this.touches){let t=r[e];(!t||t.dist(this.touches[e])>30)&&(this.aborted=!0)}}touchend(e,t,i){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===i.length){let e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class r${constructor(e){this.singleTap=new rV(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,i){this.singleTap.touchstart(e,t,i)}touchmove(e,t,i){this.singleTap.touchmove(e,t,i)}touchend(e,t,i){let r=this.singleTap.touchend(e,t,i);if(r){let t=e.timeStamp-this.lastTime<500,i=!this.lastTap||30>this.lastTap.dist(r);if(t&&i||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}}}class rZ{constructor(e){this._tr=new rB(e),this._zoomIn=new r$({numTouches:1,numTaps:2}),this._zoomOut=new r$({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,i){this._zoomIn.touchstart(e,t,i),this._zoomOut.touchstart(e,t,i)}touchmove(e,t,i){this._zoomIn.touchmove(e,t,i),this._zoomOut.touchmove(e,t,i)}touchend(e,t,i){let r=this._zoomIn.touchend(e,t,i),a=this._zoomOut.touchend(e,t,i),n=this._tr;return r?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:n.zoom+1,around:n.unproject(r)},{originalEvent:e})}):a?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:n.zoom-1,around:n.unproject(a)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class rG{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.rollDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(t)?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,t){if(!this.isEnabled())return;let i=this._lastPoint;if(!i)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);let r=Array.isArray(t)?t[0]:t;return!this._moved&&r.dist(i)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=r,this._move(i,r))}dragEnd(e){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(e)&&(this._moved&&d.suppressClick(),this.reset(e))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}let rq={0:1,2:2};class rH{constructor(e){this._correctEvent=e.checkCorrectEvent}startMove(e){let t=d.mouseButton(e);this._eventButton=t}endMove(e){delete this._eventButton}isValidStartEvent(e){return this._correctEvent(e)}isValidMoveEvent(e){return!function(e,t){let i=rq[t];return void 0===e.buttons||(e.buttons&i)!==i}(e,this._eventButton)}isValidEndEvent(e){return d.mouseButton(e)===this._eventButton}}class rW{constructor(){this._firstTouch=void 0}_isOneFingerTouch(e){return 1===e.targetTouches.length}_isSameTouchEvent(e){return e.targetTouches[0].identifier===this._firstTouch}startMove(e){this._firstTouch=e.targetTouches[0].identifier}endMove(e){delete this._firstTouch}isValidStartEvent(e){return this._isOneFingerTouch(e)}isValidMoveEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}isValidEndEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}}class rX{constructor(e=new rH({checkCorrectEvent:()=>!0}),t=new rW){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=t}_executeRelevantHandler(e,t,i){return e instanceof MouseEvent?t(e):"undefined"!=typeof TouchEvent&&e instanceof TouchEvent?i(e):void 0}startMove(e){this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.startMove(e),e=>this.oneFingerTouchMoveStateManager.startMove(e))}endMove(e){this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.endMove(e),e=>this.oneFingerTouchMoveStateManager.endMove(e))}isValidStartEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidStartEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidStartEvent(e))}isValidMoveEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidMoveEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(e))}isValidEndEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidEndEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidEndEvent(e))}}let rY=e=>{e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=e=>{e.preventDefault()}};class rK{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,t,i){return this._calculateTransform(e,t,i)}touchmove(e,t,i){if(this._active){if(!this._shouldBePrevented(i.length))return e.preventDefault(),this._calculateTransform(e,t,i);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,t,i){this._calculateTransform(e,t,i),this._active&&this._shouldBePrevented(i.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,i,r){r.length>0&&(this._active=!0);let a=rU(r,i),n=new t.P(0,0),o=new t.P(0,0),l=0;for(let e in a){let t=a[e],i=this._touches[e];i&&(n._add(t),o._add(t.sub(i)),l++,a[e]=t)}if(this._touches=a,this._shouldBePrevented(l)||!o.mag())return;let s=o.div(l);return this._sum._add(s),this._sum.mag()<this._clickTolerance?void 0:{around:n.div(l),panDelta:s}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class rJ{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(e,t,i){this._firstTwoTouches||i.length<2||(this._firstTwoTouches=[i[0].identifier,i[1].identifier],this._start([t[0],t[1]]))}touchmove(e,t,i){if(!this._firstTwoTouches)return;e.preventDefault();let[r,a]=this._firstTwoTouches,n=rQ(i,t,r),o=rQ(i,t,a);if(!n||!o)return;let l=this._aroundCenter?null:n.add(o).div(2);return this._move([n,o],l,e)}touchend(e,t,i){if(!this._firstTwoTouches)return;let[r,a]=this._firstTwoTouches,n=rQ(i,t,r),o=rQ(i,t,a);n&&o||(this._active&&d.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function rQ(e,t,i){for(let r=0;r<e.length;r++)if(e[r].identifier===i)return t[r]}function r1(e,t){return Math.log(e/t)/Math.LN2}class r0 extends rJ{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(e){this._startDistance=this._distance=e[0].dist(e[1])}_move(e,t){let i=this._distance;if(this._distance=e[0].dist(e[1]),this._active||!(.1>Math.abs(r1(this._distance,this._startDistance))))return this._active=!0,{zoomDelta:r1(this._distance,i),pinchAround:t}}}function r2(e,t){return 180*e.angleWith(t)/Math.PI}class r3 extends rJ{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,t,i){let r=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:r2(this._vector,r),pinchAround:t}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());let t=25/(Math.PI*this._minDiameter)*360;return Math.abs(r2(e,this._startVector))<t}}function r5(e){return Math.abs(e.y)>Math.abs(e.x)}class r6 extends rJ{constructor(e){super(),this._currentTouchCount=0,this._map=e}
53reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,t,i){super.touchstart(e,t,i),this._currentTouchCount=i.length}_start(e){this._lastPoints=e,r5(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,i){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let r=e[0].sub(this._lastPoints[0]),a=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(r,a,i.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:-((r.y+a.y)/2*.5)}):void 0}gestureBeginsVertically(e,t,i){if(void 0!==this._valid)return this._valid;let r=e.mag()>=2,a=t.mag()>=2;if(!r&&!a)return;if(!r||!a)return void 0===this._firstMove&&(this._firstMove=i),i-this._firstMove<100&&void 0;let n=e.y>0==t.y>0;return r5(e)&&r5(t)&&n}}let r4=100,r8=15,r7=10;class r9{constructor(e){this._tr=new rB(e),this._panStep=r4,this._bearingStep=r8,this._pitchStep=r7,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,i=0,r=0,a=0,n=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?i=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?i=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?r=1:(e.preventDefault(),n=-1);break;case 40:e.shiftKey?r=-1:(e.preventDefault(),n=1);break;default:return}return this._rotationDisabled&&(i=0,r=0),{cameraAnimation:o=>{let l=this._tr;o.easeTo({duration:300,easeId:"keyboardHandler",easing:ae,zoom:t?Math.round(l.zoom)+t*(e.shiftKey?2:1):l.zoom,bearing:l.bearing+i*this._bearingStep,pitch:l.pitch+r*this._pitchStep,offset:[-a*this._panStep,-n*this._panStep],center:l.center},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function ae(e){return e*(2-e)}let at=1/450;class ai{constructor(e,t){this._onTimeout=e=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},this._map=e,this._tr=new rB(e),this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=at}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,i=p.now(),r=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==t&&t%4.000244140625==0?this._type="wheel":0!==t&&4>Math.abs(t)?this._type="trackpad":r>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=200>Math.abs(r*t)?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&(this._lastWheelEvent=e,this._delta-=t,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let i=d.mousePos(this._map.getCanvas(),e),r=this._tr;this._aroundPoint=this._aroundCenter?r.transform.locationToScreenPoint(t.S.convert(r.center)):i,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let e=this._tr.transform;if("number"==typeof this._lastExpectedZoom){let t=e.zoom-this._lastExpectedZoom;"number"==typeof this._startZoom&&(this._startZoom+=t),"number"==typeof this._targetZoom&&(this._targetZoom+=t)}if(0!==this._delta){let i="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,r=2/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&0!==r&&(r=1/r);let a="number"!=typeof this._targetZoom?e.scale:t.ae(this._targetZoom);this._targetZoom=e.getConstrained(e.getCameraLngLat(),t.aj(a*r)).zoom,"wheel"===this._type&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let i="number"!=typeof this._targetZoom?e.zoom:this._targetZoom,r=this._startZoom,a=this._easing,n,o=!1;if("wheel"===this._type&&r&&a){let e=Math.min((p.now()-this._lastWheelEventTime+5)/200,1),l=a(e);n=t.C.number(r,i,l),e<1?this._frameId||(this._frameId=!0):o=!0}else n=i,o=!0;return this._active=!0,o&&(this._active=!1,this._finishTimeout=setTimeout(()=>
53{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=n,{noInertia:!0,needsRenderFrame:!o,zoomDelta:n-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let i=t.cn;if(this._prevEase){let e=this._prevEase,r=(p.now()-e.start)/e.duration,a=e.easing(r+.01)-e.easing(r),n=.27/Math.sqrt(a*a+1e-4)*.01,o=Math.sqrt(.0729-n*n);i=t.cl(n,o,.25,1)}return this._prevEase={start:p.now(),duration:e,easing:i},i}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ar{constructor(e,t){this._clickZoom=e,this._tapZoom=t}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 aa{constructor(e){this._tr=new rB(e),this.reset()}reset(){this._active=!1}dblclick(e,t){return e.preventDefault(),{cameraAnimation:i=>{i.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(t)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class an{constructor(){this._tap=new r$({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,t,i){if(!this._swipePoint)if(this._tapTime){let r=t[0],a=e.timeStamp-this._tapTime<500,n=30>this._tapPoint.dist(r);a&&n?i.length>0&&(this._swipePoint=r,this._swipeTouch=i[0].identifier):this.reset()}else this._tap.touchstart(e,t,i)}touchmove(e,t,i){if(this._tapTime){if(this._swipePoint){if(i[0].identifier!==this._swipeTouch)return;let r=t[0],a=r.y-this._swipePoint.y;return this._swipePoint=r,e.preventDefault(),this._active=!0,{zoomDelta:a/128}}}else this._tap.touchmove(e,t,i)}touchend(e,t,i){if(this._tapTime)this._swipePoint&&0===i.length&&this.reset();else{let r=this._tap.touchend(e,t,i);r&&(this._tapTime=e.timeStamp,this._tapPoint=r)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ao{constructor(e,t,i){this._el=e,this._mousePan=t,this._touchPan=i}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class al{constructor(e,t,i,r){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=t,this._mousePitch=i,this._mouseRoll=r}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 as{constructor(e,t,i,r){this._el=e,this._touchZoom=t,this._touchRotate=i,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class ac{constructor(e,t){this._bypassKey=-1!==navigator.userAgent.indexOf("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=t,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=d.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(t=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let i=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),r=document.createElement("div");r.className="maplibregl-desktop-message",r.textContent=t,this._container.appendChild(r);let a=document.createElement("div");a.className="maplibregl-mobile-message",a.textContent=i,this._container.appendChild(a),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(d.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,i){this._enabled&&(this._map.fire(new t.l("cooperativegestureprevented",{gestureType:e,originalEvent:i})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let au=e=>e.zoom||e.drag||e.roll||e.pitch||e.rotate;class ah extends t.l{}function ap(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta||e.rollDelta}class ad{constructor(e,i){this.handleWindowEvent=e=>{this.handleEvent(e,`${e.type}Window`)},this.handleEvent=(e,i)=>{if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;let r="renderFrame"===e.type?void 0:e,a={needsRenderFrame:!1},n={},o={};for(let{handlerName:l,handler:s,allowed:c}of this._handlers){let u;
53if(s.isEnabled()){if(this._blockedByActive(o,c,l))s.reset();else if(s[i||e.type]){if(t.co(e,i||e.type)){let t=d.mousePos(this._map.getCanvas(),e);u=s[i||e.type](e,t)}else if(t.cp(e,i||e.type)){let t=this._getMapTouches(e.touches),r=d.touchPos(this._map.getCanvas(),t);u=s[i||e.type](e,r,t)}else t.cq(i||e.type)||(u=s[i||e.type](e));this.mergeHandlerResult(a,n,u,l,r),u&&u.needsRenderFrame&&this._triggerRenderFrame()}(u||s.isActive())&&(o[l]=s)}}let l={};for(let e in this._previousActiveHandlers)o[e]||(l[e]=r);this._previousActiveHandlers=o,(Object.keys(l).length||ap(a))&&(this._changes.push([a,n,l]),this._triggerRenderFrame()),(Object.keys(o).length||ap(a))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:s}=a;s&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],s(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new rA(e),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i);let r=this._el;for(let[e,t,i]of(this._listeners=[[r,"touchstart",{passive:!0}],[r,"touchmove",{passive:!1}],[r,"touchend",void 0],[r,"touchcancel",void 0],[r,"mousedown",void 0],[r,"mousemove",void 0],[r,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[r,"mouseover",void 0],[r,"mouseout",void 0],[r,"dblclick",void 0],[r,"click",void 0],[r,"keydown",{capture:!1}],[r,"keyup",void 0],[r,"wheel",{passive:!1}],[r,"contextmenu",void 0],[window,"blur",void 0]],this._listeners))d.addEventListener(e,t,e===document?this.handleWindowEvent:this.handleEvent,i)}destroy(){for(let[e,t,i]of this._listeners)d.removeEventListener(e,t,e===document?this.handleWindowEvent:this.handleEvent,i)}_addDefaultHandlers(e){let i=this._map,r=i.getCanvasContainer();this._add("mapEvent",new rF(i,e));let a=i.boxZoom=new rN(i,e);this._add("boxZoom",a),e.interactive&&e.boxZoom&&a.enable();let n=i.cooperativeGestures=new ac(i,e.cooperativeGestures);this._add("cooperativeGestures",n),e.cooperativeGestures&&n.enable();let o=new rZ(i),l=new aa(i);i.doubleClickZoom=new ar(l,o),this._add("tapZoom",o),this._add("clickZoom",l),e.interactive&&e.doubleClickZoom&&i.doubleClickZoom.enable();let s=new an;this._add("tapDragZoom",s);let c=i.touchPitch=new r6(i);this._add("touchPitch",c),e.interactive&&e.touchPitch&&i.touchPitch.enable(e.touchPitch);let u=()=>i.project(i.getCenter()),h=function({enable:e,clickTolerance:i,aroundCenter:r=!0,minPixelCenterThreshold:a=100,rotateDegreesPerPixelMoved:n=.8},o){return new rG({clickTolerance:i,move:(e,i)=>{let l=o();if(r&&Math.abs(l.y-e.y)>a)return{bearingDelta:t.cm(new t.P(e.x,i.y),i,l)};let s=(i.x-e.x)*n;return r&&i.y<l.y&&(s=-s),{bearingDelta:s}},moveStateManager:new rH({checkCorrectEvent:e=>0===d.mouseButton(e)&&e.ctrlKey||2===d.mouseButton(e)&&!e.ctrlKey}),enable:e,assignEvents:rY})}(e,u),p=function({enable:e,clickTolerance:t,pitchDegreesPerPixelMoved:i=-.5}){return new rG({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*i}),moveStateManager:new rH({checkCorrectEvent:e=>0===d.mouseButton(e)&&e.ctrlKey||2===d.mouseButton(e)}),enable:e,assignEvents:rY})}(e),f=function({enable:e,clickTolerance:t,rollDegreesPerPixelMoved:i=.3},r){return new rG({clickTolerance:t,move:(e,t)=>{let a=r(),n=(t.x-e.x)*i;return t.y<a.y&&(n=-n),{rollDelta:n}},moveStateManager:new rH({checkCorrectEvent:e=>2===d.mouseButton(e)&&e.ctrlKey}),enable:e,assignEvents:rY})}(e,u);i.dragRotate=new al(e,h,p,f),this._add("mouseRotate",h,["mousePitch"]),this._add("mousePitch",p,["mouseRotate","mouseRoll"]),this._add("mouseRoll",f,["mousePitch"]),e.interactive&&e.dragRotate&&i.dragRotate.enable();let m=function({enable:e,clickTolerance:t}){return new rG({clickTolerance:t,move:(e,t)=>({around:t,panDelta:t.sub(e)}),activateOnStart:!0,moveStateManager:new rH({checkCorrectEvent:e=>0===d.mouseButton(e)&&!e.ctrlKey}),enable:e,assignEvents:rY})}(e),g=new rK(e,i);i.dragPan=new ao(r,m,g),this._add("mousePan",m),this._add("touchPan",g,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&i.dragPan.enable(e.dragPan);let y=new r3,_=new r0;i.touchZoomRotate=new as(r,_,y,s),this._add("touchRotate",y,["touchPan","touchZoom"]),this._add("touchZoom",_,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&i.touchZoomRotate.enable(e.touchZoomRotate);let b=i.scrollZoom=new ai(i,()=>
53this._triggerRenderFrame());this._add("scrollZoom",b,["mousePan"]),e.interactive&&e.scrollZoom&&i.scrollZoom.enable(e.scrollZoom);let x=i.keyboard=new r9(i);this._add("keyboard",x),e.interactive&&e.keyboard&&i.keyboard.enable(),this._add("blockableMapEvent",new rj(i))}_add(e,t,i){this._handlers.push({handlerName:e,handler:t,allowed:i}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(let{handler:e}of this._handlers)e.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!au(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,t,i){for(let r in e)if(r!==i&&(!t||0>t.indexOf(r)))return!0;return!1}_getMapTouches(e){let t=[];for(let i of e)this._el.contains(i.target)&&t.push(i);return t}mergeHandlerResult(e,i,r,a,n){if(!r)return;t.e(e,r);let o={handlerName:a,originalEvent:r.originalEvent||n};void 0!==r.zoomDelta&&(i.zoom=o),void 0!==r.panDelta&&(i.drag=o),void 0!==r.rollDelta&&(i.roll=o),void 0!==r.pitchDelta&&(i.pitch=o),void 0!==r.bearingDelta&&(i.rotate=o)}_applyChanges(){let e={},i={},r={};for(let[a,n,o]of this._changes)a.panDelta&&(e.panDelta=(e.panDelta||new t.P(0,0))._add(a.panDelta)),a.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+a.zoomDelta),a.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+a.bearingDelta),a.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+a.pitchDelta),a.rollDelta&&(e.rollDelta=(e.rollDelta||0)+a.rollDelta),void 0!==a.around&&(e.around=a.around),void 0!==a.pinchAround&&(e.pinchAround=a.pinchAround),a.noInertia&&(e.noInertia=a.noInertia),t.e(i,n),t.e(r,o);this._updateMapTransform(e,i,r),this._changes=[]}_updateMapTransform(e,t,i){let r=this._map,a=r._getTransformForUpdate(),n=r.terrain;if(!(ap(e)||n&&this._terrainMovement))return this._fireEvents(t,i,!0);r._stop(!0);let{panDelta:o,zoomDelta:l,bearingDelta:s,pitchDelta:c,rollDelta:u,around:h,pinchAround:p}=e;void 0!==p&&(h=p),h=h||r.transform.centerPoint,n&&!a.isPointOnMapSurface(h)&&(h=a.centerPoint);let d={panDelta:o,zoomDelta:l,rollDelta:u,pitchDelta:c,bearingDelta:s,around:h};this._map.cameraHelper.useGlobeControls&&!a.isPointOnMapSurface(h)&&(h=a.centerPoint);let f=.01>h.distSqr(a.centerPoint)?a.center:a.screenPointToLocation(o?h.sub(o):h);n?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(d,a),!this._terrainMovement&&(t.drag||t.zoom)?(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(d,a,f)):t.drag&&this._terrainMovement?a.setCenter(a.screenPointToLocation(a.centerPoint.sub(o))):this._map.cameraHelper.handleMapControlsPan(d,a,f)):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(d,a),this._map.cameraHelper.handleMapControlsPan(d,a,f)),r._applyUpdatedTransform(a),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,i,!0)}_fireEvents(e,i,r){let a,n=au(this._eventsInProgress),o=au(e),l={};for(let t in e){let{originalEvent:i}=e[t];this._eventsInProgress[t]||(l[`${t}start`]=i),this._eventsInProgress[t]=e[t]}for(let e in!n&&o&&this._fireEvent("movestart",o.originalEvent),l)this._fireEvent(e,l[e]);for(let t in o&&this._fireEvent("move",o.originalEvent),e){let{originalEvent:i}=e[t];this._fireEvent(t,i)}let s={};for(let e in this._eventsInProgress){let{handlerName:t,originalEvent:r}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],a=i[t]||r,s[`${e}end`]=a)}for(let e in s)this._fireEvent(e,s[e]);let c=au(this._eventsInProgress),u=(n||o)&&!c;if(u&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let e=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&e.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(e)}if(r&&u){this._updatingCamera=!0;let e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),i=e=>0!==e&&-this._bearingSnap<e&&e<this._bearingSnap;e&&(e.essential||!p.prefersReducedMotion)?(i(e.bearing||this._map.getBearing())&&
53(e.bearing=0),e.freezeElevation=!0,this._map.easeTo(e,{originalEvent:a})):(this._map.fire(new t.l("moveend",{originalEvent:a})),i(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(e,i){this._map.fire(new t.l(e,i?{originalEvent:i}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(e=>{delete this._frameId,this.handleEvent(new ah("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class af extends t.E{constructor(e,t,i){super(),this._renderFrameCallback=()=>{let e=Math.min((p.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=e,this._bearingSnap=i.bearingSnap,this.cameraHelper=t,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,t){e.apply(this.transform),this.transform=e,this.cameraHelper=t}getCenter(){return new t.S(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,t){return this.jumpTo({elevation:e},t),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,i,r){return e=t.P.convert(e).mult(-1),this.panTo(this.transform.center,t.e({offset:e},i),r)}panTo(e,i,r){return this.easeTo(t.e({center:e},i),r)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,i,r){return this.easeTo(t.e({zoom:e},i),r)}zoomIn(e,t){return this.zoomTo(this.getZoom()+1,e,t),this}zoomOut(e,t){return this.zoomTo(this.getZoom()-1,e,t),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,i){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new t.l("movestart",i)).fire(new t.l("move",i)).fire(new t.l("moveend",i))),this}getBearing(){return this.transform.bearing}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(e,i,r){return this.easeTo(t.e({bearing:e},i),r)}resetNorth(e,i){return this.rotateTo(0,t.e({duration:1e3},e),i),this}resetNorthPitch(e,i){return this.easeTo(t.e({bearing:0,pitch:0,roll:0,duration:1e3},e),i),this}snapToNorth(e,t){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,t):this}getPitch(){return this.transform.pitch}setPitch(e,t){return this.jumpTo({pitch:e},t),this}getRoll(){return this.transform.roll}setRoll(e,t){return this.jumpTo({roll:e},t),this}cameraForBounds(e,t){e=U.convert(e).adjustAntiMeridian();let i=t&&t.bearing||0;return this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),i,t)}_cameraForBoxAndBearing(e,i,r,a){let n={top:0,bottom:0,right:0,left:0};if("number"==typeof(a=t.e({padding:n,offset:[0,0],maxZoom:this.transform.maxZoom},a)).padding){let e=a.padding;a.padding={top:e,bottom:e,right:e,left:e}}let o=t.e(n,a.padding);a.padding=o;let l=this.transform,s=new U(e,i);return this.cameraHelper.cameraForBoxAndBearing(a,o,s,r,l)}fitBounds(e,t,i){return this._fitInternal(this.cameraForBounds(e,t),t,i)}fitScreenCoordinates(e,i,r,a,n){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(t.P.convert(e)),this.transform.screenPointToLocation(t.P.convert(i)),r,a),a,n)}_fitInternal(e,i,r){return e?(delete(i=t.e(e,i)).padding,i.linear?this.easeTo(i,r):this.flyTo(i,r)):this}jumpTo(e,i){this.stop();let r=this._getTransformForUpdate(),a=!1,n=!1,o=!1,l=r.zoom;this.cameraHelper.handleJumpToCenterZoom(r,e);let s=r.zoom!==l;return"elevation"in e&&r.elevation!==+e.elevation&&r.setElevation(+e.elevation),"bearing"in e&&r.bearing!==+e.bearing&&(a=!0,r.setBearing(+e.bearing)),"pitch"in e&&r.pitch!==+e.pitch&&(n=!0,r.setPitch(+e.pitch)),"roll"in e&&r.roll!==+e.roll&&(o=!0,r.setRoll(+e.roll)),null==e.padding||r.isPaddingEqual(e.padding)||r.setPadding(e.padding),this._applyUpdatedTransform(r),this.fire(new t.l("movestart",i)).fire(new t.l("move",i)),s&&this.fire(new t.l("zoomstart",i)).fire(new t.l("zoom",i)).fire(new t.l("zoomend",i)),a&&this.fire(new t.l("rotatestart",i)).fire(new t.l("rotate",i)).fire(new t.l("rotateend",i)),n&&this.fire(new t.l("pitchstart",i)).fire(new t.l("pitch",i)).fire(new t.l("pitchend",
53i)),o&&this.fire(new t.l("rollstart",i)).fire(new t.l("roll",i)).fire(new t.l("rollend",i)),this.fire(new t.l("moveend",i))}calculateCameraOptionsFromTo(e,i,r,a=0){let n=t.a0.fromLngLat(e,i),o=t.a0.fromLngLat(r,a),l=o.x-n.x,s=o.y-n.y,c=o.z-n.z,u=Math.hypot(l,s,c);if(0===u)throw Error("Can't calculate camera options with same From and To");let h=Math.hypot(l,s),p=t.aj(this.transform.cameraToCenterDistance/u/this.transform.tileSize),d=180*Math.atan2(l,-s)/Math.PI,f=180*Math.acos(h/u)/Math.PI;return f=c<0?90-f:90+f,{center:o.toLngLat(),elevation:a,zoom:p,pitch:f,bearing:d}}calculateCameraOptionsFromCameraLngLatAltRotation(e,t,i,r,a){let n=this.transform.calculateCenterFromCameraLngLatAlt(e,t,i,r);return{center:n.center,elevation:n.elevation,zoom:n.zoom,bearing:i,pitch:r,roll:a}}easeTo(e,i){let r,a;this._stop(!1,e.easeId),(!1===(e=t.e({offset:[0,0],duration:500,easing:t.cn},e)).animate||!e.essential&&p.prefersReducedMotion)&&(e.duration=0);let n=this._getTransformForUpdate(),o=this.getBearing(),l=n.pitch,s=n.roll,c="bearing"in e?this._normalizeBearing(e.bearing,o):o,u="pitch"in e?+e.pitch:l,h="roll"in e?this._normalizeBearing(e.roll,s):s,d="padding"in e?e.padding:n.padding,f
53=t.P.convert(e.offset);e.around&&(r=t.S.convert(e.around),a=n.locationToScreenPoint(r));let m={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},g=this.cameraHelper.handleEaseTo(n,{bearing:c,pitch:u,roll:h,padding:d,around:r,aroundPoint:a,offsetAsPoint:f,offset:e.offset,zoom:e.zoom,center:e.center});return this._rotating=this._rotating||o!==c,this._pitching=this._pitching||u!==l,this._rolling=this._rolling||h!==s,this._padding=!n.isPaddingEqual(d),this._zooming=this._zooming||g.isZooming,this._easeId=e.easeId,this._prepareEase(i,e.noMoveStart,m),this.terrain&&this._prepareElevation(g.elevationCenter),this._ease(t=>{g.easeFunc(t),this.terrain&&!e.freezeElevation&&this._updateElevation(t),this._applyUpdatedTransform(n),this._fireMoveEvents(i)},t=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(i,t)},e),this}_prepareEase(e,i,r={}){this._moving=!0,i||r.moving||this.fire(new t.l("movestart",e)),this._zooming&&!r.zooming&&this.fire(new t.l("zoomstart",e)),this._rotating&&!r.rotating&&this.fire(new t.l("rotatestart",e)),this._pitching&&!r.pitching&&this.fire(new t.l("pitchstart",e)),this._rolling&&!r.rolling&&this.fire(new t.l("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let i=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&i!==this._elevationTarget){let t=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(t-(i-(t*e+this._elevationStart))/(1-e)),this._elevationTarget=i}this.transform.setElevation(t.C.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let t=e.getCameraLngLat(),i=e.getCameraAltitude(),r=this.terrain?this.terrain.getElevationForLngLatZoom(t,e.zoom):0;if(i<r){let i=this.calculateCameraOptionsFromTo(t,r,e.center,e.elevation);return{pitch:i.pitch,zoom:i.zoom}}return{}}_applyUpdatedTransform(e){let t=[];if(t.push(e=>this._elevateCameraIfInsideTerrain(e)),this.transformCameraUpdate&&t.push(e=>this.transformCameraUpdate(e)),!t.length)return;let i=e.clone();for(let e of t){let t=i.clone(),{center:r,zoom:a,roll:n,pitch:o,bearing:l,elevation:s}=e(t);r&&t.setCenter(r),void 0!==s&&t.setElevation(s),void 0!==a&&t.setZoom(a),void 0!==n&&t.setRoll(n),void 0!==o&&t.setPitch(o),void 0!==l&&t.setBearing(l),i.apply(t)}this.transform.apply(i)}_fireMoveEvents(e){this.fire(new t.l("move",e)),this._zooming&&this.fire(new t.l("zoom",e)),this._rotating&&this.fire(new t.l("rotate",e)),this._pitching&&this.fire(new t.l("pitch",e)),this._rolling&&this.fire(new t.l("roll",e))}_afterEase(e,i){if(this._easeId&&i&&this._easeId===i)return;delete this._easeId;let r=this._zooming,a=this._rotating,n=this._pitching,o=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,r&&this.fire(new t.l("zoomend",e)),a&&this.fire(new t.l("rotateend",e)),n&&this.fire(new t.l("pitchend",e)),o&&this.fire(new t.l("rollend",e)),this.fire(new t.l("moveend",e))}flyTo(e,i){if(!e.essential&&p.prefersReducedMotion){let r=t.Q(e,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(r,i)}this.stop(),e=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.cn},e);let r=this._getTransformForUpdate(),a=r.bearing,n=r.pitch,o=r.roll,l=r.padding,s="bearing"in e?this._normalizeBearing(e.bearing,a):a,c="pitch"in e?+e.pitch:n,u="roll"in e?this._normalizeBearing(e.roll,o):o,h="padding"in e?e.padding:r.padding,d=t.P.convert(e.offset),f=r.centerPoint.add(d),m=r.screenPointToLocation(f),g=this.cameraHelper.handleFlyTo(r,{bearing:s,pitch:c,roll:u,padding:h,locationAtOffset:m,offsetAsPoint:d,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),y=e.curve,_=Math.max(r.width,r.height),b=_/g.scaleOfZoom,x=g.pixelPathLength;"number"==typeof g.scaleOfMinZoom&&(y=Math.sqrt(_/g.scaleOfMinZoom/x
53*2));let v=y*y;function w(e){let t=(b*b-_*_+(e?-1:1)*v*v*x*x)/(2*(e?b:_)*v*x);return Math.log(Math.sqrt(t*t+1)-t)}function z(e){return(Math.exp(e)-Math.exp(-e))/2}function S(e){return(Math.exp(e)+Math.exp(-e))/2}let T=w(!1),k=function(e){return S(T)/S(T+y*e)},E=function(e){var t;return _*((S(T)*(z(t=T+y*e)/S(t))-z(T))/v)/x},M=(w(!0)-T)/y;if(2e-6>Math.abs(x)||!isFinite(M)){if(1e-6>Math.abs(_-b))return this.easeTo(e,i);let t=b<_?-1:1;M=Math.abs(Math.log(b/_))/y,E=()=>0,k=e=>Math.exp(t*y*e)}return e.duration="duration"in e?+e.duration:1e3*M/("screenSpeed"in e?e.screenSpeed/y:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=a!==s,this._pitching=c!==n,this._rolling=u!==o,this._padding=!r.isPaddingEqual(h),this._prepareEase(i,!1),this.terrain&&this._prepareElevation(g.targetCenter),this._ease(p=>{let m=p*M,y=1/k(m),_=E(m);this._rotating&&r.setBearing(t.C.number(a,s,p)),this._pitching&&r.setPitch(t.C.number(n,c,p)),this._rolling&&r.setRoll(t.C.number(o,u,p)),this._padding&&(r.interpolatePadding(l,h,p),f=r.centerPoint.add(d)),g.easeFunc(p,y,_,f),this.terrain&&!e.freezeElevation&&this._updateElevation(p),this._applyUpdatedTransform(r),this._fireMoveEvents(i)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(i)},e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){var i;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t)}return e||null==(i=this.handlers)||i.stop(!1),this}_ease(e,t,i){!1===i.animate||0===i.duration?(e(1),t()):(this._easeStart=p.now(),this._easeOptions=i,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,i){let r=Math.abs((e=t.aN(e,-180,180))-i);return Math.abs(e-360-i)<r&&(e-=360),Math.abs(e+360-i)<r&&(e+=360),e}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLatZoom(t.S.convert(e),this.transform.tileZoom):null}}let am={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class ag{constructor(e=am){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=e=>{e&&("metadata"===e.sourceDataType||"visibility"===e.sourceDataType||"style"===e.dataType||"terrain"===e.type)&&this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=d.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=d.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=d.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(){d.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,t){let i=this._map._getUIString(`AttributionControl.${t}`);e.title=i,e.setAttribute("aria-label",i)}_updateAttributions(){if(!this._map.style)return;let e=[];
53if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(e=>"string"!=typeof e?"":e)):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}let t=this._map.style.sourceCaches;for(let i in t){let r=t[i];if(r.used||r.usedForTerrain){let t=r.getSource();t.attribution&&0>e.indexOf(t.attribution)&&e.push(t.attribution)}}(e=e.filter(e=>String(e).trim())).sort((e,t)=>e.length-t.length);let i=(e=e.filter((t,i)=>{for(let r=i+1;r<e.length;r++)if(e[r].indexOf(t)>=0)return!1;return!0})).join(" | ");i!==this._attribHTML&&(this._attribHTML=i,e.length?(this._innerContainer.innerHTML=d.sanitize(i),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class ay{constructor(e={}){this._updateCompact=()=>{let e=this._container.children;if(e.length){let t=e[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=d.create("div","maplibregl-ctrl");let t=d.create("a","maplibregl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://maplibre.org/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){d.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class a_{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){let t=this._currentlyRunning;for(let i of t?this._queue.concat(t):this._queue)if(i.id===e)return void(i.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw Error("Attempting to run(), but is already running.");let t=this._currentlyRunning=this._queue;for(let i of(this._queue=[],t))if(!i.cancelled&&(i.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var ab=t.aI([{name:"a_pos3d",type:"Int16",components:3}]);class ax extends t.E{constructor(e){super(),this._lastTilesetChange=p.now(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,i){this.sourceCache.update(e,i),this._renderableTilesKeys=[];let r={};for(let a of ef(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:i,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))r[a.key]=!0,this._renderableTilesKeys.push(a.key),this._tiles[a.key]||(a.terrainRttPosMatrix32f=new Float64Array(16),t.bX(a.terrainRttPosMatrix32f,0,t.$,t.$,0,0,1),this._tiles[a.key]=new ei(a,this.tileSize),this._lastTilesetChange=p.now());for(let e in this._tiles)r[e]||delete this._tiles[e]}freeRtt(e){for(let t in this._tiles){let i=this._tiles[t];(!e||i.tileID.equals(e)||i.tileID.isChildOf(e)||e.isChildOf(i.tileID))&&(i.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,t){return t?this._getTerrainCoordsForTileRanges(e,t):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let i={};for(let r of this._renderableTilesKeys){let a=this._tiles[r].tileID,n=e.clone(),o=t.b9();if(a.canonical.equals(e.canonical))t.bX(o,0,t.$,t.$,0,0,1);else if(a.canonical.isChildOf(e.canonical)){let i=a.canonical.z-e.canonical.z,r=a.canonical.x-(a.canonical.x>>i<<i),n=a.canonical.y-(a.canonical.y>>i<<i),l=t.$>>i;t.bX(o,0,l,l,0,0,1),t.M(o,o,[-r*l,-n*l,0])}else{if(!e.canonical.isChildOf(a.canonical))continue;{let i=e.canonical.z-a.canonical.z,r=e.canonical.x-(e.canonical.x>>i<<i),n=e.canonical.y-(e.canonical.y>>i<<i),l=t.$>>i;t.bX(o,0,t.$,t.$,0,0,1),t.M(o,o,[r*l,n*l,0]),t.N(o,o,[1/2**i,1/2**i,0])}}n.terrainRttPosMatrix32f=new Float32Array(o),i[r]=n}return i}_getTerrainCoordsForTileRanges(e,i){let r={};for(let a of this._renderableTilesKeys){let n=this._tiles[a].tileID;if(!this._isWithinTileRanges(n,i))continue;let o=e.clone(),l=t.b9();if(n.canonical.z===e.canonical.z){let i=e.canonical.x-n.canonical.x,r=e.canonical.y-n.canonical.y;t.bX(l,0,t.$,t.$,0,0,1),t.M(l,l,[i*t.$,r*t.$,0])}else if(n.canonical.z>e.canonical.z){let i=n.canonical.z-e.canonical.z,r=n.canonical.x-(n.canonical.x>>i<<i),a=n.canonical.y-(n.canonical.y>>i<<i),o=e.canonical.x-(n.canonical.x>>i),s=e.canonical.y-(n.canonical.y>>i),c=t.$>>i;t.bX(l,0,c,c,0,0,1),t.M(l,l,[-r*c+o*t.$,-a*c+s*t.$,0])}else{let i=e.canonical.z-n.canonical.z,r=e.canonical.x-(e.canonical.x>>i<<i),a=e.canonical.y-(e.canonical.y>>i<<i),o=(e.canonical.x>>i)-n.canonical.x,s=(e.canonical.y>>
53i)-n.canonical.y,c=t.$<<i;t.bX(l,0,c,c,0,0,1),t.M(l,l,[r*t.$+o*c,a*t.$+s*c,0])}o.terrainRttPosMatrix32f=new Float32Array(l),r[a]=o}return r}getSourceTile(e,t){let i=this.sourceCache._source,r=e.overscaledZ-this.deltaZoom;if(r>i.maxzoom&&(r=i.maxzoom),r<i.minzoom)return null;this._sourceTileCache[e.key]||(this._sourceTileCache[e.key]=e.scaledTo(r).key);let a=this.sourceCache.getTileByID(this._sourceTileCache[e.key]);if((!a||!a.dem)&&t)for(;r>=i.minzoom&&(!a||!a.dem);)a=this.sourceCache.getTileByID(e.scaledTo(r--).key);return a}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,t){return t[e.canonical.z]&&e.canonical.x>=t[e.canonical.z].minTileX&&e.canonical.x<=t[e.canonical.z].maxTileX&&e.canonical.y>=t[e.canonical.z].minTileY&&e.canonical.y<=t[e.canonical.z].maxTileY}}class av{constructor(e,t,i){this._meshCache={},this.painter=e,this.sourceCache=new ax(t),this.options=i,this.exaggeration="number"==typeof i.exaggeration?i.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(e,i,r,a=t.$){var n;if(!(i>=0&&i<a&&r>=0&&r<a))return 0;let o=this.getTerrainData(e),l=null==(n=o.tile)?void 0:n.dem;if(!l)return 0;let s=t.cr([],[i/a*t.$,r/a*t.$],o.u_terrain_matrix),c=[s[0]*l.dim,s[1]*l.dim],u=Math.floor(c[0]),h=Math.floor(c[1]),p=c[0]-u,d=c[1]-h;return l.get(u,h)*(1-p)*(1-d)+l.get(u+1,h)*p*(1-d)+l.get(u,h+1)*(1-p)*d+l.get(u+1,h+1)*p*d}getElevationForLngLatZoom(e,i){if(!t.cs(i,e.wrap()))return 0;let{tileID:r,mercatorX:a,mercatorY:n}=this._getOverscaledTileIDFromLngLatZoom(e,i);return this.getElevation(r,a%t.$,n%t.$,t.$)}getElevation(e,i,r,a=t.$){return this.getDEMElevation(e,i,r,a)*this.exaggeration}getTerrainData(e){if(!this._emptyDemTexture){let e=this.painter.context,i=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new t.T(e,i,e.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new t.T(e,new t.R({width:1,height:1}),e.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.af([])}let i=this.sourceCache.getSourceTile(e,!0);if(i&&i.dem&&(!i.demTexture||i.needsTerrainPrepare)){let e=this.painter.context;i.demTexture=this.painter.getTileTexture(i.dem.stride),i.demTexture?i.demTexture.update(i.dem.getPixels(),{premultiply:!1}):i.demTexture=new t.T(e,i.dem.getPixels(),e.gl.RGBA,{premultiply:!1}),i.demTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),i.needsTerrainPrepare=!1}let r=i&&i+i.tileID.key+e.key;if(r&&!this._demMatrixCache[r]){let r=this.sourceCache.sourceCache._source.maxzoom,a=e.canonical.z-i.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=r?a=e.canonical.z-r:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let n=e.canonical.x-(e.canonical.x>>a<<a),o=e.canonical.y-(e.canonical.y>>a<<a),l=t.ct(new Float64Array(16),[1/(t.$<<a),1/(t.$<<a),0]);t.M(l,l,[n*t.$,o*t.$,0]),this._demMatrixCache[e.key]={matrix:l,coord:e}}return{u_depth:2,u_terrain:3,u_terrain_dim:i&&i.dem&&i.dem.dim||1,u_terrain_matrix:r?this._demMatrixCache[e.key].matrix:this._emptyDemMatrix,u_terrain_unpack:i&&i.dem&&i.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(i&&i.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:i}}getFramebuffer(e){let i=this.painter,r=i.width/devicePixelRatio,a=i.height/devicePixelRatio;return this._fbo&&(this._fbo.width!==r||this._fbo.height!==a)&&(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new t.T(i.context,{width:r,height:a,data:null},i.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(i.context.gl.NEAREST,i.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new t.T(i.context,{width:r,height:a,data:null},i.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(i.context.gl.NEAREST,i.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=i.context.createFramebuffer(r,a,!0,!1),this._fbo.depthAttachment.set(i.context.createRenderbuffer(i.context.gl.DEPTH_COMPONENT16,r,a))),this._fbo.colorAttachment.set("coords"===e?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){let e=this.painter.context;if(this._coordsTexture)return this._coordsTexture;let i=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let e=0,t=0;e<this._coordsTextureSize;e++)for(let r=0;r<this._coordsTextureSize;r++,t+=4)i[t+0]=255&r,i[t+1]=255&e,i[t+2]=r>>8<<4|e>>8,i[t+3]=0;let r=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(i.buffer)),a=new t.T(e,r,e.gl.RGBA,{premultiply:!1});return a.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=a,a}
53pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);let i=new Uint8Array(4),r=this.painter.context,a=r.gl,n=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),o=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),l=Math.round(this.painter.height/devicePixelRatio);r.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),a.readPixels(n,l-o-1,1,1,a.RGBA,a.UNSIGNED_BYTE,i),r.bindFramebuffer.set(null);let s=i[0]+(i[2]>>4<<8),c=i[1]+((15&i[2])<<8),u=this.coordsIndex[255-i[3]],h=u&&this.sourceCache.getTileByID(u);if(!h)return null;let p=this._coordsTextureSize,d=(1<<h.tileID.canonical.z)*p;return new t.a0((h.tileID.canonical.x*p+s)/d+h.tileID.wrap,(h.tileID.canonical.y*p+c)/d,this.getElevation(h.tileID,s,c,p))}depthAtPoint(e){let t=new Uint8Array(4),i=this.painter.context,r=i.gl;return i.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),r.readPixels(e.x,this.painter.height/devicePixelRatio-e.y-1,1,1,r.RGBA,r.UNSIGNED_BYTE,t),i.bindFramebuffer.set(null),(t[0]/0x1000000+t[1]/65536+t[2]/256+t[3])/256}getTerrainMesh(e){var i;let r=(null==(i=this.painter.style.projection)?void 0:i.transitionState)>0,a=r&&0===e.canonical.y,n=r&&e.canonical.y===(1<<e.canonical.z)-1,o=`m_${a?"n":""}_${n?"s":""}`;if(this._meshCache[o])return this._meshCache[o];let l=this.painter.context,s=new t.cu,c=new t.aM,u=this.meshSize,h=t.$/u,p=u*u;for(let e=0;e<=u;e++)for(let t=0;t<=u;t++)s.emplaceBack(t*h,e*h,0);for(let e=0;e<p;e+=u+1)for(let t=0;t<u;t++)c.emplaceBack(t+e,u+t+e+1,u+t+e+2),c.emplaceBack(t+e,u+t+e+2,t+e+1);let d=s.length,f=d+(u+1),m=(u+1)*u,g=a?t.bg:0,y=+!a,_=n?t.bh:t.$,b=+!n;for(let e=0;e<=u;e++)s.emplaceBack(e*h,g,y);for(let e=0;e<=u;e++)s.emplaceBack(e*h,_,b);for(let e=0;e<u;e++)c.emplaceBack(m+e,f+e,f+e+1),c.emplaceBack(m+e,f+e+1,m+e+1),c.emplaceBack(0+e,d+e+1,d+e),c.emplaceBack(0+e,0+e+1,d+e+1);let x=s.length,v=x+2*(u+1);for(let e of[0,1])for(let i=0;i<=u;i++)for(let r of[0,1])s.emplaceBack(e*t.$,i*h,r);for(let e=0;e<2*u;e+=2)c.emplaceBack(x+e,x+e+1,x+e+3),c.emplaceBack(x+e,x+e+3,x+e+2),c.emplaceBack(v+e,v+e+3,v+e+1),c.emplaceBack(v+e,v+e+2,v+e+3);let w=new e6(l.createVertexBuffer(s,ab.members),l.createIndexBuffer(c),t.aL.simpleSegment(0,0,s.length,c.length));return this._meshCache[o]=w,w}getMeshFrameDelta(e){return 2*Math.PI*t.bt/Math.pow(2,Math.max(e,0))/5}getMinTileElevationForLngLatZoom(e,t){var i;let{tileID:r}=this._getOverscaledTileIDFromLngLatZoom(e,t);return null!=(i=this.getMinMaxElevation(r).minElevation)?i:0}getMinMaxElevation(e){let t=this.getTerrainData(e).tile,i={minElevation:null,maxElevation:null};return t&&t.dem&&(i.minElevation=t.dem.min*this.exaggeration,i.maxElevation=t.dem.max*this.exaggeration),i}_getOverscaledTileIDFromLngLatZoom(e,i){let r=t.a0.fromLngLat(e.wrap()),a=(1<<i)*t.$,n=r.x*a,o=r.y*a,l=Math.floor(n/t.$),s=Math.floor(o/t.$);return{tileID:new t.Z(i,0,i,l,s),mercatorX:n,mercatorY:o}}}class aw{constructor(e,t,i){this._context=e,this._size=t,this._tileSize=i,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(let e of this._objects)e.texture.destroy(),e.fbo.destroy()}_createObject(e){let i=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),r=new t.T(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return r.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),i.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),i.colorAttachment.set(r.texture),{id:e,fbo:i,texture:r,stamp:-1,inUse:!1}}getObjectForId(e){return this._objects[e]}useObject(e){e.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(t=>e.id!==t),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(let e of this._recentlyUsed)if(!this._objects[e].inUse)return this._objects[e];if(this._objects.length>=this._size)throw Error("No free RenderPool available, call freeAllObjects() required!");let e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(let e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length<this._size)&&!1===this._objects.some(e=>!e.inUse)}}let az={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class aS{constructor(e,t){this.painter=e,this.terrain=t,this.pool=new aw(e.context,30,t.sourceCache.tileSize*t.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}
53prepareForRender(e,t){for(let i in this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter(i=>!e._layers[i].isHidden(t)),this._coordsAscending={},e.sourceCaches){this._coordsAscending[i]={};let t=e.sourceCaches[i].getVisibleCoordinates(),r=e.sourceCaches[i].getSource(),a=r instanceof H?r.terrainTileRanges:null;for(let e of t){let t=this.terrain.sourceCache.getTerrainCoords(e,a);for(let e in t)this._coordsAscending[i][e]||(this._coordsAscending[i][e]=[]),this._coordsAscending[i][e].push(t[e])}}for(let t of(this._coordsAscendingStr={},e._order)){let i=e._layers[t],r=i.source;if(az[i.type]&&!this._coordsAscendingStr[r])for(let e in this._coordsAscendingStr[r]={},this._coordsAscending[r])this._coordsAscendingStr[r][e]=this._coordsAscending[r][e].map(e=>e.key).sort().join()}for(let e of this._renderableTiles)for(let t in this._coordsAscendingStr){let i=this._coordsAscendingStr[t][e.tileID.key];i&&i!==e.rttCoords[t]&&(e.rtt=[])}}renderLayer(e,i){if(e.isHidden(this.painter.transform.zoom))return!1;let r=Object.assign(Object.assign({},i),{isRenderingToTexture:!0}),a=e.type,n=this.painter,o=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(az[a]&&(this._prevType&&az[this._prevType]||this._stacks.push([]),this._prevType=a,this._stacks[this._stacks.length-1].push(e.id),!o))return!0;if(az[this._prevType]||az[a]&&o){this._prevType=a;let e=this._stacks.length-1,i=this._stacks[e]||[];for(let a of this._renderableTiles){if(this.pool.isFull()&&(rx(this.painter,this.terrain,this._rttTiles,r),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(a),a.rtt[e]){let t=this.pool.getObjectForId(a.rtt[e].id);if(t.stamp===a.rtt[e].stamp){this.pool.useObject(t);continue}}let o=this.pool.getOrCreateFreeObject();this.pool.useObject(o),this.pool.stampObject(o),a.rtt[e]={id:o.id,stamp:o.stamp},n.context.bindFramebuffer.set(o.fbo.framebuffer),n.context.clear({color:t.be.transparent,stencil:0}),n.currentStencilSource=void 0;for(let e=0;e<i.length;e++){let t=n.style._layers[i[e]],l=t.source?this._coordsAscending[t.source][a.tileID.key]:[a.tileID];n.context.viewport.set([0,0,o.fbo.width,o.fbo.height]),n._renderTileClippingMasks(t,l,!0),n.renderLayer(n,n.style.sourceCaches[t.source],t,l,r),t.source&&(a.rttCoords[t.source]=this._coordsAscendingStr[t.source][a.tileID.key])}}return rx(this.painter,this.terrain,this._rttTiles,r),this._rttTiles=[],this.pool.freeAllObjects(),az[a]}return!1}}let aT={"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"},ak={hash:!1,interactive:!0,bearingSnap:7,attributionControl:am,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,maxTileC
53acheSize:null,maxTileCacheZoomLevels:t.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},aE={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class aM{constructor(e,i,r=!1){this.mousedown=e=>{this.startMove(e,d.mousePos(this.element,e)),d.addEventListener(window,"mousemove",this.mousemove),d.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=e=>{this.move(e,d.mousePos(this.element,e))},this.mouseup=e=>{this._rotatePitchHanlder.dragEnd(e),this.offTemp()},this.touchstart=e=>{1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=d.touchPos(this.element,e.targetTouches)[0],this.startMove(e,this._startPos),d.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),d.addEventListener(window,"touchend",this.touchend))},this.touchmove=e=>{1!==e.targetTouches.length?this.reset():(this._lastPos=d.touchPos(this.element,e.targetTouches)[0],this.move(e,this._lastPos))},this.touchend=e=>{0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHanlder.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=i;let a=new rX;this._rotatePitchHanlder=new rG({clickTolerance:3,move:(e,a)=>{let n=i.getBoundingClientRect(),o=new t.P((n.bottom-n.top)/2,(n.right-n.left)/2);return{bearingDelta:t.cm(new t.P(e.x,a.y),a,o),pitchDelta:r?-.5*(a.y-e.y):void 0}},moveStateManager:a,enable:!0,assignEvents:()=>{}}),this.map=e,d.addEventListener(i,"mousedown",this.mousedown),d.addEventListener(i,"touchstart",this.touchstart,{passive:!1}),d.addEventListener(i,"touchcancel",this.reset)}startMove(e,t){this._rotatePitchHanlder.dragStart(e,t),d.disableDrag()}move(e,t){let i=this.map,{bearingDelta:r,pitchDelta:a}=this._rotatePitchHanlder.dragMove(e,t)||{};r&&i.setBearing(i.getBearing()+r),a&&i.setPitch(i.getPitch()+a)}off(){let e=this.element;d.removeEventListener(e,"mousedown",this.mousedown),d.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),d.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),d.removeEventListener(window,"touchend",this.touchend),d.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){d.enableDrag(),d.removeEventListener(window,"mousemove",this.mousemove),d.removeEventListener(window,"mouseup",this.mouseup),d.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),d.removeEventListener(window,"touchend",this.touchend)}}function aP(e,i,r,a=!1){if(a||!r.getCoveringTilesDetailsProvider().allowWorldCopies())return null==e?void 0:e.wrap();let n=new t.S(e.lng,e.lat);if(e=new t.S(e.lng,e.lat),i){let a=new t.S(e.lng-360,e.lat),n=new t.S(e.lng+360,e.lat),o=r.locationToScreenPoint(e).distSqr(i);r.locationToScreenPoint(a).distSqr(i)<o?e=a:r.locationToScreenPoint(n).distSqr(i)<o&&(e=n)}for(;Math.abs(e.lng-r.center.lng)>180;){let t=r.locationToScreenPoint(e);if(t.x>=0&&t.y>=0&&t.x<=r.width&&t.y<=r.height)break;e.lng>r.center.lng?e.lng-=360:e.lng+=360}return e.lng!==n.lng&&r.isPointOnMapSurface(r.locationToScreenPoint(e))?e:n}let aI={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 aA(e,t,i){let r=e.classList;for(let e in aI)r.remove(`maplibregl-${i}-anchor-${e}`);r.add(`maplibregl-${i}-anchor-${t}`)}class aC extends t.E{constructor(e){if(super(),this._onKeyPress=e=>{let t=e.code,i=e.charCode||e.keyCode;"Space"!==t&&"Enter"!==t&&32!==i&&13!==i||this.togglePopup()},this._onMapClick=e=>{let t=e.originalEvent.target,i=this._element;this._popup&&(t===i||i.contains(t))&&this.togglePopup()},this._update=e=>{if(!this._map)return;let t=this._map.loaded()&&!this._map.isMoving();"terrain"!==(null==e?void 0:e.type)&&("render"!==(null==e?void 0:e.type)||t)||this._map.once("render",this._update),this._lngLat=aP(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 i="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?i=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(i=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let r="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?r="rotateX(0deg)":"map"===this._pitchAlignment&&(r=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||e&&"moveend"!==e.type||(this._pos=this._pos.round()),d.setTransform(this._element,`${aI[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${r} ${i}`),p.frameAsync(new AbortController).then(()=>{this._updateOpacity(e&&"moveend"===e.type)}).catch(()=>{})},this._onMove=e=>{if(!this._isDragging){let t=this._clickTolerance||this._map._clickTolerance;this._isDragging=e.point.dist(this._pointerdownPos)>=t}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.l("dragstart"))),this.fire(new t.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),"active"===this._state&&this.fire(new t.l("dragend")),this._state="inactive"},this._addDragHandler=e=>{this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,this.setOpacity(null==e?void 0:e.opacity,null==e?void 0:e.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=t.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=d.create("div");let i=d.createNS("http://www.w3.org/2000/svg","svg");i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height","41px"),i.setAttributeNS(null,"width","27px"),i.setAttributeNS(null,"viewBox","0 0 27 41");let r=d.createNS("http://www.w3.org/2000/svg","g");
53r.setAttributeNS(null,"stroke","none"),r.setAttributeNS(null,"stroke-width","1"),r.setAttributeNS(null,"fill","none"),r.setAttributeNS(null,"fill-rule","evenodd");let a=d.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"fill-rule","nonzero");let n=d.createNS("http://www.w3.org/2000/svg","g");for(let e of(n.setAttributeNS(null,"transform","translate(3.0, 29.0)"),n.setAttributeNS(null,"fill","#000000"),[{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"}])){let t=d.createNS("http://www.w3.org/2000/svg","ellipse");t.setAttributeNS(null,"opacity","0.04"),t.setAttributeNS(null,"cx","10.5"),t.setAttributeNS(null,"cy","5.80029008"),t.setAttributeNS(null,"rx",e.rx),t.setAttributeNS(null,"ry",e.ry),n.appendChild(t)}let o=d.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"fill",this._color);let l=d.createNS("http://www.w3.org/2000/svg","path");l.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"),o.appendChild(l);let s=d.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"opacity","0.25"),s.setAttributeNS(null,"fill","#000000");let c=d.createNS("http://www.w3.org/2000/svg","path");c.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"),s.appendChild(c);let u=d.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"transform","translate(6.0, 7.0)"),u.setAttributeNS(null,"fill","#FFFFFF");let h=d.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"transform","translate(8.0, 8.0)");let p=d.createNS("http://www.w3.org/2000/svg","circle");p.setAttributeNS(null,"fill","#000000"),p.setAttributeNS(null,"opacity","0.25"),p.setAttributeNS(null,"cx","5.5"),p.setAttributeNS(null,"cy","5.5"),p.setAttributeNS(null,"r","5.4999962");let f=d.createNS("http://www.w3.org/2000/svg","circle");f.setAttributeNS(null,"fill","#FFFFFF"),f.setAttributeNS(null,"cx","5.5"),f.setAttributeNS(null,"cy","5.5"),f.setAttributeNS(null,"r","5.4999962"),h.appendChild(p),h.appendChild(f),a.appendChild(n),a.appendChild(o),a.appendChild(s),a.appendChild(u),a.appendChild(h),i.appendChild(a),i.setAttributeNS(null,"height",41*this._scale+"px"),i.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(i),this._offset=t.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",e=>{e.preventDefault()}),this._element.addEventListener("mousedown",e=>{e.preventDefault()}),aA(this._element,this._anchor,"marker"),e&&e.className)for(let t of e.className.split(" "))this._element.classList.add(t);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),d.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.S.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){let t=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[
530,-38.1],"bottom-left":[t,-1*(24.6+t)],"bottom-right":[-t,-1*(24.6+t)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){let e=this._popup;return this._element.style.opacity===this._opacityWhenCovered||e&&(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map))),this}_updateOpacity(e=!1){var i,r;let a=null==(i=this._map)?void 0:i.terrain,n=this._map.transform.isLocationOccluded(this._lngLat);if(!a||n){let e=n?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==e&&(this._element.style.opacity=e))}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let o=this._map,l=o.terrain.depthAtPoint(this._pos),s=o.terrain.getElevationForLngLatZoom(this._lngLat,o.transform.tileZoom);if(o.transform.lngLatToCameraDepth(this._lngLat,s)-l<.006)return void(this._element.style.opacity=this._opacity);let c=-this._offset.y/o.transform.pixelsPerMeter,u=Math.sin(o.getPitch()*Math.PI/180)*c,h=o.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),p=o.transform.lngLatToCameraDepth(this._lngLat,s+u)-h>.006;(null==(r=this._popup)?void 0:r.isOpen())&&p&&this._popup.remove(),this._element.style.opacity=p?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=t.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return(void 0===this._opacity||void 0===e&&void 0===t)&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==e&&(this._opacity=e),void 0!==t&&(this._opacityWhenCovered=t),this._map&&this._updateOpacity(!0),this}}let aR={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},aL=0,aD=!1,aO={maxWidth:100,unit:"metric"};function aF(e,t,i){let r=i&&i.maxWidth||100,a=e._container.clientHeight/2,n=e._container.clientWidth/2,o=e.unproject([n-r/2,a]),l=e.unproject([n+r/2,a]),s=Math.min(r,Math.round(e.project(l).x-e.project(o).x),e._container.clientWidth),c=o.distanceTo(l);if(i&&"imperial"===i.unit){let i=3.2808*c;i>5280?aj(t,s,i/5280,e._getUIString("ScaleControl.Miles")):aj(t,s,i,e._getUIString("ScaleControl.Feet"))}else i&&"nautical"===i.unit?aj(t,s,c/1852,e._getUIString("ScaleControl.NauticalMiles")):c>=1e3?aj(t,s,c/1e3,e._getUIString("ScaleControl.Kilometers")):aj(t,s,c,e._getUIString("ScaleControl.Meters"))}function aj(e,t,i,r){let a=function(e){let t=Math.pow(10,`${Math.floor(e)}`.length-1),i=e/t;return t*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:i>=1?1:function(e){let t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(i))}(i);e.style.width=a/i*t+"px",e.innerHTML=`${a}&nbsp;${r}`}let aB={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0};e.AJAXError=t.cy,e.Event=t.l,e.Evented=t.E,e.LngLat=t.S,e.MercatorCoordinate=t.a0,e.Point=t.P,e.addProtocol=t.cz,e.config=t.a,e.removeProtocol=t.cA,e.AttributionControl
53=ag,e.BoxZoomHandler=rN,e.CanvasSource=X,e.CooperativeGesturesHandler=ac,e.DoubleClickZoomHandler=ar,e.DragPanHandler=ao,e.DragRotateHandler=al,e.EdgeInsets=te,e.FullscreenControl=class extends t.E{constructor(e={}){super(),this._onFullscreenChange=()=>{var e;let t=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;null==(e=null==t?void 0:t.shadowRoot)?void 0:e.fullscreenElement;)t=t.shadowRoot.fullscreenElement;t===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,e&&e.container&&(e.container instanceof HTMLElement?this._container=e.container:t.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(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=d.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){d.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let e=this._fullscreenButton=d.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);d.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_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 t.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.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()}},e.GeoJSONSource=q,e.GeolocateControl=class extends t.E{constructor(e){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.l("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.l("geolocate",e)),this._finish()}},this._updateCamera=e=>{let i=new t.S(e.coords.longitude,e.coords.latitude),r=e.coords.accuracy,a=this._map.getBearing(),n=t.e({bearing:a},this.options.fitBoundsOptions),o=U.fromLngLat(i,r);this._map.fitBounds(o,n,{geolocateSource:!0})},this._updateMarker=e=>{if(e){let i=new t.S(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(i).addTo(this._map),this._userLocationDotMarker.setLngLat(i).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=e=>{if(this._map){if(1===e.code){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;let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&aD)return;this.options.trackUserLocation&&this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.l("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=d.create("button","maplibregl-ctrl-geolocate",this._container),d.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(!1===e){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}else{let e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
53se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=d.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new aC({element:this._dotElement}),this._circleElement=d.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new aC({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",e=>{e.geolocateSource||"ACTIVE_LOCK"!==this._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.l("trackuserlocationend")),this.fire(new t.l("userlocationlostfocus")))})}},this.options=t.e({},aR,e)}onAdd(e){return this._map=e,this._container=d.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return t._(this,arguments,void 0,function*(e=!1){if(void 0!==s&&!e)return s;if(void 0===window.navigator.permissions)return s=!!window.navigator.geolocation;try{let e=yield window.navigator.permissions.query({name:"geolocation"});s="denied"!==e.state}catch(e){s=!!window.navigator.geolocation}return s})})().then(e=>this._finishSetupUI(e)),this._container}onRemove(){void 0!==this._geolocationWatchID&&(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(),d.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,aL=0,aD=!1}_isOutOfMapMaxBounds(e){let t=this._map.getMaxBounds(),i=e.coords;return t&&(i.longitude<t.getWest()||i.longitude>t.getEast()||i.latitude<t.getSouth()||i.latitude>t.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 Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let e=this._map.getBounds(),t=e.getSouthEast(),i=e.getNorthEast(),r=t.distanceTo(i),a=Math.ceil(this._accuracy/(r/this._map._container.clientHeight)*2);this._circleElement.style.width=`${a}px`,this._circleElement.style.height=`${a}px`}trigger(){if(!this._setup)return t.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 t.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":aL--,aD=!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 t.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 t.l("trackuserlocationstart")),this.fire(new t.l("userlocationfocus"));break;default:throw 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 Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++aL>1?(e={maximumAge:6e5,timeout:0},aD=!0):(e=this.options.positionOptions,aD=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}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","fal
53se"),this.options.showUserLocation&&this._updateMarker(null)}},e.GlobeControl=class{constructor(){this._toggleProjection=()=>{var e;let t=null==(e=this._map.getProjection())?void 0:e.type;this._map.setProjection("mercator"!==t&&t?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var e;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),"globe"===(null==(e=this._map.getProjection())?void 0:e.type)?(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(e){return this._map=e,this._container=d.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=d.create("button","maplibregl-ctrl-globe",this._container),d.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(){d.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},e.Hash=rS,e.ImageSource=H,e.KeyboardHandler=r9,e.LngLatBounds=U,e.LogoControl=ay,e.Map=class extends af{constructor(e){var i,r;t.cv.mark(t.cw.create);let a=Object.assign(Object.assign(Object.assign({},ak),e),{canvasContextAttributes:Object.assign(Object.assign({},ak.canvasContextAttributes),e.canvasContextAttributes)});if(null!=a.minZoom&&null!=a.maxZoom&&a.minZoom>a.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(null!=a.minPitch&&null!=a.maxPitch&&a.minPitch>a.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(null!=a.minPitch&&a.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(null!=a.maxPitch&&a.maxPitch>180)throw Error("maxPitch must be less than or equal to 180");let n=new tl,o=new th;if(void 0!==a.minZoom&&n.setMinZoom(a.minZoom),void 0!==a.maxZoom&&n.setMaxZoom(a.maxZoom),void 0!==a.minPitch&&n.setMinPitch(a.minPitch),void 0!==a.maxPitch&&n.setMaxPitch(a.maxPitch),void 0!==a.renderWorldCopies&&n.setRenderWorldCopies(a.renderWorldCopies),super(n,o,{bearingSnap:a.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new a_,this._controls=[],this._mapId=t.a6(),this._contextLost=e=>{e.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.l("webglcontextlost",{originalEvent:e}))},this._contextRestored=e=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.l("webglcontextrestored",{originalEvent:e}))},this._onMapScroll=e=>{if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=a.interactive,this._maxTileCacheSize=a.maxTileCacheSize,this._maxTileCacheZoomLevels=a.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},a.canvasContextAttributes),this._trackResize=!0===a.trackResize,this._bearingSnap=a.bearingSnap,this._centerClampedToGround=a.centerClampedToGround,this._refreshExpiredTiles=!0===a.refreshExpiredTiles,this._fadeDuration=a.fadeDuration,this._crossSourceCollisions=!0===a.crossSourceCollisions,this._collectResourceTiming=!0===a.collectResourceTiming,this._locale=Object.assign(Object.assign({},aT),a.locale),this._clickTolerance=a.clickTolerance,this._overridePixelRatio=a.pixelRatio,this._maxCanvasSize=a.maxCanvasSize,this.transformCameraUpdate=a.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=!0===a.cancelPendingTileRequestsWhileZooming,this._imageQueueHandle=c.addThrottleControl(()=>this.isMoving()),this._requestManager=new x(a.transformRequest),"string"==typeof a.container){if(this._container=document.getElementById(a.container),!this._container)throw Error(`Container '${a.container}' not found.`)}else{if(!(a.container instanceof HTMLElement))throw Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=a.container}if(a.maxBounds&&this.setMaxBounds(a.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),"undefined"!=typeof window){addEventListener("online",this._onWindowOnline,!1);let e=!1,t=rz(e=>{this._trackResize&&!this._removed&&(this.resize(e),this.redraw())},50);this._resizeObserver=new ResizeObserver(i=>{e?t(i):e=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ad(this,a),this._hash=a.hash&&new rS("string"==typeof a.hash&&a.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:a.center,elevation:a.elevation,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,roll:a.roll}),a.bounds&&(this.resize(),this.fitBounds(a.bounds,t.e({},a.fitBoundsOptions,{duration:0}))));let l="string"==typeof a.style||"globe"!==(null==(r=null==(i=a.style)?void 0:i.projection)?void 0:r.type);this.resize(null,l),this._localIdeographFontFamily=a.localIdeographFontFamily,this._val
53idateStyle=a.validateStyle,a.style&&this.setStyle(a.style,{localIdeographFontFamily:a.localIdeographFontFamily}),a.attributionControl&&this.addControl(new ag("boolean"==typeof a.attributionControl?void 0:a.attributionControl)),a.maplibreLogo&&this.addControl(new ay,a.logoPosition),this.on("style.load",()=>{if(l||this._resizeTransform(),this.transform.unmodified){let e=t.Q(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(e)}}),this.on("data",e=>{this._update("style"===e.dataType),this.fire(new t.l(`${e.dataType}data`,e))}),this.on("dataloading",e=>{this.fire(new t.l(`${e.dataType}dataloading`,e))}),this.on("dataabort",e=>{this.fire(new t.l("sourcedataabort",e))})}_getMapId(){return this._mapId}setGlobalStateProperty(e,t){return this.style.setGlobalStateProperty(e,t),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(e,i){if(void 0===i&&(i=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e||!e.onAdd)return this.fire(new t.k(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let r=e.onAdd(this);this._controls.push(e);let a=this._controlPositions[i];return -1!==i.indexOf("bottom")?a.insertBefore(r,a.firstChild):a.appendChild(r),this}removeControl(e){if(!e||!e.onRemove)return this.fire(new t.k(Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let i=this._controls.indexOf(e);return i>-1&&this._controls.splice(i,1),e.onRemove(this),this}hasControl(e){return this._controls.indexOf(e)>-1}calculateCameraOptionsFromTo(e,t,i,r){return null==r&&this.terrain&&(r=this.terrain.getElevationForLngLatZoom(i,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(e,t,i,r)}resize(e,i=!0){let[r,a]=this._containerDimensions(),n=this._getClampedPixelRatio(r,a);if(this._resizeCanvas(r,a,n),this.painter.resize(r,a,n),this.painter.overLimit()){let e=this.painter.context.gl;this._maxCanvasSize=[e.drawingBufferWidth,e.drawingBufferHeight];let t=this._getClampedPixelRatio(r,a);this._resizeCanvas(r,a,t),this.painter.resize(r,a,t)}this._resizeTransform(i);let o=!this._moving;return o&&(this.stop(),this.fire(new t.l("movestart",e)).fire(new t.l("move",e))),this.fire(new t.l("resize",e)),o&&this.fire(new t.l("moveend",e)),this}_resizeTransform(e=!0){var t;let[i,r]=this._containerDimensions();this.transform.resize(i,r,e),null==(t=this._requestedCameraState)||t.resize(i,r,e)}_getClampedPixelRatio(e,t){let{0:i,1:r}=this._maxCanvasSize,a=this.getPixelRatio(),n=e*a,o=t*a;return Math.min(n>i?i/n:1,o>r?r/o:1)*a}getPixelRatio(){var e;return null!=(e=this._overridePixelRatio)?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(e){return this.transform.setMaxBounds(U.convert(e)),this._update()}setMinZoom(e){if((e=null==e?-2:e)>=-2&&e<=this.transform.maxZoom)return this.transform.setMinZoom(e),this._update(),this.getZoom()<e&&this.setZoom(e),this;throw Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(e){if((e=null==e?22:e)>=this.transform.minZoom)return this.transform.setMaxZoom(e),this._update(),this.getZoom()>e&&this.setZoom(e),this;throw Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=null==e?0:e)<0)throw Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.setMinPitch(e),this._update(),this.getPitch()<e&&this.setPitch(e),this;throw Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(e){if((e=null==e?60:e)>180)throw Error("maxPitch must be less than or equal to 180");if(e>=this.transform.minPitch)return this.transform.setMaxPitch(e),this._update(),this.getPitch()>e&&this.setPitch(e),this;throw Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.setRenderWorldCopies(e),this._update()}project(e){return this.transform.locationToScreenPoint(t.S.convert(e),this.style&&this.terrain)}unproject(e){return this.transform.screenPointToLocation(t.P.convert(e),this.terrain)}isMoving(){var e;return this._moving||(null==(e=this.handlers)?void 0:e.isMoving())}isZooming(){var e;return this._zooming||(null==(e=this.handlers)?void 0:e.isZooming())}isRotating(){var e;return this._rotating||(null==(e=this.handlers)?void 0:e.isRotating())}
53_createDelegatedListener(e,t,i){if("mouseenter"===e||"mouseover"===e){let r=!1,a=a=>{let n=t.filter(e=>this.getLayer(e)),o=0!==n.length?this.queryRenderedFeatures(a.point,{layers:n}):[];o.length?r||(r=!0,i.call(this,new rL(e,this,a.originalEvent,{features:o}))):r=!1};return{layers:t,listener:i,delegates:{mousemove:a,mouseout:()=>{r=!1}}}}if("mouseleave"===e||"mouseout"===e){let r=!1,a=a=>{let n=t.filter(e=>this.getLayer(e));(0!==n.length?this.queryRenderedFeatures(a.point,{layers:n}):[]).length?r=!0:r&&(r=!1,i.call(this,new rL(e,this,a.originalEvent)))},n=t=>{r&&(r=!1,i.call(this,new rL(e,this,t.originalEvent)))};return{layers:t,listener:i,delegates:{mousemove:a,mouseout:n}}}{let r=e=>{let r=t.filter(e=>this.getLayer(e)),a=0!==r.length?this.queryRenderedFeatures(e.point,{layers:r}):[];a.length&&(e.features=a,i.call(this,e),delete e.features)};return{layers:t,listener:i,delegates:{[e]:r}}}}_saveDelegatedListener(e,t){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(t)}_removeDelegatedListener(e,t,i){if(!this._delegatedListeners||!this._delegatedListeners[e])return;let r=this._delegatedListeners[e];for(let e=0;e<r.length;e++){let a=r[e];if(a.listener===i&&a.layers.length===t.length&&a.layers.every(e=>t.includes(e))){for(let e in a.delegates)this.off(e,a.delegates[e]);return void r.splice(e,1)}}}on(e,t,i){if(void 0===i)return super.on(e,t);let r="string"==typeof t?[t]:t,a=this._createDelegatedListener(e,r,i);for(let t in this._saveDelegatedListener(e,a),a.delegates)this.on(t,a.delegates[t]);return{unsubscribe:()=>{this._removeDelegatedListener(e,r,i)}}}once(e,t,i){if(void 0===i)return super.once(e,t);let r="string"==typeof t?[t]:t,a=this._createDelegatedListener(e,r,i);for(let t in a.delegates){let n=a.delegates[t];a.delegates[t]=(...t)=>{this._removeDelegatedListener(e,r,i),n(...t)}}for(let t in this._saveDelegatedListener(e,a),a.delegates)this.once(t,a.delegates[t]);return this}off(e,t,i){return void 0===i?super.off(e,t):(this._removeDelegatedListener(e,"string"==typeof t?[t]:t,i),this)}queryRenderedFeatures(e,i){let r;if(!this.style)return[];let a=e instanceof t.P||Array.isArray(e),n=a?e:[[0,0],[this.transform.width,this.transform.height]];if(i=i||(a?{}:e)||{},n instanceof t.P||"number"==typeof n[0])r=[t.P.convert(n)];else{let e=t.P.convert(n[0]),i=t.P.convert(n[1]);r=[e,new t.P(i.x,e.y),i,new t.P(e.x,i.y),e]}return this.style.queryRenderedFeatures(r,i,this.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,i){return!1!==(i=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._val
53idateStyle},i)).diff&&i.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,i),this):(this._localIdeographFontFamily=i.localIdeographFontFamily,this._updateStyle(e,i))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){let t=this._locale[e];if(null==t)throw Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){var i,r;if(t.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(e,t));let a=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e?(this.style=new tH(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e,t,a):this.style.loadJSON(e,t,a)):(null==(r=null==(i=this.style)?void 0:i.projection)||r.destroy(),delete this.style),this}_lazyInitEmptyStyle(){this.style||(this.style=new tH(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,i){if("string"==typeof e){let r=this._requestManager.transformRequest(e,"Style");t.j(r,new AbortController).then(e=>{this._updateDiff(e.data,i)}).catch(e=>{e&&this.fire(new t.k(e))})}else"object"==typeof e&&this._updateDiff(e,i)}_updateDiff(e,i){try{this.style.setState(e,i)&&this._update(!0)}catch(r){t.w(`Unable to perform style diff: ${r.message||r.error||r}.  Rebuilding the style from scratch.`),this._updateStyle(e,i)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){let i=this.style&&this.style.sourceCaches[e];if(void 0!==i)return i.loaded();this.fire(new t.k(Error(`There is no source with ID '${e}'`)))}setTerrain(e){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),e){let i=this.style.sourceCaches[e.source];if(!i)throw Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);for(let r in null===this.terrain&&i.reload(),this.style._layers){let i=this.style._layers[r];"hillshade"===i.type&&i.source===e.source&&t.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."),"color-relief"===i.type&&i.source===e.source&&t.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 av(this.painter,i,e),this.painter.renderToTexture=new aS(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=t=>{var i;"style"===t.dataType?this.terrain.sourceCache.freeRtt():"source"===t.dataType&&t.tile&&(t.sourceId!==e.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))),"image"===(null==(i=t.source)?void 0:i.type)?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(t.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 t.l("terrain",{terrain:e})),this}getTerrain(){var e,t;return null!=(t=null==(e=this.terrain)?void 0:e.options)?t:null}areTilesLoaded(){let e=this.style&&this.style.sourceCaches;for(let t in e){let i=e[t]._tiles;for(let e in i){let t=i[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}}return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){return this.style.getSource(e)}setSourceTileLodParams(e,t,i){if(i){let r=this.getSource(i);if(!r)throw Error(`There is no source with ID "${i}", cannot set LOD parameters`);r.calculateTileZoom=eh(Math.max(1,e),Math.max(1,t))}else for(let i in this.style.sourceCaches)this.style.sourceCaches[i].getSource().calculateTileZoom=eh(Math.max(1,e),Math.max(1,t));return this._update(!0),this}refreshTiles(e,i){let r=this.style.sourceCaches[e];if(!r)throw Error(`There is no source cache with ID "${e}", cannot refresh tile`);void 0===i?r.reload(!0):r.refreshTiles(i.map(e=>new t.a3(e.z,e.x,e.y)))}addImage(e,i,r={}){let{pixelRatio:a=1,sdf:n=!1,stretchX:o,stretchY:l,content:s,textFitWidth:c,textFitHeight:u}=r;if(this._lazyInitEmptyStyle(),!(i instanceof HTMLImageElement||t.b(i))){if(void 0===i.width||void 0===i.height)return this.fire(new t.k(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`")));{let{width:r,height:h,data:p}=i;return this.style.addImage(e,{data:new t.R({width:r,height:h},new Uint8Array(p)),pixelRatio:a,stretchX:o,stretchY:l,content:s,textFitWidth:c,textFitHeight:u,sdf:n,version:0,userImage:i}),i.onAdd&&i.onAdd(this,e),this}}{let{width:r,height:h,data:d}=p.getImageData(i);this.style.addImage(e,{data:new t.R({width:r,height:h},d),pixelRatio:a,stretchX:o,stretchY:l,content:s,textFitWidth:c,textFitHeight:u,sdf:n,version:0})}}updateImage(e,i){let r=this.style.getImage(e);if(!r)return this.fire(new t.k(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let{width:a,height:n,data:o}=i instanceof HTMLImageElement||t.b(i)?p.getImageData(i):i;if(void 0===a||void 0===n)return this.fire(new t.k(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(a!==r.data.width||n!==r.data.height)return this.fire(new t.k(Error("The width and height of the updated image must be that same as the previous version of the image")));let l=!(i instanceof HTMLImageElement||t.b(i));return r.data.replace(o,l),this.style.updateImage(e,r),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new t.k(Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return c.getImage(this._requestManager.transformRequest(e,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(e,t,i){return this.style.setLayerZoomRange(e,t,i),this._update(!0)}setFilter(e,t,i={}){return this.style.setFilter(e,t,i),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,i,r={}){return this.style.setPaintProperty(e,t,i,r),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,i,r={}){return this.style.setLayoutProperty(e,t,i,r),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(e,t,i={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,i,e=>{e||this._update(!0)}),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,e=>{e||this._update(!0)}),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSky(e,t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let t=this._canvasContainer=d.create("div","maplibregl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=d.create("canvas","maplibregl-canvas",t),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","regi
53on");let i=this._containerDimensions(),r=this._getClampedPixelRatio(i[0],i[1]);this._resizeCanvas(i[0],i[1],r);let a=this._controlContainer=d.create("div","maplibregl-control-container",e),n=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(e=>{n[e]=d.create("div",`maplibregl-ctrl-${e} `,a)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(e,t,i){this._canvas.width=Math.floor(i*e),this._canvas.height=Math.floor(i*t),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${t}px`}_setupPainter(){let e=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),t=null;this._canvas.addEventListener("webglcontextcreationerror",i=>{t={requestedAttributes:e},i&&(t.statusMessage=i.statusMessage,t.type=i.type)},{once:!0});let i=null;if(!(i=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,e):this._canvas.getContext("webgl2",e)||this._canvas.getContext("webgl",e))){let e="Failed to initialize WebGL";throw t?(t.message=e,Error(JSON.stringify(t))):Error(e)}this.painter=new rw(i,this.transform),f.testSupport(i)}migrateProjection(e,i){super.migrateProjection(e,i),this.painter.transform=e,this.fire(new t.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){return this.style&&this.style._loaded&&(this._styleDirty=this._styleDirty||e,this._sourcesDirty=!0,this.triggerRepaint()),this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){var i,r,a,n,o;let l=this._idleTriggered?this._fadeDuration:0,s=(null==(i=this.style.projection)?void 0:i.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let c=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let e=this.transform.zoom,i=p.now();this.style.zoomHistory.update(e,i);let r=new t.F(e,{now:i,fadeDuration:l,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition(),globalState:this.style.getGlobalState()}),a=r.crossFadingFactor();1===a&&a===this._crossFadingFactor||(c=!0,this._crossFadingFactor=a),this.style.update(r)}let u=(null==(r=this.style.projection)?void 0:r.transitionState)>0!==s;null==(a=this.style.projection)||a.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState(null==(n=this.style.projection)?void 0:n.transitionState,null==(o=this.style.projection)?void 0:o.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||u)&&(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,l,this._crossSourceCollisions,u),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:l,showPadding:this.showPadding}),this.fire(new t.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.cv.mark(t.cw.load),this.fire(new t.l("load"))),this.style&&(this.style.hasTransitions()||c)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let h=this._sourcesDirty||this._styleDirty||this._placementDirty;return h||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.l("idle")),!this._loaded||this._fullyLoaded||h||(this._fullyLoaded=!0,t.cv.mark(t.cw.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var e;
53for(let e of(this._hash&&this._hash.remove(),this._controls))e.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),"undefined"!=typeof window&&removeEventListener("online",this._onWindowOnline,!1),c.removeThrottleControl(this._imageQueueHandle),null==(e=this._resizeObserver)||e.disconnect();let i=this.painter.context.gl.getExtension("WEBGL_lose_context");(null==i?void 0:i.loseContext)&&i.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),d.remove(this._canvasContainer),d.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),t.cv.clearMetrics(),this._removed=!0,this.fire(new t.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,p.frame(this._frameRequest,e=>{t.cv.frame(e),this._frameRequest=null;try{this._render(e)}catch(e){if(!t.cx(e)&&e.message!==i4)throw e}},()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get version(){return u}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(e){return this._lazyInitEmptyStyle(),this.style.setProjection(e),this._update(!0)}},e.MapMouseEvent=rL,e.MapTouchEvent=rD,e.MapWheelEvent=rO,e.Marker=aC,e.NavigationControl=class{constructor(e){this._updateZoomButtons=()=>{let e=this._map.getZoom(),t=e===this._map.getMaxZoom(),i=e===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=i,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",i.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(e,t)=>{let i=this._map._getUIString(`NavigationControl.${t}`);e.title=i,e.setAttribute("aria-label",i)},this.options=t.e({},aE,e),this._container=d.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),d.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),d.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=d.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,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 aM(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){d.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(e,t){let i=d.create("button",e,this._container);return i.type="button",i.addEventListener("click",t),i}},e.Popup=class extends t.E{constructor(e){super(),this._updateOpacity=()=>{void 0!==this.options.locationOccludedOpacity&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&d.remove(this._content),this._container&&(d.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 t.l("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=d.create("div","maplibregl-popup",this._map.getContainer()),this._tip=d.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let e of this.options.className.split(" "))this._container.classList.add(e);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=aP(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!e)return;let i=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationToScreenPoint(this._lngLat));let r=this.options.anchor,a=function e(i){if(i){if("number"==typeof i){let e=Math.round(Math.abs(i)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,i),"top-left":new t.P(e,e),"top-right":new t.P(-e,e),bottom:new t.P(0,-i),"bottom-left":new t.P(e,-e),"bottom-right":new t.P(-e,-e),left:new t.P(i,0),right:new t.P(-i,0)}}if(i instanceof t.P||Array.isArray(i)){let e=t.P.convert(i);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:t.P.convert(i.center||[0,0]),top:t.P.convert(i.top||[0,0]),"top-left":t.P.convert(i["top-left"]||[0,0]),"top-right":t.P.convert(i["top-right"]||[0,0]),bottom:t.P.convert(i.bottom||[0,0]),"bottom-left":t.P.convert(i["bottom-left"]||[0,0]),"bottom-right":t.P.convert(i["bottom-right"]||[0,0]),left:t.P.convert(i.left||[0,0]),right:t.P.convert(i.right||[0,0])}}return e(new t.P(0,0))}(this.options.offset);if(!r){let e,t=this._container.offsetWidth,n=this._container.offsetHeight;e=i.y+a.bottom.y<n?["top"]:i.y>this._map.transform.height-n?["bottom"]:[],i.x<t/2?e.push("left"):i.x>this._map.transform.width-t/2&&e.push("right"),r=0===e.length?"bottom":e.join("-")}let n=i.add(a[r]);this.options.subpixelPositioning||(n=n.round()),d.setTransform(this._container,`${aI[r]} translate(${n.x}px,${n.y}px)`),aA(this._container,r,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(aB),e)}addTo(e){return this._map&&this.remove(),this._map=e,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 t.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.S.convert(e),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(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){let t,i=document.createDocumentFragment(),r=document.createElement("body");for(r.innerHTML=e;t=r.firstChild;)i.appendChild(t);return this.setDOMContent(i)}getMaxWidth(){var e;return null==(e=this._container)?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=d.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){return this._container&&this._container.classList.add(e),this}removeClassName(e){return this._container&&this._container.classList.remove(e),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}setSubpixelPositioning(e){this.options.subpixelPositioning=e}_createCloseButton(){this.options.closeButton&&(this._closeButton=d.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;
53let e=this._container.querySelector("a[href], [tabindex]:not([tabindex='-1']), [contenteditable]:not([contenteditable='false']), button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])");e&&e.focus()}},e.RasterDEMTileSource=G,e.RasterTileSource=Z,e.ScaleControl=class{constructor(e){this._onMove=()=>{aF(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,aF(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},aO),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=d.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){d.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=ai,e.Style=tH,e.TerrainControl=class{constructor(e){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=e}onAdd(e){return this._map=e,this._container=d.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=d.create("button","maplibregl-ctrl-terrain",this._container),d.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(){d.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=r6,e.TwoFingersTouchRotateHandler=r3,e.TwoFingersTouchZoomHandler=r0,e.TwoFingersTouchZoomRotateHandler=as,e.VectorTileSource=$,e.VideoSource=W,e.addSourceType=(e,i)=>t._(void 0,void 0,void 0,function*(){if(K(e))throw Error(`A source type called "${e}" already exists.`);Y[e]=i}),e.clearPrewarmedResources=function(){let e=n;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(C),n=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()"))},e.createTileMesh=tx,e.getMaxParallelImageRequests=function(){return t.a.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return et().getRTLTextPluginStatus()},e.getVersion=function(){return u},e.getWorkerCount=function(){return R.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(e){return F().broadcast("IS",e)},e.prewarm=function(){D().acquire(C)},e.setMaxParallelImageRequests=function(e){t.a.MAX_PARALLEL_IMAGE_REQUESTS=e},e.setRTLTextPlugin=function(e,t){return et().setRTLTextPlugin(e,t)},e.setWorkerCount=function(e){R.workerCount=e},e.setWorkerUrl=function(e){t.a.WORKER_URL=e}}),e}()),tT.exports),tE=function(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(i){if("default"!==i&&!(i in e)){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}})}),Object.freeze(e)}({__proto__:null,default:U(tk)},[tk]),tM={exports:{}},tP=($||($=1,Z=tM.exports,(function(){var e,t="Expected a function",i="__lodash_hash_undefined__",r="__lodash_placeholder__",a=1/0,n=NaN,o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",s="[object Array]",c="[object Boolean]",u="[object Date]",h="[object Error]",p="[object Function]",d="[object GeneratorFunction]",f="[object Map]",m="[object Number]",g="[object Object]",y="[object Promise]",_="[object RegExp]",b="[object Set]",x="[object String]",v="[object Symbol]",w="[object WeakMap]",z="[object ArrayBuffer]",S="[object DataView]",T="[object Float32Array]",k="[object Float64Array
vendor: 5,154 bytes, line 53
53]",E="[object Int8Array]",M="[object Int16Array]",P="[object Int32Array]",I="[object Uint8Array]",A="[object Uint8ClampedArray]",C="[object Uint16Array]",R="[object Uint32Array]",L=/\b__p \+= '';/g,D=/\b(__p \+=) '' \+/g,O=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,j=/[&<>"']/g,B=RegExp(F.source),U=RegExp(j.source),V=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,G=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X=/[\\^$.*+?()[\]{}|]/g,Y=RegExp(X.source),K=/^\s+/,J=/\s/,Q=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ee=/\{\n\/\* \[wrapped with (.+)\] \*/,et=/,? & /,ei=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,er=/[()=,{}\[\]\/\s]/,ea=/\\(\\)?/g,en=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,eo=/\w*$/,el=/^[-+]0x[0-9a-f]+$/i,es=/^0b[01]+$/i,ec=/^\[object .+?Constructor\]$/,eu=/^0o[0-7]+$/i,eh=/^(?:0|[1-9]\d*)$/,ep=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ed=/($^)/,ef=/['\n\r\u2028\u2029\\]/g,em="\ud800-\udfff",eg="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ey="\\u2700-\\u27bf",e_="a-z\\xdf-\\xf6\\xf8-\\xff",eb="A-Z\\xc0-\\xd6\\xd8-\\xde",ex="\\ufe0e\\ufe0f",ev="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",ew="["+ev+"]",ez="["+eg+"]",eS="["+e_+"]",eT="[^"+em+ev+"\\d+"+ey+e_+eb+"]",ek="\ud83c[\udffb-\udfff]",eE="[^"+em+"]",eM="(?:\ud83c[\udde6-\uddff]){2}",eP="[\ud800-\udbff][\udc00-\udfff]",eI="["+eb+"]",eA="\\u200d",eC="(?:"+eS+"|"+eT+")",eR="(?:"+eI+"|"+eT+")",eL="(?:['’](?:d|ll|m|re|s|t|ve))?",eD="(?:['’](?:D|LL|M|RE|S|T|VE))?",eO="(?:"+ez+"|"+ek+")?",eF="["+ex+"]?",ej=eF+eO+"(?:"+eA+"(?:"+[eE,eM,eP].join("|")+")"+eF+eO+")*",eB="(?:"+["["+ey+"]",eM,eP].join("|")+")"+ej,eN="(?:"+[eE+ez+"?",ez,eM,eP,"["+em+"]"].join("|")+")",eU=RegExp("['’]","g"),eV=RegExp(ez,"g"),e$=RegExp(ek+"(?="+ek+")|"+eN+ej,"g"),eZ=RegExp([eI+"?"+eS+"+"+eL+"(?="+[ew,eI,"$"].join("|")+")",eR+"+"+eD+"(?="+[ew,eI+eC,"$"].join("|")+")",eI+"?"+eC+"+"+eL,eI+"+"+eD,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",eB].join("|"),"g"),eG=RegExp("["+eA+em+eg+ex+"]"),eq=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eH=["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"],eW=-1,eX={};eX[T]=eX[k]=eX[E]=eX[M]=eX[P]=eX[I]=eX[A]=eX[C]=eX[R]=!0,eX[l]=eX[s]=eX[z]=eX[c]=eX[S]=eX[u]=eX[h]=eX[p]=eX[f]=eX[m]=eX[g]=eX[_]=eX[b]=eX[x]=eX[w]=!1;var eY={};eY[l]=eY[s]=eY[z]=eY[S]=eY[c]=eY[u]=eY[T]=eY[k]=eY[E]=eY[M]=eY[P]=eY[f]=eY[m]=eY[g]=eY[_]=eY[b]=eY[x]=eY[v]=eY[I]=eY[A]=eY[C]=eY[R]=!0,eY[h]=eY[p]=eY[w]=!1;var eK={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},eJ=parseFloat,eQ=parseInt,e1="object"==typeof N&&N&&N.Object===Object&&N,e0="object"==typeof self&&self&&self.Object===Object&&self,e2=e1||e0||Function("return this")(),e3=Z&&!Z.nodeType&&Z,e5=e3&&tM&&!tM.nodeType&&tM,e6=e5&&e5.exports===e3,e4=e6&&e1.process,e8=function(){try{return e5&&e5.require&&e5.require("util").types||e4&&e4.binding&&e4.binding("util")}catch(e){}}(),e7=e8&&e8.isArrayBuffer,e9=e8&&e8.isDate,te=e8&&e8.isMap,tt=e8&&e8.isRegExp,ti=e8&&e8.isSet,tr=e8&&e8.isTypedArray;function ta(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)}function tn(e,t,i,r){for(var a=-1,n=null==e?0:e.length;++a<n;){var o=e[a];t(r,o,i(o),e)}return r}function to(e,t){for(var i=-1,r=null==e?0:e.length;++i<r&&!1!==t(e[i],i,e););return e}function tl(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(!t(e[i],i,e))return!1;return!0}function ts(e,t){for(var i=-1,r=null==e?0:e.length,a=0,n=[];++i<r;){var o=e[i];t(o,i,e)&&(n[a++]=o)}return n}function tc(e,t){return!(null==e||!e.length)&&tb(e,t,0)>-1}function tu(e,t,i){for(var r=-1,a=null==e?0:e.length;++r<a;)if(i(t,e[r]))return!0;return!1}function th(e,t){for(var i=-1,r=null==e?0:e.length,a=Array(r);++i<r;)a[i]=t(e[i],i,e);return a}function tp(e,t){for(var i=-1,r=t.length,a=e.length;++i<r;)e[a+i]=t[i];return e}function td(e,t,i,r){var a=-1,n=null==e?0:e.length;for(r&&n&&(i=e[++a]);++a<n;)i=t(i,e[a],a,e);return i}function tf(e,t,i,r){var a=null==e?0:e.length;for(r&&a&&(i=e[--a]);a--;)i=t(i,e[a],a,e);return i}function tm(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(t(e[i],i,e))return!0;return!1}var tg=tz("length");function ty(e,t,i){var r;return i(e,function(e,i,a){if(t(e,i,a))return r=i,!1}),r}function t_(e,t,i,r){for(var a=e.length,n=i+(r?1:-1);r?n--:++n<a;)if(t(e[n],n,e))return n;return -1}function tb(e,t,i){return t==t?function(e,t,i){for(var r=i-1,a=e.length;++r<a;)if(e[r]===t)return r;return -1}
vendor: 11,177 bytes, line 53
53(e,t,i):t_(e,tv,i)}function tx(e,t,i,r){for(var a=i-1,n=e.length;++a<n;)if(r(e[a],t))return a;return -1}function tv(e){return e!=e}function tw(e,t){var i=null==e?0:e.length;return i?tk(e,t)/i:n}function tz(t){return function(i){return null==i?e:i[t]}}function tS(t){return function(i){return null==t?e:t[i]}}function tT(e,t,i,r,a){return a(e,function(e,a,n){i=r?(r=!1,e):t(i,e,a,n)}),i}function tk(t,i){for(var r,a=-1,n=t.length;++a<n;){var o=i(t[a]);o!==e&&(r=r===e?o:r+o)}return r}function tE(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}function tP(e){return e?e.slice(0,tG(e)+1).replace(K,""):e}function tI(e){return function(t){return e(t)}}function tA(e,t){return th(t,function(t){return e[t]})}function tC(e,t){return e.has(t)}function tR(e,t){for(var i=-1,r=e.length;++i<r&&tb(t,e[i],0)>-1;);return i}function tL(e,t){for(var i=e.length;i--&&tb(t,e[i],0)>-1;);return i}var tD=tS({À:"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"}),tO=tS({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function tF(e){return"\\"+eK[e]}function tj(e){return eG.test(e)}function tB(e){var t=-1,i=Array(e.size);return e.forEach(function(e,r){i[++t]=[r,e]}),i}function tN(e,t){return function(i){return e(t(i))}}function tU(e,t){for(var i=-1,a=e.length,n=0,o=[];++i<a;){var l=e[i];l!==t&&l!==r||(e[i]=r,o[n++]=i)}return o}function tV(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}function t$(e){return tj(e)?function(e){for(var t=e$.lastIndex=0;e$.test(e);)++t;return t}(e):tg(e)}function tZ(e){return tj(e)?e.match(e$)||[]:e.split("")}function tG(e){for(var t=e.length;t--&&J.test(e.charAt(t)););return t}var tq=tS({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),tH=function N(Z){var J,em=(Z=null==Z?e2:tH.defaults(e2.Object(),Z,tH.pick(e2,eH))).Array,eg=Z.Date,ey=Z.Error,e_=Z.Function,eb=Z.Math,ex=Z.Object,ev=Z.RegExp,ew=Z.String,ez=Z.TypeError,eS=em.prototype,eT=e_.prototype,ek=ex.prototype,eE=Z["__core-js_shared__"],eM=eT.toString,eP=ek.hasOwnProperty,eI=0,eA=(J=/[^.]+$/.exec(eE&&eE.keys&&eE.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"",eC=ek.toString,eR=eM.call(ex),eL=e2._,eD=ev("^"+eM.call(eP).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eO=e6?Z.Buffer:e,eF=Z.Symbol,ej=Z.Uint8Array,eB=eO?eO.allocUnsafe:e,eN=tN(ex.getPrototypeOf,ex),e$=ex.create,eG=ek.propertyIsEnumerable,eK=eS.splice,e1=eF?eF.isConcatSpreadable:e,e0=eF?eF.iterator:e,e3=eF?eF.toStringTag:e,e5=function(){try{var e=ac(ex,"defineProperty");return e({},"",{}),e}catch(e){}}(),e4=Z.clearTimeout!==e2.clearTimeout&&Z.clearTimeout,e8=eg&&eg.now!==e2.Date.now&&eg.now,tg=Z.setTimeout!==e2.setTimeout&&Z.setTimeout,tS=eb.ceil,tM=eb.floor,tW=ex.getOwnPropertySymbols,tX=eO?eO.isBuffer:e,tY=Z.isFinite,tK=eS.join,tJ=tN(ex.keys,ex),tQ=eb.max,t1=eb.min,t0=eg.now,t2=Z.parseInt,t3=eb.random,t5=eS.reverse,t6=ac(Z,"DataView"),t4=ac(Z,"Map"),t8=ac(Z,"Promise"),t7=ac(Z,"Set"),t9=ac(Z,"WeakMap"),ie=ac(ex,"create"),it=t9&&new t9,ii={},ir=aL(t6),ia=aL(t4),io=aL(t8),il=aL(t7),is=aL(t9),ic=eF?eF.prototype:e,iu=ic?ic.valueOf:e,ih=ic?ic.toString:e;function ip(e){if(nU(e)&&!nI(e)&&!(e instanceof iy)){if(e instanceof ig)return e;if(eP.call(e,"__wrapped__"))return aD(e)}return new ig(e)}var id=function(){function t(){}return function(i){if(!nN(i))return{};if(e$)return e$(i);t.prototype=i;var r=new t;return t.prototype=e,r}}();function im(){}function ig(t,i){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=e}function iy(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}function i_(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function ib(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function ix(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function iv(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new ix;++t<i;)this.add(e[t])}function iw(e){var t=this.__data__=new ib(e);this.size=t.size}function iz(e,t){var i=nI(e),r=!i&&nP(e),a=!i&&!r&&nL(e),n=!i&&!r&&!a&&nX(e),o=i||r||a||n,l=o?tE(e.length,ew):[],s=l.length;for(var c in e)!t&&!eP.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||n&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ag(c,s))||l.push(c);return l}function iS(t){var i=t.length;return i?t[rs(0,i-1)]:e}function iT(t,i,r){(r===e||nk(t[i],r))&&(r!==e||i in t)||iI(t,i,r)}function ik(t,i,r){var a=t[i];eP.call(t,i)&&nk(a,r)&&(r!==e||i in t)||iI(t,i,r)}function iE(e,t){for(var i=e.length;i--;)if(nk(e[i][0],t))return i;return -1}function iM(e,t,i,r){return iF(e,function(e,a,n){t(r,e,i(e),n)}),r}function iP(e,t){return e&&rN(t,ol(t),e)}function iI(e,t,i){"__proto__"==t&&e5?e5(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function iA(t,i){for(var r=-1,a=i.length,n=em(a),o=null==t;++r<a;)n[r]=o?e:oi(t,i[r]);return n}function iC(t,i,r){return t==t&&(r!==e&&(t=t<=r?t:r),i!==e&&(t=t>=i?t:i)),t}function iR(t,i,r,a,n,o){var s,h=1&i,y=2&i,w=4&i;if(r&&(s=n?r(t,a,n,o):r(t)),s!==e)return s;if(!nN(t))return t;var L=nI(t);if(L){if(D=t.length,O=new t.constructor(D),D&&"string"==typeof t[0]&&eP.call(t,"index")&&(O.index=t.index,O.input=t.input),s=O,!h)return rB(t,s)}else{var D,O,F,j,B,N=ap(t),U=N==p||N==d;if(nL(t))return rR(t,h);if(N==g||N==l||U&&!n){if(s=y||U?{}:af(t),!h)return y?(j=(F=s)&&rN(t,os(t),F),rN(t,ah(t),j)):(B=iP(s,t),rN(t,au(t),B))}else{if(!eY[N])return n?t:{};s=function(e,t,i){var r,a,n=e.constructor;switch(t){case z:return rL(e);case c:case u:return new n(+e);case S:return r=i?rL(e.buffer):e.buffer,new e.constructor(r,e.byteOffset,e.byteLength);case T:case k:case E:case M:case P:case I:case A:case C:case R:return rD(e,i);case f:return new n;case m:case x:return new n(e);case _:return(a=new e.constructor(e.source,eo.exec(e))).lastIndex=e.lastIndex,a;case b:return new n;case v:return iu?ex(iu.call(e)):{}}}(t,N,h)}}o||(o=new iw);var V=o.get(t);if(V)return V;o.set(t,s),nq(t)?t.forEach(function(e){s.add(iR(e,i,r,e,t,o))}):nV(t)&&t.forEach(function(e,a){s.set(a,iR(e,i,r,a,t,o))});var $=L?e:(w?y?function(e){return iX(e,os,ah)}:function(e){return iX(e,ol,au)}:y?os:ol)(t);return to($||t,function(e,a){$&&(e=t[a=e]),ik(s,a,iR(e,i,r,a,t,o))}),s}function iL(t,i,r){var a=r.length;if(null==t)return!a;for(t=ex(t);a--;){var n=r[a],o=i[n],l=t[n];if(l===e&&!(n in t)||!o(l))return!1}return!0}function iD(i,r,a){if("function"!=typeof i)throw new ez(t);return aE(function(){i.apply(e,a)},r)}function iO(e,t,i,r){var a=-1,n=tc,o=!0,l=e.length,s=[],c=t.length;if(!l)return s;i&&(t=th(t,tI(i))),r?(n=tu,o=!1):t.length>=200&&(n=tC,o=!1,t=new iv(t));e:for(;++a<l;){var u=e[a],h=null==i?u:i(u);if(u=r||0!==u?u:0,o&&h==h){for(var p=c;p--;)if(t[p]===h)continue e;s.push(u)}else n(t,h,r)||s.push(u)}return s}ip.templateSettings={escape:V,evaluate:$,interpolate:G,variable:"",imports:{_:ip}},ip.prototype=im.prototype,ip.prototype.constructor=ip,ig.prototype=id(im.prototype),ig.prototype.constructor=ig,iy.prototype=id(im.prototype),iy.prototype.constructor=iy,i_.prototype.clear=function(){this.__data__=ie?ie(null):{},this.size=0},i_.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},i_.prototype.get=function(t){var r=this.__data__;if(ie){var a=r[t];return a===i?e:a}return eP.call(r,t)?r[t]:e},i_.prototype.has=function(t){var i=this.__data__;return ie?i[t]!==e:eP.call(i,t)},i_.prototype.set=function(t,r){var a=this.__data__;return this.size+=+!this.has(t),a[t]=ie&&r===e?i:r,this},ib.prototype.clear=function(){this.__data__=[],this.size=0},ib.prototype.delete=function(e){var t=this.__data__,i=iE(t,e);return!(i<0||(i==t.length-1?t.pop():eK.call(t,i,1),--this.size,0))},ib.prototype.get=function(t){var i=this.__data__,r=iE(i,t);return r<0?e:i[r][1]},ib.prototype.has=function(e){return iE(this.__data__,e)>-1},ib.prototype.set=function(e,t){var i=this.__data__,r=iE(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this},ix.prototype.clear=function(){this.size=0,this.__data__={hash:new i_,map:new(t4||ib),string:new i_}},ix.prototype.delete=function(e){var t=al(this,e).delete(e);return this.size-=!!t,t},ix.prototype.get=function(e){return al(this,e).get(e)},ix.prototype.has=function(e){return al(this,e).has(e)},ix.prototype.set=function(e,t){var i=al(this,e),r=i.size;return i.set(e,t),this.size+=+(i.size!=r),this},iv.prototype.add=iv.prototype.push=function(e){return this.__data__.set(e,i),this},iv.prototype.has=function(e){return this.__data__.has(e)},iw.prototype.clear=function(){this.__data__=new ib,this.size=0},iw.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},iw.prototype.get=function(e){return this.__data__.get(e)},iw.prototype.has=function(e){return this.__data__.has(e)},iw.prototype.set=function(e,t){var i=this.__data__;if(i instanceof ib){var r=i.__data__;if(!t4||r.length<199)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new ix(r)}return i.set(e,t),this.size=i.size,this};var iF=r$(iG),ij=r$(iq,!0);function iB(e,t){var i=!0;return iF(e,function(e,r,a){return i=!!t(e,r,a)}),i}function iN(t,i,r){for(var a=-1,n=t.length;++a<n;){var o=t[a],l=i(o);if(null!=l&&(s===e?l==l&&!nW(l):r(l,s)))var s=l,c=o}return c}function iU(e,t){var i=[];return iF(e,function(e,r,a){t(e,r,a)&&i.push(e)}),i}function iV(e,t,i,r,a){var n=-1,o=e.length;for(i||(i=am),a||(a=[]);++n<o;){var l=e[n];t>0&&i(l)?t>1?iV(l,t-1,i,r,a):tp(a,l):r||(a[a.length]=l)}return a}var i$=rZ(),iZ=rZ(!0);function iG(e,t){return e&&i$(e,t,ol)}function iq(e,t){return e&&iZ(e,t,ol)}function iH(e,t){return ts(t,function(t){return nF(e[t])})}function iW(t,i){for(var r=0,a=(i=rI(i,t)).length;null!=t&&r<a;)t=t[aR(i[r++])];return r&&r==a?t:e}function iX(e,t,i){var r=t(e);return nI(e)?r:tp(r,i(e))}
vendor: 1,781 bytes, line 53
53function iY(t){return null==t?t===e?"[object Undefined]":"[object Null]":e3&&e3 in ex(t)?function(t){var i=eP.call(t,e3),r=t[e3];try{t[e3]=e;var a=!0}catch(e){}var n=eC.call(t);return a&&(i?t[e3]=r:delete t[e3]),n}(t):eC.call(t)}function iK(e,t){return e>t}function iJ(e,t){return null!=e&&eP.call(e,t)}function iQ(e,t){return null!=e&&t in ex(e)}function i1(t,i,r){for(var a=r?tu:tc,n=t[0].length,o=t.length,l=o,s=em(o),c=1/0,u=[];l--;){var h=t[l];l&&i&&(h=th(h,tI(i))),c=t1(h.length,c),s[l]=!r&&(i||n>=120&&h.length>=120)?new iv(l&&h):e}h=t[0];var p=-1,d=s[0];e:for(;++p<n&&u.length<c;){var f=h[p],m=i?i(f):f;if(f=r||0!==f?f:0,!(d?tC(d,m):a(u,m,r))){for(l=o;--l;){var g=s[l];if(!(g?tC(g,m):a(t[l],m,r)))continue e}d&&d.push(m),u.push(f)}}return u}function i0(t,i,r){var a=null==(t=aS(t,i=rI(i,t)))?t:t[aR(aq(i))];return null==a?e:ta(a,t,r)}function i2(e){return nU(e)&&iY(e)==l}function i3(t,i,r,a,n){return t===i||(null!=t&&null!=i&&(nU(t)||nU(i))?function(t,i,r,a,n,o){var p=nI(t),d=nI(i),y=p?s:ap(t),w=d?s:ap(i),T=(y=y==l?g:y)==g,k=(w=w==l?g:w)==g,E=y==w;if(E&&nL(t)){if(!nL(i))return!1;p=!0,T=!1}if(E&&!T)return o||(o=new iw),p||nX(t)?at(t,i,r,a,n,o):function(e,t,i,r,a,n,o){switch(i){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case z:return!(e.byteLength!=t.byteLength||!n(new ej(e),new ej(t)));case c:case u:case m:return nk(+e,+t);case h:return e.name==t.name&&e.message==t.message;case _:case x:return e==t+"";case f:var l=tB;case b:var s=1&r;if(l||(l=tV),e.size!=t.size&&!s)break;var p=o.get(e);if(p)return p==t;r|=2,o.set(e,t);var d=at(l(e),l(t),r,a,n,o);return o.delete(e),d;case v:if(iu)return iu.call(e)==iu.call(t)}return!1}(t,i,y,r,a,n,o);if(!(1&r)){var M=T&&eP.call(t,"__wrapped__"),P=k&&eP.call(i,"__wrapped__");
53if(M||P){var I=M?t.value():t,A=P?i.value():i;return o||(o=new iw),n(I,A,r,a,o)}}return!!E&&(o||(o=new iw),function(t,i,r,a,n,o){var l=1&r,s=iX(t,ol,au),c=s.length;if(c!=iX(i,ol,au).length&&!l)return!1;for(var u=c;u--;){var h=s[u];if(!(l?h in i:eP.call(i,h)))return!1}var p=o.get(t),d=o.get(i);if(p&&d)return p==i&&d==t;var f=!0;o.set(t,i),o.set(i,t);for(var m=l;++u<c;){var g=t[h=s[u]],y=i[h];if(a)var _=l?a(y,g,h,i,t,o):a(g,y,h,t,i,o);if(!(_===e?g===y||n(g,y,r,a,o):_)){f=!1;break}m||(m="constructor"==h)}if(f&&!m){var b=t.constructor,x=i.constructor;b==x||!("constructor"in t)||!("constructor"in i)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(f=!1)}return o.delete(t),o.delete(i),f}(t,i,r,a,n,o))}(t,i,r,a,i3,n):t!=t&&i!=i)}function i5(t,i,r,a){var n=r.length,o=n,l=!a;if(null==t)return!o;for(t=ex(t);n--;){var s=r[n];if(l&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++n<o;){var c=(s=r[n])[0],u=t[c],h=s[1];if(l&&s[2]){if(u===e&&!(c in t))return!1}else{var p=new iw;if(a)var d=a(u,h,c,t,i,p);if(!(d===e?i3(h,u,3,a,p):d))return!1}}return!0}function i6(e){return!(!nN(e)||eA&&eA in e)&&(nF(e)?eD:ec).test(aL(e))}function i4(e){return"function"==typeof e?e:null==e?oR:"object"==typeof e?nI(e)?rt(e[0],e[1]):re(e):oV(e)}function i8(e){if(!av(e))return tJ(e);var t=[];for(var i in ex(e))eP.call(e,i)&&"constructor"!=i&&t.push(i);return t}function i7(e,t){return e<t}function i9(e,t){var i=-1,r=nC(e)?em(e.length):[];return iF(e,function(e,a,n){r[++i]=t(e,a,n)}),r}function re(e){var t=as(e);return 1==t.length&&t[0][2]?aw(t[0][0],t[0][1]):function(i){return i===e||i5(i,e,t)}}function rt(t,i){var r;return a_(t)&&(r=i)==r&&!nN(r)?aw(aR(t),i):function(r){var a=oi(r,t);return a===e&&a===i?or(r,t):i3(i,a,3)}}function ri(t,i,r,a,n){t!==i&&i$(i,function(o,l){if(n||(n=new iw),nN(o))!function(t,i,r,a,n,o,l){var s=aT(t,r),c=aT(i,r),u=l.get(c);if(u)iT(t,r,u);else{var h=o?o(s,c,r+"",t,i,l):e,p=h===e;if(p){var d=nI(c),f=!d&&nL(c),m=!d&&!f&&nX(c);h=c,d||f||m?nI(s)?h=s:nR(s)?h=rB(s):f?(p=!1,h=rR(c,!0)):m?(p=!1,h=rD(c,!0)):h=[]:nZ(c)||nP(c)?(h=s,nP(s)?h=n3(s):nN(s)&&!nF(s)||(h=af(c))):p=!1}p&&(l.set(c,h),n(h,c,a,o,l),l.delete(c)),iT(t,r,h)}}(t,i,l,r,ri,a,n);else{var s=a?a(aT(t,l),o,l+"",t,i,n):e;s===e&&(s=o),iT(t,l,s)}},os)}function rr(t,i){var r=t.length;if(r)return ag(i+=i<0?r:0,r)?t[i]:e}function ra(e,t,i){t=t.length?th(t,function(e){return nI(e)?function(t){return iW(t,1===e.length?e[0]:e)}:e}):[oR];var r=-1;t=th(t,tI(ao()));var a=i9(e,function(e,i,a){return{criteria:th(t,function(t){return t(e)}),index:++r,value:e}}),n=a.length;for(a.sort(function(e,t){return function(e,t,i){for(var r=-1,a=e.criteria,n=t.criteria,o=a.length,l=i.length;++r<o;){var s=rO(a[r],n[r]);if(s)return r>=l?s:s*("desc"==i[r]?-1:1)}return e.index-t.index}(e,t,i)});n--;)a[n]=a[n].value;return a}function rn(e,t,i){for(var r=-1,a=t.length,n={};++r<a;){var o=t[r],l=iW(e,o);i(l,o)&&rh(n,rI(o,e),l)}return n}function ro(e,t,i,r){var a=r?tx:tb,n=-1,o=t.length,l=e;for(e===t&&(t=rB(t)),i&&(l=th(e,tI(i)));++n<o;)for(var s=0,c=t[n],u=i?i(c):c;(s=a(l,u,s,r))>-1;)l!==e&&eK.call(l,s,1),eK.call(e,s,1);return e}function rl(e,t){for(var i=e?t.length:0,r=i-1;i--;){var a=t[i];if(i==r||a!==n){var n=a;ag(a)?eK.call(e,a,1):rw(e,a)}}return e}function rs(e,t){return e+tM(t3()*(t-e+1))}function rc(e,t){var i="";if(!e||t<1||t>0x1fffffffffffff)return i;do t%2&&(i+=e),(t=tM(t/2))&&(e+=e);while(t);return i}function ru(e,t){return aM(az(e,t,oR),e+"")}function rh(t,i,r,a){if(!nN(t))return t;for(var n=-1,o=(i=rI(i,t)).length,l=o-1,s=t;null!=s&&++n<o;){var c=aR(i[n]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)break;if(n!=l){var h=s[c];(u=a?a(h,c,s):e)===e&&(u=nN(h)?h:ag(i[n+1])?[]:{})}ik(s,c,u),s=s[c]}return t}var rp=it?function(e,t){return it.set(e,t),e}:oR,rd=e5?function(e,t){return e5(e,"toString",{configurable:!0,enumerable:!1,value:oI(t),writable:!0})}:oR;function rf(e,t,i){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(i=i>a?a:i)<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var n=em(a);++r<a;)n[r]=e[r+t];return n}function rm(e,t){var i;return iF(e,function(e,r,a){return!(i=t(e,r,a))}),!!i}function rg(e,t,i){var r=0,a=null==e?r:e.length;if("number"==typeof t&&t==t&&a<=0x7fffffff){for(;r<a;){var n=r+a>>>1,o=e[n];null!==o&&!nW(o)&&(i?o<=t:o<t)?r=n+1:a=n}return a}return ry(e,t,oR,i)}function ry(t,i,r,a){var n=0,o=null==t?0:t.length;if(0===o)return 0;for(var l=(i=r(i))!=i,s=null===i,c=nW(i),u=i===e;n<o;){var h=tM((n+o)/2),p=r(t[h]),d=p!==e,f=null===p,m=p==p,g=nW(p);if(l)var y=a||m;else y=u?m&&(a||d):s?m&&d&&(a||!f):c?m&&d&&!f&&(a||!g):!f&&!g&&(a?p<=i:
vendor: 3,433 bytes, line 53
53p<i);y?n=h+1:o=h}return t1(o,0xfffffffe)}function r_(e,t){for(var i=-1,r=e.length,a=0,n=[];++i<r;){var o=e[i],l=t?t(o):o;if(!i||!nk(l,s)){var s=l;n[a++]=0===o?0:o}}return n}function rb(e){return"number"==typeof e?e:nW(e)?n:+e}function rx(e){if("string"==typeof e)return e;if(nI(e))return th(e,rx)+"";if(nW(e))return ih?ih.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function rv(e,t,i){var r=-1,a=tc,n=e.length,o=!0,l=[],s=l;if(i)o=!1,a=tu;else if(n>=200){var c=t?null:r6(e);if(c)return tV(c);o=!1,a=tC,s=new iv}else s=t?[]:l;e:for(;++r<n;){var u=e[r],h=t?t(u):u;if(u=i||0!==u?u:0,o&&h==h){for(var p=s.length;p--;)if(s[p]===h)continue e;t&&s.push(h),l.push(u)}else a(s,h,i)||(s!==l&&s.push(h),l.push(u))}return l}function rw(e,t){var i=-1,r=(t=rI(t,e)).length;if(!r)return!0;for(;++i<r;){var a=aR(t[i]);if("__proto__"===a&&!eP.call(e,"__proto__")||("constructor"===a||"prototype"===a)&&i<r-1)return!1}var n=aS(e,t);return null==n||delete n[aR(aq(t))]}function rz(e,t,i,r){return rh(e,t,i(iW(e,t)),r)}function rS(e,t,i,r){for(var a=e.length,n=r?a:-1;(r?n--:++n<a)&&t(e[n],n,e););return i?rf(e,r?0:n,r?n+1:a):rf(e,r?n+1:0,r?a:n)}function rT(e,t){var i=e;return i instanceof iy&&(i=i.value()),td(t,function(e,t){return t.func.apply(t.thisArg,tp([e],t.args))},i)}function rk(e,t,i){var r=e.length;if(r<2)return r?rv(e[0]):[];for(var a=-1,n=em(r);++a<r;)for(var o=e[a],l=-1;++l<r;)l!=a&&(n[a]=iO(n[a]||o,e[l],t,i));return rv(iV(n,1),t,i)}function rE(t,i,r){for(var a=-1,n=t.length,o=i.length,l={};++a<n;){var s=a<o?i[a]:e;r(l,t[a],s)}return l}function rM(e){return nR(e)?e:[]}function rP(e){return"function"==typeof e?e:oR}function rI(e,t){return nI(e)?e:a_(e,t)?[e]:aC(n5(e))}function rA(t,i,r){var a=t.length;return r=r===e?a:r,!i&&r>=a?t:rf(t,i,r)}var rC=e4||function(e){return e2.clearTimeout(e)};function rR(e,t){if(t)return e.slice();var i=e.length,r=eB?eB(i):new e.constructor(i);return e.copy(r),r}function rL(e){var t=new e.constructor(e.byteLength);return new ej(t).set(new ej(e)),t}function rD(e,t){var i=t?rL(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function rO(t,i){if(t!==i){var r=t!==e,a=null===t,n=t==t,o=nW(t),l=i!==e,s=null===i,c=i==i,u=nW(i);if(!s&&!u&&!o&&t>i||o&&l&&c&&!s&&!u||a&&l&&c||!r&&c||!n)return 1;if(!a&&!o&&!u&&t<i||u&&r&&n&&!a&&!o||s&&r&&n||!l&&n||!c)return -1}return 0}function rF(e,t,i,r){for(var a=-1,n=e.length,o=i.length,l=-1,s=t.length,c=tQ(n-o,0),u=em(s+c),h=!r;++l<s;)u[l]=t[l];for(;++a<o;)(h||a<n)&&(u[i[a]]=e[a]);for(;c--;)u[l++]=e[a++];return u}function rj(e,t,i,r){for(var a=-1,n=e.length,o=-1,l=i.length,s=-1,c=t.length,u=tQ(n-l,0),h=em(u+c),p=!r;++a<u;)h[a]=e[a];for(var d=a;++s<c;)h[d+s]=t[s];for(;++o<l;)(p||a<n)&&(h[d+i[o]]=e[a++]);return h}function rB(e,t){var i=-1,r=e.length;for(t||(t=em(r));++i<r;)t[i]=e[i];return t}function rN(t,i,r,a){var n=!r;r||(r={});for(var o=-1,l=i.length;++o<l;){var s=i[o],c=a?a(r[s],t[s],s,r,t):e;c===e&&(c=t[s]),n?iI(r,s,c):ik(r,s,c)}return r}function rU(e,t){return function(i,r){var a=nI(i)?tn:iM,n=t?t():{};return a(i,e,ao(r,2),n)}}function rV(t){return ru(function(i,r){var a=-1,n=r.length,o=n>1?r[n-1]:e,l=n>2?r[2]:e;for(o=t.length>3&&"function"==typeof o?(n--,o):e,l&&ay(r[0],r[1],l)&&(o=n<3?e:o,n=1),i=ex(i);++a<n;){var s=r[a];s&&t(i,s,a,o)}return i})}function r$(e,t){return function(i,r){if(null==i)return i;if(!nC(i))return e(i,r);for(var a=i.length,n=t?a:-1,o=ex(i);(t?n--:++n<a)&&!1!==r(o[n],n,o););return i}}
53function rZ(e){return function(t,i,r){for(var a=-1,n=ex(t),o=r(t),l=o.length;l--;){var s=o[e?l:++a];if(!1===i(n[s],s,n))break}return t}}function rG(t){return function(i){var r=tj(i=n5(i))?tZ(i):e,a=r?r[0]:i.charAt(0),n=r?rA(r,1).join(""):i.slice(1);return a[t]()+n}}function rq(e){return function(t){return td(oE(ob(t).replace(eU,"")),e,"")}}function rH(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var i=id(e.prototype),r=e.apply(i,t);return nN(r)?r:i}}function rW(t){return function(i,r,a){var n=ex(i);if(!nC(i)){var o=ao(r,3);i=ol(i),r=function(e){return o(n[e],e,n)}}var l=t(i,r,a);return l>-1?n[o?i[l]:l]:e}}function rX(i){return ai(function(r){var a=r.length,n=a,o=ig.prototype.thru;for(i&&r.reverse();n--;){var l=r[n];if("function"!=typeof l)throw new ez(t);if(o&&!s&&"wrapper"==aa(l))var s=new ig([],!0)}for(n=s?n:a;++n<a;){var c=aa(l=r[n]),u="wrapper"==c?ar(l):e;s=u&&ab(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?s[aa(u[0])].apply(s,u[3]):1==l.length&&ab(l)?s[c]():s.thru(l)}return function(){var e=arguments,t=e[0];if(s&&1==e.length&&nI(t))return s.plant(t).value();for(var i=0,n=a?r[i].apply(this,e):t;++i<a;)n=r[i].call(this,n);return n}})}function rY(t,i,r,a,n,o,l,s,c,u){var h=128&i,p=1&i,d=2&i,f=24&i,m=512&i,g=d?e:rH(t);return function y(){for(var _=arguments.length,b=em(_),x=_;x--;)b[x]=arguments[x];if(f)var v=an(y),w=function(e,t){for(var i=e.length,r=0;i--;)e[i]===t&&++r;return r}(b,v);if(a&&(b=rF(b,a,n,f)),o&&(b=rj(b,o,l,f)),_-=w,f&&_<u){var z=tU(b,v);return r3(t,i,rY,y.placeholder,r,b,z,s,c,u-_)}var S=p?r:this,T=d?S[t]:t;return _=b.length,s?b=function(t,i){for(var r=t.length,a=t1(i.length,r),n=rB(t);a--;){var o=i[a];t[a]=ag(o,r)?n[o]:e}return t}(b,s):m&&_>1&&b.reverse(),h&&c<_&&(b.length=c),this&&this!==e2&&this instanceof y&&(T=g||rH(T)),T.apply(S,b)}}function rK(e,t){return function(i,r){var a,n;return a=t(r),n={},iG(i,function(t,i,r){e(n,a(t),i,r)}),n}}function rJ(t,i){return function(r,a){var n;if(r===e&&a===e)return i;if(r!==e&&(n=r),a!==e){if(n===e)return a;"string"==typeof r||"string"==typeof a?(r=rx(r),a=rx(a)):(r=rb(r),a=rb(a)),n=t(r,a)}return n}}function rQ(e){return ai(function(t){return t=th(t,tI(ao())),ru(function(i){var r=this;return e(t,function(e){return ta(e,r,i)})})})}function r1(t,i){var r=(i=i===e?" ":rx(i)).length;if(r<2)return r?rc(i,t):i;var a=rc(i,tS(t/t$(i)));return tj(i)?rA(tZ(a),0,t).join(""):a.slice(0,t)}function r0(t){return function(i,r,a){return a&&"number"!=typeof a&&ay(i,r,a)&&(r=a=e),i=nQ(i),r===e?(r=i,i=0):r=nQ(r),function(e,t,i,r){for(var a=-1,n=tQ(tS((t-e)/(i||1)),0),o=em(n);n--;)o[r?n:++a]=e,e+=i;return o}(i,r,a=a===e?i<r?1:-1:nQ(a),t)}}function r2(e){return function(t,i){return"string"==typeof t&&"string"==typeof i||(t=n2(t),i=n2(i)),e(t,i)}}function r3(t,i,r,a,n,o,l,s,c,u){var h=8&i;i|=h?32:64,4&(i&=~(h?64:32))||(i&=-4);var p=[t,i,n,h?o:e,h?l:e,h?e:o,h?e:l,s,c,u],d=r.apply(e,p);return ab(t)&&ak(d,p),d.placeholder=a,aP(d,t,i)}function r5(e){var t=eb[e];return function(e,i){if(e=n2(e),(i=null==i?0:t1(n1(i),292))&&tY(e)){var r=(n5(e)+"e").split("e");return+((r=(n5(t(r[0]+"e"+(+r[1]+i)))+"e").split("e"))[0]+"e"+(r[1]-i))}return t(e)}}var r6=t7&&1/tV(new t7([,-0]))[1]==a?function(e){return new t7(e)}:oj;function r4(e){return function(t){var i,r,a=ap(t);return a==f?tB(t):a==b?(i=-1,r=Array(t.size),t.forEach(function(e){r[++i]=[e,e]}),r):th(e(t),function(e){return[e,t[e]]})}}function r8(i,a,n,o,l,s,c,u){var h=2&a;if(!h&&"function"!=typeof i)throw new ez(t);var p=o?o.length:0;if(p||(a&=-97,o=l=e),c=c===e?c:tQ(n1(c),0),u=u===e?u:n1(u),p-=l?l.length:0,64&a){var d=o,f=l;o=l=e}var m=h?e:ar(i),g=[i,a,n,o,l,d,f,s,c,u];if(m&&function(e,t){var i=e[1],a=t[1],n=i|a,o=n<131,l=128==a&&8==i||128==a&&256==i&&e[7].length<=t[8]||384==a&&t[7].length<=t[8]&&8==i;if(o||l){1&a&&(e[2]=t[2],n|=1&i?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?rF(c,s,t[4]):s,e[4]=c?tU(e[3],r):t[4]}(s=t[5])&&(c=e[5],e[5]=c?rj(c,s,t[6]):s,e[6]=c?tU(e[5],r):t[6]),(s=t[7])&&(e[7]=s),128&a&&(e[8]=null==e[8]?t[8]:t1(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=n}}(g,m),i=g[0],a=g[1],n=g[2],o=g[3],l=g[4],(u=g[9]=g[9]===e?h?0:i.length:tQ(g[9]-p,0))||!(24&a)||(a&=-25),a&&1!=a)C=8==a||16==a?(y=i,_=a,b=u,x=rH(y),function t(){for(var i=arguments.length,r=em(i),a=i,n=an(t);a--;)r[a]=arguments[a];var o=i<3&&r[0]!==n&&r[i-1]!==n?[]:tU(r,n);return(i-=o.length)<b?r3(y,_,rY,t.placeholder,e,r,o,e,e,b-i):ta(this&&this!==e2&&this instanceof t?x:y,this,r)}):32!=a&&33!=a||l.length?rY.apply(e,g):(v=i,w=a,z=n,S=o,T=1&w,k=rH(v),function e(){for(var t=-1,i=arguments.length,r=-1,a=S.length,n=em(a+i),o=this&&this!==e2&&this instanceof e?k:v;++r<a;)n[r]=S[r];for(;i--;)n[r++]=arguments[++t];return ta(o,T?z:this,n)});else var y,_,b,x,v,w,z,S,T,k,E,M,P,I,A,C=(E=i,M=a,P=n,I=1&M,A=rH(E),function e(){return(this&&this!==e2&&this instanceof e?A:E).apply(I?P:this,arguments)});return aP((m?rp:ak)(C,g),i,a)}
vendor: 13,171 bytes, line 53
53function r7(t,i,r,a){return t===e||nk(t,ek[r])&&!eP.call(a,r)?i:t}function r9(t,i,r,a,n,o){return nN(t)&&nN(i)&&(o.set(i,t),ri(t,i,e,r9,o),o.delete(i)),t}function ae(t){return nZ(t)?e:t}function at(t,i,r,a,n,o){var l=1&r,s=t.length,c=i.length;if(s!=c&&!(l&&c>s))return!1;var u=o.get(t),h=o.get(i);if(u&&h)return u==i&&h==t;var p=-1,d=!0,f=2&r?new iv:e;for(o.set(t,i),o.set(i,t);++p<s;){var m=t[p],g=i[p];if(a)var y=l?a(g,m,p,i,t,o):a(m,g,p,t,i,o);if(y!==e){if(y)continue;d=!1;break}if(f){if(!tm(i,function(e,t){if(!tC(f,t)&&(m===e||n(m,e,r,a,o)))return f.push(t)})){d=!1;break}}else if(m!==g&&!n(m,g,r,a,o)){d=!1;break}}return o.delete(t),o.delete(i),d}function ai(t){return aM(az(t,e,aU),t+"")}var ar=it?function(e){return it.get(e)}:oj;function aa(e){for(var t=e.name+"",i=ii[t],r=eP.call(ii,t)?i.length:0;r--;){var a=i[r],n=a.func;if(null==n||n==e)return a.name}return t}function an(e){return(eP.call(ip,"placeholder")?ip:e).placeholder}function ao(){var e=ip.iteratee||oL;return e=e===oL?i4:e,arguments.length?e(arguments[0],arguments[1]):e}function al(e,t){var i,r=e.__data__;return("string"==(i=typeof t)||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==t:null===t)?r["string"==typeof t?"string":"hash"]:r.map}function as(e){for(var t=ol(e),i=t.length;i--;){var r,a=t[i],n=e[a];t[i]=[a,n,(r=n)==r&&!nN(r)]}return t}function ac(t,i){var r=null==t?e:t[i];return i6(r)?r:e}var au=tW?function(e){return null==e?[]:ts(tW(e=ex(e)),function(t){return eG.call(e,t)})}:oG,ah=tW?function(e){for(var t=[];e;)tp(t,au(e)),e=eN(e);return t}:oG,ap=iY;function ad(e,t,i){for(var r=-1,a=(t=rI(t,e)).length,n=!1;++r<a;){var o=aR(t[r]);if(!(n=null!=e&&i(e,o)))break;e=e[o]}return n||++r!=a?n:!!(a=null==e?0:e.length)&&nB(a)&&ag(o,a)&&(nI(e)||nP(e))}function af(e){return"function"!=typeof e.constructor||av(e)?{}:id(eN(e))}function am(e){return nI(e)||nP(e)||!!(e1&&e&&e[e1])}function ag(e,t){var i=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==i||"symbol"!=i&&eh.test(e))&&e>-1&&e%1==0&&e<t}function ay(e,t,i){if(!nN(i))return!1;var r=typeof t;return!!("number"==r?nC(i)&&ag(t,i.length):"string"==r&&t in i)&&nk(i[t],e)}function a_(e,t){if(nI(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!nW(e))||H.test(e)||!q.test(e)||null!=t&&e in ex(t)}function ab(e){var t=aa(e),i=ip[t];if("function"!=typeof i||!(t in iy.prototype))return!1;if(e===i)return!0;var r=ar(i);return!!r&&e===r[0]}(t6&&ap(new t6(new ArrayBuffer(1)))!=S||t4&&ap(new t4)!=f||t8&&ap(t8.resolve())!=y||t7&&ap(new t7)!=b||t9&&ap(new t9)!=w)&&(ap=function(t){var i=iY(t),r=i==g?t.constructor:e,a=r?aL(r):"";if(a)switch(a){case ir:return S;case ia:return f;case io:return y;case il:return b;case is:return w}return i});var ax=eE?nF:oq;function av(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ek)}function aw(t,i){return function(r){return null!=r&&r[t]===i&&(i!==e||t in ex(r))}}function az(t,i,r){return i=tQ(i===e?t.length-1:i,0),function(){for(var e=arguments,a=-1,n=tQ(e.length-i,0),o=em(n);++a<n;)o[a]=e[i+a];a=-1;for(var l=em(i+1);++a<i;)l[a]=e[a];return l[i]=r(o),ta(t,this,l)}}function aS(e,t){return t.length<2?e:iW(e,rf(t,0,-1))}function aT(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ak=aI(rp),aE=tg||function(e,t){return e2.setTimeout(e,t)},aM=aI(rd);function aP(e,t,i){var r,a,n=t+"";return aM(e,function(e,t){var i=t.length;if(!i)return e;var r=i-1;return t[r]=(i>1?"& ":"")+t[r],t=t.join(i>2?", ":" "),e.replace(Q,"{\n/* [wrapped with "+t+"] */\n")}(n,(a=(r=n.match(ee))?r[1].split(et):[],to(o,function(e){var t="_."+e[0];i&e[1]&&!tc(a,t)&&a.push(t)}),a.sort())))}function aI(t){var i=0,r=0;return function(){var a=t0(),n=16-(a-r);if(r=a,n>0){if(++i>=800)return arguments[0]}else i=0;return t.apply(e,arguments)}}function aA(t,i){var r=-1,a=t.length,n=a-1;for(i=i===e?a:i;++r<i;){var o=rs(r,n),l=t[o];t[o]=t[r],t[r]=l}return t.length=i,t}var aC=(oW=(oH=nx(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(W,function(e,i,r,a){t.push(r?a.replace(ea,"$1"):i||e)}),t},function(e){return 500===oW.size&&oW.clear(),e})).cache,oH);function aR(e){if("string"==typeof e||nW(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function aL(e){if(null!=e){try{return eM.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function aD(e){if(e instanceof iy)return e.clone();var t=new ig(e.__wrapped__,e.__chain__);return t.__actions__=rB(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var aO=ru(function(e,t){return nR(e)?iO(e,iV(t,1,nR,!0)):[]}),aF=ru(function(t,i){var r=aq(i);return nR(r)&&(r=e),nR(t)?iO(t,iV(i,1,nR,!0),ao(r,2)):[]}),aj=ru(function(t,i){var r=aq(i);return nR(r)&&(r=e),nR(t)?iO(t,iV(i,1,nR,!0),e,r):[]});function aB(e,t,i){var r=null==e?0:e.length;if(!r)return -1;var a=null==i?0:n1(i);return a<0&&(a=tQ(r+a,0)),t_(e,ao(t,3),a)}function aN(t,i,r){var a=null==t?0:t.length;if(!a)return -1;var n=a-1;return r!==e&&(n=n1(r),n=r<0?tQ(a+n,0):t1(n,a-1)),t_(t,ao(i,3),n,!0)}function aU(e){return null!=e&&e.length?iV(e,1):[]}function aV(t){return t&&t.length?t[0]:e}var a$=ru(function(e){var t=th(e,rM);return t.length&&t[0]===e[0]?i1(t):[]}),aZ=ru(function(t){var i=aq(t),r=th(t,rM);return i===aq(r)?i=e:r.pop(),r.length&&r[0]===t[0]?i1(r,ao(i,2)):[]}),aG=ru(function(t){var i=aq(t),r=th(t,rM);return(i="function"==typeof i?i:e)&&r.pop(),r.length&&r[0]===t[0]?i1(r,e,i):[]});function aq(t){var i=null==t?0:t.length;return i?t[i-1]:e}var aH=ru(aW);function aW(e,t){return e&&e.length&&t&&t.length?ro(e,t):e}var aX=ai(function(e,t){var i=null==e?0:e.length,r=iA(e,t);return rl(e,th(t,function(e){return ag(e,i)?+e:e}).sort(rO)),r});function aY(e){return null==e?e:t5.call(e)}var aK=ru(function(e){return rv(iV(e,1,nR,!0))}),aJ=ru(function(t){var i=aq(t);return nR(i)&&(i=e),rv(iV(t,1,nR,!0),ao(i,2))}),aQ=ru(function(t){var i=aq(t);return i="function"==typeof i?i:e,rv(iV(t,1,nR,!0),e,i)});function a1(e){if(!e||!e.length)return[];var t=0;return e=ts(e,function(e){if(nR(e))return t=tQ(e.length,t),!0}),tE(t,function(t){return th(e,tz(t))})}function a0(t,i){if(!t||!t.length)return[];var r=a1(t);return null==i?r:th(r,function(t){return ta(i,e,t)})}var a2=ru(function(e,t){return nR(e)?iO(e,t):[]}),a3=ru(function(e){return rk(ts(e,nR))}),a5=ru(function(t){var i=aq(t);return nR(i)&&(i=e),rk(ts(t,nR),ao(i,2))}),a6=ru(function(t){var i=aq(t);return i="function"==typeof i?i:e,rk(ts(t,nR),e,i)}),a4=ru(a1),a8=ru(function(t){var i=t.length,r=i>1?t[i-1]:e;return r="function"==typeof r?(t.pop(),r):e,a0(t,r)});function a7(e){var t=ip(e);return t.__chain__=!0,t}function a9(e,t){return t(e)}var ne=ai(function(t){var i=t.length,r=i?t[0]:0,a=this.__wrapped__,n=function(e){return iA(e,t)};return!(i>1||this.__actions__.length)&&a instanceof iy&&ag(r)?((a=a.slice(r,+r+ +!!i)).__actions__.push({func:a9,args:[n],thisArg:e}),new ig(a,this.__chain__).thru(function(t){return i&&!t.length&&t.push(e),t})):this.thru(n)}),nt=rU(function(e,t,i){eP.call(e,i)?++e[i]:iI(e,i,1)}),ni=rW(aB),nr=rW(aN);function na(e,t){return(nI(e)?to:iF)(e,ao(t,3))}function nn(e,t){return(nI(e)?function(e,t){for(var i=null==e?0:e.length;i--&&!1!==t(e[i],i,e););return e}:ij)(e,ao(t,3))}var no=rU(function(e,t,i){eP.call(e,i)?e[i].push(t):iI(e,i,[t])}),nl=ru(function(e,t,i){var r=-1,a="function"==typeof t,n=nC(e)?em(e.length):[];return iF(e,function(e){n[++r]=a?ta(t,e,i):i0(e,t,i)}),n}),ns=rU(function(e,t,i){iI(e,i,t)});function nc(e,t){return(nI(e)?th:i9)(e,ao(t,3))}var nu=rU(function(e,t,i){e[+!i].push(t)},function(){return[[],[]]}),nh=ru(function(e,t){if(null==e)return[];var i=t.length;return i>1&&ay(e,t[0],t[1])?t=[]:i>2&&ay(t[0],t[1],t[2])&&(t=[t[0]]),ra(e,iV(t,1),[])}),np=e8||function(){return e2.Date.now()};function nd(t,i,r){return i=r?e:i,i=t&&null==i?t.length:i,r8(t,128,e,e,e,e,i)}function nf(i,r){var a;if("function"!=typeof r)throw new ez(t);return i=n1(i),function(){return--i>0&&(a=r.apply(this,arguments)),i<=1&&(r=e),a}}var nm=ru(function(e,t,i){var r=1;if(i.length){var a=tU(i,an(nm));r|=32}return r8(e,r,t,i,a)}),ng=ru(function(e,t,i){var r=3;if(i.length){var a=tU(i,an(ng));r|=32}return r8(t,r,e,i,a)});function ny(i,r,a){var n,o,l,s,c,u,h=0,p=!1,d=!1,f=!0;if("function"!=typeof i)throw new ez(t);function m(t){var r=n,a=o;return n=o=e,h=t,s=i.apply(a,r)}function g(t){var i=t-u;return u===e||i>=r||i<0||d&&t-h>=l}function y(){var e,t=np();if(g(t))return _(t);c=aE(y,(e=r-(t-u),d?t1(e,l-(t-h)):e))}function _(t){return c=e,f&&n?m(t):(n=o=e,s)}function b(){var t,i=np(),a=g(i);if(n=arguments,o=this,u=i,a){if(c===e)return h=t=u,c=aE(y,r),p?m(t):s;if(d)return rC(c),c=aE(y,r),m(u)}return c===e&&(c=aE(y,r)),s}return r=n2(r)||0,nN(a)&&(p=!!a.leading,l=(d="maxWait"in a)?tQ(n2(a.maxWait)||0,r):l,f="trailing"in a?!!a.trailing:f),b.cancel=function(){c!==e&&rC(c),h=0,n=u=o=c=e},b.flush=function(){return c===e?s:_(np())},b}var n_=ru(function(e,t){return iD(e,1,t)}),nb=ru(function(e,t,i){return iD(e,n2(t)||0,i)});function nx(e,i){if("function"!=typeof e||null!=i&&"function"!=typeof i)throw new ez(t);var r=function(){var t=arguments,a=i?i.apply(this,t):t[0],n=r.cache;if(n.has(a))return n.get(a);var o=e.apply(this,t);return r.cache=n.set(a,o)||n,o};return r.cache=new(nx.Cache||ix),r}function nv(e){if("function"!=typeof e)throw new ez(t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}nx.Cache=ix;var nw=ru(function(e,t){var i=(t=1==t.length&&nI(t[0])?th(t[0],tI(ao())):th(iV(t,1),tI(ao()))).length;return ru(function(r){for(var a=-1,n=t1(r.length,i);++a<n;)r[a]=t[a].call(this,r[a]);return ta(e,this,r)})}),nz=ru(function(t,i){var r=tU(i,an(nz));return r8(t,32,e,i,r)}),nS=ru(function(t,i){var r=tU(i,an(nS));return r8(t,64,e,i,r)}),nT=ai(function(t,i){return r8(t,256,e,e,e,i)});function nk(e,t){return e===t||e!=e&&t!=t}var nE=r2(iK),nM=r2(function(e,t){return e>=t}),nP=i2(function(){return arguments}())?i2:function(e){return nU(e)&&eP.call(e,"callee")&&!eG.call(e,"callee")},nI=em.isArray,nA=e7?tI(e7):function(e){return nU(e)&&iY(e)==z};function nC(e){return null!=e&&nB(e.length)&&!nF(e)}function nR(e){return nU(e)&&nC(e)}var nL=tX||oq,nD=e9?tI(e9):function(e){return nU(e)&&iY(e)==u};function nO(e){if(!nU(e))return!1;var t=iY(e);return t==h||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!nZ(e)}function nF(e){if(!nN(e))return!1;var t=iY(e);return t==p||t==d||"[object AsyncFunction]"==t||"[object Proxy]"==t}function nj(e){return"number"==typeof e&&e==n1(e)}function nB(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function nN(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function nU(e){return null!=e&&"object"==typeof e}var nV=te?tI(te):function(e){return nU(e)&&ap(e)==f};function n$(e){return"number"==typeof e||nU(e)&&iY(e)==m}function nZ(e){if(!nU(e)||iY(e)!=g)return!1;var t=eN(e);if(null===t)return!0;var i=eP.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&eM.call(i)==eR}var nG=tt?tI(tt):function(e){return nU(e)&&iY(e)==_},nq=ti?tI(ti):function(e){return nU(e)&&ap(e)==b};function nH(e){return"string"==typeof e||!nI(e)&&nU(e)&&iY(e)==x}function nW(e){return"symbol"==typeof e||nU(e)&&iY(e)==v}var nX=tr?tI(tr):function(e){return nU(e)&&nB(e.length)&&!!eX[iY(e)]},nY=r2(i7),nK=r2(function(e,t){return e<=t});function nJ(e){if(!e)return[];if(nC(e))return nH(e)?tZ(e):rB(e);if(e0&&e[e0]){for(var t,i=e[e0](),r=[];!(t=i.next()).done;)r.push(t.value);return r}var a=ap(e);return(a==f?tB:a==b?tV:og)(e)}function nQ(e){return e?(e=n2(e))===a||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function n1(e){var t=nQ(e),i=t%1;return t==t?i?t-i:t:0}function n0(e){return e?iC(n1(e),0,0xffffffff):0}function n2(e){if("number"==typeof e)return e;if(nW(e))return n;if(nN(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=nN(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tP(e);var i=es.test(e);return i||eu.test(e)?eQ(e.slice(2),i?2:8):el.test(e)?n:+e}function n3(e){return rN(e,os(e))}function n5(e){return null==e?"":rx(e)}var n6=rV(function(e,t){if(av(t)||nC(t))rN(t,ol(t),e);else for(var i in t)eP.call(t,i)&&ik(e,i,t[i])}),n4=rV(function(e,t){rN(t,os(t),e)}),n8=rV(function(e,t,i,r){rN(t,os(t),e,r)}),n7=rV(function(e,t,i,r){rN(t,ol(t),e,r)}),n9=ai(iA),oe=ru(function(t,i){t=ex(t);var r=-1,a=i.length,n=a>2?i[2]:e;for(n&&ay(i[0],i[1],n)&&(a=1);++r<a;)for(var o=i[r],l=os(o),s=-1,c=l.length;++s<c;){var u=l[s],h=t[u];(h===e||nk(h,ek[u])&&!eP.call(t,u))&&(t[u]=o[u])}return t}),ot=ru(function(t){return t.push(e,r9),ta(ou,e,t)});function oi(t,i,r){var a=null==t?e:iW(t,i);return a===e?r:a}function or(e,t){return null!=e&&ad(e,t,iQ)}var oa=rK(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=eC.call(t)),e[t]=i},oI(oR)),on=rK(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=eC.call(t)),eP.call(e,t)?e[t].push(i):e[t]=[i]},ao),oo=ru(i0);function ol(e){return nC(e)?iz(e):i8(e)}function os(e){return nC(e)?iz(e,!0):function(e){if(!nN(e)){var t=[];if(null!=e)for(var i in ex(e))t.push(i);return t}var r=av(e),a=[];
53for(var n in e)("constructor"!=n||!r&&eP.call(e,n))&&a.push(n);return a}(e)}var oc=rV(function(e,t,i){ri(e,t,i)}),ou=rV(function(e,t,i,r){ri(e,t,i,r)}),oh=ai(function(e,t){var i={};if(null==e)return i;var r=!1;t=th(t,function(t){return t=rI(t,e),r||(r=t.length>1),t}),rN(e,iX(e,os,ah),i),r&&(i=iR(i,7,ae));for(var a=t.length;a--;)rw(i,t[a]);return i}),op=ai(function(e,t){return null==e?{}:rn(e,t,function(t,i){return or(e,i)})});function od(e,t){if(null==e)return{};var i=th(iX(e,os,ah),function(e){return[e]});return t=ao(t),rn(e,i,function(e,i){return t(e,i[0])})}var of=r4(ol),om=r4(os);function og(e){return null==e?[]:tA(e,ol(e))}var oy=rq(function(e,t,i){return t=t.toLowerCase(),e+(i?o_(t):t)});function o_(e){return ok(n5(e).toLowerCase())}function ob(e){return(e=n5(e))&&e.replace(ep,tD).replace(eV,"")}var ox=rq(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),ov=rq(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),ow=rG("toLowerCase"),oz=rq(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()}),oS=rq(function(e,t,i){return e+(i?" ":"")+ok(t)}),oT=rq(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),ok=rG("toUpperCase");function oE(t,i,r){var a;return t=n5(t),(i=r?e:i)===e?(a=t,eq.test(a))?t.match(eZ)||[]:t.match(ei)||[]:t.match(i)||[]}var oM=ru(function(t,i){try{return ta(t,e,i)}catch(e){return nO(e)?e:new ey(e)}}),oP=ai(function(e,t){return to(t,function(t){iI(e,t=aR(t),nm(e[t],e))}),e});function oI(e){return function(){return e}}var oA=rX(),oC=rX(!0);function oR(e){return e}function oL(e){return i4("function"==typeof e?e:iR(e,1))}var oD=ru(function(e,t){return function(i){return i0(i,e,t)}}),oO=ru(function(e,t){return function(i){return i0(e,i,t)}});function oF(e,t,i){var r=ol(t),a=iH(t,r);null!=i||nN(t)&&(a.length||!r.length)||(i=t,t=e,e=this,a=iH(t,ol(t)));var n=!(nN(i)&&"chain"in i&&!i.chain),o=nF(e);return to(a,function(i){var r=t[i];e[i]=r,o&&(e.prototype[i]=function(){var t=this.__chain__;if(n||t){var i=e(this.__wrapped__);return(i.__actions__=rB(this.__actions__)).push({func:r,args:arguments,thisArg:e}),i.__chain__=t,i}return r.apply(e,tp([this.value()],arguments))})}),e}function oj(){}var oB=rQ(th),oN=rQ(tl),oU=rQ(tm);function oV(e){return a_(e)?tz(aR(e)):function(t){return iW(t,e)}}var o$=r0(),oZ=r0(!0);function oG(){return[]}function oq(){return!1}var oH,oW,oX,oY=rJ(function(e,t){return e+t},0),oK=r5("ceil"),oJ=rJ(function(e,t){return e/t},1),oQ=r5("floor"),o1=rJ(function(e,t){return e*t},1),o0=r5("round"),o2=rJ(function(e,t){return e-t},0);return ip.after=function(e,i){if("function"!=typeof i)throw new ez(t);return e=n1(e),function(){if(--e<1)return i.apply(this,arguments)}},ip.ary=nd,ip.assign=n6,ip.assignIn=n4,ip.assignInWith=n8,ip.assignWith=n7,ip.at=n9,ip.before=nf,ip.bind=nm,ip.bindAll=oP,ip.bindKey=ng,ip.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return nI(e)?e:[e]},ip.chain=a7,ip.chunk=function(t,i,r){i=(r?ay(t,i,r):i===e)?1:tQ(n1(i),0);var a=null==t?0:t.length;if(!a||i<1)return[];for(var n=0,o=0,l=em(tS(a/i));n<a;)l[o++]=rf(t,n,n+=i);return l},ip.compact=function(e){for(var t=-1,i=null==e?0:e.length,r=0,a=[];++t<i;){var n=e[t];n&&(a[r++]=n)}return a},ip.concat=function(){var e=arguments.length;if(!e)return[];
vendor: 6,792 bytes, line 53
53for(var t=em(e-1),i=arguments[0],r=e;r--;)t[r-1]=arguments[r];return tp(nI(i)?rB(i):[i],iV(t,1))},ip.cond=function(e){var i=null==e?0:e.length,r=ao();return e=i?th(e,function(e){if("function"!=typeof e[1])throw new ez(t);return[r(e[0]),e[1]]}):[],ru(function(t){for(var r=-1;++r<i;){var a=e[r];if(ta(a[0],this,t))return ta(a[1],this,t)}})},ip.conforms=function(e){var t,i;return i=ol(t=iR(e,1)),function(e){return iL(e,t,i)}},ip.constant=oI,ip.countBy=nt,ip.create=function(e,t){var i=id(e);return null==t?i:iP(i,t)},ip.curry=function t(i,r,a){var n=r8(i,8,e,e,e,e,e,r=a?e:r);return n.placeholder=t.placeholder,n},ip.curryRight=function t(i,r,a){var n=r8(i,16,e,e,e,e,e,r=a?e:r);return n.placeholder=t.placeholder,n},ip.debounce=ny,ip.defaults=oe,ip.defaultsDeep=ot,ip.defer=n_,ip.delay=nb,ip.difference=aO,ip.differenceBy=aF,ip.differenceWith=aj,ip.drop=function(t,i,r){var a=null==t?0:t.length;return a?rf(t,(i=r||i===e?1:n1(i))<0?0:i,a):[]},ip.dropRight=function(t,i,r){var a=null==t?0:t.length;return a?rf(t,0,(i=a-(i=r||i===e?1:n1(i)))<0?0:i):[]},ip.dropRightWhile=function(e,t){return e&&e.length?rS(e,ao(t,3),!0,!0):[]},ip.dropWhile=function(e,t){return e&&e.length?rS(e,ao(t,3),!0):[]},ip.fill=function(t,i,r,a){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&ay(t,i,r)&&(r=0,a=n),function(t,i,r,a){var n=t.length;for((r=n1(r))<0&&(r=-r>n?0:n+r),(a=a===e||a>n?n:n1(a))<0&&(a+=n),a=r>a?0:n0(a);r<a;)t[r++]=i;return t}(t,i,r,a)):[]},ip.filter=function(e,t){return(nI(e)?ts:iU)(e,ao(t,3))},ip.flatMap=function(e,t){return iV(nc(e,t),1)},ip.flatMapDeep=function(e,t){return iV(nc(e,t),a)},ip.flatMapDepth=function(t,i,r){return r=r===e?1:n1(r),iV(nc(t,i),r)},ip.flatten=aU,ip.flattenDeep=function(e){return null!=e&&e.length?iV(e,a):[]},ip.flattenDepth=function(t,i){return null!=t&&t.length?iV(t,i=i===e?1:n1(i)):[]},ip.flip=function(e){return r8(e,512)},ip.flow=oA,ip.flowRight=oC,ip.fromPairs=function(e){for(var t=-1,i=null==e?0:e.length,r={};++t<i;){var a=e[t];iI(r,a[0],a[1])}return r},ip.functions=function(e){return null==e?[]:iH(e,ol(e))},ip.functionsIn=function(e){return null==e?[]:iH(e,os(e))},ip.groupBy=no,ip.initial=function(e){return null!=e&&e.length?rf(e,0,-1):[]},ip.intersection=a$,ip.intersectionBy=aZ,ip.intersectionWith=aG,ip.invert=oa,ip.invertBy=on,ip.invokeMap=nl,ip.iteratee=oL,ip.keyBy=ns,ip.keys=ol,ip.keysIn=os,ip.map=nc,ip.mapKeys=function(e,t){var i={};return t=ao(t,3),iG(e,function(e,r,a){iI(i,t(e,r,a),e)}),i},ip.mapValues=function(e,t){var i={};return t=ao(t,3),iG(e,function(e,r,a){iI(i,r,t(e,r,a))}),i},ip.matches=function(e){return re(iR(e,1))},ip.matchesProperty=function(e,t){return rt(e,iR(t,1))},ip.memoize=nx,ip.merge=oc,ip.mergeWith=ou,ip.method=oD,ip.methodOf=oO,ip.mixin=oF,ip.negate=nv,ip.nthArg=function(e){return e=n1(e),ru(function(t){return rr(t,e)})},ip.omit=oh,ip.omitBy=function(e,t){return od(e,nv(ao(t)))},ip.once=function(e){return nf(2,e)},ip.orderBy=function(t,i,r,a){return null==t?[]:(nI(i)||(i=null==i?[]:[i]),nI(r=a?e:r)||(r=null==r?[]:[r]),ra(t,i,r))},ip.over=oB,ip.overArgs=nw,ip.overEvery=oN,ip.overSome=oU,ip.partial=nz,ip.partialRight=nS,ip.partition=nu,ip.pick=op,ip.pickBy=od,ip.property=oV,ip.propertyOf=function(t){return function(i){return null==t?e:iW(t,i)}},ip.pull=aH,ip.pullAll=aW,ip.pullAllBy=function(e,t,i){return e&&e.length&&t&&t.length?ro(e,t,ao(i,2)):e},ip.pullAllWith=function(t,i,r){return t&&t.length&&i&&i.length?ro(t,i,e,r):t},ip.pullAt=aX,ip.range=o$,ip.rangeRight=oZ,ip.rearg=nT,ip.reject=function(e,t){return(nI(e)?ts:iU)(e,nv(ao(t,3)))},ip.remove=function(e,t){var i=[];if(!e||!e.length)return i;var r=-1,a=[],n=e.length;for(t=ao(t,3);++r<n;){var o=e[r];t(o,r,e)&&(i.push(o),a.push(r))}return rl(e,a),i},ip.rest=function(i,r){if("function"!=typeof i)throw new ez(t);return ru(i,r=r===e?r:n1(r))},ip.reverse=aY,ip.sampleSize=function(t,i,r){return i=(r?ay(t,i,r):i===e)?1:n1(i),(nI(t)?function(e,t){return aA(rB(e),iC(t,0,e.length))}:function(e,t){var i=og(e);return aA(i,iC(t,0,i.length))})(t,i)},ip.set=function(e,t,i){return null==e?e:rh(e,t,i)},ip.setWith=function(t,i,r,a){return a="function"==typeof a?a:e,null==t?t:rh(t,i,r,a)},ip.shuffle=function(e){return(nI(e)?function(e){return aA(rB(e))}:function(e){return aA(og(e))})(e)},ip.slice=function(t,i,r){var a=null==t?0:t.length;return a?(r&&"number"!=typeof r&&ay(t,i,r)?(i=0,r=a):(i=null==i?0:n1(i),r=r===e?a:n1(r)),rf(t,i,r)):[]},ip.sortBy=nh,ip.sortedUniq=function(e){return e&&e.length?r_(e):[]},ip.sortedUniqBy=function(e,t){return e&&e.length?r_(e,ao(t,2)):[]},ip.split=function(t,i,r){return r&&"number"!=typeof r&&ay(t,i,r)&&(i=r=e),(r=r===e?0xffffffff:r>>>0)?(t=n5(t))&&("string"==typeof i||null!=i&&!nG(i))&&!(i=rx(i))&&tj(t)?rA(tZ(t),0,r):t.split(i,r):[]},ip.spread=function(e,i){if("function"!=typeof e)throw new ez(t);return i=null==i?0:tQ(n1(i),0),ru(function(t){var r=t[i],a=rA(t,0,i);return r&&tp(a,r),ta(e,this,a)})},ip.tail=function(e){var t=null==e?0:e.length;return t?rf(e,1,t):[]},ip.take=function(t,i,r){return t&&t.length?rf(t,0,(i=r||i===e?1:n1(i))<0?0:i):[]},ip.takeRight=function(t,i,r){var a=null==t?0:t.length;return a?rf(t,(i=a-(i=r||i===e?1:n1(i)))<0?0:i,a):[]},ip.takeRightWhile=function(e,t){return e&&e.length?rS(e,ao(t,3),!1,!0):[]},ip.takeWhile=function(e,t){return e&&e.length?rS(e,ao(t,3)):[]},ip.tap=function(e,t){return t(e),e},ip.throttle=function(e,i,r){var a=!0,n=!0;if("function"!=typeof e)throw new ez(t);return nN(r)&&(a="leading"in r?!!r.leading:a,n="trailing"in r?!!r.trailing:n),ny(e,i,{leading:a,maxWait:i,trailing:n})},ip.thru=a9,ip.toArray=nJ,ip.toPairs=of,ip.toPairsIn=om,ip.toPath=function(e){return nI(e)?th(e,aR):nW(e)?[e]:rB(aC(n5(e)))},ip.toPlainObject=n3,ip.transform=function(e,t,i){var r=nI(e),a=r||nL(e)||nX(e);if(t=ao(t,4),null==i){var n=e&&e.constructor;i=a?r?new n:[]:nN(e)&&nF(n)?id(eN(e)):{}}return(a?to:iG)(e,function(e,r,a){return t(i,e,r,a)}),i},ip.unary=function(e){return nd(e,1)},ip.union=aK,ip.unionBy=aJ,ip.unionWith=aQ,ip.uniq=function(e){return e&&e.length?rv(e):[]},ip.uniqBy=function(e,t){return e&&e.length?rv(e,ao(t,2)):[]},ip.uniqWith=function(t,i){return i="function"==typeof i?i:e,t&&t.length?rv(t,e,i):[]},ip.unset=function(e,t){return null==e||rw(e,t)},ip.unzip=a1,ip.unzipWith=a0,ip.update=function(e,t,i){return null==e?e:rz(e,t,rP(i))},ip.updateWith=function(t,i,r,a){return a="function"==typeof a?a:e,null==t?t:rz(t,i,rP(r),a)},ip.values=og,ip.valuesIn=function(e){return null==e?[]:tA(e,os(e))},ip.without=a2,ip.words=oE,ip.wrap=function(e,t){return nz(rP(t),e)},ip.xor=a3,ip.xorBy=a5,ip.xorWith=a6,ip.zip=a4,ip.zipObject=function(e,t){return rE(e||[],t||[],ik)},ip.zipObjectDeep=function(e,t){return rE(e||[],t||[],rh)},ip.zipWith=a8,ip.entries=of,ip.entriesIn=om,ip.extend=n4,ip.extendWith=n8,oF(ip,ip),ip.add=oY,ip.attempt=oM,ip.camel
vendor: 3,179 bytes, line 53
53Case=oy,ip.capitalize=o_,ip.ceil=oK,ip.clamp=function(t,i,r){return r===e&&(r=i,i=e),r!==e&&(r=(r=n2(r))==r?r:0),i!==e&&(i=(i=n2(i))==i?i:0),iC(n2(t),i,r)},ip.clone=function(e){return iR(e,4)},ip.cloneDeep=function(e){return iR(e,5)},ip.cloneDeepWith=function(t,i){return iR(t,5,i="function"==typeof i?i:e)},ip.cloneWith=function(t,i){return iR(t,4,i="function"==typeof i?i:e)},ip.conformsTo=function(e,t){return null==t||iL(e,t,ol(t))},ip.deburr=ob,ip.defaultTo=function(e,t){return null==e||e!=e?t:e},ip.divide=oJ,ip.endsWith=function(t,i,r){t=n5(t),i=rx(i);var a=t.length,n=r=r===e?a:iC(n1(r),0,a);return(r-=i.length)>=0&&t.slice(r,n)==i},ip.eq=nk,ip.escape=function(e){return(e=n5(e))&&U.test(e)?e.replace(j,tO):e},ip.escapeRegExp=function(e){return(e=n5(e))&&Y.test(e)?e.replace(X,"\\$&"):e},ip.every=function(t,i,r){var a=nI(t)?tl:iB;return r&&ay(t,i,r)&&(i=e),a(t,ao(i,3))},ip.find=ni,ip.findIndex=aB,ip.findKey=function(e,t){return ty(e,ao(t,3),iG)},ip.findLast=nr,ip.findLastIndex=aN,ip.findLastKey=function(e,t){return ty(e,ao(t,3),iq)},ip.floor=oQ,ip.forEach=na,ip.forEachRight=nn,ip.forIn=function(e,t){return null==e?e:i$(e,ao(t,3),os)},ip.forInRight=function(e,t){return null==e?e:iZ(e,ao(t,3),os)},ip.forOwn=function(e,t){return e&&iG(e,ao(t,3))},ip.forOwnRight=function(e,t){return e&&iq(e,ao(t,3))},ip.get=oi,ip.gt=nE,ip.gte=nM,ip.has=function(e,t){return null!=e&&ad(e,t,iJ)},ip.hasIn=or,ip.head=aV,ip.identity=oR,ip.includes=function(e,t,i,r){e=nC(e)?e:og(e),i=i&&!r?n1(i):0;var a=e.length;return i<0&&(i=tQ(a+i,0)),nH(e)?i<=a&&e.indexOf(t,i)>-1:!!a&&tb(e,t,i)>-1},ip.indexOf=function(e,t,i){var r=null==e?0:e.length;if(!r)return -1;var a=null==i?0:n1(i);return a<0&&(a=tQ(r+a,0)),tb(e,t,a)},ip.inRange=function(t,i,r){var a,n,o;return i=nQ(i),r===e?(r=i,i=0):r=nQ(r),(a=t=n2(t))>=t1(n=i,o=r)&&a<tQ(n,o)},ip.invoke=oo,ip.isArguments=nP,ip.isArray=nI,ip.isArrayBuffer=nA,ip.isArrayLike=nC,ip.isArrayLikeObject=nR,ip.isBoolean=function(e){return!0===e||!1===e||nU(e)&&iY(e)==c},ip.isBuffer=nL,ip.isDate=nD,ip.isElement=function(e){return nU(e)&&1===e.nodeType&&!nZ(e)},ip.isEmpty=function(e){if(null==e)return!0;if(nC(e)&&(nI(e)||"string"==typeof e||"function"==typeof e.splice||nL(e)||nX(e)||nP(e)))return!e.length;var t=ap(e);if(t==f||t==b)return!e.size;if(av(e))return!i8(e).length;for(var i in e)if(eP.call(e,i))return!1;return!0},ip.isEqual=function(e,t){return i3(e,t)},ip.isEqualWith=function(t,i,r){var a=(r="function"==typeof r?r:e)?r(t,i):e;return a===e?i3(t,i,e,r):!!a},ip.isError=nO,ip.isFinite=function(e){return"number"==typeof e&&tY(e)},ip.isFunction=nF,ip.isInteger=nj,ip.isLength=nB,ip.isMap=nV,ip.isMatch=function(e,t){return e===t||i5(e,t,as(t))},ip.isMatchWith=function(t,i,r){return r="function"==typeof r?r:e,i5(t,i,as(i),r)},ip.isNaN=function(e){return n$(e)&&e!=+e},ip.isNative=function(e){if(ax(e))throw new ey("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return i6(e)},ip.isNil=function(e){return null==e},ip.isNull=function(e){return null===e},ip.isNumber=n$,ip.isObject=nN,ip.isObjectLike=nU,ip.isPlainObject=nZ,ip.isRegExp=nG,ip.isSafeInteger=function(e){return nj(e)&&e>=-0x1fffffffffffff&&e<=0x1fffffffffffff}
vendor: 4,583 bytes, line 53
53,ip.isSet=nq,ip.isString=nH,ip.isSymbol=nW,ip.isTypedArray=nX,ip.isUndefined=function(t){return t===e},ip.isWeakMap=function(e){return nU(e)&&ap(e)==w},ip.isWeakSet=function(e){return nU(e)&&"[object WeakSet]"==iY(e)},ip.join=function(e,t){return null==e?"":tK.call(e,t)},ip.kebabCase=ox,ip.last=aq,ip.lastIndexOf=function(t,i,r){var a=null==t?0:t.length;if(!a)return -1;var n=a;return r!==e&&(n=(n=n1(r))<0?tQ(a+n,0):t1(n,a-1)),i==i?function(e,t,i){for(var r=i+1;r--&&e[r]!==t;);return r}(t,i,n):t_(t,tv,n,!0)},ip.lowerCase=ov,ip.lowerFirst=ow,ip.lt=nY,ip.lte=nK,ip.max=function(t){return t&&t.length?iN(t,oR,iK):e},ip.maxBy=function(t,i){return t&&t.length?iN(t,ao(i,2),iK):e},ip.mean=function(e){return tw(e,oR)},ip.meanBy=function(e,t){return tw(e,ao(t,2))},ip.min=function(t){return t&&t.length?iN(t,oR,i7):e},ip.minBy=function(t,i){return t&&t.length?iN(t,ao(i,2),i7):e},ip.stubArray=oG,ip.stubFalse=oq,ip.stubObject=function(){return{}},ip.stubString=function(){return""},ip.stubTrue=function(){return!0},ip.multiply=o1,ip.nth=function(t,i){return t&&t.length?rr(t,n1(i)):e},ip.noConflict=function(){return e2._===this&&(e2._=eL),this},ip.noop=oj,ip.now=np,ip.pad=function(e,t,i){e=n5(e);var r=(t=n1(t))?t$(e):0;if(!t||r>=t)return e;var a=(t-r)/2;return r1(tM(a),i)+e+r1(tS(a),i)},ip.padEnd=function(e,t,i){e=n5(e);var r=(t=n1(t))?t$(e):0;return t&&r<t?e+r1(t-r,i):e},ip.padStart=function(e,t,i){e=n5(e);var r=(t=n1(t))?t$(e):0;return t&&r<t?r1(t-r,i)+e:e},ip.parseInt=function(e,t,i){return i||null==t?t=0:t&&(t*=1),t2(n5(e).replace(K,""),t||0)},ip.random=function(t,i,r){if(r&&"boolean"!=typeof r&&ay(t,i,r)&&(i=r=e),r===e&&("boolean"==typeof i?(r=i,i=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&i===e?(t=0,i=1):(t=nQ(t),i===e?(i=t,t=0):i=nQ(i)),t>i){var a=t;t=i,i=a}if(r||t%1||i%1){var n=t3();return t1(t+n*(i-t+eJ("1e-"+((n+"").length-1))),i)}return rs(t,i)},ip.reduce=function(e,t,i){var r=nI(e)?td:tT,a=arguments.length<3;return r(e,ao(t,4),i,a,iF)},ip.reduceRight=function(e,t,i){var r=nI(e)?tf:tT,a=arguments.length<3;return r(e,ao(t,4),i,a,ij)},ip.repeat=function(t,i,r){return i=(r?ay(t,i,r):i===e)?1:n1(i),rc(n5(t),i)},ip.replace=function(){var e=arguments,t=n5(e[0]);return e.length<3?t:t.replace(e[1],e[2])},ip.result=function(t,i,r){var a=-1,n=(i=rI(i,t)).length;for(n||(n=1,t=e);++a<n;){var o=null==t?e:t[aR(i[a])];o===e&&(a=n,o=r),t=nF(o)?o.call(t):o}return t},ip.round=o0,ip.runInContext=N,ip.sample=function(e){return(nI(e)?iS:function(e){return iS(og(e))})(e)},ip.size=function(e){if(null==e)return 0;if(nC(e))return nH(e)?t$(e):e.length;var t=ap(e);return t==f||t==b?e.size:i8(e).length},ip.snakeCase=oz,ip.some=function(t,i,r){var a=nI(t)?tm:rm;return r&&ay(t,i,r)&&(i=e),a(t,ao(i,3))},ip.sortedIndex=function(e,t){return rg(e,t)},ip.sortedIndexBy=function(e,t,i){return ry(e,t,ao(i,2))},ip.sortedIndexOf=function(e,t){var i=null==e?0:e.length;if(i){var r=rg(e,t);if(r<i&&nk(e[r],t))return r}return -1},ip.sortedLastIndex=function(e,t){return rg(e,t,!0)},ip.sortedLastIndexBy=function(e,t,i){return ry(e,t,ao(i,2),!0)},ip.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var i=rg(e,t,!0)-1;if(nk(e[i],t))return i}return -1},ip.startCase=oS,ip.startsWith=function(e,t,i){return e=n5(e),i=null==i?0:iC(n1(i),0,e.length),t=rx(t),e.slice(i,i+t.length)==t},ip.subtract=o2,ip.sum=function(e){return e&&e.length?tk(e,oR):0},ip.sumBy=function(e,t){return e&&e.length?tk(e,ao(t,2)):0},ip.template=function(t,i,r){var a=ip.templateSettings;r&&ay(t,i,r)&&(i=e),t=n5(t),i=n7({},i,a,r7);var n=n7({},i.imports,a.imports,r7),o=ol(n),l=tA(n,o);to(o,function(e){if(er.test(e))throw new ey("Invalid `imports` option passed into `_.template`")});var s,c,u=0,h=i.interpolate||ed,p="__p += '",d=ev((i.escape||ed).source+"|"+h.source+"|"+(h===G?en:ed).source+"|"+(i.evaluate||ed).source+"|$","g"),f="//# sourceURL="+(eP.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++eW+"]")+"\n";t.replace(d,function(e,i,r,a,n,o){return r||(r=a),p+=t.slice(u,o).replace(ef,tF),i&&(s=!0,p+="' +\n__e("+i+") +\n'"),n&&(c=!0,p+="';\n"+n+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=o+e.length,e}),p+="';\n";var m=eP.call(i,"variable")&&i.variable;if(m){if(er.test(m))throw new ey("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(c?p.replace(L,""):p).replace(D,"$1").replace(O,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";
53\n")+p+"return __p\n}";var g=oM(function(){return e_(o,f+"return "+p).apply(e,l)});if(g.source=p,nO(g))throw g;return g},ip.times=function(e,t){if((e=n1(e))<1||e>0x1fffffffffffff)return[];var i=0xffffffff,r=t1(e,0xffffffff);t=ao(t),e-=0xffffffff;for(var a=tE(r,t);++i<e;)t(i);return a},ip.toFinite=nQ,ip.toInteger=n1,ip.toLength=n0,ip.toLower=function(e){return n5(e).toLowerCase()},ip.toNumber=n2,ip.toSafeInteger=function(e){return e?iC(n1(e),-0x1fffffffffffff,0x1fffffffffffff):0===e?e:0},ip.toString=n5,ip.toUpper=function(e){return n5(e).toUpperCase()},ip.trim=function(t,i,r){if((t=n5(t))&&(r||i===e))return tP(t);if(!t||!(i=rx(i)))return t;var a=tZ(t),n=tZ(i);return rA(a,tR(a,n),tL(a,n)+1).join("")},ip.trimEnd=function(t,i,r){if((t=n5(t))&&(r||i===e))return t.slice(0,tG(t)+1);if(!t||!(i=rx(i)))return t;var a=tZ(t);return rA(a,0,tL(a,tZ(i))+1).join("")},ip.trimStart=function(t,i,r){if((t=n5(t))&&(r||i===e))return t.replace(K,"");if(!t||!(i=rx(i)))return t;var a=tZ(t);return rA(a,tR(a,tZ(i))).join("")},ip.truncate=function(t,i){var r=30,a="...";if(nN(i)){var n="separator"in i?i.separator:n;r="length"in i?n1(i.length):r,a="omission"in i?rx(i.omission):a}var o=(t=n5(t)).length;if(tj(t)){var l=tZ(t);o=l.length}if(r>=o)return t;var s=r-t$(a);if(s<1)return a;var c=l?rA(l,0,s).join(""):t.slice(0,s);if(n===e)return c+a;if(l&&(s+=c.length-s),nG(n)){if(t.slice(s).search(n)){var u,h=c;for(n.global||(n=ev(n.source,n5(eo.exec(n))+"g")),n.lastIndex=0;u=n.exec(h);)var p=u.index;c=c.slice(0,p===e?s:p)}}else if(t.indexOf(rx(n),s)!=s){var d=c.lastIndexOf(n);d>-1&&(c=c.slice(0,d))}return c+a},ip.unescape=function(e){return(e=n5(e))&&B.test(e)?e.replace(F,tq):e},ip.uniqueId=function(e){var t=++eI;return n5(e)+t},ip.upperCase=oT,ip.upperFirst=ok,ip.each=na,ip.eachRight=nn,ip.first=aV,oF(ip,(oX={},iG(ip,function(e,t){eP.call(ip.prototype,t)||(oX[t]=e)}),oX),{chain:!1}),ip.VERSION="4.18.1",to(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){ip[e].placeholder=ip}),to(["drop","take"],function(t,i){iy.prototype[t]=function(r){r=r===e?1:tQ(n1(r),0);var a=this.__filtered__&&!i?new iy(this):this.clone();return a.__filtered__?a.__takeCount__=t1(r,a.__takeCount__):a.__views__.push({size:t1(r,0xffffffff),type:t+(a.__dir__<0?"Right":"")}),a},iy.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),to(["filter","map","takeWhile"],function(e,t){var i=t+1,r=1==i||3==i;iy.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ao(e,3),type:i}),t.__filtered__=t.__filtered__||r,t}}),to(["head","last"],function(e,t){var i="take"+(t?"Right":"");iy.prototype[e]=function(){return this[i](1).value()[0]}}),to(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");iy.prototype[e]=function(){return this.__filtered__?new iy(this):this[i](1)}}),iy.prototype.compact=function(){return this.filter(oR)},iy.prototype.find=function(e){return this.filter(e).head()},iy.prototype.findLast=function(e){return this.reverse().find(e)},iy.prototype.invokeMap=ru(function(e,t){return"function"==typeof e?new iy(this):this.map(function(i){return i0(i,e,t)})}),iy.prototype.reject=function(e){return this.filter(nv(ao(e)))},iy.prototype.slice=function(t,i){t=n1(t);var r=this;return r.__filtered__&&(t>0||i<0)?new iy(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),i!==e&&(r=(i=n1(i))<0?r.dropRight(-i):r.take(i-t)),r)},iy.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},iy.prototype.toArray=function(){return this.take(0xffffffff)},iG(iy.prototype,function(t,i){var r=/^(?:filter|find|map|reject)|While$/.test(i),a=/^(?:head|last)$/.test(i),n=ip[a?"take"+("last"==i?"Right":""):i],o=a||/^find/.test(i);n&&(ip.prototype[i]=function(){var i=this.__wrapped__,l=a?[1]:arguments,s=i instanceof iy,c=l[0],u=s||nI(i),h=function(e){var t=n.apply(ip,tp([e],l));return a&&p?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(s=u=!1);var p=this.__chain__,d=!!this.__actions__.length,f=o&&!p,m=s&&!d;if(!o&&u){i=m?i:new iy(this);var g=t.apply(i,l);return g.__actions__.push({func:a9,args:[h],thisArg:e}),new ig(g,p)}return f&&m?t.apply(this,l):(g=this.thru(h),f?a?g.value()[0]:g.value():g)})}),to(["pop","push","shift","sort","splice","unshift"],function(e){var t=eS[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);ip.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var a=this.value();return t.apply(nI(a)?a:[],e)}return this[i](function(i){return t.apply(nI(i)?i:[],e)})}}),iG(iy.prototype,function(e,t){var i=ip[t];if(i){var r=i.name+"";eP.call(ii,r)||(ii[r]=[]),ii[r].push({name:t,func:i})}}),ii[rY(e,2).name]=[{name:"wrapper",func:e}],iy.prototype.clone=function(){var e=new iy(this.__wrapped__);return e.__actions__=rB(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=rB(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=rB(this.__views__),e},iy.prototype.reverse=function(){if(this.__filtered__){var e=new iy(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},iy.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=nI(e),r=t<0,a=i?e.length:0,n=function(e,t,i){for(var r=-1,a=i.length;++r<a;){var n=i[r],o=n.size;switch(n.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=t1(t,e+o);break;case"takeRight":e=tQ(e,t-o)}}return{start:e,end:t}}(0,a,this.__views__),o=n.start,l=n.end,s=l-o,c=r?l:o-1,u=this.__iteratees__,h=u.length,p=0,d=t1(s,this.__takeCount__);if(!i||!r&&a==s&&d==s)return rT(e,this.__actions__);var f=[];e:for(;s--&&p<d;){for(var m=-1,g=e[c+=t];++m<h;){var y=u[m],_=y.iteratee,b=y.type,x=_(g);if(2==b)g=x;else if(!x){if(1==b)continue e;break e}}f[p++]=g}return f},ip.prototype.at=ne,ip.prototype.chain=function(){return a7(this)},ip.prototype.commit=function(){return new ig(this.value(),this.__chain__)},ip.prototype.next=function(){this.__values__===e&&(this.__values__=nJ(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},ip.prototype.plant=function(t){for(var i,r=this;r instanceof im;){var a=aD(r);a.__index__=0,a.__values__=e,i?n.__wrapped__=a:i=a;var n=a;r=r.__wrapped__}return n.__wrapped__=t,i},ip.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof iy){var i=t;return this.__actions__.length&&(i=new iy(this)),(i=i.reverse()).__actions__.push({func:a9,args:[aY],thisArg:e}),new ig(i,this.__chain__)}return this.thru(aY)},ip.prototype.toJSON=ip.prototype.valueOf=ip.prototype.value=function(){return rT(this.__wrapped__,this.__actions__)},ip.prototype.first=ip.prototype.head,e0&&(ip.prototype[e0]=function(){return this}),ip}();e5?((e5.exports=tH)._=tH,e3._=tH):e2._=tH}
53).call(tM.exports)),tM.exports),tI=U(tP);function tA(){return W?H:(W=1,H=function(e,t){return e===t||e!=e&&t!=t})}function tC(){if(Y)return X;Y=1;var e=tA();return X=function(t,i){for(var r=t.length;r--;)if(e(t[r][0],i))return r;return -1}}function tR(){if(eo)return en;eo=1;var e=q?G:(q=1,G=function(){this.__data__=[],this.size=0}),t=function(){if(J)return K;J=1;var e=tC(),t=Array.prototype.splice;return K=function(i){var r=this.__data__,a=e(r,i);return!(a<0||(a==r.length-1?r.pop():t.call(r,a,1),--this.size,0))}}(),i=function(){if(ee)return Q;ee=1;var e=tC();return Q=function(t){var i=this.__data__,r=e(i,t);return r<0?void 0:i[r][1]}}(),r=function(){if(ei)return et;ei=1;var e=tC();return et=function(t){return e(this.__data__,t)>-1}}(),a=function(){if(ea)return er;ea=1;var e=tC();return er=function(t,i){var r=this.__data__,a=e(r,t);return a<0?(++this.size,r.push([t,i])):r[a][1]=i,this}}();function n(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}return n.prototype.clear=e,n.prototype.delete=t,n.prototype.get=i,n.prototype.has=r,n.prototype.set=a,en=n}function tL(){return eg?em:(eg=1,em="object"==typeof N&&N&&N.Object===Object&&N)}function tD(){if(e_)return ey;e_=1;var e=tL(),t="object"==typeof self&&self&&self.Object===Object&&self;return ey=e||t||Function("return this")()}function tO(){return ex?eb:(ex=1,eb=tD().Symbol)}function tF(){if(ek)return eT;ek=1;var e=tO(),t=function(){if(ew)return ev;ew=1;var e=tO(),t=Object.prototype,i=t.hasOwnProperty,r=t.toString,a=e?e.toStringTag:void 0;return ev=function(e){var t=i.call(e,a),n=e[a];try{e[a]=void 0;var o=!0}catch(e){}var l=r.call(e);return o&&(t?e[a]=n:delete e[a]),l}}(),i=function(){if(eS)return ez;eS=1;var e=Object.prototype.toString;return ez=function(t){return e.call(t)}}(),r=e?e.toStringTag:void 0;return eT=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?t(e):i(e)}}function tj(){return eM?eE:(eM=1,eE=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)})}function tB(){if(eI)return eP;eI=1;var e=tF(),t=tj();return eP=function(i){if(!t(i))return!1;var r=e(i);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}}function tN(){if(eV)return eU;eV=1;var e=function(){if(ej)return eF;ej=1;var e=tB(),t=function(){if(eL)return eR;eL=1;var e,t=eC?eA:(eC=1,eA=tD()["__core-js_shared__"]),i=(e=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"";return eR=function(e){return!!i&&i in e}}(),i=tj(),r=function(){if(eO)return eD;eO=1;var e=Function.prototype.toString;return eD=function(t){if(null!=t){try{return e.call(t)}catch(e){}try{return t+""}catch(e){}}return""}}(),a=/^\[object .+?Constructor\]$/,n=Object.prototype,o=Function.prototype.toString,l=n.hasOwnProperty,s=RegExp("^"+o.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return eF=function(n){return!(!i(n)||t(n))&&(e(n)?s:a).test(r(n))}}(),t=eN?eB:(eN=1,eB=function(e,t){return null==e?void 0:e[t]});return eU=function(i,r){var a=t(i,r);return e(a)?a:void 0}}function tU(){return eZ?e$:(eZ=1,e$=tN()(tD(),"Map"))}function tV(){return eq?eG:(eq=1,eG=tN()(Object,"create"))}function t$(){if(te)return e9;te=1;var e=e7?e8:(e7=1,e8=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e});return e9=function(t,i){var r=t.__data__;return e(i)?r["string"==typeof i?"string":"hash"]:r.map}}function tZ(){if(tg)return tm;tg=1;var e=tN();return tm=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()}function tG(){if(t_)return ty;t_=1;var e=tZ();return ty=function(t,i,r){"__proto__"==i&&e?e(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}}function tq(){if(tx)return tb;tx=1;var e=tG(),t=tA();return tb=function(i,r,a){(void 0===a||t(i[r],a))&&(void 0!==a||r in i)||e(i,r,a)}}var tH,tW,tX,tY,tK,tJ,tQ,t1,t0,t2,t3,t5,t6,t4,t8,t7,t9,ie,it,ii,ir,ia,io,il,is,ic,iu,ih,ip,id,im,ig,iy,i_={exports:{}};function ib(){return t8?t4:(t8=1,t4=(t6?t5:(t6=1,t5=function(e,t){return function(i){return e(t(i))}}))(Object.getPrototypeOf,Object))}function ix(){if(t9)return t7;t9=1;var e=Object.prototype;return t7=function(t){var i=t&&t.constructor;return t===("function"==typeof i&&i.prototype||e)}}function iv(){return ir?ii:(ir=1,ii=function(e){return null!=e&&"object"==typeof e})}function iw(){if(is)return il;is=1;var e=function(){if(io)return ia;io=1;var e=tF(),t=iv();return ia=function(i){return t(i)&&"[object Arguments]"==e(i)}}(),t=iv(),i=Object.prototype,r=i.hasOwnProperty,a=i.propertyIsEnumerable;return il=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!a.call(e,"callee")}}function iz(){return iu?ic:(iu=1,ic=Array.isArray)}function iS(){return ip?ih:(ip=1,ih=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff})}
53function iT(){if(im)return id;im=1;var e=tB(),t=iS();return id=function(i){return null!=i&&t(i.length)&&!e(i)}}i_.exports;var ik,iE,iM,iP,iI,iA,iC,iR,iL,iD={exports:{}};function iO(){var e,t,i,r,a,n;return iM||(iM=1,e=iD.exports,t=tD(),i=iE?ik:(iE=1,ik=function(){return!1}),n=(a=(r=e&&!e.nodeType&&e)&&iD&&!iD.nodeType&&iD)&&a.exports===r?t.Buffer:void 0,iD.exports=(n?n.isBuffer:void 0)||i),iD.exports}iD.exports;var iF,ij,iB,iN,iU,iV,i$,iZ,iG,iq,iH,iW,iX,iY,iK,iJ,iQ,i1,i0,i2,i3,i5,i6,i4,i8,i7,i9,re,rt,ri,rr,ra,rn,ro,rl,rs,rc,ru,rh,rp,rd,rf,rm,rg,ry,r_,rb,rx,rv,rw={exports:{}};function rz(){if(iB)return ij;iB=1;var e,t,i,r,a,n=function(){if(iC)return iA;iC=1;var e=tF(),t=iS(),i=iv(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,iA=function(a){return i(a)&&t(a.length)&&!!r[e(a)]}}(),o=iL?iR:(iL=1,iR=function(e){return function(t){return e(t)}}),l=(iF||(iF=1,e=rw.exports,t=tL(),a=(r=(i=e&&!e.nodeType&&e)&&rw&&!rw.nodeType&&rw)&&r.exports===i&&t.process,rw.exports=function(){try{return r&&r.require&&r.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}()),rw.exports),s=l&&l.isTypedArray;return ij=s?o(s):n}function rS(){return iU?iN:(iU=1,iN=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]})}function rT(){if(iX)return iW;iX=1;var e=/^(?:0|[1-9]\d*)$/;return iW=function(t,i){var r=typeof t;return!!(i=null==i?0x1fffffffffffff:i)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<i}}function rk(){if(i3)return i2;i3=1;var e=function(){if(iK)return iY;iK=1;var e=(iH||(iH=1,iq=function(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}),iq),t=iw(),i=iz(),r=iO(),a=rT(),n=rz(),o=Object.prototype.hasOwnProperty;return iY=function(l,s){var c=i(l),u=!c&&t(l),h=!c&&!u&&r(l),p=!c&&!u&&!h&&n(l),d=c||u||h||p,f=d?e(l.length,String):[],m=f.length;for(var g in l)!s&&!o.call(l,g)||d&&("length"==g||h&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||f.push(g);return f}}(),t=function(){if(i0)return i1;i0=1;var e=tj(),t=ix(),i=iQ?iJ:(iQ=1,iJ=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}),r=Object.prototype.hasOwnProperty;return i1=function(a){if(!e(a))return i(a);var n=t(a),o=[];for(var l in a)("constructor"!=l||!n&&r.call(a,l))&&o.push(l);return o}}(),i=iT();return i2=function(r){return i(r)?e(r,!0):t(r)}}function rE(){return rt?re:(rt=1,re=function(e){return e})}rw.exports;var rM=U(function(){if(rv)return rx;rv=1;var e=function(){if(i9)return i7;i9=1;var e=function(){if(tf)return td;tf=1;var e=tR(),t=function(){if(es)return el;es=1;var e=tR();return el=function(){this.__data__=new e,this.size=0}}(),i=eu?ec:(eu=1,ec=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}),r=ep?eh:(ep=1,eh=function(e){return this.__data__.get(e)}),a=ef?ed:(ef=1,ed=function(e){return this.__data__.has(e)}),n=function(){if(tp)return th;tp=1;var e=tR(),t=tU(),i=function(){if(tu)return tc;tu=1;var e=function(){if(e4)return e6;e4=1;var e=function(){if(e5)return e3;e5=1;var e=function(){if(eW)return eH;eW=1;var e=tV();return eH=function(){this.__data__=e?e(null):{},this.size=0}}(),t=eY?eX:(eY=1,eX=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}),i=function(){if(eJ)return eK;eJ=1;var e=tV(),t=Object.prototype.hasOwnProperty;return eK=function(i){var r=this.__data__;if(e){var a=r[i];return"__lodash_hash_undefined__"===a?void 0:a}return t.call(r,i)?r[i]:void 0}}(),r=function(){if(e1)return eQ;e1=1;var e=tV(),t=Object.prototype.hasOwnProperty;return eQ=function(i){var r=this.__data__;return e?void 0!==r[i]:t.call(r,i)}}(),a=function(){if(e2)return e0;e2=1;var e=tV();return e0=function(t,i){var r=this.__data__;return this.size+=+!this.has(t),r[t]=e&&void 0===i?"__lodash_hash_undefined__":i,this}}();function n(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}return n.prototype.clear=e,n.prototype.delete=t,n.prototype.get=i,n.prototype.has=r,n.prototype.set=a,e3=n}(),t=tR(),i=tU();return e6=function(){this.size=0,this.__data__={hash:new e,map:new(i||t),string:new e}}}(),t=function(){if(ti)return tt;ti=1;var e=t$();return tt=function(t){var i=e(this,t).delete(t);return this.size-=!!i,i}}(),i=function(){if(ta)return tr;ta=1;var e=t$();return tr=function(t){return e(this,t).get(t)}}(),r=function(){if(to)return tn;to=1;var e=t$();return tn=function(t){return e(this,t).has(t)}}(),a=function(){if(ts)return tl;ts=1;var e=t$();return tl=function(t,i){var r=e(this,t),a=r.size;return r.set(t,i),this.size+=+(r.size!=a),this}}();function n(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}return n.prototype.clear=e,n.prototype.delete=t,n.prototype.get=i,n.prototype.has=r,n.prototype.set=a,tc=n}();return th=function(r,a){var n=this.__data__;if(n instanceof e){var o=n.__data__;if(!t||o.length<199)return o.push([r,a]),this.size=++n.size,this;n=this.__data__=new i(o)}return n.set(r,a),this.size=n.size,this}}();function o(t){var i=this.__data__=new e(t);this.size=i.size}return o.prototype.clear=t,o.prototype.delete=i,o.prototype.get=r,o.prototype.has=a,o.prototype.set=n,td=o}(),t=tq(),i=tS?tz:(tS=1,tz=(tw||(tw=1,tv=function(e){return function(t,i,r){for(var a=-1,n=Object(t),o=r(t),l=o.length;l--;){var s=o[e?l:++a];if(!1===i(n[s],s,n))break}return t}}),tv)()),r=function(){if(i8)return i4;i8=1;var e,t,i,r,a,n,o=tq(),l=(tH||(tH=1,e=i_.exports,t=tD(),n=(a=(r=(i=e&&!e.nodeType&&e)&&i_&&!i_.nodeType&&i_)&&r.exports===i?t.Buffer:void 0)?a.allocUnsafe:void 0,i_.exp
53orts=function(e,t){if(t)return e.slice();var i=e.length,r=n?n(i):new e.constructor(i);return e.copy(r),r}),i_.exports),s=function(){if(tQ)return tJ;tQ=1;var e=function(){if(tK)return tY;tK=1;var e=tX?tW:(tX=1,tW=tD().Uint8Array);return tY=function(t){var i=new t.constructor(t.byteLength);return new e(i).set(new e(t)),i}}();return tJ=function(t,i){var r=i?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}(),c=(t0||(t0=1,t1=function(e,t){var i=-1,r=e.length;for(t||(t=Array(r));++i<r;)t[i]=e[i];return t}),t1),u=function(){if(it)return ie;it=1;var e=function(){if(t3)return t2;t3=1;var e=tj(),t=Object.create;return t2=function(){function i(){}return function(r){if(!e(r))return{};if(t)return t(r);i.prototype=r;var a=new i;return i.prototype=void 0,a}}()}(),t=ib(),i=ix();return ie=function(r){return"function"!=typeof r.constructor||i(r)?{}:e(t(r))}}(),h=iw(),p=iz(),d=function(){if(iy)return ig;iy=1;var e=iT(),t=iv();return ig=function(i){return t(i)&&e(i)}}(),f=iO(),m=tB(),g=tj(),y=function(){if(iI)return iP;iI=1;var e=tF(),t=ib(),i=iv(),r=Object.prototype,a=Function.prototype.toString,n=r.hasOwnProperty,o=a.call(Object);return iP=function(r){if(!i(r)||"[object Object]"!=e(r))return!1;var l=t(r);if(null===l)return!0;var s=n.call(l,"constructor")&&l.constructor;return"function"==typeof s&&s instanceof s&&a.call(s)==o}}(),_=rz(),b=rS(),x=function(){if(i6)return i5;i6=1;var e=function(){if(iG)return iZ;iG=1;var e=function(){if(i$)return iV;i$=1;var e=tG(),t=tA(),i=Object.prototype.hasOwnProperty;return iV=function(r,a,n){var o=r[a];i.call(r,a)&&t(o,n)&&(void 0!==n||a in r)||e(r,a,n)}}(),t=tG();return iZ=function(i,r,a,n){var o=!a;a||(a={});for(var l=-1,s=r.length;++l<s;){var c=r[l],u=n?n(a[c],i[c],c,a,i):void 0;void 0===u&&(u=i[c]),o?t(a,c,u):e(a,c,u)}return a}}(),t=rk();return i5=function(i){return e(i,t(i))}}();return i4=function(e,t,i,r,a,n,v){var w=b(e,i),z=b(t,i),S=v.get(z);if(S)o(e,i,S);else{var T=n?n(w,z,i+"",e,t,v):void 0,k=void 0===T;if(k){var E=p(z),M=!E&&f(z),P=!E&&!M&&_(z);T=z,E||M||P?p(w)?T=w:d(w)?T=c(w):M?(k=!1,T=l(z,!0)):P?(k=!1,T=s(z,!0)):T=[]:y(z)||h(z)?(T=w,h(w)?T=x(w):g(w)&&!m(w)||(T=u(z))):k=!1}k&&(v.set(z,T),a(T,z,r,n,v),v.delete(z)),o(e,i,T)}}}(),a=tj(),n=rk(),o=rS();return i7=function l(s,c,u,h,p){s!==c&&i(c,function(i,n){if(p||(p=new e),a(i))r(s,c,n,u,l,h,p);else{var d=h?h(o(s,n),i,n+"",s,c,p):void 0;void 0===d&&(d=i),t(s,n,d)}},n)}}();return rx=(function(){if(rb)return r_;rb=1;var e=function(){if(rm)return rf;rm=1;var e=rE(),t=function(){if(rn)return ra;rn=1;var e=rr?ri:(rr=1,ri=function(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)}),t=Math.max;return ra=function(i,r,a){return r=t(void 0===r?i.length-1:r,0),function(){for(var n=arguments,o=-1,l=t(n.length-r,0),s=Array(l);++o<l;)s[o]=n[r+o];o=-1;for(var c=Array(r+1);++o<r;)c[o]=n[o];return c[r]=a(s),e(i,this,c)}}}(),i=function(){if(rd)return rp;rd=1;var e=function(){if(rc)return rs;rc=1;var e=rl?ro:(rl=1,ro=function(e){return function(){return e}}),t=tZ(),i=rE();return rs=t?function(i,r){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:i}();return rp=(function(){if(rh)return ru;rh=1;var e=Date.now;return ru=function(t){var i=0,r=0;return function(){var a=e(),n=16-(a-r);if(r=a,n>0){if(++i>=800)return arguments[0]}else i=0;return t.apply(void 0,arguments)}}})()(e)}();return rf=function(r,a){return i(t(r,a,e),r+"")}}(),t=function(){if(ry)return rg;ry=1;var e=tA(),t=iT(),i=rT(),r=tj();return rg=function(a,n,o){if(!r(o))return!1;var l=typeof n;return!!("number"==l?t(o)&&i(n,o.length):"string"==l&&n in o)&&e(o[n],a)}}();return r_=function(i){return e(function(e,r){var a=-1,n=r.length,o=n>1?r[n-1]:void 0,l=n>2?r[2]:void 0;for(o=i.length>3&&"function"==typeof o?(n--,o):void 0,l&&t(r[0],r[1],l)&&(o=n<3?void 0:o,n=1),e=Object(e);++a<n;){var s=r[a];s&&i(e,s,a,o)}return e})}})()(function(t,i,r){e(t,i,r)})}());let rP={flightsApi:{endpointUrl:"https://gqlr.flightaware.com/v1/graphql"},horde:{enabled:!0,url:"wss://horde.flightaware.com",reconnectAttempts:5,reconnectInterval:500},initialView:{longitude:-98.5795,latitude:39.8283,zoom:4,constrainBounds:!1,interactive:!0},globeView:{showBelowZoomLevel:0,rotationSpeed:0,fps:30},appearance:{padding:{left:90,right:90,top:50,bottom:80},scaleFactors:{datablock:1,track:1,airport:1,airplane:1,boundingBoxPadding:1},iconSize:1,iconStyles:{DARK:{fill:"#213356",stroke:"#00153D",blur:0},LIGHT:{fill:"#FFFFFF",stroke:"#00153D",blur:0},FOCUSED:{fill:"#858FA2",stroke:"#00153D",blur:0},NEARBY:{fill:"#858FA2",stroke:"#00153D",blur:0},UNKNOWN:{fill:"rgba(255, 255, 255, 0.5)",stroke:"#00153D",blur:0},ARRIVED:{fill:"#0DFEFE",stroke:"#00153D",blur:0},DEPARTED:{fill:"#AFFC41",stroke:"#00153D",blur:0},ESTIMATED:{fill:"#FE0DFE",stroke:"#00153D",blur:0},SHADOW:{fill:"#000000",stroke:"#000000",blur:1}},aircraftIcons:{AIRLINER:{size:[50,52],canBeStyled:!0,svg:'<svg alt="Airliner" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 26" width="25px" height="26px"><title>airliner</title><path  shape-rendering="geometricPrecision" class="test_svg"    stroke-location="outside" stroke-width=".5" d="M12.51,25.75c-.26,0-.74-.71-.86-1.41l-3.33.86L8,25.29l.08-1.41.11-.07c1.13-.68,2.68-1.64,3.2-2-.37-1.06-.51-3.92-.43-8.52v0L8,13.31C5.37,14.12,1.2,15.39,1,15.5a.5.5,0,0,1-.21,0,.52.52,0,0,1-.49-.45,1,1,0,0,1,.52-1l1.74-.91c1.36-.71,3.22-1.69,4.66-2.43a4,4,0,0,1,0-.52c0-.69,0-1,0-1.14l.25-.13H7.16A1.07,1.07,0,0,1,8.24,7.73,1.12,1.12,0,0,1,9.06,8a1.46,1.46,0,0,1,.26.87L9.08,9h.25c0,.14,0,.31,0,.58l1.52-.84c0-1.48,0-7.06,1.1-8.25a.74.74,0,0,1,1.13,0c1.15,1.19,1.13,6.78,1.1,8.25l1.52.84c0-.32,0-.48,0-.58l.25-.13H15.7A1.46,1.46,0,0,1,16,8a1.11,1.11,0,0,1,.82-.28,1.06,1.06,0,0,1,1.08,1.16V9c0,.19,0,.48,0,1.17a4,4,0,0,1,0,.52c1.75.9,4.4,2.29,5.67,3l.73.38a.9.9,0,0,1,.5,1,.55.55,0,0,1-.5.47h0l-.11,0c-.28-.11-4.81-1.49-7.16-2.2H14.06v0c.09,4.6-.06,7.46-.43,8.52.52.33,2.07,1.29,3.2,2l.11.07L17,25.29l-.33-.09-3.33-.86c-.12.7-.6,1.41-.86,1.41h0Z"/></svg>'}
53,BALLOON:{size:[18,26],rotation:0,canBeStyled:!0,svg:'<svg alt="Balloon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 13" width="9px" height="13px"><title>balloon</title><path  shape-rendering="geometricPrecision"    stroke-location="outside" stroke-width=".5" d="M3.56,12.75a.49.49,0,0,1-.46-.34L2.63,11a.51.51,0,0,1,.07-.44l.1-.1-2-3.68a.48.48,0,0,1-.05-.17,4.39,4.39,0,0,1-.48-2A4.29,4.29,0,0,1,4.5.25,4.29,4.29,0,0,1,8.75,4.58a4.39,4.39,0,0,1-.48,2,.45.45,0,0,1-.05.17l-2,3.68a.44.44,0,0,1,.1.1.51.51,0,0,1,.07.45L5.9,12.41a.49.49,0,0,1-.46.34Zm1.6-2.43L6.1,8.59A4.22,4.22,0,0,1,5,8.88v1.44ZM4,10.32V8.88A4.22,4.22,0,0,1,2.9,8.59l.94,1.73Z"/></svg>'},CESSNA:{size:[34,26],canBeStyled:!0,svg:'<svg alt="Cessna" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 13" width="17px" height="13px"><title>cessna</title><path   shape-rendering="geometricPrecision"    stroke-location="outside" stroke-width=".5" d="M8.51,12.75c-.17,0-2-.27-2.56-.35A.41.41,0,0,1,5.6,12V10.87a.41.41,0,0,1,.32-.4l1.81-.37L7.36,6.64H4.75L.6,6a.41.41,0,0,1-.35-.41V4a.41.41,0,0,1,.38-.41l4.09-.28h2.6v-.4l.25,0-.24-.08c0-.21.1-.76.12-1.06A.9.9,0,0,1,8,.94L8.12.54A.41.41,0,0,1,8.5.25a.4.4,0,0,1,.39.29L9,.95a.91.91,0,0,1,.53.75c0,.33.11,1,.13,1.11v.46h2.57l4.12.28a.41.41,0,0,1,.38.41V5.63A.41.41,0,0,1,16.4,6l-4.1.59H9.64L9.26,10.1l1.81.36a.41.41,0,0,1,.32.4V12a.41.41,0,0,1-.34.41c-.56.08-2.37.35-2.55.35Z"/></svg>'},HEAVY2E:{size:[60,70],canBeStyled:!0,svg:'<svg alt="2 Engine Heavy Airplane" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 29" width="28px" height="29px" ><title>heavy_2e_</title><path   shape-rendering="geometricPrecision"    stroke-location="outside" stroke-width=".5"  d="M9,28.35c0-.16-.17-1,.23-1.36.65-.59,2.82-2.38,3.4-2.86-.51-1.33-.59-5.15-.57-8.22L10,16,.25,19v-.34a1.78,1.78,0,0,1,.82-1.5l7.78-5.07a4.87,4.87,0,0,1-.51-3l0-.22.23,0h2.26l0,.22a8.32,8.32,0,0,1,0,1.81l1.21-.81c0-6.79.18-9.58,1.91-9.87,1.7.14,2,3,2,9.85L17.3,11a8.3,8.3,0,0,1,0-1.8l0-.22h2.51v.24a4.87,4.87,0,0,1-.51,3l7.66,5a1.77,1.77,0,0,1,.8,1.5V19L18,16l-2-.06c0,3.06-.06,6.88-.57,8.21a28.87,28.87,0,0,1,3.5,3A2,2,0,0,1,19,28.34l-.05.31L14.6,26.71c-.14,1.85-.41,1.85-.6,1.85s-.47,0-.6-1.84L9,28.66Z"/></svg>'},HEAVY4E:{size:[56,60],canBeStyled:!0,svg:'<svg alt="4 Engine Heavy Airplane" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 30" width="28px" height="30px" ><title>heavy_4e</title><path   shape-rendering="geometricPrecision"    stroke-location="outside" stroke-width=".5"  d="M14,29.62c-.23,0-.52-.16-.71-1.33L8.82,29.58V28l3.56-3.52c-.41-1.51-.4-7.57-.4-9.11L8.46,16.59,1.27,20.76l-1,1.68,0-.91c0-2.28.23-2.45.3-2.52s.59-.51,3.5-3.09A10.47,10.47,0,0,1,4,13l0-.22.23,0H6.16v.23a11.63,11.63,0,0,1,0,1.26c.74-.68,1.36-1.28,1.69-1.61a9.54,9.54,0,0,1-.16-3.15l0-.22.23-.05H9.87v.23a11.49,11.49,0,0,1,0,1.31l.87-.84c.67-.66,1.06-1,1.27-1.19,0-6.24.53-8.46,2-8.46,1.23,0,2,1.42,2,8.46.21.17.59.53,1.27,1.19l.88.85a11.45,11.45,0,0,1,0-1.32V9.19h2.18v.24a9.53,9.53,0,0,1-.15,3.18c.33.32.95.93,1.69,1.61a11.5,11.5,0,0,1,0-1.27v-.23H24V13a10.49,10.49,0,0,1-.1,3L27.4,19c.09.09.28.26.32,2.54l0,.91-1-1.68L19.5,16.5
537,16,15.34c0,1.53.07,7.49-.39,9.11L19.18,28v1.61l-4.46-1.29C14.52,29.46,14.23,29.62,14,29.62Z"/></svg>'},HELICOPTER:{size:[32,36],canBeStyled:!0,svg:'<svg alt="Helicopter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 18" width="16px" height="18px" ><title>helicopter</title><path   shape-rendering="geometricPrecision"    stroke-location="outside" stroke-width=".5"  d="M8,17.75c-1.38,0-2.46-.63-2.46-1.43,0-.6.58-1.1,1.49-1.32V12.06A5.27,5.27,0,0,1,6,9.53L1.1,13.6l-.75-1L5.78,8.09c0-.25,0-.51,0-.77a12.28,12.28,0,0,1,.09-1.49L.38,1.24l.7-.89,5,4.2C6.48,3,7.17,2.1,8,2.1s1.52,1,1.91,2.57l5-4.21.75,1L10.1,6.07a12.4,12.4,0,0,1,.06,1.24c0,.22,0,.44,0,.65l5.47,4.59-.7.89L10,9.31a8.44,8.44,0,0,1-.35,1.4,3.83,3.83,0,0,1-.55,1.11L9,12v3c.91.22,1.49.72,1.49,1.32C10.46,17.12,9.38,17.75,8,17.75Z"/></svg>'},HIPERF:{size:[30,42],canBeStyled:!0,svg:'<svg alt="High Performance Airplane" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 21" width="15px" height="21px" ><title>hi_perf_live</title><path   shape-rendering="geometricPrecision"    stroke-location="outside" stroke-width=".5"  d="M3.14,20.76v-1.6l2.57-1.7V16.1H.26V12.25H1.61v1.17L5.28,9.9c.14-1.16,1-8.19,2-9.3L7.5.38l.2.22c1,1.12,1.89,8.14,2,9.3l3.67,3.52V12.25h1.35V16.1H9.29v1.35l2.57,1.7v1.6Z"/></svg>'},JET_NONSWEPT:{size:[36,36],canBeStyled:!0,svg:'<svg alt="Non-swept wing jet" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18px" height="18px" ><title>jet_nonswept</title><path   shape-rendering="geometricPrecision"    stroke-location="outside" stroke-width=".5"  d="M9,17.09l-3.51.61v-.3c0-.65.11-1,.33-1.09L8.5,15a5.61,5.61,0,0,1-.28-1.32l-.53-.41-.1-.69H7.12l0-.21a7.19,7.19,0,0,1-.15-2.19L.24,9.05V8.84c0-1.1.51-1.15.61-1.15L7.8,7.18V2.88C7.8.64,8.89.3,8.93.28L9,.26l.07,0s1.13.36,1.13,2.6v4.3l7,.51c.09,0,.59.06.59,1.15v.21l-6.69,1.16a7.17,7.17,0,0,1-.15,2.19l0,.21h-.47l-.1.69-.53.41A5.61,5.61,0,0,1,9.5,15l2.74,1.28c.2.07.31.43.31,1.08v.3Z"/></svg>'},JET_SWEPT:{size:[36,48],canBeStyled:!0,svg:'<svg alt="Swept-wing jet" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 24" width="18px" height="24" ><title>jet_swept</title><path   shape-rendering="geometricPrecision"    stroke-location="outside" stroke-width=".5"  d="M9.44,23c-.1.6-.35.6-.44.6s-.34,0-.44-.6l-3,.67V22.6A.54.54,0,0,1,6,22.05l2.38-1.12L8,19.33H6.69l0-.2a8.23,8.23,0,0,1-.14-3.85l.06-.18H7.73V13.19h-2L.26,14.29v-.93c0-.28.07-.46.22-.53l7.25-3.6V3.85A4.47,4.47,0,0,1,8.83.49L9,.34l.17.15a4.47,4.47,0,0,1,1.1,3.36V9.23l7.25,3.6c.14.07.22.25.22.53v.93l-5.51-1.1h-2V15.1h1.17l.06.18a8.24,8.24,0,0,1-.15,3.84l0,.2H10l-.36,1.6,2.43,1.14a.52.52,0,0,1,.35.53v1.08Z"/></svg>'},TWIN_LARGE:{size:[42,40],canBeStyled:!0,svg:'<svg alt="Large twin engine airplane" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 20" width="21px" height="20px" ><title>twin_large</title><path   shape-rendering="geometricPrecision"    stroke-location="outside" stroke-width=".5"  d="M10.1,18.34H7l0-.21c-.08-.54,0-.87.11-1L7.19,17l.2,0,2.35-.33c-.16-.82-.42-2.9-.42-3.14s0-2.71,0-3.51H8c-.12,1.34-.41,1.36-.55,1.37h0c-.19,0-.46,0-.6-1.55L.27,9.52l0-.25c.06-.73.31-.9.45-.93l6-.48a3.65,3.65,0,0,1,.3-2,.45.45,0,0,1,.32-.16h0a.39.39,0,0,1,.3.12A3.67,3.67,0,0,1,8,7.77l1.26-.07c0-.71,0-2.92,0-4.48A3.84,3.84,0,0,1,10.1.4a.4.4,0,0,1,.28-.16h.23A.4.4,0,0,1,10.9.4a3.84,3.84,0,0,1,.87,2.81c0,1.55,0,3.77,0,4.48L13,7.77a3.67,3.67,0,0,1,.29-1.94.38.38,0,0,1,.28-.12.46.46,0,0,1,.34.16,3.66,3.66,0,0,1,.3,2l6,.48c.18,0,.43.21.49.94l0,.25-6.53.3c-.14,1.55-.42,1.55-.59,1.55s-.45,0-.57-1.37H11.74c0,.8,0,3.27,0,3.51s-.26,2.32-.42,3.14l2.38.34h.11l.13.13c.15.18.19.51.11,1l0,.21H10.9l-.4,1Z"/></svg>'},TWIN_SMALL:{size:[38,32],canBeStyled:!0,svg:'<svg alt="Small twin engine airplane" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 16" width="19px" height="16px" ><title>twin_small</title><path   shape-rendering="geometricPrecision"    stroke-location="outside" stroke-width=".5"  d="M9.5,15.75c-.21,0-.34-.17-.41-.51l-2.88.23v-.27c0-.78,0-1.11.28-1.13L9,13.1c-.31-1.86-.55-5-.59-5.55l
53-.08-.09H6.08L.25,6.54v-1A.43.43,0,0,1,.67,5l3.75-.27L5,4.45V3.53H4.73V2.7a.35.35,0,0,1,.34-.35h.07c.12-.52.26-.83.54-.83s.42.31.53.83h.07a.35.35,0,0,1,.34.35v.83H6.36v1l2-.08C8.42.81,9.09.25,9.49.25s1.09.55,1.12,4.21l2,.08v-1h-.25V2.7a.35.35,0,0,1,.34-.35h.07c.12-.52.26-.83.53-.83s.42.31.54.83h.07a.35.35,0,0,1,.34.35v.83H14v.92l.57.32L18.32,5a.42.42,0,0,1,.43.46v1L13,7.46H10.71l-.08.09c0,.56-.27,3.68-.59,5.55l2.46,1c.28,0,.28.35.28,1.13v.27l-2.88-.23C9.84,15.58,9.71,15.75,9.5,15.75Z"/></svg>'},UNKNOWN:{size:[34,34],canBeStyled:!0,svg:'<svg alt="Unknown airplane" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17" width="17px" height="17px" ><title>unknown</title><path   shape-rendering="geometricPrecision"    stroke-location="outside" stroke-width=".5"  d="M5.25,16.76c-.92,0-1.33-.46-1.39-.86a1,1,0,0,1,.79-1.11c.25-.08,1.22-.43,2.63-1V10.65h-6c-.68,0-1-.35-1-.66a.81.81,0,0,1,.6-.86C1.14,9,4.8,7,7.28,5.63V3c0-1.11.44-2.71,1.23-2.71S9.77,1.84,9.77,3V5.63C12.22,7,15.87,9,16.14,9.13a.8.8,0,0,1,.61.86c-.05.31-.36.67-1.05.67H9.77v3.19l1.61.59,1,.36a1.05,1.05,0,0,1,.8,1.11c-.07.39-.47.86-1.39.86Z"/></svg>'}},showLayerSwitcher:!0,dataBlock:{style:"full",hideForSurfaceFlights:!1,rotateGroupCount:0,rotateDuration:3,enableDeconfliction:!0,deconflictionInterval:1e3,sampleAreaTop:61,sampleAreaRight:192,sampleAreaBottom:61,sampleAreaLeft:192,displayTimePriority:["estimated_in","estimated_on"],showOperatorLogo:!0,showRouteLine:!0,showTelemetryLine:!0,showLastUpdatedLine:!0},hideSurfaceFlights:!1,showBlockedFlights:!1},animation:{enabled:!0,framerateMode:"adaptive",fps:30,minGroundSpeed:40,maxGroundSpeed:1e3,maxTimeSinceLastPosition:7200,delay:0},tracks:{show:!0,smoothing:"cutsmooth",showProjectedTracks:!0,trailLength:0,showPositions:!1,minZoom:11},plannedRoutes:{show:!0},airportMarkers:{show:!0},ringLayerOptions:{enabled:!1,ringCount:3,ringSpacing:5,spacingUnits:"nauticalmiles",center:[0,0]},ctgLightningLayer:{enabled:!1,airportCodes:[],url:"https://skyapi.ovc.flightaware.com/premium/lightning-ctg/airport/{airportCode}.geojson",updateFrequency:60,iconSize:24,declutter:!1},baseLayer:"flightaware_classic",baseLayerOptions:{flightaware_classic:{styleURL:"https://skyapi.ovc.flightaware.com/tiles/vector/flightaware.json",fill:"light",attribution:'<a href="http://www.openstreetmap.org/copyright" rel="noopener noreferrer" target="_blank">&#169; OpenStreetMap</a>',sunlitEarthOptions:{beforeId:"populated-places-7-layer"}},flightaware_dark:{styleURL:"https://skyapi.ovc.flightaware.com/tiles/vector/flightaware-dark.json",fill:"light",attribution:'<a href="http://www.openstreetmap.org/copyright" rel="noopener noreferrer" target="_blank">&#169; OpenStreetMap</a>',sunlitEarthOptions:{opacity:.25,beforeId:"populated-places-7-layer"}},flightaware_monochrome_light:{styleURL:"https://skyapi.ovc.flightaware.com/tiles/vector/flightaware-monochrome-light.json",fill:"dark",attribution:'<a href="http://www.openstreetmap.org/copyright" rel="noopener noreferrer" target="_blank">&#169; OpenStreetMap</a>',sunlitEarthOptions:{beforeId:"populated-places-7-layer"}},flightaware_monochrome_dark:{styleURL:"https://skyapi.ovc.flightaware.com/tiles/vector/flightaware-monochrome-dark.json",fill:"light",attribution:'<a href="http://www.openstreetmap.org/copyright" rel="noopener noreferrer" target="_blank">&#169; OpenStreetMap</a>',sunlitEarthOptions:{opacity:.25,beforeId:"populated-places-7-layer"}},skyvector_vfr:{tileURL:"https://flightaware.com/images/tilecache/skyvector/301/{z}/{x}/{y}.jpg",fill:"dark",sunlitEarthOptions:{opacity:.1}},skyvector_ifr_low:{tileURL:"https://flightaware.com/images/tilecache/skyvector/302/{z}/{x}/{y}.jpg",fill:"dark",sunlitEarthOptions:{opacity:.1}},skyvector_ifr_high:{tileURL:"https://flightaware.com/images/tilecache/skyvector/304/{z}/{x}/{y}.jpg",fill:"dark",sunlitEarthOptions:{opacity:.1}},premium_satellite:{fill:"light",attribution:'&copy; <a href="https://stadiamaps.com/" target="_blank">Stadia Maps</a> &copy; CNES, Distribution Airbus DS, &copy; Airbus DS, &copy; PlanetObserver (Contains Copernicus Data)',sunlitEarthOptions:{opacity:.25}},premium_terrain:{fill:"dark",attribution:'&copy; <a href="https://stadiamaps.com/" target="_blank">Stadia Maps</a> &copy; <a href="https://openmaptiles.org/" target="_blank">
53OpenMapTiles</a> &copy; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> &copy; <a href="https://stamen.com/" target="_blank">Stamen Design</a>',sunlitEarthOptions:{beforeId:"airport-label"}},premium_streets:{fill:"dark",attribution:'&copy; <a href="https://stadiamaps.com/" target="_blank">Stadia Maps</a> &copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> &copy; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a>',sunlitEarthOptions:{beforeId:"airport-label-major"}},custom:{fill:"dark"}},dataLayerOptions:{aeris_radar:{id:"aeris-radar",enabled:!0,source:{id:"aeris-radar-source",type:"raster",tiles:["https://skyapi.ovc.flightaware.com/aeris/radar-global/{z}/{x}/{y}/{ts}@2x.png"],tileSize:512},layer:{type:"raster",id:"aeris-radar-layer",minzoom:2,maxzoom:8,source:"aeris-radar-source",layout:{visibility:"visible"},paint:{"raster-opacity":["interpolate",["exponential",.5],["zoom"],2,.45,6,.3,10,.25,13,0]}},pollingFrequency:900,maxAge:6048e5,beforeId:"z1"},lightning_flash:{id:"lightning-flash",enabled:!1,source:{id:"lightning-flash-source",type:"raster",tiles:["https://skyapi.ovc.flightaware.com/aeris/lightning-flash/{z}/{x}/{y}/{ts}@2x.png"],tileSize:512},layer:{type:"raster",id:"lightning-flash-layer",maxzoom:21,source:"lightning-flash-source",layout:{visibility:"visible"},paint:{"raster-opacity":["interpolate",["exponential",.5],["zoom"],2,.45,6,.3,10,.25,13,0]}},pollingFrequency:300,maxAge:6048e5,beforeId:"z2"}},sunlitEarthLayer:{enabled:!0,pointsPerTerminator:180},airportCodeFormat:"iata",airlineCodeFormat:"iata",fonts:{robotoUrl:"https://fonts.googleapis.com/css?family=Roboto:400,700",robotoMonoUrl:"https://fonts.googleapis.com/css?family=Roboto%20Mono:400,600"},rtlTextPluginUrl:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js",logo:{show:!0,position:"bottom-left",size:"large"},buttons:{zoomInAndOut:{show:!0},zoomReset:{show:!1},position:{top:"inherit",right:"10px",bottom:"46px",left:"inherit"}},interactivity:{flightSelection:{enabled:!0},flightHighlighting:{enabled:!0}},debugMode:!1},rI=(e,t)=>{if(""===e)return e;let i=new URL(e);return i.hostname.endsWith("stadiamaps.com")&&!i.searchParams.has("api_key")?(i.searchParams.append("api_key",t??""),decodeURI(i.href)):e},rA={type:"raster",tiles:[""]},rC=(e,t)=>rR(e,180,-180)&&rR(t,90,-90),rR=(e,t,i)=>null!=e&&e>=i&&e<=t,rL=(e,t,i)=>{let r=Math.round(((e,t)=>{let i=t/60,r=new Date(e);return r.setMilliseconds(1e3*Math.floor(r.getMilliseconds()/1e3)),r.setSeconds(60*Math.floor(r.getSeconds()/60)),r.setMinutes(Math.floor(r.getMinutes()/i)*i),Math.floor(r.valueOf())})(t,i)/1e3);return e.replace("/{ts}@",`/${r}@`)},rD=(0,r.createContext)(rP),rO=({config:e,children:t})=>{let[i,a]=(0,r.useState)(e);return(0,r.useEffect)(()=>{tP.isEqual(e,i)||(a(e),globalThis.mapDebugMode&&console.debug("MapConfigContext value updated"))},[e]),r.createElement(rD.Provider,{value:i},t)},rF=()=>(0,r.useContext)(rD);function rj(e){let t=e.indexOf(":");return t>0?e.substring(0,t):e}function rB(e){return e.data?.ids.ident}function rN(e,t){return e.flights.get(rj(t))}function rU(e,t,i){let r=rj(t),a=rB(i);if(void 0!==a){let t=e.identLookup.get(a);void 0===t?e.identLookup.set(a,new Set([r])):(t.add(r),globalThis.mapDebugMode&&t.size>1&&console.debug(`Duplicate flight found: ${a}`))}e.flights.set(r,i)}function rV(e){e.flights.clear(),e.identLookup.clear()}var r$=Symbol.for("immer-nothing"),rZ=Symbol.for("immer-draftable"),rG=Symbol.for("immer-state");function rq(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var rH=Object.getPrototypeOf;function rW(e){return!!e&&!!e[rG]}function rX(e){return!!e&&(rK(e)||Array.isArray(e)||!!e[rZ]||!!e.constructor?.[rZ]||r2(e)||r3(e))}var rY=Object.prototype.constructor.toString();function rK(e){if(!e||"object"!=typeof e)return!1;let t=rH(e);if(null===t)return!0;let i=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===rY}function rJ(e,t){0===rQ(e)?Reflect.ownKeys(e).forEach(i=>
53{t(i,e[i],e)}):e.forEach((i,r)=>t(r,i,e))}function rQ(e){let t=e[rG];return t?t.type_:Array.isArray(e)?1:r2(e)?2:3*!!r3(e)}function r1(e,t){return 2===rQ(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function r0(e,t,i){let r=rQ(e);2===r?e.set(t,i):3===r?e.add(i):e[t]=i}function r2(e){return e instanceof Map}function r3(e){return e instanceof Set}function r5(e){return e.copy_||e.base_}function r6(e,t){if(r2(e))return new Map(e);if(r3(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let i=rK(e);if(!0===t||"class_only"===t&&!i){let t=Object.getOwnPropertyDescriptors(e);delete t[rG];let i=Reflect.ownKeys(t);for(let r=0;r<i.length;r++){let a=i[r],n=t[a];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(t[a]={configurable:!0,writable:!0,enumerable:n.enumerable,value:e[a]})}return Object.create(rH(e),t)}{let t=rH(e);return null!==t&&i?{...e}:Object.assign(Object.create(t),e)}}function r4(e,t=!1){return r7(e)||rW(e)||!rX(e)||(rQ(e)>1&&(e.set=e.add=e.clear=e.delete=r8),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>r4(t,!0))),e}function r8(){rq(2)}function r7(e){return Object.isFrozen(e)}var r9,ae={};function at(e){let t=ae[e];return t||rq(0,e),t}function ai(e,t){t&&(at("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ar(e){aa(e),e.drafts_.forEach(ao),e.drafts_=null}function aa(e){e===r9&&(r9=e.parent_)}function an(e){return r9={drafts_:[],parent_:r9,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ao(e){let t=e[rG];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function al(e,t){t.unfinalizedDrafts_=t.drafts_.length;let i=t.drafts_[0];return void 0!==e&&e!==i?(i[rG].modified_&&(ar(t),rq(4)),rX(e)&&(e=as(t,e),t.parent_||au(t,e)),t.patches_&&at("Patches").generateReplacementPatches_(i[rG].base_,e,t.patches_,t.inversePatches_)):e=as(t,i,[]),ar(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==r$?e:void 0}function as(e,t,i){if(r7(t))return t;let r=t[rG];if(!r)return rJ(t,(a,n)=>ac(e,r,t,a,n,i)),t;if(r.scope_!==e)return t;if(!r.modified_)return au(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;let t=r.copy_,a=t,n=!1;3===r.type_&&(a=new Set(t),t.clear(),n=!0),rJ(a,(a,o)=>ac(e,r,t,a,o,i,n)),au(e,t,!1),i&&e.patches_&&at("Patches").generatePatches_(r,i,e.patches_,e.inversePatches_)}return r.copy_}function ac(e,t,i,r,a,n,o){if(rW(a)){let o=as(e,a,n&&t&&3!==t.type_&&!r1(t.assigned_,r)?n.concat(r):void 0);if(r0(i,r,o),!rW(o))return;e.canAutoFreeze_=!1}else o&&i.add(a);if(rX(a)&&!r7(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;as(e,a),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(i,r)||au(e,a)}}function au(e,t,i=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&r4(t,i)}var ah={get(e,t){if(t===rG)return e;let i=r5(e);if(!r1(i,t)){let r=af(i,t);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}let r=i[t];return e.finalized_||!rX(r)?r:r===ad(e.base_,t)?(ag(e),e.copy_[t]=ay(r,e)):r},has:(e,t)=>t in r5(e),ownKeys:e=>Reflect.ownKeys(r5(e)),set(e,t,i){let r=af(r5(e),t);if(r?.set)return r.set.call(e.draft_,i),!0;if(!e.modified_){let r=ad(r5(e),t),a=r?.[rG];if(a&&a.base_===i)return e.copy_[t]=i,e.assigned_[t]=!1,!0;if((i===r?0!==i||1/i==1/r:i!=i&&r!=r)&&(void 0!==i||r1(e.base_,t)))return!0;ag(e),am(e)}return e.copy_[t]===i&&(void 0!==i||t in e.copy_)||Number.isNaN(i)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=i,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==ad(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,ag(e),am(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let i=r5(e),r=Reflect.getOwnPropertyDescriptor(i,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:i[t]}:r},defineProperty(){rq(11)},getPrototypeOf:e=>rH(e.base_),setPrototypeOf(){rq(12)}},ap={};function ad(e,t){let i=e[rG];return(i?r5(i):e)[t]}function af(e,t){if(!(t in e))return;let i=rH(e);for(;i;){let e=Object.getOwnPropertyDescriptor(i,t);if(e)return e;i=rH(i)}}function am(e){e.modified_||(e.modified_=!0,e.parent_&&am(e.parent_))}function ag(e){e.copy_||(e.copy_=r6(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function ay(e,t){let i=r2(e)?at("MapSet").proxyMap_(e,t):r3(e)?at("MapSet").proxySet_(e,t):function(e,t){let i=Array.isArray(e),r={type_:+!!i,scope_:t?t.scope_:r9,modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},a=r,n=ah;i&&(a=[r],n=ap);let{revoke:o,proxy:l}=Proxy.revocable(a,n);return r.draft_=l,r.revoke_=o,l}(e,t);return(t?t.scope_:r9).drafts_.push(i),i}rJ(ah,(e,t)=>{ap[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ap.deleteProperty=function(e,t){return ap.set.call(this,e,t,void 0)},ap.set=function(e,t,i){return ah.set.call(this,e[0],t,i,e[0])};var a_=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,i)=>{let r;if("function"==typeof e&&"function"!=typeof t){let i=t;t=e;let r=this;return function(e=i,...a){return r.produce(e,e=>t.call(this,e,...a))}}if("function"!=typeof t&&rq(6),void 0!==i&&"function"!=typeof i&&rq(7),rX(e)){let a=an(this),n=ay(e,void 0),o=!0;try{r=t(n),o=!1}finally{o?ar(a):aa(a)}return ai(a,i),al(r,a)}if(!e||"object"!=typeof e){if(void 0===(r=t(e))&&(r=e),r===r$&&(r=void 0),this.autoFreeze_&&r4(r,!0),i){let t=[],a=[];at("Patches").generateReplacementPatches_(e,r,t,a),i(t,a)}return r}rq(1,e)},this.produceWithPatches=(e,t)=>{let i,r;return"function"==typeof e?(t,...i)=>this.produceWithPatches(t,t=>e(t,...i)):[this.produce(e,t,(e,t)=>{i=e,r=t}),i,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;rX(e)||rq(8),rW(e)&&(rW(t=e)||rq(10,t),e=function e(t){let i;if(!rX(t)||r7(t))return t;let r=t[rG];if(r){if(!r.modified_)return r.base_;r.finalized_=!0,i=r6(t,r.scope_.immer_.useStrictShallowCopy_)}else i=r6(t,!0);return rJ(i,(t,r)=>{r0(i,t,e(r))}),r&&(r.finalized_=!1),i}(t));let i=an(this),r=ay(e,void 0);return r[rG].isManual_=!0,aa(i),r}finishDraft(e,t){let i=e&&e[rG];i&&i.isManual_||rq(9);let{scope_:r}=i;return ai(r,t),al(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let i;for(i=t.length-1;i>=0;i--){let r=t[i];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}i>
53-1&&(t=t.slice(i+1));let r=at("Patches").applyPatches_;return rW(e)?r(e,t):this.produce(e,e=>r(e,t))}},ab=a_.produce;a_.produceWithPatches.bind(a_),a_.setAutoFreeze.bind(a_),a_.setUseStrictShallowCopy.bind(a_),a_.applyPatches.bind(a_),a_.createDraft.bind(a_),a_.finishDraft.bind(a_);var ax=function(){return(ax=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var av=new Map,aw=new Map,az=!0,aS=!1;function aT(e){return e.replace(/[\s,]+/g," ").trim()}function ak(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach(function(t,i){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[i+1]}),function(e){var t=aT(e);if(!av.has(t)){var i,r,a,n,o,l=(0,s.qg)(e,{experimentalFragmentVariables:aS,allowLegacyFragmentVariables:aS});if(!l||"Document"!==l.kind)throw Error("Not a valid GraphQL document.");av.set(t,((n=new Set((i=new Set,r=[],l.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var t,a=e.name.value,n=aT((t=e.loc).source.body.substring(t.start,t.end)),o=aw.get(a);o&&!o.has(n)?az&&console.warn("Warning: fragment with name "+a+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||aw.set(a,o=new Set),o.add(n),i.has(n)||(i.add(n),r.push(e))}else r.push(e)}),a=ax(ax({},l),{definitions:r})).definitions)).forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(t){var i=e[t];i&&"object"==typeof i&&n.add(i)})}),(o=a.loc)&&(delete o.startToken,delete o.endToken),a))}return av.get(t)}(r)}var aE,aM,aP,aI,aA,aC,aR,aL,aD,aO,aF,aj,aB,aN,aU,aV,a$,aZ,aG,aq,aH,aW,aX,aY,aK,aJ,aQ,a1,a0,a2,a3,a5,a6,a4,a8,a7,a9,ne,nt,ni,nr,na=ak;(aE=ak||(ak={})).gql=na,aE.resetCaches=function(){av.clear(),aw.clear()},aE.disableFragmentWarnings=function(){az=!1},aE.enableExperimentalFragmentVariables=function(){aS=!0},aE.disableExperimentalFragmentVariables=function(){aS=!1},ak.default=ak,function(e){e.Jet="JET",e.Piston="PISTON",e.Turboprop="TURBOPROP",e.Turboshaft="TURBOSHAFT",e.Unknown="UNKNOWN"}(aM||(aM={})),function(e){e.Airliner="AIRLINER",e.Balloon="BALLOON",e.Cessna="CESSNA",e.Heavy2E="HEAVY2E",e.Heavy4E="HEAVY4E",e.Helicopter="HELICOPTER",e.Hiperf="HIPERF",e.JetNonswept="JET_NONSWEPT",e.JetSwept="JET_SWEPT",e.TwinLarge="TWIN_LARGE",e.TwinSmall="TWIN_SMALL",e.Unknown="UNKNOWN"}(aP||(aP={})),function(e){e.Coown="COOWN",e.Corp="CORP",e.Gov="GOV",e.Individual="INDIVIDUAL",e.NonUsCoown="NON_US_COOWN",e.NonUsCorp="NON_US_CORP",e.Partnership="PARTNERSHIP",e.Unknown="UNKNOWN"}(aI||(aI={})),function(e){e.Iata="IATA",e.Icao="ICAO",e.Unknown="UNKNOWN"}(aA||(aA={})),function(e){e.AirlinesOnly="AirlinesOnly",e.Both="Both",e.GaOnly="GAOnly"}(aC||(aC={})),function(e){e.Iata="IATA",e.Icao="ICAO",e.Lid="LID",e.Unknown="UNKNOWN"}(aR||(aR={})),function(e){e.Decreasing="DECREASING",e.Increasing="INCREASING",e.Unknown="UNKNOWN"}(aL||(aL={})),function(e){e.AirportClosure="AIRPORT_CLOSURE",e.Arrival="ARRIVAL",e.Departure="DEPARTURE",e.GroundStop="GROUND_STOP",e.MassCancel="MASS_CANCEL",e.Unknown="UNKNOWN"}(aD||(aD={})),function(e){e.Count="COUNT",e.Icao="ICAO",e.Name="NAME"}(aO||(aO={})),function(e){e.Count="COUNT",e.Iata="IATA",e.Icao="ICAO",e.Name="NAME"}(aF||(aF={})),function(e){e.Private="PRIVATE",e.Public="PUBLIC"}(aj||(aj={})),function(e){e.Friday="FRIDAY",e.Monday="MONDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e.Thursday="THURSDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY"}(aB||(aB={})),function(e){e.Off="OFF",e.Out="OUT"}(aN||(aN={})),function(e){e.FutureOverPast="FUTURE_OVER_PAST",e.PastOverFuture="PAST_OVER_FUTURE"}(aU||(aU={})),function(e){e.Iata="IATA",e.IataIcao="IATA_ICAO",e.Icao="ICAO",e.IcaoIata="ICAO_IATA"}(aV||(aV={})),function(e){e.T12="T12",e.T24="T24"}(a$||(a$={})),function(e){e.FlightTz="FLIGHT_TZ",e.LocalTz="LOCAL_TZ"}(aZ||(aZ={})),function(e){e.Daily="DAILY",e.Monthly="MONTHLY",e.Never="NEVER",e.Weekly="WEEKLY"}(aG||(aG={})),function(e){e.All="ALL",e.Commercial="COMMERCIAL",e.Ga="GA"}(aq||(aq={})),function(e){e.Airport="AIRPORT",e.Custom="CUSTOM",e.Fleet="FLEET"}(aH||(aH={})),function(e){e.TimesOffOn="TIMES_OFF_ON",e.TimesOutIn="TIMES_OUT_IN"}(aW||(aW={})),function(e){e.Arrived="ARRIVED",e.Cancelled="CANCELLED",e.Enroute="ENROUTE",e.Fru="FRU",e.Scheduled="SCHEDULED"}(aX||(aX={})),function(e){e.Actual="ACTUAL",e.CoalesceActEstSch="COALESCE_ACT_EST_SCH",e.Estimated="ESTIMATED",e.Scheduled="SCHEDULED"}(aY||(aY={})),function(e){e.Callsign="CALLSIGN",e.Registration="REGISTRATION",e.Unspecified="UNSPECIFIED"}(aK||(aK={})),function(e){e.In="IN",e.Off="OFF",e.On="ON",e.Out="OUT"}(aJ||(aJ={})),function(e){e.Adsb="ADSB",e.Asdex="ASDEX",e.Datalink="DATALINK",e.Mlat="MLAT",e.Oceanic="OCEANIC",e.Projected="PROJECTED",e.Radar="RADAR",e.Space="SPACE",e.Unknown="UNKNOWN",e.Virtual="VIRTUAL"}(aQ||(aQ={}
53)),function(e){e.Ascending="ASCENDING",e.Descending="DESCENDING"}(a1||(a1={})),function(e){e.Arrivals="Arrivals",e.Departures="Departures",e.Enroute="Enroute",e.Scheduled="Scheduled"}(a0||(a0={})),function(e){e.City="CITY",e.Iata="IATA",e.Icao="ICAO",e.Name="NAME"}(a2||(a2={})),function(e){e.PositionsAsc="POSITIONS_ASC",e.PositionsDesc="POSITIONS_DESC",e.SecondsAsc="SECONDS_ASC",e.SecondsDesc="SECONDS_DESC"}(a3||(a3={})),function(e){e.Default="DEFAULT",e.Ft="FT",e.M="M"}(a5||(a5={})),function(e){e.Km="KM",e.Nm="NM",e.Sm="SM"}(a6||(a6={})),function(e){e.Default="DEFAULT",e.Kph="KPH",e.Kts="KTS",e.Mph="MPH"}(a4||(a4={})),function(e){e.Default="DEFAULT",e.Gallons="GALLONS",e.Liters="LITERS"}(a8||(a8={})),function(e){e.NoAircraft="NO_AIRCRAFT",e.PistonSingle="PISTON_SINGLE",e.PistonTwinMulti="PISTON_TWIN_MULTI",e.TurbofanJet="TURBOFAN_JET",e.TurbopropSingle="TURBOPROP_SINGLE",e.TurbopropTwinMulti="TURBOPROP_TWIN_MULTI"}(a7||(a7={})),function(e){e.Accounting="ACCOUNTING",e.AeroDefense="AERO_DEFENSE",e.AgMining="AG_MINING",e.ArchDesign="ARCH_DESIGN",e.ArtsEntertainment="ARTS_ENTERTAINMENT",e.Automotive="AUTOMOTIVE",e.Aviation="AVIATION",e.ComputersSwTech="COMPUTERS_SW_TECH",e.Construction="CONSTRUCTION",e.Consulting="CONSULTING",e.EdSchoolsAcademia="ED_SCHOOLS_ACADEMIA",e.EnergyUtilitiesFuelChem="ENERGY_UTILITIES_FUEL_CHEM",e.Engineering="ENGINEERING",e.FinanceBankingBrokerage="FINANCE_BANKING_BROKERAGE",e.GovDiplomatic="GOV_DIPLOMATIC",e.Healthcare="HEALTHCARE",e.Homemaker="HOMEMAKER",e.ImportExportTrade="IMPORT_EXPORT_TRADE",e.InfoMgmtLibrary="INFO_MGMT_LIBRARY",e.Insurance="INSURANCE",e.LawEnforcement="LAW_ENFORCEMENT",e.Legal="LEGAL",e.Manufacturing="MANUFACTURING",e.MediaPubBroadcasting="MEDIA_PUB_BROADCASTING",e.Military="MILITARY",e.MktgAdCommunicationsPr="MKTG_AD_COMMUNICATIONS_PR",e.NonProfitAssociations="NON_PROFIT_ASSOCIATIONS",e.Other="OTHER",e.PharmaBiotech="PHARMA_BIOTECH",e.RealEstatePropertyMgmt="REAL_ESTATE_PROPERTY_MGMT",e.RecruitingStaffingHr="RECRUITING_STAFFING_HR",e.ReligiousInstitutions="RELIGIOUS_INSTITUTIONS",e.ResearchAndDeveleopment="RESEARCH_AND_DEVELEOPMENT",e.Retail="RETAIL",e.Retired="RETIRED",e.SocialServices="SOCIAL_SERVICES",e.Student="STUDENT",e.Telecom="TELECOM",e.TranspoLogistics="TRANSPO_LOGISTICS",e.TravelHospitalityService="TRAVEL_HOSPITALITY_SERVICE",e.Wholesale="WHOLESALE"}(a9||(a9={})),function(e){e.BasicUser="BASIC_USER",e.CharterMember="CHARTER_MEMBER",e.CommercialPlusSubscriber="COMMERCIAL_PLUS_SUBSCRIBER",e.CommercialSubscriber="COMMERCIAL_SUBSCRIBER",e.EnterprisePlusUser="ENTERPRISE_PLUS_USER",e.EnterpriseUser="ENTERPRISE_USER",e.EnterpriseWxUser="ENTERPRISE_WX_USER",e.FboToolbox="FBO_TOOLBOX",e.FlightawareAdmin="FLIGHTAWARE_ADMIN",e.FlightawareStaff="FLIGHTAWARE_STAFF",e.FoundingMember="FOUNDING_MEMBER",e.PremiumPlusUser="PREMIUM_PLUS_USER",e.PremiumUser="PREMIUM_USER",e.StaffWriter="STAFF_WRITER",e.Translator="TRANSLATOR",e.Vip="VIP"}(ne||(ne={})),function(e){e.Atp="ATP",e.Commercial="COMMERCIAL",e.NoLicense="NO_LICENSE",e.Private="PRIVATE",e.PrivateIfr="PRIVATE_IFR",e.Recreational="RECREATIONAL",e.Sport="SPORT",e.Student="STUDENT"}(nt||(nt={})),function(e){e.AccountantAuditor="ACCOUNTANT_AUDITOR",e.AdminClerical="ADMIN_CLERICAL",e.AircraftLaborOps="AIRCRAFT_LABOR_OPS",e.AircraftLogOps="AIRCRAFT_LOG_OPS",e.Analyst="ANALYST",e.Architect="ARCHITECT",e.ArtistMusicianActorEntertainer="ARTIST_MUSICIAN_ACTOR_ENTERTAINER",e.BrokerTraderAdvisor="BROKER_TRADER_ADVISOR",e.CeoPresidentChair="CEO_PRESIDENT_CHAIR",e.CfoCooCtoCioCmo="CFO_COO_CTO_CIO_CMO",e.ComputerProItIs="COMPUTER_PRO_IT_IS",e.Consultant="CONSULTANT",e.DoctorDentist="DOCTOR_DENTIST",e.EducatorTeacher="EDUCATOR_TEACHER",e.Engineer="ENGINEER",e.GovOfficial="GOV_OFFICIAL",e.HealthcareWorker="HEALTHCARE_WORKER",e.Homemaker="HOMEMAKER",e.Lawyer="LAWYER",e.ManagerSupervisor="MANAGER_SUPERVISOR",e.Military="MILITARY",e.Other="OTHER",e.PartnerPrincipalOwner="PARTNER_PRINCIPAL_OWNER",e.Pilot="PILOT",e.ProfessorResearcher="PROFESSOR_RESEARCHER",e.Retired="RETIRED",e.SalesMgrAccountExec="SALES_MGR_ACCOUNT_EXEC",e.Scientist="SCIENTIST",e.SelfEmployed="SELF_EMPLOYED",e.ServiceProvider="SERVICE_PROVIDER",e.SkilledLaborer="SKILLED_LABORER",e.Student="STUDENT",e.Technician="TECHNICIAN",e.VpSvpEvp="VP_SVP_EVP",e.WriterEditor="WRITER_EDITOR"}(ni||(ni={})),function(e){e.Disabled="DISABLED",e.FullName="FULL_NAME",e.UsernameOnly="USERNAME_ONLY"}(nr||(nr={}));let nn=ak`
54    fragment FlightInfo on Flight {
55        data {
56            id
57            ids {
58                iata
59                icao
60                ident
61            }
62            origin {
63                name
64                iata
65                icao
66                lid
67                location
68                latlon
69                tz
70                boundingBox {
71                    bottomRight
72                    topLeft
73                }
74            }
75            destination {
76                name
77                iata
78                icao
79                lid
80                location
81                latlon
82                tz
83                boundingBox {
84                    bottomRight
85                    topLeft
86                }
87            }
88            times {
89                estimated {
90                    out
91                    off
92                    on
93                    in
94                }
95                actual {
96                    out
97                    off
98                    on
99                    in
100                }
101                scheduled {
102                    out
103                    off
104                    on
105                    in
106                }
107            }
108            status
109            aircraft {
110                code
111                icon
112                manufacturer
113                registration
114            }
115            airline {
116                fullName
117                shortName
118                icao
119                iata
120            }
121        }
122        planList
123    }
124`,no=ak`
125    fragment FlightTrack on Flight {
126        trackList(limitOptions: $limitOptions) {
127            latitude
128            longitude
129            clock
130            gs
131            heading
132            altitude
133            type
134        }
135    }
136`,nl=ak`
137    fragment FullFlightTrack on Flight {
138        trackList {
139            latitude
140            longitude
141            clock
142            gs
143            heading
144            altitude
145            type
146        }
147    }
148`;ak`
149    fragment InflightFlightInfo on Flight {
150        data {
151            id
152            ids {
153                iata
154                icao
155                ident
156            }
157            origin {
158                iata
159                icao
160                lid
161                location
162                latlon
163                tz
164            }
165            destination {
166                iata
167                icao
168                lid
169                location
170                latlon
171                tz
172            }
173            times {
174                estimated {
175                    out
176                    off
177                    on
178                    in
179                }
180                actual {
181                    out
182                    off
183                    on
184                    in
185                }
186                scheduled {
187                    out
188                    off
189                    on
190                    in
191                }
192            }
193            status
194            aircraft {
195                code
196                icon
197                manufacturer
198            }
199            airline {
200                fullName
201                shortName
202                icao
203                iata
204            }
205        }
206        planList
207    }
208`,ak`
209    query getAirportInfo($airportId: AirportCode!) {
210        airport(id: $airportId) {
211            airport {
212                id
213                iata
214                icao
215                lid
216                boundingBox {
217                    topLeft
218                    bottomRight
219                }
220            }
221        }
222    }
223`,ak`
224    query GetFlightByIdent($ident: String!, $departure: DepartureTime) {
225        flightByIdent(ident: $ident, departure: $departure) {
226            id
227            ...FlightInfo
228            ...FullFlightTrack
229            planList
230        }
231    }
232    ${nn}
233    ${nl}
234`;let ns=ak`
235    query getFlightsByBox(
236        $box: BoundingBoxInput!
237        $options: FlightsByBoundingBoxOptions
238        $limitOptions: TrackLimitOptions
239    ) {
240        flightsByBoundingBox(box: $box, options: $options) {
241            id
242            ...FlightInfo
243            ...FlightTrack
244            planList
245        }
246    }
247    ${nn}
248    ${no}
249`;function nc(e){return e*Math.PI/180}function nu(e){return 180*e/Math.PI}function nh(e){return 1.852*e/3600}function np(e){return 1.1507794*e}
249function nd(e){return 3600*e/1.852}function nf(e){return Math.pow(Math.sin(e/2),2)}function nm(e,t,i,r){let a=nf(i-e)+Math.cos(e)*Math.cos(i)*nf(r-t);return 2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))*6371}function ng(e,t,i,r){let a=Math.asin(Math.sin(e)*Math.cos(r/6371)+Math.cos(e)*Math.sin(r/6371)*Math.cos(i));return{lat:a,lon:t+Math.atan2(Math.sin(i)*Math.sin(r/6371)*Math.cos(e),Math.cos(r/6371)-Math.sin(e)*Math.sin(a))}}function ny(e,t,i,r){let a=nc(e),n=nc(t),o=nc(i),l=nc(r);return(nu(Math.atan2(Math.sin(l-n)*Math.cos(o),Math.cos(a)*Math.sin(o)-Math.sin(a)*Math.cos(o)*Math.cos(l-n)))+360)%360}function n_(e,t,i,r){return(ny(i,r,e,t)+180)%360}function nb(e,t,i,r){let a=r-t;if(180>=Math.abs(a))return null;let n=Math.sign(t);return e+(t-180*n)/(-a-360*n)*(i-e)}function nx(e){let t=e%360;return t>180?t-=360:t<-180&&(t+=360),t}function nv(e,t){let i=nc(t);return[e*Math.cos(i)+e*Math.sin(i),-e*Math.sin(i)+e*Math.cos(i)]}!function(e){e.Arrived="ARRIVED",e.Cancelled="CANCELLED",e.Enroute="ENROUTE",e.Fru="FRU",e.Scheduled="SCHEDULED",e.TaxiingOut="TAXIING_OUT",e.TaxiingIn="TAXIING_IN"}(lh||(lh={})),function(e){e.Increasing="increasing",e.Decreasing="decreasing",e.Unchanged="unchanged"}(lp||(lp={})),function(e){e.TracksNxt="tracksnxt",e.Horde="horde"}(ld||(ld={}));let nw=e=>{if("number"==typeof e)return e<0?300:e};Object.freeze({__proto__:null,EARTH_EQUATORIAL_RADIUS_M:6378137,EARTH_MEAN_RADIUS_KM:6371,MILE_TO_KILOMETER:1.60934,NAUTICAL_MILE_TO_KILOMETER:1.852,NAUTICAL_MILE_TO_MILE:1.1507794,bearing:ny,bearingDistanceEndpoint:ng,degToRad:nc,finalBearing:n_,getFourthQuadrantOffset:nv,greatCircleDistance:nm,haversine:nf,idlCrossingLat:nb,knotsToKps:nh,knotsToMph:np,kpsToKnots:nd,kpsToMph:function(e){return 3600*e/1.60934},mphToKps:function(e){return 1.60934*e/3600},normalizeLongitude:nx,radToDeg:nu,roundTo:(e,t)=>Math.round(e*10**t)/10**t,validateTrailLength:nw});let nz=e=>{e.filter(e=>null==e.source).forEach(e=>e.source=ld.TracksNxt);let t=e.at(-1);if(void 0!==t&&!Object.isFrozen(t)){if(void 0===t.verticalTrend&&(t.verticalTrend=nS(e)),null==t.altitude)for(let i=e.length-1;i>=0;i--){let r=e[i];if(null!=r.altitude){t.altitude=r.altitude;break}}if(null==t.gs&&(t.gs=nT(e)),null==t.heading&&(t.heading=nk(e)),e.every(e=>0===e.heading)){let i=nk(e);null!=i&&i>=5&&i<=355&&(t.heading=i)}}},nS=e=>{let t=e.at(-1)?.altitude??null,i=e.at(-2)?.altitude??null;return null===t||null===i?null:t===i?lp.Unchanged:t>i?lp.Increasing:lp.Decreasing},nT=e=>{if(e.length<=1)return null;let t=e[e.length-1],i=e[e.length-2];return t.clock===i.clock?null:Math.round(nd(nm(nc(i.latitude),nc(i.longitude),nc(t.latitude),nc(t.longitude))/Math.abs(t.clock-i.clock)))},nk=e=>{if(e.length<=1)return null;let t=e[e.length-1],i=e[e.length-2];return Math.round(n_(i.latitude,i.longitude,t.latitude,t.longitude))};function nE(e,t){if(null==e)return t??null;if(void 0===t)return e;if(null===t)return null;let i=t?.at(-1),r=e.filter(e=>e.source===ld.Horde&&(void 0===i||e.clock>i.clock));return t.concat(r)}let nM=(e,t,i)=>{let r=((e,t,i)=>{let r=e.data?.status??null,a=t-(e.lastHordePosition?.clock??-1/0),n=r;switch(r){case lh.Scheduled:e.trackList?.length&&(n=lh.TaxiingOut);break;case lh.Arrived:{let r=nI(e.data?.times.actual.on),o=nI(e.data?.times.actual.in);(a<300||!i&&null===o&&t-(r??-1/0)<3600)&&(n=lh.TaxiingIn);break}default:n=r}return n})(e,t,i);return r===lh.Enroute||r===lh.TaxiingIn||r===lh.TaxiingOut},nP=(e,t=100)=>{let i=[lh.Cancelled,lh.Fru],r=[lh.Arrived,lh.TaxiingIn,lh.TaxiingOut,lh.Scheduled],a=e.trackList?.at(-1);if(a&&null!=a.airground)return a.airground;if(e.data?.status){if(i.includes(e.data.status))return;if(r.includes(e.data.status))return!1}let n=a?.gs;return!(null!=n&&n<t)&&void 0},nI=e=>{if(null==e)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:Math.floor(t/1e3)},nA=(e,t,i)=>{for(let r of t){let t=function(e,t,i){let r={...t};return void 0!==t.trackList&&(r.trackLastUpdated=i),null!=t.data&&(r.data={...t.data,lastUpdated:i}),null!=e?(r.isAirborne=e.isAirborne,r.trackList=nC(t,nE(e.trackList,t.trackList)),r.lastHordePosition=e.lastHordePosition,void 0===r.planList&&void 0!==e.planList&&(r.planList=e.planList)):r.trackList=nC(t,t.trackList),r}(rN(e,r.id)??null,r,i);rU(e,r.id,t)}};function nC(e,t){return e.data?.status===lh.Fru?function(e){if(null==e)return e;let t=null;for(let i=e.length-1;i>=0;i--)if(e[i].type!==aQ.Projected){t=i;break}return null==t?[]:e.slice(0,t+1)}(t):t}!function(){class e extends Map{constructor(e,t){super(),this[rG]={type_:2,parent_:t,scope_:t?t.scope_:r9,modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:e,draft_:this,isManual_:!1,revoked_:!1}}get size(){return r5(this[rG]).size}has(e){return r5(this[rG]).has(e)}set(e,i){let r=this[rG];return a(r),r5(r).has(e)&&r5(r).get(e)===i||(t(r),am(r),r.assigned_.set(e,!0),r.copy_.set(e,i),r.assigned_.set(e,!0)),this}delete(e){if(!this.has(e))return!1;let i=this[rG];return a(i),t(i),am(i),i.base_.has(e)?i.assigned_.set(e,!1):i.assigned_.delete(e),i.c
249opy_.delete(e),!0}clear(){let e=this[rG];a(e),r5(e).size&&(t(e),am(e),e.assigned_=new Map,rJ(e.base_,t=>{e.assigned_.set(t,!1)}),e.copy_.clear())}forEach(e,t){r5(this[rG]).forEach((i,r,a)=>{e.call(t,this.get(r),r,this)})}get(e){let i=this[rG];a(i);let r=r5(i).get(e);if(i.finalized_||!rX(r)||r!==i.base_.get(e))return r;let n=ay(r,i);return t(i),i.copy_.set(e,n),n}keys(){return r5(this[rG]).keys()}values(){let e=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{let t=e.next();return t.done?t:{done:!1,value:this.get(t.value)}}}}entries(){let e=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{let t=e.next();if(t.done)return t;let i=this.get(t.value);return{done:!1,value:[t.value,i]}}}}[Symbol.iterator](){return this.entries()}}function t(e){e.copy_||(e.assigned_=new Map,e.copy_=new Map(e.base_))}class i extends Set{constructor(e,t){super(),this[rG]={type_:3,parent_:t,scope_:t?t.scope_:r9,modified_:!1,finalized_:!1,copy_:void 0,base_:e,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return r5(this[rG]).size}has(e){let t=this[rG];return a(t),t.copy_?!!t.copy_.has(e)||!(!t.drafts_.has(e)||!t.copy_.has(t.drafts_.get(e))):t.base_.has(e)}add(e){let t=this[rG];return a(t),this.has(e)||(r(t),am(t),t.copy_.add(e)),this}delete(e){if(!this.has(e))return!1;let t=this[rG];return a(t),r(t),am(t),t.copy_.delete(e)||!!t.drafts_.has(e)&&t.copy_.delete(t.drafts_.get(e))}clear(){let e=this[rG];a(e),r5(e).size&&(r(e),am(e),e.copy_.clear())}values(){let e=this[rG];return a(e),r(e),e.copy_.values()}entries(){let e=this[rG];return a(e),r(e),e.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(e,t){let i=this.values(),r=i.next();for(;!r.done;)e.call(t,r.value,r.value,this),r=i.next()}}function r(e){e.copy_||(e.copy_=new Set,e.base_.forEach(t=>{if(rX(t)){let i=ay(t,e);e.drafts_.set(t,i),e.copy_.add(i)}else e.copy_.add(t)}))}function a(e){e.revoked_&&rq(3,JSON.stringify(r5(e)))}ae.MapSet||(ae.MapSet={proxyMap_:function(t,i){return new e(t,i)},proxySet_:function(e,t){return new i(e,t)}})}();let nR=ab((e,t)=>{switch(t.type){case"load_single_flight":((e,t,i)=>{var r;r=t.id,e.flights.has(rj(r))||rV(e),nA(e,[t],i)})(e,t.value.flight,t.value.lastUpdated);break;case"load_flights":nA(e,t.value.flights,t.value.lastUpdated);break;case"load_flight_track":((e,t,i,r)=>{let a=rN(e,t);void 0!==a&&(a.trackList=nC(a,nE(a.trackList,i)),a.trackLastUpdated=r,!1===a.hasFullTrack&&(a.hasFullTrack=!0),void 0===a.hasFullTrack&&(a.hasFullTrack=!1))})(e,t.value.flightId,t.value.trackList,t.value.lastUpdated);break;case"add_horde_positions":((e,t,i,r,a)=>{for(let n of t){let t=n.flightId,o=rN(e,t);if(void 0!==o){null==o.trackList&&(o.trackList=[]),function(e,t){let i=tI.cloneDeep(t),r=e.at(-1);(void 0===r||r.clock<t.clock&&t.clock-r.clock>1)&&(e.push(i),null==t.altitude&&null!=r?.altitude&&(i.altitude=r.altitude),null==t.gs&&(i.gs=nT(e)),null==t.heading&&(i.heading=nk(e)),null==t.verticalTrend&&(i.verticalTrend=nS(e)))}(o.trackList,n.position);let e=r?.(o);void 0!==e&&e>0&&o.trackList.length>e&&(o.trackList=o.trackList.slice(-e),o.hasFullTrack=!1),o.lastHordePosition=n.position,o.isAirborne=nP(o,a)}else i&&rU(e,t,function(e){let t={id:e.flightId,data:{id:e.flightId,ids:{ident:e.ident??""},aircraft:{code:e.aircraftType,icon:aP.Airliner},origin:{latlon:!1},status:lh.Enroute,times:{actual:{},estimated:{},scheduled:{}}},hasFullTrack:void 0,isBlocked:e.flightId.startsWith("BLOCKED"),isAirborne:!0===e.position.airground};return t.trackList=[e.position],t.lastHordePosition=e.position,t}(n))}})(e,t.value.hordePositions,t.value.createFlight,t.value.maxTrackPositions,t.value.airborneGroundSpeedThreshold);break;case"remove_flights":((e,t)=>{let i=[];for(let[r,a]of e.flights)t(a)&&i.push(r);for(let t of i)!function(e,t){let i=rj(t),r=e.flights.get(i);if(void 0===r)return;let a=rB(r);if(void 0!==a){let t=e.identLookup.get(a);void 0!==t&&(t.delete(i),0===t.size&&e.identLookup.delete(a))}e.flights.delete(i)}(e,t)})(e,t.value.shouldRemove);break;case"remove_all_flights":rV(e)}}),nL=(0,r.createContext)(null),nD=(0,r.createContext)(null),nO={singleFlight:!1,updateFrequency:250},nF=({children:e,options:t={}})=>{let i={...nO,...t},[a,n]=(0,r.useReducer)(nR,{flights:new Map,identLookup:new Map}),o=(0,r.useMemo)(()=>(function(e,t){return{loadFlights:(i,r)=>{if(t){if(1===i.length)e({type:"load_single_flight",value:{flight:i[0],lastUpdated:r}});else if(i.length>1)throw Error("Cannot load more than one flight into single flight store")}else e({type:"load_flights",value:{flights:i,lastUpdated:r}})},loadFlightTrack:(t,i,r)=>e({type:"load_flight_track",value:{flightId:t,trackList:i,lastUpdated:r}}),addHordePositions:(t,i,r,a)=>e({type:"add_horde_positions",value:{hordePositions:t,createFlight:i,maxTrackPositions:r,airborneGroundSpeedThreshold:a}}),removeFlights:t=>e({type:"remove_flights",value:{shouldRemove:t}}),removeAllFlights:()=>e({type:"remove_all_flights"})}})(n,i.singleFlight),[n,i.singleFlight]),[l,s]=(0,r.useState)(a),c=(0,r.useRef)(void 0),u=(0,r.useRef)(!0);return(0,r.useEffect)(()=>
249{if(u.current)return void(u.current=!1);let e=performance.now(),t=void 0!==c.current?e-c.current:null;!document.hidden&&(null===t||t>i.updateFrequency)&&(s(a),c.current=performance.now())},[a,i.updateFrequency]),r.createElement(nL.Provider,{value:l},r.createElement(nD.Provider,{value:o},e))},nj=()=>{let e=(0,r.useContext)(nL);if(!e)throw Error("Missing FlightStoreProvider");return e},nB=()=>[...nj().flights.values()],nN=()=>{let e=(0,r.useContext)(nD);if(!e)throw Error("Missing FlightStoreProvider");return e},nU=e=>"flightaware_dark"===e||"flightaware_classic"===e||"premium_satellite"===e?"#FFFFFF":"#42526F",nV={size:[64,46],canBeStyled:!1,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"></svg>'},n$=(e,t,i,r,a)=>{let n=(new DOMParser).parseFromString(e.svg,"image/svg+xml");for(let e of n.documentElement.querySelectorAll("path"))e&&(t&&e.setAttribute("fill",decodeURIComponent(t)),i&&e.setAttribute("stroke",decodeURIComponent(i)),e.setAttribute("filter","url(#blur)"));let o=document.createElementNS("http://www.w3.org/2000/svg","defs"),l=document.createElementNS("http://www.w3.org/2000/svg","filter");l.setAttribute("id","blur");let s=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur");return s.setAttribute("id","blur"),s.setAttribute("stdDeviation",r.toString()),l.appendChild(s),o.appendChild(l),n.documentElement.appendChild(o),{svg:n.documentElement.outerHTML,canBeStyled:e.canBeStyled,size:[e.size[0]*a,e.size[1]*a]}},nZ=e=>{if(!e.length)return;let t=e.split(" ")[0],i="";return t.length<=3?i+=`${t}_${e.split(" ")[1]}`:i=t,i=i.replace("'","").toLowerCase(),`https://www.flightaware.com/images/manufacturer_logos/90p/${i}.png`};function nG(e){this.message=e}nG.prototype=Error(),nG.prototype.name="InvalidCharacterError";var nq="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new nG("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,r,a=0,n=0,o="";r=t.charAt(n++);~r&&(i=a%4?64*i+r:r,a++%4)&&(o+=String.fromCharCode(255&i>>(-2*a&6))))r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return o};function nH(e){this.message=e}function nW(e,t){if("string"!=typeof e)throw new nH("Invalid token specified");var i=+(!0!==(t=t||{}).header);try{return JSON.parse(function(e){var t,i=e.replace(/-/g,"+").replace(/_/g,"/");switch(i.length%4){case 0:break;case 2:i+="==";break;case 3:i+="=";break;default:throw"Illegal base64url string!"}try{return t=i,decodeURIComponent(nq(t).replace(/(.)/g,function(e,t){var i=t.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}catch(e){return nq(i)}}(e.split(".")[i]))}catch(e){throw new nH("Invalid token specified: "+e.message)}}nH.prototype=Error(),nH.prototype.name="InvalidTokenError";let nX=(e,t)=>{if(((e,t)=>{let i="Tile"===t&&e.indexOf("lightning-flash")>-1,r="Source"===t&&e.indexOf("lightning-ctg")>-1;return i||r})(e,t)){let t=localStorage.getItem("mapToken");if(null!==t)try{return nW(t),{url:e,headers:{Authorization:`Bearer ${t}`}}}catch(e){console.error(e instanceof nH?e.message:e)}}},nY=(e,t,i,r)=>{for(let a=0;a<t;a++)if(Math.abs(e[i+a]-e[r+a])>1e-9)return!1;return!0},nK=(e,t,i,r,a=0)=>{for(let n=1,o=a;n<=i;n++,o+=e){let a=n/i,l=a*a,s=l*a,c=1-a,u=c*c,h=u*c;for(let i=0;i<e;++i)r[o+i]=t[i]*h+3*(t[i+ +e]*a*u+t[i+2*e]*l*c)+t[i+3*e]*s}},nJ=(e,t,i,r,a=0)=>{let n=t.length/e,o=t.length,l=Array(4*e),s=+e,c=2*e,u=3*e,h=0,p=nY(t,e,0,o-e);if(p){let n=o-2*e,p=+e;for(let i=0;i<e;i++)l[0+i]=.5*t[n+i]+.5*t[0+i],l[s+i]=.16666667*t[n+i]+.83333333*t[0+i],l[c+i]=.83333333*t[0+i]+.16666667*t[p+i],l[u+i]=.5*t[0+i]+.5*t[p+i];for(let t=0;t<e;t++)r[a+t]=l[0+t];h+=1,nK(e,l,i,r,a+=e),a+=e*i,h+=i}else{for(let i=0;i<e;i++)r[a+i]=t[i];a+=e,h+=1}for(let o=2;o<n;o++){let d=(o-2)*e,f=(o-1)*e,m=o*e;for(let i=0;i<e;i++)2!=o||p?(l[0+i]=.5*t[d+i]+.5*t[f+i],l[s+i]=.16666667*t[d+i]+.83333333*t[f+i]):(l[0+i]=t[d+i],l[s+i]=.33333333*t[d+i]+.66666667*t[f+i]),o!=n-1||p?(l[c+i]=.83333333*t[f+i]+.16666667*t[m+i],l[u+i]=.5*t[f+i]+.5*t[m+i]):(l[c+i]=.66666667*t[f+i]+.33333333*t[m+i],l[u+i]=t[m+i]);if(nY(t,e,d,f)||nY(t,e,f,m)){for(let t=0;t<e;t++)r[a+t]=l[u+t];a+=e,h+=1}else nK(e,l,i,r,a),a+=e*i,h+=i}return h};var nQ={centimeters:0x25f96350,centimetres:0x25f96350,cm:0x25f96350,degrees:360/(2*Math.PI),deg:360/(2*Math.PI),feet:20902260.511392,ft:20902260.511392,inches:250826616.45599997,in:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,km:6371.0088,meters:6371008.8,metres:6371008.8,m:6371008.8,miles:3958.761333810546,mi:3958.761333810546,millimeters:0x17bbde120,millimetres:0x17bbde120,mm:0x17bbde120,nauticalmiles:6371008.8/1852,nmi:6371008.8/1852,radians:1,rad:1,yards:6967335.223679999,yd:6967335.223679999};function n1(e,t,i={}){let r={type:"Feature"};return(0===i.id||i.id)&&(r.id=i.id),i.bbox&&(r.bbox=i.bbox),r.properties=t||{},r.geometry=e,r}function n0(e,t,i={}){if(!e)throw Error("coordinates is required");if(!Array.isArray(e))throw Error("coordinates must be an Array");if(e.length<2)throw Error("coordinates must be at least 2 numbers long");if(!n9(e[0])||!n9(e[1]))throw Error("coordinates must contain numbers");return n1({type:"Point",coordinates:e}
249,t,i)}function n2(e,t,i={}){for(let t of e){if(t.length<4)throw Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(t[t.length-1].length!==t[0].length)throw Error("First and last Position are not equivalent.");for(let e=0;e<t[t.length-1].length;e++)if(t[t.length-1][e]!==t[0][e])throw Error("First and last Position are not equivalent.")}return n1({type:"Polygon",coordinates:e},t,i)}function n3(e,t,i={}){if(e.length<2)throw Error("coordinates must be an array of two or more positions");return n1({type:"LineString",coordinates:e},t,i)}function n5(e,t={}){let i={type:"FeatureCollection"};return t.id&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.features=e,i}function n6(e,t,i={}){return n1({type:"MultiLineString",coordinates:e},t,i)}function n4(e,t,i={}){return n1({type:"MultiPolygon",coordinates:e},t,i)}function n8(e){return e%(2*Math.PI)*180/Math.PI}function n7(e){return e%360*Math.PI/180}function n9(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function oe(e){if(!e)throw Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return[...e.geometry.coordinates];if("Point"===e.type)return[...e.coordinates]}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return[...e];throw Error("coord must be GeoJSON Point or an Array of numbers")}function ot(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function oi(e){return"Feature"===e.type?e.geometry:e}function or(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function oa(e,t,i={}){var r=oe(e),a=oe(t),n=Math.pow(Math.sin(n7(a[1]-r[1])/2),2)+Math.pow(Math.sin(n7(a[0]-r[0])/2),2)*Math.cos(n7(r[1]))*Math.cos(n7(a[1]));return function(e,t="kilometers"){let i=nQ[t];
249if(!i)throw Error(t+" units is invalid");return e*i}(2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n)),i.units)}function on(e,t,i){if(null!==e)for(var r,a,n,o,l,s,c,u,h=0,p=0,d=e.type,f="FeatureCollection"===d,m="Feature"===d,g=f?e.features.length:1,y=0;y<g;y++){l=(u=!!(c=f?e.features[y].geometry:m?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var _=0;_<l;_++){var b=0,x=0;if(null!==(o=u?c.geometries[_]:c)){s=o.coordinates;var v=o.type;switch(h=0,v){case null:break;case"Point":if(!1===t(s,p,y,b,x))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<s.length;r++){if(!1===t(s[r],p,y,b,x))return!1;p++,"MultiPoint"===v&&b++}"LineString"===v&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<s.length;r++){for(a=0;a<s[r].length-h;a++){if(!1===t(s[r][a],p,y,b,x))return!1;p++}"MultiLineString"===v&&b++,"Polygon"===v&&x++}"Polygon"===v&&b++;break;case"MultiPolygon":for(r=0;r<s.length;r++){for(x=0,a=0;a<s[r].length;a++){for(n=0;n<s[r][a].length-h;n++){if(!1===t(s[r][a][n],p,y,b,x))return!1;p++}x++}b++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===on(o.geometries[r],t))return!1;break;default:throw Error("Unknown Geometry Type")}}}}}function oo(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var i=0;i<e.features.length&&!1!==t(e.features[i],i);i++);}function ol(e,t){!function(e,t){var i,r,a,n,o,l,s,c,u,h,p=0,d="FeatureCollection"===e.type,f="Feature"===e.type,m=d?e.features.length:1;for(i=0;i<m;i++){for(l=d?e.features[i].geometry:f?e.geometry:e,c=d?e.features[i].properties:f?e.properties:{},u=d?e.features[i].bbox:f?e.bbox:void 0,h=d?e.features[i].id:f?e.id:void 0,o=(s=!!l&&"GeometryCollection"===l.type)?l.geometries.length:1,a=0;a<o;a++)if(null!==(n=s?l.geometries[a]:l))switch(n.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(n,p,c,u,h))return!1;break;case"GeometryCollection":for(r=0;r<n.geometries.length;r++)if(!1===t(n.geometries[r],p,c,u,h))return!1;break;default:throw Error("Unknown Geometry Type")}else if(!1===t(null,p,c,u,h))return!1;p++}}(e,function(e,i,r,a,n){var o,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==t(n1(e,r,{bbox:a,id:n}),i,0)&&void 0}switch(l){case"MultiPoint":o="Point";break;case"MultiLineString":o="LineString";break;case"MultiPolygon":o="Polygon"}for(var s=0;s<e.coordinates.length;s++)if(!1===t(n1({type:o,coordinates:e.coordinates[s]},r),i,s))return!1})}var os=function(e,t={}){var i,r,a,n;return i=(e,i)=>{let r=i.geometry.coordinates;return e+oa(r[0],r[1],t)},r=0,a=!1,n=function(e,t,n,o,l){r=i(r,e,t,n,o,l),a=!0},ol(e,function(e,t,i){var r=0;if(e.geometry){var a=e.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var o,l=0,s=0,c=0;return!1!==on(e,function(a,u,h,p,d){return void 0===o||t>l||p>s||d>c?(o=a,l=t,s=p,c=d,void(r=0)):!1!==n(n3([o,a],e.properties),t,i,d,r)&&void(r++,o=a)})&&void 0}}}),r};function oc(e,t,i,r={}){let a=oe(e),n=n7(a[0]),o=n7(a[1]),l=n7(i),s=function(e,t="kilometers"){let i=nQ[t];
249if(!i)throw Error(t+" units is invalid");return e/i}(t,r.units),c=Math.asin(Math.sin(o)*Math.cos(s)+Math.cos(o)*Math.sin(s)*Math.cos(l)),u=n8(n+Math.atan2(Math.sin(l)*Math.sin(s)*Math.cos(o),Math.cos(s)-Math.sin(o)*Math.sin(c))),h=n8(c);return void 0!==a[2]?n0([u,h,a[2]],r.properties):n0([u,h],r.properties)}var ou=function(e,t,i={}){let r=oi(e).coordinates,a=0;for(let e=0;e<r.length&&!(t>=a&&e===r.length-1);e++){if(a>=t){let n=t-a;if(n){let t=function e(t,i,r={}){if(!0===r.final){let r;return(r=((r=e(i,t))+180)%360)>180?r-360:r}let a=oe(t),n=oe(i),o=n7(a[0]),l=n7(n[0]),s=n7(a[1]),c=n7(n[1]);return n8(Math.atan2(Math.sin(l-o)*Math.cos(c),Math.cos(s)*Math.sin(c)-Math.sin(s)*Math.cos(c)*Math.cos(l-o)))}(r[e],r[e-1])-180;return oc(r[e],n,t,i)}return n0(r[e])}a+=oa(r[e],r[e+1],i)}return n0(r[r.length-1])};function oh(e){let t=[],i=[],r=null;return e.forEach(e=>{if(null!==r){let a=nb(r[1],r[0],e[1],e[0]);null!==a&&(i.push([180*Math.sign(r[0]),a]),t.push(i),(i=[]).push([-180*Math.sign(r[0]),a]))}r=e,i.push(e)}),t.push(i),t}function op(e,t){let i=[],r=[];if(!t)return{actual:[e],projected:[]};if(e.length<=2){let t=e.filter(e=>!od(e)),i=e.filter(e=>od(e));return{actual:t.length>0?[t]:[],projected:i.length>0?[i]:[]}}for(let t=0;t<e.length;++t)if(t>0&&od(e[t])!==od(e[t-1])||t===e.length-1){let a=[],n=od(e[t-1]);if(t!==e.length-1){let i={...e[t],type:e[t-1].type};a.unshift(i)}for(let i=t-1;i>=0&&n===od(e[i]);--i)a.unshift(e[i]);let o=.2;if(n?(r.push(a),o=.8):i.push(a),t===e.length-1){let n=function(e,t){if(t<0||t>1)return[];let i=n3(e),r=os(i);return ou(i,r*t).geometry.coordinates}([[e[t-1].longitude,e[t-1].latitude],[e[t].longitude,e[t].latitude]],o),l={...e[t],type:e[t-1].type,longitude:n[0],latitude:n[1]};a.push(l);let s=[{...e[t],longitude:n[0],latitude:n[1]},e[t]];od(e[t])?r.push(s):i.push(s)}}return{actual:i,projected:r}}function od(e){return e.type===aQ.Projected||e.type===aQ.Oceanic}function of(e,t=2,i=5,r=3){let a=((e,t,i,r)=>{if(r.length%2!=0)throw Error("Number of elements in pointList must be even");let a=r.length/2;if(a<3)return r;let n=Array(2*(1+a*(i+1))),o=((e,t,i,r,a,n,o)=>{let l,s=0,c=0,u=!1,h=0,p=0,d=0,f=null,m=null;for(s=0;s<a-1;++s,p=l){m=(f=s*e)+e;let a=n[f],g=n[f+1],y=n[m];if(l=ny(g,a,n[m+1],y),0==s){d=l;for(let t=0;t<e;t++)o[c++]=n[f+t];continue}let _=Math.abs(l-p);if(u){if(_>=i||nY(n,e,f,m))continue;let t=s-h+1;c+=nJ(e,n.slice(h*e,(h+t)*e),r,o,c)*e,u=!1,d=p}else if(r>1&&_>=i)h=s-1,u=!0;else if(Math.abs(l-d)>t||nY(n,e,f,m)){for(let t=0;t<e;t++)o[c++]=n[f+t];d=l}}if(u){let t=a-h;c+=nJ(e,n.slice(h*e,(h+t)*e),r,o,c)*e}else{let t=(a-1)*e;for(let i=0;i<e;i++)o[c++]=n[t+i]}return c/e})(2,e,t,i,a,r,n),l=[];for(let e=0;e<2*o;e+=2)e>=2&&n[e]===n[e-2]&&n[e+1]===n[e-1]||(l.push(n[e]),l.push(n[e+1]));return l})(t,i,r,e.flat()),n=Array(a.length/2);for(let e=0;e<n.length;e++)n[e]=[a[2*e],a[2*e+1]];return n}function om(e,t){let i=t[0];return t.forEach((r,a)=>{let n=t[Math.max(0,a-1)];if(n===r)return void(i=r);let o=r.geometry,l=n.geometry;nm(o.coordinates[0],o.coordinates[1],e[0],e[1])<nm(l.coordinates[0],l.coordinates[1],e[0],e[1])&&(i=r)}),i}function og(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Object.is(e[i],t[i]))return!1;return!0}class oy{startTime;rate;updatedTime;constructor(e,t){let i=Date.now();this.startTime=e??i,this.rate=t??1,this.updatedTime=i}setStartTime(e){this.startTime=e,this.updatedTime=Date.now()}setRate(e){this.rate=e,this.updatedTime=Date.now()}reset(){let e=Date.now();this.startTime=e,this.rate=1,this.updatedTime=e}getTime(){return this.startTime+(Date.now()-this.updatedTime)*this.rate}getTimeInSeconds(){return this.getTime()/1e3}}let o_=(0,r.createContext)(new oy),ob=({children:e,clock:t})=>r.createElement(o_.Provider,{value:t},e),ox=()=>(0,r.useContext)(o_),ov=(e,t)=>{let i,r;if(null==e||0===e.length)return;if(1===e.length){if(null==(i=e[0]).heading||null==i.gs)return i;r={clock:i.clock,latitude:i.latitude,longitude:i.longitude,gs:i.gs,heading:i.heading}}else{let a=function(e,t){if(e.length<2)return;let i=e[e.length-2],r=e[e.length-1];for(let a=e.length-2;a>=0;a--){if(t>=i.clock&&t<=r.clock)return[i,r];a>0&&(r=i,i=e[a-1])}}(e,t);if(a){let[e,t]=a;i=e,r={clock:e.clock,latitude:e.latitude,longitude:e.longitude,gs:oz(e,t),heading:oS(e,t)}}else{let t=e[e.length-2],a=e[e.length-1];i=a,r={clock:a.clock,latitude:a.latitude,longitude:a.longitude,gs:a.gs??oz(t,a),heading:a.heading??oS(t,a)}}}let a=function(e,t){let i=nc(e.latitude),r=nc(e.longitude),a=ng(i,r,nc(e.heading),nh(e.gs)*(t-e.clock));return{latitude:nu(a.lat),longitude:nx(nu(a.lon))}}(r,t);return{clock:t,latitude:a.latitude,longitude:a.longitude,gs:i.gs,heading:r.heading,altitude:i.altitude,verticalTrend:i.verticalTrend,type:i.type}};function ow(e,t){return e.filter(e=>e.clock<=t)}function oz(e,t){return nd(nm(nc(e.latitude),nc(e.longitude),nc(t.latitude),nc(t.longitude))/Math.abs(t.clock-e.clock))}function oS(e,t){return n_(e.latitude,e.longitude,t.latitude,t.longitude)}let oT=(e,t,i,r)=>({type:"line",source:e,filter:["==","position-type",t],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":i,"line-width":1.5*r}}),ok=(e,t,i,r)=>{if(null==e)return[];let a=r?op(e,i).actual:op(e,i).projected,n=[];
249a.forEach(e=>{let i=e.map(e=>[e.longitude,e.latitude]);if(i.length>=2){let e,r=oh(i);e="cutsmooth"===t?r.map(e=>of(e)):r,n.push(e)}});let o=[];return n.forEach(e=>{o.push({type:"Feature",geometry:{type:"MultiLineString",coordinates:e},properties:{"position-type":r?"actual":"projected"}})}),o},oE=()=>!0,oM=({data:e,showProjectedTracks:t,smoothingMethod:i,fill:a,scaleFactor:n,isTrackVisible:o=oE})=>{let[l,s]=(0,r.useState)(e.currentPositions.filter(e=>o(e.flight)).map(e=>e.lastTrackPosition));(0,r.useEffect)(()=>{let t=e.currentPositions.filter(e=>o(e.flight)).map(e=>e.lastTrackPosition);og(t,l)||s(t)},[e.currentPositions,o]);let c=(0,r.useMemo)(()=>((e,t,i,r)=>{let a=[];for(let n of e){if(!r(n.flight)||null==n.flight.trackList||null==n.lastTrackPosition)continue;let e=ow(n.flight.trackList,n.lastTrackPosition.clock);ok(e,t,i,!0).forEach(e=>{a.push(e)}),ok(e,t,i,!1).forEach(e=>{a.push(e)})}return{type:"FeatureCollection",features:a}})(e.currentPositions,i,t,o),[e.flights,l,i,t,o]);return r.createElement(r.Fragment,null,r.createElement(oP,{data:c,scaleFactor:n,fill:a}),r.createElement(F,{id:"animated-track-source",type:"geojson",data:((e,t,i,r)=>{let a=[];for(let n of e){if(!r(n.flight))continue;let e=n.flight.trackList,o=n.currentPosition,l=n.lastTrackPosition;if(null==e||0===e.length||null==o||null==l||o.latitude===l.latitude&&o.longitude===l.longitude)continue;let s=[l,o];ok(s,t,i,!0).forEach(e=>{a.push(e)}),ok(s,t,i,!1).forEach(e=>{a.push(e)})}return{type:"FeatureCollection",features:a}})(e.currentPositions,i,t,o)},r.createElement(B,{beforeId:"z7",id:"animated-track-layer",...oT("animated-track-source","actual","dark"===a?"#213356":"#FFFFFF",n)}),r.createElement(B,{beforeId:"z8",id:"animated-projected-track-layer",...oT("animated-track-source","projected","#FE0DFE",n)})))},oP=(0,r.memo)(function({data:e,scaleFactor:t,fill:i}){return r.createElement(F,{id:"track-source",type:"geojson",data:e},r.createElement(B,{beforeId:"z7",id:"track-layer",...oT("track-source","actual","dark"===i?"#213356":"#FFFFFF",t)}),r.createElement(B,{beforeId:"z8",id:"projected-track-layer",...oT("track-source","projected","#FE0DFE",t)}))}),oI=(e,t,i,r,a,n,o,l,s,c)=>{let u=nv(25,i),h=u[0],p=u[1],d=43e3*(n!==lh.Arrived);return{type:"Feature",geometry:{type:"Point",coordinates:[e,t]},properties:{aircraftType:r,heading:i,altitude:a,fill:l,shadowOffset:[(a??d)/(43e3/h),(a??d)/(43e3/p)],zoomLevel:s,id:o,sortOrder:c}}},oA=e=>"dark"===e?"-DARK":"-LIGHT",oC=()=>!0,oR=e=>e.data?.aircraft.icon??aP.Airliner,oL=()=>0,oD=()=>0,oO=({data:e,baseLayer:t,minZoom:i,fill:a,icons:n,isAircraftVisible:o=oC,getAircraftColor:l,getAircraftIcon:s=oR,getAircraftZoomLevel:c=oL,getAircraftSortOrder:u=oD,selectedFlightId:h,highlightedFlightId:p})=>{let d=(0,r.useCallback)(()=>oA(a),[a]);return r.createElement(F,{id:"airplane-source",type:"geojson",data:((e,t,i,r,a,n,o,l,s,c)=>{let u=[];for(let h of e){if(!r(h.flight)||null==h.currentPosition)continue;let e=h.flight,p=n(e),d=i[p],f=oI(h.currentPosition.longitude,h.currentPosition.latitude,d?.rotation??h.currentPosition.heading??0,p,h.currentPosition.altitude??0,e.data?.status??lh.Arrived,e.id,a(e,t),o(e),e.id===s||e.id===c?99999:l(e));u.push(f)}return{type:"FeatureCollection",features:u}})(e,a,n,o,l??d,s,c,u,h,p)},r.createElement(B,{id:"airplane-layer-shadow",...((e,t,i)=>{let r="dark"===t?.4:.8;e.indexOf("_ifr_")>=0&&(r-=.1);let a={id:"airplane-shadow-layer",type:"symbol",source:"airplane-source",filter:["all",["==",["geometry-type"],"Point"],[">=",["zoom"],["get","zoomLevel",["properties"]]]],layout:{"icon-image":["concat",["get","aircraftType",["properties"]],"-SHADOW"],"icon-rotate":["get","heading",["properties"]],"icon-rotation-alignment":"map","icon-ignore-placement":!0,"icon-allow-overlap":!0,"icon-size":.65,"symbol-sort-key":["get","sortOrder",["properties"]],"icon-offset":["get","shadowOffset",["properties"]]},paint:{"icon-opacity":r}};return void 0!==i&&(a.minzoom=i),a})(t,a,i)}),r.createElement(B,{id:"airplane-layer",...(e=>{let t={id:"airplane-layer",type:"symbol",source:"airplane-source",filter:["all",["==",["geometry-type"],"Point"],[">
249=",["zoom"],["get","zoomLevel",["properties"]]]],layout:{"icon-image":["concat",["get","aircraftType",["properties"]],["get","fill",["properties"]]],"icon-rotate":["get","heading",["properties"]],"icon-rotation-alignment":"map","icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-size":.65,"symbol-sort-key":["get","sortOrder",["properties"]]}};return void 0!==e&&(t.minzoom=e),t})(i)}))};var oF={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},oj=r.createContext&&r.createContext(oF),oB=window&&window.__assign||function(){return(oB=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},oN=window&&window.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(i[r[a]]=e[r[a]])}return i};function oU(e){return function(t){return r.createElement(oV,oB({attr:oB({},e.attr)},t),function e(t){return t&&t.map(function(t,i){return r.createElement(t.tag,oB({key:i},t.attr),e(t.child))})}(e.child))}}function oV(e){var t=function(t){var i,a=e.attr,n=e.size,o=e.title,l=oN(e,["attr","size","title"]),s=n||t.size||"1em";return t.className&&(i=t.className),e.className&&(i=(i?i+" ":"")+e.className),r.createElement("svg",oB({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,a,l,{className:i,style:oB(oB({color:e.color||t.color},t.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&r.createElement("title",null,o),e.children)};return void 0!==oj?r.createElement(oj.Consumer,null,function(e){return t(e)}):t(oF)}function o$(e){return oU({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{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 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}}]})(e)}function oZ(e){return oU({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"}}]})(e)}function oG(e){return oU({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}}]})(e)}function oq(e){return oU({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}}]})(e)}function oH(e){return oU({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 5l-1.41 1.41L18.17 11H2v2h16.17l-4.59 4.59L15 19l7-7-7-7z"}}]})(e)}function oW(e,t){let i=n7(e[1]),r=n7(t[1]),a=n7(t[0]-e[0]);return a>Math.PI&&(a-=2*Math.PI),a<-Math.PI&&(a+=2*Math.PI),(n8(Math.atan2(a,Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(i/2+Math.PI/4))))+360)%360}var oX=function(e,t,i={}){let r;return(r=i.final?oW(oe(t),oe(e)):oW(oe(e),oe(t)))>180?-(360-r):r};let oY=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,oK=window.devicePixelRatio,oJ=(e,t)=>{let i=document.createElement("canvas");return i.width=Math.ceil(e),i.height=Math.ceil(t),i.style.width=e+"px",i.style.height=t+"px",i.getContext("2d")?.scale(oK,oK),i},oQ=(e,t,i,r,a)=>{let{width:n,height:o,context:l}=o1(r,i,t,e,a),s=l.getImageData(0,0,n,o).data;return{width:n,height:o,context:l,data:s}},o1=(e,t,i,r,a)=>{let n=`700 ${Math.floor(11*i)}px Roboto, sans-serif`,o=a?8*i:0,{height:l,width:s,paddingX:c}=o2(i,r,null!==a),u=oJ(s,l).getContext("2d",{willReadFrequently:!0,alpha:!1}),h=Math.floor(s/oK),p=Math.floor(l/oK);if(oY&&(CanvasRenderingContext2D.prototype.roundRect=function(e,t,i,r,a){this.beginPath(),this.moveTo(e+a,t),this.lineTo(e+i-a,t),this.quadraticCurveTo(e+i,t,e+i,t+a),this.lineTo(e+i,t+r-a),this.quadraticCurveTo(e+i,t+r,e+i-a,t+r),this.lineTo(e+a,t+r),this.quadraticCurveTo(e,t+r,e,t+r-a),this.lineTo(e,t+a),this.quadraticCurveTo(e,t,e+a,t),this.closePath()}),u){u.roundRect(0,0,h,p,3*i),u.fillStyle=e,u.fill();let d=h/2;return d+=o?o-3*i:.5*i,u.fillStyle=t,u.font=n,u.textAlign="center",u.textBaseline="middle",u.letterSpacing=toString(.1*i)+"px",u.textRendering="optimizeLegibility",u.fillText(r,d,p/2+ +i),a&&(a.width=o,a.height=o,u.drawImage(a,c/2-2*i,o/2+.7*i,o,o)),{width:s,height:l,context:u}}return{width:0,height:0,context:new CanvasRenderingContext2D}},o0=Math.ceil(32*oK),o2=(e,t,i)=>{let r=document.createElement("canvas").getContext("2d",{willReadFrequently:!0,alpha:!1}),a=`700 ${Math.floor(11*e)}px Roboto, sans-serif`,n=0;if(r){r.font=a;let e=r.measureText(t);n=Math.abs(e.actualBoundingBoxLeft)+Math.abs(e.actualBoundingBoxRight)}let o=10*e;return{width:Math.floor((o+(i?8*e:0)+n)*oK),height:Math.floor(18*oK*e),paddingX:o}},o3=(e,t,i,r,a,n)=>{let{width:o,height:l}=o2(a,r,n!==lh.Enroute),s=Math.ceil(o/window.devicePixelRatio/2),c=Math.ceil(l/window.devicePixelRatio/2);if(null===t)return[-s,c];let u=e??[0,0],h=t??[0,0],p=oX(u,h);return"destination"===i&&(p=oX(h,u)),p<0?90>
249Math.abs(p)?[s+5*a,c+2*a]:[s+5*a,-c-2*a]:90>Math.abs(p)?[-s-5*a,c+2*a]:[-s-5*a,-c-2*a]};function o5(e,t){return null!=e&&null!=t&&(!!e.icao&&!!t.icao&&e.icao===t.icao||!!e.iata&&!!t.iata&&e.iata===t.iata||!!e.lid&&!!t.lid&&e.lid===t.lid)||null===e&&null===t}let o6=(e,t)=>"iata"===t?e.iata??e.icao??e.lid??"":e.icao??e.iata??e.lid??"";function o4(e,t,i,r){return 8&i?[e[0]+(t[0]-e[0])*(r[3]-e[1])/(t[1]-e[1]),r[3]]:4&i?[e[0]+(t[0]-e[0])*(r[1]-e[1])/(t[1]-e[1]),r[1]]:2&i?[r[2],e[1]+(t[1]-e[1])*(r[2]-e[0])/(t[0]-e[0])]:1&i?[r[0],e[1]+(t[1]-e[1])*(r[0]-e[0])/(t[0]-e[0])]:null}function o8(e,t){var i=0;return e[0]<t[0]?i|=1:e[0]>t[2]&&(i|=2),e[1]<t[1]?i|=4:e[1]>t[3]&&(i|=8),i}function o7(e,t){let i=[];for(let r of e){let e=function(e,t){var i,r,a,n,o,l,s;for(r=1;r<=8;r*=2){for(i=[],n=!(o8(a=e[e.length-1],t)&r),o=0;o<e.length;o++)(s=!(o8(l=e[o],t)&r))!==n&&i.push(o4(a,l,r,t)),s&&i.push(l),a=l,n=s;if(!(e=i).length)break}return i}(r,t);e.length>0&&(e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]||e.push(e[0]),e.length>=4&&i.push(e))}return i}var o9=function(e,t){let i=oi(e),r=i.type,a="Feature"===e.type?e.properties:{},n=i.coordinates;switch(r){case"LineString":case"MultiLineString":{let e=[];return"LineString"===r&&(n=[n]),n.forEach(i=>{!function(e,t,i){let r,a;var n,o,l,s=e.length,c=o8(e[0],t),u=[];for(i||(i=[]),n=1;n<s;n++){for(r=e[n-1],o=l=o8(a=e[n],t);;){if(!(c|o)){u.push(r),o!==l?(u.push(a),n<s-1&&(i.push(u),u=[])):n===s-1&&u.push(a);break}if(c&o)break;c?c=o8(r=o4(r,a,c,t),t):o=o8(a=o4(r,a,o,t),t)}c=l}u.length&&i.push(u)}(i,t,e)}),1===e.length?n3(e[0],a):n6(e,a)}case"Polygon":return n2(o7(n,t),a);case"MultiPolygon":return n4(n.map(e=>o7(e,t)),a);default:throw Error("geometry "+r+" not supported")}},le=function(e,t={}){let i=Number(e[0]),r=Number(e[1]),a=Number(e[2]),n=Number(e[3]);if(6===e.length)throw Error("@turf/bbox-polygon does not support BBox with 6 positions");let o=[i,r];return n2([[o,[a,r],[a,n],[i,n],o]],t.properties,{bbox:e,id:t.id})};function lt(e,t={}){if(null!=e.bbox&&!0!==t.recompute)return e.bbox;let i=[1/0,1/0,-1/0,-1/0];return on(e,e=>{i[0]>e[0]&&(i[0]=e[0]),i[1]>e[1]&&(i[1]=e[1]),i[2]<e[0]&&(i[2]=e[0]),i[3]<e[1]&&(i[3]=e[1])}),i}function li(e,t,i,r,a){let n,o,l,s,c=t[0],u=r[0],h=0,p=0;u>c==u>-c?(n=c,c=t[++h]):(n=u,u=r[++p]);let d=0;if(h<e&&p<i)for(u>c==u>-c?(o=c+n,l=n-(o-c),c=t[++h]):(o=u+n,l=n-(o-u),u=r[++p]),n=o,0!==l&&(a[d++]=l);h<e&&p<i;)u>c==u>-c?(s=(o=n+c)-n,l=n-(o-s)+(c-s),c=t[++h]):(s=(o=n+u)-n,l=n-(o-s)+(u-s),u=r[++p]),n=o,0!==l&&(a[d++]=l);for(;h<e;)s=(o=n+c)-n,l=n-(o-s)+(c-s),c=t[++h],n=o,0!==l&&(a[d++]=l);for(;p<i;)s=(o=n+u)-n,l=n-(o-s)+(u-s),u=r[++p],n=o,0!==l&&(a[d++]=l);return 0===n&&0!==d||(a[d++]=n),d}function lr(e){return new Float64Array(e)}let la=lr(4),ln=lr(8),lo=lr(12),ll=lr(16),ls=lr(4);function lc(e,t,i={}){if(!e)throw Error("point is required");if(!t)throw Error("polygon is required");let r=oe(e),a=oi(t),n=a.type,o=t.bbox,l=a.coordinates;if(o&&!1==(o[0]<=r[0]&&o[1]<=r[1]&&o[2]>=r[0]&&o[3]>=r[1]))return!1;"Polygon"===n&&(l=[l]);for(var s=0;s<l.length;++s){let e=function(e,t){var i,r,a,n,o,l,s,c,u,h=0,p=e[0],d=e[1],f=t.length;for(i=0;i<f;i++){r=0;var m=t[i],g=m.length-1;if((c=m[0])[0]!==m[g][0]&&c[1]!==m[g][1])throw Error("First and last coordinates in a ring must be the same");for(n=c[0]-p,o=c[1]-d;r<g;r++){if(l=(u=m[r+1])[0]-p,s=u[1]-d,0===o&&0===s){if(l<=0&&n>=0||n<=0&&l>=0)return 0}else if(s>=0&&o<=0||s<=0&&o>=0){if(0===(a=function(e,t,i,r,a,n){let o=(t-0)*(i-0),l=(e-0)*(r-0),s=o-l,c=Math.abs(o+l);return Math.abs(s)>=33306690738754716e-32*c?s:-function(e,t,i,r,a,n,o){let l,s,c,u,h,p,d,f,m,g,y,_,b,x,v,w,z,S,T=e-a,k=i-a,E=t-n,M=r-n;x=T*M,d=(p=0x8000001*T)-(p-T),f=T-d,m=(p=0x8000001*M)-(p-M),v=f*(g=M-m)-(x-d*m-f*m-d*g),w=E*k,d=(p=0x8000001*E)-(p-E),f=E-d,m=(p=0x8000001*k)-(p-k),y=v-(z=f*(g=k-m)-(w-d*m-f*m-d*g)),h=v-y,la[0]=v-(y+h)+(h-z),h=(_=x+y)-x,y=(b=x-(_-h)+(y-h))-w,h=b-y,la[1]=b-(y+h)+(h-w),h=(S=_+y)-_,la[2]=_-(S-h)+(y-h),la[3]=S;let P=function(e,t){let i=t[0];for(let e=1;e<4;e++)i+=t[e];return i}(0,la),I=22204460492503146e-32*o;if(P>=I||-P>=I||(h=e-T,l=e-(T+h)+(h-a),h=i-k,c=i-(k+h)+(h-a),h=t-E,s=t-(E+h)+(h-n),h=r-M,u=r-(M+h)+(h-n),0===l&&0===s&&0===c&&0===u)||(I=11093356479670487e-47*o+33306690738754706e-32*Math.abs(P),(P+=T*u+M*l-(E*c+k*s))>=I||-P>=I))return P;x=l*M,d=(p=0x8000001*l)-(p-l),f=l-d,m=(p=0x8000001*M)-(p-M),v=f*(g=M-m)-(x-d*m-f*m-d*g),w=s*k,d=(p=0x8000001*s)-(p-s),f=s-d,m=(p=0x8000001*k)-(p-k),y=v-(z=f*(g=k-m)-(w-d*m-f*m-d*g)),h=v-y,ls[0]=v-(y+h)+(h-z),h=(_=x+y)-x,y=(b=x-(_-h)+(y-h))-w,h=b-y,ls[1]=b-(y+h)+(h-w),h=(S=_+y)-_,ls[2]=_-(S-h)+(y-h),ls[3]=S;let A=li(4,la,4,ls,ln);x=T*u,d=(p=0x8000001*T)-(p-T),f=T-d,m=(p=0x8000001*u)-(p-u),v=f*(g=u-m)-(x-d*m-f*m-d*g),w=E*c,d=(p=0x8000001*E)-(p-E),f=E-d,m=(p=0x8000001*c)-(p-c),y=v-(z=f*(g=c-m)-(w-d*m-f*m-d*g)),h=v-y,ls[0]=v-(y+h)+(h-z),h=(_=x+y)-x,y=(b=x-(_-h)+(y-h))-w,h=b-y,ls[1]=b-(y+h)+(h-w),h=(S=_+y)-_,ls[2]=_-(S-h)+(y-h),ls[3]=S;let C=li(A,ln,4,ls,lo);x=l*u,d=(p=0x8000001*l)-(p-l),f=l-d,m=(p=0x8000001*u)-(p-u),v=f*(g=u-m)-(x-d*m-f*m-d*g),w=s*c,d=(p=0x8000001*s)-(p-s),f=s-d,m=(p=0x8000001*c)-(p-c),y=v-(z=f*(g=c-m)-(w-d*m-f*m-d*g)),h=v-y,ls[0]=v-(y+h)+(h-z),h=(_=x+y)-x,y=(b=x-(_-h)+(y-h))-w,h=b-y,ls[1]=b-(y+h)+(h-w),h=(S=_+y)-_,ls[2]=_-(S-h)+(y-h),ls[3]=S;let R=li(C,lo,4,ls,ll);return ll[R-1]}(e,t,i,r,a,n,c)}(n,l,o,s,0,0)))return 0;(a>0&&s>0&&o<=0||a<0&&s<=0&&o>0)&&h++}c=u,o=s,n=l}}return h%2!=0}(r,l[s]);if(0===e&&!i.ignoreBoundary||e)return!0}return!1}function lu(e,t,i={}){let r=oe(e),a=ot(t);for(let e=0;e<a.length-1;e++){let t=!1;if(i.ignoreEndVertices&&(0===e&&(t="start"),e===a.length-2&&(t="end"),0===e&&e+1===a.length-1&&(t="both")),function(e,t,i,r,a){let n=i[0],o=i[1],l=e[0],s=e[1],c=t[0],u=t[1],h=c-l,p=u-s,d=(i[0]-l)*p-(i[1]-s)*h;if(null!==a){if(Math.abs(d)>a)return!1}else if(0!==d)return!1;return Math.abs(h)===Math.abs(p)&&0===Math.abs(h)?!r&&i[0]===e[0]&&i[1]===e[1]:r?"start"===r?Math.abs(h)>=Math.abs(p)?h>0?l<n&&n<=c:c<=n&&n<l:p>0?s<o&&o<=u:u<=o&&o<s:"end"===r?Math.abs(h)>=Math.abs(p)?h>0?l<=n&&n<c:c<n&&n<=l:p>0?s<=o&&o<u:u<o&&o<=s:"both"===r&&(Math.abs(h)>=Math.abs(p)?h>0?l<n&&n<c:c<n&&n<l:p>0?s<o&&o<u:u<o&&o<s):Math.abs(h)>=Math.abs(p)?h>0?l<=n&&n<=c:c<=n&&n<=l:p>0?s<=o&&o<=u:u<=o&&o<=s}(a[e],a[e+1],r,t,void 0===i.epsilon?null:i.epsilon))return!0}return!1}var lh,lp,ld,lf,lm={exports:{}},lg=U((lf||(lf=1,lm.exports=function(){function e(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function t(e,t){return e<t?-1:+(e>t)}var i=function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(e,t){a(e,0,e.children.length,t,e)}function a(e,t,i,r,a){a||(a=p(null)),a.minX=1/0,a.minY=1/0,a.maxX=-1/0,a.maxY=-1/0;for(var o=t;o<i;o++){var l=e.children[o];n(a,e.leaf?r(l):l)}return a}function n(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function o(e,t){return e.minX-t.minX}function l(e,t){return e.minY-t.minY}function s(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function c(e){return e.maxX-e.minX+(e.maxY-e.minY)}function u(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function h(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function p(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,r,a,n,o){for(var l=[r,a];l.length;)if(!((a=l.pop())-(r=l.pop())<=n)){var s=r+Math.ceil((a-r)/n/2)*n;(function t(i,r,a,n,o){for(;n>a;){if(n-a>
249600){var l=n-a+1,s=r-a+1,c=Math.log(l),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(l-u)/l)*(s-l/2<0?-1:1);t(i,r,Math.max(a,Math.floor(r-s*u/l+h)),Math.min(n,Math.floor(r+(l-s)*u/l+h)),o)}var p=i[r],d=a,f=n;for(e(i,a,r),o(i[n],p)>0&&e(i,a,n);d<f;){for(e(i,d,f),d++,f--;0>o(i[d],p);)d++;for(;o(i[f],p)>0;)f--}0===o(i[a],p)?e(i,a,f):e(i,++f,n),f<=r&&(a=f+1),r<=f&&(n=f-1)}})(i,s,r||0,a||i.length-1,o||t),l.push(r,s,s,a)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(e){var t=this.data,i=[];if(!h(e,t))return i;for(var r=this.toBBox,a=[];t;){for(var n=0;n<t.children.length;n++){var o=t.children[n],l=t.leaf?r(o):o;h(e,l)&&(t.leaf?i.push(o):u(e,l)?this._all(o,i):a.push(o))}t=a.pop()}return i},i.prototype.collides=function(e){var t=this.data;if(!h(e,t))return!1;for(var i=[];t;){for(var r=0;r<t.children.length;r++){var a=t.children[r],n=t.leaf?this.toBBox(a):a;if(h(e,n)){if(t.leaf||u(e,n))return!0;i.push(a)}}t=i.pop()}return!1},i.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var i=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var r=this.data;this.data=i,i=r}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},i.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},i.prototype.clear=function(){return this.data=p([]),this},i.prototype.remove=function(e,t){if(!e)return this;for(var i,r,a,n=this.data,o=this.toBBox(e),l=[],s=[];n||l.length;){if(n||(n=l.pop(),r=l[l.length-1],i=s.pop(),a=!0),n.leaf){var c=function(e,t,i){if(!i)return t.indexOf(e);for(var r=0;r<t.length;r++)if(i(e,t[r]))return r;return -1}(e,n.children,t);if(-1!==c)return n.children.splice(c,1),l.push(n),this._condense(l),this}a||n.leaf||!u(n,o)?r?(i++,n=r.children[i],a=!1):n=null:(l.push(n),s.push(i),i=0,r=n,n=n.children[0])}return this},i.prototype.toBBox=function(e){return e},i.prototype.compareMinX=function(e,t){return e.minX-t.minX},i.prototype.compareMinY=function(e,t){return e.minY-t.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(e){return this.data=e,this},i.prototype._all=function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},i.prototype._build=function(e,t,i,a){var n,o=i-t+1,l=this._maxEntries;if(o<=l)return r(n=p(e.slice(t,i+1)),this.toBBox),n;a||(a=Math.ceil(Math.log(o)/Math.log(l)),l=Math.ceil(o/Math.pow(l,a-1))),(n=p([])).leaf=!1,n.height=a;var s=Math.ceil(o/l),c=s*Math.ceil(Math.sqrt(l));d(e,t,i,c,this.compareMinX);for(var u=t;u<=i;u+=c){var h=Math.min(u+c-1,i);d(e,u,h,s,this.compareMinY);for(var f=u;f<=h;f+=s){var m=Math.min(f+s-1,h);n.children.push(this._build(e,f,m,a-1))}}return r(n,this.toBBox),n},i.prototype._chooseSubtree=function(e,t,i,r){for(;r.push(t),!t.leaf&&r.length-1!==i;){for(var a=1/0,n=1/0,o=void 0,l=0;l<t.children.length;l++){var c=t.children[l],u=s(c),h=(Math.max(c.maxX,e.maxX)-Math.min(c.minX,e.minX))*(Math.max(c.maxY,e.maxY)-Math.min(c.minY,e.minY))-u;h<n?(n=h,a=u<a?u:a,o=c):h===n&&u<a&&(a=u,o=c)}t=o||t.children[0]}return t},i.prototype._insert=function(e,t,i){var r=i?e:this.toBBox(e),a=[],o=this._chooseSubtree(r,this.data,t,a);for(o.children.push(e),n(o,r);t>=0&&a[t].children.length>this._maxEntries;)this._split(a,t),t--;this._adjustParentBBoxes(r,a,t)},i.prototype._split=function(e,t){var i=e[t],a=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,a);var o=this._chooseSplitIndex(i,n,a),l=p(i.children.splice(o,i.children.length-o));l.height=i.height,l.leaf=i.leaf,r(i,this.toBBox),r(l,this.toBBox),t?e[t-1].children.push(l):this._splitRoot(i,l)},i.prototype._splitRoot=function(e,t){this.data=p([e,t]),this.data.height=e.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(e,t,i){for(var r,n,o,l,c,u=1/0,h=1/0,p=t;p<=i-t;p++){var d=a(e,0,p,this.toBBox),f=a(e,p,i,this.toBBox),m=(n=void 0,o=void 0,l=void 0,n=Math.max(d.minX,f.minX),o=Math.max(d.minY,f.minY),Math.max(0,(l=Math.min(d.maxX,f.maxX))-n)*Math.max(0,Math.min(d.maxY,f.maxY)-o)),g=s(d)+s(f);m<u?(u=m,r=p,h=g<h?g:h):m===u&&g<h&&(h=g,r=p)}return r||i-t},i.prototype._chooseSplitAxis=function(e,t,i){var r=e.leaf?this.compareMinX:o,a=e.leaf?this.compareMinY:l;this._allDistMargin(e,t,i,r)<this._allDistMargin(e,t,i,a)&&e.children.sort(r)},i.prototype._allDistMargin=function(e,t,i,r){e.children.sort(r);for(var o=this.toBBox,l=a(e,0,t,o),s=a(e,i-t,i,o),u=c(l)+c(s),h=t;h<i-t;h++){var p=e.children[h];n(l,e.leaf?o(p):p),u+=c(l)}for(var d=i-t-1;d>=t;d--){var f=e.children[d];n(s,e.leaf?o(f):f),u+=c(s)}return u},i.prototype._adjustParentBBoxes=function(e,t,i){for(var r=i;r>=0;r--)n(t[r],e)},i.prototype._condense=function(e){for(var t=e.length-1,i=void 0;t>=0;t--)0===e[t].children.length?t>0?(i=e[t-1].children).splice(i.indexOf(e[t]),1):this.clear():r(e[t],this.toBBox)},i}()),lm.exports));function ly(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=lt(e);else{if("FeatureCollection"!==e.type)throw Error("invalid geojson");t=lt(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}}var l_=class{constructor(e=9){this.tree=new lg(e),this.tree.toBBox=ly}insert(e){if("Feature"!==e.type)throw Error("invalid feature");return e.bbox=e.bbox?e.bbox:lt(e),this.tree.insert(e),this}load(e){var t=[];return Array.isArray(e)?e.forEach(function(e){if("Feature"!==e.type)throw Error("invalid features");
249e.bbox=e.bbox?e.bbox:lt(e),t.push(e)}):oo(e,function(e){if("Feature"!==e.type)throw Error("invalid features");e.bbox=e.bbox?e.bbox:lt(e),t.push(e)}),this.tree.load(t),this}remove(e,t){if("Feature"!==e.type)throw Error("invalid feature");return e.bbox=e.bbox?e.bbox:lt(e),this.tree.remove(e,t),this}clear(){return this.tree.clear(),this}search(e){return n5(this.tree.search(ly(e)))}collides(e){return this.tree.collides(ly(e))}all(){return n5(this.tree.all())}toJSON(){return this.tree.toJSON()}fromJSON(e){return this.tree.fromJSON(e),this}};class lb{constructor(e=[],t=lx){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:i}=this,r=t[e];for(;e>0;){let a=e-1>>1,n=t[a];if(i(r,n)>=0)break;t[e]=n,e=a}t[e]=r}_down(e){let{data:t,compare:i}=this,r=this.length>>1,a=t[e];for(;e<r;){let r=1+(e<<1),n=t[r],o=r+1;if(o<this.length&&0>i(t[o],n)&&(r=o,n=t[o]),i(n,a)>=0)break;t[e]=n,e=r}t[e]=a}}function lx(e,t){return e<t?-1:+(e>t)}let lv=(3+8881784197001252e-31)*11102230246251565e-32;function lw(e,t,i,r,a){let n,o,l,s,c=t[0],u=r[0],h=0,p=0;u>c==u>-c?(n=c,c=t[++h]):(n=u,u=r[++p]);let d=0;if(h<e&&p<i)for(u>c==u>-c?(o=c+n,l=n-(o-c),c=t[++h]):(o=u+n,l=n-(o-u),u=r[++p]),n=o,0!==l&&(a[d++]=l);h<e&&p<i;)u>c==u>-c?(s=(o=n+c)-n,l=n-(o-s)+(c-s),c=t[++h]):(s=(o=n+u)-n,l=n-(o-s)+(u-s),u=r[++p]),n=o,0!==l&&(a[d++]=l);for(;h<e;)s=(o=n+c)-n,l=n-(o-s)+(c-s),c=t[++h],n=o,0!==l&&(a[d++]=l);for(;p<i;)s=(o=n+u)-n,l=n-(o-s)+(u-s),u=r[++p],n=o,0!==l&&(a[d++]=l);return 0===n&&0!==d||(a[d++]=n),d}function lz(e){return new Float64Array(e)}let lS=lz(4),lT=lz(8),lk=lz(12),lE=lz(16),lM=lz(4);function lP(e,t,i,r,a,n){let o=(t-n)*(i-a),l=(e-a)*(r-n),s=o-l;if(0===o||0===l||o>0!=l>0)return s;let c=Math.abs(o+l);return Math.abs(s)>=33306690738754716e-32*c?s:-function(e,t,i,r,a,n,o){let l,s,c,u,h,p,d,f,m,g,y,_,b,x,v,w,z,S,T=e-a,k=i-a,E=t-n,M=r-n;x=T*M,d=(p=0x8000001*T)-(p-T),f=T-d,m=(p=0x8000001*M)-(p-M),v=f*(g=M-m)-(x-d*m-f*m-d*g),w=E*k,d=(p=0x8000001*E)-(p-E),f=E-d,m=(p=0x8000001*k)-(p-k),y=v-(z=f*(g=k-m)-(w-d*m-f*m-d*g)),h=v-y,lS[0]=v-(y+h)+(h-z),h=(_=x+y)-x,y=(b=x-(_-h)+(y-h))-w,h=b-y,lS[1]=b-(y+h)+(h-w),h=(S=_+y)-_,lS[2]=_-(S-h)+(y-h),lS[3]=S;let P=function(e,t){let i=t[0];for(let e=1;e<4;e++)i+=t[e];return i}(0,lS),I=22204460492503146e-32*o;if(P>=I||-P>=I||(h=e-T,l=e-(T+h)+(h-a),h=i-k,c=i-(k+h)+(h-a),h=t-E,s=t-(E+h)+(h-n),h=r-M,u=r-(M+h)+(h-n),0===l&&0===s&&0===c&&0===u)||(I=11093356479670487e-47*o+lv*Math.abs(P),(P+=T*u+M*l-(E*c+k*s))>=I||-P>=I))return P;x=l*M,d=(p=0x8000001*l)-(p-l),f=l-d,m=(p=0x8000001*M)-(p-M),v=f*(g=M-m)-(x-d*m-f*m-d*g),w=s*k,d=(p=0x8000001*s)-(p-s),f=s-d,m=(p=0x8000001*k)-(p-k),y=v-(z=f*(g=k-m)-(w-d*m-f*m-d*g)),h=v-y,lM[0]=v-(y+h)+(h-z),h=(_=x+y)-x,y=(b=x-(_-h)+(y-h))-w,h=b-y,lM[1]=b-(y+h)+(h-w),h=(S=_+y)-_,lM[2]=_-(S-h)+(y-h),lM[3]=S;let A=lw(4,lS,4,lM,lT);x=T*u,d=(p=0x8000001*T)-(p-T),f=T-d,m=(p=0x8000001*u)-(p-u),v=f*(g=u-m)-(x-d*m-f*m-d*g),w=E*c,d=(p=0x8000001*E)-(p-E),f=E-d,m=(p=0x8000001*c)-(p-c),y=v-(z=f*(g=c-m)-(w-d*m-f*m-d*g)),h=v-y,lM[0]=v-(y+h)+(h-z),h=(_=x+y)-x,y=(b=x-(_-h)+(y-h))-w,h=b-y,lM[1]=b-(y+h)+(h-w),h=(S=_+y)-_,lM[2]=_-(S-h)+(y-h),lM[3]=S;let C=lw(A,lT,4,lM,lk);x=l*u,d=(p=0x8000001*l)-(p-l),f=l-d,m=(p=0x8000001*u)-(p-u),v=f*(g=u-m)-(x-d*m-f*m-d*g),w=s*c,d=(p=0x8000001*s)-(p-s),f=s-d,m=(p=0x8000001*c)-(p-c),y=v-(z=f*(g=c-m)-(w-d*m-f*m-d*g)),h=v-y,lM[0]=v-(y+h)+(h-z),h=(_=x+y)-x,y=(b=x-(_-h)+(y-h))-w,h=b-y,lM[1]=b-(y+h)+(h-w),h=(S=_+y)-_,lM[2]=_-(S-h)+(y-h),lM[3]=S;let R=lw(C,lk,4,lM,lE);return lE[R-1]}(e,t,i,r,a,n,c)}function lI(e,t){return e.p.x>t.p.x?1:e.p.x<t.p.x?-1:e.p.x!==t.p.x||e.featureId===t.featureId&&e.ringId===t.ringId||!e.isLeftEndpoint||t.isLeftEndpoint?e.p.y!==t.p.y?e.p.y>t.p.y?1:-1:1:-1}function lA(e,t){return e.rightSweepEvent.p.x>t.rightSweepEvent.p.x?1:e.rightSweepEvent.p.x<t.rightSweepEvent.p.x?-1:e.rightSweepEvent.p.y!==t.rightSweepEvent.p.y?e.rightSweepEvent.p.y<t.rightSweepEvent.p.y?1:-1:1}var lC=0,lR=0,lL=0;function lD(e,t){let i="Feature"===e.type?e.geometry:e,r=i.coordinates;"Polygon"!==i.type&&"MultiLineString"!==i.type||(r=[r]),"LineString"===i.type&&(r=[[r]]);for(let e=0;e<r.length;e++)for(let i=0;i<r[e].length;i++){let a=r[e][i][0],n=null;lR+=1;for(let o=0;o<r[e][i].length-1;o++){n=r[e][i][o+1];let l=new lO(a,lC,lR,lL),s=new lO(n,lC,lR,lL+1);l.otherEvent=s,s.otherEvent=l,lI(l,s)>
2490?(s.isLeftEndpoint=!0,l.isLeftEndpoint=!1):(l.isLeftEndpoint=!0,s.isLeftEndpoint=!1),t.push(l),t.push(s),a=n,lL+=1}}lC+=1}var lO=class{constructor(e,t,i,r){this.p={x:e[0],y:e[1]},this.featureId=t,this.ringId=i,this.eventId=r,this.otherEvent=null,this.isLeftEndpoint=null}isSamePoint(e){return this.p.x===e.p.x&&this.p.y===e.p.y}asNewXY(){return[this.p.x,this.p.y]}},lF=class{constructor(e){this.leftSweepEvent=e,this.rightSweepEvent=e.otherEvent}};function lj(e,t,i={}){let{removeDuplicates:r=!0,ignoreSelfIntersections:a=!0}=i,n=[];"FeatureCollection"===e.type?n=n.concat(e.features):"Feature"===e.type?n.push(e):"LineString"!==e.type&&"Polygon"!==e.type&&"MultiLineString"!==e.type&&"MultiPolygon"!==e.type||n.push(n1(e)),"FeatureCollection"===t.type?n=n.concat(t.features):"Feature"===t.type?n.push(t):"LineString"!==t.type&&"Polygon"!==t.type&&"MultiLineString"!==t.type&&"MultiPolygon"!==t.type||n.push(n1(t));let o=function(e,t){let i=new lb([],lI);return function(e,t){if("FeatureCollection"===e.type){let i=e.features;for(let e=0;e<i.length;e++)lD(i[e],t)}else lD(e,t)}(e,i),function(e,t=!1){let i=[],r=new lb([],lA);for(;e.length;){let a=e.pop();if(a.isLeftEndpoint){let e=new lF(a);for(let n=0;n<r.data.length;n++){let o=r.data[n];if(t&&o.leftSweepEvent.featureId===a.featureId)continue;let l=function(e,t){if(null===e||null===t)return!1;let i=e.leftSweepEvent.p.x,r=e.leftSweepEvent.p.y,a=e.rightSweepEvent.p.x,n=e.rightSweepEvent.p.y,o=t.leftSweepEvent.p.x,l=t.leftSweepEvent.p.y,s=t.rightSweepEvent.p.x,c=t.rightSweepEvent.p.y,u=lP(i,r,a,n,o,l),h=lP(i,r,a,n,s,c);if(u>0&&h>0||u<0&&h<0)return!1;if(e.leftSweepEvent.ringId===t.leftSweepEvent.ringId){if(e.rightSweepEvent.isSamePoint(t.leftSweepEvent)||e.rightSweepEvent.isSamePoint(t.rightSweepEvent)||e.leftSweepEvent.isSamePoint(t.leftSweepEvent)||e.leftSweepEvent.isSamePoint(t.rightSweepEvent))return!1}else{if(e.rightSweepEvent.isSamePoint(t.leftSweepEvent))return t.leftSweepEvent.asNewXY();if(e.rightSweepEvent.isSamePoint(t.rightSweepEvent))return t.rightSweepEvent.asNewXY();if(e.leftSweepEvent.isSamePoint(t.leftSweepEvent))return t.leftSweepEvent.asNewXY();if(e.leftSweepEvent.isSamePoint(t.rightSweepEvent))return t.rightSweepEvent.asNewXY()}let p=(c-l)*(a-i)-(s-o)*(n-r),d=(s-o)*(r-l)-(c-l)*(i-o),f=(a-i)*(r-l)-(n-r)*(i-o);if(0===p)return!1;let m=d/p,g=f/p;return m>=0&&m<=1&&g>=0&&g<=1&&[i+m*(a-i),r+m*(n-r)]}(e,o);!1!==l&&i.push(l)}r.push(e)}else!1===a.isLeftEndpoint&&r.pop()}return i}(i,t)}(n5(n),a),l=[];if(r){let e={};o.forEach(t=>{let i=t.join(",");e[i]||(e[i]=!0,l.push(t))})}else l=o;return n5(l.map(e=>n0(e)))}var lB=Object.defineProperty,lN=Object.defineProperties,lU=Object.getOwnPropertyDescriptors,lV=Object.getOwnPropertySymbols,l$=Object.prototype.hasOwnProperty,lZ=Object.prototype.propertyIsEnumerable,lG=(e,t,i)=>t in e?lB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,lq=(e,t)=>{for(var i in t||(t={}))l$.call(t,i)&&lG(e,i,t[i]);if(lV)for(var i of lV(t))lZ.call(t,i)&&lG(e,i,t[i]);return e},lH=(e,t)=>lN(e,lU(t));function lW(e,t){let[i,r,a]=e,[n,o,l]=t;return i*n+r*o+a*l}function lX(e,t){let[i,r,a]=e,[n,o,l]=t;return[r*l-a*o,a*n-i*l,i*o-r*n]}function lY(e){let t=Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2));return[e[0]/t,e[1]/t,e[2]/t]}function lK(e){let t=n7(e[1]),i=n7(e[0]);return[Math.cos(t)*Math.cos(i),Math.cos(t)*Math.sin(i),Math.sin(t)]}function lJ(e,t){var i=[],r=new l_(void 0);return ol(t,function(t){if(i.forEach(function(e,t){e.id=t}),i.length){var a=r.search(t);if(a.features.length){var n=l1(t,a);i=i.filter(function(e){return e.id!==n.id}),r.remove(n),oo(lQ(n,t),function(e){i.push(e),r.insert(e)})}}else i=lQ(e,t).features,r.load(n5(i))}),n5(i)}function lQ(e,t){var i,r,a,n=[],o=ot(e)[0],l=ot(e)[e.geometry.coordinates.length-1];if(l0(o,oe(t))||l0(l,oe(t)))return n5([e]);var s=new l_(void 0),c=function(e){if(!e)throw Error("geojson is required");let t=[];return ol(e,e=>{let i=[],r=e.geometry;if(null!==r){switch(r.type){case"Polygon":i=ot(r);break;case"LineString":i=[ot(r)]}i.forEach(i=>{(function(e,t){let i=[];return e.reduce((e,r)=>{let a=n3([e,r],t);return a.bbox=function(e,t){let i=e[0],r=e[1],a=t[0],n=t[1];return[i<a?i:a,r<n?r:n,i>a?i:a,r>n?r:n]}(e,r),i.push(a),r}),i}
249)(i,e.properties).forEach(e=>{e.id=t.length,t.push(e)})})}}),n5(t)}(e);s.load(c);var u=s.search(t);if(!u.features.length)return n5([e]);var h=l1(t,u),p=(i=function(e,i,r){var a=ot(i)[1],o=oe(t);return r===h.id?(e.push(o),n.push(n3(e)),l0(o,a)?[o]:[o,a]):(e.push(a),e)},a=r=[o],oo(c,function(e,t){a=0===t&&void 0===r?e:i(a,e,t)}),a);return p.length>1&&n.push(n3(p)),n5(n)}function l1(e,t){if(!t.features.length)throw Error("lines must contain features");if(1===t.features.length)return t.features[0];var i,r=1/0;return oo(t,function(t){var a=function(e,t,i={}){if(!e||!t)throw Error("lines and inputPoint are required arguments");let r=oe(t),a=n0([1/0,1/0],{lineStringIndex:-1,segmentIndex:-1,totalDistance:-1,lineDistance:-1,segmentDistance:-1,pointDistance:1/0,multiFeatureIndex:-1,index:-1,location:-1,dist:1/0}),n=0,o=0,l=-1;return ol(e,function(e,s,c){l!==c&&(l=c,o=0);let u=ot(e);for(let e=0;e<u.length-1;e++){let l,s,h=n0(u[e]),p=oe(h),d=n0(u[e+1]),f=oe(d),m=oa(h,d,i);f[0]===r[0]&&f[1]===r[1]?[l,s]=[f,!0]:p[0]===r[0]&&p[1]===r[1]?[l,s]=[p,!1]:[l,s]=function(e,t,i){let r=lK(e),a=lK(t),n=lK(i),o=lX(r,a);if(0===o[0]&&0===o[1]&&0===o[2])return lW(r,a)>0?[[...t],!0]:[[...i],!1];let l=lX(o,n);if(0===l[0]&&0===l[1]&&0===l[2])return[[...t],!0];let s=lY(lX(l,o)),c=[-s[0],-s[1],-s[2]],u=lW(n,s)>lW(n,c)?s:c,h=lY(o),p=lW(lX(r,u),h),d=lW(lX(u,a),h);return p>=0&&d>=0?[function(e){let[t,i,r]=e,a=n8(Math.asin(Math.min(Math.max(r,-1),1)));return[n8(Math.atan2(i,t)),a]}(u),!1]:lW(r,n)>lW(a,n)?[[...e],!1]:[[...t],!0]}(p,f,r);let g=oa(t,l,i);if(g<a.properties.pointDistance){let t=oa(h,l,i);(a=n0(l,{lineStringIndex:c,segmentIndex:s?e+1:e,totalDistance:n+t,lineDistance:o+t,segmentDistance:t,pointDistance:g,multiFeatureIndex:-1,index:-1,location:-1,dist:1/0})).properties=lH(lq({},a.properties),{multiFeatureIndex:a.properties.lineStringIndex,index:a.properties.segmentIndex,location:a.properties.totalDistance,dist:a.properties.pointDistance})}n+=m,o+=m}}),a}(t,e).properties.pointDistance;a<r&&(i=t,r=a)}),i}function l0(e,t){return e[0]===t[0]&&e[1]===t[1]}function l2(e,t){let i=e.coordinates,r=[];for(let e=0;e<i.length-1;e++){let a=n3([i[e],i[e+1]]),n=function(e,t){if(!e)throw Error("line is required");if(!t)throw Error("splitter is required");let i=or(e),r=or(t);if("LineString"!==i)throw Error("line must be LineString");if("FeatureCollection"===r)throw Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===r)throw Error("splitter cannot be a GeometryCollection");var a=function(e,t){if(null===(i=t=null!=t?t:{})||"object"!=typeof i||Array.isArray(i))throw Error("options is invalid");var i,r=t.precision,a=t.coordinates,n=t.mutate;if(r=null==r||isNaN(r)?6:r,a=null==a||isNaN(a)?3:a,!e)throw Error("<geojson> is required");if("number"!=typeof r)throw Error("<precision> must be a number");if("number"!=typeof a)throw Error("<coordinates> must be a number");!1!==n&&void 0!==n||(e=JSON.parse(JSON.stringify(e)));var o=Math.pow(10,r);return on(e,function(e){var t=a;e.length>t&&e.splice(t,e.length);for(var i=0;i<e.length;i++)e[i]=Math.round(e[i]*o)/o}),e}(t,{precision:7});switch("Feature"!==e.type&&(e=n1(e)),r){case"Point":return lQ(e,a);case"MultiPoint":return lJ(e,a);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return lJ(e,lj(e,a,{ignoreSelfIntersections:!0}))}}(a,n1(t));0===n.features.length?r.push(a):r.push(...n.features)}return n5(r)}function l3(e,t){return"interior"===l5(e,t)}function l5(e,t){if(!l4(lt(e),lt(t)))return"outside";for(let i of t.coordinates)if(!lc(i,e))return"outside";let i=!1;for(let r of l2(t,e).features){let t=l7(r.geometry.coordinates[0],r.geometry.coordinates[1]);if(!lc(t,e))return"outside";!i&&lc(t,e,{ignoreBoundary:!0})&&(i=!0)}return i?"interior":"boundary"}function l6(e,t,i){if("Feature"===e.type&&null===e.geometry||"Feature"===t.type&&null===t.geometry||!l4(lt(e),null!=i?i:lt(t)))return!1;let r=oi(e);for(let i of oi(t).coordinates){for(let t of i)if(!lc(t,e))return!1;for(let t of l2({coordinates:i},r).features){let i=l7(t.geometry.coordinates[0],t.geometry.coordinates[1]);if(!lc(i,e)&&!function(e,t){return t.coordinates.some(t=>{for(let i=0;i<t.length-1;i++)if(1e-6>=function(e,t,i){let r=i[0]-t[0],a=i[1]-t[1],n=r*r+a*a,o=0;n>0&&(o=Math.max(0,Math.min(1,o=((e[0]-t[0])*r+(e[1]-t[1])*a)/n)));let l=t[0]+o*r,s=t[1]+o*a,c=e[0]-l,u=e[1]-s;return Math.sqrt(c*c+u*u)}(e,t[i],t[i+1]))return!0;return!1})}(i,r))return!1}}return!0}function l4(e,t){return!(e[0]>t[0])&&!(e[2]<t[2])&&!(e[1]>t[1])&&!(e[3]<t[3])}function l8(e,t){return e[0]===t[0]&&e[1]===t[1]}function l7(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}function l9(e,t={}){let i=oi(e);switch(t.properties||"Feature"!==e.type||(t.properties=e.properties),i.type){case"Polygon":return function(e,t={}){return se(oi(e).coordinates,t.properties?t.properties:"Feature"===e.type?e.properties:{})}(i,t);case"MultiPolygon":return function(e,t={}){let i=oi(e).coordinates,r=t.properties?t.properties:"Feature"===e.type?e.properties:{},a=[];
249return i.forEach(e=>{a.push(se(e,r))}),n5(a)}(i,t);default:throw Error("invalid poly")}}function se(e,t){return e.length>1?n6(e,t):n3(e[0],t)}function st(e,t){for(let i=0;i<e.coordinates.length-1;i++)if(function(e,t,i){let r=i[0]-e[0],a=i[1]-e[1],n=t[0]-e[0],o=t[1]-e[1];return 0==r*o-a*n&&(Math.abs(n)>=Math.abs(o)?n>0?e[0]<=i[0]&&i[0]<=t[0]:t[0]<=i[0]&&i[0]<=e[0]:o>0?e[1]<=i[1]&&i[1]<=t[1]:t[1]<=i[1]&&i[1]<=e[1])}(e.coordinates[i],e.coordinates[i+1],t.coordinates))return!0;return!1}function si(e,t,i){for(let i of t.coordinates)if(lc(i,e))return!0;return lj(t,l9(e),{ignoreSelfIntersections:i}).features.length>0}var sr=function(e,t,{ignoreSelfIntersections:i=!0}={}){return!function(e,t,{ignoreSelfIntersections:i=!0}={ignoreSelfIntersections:!0}){let r=!0;return ol(e,e=>{ol(t,t=>{if(!1===r)return!1;r=function(e,t,i){var r,a;switch(e.type){case"Point":switch(t.type){case"Point":return r=e.coordinates,a=t.coordinates,r[0]!==a[0]||r[1]!==a[1];case"LineString":return!st(t,e);case"Polygon":return!lc(e,t)}break;case"LineString":switch(t.type){case"Point":return!st(e,t);case"LineString":return!function(e,t,i){if(lj(e,t,{ignoreSelfIntersections:i}).features.length>0)return!0;for(let i of e.coordinates)if(st(t,{coordinates:i}))return!0;for(let i of t.coordinates)if(st(e,{coordinates:i}))return!0;return!1}(e,t,i);case"Polygon":return!si(t,e,i)}break;case"Polygon":switch(t.type){case"Point":return!lc(t,e);case"LineString":return!si(e,t,i);case"Polygon":return!function(e,t,i){for(let i of e.coordinates[0])if(lc(i,t))return!0;for(let i of t.coordinates[0])if(lc(i,e))return!0;return lj(l9(e),l9(t),{ignoreSelfIntersections:i}).features.length>0}(t,e,i)}}return!1}(e.geometry,t.geometry,i)})}),r}(e,t,{ignoreSelfIntersections:i})};let sa={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function sn(e,t,i,r=!1){let a=String(t),n=(e,t)=>`�[${t[0]}m${e}�[${t[1]}m`,o=(e,t)=>null!=t&&"string"==typeof t?n(e,sa[t]):null!=t&&Array.isArray(t)?t.reduce((e,t)=>o(e,t),e):null!=t&&null!=t[e.trim()]?o(e,t[e.trim()]):null!=t&&null!=t["*"]?o(e,t["*"]):e;return a.replace(/{{(.+?)}}/g,(t,a)=>{let l=null!=i[a]?String(i[a]):r?"":t;return e.stylePrettyLogs?o(l,e?.prettyLogStyles?.[a]??null)+n("",sa.reset):l})}
249function so(e,t=2,i=0){return null!=e&&isNaN(e)?"":(e=null!=e?e+i:e,2===t?null==e?"--":e<10?"0"+e:e.toString():null==e?"---":e<10?"00"+e:e<100?"0"+e:e.toString())}function sl(e){let t=new Set;return JSON.stringify(e,(e,i)=>{if("object"==typeof i&&null!==i){if(t.has(i))return"[Circular]";t.add(i)}return"bigint"==typeof i?`${i}`:i})}function ss(e,t){let i={seen:[],stylize:su};return null!=t&&sS(i,t),sc(i.showHidden)&&(i.showHidden=!1),sc(i.depth)&&(i.depth=2),sc(i.colors)&&(i.colors=!0),sc(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=sh),sv(i,e,i.depth)}function sc(e){return void 0===e}function su(e){return e}function sh(e,t){let i=ss.styles[t];return null!=i&&null!=ss?.colors?.[i]?.[0]&&null!=ss?.colors?.[i]?.[1]?"\x1b["+ss.colors[i][0]+"m"+e+"\x1b["+ss.colors[i][1]+"m":e}function sp(e){return"function"==typeof e}function sd(e){return"string"==typeof e}function sf(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function sm(e){return sg(e)&&"[object RegExp]"===sb(e)}function sg(e){return"object"==typeof e&&null!==e}function sy(e){return sg(e)&&("[object Error]"===sb(e)||e instanceof Error)}function s_(e){return sg(e)&&"[object Date]"===sb(e)}function sb(e){return Object.prototype.toString.call(e)}function sx(e){return"["+Error.prototype.toString.call(e)+"]"}function sv(e,t,i=0){var r,a;if(e.customInspect&&null!=t&&sp(t)&&t?.inspect!==ss&&(!t?.constructor||t?.constructor.prototype!==t)){if("function"!=typeof t.inspect&&null!=t.toString)return t.toString();let r=t?.inspect(i,e);return sd(r)||(r=sv(e,r,i)),r}let n=sz(e,t);if(n)return n;let o=Object.keys(t),l=function(e){let t={};return e.forEach(e=>{t[e]=!0}),t}(o);try{e.showHidden&&Object.getOwnPropertyNames&&(o=Object.getOwnPropertyNames(t))}catch(e){}if(sy(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return sx(t);if(0===o.length){if(!sp(e.stylize))return t;if(sp(t)){let i=t.name?": "+t.name:"";return e.stylize("[Function"+i+"]","special")}if(sm(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(s_(t))return e.stylize(Date.prototype.toISOString.call(t),"date");if(sy(t))return sx(t)}let s,c="",u=!1,h=["{\n","\n}"];return Array.isArray(t)&&(u=!0,h=["[\n","\n]"]),sp(t)&&(c=" [Function"+(t.name?": "+t.name:"")+"]"),sm(t)&&(c=" "+RegExp.prototype.toString.call(t)),s_(t)&&(c=" "+Date.prototype.toUTCString.call(t)),sy(t)&&(c=" "+sx(t)),0!==o.length||u&&0!=t.length?i<0?sm(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),s=u?function(e,t,i,r,a){let n=[];for(let a=0,o=t.length;a<o;++a)sf(t,String(a))?n.push(sw(e,t,i,r,String(a),!0)):n.push("");return a.forEach(a=>{a.match(/^\d+$/)||n.push(sw(e,t,i,r,a,!0))}),n}(e,t,i,l,o):o.map(r=>sw(e,t,i,l,r,u)),e.seen.pop(),r=c,(a=h)[0]+(""===r?"":r+"\n")+"  "+s.join(",\n  ")+" "+a[1]):h[0]+c+h[1]}function sw(e,t,i,r,a,n){let o,l,s={value:void 0};try{s.value=t[a]}catch(e){}try{Object.getOwnPropertyDescriptor&&(s=Object.getOwnPropertyDescriptor(t,a)||s)}catch(e){}if(s.get?l=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(l=e.stylize("[Setter]","special")),sf(r,a)||(o="["+a+"]"),l||(0>e.seen.indexOf(s.value)?(l=null===i?sv(e,s.value,void 0):sv(e,s.value,i-1)).indexOf("\n")>-1&&(l=n?l.split("\n").map(e=>"  "+e).join("\n").substr(2):"\n"+l.split("\n").map(e=>"   "+e).join("\n")):l=e.stylize("[Circular]","special")),sc(o)){if(n&&a.match(/^\d+$/))return l;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,"\\'").replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+l}function sz(e,t){if(sc(t))return e.stylize("undefined","undefined");if(sd(t)){let i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\\'")+"'";return e.stylize(i,"string")}return"number"==typeof t?e.stylize(""+t,"number"):"boolean"==typeof t?e.stylize(""+t,"boolean"):null===t?e.stylize("null","null"):void 0}function sS(e,t){let i={...e};if(!t||!sg(t))return e;let r={...t},a=Object.keys(t),n=a.length;for(;n--;)i[a[n]]=r[a[n]];return i}ss.colors=sa,ss.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var sT={getCallerStackFrame:sM,getErrorTrace:sP,getMeta:function(e,t,i,r,a,n){return Object.assign({},sk,{name:a,parentNames:n,date:new Date,logLevelId:e,logLevelName:t,path:r?void 0:sM(i)})},transportJSON:function(e){console.log(sl(e))},transportFormatted:function(e,t,i,r){let a=(i.length>0&&t.length>0?"\n":"")+i.join("\n");r.prettyInspectOptions.colors=r.stylePrettyLogs,console.log(e+function(e,...t){let i={seen:[],stylize:su};null!=e&&sS(i,e);let r=t[0],a=0,n="",o="";if("string"==typeof r){if(1===t.length)return r;let l,s=0;for(let o=0;o<r.length-1;o++)if(37===r.charCodeAt(o)){let c=r.charCodeAt(++o);if(a+1!==t.length){switch(c){case 115:{let r=t[++a];l="number"==typeof r||"bigint"==typeof r?sz(i,r):"object"!=typeof r||null===r?String(r):ss(r,{...e,compact:3,colors:!1,depth:0});break}case 106:l=sl(t[++a]);break;case 100:{let e=t[++a];l="bigint"==typeof e?sz(i,e):"symbol"==typeof e?"NaN":sz(i,e);break}case 79:l=ss(t[++a],e);break;case 111:l=ss(t[++a],{...e,showHidden:!0,showProxy:!0,depth:4});break;case 105:{let e=t[++a];l="bigint"==typeof e?sz(i,e):"symbol"==typeof e?"NaN":sz(i,parseInt(l));break}case 102:{let e=t[++a];l="symbol"==typeof e?"NaN":sz(i,parseInt(e));break}case 99:a+=1,l="";break;case 37:n+=r.slice(s,o),s=o+1;continue;default:continue}s!==o-1&&(n+=r.slice(s,o-1)),n+=l,s=o+1}else 37===c&&(n+=r.slice(s,o),s=o+1)}0!==s&&(a++,o=" ",s<r.length&&(n+=r.slice(s)))}for(;a<t.length;){let i=t[a];n+=o,n+="string"!=typeof i?ss(i,e):i,o=" ",a++}return n}(r.prettyInspectOptions,...t)+a)},isBuffer:function(e){return!1},isError:sA,prettyFormatLogObj:function(e,t){return e.reduce((e,i)=>(sA(i)?e.errors.push(sC(i,t)):e.args.push(i),e),{args:[],errors:[]})},prettyFormatErrorObj:sC};let sk={runtime:[typeof window,typeof document].includes("undefined")?"Generic":"Browser",browser:globalThis?.navigator?.userAgent},sE=/(?:(?:file|https?|global code|[^@]+)@)?(?:file:)?((?:\/[^:/]+){2,})(?::(\d+))?(?::(\d+))?/;
249function sM(e,t=Error()){return sI(t?.stack?.split("\n")?.filter(e=>!e.includes("Error: "))?.[e])}function sP(e){return(e?.stack?.split("\n")??[])?.filter(e=>!e.includes("Error: "))?.reduce((e,t)=>(e.push(sI(t)),e),[])}function sI(e){let t=globalThis?.location?.origin,i={fullFilePath:void 0,fileName:void 0,fileNameWithLine:void 0,fileColumn:void 0,fileLine:void 0,filePath:void 0,filePathWithLine:void 0,method:void 0};if(null!=e){let r=e.match(sE);if(r){i.filePath=r[1].replace(/\?.*$/,""),i.fullFilePath=`${t}${i.filePath}`;let e=i.filePath.split("/");i.fileName=e[e.length-1],i.fileLine=r[2],i.fileColumn=r[3],i.filePathWithLine=`${i.filePath}:${i.fileLine}`,i.fileNameWithLine=`${i.fileName}:${i.fileLine}`}}return i}function sA(e){return e instanceof Error}function sC(e,t){let i=sP(e).map(e=>sn(t,t.prettyErrorStackTemplate,{...e},!0)),r={errorName:` ${e.name} `,errorMessage:Object.getOwnPropertyNames(e).reduce((t,i)=>("stack"!==i&&t.push(e[i]),t),[]).join(", "),errorStack:i.join("\n")};return sn(t,t.prettyErrorTemplate,r)}class sR{constructor(e,t,i=4){this.logObj=t,this.stackDepthLevel=i,this.runtime=sT,this.settings={type:e?.type??"pretty",name:e?.name,parentNames:e?.parentNames,minLevel:e?.minLevel??0,argumentsArrayName:e?.argumentsArrayName,hideLogPositionForProduction:e?.hideLogPositionForProduction??!1,prettyLogTemplate:e?.prettyLogTemplate??"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}	{{logLevelName}}	{{filePathWithLine}}{{nameWithDelimiterPrefix}}	",prettyErrorTemplate:e?.prettyErrorTemplate??"\n{{errorName}} {{errorMessage}}\nerror stack:\n{{errorStack}}",prettyErrorStackTemplate:e?.prettyErrorStackTemplate??"  • {{fileName}}	{{method}}\n	{{filePathWithLine}}",prettyErrorParentNamesSeparator:e?.prettyErrorParentNamesSeparator??":",prettyErrorLoggerNameDelimiter:e?.prettyErrorLoggerNameDelimiter??"	",stylePrettyLogs:e?.stylePrettyLogs??!0,prettyLogTimeZone:e?.prettyLogTimeZone??"UTC",prettyLogStyles:e?.prettyLogStyles??{logLevelName:{"*":["bold","black","bgWhiteBright","dim"],SILLY:["bold","white"],TRACE:["bold","whiteBright"],DEBUG:["bold","green"],INFO:["bold","blue"],WARN:["bold","yellow"],ERROR:["bold","red"],FATAL:["bold","redBright"]},dateIsoStr:"white",filePathWithLine:"white",name:["white","bold"],nameWithDelimiterPrefix:["white","bold"],nameWithDelimiterSuffix:["white","bold"],errorName:["bold","bgRedBright","whiteBright"],fileName:["yellow"],fileNameWithLine:"white"},prettyInspectOptions:e?.prettyInspectOptions??{colors:!0,compact:!1,depth:1/0},metaProperty:e?.metaProperty??"_meta",maskPlaceholder:e?.maskPlaceholder??"[***]",maskValuesOfKeys:e?.maskValuesOfKeys??["password"],maskValuesOfKeysCaseInsensitive:e?.maskValuesOfKeysCaseInsensitive??!1,maskValuesRegEx:e?.maskValuesRegEx,prefix:[...e?.prefix??[]],attachedTransports:[...e?.attachedTransports??[]],over
249write:{mask:e?.overwrite?.mask,toLogObj:e?.overwrite?.toLogObj,addMeta:e?.overwrite?.addMeta,addPlaceholders:e?.overwrite?.addPlaceholders,formatMeta:e?.overwrite?.formatMeta,formatLogObj:e?.overwrite?.formatLogObj,transportFormatted:e?.overwrite?.transportFormatted,transportJSON:e?.overwrite?.transportJSON}}}log(e,t,...i){let r,a;if(e<this.settings.minLevel)return;let n=[...this.settings.prefix,...i],o=null!=this.settings.overwrite?.mask?this.settings.overwrite?.mask(n):null!=this.settings.maskValuesOfKeys&&this.settings.maskValuesOfKeys.length>0?this._mask(n):n,l=null!=this.logObj?this._recursiveCloneAndExecuteFunctions(this.logObj):void 0,s=null!=this.settings.overwrite?.toLogObj?this.settings.overwrite?.toLogObj(o,l):this._toLogObj(o,l),c=null!=this.settings.overwrite?.addMeta?this.settings.overwrite?.addMeta(s,e,t):this._addMetaToLogObj(s,e,t);return null!=this.settings.overwrite?.formatMeta&&(r=this.settings.overwrite?.formatMeta(c?.[this.settings.metaProperty])),null!=this.settings.overwrite?.formatLogObj&&(a=this.settings.overwrite?.formatLogObj(o,this.settings)),"pretty"===this.settings.type&&(r=r??this._prettyFormatLogObjMeta(c?.[this.settings.metaProperty]),a=a??this.runtime.prettyFormatLogObj(o,this.settings)),null!=r&&null!=a?null!=this.settings.overwrite?.transportFormatted?this.settings.overwrite?.transportFormatted(r,a.args,a.errors,this.settings):this.runtime.transportFormatted(r,a.args,a.errors,this.settings):null!=this.settings.overwrite?.transportJSON?this.settings.overwrite?.transportJSON(c):"hidden"!==this.settings.type&&this.runtime.transportJSON(c),null!=this.settings.attachedTransports&&this.settings.attachedTransports.length>0&&this.settings.attachedTransports.forEach(e=>{e(c)}),c}attachTransport(e){this.settings.attachedTransports.push(e)}getSubLogger(e,t){let i={...this.settings,...e,parentNames:null!=this.settings?.parentNames&&null!=this.settings?.name?[...this.settings.parentNames,this.settings.name]:null!=this.settings?.name?[this.settings.name]:void 0,prefix:[...this.settings.prefix,...e?.prefix??[]]};return new this.constructor(i,t??this.logObj,this.stackDepthLevel)}_mask(e){let t=!0!==this.settings.maskValuesOfKeysCaseInsensitive?this.settings.maskValuesOfKeys:this.settings.maskValuesOfKeys.map(e=>e.toLowerCase());return e?.map(e=>this._recursiveCloneAndMaskValuesOfKeys(e,t))}_recursiveCloneAndMaskValuesOfKeys(e,t,i=[]){if(i.includes(e))return{...e};if("object"==typeof e&&null!==e&&i.push(e),this.runtime.isError(e)||this.runtime.isBuffer(e))return e;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(Array.isArray(e))return e.map(e=>this._recursiveCloneAndMaskValuesOfKeys(e,t,i));if(e instanceof Date)return new Date(e.getTime());if(e instanceof URL)return{href:e.href,protocol:e.protocol,username:e.username,password:e.password,host:e.host,hostname:e.hostname,port:e.port,pathname:e.pathname,search:e.search,searchParams:[...e.searchParams].map(([e,t])=>({key:e,value:t})),hash:e.hash,origin:e.origin};if(null!==e&&"object"==typeof e){let r=this.runtime.isError(e)?this._cloneError(e):Object.create(Object.getPrototypeOf(e));return Object.getOwnPropertyNames(e).reduce((r,a)=>(r[a]=t.includes(!0!==this.settings?.maskValuesOfKeysCaseInsensitive?a:a.toLowerCase())?this.settings.maskPlaceholder:(()=>{try{return this._recursiveCloneAndMaskValuesOfKeys(e[a],t,i)}catch(e){return null}})(),r),r)}if("string"==typeof e){let t=e;for(let e of this.settings?.maskValuesRegEx||[])t=t.replace(e,this.settings?.maskPlaceholder||"");return t}return e}_recursiveCloneAndExecuteFunctions(e,t=[]){return this.isObjectOrArray(e)&&t.includes(e)?this.shallowCopy(e):(this.isObjectOrArray(e)&&t.push(e),Array.isArray(e)?e.map(e=>this._recursiveCloneAndExecuteFunctions(e,t)):e instanceof Date?new Date(e.getTime()):this.isObject(e)?Object.getOwnPropertyNames(e).reduce((i,r)=>{let a=Object.getOwnPropertyDescriptor(e,r);if(a){Object.defineProperty(i,r,a);let n=e[r];i[r]="function"==typeof n?n():this._recursiveCloneAndExecuteFunctions(n,t)}return i},Object.create(Object.getPrototypeOf(e))):e)}isObjectOrArray(e){return"object"==typeof e&&null!==e}isObject(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}shallowCopy(e){return Array.isArray(e)?[...e]:{...e}}_toLogObj(e,t={}){return e=e?.map(e=>this.runtime.isError(e)?this._toErrorObject(e):e),t=null==this.settings.argumentsArrayName?1!==e.length||Array.isArray(e[0])||!0===this.runtime.isBuffer(e[0])||e[0]instanceof Date?{...t,...e}:"object"==typeof e[0]&&null!=e[0]?{...e[0],...t}:{0:e[0],...t}:{...t,[this.settings.argumentsArrayName]:e}}_cloneError(e){let t=new e.constructor;return Object.getOwnPropertyNames(e).forEach(i=>
249{t[i]=e[i]}),t}_toErrorObject(e){return{nativeError:e,name:e.name??"Error",message:e.message,stack:this.runtime.getErrorTrace(e)}}_addMetaToLogObj(e,t,i){return{...e,[this.settings.metaProperty]:this.runtime.getMeta(t,i,this.stackDepthLevel,this.settings.hideLogPositionForProduction,this.settings.name,this.settings.parentNames)}}_prettyFormatLogObjMeta(e){if(null==e)return"";let t=this.settings.prettyLogTemplate,i={};t.includes("{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}")?t=t.replace("{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}","{{dateIsoStr}}"):"UTC"===this.settings.prettyLogTimeZone?(i.yyyy=e?.date?.getUTCFullYear()??"----",i.mm=so(e?.date?.getUTCMonth(),2,1),i.dd=so(e?.date?.getUTCDate(),2),i.hh=so(e?.date?.getUTCHours(),2),i.MM=so(e?.date?.getUTCMinutes(),2),i.ss=so(e?.date?.getUTCSeconds(),2),i.ms=so(e?.date?.getUTCMilliseconds(),3)):(i.yyyy=e?.date?.getFullYear()??"----",i.mm=so(e?.date?.getMonth(),2,1),i.dd=so(e?.date?.getDate(),2),i.hh=so(e?.date?.getHours(),2),i.MM=so(e?.date?.getMinutes(),2),i.ss=so(e?.date?.getSeconds(),2),i.ms=so(e?.date?.getMilliseconds(),3));let r="UTC"===this.settings.prettyLogTimeZone?e?.date:new Date(e?.date?.getTime()-6e4*e?.date?.getTimezoneOffset());i.rawIsoStr=r?.toISOString(),i.dateIsoStr=r?.toISOString().replace("T"," ").replace("Z",""),i.logLevelName=e?.logLevelName,i.fileNameWithLine=e?.path?.fileNameWithLine??"",i.filePathWithLine=e?.path?.filePathWithLine??"",i.fullFilePath=e?.path?.fullFilePath??"";let a=this.settings.parentNames?.join(this.settings.prettyErrorParentNamesSeparator);return a=null!=a&&null!=e?.name?a+this.settings.prettyErrorParentNamesSeparator:void 0,i.name=null!=e?.name||null!=a?((a??"")+e?.name)??"":"",i.nameWithDelimiterPrefix=i.name.length>0?this.settings.prettyErrorLoggerNameDelimiter+i.name:"",i.nameWithDelimiterSuffix=i.name.length>0?i.name+this.settings.prettyErrorLoggerNameDelimiter:"",null!=this.settings.overwrite?.addPlaceholders&&this.settings.overwrite?.addPlaceholders(e,i),sn(this.settings,t,i)}}!function(e){e.error="error",e.warn="warn",e.info="info",e.debug="debug"}(uw||(uw={}));let sL=new class extends sR{constructor(e,t){let i="undefined"!=typeof window&&"undefined"!=typeof document,r=!!i&&void 0!==window.chrome&&void 0!==window.CSS&&window.CSS.supports("color","green"),a=!!i&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent);(e=e||{}).stylePrettyLogs=!(e.stylePrettyLogs&&i&&!r)&&e.stylePrettyLogs,super(e,t,a?4:5)}log(e,t,...i){return super.log(e,t,...i)}silly(...e){return super.log(0,"SILLY",...e)}trace(...e){return super.log(1,"TRACE",...e)}debug(...e){return super.log(2,"DEBUG",...e)}info(...e){return super.log(3,"INFO",...e)}warn(...e){return super.log(4,"WARN",...e)}error(...e){return super.log(5,"ERROR",...e)}fatal(...e){return super.log(6,"FATAL",...e)}getSubLogger(e,t){return super.getSubLogger(e,t)}}({type:"pretty",minLevel:3,hideLogPositionForProduction:!0,overwrite:{formatLogObj:e=>(e[0]=`
250 Group: ${e[0]} 
251`,{args:e,errors:[]})}}),sD=(e,t,i,...r)=>{switch(e){case uw.error:sL.error(i,t,...r);break;case uw.warn:sL.warn(i,t,...r);break;case uw.debug:sL.debug(i,t,...r);break;default:sL.info(i,t,...r)}};!function(e){e.Northeast="bottom-left",e.Northwest="bottom-right",e.Southeast="top-left",e.Southwest="top-right"}(uz||(uz={})),function(e){e.Northeast="datablock--ne",e.Northwest="datablock--nw",e.Southeast="datablock--se",e.Southwest="datablock--sw"}(uS||(uS={}));let sO=(e,t,i,r)=>{var a;let n,o;if("origin"===e){if(!t.origin.location)return null;n=t.origin,o=o3(t.origin.location??null,t.destination?.location??null,"origin",o6(n,i.airportCodeFormat),1,t.status)}else{if(!t.destination||!t.destination.location)return null;n=t.destination,o=o3(t.origin.location??null,t.destination?.location??null,"destination",o6(n,i.airportCodeFormat),1,t.status)}let l=r.getImage(o6(n,i.airportCodeFormat));if(!l)return null;let s=l.data.height,c=l.data.width,u=r.project(n.location??[0,0]),h=(a=o,new tk.Point(a[0],a[1])),p=h.x+u.x,d=h.y+u.y;return new tk.LngLatBounds(r.unproject([p-.5*c,d+.5*s]),r.unproject([p+.5*c,d-.5*s]))},sF=(e,t,i,r=!1,a=!1,n=!1)=>((t.length>2||a)&&(t.length>1||n)&&(t[0]===e||r)&&(t=t.filter(t=>t!==e)),t),sj=(e,t,i,r)=>{let a=Math.max(...n$(r[t],"#fff","1",0,i).size),n=a/4,o=a/4;return"Southwest"===e&&(n*=-1),"Northwest"===e&&(n*=-1,o*=-1),"Northeast"===e&&(o*=-1),[n,o]},sB=(e,t,i,r)=>
251({class:uS[e],anchor:uz[e],offset:sj(e,t,i,r)}),sN=(0,r.createContext)(sD),sU=()=>null,sV=({children:e,loggingFunc:t=sD,debugMode:i=!1})=>r.createElement(sN.Provider,{value:i?t:sU},e),s$=()=>(0,r.useContext)(sN),sZ=/^N[1-9]/,sG=/^\d{6}$/,sq=[/^(DQ)([A-Z]{3})$/,/^(C)([FGI][A-Z]{3})$/,/^([2DFGIM])([A-Z]{4})$/,/^(9XR|A4O)([A-Z]{2})$/,/^(A9C)([A-Z]{2,3})$/,/^([A-Z][A-Z]|[A-Z][0-9]|[1-9][A-Z])([A-Z]{3})$/,/^(B)([0-9]{4,5})$/,/^(B)([0-9]{3}[A-Z])$/,/^(B)([0-9]{2}[A-Z]{2})$/,/^(B)([HKLM][A-Z]{2})$/,/^(JA[0-9]{2}[0-9A-Z]{2})$/,/^(HL[0-9]{4})$/,/^(V7)([0-9]{4})$/,/^(HZ)([A-Z]{3,4}|[A-Z]{2,3}[0-9]{1,2})$/,/^(R[AF])([0-9]{4}[0-9A-Z])$/,/^(VH)((?:[A-Z]{3})|(?:[2-9][A-Z]{2})|(?:[A-Z][2-9][A-Z])|(?:[A-Z][2-9]{2}))$/,/^(CP|JU|OB)([1-9][0-9]{3})$/,/^(EX)([1-9][0-9]{2})$/,/^(E[KRXY]|U[KR])([1-9][0-9]{4})$/,/^(UP)([A-Z]{3}[0-9]{2})$/,/^(HI)([1-9][0-9]{2}[A-Z]{2})$/,/^(EW)([1-9][0-9]{4}|[1-9][0-9]{2}[A-Z]{2}|001[A-Z]{2}|(1|2)[0-9]{2}[A-Z]{2})$/,/^(H[JK])([1-9][0-9]{3}[A-Z])$/,/^(HP)([1-9][0-9]{3}[A-Z]{3})$/,/^(RDPL)([1-9][0-9]{4})$/,/^(RP)(C[0-9]{4})$/,/^(V8)([A-Z]{2}[0-9]|[0-9]{3})$/,/^(VN)([1-9][0-9]{3})$/,/^(YJ)([A-Z]{2}[0-9]{1,2})$/,/^(YV)([0-9]{4}[A-P]?|[A-Z]{3}[1-9])$/,/^(P)([5-9][0-9]{2})$/,/^(Z)([A-Z]{3})$/],sH=(e,t)=>"iata"===t?e?.iata??e?.icao??e?.lid??"---":e?.icao??e?.iata??e?.lid??"---",sW=e=>{let t=e?.at(-1),i=Date.now(),r=void 0!==t?.clock?1e3*t.clock:-1;return -1===r?-1:Math.floor((i-r)/1e3)},sX=({manufacturer:e,icao:t,flightId:i})=>{let a=t.replace(/[0-9]/g,""),[n,o]=(0,r.useState)(),[l,s]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{!(e.length<1&&a.length<1)&&(e.length>0&&o(nZ(e)),a.length>0&&o(`https://www.flightaware.com/images/airline_logos/180px/${a}.png`))},[i,a,e]),r.createElement(r.Fragment,null,r.createElement(oZ,{className:"datablock__logo",height:36,width:36,style:{display:l?"block":"none"}}),n&&r.createElement("img",{className:"datablock__logo",alt:`${a} logo`,height:36,width:36,onLoad:()=>{s(!1)},onError:t=>{t.currentTarget.currentSrc.startsWith("https://www.flightaware.com/images/airline_logos/180px/")&&e.length>0&&o(nZ(e))},src:n,style:{display:l?"none":"block"}}))},sY=({flight:e,onDataBlockPressed:t,...i})=>{let a=(0,r.useCallback)(()=>{t&&t(e)},[t,e]),n=e.data;return n?r.createElement(sK,{flightId:e.id,flightData:n,handleDataBlockPress:a,...i}):r.createElement(r.Fragment,null)},sK=({flightId:e,flightData:t,currentPosition:i,airlineCodeFormat:a,airportCodeFormat:n,flightTrackList:o,subpixelPositioning:l,displayTimePriority:s,showOperatorLogo:c,handleDataBlockPress:u,rotateGroup:h})=>{let d=rF(),{current:f}=(s$(),p()),m=(0,r.useRef)(null),g=d.appearance.dataBlock.style,y=d.appearance.dataBlock.showRouteLine,_=d.appearance.dataBlock.showTelemetryLine,b=d.appearance.dataBlock.showLastUpdatedLine,x=(0,r.useMemo)(()=>{var e,i;return e=t.origin.tz,i=t.destination?.tz,new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"numeric",hour12:!0,timeZone:i??e??"America/Chicago"})},[t.origin.tz,t.destination?.tz]),{aircraftId:v,aircraft:w,altitude:z,groundSpeed:S,origin:T,destination:k,eta:E,isEstimated:M}=((e,t,i,r,a,n)=>{let{flightTime:o}=((e,t)=>{let i=null,r=null;for(let a=0;a<t.length;a++){let[n,o]=t[a].toLowerCase().split("_");if(e[n][o]){let l=e[n][o];if(l){i=l,r=t[a];break}}}return{flightTime:i,flightTimeSource:r}})(e.times,n),l=o?a.format(new Date(o)).replace(/\s+/,""):"---";return{aircraftId:e.ids[i]??function(e){let t=function(e){if(sZ.test(e))return[];for(let t of sq){let i=e.match(t);if(null!==i)return i}return[]}(e);if(3===t.length){if(""!==t[1]&&""!==t[2])return`${t[1]}-${t[2]}`}else if(2===t?.length)return t[1];return sG.test(e)?`${e.substring(0,2)}-${e.substring(2,6)}`:e}(e.ids.ident)??"---",aircraft:e.aircraft?.code??"---",altitude:t.altitude?.toString()??"---",groundSpeed:t.gs?Math.round(np(t.gs)).toString():"---",origin:sH(e.origin,r),destination:sH(e.destination,r),eta:l,isEstimated:od(t)}})(t,i,a,n,x,s),P=null;i.verticalTrend===lp.Increasing?P=r.createElement(oq,null):i.verticalTrend===lp.Decreasing&&(P=r.createElement(oG,null));let[I,A]=(0,r.useState)(-1),C=()=>((e,t,i,r,a,n,o)=>{let l=(e=>{let t=e.heading??0,i=["Southwest","Northeast","Southeast","Northwest"];return 0<t&&t<=45&&(i=["Southeast","Northwest","Southwest","Northeast"]),45<t&&t<=90&&(i=["Northwest","Southeast","Southwest","Northeast"]),90<t&&t<=135&&(i=["Southwest","Northeast","Northwest","Southeast"]),135<t&&t<=180&&(i=["Northeast","Southwest","Northwest","Southeast"]),180<t&&t<=225&&(i=["Northwest","Southeast","Northeast","Southwest"]),225<t&&t<=270&&(i=["Southeast","Northwest","Northeast","Southwest"]),270<t&&t<=315&&(i=["Northeast","Southwest","Southeast","Northwest"]),315<t&&t<=360&&(i=["Southwest","Northeast","Southeast","Northwest"]),i})(a);if(!e.appearance.dataBlock.enableDeconfliction)return sB(l[0],r.aircraft.icon,e.appearance.scaleFactors.airplane,e.appearance.aircraftIcons);let s=((e,t,i,r,a,n,o)=>
251{if(!i||!r.current)return e;let l=((e,t,i,r)=>{let a=i.getLngLat(),n=t.project(a),o=sj("Northeast",r.aircraft.icon,e.appearance.scaleFactors.airplane,e.appearance.aircraftIcons),l=e.appearance.dataBlock.sampleAreaTop*e.appearance.scaleFactors.datablock,s=e.appearance.dataBlock.sampleAreaRight*e.appearance.scaleFactors.datablock,c=e.appearance.dataBlock.sampleAreaBottom*e.appearance.scaleFactors.datablock,u=e.appearance.dataBlock.sampleAreaLeft*e.appearance.scaleFactors.datablock,h=l+Math.abs(o[1]),p=s+Math.abs(o[0]),d=c+Math.abs(o[1]),f=u+Math.abs(o[0]);return{Northeast:new tk.LngLatBounds(t.unproject([n.x,n.y]),t.unproject([n.x+p,n.y-h])),Northwest:new tk.LngLatBounds(t.unproject([n.x-f,n.y]),t.unproject([n.x,n.y-h])),Southwest:new tk.LngLatBounds(t.unproject([n.x-f,n.y+d]),t.unproject([n.x,n.y])),Southeast:new tk.LngLatBounds(t.unproject([n.x,n.y+d]),t.unproject([n.x+p,n.y]))}})(t,i,r.current,a);if(e.forEach(t=>{let r=l[t],a=i.getBounds(),n=le([r.getWest(),r.getSouth(),r.getEast(),r.getNorth()]);(function(e,t){let i=oi(e),r=oi(t),a=i.type,n=r.type,o=i.coordinates,l=r.coordinates;switch(a){case"Point":if("Point"===n)return l8(o,l);throw Error("feature2 "+n+" geometry not supported");case"MultiPoint":switch(n){case"Point":let s,c=!1;for(s=0;s<i.coordinates.length;s++)if(l8(i.coordinates[s],r.coordinates)){c=!0;break}return c;case"MultiPoint":for(let e of r.coordinates){let t=!1;for(let r of i.coordinates)if(l8(e,r)){t=!0;break}if(!t)return!1}return!0;default:throw Error("feature2 "+n+" geometry not supported")}case"LineString":switch(n){case"Point":return lu(r,i,{ignoreEndVertices:!0});case"LineString":let u=!1,h=r.coordinates;for(let e=0;e<h.length;e++){let t=h[e];if(!lu(t,i))return!1;!u&&(lu(t,i,{ignoreEndVertices:!0})?u=!0:e>0&&lu([(h[e-1][0]+t[0])/2,(h[e-1][1]+t[1])/2],i,{ignoreEndVertices:!0})&&(u=!0))}return u;case"MultiPoint":let p=!1;for(let e of r.coordinates){if(!lu(e,i))return!1;!p&&lu(e,i,{ignoreEndVertices:!0})&&(p=!0)}return p;default:throw Error("feature2 "+n+" geometry not supported")}case"Polygon":switch(n){case"Point":return lc(r,i,{ignoreBoundary:!0});case"LineString":return l3(i,r);case"Polygon":return l6(i,r);case"MultiPoint":let d=!1;for(let e of r.coordinates){if(!lc(e,i))return!1;d||(d=lc(e,i,{ignoreBoundary:!0}))}return d;case"MultiPolygon":return r.coordinates.every(e=>l6(i,{type:"Polygon",coordinates:e}));default:throw Error("feature2 "+n+" geometry not supported")}case"MultiPolygon":switch(n){case"Point":return lc(r,i,{ignoreBoundary:!0});case"MultiPoint":let f=!1;for(let e of r.coordinates){if(!lc(e,i))return!1;f||(f=lc(e,i,{ignoreBoundary:!0}))}return f;case"LineString":return i.coordinates.some(e=>l3({type:"Polygon",coordinates:e},r));case"MultiLineString":let m=!1;for(let e of r.coordinates){let t={type:"LineString",coordinates:e},r="outside";for(let e of i.coordinates){let i=l5({type:"Polygon",coordinates:e},t);if("interior"===i){r=i;break}"boundary"===i&&(r=i)}if("outside"===r)return!1;"interior"===r&&(m=!0)}return m;case"Polygon":let g=lt(r);return i.coordinates.some(e=>l6({type:"Polygon",coordinates:e},r,g));case"MultiPolygon":for(let e of r.coordinates){let t={type:"Polygon",coordinates:e},r=lt(t);if(!i.coordinates.some(e=>l6({type:"Polygon",coordinates:e},t,r)))return!1}return!0;default:throw Error("feature2 "+n+" geometry not supported")}default:throw Error("feature1 "+a+" geometry not supported")}})(le([a.getWest(),a.getSouth(),a.getEast(),a.getNorth()]),n)||(e=sF(t,e,0,!0,!0,!0))}),e.forEach(r=>{let n=le([l[r].getWest(),l[r].getSouth(),l[r].getEast(),l[r].getNorth()]);if(a.origin.location&&l[r].contains(a.origin.location)&&(e=sF(r,e,0,!0,!0)),a.origin.location){let o=sO("origin",a,t,i);o&&sr(n,le([o.getWest(),o.getSouth(),o.getEast(),o.getNorth()]))&&(e=sF(r,e,0,!0,!0))}if(a.destination?.location&&l[r].contains(a.destination.location)&&(e=sF(r,e,0,!0,!0)),a.destination&&a.destination.location){let o=sO("destination",a,t,i);o&&sr(n,le([o.getWest(),o.getSouth(),o.getEast(),o.getNorth()]))&&(e=sF(r,e,0,!0,!0))}}),n){let t=r.current.getLngLat(),i=[...n.map(e=>[e.longitude,e.latitude]),[t.lng,t.lat]],a=e.map(e=>{let t=l[e];return Math.round(1e3*os(o9(n3(i),[t.getWest(),t.getSouth(),t.getEast(),t.getNorth()])))/1e3});a.length>=2&&a[0]>a[1]&&(a.length>=3&&a[1]>a[2]&&(e=sF(e[0],e,0,!1,!0)),e=sF(e[0],e,0,!1,!0))}return e})(l,e,t,i,r,n);return 0===s.length?null:sB(s[0],r.aircraft.icon,e.appearance.scaleFactors.airplane,e.appearance.aircraftIcons)})(d,f,m,t,i,o),[L,D]=(0,r.useState)(C());return(0,r.useEffect)(()=>{D(C());let e=setInterval(()=>{D(C())},d.appearance.dataBlock.deconflictionInterval);return()=>clearInterval(e)},[f,m]),(0,r.useEffect)(()=>
251{if(void 0===f)return;let e=e=>{void 0!==e?.target&&D(C())};return f.on("move",e),()=>{f.off("move",e)}},[]),(0,r.useEffect)(()=>{A(sW(o));let e=setInterval(()=>{A(sW(o))},1e3);return()=>{clearInterval(e)}},[o]),document.documentElement.style.setProperty("--scale-factor",d.appearance.scaleFactors.datablock.toString()),"classic"===g&&(c=!1,b=!1),r.createElement(R,{anchor:L?.anchor,subpixelPositioning:l,className:function(){for(var e,t,i=0,r="",a=arguments.length;i<a;i++)(e=arguments[i])&&(t=function e(t){var i,r,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var n=t.length;for(i=0;i<n;i++)t[i]&&(r=e(t[i]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}(e))&&(r&&(r+=" "),r+=t);return r}("datablock",g&&`datablock--${g}`,L?.class,c||"datablock--no-logo",h&&`datablock-rotate rotate-${h}`),closeButton:!1,closeOnClick:!1,focusAfterOpen:!1,latitude:i.latitude,longitude:i.longitude,offset:L?.offset??[0,0],ref:m,style:{visibility:L?"visible":"hidden",maxWidth:240*d.appearance.scaleFactors.datablock+"px"}},r.createElement("div",{className:"datablock__bubble",onClick:u},c?r.createElement(sX,{manufacturer:t.aircraft.manufacturer??"",icao:t.ids.icao??"",flightId:e}):null,r.createElement("div",{className:"datablock__details"},r.createElement("span",{className:"datablock__title"},r.createElement("span",null,v)," ",r.createElement("span",null,w)),r.createElement("div",{className:"rotate"},y?r.createElement("span",{className:"rotate__route"},r.createElement("span",{className:"datablock__originAndDestination",style:{direction:"rtl"}},r.createElement("span",null,T),r.createElement(oH,{size:8}),r.createElement("span",null,k))," ",E.includes(":")?r.createElement(r.Fragment,null,E.split(":")[0],r.createElement("span",{className:"datablock__clock-separator"},":"),E.split(":")[1]):E):null,_?r.createElement("span",{className:"rotate__telemetry"},M?"ESTIMATED":r.createElement(r.Fragment,null,r.createElement("span",null,S,"MPH")," ",r.createElement("span",null,z,"FT",P))):null))),b?r.createElement("div",{className:"datablock__last-updated"},I>-1?`${I}s ago`:null):null)},sJ=e=>{let t=5381;for(let i=0;i<e.length;i++)t=33*t^e.charCodeAt(i);return t>>>0},sQ=()=>!0,s1=()=>!1,s0=({data:e,airlineCodeFormat:t,airportCodeFormat:i,isDataBlockVisible:a=sQ,enableSubpixelPositioning:n=s1,onMouseEnterDatablock:o,onDataBlockPressed:l,displayTimePriority:s,showOperatorLogo:c})=>{let u=rF(),h=p(),d=u.appearance.dataBlock.rotateGroupCount,f=u.appearance.dataBlock.rotateDuration,m=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(d<=1)return;if(!m.current){let e=document.createElement("style");document.head.appendChild(e),m.current=e}let e=m.current.sheet;if(e){for(;e.cssRules.length>0;)e.deleteRule(0);e.insertRule("[data-datablock-rotate] .datablock-rotate { display: block; }",e.cssRules.length),e.insertRule('[data-datablock-rotate]:not([data-datablock-rotate=""]) .datablock-rotate { display: none; }',e.cssRules.length);for(let t=1;t<=d;t++){let i=`[data-datablock-rotate="${t}"] .datablock-rotate.rotate-${t} { display: block; }`;e.insertRule(i,e.cssRules.length)}}return()=>{m.current&&(document.head.removeChild(m.current),m.current=null)}},[d]),(0,r.useEffect)(()=>{if(!h||!h.current||d<=1)return;let e=h.current.getContainer(),t=1,i=()=>{e.setAttribute("data-datablock-rotate",String(t)),t=t%d+1};i();let r=setInterval(i,1e3*f);return()=>{clearInterval(r),e.removeAttribute("data-datablock-rotate")}},[d,f,h]),r.createElement(r.Fragment,null,e.map(e=>{if(a(e.flight)&&e.currentPosition){let a;return d>1&&(a=sJ(e.flight.id)%d+1),r.createElement("div",{key:e.flight.id,onMouseEnter:o},r.createElement(sY,{flight:e.flight,flightTrackList:e.flight.trackList,currentPosition:e.currentPosition,airlineCodeFormat:t,airportCodeFormat:i,subpixelPositioning:n(e.flight),displayTimePriority:s,showOperatorLogo:c,onDataBlockPressed:l,rotateGroup:a}))}}))},s2=(e,t,i)=>({type:"line",source:e,minzoom:i,layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":["get","trailsColor",["properties"]],"line-width":1.5*t}}),s3=()=>!0,s5=()=>"#FFFFFF",s6=({data:e,trailLength:t,smoothingMethod:i,fill:a,scaleFactor:n,minZoom:o,isTrailVisible:l=s3,getTrailColor:s=s5})=>{let[c,u]=(0,r.useState)(e.currentPositions.filter(e=>l(e.flight)).map(e=>e.lastTrackPosition));(0,r.useEffect)(()=>{let t=e.currentPositions.filter(e=>l(e.flight)).map(e=>e.lastTrackPosition);og(t,c)||u(t)},[e.currentPositions,l]);let h=(0,r.useMemo)(()=>((e,t,i,r,a,n)=>{let o=[];for(let l of e){let e,s=l.flight;if(!a(s)||null==s.trackList||null==l.lastTrackPosition)continue;let c=ow(s.trackList,l.lastTrackPosition.clock);if(0===c.length)continue;let u=l.lastTrackPosition.clock,h=0;for(let e=c.length-1;e>=0;e--)if(u&&u-c[e].clock>=t){h=e;break}let p=c.slice(h).map(e=>[e.longitude,e.latitude]);e="cutsmooth"===i?of(p):p,o.push({type:"Feature",geometry:{type:"LineString",coordinates:e},properties:{trailsColor:n(s,r)}})}return{type:"FeatureCollection",features:o}})(e.currentPositions,t,i,a,l,s),[e.flights,c,t,i,l,s]);return r.createElement(r.Fragment,null,r.createElement(s4,{data:h,scaleFactor:n,minZoom:o}
251),r.createElement(F,{id:"animated-trails-source",type:"geojson",data:((e,t,i,r)=>{let a=[];for(let n of e){let e=n.flight.trackList,o=n.currentPosition,l=n.lastTrackPosition;if(i(n.flight)&&e&&e.length>0&&o&&l){let e=[l,o].map(e=>[e.longitude,e.latitude]);a.push({type:"Feature",geometry:{type:"LineString",coordinates:e},properties:{trailsColor:r(n.flight,t)}})}}return{type:"FeatureCollection",features:a}})(e.currentPositions,a,l,s)},r.createElement(B,{beforeId:"z6",id:"animated-trails-layer",...s2("animated-trails-source",n,o)})))},s4=(0,r.memo)(function({data:e,scaleFactor:t,minZoom:i}){return r.createElement(F,{id:"trails-source",type:"geojson",data:e},r.createElement(B,{beforeId:"z6",id:"trails-layer",...s2("trails-source",t,i)}))}),s8=()=>!0,s7=({data:e,isTrackVisible:t=s8})=>{let i=(0,r.useMemo)(()=>((e,t)=>{let i=[];for(let r of e)if(t(r)&&null!=r.trackList)for(let e of r.trackList)i.push({type:"Feature",geometry:{type:"Point",coordinates:[e.longitude,e.latitude]},properties:{}});return{type:"FeatureCollection",features:i}})(e,t),[e,t]);return r.createElement(F,{id:"track-positions-source",type:"geojson",data:i},r.createElement(B,{beforeId:"z8",id:"track-positions-layer",type:"circle",paint:{"circle-color":"#FFFF00","circle-radius":4}}))},s9=({data:e,baseLayer:t,fill:i,trailLength:a,minZoom:n,isAircraftVisible:o,isTrackVisible:l,isTrailVisible:s,isDataBlockVisible:c,getAircraftColor:u,getAircraftIcon:h,getAircraftZoomLevel:d,getAircraftSortOrder:f,getTrailColor:m,onMouseEnterDatablock:g,onDataBlockPressed:y,onAnimationFrame:_,selectedFlightId:b,highlightedFlightId:x})=>{let v=rF(),w=ox(),z=p(),S="off"!==v.appearance.dataBlock.style,T=(0,r.useCallback)(e=>{let t=w.getTimeInSeconds(),i=e.trackList?.at(-1),r=i?.gs??null,a=t-(i?.clock??-1/0);return nM(e,t,v.horde.enabled)&&a<v.animation.maxTimeSinceLastPosition&&null!=r&&r>=v.animation.minGroundSpeed&&r<=v.animation.maxGroundSpeed},[w,v.horde.enabled,v.animation.minGroundSpeed,v.animation.maxGroundSpeed,v.animation.maxTimeSinceLastPosition]),k=z.current?.getZoom()??0,E=((e,t,i,a,n,o,l)=>{let[s,c]=(0,r.useState)(e.map(e=>({flight:e,currentPosition:null,lastTrackPosition:null}))),u=(0,r.useRef)(0),h=(0,r.useRef)(void 0),p=(0,r.useCallback)(()=>{let r=performance.now(),o=void 0!==h.current?r-h.current:null,s=[];if(null===o||o>1e3/i){for(let i of e){let e=a.getTimeInSeconds()-n,r=i.trackList?function(e,t){for(let i=e.length-1;i>=0;i--){let r=e[i];if(r.clock<=t)return r}return null}(i.trackList,e):null;
251if(t(i)){let t=ov(i.trackList??null,e);s.push({flight:i,currentPosition:t??null,lastTrackPosition:r})}else s.push({flight:i,currentPosition:r,lastTrackPosition:r})}c(s),h.current=r,l?.(s)}u.current=requestAnimationFrame(p)},[e,t,i,n,a,l]);return(0,r.useEffect)(()=>{if(o)return;let t=e.map(e=>({flight:e,currentPosition:e.trackList?.at(-1)??null,lastTrackPosition:e.trackList?.at(-1)??null}));c(t),l?.(t)},[e,o,l]),(0,r.useEffect)(()=>{if(o)return u.current=requestAnimationFrame(p),()=>window.cancelAnimationFrame(u.current)},[o,p]),s})(e,T,(0,r.useMemo)(()=>{let e=((e,t,i)=>{if("fixed"===t)return e;if("adaptive"===t)return Math.max(Math.min(e,5*2**(i-8)),1);throw Error(`Invalid framerateMode: ${t}`)})(v.animation.fps,v.animation.framerateMode,k);return globalThis.mapDebugMode&&v.animation.enabled&&console.debug(`FPS: ${e}, zoom: ${k}`),e},[v.animation.enabled,v.animation.fps,v.animation.framerateMode,k]),w,v.animation.delay,v.animation.enabled,_),M=void 0!==a&&a>0,P=v.tracks.showPositions;return r.createElement(r.Fragment,null,r.createElement(oO,{data:E,baseLayer:t,fill:i,icons:v.appearance.aircraftIcons,minZoom:n,isAircraftVisible:o,getAircraftColor:u,getAircraftIcon:h,getAircraftZoomLevel:d,getAircraftSortOrder:f,selectedFlightId:b,highlightedFlightId:x}),r.createElement(oM,{data:{flights:e,currentPositions:E},showProjectedTracks:v.tracks.showProjectedTracks,fill:i,smoothingMethod:v.tracks.smoothing,scaleFactor:v.appearance.scaleFactors.track,isTrackVisible:l}),P?r.createElement(s7,{data:e,isTrackVisible:l}):null,M?r.createElement(s6,{data:{flights:e,currentPositions:E},trailLength:a,fill:i,smoothingMethod:v.tracks.smoothing,scaleFactor:v.appearance.scaleFactors.track,minZoom:v.tracks.minZoom,isTrailVisible:s,getTrailColor:m}):null,S?r.createElement(s0,{data:E,airlineCodeFormat:v.airlineCodeFormat,airportCodeFormat:v.airportCodeFormat,isDataBlockVisible:c,enableSubpixelPositioning:T,onMouseEnterDatablock:g,onDataBlockPressed:y,displayTimePriority:v.appearance.dataBlock.displayTimePriority,showOperatorLogo:v.appearance.dataBlock.showOperatorLogo}):null)},ce=Math.PI/180,ct=180/Math.PI;class ci{lon;lat;x;y;constructor(e,t){this.lon=e,this.lat=t,this.x=ce*e,this.y=ce*t}view(){return String(this.lon).slice(0,4)+","+String(this.lat).slice(0,4)}antipode(){let e=-1*this.lat;return new ci(this.lon<0?180+this.lon:-1*(180-this.lon),e)}}class cr{properties={};geometries=[];constructor(e){e&&(this.properties=e)}json(){if(0===this.geometries.length)return{type:"Feature",geometry:{type:"LineString",coordinates:null},properties:this.properties};if(1===this.geometries.length){let e=this.geometries[0];return e?{type:"Feature",geometry:{type:"LineString",coordinates:e.coords},properties:this.properties}:{type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:this.properties}}return{type:"Feature",geometry:{type:"MultiLineString",coordinates:this.geometries.filter(e=>void 0!==e).map(e=>e.coords)},properties:this.properties}}wkt(){if(0===this.geometries.length)return"";let e=[];for(let t of this.geometries){if(!t||0===t.coords.length){e.push("LINESTRING EMPTY");continue}let i=t.coords.filter(e=>void 0!==e).map(e=>`${e[0]??0} ${e[1]??0}`);0===i.length?e.push("LINESTRING EMPTY"):e.push(`LINESTRING(${i.join(",")})`)}return e.join("; ")}}class ca{coords=[];length=0;move_to(e){this.length++,this.coords.push(e)}}class cn{start;end;properties;g;constructor(e,t,i){if(!e||void 0===e.x||void 0===e.y||!t||void 0===t.x||void 0===t.y)throw Error("GreatCircle constructor expects two args: start and end objects with x and y properties");this.start=new ci(e.x,e.y),this.end=new ci(t.x,t.y),this.properties=i||{};let r=this.start.x-this.end.x,a=Math.pow(Math.sin((this.start.y-this.end.y)/2),2)+Math.cos(this.start.y)*Math.cos(this.end.y)*Math.pow(Math.sin(r/2),2);if(this.g=2*Math.asin(Math.sqrt(a)),this.g===Math.PI)throw Error("it appears "+this.start.view()+" and "+this.end.view()+" are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite");if(isNaN(this.g))throw Error("could not calculate great circle between "+e+" and "+t)}interpolate(e){let t=Math.sin((1-e)*this.g)/Math.sin(this.g),i=Math.sin(e*this.g)/Math.sin(this.g),r=t*Math.cos(this.start.y)*Math.cos(this.start.x)+i*Math.cos(this.end.y)*Math.cos(this.end.x),a=t*Math.cos(this.start.y)*Math.sin(this.start.x)+i*Math.cos(this.end.y)*Math.sin(this.end.x),n=ct*Math.atan2(t*Math.sin(this.start.y)+i*Math.sin(this.end.y),Math.sqrt(Math.pow(r,2)+Math.pow(a,2)));return[ct*Math.atan2(a,r),n]}Arc(e,t){let i=[];if(!e||e<=2)i.push([this.start.lon,this.start.lat]),i.push([this.end.lon,this.end.lat]);else{let t=1/(e-1);for(let r=0;r<e;++r){let e=t*r,a=this.interpolate(e);i.push(a)}}let r=!1,a=0,n=t?.offset??10,o=180-n,l=-180+n,s=360-n;for(let e=1;e<i.length;++e){let t=i[e-1]?.[0]??0,n=i[e]?.[0]??0,c=Math.abs(n-t);c>s&&(n>o&&t<l||t>o&&n<l)?r=!0:c>a&&(a=c)}let c=[];if(r&&a<n){let e=[];c.push(e);for(let t=0;t<i.length;++t){let r=parseFloat((i[t]?.[0]??0).toString());if(t>0&&Math.abs(r-(i[t-1]?.[0]??0))>s){let a=parseFloat((i[t-1]?.[0]??0).toString()),n=parseFloat((i[t-1]?.[1]??0).toString()),s=parseFloat((i[t]?.[0]??0).toString()),u=parseFloat((i[t]?.[1]??0).toString());if(a>-180&&a<l&&180===s&&t+1<i.length&&(i[t-1]?.[0]??0)>-180&&(i[t-1]?.[0]??0)<l){e.push([-180,i[t]?.[1]??0]),t++,e.push([i[t]?.[0]??0,i[t]?.[1]??0]);continue}if(a>o&&a<180&&-180===s&&t+1<i.length&&(i[t-1]?.[0]??0)>o&&(i[t-1]?.[0]??0)<180){e.push([180,i[t]?.[1]??0]),t++,e.push([i[t]?.[0]??0,i[t]?.[1]??0]);continue}if(a<=180&&s>=180&&a<s){let r=(180-a)/(s-a),l=r*u+(1-r)*n;e.push([(i[t-1]?.[0]??0)>o?180:-180,l]),(e=[]).push([(i[t-1]?.[0]??0)>o?-180:180,l]),c.push(e)}else e=[],c.push(e);e.push([r,i[t]?.[1]??0])}else e.push([i[t]?.[0]??0,i[t]?.[1]??0])}}else{let e=[];c.push(e);for(let t=0;t<i.length;++t)e.push([i[t]?.[0]??0,i[t]?.[1]??0])}let u=new cr(this.properties);for(let e=0;e<c.length;++e){let t=new ca;u.geometries.push(t);let i=c[e];if(i)for(let e=0;e<i.length;++e){let r=i[e];r&&t.move_to(function(e){let t=[];for(let i=0;i<e.length;i++){let r=e[i];void 0!==r&&(t[i]=Math.round((r+Number.EPSILON)*1e6)/1e6)}return t}([r[0],r[1]]))}}return u}}var co=function(e,t,i={}
251){if("object"!=typeof i)throw Error("options is invalid");let{properties:r={},npoints:a=100,offset:n=10}=i,o=oe(e),l=oe(t);return o[0]===l[0]&&o[1]===l[1]?n3(Array(a).fill([o[0],o[1]]),r):new cn({x:o[0],y:o[1]},{x:l[0],y:l[1]},r||{}).Arc(a,{offset:n}).json()};let cl=({data:e,scaleFactor:t})=>r.createElement(F,{id:"planned-source",type:"geojson",data:(e=>{let t=[];for(let i of e){let e=[];for(let t=1;t<i.length;t++)if(oa(n0(i[t-1]),n0(i[t]),{units:"miles"})>=10){let r=co(n0(i[t-1]),n0(i[t]),{offset:-999999});e.push(r.geometry.coordinates)}else e.push([i[t-1],i[t]]);let r=oh(e.flat());t.push({type:"Feature",geometry:{type:"MultiLineString",coordinates:r},properties:{}})}return{type:"FeatureCollection",features:t}})(e)},r.createElement(B,{beforeId:"z5",id:"planned-route-layer",id:"planned-layer",type:"line",source:"planned-source",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#A6AEBC","line-dasharray":[3,3],"line-width":1.5*t}}));function cs(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=Array(t);i<t;i++)r[i]=e[i];return r}let cc=Object.entries,cu=Object.setPrototypeOf,ch=Object.isFrozen,cp=Object.getPrototypeOf,cd=Object.getOwnPropertyDescriptor,cf=Object.freeze,cm=Object.seal,cg=Object.create,cy="undefined"!=typeof Reflect&&Reflect,c_=cy.apply,cb=cy.construct;cf||(cf=function(e){return e}),cm||(cm=function(e){return e}),c_||(c_=function(e,t){for(var i=arguments.length,r=Array(i>2?i-2:0),a=2;a<i;a++)r[a-2]=arguments[a];return e.apply(t,r)}),cb||(cb=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return new e(...i)});let cx=cN(Array.prototype.forEach),cv=cN(Array.prototype.lastIndexOf),cw=cN(Array.prototype.pop),cz=cN(Array.prototype.push),cS=cN(Array.prototype.splice),cT=Array.isArray,ck=cN(String.prototype.toLowerCase),cE=cN(String.prototype.toString),cM=cN(String.prototype.match),cP=cN(String.prototype.replace),cI=cN(String.prototype.indexOf),cA=cN(String.prototype.trim),cC=cN(Number.prototype.toString),cR=cN(Boolean.prototype.toString),cL="undefined"==typeof BigInt?null:cN(BigInt.prototype.toString),cD="undefined"==typeof Symbol?null:cN(Symbol.prototype.toString),cO=cN(Object.prototype.hasOwnProperty),cF=cN(Object.prototype.toString),cj=cN(RegExp.prototype.test),cB=(uT=TypeError,function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return cb(uT,t)});function cN(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,r=Array(i>1?i-1:0),a=1;a<i;a++)r[a-1]=arguments[a];return c_(e,t,r)}}function cU(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ck;if(cu&&cu(e,null),!cT(t))return e;let r=t.length;for(;r--;){let a=t[r];if("string"==typeof a){let e=i(a);e!==a&&(ch(t)||(t[r]=e),a=e)}e[a]=!0}return e}function cV(e){let t=cg(null);for(let r of cc(e)){var i=function(e){if(Array.isArray(e))return e}(r)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var r,a,n,o,l=[],s=!0,c=!1;try{n=(i=i.call(e)).next,!1;for(;!(s=(r=n.call(i)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,a=e}finally{try{if(!s&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(c)throw a}}return l}}(r,2)||function(e,t){if(e){if("string"==typeof e)return cs(e,2);var i=({}).toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?cs(e,t):void 0}}(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();let a=i[0],n=i[1];cO(e,a)&&(cT(n)?t[a]=function(e){for(let t=0;t<e.length;t++)cO(e,t)||(e[t]=null);return e}(n):n&&"object"==typeof n&&n.constructor===Object?t[a]=cV(n):t[a]=n)}return t}function c$(e,t){for(;null!==e;){let i=cd(e,t);if(i){if(i.get)return cN(i.get);if("function"==typeof i.value)return cN(i.value)}e=cp(e)}return function(){return null}}let cZ=cf(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cG=cf(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),cq=cf(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),cH=cf(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),cW=cf(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),cX=cf(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),cY=cf(["#text"]),cK=cf(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
251spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),cJ=cf(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),cQ=cf(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),c1=cf(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),c0=cm(/{{[\w\W]*|^[\w\W]*}}/g),c2=cm(/<%[\w\W]*|^[\w\W]*%>/g),c3=cm(/\${[\w\W]*/g),c5=cm(/^data-[\-\w.\u00B7-\uFFFF]+$/),c6=cm(/^aria-[\-\w]+$/),c4=cm(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),c8=cm(/^(?:\w+script|data):/i),c7=cm(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),c9=cm(/^html$/i),ue=cm(/^[a-z][.\w]*(-[.\w]+)+$/i),ut=cm(/<[/\w!]/g),ui=cm(/<[/\w]/g),ur=cm(/<\/no(script|embed|frames)/i),ua=cm(/\/>/i),un=function(e,t,i,r){return cO(e,t)&&cT(e[t])?cU(r.base?cV(r.base):{},e[t],r.transform):i};var uo=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,i=t=>e(t);if(i.version="3.4.13",i.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return i.isSupported=!1,i;let r=t.document,a=r,n=a.currentScript;t.DocumentFragment;let o=t.HTMLTemplateElement,l=t.Node,s=t.Element,c=t.NodeFilter;void 0===t.NamedNodeMap&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let u=t.DOMParser,h=t.trustedTypes,p=s.prototype,d=c$(p,"cloneNode"),f=c$(p,"remove"),m=c$(p,"nextSibling"),g=c$(p,"childNodes"),y=c$(p,"parentNode"),_=c$(p,"shadowRoot"),b=c$(p,"attributes"),x=l&&l.prototype?c$(l.prototype,"nodeType"):null,v=l&&l.prototype?c$(l.prototype,"nodeName"):null,w=l&&l.prototype?c$(l.prototype,"ownerDocument"):null;if("function"==typeof o){let e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let z,S,T="",k=!1,E=0,M=function(){if(E>0)throw cB('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},P=function(e){M(),E++;try{return z.createHTML(e)}finally{E--}},I=r,A=I.implementation,C=I.createNodeIterator,R=I.createDocumentFragment,L=I.getElementsByTagName,D=a.importNode,O={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported="function"==typeof cc&&"function"==typeof y&&A&&void 0!==A.createHTMLDocument;let F=c4,j=null,B=cU({},[...cZ,...cG,...cq,...cW,...cY]),N=null,U=cU({}
251,[...cK,...cJ,...cQ,...c1]),V=Object.seal(cg(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,Z=null,G=Object.seal(cg(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),q=!0,H=!0,W=!1,X=!0,Y=!1,K=!0,J=!1,Q=!1,ee=null,et=null,ei=!1,er=!1,ea=!1,en=!1,eo=!0,el=!1,es="user-content-",ec=!0,eu=!1,eh={},ep=null,ed=cU({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),ef=null,em=cU({},["audio","video","img","source","image","track"]),eg=null,ey=cU({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),e_="http://www.w3.org/1998/Math/MathML",eb="http://www.w3.org/2000/svg",ex="http://www.w3.org/1999/xhtml",ev=ex,ew=!1,ez=null,eS=cU({},[e_,eb,ex],cE),eT=cf(["mi","mo","mn","ms","mtext"]),ek=cU({},eT),eE=cf(["annotation-xml"]),eM=cU({},eE),eP=cU({},["title","style","font","a","script"]),eI=null,eA=["application/xhtml+xml","text/html"],eC=null,eR=null,eL=r.createElement("form"),eD=function(e){return e instanceof RegExp||e instanceof Function},eO=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(eR&&eR===e)return;e&&"object"==typeof e||(e={}),e=cV(e),eC="application/xhtml+xml"===(eI=-1===eA.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?cE:ck,j=un(e,"ALLOWED_TAGS",B,{transform:eC}),N=un(e,"ALLOWED_ATTR",U,{transform:eC}),ez=un(e,"ALLOWED_NAMESPACES",eS,{transform:cE}),eg=un(e,"ADD_URI_SAFE_ATTR",ey,{transform:eC,base:ey}),ef=un(e,"ADD_DATA_URI_TAGS",em,{transform:eC,base:em}),ep=un(e,"FORBID_CONTENTS",ed,{transform:eC}),$=un(e,"FORBID_TAGS",cV({}),{transform:eC}),Z=un(e,"FORBID_ATTR",cV({}),{transform:eC}),eh=!!cO(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?cV(e.USE_PROFILES):e.USE_PROFILES),q=!1!==e.ALLOW_ARIA_ATTR,H=!1!==e.ALLOW_DATA_ATTR,W=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,J=e.WHOLE_DOCUMENT||!1,er=e.RETURN_DOM||!1,ea=e.RETURN_DOM_FRAGMENT||!1,en=e.RETURN_TRUSTED_TYPE||!1,ei=e.FORCE_BODY||!1,eo=!1!==e.SANITIZE_DOM,el=e.SANITIZE_NAMED_PROPS||!1,ec=!1!==e.KEEP_CONTENT,eu=e.IN_PLACE||!1,F=!function(e){try{return cj(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?c4:e.ALLOWED_URI_REGEXP,ev="string"==typeof e.NAMESPACE?e.NAMESPACE:ex,ek=cO(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?cV(e.MATHML_TEXT_INTEGRATION_POINTS):cU({},eT),eM=cO(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?cV(e.HTML_INTEGRATION_POINTS):cU({},eE);let t=cO(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?cV(e.CUSTOM_ELEMENT_HANDLING):cg(null);if(V=cg(null),cO(t,"tagNameCheck")&&eD(t.tagNameCheck)&&(V.tagNameCheck=t.tagNameCheck),cO(t,"attributeNameCheck")&&eD(t.attributeNameCheck)&&(V.attributeNameCheck=t.attributeNameCheck),cO(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),cm(V),Y&&(H=!1),ea&&(er=!0),eh&&(j=cU({},cY),N=cg(null),!0===eh.html&&(cU(j,cZ),cU(N,cK)),!0===eh.svg&&(cU(j,cG),cU(N,cJ),cU(N,c1)),!0===eh.svgFilters&&(cU(j,cq),cU(N,cJ),cU(N,c1)),!0===eh.mathMl&&(cU(j,cW),cU(N,cQ),cU(N,c1))),G.tagCheck=null,G.attributeCheck=null,cO(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?G.tagCheck=e.ADD_TAGS:cT(e.ADD_TAGS)&&(j===B&&(j=cV(j)),cU(j,e.ADD_TAGS,eC))),cO(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?G.attributeCheck=e.ADD_ATTR:cT(e.ADD_ATTR)&&(N===U&&(N=cV(N)),cU(N,e.ADD_ATTR,eC))),cO(e,"ADD_URI_SAFE_ATTR")&&cT(e.ADD_URI_SAFE_ATTR)&&cU(eg,e.ADD_URI_SAFE_ATTR,e
251C),cO(e,"FORBID_CONTENTS")&&cT(e.FORBID_CONTENTS)&&(ep===ed&&(ep=cV(ep)),cU(ep,e.FORBID_CONTENTS,eC)),cO(e,"ADD_FORBID_CONTENTS")&&cT(e.ADD_FORBID_CONTENTS)&&(ep===ed&&(ep=cV(ep)),cU(ep,e.ADD_FORBID_CONTENTS,eC)),ec&&(j["#text"]=!0),J&&cU(j,["html","head","body"]),j.table&&(cU(j,["tbody"]),delete $.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw cB('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw cB('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let t=z;z=e.TRUSTED_TYPES_POLICY;try{T=P("")}catch(e){throw z=t,e}}else null===e.TRUSTED_TYPES_POLICY?(z=void 0,T=""):(void 0===z&&(k||(S=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let i=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(i=t.getAttribute(r));let a="dompurify"+(i?"#"+i:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(h,n),k=!0),z=S),z&&"string"==typeof T&&(T=P("")));cf&&cf(e),eR=e},eF=cU({},[...cG,...cq,...cH]),ej=cU({},[...cW,...cX]),eB=function(e){var t,i,r;let a=y(e);a&&a.tagName||(a={namespaceURI:ev,tagName:"template"});let n=ck(e.tagName),o=ck(a.tagName);return!!ez[e.namespaceURI]&&(e.namespaceURI===eb?(t=a).namespaceURI===ex?"svg"===n:t.namespaceURI===e_?"svg"===n&&("annotation-xml"===o||ek[o]):!!eF[n]:e.namespaceURI===e_?(i=a).namespaceURI===ex?"math"===n:i.namespaceURI===eb?"math"===n&&eM[o]:!!ej[n]:e.namespaceURI===ex?!((r=a).namespaceURI===eb&&!eM[o])&&!(r.namespaceURI===e_&&!ek[o])&&!ej[n]&&(eP[n]||!eF[n]):!("application/xhtml+xml"!==eI||!ez[e.namespaceURI]))},eN=function(e){cz(i.removed,{element:e});try{y(e).removeChild(e)}catch(t){if(f(e),!y(e))throw cB("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},eU=function(e){eZ(e);let t=g(e);if(t){let e=[];cx(t,t=>{cz(e,t)}),cx(e,e=>{try{f(e)}catch(e){}})}let i=b(e);if(i)for(let t=i.length-1;t>=0;--t){let r=i[t],a=r&&r.name;if("string"==typeof a)try{e.removeAttribute(a)}catch(e){}}},eV=function(e,t){try{cz(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){cz(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(er||ea)try{eN(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},e$=function(e){let t=b(e);if(t)for(let i=t.length-1;i>=0;--i){let r=t[i],a=r&&r.name;if("string"==typeof a&&!N[eC(a)])try{e.removeAttribute(a)}catch(e){}}},eZ=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(x?x(e):e.nodeType)===1&&e$(e);let i=g(e);if(i)for(let e=i.length-1;e>=0;--e)t.push(i[e])}},eG=function(e){let t=null,i=null;if(ei)e="<remove></remove>"+e;else{let t=cM(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===eI&&ev===ex&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let a=z?P(e):e;if(ev===ex)try{t=(new u).parseFromString(a,eI)}catch(e){}if(!t||!t.documentElement){t=A.createDocument(ev,"template",null);try{t.documentElement.innerHTML=ew?T:a}catch(e){}}let n=t.body||t.documentElement;return e&&i&&n.insertBefore(r.createTextNode(i),n.childNodes[0]||null),ev===ex?L.call(t,J?"html":"body")[0]:J?t.documentElement:n},eq=function(e){let t=w?w(e):e.ownerDocument;return C.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},eH=function(e){return e=cP(e,c0," "),e=cP(e,c2," "),e=cP(e,c3," ")},eW=function(e){var t;e.normalize();let i=w?w(e):e.ownerDocument,r=C.call(i||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),a=r.nextNode();for(;a;)a.data=eH(a.data),a=r.nextNode();let n=null==(t=e.querySelectorAll)?void 0:t.call(e,"template");n&&cx(n,e=>{eY(e.content)&&eW(e.content)})},eX=function(e){let t=v?v(e):null;return"string"==typeof t&&"form"===eC(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==b(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==x(e)||e.childNodes!==g(e))},eY=function(e){if(!x||"object"!=typeof e||null===e)return!1;try{return 11===x(e)}catch(e){return!1}},eK=function(e){if(!x||"object"!=typeof e||null===e)return!1;try{return"number"==typeof x(e)}catch(e){return!1}};function eJ(e,t,r){0!==e.length&&cx(e,e=>{e.call(i,t,r,eR)})}let eQ=function(e,t,i,r){return 0===e.length?t:t===i||t===r?cV(t):t},e1=function(e,t){if(eJ(O.beforeSanitizeElements,e,null),e!==t&&null===y(e))return eu&&eZ(e),!0;if(eX(e))return eN(e),!0;let r=eC(v?v(e):e.nodeName);if(j=eQ(O.uponSanitizeElement,j,B,ee),eJ(O.uponSanitizeElement,e,{tagName:r,allowedTags:j}),e!==t&&null===y(e))return eu&&eZ(e),!0;if(K&&e.hasChildNodes()&&!eK(e.firstElementChild)&&cj(ut,e.textContent)&&cj(ut,e.innerHTML)||!(!K||e.namespaceURI!==ex||"style"!==r||!eK(e.firstElementChild))||7===e.nodeType||!(!K||8!==e.nodeType||!cj(ui,e.data)))return eN(e),!0;if($[r]||!(G.tagCheck instanceof Function&&G.tagCheck(r))&&!j[r]){let i=function(e,t,i){if(!$[t]&&e3(t)&&(V.tagNameCheck instanceof RegExp&&cj(V.tagNameCheck,t)||V.tagNameCheck instanceof Function&&V.tagNameCheck(t)))return!1;if(ec&&!ep[t]){let t=y(e),r=g(e);
251if(r&&t)for(let a=r.length-1;a>=0;--a){let n=e===i?d(r[a],!0):r[a];t.insertBefore(n,m(e))}}return eN(e),!0}(e,r,t);return!1===i&&eJ(O.afterSanitizeElements,e,null),i}if((x?x(e):e.nodeType)===1&&!eB(e)||("noscript"===r||"noembed"===r||"noframes"===r)&&cj(ur,e.innerHTML))return eN(e),!0;if(Y&&3===e.nodeType){let t=eH(e.textContent);e.textContent!==t&&(cz(i.removed,{element:e.cloneNode()}),e.textContent=t)}return eJ(O.afterSanitizeElements,e,null),!1},e0=function(e,t,i){if(Z[t]||K&&"patchsrc"===t||K&&"for"===t&&"label"!==e&&"output"!==e||eo&&("id"===t||"name"===t)&&(i in r||i in eL))return!1;let a=N[t]||G.attributeCheck instanceof Function&&G.attributeCheck(t,e);if(H&&cj(c5,t));else if(q&&cj(c6,t));else if(a){if(eg[t]);else if(cj(F,cP(i,c7,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==cI(i,"data:")||!ef[e]){if(W&&!cj(c8,cP(i,c7,"")));else if(i)return!1}}else if(!(e3(e)&&(V.tagNameCheck instanceof RegExp&&cj(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&cj(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t,e))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&cj(V.tagNameCheck,i)||V.tagNameCheck instanceof Function&&V.tagNameCheck(i))))return!1;return!0},e2=cU({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),e3=function(e){return!e2[ck(e)]&&cj(ue,e)},e5=function(e,t,i,r){if(z&&"object"==typeof h&&"function"==typeof h.getAttributeType&&!i)switch(h.getAttributeType(e,t)){case"TrustedHTML":return P(r);case"TrustedScriptURL":M(),E++;try{return z.createScriptURL(r)}finally{E--}}return r},e6=function(e,t,r,a){try{r?e.setAttributeNS(r,t,a):e.setAttribute(t,a),eX(e)?eN(e):cw(i.removed)}catch(i){eV(t,e)}},e4=function(e){eJ(O.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||eX(e))return;let i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N=eQ(O.uponSanitizeAttribute,N,U,et),forceKeepAttr:void 0},r=t.length,a=eC(e.nodeName);for(;r--;){let n=t[r],o=n.name,l=n.namespaceURI,s=n.value,c=eC(o),u="value"===o?s:cA(s);i.attrName=c,i.attrValue=u,i.keepAttr=!0,i.forceKeepAttr=void 0,eJ(O.uponSanitizeAttribute,e,i),u=i.attrValue,el&&("id"===c||"name"===c)&&0!==cI(u,es)&&(eV(o,e),u=es+u),K&&cj(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)||"attributename"===c&&cM(u,"href")?eV(o,e):i.forceKeepAttr||(i.keepAttr&&(X||!cj(ua,u))?(Y&&(u=eH(u)),e0(a,c,u)?(u=e5(a,c,l,u))!==s&&e6(e,o,l,u):eV(o,e)):eV(o,e))}eJ(O.afterSanitizeAttributes,e,null)},e8=function(e){let t=null,i=eq(e);for(eJ(O.beforeSanitizeShadowDOM,e,null);t=i.nextNode();)if(eJ(O.uponSanitizeShadowNode,t,null),e1(t,e),e4(t),eY(t.content)&&e8(t.content),(x?x(t):t.nodeType)===1){let e=_(t);eY(e)&&(e7(e),e8(e))}eJ(O.afterSanitizeShadowDOM,e,null)},e7=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){e8(e.shadow);continue}let i=e.node,r=(x?x(i):i.nodeType)===1,a=g(i);if(a)for(let e=a.length-1;e>=0;--e)t.push({node:a[e],shadow:null});if(r){let e=v?v(i):null;if("string"==typeof e&&"template"===eC(e)){let e=i.content;eY(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(i);eY(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,n=null,o=null,l=null;if((ew=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!eK(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return cC(e);case"boolean":return cR(e);case"bigint":return cL?cL(e):"0";case"symbol":return cD?cD(e):"Symbol()";case"undefined":default:return cF(e);case"function":case"object":{if(null===e)return cF(e);let t=c$(e,"toString");if("function"==typeof t){let i=t(e);return"string"==typeof i?i:cF(i)}return cF(e)}}}(e)))throw cB("dirty is not a string, aborting");if(!i.isSupported)return e;Q?(j=ee,N=et):eO(t),(O.uponSanitizeElement.length>0||O.uponSanitizeAttribute.length>0)&&(j=cV(j)),O.uponSanitizeAttribute.length>0&&(N=cV(N)),i.removed=[];let s=eu&&"string"!=typeof e&&eK(e);if(s){!function(e){if(!K)return;let t=[e];for(;t.length>0;){let e=t.pop(),i=x?x(e):e.nodeType;if(7===i||8===i&&cj(ui,e.data)){try{f(e)}catch(e){}continue}if(1===i){let t=eC(v?v(e):e.nodeName);try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&"label"!==t&&"output"!==t&&e.removeAttribute("for")}catch(e){}}let r=g(e);
251if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}}(e);let t=v?v(e):e.nodeName;if("string"==typeof t){let i=eC(t);if(!j[i]||$[i])throw eU(e),cB("root node is forbidden and cannot be sanitized in-place")}if(eX(e))throw eU(e),cB("root node is clobbered and cannot be sanitized in-place");try{e7(e)}catch(t){throw eU(e),t}}else if(eK(e))1===(n=(r=eG("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?r=n:r.appendChild(n),e7(n);else{if(!er&&!Y&&!J&&-1===e.indexOf("<"))return z&&en?P(e):e;if(!(r=eG(e)))return er?null:en?T:""}r&&ei&&eN(r.firstChild);let c=s?e:r;try{let e=eq(c);for(;o=e.nextNode();)e1(o,c),e4(o),eY(o.content)&&e8(o.content)}catch(t){throw s&&(eU(e),cx(i.removed,e=>{e.element&&eZ(e.element)})),t}if(s)return cx(i.removed,e=>{e.element&&eZ(e.element)}),Y&&eW(e),e;if(er){if(Y&&eW(r),ea)for(l=R.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(N.shadowroot||N.shadowrootmode)&&(l=D.call(a,l,!0)),l}let u=J?r.outerHTML:r.innerHTML;return J&&j["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&cj(c9,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),Y&&(u=eH(u)),z&&en?P(u):u},i.setConfig=function(){eO(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0,ee=j,et=N},i.clearConfig=function(){eR=null,Q=!1,ee=null,et=null,z=S,T=""},i.isValidAttribute=function(e,t,i){return eR||eO({}),e0(eC(e),eC(t),i)},i.addHook=function(e,t){"function"==typeof t&&cO(O,e)&&cz(O[e],t)},i.removeHook=function(e,t){if(cO(O,e)){if(void 0!==t){let i=cv(O[e],t);return -1===i?void 0:cS(O[e],i,1)[0]}return cw(O[e])}},i.removeHooks=function(e){cO(O,e)&&(O[e]=[])},i.removeAllHooks=function(){O={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}();let ul=({config:e})=>{let t=p(),i=e.baseLayerOptions?.[e.baseLayer].fill??"light",[a,n]=(0,r.useState)(!1),[o,l]=(0,r.useState)(!1),s=t.current?.getMap().getContainer().getBoundingClientRect().width??0,c=(0,r.useCallback)(()=>{l(s<450)},[s]);(0,r.useEffect)(()=>(c(),window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}),[c]);let u="";void 0!==e.baseLayerOptions&&(u+=` ${e.baseLayerOptions[e.baseLayer]?.attribution??""}`),e.dataLayerOptions&&Object.entries(e.dataLayerOptions).map(([,e])=>{e.enabled&&(u+=` ${e.source?.attribution??""}`)}),uo.setConfig({ADD_ATTR:["target","rel"]});let h=uo.sanitize(u),d=r.createElement("div",{className:"attribution-text-container",style:{padding:"2px 8px 2px 8px"}},r.createElement("div",{style:{display:"inline-block",opacity:"1",color:"dark"===i?"#42526F":"#A6ADBB"},dangerouslySetInnerHTML:{__html:h}})),f=r.createElement("div",{className:"attribution-container",style:{backgroundColor:"dark"===i?"rgb(255,255,255,.6)":"rgb(0, 21, 61,.6)",bottom:"0",right:"0",borderRadius:"0px"}},d),m=r.createElement("div",{className:"attribution-text-container",style:{padding:`2px ${a?"24px":"12px"} 2px 8px`}},r.createElement("div",{style:{display:a?"block":"none"},dangerouslySetInnerHTML:{__html:h}})),g=r.createElement("div",{onClick:e=>{e.stopPropagation(),n(!a)},className:"attribution-button"},r.createElement(o$,{fill:"#42526F",size:"1.667em",style:{zIndex:"1"}}),r.createElement("div",{style:{position:"absolute",right:"5px",bottom:"5px",backgroundColor:"#ffffff",height:"10px",width:"10px",borderRadius:"5px",zIndex:"-1"}})),y=r.createElement("div",{className:"attribution-container",style:{maxWidth:o?"225px":"none",backgroundColor:"dark"===i?"rgb(255,255,255,.8)":"rgb(0, 21, 61,.6)"}},m,g);return r.createElement(r.Fragment,null,o?y:f)},us={"bottom-left":{left:"10px",bottom:"10px"},"bottom-center":{left:"50%",bottom:"10px",transform:"translateX(-50%)"},"bottom-right":{right:"10px",bottom:"10px"}},uc={xsmall:49,small:70,large:120},uu=({mapRef:e})=>{let t=rF(),[i,a]=(0,r.useState)(uc[t.logo.size]),n=(0,r.useCallback)(()=>{let t=Math.min(i,.18*Math.min(e.current?.getMap().getContainer().getBoundingClientRect().height??0,e.current?.getMap().getContainer().getBoundingClientRect().width??0));a(t<60?60:t)},[i,e]);return(0,r.useEffect)(()=>
251{if(!t.logo.show)return e.current&&(globalThis.mapInstance=e.current.getMap()),window.addEventListener("resize",n),n(),()=>{window.removeEventListener("resize",n)}},[t.logo.show,e,n]),r.createElement("div",{className:"map-key",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"12px",position:"absolute",...us[t.logo.position]}},t.logo.show&&r.createElement("img",{style:{height:`${Math.floor(2*i/5)}px`,width:`${Math.floor(i)}px`,opacity:"0.8"},src:"data:image/svg+xml,%3csvg height='63' viewBox='0 0 167 63' width='167' xmlns='http://www.w3.org/2000/svg'%3e%3cg fill='white'%3e%3cg transform='translate(0 32.609419)'%3e%3cpath d='m.31430765.35359611h11.86511385v2.82876887h-8.72203733v6.24686458h8.72203733v2.78948044h-8.72203733v10.3721525h-3.14307652z'/%3e%3cpath d='m16.068979.353596h2.907346v22.237266h-2.907346z'/%3e%3cpath d='m25.4589198 1.807269c.4714615 0 .9036345.15715383 1.2179422.51074993.3535961.31430766.5107499.74648068.5107499 1.21794216 0 .47146147-.1571538.86434604-.5107499 1.21794215s-.7464807.51074993-1.2179422.51074993c-.432173 0-.8250576-.15715382-1.1786537-.51074993s-.5107499-.74648068-.5107499-1.21794215c0-.43217303.1571538-.82505759.5107499-1.1786537.3535961-.39288456.7464807-.55003839 1.1786537-.55003839m-1.4143844 6.12899921h2.9073458v14.65459429h-2.9073458z'/%3e%3cpath d='m31.155746 13.0044791c0-1.5715383.5893269-2.7894804 1.7286921-3.69311491 1.1393652-.9036345 2.7109035-1.37509598 4.6753263-1.37509598h6.0504223v2.23944199h-2.9466342c.5893268.5893269.9822114 1.1000768 1.1786537 1.6108268.2357307.4714614.3535961 1.0214998.3535961 1.6501151 0 .7857692-.2357308 1.5322498-.6679038 2.2787305s-.9822114 1.2965191-1.6894036 1.6894036c-.7071922.3928846-1.807269.7071922-3.3788073.942923-1.1000767.1571538-1.6501151.5500384-1.6501151 1.1393652 0 .3535961.1964422.6286153.6286153.8250576.3928845.2357308 1.1393652.432173 2.239442.6679038 1.807269.3928845 2.9466342.7071922 3.4573842.9429229.5107499.2357308.9822114.5500384 1.3750959.942923.7071923.7071922 1.0607884 1.5715382 1.0607884 2.6323266 0 1.3750959-.6286153 2.5144612-1.8465575 3.3395188-1.2179421.8250576-2.9073458 1.2572306-4.9503455 1.2572306-2.0822882 0-3.7716918-.432173-4.989634-1.2572306-1.2572306-.8250576-1.8858459-1.9644229-1.8858459-3.3395188 0-2.0037113 1.2179422-3.2609419 3.6538265-3.8502688-.9822115-.6286153-1.4536729-1.2572306-1.4536729-1.8465574 0-.4714615.1964422-.9036345.6286153-1.2572306.432173-.3928846.9822114-.6679038 1.6894036-.8250576-2.1608651-1.0214999-3.2609419-2.5537497-3.2609419-4.7146148m4.7931917 10.2935756c-.9822114 0-1.7679805.1964423-2.3965958.6286153s-.942923.942923-.942923 1.6108267c0 1.5322498 1.375096 2.2787305 4.0859995 2.2787305 1.296519 0 2.2787305-.1964423 2.9859227-.5500384.7071922-.3928846 1.0607883-.9036345 1.0607883-1.6108267 0-.6679038-.432173-1.2572306-1.3358075-1.6501152-.9036345-.4714615-2.0429998-.7071922-3.4573842-.7071922m.6679038-12.8473253c-.7857692 0-1.4536729.2750192-2.0037113.7857692-.5500384.5500384-.8250576 1.1786537-.8250576 1.9251343 0 .7464807.2750192 1.375096.8250576 1.8858459.5500384.51075 1.2179421.7464807 2.0822882.7464807.8250576 0 1.4929613-.2357307 2.0429997-.7464807.5500384-.5107499.8250576-1.1393652.8250576-1.8858459 0-.7857691-.2750192-1.4143844-.8250576-1.9251343-.5893268-.51075-1.2965191-.7857692-2.1215766-.7857692'/%3e%3cpath d='m46.5961094.35359611h2.9073458v9.46851802c1.2179421-1.45367289 2.7109035-2.20015357 4.478884-2.20015357.9822114 0 1.8465575.23573074 2.6323266.74648068.7857692.47146147 1.3358075 1.17865369 1.7286921 2.04299976.3928846.864346.5500384 2.1608651.5500384 3.8502687v8.3684412h-2.9073458v-9.0756334c0-1.0607883-.2750192-1.9251344-.7857691-2.5930381-.5107499-.6679038-1.2179422-.98221145-2.0822882-.98221145-.6286153 0-1.2179422.15715385-1.807269.51074995-.5500384.3143076-1.1786537.864346-1.8465575 1.6501152v10.5293063h-2.9073457v-22.31584329z'/%3e%3cpath d='m61.7221652 10.2542871 5.4610954-5.34323004v3.02521115h4.5967494v2.59303809h-4.5967494v7.229076c0 1.6894037.7071922 2.5144613 2.0822882 2.5144613 1.0214999 0 2.1215767-.3535962 3.2609419-1.0214999v2.7109035c-1.1000768.6286153
251-2.3180189.9429229-3.614538.9429229-1.3358075 0-2.4358843-.3928845-3.3002303-1.1786537-.2750192-.2357307-.51075-.5107499-.6679038-.7857691-.1964423-.3143076-.3143077-.6679037-.432173-1.1393652-.1178654-.4714615-.1964423-1.375096-.1964423-2.7109035v-6.5218838h-2.5537497v-.3143077z'/%3e%3c/g%3e%3cg transform='translate(76.219606)'%3e%3cpath d='m1.10007678 55.2002814c-.19644228 0-.39288456-.0392885-.58932684-.1571538-.47146148-.3143077-.62861531-.942923-.2750192-1.4536729.03928846-.0785769 1.17865369-1.807269 3.45738417-4.5181725.35359611-.432173 1.02149987-.51075 1.45367289-.1178654.43217302.3535961.51074994 1.0214999.11786537 1.4536729-2.20015356 2.5930381-3.30023034 4.2824418-3.3395188 4.3217302-.15715383.3143077-.51074994.4714615-.82505759.4714615zm7.11121063-8.5255951c-.2750192 0-.51074994-.0785769-.70719222-.2750192-.43217302-.3928845-.43217302-1.0607883-.03928845-1.4536729 1.29651906-1.3358075 2.63232656-2.671615 4.00742256-3.9288456.432173-.3928846 1.0607883-.3535961 1.4536729.0392884.3928846.4321731.3535961 1.1000768-.0392885 1.4536729-1.3358075 1.2572306-2.671615 2.5537497-3.92884562 3.8502688-.19644228.2357307-.47146148.3143076-.74648067.3143076zm8.13271049-7.5040952c-.3143076 0-.5893268-.1178653-.7857691-.3928845-.3535961-.4321731-.3143077-1.1000768.1571538-1.4536729 1.4536729-1.1786537 2.9466342-2.3573074 4.4395956-3.4180957.4714615-.3535961 1.1000768-.2357308 1.4536729.2357307s.2357307 1.1000768-.2357308 1.4536729c-1.4536729 1.0607883-2.9466342 2.2001536-4.3217302 3.3788073-.2357307.1178653-.4714615.1964422-.7071922.1964422zm8.9970565-6.5611722c-.3535961 0-.6679037-.1571538-.864346-.4714615-.3143077-.4714615-.1571538-1.1393652.3143077-1.4536729 1.5715382-1.0214998 3.1823649-2.0037113 4.7931916-2.9073458.51075-.2750191 1.1393653-.1178653 1.4143845.3928846s.1178654 1.1393653-.3928846 1.4143844c-1.5715382.9036345-3.182365 1.8465575-4.7146148 2.8287689-.1964422.1571538-.3535961.1964423-.5500384.1964423zm9.6649603-5.421807c-.3928845 0-.7464806-.1964423-.9429229-.5893268-.2357308-.51075-.0392885-1.1393653.4714615-1.375096 1.6894036-.8250576 3.3788072-1.6108267 5.1074993-2.318019.5107499-.2357307 1.1393653.0392885 1.375096.5500384.2357307.5500384-.0392885 1.1393653-.5500384 1.375096-1.6894036.7071922-3.3788073 1.4536729-4.989634 2.239442-.1964423.0785769-.3535961.1178654-.4714615.1178654zm10.2149987-4.2824418c-.432173 0-.8250576-.2750192-.9822114-.7071922-.1964423-.5500384.1178654-1.1393652.6286153-1.3358075 1.7679806-.5893268 3.5752496-1.1786537 5.3432301-1.6501152.5500384-.1571538 1.1393653.1571539 1.2965191.7071922.1571538.5500384-.1571538 1.1393653-.7071922 1.2965191-1.7679806.4714615-3.5359611 1.0214999-5.2253648 1.6108267-.1178653.0785769-.2357307.0785769-.3535961.0785769z'/%3e%3cpath d='m90.7170461 11.5115178c.0392884.1178653-.1964423.432173-.3928846.6679037-.3143077.3143077-1.2179421 1.375096-4.8324801 2.1608651-3.614538.7857692-8.171999 1.6108267-8.4863067 1.6894037-.3143076.0392884-.9429229-.078577-1.296519.9822114-.3143077 1.0607883-4.3217302 15.4010749-4.3217302 15.4010749l-1.2179422.2750192-1.375096-15.0081904s-8.525595 1.6894037-9.3899411 1.6894037l-2.1608651 5.7361146-1.1000768.1178654.2357308-5.8146916s-1.1786537-.1964423-1.375096-.2357307c-.0785769 0-.1571538 0-.1964423-.1178654 0-.0785769.0392885-.1178654.1178654-.1571538.1571538-.1178654 1.1786537-.7464807 1.1786537-.7464807l-2.5537497-5.2253647 1.0607883-.3535961 4.2824418 4.4003071c.7857691-.3535961 9.2720757-2.239442 9.2720757-2.239442l-4.7539032-14.34028663 1.2179421-.23573074s9.4292296 11.55080617 10.1757103 12.37586377 1.2572306.4714615 1.5715382.3928846c.3143077-.0785769 4.8324802-1.1393652 8.4470182-1.8858459s4.8717686-.1178654 5.3039416.0392884c.2357308.0785769.5893269.3143077.5893269.4321731z'/%3e%3c/g%3e%3cg transform='translate(73.862298 32.609419)'%3e%3cpath d='m40.8207063 7.93626821h3.1037881l-6.4433069 14.96890189h-.9822114l-4.3217302-10.2542871-4.2431533 10.2542871h-.9822114l-6.4825954-14.96890189h3.1037881l3.8502687 8.91847959 3.693115-8.91847959h2.1608651l3.7324033 8.91847959z'/%3e%3cpath d='m55.9467621 13.7902482v6.2468646c0 .51075.1571538.7464807.5107499.7464807s.9036345-.2750192 1.6501152-.7857691v1.728692c-.6679038.4321731-1.1786537.7071923-1.5715383.8643461s-.8250576.235
2517307-1.2572306.2357307c-1.2572306 0-1.9644228-.4714614-2.2001536-1.4536729-1.2179421.942923-2.5537496 1.4536729-3.9288456 1.4536729-1.0214999 0-1.8858459-.3535961-2.5537497-1.0214998-.6679037-.6679038-1.0214999-1.5322498-1.0214999-2.5537497 0-.942923.3143077-1.7286921.9822115-2.4751728.6679037-.7071922 1.6108267-1.296519 2.8287688-1.7286921l3.6931149-1.2572306v-.7857691c0-1.7679805-.864346-2.671615-2.6323265-2.671615-1.5715383 0-3.1037881.8250575-4.5967495 2.4358843v-3.14307656c1.1393653-1.29651906 2.750192-1.96442282 4.8324802-1.96442282 1.5715382 0 2.8287689.43217302 3.8109803 1.25723061.3143076.27501919.5893268.6286153.864346 1.06078832.2357308.43217305.432173.86434605.4714615 1.33580755.0785769.3928845.1178654 1.2572306.1178654 2.4751727m-2.8287689 5.8932685v-4.3217302l-1.9251344.7464807c-.9822114.3928845-1.6894036.7857691-2.0822882 1.1786537-.3928845.3928845-.6286153.9036345-.6286153 1.4929613 0 .5893269.1964423 1.1000768.5893269 1.4929614.3928845.3928845.9036345.5893268 1.4929613.5893268.9036345-.0392885 1.7679806-.432173 2.5537497-1.1786537'/%3e%3cpath d='m63.8044534 7.93626821v3.33951879l.1571538-.2357307c1.4143844-2.2787305 2.8287689-3.37880728 4.2038648-3.37880728 1.1000768 0 2.2394421.55003839 3.4180957 1.65011517l-1.5322498 2.55374971c-1.0214998-.942923-1.9644228-1.4143845-2.7894804-1.4143845-.9429229 0-1.7286921.4321731-2.4358843 1.3358076s-1.0214998 1.9644228-1.0214998 3.1823649v7.661249h-2.9073458v-14.65459423h2.9073458z'/%3e%3cpath d='m86.238162 15.5189403h-10.2542871c.0785769 1.4143845.5500384 2.5144612 1.4143844 3.3395188.8643461.8250576 1.9644228 1.2572306 3.3395188 1.2572306 1.8858459 0 3.6538265-.5893268 5.2646532-1.7679805v2.8287689c-.9036345.5893268-1.7679806 1.0214998-2.6323266 1.2572306-.864346.2357307-1.8858459.3928845-3.0644996.3928845-1.6108267 0-2.9073458-.3143076-3.8895572-1.0214998-.9822114-.6679038-1.807269-1.5715383-2.3965958-2.7109035-.5893269-1.1393653-.9036345-2.4358843-.9036345-3.9288457 0-2.239442.6286153-4.046711 1.8858459-5.42180699 1.2572306-1.41438443 2.9073457-2.08228819 4.911057-2.08228819 1.9251344 0 3.4966727.66790376 4.6360379 2.04299974 1.1393652 1.37509594 1.7286921 3.18236494 1.7286921 5.46109544v.3535961zm-10.2149987-1.7286921h7.3862299c-.078577-1.1786537-.4321731-2.0822882-1.0214999-2.7109035-.6286153-.6286153-1.4536729-.9429229-2.4751728-.9429229-1.0214998 0-1.8858459.3143076-2.5537496.9429229-.7071923.6679038-1.1393653 1.5715383-1.3358076 2.7109035'/%3e%3cpath d='m11.0007678 5.10749935-7.3862298 17.48336315h-3.26094189l9.50780647-22.35513176h2.23944202l10.0185564 22.35513176h-3.2609419z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e"}))},uh=e=>{let t,i=new Set,r=(e,r)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({},t,a),i.forEach(i=>i(t,e))}},a=()=>t,n={setState:r,getState:a,getInitialState:()=>o,subscribe:e=>(i.add(e),()=>i.delete(e))},o=t=e(r,a,n);return n},up=e=>{let t=(e=>e?uh(e):uh)(e),i=e=>(function(e,t=e=>e){let i=r.useSyncExternalStore(e.subscribe,r.useCallback(()=>t(e.getState()),[e,t]),r.useCallback(()=>t(e.getInitialState()),[e,t]));return r.useDebugValue(i),i})(t,e);return Object.assign(i,t),i},ud=e=>!!e.dispatchFromDevtools&&"function"==typeof e.dispatch,uf=new Map,um=e=>{let t=uf.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([e,t])=>[e,t.getState()])):{}},ug=/.+ (.+) .+/,uy=/^([^@]+)@/,u_=(e,t={})=>(i,r,a)=>{let n,{enabled:o,anonymousActionType:l,store:s,...c}=t;try{n=(null==o||o)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!n)return e(i,r,a);let{connection:u,...h}=((e,t,i)=>{if(void 0===e)return{type:"untracked",connection:t.connect(i)};let r=uf.get(i.name);if(r)return{type:"tracked",store:e,...r};let a={connection:t.connect(i),stores:{}};return uf.set(i.name,a),{type:"tracked",store:e,...a}})(s,n,c),p=!0;a.setState=(e,t,n)=>{let o=i(e,t);if(!p)return o;let h=void 0===n?{type:l||function(e){var t,i,r;if(!e)return;let a=e.split("\n"),n=a.findIndex(e=>e.includes("api.setState"));if(n<0)return;let o=(null==(t=a[n+1])?void 0:t.trim())||"";return(null==(i=ug.exec(o))?void 0:i[1])||(null==(r=uy.exec(o))?void 0:r[1])}(Error().stack)||"anonymous"}:"string"==typeof n?{type:n}:n;return void 0===s?null==u||u.send(h,r()):null==u||u.send({...h,type:`${s}/${h.type}`},{...um(c.name),[s]:a.getState()}),o},a.devtools={cleanup:()=>{u&&"function"==typeof u.unsubscribe&&u.unsubscribe(),((e,t)=>{if(void 0===t)return;let i=uf.get(e);i&&(delete i.stores[t],0===Object.keys(i.stores).length&&uf.delete(e))})(c.name,s)}};let d=(...e)=>{let t=p;p=!1,i(...e),p=t},f=e(a.setState,r,a);if("untracked"===h.type?null==u||u.init(f):(h.stores[h.store]=a,null==u||u.init(Object.fromEntries(Object.entries(h.stores).map(([e,t])=>[e,e===h.store?f:t.getState()])))),ud(a)){let e=!1,t=a.dispatch;a.dispatch=(...i)=>{"__setState"!==i[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...i)}}return u.subscribe(e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):ub(e.payload,e=>{if("__setState"!==e.type)ud(a)&&a.dispatch(e);else{if(void 0===s)return void d(e.state);1!==Object.keys(e.state).length&&console.error('\n                    [zustand devtools middleware] Unsupported __setState action format.\n                    When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n                    and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n                    ');let t=e.state[s];if(null==t)return;JSON.stringify(a.getState())!==JSON.stringify(t)&&d(t)}});case"DISPATCH":switch(e.payload.type){case"RESET":return d(f),void 0===s?null==u?void 0:u.init(a.getState()):null==u?void 0:u.init(um(c.name));
251case"COMMIT":return void 0===s?void(null==u||u.init(a.getState())):null==u?void 0:u.init(um(c.name));case"ROLLBACK":return ub(e.state,e=>{if(void 0===s)return d(e),void(null==u||u.init(a.getState()));d(e[s]),null==u||u.init(um(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ub(e.state,e=>{void 0!==s?JSON.stringify(a.getState())!==JSON.stringify(e[s])&&d(e[s]):d(e)});case"IMPORT_STATE":{let{nextLiftedState:i}=e.payload,r=null==(t=i.computedStates.slice(-1)[0])?void 0:t.state;if(!r)return;return d(void 0===s?r:r[s]),void(null==u||u.send(null,i))}case"PAUSE_RECORDING":return p=!p}return}}),f},ub=(e,t)=>{let i;try{i=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==i&&t(i)},ux={top:0,bottom:0,left:0,right:0},uv=up(u_(e=>({focusedFlightId:null,focusedFlightBoundingBox:null,focusedFlightPadding:ux,setFocusedFlight:(t,i,r)=>e(()=>({focusedFlightId:t,focusedFlightBoundingBox:i,focusedFlightPadding:r})),clearFocusedFlight:()=>e(()=>({focusedFlightId:null,focusedFlightBoundingBox:null,focusedFlightPadding:ux}))}),{name:"tracking-map-store"}));var uw,uz,uS,uT,uk,uE={exports:{}},uM=U((uk||(uk=1,!function(){function e(e,t,i){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){n(r.response,t,i)},r.onerror=function(){console.error("could not download file")},r.send()}function t(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(i){var t=document.createEvent("MouseEvents");
251t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof N&&N.global===N?N:void 0,a=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),n=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(a,n,o){var l=r.URL||r.webkitURL,s=document.createElement("a");s.download=n=n||a.name||"download",s.rel="noopener","string"==typeof a?(s.href=a,s.origin===location.origin?i(s):t(s.href)?e(a,n,o):i(s,s.target="_blank")):(s.href=l.createObjectURL(a),setTimeout(function(){l.revokeObjectURL(s.href)},4e4),setTimeout(function(){i(s)},0))}:"msSaveOrOpenBlob"in navigator?function(r,a,n){if(a=a||r.name||"download","string"!=typeof r){var o;navigator.msSaveOrOpenBlob((void 0===(o=n)?o={autoBom:!1}:"object"!=typeof o&&(console.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(r.type)?new Blob(["\uFEFF",r],{type:r.type}):r),a)}else if(t(r))e(r,a,n);else{var l=document.createElement("a");l.href=r,l.target="_blank",setTimeout(function(){i(l)})}}:function(t,i,n,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof t)return e(t,i,n);var l="application/octet-stream"===t.type,s=/constructor/i.test(r.HTMLElement)||r.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||l&&s||a)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},u.readAsDataURL(t)}else{var h=r.URL||r.webkitURL,p=h.createObjectURL(t);o?o.location=p:location.href=p,o=null,setTimeout(function(){h.revokeObjectURL(p)},4e4)}});r.saveAs=n.saveAs=n,uE.exports=n}()),uE.exports));let uP=e=>navigator.clipboard.writeText(e),uI=({mapRef:e})=>{let t=nj(),i=t.flights,{focusedFlightId:a,focusedFlightBoundingBox:n}=uv(),[o,l]=(0,r.useState)(0),s=e.current?.getBounds(),c=s?.getNorthWest(),u=s?.getSouthEast(),h=e.current?.getCenter(),p=`Focused flight: ${a??"null"} | Bounds: ${JSON.stringify(n)}`,d=`Top Left: [${c?.lng.toFixed(3)}, ${c?.lat.toFixed(3)}] | Center: [${h?.lng.toFixed(3)}, ${h?.lat.toFixed(3)}] | Bottom Right: [${u?.lng.toFixed(3)}, ${u?.lat.toFixed(3)}] | Zoom: ${e.current?.getZoom().toFixed(3)}`;return(0,r.useEffect)(()=>{i.size>o&&l(i.size)},[i,o]),r.createElement("div",{className:"devtool"},r.createElement("div",{className:"devtool-stats"},"Total flights: ",i.size," | Max flights: ",o,r.createElement("button",{className:"devtool-button",onClick:()=>(e=>{let t=new Blob([JSON.stringify(e,(e,t)=>t instanceof Map?Object.fromEntries(t):t instanceof Set?[...t]:t,4)],{type:"application/json"});uM.saveAs(t,`flightStore-${Date.now()}.json`)})(t)},"Save FlightStore")),r.createElement("div",{className:"tracked-flight copyable",onClick:()=>uP(p)},p," ⎘"),r.createElement("div",{className:"center-zoom copyable",onClick:()=>uP(d)},d," ⎘"))},uA=({layerConfigs:e})=>{if(void 0===e)return r.createElement(r.Fragment,null);let t=e.map(e=>{if(e.layer&&e.source){let t=e.layer,i=e.source;return r.createElement(F,{key:e.id,...i},r.createElement(B,{beforeId:e.beforeId,...t}))}return null});return r.createElement(r.Fragment,null,t)},uC=({layerOptions:e})=>r.createElement(r.Fragment,null,Object.entries(e).map(([e,t])=>r.createElement(uA,{key:e,...t}))),uR=up(u_(()=>({selectedFlightId:null,highlightedFlightId:null}),{name:"flight-map-store"})),uL=e=>uR.setState({selectedFlightId:e}),uD=e=>uR.setState({highlightedFlightId:e});function uO(e){let t={type:"Feature"};return Object.keys(e).forEach(i=>{switch(i){case"type":case"properties":case"geometry":return;default:t[i]=e[i]}}),t.properties=function e(t){let i={};return t&&Object.keys(t).forEach(r=>{let a=t[r];"object"==typeof a?null===a?i[r]=null:Array.isArray(a)?i[r]=a.map(e=>
251e):i[r]=e(a):i[r]=a}),i}(e.properties),null==e.geometry?t.geometry=null:t.geometry=uF(e.geometry),t}function uF(e){let t={type:e.type};return e.bbox&&(t.bbox=e.bbox),"GeometryCollection"===e.type?t.geometries=e.geometries.map(e=>uF(e)):t.coordinates=function e(t){return"object"!=typeof t[0]?t.slice():t.map(t=>e(t))}(e.coordinates),t}function uj(e,t,i,r){t=t||("Feature"===e.type?e.properties:{});var a=oi(e),n=a.coordinates,o=a.type;if(!n.length)throw Error("line must contain coordinates");switch(o){case"LineString":return i&&(n=uB(n)),n2([n],t);case"MultiLineString":var l=[],s=0;return n.forEach(function(e){if(i&&(e=uB(e)),r){var t,a,n,o=(a=(t=lt(n3(e)))[0],n=t[1],Math.abs(a-t[2])*Math.abs(n-t[3]));o>s?(l.unshift(e),s=o):l.push(e)}else l.push(e)}),n2(l,t);default:throw Error("geometry type "+o+" is not supported")}}function uB(e){var t=e[0],i=t[0],r=t[1],a=e[e.length-1],n=a[0],o=a[1];return i===n&&r===o||e.push(t),e}var uN=function(e,t={}){var i,r,a,n=t.properties,o=null==(i=t.autoComplete)||i,l=null==(r=t.orderCoords)||r;if(null!=(a=t.mutate)&&a||(e=function(e){if(!e)throw Error("geojson is required");switch(e.type){case"Feature":return uO(e);case"FeatureCollection":let t={type:"FeatureCollection"};return Object.keys(e).forEach(i=>{switch(i){case"type":case"features":return;default:t[i]=e[i]}}),t.features=e.features.map(e=>uO(e)),t;case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return uF(e);default:throw Error("unknown GeoJSON type")}}(e)),"FeatureCollection"===e.type){var s=[];return e.features.forEach(function(e){s.push(ot(uj(e,{},o,l)))}),n4(s,n)}return uj(e,n,o,l)};function uU(e){return nc(357.52911+e*(35999.05029-1537e-7*e))}function uV(e){let t=(280.46646+e*(36000.76983+3032e-7*e))%360;return nc(t<0?t+360:t)}function u$(e){return nc(23+(26+(21.448-e*(46.815+e*(59e-5-.001813*e)))/60)/60)+.00256*nc(Math.cos(nc(125.04-1934.136*e)))}function uZ(e,t,i){let r=[],a=nu(t/6378137);for(let a=0;a<i+1;a++)r.push(function(e,t,i){let r=nc(t),a=i/6378137,n=nc(e[0]),o=nc(e[1]),l=Math.asin(Math.sin(o)*Math.cos(a)+Math.cos(o)*Math.sin(a)*Math.cos(r));return[nu(n-Math.atan2(Math.sin(r)*Math.sin(a)*Math.cos(o),Math.cos(a)-Math.sin(o)*Math.sin(l))),nu(l)]}([e.lon,e.lat],a/i*360,t));return a>90-e.lat&&r.push([e.lon+180,r[0][1]],[e.lon+180,90],[e.lon-180,90],[e.lon-180,r[0][1]]),a>90+e.lat&&r.splice(1+(i>>1),0,[e.lon-180,r[i>>1][1]],[e.lon-180,-90],[e.lon+180,-90],[e.lon+180,r[i>>1][1]]),uN(n3(r))}let uG=({config:e,date:t,options:i})=>{let a=i?.opacity??.15,n=i?.beforeId??"z0",[o,l]=(0,r.useState)("");return(0,r.useEffect)(()=>
251{l(n)},[n]),e.sunlitEarthLayer.enabled?r.createElement(F,{id:"twilight-zone-source",type:"geojson",data:{type:"FeatureCollection",features:function(e,t){let i=function(e){var t;let i=[(t=function(e){let t=(e-Date.UTC(2e3,0,1,12))/864e5/36525;return[(new Date(e).setUTCHours(0,0,0,0)-e)/864e5*360-180-nu(function(e){let t=.016708634-e*(42037e-9+1267e-10*e),i=uU(e),r=uV(e),a=Math.tan(u$(e)/2)**2;return a*Math.sin(2*r)-2*t*Math.sin(i)+4*t*a*Math.sin(i)*Math.cos(2*r)-.5*a*a*Math.sin(4*r)-1.25*t*t*Math.sin(2*i)}(t)),nu(Math.asin(Math.sin(u$(t))*Math.sin(uV(t)+function(e){let t=uU(e);return nc(Math.sin(t)*(1.914602-e*(.004817+14e-6*e))+Math.sin(t+t)*(.019993-101e-6*e)+289e-6*Math.sin(t+t+t))}(t)-nc(.00569+.00478*Math.sin(nc(125.04-1934.136*t))))))]}(e))[0]+180,-t[1]];return{lat:i[1],lon:nx(i[0])}}(e),r=Math.PI/2*6378137;return[uZ(i,r,t),uZ(i,168/180*r,t),uZ(i,156/180*r,t),uZ(i,.8*r,t)]}(t,e.sunlitEarthLayer.pointsPerTerminator)}},r.createElement(B,{beforeId:o,id:"twilight-zone-layer",...(e=>({id:"twilight-zone-layer",type:"fill",source:"twilight-zone-source",maxzoom:7,paint:{"fill-opacity":["interpolate",["linear"],["zoom"],0,e,6,e,7,0],"fill-color":"#010713"}}))(a)})):null},uq=(e,t,i)=>({type:"Feature",geometry:{type:"Point",coordinates:t},properties:{airportCode:e,offset:i}}),uH=({data:e,baseLayer:t,scaleFactor:i,airportCodeFormat:a})=>{let{current:n}=p(),o=nU(t),l=(e=>"flightaware_dark"===e?"#42526F":"flightaware_classic"===e?"#537B9B":"premium_satellite"===e?"#00153D":"#E5E8EC")(t),{takeoff:s,landing:c}=(e=>{let t=`<svg stroke="currentColor" fill="${encodeURIComponent(e)}" stroke-width="0" viewBox="0 0 24 24" id="takeoff-icon" height="8px" width="8px" xmlns="http://www.w3.org/2000/svg" ><path fill="none" d="M0 0h24v24H0z"></path><path d="M2.5 19h19v2h-19v-2zm19.57-9.36c-.21-.8-1.04-1.28-1.84-1.06L14.92 10l-6.9-6.43-1.93.51 4.14 7.17-4.97 1.33-1.97-1.54-1.45.39 2.59 4.49s7.12-1.9 16.57-4.43c.81-.23 1.28-1.05 1.07-1.85z"></path></svg>`;return{landing:`<svg stroke="currentColor" fill="${encodeURIComponent(e)}" stroke-width="0" viewBox="0 0 24 24" id="landing-icon" height="8px" width="8px" xmlns="http://www.w3.org/2000/svg" ><path fill="none" d="M0 0h24v24H0V0z"/><path d="M2.5 19h19v2h-19v-2zm16.84-3.15c.8.21 1.62-.26 1.84-1.06.21-.8-.26-1.62-1.06-1.84l-5.31-1.42-2.76-9.02L10.12 2v8.28L5.15 8.95l-.93-2.32-1.45-.39v5.17l16.57 4.44z"/></svg>`,takeoff:t}})(o),u=8*i,h=((e,t)=>{let i=[];for(let r of e){let e=r?.data?.origin??null,a=r?.data?.destination??null,n=r.data?.status===lh.Enroute,o=e?o6(e,t):null,l=a?o6(a,t):null;null!=o&&""!==o&&i.push({airportCode:o,icon:n?null:"takeOff"}),null!=l&&""!==l&&i.push({airportCode:l,icon:n?null:"landing"})}return i})(e,a),[d,f]=(0,r.useState)(!1),[m,g]=(0,r.useState)(),[y,_]=(0,r.useState)(),[b,x]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{document.fonts.ready.then(()=>{f(!0)})},[]),(0,r.useEffect)(()=>{n?.hasImage("airport-dot-image")&&n?.removeImage("airport-dot-image"),n?.addImage("airport-dot-image",(e=>{let t=oJ(o0,o0).getContext("2d");t.beginPath(),t.arc(16,16,16,0,2*Math.PI,!1),t.fillStyle=e,t.fill();let i=t.getImageData(0,0,o0,o0).data;return{width:o0,height:o0,data:i,context:t}})(o),{pixelRatio:window.devicePixelRatio})},[o,n]),(0,r.useEffect)(()=>{let e=new Image(u,u);e.onload=()=>g(e),e.src=`data:image/svg+xml;charset=utf-8,${s}`},[s,u]),(0,r.useEffect)(()=>{let e=new Image(u,u);e.onload=()=>_(e),e.src=`data:image/svg+xml;charset=utf-8,${c}`},[c,u]),(0,r.useEffect)(()=>{if(n?.isStyleLoaded&&d&&void 0!==m&&void 0!==y){for(let e of h){let t;t="takeOff"===e.icon?m:"landing"===e.icon?y:null;let r=oQ(e.airportCode,i,o,l,t);n?.hasImage(e.airportCode)&&n?.removeImage(e.airportCode),n?.addImage(e.airportCode,r,{pixelRatio:window.devicePixelRatio})}x(!0)}},[d,m,y,i,o,l,n,JSON.stringify(h)]),b?r.createElement(r.Fragment,null,r.createElement(F,{...((e,t,i)=>{let r=[];for(let a of e){let e=a.data?.status,n=a?.data?.origin??null,o=a?.data?.destination??null,l=n?o6(n,t):null,s=o?o6(o,t):null,c=n?.location??null,u=o?.location??null;if(null!=l&&null!=c){let t=o3(c,u,"origin",l,i,e);r.push(uq(l,c,t))}if(null!=s&&null!=u){let t=o3(c,u,"destination",s,i,e);r.push(uq(s,u,t))}}return{id:"airport-source",type:"geojson",data:{type:"FeatureCollection",features:r}}})(e,a,i)},r.createElement(B,{beforeId:"z6",id:"airport-marker-layer",id:"airport-marker-layer",type:"symbol",source:"airport-source",maxzoom:12,layout:{"icon-image":["get","airportCode",["properties"]
251],"icon-offset":["get","offset",["properties"]],"icon-size":1.1}}),r.createElement(B,{beforeId:"z6",id:"airport-dot-layer",id:"airport-dot-layer",type:"symbol",source:"airport-source",maxzoom:12,layout:{"icon-image":"airport-dot-image","icon-ignore-placement":!0,"icon-allow-overlap":!0,"icon-size":.15*i}}))):null},uW=Math.min,uX=Math.max,uY={left:"right",right:"left",bottom:"top",top:"bottom"},uK={start:"end",end:"start"};function uJ(e,t){return"function"==typeof e?e(t):e}function uQ(e){return e.split("-")[0]}function u1(e){return e.split("-")[1]}function u0(e){return"x"===e?"y":"x"}function u2(e){return"y"===e?"height":"width"}function u3(e){return["top","bottom"].includes(uQ(e))?"y":"x"}function u5(e){return e.replace(/start|end/g,e=>uK[e])}function u6(e){return e.replace(/left|right|bottom|top/g,e=>uY[e])}function u4(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function u8(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function u7(e,t,i){let r,{reference:a,floating:n}=e,o=u3(t),l=u0(u3(t)),s=u2(l),c=uQ(t),u="y"===o,h=a.x+a.width/2-n.width/2,p=a.y+a.height/2-n.height/2,d=a[s]/2-n[s]/2;switch(c){case"top":r={x:h,y:a.y-n.height};break;case"bottom":r={x:h,y:a.y+a.height};break;case"right":r={x:a.x+a.width,y:p};break;case"left":r={x:a.x-n.width,y:p};break;default:r={x:a.x,y:a.y}}switch(u1(t)){case"start":r[l]-=d*(i&&u?-1:1);break;case"end":r[l]+=d*(i&&u?-1:1)}return r}async function u9(e,t){var i;void 0===t&&(t={});let{x:r,y:a,platform:n,rects:o,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:d=0}=uJ(t,e),f=u4(d),m=l[p?"floating"===h?"reference":"floating":h],g=u8(await n.getClippingRect({element:null==(i=await (null==n.isElement?void 0:n.isElement(m)))||i?m:m.contextElement||await (null==n.getDocumentElement?void 0:n.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),y="floating"===h?{...o.floating,x:r,y:a}:o.reference,_=await (null==n.getOffsetParent?void 0:n.getOffsetParent(l.floating)),b=await (null==n.isElement?void 0:n.isElement(_))&&await (null==n.getScale?void 0:n.getScale(_))||{x:1,y:1},x=u8(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:_,strategy:s}):y);return{top:(g.top-x.top+f.top)/b.y,bottom:(x.bottom-g.bottom+f.bottom)/b.y,left:(g.left-x.left+f.left)/b.x,right:(x.right-g.right+f.right)/b.x}}let he=Math.min,ht=Math.max,hi=Math.round,hr=Math.floor,ha=e=>({x:e,y:e});function hn(e){return hs(e)?(e.nodeName||"").toLowerCase():"#document"}function ho(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function hl(e){var t;return null==(t=(hs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function hs(e){return e instanceof Node||e instanceof ho(e).Node}function hc(e){return e instanceof Element||e instanceof ho(e).Element}function hu(e){return e instanceof HTMLElement||e instanceof ho(e).HTMLElement}function hh(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof ho(e).ShadowRoot)}function hp(e){let{overflow:t,overflowX:i,overflowY:r,display:a}=hg(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+i)&&!["inline","contents"].includes(a)}function hd(e){let t=hf(),i=hg(e);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some(e=>(i.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(i.contain||"").includes(e))}function hf(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function hm(e){return["html","body","#document"].includes(hn(e))}function hg(e){return ho(e).getComputedStyle(e)}function hy(e){return hc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function h_(e){if("html"===hn(e))return e;let t=e.assignedSlot||e.parentNode||hh(e)&&e.host||hl(e);return hh(t)?t.host:t}function hb(e,t,i){var r;void 0===t&&(t=[]),void 0===i&&(i=!0);let a=function e(t){let i=h_(t);return hm(i)?t.ownerDocument?t.ownerDocument.body:t.body:hu(i)&&hp(i)?i:e(i)}(e),n=a===(null==(r=e.ownerDocument)?void 0:r.body),o=ho(a);
251return n?t.concat(o,o.visualViewport||[],hp(a)?a:[],o.frameElement&&i?hb(o.frameElement):[]):t.concat(a,hb(a,[],i))}function hx(e){let t=hg(e),i=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=hu(e),n=a?e.offsetWidth:i,o=a?e.offsetHeight:r,l=hi(i)!==n||hi(r)!==o;return l&&(i=n,r=o),{width:i,height:r,$:l}}function hv(e){return hc(e)?e:e.contextElement}function hw(e){let t=hv(e);if(!hu(t))return ha(1);let i=t.getBoundingClientRect(),{width:r,height:a,$:n}=hx(t),o=(n?hi(i.width):i.width)/r,l=(n?hi(i.height):i.height)/a;return o&&Number.isFinite(o)||(o=1),l&&Number.isFinite(l)||(l=1),{x:o,y:l}}let hz=ha(0);function hS(e){let t=ho(e);return hf()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:hz}function hT(e,t,i,r){var a;void 0===t&&(t=!1),void 0===i&&(i=!1);let n=e.getBoundingClientRect(),o=hv(e),l=ha(1);t&&(r?hc(r)&&(l=hw(r)):l=hw(e));let s=(void 0===(a=i)&&(a=!1),!(!r||a&&r!==ho(o))&&a)?hS(o):ha(0),c=(n.left+s.x)/l.x,u=(n.top+s.y)/l.y,h=n.width/l.x,p=n.height/l.y;if(o){let e=ho(o),t=r&&hc(r)?ho(r):r,i=e,a=i.frameElement;for(;a&&r&&t!==i;){let e=hw(a),t=a.getBoundingClientRect(),r=hg(a),n=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,h*=e.x,p*=e.y,c+=n,u+=o,a=(i=ho(a)).frameElement}}return u8({width:h,height:p,x:c,y:u})}let hk=[":popover-open",":modal"];function hE(e){return hk.some(t=>{try{return e.matches(t)}catch(e){return!1}})}function hM(e){return hT(hl(e)).left+hy(e).scrollLeft}function hP(e,t,i){let r;if("viewport"===t)r=function(e,t){let i=ho(e),r=hl(e),a=i.visualViewport,n=r.clientWidth,o=r.clientHeight,l=0,s=0;if(a){n=a.width,o=a.height;let e=hf();(!e||e&&"fixed"===t)&&(l=a.offsetLeft,s=a.offsetTop)}return{width:n,height:o,x:l,y:s}}(e,i);else if("document"===t)r=function(e){let t=hl(e),i=hy(e),r=e.ownerDocument.body,a=ht(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=ht(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-i.scrollLeft+hM(e),l=-i.scrollTop;return"rtl"===hg(r).direction&&(o+=ht(t.clientWidth,r.clientWidth)-a),{width:a,height:n,x:o,y:l}}(hl(e));else if(hc(t))r=function(e,t){let i=hT(e,!0,"fixed"===t),r=i.top+e.clientTop,a=i.left+e.clientLeft,n=hu(e)?hw(e):ha(1);return{width:e.clientWidth*n.x,height:e.clientHeight*n.y,x:a*n.x,y:r*n.y}}(t,i);else{let i=hS(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return u8(r)}function hI(e){return"static"===hg(e).position}function hA(e,t){return hu(e)&&"fixed"!==hg(e).position?t?t(e):e.offsetParent:null}function hC(e,t){let i=ho(e);if(hE(e))return i;if(!hu(e)){let t=h_(e);for(;t&&!hm(t);){if(hc(t)&&!hI(t))return t;t=h_(t)}return i}let r=hA(e,t);for(;r&&["table","td","th"].includes(hn(r))&&hI(r);)r=hA(r,t);return r&&hm(r)&&hI(r)&&!hd(r)?i:r||function(e){let t=h_(e);for(;hu(t)&&!hm(t);){if(hd(t))return t;t=h_(t)}return null}(e)||i}let hR={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:r,strategy:a}=e,n="fixed"===a,o=hl(r),l=!!t&&hE(t.floating);if(r===o||l&&n)return i;let s={scrollLeft:0,scrollTop:0},c=ha(1),u=ha(0),h=hu(r);if((h||!h&&!n)&&(("body"!==hn(r)||hp(o))&&(s=hy(r)),hu(r))){let e=hT(r);c=hw(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-s.scrollLeft*c.x+u.x,y:i.y*c.y-s.scrollTop*c.y+u.y}},getDocumentElement:hl,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:r,strategy:a}=e,n=[..."clippingAncestors"===i?hE(t)?[]:function(e,t){let i=t.get(e);if(i)return i;let r=hb(e,[],!1).filter(e=>hc(e)&&"body"!==hn(e)),a=null,n="fixed"===hg(e).position,o=n?h_(e):e;for(;hc(o)&&!hm(o);){let t=hg(o),i=hd(o);i||"fixed"!==t.position||(a=null),(n?!i&&!a:!i&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||hp(o)&&!i&&function e(t,i){let r=h_(t);return!(r===i||!hc(r)||hm(r))&&("fixed"===hg(r).position||e(r,i))}(e,o))?r=r.filter(e=>e!==o):a=t,o=h_(o)}return t.set(e,r),r}(t,this._c):[].concat(i),r],o=n[0],l=n.reduce((e,i)=>{let r=hP(t,i,a);return e.top=ht(r.top,e.top),e.right=he(r.right,e.right),e.bottom=he(r.bottom,e.bottom),e.left=ht(r.left,e.left),e},hP(t,o,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:hC,getElementRects:async function(e){let t=this.getOffsetParent||hC,i=this.getDimensions,r=await i(e.floating);return{reference:function(e,t,i){let r=hu(t),a=hl(t),n="fixed"===i,o=hT(e,!0,n,t),l={scrollLeft:0,scrollTop:0},s=ha(0);if(r||!r&&!n)if(("body"!==hn(t)||hp(a))&&(l=hy(t)),r){let e=hT(t,!0,n,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=hM(a));return{x:o.left+l.scrollLeft-s.x,y:o.top+l.scrollTop-s.y,width:o.width,height:o.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:i}=hx(e);return{width:t,height:i}},getScale:hw,isElement:hc,isRTL:function(e){return"rtl"===hg(e).direction}},hL=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){let{x:i,y:r}=t,a=await async function(e,t){let{placement:i,platform:r,elements:a}=e,n=await (null==r.isRTL?void 0:r.isRTL(a.floating)),o=uQ(i),l=u1(i),s="y"===u3(i),c=["left","top"].includes(o)?-1:1,u=n&&s?-1:1,h=uJ(t,e),{mainAxis:p,crossAxis:d,alignmentAxis:f}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return l&&"number"==typeof f&&(d="end"===l?-1*f:f),s?{x:d*u,y:p*c}:{x:p*c,y:d*u}}(t,e);return{x:i+a.x,y:r+a.y,data:a}}}},hD=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:i,y:r,placement:a}=t,{mainAxis:n=!0,crossAxis:o=!1,limiter:l={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...s}=uJ(e,t),c={x:i,y:r},u=await u9(t,s),h=u3(uQ(a)),p=u0(h),d=c[p],f=c[h];if(n){let e="y"===p?"bottom":"right";
251d=uX(d+u["y"===p?"top":"left"],uW(d,d-u[e]))}if(o){let e="y"===h?"bottom":"right";f=uX(f+u["y"===h?"top":"left"],uW(f,f-u[e]))}let m=l.fn({...t,[p]:d,[h]:f});return{...m,data:{x:m.x-i,y:m.y-r}}}}},hO=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,r,a,n;let{placement:o,middlewareData:l,rects:s,initialPlacement:c,platform:u,elements:h}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,..._}=uJ(e,t),b=uQ(o),x=uQ(c)===c,v=await (null==u.isRTL?void 0:u.isRTL(h.floating)),w=f||(x||!y?[u6(c)]:function(e){let t=u6(e);return[u5(e),t,u5(t)]}(c));f||"none"===g||w.push(...function(e,t,i,r){let a=u1(e),n=function(e,t,i){let r=["left","right"],a=["right","left"];switch(e){case"top":case"bottom":return i?t?a:r:t?r:a;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(uQ(e),"start"===i,r);return a&&(n=n.map(e=>e+"-"+a),t&&(n=n.concat(n.map(u5)))),n}(c,y,g,v));let z=[c,...w],S=await u9(t,_),T=[],k=(null==(i=l.flip)?void 0:i.overflows)||[];if(p&&T.push(S[b]),d){let e=function(e,t,i){void 0===i&&(i=!1);let r=u1(e),a=u0(u3(e)),n=u2(a),o="x"===a?r===(i?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[n]>t.floating[n]&&(o=u6(o)),[o,u6(o)]}(o,s,v);T.push(S[e[0]],S[e[1]])}if(k=[...k,{placement:o,overflows:T}],!T.every(e=>e<=0)){let e=((null==(r=l.flip)?void 0:r.index)||0)+1,t=z[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let i=null==(a=k.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!i)switch(m){case"bestFit":{let e=null==(n=k.map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:n[0];e&&(i=e);break}case"initialPlacement":i=c}if(o!==i)return{reset:{placement:i}}}return{}}}},hF=(e,t,i)=>{let r=new Map,a={platform:hR,...i},n={...a.platform,_c:r};return(async(e,t,i)=>{let{placement:r="bottom",strategy:a="absolute",middleware:n=[],platform:o}=i,l=n.filter(Boolean),s=await (null==o.isRTL?void 0:o.isRTL(t)),c=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:h}=u7(c,r,s),p=r,d={},f=0;for(let i=0;i<l.length;i++){let{name:n,fn:m}=l[i],{x:g,y:y,data:_,reset:b}=await m({x:u,y:h,initialPlacement:r,placement:p,strategy:a,middlewareData:d,rects:c,platform:o,elements:{reference:e,floating:t}});u=null!=g?g:u,h=null!=y?y:h,d={...d,[n]:{...d[n],..._}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await o.getElementRects({reference:e,floating:t,strategy:a}):b.rects),{x:u,y:h}=u7(c,p,s)),i=-1)}return{x:u,y:h,placement:p,strategy:a,middlewareData:d}})(e,t,{...a,platform:n})};var hj,hB={exports:{}},hN=U((hj||(hj=1,function(e){var t={}.hasOwnProperty;function i(){for(var e=[],r=0;r<arguments.length;r++){var a=arguments[r];if(a){var n=typeof a;if("string"===n||"number"===n)e.push(a);else if(Array.isArray(a)){if(a.length){var o=i.apply(null,a);o&&e.push(o)}}else if("object"===n){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){e.push(a.toString());continue}for(var l in a)t.call(a,l)&&a[l]&&e.push(l)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):window.classNames=i}
251(hB)),hB.exports));let hU={core:!1,base:!1};function hV({css:e,id:t="react-tooltip-base-styles",type:i="base",ref:r}){var a,n;if(!e||"undefined"==typeof document||hU[i]||"core"===i&&void 0!==u&&(null==(a=null==u?void 0:u.env)?void 0:a.REACT_TOOLTIP_DISABLE_CORE_STYLES)||"base"!==i&&void 0!==u&&(null==(n=null==u?void 0:u.env)?void 0:n.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===i&&(t="react-tooltip-core-styles"),r||(r={});let{insertAt:o}=r;if(document.getElementById(t))return;let l=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.id=t,s.type="text/css","top"===o&&l.firstChild?l.insertBefore(s,l.firstChild):l.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e)),hU[i]=!0}let h$=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:i=null,place:r="top",offset:a=10,strategy:n="absolute",middlewares:o=[hL(Number(a)),hO({fallbackAxisSideDirection:"start"}),hD({padding:5})],border:l,arrowSize:s=8})=>e&&null!==t?i?(o.push((e=>({name:"arrow",options:e,async fn(t){let{x:i,y:r,placement:a,rects:n,platform:o,elements:l}=t,{element:s,padding:c=0}=uJ(e,t)||{};if(null==s)return{};let u=u4(c),h={x:i,y:r},p=u0(u3(a)),d=u2(p),f=await o.getDimensions(s),m="y"===p,g=m?"clientHeight":"clientWidth",y=n.reference[d]+n.reference[p]-h[p]-n.floating[d],_=h[p]-n.reference[p],b=await (null==o.getOffsetParent?void 0:o.getOffsetParent(s)),x=b?b[g]:0;x&&await (null==o.isElement?void 0:o.isElement(b))||(x=l.floating[g]||n.floating[d]);let v=x/2-f[d]/2-1,w=uW(u[m?"top":"left"],v),z=uW(u[m?"bottom":"right"],v),S=x-f[d]-z,T=x/2-f[d
251]/2+(y/2-_/2),k=uX(w,uW(T,S)),E=null!=u1(a)&&T!=k&&n.reference[d]/2-(T<w?w:z)-f[d]/2<0?T<w?w-T:S-T:0;return{[p]:h[p]-E,data:{[p]:k,centerOffset:T-k+E}}}}))({element:i,padding:5})),hF(e,t,{placement:r,strategy:n,middleware:o}).then(({x:e,y:t,placement:i,middlewareData:r})=>{var a,n;let o={left:`${e}px`,top:`${t}px`,border:l},{x:c,y:u}=null!=(a=r.arrow)?a:{x:0,y:0},h=null!=(n=({top:"bottom",right:"left",bottom:"top",left:"right"})[i.split("-")[0]])?n:"bottom",p=0;if(l){let e=`${l}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:o,tooltipArrowStyles:{left:null!=c?`${c}px`:"",top:null!=u?`${u}px`:"",right:"",bottom:"",...l&&{borderBottom:l,borderRight:l},[h]:`-${s/2+p}px`},place:i}})):hF(e,t,{placement:"bottom",strategy:n,middleware:o}).then(({x:e,y:t,placement:i})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:i})):{tooltipStyles:{},tooltipArrowStyles:{},place:r},hZ=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),hG=(e,t,i)=>{let r=null,a=function(...i){r||(e.apply(this,i),r=setTimeout(()=>{r=null},t))};return a.cancel=()=>{r&&(clearTimeout(r),r=null)},a},hq=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,hH=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,i)=>hH(e,t[i]));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!hq(e)||!hq(t))return e===t;let i=Object.keys(e),r=Object.keys(t);return i.length===r.length&&i.every(i=>hH(e[i],t[i]))},hW=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;let t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some(e=>{let i=t.getPropertyValue(e);return"auto"===i||"scroll"===i})},hX=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(hW(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},hY="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,hK=e=>{e.current&&(clearTimeout(e.current),e.current=null)},hJ={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},hQ=(0,r.createContext)({getTooltipData:()=>hJ});function h1(e="DEFAULT_TOOLTIP_ID"){return(0,r.useContext)(hQ).getTooltipData(e)}var h0={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},h2={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};let h3=({forwardRef:e,id:t,className:i,classNameArrow:a,variant:n="dark",anchorId:o,anchorSelect:l,place:s="top",offset:c=10,events:u=["hover"],openOnClick:h=!1,positionStrategy:p="absolute",middlewares:d,wrapper:f,delayShow:m=0,delayHide:g=0,float:y=!1,hidden:_=!1,noArrow:b=!1,
251clickable:x=!1,closeOnEsc:v=!1,closeOnScroll:w=!1,closeOnResize:z=!1,openEvents:S,closeEvents:T,globalCloseEvents:k,imperativeModeOnly:E,style:M,position:P,afterShow:I,afterHide:A,disableTooltip:C,content:R,contentWrapperRef:L,isOpen:D,defaultIsOpen:O=!1,setIsOpen:F,activeAnchor:j,setActiveAnchor:B,border:N,opacity:U,arrowColor:V,arrowSize:$=8,role:Z="tooltip"})=>{var G;let q=(0,r.useRef)(null),H=(0,r.useRef)(null),W=(0,r.useRef)(null),X=(0,r.useRef)(null),Y=(0,r.useRef)(null),[K,J]=(0,r.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:s}),[Q,ee]=(0,r.useState)(!1),[et,ei]=(0,r.useState)(!1),[er,ea]=(0,r.useState)(null),en=(0,r.useRef)(!1),eo=(0,r.useRef)(null),{anchorRefs:el,setActiveAnchor:es}=h1(t),ec=(0,r.useRef)(!1),[eu,eh]=(0,r.useState)([]),ep=(0,r.useRef)(!1),ed=h||u.includes("click"),ef=ed||(null==S?void 0:S.click)||(null==S?void 0:S.dblclick)||(null==S?void 0:S.mousedown),em=S?{...S}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!S&&ed&&Object.assign(em,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});let eg=T?{...T}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};
251!T&&ed&&Object.assign(eg,{mouseleave:!1,blur:!1,mouseout:!1});let ey=k?{...k}:{escape:v||!1,scroll:w||!1,resize:z||!1,clickOutsideAnchor:ef||!1};E&&(Object.assign(em,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(eg,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(ey,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),hY(()=>(ep.current=!0,()=>{ep.current=!1}),[]);let e_=e=>{ep.current&&(e&&ei(!0),setTimeout(()=>{ep.current&&(null==F||F(e),void 0===D&&ee(e))},10))};(0,r.useEffect)(()=>{if(void 0===D)return()=>null;D&&ei(!0);let e=setTimeout(()=>{ee(D)},10);return()=>{clearTimeout(e)}},[D]),(0,r.useEffect)(()=>{Q!==en.current&&((hK(Y),en.current=Q,Q)?null==I||I():Y.current=setTimeout(()=>{ei(!1),ea(null),null==A||A()},(e=>{let t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!t)return 0;let[,i,r]=t;return Number(i)*("ms"===r?1:1e3)})()+25))},[Q]);let eb=e=>{J(t=>hH(t,e)?t:e)},ex=(e=m)=>{hK(W),et?e_(!0):W.current=setTimeout(()=>{e_(!0)},e)},ev=(e=g)=>{hK(X),X.current=setTimeout(()=>{ec.current||e_(!1)},e)},ew=e=>{var t;if(!e)return;let i=null!=(t=e.currentTarget)?t:e.target;if(!(null==i?void 0:i.isConnected))return B(null),void es({current:null});m?ex():e_(!0),B(i),es({current:i}),hK(X)},ez=()=>{x?ev(g||100):g?ev():e_(!1),hK(W)},eS=({x:e,y:t})=>{var i;h$({place:null!=(i=null==er?void 0:er.place)?i:s,offset:c,elementReference:{getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})},tooltipReference:q.current,tooltipArrowReference:H.current,strategy:p,middlewares:d,border:N,arrowSize:$}).then(e=>{eb(e)})},eT=e=>{if(!e)return;let t={x:e.clientX,y:e.clientY};eS(t),eo.current=t},ek=e=>{var t;if(!Q)return;let i=e.target;i.isConnected&&((null==(t=q.current)?void 0:t.contains(i))||[document.querySelector(`[id='${o}']`),...eu].some(e=>null==e?void 0:e.contains(i))||(e_(!1),hK(W)))},eE=hG(ew,50),eM=hG(ez,50),eP=e=>{eM.cancel(),eE(e)},eI=()=>{eE.cancel(),eM()},eA=(0,r.useCallback)(()=>{var e,t;let i=null!=(e=null==er?void 0:er.position)?e:P;i?eS(i):y?eo.current&&eS(eo.current):(null==j?void 0:j.isConnected)&&h$({place:null!=(t=null==er?void 0:er.place)?t:s,offset:c,elementReference:j,tooltipReference:q.current,tooltipArrowReference:H.current,strategy:p,middlewares:d,border:N,arrowSize:$}).then(e=>{ep.current&&eb(e)})},[Q,j,R,M,s,null==er?void 0:er.place,c,p,P,null==er?void 0:er.position,y,$]);(0,r.useEffect)(()=>{var e,t;let i=new Set(el);eu.forEach(e=>{(null==C?void 0:C(e))||i.add({current:e})});let r=document.querySelector(`[id='${o}']`);!r||(null==C?void 0:C(r))||i.add({current:r});let a=()=>{e_(!1)},n=hX(j),l=hX(q.current);ey.scroll&&(window.addEventListener("scroll",a),null==n||n.addEventListener("scroll",a),null==l||l.addEventListener("scroll",a));let s=null;ey.resize?window.addEventListener("resize",a):j&&q.current&&(s=function(e,t,i,r){void 0===r&&(r={});let{ancestorScroll:a=!0,ancestorResize:n=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=hv(e),u=a||n?[...c?hb(c):[],...hb(t)]:[];u.forEach(e=>{a&&e.addEventListener("scroll",i,{passive:!0}),n&&e.addEventListener("resize",i)});let h=c&&l?function(e,t){let i,r=null,a=hl(e);function n(){var e;clearTimeout(i),null==(e=r)||e.disconnect(),r=null}return function o(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),n();let{left:c,top:u,width:h,height:p}=e.getBoundingClientRect();if(l||t(),!h||!p)return;let d={rootMargin:-hr(u)+"px "+-hr(a.clientWidth-(c+h))+"px "+-hr(a.clientHeight-(u+p))+"px "+-hr(c)+"px",threshold:ht(0,he(1,s))||1},f=!0;function m(e){let t=e[0].intersectionRatio;if(t!==s){if(!f)return o();t?o(!1,t):i=setTimeout(()=>{o(!1,1e-7)},1e3)}f=!1}try{r=new IntersectionObserver(m,{...d,root:a.ownerDocument})}catch(e){r=new IntersectionObserver(m,d)}r.observe(e)}(!0),n}(c,i):null,p,d=-1,f=null;o&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),i()}),c&&!s&&f.observe(c),f.observe(t));let m=s?hT(e):null;return s&&function t(){let r=hT(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&i(),m=r,p=requestAnimationFrame(t)}(),i(),()=>{var e;
251u.forEach(e=>{a&&e.removeEventListener("scroll",i),n&&e.removeEventListener("resize",i)}),null==h||h(),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(p)}}(j,q.current,eA,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));let c=e=>{"Escape"===e.key&&e_(!1)};ey.escape&&window.addEventListener("keydown",c),ey.clickOutsideAnchor&&window.addEventListener("click",ek);let u=[],h=e=>!!((null==e?void 0:e.target)&&(null==j?void 0:j.contains(e.target))),p=e=>{Q&&h(e)||ew(e)},d=e=>{Q&&h(e)&&ez()},f=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(em).forEach(([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:eP}):m.includes(e)&&u.push({event:e,listener:p}))}),Object.entries(eg).forEach(([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:eI}):m.includes(e)&&u.push({event:e,listener:d}))}),y&&u.push({event:"pointermove",listener:eT});let g=()=>{ec.current=!0},_=()=>{ec.current=!1,ez()},b=x&&(eg.mouseout||eg.mouseleave);return b&&(null==(e=q.current)||e.addEventListener("mouseover",g),null==(t=q.current)||t.addEventListener("mouseout",_)),u.forEach(({event:e,listener:t})=>{i.forEach(i=>{var r;null==(r=i.current)||r.addEventListener(e,t)})}),()=>{var e,t;ey.scroll&&(window.removeEventListener("scroll",a),null==n||n.removeEventListener("scroll",a),null==l||l.removeEventListener("scroll",a)),ey.resize?window.removeEventListener("resize",a):null==s||s(),ey.clickOutsideAnchor&&window.removeEventListener("click",ek),ey.escape&&window.removeEventListener("keydown",c),b&&(null==(e=q.current)||e.removeEventListener("mouseover",g),null==(t=q.current)||t.removeEventListener("mouseout",_)),u.forEach(({event:e,listener:t})=>{i.forEach(i=>{var r;null==(r=i.current)||r.removeEventListener(e,t)})})}},[j,eA,et,el,eu,S,T,k,ed,m,g]),(0,r.useEffect)(()=>{var e,i;let r=null!=(i=null!=(e=null==er?void 0:er.anchorSelect)?e:l)?i:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);let a=new MutationObserver(e=>{let i=[],a=[];e.forEach(e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?i.push(e.target):e.oldValue===t&&a.push(e.target)),"childList"===e.type){if(j){let t=[...e.removedNodes].filter(e=>1===e.nodeType);if(r)try{a.push(...t.filter(e=>e.matches(r))),a.push(...t.flatMap(e=>[...e.querySelectorAll(r)]))}catch(e){}t.some(e=>{var t;return!!(null==(t=null==e?void 0:e.contains)?void 0:t.call(e,j))&&(ei(!1),e_(!1),B(null),hK(W),hK(X),!0)})}if(r)try{let t=[...e.addedNodes].filter(e=>1===e.nodeType);i.push(...t.filter(e=>e.matches(r))),i.push(...t.flatMap(e=>[...e.querySelectorAll(r)]))}catch(e){}}}),(i.length||a.length)&&eh(e=>[...e.filter(e=>!a.includes(e)),...i])});return a.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{a.disconnect()}},[t,l,null==er?void 0:er.anchorSelect,j]),(0,r.useEffect)(()=>{eA()},[eA]),(0,r.useEffect)(()=>{if(!(null==L?void 0:L.current))return()=>null;let e=new ResizeObserver(()=>{setTimeout(()=>eA())});return e.observe(L.current),()=>{e.disconnect()}},[R,null==L?void 0:L.current]),(0,r.useEffect)(()=>{var e;let t=document.querySelector(`[id='${o}']`),i=[...eu,t];j&&i.includes(j)||B(null!=(e=eu[0])?e:t)},[o,eu,j]),(0,r.useEffect)(()=>(O&&e_(!0),()=>{hK(W),hK(X)}),[]),(0,r.useEffect)(()=>{var e;let i=null!=(e=null==er?void 0:er.anchorSelect)?e:l;if(!i&&t&&(i=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),i)try{let e=Array.from(document.querySelectorAll(i));eh(e)}catch(e){eh([])}},[t,l,null==er?void 0:er.anchorSelect]),(0,r.useEffect)(()=>{W.current&&(hK(W),ex(m))},[m]);let eC=null!=(G=null==er?void 0:er.content)?G:R,eR=Q&&Object.keys(K.tooltipStyles).length>0;return(0,r.useImperativeHandle)(e,()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ea(null!=e?e:null),(null==e?void 0:e.delay)?ex(e.delay):e_(!0)},close:e=>{(null==e?void 0:e.delay)?ev(e.delay):e_(!1)},activeAnchor:j,place:K.place,isOpen:!!(et&&!_&&eC&&eR)})),et&&!_&&eC?r.createElement(f,{id:t,role:Z,className:hN("react-tooltip",h0.tooltip,h2.tooltip,h2[n],i,`react-tooltip__place-${K.place}`,h0[eR?"show":"closing"],eR?"react-tooltip__show":"react-tooltip__closing","fixed"===p&&h0.fixed,x&&h0.clickable),onTransitionEnd:e=>{hK(Y),Q||"opacity"!==e.propertyName||(ei(!1),ea(null),null==A||A())},style:{...M,...K.tooltipStyles,opacity:void 0!==U&&eR?U:void 0},ref:q},eC,r.createElement(f,{className:hN("react-tooltip-arrow",h0.arrow,h2.arrow,a,b&&h0.noArrow),style:{...K.tooltipArrowStyles,background:V?`linear-gradient(to right bottom, transparent 50%, ${V} 50%)`:void 0,"--rt-arrow-size":`${$}px`},ref:H})):null},h5=({content:e})=>r.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),h6=r.forwardRef(({id:e,anchorId:t,anchorSelect:i,content:a,html:n,render:o,className:l,classNameArrow:s,variant:c="dark",place:u="top",offset:h=10,wrapper:p="div",children:d=null,events:f=["hover"],openOnClick:m=!1,positionStrategy:g="absolute",middlewares:y,delayShow:_=0,delayHide:b=0,float:x=!1,hidden:v=!1,noArrow:w=!1,clickable:z=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:E,closeEvents:M,globalCloseEvents:P,imperativeModeOnly:I=!1,style:A,position:C,isOpen:R,defaultIsOpen:L=!1,disableStyleInjection:D=!1,border:O,opacity:F,arrowColor:j,arrowSize:B,setIsOpen:N,afterShow:U,afterHide:V,disableTooltip:$,role:Z="tooltip"},G)=>{let[q,H]=(0,r.useState)(a),[W,X]=(0,r.useState)(n),[Y,K]=(0,r.useState)(u),[J,Q]=(0,r.useState)(c),[ee,et]=(0,r.useState)(h),[ei,er]=(0,r.useState)(_),[ea,en]=(0,r.useState)(b),[eo,el]=(0,r.useState)(x),[es,ec]=(0,r.useState)(v),[eu,eh]=(0,r.useState)(p),[ep,ed]=(0,r.useState)(f),[ef,em]=(0,r.useState)(g),[eg,ey]=(0,r.useState)(null),[e_,eb]=(0,r.useState)(null),ex=(0,r.useRef)(D),{anchorRefs:ev,activeAnchor:ew}=h1(e),ez=e=>null==e?void 0:e.getAttributeNames().reduce((t,i)=>{var r;return i.startsWith("data-tooltip-")&&(t[i.replace(/^data-tooltip-/,"")]=null!=(r=null==e?void 0:e.getAttribute(i))?r:null),t},{}),eS=e=>{let t={place:e=>{K(null!=e?e:u)},content:e=>{H(null!=e?e:a)},html:e=>{X(null!=e?e:n)},variant:e=>{Q(null!=e?e:c)},offset:e=>{et(null===e?h:Number(e))},wrapper:e=>{eh(null!=e?e:p)},events:e=>{let t=null==e?void 0:e.split(" ");ed(null!=t?t:f)},"position-strategy":e=>{em(null!=e?e:g)},"delay-show":e=>{er(null===e?_:Number(e))},"delay-hide":e=>{en(null===e?b:Number(e))},float:e=>{el(null===e?x:"true"===e)},hidden:e=>{ec(null===e?v:"true"===e)},"class-name":e=>{ey(e)}};
251Object.values(t).forEach(e=>e(null)),Object.entries(e).forEach(([e,i])=>{var r;null==(r=t[e])||r.call(t,i)})};(0,r.useEffect)(()=>{H(a)},[a]),(0,r.useEffect)(()=>{X(n)},[n]),(0,r.useEffect)(()=>{K(u)},[u]),(0,r.useEffect)(()=>{Q(c)},[c]),(0,r.useEffect)(()=>{et(h)},[h]),(0,r.useEffect)(()=>{er(_)},[_]),(0,r.useEffect)(()=>{en(b)},[b]),(0,r.useEffect)(()=>{el(x)},[x]),(0,r.useEffect)(()=>{ec(v)},[v]),(0,r.useEffect)(()=>{em(g)},[g]),(0,r.useEffect)(()=>{ex.current!==D&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[D]),(0,r.useEffect)(()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===D,disableBase:D}}))},[]),(0,r.useEffect)(()=>{var r;let a=new Set(ev),n=i;if(!n&&e&&(n=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),n)try{document.querySelectorAll(n).forEach(e=>{a.add({current:e})})}catch(e){console.warn(`[react-tooltip] "${n}" is not a valid CSS selector`)}let o=document.querySelector(`[id='${t}']`);if(o&&a.add({current:o}),!a.size)return()=>null;let l=null!=(r=null!=e_?e_:o)?r:ew.current,s=new MutationObserver(e=>{e.forEach(e=>{var t;l&&"attributes"===e.type&&(null==(t=e.attributeName)?void 0:t.startsWith("data-tooltip-"))&&eS(ez(l))})});return l&&(eS(ez(l)),s.observe(l,{attributes:!0,childList:!1,subtree:!1})),()=>{s.disconnect()}},[ev,ew,e_,t,i]),(0,r.useEffect)(()=>{(null==A?void 0:A.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),O&&!hZ("border",`${O}`)&&console.warn(`[react-tooltip] "${O}" is not a valid \`border\`.`),(null==A?void 0:A.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),F&&!hZ("opacity",`${F}`)&&console.warn(`[react-tooltip] "${F}" is not a valid \`opacity\`.`)},[]);let eT=d,ek=(0,r.useRef)(null);if(o){let e=o({content:(null==e_?void 0:e_.getAttribute("data-tooltip-content"))||q||null,activeAnchor:e_});eT=e?r.createElement("div",{ref:ek,className:"react-tooltip-content-wrapper"},e):null}else q&&(eT=q);W&&(eT=r.createElement(h5,{content:W}));let eE={forwardRef:G,id:e,anchorId:t,anchorSelect:i,className:hN(l,eg),classNameArrow:s,content:eT,contentWrapperRef:ek,place:Y,variant:J,offset:ee,wrapper:eu,events:ep,openOnClick:m,positionStrategy:ef,middlewares:y,delayShow:ei,delayHide:ea,float:eo,hidden:es,noArrow:w,clickable:z,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:E,closeEvents:M,globalCloseEvents:P,imperativeModeOnly:I,style:A,position:C,isOpen:R,defaultIsOpen:L,border:O,opacity:F,arrowColor:j,arrowSize:B,setIsOpen:N,afterShow:U,afterHide:V,disableTooltip:$,activeAnchor:e_,setActiveAnchor:e=>eb(e),role:Z};return r.createElement(h3,{...eE})});"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",e=>{e.detail.disableCore||hV({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||hV({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}
251[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})});let h4=e=>{switch(e){case"flightaware_classic":default:return"map-button--classic";case"flightaware_dark":return"map-button--dark";case"premium_satellite":return"map-button--satellite";case"premium_terrain":case"premium_streets":case"skyvector_ifr_high":case"skyvector_ifr_low":case"skyvector_vfr":return"map-button--light"}},h8=({mapRef:e,baseLayer:t,showZoomInAndOutButtons:i,showResetButton:a,position:n,onZoomIn:o,onZoomOut:l,onZoomReset:s})=>{let[c,u]=(0,r.useState)(32*!!i),[h,p]=(0,r.useState)(32*!!a),d=(0,r.useCallback)(()=>{let t=e.current?.getMap().getContainer().getBoundingClientRect().height??0,r=e.current?.getMap().getContainer().getBoundingClientRect().width??0;t<450||r<450?(u(24*!!i),p(24*!!a)):(u(32*!!i),p(32*!!a)),"ontouchstart"in window&&u(0)},[e,a,i]);(0,r.useEffect)(()=>(window.addEventListener("resize",d),d(),()=>{window.removeEventListener("resize",d)}),[d]);let f=0;return(i||a&&i)&&(f+=8),r.createElement("div",{style:{position:"absolute",display:"flex",height:"fit-content",width:"fit-content",gap:f,flexDirection:"column",...n}},c>0?r.createElement(r.Fragment,null,r.createElement("button",{className:`map-button ${h4(t)}`,style:{height:`${c}px`,width:`${c}px`},"data-tooltip-id":"map-button-tooltip","data-tooltip-content":"Zoom In","data-tooltip-place":"left",onClick:()=>{e.current?.zoomIn(),o&&o()}},r.createElement("img",{src:((e,t)=>{let i=nU(e);return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" height="${t}" viewBox="0 -960 960 960" width="${t}"><path d="M450-450H200v-60h250v-250h60v250h250v60H510v250h-60v-250Z" fill="${i}"/></svg>
252        `)}`})(t,c),alt:"Zoom in button"})),r.createElement("button",{className:`map-button ${h4(t)}`,style:{height:`${c}px`,width:`${c}px`},"data-tooltip-id":"map-button-tooltip","data-tooltip-content":"Zoom Out","data-tooltip-place":"left",onClick:()=>{e.current?.zoomOut(),l&&l()}},r.createElement("img",{src:((e,t)=>{let i=nU(e);return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" height="${t}" viewBox="0 -960 960 960" width="${t}"><path d="M200-450v-60h560v60H200Z" fill="${i}"/></svg>
253    `)}`})(t,c),alt:"Zoom out button"}))):null,h>0?r.createElement("button",{className:`map-button ${h4(t)}`,style:{height:`${h}px`,width:`${h}px`,padding:"0.15rem"},"data-tooltip-id":"map-button-tooltip","data-tooltip-content":"Reset to Original View","data-tooltip-place":"left",onClick:()=>{s&&s()}},r.createElement("img",{src:((e,t)=>{let i=nU(e);return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(`
254        <svg xmlns="http://www.w3.org/2000/svg"
255            height="${t<32?20:28}px"
256            width="${t<32?20:28}px"
257            viewBox="0 0 24 24"
258            fill="${i}"
259        >
260            <path d="M0 0h24v24H0V0z" fill="none"/>
261            <path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>
262        </svg>`)}`})(t,h),alt:"Zoom reset button"})):null,r.createElement(h6,{id:"map-button-tooltip",className:"map-button-tooltip",disableStyleInjection:"core",noArrow:!0,offset:8}))},h7=({ringCount:e,ringSpacing:t,center:i,units:a})=>r.createElement(F,{...((e,t,i,r)=>{let a=[];for(let n=1;n<=t;n++)a.push(function(e,t,i={}){let r=i.steps||64,a=i.properties?i.properties:!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{},n=[];for(let a=0;a<r;a++)n.push(oc(e,t,-360*a/r,i).geometry.coordinates);return n.push(n[0]),n2([n],a)}(e,n*i,{units:r,steps:360}));return{id:"range-ring-source",type:"geojson",tolerance:.15,data:{type:"FeatureCollection",features:a}}})(i,e,t,a)},r.createElement(B,{id:"range-ring-outline",type:"line",source:"range-ring-source",beforeId:"z6",paint:{"line-color":"#FFFFFF","line-width":1,"line-opacity":.75}})),h9=({airportCodes:e,...t})=>"originAndDestination"===e?r.createElement(pe,{...t}):r.createElement(pt,{airportCodes:e,...t}),pe=e=>{let t=(()=>{let e=nj().flights;if(0===e.size)return null;if(1===e.size)return[...e.values()][0];throw Error("FlightStore contains more than one flight")})(),i=t?.data?.origin?.icao??t?.data?.origin?.iata??t?.data?.origin?.lid??null,a=t?.data?.destination?.icao??t?.data?.destination?.iata??t?.data?.destination?.lid??null,n=(0,r.useMemo)(()=>{let e=[];return null!=i&&e.push(i),null!=a&&e.push(a),e},[i,a]);return null!=t?.data?.status&&t.data.times&&pi(t.data.status,t.data.times,Date.now()/1e3)?r.createElement(pt,{airportCodes:n,...e}):r.createElement(r.Fragment,null)},pt=({airportCodes:e,url:t,updateFrequency:i,iconSize:a,declutter:n})=>{let{current:o}=p(),[l,s]=(0,r.useState)(Date.now());return(0,r.useEffect)(()=>{let e=new Image(a,a),t="lightning-ctg-icon";return e.onload=()=>{o?.hasImage(t)||o?.addImage(t,e)},e.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100px" height="100px" viewBox="0 0 560.317 560.316"><path d="M207.523,560.316c0,0,194.42-421.925,194.444-421.986l10.79-23.997c-41.824,12.02-135.271,34.902-135.57,35.833 C286.96,122.816,329.017,0,330.829,0c-39.976,0-79.952,0-119.927,0l-12.167,57.938l-51.176,209.995l135.191-36.806 L207.523,560.316z" fill="#FFDA03" stroke="#FFB003" stroke-width="15"/></svg>')}`,()=>{o?.hasImage(t)&&o?.removeImage(t)}},[o,a]),(0,r.useEffect)(()=>{let e=setInterval(()=>{!document.hidden&&(Date.now()-l)/1e3>i&&s(Date.now())},1e3);return()=>{clearInterval(e)}},[i,l]),r.createElement(r.Fragment,null,e.map(e=>r.createElement(F,{key:e,...((e,t,i)=>({id:`ctg-lightning-${e.toLowerCase()}-source`,type:"geojson",data:t.replace("{airportCode}",e)+`?t=${Math.floor(i/1e3)}`}))(e,t,l)},r.createElement(B,{...((e,t)=>({id:`ctg-lightning-${e.toLowerCase()}`,source:`ctg-lightning-${e.toLowerCase()}-source`,type:"symbol",layout:{"icon-image":"lightning-ctg-icon","icon-allow-overlap":!t},beforeId:"z4"}))(e,n)}))))},pi=(e,t,i)=>{if(e===lh.Enroute||e===lh.TaxiingIn||e===lh.TaxiingOut)return!0;if(e===lh.Scheduled){let e=t.scheduled.out??t.scheduled.off??t.estimated.out??t.estimated.off??null,r=null!==e?new Date(e).getTime()/1e3:null;return null!==r&&r-i<14400}if(e===lh.Arrived){let e=t?.actual.in??t?.actual.on??t?.estimated.in??t?.estimated.on??null,r=null!==e?new Date(e).getTime()/1e3:null;return null!==r&&i-r<=3600}return!1},pr={width:"100%",height:"100%",backgroundColor:"#000E29",position:"relative"},pa=e=>{let t=e.getBounds(),i=e.getZoom();return{minLon:nx(t.getWest()),maxLon:nx(t.getEast()),minLat:t.getSouth(),maxLat:t.getNorth(),zoom:i}},pn=(0,r.memo)(function({mapRef:e,onLoad:t,onViewportChanged:i,onZoom:a,onZoomInPressed:n,onZoomOutPressed:o,onZoomResetPressed:l,getAircraftColor:s,getAircraftIcon:c,getAircraftZoomLevel:u,getAircraftSortOrder:h,isFlightVisible:p,isAircraftVisible:d,isDataBlockVisible:f,onDataBlockPressed:m,onAnimationFrame:g,clock:y,customCSS:_=pr,dataLayersTime:b,sunlitEarthLayerTime:x}){let v=rF(),w=(0,r.useMemo)(()=>y??new oy,[y]),{startSpin:z}=((e,t,i)=>{let a=(0,r.useRef)(null),n=(0,r.useRef)(void 0);return{startSpin:(0,r.useCallback)(()=>
262{if(t){let r=e.current?.getMap();if(!r)return;let o=t/100,l=()=>{let e=performance.now(),t=void 0!==n.current?e-n.current:null;if(null===t||t>1e3/i){n.current||(n.current=e);let t=e-n.current;n.current=e;let i=r.getCenter(),a=(i.lng+t*o)%360;r.setCenter([a,i.lat])}a.current=requestAnimationFrame(l)};a.current=requestAnimationFrame(l)}},[e,t,i])}})(e,v.globeView.rotationSpeed,v.globeView.fps);(0,r.useEffect)(()=>{function t(){e?.current?.resize()}return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]);let S=(0,r.useCallback)(()=>{if(null!==e.current){let i=e.current.getMap();if(v.globeView.showBelowZoomLevel>0){let e={type:["step",["zoom"],"globe",v.globeView.showBelowZoomLevel,"mercator"]};i.setProjection(e),i.on("style.load",()=>i.setProjection(e))}if(v.initialView.constrainBounds){let t=e.current.getBounds();i.setMaxBounds(t)}z(),void 0!==t&&t(e.current)}},[v.globeView.showBelowZoomLevel,v.initialView.constrainBounds,e,t,z]),T=(0,r.useCallback)(()=>{null!==e.current&&void 0!==i&&i(pa(e.current))},[e,i]),k=(0,r.useCallback)(()=>{null!==e.current&&void 0!==a&&a(pa(e.current))},[e,a]),E=v.baseLayerOptions?v.baseLayerOptions[v.baseLayer].maxZoom:void 0;return globalThis.mapDebugMode&&console.debug("FlightMapContainer rendered"),r.createElement("div",{className:"fa-map",style:{..._}},r.createElement(M,{id:"base-layer",padding:{top:v.appearance.padding.top*v.appearance.scaleFactors.boundingBoxPadding,bottom:v.appearance.padding.bottom*v.appearance.scaleFactors.boundingBoxPadding,left:v.appearance.padding.left*v.appearance.scaleFactors.boundingBoxPadding,right:v.appearance.padding.right*v.appearance.scaleFactors.boundingBoxPadding},mapStyle:((e,t)=>{var i;let r,a,n=t.baseLayerOptions?.[e].styleURL;if(null!=n)return n;if("flightaware_classic"===e)i=t.baseLayerOptions?.flightaware_classic.spriteURL,r={version:8,name:"flightaware_classic",sources:{flightaware:{type:"vector",tiles:["https://skyapi.ovc.flightaware.com/tiles/vector/flightaware/{z}/{x}/{y}.mvt"],maxzoom:14},placeholder_source:{type:"raster",tiles:[""]}},layers:[{id:"background",type:"background",paint:{"background-color":"hsla(207, 53%, 33%, 1)"}},{id:"ocean",type:"fill",source:"flightaware","source-layer":"ocean",layout:{visibility:"visible"},paint:{"fill-color":"hsla(210, 100%, 20%, 1)","fill-antialias":!0}},{id:"urban-areas",type:"fill",source:"flightaware","source-layer":"ne_10m_urban_areas",maxzoom:11,layout:{visibility:"visible"},paint:{"fill-color":"hsla(207, 30%, 47%, 0.7)","fill-opacity":["interpolate",["exponential",1.4],["zoom"],1,0,2,.25,3,.5,8,.5,10,0]}},{id:"waterways",type:"line",source:"flightaware","source-layer":"waterways",minzoom:2,filter:["any",["==","waterway","river"],["!has","waterway"]],paint:{"line-color":"hsla(210, 100%, 20%, 1)","line-width":["interpolate",["linear"],["zoom"],2,.1,5,.1,9,.6,12,1,15,4]}},{id:"lakes",type:"fill",source:"flightaware","source-layer":"lakes",paint:{"fill-color":"hsla(210, 100%, 20%, 1)"}},{id:"admin-boundaries4",type:"line",source:"flightaware","source-layer":"admin_boundaries",filter:["all",["==",["get","admin_level"],"4"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"hsla(205, 67%, 56%, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],2,.2,5,.75,8,1],"line-opacity":1,"line-dasharray":[1,1]}},{id:"admin-boundaries2",type:"line",source:"flightaware","source-layer":"admin_boundaries",filter:["all",["==",["get","admin_level"],"2"],["!=",["get","disputed"],1]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"hsla(205, 67%, 56%, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],0,.2,3,.75,12,3],"line-opacity":1}},{id:"admin-boundaries2-disputed",type:"line",source:"flightaware","source-layer":"admin_boundaries",filter:["all",["==",["get","admin_level"],"2"],["==",["get","disputed"],1]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"hsla(205, 67%, 56%, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],0,.2,3,.75,12,3],"line-opacity":1,"line-dasharray":[3,3]}}
262,{id:"aerodrome",type:"fill",source:"flightaware","source-layer":"aerodrome-tier1",layout:{visibility:"visible"},paint:{"fill-color":"hsla(206, 52%, 28%, 1)","fill-opacity":["interpolate",["linear"],["zoom"],7,0,8,1]}},{type:"fill",source:"flightaware","source-layer":"osm_buildings",layout:{visibility:"visible"},id:"parking-surface",filter:["all",["==","parking","surface"]],paint:{"fill-antialias":!0,"fill-color":"hsla(207, 30%, 47%, 1)","fill-opacity":.2}},{id:"ne-roads-4",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:4,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],4,0,5,.5]},filter:["all",["<=","min_zoom",4]]},{id:"ne-roads-5",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:5,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],5,0,6,.5]},filter:["all",["<=","min_zoom",5],[">","min_zoom",4]]},{id:"ne-roads-6",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:6,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.5]},filter:["all",["<=","min_zoom",6],[">","min_zoom",5]]},{id:"ne-roads-7",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:7,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],7,0,8,.5]},filter:["all",[">","min_zoom",6]]},{id:"tunnel_unclassified_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","unclassified"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_residential_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","residential"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_service_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","service"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_tertiary_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_secondary_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_primary_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.1875,15,3,18,6]}},{id:"tunnel_trunk_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.18181818181818182,12,.25,15,4,18,8]}},{id:"tunnel_motorway_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.18181818181818182,11,.25,15,4,18,8]}},{id:"tunnel_tertiary_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tert
262iary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.18181818181818182,13,.25,15,4,18,8]}},{id:"tunnel_secondary_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.2727272727272727,12,.375,15,6,18,12]}},{id:"tunnel_primary_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.3181818181818182,10,.4375,15,7,18,14]}},{id:"tunnel_trunk_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.36363636363636365,8,.5,15,8,18,16]}},{id:"tunnel_motorway_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.4090909090909091,8,.5625,15,9,18,18]}},{id:"tunnel_unclassified_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","unclassified"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_residential_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","residential"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_service_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","service"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_tertiary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary_link"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_secondary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary_link"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_primary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary_link"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,0,12,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_trunk_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk_link"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.045454545454545456,12,.1875,15,3,18,6],"line-dasharray":[.75,.25]}},{id:"tunnel_motorway_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway_link"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.045454545454545456,11,.1875,15,3,18,6],"line-dasharray":[.75,.25]}},{id:"tunnel_tertiary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tert
262iary"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.045454545454545456,13,.1875,15,3,18,6],"line-dasharray":[.75,.25]}},{id:"tunnel_secondary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.3125,15,5,18,10],"line-dasharray":[.75,.25]}},{id:"tunnel_primary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.18181818181818182,10,.375,15,6,18,12],"line-dasharray":[.75,.25]}},{id:"tunnel_trunk_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.22727272727272727,8,.4375,15,7,18,14],"line-dasharray":[.75,.25]}},{id:"tunnel_motorway_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway"]],paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.2727272727272727,8,.5,15,8,18,16],"line-dasharray":[.75,.25]}},{id:"tunnel_tertiary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_secondary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_primary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,-.13636363636363635,12,.0625,15,1,18,2]}},{id:"tunnel_trunk_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,-.09090909090909088,12,.125,15,2,18,4]}},{id:"tunnel_motorway_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,-.09090909090909088,11,.125,15,2,18,4]}},{id:"tunnel_unclassified",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","unclassified"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_service",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","
262service"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_residential",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","residential"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_tertiary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.09090909090909088,13,.125,15,2,18,4]}},{id:"tunnel_secondary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,0,12,.25,15,4,18,8]}},{id:"tunnel_primary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.04545454545454547,10,.3125,15,5,18,10]}},{id:"tunnel_trunk",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.09090909090909094,8,.375,15,6,18,12]}},{id:"tunnel_motorway",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(211, 31%, 38%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.1363636363636364,8,.4375,15,7,18,14]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_parking_aisle",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","service"],["==","service","parking_aisle"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.045454545454545456,14,.0625,15,1,18,2]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_unclassified",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","unclassified"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.13636363636363635,14,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_residential",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","residential"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.13636363636363635,14,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_service",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","
262service"],["!=","service","parking_aisle"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.13636363636363635,14,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_tertiary_link",minzoom:11,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","tertiary_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_secondary_link",minzoom:11,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","secondary_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_primary_link",minzoom:10,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","primary_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_trunk_link",minzoom:10,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.18181818181818182,12,.25,15,4,18,8]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_motorway_link",minzoom:9,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","motorway_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.18181818181818182,11,.25,15,4,18,8]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_tertiary",minzoom:11,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.18181818181818182,13,.25,15,4,18,8]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_secondary",minzoom:10,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","secondary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.2727272727272727,12,.375,15,6,18,12]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_primary",minzoom:8,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","primary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.3181818181818182,10,.4375,15,7,18,14]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_trunk",minzoom:6,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","trunk"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.36363636363636365,8,.5,15,8,18,16]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_motorway",minzoom:6,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","motorway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.4090909090909091,8,.5625,15,9,18,18]}},{id:"bridge_unclassified_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","unclassified"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_residential_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","residential"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_service_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","
262service"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_tertiary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tertiary_link"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_secondary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary_link"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_primary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary_link"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.5,12,.4375,15,5,18,10]}},{id:"bridge_trunk_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk_link"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.5454545454545454,12,.5,15,6,18,12]}},{id:"bridge_motorway_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway_link"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.5454545454545454,11,.5,15,6,18,12]}},{id:"bridge_unclassified",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","unclassified"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_service",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","service"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_residential",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","residential"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_tertiary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tertiary"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5454545454545454,13,.5,15,6,18,12]}},{id:"bridge_secondary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.6363636363636364,12,.625,15,8,18,16]}},{id:"bridge_primary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.6818181818181818,10,.6875,15,9,18,18]}},{id:"bridge_trunk_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.7272727272727273,8,.75,15,10,18,20]}},{id:"bridge_motorway_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway"]],paint:{"line-color":"hsla(207, 53%, 33%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.7727272727272727,8,.8125,15,11,18,22]}},{id:"bridge_tertiary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tert
262iary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_secondary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_primary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.1875,15,3,18,6]}},{id:"bridge_trunk_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.18181818181818182,12,.25,15,4,18,8]}},{id:"bridge_motorway_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.18181818181818182,11,.25,15,4,18,8]}},{id:"bridge_tertiary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tertiary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.18181818181818182,13,.25,15,4,18,8]}},{id:"bridge_secondary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.2727272727272727,12,.375,15,6,18,12]}},{id:"bridge_primary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.3181818181818182,10,.4375,15,7,18,14]}},{id:"bridge_trunk",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.36363636363636365,8,.5,15,8,18,16]}},{id:"bridge_motorway",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(207, 30%, 47%, 1)",10,"hsla(207, 40%, 40%, 1)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.4090909090909091,8,.5625,15,9,18,18]}},{id:"road_labels_tertiary",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],14,10,18,14]},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}
262,minzoom:14,filter:["==","highway","tertiary"]},{id:"road_labels_secondary",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],13,10,17,14]},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1},minzoom:13,filter:["==","highway","secondary"]},{id:"road_labels_primary",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],12,10,16,14]},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1},minzoom:12,filter:["==","highway","primary"]},{id:"road_labels_trunk",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],12,10,16,14]},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1},minzoom:12,filter:["==","highway","trunk"]},{id:"road_labels_motorway",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],11,11,15,15]},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1},minzoom:11,filter:["==","highway","motorway"]},{id:"apron-outline",type:"line",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"apron"],["all",["==",["get","aeroway"],"runway"],["==",["geometry-type"],"Polygon"]],["all",["==",["get","aeroway"],"taxiway"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(205, 53%, 22%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.3,11,1.5,14,3,20,5],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"apron",type:"fill",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"apron"],["all",["==",["get","aeroway"],"runway"],["==",["geometry-type"],"Polygon"]],["all",["==",["get","aeroway"],"taxiway"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsla(207, 30%, 47%, 1)"}},{type:"fill",source:"flightaware","source-layer":"osm_buildings",filter:["all",["!=","parking","surface"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsla(205, 50%, 45%, 1)","fill-opacity":.5,"fill-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]},id:"buildings-shadow",minzoom:13},{type:"fill",source:"flightaware","source-layer":"osm_buildings",filter:["all",["!=","parking","surface"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsla(205, 50%, 45%, 1)"},id:"buildings"},{id:"aeroway_taxiway_outline",type:"line",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"taxiway"],minzoom:8,layout:{"line-cap":"square","line-join":"miter",visibility:"visible"},paint:{"line-color":"hsla(205, 53%, 22%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.3,11,1.5,14,7,20,28],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"aeroway_runway_outline",type:"line",source:"flightaware","source-layer":"airport",filter:["all",["==",["get","aeroway"],"runway"],["!=",["geometry-type"],"Polygon"]],minzoom:7,layout:{"line-cap":"square",visibility:"visible"},paint:{"line-color":"hsla(205, 53%, 22%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.75,10,4.5,11,
2626,14,["case",["has","width"],["+",["*",.07,["to-number",["get","width"]]],4],9],16,["case",["has","width"],["+",["/",["to-number",["get","width"]],3.28],6],31],20,["case",["has","width"],["+",["*",1.22,["to-number",["get","width"]]],8],99]],"line-opacity":["interpolate",["linear"],["zoom"],7,0,8,1]}},{id:"aeroway_taxiway",type:"line",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"taxiway"],minzoom:8,layout:{"line-cap":"square","line-join":"miter",visibility:"visible"},paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.25,11,.75,14,4,20,24],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"runways-polygon",type:"fill",source:"flightaware","source-layer":"airport",filter:["all",["==","$type","Polygon"],["==","aeroway","runway"]],minzoom:7,layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsla(207, 30%, 47%, 1)"}},{id:"aeroway_runway",type:"line",source:"flightaware","source-layer":"airport",filter:["all",["==",["get","aeroway"],"runway"],["!=",["geometry-type"],"Polygon"]],minzoom:7,layout:{"line-cap":"square",visibility:"visible"},paint:{"line-color":"hsla(207, 30%, 47%, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.5,10,2,11,4,14,["case",["has","width"],["*",.07,["to-number",["get","width"]]],5],16,["case",["has","width"],["/",["to-number",["get","width"]],3.28],23],20,["case",["has","width"],["*",1.22,["to-number",["get","width"]]],91]],"line-opacity":["interpolate",["linear"],["zoom"],7,0,8,1]}},{type:"symbol",source:"flightaware","source-layer":"osm_buildings",layout:{"text-font":["Roboto Medium"],"text-field":"P","text-size":["interpolate",["linear"],["zoom"],15,11,17,14],"symbol-spacing":250,"icon-padding":2,"text-padding":20},id:"parking-symbol",minzoom:15,filter:["all",["has","parking"]],paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-opacity":.5}},{id:"airport-terminals-shadow",type:"fill",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"terminal"],["all",["==",["get","aeroway"],"jet_bridge"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"fill-color":"hsla(205, 67%, 56%, 1)","fill-opacity":.5,"fill-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]},minzoom:13},{id:"airport-terminals",type:"fill",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"terminal"],["all",["==",["get","aeroway"],"jet_bridge"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"fill-color":"hsla(205, 67%, 56%, 1)"}},{id:"jetbridges-polygon-shadow",type:"fill",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==","aeroway","jet_bridge"],["==","$type","Polygon"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsla(205, 67%, 56%, 1)","fill-opacity":.5,"fill-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]}},{id:"jetbridges-shadow",type:"line",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==",["get","aeroway"],"jet_bridge"],["!=",["geometry-type"],"Polygon"]],layout:{visibility:"visible","line-cap":"butt"},paint:{"line-color":"hsla(205, 67%, 56%, 1)","line-opacity":.5,"line-width":["interpolate",["linear"],["zoom"],15,2,19,16],"line-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]}},{id:"jetbridges-polygon",type:"fill",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==","aeroway","jet_bridge"],["==","$type","Polygon"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsla(205, 67%, 56%, 1)"}},{id:"airport-jetbridge",type:"line",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==",["get","aeroway"],"jet_bridge"],["!=",["geometry-type"],"Polygon"]],layout:{visibility:"visible","line-cap":"butt"},paint:{"line-color":"hsla(205, 67%, 56%, 1)","line-width":["interpolate",["linear"],["zoom"],15,2,19,16]}}
262,{type:"fill",source:"flightaware","source-layer":"railways",id:"railways-platform",minzoom:10,filter:["any",["==","railway","station"],["==","railway","platform"]],paint:{"fill-color":"rgba(118, 168, 214, 1)"}},{type:"line",source:"flightaware","source-layer":"railways",id:"railways-bridge-casing",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},minzoom:12,filter:["all",["has","bridge"]],paint:{"line-color":"rgba(68, 99, 125, 1)","line-width":["interpolate",["linear"],["zoom"],11,.5,15,2.5,17,10,20,20]}},{type:"line",source:"flightaware","source-layer":"railways",id:"railways",minzoom:10,filter:["all",["any",["!has","tunnel"],["has","bridge"]],["!=","railway","platform"],["!=","railway","station"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(118, 168, 214, 1)","line-width":["interpolate",["linear"],["zoom"],10,.5,15,1.5,17,3,20,6]}},{type:"line",source:"flightaware","source-layer":"railways",id:"railways-tunnel",minzoom:10,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},filter:["all",["!has","bridge"],["has","tunnel"]],paint:{"line-color":"rgba(118, 168, 214, 1)","line-width":["interpolate",["linear"],["zoom"],10,.5,15,1.5,17,3,20,6],"line-dasharray":[1,2]}},{id:"taxiway_label",type:"symbol",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"taxiway"],minzoom:13,maxzoom:24,layout:{"text-font":["Roboto Medium Italic"],"text-size":["interpolate",["exponential",1],["zoom"],13,7,20,18],"text-field":"{ref}",visibility:"visible","text-anchor":"center","symbol-placement":"line"},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":["interpolate",["linear"],["zoom"],11,.1,15,.5]}},{id:"runway_label",type:"symbol",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"runway"],minzoom:11,maxzoom:24,layout:{"text-font":["Roboto Bold Italic"],"text-size":["interpolate",["exponential",1.2],["zoom"],12,8,18,28],"text-field":"{ref}",visibility:"visible","icon-anchor":"center","text-anchor":"center","symbol-placement":"line"},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":["interpolate",["linear"],["zoom"],11,.1,15,.5]}},{id:"airport-code-0",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:10,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],[">=","rank",0],["<","rank",2]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],11,8,12,9],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"airport-code-2",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:10,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",2],["<","rank",5]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],10,9,11,11],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"populated-places-7-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:9,maxzoom:24,filter:["all",["==","$type","Point"],["in","rank_scale",7,8]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsla(207, 26%, 60%, 0.8)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"populated-places-6-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:8,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",6]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],6,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsla(207, 26%, 60%, 0.8)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"populated-places-5-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:7,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",5]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],5,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsla(207, 26%, 60%, 0.8)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"airport-code-5",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:9,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",5],["<","rank",30]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]
262],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],9,9,11,12],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"admin-label-state",type:"symbol",source:"flightaware","source-layer":"admin_labels",filter:["all",["==",["get","type"],"state"],["any",["<",["get","min_zoom"],4],[">=",["zoom"],["to-number",["get","min_zoom"]]],[">=",["zoom"],6]]],layout:{"text-field":"{name}","text-font":["Roboto Regular"],"text-size":["interpolate",["exponential",1],["zoom"],3,8,6,13],"text-transform":"uppercase","text-letter-spacing":["interpolate",["linear"],["zoom"],4,0,8,.25]},paint:{"text-color":"hsla(207, 27%, 67%, 0.9)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1,"text-opacity":1}},{id:"populated-places-4-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:6,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",4]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],4,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsla(207, 26%, 60%, 0.8)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"populated-places-3-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:5,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",3]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],3,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsla(207, 26%, 60%, 0.8)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"airport_name_minor",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:11,filter:["all",["has","name"],["==","rank",-1]],layout:{"text-field":["case",["has","iata"],["concat",["get","name"],["literal"," ("],["get","iata"],["literal",")"]],["has","icao"],["concat",["get","name"],["literal"," ("],["get","icao"],["literal",")"]],["has","lid"],["concat",["get","name"],["literal"," ("],["get","lid"],["literal",")"]],["get","name"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],12,9,14,11,16,14],"symbol-placement":"point","symbol-z-order":"auto","symbol-spacing":250,"symbol-avoid-edges":!1,visibility:"visible","text-max-width":["interpolate",["linear"],["zoom"],14,15,16,50],"text-letter-spacing":["interpolate",["linear"],["zoom"],14,0,15,.1,16,.25],"text-variable-anchor":["center","left","bottom-left","right","bottom-right","top-left","top-right","bottom","top"]},paint:{"text-color":"hsla(207, 26%, 73%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1,"text-opacity":["interpolate",["linear"],["zoom"],14,1,16,.75]}},{id:"airport_name_zero",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:11,filter:["all",["has","name"],["==","rank",0]],layout:{"text-field":["case",["has","iata"],["concat",["get","name"],["literal"," ("],["get","iata"],["literal",")"]],["has","icao"],["concat",["get","name"],["literal"," ("],["get","icao"],["literal",")"]],["has","lid"],["concat",["get","name"],["literal"," ("],["get","lid"],["literal",")"]],["get","name"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],12,10,14,12,16,16],"symbol-placement":"point","symbol-z-order":"auto","symbol-spacing":250,"symbol-avoid-edges":!1,visibility:"visible","text-max-width":["interpolate",["linear"],["zoom"],14,15,16,50],"text-letter-spacing":["interpolate",["linear"],["zoom"],14,0,15,.1,16,.25],"text-variable-anchor":["center","left","bottom-left","right","bottom-right","top-left","top-right","bottom","top"]},paint:{"text-color":"hsla(207, 26%, 73%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1,"text-opacity":["interpolate",["linear"],["zoom"],14,1,16,.75]}},{id:"airport-code-30",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:9,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",30],["<","rank",50]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]
262],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],9,9,11,13],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"populated-places-2-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:2,maxzoom:24,filter:["all",["==","rank_scale",2]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],2,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsla(207, 26%, 60%, 0.8)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"airport-code-50",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:9,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",50],["<","rank",75]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],9,10,11,15],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"airport-code-100",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:8,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",75],["<","rank",150]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],8,10,11,16],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"admin-label-country",type:"symbol",source:"flightaware","source-layer":"admin_labels",filter:["all",["==",["get","type"],"country"],[">=",["zoom"],["to-number",["get","min_zoom"]]]],layout:{"text-field":"{name}","text-font":["Roboto Regular"],"text-size":["interpolate",["linear"],["zoom"],3,["max",0,["-",12,["get","min_zoom"]]],6,["max",0,["-",18,["get","min_zoom"]]],9,16],"text-max-width":["interpolate",["linear"],["zoom"],6,10,10,20],"text-transform":"uppercase","text-letter-spacing":.25},paint:{"text-color":"hsla(207, 27%, 67%, 0.9)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1,"text-opacity":1}},{id:"airport-code-low-zoom",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:7,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",150]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],7,10,11,18],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsla(207, 27%, 67%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"airport_name",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:11,filter:["all",["has","name"],[">=","rank",1]],layout:{"text-field":["case",["has","iata"],["concat",["get","name"],["literal"," ("],["get","iata"],["literal",")"]],["has","icao"],["concat",["get","name"],["literal"," ("],["get","icao"],["literal",")"]],["has","lid"],["concat",["get","name"],["literal"," ("],["get","lid"],["literal",")"]],["get","name"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],11,13,14,15,16,17],"symbol-placement":"point","symbol-z-order":"auto","symbol-spacing":250,"symbol-avoid-edges":!1,visibility:"visible","text-max-width":["interpolate",["linear"],["zoom"],14,15,16,50],"text-letter-spacing":["interpolate",["linear"],["zoom"],14,0,15,.1,16,.25],"text-variable-anchor":["center","left","bottom-left","right","bottom-right","top-left","top-right","bottom","top"]},paint:{"text-color":"hsla(207, 26%, 73%, 1)","text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1,"text-opacity":["interpolate",["linear"],["zoom"],14,1,16,.75]}},{id:"populated-places-1-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:1,maxzoom:24,filter:["all",["==","rank_scale",1]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],1,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsla(207, 26%, 60%, 0.8)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"populated-places-0-label",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:1,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",0]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],0,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsla(207, 26%, 60%, 0.8)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"airport-gates",type:"symbol",source:"flightaware","source-layer":"airport_labels",minzoom:15,filter:["all",["==",["get","type"],"gate"],["has","name"]],layout:{"text-field":["get","name"],"text-font":["Roboto Regular"],"text-size":["interpolate",["exponential",1.2],["zoom"],14,8,16,11],visibility:"visible","icon-image":"gate-classic","icon-text-fit":"both","icon-size":1.2,"icon-text-fit-padding":[2,2,0,2]},paint:{"text-opacity":["interpolate",["linear"],["zoom"],15,0,15.5,1],"text-color":"hsla(207, 26%, 87%, 1)","icon-opacity":["interpolate",["linear"],["zoom"],15,0,15.5,1]}},{id:"airport-terminal-labels",type:"symbol",source:"flightaware","source-layer":"airport_labels",minzoom:13,filter:["==",["get","type"],"terminal"],layout:{"text-field":["coalesce",["get","name:en"],["get","name"]],"text-font":["Roboto Regular"],"text-size":["interpolate",["linear"],["zoom"],13,11,16,14],visibility:"visible"},paint:{"text-color":"hsla(207, 27%, 94%, 1)","text-halo-blur":0,"text-halo-color":"hsla(210, 100%, 20%, 1)","text-halo-width":1}},{id:"z0",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z1",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z2",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z3",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z4",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z5",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z6",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z7",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z8",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z9",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z10",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0}],glyphs:t.baseLayerOptions?.flightaware_classic.glyphsURL??"https://skyapi.ovc.flightaware.com/static/fonts/{fontstack}/{range}.pbf",sprite:i??"https://skyapi.ovc.flightaware.com/static/spritesheets/flightaware/sprite"},a=t.baseLayerOptions?.flightaware_classic;else if("flightaware_dark"===e){let e;e=t.baseLayerOptions?.flightaware_dark.spriteURL,r={version:8,name:"flightaware_dark",sources:{flightaware:{type:"vector",tiles:["https://skyapi.ovc.flightaware.com/tiles/vector/flightaware/{z}/{x}/{y}.mvt"],maxzoom:14},placeholder_source:{type:"raster",tiles:[""]}},layers:[{id:"background",type:"background",paint:{"background-color":"hsl(219, 45%, 23%)"}}
262,{id:"ocean",type:"fill",source:"flightaware","source-layer":"ocean",layout:{visibility:"visible"},paint:{"fill-color":"hsl(219, 100%, 8%)","fill-antialias":!0}},{id:"urban-areas",type:"fill",source:"flightaware","source-layer":"ne_10m_urban_areas",maxzoom:11,layout:{visibility:"visible"},paint:{"fill-color":"hsl(219, 45%, 33%)","fill-opacity":["interpolate",["exponential",1.4],["zoom"],1,0,2,.25,3,.5,8,.5,10,0]}},{id:"waterways",type:"line",source:"flightaware","source-layer":"waterways",minzoom:2,filter:["any",["==","waterway","river"],["!has","waterway"]],paint:{"line-color":"hsl(219, 100%, 8%)","line-width":["interpolate",["linear"],["zoom"],2,.1,5,.1,9,.6,12,1,15,4]}},{id:"lakes",type:"fill",source:"flightaware","source-layer":"lakes",paint:{"fill-color":"hsl(219, 100%, 8%)"}},{id:"admin-boundaries4",type:"line",source:"flightaware","source-layer":"admin_boundaries",filter:["all",["==",["get","admin_level"],"4"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"hsl(210, 100%, 34%)","line-width":["interpolate",["exponential",1.4],["zoom"],2,.2,5,.75,8,1],"line-opacity":1,"line-dasharray":[1,1]}},{id:"admin-boundaries2",type:"line",source:"flightaware","source-layer":"admin_boundaries",filter:["all",["==",["get","admin_level"],"2"],["!=",["get","disputed"],1]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"hsl(210, 100%, 34%)","line-width":["interpolate",["exponential",1.4],["zoom"],0,.2,3,.75,12,3],"line-opacity":1}},{id:"admin-boundaries2-disputed",type:"line",source:"flightaware","source-layer":"admin_boundaries",filter:["all",["==",["get","admin_level"],"2"],["==",["get","disputed"],1]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"hsl(210, 100%, 34%)","line-width":["interpolate",["exponential",1.4],["zoom"],0,.2,3,.75,12,3],"line-opacity":1,"line-dasharray":[3,3]}},{id:"aerodrome",type:"fill",source:"flightaware","source-layer":"aerodrome-tier1",layout:{visibility:"visible"},paint:{"fill-color":"hsla(219, 100%, 12%, 0.4)","fill-opacity":["interpolate",["linear"],["zoom"],7,0,8,1]}},{type:"fill",source:"flightaware","source-layer":"osm_buildings",layout:{visibility:"visible"},id:"parking-surface",filter:["all",["==","parking","surface"]],paint:{"fill-antialias":!0,"fill-color":"hsl(219, 25%, 35%)","fill-opacity":.2}},{id:"ne-roads-4",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:4,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsl(219, 16%, 46%)","line-width":["interpolate",["exponential",1.2],["zoom"],4,0,5,.5]},filter:["all",["<=","min_zoom",4]]},{id:"ne-roads-5",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:5,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsl(219, 16%, 46%)","line-width":["interpolate",["exponential",1.2],["zoom"],5,0,6,.5]},filter:["all",["<=","min_zoom",5],[">","min_zoom",4]]},{id:"ne-roads-6",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:6,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsl(219, 16%, 46%)","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.5]},filter:["all",["<=","min_zoom",6],[">","min_zoom",5]]},{id:"ne-roads-7",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:7,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsl(219, 16%, 46%)","line-width":["interpolate",["exponential",1.2],["zoom"],7,0,8,.5]},filter:["all",[">","min_zoom",6]]},{id:"tunnel_unclassified_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","unclassified"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_residential_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","residential"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_service_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","
262service"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_tertiary_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_secondary_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_primary_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.1875,15,3,18,6]}},{id:"tunnel_trunk_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.18181818181818182,12,.25,15,4,18,8]}},{id:"tunnel_motorway_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.18181818181818182,11,.25,15,4,18,8]}},{id:"tunnel_tertiary_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.18181818181818182,13,.25,15,4,18,8]}},{id:"tunnel_secondary_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.2727272727272727,12,.375,15,6,18,12]}},{id:"tunnel_primary_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.3181818181818182,10,.4375,15,7,18,14]}},{id:"tunnel_trunk_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.36363636363636365,8,.5,15,8,18,16]}},{id:"tunnel_motorway_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.4090909090909091,8,.5625,15,9,18,18]}},{id:"tunnel_unclassified_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","unclassified"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_residential_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","residential"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_service_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","
262service"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_tertiary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary_link"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_secondary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary_link"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_primary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary_link"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,0,12,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_trunk_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk_link"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.045454545454545456,12,.1875,15,3,18,6],"line-dasharray":[.75,.25]}},{id:"tunnel_motorway_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway_link"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.045454545454545456,11,.1875,15,3,18,6],"line-dasharray":[.75,.25]}},{id:"tunnel_tertiary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.045454545454545456,13,.1875,15,3,18,6],"line-dasharray":[.75,.25]}},{id:"tunnel_secondary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.3125,15,5,18,10],"line-dasharray":[.75,.25]}},{id:"tunnel_primary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.18181818181818182,10,.375,15,6,18,12],"line-dasharray":[.75,.25]}},{id:"tunnel_trunk_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.22727272727272727,8,.4375,15,7,18,14],"line-dasharray":[.75,.25]}},{id:"tunnel_motorway_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway"]],paint:{"line-color":"hsl(219, 36%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.2727272727272727,8,.5,15,8,18,16],"line-dasharray":[.75,.25]}},{id:"tunnel_tertiary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tert
262iary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_secondary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_primary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,-.13636363636363635,12,.0625,15,1,18,2]}},{id:"tunnel_trunk_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,-.09090909090909088,12,.125,15,2,18,4]}},{id:"tunnel_motorway_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,-.09090909090909088,11,.125,15,2,18,4]}},{id:"tunnel_unclassified",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","unclassified"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_service",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","service"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_residential",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","residential"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_tertiary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.09090909090909088,13,.125,15,2,18,4]}},{id:"tunnel_secondary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,0,12,.25,15,4,18,8]}},{id:"tunnel_primary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.04545454545454547,10,.3125,15,5,18,10]}},{id:"tunnel_trunk",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.09090909090909094,8,.375,15,6,18,12]}},{id:"tunnel_motorway",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(220, 40%, 22%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.1363636363636364,8,.4375,15,7,18,14]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_parking_aisle",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","
262service"],["==","service","parking_aisle"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.045454545454545456,14,.0625,15,1,18,2]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_unclassified",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","unclassified"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.13636363636363635,14,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_residential",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","residential"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.13636363636363635,14,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_service",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","service"],["!=","service","parking_aisle"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.13636363636363635,14,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_tertiary_link",minzoom:11,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","tertiary_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_secondary_link",minzoom:11,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","secondary_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_primary_link",minzoom:10,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","primary_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_trunk_link",minzoom:10,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.18181818181818182,12,.25,15,4,18,8]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_motorway_link",minzoom:9,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","motorway_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.18181818181818182,11,.25,15,4,18,8]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_tertiary",minzoom:11,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","tert
262iary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.18181818181818182,13,.25,15,4,18,8]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_secondary",minzoom:10,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","secondary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.2727272727272727,12,.375,15,6,18,12]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_primary",minzoom:8,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","primary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.3181818181818182,10,.4375,15,7,18,14]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_trunk",minzoom:6,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","trunk"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.36363636363636365,8,.5,15,8,18,16]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_motorway",minzoom:6,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","motorway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.4090909090909091,8,.5625,15,9,18,18]}},{id:"bridge_unclassified_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","unclassified"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_residential_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","residential"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_service_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","service"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_tertiary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tertiary_link"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_secondary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary_link"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_primary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary_link"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.5,
26212,.4375,15,5,18,10]}},{id:"bridge_trunk_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk_link"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.5454545454545454,12,.5,15,6,18,12]}},{id:"bridge_motorway_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway_link"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.5454545454545454,11,.5,15,6,18,12]}},{id:"bridge_unclassified",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","unclassified"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_service",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","service"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_residential",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","residential"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_tertiary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tertiary"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5454545454545454,13,.5,15,6,18,12]}},{id:"bridge_secondary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.6363636363636364,12,.625,15,8,18,16]}},{id:"bridge_primary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.6818181818181818,10,.6875,15,9,18,18]}},{id:"bridge_trunk_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.7272727272727273,8,.75,15,10,18,20]}},{id:"bridge_motorway_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway"]],paint:{"line-color":"hsl(219, 45%, 23%)","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.7727272727272727,8,.8125,15,11,18,22]}},{id:"bridge_tertiary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tert
262iary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_secondary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_primary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.1875,15,3,18,6]}},{id:"bridge_trunk_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.18181818181818182,12,.25,15,4,18,8]}},{id:"bridge_motorway_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.18181818181818182,11,.25,15,4,18,8]}},{id:"bridge_tertiary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tertiary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.18181818181818182,13,.25,15,4,18,8]}},{id:"bridge_secondary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.2727272727272727,12,.375,15,6,18,12]}},{id:"bridge_primary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.3181818181818182,10,.4375,15,7,18,14]}},{id:"bridge_trunk",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.36363636363636365,8,.5,15,8,18,16]}},{id:"bridge_motorway",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsl(219, 16%, 46%)",10,"hsl(219, 36%, 26%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.4090909090909091,8,.5625,15,9,18,18]}},{id:"road_labels_tertiary",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],14,10,18,14]},paint:{"text-color":"hsl(219, 18%, 53%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}
262,minzoom:14,filter:["==","highway","tertiary"]},{id:"road_labels_secondary",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],13,10,17,14]},paint:{"text-color":"hsl(219, 18%, 53%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1},minzoom:13,filter:["==","highway","secondary"]},{id:"road_labels_primary",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],12,10,16,14]},paint:{"text-color":"hsl(219, 18%, 53%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1},minzoom:12,filter:["==","highway","primary"]},{id:"road_labels_trunk",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],12,10,16,14]},paint:{"text-color":"hsl(219, 18%, 53%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1},minzoom:12,filter:["==","highway","trunk"]},{id:"road_labels_motorway",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],11,11,15,15]},paint:{"text-color":"hsl(219, 18%, 53%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1},minzoom:11,filter:["==","highway","motorway"]},{id:"apron-outline",type:"line",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"apron"],["all",["==",["get","aeroway"],"runway"],["==",["geometry-type"],"Polygon"]],["all",["==",["get","aeroway"],"taxiway"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"line-color":"hsl(219, 100%, 12%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.3,11,1.5,14,3,20,5],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"apron",type:"fill",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"apron"],["all",["==",["get","aeroway"],"runway"],["==",["geometry-type"],"Polygon"]],["all",["==",["get","aeroway"],"taxiway"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsl(220, 35%, 32%)"}},{type:"fill",source:"flightaware","source-layer":"osm_buildings",filter:["all",["!=","parking","surface"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsl(220, 48%, 32%)","fill-opacity":.5,"fill-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]},id:"buildings-shadow",minzoom:13},{type:"fill",source:"flightaware","source-layer":"osm_buildings",filter:["all",["!=","parking","surface"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsl(220, 48%, 32%)"},id:"buildings"},{id:"aeroway_taxiway_outline",type:"line",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"taxiway"],minzoom:8,layout:{"line-cap":"square","line-join":"miter",visibility:"visible"},paint:{"line-color":"hsl(219, 100%, 12%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.3,11,1.5,14,7,20,28],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"aeroway_runway_outline",type:"line",source:"flightaware","source-layer":"airport",filter:["all",["==",["get","aeroway"],"runway"],["!=",["geometry-type"],"Polygon"]],minzoom:7,layout:{"line-cap":"square",visibility:"visible"},paint:{"line-color":"hsl(219, 100%, 12%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.75,10,4.5,11,
2626,14,["case",["has","width"],["+",["*",.07,["to-number",["get","width"]]],4],9],16,["case",["has","width"],["+",["/",["to-number",["get","width"]],3.28],6],31],20,["case",["has","width"],["+",["*",1.22,["to-number",["get","width"]]],8],99]],"line-opacity":["interpolate",["linear"],["zoom"],7,0,8,1]}},{id:"aeroway_taxiway",type:"line",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"taxiway"],minzoom:8,layout:{"line-cap":"square","line-join":"miter",visibility:"visible"},paint:{"line-color":"hsl(220, 35%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.25,11,.75,14,4,20,24],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"runways-polygon",type:"fill",source:"flightaware","source-layer":"airport",filter:["all",["==","$type","Polygon"],["==","aeroway","runway"]],minzoom:7,layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsl(220, 35%, 32%)"}},{id:"aeroway_runway",type:"line",source:"flightaware","source-layer":"airport",filter:["all",["==",["get","aeroway"],"runway"],["!=",["geometry-type"],"Polygon"]],minzoom:7,layout:{"line-cap":"square",visibility:"visible"},paint:{"line-color":"hsl(220, 35%, 32%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.5,10,2,11,4,14,["case",["has","width"],["*",.07,["to-number",["get","width"]]],5],16,["case",["has","width"],["/",["to-number",["get","width"]],3.28],23],20,["case",["has","width"],["*",1.22,["to-number",["get","width"]]],91]],"line-opacity":["interpolate",["linear"],["zoom"],7,0,8,1]}},{type:"symbol",source:"flightaware","source-layer":"osm_buildings",layout:{"text-font":["Roboto Medium"],"text-field":"P","text-size":["interpolate",["linear"],["zoom"],15,11,17,14],"symbol-spacing":250,"icon-padding":2,"text-padding":20},id:"parking-symbol",minzoom:15,filter:["all",["has","parking"]],paint:{"text-color":"hsl(219, 13%, 58%)","text-halo-color":"hsl(219, 100%, 12%)","text-opacity":.5}},{id:"airport-terminals-shadow",type:"fill",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"terminal"],["all",["==",["get","aeroway"],"jet_bridge"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"fill-color":"hsl(216, 51%, 42%)","fill-opacity":.5,"fill-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]},minzoom:13},{id:"airport-terminals",type:"fill",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"terminal"],["all",["==",["get","aeroway"],"jet_bridge"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"fill-color":"hsl(216, 51%, 42%)"}},{id:"jetbridges-polygon-shadow",type:"fill",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==","aeroway","jet_bridge"],["==","$type","Polygon"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsl(216, 51%, 42%)","fill-opacity":.5,"fill-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]}},{id:"jetbridges-shadow",type:"line",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==",["get","aeroway"],"jet_bridge"],["!=",["geometry-type"],"Polygon"]],layout:{visibility:"visible","line-cap":"butt"},paint:{"line-color":"hsl(216, 51%, 42%)","line-opacity":.5,"line-width":["interpolate",["linear"],["zoom"],15,2,19,16],"line-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]}},{id:"jetbridges-polygon",type:"fill",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==","aeroway","jet_bridge"],["==","$type","Polygon"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsl(216, 51%, 42%)"}},{id:"airport-jetbridge",type:"line",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==",["get","aeroway"],"jet_bridge"],["!=",["geometry-type"],"Polygon"]],layout:{visibility:"visible","line-cap":"butt"},paint:{"line-color":"hsl(216, 51%, 42%)","line-width":["interpolate",["linear"],["zoom"],15,2,19,16]}},{type:"fill",source:"flightaware","source-layer":"railways",id:"railways-platform",minzoom:10,filter:["any",["==","railway","station"],["==","railway","platform"]],paint:{"fill-color":"rgba(42, 92, 147, 1)"}},{type:"line",source:"flightaware","source-layer":"railways",id:"railways-bridge-casing",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},minzoom:12,filter:["all",["has","bridge"]],paint:{"line-color":"rgba(28, 58, 85, 1)","line-width":["interpolate",["linear"],["zoom"],11,.5,15,2.5,17,10,20,20]}},{type:"line",source:"flightaware","source-layer":"railways",id:"railways",minzoom:10,filter:["all",["any",["!has","tunnel"],["has","bridge"]],["!=","railway","platform"],["!=","railway","station"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(42, 92, 147, 1)","line-width":["interpolate",["linear"],["zoom"],10,.5,15,1.5,17,3,20,6]}},{type:"line",source:"flightaware","source-layer":"railways",id:"railways-tunnel",minzoom:10,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},filter:["all",["!has","bridge"],["has","tunnel"]],paint:{"line-color":"rgba(42, 92, 147, 1)","line-width":["interpolate",["linear"],["zoom"],10,.5,15,1.5,17,3,20,6],"line-dasharray":[1,2]}},{id:"taxiway_label",type:"symbol",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"taxiway"],minzoom:13,maxzoom:24,layout:{"text-font":["Roboto Medium Italic"],"text-size":["interpolate",["exponential",1],["zoom"],13,7,20,18],"text-field":"{ref}",visibility:"visible","text-anchor":"center","symbol-placement":"line"},paint:{"text-color":"hsl(219, 11%, 51%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":["interpolate",["linear"],["zoom"],11,.1,15,.5]}},{id:"runway_label",type:"symbol",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"runway"],minzoom:11,maxzoom:24,layout:{"text-font":["Roboto Bold Italic"],"text-size":["interpolate",["exponential",1.2],["zoom"],12,8,18,28],"text-field":"{ref}",visibility:"visible","icon-anchor":"center","text-anchor":"center","symbol-placement":"line"},paint:{"text-color":"hsl(219, 11%, 51%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":["interpolate",["linear"],["zoom"],11,.1,15,.5]}},{id:"airport-code-0",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:10,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],[">=","rank",0],["<","rank",2]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]
262],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],11,8,12,9],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(219, 13%, 58%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"airport-code-2",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:10,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",2],["<","rank",5]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],10,9,11,11],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(219, 13%, 58%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"populated-places-7-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:9,maxzoom:24,filter:["all",["==","$type","Point"],["in","rank_scale",7,8]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(219, 23%, 48%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"populated-places-6-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:8,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",6]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],6,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(219, 23%, 48%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"populated-places-5-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:7,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",5]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],5,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(219, 23%, 48%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"airport-code-5",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:9,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",5],["<","rank",30]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]
262],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],9,9,11,12],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(219, 13%, 58%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"admin-label-state",type:"symbol",source:"flightaware","source-layer":"admin_labels",filter:["all",["==",["get","type"],"state"],["any",["<",["get","min_zoom"],4],[">=",["zoom"],["to-number",["get","min_zoom"]]],[">=",["zoom"],6]]],layout:{"text-field":"{name}","text-font":["Roboto Regular"],"text-size":["interpolate",["exponential",1],["zoom"],3,8,6,13],"text-transform":"uppercase","text-letter-spacing":["interpolate",["linear"],["zoom"],4,0,8,.25]},paint:{"text-color":"hsl(219, 23%, 48%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1,"text-opacity":1}},{id:"populated-places-4-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:6,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",4]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],4,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(219, 23%, 48%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"populated-places-3-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:5,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",3]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],3,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(219, 23%, 48%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"airport_name_minor",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:11,filter:["all",["has","name"],["==","rank",-1]],layout:{"text-field":["case",["has","iata"],["concat",["get","name"],["literal"," ("],["get","iata"],["literal",")"]],["has","icao"],["concat",["get","name"],["literal"," ("],["get","icao"],["literal",")"]],["has","lid"],["concat",["get","name"],["literal"," ("],["get","lid"],["literal",")"]],["get","name"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],12,9,14,11,16,14],"symbol-placement":"point","symbol-z-order":"auto","symbol-spacing":250,"symbol-avoid-edges":!1,visibility:"visible","text-max-width":["interpolate",["linear"],["zoom"],14,15,16,50],"text-letter-spacing":["interpolate",["linear"],["zoom"],14,0,15,.1,16,.25],"text-variable-anchor":["center","left","bottom-left","right","bottom-right","top-left","top-right","bottom","top"]},paint:{"text-color":"hsl(219, 13%, 69%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1,"text-opacity":["interpolate",["linear"],["zoom"],14,1,16,.75]}},{id:"airport_name_zero",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:11,filter:["all",["has","name"],["==","rank",0]],layout:{"text-field":["case",["has","iata"],["concat",["get","name"],["literal"," ("],["get","iata"],["literal",")"]],["has","icao"],["concat",["get","name"],["literal"," ("],["get","icao"],["literal",")"]],["has","lid"],["concat",["get","name"],["literal"," ("],["get","lid"],["literal",")"]],["get","name"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],12,10,14,12,16,16],"symbol-placement":"point","symbol-z-order":"auto","symbol-spacing":250,"symbol-avoid-edges":!1,visibility:"visible","text-max-width":["interpolate",["linear"],["zoom"],14,15,16,50],"text-letter-spacing":["interpolate",["linear"],["zoom"],14,0,15,.1,16,.25],"text-variable-anchor":["center","left","bottom-left","right","bottom-right","top-left","top-right","bottom","top"]},paint:{"text-color":"hsl(219, 13%, 69%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1,"text-opacity":["interpolate",["linear"],["zoom"],14,1,16,.75]}},{id:"airport-code-30",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:9,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",30],["<","rank",50]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]
262],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],9,9,11,13],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(219, 13%, 58%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"populated-places-2-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:2,maxzoom:24,filter:["all",["==","rank_scale",2]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],2,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(219, 23%, 48%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"airport-code-50",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:9,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",50],["<","rank",75]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],9,10,11,15],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(219, 13%, 58%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"airport-code-100",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:8,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",75],["<","rank",150]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],8,10,11,16],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(219, 13%, 58%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"admin-label-country",type:"symbol",source:"flightaware","source-layer":"admin_labels",filter:["all",["==",["get","type"],"country"],[">=",["zoom"],["to-number",["get","min_zoom"]]]],layout:{"text-field":"{name}","text-font":["Roboto Regular"],"text-size":["interpolate",["linear"],["zoom"],3,["max",0,["-",12,["get","min_zoom"]]],6,["max",0,["-",18,["get","min_zoom"]]],9,16],"text-max-width":["interpolate",["linear"],["zoom"],6,10,10,20],"text-transform":"uppercase","text-letter-spacing":.25},paint:{"text-color":"hsl(219, 23%, 48%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1,"text-opacity":1}},{id:"airport-code-low-zoom",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:7,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",150]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],7,10,11,18],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(219, 13%, 58%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"airport_name",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:11,filter:["all",["has","name"],[">=","rank",1]],layout:{"text-field":["case",["has","iata"],["concat",["get","name"],["literal"," ("],["get","iata"],["literal",")"]],["has","icao"],["concat",["get","name"],["literal"," ("],["get","icao"],["literal",")"]],["has","lid"],["concat",["get","name"],["literal"," ("],["get","lid"],["literal",")"]],["get","name"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],11,13,14,15,16,17],"symbol-placement":"point","symbol-z-order":"auto","symbol-spacing":250,"symbol-avoid-edges":!1,visibility:"visible","text-max-width":["interpolate",["linear"],["zoom"],14,15,16,50],"text-letter-spacing":["interpolate",["linear"],["zoom"],14,0,15,.1,16,.25],"text-variable-anchor":["center","left","bottom-left","right","bottom-right","top-left","top-right","bottom","top"]},paint:{"text-color":"hsl(219, 13%, 69%)","text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1,"text-opacity":["interpolate",["linear"],["zoom"],14,1,16,.75]}},{id:"populated-places-1-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:1,maxzoom:24,filter:["all",["==","rank_scale",1]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],1,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(219, 23%, 48%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"populated-places-0-label",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:1,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",0]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],0,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(219, 23%, 48%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"airport-gates",type:"symbol",source:"flightaware","source-layer":"airport_labels",minzoom:15,filter:["all",["==",["get","type"],"gate"],["has","name"]],layout:{"text-field":["get","name"],"text-font":["Roboto Regular"],"text-size":["interpolate",["exponential",1.2],["zoom"],14,8,16,11],visibility:"visible","icon-image":"gate-3","icon-text-fit":"both","icon-size":1.2,"icon-text-fit-padding":[2,2,0,2]},paint:{"text-opacity":["interpolate",["linear"],["zoom"],15,0,15.5,1],"text-color":"hsl(209, 100%, 92%)","icon-opacity":["interpolate",["linear"],["zoom"],15,0,15.5,1]}},{id:"airport-terminal-labels",type:"symbol",source:"flightaware","source-layer":"airport_labels",minzoom:13,filter:["==",["get","type"],"terminal"],layout:{"text-field":["coalesce",["get","name:en"],["get","name"]],"text-font":["Roboto Regular"],"text-size":["interpolate",["linear"],["zoom"],13,11,16,14],visibility:"visible"},paint:{"text-color":"hsl(217, 13%, 81%)","text-halo-blur":0,"text-halo-color":"hsl(219, 100%, 12%)","text-halo-width":1}},{id:"z0",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z1",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z2",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z3",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z4",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z5",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z6",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z7",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z8",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z9",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z10",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0}],glyphs:t.baseLayerOptions?.flightaware_dark.glyphsURL??"https://skyapi.ovc.flightaware.com/static/fonts/{fontstack}/{range}.pbf",sprite:e??"https://skyapi.ovc.flightaware.com/static/spritesheets/flightaware/sprite"},a=t.baseLayerOptions?.flightaware_dark}else if("flightaware_monochrome_light"===e){let e;e=t.baseLayerOptions?.flightaware_monochrome_light.spriteURL,r={version:8,name:"flightaware_monochrome_light",sources:{flightaware:{type:"vector",tiles:["https://skyapi.ovc.flightaware.com/tiles/vector/flightaware/{z}/{x}/{y}.mvt"],maxzoom:14},placeholder_source:{type:"raster",tiles:[""]}},layers:[{id:"background",type:"background",paint:{"background-color":"#ffffff"}}
262,{id:"ocean",type:"fill",source:"flightaware","source-layer":"ocean",layout:{visibility:"visible"},paint:{"fill-color":"#f0f0f0","fill-antialias":!0}},{id:"urban-areas",type:"fill",source:"flightaware","source-layer":"ne_10m_urban_areas",maxzoom:11,layout:{visibility:"visible"},paint:{"fill-color":"hsl(0, 0%, 80%)","fill-opacity":["interpolate",["exponential",1.4],["zoom"],1,0,2,.25,3,.5,8,.5,10,0]}},{id:"waterways",type:"line",source:"flightaware","source-layer":"waterways",minzoom:2,filter:["any",["==","waterway","river"],["!has","waterway"]],paint:{"line-color":"#f0f0f0","line-width":["interpolate",["linear"],["zoom"],2,.1,5,.1,9,.6,12,1,15,4]}},{id:"lakes",type:"fill",source:"flightaware","source-layer":"lakes",paint:{"fill-color":"#f0f0f0"}},{id:"admin-boundaries4",type:"line",source:"flightaware","source-layer":"admin_boundaries",filter:["all",["==",["get","admin_level"],"4"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#5e6a7c","line-width":["interpolate",["exponential",1.4],["zoom"],2,.2,5,.75,8,1],"line-opacity":1,"line-dasharray":[1,1]}},{id:"admin-boundaries2",type:"line",source:"flightaware","source-layer":"admin_boundaries",filter:["all",["==",["get","admin_level"],"2"],["!=",["get","disputed"],1]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#5e6a7c","line-width":["interpolate",["exponential",1.4],["zoom"],0,.2,3,.75,12,3],"line-opacity":1}},{id:"admin-boundaries2-disputed",type:"line",source:"flightaware","source-layer":"admin_boundaries",filter:["all",["==",["get","admin_level"],"2"],["==",["get","disputed"],1]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#5e6a7c","line-width":["interpolate",["exponential",1.4],["zoom"],0,.2,3,.75,12,3],"line-opacity":1,"line-dasharray":[3,3]}},{id:"aerodrome",type:"fill",source:"flightaware","source-layer":"aerodrome-tier1",layout:{visibility:"visible"},paint:{"fill-color":"hsl(0, 0%, 90%)","fill-opacity":["interpolate",["linear"],["zoom"],7,0,8,1]}},{type:"fill",source:"flightaware","source-layer":"osm_buildings",layout:{visibility:"visible"},id:"parking-surface",filter:["all",["==","parking","surface"]],paint:{"fill-antialias":!0,"fill-color":"#cccccc","fill-opacity":.2}},{id:"ne-roads-4",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:4,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],4,0,5,.5]},filter:["all",["<=","min_zoom",4]]},{id:"ne-roads-5",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:5,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],5,0,6,.5]},filter:["all",["<=","min_zoom",5],[">","min_zoom",4]]},{id:"ne-roads-6",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:6,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.5]},filter:["all",["<=","min_zoom",6],[">","min_zoom",5]]},{id:"ne-roads-7",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:7,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],7,0,8,.5]},filter:["all",[">","min_zoom",6]]},{id:"tunnel_unclassified_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","unclassified"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_residential_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","residential"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_service_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","
262service"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_tertiary_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_secondary_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_primary_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.1875,15,3,18,6]}},{id:"tunnel_trunk_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.18181818181818182,12,.25,15,4,18,8]}},{id:"tunnel_motorway_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.18181818181818182,11,.25,15,4,18,8]}},{id:"tunnel_tertiary_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.18181818181818182,13,.25,15,4,18,8]}},{id:"tunnel_secondary_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.2727272727272727,12,.375,15,6,18,12]}},{id:"tunnel_primary_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.3181818181818182,10,.4375,15,7,18,14]}},{id:"tunnel_trunk_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.36363636363636365,8,.5,15,8,18,16]}},{id:"tunnel_motorway_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.4090909090909091,8,.5625,15,9,18,18]}},{id:"tunnel_unclassified_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","unclassified"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_residential_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","residential"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_service_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","
262service"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_tertiary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary_link"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_secondary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary_link"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_primary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary_link"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,0,12,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_trunk_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk_link"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.045454545454545456,12,.1875,15,3,18,6],"line-dasharray":[.75,.25]}},{id:"tunnel_motorway_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway_link"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.045454545454545456,11,.1875,15,3,18,6],"line-dasharray":[.75,.25]}},{id:"tunnel_tertiary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.045454545454545456,13,.1875,15,3,18,6],"line-dasharray":[.75,.25]}},{id:"tunnel_secondary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.3125,15,5,18,10],"line-dasharray":[.75,.25]}},{id:"tunnel_primary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.18181818181818182,10,.375,15,6,18,12],"line-dasharray":[.75,.25]}},{id:"tunnel_trunk_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.22727272727272727,8,.4375,15,7,18,14],"line-dasharray":[.75,.25]}},{id:"tunnel_motorway_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway"]],paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.2727272727272727,8,.5,15,8,18,16],"line-dasharray":[.75,.25]}},{id:"tunnel_tertiary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tert
262iary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_secondary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_primary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,-.13636363636363635,12,.0625,15,1,18,2]}},{id:"tunnel_trunk_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,-.09090909090909088,12,.125,15,2,18,4]}},{id:"tunnel_motorway_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,-.09090909090909088,11,.125,15,2,18,4]}},{id:"tunnel_unclassified",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","unclassified"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_service",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","service"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_residential",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","residential"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_tertiary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.09090909090909088,13,.125,15,2,18,4]}},{id:"tunnel_secondary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,0,12,.25,15,4,18,8]}},{id:"tunnel_primary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.04545454545454547,10,.3125,15,5,18,10]}},{id:"tunnel_trunk",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.09090909090909094,8,.375,15,6,18,12]}},{id:"tunnel_motorway",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 95%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.1363636363636364,8,.4375,15,7,18,14]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_parking_aisle",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","
262service"],["==","service","parking_aisle"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.045454545454545456,14,.0625,15,1,18,2]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_unclassified",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","unclassified"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.13636363636363635,14,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_residential",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","residential"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.13636363636363635,14,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_service",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","service"],["!=","service","parking_aisle"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.13636363636363635,14,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_tertiary_link",minzoom:11,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","tertiary_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_secondary_link",minzoom:11,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","secondary_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_primary_link",minzoom:10,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","primary_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_trunk_link",minzoom:10,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.18181818181818182,12,.25,15,4,18,8]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_motorway_link",minzoom:9,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","motorway_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.18181818181818182,11,.25,15,4,18,8]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_tertiary",minzoom:11,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.18181818181818182,13,.25,15,4,18,8]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_secondary",minzoom:10,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","
262secondary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.2727272727272727,12,.375,15,6,18,12]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_primary",minzoom:8,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","primary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.3181818181818182,10,.4375,15,7,18,14]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_trunk",minzoom:6,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","trunk"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.36363636363636365,8,.5,15,8,18,16]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_motorway",minzoom:6,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","motorway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.4090909090909091,8,.5625,15,9,18,18]}},{id:"bridge_unclassified_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","unclassified"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_residential_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","residential"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_service_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","service"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_tertiary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tertiary_link"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_secondary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary_link"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_primary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary_link"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.5,12,.4375,15,5,18,10]}},{id:"bridge_trunk_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk_link"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.5454545454545454,12,.5,15,6,18,12]}},{id:"bridge_motorway_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway_link"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.5454545454545454,11,.5,15,6,18,12]}},{id:"bridge_unclassified",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","unclassified"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_service",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","
262service"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_residential",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","residential"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_tertiary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tertiary"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5454545454545454,13,.5,15,6,18,12]}},{id:"bridge_secondary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.6363636363636364,12,.625,15,8,18,16]}},{id:"bridge_primary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.6818181818181818,10,.6875,15,9,18,18]}},{id:"bridge_trunk_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.7272727272727273,8,.75,15,10,18,20]}},{id:"bridge_motorway_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway"]],paint:{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.7727272727272727,8,.8125,15,11,18,22]}},{id:"bridge_tertiary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tertiary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_secondary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_primary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.1875,15,3,18,6]}},{id:"bridge_trunk_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.18181818181818182,12,.25,15,4,18,8]}},{id:"bridge_motorway_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.18181818181818182,11,.25,15,4,18,8]}},{id:"bridge_tertiary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tert
262iary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.18181818181818182,13,.25,15,4,18,8]}},{id:"bridge_secondary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.2727272727272727,12,.375,15,6,18,12]}},{id:"bridge_primary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.3181818181818182,10,.4375,15,7,18,14]}},{id:"bridge_trunk",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.36363636363636365,8,.5,15,8,18,16]}},{id:"bridge_motorway",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#cccccc",10,"hsl(0, 0%, 85%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.4090909090909091,8,.5625,15,9,18,18]}},{id:"road_labels_tertiary",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],14,10,18,14]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1},minzoom:14,filter:["==","highway","tertiary"]},{id:"road_labels_secondary",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],13,10,17,14]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1},minzoom:13,filter:["==","highway","secondary"]},{id:"road_labels_primary",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],12,10,16,14]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1},minzoom:12,filter:["==","highway","primary"]},{id:"road_labels_trunk",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],12,10,16,14]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1},minzoom:12,filter:["==","highway","trunk"]},{id:"road_labels_motorway",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],11,11,15,15]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1},minzoom:11,filter:["==","highway","motorway"]},{id:"apron-outline",type:"line",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"apron"],["all",["==",["get","aeroway"],"runway"],["==",["geometry-type"],"Polygon"]],["all",["==",["get","aeroway"],"taxiway"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"line-color":"hsl(0, 0%, 100%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.3,11,1.5,14,3,20,5],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}}
262,{id:"apron",type:"fill",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"apron"],["all",["==",["get","aeroway"],"runway"],["==",["geometry-type"],"Polygon"]],["all",["==",["get","aeroway"],"taxiway"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"#cccccc"}},{type:"fill",source:"flightaware","source-layer":"osm_buildings",filter:["all",["!=","parking","surface"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsl(216, 10%, 66%)","fill-opacity":.5,"fill-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]},id:"buildings-shadow",minzoom:13},{type:"fill",source:"flightaware","source-layer":"osm_buildings",filter:["all",["!=","parking","surface"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsl(216, 10%, 66%)"},id:"buildings"},{id:"aeroway_taxiway_outline",type:"line",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"taxiway"],minzoom:8,layout:{"line-cap":"square","line-join":"miter",visibility:"visible"},paint:{"line-color":"hsl(0, 0%, 100%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.3,11,1.5,14,7,20,28],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"aeroway_runway_outline",type:"line",source:"flightaware","source-layer":"airport",filter:["all",["==",["get","aeroway"],"runway"],["!=",["geometry-type"],"Polygon"]],minzoom:7,layout:{"line-cap":"square",visibility:"visible"},paint:{"line-color":"hsl(0, 0%, 100%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.75,10,4.5,11,6,14,["case",["has","width"],["+",["*",.07,["to-number",["get","width"]]],4],9],16,["case",["has","width"],["+",["/",["to-number",["get","width"]],3.28],6],31],20,["case",["has","width"],["+",["*",1.22,["to-number",["get","width"]]],8],99]],"line-opacity":["interpolate",["linear"],["zoom"],7,0,8,1]}},{id:"aeroway_taxiway",type:"line",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"taxiway"],minzoom:8,layout:{"line-cap":"square","line-join":"miter",visibility:"visible"},paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],8,.25,11,.75,14,4,20,24],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"runways-polygon",type:"fill",source:"flightaware","source-layer":"airport",filter:["all",["==","$type","Polygon"],["==","aeroway","runway"]],minzoom:7,layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"#cccccc"}},{id:"aeroway_runway",type:"line",source:"flightaware","source-layer":"airport",filter:["all",["==",["get","aeroway"],"runway"],["!=",["geometry-type"],"Polygon"]],minzoom:7,layout:{"line-cap":"square",visibility:"visible"},paint:{"line-color":"#cccccc","line-width":["interpolate",["exponential",1.2],["zoom"],8,.5,10,2,11,4,14,["case",["has","width"],["*",.07,["to-number",["get","width"]]],5],16,["case",["has","width"],["/",["to-number",["get","width"]],3.28],23],20,["case",["has","width"],["*",1.22,["to-number",["get","width"]]],91]],"line-opacity":["interpolate",["linear"],["zoom"],7,0,8,1]}},{type:"symbol",source:"flightaware","source-layer":"osm_buildings",layout:{"text-font":["Roboto Medium"],"text-field":"P","text-size":["interpolate",["linear"],["zoom"],15,11,17,14],"symbol-spacing":250,"icon-padding":2,"text-padding":20},id:"parking-symbol",minzoom:15,filter:["all",["has","parking"]],paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-opacity":.5}},{id:"airport-terminals-shadow",type:"fill",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"terminal"],["all",["==",["get","aeroway"],"jet_bridge"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"fill-color":"#5e6a7c","fill-opacity":.5,"fill-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]},minzoom:13},{id:"airport-terminals",type:"fill",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"terminal"],["all",["==",["get","aeroway"],"jet_bridge"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"fill-color":"#5e6a7c"}}
262,{id:"jetbridges-polygon-shadow",type:"fill",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==","aeroway","jet_bridge"],["==","$type","Polygon"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"#5e6a7c","fill-opacity":.5,"fill-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]}},{id:"jetbridges-shadow",type:"line",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==",["get","aeroway"],"jet_bridge"],["!=",["geometry-type"],"Polygon"]],layout:{visibility:"visible","line-cap":"butt"},paint:{"line-color":"#5e6a7c","line-opacity":.5,"line-width":["interpolate",["linear"],["zoom"],15,2,19,16],"line-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]}},{id:"jetbridges-polygon",type:"fill",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==","aeroway","jet_bridge"],["==","$type","Polygon"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"#5e6a7c"}},{id:"airport-jetbridge",type:"line",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==",["get","aeroway"],"jet_bridge"],["!=",["geometry-type"],"Polygon"]],layout:{visibility:"visible","line-cap":"butt"},paint:{"line-color":"#5e6a7c","line-width":["interpolate",["linear"],["zoom"],15,2,19,16]}},{type:"fill",source:"flightaware","source-layer":"railways",id:"railways-platform",minzoom:10,filter:["any",["==","railway","station"],["==","railway","platform"]],paint:{"fill-color":"hsl(216, 29%, 58%)"}},{type:"line",source:"flightaware","source-layer":"railways",id:"railways-bridge-casing",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},minzoom:12,filter:["all",["has","bridge"]],paint:{"line-color":"hsl(0, 0%, 100%)","line-width":["interpolate",["linear"],["zoom"],11,.5,15,2.5,17,10,20,20]}},{type:"line",source:"flightaware","source-layer":"railways",id:"railways",minzoom:10,filter:["all",["any",["!has","tunnel"],["has","bridge"]],["!=","railway","platform"],["!=","railway","station"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsl(216, 29%, 58%)","line-width":["interpolate",["linear"],["zoom"],10,.5,15,1.5,17,3,20,6]}},{type:"line",source:"flightaware","source-layer":"railways",id:"railways-tunnel",minzoom:10,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},filter:["all",["!has","bridge"],["has","tunnel"]],paint:{"line-color":"hsl(216, 29%, 58%)","line-width":["interpolate",["linear"],["zoom"],10,.5,15,1.5,17,3,20,6],"line-dasharray":[1,2]}},{id:"taxiway_label",type:"symbol",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"taxiway"],minzoom:13,maxzoom:24,layout:{"text-font":["Roboto Medium Italic"],"text-size":["interpolate",["exponential",1],["zoom"],13,7,20,18],"text-field":"{ref}",visibility:"visible","text-anchor":"center","symbol-placement":"line"},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":["interpolate",["linear"],["zoom"],11,.1,15,.5]}},{id:"runway_label",type:"symbol",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"runway"],minzoom:11,maxzoom:24,layout:{"text-font":["Roboto Bold Italic"],"text-size":["interpolate",["exponential",1.2],["zoom"],12,8,18,28],"text-field":"{ref}",visibility:"visible","icon-anchor":"center","text-anchor":"center","symbol-placement":"line"},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":["interpolate",["linear"],["zoom"],11,.1,15,.5]}},{id:"airport-code-0",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:10,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],[">=","rank",0],["<","rank",2]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],11,8,12,9],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"airport-code-2",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:10,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",2],["<","rank",5]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]
262],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],10,9,11,11],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"populated-places-7-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:9,maxzoom:24,filter:["all",["==","$type","Point"],["in","rank_scale",7,8]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 45%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"populated-places-6-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:8,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",6]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],6,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 45%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"populated-places-5-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:7,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",5]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],5,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 45%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"airport-code-5",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:9,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",5],["<","rank",30]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],9,9,11,12],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"admin-label-state",type:"symbol",source:"flightaware","source-layer":"admin_labels",filter:["all",["==",["get","type"],"state"],["any",["<",["get","min_zoom"],4],[">=",["zoom"],["to-number",["get","min_zoom"]]],[">=",["zoom"],6]]],layout:{"text-field":"{name}","text-font":["Roboto Regular"],"text-size":["interpolate",["exponential",1],["zoom"],3,8,6,13],"text-transform":"uppercase","text-letter-spacing":["interpolate",["linear"],["zoom"],4,0,8,.25]},paint:{"text-color":"hsla(0, 0%, 15%, 0.9)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1,"text-opacity":1}},{id:"populated-places-4-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:6,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",4]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],4,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 45%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"populated-places-3-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:5,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",3]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],3,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 45%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"airport_name_minor",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:11,filter:["all",["has","name"],["==","rank",-1]],layout:{"text-field":["case",["has","iata"],["concat",["get","name"],["literal"," ("],["get","iata"],["literal",")"]],["has","icao"],["concat",["get","name"],["literal"," ("],["get","icao"],["literal",")"]],["has","lid"],["concat",["get","name"],["literal"," ("],["get","lid"],["literal",")"]],["get","name"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],12,9,14,11,16,14],"symbol-placement":"point","symbol-z-order":"auto","symbol-spacing":250,"symbol-avoid-edges":!1,visibility:"visible","text-max-width":["interpolate",["linear"],["zoom"],14,15,16,50],"text-letter-spacing":["interpolate",["linear"],["zoom"],14,0,15,.1,16,.25],"text-variable-anchor":["center","left","bottom-left","right","bottom-right","top-left","top-right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1,"text-opacity":["interpolate",["linear"],["zoom"],14,1,16,.75]}},{id:"airport_name_zero",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:11,filter:["all",["has","name"],["==","rank",0]],layout:{"text-field":["case",["has","iata"],["concat",["get","name"],["literal"," ("],["get","iata"],["literal",")"]],["has","icao"],["concat",["get","name"],["literal"," ("],["get","icao"],["literal",")"]],["has","lid"],["concat",["get","name"],["literal"," ("],["get","lid"],["literal",")"]],["get","name"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],12,10,14,12,16,16],"symbol-placement":"point","symbol-z-order":"auto","symbol-spacing":250,"symbol-avoid-edges":!1,visibility:"visible","text-max-width":["interpolate",["linear"],["zoom"],14,15,16,50],"text-letter-spacing":["interpolate",["linear"],["zoom"],14,0,15,.1,16,.25],"text-variable-anchor":["center","left","bottom-left","right","bottom-right","top-left","top-right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1,"text-opacity":["interpolate",["linear"],["zoom"],14,1,16,.75]}},{id:"airport-code-30",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:9,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",30],["<","rank",50]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]
262],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],9,9,11,13],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"populated-places-2-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:2,maxzoom:24,filter:["all",["==","rank_scale",2]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],2,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 45%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"airport-code-50",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:9,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",50],["<","rank",75]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],9,10,11,15],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"airport-code-100",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:8,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",75],["<","rank",150]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],8,10,11,16],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"admin-label-country",type:"symbol",source:"flightaware","source-layer":"admin_labels",filter:["all",["==",["get","type"],"country"],[">=",["zoom"],["to-number",["get","min_zoom"]]]],layout:{"text-field":"{name}","text-font":["Roboto Regular"],"text-size":["interpolate",["linear"],["zoom"],3,["max",0,["-",12,["get","min_zoom"]]],6,["max",0,["-",18,["get","min_zoom"]]],9,16],"text-max-width":["interpolate",["linear"],["zoom"],6,10,10,20],"text-transform":"uppercase","text-letter-spacing":.25},paint:{"text-color":"hsla(0, 0%, 15%, 0.9)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1,"text-opacity":1}},{id:"airport-code-low-zoom",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:7,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",150]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],7,10,11,18],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"airport_name",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:11,filter:["all",["has","name"],[">=","rank",1]],layout:{"text-field":["case",["has","iata"],["concat",["get","name"],["literal"," ("],["get","iata"],["literal",")"]],["has","icao"],["concat",["get","name"],["literal"," ("],["get","icao"],["literal",")"]],["has","lid"],["concat",["get","name"],["literal"," ("],["get","lid"],["literal",")"]],["get","name"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],11,13,14,15,16,17],"symbol-placement":"point","symbol-z-order":"auto","symbol-spacing":250,"symbol-avoid-edges":!1,visibility:"visible","text-max-width":["interpolate",["linear"],["zoom"],14,15,16,50],"text-letter-spacing":["interpolate",["linear"],["zoom"],14,0,15,.1,16,.25],"text-variable-anchor":["center","left","bottom-left","right","bottom-right","top-left","top-right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1,"text-opacity":["interpolate",["linear"],["zoom"],14,1,16,.75]}},{id:"populated-places-1-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:1,maxzoom:24,filter:["all",["==","rank_scale",1]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],1,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 45%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"populated-places-0-label",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:1,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",0]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],0,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 45%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"airport-gates",type:"symbol",source:"flightaware","source-layer":"airport_labels",minzoom:15,filter:["all",["==",["get","type"],"gate"],["has","name"]],layout:{"text-field":["get","name"],"text-font":["Roboto Regular"],"text-size":["interpolate",["exponential",1.2],["zoom"],14,8,16,11],visibility:"visible","icon-image":"gate-classic","icon-text-fit":"both","icon-size":1.2,"icon-text-fit-padding":[2,2,0,2]},paint:{"text-opacity":["interpolate",["linear"],["zoom"],15,0,15.5,1],"text-color":"#ffffff","icon-opacity":["interpolate",["linear"],["zoom"],15,0,15.5,1]}},{id:"airport-terminal-labels",type:"symbol",source:"flightaware","source-layer":"airport_labels",minzoom:13,filter:["==",["get","type"],"terminal"],layout:{"text-field":["coalesce",["get","name:en"],["get","name"]],"text-font":["Roboto Regular"],"text-size":["interpolate",["linear"],["zoom"],13,11,16,14],visibility:"visible"},paint:{"text-color":"hsl(0, 0%, 15%)","text-halo-blur":0,"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1}},{id:"z0",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z1",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z2",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z3",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z4",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z5",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z6",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z7",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z8",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z9",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z10",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0}],glyphs:t.baseLayerOptions?.flightaware_monochrome_light.glyphsURL??"https://skyapi.ovc.flightaware.com/static/fonts/{fontstack}/{range}.pbf",sprite:e??"https://skyapi.ovc.flightaware.com/static/spritesheets/flightaware/sprite"},a=t.baseLayerOptions?.flightaware_monochrome_light}else if("flightaware_monochrome_dark"===e){let e;e=t.baseLayerOptions?.flightaware_monochrome_dark.spriteURL,r={version:8,name:"flightaware_monochrome_dark",sources:{flightaware:{type:"vector",tiles:["https://skyapi.ovc.flightaware.com/tiles/vector/flightaware/{z}/{x}/{y}.mvt"],maxzoom:14},placeholder_source:{type:"raster",tiles:[""]}},layers:[{id:"background",type:"background",paint:{"background-color":"#1f1f1f"}}
262,{id:"ocean",type:"fill",source:"flightaware","source-layer":"ocean",layout:{visibility:"visible"},paint:{"fill-color":"#000000","fill-antialias":!0}},{id:"urban-areas",type:"fill",source:"flightaware","source-layer":"ne_10m_urban_areas",maxzoom:11,layout:{visibility:"visible"},paint:{"fill-color":"hsla(0, 0%, 31%, 0.7)","fill-opacity":["interpolate",["exponential",1.4],["zoom"],1,0,2,.25,3,.5,8,.5,10,0]}},{id:"waterways",type:"line",source:"flightaware","source-layer":"waterways",minzoom:2,filter:["any",["==","waterway","river"],["!has","waterway"]],paint:{"line-color":"#000000","line-width":["interpolate",["linear"],["zoom"],2,.1,5,.1,9,.6,12,1,15,4]}},{id:"lakes",type:"fill",source:"flightaware","source-layer":"lakes",paint:{"fill-color":"#000000"}},{id:"admin-boundaries4",type:"line",source:"flightaware","source-layer":"admin_boundaries",filter:["all",["==",["get","admin_level"],"4"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#343f50","line-width":["interpolate",["exponential",1.4],["zoom"],2,.2,5,.75,8,1],"line-opacity":1,"line-dasharray":[1,1]}},{id:"admin-boundaries2",type:"line",source:"flightaware","source-layer":"admin_boundaries",filter:["all",["==",["get","admin_level"],"2"],["!=",["get","disputed"],1]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#343f50","line-width":["interpolate",["exponential",1.4],["zoom"],0,.2,3,.75,12,3],"line-opacity":1}},{id:"admin-boundaries2-disputed",type:"line",source:"flightaware","source-layer":"admin_boundaries",filter:["all",["==",["get","admin_level"],"2"],["==",["get","disputed"],1]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#343f50","line-width":["interpolate",["exponential",1.4],["zoom"],0,.2,3,.75,12,3],"line-opacity":1,"line-dasharray":[3,3]}},{id:"aerodrome",type:"fill",source:"flightaware","source-layer":"aerodrome-tier1",layout:{visibility:"visible"},paint:{"fill-color":"hsl(0, 0%, 6%)","fill-opacity":["interpolate",["linear"],["zoom"],7,0,8,1]}},{type:"fill",source:"flightaware","source-layer":"osm_buildings",layout:{visibility:"visible"},id:"parking-surface",filter:["all",["==","parking","surface"]],paint:{"fill-antialias":!0,"fill-color":"#4f4f4f","fill-opacity":.2}},{id:"ne-roads-4",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:4,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],4,0,5,.5]},filter:["all",["<=","min_zoom",4]]},{id:"ne-roads-5",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:5,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],5,0,6,.5]},filter:["all",["<=","min_zoom",5],[">","min_zoom",4]]},{id:"ne-roads-6",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:6,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.5]},filter:["all",["<=","min_zoom",6],[">","min_zoom",5]]},{id:"ne-roads-7",type:"line",source:"flightaware","source-layer":"ne_10m_roads",minzoom:7,maxzoom:8,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],7,0,8,.5]},filter:["all",[">","min_zoom",6]]},{id:"tunnel_unclassified_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","unclassified"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_residential_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","residential"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_service_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","
262service"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_tertiary_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_secondary_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"tunnel_primary_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.1875,15,3,18,6]}},{id:"tunnel_trunk_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.18181818181818182,12,.25,15,4,18,8]}},{id:"tunnel_motorway_link_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.18181818181818182,11,.25,15,4,18,8]}},{id:"tunnel_tertiary_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.18181818181818182,13,.25,15,4,18,8]}},{id:"tunnel_secondary_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.2727272727272727,12,.375,15,6,18,12]}},{id:"tunnel_primary_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.3181818181818182,10,.4375,15,7,18,14]}},{id:"tunnel_trunk_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.36363636363636365,8,.5,15,8,18,16]}},{id:"tunnel_motorway_background",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.4090909090909091,8,.5625,15,9,18,18]}},{id:"tunnel_unclassified_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","unclassified"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_residential_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","residential"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_service_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","
262service"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_tertiary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary_link"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_secondary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary_link"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,0,13,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_primary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary_link"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,0,12,.125,15,2,18,4],"line-dasharray":[.75,.25]}},{id:"tunnel_trunk_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk_link"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.045454545454545456,12,.1875,15,3,18,6],"line-dasharray":[.75,.25]}},{id:"tunnel_motorway_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway_link"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.045454545454545456,11,.1875,15,3,18,6],"line-dasharray":[.75,.25]}},{id:"tunnel_tertiary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.045454545454545456,13,.1875,15,3,18,6],"line-dasharray":[.75,.25]}},{id:"tunnel_secondary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.3125,15,5,18,10],"line-dasharray":[.75,.25]}},{id:"tunnel_primary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.18181818181818182,10,.375,15,6,18,12],"line-dasharray":[.75,.25]}},{id:"tunnel_trunk_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.22727272727272727,8,.4375,15,7,18,14],"line-dasharray":[.75,.25]}},{id:"tunnel_motorway_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway"]],paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.2727272727272727,8,.5,15,8,18,16],"line-dasharray":[.75,.25]}},{id:"tunnel_tertiary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tert
262iary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_secondary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_primary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,-.13636363636363635,12,.0625,15,1,18,2]}},{id:"tunnel_trunk_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,-.09090909090909088,12,.125,15,2,18,4]}},{id:"tunnel_motorway_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,-.09090909090909088,11,.125,15,2,18,4]}},{id:"tunnel_unclassified",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","unclassified"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_service",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","service"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_residential",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","residential"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.13636363636363635,13,.0625,15,1,18,2]}},{id:"tunnel_tertiary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","tertiary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,-.09090909090909088,13,.125,15,2,18,4]}},{id:"tunnel_secondary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","secondary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,0,12,.25,15,4,18,8]}},{id:"tunnel_primary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","primary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.04545454545454547,10,.3125,15,5,18,10]}},{id:"tunnel_trunk",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","trunk"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.09090909090909094,8,.375,15,6,18,12]}},{id:"tunnel_motorway",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","bridge"],["has","tunnel"],["==","highway","motorway"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 16%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.1363636363636364,8,.4375,15,7,18,14]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_parking_aisle",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","
262service"],["==","service","parking_aisle"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.045454545454545456,14,.0625,15,1,18,2]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_unclassified",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","unclassified"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.13636363636363635,14,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_residential",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","residential"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.13636363636363635,14,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_service",minzoom:12,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","service"],["!=","service","parking_aisle"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],12,0,13,.13636363636363635,14,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_tertiary_link",minzoom:11,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","tertiary_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_secondary_link",minzoom:11,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","secondary_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_primary_link",minzoom:10,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","primary_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.1875,15,3,18,6]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_trunk_link",minzoom:10,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.18181818181818182,12,.25,15,4,18,8]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_motorway_link",minzoom:9,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","motorway_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.18181818181818182,11,.25,15,4,18,8]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_tertiary",minzoom:11,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.18181818181818182,13,.25,15,4,18,8]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_secondary",minzoom:10,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","
262secondary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.2727272727272727,12,.375,15,6,18,12]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_primary",minzoom:8,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","primary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.3181818181818182,10,.4375,15,7,18,14]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_trunk",minzoom:6,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","trunk"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.36363636363636365,8,.5,15,8,18,16]}},{type:"line",source:"flightaware","source-layer":"highways",id:"road_motorway",minzoom:6,filter:["all",["!has","bridge"],["!has","tunnel"],["==","highway","motorway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.4090909090909091,8,.5625,15,9,18,18]}},{id:"bridge_unclassified_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","unclassified"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_residential_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","residential"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_service_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","service"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_tertiary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tertiary_link"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_secondary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary_link"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5,13,.4375,15,5,18,10]}},{id:"bridge_primary_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary_link"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.5,12,.4375,15,5,18,10]}},{id:"bridge_trunk_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk_link"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.5454545454545454,12,.5,15,6,18,12]}},{id:"bridge_motorway_link_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway_link"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.5454545454545454,11,.5,15,6,18,12]}},{id:"bridge_unclassified",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","unclassified"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_service",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","
262service"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_residential",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","residential"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_tertiary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tertiary"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.5454545454545454,13,.5,15,6,18,12]}},{id:"bridge_secondary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.6363636363636364,12,.625,15,8,18,16]}},{id:"bridge_primary_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.6818181818181818,10,.6875,15,9,18,18]}},{id:"bridge_trunk_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.7272727272727273,8,.75,15,10,18,20]}},{id:"bridge_motorway_casing",type:"line",source:"flightaware",layout:{"line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway"]],paint:{"line-color":"#1f1f1f","line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.7727272727272727,8,.8125,15,11,18,22]}},{id:"bridge_tertiary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tertiary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_secondary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.13636363636363635,13,.1875,15,3,18,6]}},{id:"bridge_primary_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.13636363636363635,12,.1875,15,3,18,6]}},{id:"bridge_trunk_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.18181818181818182,12,.25,15,4,18,8]}},{id:"bridge_motorway_link",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:9,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway_link"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],9,0,10,.18181818181818182,11,.25,15,4,18,8]}},{id:"bridge_tertiary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:11,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","tert
262iary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],11,0,12,.18181818181818182,13,.25,15,4,18,8]}},{id:"bridge_secondary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:10,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","secondary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],10,0,11,.2727272727272727,12,.375,15,6,18,12]}},{id:"bridge_primary",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:8,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","primary"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],8,0,9,.3181818181818182,10,.4375,15,7,18,14]}},{id:"bridge_trunk",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","trunk"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.36363636363636365,8,.5,15,8,18,16]}},{id:"bridge_motorway",type:"line",source:"flightaware",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},"source-layer":"highways",minzoom:6,filter:["all",["!has","tunnel"],["has","bridge"],["==","highway","motorway"]],paint:{"line-color":["interpolate",["linear"],["zoom"],6,"#4f4f4f",10,"hsl(0, 0%, 20%)"],"line-width":["interpolate",["exponential",1.2],["zoom"],6,0,7,.4090909090909091,8,.5625,15,9,18,18]}},{id:"road_labels_tertiary",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],14,10,18,14]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1},minzoom:14,filter:["==","highway","tertiary"]},{id:"road_labels_secondary",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],13,10,17,14]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1},minzoom:13,filter:["==","highway","secondary"]},{id:"road_labels_primary",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],12,10,16,14]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1},minzoom:12,filter:["==","highway","primary"]},{id:"road_labels_trunk",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],12,10,16,14]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1},minzoom:12,filter:["==","highway","trunk"]},{id:"road_labels_motorway",type:"symbol",source:"flightaware","source-layer":"highways",layout:{"text-field":["case",["all",["has","ref"],["has","name"]],["concat",["get","name"],["literal"," ("],["get","ref"],["literal",")"]],["coalesce",["get","name"],["get","ref"]]],"text-font":["Roboto Regular"],"symbol-placement":"line","text-size":["interpolate",["exponential",1.2],["zoom"],11,11,15,15]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1},minzoom:11,filter:["==","highway","motorway"]},{id:"apron-outline",type:"line",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"apron"],["all",["==",["get","aeroway"],"runway"],["==",["geometry-type"],"Polygon"]],["all",["==",["get","aeroway"],"taxiway"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"line-color":"hsl(0, 0%, 1%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.3,11,1.5,14,3,20,5],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}}
262,{id:"apron",type:"fill",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"apron"],["all",["==",["get","aeroway"],"runway"],["==",["geometry-type"],"Polygon"]],["all",["==",["get","aeroway"],"taxiway"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"#4f4f4f"}},{type:"fill",source:"flightaware","source-layer":"osm_buildings",filter:["all",["!=","parking","surface"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsl(216, 16%, 20%)","fill-opacity":.5,"fill-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]},id:"buildings-shadow",minzoom:13},{type:"fill",source:"flightaware","source-layer":"osm_buildings",filter:["all",["!=","parking","surface"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"hsl(216, 16%, 20%)"},id:"buildings"},{id:"aeroway_taxiway_outline",type:"line",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"taxiway"],minzoom:8,layout:{"line-cap":"square","line-join":"miter",visibility:"visible"},paint:{"line-color":"hsl(0, 0%, 1%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.3,11,1.5,14,7,20,28],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"aeroway_runway_outline",type:"line",source:"flightaware","source-layer":"airport",filter:["all",["==",["get","aeroway"],"runway"],["!=",["geometry-type"],"Polygon"]],minzoom:7,layout:{"line-cap":"square",visibility:"visible"},paint:{"line-color":"hsl(0, 0%, 1%)","line-width":["interpolate",["exponential",1.2],["zoom"],8,.75,10,4.5,11,6,14,["case",["has","width"],["+",["*",.07,["to-number",["get","width"]]],4],9],16,["case",["has","width"],["+",["/",["to-number",["get","width"]],3.28],6],31],20,["case",["has","width"],["+",["*",1.22,["to-number",["get","width"]]],8],99]],"line-opacity":["interpolate",["linear"],["zoom"],7,0,8,1]}},{id:"aeroway_taxiway",type:"line",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"taxiway"],minzoom:8,layout:{"line-cap":"square","line-join":"miter",visibility:"visible"},paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],8,.25,11,.75,14,4,20,24],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"runways-polygon",type:"fill",source:"flightaware","source-layer":"airport",filter:["all",["==","$type","Polygon"],["==","aeroway","runway"]],minzoom:7,layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"#4f4f4f"}},{id:"aeroway_runway",type:"line",source:"flightaware","source-layer":"airport",filter:["all",["==",["get","aeroway"],"runway"],["!=",["geometry-type"],"Polygon"]],minzoom:7,layout:{"line-cap":"square",visibility:"visible"},paint:{"line-color":"#4f4f4f","line-width":["interpolate",["exponential",1.2],["zoom"],8,.5,10,2,11,4,14,["case",["has","width"],["*",.07,["to-number",["get","width"]]],5],16,["case",["has","width"],["/",["to-number",["get","width"]],3.28],23],20,["case",["has","width"],["*",1.22,["to-number",["get","width"]]],91]],"line-opacity":["interpolate",["linear"],["zoom"],7,0,8,1]}},{type:"symbol",source:"flightaware","source-layer":"osm_buildings",layout:{"text-font":["Roboto Medium"],"text-field":"P","text-size":["interpolate",["linear"],["zoom"],15,11,17,14],"symbol-spacing":250,"icon-padding":2,"text-padding":20},id:"parking-symbol",minzoom:15,filter:["all",["has","parking"]],paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-opacity":.5}},{id:"airport-terminals-shadow",type:"fill",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"terminal"],["all",["==",["get","aeroway"],"jet_bridge"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"fill-color":"#343f50","fill-opacity":.5,"fill-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]},minzoom:13},{id:"airport-terminals",type:"fill",source:"flightaware","source-layer":"airport",filter:["any",["==",["get","aeroway"],"terminal"],["all",["==",["get","aeroway"],"jet_bridge"],["==",["geometry-type"],"Polygon"]]],layout:{visibility:"visible"},paint:{"fill-color":"#343f50"}}
262,{id:"jetbridges-polygon-shadow",type:"fill",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==","aeroway","jet_bridge"],["==","$type","Polygon"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"#343f50","fill-opacity":.5,"fill-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]}},{id:"jetbridges-shadow",type:"line",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==",["get","aeroway"],"jet_bridge"],["!=",["geometry-type"],"Polygon"]],layout:{visibility:"visible","line-cap":"butt"},paint:{"line-color":"#343f50","line-opacity":.5,"line-width":["interpolate",["linear"],["zoom"],15,2,19,16],"line-translate":["interpolate",["linear"],["zoom"],13,["literal",[.5,.5]],15,["literal",[2,2]]]}},{id:"jetbridges-polygon",type:"fill",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==","aeroway","jet_bridge"],["==","$type","Polygon"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"#343f50"}},{id:"airport-jetbridge",type:"line",source:"flightaware","source-layer":"airport",minzoom:14,filter:["all",["==",["get","aeroway"],"jet_bridge"],["!=",["geometry-type"],"Polygon"]],layout:{visibility:"visible","line-cap":"butt"},paint:{"line-color":"#343f50","line-width":["interpolate",["linear"],["zoom"],15,2,19,16]}},{type:"fill",source:"flightaware","source-layer":"railways",id:"railways-platform",minzoom:10,filter:["any",["==","railway","station"],["==","railway","platform"]],paint:{"fill-color":"hsl(216, 23%, 41%)"}},{type:"line",source:"flightaware","source-layer":"railways",id:"railways-bridge-casing",layout:{"line-cap":"round","line-join":"round",visibility:"visible"},minzoom:12,filter:["all",["has","bridge"]],paint:{"line-color":"hsl(216, 23%, 16%)","line-width":["interpolate",["linear"],["zoom"],11,.5,15,2.5,17,10,20,20]}},{type:"line",source:"flightaware","source-layer":"railways",id:"railways",minzoom:10,filter:["all",["any",["!has","tunnel"],["has","bridge"]],["!=","railway","platform"],["!=","railway","station"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsl(216, 23%, 41%)","line-width":["interpolate",["linear"],["zoom"],10,.5,15,1.5,17,3,20,6]}},{type:"line",source:"flightaware","source-layer":"railways",id:"railways-tunnel",minzoom:10,layout:{"line-cap":"round","line-join":"round",visibility:"visible"},filter:["all",["!has","bridge"],["has","tunnel"]],paint:{"line-color":"hsl(216, 23%, 41%)","line-width":["interpolate",["linear"],["zoom"],10,.5,15,1.5,17,3,20,6],"line-dasharray":[1,2]}},{id:"taxiway_label",type:"symbol",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"taxiway"],minzoom:13,maxzoom:24,layout:{"text-font":["Roboto Medium Italic"],"text-size":["interpolate",["exponential",1],["zoom"],13,7,20,18],"text-field":"{ref}",visibility:"visible","text-anchor":"center","symbol-placement":"line"},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":["interpolate",["linear"],["zoom"],11,.1,15,.5]}},{id:"runway_label",type:"symbol",source:"flightaware","source-layer":"airport",filter:["==",["get","aeroway"],"runway"],minzoom:11,maxzoom:24,layout:{"text-font":["Roboto Bold Italic"],"text-size":["interpolate",["exponential",1.2],["zoom"],12,8,18,28],"text-field":"{ref}",visibility:"visible","icon-anchor":"center","text-anchor":"center","symbol-placement":"line"},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":["interpolate",["linear"],["zoom"],11,.1,15,.5]}},{id:"airport-code-0",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:10,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],[">=","rank",0],["<","rank",2]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],11,8,12,9],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"airport-code-2",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:10,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",2],["<","rank",5]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]
262],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],10,9,11,11],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"populated-places-7-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:9,maxzoom:24,filter:["all",["==","$type","Point"],["in","rank_scale",7,8]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 44%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"populated-places-6-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:8,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",6]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],6,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 44%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"populated-places-5-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:7,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",5]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],5,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 44%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"airport-code-5",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:9,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",5],["<","rank",30]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],9,9,11,12],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"admin-label-state",type:"symbol",source:"flightaware","source-layer":"admin_labels",filter:["all",["==",["get","type"],"state"],["any",["<",["get","min_zoom"],4],[">=",["zoom"],["to-number",["get","min_zoom"]]],[">=",["zoom"],6]]],layout:{"text-field":"{name}","text-font":["Roboto Regular"],"text-size":["interpolate",["exponential",1],["zoom"],3,8,6,13],"text-transform":"uppercase","text-letter-spacing":["interpolate",["linear"],["zoom"],4,0,8,.25]},paint:{"text-color":"hsla(0, 0%, 78%, 0.9)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1,"text-opacity":1}},{id:"populated-places-4-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:6,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",4]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],4,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 44%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"populated-places-3-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:5,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",3]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],3,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 44%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"airport_name_minor",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:11,filter:["all",["has","name"],["==","rank",-1]],layout:{"text-field":["case",["has","iata"],["concat",["get","name"],["literal"," ("],["get","iata"],["literal",")"]],["has","icao"],["concat",["get","name"],["literal"," ("],["get","icao"],["literal",")"]],["has","lid"],["concat",["get","name"],["literal"," ("],["get","lid"],["literal",")"]],["get","name"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],12,9,14,11,16,14],"symbol-placement":"point","symbol-z-order":"auto","symbol-spacing":250,"symbol-avoid-edges":!1,visibility:"visible","text-max-width":["interpolate",["linear"],["zoom"],14,15,16,50],"text-letter-spacing":["interpolate",["linear"],["zoom"],14,0,15,.1,16,.25],"text-variable-anchor":["center","left","bottom-left","right","bottom-right","top-left","top-right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1,"text-opacity":["interpolate",["linear"],["zoom"],14,1,16,.75]}},{id:"airport_name_zero",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:11,filter:["all",["has","name"],["==","rank",0]],layout:{"text-field":["case",["has","iata"],["concat",["get","name"],["literal"," ("],["get","iata"],["literal",")"]],["has","icao"],["concat",["get","name"],["literal"," ("],["get","icao"],["literal",")"]],["has","lid"],["concat",["get","name"],["literal"," ("],["get","lid"],["literal",")"]],["get","name"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],12,10,14,12,16,16],"symbol-placement":"point","symbol-z-order":"auto","symbol-spacing":250,"symbol-avoid-edges":!1,visibility:"visible","text-max-width":["interpolate",["linear"],["zoom"],14,15,16,50],"text-letter-spacing":["interpolate",["linear"],["zoom"],14,0,15,.1,16,.25],"text-variable-anchor":["center","left","bottom-left","right","bottom-right","top-left","top-right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1,"text-opacity":["interpolate",["linear"],["zoom"],14,1,16,.75]}},{id:"airport-code-30",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:9,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",30],["<","rank",50]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]
262],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],9,9,11,13],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"populated-places-2-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:2,maxzoom:24,filter:["all",["==","rank_scale",2]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],2,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 44%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"airport-code-50",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:9,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",50],["<","rank",75]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],9,10,11,15],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"airport-code-100",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:8,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",75],["<","rank",150]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],8,10,11,16],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"admin-label-country",type:"symbol",source:"flightaware","source-layer":"admin_labels",filter:["all",["==",["get","type"],"country"],[">=",["zoom"],["to-number",["get","min_zoom"]]]],layout:{"text-field":"{name}","text-font":["Roboto Regular"],"text-size":["interpolate",["linear"],["zoom"],3,["max",0,["-",12,["get","min_zoom"]]],6,["max",0,["-",18,["get","min_zoom"]]],9,16],"text-max-width":["interpolate",["linear"],["zoom"],6,10,10,20],"text-transform":"uppercase","text-letter-spacing":.25},paint:{"text-color":"hsla(0, 0%, 78%, 0.9)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1,"text-opacity":1}},{id:"airport-code-low-zoom",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:7,maxzoom:11,filter:["all",["any",["has","iata"],["has","icao"],["has","lid"]],["!has","military"],[">=","rank",150]],layout:{"symbol-sort-key":["-",["get","rank"]],"text-field":["coalesce",["get","iata"],["get","icao"],["get","lid"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],7,10,11,18],"symbol-placement":"point","text-offset":[0,0],"text-line-height":1.2,"text-padding":1,visibility:"visible","text-allow-overlap":!1,"text-ignore-placement":!1,"text-variable-anchor":["center","left","right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"airport_name",type:"symbol",source:"flightaware","source-layer":"airport_nodes",minzoom:11,filter:["all",["has","name"],[">=","rank",1]],layout:{"text-field":["case",["has","iata"],["concat",["get","name"],["literal"," ("],["get","iata"],["literal",")"]],["has","icao"],["concat",["get","name"],["literal"," ("],["get","icao"],["literal",")"]],["has","lid"],["concat",["get","name"],["literal"," ("],["get","lid"],["literal",")"]],["get","name"]],"text-font":["Roboto Medium"],"text-size":["interpolate",["linear"],["zoom"],11,13,14,15,16,17],"symbol-placement":"point","symbol-z-order":"auto","symbol-spacing":250,"symbol-avoid-edges":!1,visibility:"visible","text-max-width":["interpolate",["linear"],["zoom"],14,15,16,50],"text-letter-spacing":["interpolate",["linear"],["zoom"],14,0,15,.1,16,.25],"text-variable-anchor":["center","left","bottom-left","right","bottom-right","top-left","top-right","bottom","top"]},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1,"text-opacity":["interpolate",["linear"],["zoom"],14,1,16,.75]}},{id:"populated-places-1-layer",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:1,maxzoom:24,filter:["all",["==","rank_scale",1]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],1,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 44%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"populated-places-0-label",type:"symbol",source:"flightaware","source-layer":"ne_10m_populated_places",minzoom:1,maxzoom:24,filter:["all",["==","$type","Point"],["==","rank_scale",0]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],0,10,15,18],"text-field":["get","name"],visibility:"visible","text-anchor":"bottom","text-padding":1,"text-letter-spacing":0,"icon-image":["step",["zoom"],"city-dot",8,""],"icon-size":.2,"text-variable-anchor":["step",["zoom"],["literal",["bottom-left","top-left","bottom-right","top-right","bottom"]],8,["literal",["center"]]],"icon-padding":4,"text-offset":[0,0],"text-radial-offset":.2,"text-ignore-placement":!1},paint:{"text-color":"hsl(0, 0%, 44%)","icon-opacity":1,"text-opacity":1,"text-translate":[0,0],"text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"airport-gates",type:"symbol",source:"flightaware","source-layer":"airport_labels",minzoom:15,filter:["all",["==",["get","type"],"gate"],["has","name"]],layout:{"text-field":["get","name"],"text-font":["Roboto Regular"],"text-size":["interpolate",["exponential",1.2],["zoom"],14,8,16,11],visibility:"visible","icon-image":"gate-classic","icon-text-fit":"both","icon-size":1.2,"icon-text-fit-padding":[2,2,0,2]},paint:{"text-opacity":["interpolate",["linear"],["zoom"],15,0,15.5,1],"text-color":"#ffffff","icon-opacity":["interpolate",["linear"],["zoom"],15,0,15.5,1]}},{id:"airport-terminal-labels",type:"symbol",source:"flightaware","source-layer":"airport_labels",minzoom:13,filter:["==",["get","type"],"terminal"],layout:{"text-field":["coalesce",["get","name:en"],["get","name"]],"text-font":["Roboto Regular"],"text-size":["interpolate",["linear"],["zoom"],13,11,16,14],visibility:"visible"},paint:{"text-color":"hsl(0, 0%, 78%)","text-halo-blur":0,"text-halo-color":"hsl(0, 0%, 0%)","text-halo-width":1}},{id:"z0",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z1",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z2",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z3",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z4",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z5",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z6",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z7",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z8",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z9",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z10",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0}],glyphs:t.baseLayerOptions?.flightaware_monochrome_dark.glyphsURL??"https://skyapi.ovc.flightaware.com/static/fonts/{fontstack}/{range}.pbf",sprite:e??"https://skyapi.ovc.flightaware.com/static/spritesheets/flightaware/sprite"},a=t.baseLayerOptions?.flightaware_monochrome_dark}else if("premium_satellite"===e)t.baseLayerOptions?.premium_satellite.spriteURL,t.baseLayerOptions?.premium_satellite.glyphsURL,r={version:8,name:"premium_satellite",sources:{imagery:{type:"raster",tiles:["https://tiles.stadiamaps.com/data/imagery/{z}/{x}/{y}.jpg"],attribution:'&copy; <a href="https://stadiamaps.com/" target="_blank">Stadia Maps</a>, &copy; CNES, Distribution Airbus DS, &copy; Airbus DS, &copy; PlanetObserver (Contains Copernicus Data)',maxzoom:18,minzoom:0,scheme:"xyz",tileSize:512},placeholder_source:{type:"raster",tiles:[""]}},layers:[{id:"imagery",type:"raster",source:"imagery"},{id:"z0",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z1",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z2",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z3",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z4",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z5",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z6",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z7",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z8",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z9",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z10",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0}]},a=t.baseLayerOptions?.premium_satellite;else if("premium_terrain"===e){let e;e=t.baseLayerOptions?.premium_terrain.spriteURL,r={version:8,name:"premium_terrain",sources:{terrarium:{type:"raster-dem",encoding:"terrarium",minzoom:0,maxzoom:12,tileSize:256,tiles:["https://tiles.stadiamaps.com/data/terrarium/{z}/{x}/{y}.png"]},global_landcover_v1:{type:"vector",scheme:"xyz",minzoom:0,maxzoom:6,tiles:["https://tiles.stadiamaps.com/data/global_landcover_v1/{z}/{x}/{y}.pbf"]},"stamen-omt":{type:"vector",scheme:"xyz",minzoom:0,maxzoom:12,tiles:["https://tiles.stadiamaps.com/data/stamen-omt/{z}/{x}/{y}.pbf"]},placeholder_source:{type:"raster",tiles:[""]}},layers:[{id:"land",type:"background",layout:{},paint:{"background-color":["interpolate",["linear"],["zoom"],11,"hsl(0,0%,91%)",12,"hsl(65,36%,81%)"]}}
262,{id:"landcover-low",type:"fill",source:"global_landcover_v1","source-layer":"global_landcover",maxzoom:12,filter:["all",["step",["zoom"],!0,12,["match",["get","class"],["urban"],!0,!1]]],layout:{},paint:{"fill-antialias":!1,"fill-color":["interpolate",["linear"],["zoom"],0,["match",["get","class"],"ice","hsl(240,4%,95%)",["wood","wetland"],"hsl(113,38%,30%)",["farmland","grass","lichen"],"hsl(62,56%,80%)",["bare"],"hsl(55,62%,88%)","hsl(68,34%,85%)"],4,["match",["get","class"],"wetland","hsl(151,32%,76%)",["farmland","grass","lichen"],"hsl(60,52%,72%)","bare","hsl(55,62%,88%)","urban","hsl(0,0%,91%)","ice","hsl(240,4%,95%)","wood","hsl(113,38%,35%)","hsl(68,34%,85%)"],7,["match",["get","class"],"wetland","hsl(151,32%,76%)","ice","hsl(240,4%,95%)",["grass","lichen"],"hsl(65,52%,76%)","farmland","hsl(62,56%,80%)","bare","hsl(55,62%,88%)","wood","hsl(93,48%,30%)","urban","hsl(0,0%,91%)","hsl(68,34%,85%)"],10,["match",["get","class"],"wetland","hsl(151,32%,76%)","ice","hsl(240,4%,95%)",["grass","lichen"],"hsl(65,52%,76%)","farmland","hsl(62,56%,80%)","bare","hsl(55,62%,88%)","wood","hsl(83,38%,58%)","urban","hsl(0,0%,91%)","hsl(68,34%,85%)"]],"fill-opacity":["interpolate",["linear"],["zoom"],0,.7,11.99,["match",["get","class"],["urban"],1,.5],12,["match",["get","class"],["urban"],1,0]]}},{id:"landcover-low_outer_glow_2x",type:"line",source:"global_landcover_v1","source-layer":"global_landcover",maxzoom:12,filter:["all",["step",["zoom"],!0,12,["match",["get","class"],["urban"],!0,!1]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-blur":["interpolate",["linear"],["zoom"],0,10,9,20,10,30],"line-color":["interpolate",["linear"],["zoom"],0,["match",["get","class"],"ice","hsl(240,4%,95%)",["wood","wetland"],"hsl(113,24%,40%)",["farmland","grass","lichen"],"hsl(62,56%,80%)","bare","hsl(55,62%,88%)","hsl(68,34%,85%)"],3,["match",["get","class"],"wetland","hsl(151,32%,76%)",["farmland","grass","lichen"],"hsl(60,52%,82%)","bare","hsl(55,62%,88%)","urban","hsl(0,0%,91%)","ice","hsl(240,4%,95%)","wood","hsl(83,28%,58%)","hsl(68,34%,85%)"],7,["match",["get","class"],"wetland","hsl(151,32%,76%)","ice","hsl(240,4%,95%)",["grass","lichen"],"hsl(65,52%,76%)","farmland","hsl(62,56%,80%)","bare","hsl(55,62%,88%)","wood","hsl(93,28%,50%)","urban","hsl(0,0%,91%)","hsl(68,34%,85%)"],10,["match",["get","class"],"wetland","hsl(151,32%,76%)","ice","hsl(240,4%,95%)",["grass","lichen"],"hsl(65,52%,76%)","farmland","hsl(62,56%,80%)","bare","hsl(55,62%,88%)","wood","hsl(113,24%,40%)","urban","hsl(0,0%,91%)","hsl(68,34%,85%)"]],"line-opacity":["interpolate",["linear"],["zoom"],0,.3,10,.45,12,["match",["get","class"],["urban"],1,.3]],"line-width":["interpolate",["linear"],["zoom"],0,10,9,20,10,30]}},{id:"landcover-low_outer_glow",type:"line",source:"global_landcover_v1","source-layer":"global_landcover",maxzoom:12,filter:["all",["step",["zoom"],!0,12,["match",["get","class"],["urban"],!0,!1]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-blur":["interpolate",["linear"],["zoom"],0,5,9,10,10,20],"line-color":["interpolate",["linear"],["zoom"],0,["match",["get","class"],"ice","hsl(240,4%,95%)",["wood","wetland"],"hsl(105,28%,45%)",["farmland","grass","lichen"],"hsl(62,56%,80%)","bare","hsl(55,62%,88%)","hsl(68,34%,85%)"],3,["match",["get","class"],"wetland","hsl(151,32%,76%)",["farmland","grass","lichen"],"hsl(60,52%,82%)","bare","hsl(55,62%,88%)","urban","hsl(0,0%,91%)","ice","hsl(240,4%,95%)","wood","hsl(83,28%,58%)","hsl(68,34%,85%)"],7,["match",["get","class"],"wetland","hsl(151,32%,76%)","ice","hsl(240,4%,95%)",["grass","lichen"],"hsl(65,52%,76%)","farmland","hsl(62,56%,80%)","bare","hsl(55,62%,88%)","wood","hsl(93,28%,50%)","urban","hsl(0,0%,91%)","hsl(68,34%,85%)"],10,["match",["get","class"],"wetland","hsl(151,32%,76%)","ice","hsl(240,4%,95%)",["grass","lichen"],"hsl(65,52%,76%)","farmland","hsl(62,56%,80%)","bare","hsl(55,62%,88%)","wood","hsl(113,24%,40%)","urban","hsl(0,0%,91%)","hsl(68,34%,85%)"]],"line-opacity":["interpolate",["linear"],["zoom"],0,.2,10,.45,12,["match",["get","class"],["urban"],1,.3]],"line-width":["interpolate",["linear"],["zoom"],0,5,9,10,10,20]}}
262,{id:"nature-reserve",type:"fill",source:"stamen-omt","source-layer":"park",minzoom:9,filter:["match",["get","class"],["nature_reserve","protected_area","national_park"],!0,!1],layout:{},paint:{"fill-antialias":!1,"fill-color":"hsl(85,28%,70%)"}},{id:"landcover",type:"fill",source:"stamen-omt","source-layer":"landcover",minzoom:7,layout:{},paint:{"fill-antialias":!1,"fill-color":["match",["get","class"],"wood","hsl(93,24%,50%)","grass","hsl(65,52%,76%)","farmland","hsl(62,56%,80%)",["rock","sand"],"hsl(55,62%,88%)","wetland","hsl(151,32%,76%)","ice","hsl(240,4%,95%)","hsl(68,34%,85%)"],"fill-opacity":["interpolate",["linear"],["zoom"],7,.6,12,.8]}},{id:"landcover_outer_glow",type:"line",source:"stamen-omt","source-layer":"landcover",minzoom:7,layout:{"line-cap":"round","line-join":"round"},paint:{"line-blur":["interpolate",["linear"],["zoom"],7,5,9,8,10,12],"line-color":["match",["get","class"],"wood","hsl(93,24%,50%)","grass","hsl(65,52%,76%)","farmland","hsl(62,56%,80%)",["rock","sand"],"hsl(55,62%,88%)","wetland","hsl(151,32%,76%)","ice","hsl(240,4%,95%)","hsl(68,34%,85%)"],"line-opacity":["interpolate",["exponential",1.5],["zoom"],12,.8,22,0],"line-width":["interpolate",["linear"],["zoom"],7,5,9,8,10,12]}},{id:"landcover_outer_glow_2x",type:"line",source:"stamen-omt","source-layer":"landcover",minzoom:7,layout:{"line-cap":"round","line-join":"round"},paint:{"line-blur":["interpolate",["linear"],["zoom"],7,5,9,10,10,15],"line-color":["match",["get","class"],"wood","hsl(93,24%,50%)","grass","hsl(65,52%,76%)","farmland","hsl(62,56%,80%)",["rock","sand"],"hsl(55,62%,88%)","wetland","hsl(151,32%,76%)","ice","hsl(240,4%,95%)","hsl(68,34%,85%)"],"line-opacity":["interpolate",["exponential",1.5],["zoom"],12,.8,22,0],"line-width":["interpolate",["linear"],["zoom"],7,5,9,10,10,15]}},{id:"landuse",type:"fill",source:"stamen-omt","source-layer":"landuse",minzoom:5,filter:["all",[">=",["to-number",["get","sizerank"]],0],["match",["get","class"],["agriculture","wood","grass","scrub","glacier","sand"],["step",["zoom"],!1,11,!0],"residential",["step",["zoom"],!0,10,!1],["park","airport"],["step",["zoom"],!1,8,["case",["==",["get","sizerank"],1],!0,!1],10,!0],["facility","industrial","railway","garages","bus_station","dam","quarry"],["step",["zoom"],!1,12,!0],"rock",["step",["zoom"],!1,11,!0],"cemetery",["step",["zoom"],!1,11,!0],"commercial_area",["step",["zoom"],!1,11,!0],!1],["<=",["-",["to-number",["get","sizerank"]],["interpolate",["exponential",1.5],["zoom"],12,0,18,14]],14]],layout:{},paint:{"fill-antialias":!1,"fill-color":["interpolate",["linear"],["zoom"],15,["case",["==",["get","class"],"wood"],"hsla(93,11%,69%,0.8)",["==",["get","class"],"scrub"],"hsla(90,8%,76%,0.6)",["==",["get","class"],"agriculture"],"hsla(62,37%,82%,0.6)",["match",["get","class"],["park","cemetery"],!0,!1],"hsl(68,39%,76%)",["==",["get","class"],"glacier"],"hsl(240,4%,95%)",["==",["get","class"],"sand"],"hsl(50,57%,85%)",["==",["get","class"],"rock"],"hsl(0,0%,95%)",["==",["get","class"],"commercial_area"],"hsl(60,2%,82%)",["==",["get","class"],"residential"],"hsl(0,0%,93%)",["match",["get","class"],["facility","industrial","railway","garages","bus_station","dam","quarry"],!0,!1],"hsl(0,0%,83%)","hsl(60,2%,80%)"],16,["match",["get","class"],"wood","hsla(93,11%,69%,0.8)","scrub","hsla(90,8%,76%,0.6)","agriculture","hsla(90,11%,82%,0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(88,10%,70%)","hsl(90,17%,72%)"],"grass","hsla(90,11%,82%,0.6)","cemetery","hsl(88,13%,77%)","glacier","hsl(240,4%,95%)","sand","hsl(50,57%,85%)","rock","hsla(0,0%,95%,0.5)","commercial_area","hsla(60,2%,82%,0.5)",["facility","industrial","railway","garages","bus_station","dam","quarry"],"hsl(0,0%,83%)","hsl(60,2%,80%)"]],"fill-opacity":["interpolate",["linear"],["zoom"],8,["match",["get","class"],"residential",.8,.2],10,["match",["get","class"],"residential",0,1]]}},{id:"aerodrome",type:"fill",source:"stamen-omt","source-layer":"aeroway",minzoom:7,filter:["all",["match",["get","class"],["aerodrome"],!0,!1],["==",["geometry-type"],"Polygon"]],layout:{},paint:{"fill-antialias":!1,"fill-color":"hsl(0,0%,83%)"}}
262,{id:"landuse-urban",type:"fill",source:"stamen-omt","source-layer":"landuse",minzoom:7,filter:["match",["get","class"],["residential","suburb","quarter","neighbourhood","commercial","retail","school","university","kindergarten","college","library","hospital","stadium","theme_park","zoo"],!0,!1],layout:{},paint:{"fill-antialias":!1,"fill-color":"hsl(0,0%,91%)"}},{id:"landuse-urban-outline",type:"line",source:"stamen-omt","source-layer":"landuse",minzoom:7,filter:["match",["get","class"],["residential","suburb","quarter","neighbourhood","commercial","retail","school","university","kindergarten","college","library","hospital","stadium","theme_park","zoo"],!0,!1],layout:{},paint:{"line-blur":["interpolate",["exponential",1.5],["zoom"],7,1,12,6,18,10],"line-color":"hsl(0,0%,91%)","line-width":["interpolate",["exponential",1.5],["zoom"],7,1,12,18,18,30]}},{id:"landuse-greenspace",type:"fill",source:"stamen-omt","source-layer":"landcover",minzoom:9,filter:["match",["get","subclass"],["park","golf_course","allotments","garden"],!0,!1],layout:{},paint:{"fill-antialias":!1,"fill-color":"hsl(85,28%,70%)"}},{id:"landuse-greenspace-outline",type:"line",source:"stamen-omt","source-layer":"landcover",minzoom:9,filter:["match",["get","subclass"],["park","golf_course","allotments","garden"],!0,!1],layout:{},paint:{"line-blur":["interpolate",["exponential",1.5],["zoom"],9,1,18,10],"line-color":"hsl(85,28%,70%)","line-width":["interpolate",["exponential",1.5],["zoom"],9,1,18,30]}},{id:"landuse-pitch",type:"fill",source:"stamen-omt","source-layer":"landuse",minzoom:7,filter:["any",["==",["get","subclass"],"grass"],["match",["get","class"],["playground","pitch"],!0,!1]],layout:{},paint:{"fill-antialias":!1,"fill-color":"hsl(89,21%,76%)"}},{id:"hillshade",type:"hillshade",source:"terrarium",layout:{},paint:{"hillshade-accent-color":"hsla(0,0%,0%,0)","hillshade-exaggeration":.6,"hillshade-highlight-color":"hsla(0,0%,0%,0)","hillshade-illumination-direction":300,"hillshade-shadow-color":"hsl(115,0%,25%)"}},{id:"waterway-shadow",type:"line",source:"stamen-omt","source-layer":"waterway",minzoom:6,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-color":"hsl(229,37%,69%)","line-opacity":["interpolate",["linear"],["zoom"],6,.6,9,1],"line-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"line-translate-anchor":"viewport","line-width":["interpolate",["exponential",1.3],["zoom"],8,.5,9,1,20,3]}},{id:"water-shadow",type:"fill",source:"stamen-omt","source-layer":"water",minzoom:10,layout:{},paint:{"fill-color":"hsl(229,37%,69%)","fill-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"fill-translate-anchor":"viewport"}},{id:"waterway",type:"line",source:"stamen-omt","source-layer":"waterway",minzoom:3,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-color":"hsl(209,33%,70%)","line-width":["interpolate",["exponential",1.3],["zoom"],8,.5,9,1,20,3]}},{id:"waterway_outer_glow",type:"line",source:"stamen-omt","source-layer":"waterway",minzoom:4,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-blur":["interpolate",["linear"],["zoom"],6,5,12,10],"line-color":"hsl(209,33%,70%)","line-opacity":["interpolate",["linear"],["zoom"],6,.2,7,.4],"line-width":["interpolate",["linear"],["zoom"],6,5,12,10]}},{id:"water",type:"fill",source:"stamen-omt","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(209,33%,70%)"}},{id:"wetland",type:"fill",source:"stamen-omt","source-layer":"landuse_overlay",minzoom:5,filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],paint:{"fill-color":"hsl(151,32%,76%)","fill-opacity":["interpolate",["linear"],["zoom"],10,.6,10.5,.75]}},{id:"wetland_outer_glow",type:"line",source:"stamen-omt","source-layer":"landuse_overlay",maxzoom:12,filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],layout:{"line-join":"round"}
262,paint:{"line-blur":["interpolate",["linear"],["zoom"],2,7,22,6],"line-color":"hsl(151,32%,76%)","line-opacity":["interpolate",["exponential",1.5],["zoom"],8,.8,12,0],"line-width":6}},{id:"land-structure-polygon",type:"fill",source:"stamen-omt","source-layer":"transportation",minzoom:13,filter:["all",["==",["get","class"],"pier"],["==",["geometry-type"],"Polygon"]],layout:{},paint:{"fill-color":"hsl(60,2%,91%)"}},{id:"land-structure-line",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:13,filter:["all",["==",["get","class"],"pier"],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"square"},paint:{"line-color":"hsl(60,2%,91%)","line-width":["interpolate",["exponential",1.99],["zoom"],14,.75,20,40]}},{id:"aeroway-polygon",type:"fill",source:"stamen-omt","source-layer":"aeroway",minzoom:7,filter:["all",["match",["get","class"],["runway","taxiway","helipad"],!0,!1],["==",["geometry-type"],"Polygon"]],paint:{"fill-color":"hsl(60,3%,93%)","fill-opacity":["interpolate",["linear"],["zoom"],10,0,11,1]}},{id:"aeroway-line",type:"line",source:"stamen-omt","source-layer":"aeroway",minzoom:9,filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"hsl(60,3%,93%)","line-opacity":["interpolate",["linear"],["zoom"],10,0,11,1],"line-width":["interpolate",["exponential",1.5],["zoom"],9,["match",["get","class"],"runway",1,.5],18,["match",["get","class"],"runway",80,20]]}},{id:"building-underground",type:"fill",source:"stamen-omt","source-layer":"building",minzoom:15,filter:["all",["==",["get","underground"],"true"],["==",["geometry-type"],"Polygon"]],layout:{},paint:{"fill-color":"hsl(0,0%,80%)","fill-opacity":["interpolate",["linear"],["zoom"],15,0,16,.5]}},{id:"tunnel-path",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:14,filter:["all",["==",["get","class"],"path"],["!=",["get","subclass"],"steps"],["!=",["get","subclass"],"pedestrian"],["==",["get","brunnel"],"tunnel"],["==",["geometry-type"],"LineString"]],layout:{},paint:{"line-color":"hsl(0,0%,60%)","line-dasharray":["step",["zoom"],["literal",[3,4]],17,["literal",[2,3]]],"line-width":["interpolate",["exponential",1.5],["zoom"],13,.5,14,.75,15,.75,18,3]}},{id:"tunnel-steps",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:14,filter:["all",["==",["get","brunnel"],"tunnel"],["==",["get","subclass"],"steps"],["==",["geometry-type"],"LineString"]],paint:{"line-color":"hsl(0,0%,76%)","line-dasharray":["step",["zoom"],["literal",[1,0]],15,["literal",[1.75,1]],16,["literal",[1,.75]],17,["literal",[.3,.3]]],"line-width":["interpolate",["exponential",1.5],["zoom"],15,1,16,1.6,18,6]}},{id:"tunnel-pedestrian",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:13,filter:["all",["==",["get","subclass"],"pedestrian"],["==",["get","brunnel"],"tunnel"],["==",["geometry-type"],"LineString"]],paint:{"line-color":"hsl(60,3%,72%)","line-dasharray":["step",["zoom"],["literal",[1,0]],15,["literal",[1.5,.4]],16,["literal",[1,.2]]],"line-width":["interpolate",["exponential",1.5],["zoom"],14,.5,18,12]}},{id:"tunnel-case-simple-ramp",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:12,filter:["all",["==",["get","brunnel"],"tunnel"],["step",["zoom"],["match",["get","class"],["motorway","trunk"],!0,!1],12,["match",["get","class"],["motorway","trunk","primary"],!0,!1],14,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary"],!0,!1]],["==",["get","ramp"],1],["==",["get","brunnel"],"tunnel"],["==",["geometry-type"],"LineString"]],layout:{},paint:{"line-color":"hsl(0,0%,92%)","line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["motorway","trunk","primary"],1,.5],13,["match",["get","class"],["motorway","trunk","primary"],1.5,.5],15,["match",["get","class"],["motorway","trunk","primary"],2,1],18,["match",["get","class"],["motorway","trunk","primary"],18,10],22,["match",["get","class"],["motorway","trunk","primary"],180,100]],"line-width":2}},{id:"tunnel-simple-ramp",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:12,filter:["all",["==",["get","brunnel"],"tunnel"],["step",["zoom"],["match",["get","class"],["motorway","trunk"],!0,!1],12,["match",["get","class"],["motorway","trunk","primary"],!0,!1],14,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary"],!0,!1]],["==",["get","ramp"],1],["==",["get","brunnel"],"tunnel"],["==",["geometry-type"],"LineString"]],paint:{"line-color":"hsl(0,0%,72%)","line-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["motorway","trunk","primary"],1,.5],13,["match",["get","class"],["motorway","trunk","primary"],1.5,.5],15,["match",["get","class"],["motorway","trunk","primary"],2,1],18,["match",["get","class"],["motorway","trunk","primary"],18,10],22,["match",["get","class"],["motorway","trunk","primary"],180,100]]}},{id:"tunnel-case-simple",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:12,filter:["all",["==",["get","brunnel"],"tunnel"],["step",["zoom"],["match",["get","class"],["motorway","trunk"],!0,!1],12,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited","track"],!0,!1],14,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited","service","track"],!0,!1]],["!=",["get","ramp"],1],["==",["get","brunnel"],"tunnel"],["==",["geometry-type"],"LineString"]],layout:{},paint:{"line-color":"hsl(0,0%,92%)","line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["motorway","trunk"],4,["primary","secondary","tertiary"],2.2,["minor","street_limited"],1,.5],13,["match",["get","class"],["motorway","trunk"],4,["primary","secondary","tertiary"],2.5,["minor","street_limited"],1.5,.5],15,["match",["get","class"],["motorway","trunk"],6,["primary","secondary","tertiary"],4,["minor","street_limited"],2,1],18,["match",["get","class"],["motorway","trunk","primary"],32,["secondary","tertiary"],26,["minor","street_limited"],18,10],22,["match",["get","class"],["motorway","trunk","primary"],320,["secondary","tertiary"],260,["minor","street_limited"],180,100]],"line-width":2}},{id:"tunnel-simple",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:12,filter:["all",["==",["get","brunnel"],"tunnel"],["step",["zoom"],["match",["get","class"],["motorway","trunk"],!0,!1],12,["match",["get","class"],["motorway","trunk","primary"],!0,!1],14,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary"],!0,!1]],["!=",["get","ramp"],1],["==",["get","brunnel"],"tunnel"],["==",["geometry-type"],"LineString"]],paint:{"line-color":"hsl(0,0%,72%)","line-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["motorway","trunk"],4,["primary","secondary","tertiary"],2.2,["minor","street_limited"],1,.5],13,["match",["get","class"],["motorway","trunk"],4,["primary","secondary","tertiary"],2.5,["minor","street_limited"],1.5,.5],15,["match",["get","class"],["motorway","trunk"],6,["primary","secondary","tertiary"],4,["minor","street_limited"],2,1],18,["match",["get","class"],["motorway","trunk","primary"],32,["secondary","tertiary"],26,["minor","street_limited"],18,10],22,["match",["get","class"],["motorway","trunk","primary"],320,["secondary","tertiary"],260,["minor","street_limited"],180,100]]}}
262,{id:"building",type:"fill",source:"stamen-omt","source-layer":"building",minzoom:15,filter:["!",["has","hide_3d"]],layout:{},paint:{"fill-color":"hsl(0,0%,80%)","fill-outline-color":"hsl(0,0%,73%)"}},{id:"road-pedestrian-polygon-fill",type:"fill",source:"stamen-omt","source-layer":"transportation",minzoom:14,filter:["all",["match",["get","class"],["path","pedestrian"],!0,!1],!0,["case",["has","layer"],[">=",["get","layer"],0],!0],["==",["geometry-type"],"Polygon"]],paint:{"fill-color":"hsl(60,2%,88%)"}},{id:"road-pedestrian-polygon-pattern",type:"fill",source:"stamen-omt","source-layer":"transportation",minzoom:16,filter:["all",["match",["get","class"],["path","pedestrian"],!0,!1],!0,["case",["has","layer"],[">=",["get","layer"],0],!0],["==",["geometry-type"],"Polygon"]],paint:{"fill-opacity":["interpolate",["linear"],["zoom"],16,0,17,1],"fill-pattern":"pedestrian-polygon"}},{id:"road-path",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:12,filter:["all",["==",["get","class"],"path"],["step",["zoom"],["!",["match",["get","subclass"],["steps","sidewalk","crossing"],!0,!1]],16,["!=",["get","subclass"],"steps"]],["!=",["get","subclass"],"pedestrian"],!0,["!=",["get","brunnel"],"bridge"],["!=",["get","brunnel"],"tunnel"],["==",["geometry-type"],"LineString"]],layout:{"line-join":["step",["zoom"],"miter",14,"round"]},paint:{"line-color":"hsl(0,0%,50%)","line-dasharray":["step",["zoom"],["literal",[3,4]],17,["literal",[2,3]]],"line-width":["interpolate",["exponential",1.5],["zoom"],13,.5,14,.75,15,.75,18,3]}},{id:"road-steps",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:14,filter:["all",["==",["get","subclass"],"steps"],!0,["!=",["get","brunnel"],"bridge"],["!=",["get","brunnel"],"tunnel"],["==",["geometry-type"],"LineString"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(60,3%,94%)","line-dasharray":["step",["zoom"],["literal",[1,0]],15,["literal",[1.75,1]],16,["literal",[1,.75]],17,["literal",[.3,.3]]],"line-width":["interpolate",["exponential",1.5],["zoom"],15,1,16,1.6,18,6]}},{id:"road-pedestrian",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:12,filter:["all",["==",["get","subclass"],"pedestrian"],!0,["case",["has","layer"],[">=",["get","layer"],0],!0],["==",["geometry-type"],"LineString"]],layout:{"line-join":["step",["zoom"],"miter",14,"round"]},paint:{"line-color":"hsl(60,3%,59%)","line-width":["interpolate",["exponential",1.5],["zoom"],13,.5,14,.75,15,1.2,18,4.5]}},{id:"road-case-simple-ramp",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:6,filter:["all",["step",["zoom"],["match",["get","class"],["motorway","trunk"],!0,!1],7,["match",["get","class"],["motorway","trunk"],!0,!1],10,["match",["get","class"],["motorway","trunk"],!0,!1],11,["match",["get","class"],["motorway","trunk"],!0,!1]],!0,["!=",["get","brunnel"],"bridge"],["!=",["get","brunnel"],"tunnel"],["==",["get","ramp"],1],["==",["geometry-type"],"LineString"]],layout:{},paint:{"line-color":"hsl(0,0%,100%)","line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["motorway","trunk","primary"],1,.5],13,["match",["get","class"],["motorway","trunk","primary"],1.5,.5],15,["match",["get","class"],["motorway","trunk","primary"],2,1],18,["match",["get","class"],["motorway","trunk","primary"],18,10],22,["match",["get","class"],["motorway","trunk","primary"],180,100]],"line-opacity":["interpolate",["exponential",1.5],["zoom"],6,0,7,1],"line-width":["interpolate",["exponential",1.5],["zoom"],5,.6,8,.7,12,2]}},{id:"road-case-simple",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:6,filter:["all",["step",["zoom"],["match",["get","class"],["motorway","trunk"],!0,!1],12,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary"],!0,!1],15,["match",["get","class"],["motorway","trunk"],!0,!1]],!0,["!=",["get","brunnel"],"bridge"],["!=",["get","brunnel"],"tunnel"],["!=",["get","ramp"],1],["==",["geometry-type"],"LineString"]],layout:{},paint:{"line-color":"hsl(0,0%,100%)","line-gap-width":["interpolate",["exponential",1.5],["zoom"],6,["match",["get","class"],["motorway","trunk"],.6,["primary","secondary","tertiary"],.1,0],7,["match",["get","class"],["motorway","trunk"],1,["primary","secondary","tertiary"],.4,0],8,["match",["get","class"],["motorway","trunk"],1.5,["primary","secondary","tertiary"],.4,0],12,["match",["get","class"],["motorway","trunk"],4,["primary","secondary","tertiary"],2.2,["minor","street_limited"],1,.5],13,["match",["get","class"],["motorway","trunk"],4,["primary","secondary","tertiary"],3.5,["motorway_link","trunk_link","primary_link","minor","street_limited"],1.5,.5],15,["match",["get","class"],["motorway","trunk"],6,["primary","secondary","tertiary"],5,["motorway_link","trunk_link","primary_link","minor","street_limited"],3,1.5],18,["match",["get","class"],["motorway","trunk","primary"],32,["secondary","tertiary"],26,["minor","street_limited"],18,10],22,["match",["get","class"],["motorway","trunk","primary"],320,["secondary","tertiary"],260,["minor","street_limited"],180,100]],"line-opacity":["interpolate",["exponential",1.5],["zoom"],6,0,7,1],"line-width":["interpolate",["exponential",1.5],["zoom"],5,.6,8,.7,12,["match",["get","class"],["motorway","trunk"],2,1.2]]}},{id:"road-simple-ramp",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:10,filter:["all",["step",["zoom"],["match",["get","class"],["motorway"],!0,!1],10,["match",["get","class"],["motorway","trunk"],!0,!1],13,["match",["get","class"],["motorway","trunk","primary"],!0,!1],14,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary"],!0,!1]],["==",["get","ramp"],1],!0,["==",["geometry-type"],"LineString"]],layout:{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},paint:{"line-color":["interpolate",["linear"],["zoom"],5.9,["match",["get","class"],["primary","secondary","tertiary"],"hsl(0,0%,100%)","hsl(0,1%,100%)"],6,["match",["get","class"],["motorway"],"hsl(0,0%,46%)","hsl(0,0%,100%)"],9,["match",["get","class"],["motorway"],"hsl(0,0%,46%)","hsl(0,0%,100%)"],22,["match",["get","class"],["primary","secondary","tertiary"],"hsl(0,0%,59%)","hsl(0,0%,62%)"]],"line-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["motorway","trunk","primary"],1,.5],13,["match",["get","class"],["motorway","trunk","primary"],1.5,.5],15,["match",["get","class"],["motorway","trunk","primary"],2,1],18,["match",["get","class"],["motorway","trunk","primary"],18,10],22,["match",["get","class"],["motorway","trunk","primary"],180,100]]}},{id:"road-simple",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:6,filter:["all",["step",["zoom"],["match",["get","class"],["motorway","trunk"],!0,!1],7,["match",["get","class"],["motorway","motorway_link","trunk","primary"],!0,!1],8,["match",["get","class"],["motorway","trunk","primary","secondary"],!0,!1],10,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary"],!0,!1],11,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor"],!0,!1],12,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited"],!0,!1],13,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited","track"],!0,!1],14,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited","service","track"],!0,!1]],["!=",["get","ramp"],1],!0,["!=",["get","brunnel"],"bridge"],["!=",["get","brunnel"],"tunnel"],["==",["geometry-type"],"LineString"]],layout:{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},paint:{"line-color":["interpolate",["linear"],["zoom"],6.9,["match",["get","class"],["motorway","trunk","primary"],"hsl(0,0%,100%)","hsl(0,1%,100%)"],7,["match",["get","class"],["motorway","trunk"],"hsl(0,0%,59%)","hsl(0,0%,100%)"],9,["match",["get","class"],["motorway","trunk","motorway_link","primary","secondary"],"hsl(0,0%,59%)","hsl(0,0%,100%)"],10,["match",["get","class"],["motorway","motorway_link","trunk","trunk_link"],"hsl(0,0%,46%)","hsl(0,0%,59%)"],22,["match",["get","class"],["minor","street_limited","service","track"],"hsl(0,0%,59%)","hsl(0,0%,62%)"]],"line-width":["interpolate",["exponential",1.5],["zoom"],6,["match",["get","class"],["motorway","trunk"],.6,["primary","secondary","tertiary"],.1,0],7,["match",["get","class"],["motorway","trunk"],1,["primary","secondary","tertiary"],.4,0],8,["match",["get","class"],["motorway","trunk"],1.5,["primary","secondary","tertiary"],.4,0],12,["match",["get","class"],["motorway","trunk"],4,["primary","secondary","tertiary"],2.2,["minor","street_limited"],1,.5],13,["match",["get","class"],["motorway","trunk"],4,["primary","secondary","tertiary"],3.5,["motorway_link","trunk_link","primary_link","minor","street_limited"],2,1],15,["match",["get","class"],["motorway","trunk"],6,["primary","secondary","tertiary"],5,["motorway_link","trunk_link","primary_link","minor","street_limited"],4,2],18,["match",["get","class"],["motorway","trunk","primary"],32,["secondary","tertiary"],26,["minor","street_limited"],18,10],22,["match",["get","class"],["motorway","trunk","primary"],320,["secondary","tertiary"],260,["minor","street_limited"],180,100]]}},{id:"road-rail",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:13,filter:["all",["match",["get","class"],["rail"],!0,
262!1],!0,["!=",["get","brunnel"],"bridge"],["!=",["get","brunnel"],"tunnel"]],paint:{"line-color":["interpolate",["linear"],["zoom"],13,"hsl(0,0%,60%)",16,"hsl(0,0%,64%)"],"line-width":["interpolate",["exponential",1.5],["zoom"],14,.5,20,1]}},{id:"road-rail-tracks",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:13,filter:["all",["match",["get","class"],["rail"],!0,!1],!0,["!=",["get","brunnel"],"bridge"],["!=",["get","brunnel"],"tunnel"]],paint:{"line-color":["interpolate",["linear"],["zoom"],13,"hsl(0,0%,60%)",16,"hsl(0,0%,64%)"],"line-dasharray":[.2,1],"line-opacity":["interpolate",["linear"],["zoom"],13.75,0,14,1],"line-width":["interpolate",["exponential",1.5],["zoom"],14,4,20,8]}},{id:"bridge-path",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:14,filter:["all",["==",["get","class"],"path"],["!=",["get","subclass"],"steps"],["!=",["get","subclass"],"pedestrian"],["==",["get","brunnel"],"bridge"],["==",["geometry-type"],"LineString"]],layout:{},paint:{"line-color":"hsl(0,0%,50%)","line-dasharray":["step",["zoom"],["literal",[3,4]],17,["literal",[2,3]]],"line-width":["interpolate",["exponential",1.5],["zoom"],13,.5,14,.75,15,.75,18,3]}},{id:"bridge-steps",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:14,filter:["all",["==",["get","subclass"],"steps"],["==",["get","brunnel"],"bridge"],["==",["geometry-type"],"LineString"]],paint:{"line-color":"hsl(60,3%,94%)","line-dasharray":["step",["zoom"],["literal",[1,0]],15,["literal",[1.75,1]],16,["literal",[1,.75]],17,["literal",[.3,.3]]],"line-width":["interpolate",["exponential",1.5],["zoom"],15,1,16,1.6,18,6]}},{id:"bridge-pedestrian",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:13,filter:["all",["==",["get","subclass"],"pedestrian"],["==",["get","brunnel"],"bridge"],["==",["geometry-type"],"LineString"]],paint:{"line-color":"hsl(60,3%,94%)","line-dasharray":["step",["zoom"],["literal",[1,0]],15,["literal",[1.5,.4]],16,["literal",[1,.2]]],"line-width":["interpolate",["exponential",1.5],["zoom"],14,.5,18,12]}},{id:"bridge-case-simple-ramp",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:13,filter:["all",["==",["get","brunnel"],"bridge"],["step",["zoom"],["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited","track"],!0,!1],14,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited","service","track"],!0,!1]],["==",["get","ramp"],1],["==",["geometry-type"],"LineString"]],paint:{"line-color":"hsl(0,0%,100%)","line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["motorway","trunk","primary"],1,.5],13,["match",["get","class"],["motorway","trunk","primary"],1.5,.5],15,["match",["get","class"],["motorway","trunk","primary"],2,1],18,["match",["get","class"],["motorway","trunk","primary"],18,10],22,["match",["get","class"],["motorway","trunk","primary"],180,100]],"line-width":["interpolate",["exponential",1.5],["zoom"],5,.6,8,.7,14,2]}},{id:"bridge-case-simple",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:12,filter:["all",["==",["get","brunnel"],"bridge"],["step",["zoom"],["match",["get","class"],["motorway","trunk"],!0,!1],11,["match",["get","class"],["motorway","motorway_link","trunk","trunk_link","primary","secondary","tertiary","minor","street_limited","primary_link"],!0,!1],13,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited","track"],!0,!1],14,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited","service","track"],!0,!1]],["!=",["get","ramp"],1],["==",["geometry-type"],"LineString"]],layout:{},paint:{"line-color":"hsl(0,0%,100%)","line-gap-width":["interpolate",["exponential",1.5],["zoom"],6,["match",["get","class"],["motorway","trunk"],.6,["primary","secondary","tertiary"],.1,0],7,["match",["get","class"],["motorway","trunk"],1,["primary","secondary","tertiary"],.4,0],8,["match",["get","class"],["motorway","trunk"],1.5,["primary","secondary","tertiary"],.4,0],12,["match",["get","class"],["motorway","trunk"],4,["primary","secondary","tertiary"],2.2,["minor","street_limited"],1,.5],13,["match",["get","class"],["motorway","trunk"],4,["primary","secondary","tertiary"],3.5,["motorway_link","trunk_link","primary_link","minor","street_limited"],1.5,.5],15,["match",["get","class"],["motorway","trunk"],6,["primary","secondary","tertiary"],5,["motorway_link","trunk_link","primary_link","minor","street_limited"],3,1.5],18,["match",["get","class"],["motorway","trunk","primary"],32,["secondary","tertiary"],26,["minor","street_limited"],18,10],22,["match",["get","class"],["motorway","trunk","primary"],320,["secondary","tertiary"],260,["minor","street_limited"],180,100]],"line-width":2}},{id:"bridge-simple-ramp",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:13,filter:["all",["==",["get","brunnel"],"bridge"],["step",["zoom"],["match",["get","class"],["motorway","trunk"],!0,!1],13,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited","track"],!0,!1],14,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited","service","track"],!0,!1]],["==",["get","ramp"],1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":["step",["zoom"],"butt",14,"round"]},paint:{"line-color":["interpolate",["linear"],["zoom"],10,["match",["get","class"],["motorway","motorway_link","trunk","trunk_link"],"hsl(0,0%,46%)","hsl(0,0%,59%)"],22,["match",["get","class"],["minor","street_limited","service","track"],"hsl(0,0%,59%)","hsl(0,0%,62%)"]],"line-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["motorway","trunk","primary"],1,.5],13,["match",["get","class"],["motorway","trunk","primary"],1.5,.5],15,["match",["get","class"],["motorway","trunk","primary"],2,1],18,["match",["get","class"],["motorway","trunk","primary"],18,10],22,["match",["get","class"],["motorway","trunk","primary"],180,100]]}},{id:"bridge-simple",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:12,filter:["all",["==",["get","brunnel"],"bridge"],["step",["zoom"],["match",["get","class"],["motorway","trunk"],!0,!1],12,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited","track"],!0,!1],14,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited","service","track"],!0,!1]],["!=",["get","ramp"],1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":["step",["zoom"],"butt",14,"round"]},paint:{"line-color":["interpolate",["linear"],["zoom"],6.9,["match",["get","class"],["motorway","trunk","primary"],"hsl(0,0%,100%)","hsl(0,1%,100%)"],7,["match",["get","class"],["motorway","trunk"],"hsl(0,0%,46%)","hsl(0,0%,100%)"],9,["match",["get","class"],["motorway","trunk","motorway_link","primary","secondary"],"hsl(0,0%,59%)","hsl(0,0%,100%)"],10,["match",["get","class"],["motorway","motorway_link","trunk","trunk_link"],"hsl(0,0%,46%)","hsl(0,0%,59%)"],22,["match",["get","class"],["minor","street_limited","service","track"],"hsl(0,0%,59%)","hsl(0,0%,62%)"]],"line-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["motorway","trunk"],4,["primary","secondary","tertiary"],2.2,["minor","street_limited"],1,.5],13,["match",["get","class"],["motorway","trunk"],4,["primary","secondary","tertiary"],3.5,["motorway_link","trunk_link","primary_link","minor","street_limited"],2,1],15,["match",["get","class"],["motorway","trunk"],6,["primary","secondary","tertiary"],5,["motorway_link","trunk_link","primary_link","minor","street_limited"],4,2],18,["match",["get","class"],["motorway","trunk","primary"],32,["secondary","tertiary"],26,["minor","street_limited"],18,10],22,["match",["get","class"],["motorway","trunk","primary"],320,["secondary","tertiary"],260,["minor","street_limited"],180,100]]}},{id:"bridge-rail",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:13,filter:["all",["==",["get","brunnel"],"bridge"],["match",["get","class"],["rail"],!0,
262!1]],paint:{"line-color":["interpolate",["linear"],["zoom"],13,"hsl(0,0%,60%)",16,"hsl(0,0%,64%)"],"line-width":["interpolate",["exponential",1.5],["zoom"],14,.5,20,1]}},{id:"bridge-rail-tracks",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:13,filter:["all",["==",["get","brunnel"],"bridge"],["match",["get","class"],["rail"],!0,!1]],paint:{"line-color":["interpolate",["linear"],["zoom"],13,"hsl(0,0%,60%)",16,"hsl(0,0%,64%)"],"line-dasharray":[.2,1],"line-opacity":["interpolate",["linear"],["zoom"],13.75,0,14,1],"line-width":["interpolate",["exponential",1.5],["zoom"],14,4,20,8]}},{id:"aerialway",type:"line",source:"stamen-omt","source-layer":"transportation",minzoom:12,filter:["==",["get","class"],"aerialway"],paint:{"line-color":"hsl(60,2%,40%)","line-dasharray":[4,1],"line-width":["interpolate",["exponential",1.5],["zoom"],14,1,20,2]}},{id:"subnational-boundary-bg",type:"line",source:"stamen-omt","source-layer":"boundary",minzoom:2.5,filter:["all",["match",["get","admin_level"],[3,4],!0,!1],["==",["get","maritime"],0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsla(0,1%,85%,0.2)","line-width":3.5}},{id:"subnational-boundary",type:"line",source:"stamen-omt","source-layer":"boundary",minzoom:2.5,filter:["all",["match",["get","admin_level"],[3,4],!0,!1],["==",["get","maritime"],0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(0,1%,47%)","line-dasharray":["step",["zoom"],["literal",[1,2.5]],6,["literal",[.5,2.5]]],"line-width":["interpolate",["linear"],["zoom"],4,1,10,2]}},{id:"national-boundary-bg",type:"line",source:"stamen-omt","source-layer":"boundary",minzoom:2.5,filter:["all",["==",["get","admin_level"],2],["==",["get","maritime"],0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsla(0,1%,85%,0.2)","line-width":["interpolate",["linear"],["zoom"],1,1,5,4]}},{id:"national-boundary",type:"line",source:"stamen-omt","source-layer":"boundary",minzoom:1,filter:["all",["==",["get","admin_level"],2],["==",["get","disputed"],0],["==",["get","maritime"],0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(0,1%,40%)","line-dasharray":["step",["zoom"],["literal",[1.25,2.5]],8,["literal",[.75,3]]],"line-width":["interpolate",["linear"],["zoom"],2,1,6,2]}},{id:"national-boundary-disputed",type:"line",source:"stamen-omt","source-layer":"boundary",minzoom:2,filter:["all",["==",["get","admin_level"],2],["any",["all",["==",["get","disputed"],1],["==",["get","maritime"],0]],["match",["id"],[0xe3bc2aa,0x13b60536,330696e3,0x13b6055c,0x13b6056a,0x2b9fd829,0x2b9fdc42,0x7c2cfe2,0x36d4099d,0x7c0bf88,0x7c2cff9,0x2b111ef1,0x2b111ef2,0x36449471,0xce3b636],!0,!1]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsla(0,1%,40%,0.8)","line-dasharray":["step",["zoom"],["literal",[.001,1.5]],4,["literal",[.001,2.5]],7,["literal",[.001,3]]],"line-width":["interpolate",["linear"],["zoom"],1,1,5,3]}},{id:"road-label-simple",type:"symbol",source:"stamen-omt","source-layer":"transportation_name",minzoom:12,filter:["all",!0,["!=",["get","brunnel"],"bridge"],["!=",["get","brunnel"],"tunnel"],["has","name"],["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","street_limited"],!0,!1]],layout:{"symbol-placement":"line","text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Regular"],"text-letter-spacing":.05,"text-max-angle":30,"text-padding":10,"text-pitch-alignment":"viewport","text-size":["interpolate",["linear"],["zoom"],10,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary"],13,11],18,["match",["get","class"],["motorway","trunk","primary","secondary","tertiary"],20,18]]},paint:{"text-color":"hsl(0,0%,0%)","text-halo-color":"hsl(0,0%,100%)","text-halo-width":1.5}},{id:"road-number-shield",type:"symbol",source:"stamen-omt","source-layer":"transportation_name",minzoom:9.5,filter:["all",["<=",["get","ref_length"],6],["match",["get","class"],["pedestrian","service","motorway_link"],!1,!0]],layout:{"icon-image":["match",["get","network"],["us-interstate","us-highway"],["concat","shield-",["get","network"],"-",["to-string",["get","ref_length"]]],["concat","shield-rectangle-white","-",["to-string",["get","ref_length"]]]],"icon-rotation-alignment":"viewport","symbol-placement":"line","symbol-spacing":["interpolate",["linear"],["zoom"],11,400,14,600],"text-field":["get","ref"],"text-font":["Roboto Bold"],"text-letter-spacing":.05,"text-max-angle":38,"text-rotation-alignment":"viewport","text-size":9},paint:{"text-color":["case",["match",["get","network"],["us-interstate"],!0,!1],"hsl(0,0%,100%)","hsl(230,11%,13%)"]}},{id:"ferry-aerialway-label",type:"symbol",source:"stamen-omt","source-layer":"transportation",minzoom:15,filter:["match",["get","class"],"aerialway",!0,!1],layout:{"symbol-placement":"line","text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Regular"],"text-letter-spacing":.01,"text-max-angle":30,"text-padding":1,"text-pitch-alignment":"viewport","text-size":["interpolate",["linear"],["zoom"],10,7.15,18,14.3]},paint:{"text-color":["match",["get","class"],"ferry","hsl(0,0%,100%)","hsl(60,2%,40%)"],"text-halo-blur":1,"text-halo-color":["match",["get","class"],"ferry","hsl(209,33%,70%)","hsl(0,0%,94%)"],"text-halo-width":1}},{id:"natural-line-label",type:"symbol",source:"stamen-omt","source-layer":"natural_label",minzoom:4,filter:["all",["match",["get","class"],["glacier","landform","disputed_glacier","disputed_landform"],!0,!1],["<=",["get","rank"],4],["==",["geometry-type"],"LineString"]],layout:{"symbol-placement":"line-center","text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Regular"],"text-max-angle":30,"text-pitch-alignment":"viewport","text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]]},paint:{"text-color":"hsl(340,10%,38%)","text-halo-blur":.5,"text-halo-color":"hsl(0,0%,94%)","text-halo-width":.5}},{id:"natural-point-label",type:"symbol",source:"stamen-omt","source-layer":"mountain_peak",filter:["all",["!=",["get","class"],"cliff"],["<=",["get","rank"],2],["has","ele"],["step",["zoom"],[">",["get","ele"],4e3],11,[">",["get","ele"],3e3],12,[">",["get","ele"],2e3],14,!0]],layout:{"icon-image":"mountain","text-field":["concat",["get","name"],"\n",["get","ele_ft"]," ft"],"text-font":["Roboto Italic"],"text-justify":"right","text-offset":[0,.4],"text-size":14,"text-variable-anchor":["bottom-right"]},paint:{"text-color":"hsl(340,10%,15%)","text-halo-color":"hsla(0,0%,100%,.6)","text-halo-width":2}},{id:"water-line-label",type:"symbol",source:"stamen-omt","source-layer":"water_name",minzoom:1,filter:["all",["match",["get","class"],["lake","sea","ocean"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"symbol-placement":"line-center","text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Italic"],"text-letter-spacing":["match",["get","class"],"ocean",.25,["sea","bay"],.15,.1],"text-max-angle":30,"text-pitch-alignment":"viewport","text-size":["interpolate",["linear"],["zoom"],1,13,2,["match",["get","class"],["ocean"],15,12],9,["match",["get","class"],["ocean","sea"],25,12],22,14],visibility:"visible"},paint:{"text-color":"hsl(209,33%,45%)","text-halo-color":"hsl(209,33%,70%)"}},{id:"waterway-label",type:"symbol",source:"stamen-omt","source-layer":"waterway",minzoom:13,filter:["all",["match",["get","class"],["river","stream"],!0,
262!1],["==",["geometry-type"],"LineString"]],layout:{"symbol-placement":"line","symbol-spacing":["interpolate",["linear"],["zoom"],13,400,18,600],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Italic"],"text-max-angle":30,"text-offset":[0,-.5],"text-pitch-alignment":"viewport","text-size":["interpolate",["linear"],["zoom"],13,15,18,17],visibility:"visible"},paint:{"text-color":"hsl(209,33%,45%)","text-halo-color":"hsl(209,33%,70%)","text-halo-width":1.5}},{id:"water-point-label",type:"symbol",source:"stamen-omt","source-layer":"water_name",minzoom:1,filter:["all",["step",["zoom"],["==",["get","class"],"ocean"],3,["match",["get","class"],["ocean","sea"],!0,!1],7,["match",["get","class"],["lake","sea","ocean"],!0,!1]],["==",["geometry-type"],"Point"]],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Italic"],"text-letter-spacing":["match",["get","class"],"ocean",.25,["bay","sea"],.15,.1],"text-line-height":1.1,"text-max-width":["match",["get","class"],"ocean",8,["sea","bay","lake"],7,10],"text-size":["interpolate",["linear"],["zoom"],1,13,2,["match",["get","class"],["ocean"],15,12],9,["match",["get","class"],["ocean","sea"],25,12],22,14],visibility:"none"},paint:{"text-color":"hsl(209,33%,45%)","text-halo-color":"hsl(209,33%,70%)","text-halo-width":1.5}},{id:"park-label",type:"symbol",source:"stamen-omt","source-layer":"poi",minzoom:12.5,filter:["all",["==",["get","subclass"],"park"],["step",["zoom"],["any",["has","name:ru"],["has","name:zh"],["has","name:kn"]],16,!0]],layout:{"text-field":["get","name"],"text-font":["Roboto Regular"],"text-max-width":6,"text-size":["case",["any",["has","name:ru"],["has","name:zh"],["has","name:kn"]],20,17]},paint:{"text-color":"hsl(90,13%,40%)","text-halo-color":"hsl(64,32%,79%)","text-halo-width":2}},{id:"airport-label",type:"symbol",source:"stamen-omt","source-layer":"aerodrome_label",minzoom:10.5,filter:["all",["match",["get","class"],["military","international","other","regional","public"],!0,!1],["step",["zoom"],["all",["has","icao"],["match",["get","class"],["
262international","military"],!0,!1]],12,["all",["has","icao"],["match",["get","class"],["international","military","other","regional"],!0,!1]],14,!0]],layout:{"icon-image":["case",["match",["get","icao"],["KXMR","KMHV"],!0,!1],"terrain-airport-intergalactic","terrain-airport"],"text-anchor":"top","text-field":["step",["zoom"],["get","iata"],12,["coalesce",["get","name_en"],["get","name"]]],"text-font":["Roboto Regular"],"text-letter-spacing":.01,"text-line-height":1.1,"text-max-width":9,"text-offset":[0,.8],"text-size":["interpolate",["linear"],["zoom"],13,15,18,17]},paint:{"text-color":"hsl(60,2%,40%)","text-halo-color":"hsl(0,0%,94%)","text-halo-width":1}},{id:"neighborhood-label",type:"symbol",source:"stamen-omt","source-layer":"place",minzoom:10,maxzoom:14,filter:["all",["match",["get","class"],["suburb","quarter","neighbourhood"],!0,!1],["<=",["get","rank"],24]],layout:{"symbol-sort-key":["get","rank"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Regular"],"text-justify":"auto","text-line-height":1.1,"text-max-width":7,"text-padding":5,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],10,["match",["get","class"],["suburb"],12,10],11,["match",["get","class"],["suburb"],16,14],14,["match",["get","class"],["suburb"],18,14]]},paint:{"text-color":"hsl(0,2%,16%)","text-halo-blur":1,"text-halo-color":["interpolate",["linear"],["zoom"],3,"hsla(0,0%,100%,0.85)",5,"hsla(0,0%,100%,1.0)"],"text-halo-width":1.5}},{id:"subnational-label",type:"symbol",source:"stamen-omt","source-layer":"place",minzoom:3,maxzoom:7,filter:["match",["get","class"],["state","disputed_state"],!0,!1],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Bold"],"text-letter-spacing":.15,"text-max-width":6,"text-size":["interpolate",["cubic-bezier",.85,.7,.65,1],["zoom"],4,["step",["get","rank"],9,6,8,7,7],7,["step",["get","rank"],21,6,16,7,14]],"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":["interpolate",["linear"],["zoom"],3,"hsl(0,2%,0%)",5,"hsl(0,2%,25%)"],"text-halo-color":"hsla(0,0%,100%,0.85)","text-halo-width":["interpolate",["linear"],["zoom"],4,.75,5,1.75]}},{id:"settlement-minor-label",type:"symbol",source:"stamen-omt","source-layer":"place",minzoom:3,maxzoom:13,filter:["all",["match",["get","class"],"town",!0,!1],["step",["zoom"],["<=",["get","rank"],6],7,["<=",["get","rank"],7],8,["<=",["get","rank"],11],9,["<=",["get","rank"],12],10,!0]],layout:{"icon-image":["step",["zoom"],["step",["get","rank"],"dot-11",9,"dot-10",11,"dot-9"],8,""],"symbol-sort-key":["get","rank"],"text-anchor":["step",["zoom"],"top-left",8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Regular"],"text-justify":"auto","text-line-height":1.1,"text-max-width":4,"text-radial-offset":["step",["zoom"],.4,8,0],"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],6,["step",["get","rank"],11,7,10],8,["step",["get","rank"],12,12,10],13,["step",["get","rank"],13,12,12,15,11]]},paint:{"text-color":"hsl(0,2%,16%)","text-halo-blur":1,"text-halo-color":["interpolate",["linear"],["zoom"],3,"hsla(0,0%,90%,0.65)",5,"hsla(0,0%,100%,8.0)"],"text-halo-width":1.5}},{id:"settlement-major-label",type:"symbol",source:"stamen-omt","source-layer":"place",minzoom:3,maxzoom:12,filter:["all",["match",["get","class"],"city",!0,!1],["step",["zoom"],!1,2,["<=",["get","rank"],3],4,["<=",["get","rank"],4],5,["<=",["get","rank"],5],6,["<=",["get","rank"],7],7,["<=",["get","rank"],8],8,["<=",["get","rank"],11],9,!0]],layout:{"icon-image":["step",["zoom"],["step",["get","rank"],"dot-11",9,"dot-10",11,"dot-9"],8,""],"symbol-sort-key":["get","rank"],"text-anchor":["step",["zoom"],"top-left",8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Regular"],"text-justify":"auto","text-line-height":1.1,"text-max-width":3,"text-radial-offset":["step",["zoom"],.4,8,0],"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","rank"],12,3,10],6,["step",["get","rank"],14,3,13,4,12],8,["step",["get","rank"],20,6,16],12,["step",["get","rank"],18,6,14]],visibility:"visible"},paint:{"text-color":"hsl(0,2%,16%)","text-halo-blur":1,"text-halo-color":["interpolate",["linear"],["zoom"],3,"hsla(0,0%,90%,0.65)",5,"hsla(0,0%,100%,0.8)"],"text-halo-width":1.5}},{id:"continent-label",type:"symbol",source:"stamen-omt","source-layer":"place",minzoom:0,maxzoom:1,filter:["match",["get","class"],["continent"],!0,!1],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Bold"],"text-letter-spacing":.2,"text-line-height":1,"text-max-width":6,"text-radial-offset":["step",["zoom"],.6,8,0],"text-size":14,"text-transform":"uppercase"},paint:{"text-color":"rgba(94, 92, 92, 1)","text-halo-color":"hsla(0,0%,100%,0.5)","text-halo-width":1.5}},{id:"country-label-small",type:"symbol",source:"stamen-omt","source-layer":"place",minzoom:4,maxzoom:5.75,filter:["all",["match",["get","class"],["country","disputed_country"],!0,!1],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Bold"],"text-letter-spacing":.2,"text-line-height":1,"text-max-width":6,"text-radial-offset":["step",["zoom"],.6,8,0],"text-size":["interpolate",["linear"],["zoom"],1.5,10,5.5,13],"text-transform":"uppercase",visibility:"visible","icon-padding":[10,10,10,10]},paint:{"text-color":"rgba(94, 92, 92, 1)","text-halo-color":"hsla(0,0%,100%,0.5)","text-halo-width":1.5,"icon-color":"#5E5C5C"}},{id:"country-label-minor",type:"symbol",source:"stamen-omt","source-layer":"place",minzoom:1.5,maxzoom:5.75,filter:["all",["match",["get","class"],["country","disputed_country"],!0,!1],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Bold"],"text-letter-spacing":.2,"text-line-height":1,"text-max-width":6,"text-radial-offset":["step",["zoom"],.6,8,0],"text-size":["interpolate",["linear"],["zoom"],1.5,11,5.5,14],"text-transform":"uppercase",visibility:"visible","icon-padding":[12,12,12,12]},paint:{"text-color":"rgba(94, 92, 92, 1)","text-halo-color":"hsla(0,0%,100%,0.5)","text-halo-width":1.5,"icon-color":"rgba(94, 92, 92, 1)"}},{id:"country-label-major",type:"symbol",source:"stamen-omt","source-layer":"place",minzoom:1,maxzoom:5.75,filter:["all",["match",["get","class"],["country","disputed_country"],!0,!1],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["Roboto Bold"],"text-letter-spacing":.2,"text-line-height":1,"text-max-width":6,"text-radial-offset":["step",["zoom"],.6,8,0],"text-size":["interpolate",["linear"],["zoom"],1.5,11,5.5,14],"text-transform":"uppercase",visibility:"visible","text-padding":20}
262,paint:{"text-color":"rgba(66, 65, 65, 1)","text-halo-color":"hsla(0,0%,100%,0.5)","text-halo-width":1.5,"icon-color":"#5E5C5C"}},{id:"z0",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z1",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z2",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z3",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z4",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z5",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z6",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z7",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z8",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z9",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z10",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0}],glyphs:t.baseLayerOptions?.premium_terrain.glyphsURL??"https://tiles.stadiamaps.com/fonts/{fontstack}/{range}.pbf",sprite:e??"https://tiles.stadiamaps.com/styles/stamen-terrain/sprite"},a=t.baseLayerOptions?.premium_terrain}else if("premium_streets"===e){let e;e=t.baseLayerOptions?.premium_streets.spriteURL,r={version:8,name:"premium_streets",sources:{openmaptiles:{type:"vector",scheme:"xyz",tiles:["https://tiles.stadiamaps.com/data/openmaptiles/{z}/{x}/{y}.pbf"],minzoom:0,maxzoom:14},placeholder_source:{type:"raster",tiles:[""]}},layers:[{id:"background",type:"background",paint:{"background-color":"#f8f4f0"}},{id:"landcover-glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",filter:["==",["get","subclass"],"ice"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":["interpolate",["linear"],["zoom"],0,.9,10,.3]}},{id:"landuse-residential",type:"fill",source:"openmaptiles","source-layer":"landuse",filter:["==",["get","class"],"residential"],paint:{"fill-color":["interpolate",["linear"],["zoom"],12,"hsla(30,19%,90%,0.4)",16,"hsla(30,19%,90%,0.2)"]}},{id:"landuse-commercial",type:"fill",source:"openmaptiles","source-layer":"landuse",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","class"],"commercial"]],paint:{"fill-color":"hsla(0,60%,87%,0.23)"}},{id:"landuse-industrial",type:"fill",source:"openmaptiles","source-layer":"landuse",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","class"],"industrial"]],paint:{"fill-color":"hsla(49,100%,88%,0.34)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["==",["geometry-type"],"Polygon"],paint:{"fill-color":"#d8e8c8","fill-opacity":["interpolate",["exponential",1.8],["zoom"],9,.5,12,.2]}},{id:"park-outline",type:"line",source:"openmaptiles","source-layer":"park",minzoom:6,filter:["==",["geometry-type"],"Polygon"],layout:{},paint:{"line-color":["interpolate",["linear"],["zoom"],6,"hsla(96,40%,49%,0.36)",8,"hsla(96,40%,49%,0.66)"],"line-dasharray":[3,3]}},{id:"landuse-cemetery",type:"fill",source:"openmaptiles","source-layer":"landuse",filter:["==",["get","class"],"cemetery"],paint:{"fill-color":"#e0e4dd"}},{id:"landuse-hospital",type:"fill",source:"openmaptiles","source-layer":"landuse",filter:["==",["get","class"],"hospital"],paint:{"fill-color":"#fde"}},{id:"landuse-school",type:"fill",source:"openmaptiles","source-layer":"landuse",filter:["==",["get","class"],"school"],paint:{"fill-color":"#f0e8f8"}},{id:"landuse-railway",type:"fill",source:"openmaptiles","source-layer":"landuse",filter:["==",["get","class"],"railway"],paint:{"fill-color":"hsla(30,19%,90%,0.4)"}},{id:"landcover-wood",type:"fill",source:"openmaptiles","source-layer":"landcover",filter:["==",["get","class"],"wood"],paint:{"fill-color":"#6a4","fill-opacity":.1,"fill-outline-color":"hsla(0,0%,0%,0.03)","fill-antialias":["step",["zoom"],!1,9,!0]}}
262,{id:"landcover-grass",type:"fill",source:"openmaptiles","source-layer":"landcover",filter:["==",["get","class"],"grass"],paint:{"fill-color":"#d8e8c8","fill-opacity":1}},{id:"landcover-grass-park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["==",["get","class"],"public_park"],paint:{"fill-color":"#d8e8c8","fill-opacity":.8}},{id:"waterway-other",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["match",["get","class"],["canal","river","stream"],!1,!0],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":["interpolate",["exponential",1.3],["zoom"],13,.5,20,2]}},{id:"waterway-stream-canal",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["match",["get","class"],["canal","stream"],!0,!1],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":["interpolate",["exponential",1.3],["zoom"],13,.5,20,6]}},{id:"waterway-river",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["get","class"],"river"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":["interpolate",["exponential",1.2],["zoom"],10,.8,20,6]}},{id:"water-offset",type:"fill",source:"openmaptiles","source-layer":"water",minzoom:6,maxzoom:8,filter:["==",["geometry-type"],"Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":1,"fill-color":"#a0c8f0","fill-translate":["interpolate",["linear"],["zoom"],6,["literal",[2,0]],8,["literal",[0,0]]]}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210,67%,85%)"}},{id:"water-pattern",type:"fill",source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave"}},{id:"landcover-ice-shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",filter:["==",["get","subclass"],"ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":["interpolate",["linear"],["zoom"],0,.9,10,.3]}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",paint:{"fill-color":["interpolate",["linear"],["zoom"],15.5,"#f2eae2",16,"#dfdbd7"],"fill-antialias":!0}},{id:"building-top",type:"fill",source:"openmaptiles","source-layer":"building",layout:{visibility:"visible"},paint:{"fill-translate":["interpolate",["linear"],["zoom"],14,["literal",[0,0]],16,["literal",[-2,-2]]],"fill-outline-color":"#dfdbd7","fill-color":"#f2eae2","fill-opacity":["interpolate",["linear"],["zoom"],13,0,16,1]}},{id:"tunnel-service-track-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"tunnel"],["match",["get","class"],["service","track"],!0,!1]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":["interpolate",["exponential",1.2],["zoom"],15,1,16,4,20,11]}},{id:"tunnel-minor-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":["interpolate",["linear"],["zoom"],12,0,12.5,1],"line-width":["interpolate",["exponential",1.2],["zoom"],12,.5,13,1,14,4,20,15]}},{id:"tunnel-secondary-tertiary-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"tunnel"],["match",["get","class"],["secondary","tertiary"],!0,!1]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":["interpolate",["exponential",1.2],["zoom"],8,1.5,20,17]}},{id:"tunnel-trunk-primary-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"tunnel"],["match",["get","class"],["primary","trunk"],!0,!1]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":["interpolate",["exponential",1.2],["zoom"],5,.4,6,.6,7,1.5,20,22]}},{id:"tunnel-motorway-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":["interpolate",["exponential",1.2],["zoom"],5,.4,6,.6,7,1.5,20,22]}},{id:"tunnel-path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["match",["get","class"],["footway","path"],!0,!1]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-opacity":["interpolate",["linear"],["zoom"],12,0,13,1],"line-width":["interpolate",["exponential",1.2],["zoom"],15,1.2,20,4]}},{id:"tunnel-service-track",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"tunnel"],["match",["get","class"],["service","track"],!0,!1]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":["interpolate",["exponential",1.2],["zoom"],15.5,0,16,2,20,7.5]}},{id:"tunnel-minor",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":["interpolate",["exponential",1.2],["zoom"],13.5,0,14,2.5,20,11.5]}},{id:"tunnel-secondary-tertiary",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"tunnel"],["match",["get","class"],["secondary","tertiary"],!0,!1]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":["interpolate",["exponential",1.2],["zoom"],6.5,0,7,.5,20,10]}},{id:"tunnel-trunk-primary",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"tunnel"],["match",["get","class"],["primary","trunk"],!0,!1]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":["interpolate",["exponential",1.2],["zoom"],6.5,0,7,.5,20,18]}},{id:"tunnel-motorway",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":["interpolate",["exponential",1.2],["zoom"],6.5,0,7,.5,20,18]}},{id:"tunnel-railway",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"rail"]],paint:{"line-color":"#bbb","line-width":["interpolate",["exponential",1.4],["zoom"],14,.4,15,.75,20,2],"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["match",["get","class"],["ferry"],!0,!1],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":["interpolate",["exponential",1.5],["zoom"],11,2,17,12],"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":["interpolate",["exponential",1.5],["zoom"],11,5,17,55],"line-opacity":1}}
262,{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["==",["geometry-type"],"Polygon"],["match",["get","class"],["runway","taxiway"],!0,!1]],layout:{visibility:"visible"},paint:{"fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1],"fill-color":"rgba(255, 255, 255, 1)"}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["match",["get","class"],["taxiway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":["interpolate",["exponential",1.5],["zoom"],11,1,17,10],"line-opacity":["interpolate",["linear"],["zoom"],11,0,12,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50],"line-opacity":["interpolate",["linear"],["zoom"],11,0,12,1]}},{id:"highway-area",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["==",["geometry-type"],"Polygon"],layout:{visibility:"visible"},paint:{"fill-color":"hsla(0,0%,89%,0.56)","fill-outline-color":"#cfcdca","fill-opacity":.9,"fill-antialias":!1}},{id:"highway-motorway-link-casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":["interpolate",["exponential",1.2],["zoom"],12,1,13,3,14,4,20,15]}},{id:"highway-link-casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["match",["get","class"],["primary_link","secondary_link","tertiary_link","trunk_link"],!0,!1]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":["interpolate",["exponential",1.2],["zoom"],12,1,13,3,14,4,20,15]}},{id:"highway-minor-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["!=",["get","brunnel"],"tunnel"],["match",["get","class"],["minor","service","track"],!0,!1]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":["interpolate",["linear"],["zoom"],12,0,12.5,1],"line-width":["interpolate",["exponential",1.2],["zoom"],12,.5,13,1,14,4,20,15]}},{id:"highway-secondary-tertiary-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["match",["get","class"],["secondary","tertiary"],!0,!1]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":["interpolate",["exponential",1.2],["zoom"],6,1.5,20,17]}},{id:"highway-primary-casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["match",["get","class"],["primary"],!0,!1]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":["interpolate",["exponential",1.2],["zoom"],5,.5,8,.6,9,1.5,20,22]}},{id:"highway-trunk-casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["match",["get","class"],["trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":["interpolate",["linear"],["zoom"],5,0,6,1],"line-width":["interpolate",["exponential",1.2],["zoom"],5,0,6,.6,7,1.5,20,22]}},{id:"highway-motorway-casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":["interpolate",["exponential",1.2],["zoom"],4,0,5,.4,6,.6,7,1.5,20,22],"line-opacity":["interpolate",["linear"],["zoom"],4,0,5,1]}},{id:"highway-path",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:14,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["match",["get","class"],["footway","path"],!0,!1]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":["interpolate",["exponential",1.2],["zoom"],15,1.2,20,4]}},{id:"highway-motorway-link",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":["interpolate",["exponential",1.2],["zoom"],12.5,0,13,1.5,14,2.5,20,11.5]}},{id:"highway-link",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["match",["get","class"],["primary_link","secondary_link","tert
262iary_link","trunk_link"],!0,!1]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":["interpolate",["exponential",1.2],["zoom"],12.5,0,13,1.5,14,2.5,20,11.5]}},{id:"highway-minor",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["!=",["get","brunnel"],"tunnel"],["match",["get","class"],["minor","service","track"],!0,!1]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":["interpolate",["exponential",1.2],["zoom"],13.5,0,14,2.5,20,11.5]}},{id:"highway-secondary-tertiary",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["match",["get","class"],["secondary","tertiary"],!0,!1]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":["interpolate",["exponential",1.2],["zoom"],6.5,0,8,.5,20,13]}},{id:"highway-primary",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["match",["get","class"],["primary"],!0,!1]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":["interpolate",["exponential",1.2],["zoom"],5,.1,9,.5,20,18]}},{id:"highway-trunk",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["match",["get","class"],["trunk"],!0,!1]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":["interpolate",["exponential",1.2],["zoom"],6.5,0,7,.5,20,18]}},{id:"highway-motorway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":["interpolate",["exponential",1.2],["zoom"],6.5,0,7,.5,20,18]}},{id:"railway-transit",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0,0%,73%,0.77)","line-width":["interpolate",["exponential",1.4],["zoom"],14,.4,20,1]}},{id:"railway-transit-hatching",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0,0%,73%,0.68)","line-dasharray":[.2,8],"line-width":["interpolate",["exponential",1.4],["zoom"],14.5,0,15,2,20,6]}},{id:"railway-service",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],paint:{"line-color":"hsla(0,0%,73%,0.77)","line-width":["interpolate",["exponential",1.4],["zoom"],14,.4,20,1]}},{id:"railway-service-hatching",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0,0%,73%,0.68)","line-dasharray":[.2,8],"line-width":["interpolate",["exponential",1.4],["zoom"],14.5,0,15,2,20,6]}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"rail"]]],paint:{"line-color":"#bbb","line-width":["interpolate",["exponential",1.4],["zoom"],14,.4,15,.75,20,2]}},{id:"railway-hatching",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":["interpolate",["exponential",1.4],["zoom"],14.5,0,15,3,20,8]}},{id:"bridge-motorway-link-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":["interpolate",["exponential",1.2],["zoom"],12,1,13,3,14,4,20,15]}},{id:"bridge-link-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"bridge"],["match",["get","class"],["primary_link","secondary_link","tert
262iary_link","trunk_link"],!0,!1]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":["interpolate",["exponential",1.2],["zoom"],12,1,13,3,14,4,20,15]}},{id:"bridge-secondary-tertiary-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"bridge"],["match",["get","class"],["secondary","tertiary"],!0,!1]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":["interpolate",["exponential",1.2],["zoom"],8,1.5,20,28]}},{id:"bridge-trunk-primary-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"bridge"],["match",["get","class"],["primary","trunk"],!0,!1]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28,76%,67%)","line-width":["interpolate",["exponential",1.2],["zoom"],5,.4,6,.6,7,1.5,20,26]}},{id:"bridge-motorway-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":["interpolate",["exponential",1.2],["zoom"],5,.4,6,.6,7,1.5,20,22]}},{id:"bridge-path-casing",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["match",["get","class"],["footway","path"],!0,!1]]],paint:{"line-color":"#f8f4f0","line-width":["interpolate",["exponential",1.2],["zoom"],15,1.2,20,18]}},{id:"bridge-path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["match",["get","class"],["footway","path"],!0,!1]]],paint:{"line-color":"#cba","line-width":["interpolate",["exponential",1.2],["zoom"],15,1.2,20,4],"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":["interpolate",["exponential",1.2],["zoom"],12.5,0,13,1.5,14,2.5,20,11.5]}},{id:"bridge-link",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"bridge"],["match",["get","class"],["primary_link","secondary_link","tertiary_link","trunk_link"],!0,!1]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":["interpolate",["exponential",1.2],["zoom"],12.5,0,13,1.5,14,2.5,20,11.5]}},{id:"bridge-secondary-tertiary",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"bridge"],["match",["get","class"],["secondary","tertiary"],!0,!1]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":["interpolate",["exponential",1.2],["zoom"],6.5,0,7,.5,20,20]}},{id:"bridge-trunk-primary",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"bridge"],["match",["get","class"],["primary","trunk"],!0,!1]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":["interpolate",["exponential",1.2],["zoom"],6.5,0,7,.5,20,18]}},{id:"bridge-motorway",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":["interpolate",["exponential",1.2],["zoom"],6.5,0,7,.5,20,18]}},{id:"bridge-railway",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"rail"]],paint:{"line-color":"#bbb","line-width":["interpolate",["exponential",1.4],["zoom"],14,.4,15,.75,20,2]}},{id:"bridge-railway-hatching",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":["interpolate",["exponential",1.4],["zoom"],14.5,0,15,3,20,8]}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,maxzoom:24,filter:["==",["get","class"],"cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0,0%,70%)","line-width":["interpolate",["linear"],["zoom"],11,1,19,2.5]}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,maxzoom:24,filter:["==",["get","class"],"cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0,0%,70%)","line-width":["interpolate",["linear"],["zoom"],11,3,19,5.5],"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["match",["get","admin_level"],[4,6,8],!0,!1],["!=",["get","maritime"],1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":["interpolate",["exponential",1.4],["zoom"],4,.4,5,1,12,3]}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248,7%,66%)","line-width":["interpolate",["linear"],["zoom"],0,.6,4,1.4,5,2,12,8]}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248,7%,70%)","line-dasharray":[1,3],"line-width":["interpolate",["linear"],["zoom"],0,.6,4,1.4,5,2,12,8]}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["match",["get","admin_level"],[2,4],!0,!1],["==",["get","maritime"],1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":["interpolate",["linear"],["zoom"],0,.6,4,1.4,5,2,12,8],"line-opacity":["interpolate",["linear"],["zoom"],6,.6,10,1]}},{id:"housenumbers",type:"symbol",source:"openmaptiles","source-layer":"housenumber",minzoom:16,filter:["==",["geometry-type"],"Point"],layout:{"text-font":["Roboto Regular"],"text-field":["to-string",["get","housenumber"]],"text-size":12,"symbol-avoid-edges":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==",["geometry-type"],"Point"],[">=",["get","rank"],25]],layout:{"text-padding":2,"text-font":["Roboto Medium"],"text-anchor":"top","icon-image":["concat",["get","class"],"_11"],"text-field":["concat",["get","name:latin"],["case",["all",["has","name:nonlatin"],["is-supported-script",["get","name:nonlatin"]]],["concat","\n",["get","name:nonlatin"]],""]],"text-offset":[0,.6],"text-size":12,"text-max-width":9,"text-line-height":1.55,"symbol-avoid-edges":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==",["geometry-type"],"Point"],["<=",["get","rank"],24],[">=",["get","rank"],15]],layout:{"text-padding":2,"text-font":["Roboto Medium"],"text-anchor":"top","icon-image":["concat",["get","class"],"_11"],"text-field":["concat",["get","name:latin"],["case",["all",["has","name:nonlatin"],["is-supported-script",["get","name:nonlatin"]]],["concat","\n",["get","name:nonlatin"]],""]],"text-offset":[0,.6],"text-size":12,"text-max-width":9,"text-line-height":1.55,"symbol-avoid-edges":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==",["geometry-type"],"Point"],["<=",["get","rank"],14],["has","name"]],layout:{"text-padding":2,"text-font":["Roboto Medium"],"text-anchor":"top","icon-image":["concat",["get","class"],"_11"],"text-field":["concat",["get","name:latin"],["case",["all",["has","name:nonlatin"],["is-supported-script",["get","name:nonlatin"]]],["concat","\n",["get","name:nonlatin"]],""]],"text-offset":[0,.6],"text-size":12,"text-max-width":9,"text-line-height":1.55,"symbol-avoid-edges":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["has","name"],["==",["get","class"],"railway"],["==",["get","subclass"],"station"]],layout:{"text-padding":2,"text-font":["Roboto Regular"],"text-anchor":"top","icon-image":["concat",["get","class"],"_11"],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"text-offset":[0,.6],"text-size":12,"text-max-width":9,"text-line-height":1.55,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0,"symbol-avoid-edges":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["match",["get","class"],["footway","path"],!0,!1],layout:{"text-size":["interpolate",["linear"],["zoom"],13,12,14,13],"text-font":["Roboto Regular"],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"symbol-placement":"line","text-rotation-alignment":"map","text-pitch-alignment":"viewport"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30,23%,62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"text-size":["interpolate",["linear"],["zoom"],13,12,14,13],"text-font":["Roboto Regular"],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"symbol-placement":"line","text-rotation-alignment":"map","text-pitch-alignment":"viewport"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"text-size":["interpolate",["linear"],["zoom"],13,12,14,13],"text-font":["Roboto Regular"],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"symbol-placement":"line","text-rotation-alignment":"map","text-pitch-alignment":"viewport"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"text-size":10,"icon-image":["concat","road_",["get","ref_length"]],"icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Roboto Medium"],"symbol-placement":["step",["zoom"],"point",11,"line"],"text-rotation-alignment":"viewport","icon-size":1,"text-field":["to-string",["get","ref"]]},paint:{}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"text-size":10,"icon-image":["concat",["get","network"],"_",["get","ref_length"]],"icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Roboto Medium"],"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-avoid-edges":!0,"text-rotation-alignment":"viewport","icon-size":1,"text-field":["to-string",["get","ref"]]},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"text-size":10,"icon-image":["concat",["get","network"],"_",["get","ref_length"]],"icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Roboto Medium"],"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-avoid-edges":!0,"text-rotation-alignment":"viewport","icon-size":1,"text-field":["to-string",["get","ref"]]},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"airport-label-major",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:10,filter:["all",["has","iata"]],layout:{"text-padding":2,"text-font":["Roboto Medium"],"text-anchor":"top","icon-image":"airport_11","text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"text-offset":[0,.6],"text-size":12,"text-max-width":9,"text-line-height":1.55,visibility:"visible","icon-size":1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"place-other",type:"symbol",source:"openmaptiles","source-layer":"place",filter:["match",["get","class"],["city","continent","country","town","village"],!1,!0],layout:{"text-letter-spacing":.1,"text-size":["interpolate",["exponential",1.2],["zoom"],12,10,15,14],"text-font":["Roboto Medium"],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"text-transform":"uppercase","text-max-width":9,"text-line-height":1.55,visibility:"none"},paint:{"text-color":"#633","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",source:"openmaptiles","source-layer":"place",filter:["all",["==",["get","capital"],2],["==",["get","class"],"city"]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"text-max-width":8,"text-line-height":1.55,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city",type:"symbol",source:"openmaptiles","source-layer":"place",filter:["all",["!=",["get","capital"],2],["==",["get","class"],"city"]],layout:{"text-font":["Roboto Medium"],"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"text-max-width":8,"text-line-height":1.55,visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-town",type:"symbol",source:"openmaptiles","source-layer":"place",filter:["==",["get","class"],"town"],layout:{"text-font":["Roboto Regular"],"text-size":["interpolate",["exponential",1.2],["zoom"],10,10,15,13],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"text-max-width":8,"text-line-height":1.55,visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-village",type:"symbol",source:"openmaptiles","source-layer":"place",filter:["==",["get","class"],"village"],layout:{"text-font":["Roboto Regular"],"text-size":["interpolate",["exponential",1.2],["zoom"],10,12,15,22],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"text-max-width":8,"text-line-height":1.55,visibility:"none","symbol-avoid-edges":!0},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255
262,0.8)"}},{id:"place-country-other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:1,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3],["!",["has","iso_a2"]]],layout:{"text-font":["Roboto Italic"],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"text-size":["interpolate",["linear"],["zoom"],3,11,7,17],"text-transform":"uppercase","text-max-width":6.25,visibility:"none"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:1,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3],["has","iso_a2"]],layout:{"text-font":["Roboto Bold"],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"text-size":["interpolate",["linear"],["zoom"],5,10,7,14],"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:1,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2],["has","iso_a2"]],layout:{"text-font":["Roboto Bold"],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"text-size":["interpolate",["linear"],["zoom"],2,6,5,14],"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:1,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1],["has","iso_a2"]],layout:{"text-font":["Roboto Bold"],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"text-size":["interpolate",["linear"],["zoom"],1,6,4,14],"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==",["get","class"],"continent"],layout:{"text-font":["Roboto Bold"],"text-field":["coalesce",["get","name:en"],["get","name_en"],["get","name"],["get","name:latin"],["get","name:nonlatin"]],"text-size":12,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"z0",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z1",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z2",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z3",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z4",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z5",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z6",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z7",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z8",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z9",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z10",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0}],glyphs:t.baseLayerOptions?.premium_streets.glyphsURL??"https://tiles.stadiamaps.com/fonts/{fontstack}/{range}.pbf",sprite:e??"https://tiles.stadiamaps.com/styles/osm-bright/sprite"},a=t.baseLayerOptions?.premium_streets}else if("skyvector_vfr"===e)r={version:8,name:"SkyVector VFR Sectional",sources:{skyvector_vfr_tiles:{type:"raster",tiles:["https://flightaware.com/images/tilecache/skyvector/301/{z}/{x}/{y}.jpg"],minzoom:0,maxzoom:14,tileSize:256},placeholder_source:{type:"raster",tiles:[""]}},layers:[{id:"aviation_sectional",type:"raster",source:"skyvector_vfr_tiles"},{id:"z0",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z1",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z2",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z3",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z4",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z5",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z6",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z7",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z8",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z9",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z10",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0}]},a=t.baseLayerOptions?.skyvector_vfr;else if("skyvector_ifr_low"===e)r={version:8,name:"SkyVector IFR Low Enroute",sources:{skyvector_ifr_low_tiles:{type:"raster",tiles:["https://flightaware.com/images/tilecache/skyvector/302/{z}/{x}/{y}.jpg"],minzoom:0,maxzoom:14,tileSize:256},placeholder_source:{type:"raster",tiles:[""]}},layers:[{id:"skyvector_ifr_low",type:"raster",source:"skyvector_ifr_low_tiles"},{id:"z0",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z1",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z2",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z3",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z4",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z5",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z6",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z7",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z8",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z9",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z10",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0}]},a=t.baseLayerOptions?.skyvector_ifr_low;else{if("skyvector_ifr_high"!==e)throw"custom"===e?Error("Custom styles must specify a styleURL"):Error("You must have a valid baseLayer defined in your mapsConfig to be able to use FlightAware maps.");r={version:8,name:"SkyVector IFR High Enroute",sources:{skyvector_ifr_high_tiles:{type:"raster",tiles:["https://flightaware.com/images/tilecache/skyvector/304/{z}/{x}/{y}.jpg"],minzoom:0,maxzoom:14,tileSize:256},placeholder_source:{type:"raster",tiles:[""]}},layers:[{id:"skyvector_ifr_high",type:"raster",source:"skyvector_ifr_high_tiles"},{id:"z0",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z1",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z2",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z3",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z4",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z5",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z6",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z7",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z8",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z9",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0},{id:"z10",type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0}]},a=t.baseLayerOptions?.skyvector_ifr_high}return((e,t,i)=>{let r=t?.glyphsURL??e.glyphs??"",a=t?.spriteURL??e.sprite??"",n={};return Object.entries(e.sources).map(([e,r])=>
262{if(r.tiles){void 0!==t?.minZoom&&(r.minzoom=t?.minZoom),void 0!==t?.maxZoom&&(r.maxzoom=t?.maxZoom);let a=t?.tileURL??r.tiles[0];n={...n,[e]:{...r,tiles:[rI(a,i)]}}}}),""!==r&&(e.glyphs=rI(r,i)),""!==a&&(e.sprite=rI(a,i)),e.sources=n,e})(r,a,t.stadiaMapsApiKey)})(v.baseLayer,v),fadeDuration:0,initialViewState:v.initialView,minZoom:v.initialView.mapMinZoom,maxZoom:void 0!==E?E+7:void 0,onStyleData:e=>{var t,i,r,a;(e=>{if(void 0!==e.getSource("flightaware")&&void 0===e.getSource("placeholder_source")){e.addSource("placeholder_source",rA);for(let t=0;t<=11;t++)e.addLayer({id:`z${t}`,type:"raster",source:"placeholder_source",layout:{visibility:"none"},maxzoom:0,minzoom:0})}})(e.target),t=v.appearance.iconStyles,i=v.appearance.aircraftIcons,r=v.appearance.scaleFactors.airplane,a=e.target,Object.keys(t).map(e=>{let{fill:i,stroke:r,blur:a}=t[e];return{id:e,fill:i,stroke:r,blur:a}}).map(e=>{Object.entries(i).map(([t,i])=>{let n=t+"-"+e.id;if(!a.hasImage(n)){let t,o,l,s,c,u,h=new Image((t="SHADOW"!==e.id||i.canBeStyled?(o=i,l=e.fill,s=e.stroke,c=e.blur,u=r,n$(o,o.canBeStyled?l:null,o.canBeStyled?s:null,c,u)):nV).size[0],t.size[1]);h.onload=()=>{a.hasImage(n)||a.addImage(n,h)},h.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t.svg)}`}})})},ref:e,attributionControl:!1,touchPitch:!1,pitchWithRotate:!1,trackResize:!1,transformRequest:nX,onLoad:S,onMoveEnd:T,onZoomEnd:k,interactive:v.initialView.interactive},r.createElement(ob,{clock:w},r.createElement(po,{mapRef:e,getAircraftColor:s,getAircraftIcon:c,getAircraftZoomLevel:u,getAircraftSortOrder:h,isFlightVisible:p,isAircraftVisible:d,isDataBlockVisible:f,onDataBlockPressed:m,onAnimationFrame:g,dataLayersTime:b,sunlitEarthLayerTime:x})),r.createElement(ul,{config:v}),r.createElement(h8,{mapRef:e,baseLayer:v.baseLayer,showZoomInAndOutButtons:v.buttons.zoomInAndOut.show,showResetButton:v.buttons.zoomReset.show,position:v.buttons.position,onZoomIn:n,onZoomOut:o,onZoomReset:l}),r.createElement(uu,{mapRef:e})),v.debugMode?r.createElement(uI,{mapRef:e}):null)},function(e,t){let i;if(globalThis.mapDebugMode){let r=!0;for(i in e)Object.is(e[i],t[i])||(r=!1,console.debug(`Props are not equal: {${String(i)}}`),"function"!=typeof e[i]&&"function"!=typeof t[i]&&console.debug(`Previous value={${e[i]}}, next value={${t[i]}}`));return r}for(i in e)if(!Object.is(e[i],t[i]))return!1;return!0}),po=({mapRef:e,getAircraftColor:t,getAircraftIcon:i,getAircraftZoomLevel:a,getAircraftSortOrder:n,isFlightVisible:o,isAircraftVisible:l,isDataBlockVisible:s,onDataBlockPressed:c,onAnimationFrame:u,dataLayersTime:h,sunlitEarthLayerTime:d})=>{let f=rF(),m=ox(),g=f.baseLayerOptions?.[f.baseLayer].fill??"light",y=nB(),_=p(),b=uR(e=>e.selectedFlightId),x=uR(e=>e.highlightedFlightId);(0,r.useEffect)(()=>{e.current&&(globalThis.mapInstance=e.current.getMap())},[e]),(0,r.useEffect)(()=>{globalThis.mapDebugMode=f.debugMode},[f.debugMode]),(0,r.useEffect)(()=>{let e=tP.throttle(e=>{_.current&&!0===f.interactivity.flightHighlighting.enabled&&void 0!==e.features&&!(e.features.length<1)&&uD(om([e.lngLat.lng,e.lngLat.lat],e.features).properties.id)},50),t=()=>{_.current&&!0===f.interactivity.flightHighlighting.enabled&&(_.current.getCanvas().style.cursor="pointer")},i=()=>{_.current&&!0===f.interactivity.flightHighlighting.enabled&&(_.current.getCanvas().style.cursor="unset",uD(null))};return _.current?.on("mousemove","airplane-layer",e),_.current?.on("mouseenter","airplane-layer",t),_.current?.on("mouseleave","airplane-layer",i),()=>{_.current?.off("mousemove","airplane-layer",e),_.current?.off("mouseenter","airplane-layer",t),_.current?.off("mouseleave","airplane-layer",i)}},[f.interactivity.flightHighlighting.enabled,_]);let v=(0,r.useCallback)(e=>{if(!_.current||!0!==f.interactivity.flightSelection.enabled)return;let t=_.current.queryRenderedFeatures(e.point,{layers:["airplane-layer"]});if(void 0===t||t.length<1)uL(null);else{let i=om([e.lngLat.lng,e.lngLat.lat],t).properties.id;uL(b===i?null:i)}},[_,f.interactivity.flightSelection.enabled,b]);(0,r.useEffect)(()=>(_.current?.on("click",v),()=>{_.current?.off("click",v)}),[_,v]);let w=(0,r.useCallback)(e=>e.id===b||e.id===x,[b,x]),z=(0,r.useCallback)(e=>f.tracks.show&&w(e),[w,f.tracks.show]),S=(0,r.useCallback)(e=>!w(e)&&(void 0===o||o(e)),[w,o]),T=l??o,k=(0,r.useCallback)(e=>(!f.appearance.dataBlock.hideForSurfaceFlights||!1!==e.isAirborne)&&w(e)&&(void 0===o||o(e)),[f.appearance.dataBlock.hideForSurfaceFlights,w,o]),E=(0,r.useCallback)((e,i)=>{let r=t?t(e,i):oA(i),a=f.appearance.iconStyles;return decodeURIComponent(Object.keys(a).map(e=>{let{fill:t,stroke:i,blur:r}=a[e];return{id:e,fill:t,stroke:i,blur:r}}).filter(e=>r.replace("-","")===e.id)[0].fill)},[f.appearance.iconStyles,t]),M=new Date(d??m.getTime()),P=f.baseLayerOptions?.[f.baseLayer]?.sunlitEarthOptions,I=_.current?(e=>{let t=e.getBounds(),i=t.getEast()-t.getWest(),r=t.getNorth()-t.getSouth(),a=Math.max(.1*i,.1),n=Math.max(.1*r,.1),o=new tk.LngLat(t.getWest()-a,Math.max(t.getSouth()-n,-90)),l=new tk.LngLat(t.getEast()+a,Math.min(t.getNorth()+n,90));return new tk.LngLatBounds(o,l)})(_.current):void 0;return r.createElement(r.Fragment,null,r.createElement(s9,{data:y.filter(e=>{if(!f.appearance.showBlockedFlights&&e.isBlocked)return!1;if(void 0===I||e.id===b||e.id===x)return!0;
262if(f.appearance.hideSurfaceFlights&&!1===e.isAirborne)return!1;let t=e.trackList?.at(-1);return null!=t&&I.contains([t.longitude,t.latitude])}),baseLayer:f.baseLayer,fill:g,trailLength:f.tracks.trailLength,isTrackVisible:z,isTrailVisible:S,isAircraftVisible:T,isDataBlockVisible:s??k,getAircraftColor:t,getAircraftIcon:i,getAircraftZoomLevel:a,getAircraftSortOrder:n,getTrailColor:E,selectedFlightId:b??void 0,highlightedFlightId:x??void 0,onDataBlockPressed:c,onAnimationFrame:u}),f.ringLayerOptions.enabled?r.createElement(h7,{center:f.ringLayerOptions.center,ringCount:f.ringLayerOptions.ringCount,ringSpacing:f.ringLayerOptions.ringSpacing,units:f.ringLayerOptions.spacingUnits}):null,f.plannedRoutes.show?r.createElement(cl,{data:y.filter(e=>e.id===b||e.id===x).map(e=>e.planList??[]),scaleFactor:f.appearance.scaleFactors.track}):null,f.airportMarkers.show?r.createElement(uH,{data:y.filter(e=>e.id===b||e.id===x),baseLayer:f.baseLayer,scaleFactor:f.appearance.scaleFactors.airport,airportCodeFormat:f.airportCodeFormat}):null,r.createElement(uG,{config:f,date:M,options:P}),f.ctgLightningLayer.enabled?r.createElement(h9,{airportCodes:f.ctgLightningLayer.airportCodes,url:f.ctgLightningLayer.url,updateFrequency:f.ctgLightningLayer.updateFrequency,iconSize:f.ctgLightningLayer.iconSize,declutter:f.ctgLightningLayer.declutter}):null,r.createElement(pl,{config:f,getTime:m.getTime.bind(m),fixedTime:h}))},pl=(0,r.memo)(function({config:e,getTime:t,fixedTime:i}){let[a,n]=(0,r.useState)(void 0!==i?i:t());return(0,r.useEffect)(()=>{if(void 0!==i)return void n(i);n(t());let e=setInterval(()=>{n(t())},5e3);return()=>{clearInterval(e)}},[i,t]),r.createElement(r.Fragment,null,r.createElement(uC,{layerOptions:{aeris_radar:((e,t)=>{let i=e.dataLayerOptions?.aeris_radar?.maxAge??6048e5;if(void 0===e.dataLayerOptions?.aeris_radar||!1===e.dataLayerOptions?.aeris_radar?.enabled||Math.abs((new Date).getTime()-new Date(t).getTime())>i)return;let r=e.dataLayerOptions?.aeris_radar.pollingFrequency??15,a=e.dataLayerOptions?.aeris_radar.enabled,n=e.dataLayerOptions?.aeris_radar?.source,o=e.dataLayerOptions?.aeris_radar?.layer,l=e.dataLayerOptions.aeris_radar.beforeId,s=rL(n?.tiles?.at(0)??"http://localhost:8010/proxy/aeris/radar-global/{z}/{x}/{y}/{ts}@2x.png",t,r),c={type:"raster",tiles:[s],tileSize:n.tileSize,minzoom:0,maxzoom:2},u={type:"raster",tiles:[s],tileSize:n.tileSize,minzoom:4,maxzoom:4},h={type:"raster",tiles:[s],tileSize:n.tileSize,minzoom:6,maxzoom:6},p={type:"raster",tiles:[s],tileSize:n.tileSize,minzoom:8,maxzoom:8};return{layerConfigs:[{id:"aeris_radar_2",enabled:a,source:c,layer:{source:"aeris-radar-source-2",type:"raster",id:"aeris-radar-layer-2",minzoom:0,maxzoom:3.5,layout:{visibility:o.layout?.visibility},paint:{"raster-opacity":o.paint?.["raster-opacity"],"raster-fade-duration":0}},pollingFrequency:r,maxAge:i,beforeId:l},{id:"aeris_radar_4",enabled:a,source:u,layer:{source:"aeris-radar-source-4",type:"raster",id:"aeris-radar-layer-4",minzoom:3.5,maxzoom:5.5,layout:{visibility:o.layout?.visibility},paint:{"raster-opacity":o.paint?.["raster-opacity"],"raster-fade-duration":0}},pollingFrequency:r,maxAge:i,beforeId:l},{id:"aeris_radar_6",enabled:a,source:h,layer:{source:"aeris-radar-source-6",type:"raster",id:"aeris-radar-layer-6",minzoom:5.5,maxzoom:7.5,layout:{visibility:o.layout?.visibility},paint:{"raster-opacity":o.paint?.["raster-opacity"],"raster-fade-duration":0}},pollingFrequency:r,maxAge:i,beforeId:l},{id:"aeris_radar_8",enabled:a,source:p,layer:{source:"aeris-radar-source-8",type:"raster",id:"aeris-radar-layer-8",minzoom:7.5,layout:{visibility:o.layout?.visibility},paint:{"raster-opacity":o.paint?.["raster-opacity"],"raster-fade-duration":0}},pollingFrequency:r,maxAge:i,beforeId:l}],timestamp:t}})(e,a),lightning_flash:((e,t)=>{let i=e.dataLayerOptions?.lightning_flash?.maxAge??6048e5;if(void 0===e.dataLayerOptions?.lightning_flash||!1===e.dataLayerOptions?.lightning_flash?.enabled||Math.abs((new Date).getTime()-new Date(t).getTime())>i)return;let r=e.dataLayerOptions.lightning_flash.pollingFrequency??300,a=e.dataLayerOptions.lightning_flash.enabled,n={...e.dataLayerOptions.lightning_flash.source},o=e.dataLayerOptions.lightning_flash.layer,l=e.dataLayerOptions.lightning_flash.beforeId,s=rL(n.tiles?.at(0)??"http://localhost:8010/proxy/aeris/lightning-flash/{z}/{x}/{y}/{ts}@2x.png",t,r);return n.tiles=[s],{layerConfigs:[{id:"lightning-flash",enabled:a,source:n,layer:o,pollingFrequency:r,maxAge:i,beforeId:l}],timestamp:t}})(e,a)}}))});var ps,pc={},pu={},ph={};function pp(){var e,t;return ps||(ps=1,Object.defineProperty(ph,"__esModule",{value:!0}
262),ph.isEventSourceSupported=ph.isReactNative=ph.ReadyState=ph.DEFAULT_HEARTBEAT=ph.UNPARSABLE_JSON_OBJECT=ph.DEFAULT_RECONNECT_INTERVAL_MS=ph.DEFAULT_RECONNECT_LIMIT=ph.SOCKET_IO_PING_CODE=ph.SOCKET_IO_PATH=ph.SOCKET_IO_PING_INTERVAL=ph.DEFAULT_EVENT_SOURCE_OPTIONS=ph.EMPTY_EVENT_HANDLERS=ph.DEFAULT_OPTIONS=void 0,ph.DEFAULT_OPTIONS={},ph.EMPTY_EVENT_HANDLERS={},ph.DEFAULT_EVENT_SOURCE_OPTIONS={withCredentials:!1,events:ph.EMPTY_EVENT_HANDLERS},ph.SOCKET_IO_PING_INTERVAL=25e3,ph.SOCKET_IO_PATH="/socket.io/?EIO=3&transport=websocket",ph.SOCKET_IO_PING_CODE="2",ph.DEFAULT_RECONNECT_LIMIT=20,ph.DEFAULT_RECONNECT_INTERVAL_MS=5e3,ph.UNPARSABLE_JSON_OBJECT={},ph.DEFAULT_HEARTBEAT={message:"ping",timeout:6e4,interval:25e3},(t=e||(ph.ReadyState=e={}))[t.UNINSTANTIATED=-1]="UNINSTANTIATED",t[t.CONNECTING=0]="CONNECTING",t[t.OPEN=1]="OPEN",t[t.CLOSING=2]="CLOSING",t[t.CLOSED=3]="CLOSED",ph.isReactNative="undefined"!=typeof navigator&&"ReactNative"===navigator.product,ph.isEventSourceSupported=!ph.isReactNative&&function(){try{return"EventSource"in globalThis}catch(e){return!1}}()),ph}var pd,pf={},pm={};function pg(){return pd||(pd=1,Object.defineProperty(pm,"__esModule",{value:!0}),pm.resetWebSockets=pm.sharedWebSockets=void 0,pm.sharedWebSockets={},pm.resetWebSockets=function(e){if(e&&pm.sharedWebSockets.hasOwnProperty(e))delete pm.sharedWebSockets[e];else for(var t in pm.sharedWebSockets)pm.sharedWebSockets.hasOwnProperty(t)&&delete pm.sharedWebSockets[t]}),pm}var py,p_={},pb={};function px(){if(py)return pb;
262py=1,Object.defineProperty(pb,"__esModule",{value:!0}),pb.setUpSocketIOPing=pb.appendQueryParams=pb.parseSocketIOUrl=void 0;var e=pp();return pb.parseSocketIOUrl=function(t){if(t){var i=/^https|wss/.test(t),r=t.replace(/^(https?|wss?)(:\/\/)?/,"").replace(/\/$/,"");return"".concat(a=i?"wss":"ws","://").concat(r).concat(e.SOCKET_IO_PATH)}if(""===t){var a=(i=/^https/.test(window.location.protocol))?"wss":"ws",n=window.location.port?":".concat(window.location.port):"";return"".concat(a,"://").concat(window.location.hostname).concat(n).concat(e.SOCKET_IO_PATH)}return t},pb.appendQueryParams=function(e,t){void 0===t&&(t={});var i=/\?([\w]+=[\w]+)/.test(e),r="".concat(Object.entries(t).reduce(function(e,t){var i=t[0],r=t[1];return e+"".concat(i,"=").concat(r,"&")},"").slice(0,-1));return"".concat(e).concat(i?"&":"?").concat(r)},pb.setUpSocketIOPing=function(t,i){return void 0===i&&(i=e.SOCKET_IO_PING_INTERVAL),window.setInterval(function(){return t(e.SOCKET_IO_PING_CODE)},i)},pb}var pv,pw={};function pz(){if(pv)return pw;pv=1,Object.defineProperty(pw,"__esModule",{value:!0}),pw.heartbeat=function(t,i,r){var a=r||{},n=a.interval,o=void 0===n?e.DEFAULT_HEARTBEAT.interval:n,l=a.timeout,s=void 0===l?e.DEFAULT_HEARTBEAT.timeout:l,c=a.message,u=void 0===c?e.DEFAULT_HEARTBEAT.message:c,h=Math.max(100,o/10),p=Date.now(),d=setInterval(function(){var e=Date.now(),r=Array.isArray(i)?i.reduce(function(e,t){return e.current>t.current?e:t}).current:i.current;if(r+s<=e)console.warn("Heartbeat timed out, closing connection, last message received ".concat(e-r,"ms ago, last ping sent ").concat(e-p,"ms ago")),t.close();else if(r+o<=e&&p+o<=e)try{"function"==typeof u?t.send(u()):t.send(u),p=e}catch(e){console.error("Heartbeat failed, closing connection",e instanceof Error?e.message:e),t.close()}},h);return t.addEventListener("close",function(){clearInterval(d)}),function(){}};var e=pp();return pw}var pS,pT,pk,pE={},pM={};function pP(){var e,t;return pS||(pS=1,Object.defineProperty(pM,"__esModule",{value:!0}),pM.resetSubscribers=pM.removeSubscriber=pM.addSubscriber=pM.hasSubscribers=pM.getSubscribers=void 0,e={},t=[],pM.getSubscribers=function(i){return(0,pM.hasSubscribers)(i)?Array.from(e[i]):t},pM.hasSubscribers=function(t){var i;return(null==(i=e[t])?void 0:i.size)>0},pM.addSubscriber=function(t,i){e[t]=e[t]||new Set,e[t].add(i)},pM.removeSubscriber=function(t,i){e[t].delete(i)},pM.resetSubscribers=function(t){if(t&&e.hasOwnProperty(t))delete e[t];else for(var i in e)e.hasOwnProperty(i)&&delete e[i]}),pM}function pI(){if(pT)return pE;pT=1,Object.defineProperty(pE,"__esModule",{value:!0}),pE.assertIsWebSocket=function(e,t){if(!t&&e instanceof WebSocket==!1)throw Error("")},pE.resetGlobalState=function(i){(0,t.resetSubscribers)(i),(0,e.resetWebSockets)(i)};var e=pg(),t=pP();return pE}var pA,pC,pR,pL,pD,pO={},pF={},pj={};function pB(){if(pD)return pu;pD=1;var e,t,i,a,n,o=pu&&pu.__assign||function(){return(o=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},s=pu&&pu.__awaiter||function(e,t,i,r){return new(i||(i=Promise))(function(a,n){function o(e){try{s(r.next(e))}catch(e){n(e)}}function l(e){try{s(r.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?a(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,l)}s((r=r.apply(e,t||[])).next())})},c=pu&&pu.__generator||function(e,t){var i,r,a,n={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var c=[l,s];if(i)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(i=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,r=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!(a=(a=n.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){n=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(6===c[0]&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],r=0}finally{i=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}
262,u=pu&&pu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pu,"__esModule",{value:!0}),pu.useWebSocket=void 0;var h=pp(),p=function(){if(pC)return pf;pC=1,Object.defineProperty(pf,"__esModule",{value:!0}),pf.createOrJoinSocket=void 0;var e=pg(),t=pp(),i=function(){if(pk)return p_;pk=1;var e=p_&&p_.__assign||function(){return(e=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(p_,"__esModule",{value:!0}),p_.attachListeners=void 0;var t=px(),i=pz(),r=pp(),a=pI();return p_.attachListeners=function(n,o,l,s,c,u,h){var p,d,f,m,g,y=o.setLastMessage,_=o.setReadyState;return l.current.fromSocketIO&&(f=(0,t.setUpSocketIOPing)(h)),n.onmessage=function(e){var t;l.current.onMessage&&l.current.onMessage(e),"number"==typeof(null==u?void 0:u.current)&&(u.current=Date.now()),"function"==typeof l.current.filter&&!0!==l.current.filter(e)||l.current.heartbeat&&"boolean"!=typeof l.current.heartbeat&&(null==(t=l.current.heartbeat)?void 0:t.returnMessage)===e.data||y(e)},n.onopen=function(e){if(l.current.onOpen&&l.current.onOpen(e),c.current=0,_(r.ReadyState.OPEN),l.current.heartbeat&&n instanceof WebSocket){var t="boolean"==typeof l.current.heartbeat?void 0:l.current.heartbeat;u.current=Date.now(),(0,i.heartbeat)(n,u,t)}}
262,m=r.isEventSourceSupported&&n instanceof EventSource?function(){}:((0,a.assertIsWebSocket)(n,l.current.skipAssert),n.onclose=function(e){var t;if(l.current.onClose&&l.current.onClose(e),_(r.ReadyState.CLOSED),l.current.shouldReconnect&&l.current.shouldReconnect(e)){var i=null!=(t=l.current.reconnectAttempts)?t:r.DEFAULT_RECONNECT_LIMIT;if(c.current<i){var a="function"==typeof l.current.reconnectInterval?l.current.reconnectInterval(c.current):l.current.reconnectInterval;p=window.setTimeout(function(){c.current++,s()},null!=a?a:r.DEFAULT_RECONNECT_INTERVAL_MS)}else l.current.onReconnectStop&&l.current.onReconnectStop(i),console.warn("Max reconnect attempts of ".concat(i," exceeded"))}},function(){return p&&window.clearTimeout(p)}),n.onerror=function(t){var i;if(l.current.onError&&l.current.onError(t),r.isEventSourceSupported&&n instanceof EventSource&&(l.current.onClose&&l.current.onClose(e(e({},t),{code:1006,reason:"An error occurred with the EventSource: ".concat(t),wasClean:!1})),_(r.ReadyState.CLOSED),n.close()),l.current.retryOnError)if(c.current<(null!=(i=l.current.reconnectAttempts)?i:r.DEFAULT_RECONNECT_LIMIT)){var a="function"==typeof l.current.reconnectInterval?l.current.reconnectInterval(c.current):l.current.reconnectInterval;d=window.setTimeout(function(){c.current++,s()},null!=a?a:r.DEFAULT_RECONNECT_INTERVAL_MS)}else l.current.onReconnectStop&&l.current.onReconnectStop(l.current.reconnectAttempts),console.warn("Max reconnect attempts of ".concat(l.current.reconnectAttempts," exceeded"))},g=function(){return d&&window.clearTimeout(d)},function(){_(r.ReadyState.CLOSING),m(),g(),n.close(),f&&clearInterval(f)}},p_}(),r=function(){if(pA)return pO;pA=1;var e=pO&&pO.__assign||function(){return(e=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(pO,"__esModule",{value:!0}),pO.attachSharedListeners=void 0;var t=pg(),i=pp(),r=pP(),a=px(),n=pz();return pO.attachSharedListeners=function(o,l,s,c){var u,h,p;return s.current.fromSocketIO&&(u=(0,a.setUpSocketIOPing)(c)),h=s.current.heartbeat,o.onmessage=function(e){(0,r.getSubscribers)(l).forEach(function(t){var i;t.optionsRef.current.onMessage&&t.optionsRef.current.onMessage(e),"number"==typeof(null==(i=null==t?void 0:t.lastMessageTime)?void 0:i.current)&&(t.lastMessageTime.current=Date.now()),"function"==typeof t.optionsRef.current.filter&&!0!==t.optionsRef.current.filter(e)||h&&"boolean"!=typeof h&&(null==h?void 0:h.returnMessage)===e.data||t.setLastMessage(e)})},o instanceof WebSocket&&(o.onclose=function(e){(0,r.getSubscribers)(l).forEach(function(t){t.optionsRef.current.onClose&&t.optionsRef.current.onClose(e),t.setReadyState(i.ReadyState.CLOSED)}),delete t.sharedWebSockets[l],(0,r.getSubscribers)(l).forEach(function(t){var r;if(t.optionsRef.current.shouldReconnect&&t.optionsRef.current.shouldReconnect(e)){var a=null!=(r=t.optionsRef.current.reconnectAttempts)?r:i.DEFAULT_RECONNECT_LIMIT;if(t.reconnectCount.current<a){var n="function"==typeof t.optionsRef.current.reconnectInterval?t.optionsRef.current.reconnectInterval(t.reconnectCount.current):t.optionsRef.current.reconnectInterval;setTimeout(function(){t.reconnectCount.current++,t.reconnect.current()},null!=n?n:i.DEFAULT_RECONNECT_INTERVAL_MS)}else t.optionsRef.current.onReconnectStop&&t.optionsRef.current.onReconnectStop(t.optionsRef.current.reconnectAttempts),console.warn("Max reconnect attempts of ".concat(a," exceeded"))}})}),p=s.current.heartbeat,o.onopen=function(e){var t=(0,r.getSubscribers)(l);t.forEach(function(t){t.reconnectCount.current=0,t.optionsRef.current.onOpen&&t.optionsRef.current.onOpen(e),t.setReadyState(i.ReadyState.OPEN),p&&o instanceof WebSocket&&(t.lastMessageTime.current=Date.now())}),p&&o instanceof WebSocket&&(0,n.heartbeat)(o,t.map(function(e){return e.lastMessageTime}),"boolean"==typeof p?void 0:p)},o.onerror=function(t){(0,r.getSubscribers)(l).forEach(function(r){r.optionsRef.current.onError&&r.optionsRef.current.onError(t),i.isEventSourceSupp
262orted&&o instanceof EventSource&&(r.optionsRef.current.onClose&&r.optionsRef.current.onClose(e(e({},t),{code:1006,reason:"An error occurred with the EventSource: ".concat(t),wasClean:!1})),r.setReadyState(i.ReadyState.CLOSED))}),i.isEventSourceSupported&&o instanceof EventSource&&o.close()},function(){u&&clearInterval(u)}},pO}(),a=pP();return pf.createOrJoinSocket=function(n,o,l,s,c,u,h,p,d){if(!t.isEventSourceSupported&&s.current.eventSourceOptions)throw t.isReactNative?Error("EventSource is not supported in ReactNative"):Error("EventSource is not supported");if(s.current.share){var f,m=null;void 0===e.sharedWebSockets[o]?(e.sharedWebSockets[o]=s.current.eventSourceOptions?new EventSource(o,s.current.eventSourceOptions):new WebSocket(o,s.current.protocols),n.current=e.sharedWebSockets[o],l(t.ReadyState.CONNECTING),m=(0,r.attachSharedListeners)(e.sharedWebSockets[o],o,s,d)):(n.current=e.sharedWebSockets[o],l(e.sharedWebSockets[o].readyState));var g={setLastMessage:c,setReadyState:l,optionsRef:s,reconnectCount:h,lastMessageTime:p,reconnect:u};return(0,a.addSubscriber)(o,g),f=m,function(){if((0,a.removeSubscriber)(o,g),!(0,a.hasSubscribers)(o)){try{var i=e.sharedWebSockets[o];i instanceof WebSocket&&(i.onclose=function(e){s.current.onClose&&s.current.onClose(e),l(t.ReadyState.CLOSED)}),i.close()}catch(e){}f&&f(),delete e.sharedWebSockets[o]}}}if(n.current=s.current.eventSourceOptions?new EventSource(o,s.current.eventSourceOptions):new WebSocket(o,s.current.protocols),l(t.ReadyState.CONNECTING),!n.current)throw Error("WebSocket failed to be created");return(0,i.attachListeners)(n.current,{setLastMessage:c,setReadyState:l},s,u.current,h,p,d)},pf}(),d=(pR||(pR=1,e=pF&&pF.__awaiter||function(e,t,i,r){return new(i||(i=Promise))(function(a,n){function o(e){try{s(r.next(e))}catch(e){n(e)}}function l(e){try{s(r.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?a(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,l)}s((r=r.apply(e,t||[])).next())})},t=pF&&pF.__generator||function(e,t){var i,r,a,n={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var c=[l,s];if(i)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(i=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,r=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!(a=(a=n.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){n=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(6===c[0]&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],r=0}finally{i=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},i=pF&&pF.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var r,a=0,n=t.length;a<n;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))},Object.defineProperty(pF,"__esModule",{value:!0}),pF.getUrl=void 0,a=px(),n=pp(),pF.getUrl=function(r,o){for(var l=[],s=2;s<arguments.length;s++)l[s-2]=arguments[s];return e(void 0,i([r,o],l,!0),void 0,function(e,i,r){var o,l,s,c,u,h,p;return void 0===r&&(r=0),t(this,function(t){var d;switch(t.label){case 0:if("function"!=typeof e)return[3,10];t.label=1;case 1:return t.trys.push([1,3,,9]),[4,e()];case 2:return o=t.sent(),[3,9];case 3:return t.sent(),i.current.retryOnError?(l=null!=(u=i.current.reconnectAttempts)?u:n.DEFAULT_RECONNECT_LIMIT,r<l?[4,(d=null!=(s="function"==typeof i.current.reconnectInterval?i.current.reconnectInterval(r):i.current.reconnectInterval)?s:n.DEFAULT_RECONNECT_INTERVAL_MS,new Promise(function(e){return window.setTimeout(e,d)}))]:[3,5]):[3,7];case 4:return t.sent(),[2,(0,pF.getUrl)(e,i,r+1)];case 5:return null==(p=(h=i.current).onReconnectStop)||p.call(h,r),[2,null];case 6:return[3,8];case 7:return[2,null];case 8:return[3,9];case 9:return[3,11];case 10:o=e,t.label=11;case 11:return c=i.current.fromSocketIO?(0,a.parseSocketIOUrl)(o):o,[2,i.current.queryParams?(0,a.appendQueryParams)(c,i.current.queryParams):c]}})})}),pF),f=u((pL||(pL=1,Object.defineProperty(pj,"__esModule",{value:!0}),pj.websocketWrapper=void 0,pj.websocketWrapper=function(e,t){return new Proxy(e,{get:function(e,i){var r=e[i];return"reconnect"===i?t:"function"==typeof r?(console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."),function(){}):r},set:function(e,t,i){return/^on/.test(t)?(console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."),!1):(e[t]=i,!0)}})},pj.default=pj.websocketWrapper),pj)),m=pI();return pu.useWebSocket=function(e,t,i){void 0===t&&(t=h.DEFAULT_OPTIONS),void 0===i&&(i=!0);var a=(0,r.useState)(null),n=a[0],u=a[1],g=(0,r.useState)({}),y=g[0],_=g[1],b=(0,r.useMemo)(function(){if(!t.disableJson&&n)try{return JSON.parse(n.data)}catch(e){return h.UNPARSABLE_JSON_OBJECT}return null},[n,t.disableJson]),x=(0,r.useRef)(null),v=(0,r.useRef)(null),w=(0,r.useRef)(function(){}),z=(0,r.useRef)(0),S=(0,r.useRef)(Date.now()),T=(0,r.useRef)([]),k=(0,r.useRef)(null),E=(0,r.useRef)(t);E.current=t;var M=x.current&&void 0!==y[x.current]?y[x.current]:null!==e&&!0===i?h.ReadyState.CONNECTING:h.ReadyState.UNINSTANTIATED,P=t.queryParams?JSON.stringify(t.queryParams):null,I=(0,r.useCallback)(function(e,t){var i;
262void 0===t&&(t=!0),h.isEventSourceSupported&&v.current instanceof EventSource?console.warn("Unable to send a message from an eventSource"):(null==(i=v.current)?void 0:i.readyState)===h.ReadyState.OPEN?((0,m.assertIsWebSocket)(v.current,E.current.skipAssert),v.current.send(e)):t&&T.current.push(e)},[]),A=(0,r.useCallback)(function(e,t){void 0===t&&(t=!0),I(JSON.stringify(e),t)},[I]),C=(0,r.useCallback)(function(){return!0!==E.current.share||h.isEventSourceSupported&&v.current instanceof EventSource?v.current:(null===k.current&&v.current&&((0,m.assertIsWebSocket)(v.current,E.current.skipAssert),k.current=(0,f.default)(v.current,w)),k.current)},[]);return(0,r.useEffect)(function(){if(null!==e&&!0===i){var t,r=!1,a=!0,n=function(){return s(void 0,void 0,void 0,function(){var i,n,s;return c(this,function(c){switch(c.label){case 0:return i=x,[4,(0,d.getUrl)(e,E)];case 1:return i.current=c.sent(),null===x.current?(console.error("Failed to get a valid URL. WebSocket connection aborted."),x.current="ABORTED",(0,l.flushSync)(function(){return _(function(e){return o(o({},e),{ABORTED:h.ReadyState.CLOSED})})})):(n=function(e){r||(0,l.flushSync)(function(){return u(e)})},s=function(e){r||(0,l.flushSync)(function(){return _(function(t){var i;return o(o({},t),x.current&&((i={})[x.current]=e,i))})})},a&&(t=(0,p.createOrJoinSocket)(v,x.current,s,E,n,w,z,S,I))),[2]}})})};return w.current=function(){r||(k.current&&(k.current=null),null==t||t(),n())},n(),function(){r=!0,a=!1,k.current&&(k.current=null),null==t||t(),u(null)}}null!==e&&!1!==i||(z.current=0,_(function(e){var t;return o(o({},e),x.current&&((t={})[x.current]=h.ReadyState.CLOSED,t))}))},[e,i,P,I]),(0,r.useEffect)(function(){M===h.ReadyState.OPEN&&T.current.splice(0).forEach(function(e){I(e)})},[M]),{sendMessage:I,sendJsonMessage:A,lastMessage:n,lastJsonMessage:b,readyState:M,getWebSocket:C}},pu}var pN,pU,pV,p$={},pZ={},pG=U((pV||(pV=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resetGlobalState=e.useEventSource=e.ReadyState=e.useSocketIO=e.default=void 0;var t=pB();Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.useWebSocket}});var i=function(){if(pN)return p$;pN=1;var e=p$&&p$.__assign||function(){return(e=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(p$,"__esModule",{value:!0}),p$.useSocketIO=void 0;var t=pB(),i=pp(),a={type:"empty",payload:null};return p$.useSocketIO=function(n,o,l){void 0===o&&(o=i.DEFAULT_OPTIONS),void 0===l&&(l=!0);var s=(0,r.useMemo)(function(){return e(e({},o),{fromSocketIO:!0})},[]),c=(0,t.useWebSocket)(n,s,l),u=c.sendMessage,h=c.sendJsonMessage,p=c.lastMessage,d=c.readyState,f=c.getWebSocket,m=(0,r.useMemo)(function(){if(!p||!p.data)return a;var e=p.data.match(/\[.*]/);if(!e)return a;var t=JSON.parse(e);return Array.isArray(t)&&t[1]?{type:t[0],payload:t[1]}:a},[p]);return{sendMessage:u,sendJsonMessage:h,lastMessage:m,lastJsonMessage:m,readyState:d,getWebSocket:f}},p$}();Object.defineProperty(e,"useSocketIO",{enumerable:!0,get:function(){return i.useSocketIO}});var a=pp();Object.defineProperty(e,"ReadyState",{enumerable:!0,get:function(){return a.ReadyState}});var n=function(){if(pU)return pZ;pU=1;var e=pZ&&pZ.__assign||function(){return(e=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},t=pZ&&pZ.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(i[r[a]]=e[r[a]])}return i};Object.defineProperty(pZ,"__esModule",{value:!0}),pZ.useEventSource=void 0;var i=pB(),a=pp();return pZ.useEventSource=function(n,o,l){void 0===o&&(o=a.DEFAULT_EVENT_SOURCE_OPTIONS);var s=o.withCredentials,c=o.events,u=t(o,["withCredentials","events"]);void 0===l&&(l=!0);var h=e(e({},u),{eventSourceOptions:{withCredentials:s}}),p=(0,r.useRef)(a.EMPTY_EVENT_HANDLERS);c&&(p.current=c);var d=(0,i.useWebSocket)(n,h,l),f=d.lastMessage,m=d.readyState,g=d.getWebSocket;return(0,r.useEffect)(function(){(null==f?void 0:f.type)&&Object.entries(p.current).forEach(function(e){var t=e[0],i=e[1];t===f.type&&i(f)})},[f]),{lastEvent:f,readyState:m,getEventSource:g}},pZ}();Object.defineProperty(e,"useEventSource",{enumerable:!0,get:function(){return n.useEventSource}});var o=pI();Object.defineProperty(e,"resetGlobalState",{enumerable:!0,get:function(){return o.resetGlobalState}})}(pc)),pc));function pq(e,t,i){let r=t,a=r+i,n=[],o="";for(;r<a;){let t=e[r++];if(128&t)if(192==(224&t)){let i=63&e[r++];n.push((31&t)<<6|i)}else if(224==(240&t)){let i=63&e[r++],a=63&e[r++];n.push((31&t)<<12|i<<6|a)}else if(240==(248&t)){let i=(7&t)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++];i>65535&&(i-=65536,n.push(i>
262>>10&1023|55296),i=56320|1023&i),n.push(i)}else n.push(t);else n.push(t);n.length>=4096&&(o+=String.fromCharCode(...n),n.length=0)}return n.length>0&&(o+=String.fromCharCode(...n)),o}new TextEncoder;let pH=new TextDecoder;class pW{type;data;constructor(e,t){this.type=e,this.data=t}}class pX extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Object.create(pX.prototype)),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:pX.name})}}function pY(e,t){return 0x100000000*e.getInt32(t)+e.getUint32(t+4)}let pK={type:-1,encode:function(e){return e instanceof Date?function({sec:e,nsec:t}){if(e>=0&&t>=0&&e<=0x3ffffffff){if(0===t&&e<=0xffffffff){let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e),t}{let i=e/0x100000000,r=new Uint8Array(8),a=new DataView(r.buffer);return a.setUint32(0,t<<2|3&i),a.setUint32(4,0|e),r}}{let i=new Uint8Array(12),r=new DataView(i.buffer);return r.setUint32(0,t),function(e,t,i){let r=Math.floor(i/0x100000000);e.setUint32(4,r),e.setUint32(8,i)}(r,4,e),i}}(function(e){let t=e.getTime(),i=Math.floor(t/1e3),r=1e6*(t-1e3*i),a=Math.floor(r/1e9);return{sec:i+a,nsec:r-1e9*a}}(e)):null},decode:function(e){let t=function(e){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:{let e=t.getUint32(0);return{sec:0x100000000*(3&e)+t.getUint32(4),nsec:e>>>2}}case 12:return{sec:pY(t,4),nsec:t.getUint32(0)};default:throw new pX(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}};class pJ{static defaultCodec=new pJ;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(pK)}register({type:e,encode:t,decode:i}){if(e>=0)this.encoders[e]=t,this.decoders[e]=i;else{let r=-1-e;this.builtInEncoders[r]=t,this.builtInDecoders[r]=i}}tryToEncode(e,t){for(let i=0;i<this.builtInEncoders.length;i++){let r=this.builtInEncoders[i];if(null!=r){let a=r(e,t);if(null!=a)return new pW(-1-i,a)}}for(let i=0;i<this.encoders.length;i++){let r=this.encoders[i];if(null!=r){let a=r(e,t);if(null!=a)return new pW(i,a)}}return e instanceof pW?e:null}decode(e,t,i){let r=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return r?r(e,t,i):new pW(t,e)}}function pQ(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?new Uint8Array(e):Uint8Array.from(e)}function p1(e){return`${e<0?"-":""}0x${Math.abs(e).toString(16).padStart(2,"0")}`}let p0="array",p2="map_key",p3="map_value",p5=e=>{if("string"==typeof e||"number"==typeof e)return e;throw new pX("The type of key must be string or number but "+typeof e)};class p6{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let t=this.getUninitializedStateFromPool();t.type=p0,t.position=0,t.size=e,t.array=Array(e)}pushMapState(e){let t=this.getUninitializedStateFromPool();t.type=p2,t.readCount=0,t.size=e,t.map={}}getUninitializedStateFromPool(){return this.stackHeadPosition++,this.stackHeadPosition===this.stack.length&&this.stack.push({type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null}),this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw Error("Invalid stack state. Released state is not on top of the stack.");e.type===p0&&(e.size=0,e.array=void 0,e.position=0,e.type=void 0),(e.type===p2||e.type===p3)&&(e.size=0,e.map=void 0,e.readCount=0,e.type=void 0),this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}let p4=new DataView(new ArrayBuffer(0)),p8=new Uint8Array(p4.buffer);try{p4.getInt8(0)}catch(e){if(!(e instanceof RangeError))throw Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}let p7=RangeError("Insufficient data"),p9=new class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=16,t=16){this.maxKeyLength=e,this.maxLengthPerKey=t,this.caches=[];for(let e=0;e<this.maxKeyLength;e++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,t,i){let r=this.caches[i-1];e:for(let a of r){let r=a.bytes;for(let a=0;a<i;a++)if(r[a]!==e[t+a])continue e;return a.str}return null}store(e,t){let i=this.caches[e.length-1],r={bytes:e,str:t};i.length>=this.maxLengthPerKey?i[Math.random()*i.length|0]=r:i.push(r)}decode(e,t,i){let r=this.find(e,t,i);if(null!=r)return this.hit++,r;this.miss++;let a=pq(e,t,i),n=Uint8Array.prototype.slice.call(e,t,t+i);return this.store(n,a),a}};class de{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=p4;bytes=p8;headByte=-1;stack=new p6;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??pJ.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??0xffffffff,this.maxBinLength=e?.maxBinLength??0xffffffff,this.maxArrayLength=e?.maxArrayLength??0xffffffff,this.maxMapLength=e?.maxMapLength??0xffffffff,this.maxExtLength=e?.maxExtLength??0xffffffff,this.keyDecoder=void 0!==e?.keyDecoder?e.keyDecoder:p9,this.mapKeyConverter=e?.mapKeyConverter??p5}clone(){return new de({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=-1,this.stack.reset()}setBuffer(e){let t=pQ(e);this.bytes=t,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.pos=0}appendBuffer(e){if(-1!==this.headByte||this.hasRemaining(1)){let t=this.bytes.subarray(this.pos),i=pQ(e),r=new Uint8Array(t.length+i.length);r.set(t),r.set(i,t.length),this.setBuffer(r)}else this.setBuffer(e)}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:t,pos:i}=this;return RangeError(`Extra ${t.byteLength-i} of ${t.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){let t=this.clone();yield*t.decodeMulti(e)}else try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let t,i=!1;for await(let r of e){if(i)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(r);try{t=this.doDecodeSync(),i=!0}catch(e){if(!(e instanceof RangeError))throw e}this.totalPos+=this.pos}if(i){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return t}let{headByte:r,pos:a,totalPos:n}=this;throw RangeError(`Insufficient data in parsing ${p1(r)} at ${n} (${a} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async *decodeMultiAsync(e,t){if(this.entered){let i=this.clone();yield*i.decodeMultiAsync(e,t)}else try{this.entered=!0;let i=t,r=-1;for await(let a of e){if(t&&0===r)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a),i&&(r=this.readArraySize(),i=!1,this.complete());try{for(;yield this.doDecodeSync(),0!=--r;);}catch(e){if(!(e instanceof RangeError))throw e}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){let e,t=this.readHeadByte();if(t>=224)e=t-256;else if(t<192)if(t<128)e=t;else if(t<144){let i=t-128;if(0!==i){this.pushMapState(i),this.complete();continue}e={}}else if(t<160){let i=t-144;if(0!==i){this.pushArrayState(i),this.complete();continue}e=[]}else{let i=t-160;e=this.decodeString(i,0)}else if(192===t)e=null;else if(194===t)e=!1;else if(195===t)e=!0;else if(202===t)e=this.readF32();else if(203===t)e=this.readF64();else if(204===t)e=this.readU8();else if(205===t)e=this.readU16();else if(206===t)e=this.readU32();else if(207===t)e=this.useBigInt64?this.readU64AsBigInt():this.readU64();else if(208===t)e=this.readI8();else if(209===t)e=this.readI16();else if(210===t)e=this.readI32();else if(211===t)e=this.useBigInt64?this.readI64AsBigInt():this.readI64();else if(217===t){let t=this.lookU8();e=this.decodeString(t,1)}else if(218===t){let t=this.lookU16();e=this.decodeString(t,2)}else if(219===t){let t=this.lookU32();e=this.decodeString(t,4)}else if(220===t){let t=this.readU16();if(0!==t){this.pushArrayState(t),this.complete();continue}e=[]}else if(221===t){let t=this.readU32();if(0!==t){this.pushArrayState(t),this.complete();continue}e=[]}else if(222===t){let t=this.readU16();if(0!==t){this.pushMapState(t),this.complete();continue}e={}}else if(223===t){let t=this.readU32();if(0!==t){this.pushMapState(t),this.complete();continue}e={}}else if(196===t){let t=this.lookU8();e=this.decodeBinary(t,1)}else if(197===t){let t=this.lookU16();e=this.decodeBinary(t,2)}else if(198===t){let t=this.lookU32();e=this.decodeBinary(t,4)}else if(212===t)e=this.decodeExtension(1,0);else if(213===t)e=this.decodeExtension(2,0);else if(214===t)e=this.decodeExtension(4,0);else if(215===t)e=this.decodeExtension(8,0);else if(216===t)e=this.decodeExtension(16,0);else if(199===t){let t=this.lookU8();e=this.decodeExtension(t,1)}else if(200===t){let t=this.lookU16();e=this.decodeExtension(t,2)}else{if(201!==t)throw new pX(`Unrecognized type byte: ${p1(t)}`);{let t=this.lookU32();e=this.decodeExtension(t,4)}}this.complete();let i=this.stack;for(;i.length>0;){let t=i.top();if(t.type===p0){if(t.array[t.position]=e,t.position++,t.position!==t.size)continue e;e=t.array,i.release(t)}else{if(t.type===p2){if("__proto__"===e)throw new pX("The key __proto__ is not allowed");t.key=this.mapKeyConverter(e),t.type=p3;continue e}if(t.map[t.key]=e,t.readCount++,t.readCount!==t.size){t.key=null,t.type=p2;continue e}e=t.map,i.release(t)}}return e}}readHeadByte(){return -1===this.headByte&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=-1}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new pX(`Unrecognized array type byte: ${p1(e)}`)}}pushMapState(e){if(e>this.maxMapLength)throw new pX(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new pX(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,t){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,t):this.decodeBinary(e,t)}decodeUtf8String(e,t){var i;let r;if(e>this.maxStrLength)throw new pX(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+t+e)throw p7;let a=this.pos+t;return r=this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?this.keyDecoder.decode(this.bytes,a,e):(i=this.bytes,e>200?function(e,t,i){let r=e.subarray(t,t+i);return pH.decode(r)}(i,a,e):pq(i,a,e)),this.pos+=t+e,r}stateIsMapKey(){return this.stack.length>0&&this.stack.top().type===p2}decodeBinary(e,t){if(e>this.maxBinLength)throw new pX(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+t))throw p7;let i=this.pos+t,r=this.bytes.subarray(i,i+e);return this.pos+=t+e,r}decodeExtension(e,t){if(e>this.maxExtLength)throw new pX(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let i=this.view.getInt8(this.pos+t),r=this.decodeBinary(e,t+1);return this.extensionCodec.decode(r,i,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){var e,t;let i=(e=this.view,t=this.pos,0x100000000*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,i}readI64(){let e=pY(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}}let dt={flight_ids:["0000"]},di=(0,r.memo)(function({url:e,token:t,criteria:i,reconnectAttempts:a,reconnectInterval:n,onPositionReceived:o,onTokenExpiration:l,shouldConnect:s=!0}){let[c,u]=(0,r.useState)(t),[h,p]=(0,r.useState)(!1),d=s$(),f=(0,r.useCallback)(()=>{d(uw.info,"Socket opened","Horde Client"),((e,t)=>{let i=null;try{e&&(i=nW(e))}catch(e){console.error(e instanceof nH?e.message:e)}return null!==i&&(i.exp??0)>t+10})(c,Date.now()/1e3)?(d(uw.info,"Token is still valid","Horde Client"),p(!0)):(d(uw.info,"Token is invali
262d or expired","Horde Client"),(async()=>l?await l():null)().then(e=>{e?(d(uw.info,"Received new token","Horde Client"),u(e),p(!0)):p(!1)}).catch(e=>{console.error(e),p(!1)}))},[d,c,l]),m=(0,r.useCallback)(()=>{d(uw.info,"Socket closed","Horde Client")},[d]),{sendJsonMessage:g,readyState:y,getWebSocket:_}=pG(e,{onOpen:f,onClose:m,onMessage:(0,r.useCallback)(e=>{var t,i;d(uw.debug,"Message received","Horde Client");let r=(t=e.data,new de(i).decode(t));d(uw.debug,"Decoded message: ","Horde Client",r);let a=function(e,t){let i;if(!Array.isArray(e)||e.length<14)return null;let r=e[11];i=0===r?lp.Unchanged:null!==r&&r>0?lp.Increasing:null!==r&&r<0?lp.Decreasing:null;let a=function(e){if(0===e.length)return aQ.Unknown;switch(e.trim().at(0)?.toUpperCase()){case"A":return aQ.Adsb;case"P":return aQ.Projected;case"M":return aQ.Mlat;case"D":return aQ.Datalink;case"S":return aQ.Space;case"X":return aQ.Asdex;case"O":return aQ.Oceanic;case"Z":return aQ.Radar}return aQ.Unknown}(e[12]);return{flightId:e[0],ident:e[1],aircraftType:e[7],origin:e[8],destination:e[9],position:{latitude:e[2],longitude:e[3],gs:e[4],heading:e[5],altitude:null!==e[6]?100*e[6]:null,clock:e[10],verticalTrend:i,type:a,source:ld.Horde,airground:e[13],receivedAt:t}}}(r,Date.now()/1e3);null!==a&&null!==a.flightId?(d(uw.debug,"New position:","Horde Client",a),o(a)):d(uw.info,"Invalid horde message","Horde Client",a)},[d,o]),filter:()=>!1,shouldReconnect:(0,r.useCallback)(()=>!0,[]),reconnectAttempts:a,reconnectInterval:n},s);return(0,r.useEffect)(()=>{y===WebSocket.OPEN&&h&&(d(uw.info,"Sending initiation message","Horde Client"),_().binaryType="arraybuffer",g({token:c.trim(),criteria:i??dt}),p(!1))},[d,y,h]),(0,r.useEffect)(()=>{y===WebSocket.OPEN&&(d(uw.info,"Updating filtering criteria","Horde Client"),g(i??dt))},[d,JSON.stringify(i)]),r.createElement(r.Fragment,null)});var dr,da={exports:{}};U((dr||(dr=1,function(e,t){var i="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==N&&N,r=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();(function(e){var t=void 0!==r&&r||"undefined"!=typeof self&&self||void 0!==N&&N||{},i="URLSearchParams"in t,a="Symbol"in t&&"iterator"in Symbol,n="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in t,l="ArrayBuffer"in t;if(l)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function h(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return a&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function f(e){if(!e._noBody)return e.bodyUsed?Promise.reject(TypeError("Already read")):void(e.bodyUsed=!0)}function m(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function g(e){var t=new FileReader,i=m(t);return t.readAsArrayBuffer(e),i}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function _(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:n&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():l&&n&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(n)return this.blob().then(g);throw Error("could not read as ArrayBuffer")},this.text=function(){var e,t,i,r,a,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,i=m(t=new FileReader),a=(r=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?r[1]:"utf-8",t.readAsText(e,a),i;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),i=Array(t.length),r=0;r<t.length;r++)i[r]=String.fromCharCode(t[r]);return i.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(e,t){e=u(e),t=h(t);var i=this.map[e];this.map[e]=i?i+", "+t:t},d.prototype.delete=function(e){delete this.map[u(e)]},d.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},d.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},d.prototype.set=function(e,t){this.map[u(e)]=h(t)},d.prototype.forEach=function(e,t){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(t,this.map[i],i,this)},d.prototype.keys=function(){var e=[];return this.forEach(function(t,i){e.push(i)}),p(e)},d.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),p(e)},d.prototype.entries=function(){var e=[];return this.forEach(function(t,i){e.push([i,t])}),p(e)},a&&(d.prototype[Symbol.iterator]=d.prototype.entries);var b=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function x(e,i){if(!(this instanceof x))throw TypeError('Please use the "new" operator, this DOM object c
262onstructor cannot be called as a function.');var r,a,n=(i=i||{}).body;if(e instanceof x){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,i.headers||(this.headers=new d(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=i.credentials||this.credentials||"same-origin",!i.headers&&this.headers||(this.headers=new d(i.headers)),this.method=(a=(r=i.method||this.method||"GET").toUpperCase(),b.indexOf(a)>-1?a:r),this.mode=i.mode||this.mode||null,this.signal=i.signal||this.signal||function(){if("AbortController"in t)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),("GET"===this.method||"HEAD"===this.method)&&("no-store"===i.cache||"no-cache"===i.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var i=e.split("="),r=i.shift().replace(/\+/g," "),a=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}}),t}function w(e,t){if(!(this instanceof w))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})},_.call(x.prototype),_.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var z=[301,302,303,307,308];w.redirect=function(e,t){if(-1===z.indexOf(t))throw RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var i=Error(e);this.stack=i.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function S(i,r){return new Promise(function(a,o){var s=new x(i,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function p(){c.abort()}if(c.onload=function(){var e,t,i={statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var i=e.split(":"),r=i.shift().trim();if(r){var a=i.join(":").trim();try{t.append(r,a)}catch(e){console.warn("Response "+e.message)}}}),t)};0===s.url.indexOf("file://")&&(c.status<200||c.status>599)?i.status=200:i.status=c.status,i.url="responseURL"in c?c.responseURL:i.headers.get("X-Request-URL");var r="response"in c?c.response:c.responseText;setTimeout(function(){a(new w(r,i))},0)},c.onerror=function(){setTimeout(function(){o(TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){o(TypeError("Network request timed out"))},0)},c.onabort=function(){setTimeout(function(){o(new e.DOMException("Aborted","AbortError"))},0)},c.open(s.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(t){return e}}(s.url),!0),"include"===s.credentials?c.withCredentials=!0:"omit"===s.credentials&&(c.withCredentials=!1),"responseType"in c&&(n?c.responseType="blob":l&&(c.responseType="arraybuffer")),r&&"object"==typeof r.headers&&!(r.headers instanceof d||t.Headers&&r.headers instanceof t.Headers)){var f=[];
262Object.getOwnPropertyNames(r.headers).forEach(function(e){f.push(u(e)),c.setRequestHeader(e,h(r.headers[e]))}),s.headers.forEach(function(e,t){-1===f.indexOf(t)&&c.setRequestHeader(t,e)})}else s.headers.forEach(function(e,t){c.setRequestHeader(t,e)});s.signal&&(s.signal.addEventListener("abort",p),c.onreadystatechange=function(){4===c.readyState&&s.signal.removeEventListener("abort",p)}),c.send(void 0===s._bodyInit?null:s._bodyInit)})}S.polyfill=!0,t.fetch||(t.fetch=S,t.Headers=d,t.Request=x,t.Response=w),e.Headers=d,e.Request=x,e.Response=w,e.fetch=S,Object.defineProperty(e,"__esModule",{value:!0})})({}),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var a=i.fetch?i:r;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t}(da,da.exports)),da.exports));let dn=(e,t)=>{(0,r.useEffect)(()=>{if(void 0===t||0===t)return;let i=setInterval(()=>{e({requestPolicy:"network-only"})},1e3*t);return()=>{clearInterval(i)}},[t,e])},dl=({flightIds:e,includeTrack:t,pollingFrequency:i,trailLength:a,onError:n})=>e.length?r.createElement(ds,{flightIds:e,includeTrack:t,pollingFrequency:i,trailLength:a,onError:n}):null,ds=({flightIds:e,includeTrack:t,pollingFrequency:i,trailLength:n,onError:o})=>{let l=dc(e,t,n),s=Object.fromEntries(e.map((e,t)=>[`flightId${t}`,e])),c=!0===t&&void 0!==n&&n>0?{limit:n,limitType:"SECONDS_DESC"}:null,[u,h]=(0,a.IT)({query:l,variables:{...s,limitOptions:c}}),{loadFlights:p}=nN();return(0,r.useEffect)(()=>{if(u.error)void 0!==o&&o(u.error.message);else if(!u.fetching){let e=[];for(let t of Object.values(u.data))null!=t?.data?.id&&e.push({...t,id:t.data.id,hasFullTrack:!n&&void 0});p(e,Date.now()/1e3)}},[u,o,p,n]),dn(h,i),null},dc=(e,t,i)=>{if(0===e.length)throw Error("flightIds array cannot be empty");let r=e.map((e,t)=>`$flightId${t}: FlightID!`).join(", ");return!0===t&&void 0!==i&&i>0?`query GetFlightInfo(${r}, $limitOptions:TrackLimitOptions) { ${e.map((e,t)=>`flight${t}: flightById(id: $flightId${t}) { ...FlightInfo,
263                        ...FlightTrack
264                     }`).join(" ")} } ${(0,o.s)(nn)} ${(0,o.s)(no)}`:`query GetFlightInfo(${r}) { ${e.map((e,i)=>`flight${i}: flightById(id: $flightId${i}) { ...FlightInfo,
265                    ${t?"...FullFlightTrack":""}
266                 }`).join(" ")} } ${(0,o.s)(nn)} ${t?(0,o.s)(nl):""}`},du=({flights:e,trailLength:t,pollingFrequency:i,onError:a})=>e.length?r.createElement(dh,{flights:e,trailLength:t,pollingFrequency:i,onError:a}):null,dh=({flights:e,trailLength:t,pollingFrequency:i,onError:n})=>{let[o,l]=(0,a.IT)({query:dp(e,t)}),{loadFlightTrack:s}=nN();return(0,r.useEffect)(()=>{if(o.error)void 0!==n&&n(o.error.message);else if(!o.fetching)for(let e of Object.values(o.data))null!==e&&void 0!==e.trackList&&(null!==e.trackList&&nz(e.trackList),s(e.id,e.trackList,Date.now()/1e3))},[o,n,s]),dn(l,i),null},dp=(e,t)=>{if(0===e.length)throw Error("flightIds array cannot be empty");return(0,n.J1)`query GetFlightTracks { ${e.map((e,i)=>`flight${i}: flightById(id: "${e.id}") { id trackList${e.fetchFullTrack?"":`(limitOptions: { limitType: SECONDS_DESC, limit: ${t}})`}{         
267            latitude
268            longitude
269            clock
270            gs
271            heading
272            altitude
273            type } }`).join(" ")} }`},dd=({boundingBox:e,maxFlightAge:t,trailLength:i,onError:n,onSuccess:o})=>{var l;let s=s$(),[c]=(l={variables:{box:e,options:{includeSurface:!0},limitOptions:i?{limit:i,limitType:a3.SecondsDesc}:{limit:1,limitType:a3.PositionsDesc}}},a.IT({query:ns,...l})),{loadFlights:u}=nN();return(0,r.useEffect)(()=>{if(s(uw.info,"Fetching flights by bounding box","Bounding Box Fetcher"),c.error)void 0!==n&&(s(uw.error,"Failed to fetch flights by bounding box","Bounding Box Fetcher",c.error.message),n(c.error.message));else if(!c.fetching&&c.data){let e=Date.now()/1e3,r=c.data.flightsByBoundingBox,a=[];for(let n of r)if(null!==n&&null!=n.trackList){let r=n.trackList.at(-1);if(r&&e-r.clock>t)continue;nz(n.trackList),null!=n?.data?.id&&a.push({...n,id:n.data.id,hasFullTrack:!i&&void 0})}
273u(a,e),o&&o(),s(uw.info,`Fetched ${r.length} flights within bounding box`,"Bounding Box Fetcher")}},[c,n,s,u,o,t,i]),null},df=(e,t)=>{let i=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(i.size!==r.size)return!1;for(let[e,t]of i)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0};function dm(e){let t=r.useRef(void 0);return i=>{var r;let a=e(i);return Object.is(r=t.current,a)||"object"==typeof r&&null!==r&&"object"==typeof a&&null!==a&&Object.getPrototypeOf(r)===Object.getPrototypeOf(a)&&(Symbol.iterator in r&&Symbol.iterator in a?"entries"in r&&"entries"in a?df(r,a):((e,t)=>{let i=e[Symbol.iterator](),r=t[Symbol.iterator](),a=i.next(),n=r.next();for(;!a.done&&!n.done;){if(!Object.is(a.value,n.value))return!1;a=i.next(),n=r.next()}return!!a.done&&!!n.done})(r,a):df({entries:()=>Object.entries(r)},{entries:()=>Object.entries(a)}))?t.current:t.current=a}}let dg=({updateFrequency:e,maxFlightInfoAge:t,maxFlights:i,trailLength:a})=>{let n=(0,r.useRef)([]);return r.createElement(r.Fragment,null,r.createElement(dy,{flightsToUpdateRef:n,maxFlightInfoAge:t,maxFlights:i}),r.createElement(d_,{flightsToUpdateRef:n,fetchFrequency:e,trailLength:a}))},dy=({flightsToUpdateRef:e,maxFlightInfoAge:t,maxFlights:i})=>{let a=nB(),n=(e,t)=>!t||Date.now()/1e3-t>e,o=(0,r.useCallback)(e=>{let{lastUpdated:t,status:i}=e.data??{},{airground:r}=e.lastHordePosition??{};return null!==r&&n(30,t)&&(i===lh.Scheduled&&r||i===lh.Enroute&&!r)},[]);return(0,r.useEffect)(()=>{e.current=a.filter(e=>!e.isBlocked&&(n(t,e.data?.lastUpdated)||o(e))).slice(0,i).map(e=>e.id)},[a,e,o,t,i]),null},d_=({flightsToUpdateRef:e,fetchFrequency:t,trailLength:i})=>{let[a,n]=(0,r.useState)([]);return(0,r.useEffect)(()=>{let i=setInterval(()=>{n(e.current)},t);return()=>{clearInterval(i)}},[t,e]),r.createElement(dl,{flightIds:a,onError:e=>console.error(e),includeTrack:void 0!==i&&i>0,trailLength:i})},db=({trailLength:e})=>{let t=nB(),i=uR(e=>e.selectedFlightId),a=uR(e=>e.highlightedFlightId),n=t.filter(e=>(e.id===i||e.id===a)&&!0!==e.hasFullTrack).map(e=>({id:e.id,fetchFullTrack:!0}));return r.createElement(du,{flights:n,trailLength:e,onError:e=>console.error(e)})},dx=({maxFlightAge:e,frequency:t})=>{let{removeFlights:i}=nN(),a=(0,r.useMemo)(()=>{let e=new Map;return e.set(lh.Cancelled,1728e5),e.set(lh.Scheduled,1728e5),e},[]),n=(0,r.useCallback)(t=>{let i=t.trackList?.at(-1),r=void 0===i||Date.now()/1e3-i.clock>e;if(t?.data?.status){let e=a.get(t?.data?.status);return e?void 0!==i?(globalThis.mapDebugMode&&Date.now()/1e3-i.clock>e&&console.debug(`${t.id} removed: Last position exceeded timeout override of ${e}`),Date.now()/1e3-i.clock>e):t?.data?.lastUpdated?(globalThis.mapDebugMode&&Date.now()/1e3-t?.data?.lastUpdated>e&&console.debug(`${t.id} removed: Last data update time exceeded timeout override of ${e}`),Date.now()/1e3-t?.data?.lastUpdated>e):(globalThis.mapDebugMode&&console.debug(`${t.id} removed: Missing last update time`),!0):(globalThis.mapDebugMode&&r&&console.debug(`${t.id} removed: ${r}`),r)}return globalThis.mapDebugMode&&r&&console.debug(`${t.id} removed: ${r}`),r},[e,a]);return(0,r.useEffect)(()=>{let e=setInterval(()=>{i(n)},t);return()=>{clearInterval(e)}},[i,t,n]),null},dv=({config:e,dataUpdateOptions:t,pauseDataUpdates:i=!1,token:a,onTokenExpiration:n,onLoad:o,onViewportChanged:l,hordeCriteria:s,getAircraftColor:c,getAircraftIcon:u,getAircraftZoomLevel:h,getAircraftSortOrder:p,isFlightVisible:d,isAircraftVisible:f,isDataBlockVisible:m,onDataBlockPressed:g,onZoomInPressed:y,onZoomOutPressed:_,onZoomResetPressed:b,onAnimationFrame:x,dataLayersTime:v,sunlitEarthLayerTime:w,airborneGroundSpeedThreshold:z,mapRef:S})=>r.createElement(sV,{debugMode:e.debugMode},r.createElement(rO,{config:e},r.createElement(dw,{config:e,dataUpdateOptions:t,pauseDataUpdates:i,token:a,onTokenExpiration:n,onLoad:o,onViewportChanged:l,hordeCriteria:s,getAircraftColor:c,getAircraftIcon:u,getAircraftZoomLevel:h,getAircraftSortOrder:p,isFlightVisible:d,isAircraftVisible:f,isDataBlockVisible:m,onDataBlockPressed:g,onZoomInPressed:y,onZoomOutPressed:_,onZoomResetPressed:b,onAnimationFrame:x,dataLayersTime:v,sunlitEarthLayerTime:w,airborneGroundSpeedThreshold:z,mapRef:S}))),dw=({config:e,dataUpdateOptions:t,pauseDataUpdates:i,token:a,onTokenExpiration:n,onLoad:o,onViewportChanged:l,hordeCriteria:s,getAircraftColor:c,getAircraftIcon:u,getAircraftZoomLevel:h,getAircraftSortOrder:p,isFlightVisible:d,isAircraftVisible:f,isDataBlockVisible:m,onDataBlockPressed:g,onZoomInPressed:y,onZoomOutPressed:_,onZoomResetPressed:b,onAnimationFrame:x,dataLayersTime:v,sunlitEarthLayerTime:w,airborneGroundSpeedThreshold:z,mapRef:S})=>{let T=uR(e=>e.selectedFlightId),k=uR(e=>e.highlightedFlightId),E=(0,r.useRef)(T),M=(0,r.useRef)(k);(0,r.useEffect)(()=>{E.current=T},[T]),(0,r.useEffect)(()=>{M.current=k},[k]);let P=(0,r.useCallback)(e=>{let i=0;return t.maxTrackPositions>
2730&&e.id!==E.current&&e.id!==M.current&&Date.now()/1e3-(e.trackLastUpdated??-1/0)>300&&(i=t.maxTrackPositions),i},[t.maxTrackPositions]);return r.createElement(r.Fragment,null,r.createElement(pn,{mapRef:S,onLoad:o,onViewportChanged:l,getAircraftColor:c,getAircraftIcon:u,getAircraftZoomLevel:h,getAircraftSortOrder:p,isFlightVisible:d,isAircraftVisible:f,isDataBlockVisible:m,onDataBlockPressed:g,onZoomInPressed:y,onZoomOutPressed:_,onZoomResetPressed:b,onAnimationFrame:x,dataLayersTime:v,sunlitEarthLayerTime:w}),void 0!==s?r.createElement(dz,{criteria:s,token:a,onTokenExpiration:n,pauseUpdates:!0===i,updateFrequency:t.hordePositionUpdateFrequency,createFlights:t.createNewFlightsFromHorde,maxTrackPositions:P,airborneGroundSpeedThreshold:z}):null,!0!==i?r.createElement(r.Fragment,null,t.flightInfoUpdateFrequency>0?r.createElement(dg,{updateFrequency:t.flightInfoUpdateFrequency,maxFlightInfoAge:t.maxFlightInfoAge,maxFlights:t.flightInfoUpdateBatchSize,trailLength:e.tracks.trailLength}):null,t.fetchTracks?r.createElement(db,{trailLength:e.tracks.trailLength}):null,t.removeStaleFlights?r.createElement(dx,{maxFlightAge:t.maxFlightAge,frequency:1e4}):null):null)},dz=(0,r.memo)(function({criteria:e,token:t,onTokenExpiration:i,pauseUpdates:a,updateFrequency:n,createFlights:o,maxTrackPositions:l,airborneGroundSpeedThreshold:s}){let{horde:c,debugMode:u}=rF(),{addHordePositions:h}=nN(),p=(0,r.useRef)([]),d=(0,r.useCallback)(e=>!0!==a&&p.current.push(e),[a]);return(0,r.useEffect)(()=>{let e=setInterval(()=>{p.current.length>0&&(h(p.current,o,l,s),p.current=[])},n);return()=>{clearInterval(e)}},[h,o,l,p,n,s]),c.enabled?r.createElement(di,{criteria:e,url:c.url,token:t,reconnectAttempts:c.reconnectAttempts,reconnectInterval:c.reconnectInterval,onPositionReceived:d,onTokenExpiration:i,debugMode:u}):null}),dS=({includeTracks:e})=>{let t=uR(e=>e.selectedFlightId),i=uR(e=>e.highlightedFlightId),a=[];return t&&a.push(t),i&&a.push(i),a.length?r.createElement(dl,{flightIds:a,includeTrack:e,onError:e=>console.error(e)}):r.createElement(r.Fragment,null)},dT={zoomOnGround:!1},dk=({config:e,options:t,token:i,onTokenExpiration:o,mapRef:l,flightInfoUpdateFrequency:s=500,flightInfoUpdateBatchSize:u=50,maxFlightInfoAge:h=300,maxFlightAge:p=600,maxTrackPositions:d=10,hordePositionUpdateFrequency:f=500,createNewFlightsFromHorde:m,removeStaleFlights:g,pauseDataUpdates:y=!1,getAircraftColor:_,getAircraftIcon:b,isAircraftVisible:x,isDataBlockVisible:v,focusedFlightIdent:w,fitFocusedFlightBounds:z=!0,followSelectedFlight:S=!1,followFlightOptions:T,onLoad:k,onDataBlockPressed:E,onZoomInPressed:M,onZoomOutPressed:P,onZoomResetPressed:I,dataLayersTime:A,sunlitEarthLayerTime:C,urqlClient:R,airborneGroundSpeedThreshold:L})=>{let D=(0,r.useMemo)(()=>rM({},rP,e),[e]),O=(0,r.useMemo)(()=>R??((e,t,i)=>{let r;return(e||null!=i)&&(r=(e=>(0,c.K)(async t=>({addAuthToOperation(e){let i=localStorage.getItem("mapToken")??"",r=!1;try{nW(i),r=!0}catch(e){console.error(e instanceof nH?e.message:e)}return r?t.appendHeaders(e,{Authorization:`Bearer ${i}`}):e},didAuthError:e=>e.graphQLErrors.some(e=>"UNAUTHORIZED"===e.extensions?.code),willAuthError(){let e=localStorage.getItem("mapToken")??"",t=null;try{t=nW(e)}catch(e){console.error(e instanceof nH?e.message:e)}return!t||void 0!==t.exp&&t.exp<(Date.now()+3e4)/1e3},async refreshAuth(){if(e)try{let t=await e();nW(t),localStorage.setItem("mapToken",t)}catch(e){console.error(e instanceof nH?e.message:e)}}})))(i)),e&&localStorage.setItem("mapToken",e),(0,n.UU)({url:t,exchanges:r?[n.WG,r,n.cI]:[n.WG,n.cI],fetch:void 0,fetchOptions:{headers:{"content-type":"application/json"}},preferGetMethod:!1})})(i,D.flightsApi.endpointUrl,o),[D.flightsApi.endpointUrl,o,i,R]),F=(0,r.useRef)(null);return r.createElement(a.Kq,{value:O},r.createElement(dM,{config:D,mapOptions:t,dataUpdateOptions:{flightInfoUpdateFrequency:s,flightInfoUpdateBatchSize:u,maxFlightAge:p,maxFlightInfoAge:h,hordePositionUpdateFrequency:f,fetchTracks:"singleFlight"!==t.mode&&"allFlights"!==t.mode,maxTrackPositions:d,createNewFlightsFromHorde:m??"singleFlight"!==t.mode,removeStaleFlights:g??"singleFlight"!==t.mode},pauseDataUpdates:y,token:i,onTokenExpiration:o,getAircraftColor:_,getAircraftIcon:b,isAircraftVisible:x,isDataBlockVisible:v,mapRef:l??F,onDataBlockPressed:E,onZoomInPressed:M,onZoomOutPressed:P,onZoomResetPressed:I,onLoad:k,fitFocusedFlightBounds:z,followSelectedFlight:S,followFlightOptions:T,dataLayersTime:A,sunlitEarthLayerTime:C,airborneGroundSpeedThreshold:L}),r.createElement(dE,{focusedFlightId:"singleFlight"===t.mode?t.flightId:void 0,focusedFlightIdent:w}))}
273,dE=({focusedFlightId:e,focusedFlightIdent:t})=>{let i=nB(),a=uv(e=>e.setFocusedFlight),n=uv(e=>e.clearFocusedFlight);return(0,r.useEffect)(()=>{let r;if(e?r=i.find(t=>t.id===e):t&&(r=i.find(e=>e.data?.ids.iata===t.toUpperCase()||e.data?.ids.icao===t.toUpperCase()||e.data?.ids.ident===t.toUpperCase())),void 0!==r){let{padding:{top:e,bottom:t,left:i,right:n},scaleFactors:{boundingBoxPadding:o}}=rP.appearance;a(r.id,(e=>{let t=[-180,-90,180,90];if(null===e)return t;let i=-90,r=90,a=-99999,n=99999,o=new Set,l=!1,s=!1,c=!1,u=!1,h=e?.data?.origin.location?e.data.origin.location[0]:null,p=e?.data?.origin.location?e.data.origin.location[1]:null;null!==h&&null!==p&&rC(h,p)&&(o.add({longitude:h,latitude:p}),l=!0);let d=e?.data?.destination?.location?e.data.destination.location[0]:null,f=e?.data?.destination?.location?e.data.destination.location[1]:null;null!==d&&null!==f&&rC(d,f)&&(o.add({longitude:d,latitude:f}),s=!0);let m=!1;if(null!==e.trackList&&void 0!==e.trackList&&e.trackList.forEach((t,i)=>{null!=t&&rC(t?.longitude,t?.latitude)&&(o.add({latitude:t.latitude,longitude:t.longitude}),u=!0);let r=e.trackList?.at(i-1)?.longitude;null!=r&&!m&&Math.abs(r-t.longitude)>270&&(m=!0)}),null!=e.planList&&e.planList.forEach((t,i)=>{rC(t[0],t[1])&&(o.add({longitude:t[0],latitude:t[1]}),c=!0);let r=e.planList?.at(i-1)?.at(0);null!=r&&!m&&Math.abs(r-t[0])>270&&(m=!0)}),o.forEach(e=>{r=Math.min(e.latitude,r),i=Math.max(e.latitude,i),n=Math.min(e.longitude,n),a=Math.max(e.longitude,a)}),r>i||n>a)return t;let g=[n,r,a,i];if(l&&s&&!c&&!u){if(180>Math.abs(g[0]-g[2]))return g;m=!0}return m?(i=-90,r=90,a=-99999,n=99999,o.forEach(e=>{let t=e.longitude<0?e.longitude+360:e.longitude;r=Math.min(e.latitude,r),i=Math.max(e.latitude,i),n=Math.min(t,n),a=Math.max(t,a)}),[n,r,a,i]):g})(r),{top:e*o,bottom:t*o,left:i*o,right:n*o})}else n()},[t,e,i,a,n]),null},dM=(0,r.memo)(function({config:e,mapOptions:t,dataUpdateOptions:i,pauseDataUpdates:a,token:n,onTokenExpiration:o,getAircraftColor:l,getAircraftIcon:s,isAircraftVisible:c,isDataBlockVisible:u,mapRef:h,onLoad:p,onDataBlockPressed:d,onZoomInPressed:f,onZoomOutPressed:m,onZoomResetPressed:g,fitFocusedFlightBounds:y,followSelectedFlight:_,followFlightOptions:b,dataLayersTime:x,sunlitEarthLayerTime:v,airborneGroundSpeedThreshold:w}){let z=e.baseLayerOptions?.[e.baseLayer].fill??"light",[S,T]=(0,r.useState)(),[k,E]=(0,r.useState)(),[M,P]=(0,r.useState)(),[I,A]=(0,r.useState)(!1),[C,R]=(0,r.useState)(null),L=uv(e=>e.focusedFlightId),D=(0,r.useRef)(null),O=(0,r.useRef)(null),F=(0,r.useRef)(t);((e,t,i)=>{let a=uv(e=>e.focusedFlightId),n=uv(dm(e=>e.focusedFlightBoundingBox)),o=uv(dm(e=>e.focusedFlightPadding)),[l,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(),[h,p]=(0,r.useState)(),d=(0,r.useRef)(null);(0,r.useEffect)(()=>{!0===i&&null!=e.current&&("singleFlight"!==t.mode&&(a&&null===d.current&&(u(e.current.getZoom()),p(e.current.getCenter())),d.current=a),s(!0))},[i,a,e,t.mode]),(0,r.useEffect)(()=>{null!=e.current&&l&&(null!==a&&null!==n?e.current.fitBounds(n,{padding:o}):null===a&&void 0!==c&&void 0!==h&&(e.current.flyTo({center:h,zoom:c}),u(void 0),p(void 0)),s(!1))},[l,a,n,c,h,e,t.mode,o]),(0,r.useEffect)(()=>{u(void 0),p(void 0),s(!1)},[t])})(h,t,y),((e,t,i,a=dT)=>{let n=null!=i,o=!1===i?.airground||null!=i?.gs&&i.gs<(a.groundSpeedThreshold??120);(0,r.useEffect)(()=>{let i=e.current?.getMap();i&&(t&&n?(i.dragPan.disable(),i.scrollZoom.disable(),i.scrollZoom.enable({around:"center"})):(i.dragPan.enable(),i.scrollZoom.disable(),i.scrollZoom.enable()))},[e,t,n]),(0,r.useEffect)(()=>{let r=e.current?.getMap();r&&t&&null!=i&&r.jumpTo({center:{lng:i.longitude,lat:i.latitude}})},[e,t,i]),(0,r.useEffect)(()=>{let i=e.current?.getMap();i&&t&&o&&a.zoomOnGround&&i.jumpTo({zoom:a.groundZoomLevel??15})},[e,t,o,a.zoomOnGround,a.groundZoomLevel])})(h,_,C,b);let j=(0,r.useCallback)(e=>{_&&R(e.find(e=>e.flight.id===O.current)?.currentPosition??null)},[_]),B=(0,r.useCallback)(e=>{if(l)return l(e);switch(F.current.mode){case"airport":case"airportSurface":return function(e,t,i){let r=o5(e,t),a=o5(e,i);return t||i?r&&a?"-NEARBY":r?"-DEPARTED":a?"-ARRIVED":"-NEARBY":"-UNKNOWN"}(F.current.airport,e.data?.origin??null,e.data?.destination??null);default:return oA(z)}
273},[l,z]),N=uR(e=>e.selectedFlightId),U=(0,r.useCallback)(e=>"allFlights"!==F.current.mode||e.id===O.current||void 0!==F.current.isHighPriorityFlight&&F.current.isHighPriorityFlight(e)?0:Math.floor(10*(1/(1-Math.exp(-5))*(1-Math.exp(-5*(sJ(e.id)/0x100000000))))),[]),V=(0,r.useCallback)(e=>"allFlights"!==F.current.mode?0:void 0!==F.current.isHighPriorityFlight&&F.current.isHighPriorityFlight(e)?1:0,[]),$=(0,r.useCallback)(e=>{E(pa(e)),void 0!==p&&p()},[p]),Z=(0,r.useCallback)(e=>{E(e)},[]),G=(0,r.useCallback)(t=>{let i=(null!=t.data?.lastUpdated||t.isBlocked||"allFlights"===F.current.mode)&&(null==D.current&&"singleFlight"!==F.current.mode||t.id===D.current),r=!("singleFlight"===F.current.mode&&!nM(t,Date.now()/1e3,e.horde.enabled)),a="airline"!==F.current.mode||!!t.data?.airline?.icao&&F.current.operatorPrefixes.includes(t.data.airline.icao);return i&&r&&a},[e.horde.enabled]),q=(0,r.useCallback)(i=>("airport"===t.mode||"airportSurface"===t.mode)&&(!e.appearance.dataBlock.hideForSurfaceFlights||!1!==i.isAirborne)&&("arrivals"===t.dataBlockAirportMode?i.data?.destination?.icao===t.airport.icao:"departures"===t.dataBlockAirportMode?i.data?.origin?.icao===t.airport.icao:"all"===t.dataBlockAirportMode&&(i.data?.origin?.icao===t.airport.icao||i.data?.destination?.icao===t.airport.icao)),[e.appearance.dataBlock.hideForSurfaceFlights,t]);return null==u&&("airport"===t.mode||"airportSurface"===t.mode)&&t.dataBlockAirportMode&&(u=q),(0,r.useEffect)(()=>{F.current=t},[t]),(0,r.useEffect)(()=>{uL(L),D.current=L},[L]),(0,r.useEffect)(()=>{O.current=N},[N]),(0,r.useEffect)(()=>{switch(t.mode){case"airline":T(t.operatorPrefixes&&t.operatorPrefixes.length>0?{carriers:t.operatorPrefixes}:null);break;case"airport":{let e=t.airport.icao??t.airport.iata??t.airport.lid??"";e&&(t.customHordeCriteria?T(t.customHordeCriteria):T({origins:[e],dests:[e],ors:[["origins","dests"]]}));break}case"aircraftType":t.aircraftTypeCode&&T({actypes:[t.aircraftTypeCode]});break;case"airportSurface":void 0!==k&&T(k.zoom>=11?{latlon:{min_lon:k.minLon-.1,max_lon:k.maxLon+.1,min_lat:k.minLat-.1,max_lat:k.maxLat+.1}}:null);break;case"allFlights":void 0!==k&&(t.customHordeCriteria?T(t.customHordeCriteria):T({latlon:{min_lon:k.minLon,max_lon:k.maxLon,min_lat:k.minLat,max_lat:k.maxLat}}));break;case"singleFlight":!1===t.shouldOpenHordeConnection?T(void 0):t.customHordeCriteria?T(t.customHordeCriteria):T(""!==t.flightId?{flight_ids:[t.flightId]}:null);break;default:T(void 0)}},[t,k]),(0,r.useEffect)(()=>{"airportSurface"===t.mode&&null!=t.airport.boundingBox?P(t.airport.boundingBox):P(void 0)},[t]),r.createElement(r.Fragment,null,r.createElement(dv,{config:e,dataUpdateOptions:i,pauseDataUpdates:a,token:n,onTokenExpiration:o,onLoad:$,onViewportChanged:Z,hordeCriteria:S,getAircraftColor:B,getAircraftIcon:s,getAircraftZoomLevel:U,getAircraftSortOrder:V,isFlightVisible:G,isAircraftVisible:c,isDataBlockVisible:u,mapRef:h,onDataBlockPressed:d,onZoomInPressed:f,onZoomOutPressed:m,onZoomResetPressed:g,onAnimationFrame:j,dataLayersTime:x,sunlitEarthLayerTime:v,airborneGroundSpeedThreshold:w}),M&&!I&&n&&r.createElement(dd,{boundingBox:M,maxFlightAge:i.maxFlightAge,trailLength:nw(e.tracks.trailLength),onError:e=>console.error(e),onSuccess:()=>A(!0)}),"allFlights"===t.mode&&r.createElement(r.Fragment,null,t.fetchSelectedFlightInfo?r.createElement(dS,{includeTracks:t.includeTracks??!1}):null))},function(e,t){return globalThis.mapDebugMode&&function e(t,i,r=""){new Set([...Object.keys(t),...Object.keys(i)]).forEach(a=>{let n=r?`${r}.${a}`:a,o=t[a],l=i[a];o!==l&&("object"==typeof o&&"object"==typeof l&&o&&l?e(o,l,n):(console.debug(`Props are not equal: {${n}}`),"function"!=typeof o&&"function"!=typeof l&&console.debug(`Previous value={${o}}, next value={${l}}`)))})}(e,t),tI.isEqual(e,t)})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.