PageSourceSearch

https://www.hoteldewageningscheberg.nl/data/static/fletcher-assets/js/osm.min.js

js hoteldewageningscheberg.nl collected 2026-09-29 02:39:02 UTC 479,853 bytes, 29 lines download raw bytes

1const vf={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};class xf extends Error{constructor(e){const t=vf[e];super(t),this.code=e,this.name="AssertionError",this.message=t}}const Dh=xf;class Ef{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const mt=Ef,Xn={PROPERTYCHANGE:"propertychange"};class wf{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const Hs=wf;function Cf(i,e,t){let n,r;t=t||Zi;let s=0,o=i.length,a=!1;for(;s<o;)n=s+(o-s>>1),r=+t(i[n],e),r<0?s=n+1:(o=n,a=!r);return a?s:~s}function Zi(i,e){return i>e?1:i<e?-1:0}function Js(i,e,t){if(i[0]<=e)return 0;const n=i.length;if(e<=i[n-1])return n-1;if(typeof t=="function"){for(let r=1;r<n;++r){const s=i[r];if(s===e)return r;if(s<e)return t(e,i[r-1],s)>0?r-1:r}return n-1}if(t>0){for(let r=1;r<n;++r)if(i[r]<e)return r-1;return n-1}if(t<0){for(let r=1;r<n;++r)if(i[r]<=e)return r;return n-1}for(let r=1;r<n;++r){if(i[r]==e)return r;if(i[r]<e)return i[r-1]-e<e-i[r]?r-1:r}return n-1}function Tf(i,e,t){for(;e<t;){const n=i[e];i[e]=i[t],i[t]=n,++e,--t}}function Mt(i,e){const t=Array.isArray(e)?e:[e],n=t.length;for(let r=0;r<n;r++)i[i.length]=t[r]}function Ti(i,e){const t=i.length;if(t!==e.length)return!1;for(let n=0;n<t;n++)if(i[n]!==e[n])return!1;return!0}function Rf(i,e,t){const n=e||Zi;return i.every(function(r,s){if(s===0)return!0;const o=n(i[s-1],r);return!(o>0||t&&o===0)})}function yr(){return!0}function $s(){return!1}function Wn(){}function bf(i){let e=!1,t,n,r;return function(){const s=Array.prototype.slice.call(arguments);return(!e||this!==r||!Ti(s,n))&&(e=!0,r=this,n=s,t=i.apply(this,arguments)),t}}function Or(i){for(const e in i)delete i[e]}function Ui(i){let e;for(e in i)return!1;return!e}class If extends Hs{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,t){if(!e||!t)return;const n=this.listeners_||(this.listeners_={}),r=n[e]||(n[e]=[]);r.includes(t)||r.push(t)}
1dispatchEvent(e){const t=typeof e=="string",n=t?e:e.type,r=this.listeners_&&this.listeners_[n];if(!r)return;const s=t?new mt(e):e;s.target||(s.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});n in o||(o[n]=0,a[n]=0),++o[n];let l;for(let u=0,h=r.length;u<h;++u)if("handleEvent"in r[u]?l=r[u].handleEvent(s):l=r[u].call(this,s),l===!1||s.propagationStopped){l=!1;break}if(--o[n]===0){let u=a[n];for(delete a[n];u--;)this.removeEventListener(n,Wn);delete o[n]}return l}disposeInternal(){this.listeners_&&Or(this.listeners_)}getListeners(e){return this.listeners_&&this.listeners_[e]||void 0}hasListener(e){return this.listeners_?e?e in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(e,t){const n=this.listeners_&&this.listeners_[e];if(n){const r=n.indexOf(t);r!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(n[r]=Wn,++this.pendingRemovals_[e]):(n.splice(r,1),n.length===0&&delete this.listeners_[e]))}}}const Dr=If,B={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function ie(i,e,t,n,r){if(n&&n!==i&&(t=t.bind(n)),r){const o=t;t=function(){i.removeEventListener(e,t),o.apply(this,arguments)}}const s={target:i,type:e,listener:t};return i.addEventListener(e,t),s}function vs(i,e,t,n){return ie(i,e,t,n,!0)}function he(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),Or(i))}class Qs extends Dr{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(B.CHANGE)}getRevision(){return this.revision_}onInternal(e,t){if(Array.isArray(e)){const n=e.length,r=new Array(n);for(let s=0;s<n;++s)r[s]=ie(this,e[s],t);return r}return ie(this,e,t)}onceInternal(e,t){let n;if(Array.isArray(e)){const r=e.length;n=new Array(r);for(let s=0;s<r;++s)n[s]=vs(this,e[s],t)}else n=vs(this,e,t);return t.ol_key=n,n}unInternal(e,t){const n=t.ol_key;if(n)Sf(n);else if(Array.isArray(e))for(let r=0,s=e.length;r<s;++r)this.removeEventListener(e[r],t);else this.removeEventListener(e,t)}}Qs.prototype.on;Qs.prototype.once;Qs.prototype.un;function Sf(i){if(Array.isArray(i))for(let e=0,t=i.length;e<t;++e)he(i[e]);else he(i)}const zh=Qs;function W(){throw new Error("Unimplemented abstract method.")}let Mf=0;function Z(i){return i.ol_uid||(i.ol_uid=String(++Mf))}class mu extends mt{constructor(e,t,n){super(e),this.key=t,this.oldValue=n}}class Ff extends zh{constructor(e){super(),this.on,this.once,this.un,Z(this),this.values_=null,e!==void 0&&this.setProperties(e)}get(e){let t;return this.values_&&this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}hasProperties(){return!!this.values_}notify(e,t){let n;n=`change:${e}`,this.hasListener(n)&&this.dispatchEvent(new mu(n,e,t)),n=Xn.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new mu(n,e,t))}addChangeListener(e,t){this.addEventListener(`change:${e}`,t)}removeChangeListener(e,t){this.removeEventListener(`change:${e}`,t)}set(e,t,n){const r=this.values_||(this.values_={});if(n)r[e]=t;else{const s=r[e];r[e]=t,s!==t&&this.notify(e,s)}}setProperties(e,t){for(const n in e)this.set(n,e[n],t)}applyProperties(e){e.values_&&Object.assign(this.values_||(this.values_={}),e.values_)}unset(e,t){if(this.values_&&e in this.values_){const n=this.values_[e];delete this.values_[e],Ui(this.values_)&&(this.values_=null),t||this.notify(e,n)}}}const yt=Ff,Ue={ADD:"add",REMOVE:"remove"},yu={LENGTH:"length"};class Jr extends mt{constructor(e,t,n){super(e),this.element=t,this.index=n}}class Pf extends yt{constructor(e,t){if(super(),this.on,this.once,this.un,t=t||{},this.unique_=!!t.unique,this.array_=e||[],this.unique_)for(let n=0,r=this.array_.length;n<r;++n)this.assertUnique_(this.array_[n],n);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(e){for(let t=0,n=e.length;t<n;++t)this.push(e[t]);return this}forEach(e){const t=this.array_;for(let n=0,r=t.length;n<r;++n)e(t[n],n,t)}getArray(){return this.array_}item(e){return this.array_[e]}getLength(){return this.get(yu.LENGTH)}insertAt(e,t){if(e<0||e>this.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t),this.array_.splice(e,0,t),this.updateLength_(),this.dispatchEvent(new Jr(Ue.ADD,t,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const t=this.getLength();return this.insertAt(t,e),this.getLength()}remove(e){const t=this.array_;for(let n=0,r=t.length;n<r;++n)if(t[n]===e)return this.removeAt(n)}removeAt(e){if(e<0||e>=this.getLength())return;const t=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new Jr(Ue.REMOVE,t,e)),t}setAt(e,t){const n=this.getLength();if(e>=n){this.insertAt(e,t);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t,e);const r=this.array_[e];this.array_[e]=t,this.dispatchEvent(new Jr(Ue.REMOVE,r,e)),this.dispatchEvent(new Jr(Ue.ADD,t,e))}updateLength_(){this.set(yu.LENGTH,this.array_.length)}assertUnique_(e,t){for(let n=0,r=this.array_.length;n<r;++n)if(this.array_[n]===e&&n!==t)throw new Dh(58)}}const It=Pf;function H(i,e){if(!i)throw new Dh(e)}class Ba extends yt{constructor(e){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),e)if(typeof e.getSimplifiedGeometry=="function"){const t=e;this.setGeometry(t)}else{const t=e;this.setProperties(t)}}clone(){const e=new Ba(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());const t=this.getGeometry();t&&e.setGeometry(t.clone());const n=this.getStyle();return n&&e.setStyle(n),e}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(he(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=ie(e,B.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?Lf(e):void 0,this.changed()}setId(e){this.id_=e,this.changed()}setGeometryName(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function Lf(i){if(typeof i=="function")return i;let e;return Array.isArray(i)?e=i:(H(typeof i.getZIndex=="function",41),e=[i]),function(){return e}}const Af=Ba,wi=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",kf=wi.includes("firefox"),Of=wi.includes("safari")&&!wi.includes("chrom");Of&&(wi.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(wi));const Df=wi.includes("webkit")&&!wi.includes("edge"),Nh=wi.includes("macintosh"),Gh=typeof devicePixelRatio<"u"?devicePixelRatio:1,Za=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,zf=typeof Image<"u"&&Image.prototype.decode,jh=function(){let i=!1;try{const e=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return i}(),Xh=new Array(6);function He(){return[1,0,0,1,0,0]}function _u(i){return eo(i,1,0,0,1,0,0)}function Ua(i,e){const t=i[0],n=i[1],r=i[2],s=i[3],o=i[4],a=i[5],l=e[0],u=e[1],h=e[2],c=e[3],d=e[4],f=e[5];return i[0]=t*l+r*u,i[1]=n*l+s*u,i[2]=t*h+r*c,i[3]=n*h+s*c,i[4]=t*d+r*f+o,i[5]=n*d+s*f+a,i}function eo(i,e,t,n,r,s,o){return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i[4]=s,i[5]=o,i}function Nf(i,e){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i}function me(i,e){const t=e[0],n=e[1];return e[0]=i[0]*t+i[2]*n+i[4],e[1]=i[1]*t+i[3]*n+i[5],e}function ko(i,e,t){return Ua(i,eo(Xh,e,0,0,t,0,0))}function Gf(i,e,t){return eo(i,e,0,0,t,0,0)}function jf(i,e,t){return Ua(i,eo(Xh,1,0,0,1,e,t))}function pt(i,e,t,n,r,s,o,a){const l=Math.sin(s),u=Math.cos(s);return i[0]=n*u,i[1]=r*l,i[2]=-n*l,i[3]=r*u,i[4]=o*n*u-a*n*l+e,i[5]=o*r*l+a*r*u+t,i}function to(i,e){const t=Xf(e);H(t!==0,32);const n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],l=e[5];return i[0]=o/t,i[1]=-r/t,i[2]=-s/t,i[3]=n/t,i[4]=(s*l-o*a)/t,i[5]=-(n*l-r*a)/t,i}function Xf(i){return i[0]*i[3]-i[1]*i[2]}let vu;function Ka(i){const e="matrix("+i.join(", ")+")";if(Za)return e;const t=vu||(vu=document.createElement("div"));return t.style.transform=e,t.style.transform}const be={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function da(i){const e=at();for(let t=0,n=i.length;t<n;++t)dr(e,i[t]);return e}function Wf(i,e,t){const n=Math.min.apply(null,i),r=Math.min.apply(null,e),s=Math.max.apply(null,i),o=Math.max.apply(null,e);return Jt(n,r,s,o,t)}function mi(i,e,t){return t?(t[0]=i[0]-e,t[1]=i[1]-e,t[2]=i[2]+e,t[3]=i[3]+e,t):[i[0]-e,i[1]-e,i[2]+e,i[3]+e]}function Wh(i,e){return e?(e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e):i.slice()}function cn(i,e,t){let n,r;return e<i[0]?n=i[0]-e:i[2]<e?n=e-i[2]:n=0,t<i[1]?r=i[1]-t:i[3]<t?r=t-i[3]:r=0,n*n+r*r}function zr(i,e){return qa(i,e[0],e[1])}function Vt(i,e){return i[0]<=e[0]&&e[2]<=i[2]&&i[1]<=e[1]&&e[3]<=i[3]}function qa(i,e,t){return i[0]<=e&&e<=i[2]&&i[1]<=t&&t<=i[3]}function fa(i,e){const t=i[0],n=i[1],r=i[2],s=i[3],o=e[0],a=e[1];let l=be.UNKNOWN;return o<t?l=l|be.LEFT:o>r&&(l=l|be.RIGHT),a<n?l=l|be.BELOW:a>s&&(l=l|be.ABOVE),l===be.UNKNOWN&&(l=be.INTERSECTING),l}function at(){return[1/0,1/0,-1/0,-1/0]}function Jt(i,e,t,n,r){return r?(r[0]=i,r[1]=e,r[2]=t,r[3]=n,r):[i,e,t,n]}function Yn(i){return Jt(1/0,1/0,-1/0,-1/0,i)}function Vh(i,e){const t=i[0],n=i[1];return Jt(t,n,t,n,e)}function Ha(i,e,t,n,r){const s=Yn(r);return Bh(s,i,e,t,n)}function $t(i,e){return i[0]==e[0]&&i[2]==e[2]&&i[1]==e[1]&&i[3]==e[3]}function Yh(i,e){return e[0]<i[0]&&(i[0]=e[0]),e[2]>i[2]&&(i[2]=e[2]),e[1]<i[1]&&(i[1]=e[1]),e[3]>i[3]&&(i[3]=e[3]),i}function dr(i,e){e[0]<i[0]&&(i[0]=e[0]),e[0]>i[2]&&(i[2]=e[0]),e[1]<i[1]&&(i[1]=e[1]),e[1]>i[3]&&(i[3]=e[1])}function Bh(i,e,t,n,r){for(;t<n;t+=r)Vf(i,e[t],e[t+1]);return i}function Vf(i,e,t){i[0]=Math.min(i[0],e),i[1]=Math.min(i[1],t),i[2]=Math.max(i[2],e),i[3]=Math.max(i[3],t)}function Zh(i,e){let t;return t=e(io(i)),t||(t=e(no(i)),t)||(t=e(ro(i)),t)||(t=e(ei(i)),t)?t:!1}function ga(i){let e=0;return dn(i)||(e=oe(i)*ke(i)),e}function io(i){return[i[0],i[1]]}function no(i){return[i[2],i[1]]}function Lt(i){return[(i[0]+i[2])/2,(i[1]+i[3])/2]}function Yf(i,e){let t;return e==="bottom-left"?t=io(i):e==="bottom-right"?t=no(i):e==="top-left"?t=ei(i):e==="top-right"?t=ro(i):H(!1,13),t}function pa(i,e,t,n,r){const[s,o,a,l,u,h,c,d]=ma(i,e,t,n);return Jt(Math.min(s,a,u,c),Math.min(o,l,h,d),Math.max(s,a,u,c),Math.max(o,l,h,d),r)}function ma(i,e,t,n){const r=e*n[0]/2,s=e*n[1]/2,o=Math.cos(t),a=Math.sin(t),l=r*o,u=r*a,h=s*o,c=s*a,d=i[0],f=i[1];return[d-l+c,f-u-h,d-l-c,f-u+h,d+l-c,f+u+h,d+l+c,f+u-h,d-l+c,f-u-h]}function ke(i){return i[3]-i[1]}function Zt(i,e,t){const n=t||at();return pe(i,e)?(i[0]>e[0]?n[0]=i[0]:n[0]=e[0],i[1]>e[1]?n[1]=i[1]:n[1]=e[1],i[2]<e[2]?n[2]=i[2]:n[2]=e[2],i[3]<e[3]?n[3]=i[3]:n[3]=e[3]):Yn(n),n}function ei(i){return[i[0],i[3]]}function ro(i){return[i[2],i[3]]}function oe(i){return i[2]-i[0]}function pe(i,e){return i[0]<=e[2]&&i[2]>=e[0]&&i[1]<=e[3]&&i[3]>=e[1]}function dn(i){return i[2]<i[0]||i[3]<i[1]}function Bf(i,e){return e?(e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e):i}function Zf(i,e,t){let n=!1;const r=fa(i,e),s=fa(i,t);if(r===be.INTERSECTING||s===be.INTERSECTING)n=!0;else{const o=i[0],a=i[1],l=i[2],u=i[3],h=e[0],c=e[1],d=t[0],f=t[1],g=(f-c)/(d-h);let p,m;s&be.ABOVE&&!(r&be.ABOVE)&&(p=d-(f-u)/g,n=p>=o&&p<=l),!n&&s&be.RIGHT&&!(r&be.RIGHT)&&(m=f-(d-l)*g,n=m>=a&&m<=u),!n&&s&be.BELOW&&!(r&be.BELOW)&&(p=d-(f-a)/g,n=p>=o&&p<=l),!n&&s&be.LEFT&&!(r&be.LEFT)&&(m=f-(d-o)*g,n=m>=a&&m<=u)}return n}function Uf(i,e,t,n){if(dn(i))return Yn(t);let r=[];if(n>1){const a=i[2]-i[0],l=i[3]-i[1];for(let u=0;u<n;++u)r.push(i[0]+a*u/n,i[1],i[2],i[1]+l*u/n,i[2]-a*u/n,i[3],i[0],i[3]-l*u/n)}else r=[i[0],i[1],i[2],i[1],i[2],i[3],i[0],i[3]];e(r,r,2);const s=[],o=[];for(let a=0,l=r.length;a<l;a+=2)s.push(r[a]),o.push(r[a+1]);return Wf(s,o,t)}function Uh(i,e){const t=e.getExtent(),n=Lt(i);if(e.canWrapX()&&(n[0]<t[0]||n[0]>=t[2])){const r=oe(t),o=Math.floor((n[0]-t[0])/r)*r;i[0]-=o,i[2]-=o}return i}function Kf(i,e){if(e.canWrapX()){const t=e.getExtent();if(!isFinite(i[0])||!isFinite(i[2]))return[[t[0],i[1],t[2],i[3]]];Uh(i,e);const n=oe(t);if(oe(i)>n)return[[t[0],i[1],t[2],i[3]]];if(i[0]<t[0])return[[i[0]+n,i[1],t[2],i[3]],[t[0],i[1],i[2],i[3]]];if(i[2]>t[2])return[[i[0],i[1],t[2],i[3]],[t[0],i[1],i[2]-n,i[3]]]}return[i]}const Ci={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};
1class qf{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Ci[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Ja=qf,Nr=6378137,Pn=Math.PI*Nr,Hf=[-Pn,-Pn,Pn,Pn],Jf=[-180,-85,180,85],$r=Nr*Math.log(Math.tan(Math.PI/2));class _n extends Ja{constructor(e){super({code:e,units:"m",extent:Hf,global:!0,worldExtent:Jf,getPointResolution:function(t,n){return t/Math.cosh(n[1]/Nr)}})}}const xu=[new _n("EPSG:3857"),new _n("EPSG:102100"),new _n("EPSG:102113"),new _n("EPSG:900913"),new _n("http://www.opengis.net/def/crs/EPSG/0/3857"),new _n("http://www.opengis.net/gml/srs/epsg.xml#3857")];function $f(i,e,t){const n=i.length;t=t>1?t:2,e===void 0&&(t>2?e=i.slice():e=new Array(n));for(let r=0;r<n;r+=t){e[r]=Pn*i[r]/180;let s=Nr*Math.log(Math.tan(Math.PI*(+i[r+1]+90)/360));s>$r?s=$r:s<-$r&&(s=-$r),e[r+1]=s}return e}function Qf(i,e,t){const n=i.length;t=t>1?t:2,e===void 0&&(t>2?e=i.slice():e=new Array(n));for(let r=0;r<n;r+=t)e[r]=180*i[r]/Pn,e[r+1]=360*Math.atan(Math.exp(i[r+1]/Nr))/Math.PI-90;return e}const eg=6378137,Eu=[-180,-90,180,90],tg=Math.PI*eg/180;class ki extends Ja{constructor(e,t){super({code:e,units:"degrees",extent:Eu,axisOrientation:t,global:!0,metersPerUnit:tg,worldExtent:Eu})}}const wu=[new ki("CRS:84"),new ki("EPSG:4326","neu"),new ki("urn:ogc:def:crs:OGC:1.3:CRS84"),new ki("urn:ogc:def:crs:OGC:2:84"),new ki("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new ki("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new ki("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let ya={};function ig(i){return ya[i]||ya[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function ng(i,e){ya[i]=e}let kn={};function xs(i,e,t){const n=i.getCode(),r=e.getCode();n in kn||(kn[n]={}),kn[n][r]=t}function rg(i,e){let t;return i in kn&&e in kn[i]&&(t=kn[i][e]),t}function ye(i,e,t){return Math.min(Math.max(i,e),t)}function sg(i,e,t,n,r,s){const o=r-t,a=s-n;if(o!==0||a!==0){const l=((i-t)*o+(e-n)*a)/(o*o+a*a);l>1?(t=r,n=s):l>
10&&(t+=o*l,n+=a*l)}return Yi(i,e,t,n)}function Yi(i,e,t,n){const r=t-i,s=n-e;return r*r+s*s}function og(i){const e=i.length;for(let n=0;n<e;n++){let r=n,s=Math.abs(i[n][n]);for(let a=n+1;a<e;a++){const l=Math.abs(i[a][n]);l>s&&(s=l,r=a)}if(s===0)return null;const o=i[r];i[r]=i[n],i[n]=o;for(let a=n+1;a<e;a++){const l=-i[a][n]/i[n][n];for(let u=n;u<e+1;u++)n==u?i[a][u]=0:i[a][u]+=l*i[n][u]}}const t=new Array(e);for(let n=e-1;n>=0;n--){t[n]=i[n][e]/i[n][n];for(let r=n-1;r>=0;r--)i[r][e]-=i[r][n]*t[n]}return t}function ms(i){return i*Math.PI/180}function On(i,e){const t=i%e;return t*e<0?t+e:t}function Je(i,e,t){return i+t*(e-i)}function $a(i,e){const t=Math.pow(10,e);return Math.round(i*t)/t}function Qr(i,e){return Math.floor($a(i,e))}function es(i,e){return Math.ceil($a(i,e))}function ag(i,e){return i[0]+=+e[0],i[1]+=+e[1],i}function Es(i,e){let t=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=e[n]){t=!1;break}return t}function Qa(i,e){const t=Math.cos(e),n=Math.sin(e),r=i[0]*t-i[1]*n,s=i[1]*t+i[0]*n;return i[0]=r,i[1]=s,i}function lg(i,e){return i[0]*=e,i[1]*=e,i}function el(i,e){if(e.canWrapX()){const t=oe(e.getExtent()),n=ug(i,e,t);n&&(i[0]-=n*t)}return i}function ug(i,e,t){const n=e.getExtent();let r=0;return e.canWrapX()&&(i[0]<n[0]||i[0]>n[2])&&(t=t||oe(n),r=Math.floor((i[0]-n[0])/t)),r}const hg=63710088e-1;function Cu(i,e,t){t=t||hg;const n=ms(i[1]),r=ms(e[1]),s=(r-n)/2,o=ms(e[0]-i[0])/2,a=Math.sin(s)*Math.sin(s)+Math.sin(o)*Math.sin(o)*Math.cos(n)*Math.cos(r);return 2*t*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}const Kh={info:1,warn:2,error:3,none:4};let cg=Kh.info;function qh(...i){cg>Kh.warn||console.warn(...i)}let _a=!0;function Hh(i){_a=!(i===void 0?!0:i)}function tl(i,e){if(e!==void 0){for(let t=0,n=i.length;t<n;++t)e[t]=i[t];e=e}else e=i.slice();return e}function Jh(i,e){if(e!==void 0&&i!==e){for(let t=0,n=i.length;t<n;++t)e[t]=i[t];i=e}return i}function dg(i){ng(i.getCode(),i),xs(i,i,tl)}function fg(i){i.forEach(dg)}function le(i){return typeof i=="string"?ig(i):i||null}function Tu(i,e,t,n){i=le(i);let r;const s=i.getPointResolutionFunc();if(s){if(r=s(e,t),n&&n!==i.getUnits()){const o=i.getMetersPerUnit();o&&(r=r*o/Ci[n])}}else{const o=i.getUnits();if(o=="degrees"&&!n||n=="degrees")r=e;else{const a=so(i,le("EPSG:4326"));if(a===Jh&&o!=="degrees")r=e*i.getMetersPerUnit();else{let u=[t[0]-e/2,t[1],t[0]+e/2,t[1],t[0],t[1]-e/2,t[0],t[1]+e/2];u=a(u,u,2);const h=Cu(u.slice(0,2),u.slice(2,4)),c=Cu(u.slice(4,6),u.slice(6,8));r=(h+c)/2}const l=n?Ci[n]:i.getMetersPerUnit();l!==void 0&&(r/=l)}}return r}function Ru(i){fg(i),i.forEach(function(e){i.forEach(function(t){e!==t&&xs(e,t,tl)})})}function gg(i,e,t,n){i.forEach(function(r){e.forEach(function(s){xs(r,s,t),xs(s,r,n)})})}function il(i,e){return i?typeof i=="string"?le(i):i:le(e)}function je(i,e){return Hh(),$h(i,"EPSG:4326",e!==void 0?e:"EPSG:3857")}function Rt(i,e){if(i===e)return!0;const t=i.getUnits()===e.getUnits();return(i.getCode()===e.getCode()||so(i,e)===tl)&&t}function so(i,e){const t=i.getCode(),n=e.getCode();let r=rg(t,n);return r||(r=Jh),r}function ws(i,e){const t=le(i),n=le(e);return so(t,n)}function $h(i,e,t){return ws(e,t)(i,void 0,i.length)}function va(i,e){return i}function Gt(i,e){return _a&&!Es(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(_a=!1,qh("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function Qh(i,e){return i}function Yt(i,e){return i}function pg(){Ru(xu),Ru(wu),gg(wu,xu,$f,Qf)}pg();function yi(i,e,t,n,r,s){s=s||[];let o=0;for(let a=e;a<t;a+=n){const l=i[a],u=i[a+1];s[o++]=r[0]*l+r[2]*u+r[4],s[o++]=r[1]*l+r[3]*u+r[5]}return s&&s.length!=o&&(s.length=o),s}function ec(i,e,t,n,r,s,o){o=o||[];const a=Math.cos(r),l=Math.sin(r),u=s[0],h=s[1];let c=0;for(let d=e;d<t;d+=n){const f=i[d]-u,g=i[d+1]-h;o[c++]=u+f*a-g*l,o[c++]=h+f*l+g*a;for(let p=d+2;p<d+n;++p)o[c++]=i[p]}return o&&o.length!=c&&(o.length=c),o}function mg(i,e,t,n,r,s,o,a){a=a||[];const l=o[0],u=o[1];let h=0;for(let c=e;c<t;c+=n){const d=i[c]-l,f=i[c+1]-u;a[h++]=l+r*d,a[h++]=u+s*f;for(let g=c+2;g<c+n;++g)a[h++]=i[g]}return a&&a.length!=h&&(a.length=h),a}function yg(i,e,t,n,r,s,o){o=o||[];let a=0;for(let l=e;l<t;l+=n){o[a++]=i[l]+r,o[a++]=i[l+1]+s;for(let u=l+2;u<l+n;++u)o[a++]=i[u]}return o&&o.length!=a&&(o.length=a),o}const bu=He();class _g extends yt{constructor(){super(),this.extent_=at(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=bf(function(e,t,n){if(!n)return this.get
1SimplifiedGeometry(t);const r=this.clone();return r.applyTransform(n),r.getSimplifiedGeometry(t)})}simplifyTransformed(e,t){return this.simplifyTransformedInternal(this.getRevision(),e,t)}clone(){return W()}closestPointXY(e,t,n,r){return W()}containsXY(e,t){const n=this.getClosestPoint([e,t]);return n[0]===e&&n[1]===t}getClosestPoint(e,t){return t=t||[NaN,NaN],this.closestPointXY(e[0],e[1],t,1/0),t}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return W()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&Yn(t),this.extentRevision_=this.getRevision()}return Bf(this.extent_,e)}rotate(e,t){W()}scale(e,t,n){W()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return W()}getType(){return W()}applyTransform(e){W()}intersectsExtent(e){return W()}translate(e,t){W()}transform(e,t){const n=le(e),r=n.getUnits()=="tile-pixels"?function(s,o,a){const l=n.getExtent(),u=n.getWorldExtent(),h=ke(u)/ke(l);return pt(bu,u[0],u[3],h,-h,0,0,0),yi(s,0,s.length,a,bu,o),ws(n,t)(s,o,a)}:ws(n,t);return this.applyTransform(r),this}}const tc=_g;class vg extends tc{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(e){return Ha(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return W()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=this.getSimplifiedGeometryInternal(e);return t.getFlatCoordinates().length<this.flatCoordinates.length?t:(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getSimplifiedGeometryInternal(e){return this}getStride(){return this.stride}setFlatCoordinates(e,t){this.stride=Iu(e),this.layout=e,this.flatCoordinates=t}setCoordinates(e,t){W()}setLayout(e,t,n){let r;if(e)r=Iu(e);else{for(let s=0;s<n;++s){if(t.length===0){this.layout="XY",this.stride=2;return}t=t[0]}r=t.length,e=xg(r)}this.layout=e,this.stride=r}applyTransform(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(e,t){const n=this.getFlatCoordinates();if(n){const r=this.getStride();ec(n,0,n.length,r,e,t,n),this.changed()}}scale(e,t,n){t===void 0&&(t=e),n||(n=Lt(this.getExtent()));const r=this.getFlatCoordinates();if(r){const s=this.getStride();mg(r,0,r.length,s,e,t,n,r),this.changed()}}translate(e,t){const n=this.getFlatCoordinates();if(n){const r=this.getStride();yg(n,0,n.length,r,e,t,n),this.changed()}}}function xg(i){let e;return i==2?e="XY":i==3?e="XYZ":i==4&&(e="XYZM"),e}function Iu(i){let e;return i=="XY"?e=2:i=="XYZ"||i=="XYM"?e=3:i=="XYZM"&&(e=4),e}function Eg(i,e,t){const n=i.getFlatCoordinates();if(!n)return null;const r=i.getStride();return yi(n,0,n.length,r,e,t)}const fn=vg;function Su(i,e,t,n,r,s,o){const a=i[e],l=i[e+1],u=i[t]-a,h=i[t+1]-l;let c;if(u===0&&h===0)c=e;else{const d=((r-a)*u+(s-l)*h)/(u*u+h*h);if(d>1)c=t;else if(d>0){for(let f=0;f<n;++f)o[f]=Je(i[e+f],i[t+f],d);o.length=n;return}else c=e}for(let d=0;d<n;++d)o[d]=i[c+d];o.length=n}function nl(i,e,t,n,r){let s=i[e],o=i[e+1];for(e+=n;e<t;e+=n){const a=i[e],l=i[e+1],u=Yi(s,o,a,l);u>r&&(r=u),s=a,o=l}return r}function rl(i,e,t,n,r){for(let s=0,o=t.length;s<o;++s){const a=t[s];r=nl(i,e,a,n,r),e=a}return r}function wg(i,e,t,n,r){for(let s=0,o=t.length;s<o;++s){const a=t[s];r=rl(i,e,a,n,r),e=a[a.length-1]}return r}function sl(i,e,t,n,r,s,o,a,l,u,h){if(e==t)return u;let c,d;if(r===0){if(d=Yi(o,a,i[e],i[e+1]),d<u){for(c=0;c<n;++c)l[c]=i[e+c];return l.length=n,d}return u}h=h||[NaN,NaN];let f=e+n;for(;f<t;)if(Su(i,f-n,f,n,o,a,h),d=Yi(o,a,h[0],h[1]),d<u){for(u=d,c=0;c<n;++c)l[c]=h[c];l.length=n,f+=n}else f+=n*Math.max((Math.sqrt(d)-Math.sqrt(u))/r|0,1);if(s&&(Su(i,t-n,e,n,o,a,h),d=Yi(o,a,h[0],h[1]),d<u)){for(u=d,c=0;c<n;++c)l[c]=h[c];l.length=n}return u}function ol(i,e,t,n,r,s,o,a,l,u,h){h=h||[NaN,NaN];for(let c=0,d=t.length;c<d;++c){const f=t[c];u=sl(i,e,f,n,r,s,o,a,l,u,h),e=f}return u}function Cg(i,e,t,n,r,s,o,a,l,u,h){h=h||[NaN,NaN];for(let c=0,d=t.length;c<d;++c){const f=t[c];u=ol(i,e,f,n,r,s,o,a,l,u,h),e=f[f.length-1]}return u}function Tg(i,e,t,n){for(let r=0,s=t.length;r<s;++r)i[e++]=t[r];return e}function oo(i,e,t,n){for(let r=0,s=t.length;r<s;++r){const o=t[r];for(let a=0;a<n;++a)i[e++]=o[a]}return e}function al(i,e,t,n,r){r=r||[];let s=0;for(let o=0,a=t.length;o<a;++o){const l=oo(i,e,t[o],n);r[s++]=l,e=l}return r.length=s,r}function Rg(i,e,t,n,r){r=r||[];let s=0;for(let o=0,a=t.length;o<a;++o){const l=al(i,e,t[o],n,r[s]);l.length===0&&(l[0]=e),r[s++]=l,e=l[l.length-1]}return r.length=s,r}function ll(i,e,t,n,r,s,o){const a=(t-e)/n;if(a<3){for(;e<t;e+=n)s[o++]=i[e],s[o++]=i[e+1];return o}const l=new Array(a);l[0]=1,l[a-1]=1;const u=[e,t-n];let h=0;for(;u.length>0;){const c=u.pop(),d=u.pop();let f=0;const g=i[d],p=i[d+1],m=i[c],_=i[c+1];for(let y=d+n;y<c;y+=n){const x=i[y],v=i[y+1],E=sg(x,v,g,p,m,_);
1E>f&&(h=y,f=E)}f>r&&(l[(h-e)/n]=1,d+n<h&&u.push(d,h),h+n<c&&u.push(h,c))}for(let c=0;c<a;++c)l[c]&&(s[o++]=i[e+c*n],s[o++]=i[e+c*n+1]);return o}function bg(i,e,t,n,r,s,o,a){for(let l=0,u=t.length;l<u;++l){const h=t[l];o=ll(i,e,h,n,r,s,o),a.push(o),e=h}return o}function Gi(i,e){return e*Math.round(i/e)}function Ig(i,e,t,n,r,s,o){if(e==t)return o;let a=Gi(i[e],r),l=Gi(i[e+1],r);e+=n,s[o++]=a,s[o++]=l;let u,h;do if(u=Gi(i[e],r),h=Gi(i[e+1],r),e+=n,e==t)return s[o++]=u,s[o++]=h,o;while(u==a&&h==l);for(;e<t;){const c=Gi(i[e],r),d=Gi(i[e+1],r);if(e+=n,c==u&&d==h)continue;const f=u-a,g=h-l,p=c-a,m=d-l;if(f*m==g*p&&(f<0&&p<f||f==p||f>0&&p>f)&&(g<0&&m<g||g==m||g>0&&m>g)){u=c,h=d;continue}s[o++]=u,s[o++]=h,a=u,l=h,u=c,h=d}return s[o++]=u,s[o++]=h,o}function ic(i,e,t,n,r,s,o,a){for(let l=0,u=t.length;l<u;++l){const h=t[l];o=Ig(i,e,h,n,r,s,o),a.push(o),e=h}return o}function Sg(i,e,t,n,r,s,o,a){for(let l=0,u=t.length;l<u;++l){const h=t[l],c=[];o=ic(i,e,h,n,r,s,o,c),a.push(c),e=h[h.length-1]}return o}function fi(i,e,t,n,r){r=r!==void 0?r:[];let s=0;for(let o=e;o<t;o+=n)r[s++]=i.slice(o,o+n);return r.length=s,r}function _r(i,e,t,n,r){r=r!==void 0?r:[];let s=0;for(let o=0,a=t.length;o<a;++o){const l=t[o];r[s++]=fi(i,e,l,n,r[s]),e=l}return r.length=s,r}function xa(i,e,t,n,r){r=r!==void 0?r:[];let s=0;for(let o=0,a=t.length;o<a;++o){const l=t[o];r[s++]=l.length===1&&l[0]===e?[]:_r(i,e,l,n,r[s]),e=l[l.length-1]}return r.length=s,r}function nc(i,e,t,n){let r=0,s=i[t-n],o=i[t-n+1];for(;e<t;e+=n){const a=i[e],l=i[e+1];r+=o*a-s*l,s=a,o=l}return r/2}function rc(i,e,t,n){let r=0;for(let s=0,o=t.length;s<o;++s){const a=t[s];r+=nc(i,e,a,n),e=a}return r}function Mg(i,e,t,n){let r=0;for(let s=0,o=t.length;s<o;++s){const a=t[s];r+=rc(i,e,a,n),e=a[a.length-1]}return r}class Cs extends fn{constructor(e,t){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,t!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}clone(){return new Cs(this.flatCoordinates.slice(),this.layout)}closestPointXY(e,t,n,r){return r<cn(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(nl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,e,t,n,r))}getArea(){return nc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return fi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(e){const t=[];return t.length=ll(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new Cs(t,"XY")}getType(){return"LinearRing"}intersectsExtent(e){return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=oo(this.flatCoordinates,0,e,this.stride),this.changed()}}const Mu=Cs;class ul extends fn{constructor(e,t){super(),this.setCoordinates(e,t)}clone(){const e=new ul(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,n,r){const s=this.flatCoordinates,o=Yi(e,t,s[0],s[1]);if(o<r){const a=this.stride;for(let l=0;l<a;++l)n[l]=s[l];return n.length=a,o}return r}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(e){return Vh(this.flatCoordinates,e)}getType(){return"Point"}intersectsExtent(e){return qa(e,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(e,t){this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Tg(this.flatCoordinates,0,e,this.stride),this.changed()}}const vr=ul;function Fg(i,e,t,n,r){return!Zh(r,function(o){return!ji(i,e,t,n,o[0],o[1])})}function ji(i,e,t,n,r,s){let o=0,a=i[t-n],l=i[t-n+1];for(;e<t;e+=n){const u=i[e],h=i[e+1];l<=s?h>s&&(u-a)*(s-l)-(r-a)*(h-l)>0&&o++:h<=s&&(u-a)*(s-l)-(r-a)*(h-l)<0&&o--,a=u,l=h}return o!==0}function hl(i,e,t,n,r,s){if(t.length===0||!ji(i,e,t[0],n,r,s))return!1;for(let o=1,a=t.length;o<a;++o)if(ji(i,t[o-1],t[o],n,r,s))return!1;return!0}
1function Pg(i,e,t,n,r,s){if(t.length===0)return!1;for(let o=0,a=t.length;o<a;++o){const l=t[o];if(hl(i,e,l,n,r,s))return!0;e=l[l.length-1]}return!1}function cl(i,e,t,n,r,s,o){let a,l,u,h,c,d,f;const g=r[s+1],p=[];for(let y=0,x=t.length;y<x;++y){const v=t[y];for(h=i[v-n],d=i[v-n+1],a=e;a<v;a+=n)c=i[a],f=i[a+1],(g<=d&&f<=g||d<=g&&g<=f)&&(u=(g-d)/(f-d)*(c-h)+h,p.push(u)),h=c,d=f}let m=NaN,_=-1/0;for(p.sort(Zi),h=p[0],a=1,l=p.length;a<l;++a){c=p[a];const y=Math.abs(c-h);y>_&&(u=(h+c)/2,hl(i,e,t,n,u,g)&&(m=u,_=y)),h=c}return isNaN(m)&&(m=r[s]),o?(o.push(m,g,_),o):[m,g,_]}function sc(i,e,t,n,r){let s=[];for(let o=0,a=t.length;o<a;++o){const l=t[o];s=cl(i,e,l,n,r,2*o,s),e=l[l.length-1]}return s}function oc(i,e,t,n,r){let s;for(e+=n;e<t;e+=n)if(s=r(i.slice(e-n,e),i.slice(e,e+n)),s)return s;return!1}function ao(i,e,t,n,r){const s=Bh(at(),i,e,t,n);return pe(r,s)?Vt(r,s)||s[0]>=r[0]&&s[2]<=r[2]||s[1]>=r[1]&&s[3]<=r[3]?!0:oc(i,e,t,n,function(o,a){return Zf(r,o,a)}):!1}function Lg(i,e,t,n,r){for(let s=0,o=t.length;s<o;++s){if(ao(i,e,t[s],n,r))return!0;e=t[s]}return!1}function ac(i,e,t,n,r){return!!(ao(i,e,t,n,r)||ji(i,e,t,n,r[0],r[1])||ji(i,e,t,n,r[0],r[3])||ji(i,e,t,n,r[2],r[1])||ji(i,e,t,n,r[2],r[3]))}function lc(i,e,t,n,r){if(!ac(i,e,t[0],n,r))return!1;if(t.length===1)return!0;for(let s=1,o=t.length;s<o;++s)if(Fg(i,t[s-1],t[s],n,r)&&!ao(i,t[s-1],t[s],n,r))return!1;return!0}function Ag(i,e,t,n,r){for(let s=0,o=t.length;s<o;++s){const a=t[s];if(lc(i,e,a,n,r))return!0;e=a[a.length-1]}return!1}function kg(i,e,t,n){for(;e<t-n;){for(let r=0;r<n;++r){const s=i[e+r];i[e+r]=i[t-n+r],i[t-n+r]=s}e+=n,t-=n}}function dl(i,e,t,n){let r=0,s=i[t-n],o=i[t-n+1];for(;e<t;e+=n){const a=i[e],l=i[e+1];r+=(a-s)*(l+o),s=a,o=l}return r===0?void 0:r>0}function uc(i,e,t,n,r){r=r!==void 0?r:!1;for(let s=0,o=t.length;s<o;++s){const a=t[s],l=dl(i,e,a,n);if(s===0){if(r&&l||!r&&!l)return!1}else if(r&&!l||!r&&l)return!1;e=a}return!0}function Og(i,e,t,n,r){for(let s=0,o=t.length;s<o;++s){const a=t[s];if(!uc(i,e,a,n,r))return!1;a.length&&(e=a[a.length-1])}return!0}function Ea(i,e,t,n,r){r=r!==void 0?r:!1;for(let s=0,o=t.length;s<o;++s){const a=t[s],l=dl(i,e,a,n);(s===0?r&&l||!r&&!l:r&&!l||!r&&l)&&kg(i,e,a,n),e=a}return e}function Fu(i,e,t,n,r){for(let s=0,o=t.length;s<o;++s)e=Ea(i,e,t[s],n,r);return e}function Dg(i,e){const t=[];let n=0,r=0;for(let s=0,o=e.length;s<o;++s){const a=e[s];if(!dl(i,n,a,2))t.push(e.slice(r,s+1));else{if(t.length===0)continue;t[t.length-1].push(e[r])}r=s+1,n=a}return t}class xr extends fn{constructor(e,t,n){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,t!==void 0&&n?(this.setFlatCoordinates(t,e),this.ends_=n):this.setCoordinates(e,t)}appendLinearRing(e){this.flatCoordinates?Mt(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new xr(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,n,r){return r<cn(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rl(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ol(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,n,r))}containsXY(e,t){return hl(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)}getArea(){return rc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(e){let t;return e!==void 0?(t=this.getOrientedFlatCoordinates().slice(),Ea(t,0,this.ends_,this.stride,e)):t=this.flatCoordinates,_r(t,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const e=Lt(this.getExtent());this.flatInteriorPoint_=cl(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new vr(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(e){return e<0||this.ends_.length<=e?null:new Mu(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLinearRings(){const e=this.layout,t=this.flatCoordinates,n=this.ends_,r=[];let s=0;for(let o=0,a=n.length;o<a;++o){const l=n[o],u=new Mu(t.slice(s,l),e);r.push(u),s=l}return r}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;uc(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=Ea(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],n=[];return t.length=ic(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,n),new xr(t,"XY",n)}getType(){return"Polygon"}intersectsExtent(e){return lc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=al(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Er=xr;function Pu(i){if(dn(i))throw new Error("Cannot create polygon from empty extent");const e=i[0],t=i[1],n=i[2],r=i[3],s=[e,t,e,r,n,r,n,t,e,t];return new xr(s,"XY",[s.length])}const Ft={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class fl{constructor(e){e=e||{},this.color_=e.color!==void 0?e.color:null}clone(){const e=this.getColor();return new fl({color:Array.isArray(e)?e.slice():e||void 0})}getColor(){return this.color_}setColor(e){this.color_=e}}const Xi=fl;function Ts(i,e,t,n,r,s,o){let a,l;const u=(t-e)/n;if(u===1)a=e;else if(u===2)a=e,l=r;else if(u!==0){let h=i[e],c=i[e+1],d=0;const f=[0];for(let m=e+n;m<t;m+=n){const _=i[m],y=i[m+1];d+=Math.sqrt((_-h)*(_-h)+(y-c)*(y-c)),f.push(d),h=_,c=y}const g=r*d,p=Cf(f,g);p<0?(l=(g-f[-p-2])/(f[-p-1]-f[-p-2]),a=e+(-p-2)*n):a=e+p*n}o=o>1?o:2,s=s||new Array(o);for(let h=0;h<o;++h)s[h]=a===void 0?NaN:l===void 0?i[a+h]:Je(i[a+h],i[a+n+h],l);return s}
1function wa(i,e,t,n,r,s){if(t==e)return null;let o;if(r<i[e+n-1])return s?(o=i.slice(e,e+n),o[n-1]=r,o):null;if(i[t-1]<r)return s?(o=i.slice(t-n,t),o[n-1]=r,o):null;if(r==i[e+n-1])return i.slice(e,e+n);let a=e/n,l=t/n;for(;a<l;){const d=a+l>>1;r<i[(d+1)*n-1]?l=d:a=d+1}const u=i[a*n-1];if(r==u)return i.slice((a-1)*n,(a-1)*n+n);const h=i[(a+1)*n-1],c=(r-u)/(h-u);o=[];for(let d=0;d<n-1;++d)o.push(Je(i[(a-1)*n+d],i[a*n+d],c));return o.push(r),o}function zg(i,e,t,n,r,s,o){if(o)return wa(i,e,t[t.length-1],n,r,s);let a;if(r<i[n-1])return s?(a=i.slice(0,n),a[n-1]=r,a):null;if(i[i.length-1]<r)return s?(a=i.slice(i.length-n),a[n-1]=r,a):null;for(let l=0,u=t.length;l<u;++l){const h=t[l];if(e!=h){if(r<i[e+n-1])return null;if(r<=i[h-1])return wa(i,e,h,n,r,!1);e=h}}return null}function hc(i,e,t,n){let r=i[e],s=i[e+1],o=0;for(let a=e+n;a<t;a+=n){const l=i[a],u=i[a+1];o+=Math.sqrt((l-r)*(l-r)+(u-s)*(u-s)),r=l,s=u}return o}class Rs extends fn{constructor(e,t){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,t!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendCoordinate(e){this.flatCoordinates?Mt(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()}clone(){const e=new Rs(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,n,r){return r<cn(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(nl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,n,r))}forEachSegment(e){return oc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinateAtM(e,t){return this.layout!="XYM"&&this.layout!="XYZM"?null:(t=t!==void 0?t:!1,wa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t))}getCoordinates(){return fi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(e,t){return Ts(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,this.stride)}getLength(){return hc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(e){const t=[];return t.length=ll(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new Rs(t,"XY")}getType(){return"LineString"}intersectsExtent(e){return ao(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=oo(this.flatCoordinates,0,e,this.stride),this.changed()}}const bs=Rs;class gl{constructor(e){e=e||{},this.color_=e.color!==void 0?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=e.lineDash!==void 0?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}clone(){const e=this.getColor();return new gl({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(e){this.color_=e}setLineCap(e){this.lineCap_=e}setLineDash(e){this.lineDash_=e}setLineDashOffset(e){this.lineDashOffset_=e}setLineJoin(e){this.lineJoin_=e}setMiterLimit(e){this.miterLimit_=e}setWidth(e){this.width_=e}}const Ln=gl,q={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function Lu(i){return i[0]>0&&i[1]>0}function Ng(i,e,t){return t===void 0&&(t=[0,0]),t[0]=i[0]*e+.5|0,t[1]=i[1]*e+.5|0,t}function qe(i,e){return Array.isArray(i)?i:(e===void 0?e=[i,i]:(e[0]=i,e[1]=i),e)}class pl{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=qe(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new pl({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return W()}getImage(e){return W()}getHitDetectionImage(){return W()}getPixelRatio(e){return 1}getImageState(){return W()}getImageSize(){return W()}getOrigin(){return W()}getSize(){return W()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=qe(e)}listenImageChange(e){W()}load(){W()}unlistenImageChange(e){W()}}const cc=pl,Gg=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,jg=/^([a-z]*)$|^hsla?\(.*\)$/i;function dc(i){return typeof i=="string"?i:fc(i)}function Xg(i){const e=document.createElement("div");if(e.style.color=i,e.style.color!==""){document.body.appendChild(e);const t=getComputedStyle(e).color;return document.body.removeChild(e),t}return""}const Wg=function(){const e={};let t=0;return function(n){let r;if(e.hasOwnProperty(n))r=e[n];else{if(t>=1024){let s=0;for(const o in e)s++&3||(delete e[o],--t)}r=Vg(n),e[n]=r,++t}return r}}();function Is(i){return Array.isArray(i)?i:Wg(i)}function Vg(i){let e,t,n,r,s;if(jg.exec(i)&&(i=Xg(i)),Gg.exec(i)){const o=i.length-1;let a;o<=4?a=1:a=2;const l=o===4||o===8;e=parseInt(i.substr(1+0*a,a),16),t=parseInt(i.substr(1+1*a,a),16),n=parseInt(i.substr(1+2*a,a),16),l?r=parseInt(i.substr(1+3*a,a),16):r=255,a==1&&(e=(e<<4)+e,t=(t<<4)+t,n=(n<<4)+n,l&&(r=(r<<4)+r)),s=[e,t,n,r/255]}else i.startsWith("rgba(")?(s=i.slice(5,-1).split(",").map(Number),Au(s)):i.startsWith("rgb(")?(s=i.slice(4,-1).split(",").map(Number),s.push(1),Au(s)):H(!1,14);return s}function Au(i){return i[0]=ye(i[0]+.5|0,0,255),i[1]=ye(i[1]+.5|0,0,255),i[2]=ye(i[2]+.5|0,0,255),i[3]=ye(i[3],0,1),i}function fc(i){let e=i[0];
1e!=(e|0)&&(e=e+.5|0);let t=i[1];t!=(t|0)&&(t=t+.5|0);let n=i[2];n!=(n|0)&&(n=n+.5|0);const r=i[3]===void 0?1:Math.round(i[3]*100)/100;return"rgba("+e+","+t+","+n+","+r+")"}function St(i){return Array.isArray(i)?fc(i):i}function we(i,e,t,n){let r;return t&&t.length?r=t.shift():Za?r=new OffscreenCanvas(i||300,e||300):r=document.createElement("canvas"),i&&(r.width=i),e&&(r.height=e),r.getContext("2d",n)}function Gr(i){const e=i.canvas;e.width=1,e.height=1,i.clearRect(0,0,1,1)}function Yg(i){let e=i.offsetWidth;const t=getComputedStyle(i);return e+=parseInt(t.marginLeft,10)+parseInt(t.marginRight,10),e}function Bg(i){let e=i.offsetHeight;const t=getComputedStyle(i);return e+=parseInt(t.marginTop,10)+parseInt(t.marginBottom,10),e}function ku(i,e){const t=e.parentNode;t&&t.replaceChild(i,e)}function Ss(i){return i&&i.parentNode?i.parentNode.removeChild(i):null}function gc(i){for(;i.lastChild;)i.removeChild(i.lastChild)}function Zg(i,e){const t=i.childNodes;for(let n=0;;++n){const r=t[n],s=e[n];if(!r&&!s)break;if(r!==s){if(!r){i.appendChild(s);continue}if(!s){i.removeChild(r),--n;continue}i.insertBefore(s,r)}}}const ts="ol-hidden",Ug="ol-selectable",lo="ol-unselectable",ml="ol-control",Ou="ol-collapsed",Kg=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),Du=["style","variant","weight","size","lineHeight","family"],pc=function(i){const e=i.match(Kg);if(!e)return null;const t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,r=Du.length;n<r;++n){const s=e[n+1];s!==void 0&&(t[Du[n]]=s)}return t.families=t.family.split(/,\s?/),t},mc="10px sans-serif",Ke="#000",Ms="round",Ut=[],Kt=0,Vn="round",wr=10,Cr="#000",Tr="center",Fs="middle",Wi=[0,0,0,0],Rr=1,Tt=new yt;let bn=null,Ca;const Ta={},yc=function(){const e="32px ",t=["monospace","serif"],n=t.length,r="wmytzilWMYTZIL@#/&?$%10";let s,o;function a(u,h,c){let d=!0;for(let f=0;f<n;++f){const g=t[f];if(o=Ps(u+" "+h+" "+e+g,r),c!=g){const p=Ps(u+" "+h+" "+e+c+","+g,r);d=d&&p!=o}}return!!d}function l(){let u=!0;const h=Tt.getKeys();for(let c=0,d=h.length;c<d;++c){const f=h[c];Tt.get(f)<100&&(a.apply(this,f.split(`
2`))?(Or(Ta),bn=null,Ca=void 0,Tt.set(f,100)):(Tt.set(f,Tt.get(f)+1,!0),u=!1))}u&&(clearInterval(s),s=void 0)}return function(u){const h=pc(u);if(!h)return;const c=h.families;for(let d=0,f=c.length;d<f;++d){const g=c[d],p=h.style+`
3`+h.weight+`
4`+g;Tt.get(p)===void 0&&(Tt.set(p,100,!0),a(h.style,h.weight,g)||(Tt.set(p,0,!0),s===void 0&&(s=setInterval(l,32))))}}}(),qg=function(){let i;return function(e){let t=Ta[e];if(t==null){if(Za){const n=pc(e),r=_c(e,"Žg");t=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else i||(i=document.createElement("div"),i.innerHTML="M",i.style.minHeight="0",i.style.maxHeight="none",i.style.height="auto",i.style.padding="0",i.style.border="none",i.style.position="absolute",i.style.display="block",i.style.left="-99999px"),i.style.font=e,document.body.appendChild(i),t=i.offsetHeight,document.body.removeChild(i);Ta[e]=t}return t}}();function _c(i,e){return bn||(bn=we(1,1)),i!=Ca&&(bn.font=i,Ca=bn.font),bn.measureText(e)}function Ps(i,e){return _c(i,e).width}function zu(i,e,t){if(e in t)return t[e];const n=e.split(`
5`).reduce((r,s)=>Math.max(r,Ps(i,s)),0);return t[e]=n,n}function Hg(i,e){const t=[],n=[],r=[];let s=0,o=0,a=0,l=0;for(let u=0,h=e.length;u<=h;u+=2){const c=e[u];if(c===`
6`||u===h){s=Math.max(s,o),r.push(o),o=0,a+=l;continue}const d=e[u+1]||i.font,f=Ps(d,c);t.push(f),o+=f;const g=qg(d);n.push(g),l=Math.max(l,g)}return{width:s,height:a,widths:t,heights:n,lineWidths:r}}function Jg(i,e,t,n,r,s,o,a,l,u,h){i.save(),t!==1&&(i.globalAlpha*=t),e&&i.setTransform.apply(i,e),n.contextInstructions?(i.translate(l,u),i.scale(h[0],h[1]),$g(n,i)):h[0]<0||h[1]<0?(i.translate(l,u),i.scale(h[0],h[1]),i.drawImage(n,r,s,o,a,0,0,o,a)):i.drawImage(n,r,s,o,a,l,u,o*h[0],a*h[1]),i.restore(
6)}function $g(i,e){const t=i.contextInstructions;for(let n=0,r=t.length;n<r;n+=2)Array.isArray(t[n+1])?e[t[n]].apply(e,t[n+1]):e[t[n]]=t[n+1]}class yl extends cc{constructor(e){const t=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:1,rotateWithView:t,rotation:e.rotation!==void 0?e.rotation:0,scale:e.scale!==void 0?e.scale:1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=e.fill!==void 0?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=e.radius!==void 0?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=e.angle!==void 0?e.angle:0,this.stroke_=e.stroke!==void 0?e.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const e=this.getScale(),t=new yl({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}getAnchor(){const e=this.size_;if(!e)return null;const t=this.getDisplacement(),n=this.getScaleArray();return[e[0]/2-t[0]/n[0],e[1]/2+t[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(e){let t=this.canvas_[e];if(!t){const n=this.renderOptions_,r=we(n.size*e,n.size*e);this.draw_(n,r,e),t=r.canvas,this.canvas_[e]=t}return t}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return q.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,t,n){if(t===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return t;let r=this.radius_,s=this.radius2_===void 0?r:this.radius2_;if(r<s){const R=r;r=s,s=R}const o=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/o,l=s*Math.sin(a),u=Math.sqrt(s*s-l*l),h=r-u,c=Math.sqrt(l*l+h*h),d=c/l;if(e==="miter"&&d<=n)return d*t;const f=t/2/d,g=t/2*(h/c),m=Math.sqrt((r+f)*(r+f)+g*g)-r;if(this.radius2_===void 0||e==="bevel")return m*2;const _=r*Math.sin(a),y=Math.sqrt(r*r-_*_),x=s-y,E=Math.sqrt(_*_+x*x)/_;if(E<=n){const R=E*t/2-s-r;return 2*Math.max(m,R)}return m*2}createRenderOptions(){let e=Vn,t=0,n=null,r=0,s,o=0;this.stroke_&&(s=this.stroke_.getColor(),s===null&&(s=Cr),s=St(s),o=this.stroke_.getWidth(),o===void 0&&(o=Rr),n=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),e=this.stroke_.getLineJoin(),e===void 0&&(e=Vn),t=this.stroke_.getMiterLimit(),t===void 0&&(t=wr));const a=this.calculateLineJoinSize_(e,o,t),l=Math.max(this.radius_,this.radius2_||0),u=Math.ceil(2*l+a);return{strokeStyle:s,strokeWidth:o,size:u,lineDash:n,lineDashOffset:r,lineJoin:e,miterLimit:t}}render(){this.renderOptions_=this.createRenderOptions();const e=this.renderOptions_.size;this.canvas_={},this.size_=[e,e]}draw_(e,t,n){if(t.scale(n,n),t.translate(e.size/2,e.size/2),this.createPath_(t),this.fill_){let r=this.fill_.getColor();r===null&&(r=Ke),t.fillStyle=St(r),t.fill()}this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}createHitDetectionCanvas_(e){if(this.fill_){let t=this.fill_.getColor(),n=0;if(typeof t=="string"&&(t=Is(t)),t===null?n=1:Array.isArray(t)&&(n=t.length===4?t[3]:1),n===0){const r=we(e.size,e.size);this.hitDetectionCanvas_=r.canvas,this.drawHitDetectionCanvas_(e,r)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(e){let t=this.points_;const n=this.radius_;if(t===1/0)e.arc(0,0,n,0,2*Math.PI);else{const r=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(t*=2);const s=this.angle_-Math.PI/2,o=2*Math.PI/t;for(let a=0;a<t;a++){const l=s+a*o,u=a%2===0?n:r;e.lineTo(u*Math.cos(l),u*Math.sin(l))}e.closePath()}}drawHitDetectionCanvas_(e,t){t.translate(e.size/2,e.size/2),this.createPath_(t),t.fillStyle=Ke,t.fill(),this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}}const vc=yl;class _l extends vc{constructor(e){e=e||{radius:5},super({points:1/0,fill:e.fill,radius:e.radius,stroke:e.stroke,scale:e.scale!==void 0?e.scale:1,rotation:e.rotation!==void 0?e.rotation:0,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode})}clone(){const e=this.getScale(),t=new _l({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.get
6Stroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}setRadius(e){this.radius_=e,this.render()}}const vl=_l;class uo{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=Nu,e.geometry!==void 0&&this.setGeometry(e.geometry),this.fill_=e.fill!==void 0?e.fill:null,this.image_=e.image!==void 0?e.image:null,this.renderer_=e.renderer!==void 0?e.renderer:null,this.hitDetectionRenderer_=e.hitDetectionRenderer!==void 0?e.hitDetectionRenderer:null,this.stroke_=e.stroke!==void 0?e.stroke:null,this.text_=e.text!==void 0?e.text:null,this.zIndex_=e.zIndex}clone(){let e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new uo({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(e){this.renderer_=e}setHitDetectionRenderer(e){this.hitDetectionRenderer_=e}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(e){this.fill_=e}getImage(){return this.image_}setImage(e){this.image_=e}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e}getText(){return this.text_}setText(e){this.text_=e}getZIndex(){return this.zIndex_}setGeometry(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(t){return t.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=Nu,this.geometry_=e}setZIndex(e){this.zIndex_=e}}function Qg(i){let e;if(typeof i=="function")e=i;else{let t;Array.isArray(i)?t=i:(H(typeof i.getZIndex=="function",41),t=[i]),e=function(){return t}}return e}let Oo=null;function ep(i,e){if(!Oo){const t=new Xi({color:"rgba(255,255,255,0.4)"}),n=new Ln({color:"#3399CC",width:1.25});Oo=[new uo({image:new vl({fill:t,stroke:n,radius:5}),fill:t,stroke:n})]}return Oo}function Nu(i){return i.getGeometry()}const Xt=uo,tp="#333";class xl{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=qe(e.scale!==void 0?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.repeat_=e.repeat,this.textBaseline_=e.textBaseline,this.fill_=e.fill!==void 0?e.fill:new Xi({color:tp}),this.maxAngle_=e.maxAngle!==void 0?e.maxAngle:Math.PI/4,this.placement_=e.placement!==void 0?e.placement:"point",this.overflow_=!!e.overflow,this.stroke_=e.stroke!==void 0?e.stroke:null,this.offsetX_=e.offsetX!==void 0?e.offsetX:0,this.offsetY_=e.offsetY!==void 0?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=e.padding===void 0?null:e.padding}clone(){const e=this.getScale();return new xl({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}
6getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(e){this.overflow_=e}setFont(e){this.font_=e}setMaxAngle(e){this.maxAngle_=e}setOffsetX(e){this.offsetX_=e}setOffsetY(e){this.offsetY_=e}setPlacement(e){this.placement_=e}setRepeat(e){this.repeat_=e}setRotateWithView(e){this.rotateWithView_=e}setFill(e){this.fill_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=qe(e!==void 0?e:1)}setStroke(e){this.stroke_=e}setText(e){this.text_=e}setTextAlign(e){this.textAlign_=e}setJustify(e){this.justify_=e}setTextBaseline(e){this.textBaseline_=e}setBackgroundFill(e){this.backgroundFill_=e}setBackgroundStroke(e){this.backgroundStroke_=e}setPadding(e){this.padding_=e}}const xc=xl,ae={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class ip extends yt{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;const t=Object.assign({},e);typeof e.properties=="object"&&(delete t.properties,Object.assign(t,e.properties)),t[ae.OPACITY]=e.opacity!==void 0?e.opacity:1,H(typeof t[ae.OPACITY]=="number",64),t[ae.VISIBLE]=e.visible!==void 0?e.visible:!0,t[ae.Z_INDEX]=e.zIndex,t[ae.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,t[ae.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,t[ae.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,t[ae.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,this.className_=t.className!==void 0?t.className:"ol-layer",delete t.className,this.setProperties(t),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){const t=this.state_||{layer:this,managed:e===void 0?!0:e},n=this.getZIndex();return t.opacity=ye(Math.round(this.getOpacity()*100)/100,0,1),t.visible=this.getVisible(),t.extent=this.getExtent(),t.zIndex=n===void 0&&!t.managed?1/0:n,t.maxResolution=this.getMaxResolution(),t.minResolution=Math.max(this.getMinResolution(),0),t.minZoom=this.getMinZoom(),t.maxZoom=this.getMaxZoom(),this.state_=t,t}getLayersArray(e){return W()}getLayerStatesArray(e){return W()}getExtent(){return this.get(ae.EXTENT)}getMaxResolution(){return this.get(ae.MAX_RESOLUTION)}getMinResolution(){return this.get(ae.MIN_RESOLUTION)}getMinZoom(){return this.get(ae.MIN_ZOOM)}getMaxZoom(){return this.get(ae.MAX_ZOOM)}getOpacity(){return this.get(ae.OPACITY)}getSourceState(){return W()}getVisible(){return this.get(ae.VISIBLE)}getZIndex(){return this.get(ae.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(ae.EXTENT,e)}setMaxResolution(e){this.set(ae.MAX_RESOLUTION,e)}setMinResolution(e){this.set(ae.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(ae.MAX_ZOOM,e)}setMinZoom(e){this.set(ae.MIN_ZOOM,e)}setOpacity(e){H(typeof e=="number",64),this.set(ae.OPACITY,e)}setVisible(e){this.set(ae.VISIBLE,e)}setZIndex(e){this.set(ae.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}
6const Ec=ip,de={ANIMATING:0,INTERACTING:1},ct={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},wc=42,El=256;function Gu(i,e,t){return function(n,r,s,o,a){if(!n)return;if(!r&&!e)return n;const l=e?0:s[0]*r,u=e?0:s[1]*r,h=a?a[0]:0,c=a?a[1]:0;let d=i[0]+l/2+h,f=i[2]-l/2+h,g=i[1]+u/2+c,p=i[3]-u/2+c;d>f&&(d=(f+d)/2,f=d),g>p&&(g=(p+g)/2,p=g);let m=ye(n[0],d,f),_=ye(n[1],g,p);if(o&&t&&r){const y=30*r;m+=-y*Math.log(1+Math.max(0,d-n[0])/y)+y*Math.log(1+Math.max(0,n[0]-f)/y),_+=-y*Math.log(1+Math.max(0,g-n[1])/y)+y*Math.log(1+Math.max(0,n[1]-p)/y)}return[m,_]}}function np(i){return i}function wl(i,e,t,n){const r=oe(e)/t[0],s=ke(e)/t[1];return n?Math.min(i,Math.max(r,s)):Math.min(i,Math.min(r,s))}function Cl(i,e,t){let n=Math.min(i,e);const r=50;return n*=Math.log(1+r*Math.max(0,i/e-1))/r+1,t&&(n=Math.max(n,t),n/=Math.log(1+r*Math.max(0,t/i-1))/r+1),ye(n,t/2,e*2)}function rp(i,e,t,n){return e=e!==void 0?e:!0,function(r,s,o,a){if(r!==void 0){const l=i[0],u=i[i.length-1],h=t?wl(l,t,o,n):l;if(a)return e?Cl(r,h,u):ye(r,u,h);const c=Math.min(h,r),d=Math.floor(Js(i,c,s));return i[d]>h&&d<i.length-1?i[d+1]:i[d]}}}function sp(i,e,t,n,r,s){return n=n!==void 0?n:!0,t=t!==void 0?t:0,function(o,a,l,u){if(o!==void 0){const h=r?wl(e,r,l,s):e;if(u)return n?Cl(o,h,t):ye(o,t,h);const c=1e-9,d=Math.ceil(Math.log(e/h)/Math.log(i)-c),f=-a*(.5-c)+.5,g=Math.min(h,o),p=Math.floor(Math.log(e/g)/Math.log(i)+f),m=Math.max(d,p),_=e/Math.pow(i,m);return ye(_,t,h)}}}function ju(i,e,t,n,r){return t=t!==void 0?t:!0,function(s,o,a,l){if(s!==void 0){const u=n?wl(i,n,a,r):i;return!t||!l?ye(s,e,u):Cl(s,u,e)}}}function Tl(i){if(i!==void 0)return 0}function Xu(i){if(i!==void 0)return i}function op(i){const e=2*Math.PI/i;return function(t,n){if(n)return t;if(t!==void 0)return t=Math.floor(t/e+.5)*e,t}}function ap(i){return i=i||ms(5),function(e,t){if(t)return e;if(e!==void 0)return Math.abs(e)<=i?0:e}}function Cc(i){return Math.pow(i,3)}function Bn(i){return 1-Cc(1-i)}function lp(i){return 3*i*i-2*i*i*i}function up(i){return i}const Do=0;class hp extends yt{constructor(e){super(),this.on,this.once,this.un,e=Object.assign({},e),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=il(e.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,e.projection&&Hh(),e.center&&(e.center=Gt(e.center,this.projection_)),e.extent&&(e.extent=Yt(e.extent,this.projection_)),this.applyOptions_(e)}applyOptions_(e){const t=Object.assign({},e);for(const a in ct)delete t[a];this.setProperties(t,!0);const n=dp(e);this.maxResolution_=n.maxResolution,this.minResolution_=n.minResolution,this.zoomFactor_=n.zoomFactor,this.resolutions_=e.resolutions,this.padding_=e.padding,this.minZoom_=n.minZoom;const r=cp(e),s=n.constraint,o=fp(e);this.constraints_={center:r,resolution:s,rotation:o},this.setRotation(e.rotation!==void 0?e.rotation:0),this.setCenterInternal(e.center!==void 0?e.center:null),e.resolution!==void 0?this.setResolution(e.resolution):e.zoom!==void 0&&this.setZoom(e.zoom)}get padding(){return this.padding_}set padding(e){let t=this.padding_;this.padding_=e;const n=this.getCenterInternal();if(n){const r=e||[0,0,0,0];t=t||[0,0,0,0];const s=this.getResolution(),o=s/2*(r[3]-t[3]+t[1]-r[1]),a=s/2*(r[0]-t[0]+t[2]-r[2]);this.setCenterInternal([n[0]+o,n[1]-a])}}getUpdatedOptions_(e){const t=this.getProperties();return t.resolution!==void 0?t.resolution=this.getResolution():t.zoom=this.getZoom(),t.center=this.getCenterInternal(),t.rotation=this.getRotation(),Object.assign({},t,e)}animate(e){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const t=new Array(arguments.length);for(let n=0;n<t.length;++n){let r=arguments[n];r.center&&(r=Object.assign({},r),r.center=Gt(r.center,this.getProjection())),r.anchor&&(r=Object.assign({},r),r.anchor=Gt(r.anchor,this.getProjection())),t[n]=r}this.animateInternal.apply(this,t)}animateInternal(e){let t=arguments.length,n;t>1&&typeof arguments[t-1]=="function"&&(n=arguments[t-1],--t);let r=0;for(;r<t&&!this.isDef();++r){const h=arguments[r];h.center&&this.setCenterInternal(h.center),h.zoom!==void 0?this.setZoom(h.zoom):h.resolution&&this.setResolution(h.resolution),h.rotation!==void 0&&this.setRotation(h.rotation)}if(r===t){n&&is(n,!0);return}let s=Date.now(),o=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const u=[];for(;r<t;++r){const h=arguments[r],c={start:s,complete:!1,anchor:h.anchor,duration:h.duration!==void 0?h.duration:1e3,easing:h.easing||lp,callback:n};if(h.center&&(c.sourceCenter=o,c.targetCenter=h.center.slice(),o=c.targetCenter),h.zoom!==void 0?(c.sourceResolution=a,c.targetResolution=this.getResolutionForZoom(h.zoom),a=c.targetResolution):h.resolution&&(c.sourceResolution=a,c.targetResolution=h.resolution,a=c.targetResolution),h.rotation!==void 0){c.sourceRotation=l;const d=On(h.rotation-l+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=l+d,l=c.targetRotation}gp(c)?c.complete=!0:s+=c.duration,u.push(c)}this.animations_.push(u),this.setHint(de.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[de.ANIMATING]>0}getInteracting(){return this.hints_[de.INTERACTING]>0}cancelAnimations(){this.setHint(de.ANIMATING,-this.hints_[de.ANIMATING]);let e;for(let t=0,n=this.animations_.length;t<n;++t){const r=this.animations_[t];if(r[0].callback&&is(r[0].callback,!1),!e)for(let s=0,o=r.length;s<o;++s){const a=r[s];if(!a.complete){e=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=e,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const e=Date.now();let t=!1;for(let n=this.animations_.length-1;n>=0;--n){const r=this.animations_[n];let s=!0;for(let o=0,a=r.length;o<a;
6++o){const l=r[o];if(l.complete)continue;const u=e-l.start;let h=l.duration>0?u/l.duration:1;h>=1?(l.complete=!0,h=1):s=!1;const c=l.easing(h);if(l.sourceCenter){const d=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],p=l.targetCenter[1];this.nextCenter_=l.targetCenter;const m=d+c*(g-d),_=f+c*(p-f);this.targetCenter_=[m,_]}if(l.sourceResolution&&l.targetResolution){const d=c===1?l.targetResolution:l.sourceResolution+c*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(d,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=d,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const d=c===1?On(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+c*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(d,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=d}if(this.applyTargetState_(!0),t=!0,!l.complete)break}if(s){this.animations_[n]=null,this.setHint(de.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=r[0].callback;o&&is(o,!0)}}this.animations_=this.animations_.filter(Boolean),t&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,t){let n;const r=this.getCenterInternal();return r!==void 0&&(n=[r[0]-t[0],r[1]-t[1]],Qa(n,e-this.getRotation()),ag(n,t)),n}calculateCenterZoom(e,t){let n;const r=this.getCenterInternal(),s=this.getResolution();if(r!==void 0&&s!==void 0){const o=t[0]-e*(t[0]-r[0])/s,a=t[1]-e*(t[1]-r[1])/s;n=[o,a]}return n}getViewportSize_(e){const t=this.viewportSize_;if(e){const n=t[0],r=t[1];return[Math.abs(n*Math.cos(e))+Math.abs(r*Math.sin(e)),Math.abs(n*Math.sin(e))+Math.abs(r*Math.cos(e))]}return t}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const e=this.getCenterInternal();return e&&va(e,this.getProjection())}getCenterInternal(){return this.get(ct.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){const t=this.calculateExtentInternal(e);return Qh(t,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const t=this.getCenterInternal();H(t,1);const n=this.getResolution();H(n!==void 0,2);const r=this.getRotation();return H(r!==void 0,3),pa(t,n,r,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(ct.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,t){return this.getResolutionForExtentInternal(Yt(e,this.getProjection()),t)}getResolutionForExtentInternal(e,t){t=t||this.getViewportSizeMinusPadding_();const n=oe(e)/t[0],r=ke(e)/t[1];return Math.max(n,r)}getResolutionForValueFunction(e){e=e||2;const t=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(t/n)/Math.log(e);return function(s){return t/Math.pow(e,s*r)}}getRotation(){return this.get(ct.ROTATION)}getValueForResolutionFunction(e){const t=Math.log(e||2),n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,s=Math.log(n/r)/t;return function(o){return Math.log(n/o)/t/s}}getViewportSizeMinusPadding_(e){let t=this.getViewportSize_(e);const n=this.padding_;return n&&(t=[t[0]-n[1]-n[3],t[1]-n[0]-n[2]]),t}getState(){const e=this.getProjection(),t=this.getResolution(),n=this.getRotation();let r=this.getCenterInternal();const s=this.padding_;if(s){const o=this.getViewportSizeMinusPadding_();r=zo(r,this.getViewportSize_(),[o[0]/2+s[3],o[1]/2+s[0]],t,n)}return{center:r.slice(0),projection:e!==void 0?e:null,resolution:t,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e;const t=this.getResolution();return t!==void 0&&(e=this.getZoomForResolution(t)),e}getZoomForResolution(e){let t=this.minZoom_||0,n,r;if(this.resolutions_){const s=Js(this.resolutions_,e,1);t=s,n=this.resolutions_[s],s==this.resolutions_.length-1?r=2:r=n/this.resolutions_[s+1]}else n=this.maxResolution_,r=this.zoomFactor_;return t+Math.log(n/e)/Math.log(r)}getResolutionForZoom(e){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const t=ye(Math.floor(e),0,this.resolutions_.length-2),n=this.resolutions_[t]/this.resolutions_[t+1];return this.resolutions_[t]/Math.pow(n,ye(e-t,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}
6fit(e,t){let n;if(H(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function",24),Array.isArray(e)){H(!dn(e),25);const r=Yt(e,this.getProjection());n=Pu(r)}else if(e.getType()==="Circle"){const r=Yt(e.getExtent(),this.getProjection());n=Pu(r),n.rotate(this.getRotation(),Lt(r))}else n=e;this.fitInternal(n,t)}rotatedExtentForGeometry(e){const t=this.getRotation(),n=Math.cos(t),r=Math.sin(-t),s=e.getFlatCoordinates(),o=e.getStride();let a=1/0,l=1/0,u=-1/0,h=-1/0;for(let c=0,d=s.length;c<d;c+=o){const f=s[c]*n-s[c+1]*r,g=s[c]*r+s[c+1]*n;a=Math.min(a,f),l=Math.min(l,g),u=Math.max(u,f),h=Math.max(h,g)}return[a,l,u,h]}fitInternal(e,t){t=t||{};let n=t.size;n||(n=this.getViewportSizeMinusPadding_());const r=t.padding!==void 0?t.padding:[0,0,0,0],s=t.nearest!==void 0?t.nearest:!1;let o;t.minResolution!==void 0?o=t.minResolution:t.maxZoom!==void 0?o=this.getResolutionForZoom(t.maxZoom):o=0;const a=this.rotatedExtentForGeometry(e);let l=this.getResolutionForExtentInternal(a,[n[0]-r[1]-r[3],n[1]-r[0]-r[2]]);l=isNaN(l)?o:Math.max(l,o),l=this.getConstrainedResolution(l,s?0:1);const u=this.getRotation(),h=Math.sin(u),c=Math.cos(u),d=Lt(a);d[0]+=(r[1]-r[3])/2*l,d[1]+=(r[0]-r[2])/2*l;const f=d[0]*c-d[1]*h,g=d[1]*c+d[0]*h,p=this.getConstrainedCenter([f,g],l),m=t.callback?t.callback:Wn;t.duration!==void 0?this.animateInternal({resolution:l,center:p,duration:t.duration,easing:t.easing},m):(this.targetResolution_=l,this.targetCenter_=p,this.applyTargetState_(!1,!0),is(m,!0))}centerOn(e,t,n){this.centerOnInternal(Gt(e,this.getProjection()),t,n)}centerOnInternal(e,t,n){this.setCenterInternal(zo(e,t,n,this.getResolution(),this.getRotation()))}calculateCenterShift(e,t,n,r){let s;const o=this.padding_;if(o&&e){const a=this.getViewportSizeMinusPadding_(-n),l=zo(e,r,[a[0]/2+o[3],a[1]/2+o[0]],t,n);s=[e[0]-l[0],e[1]-l[1]]}return s}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(e){const t=va(this.targetCenter_,this.getProjection());this.setCenter([t[0]+e[0],t[1]+e[1]])}adjustCenterInternal(e){const t=this.targetCenter_;this.setCenterInternal([t[0]+e[0],t[1]+e[1]])}adjustResolution(e,t){t=t&&Gt(t,this.getProjection()),this.adjustResolutionInternal(e,t)}adjustResolutionInternal(e,t){const n=this.getAnimating()||this.getInteracting(),r=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*e,0,r,n);t&&(this.targetCenter_=this.calculateCenterZoom(s,t)),this.targetResolution_*=e,this.applyTargetState_()}adjustZoom(e,t){this.adjustResolution(Math.pow(this.zoomFactor_,-e),t)}adjustRotation(e,t){t&&(t=Gt(t,this.getProjection())),this.adjustRotationInternal(e,t)}adjustRotationInternal(e,t){const n=this.getAnimating()||this.getInteracting(),r=this.constraints_.rotation(this.targetRotation_+e,n);t&&(this.targetCenter_=this.calculateCenterRotate(r,t)),this.targetRotation_+=e,this.applyTargetState_()}setCenter(e){this.setCenterInternal(e&&Gt(e,this.getProjection()))}setCenterInternal(e){this.targetCenter_=e,this.applyTargetState_()}setHint(e,t){return this.hints_[e]+=t,this.changed(),this.hints_[e]}setResolution(e){this.targetResolution_=e,this.applyTargetState_()}setRotation(e){this.targetRotation_=e,this.applyTargetState_()}setZoom(e){this.setResolution(this.getResolutionForZoom(e))}applyTargetState_(e,t){const n=this.getAnimating()||this.getInteracting()||t,r=this.constraints_.rotation(this.targetRotation_,n),s=this.getViewportSize_(r),o=this.constraints_.resolution(this.targetResolution_,0,s,n),a=this.constraints_.center(this.targetCenter_,o,s,n,this.calculateCenterShift(this.targetCenter_,o,r,s));this.get(ct.ROTATION)!==r&&this.set(ct.ROTATION,r),this.get(ct.RESOLUTION)!==o&&(this.set(ct.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(ct.CENTER)||!Es(this.get(ct.CENTER),a))&&this.set(ct.CENTER,a),this.getAnimating()&&!e&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(e,t,n){e=e!==void 0?e:200;const r=t||0,s=this.constraints_.rotation(this.targetRotation_),o=this.getViewportSize_(s),a=this.constraints_.resolution(this.targetResolution_,r,o),l=this.constraints_.center(this.targetCenter_,a,o,!1,this.calculateCenterShift(this.targetCenter_,a,s,o));if(e===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=s,this.targetCenter_=l,this.applyTargetState_();return}n=n||(e===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==s||!this.getCenterInternal()||!Es(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:l,resolution:a,duration:e,easing:Bn,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint(de.INTERACTING,1)}endInteraction(e,t,n){n=n&&Gt(n,this.getProjection()),this.endInteractionInternal(e,t,n)}endInteractionInternal(e,t,n){this.getInteracting()&&(this.setHint(de.INTERACTING,-1),this.resolveConstraints(e,t,n
6))}getConstrainedCenter(e,t){const n=this.getViewportSize_(this.getRotation());return this.constraints_.center(e,t||this.getResolution(),n)}getConstrainedZoom(e,t){const n=this.getResolutionForZoom(e);return this.getZoomForResolution(this.getConstrainedResolution(n,t))}getConstrainedResolution(e,t){t=t||0;const n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(e,t,n)}}function is(i,e){setTimeout(function(){i(e)},0)}function cp(i){if(i.extent!==void 0){const t=i.smoothExtentConstraint!==void 0?i.smoothExtentConstraint:!0;return Gu(i.extent,i.constrainOnlyCenter,t)}const e=il(i.projection,"EPSG:3857");if(i.multiWorld!==!0&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,Gu(t,!1,!1)}return np}function dp(i){let e,t,n,o=i.minZoom!==void 0?i.minZoom:Do,a=i.maxZoom!==void 0?i.maxZoom:28;const l=i.zoomFactor!==void 0?i.zoomFactor:2,u=i.multiWorld!==void 0?i.multiWorld:!1,h=i.smoothResolutionConstraint!==void 0?i.smoothResolutionConstraint:!0,c=i.showFullExtent!==void 0?i.showFullExtent:!1,d=il(i.projection,"EPSG:3857"),f=d.getExtent();let g=i.constrainOnlyCenter,p=i.extent;if(!u&&!p&&d.isGlobal()&&(g=!1,p=f),i.resolutions!==void 0){const m=i.resolutions;t=m[o],n=m[a]!==void 0?m[a]:m[m.length-1],i.constrainResolution?e=rp(m,h,!g&&p,c):e=ju(t,n,h,!g&&p,c)}else{const _=(f?Math.max(oe(f),ke(f)):360*Ci.degrees/d.getMetersPerUnit())/El/Math.pow(2,Do),y=_/Math.pow(2,28-Do);t=i.maxResolution,t!==void 0?o=0:t=_/Math.pow(l,o),n=i.minResolution,n===void 0&&(i.maxZoom!==void 0?i.maxResolution!==void 0?n=t/Math.pow(l,a):n=_/Math.pow(l,a):n=y),a=o+Math.floor(Math.log(t/n)/Math.log(l)),n=t/Math.pow(l,a-o),i.constrainResolution?e=sp(l,t,n,h,!g&&p,c):e=ju(t,n,h,!g&&p,c)}return{constraint:e,maxResolution:t,minResolution:n,minZoom:o,zoomFactor:l}}function fp(i){if(i.enableRotation!==void 0?i.enableRotation:!0){const t=i.constrainRotation;return t===void 0||t===!0?ap():t===!1?Xu:typeof t=="number"?op(t):Xu}return Tl}function gp(i){return!(i.sourceCenter&&i.targetCenter&&!Es(i.sourceCenter,i.targetCenter)||i.sourceResolution!==i.targetResolution||i.sourceRotation!==i.targetRotation)}function zo(i,e,t,n,r){const s=Math.cos(-r);let o=Math.sin(-r),a=i[0]*s-i[1]*o,l=i[1]*s+i[0]*o;a+=(e[0]/2-t[0])*n,l+=(t[1]-e[1]/2)*n,o=-o;const u=a*s-l*o,h=l*s+a*o;return[u,h]}const ft=hp;class pp extends Ec{constructor(e){const t=Object.assign({},e);delete t.source,super(t),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,e.render&&(this.render=e.render),e.map&&this.setMap(e.map),this.addChangeListener(ae.SOURCE,this.handleSourcePropertyChange_);const n=e.source?e.source:null;this.setSource(n)}getLayersArray(e){return e=e||[],e.push(this),e}getLayerStatesArray(e){return e=e||[],e.push(this.getLayerState()),e}getSource(){return this.get(ae.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const e=this.getSource();return e?e.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.get
6Source().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(he(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const e=this.getSource();e&&(this.sourceChangeKey_=ie(e,B.CHANGE,this.handleSourceChange_,this),e.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)}isVisible(e){let t;const n=this.getMapInternal();!e&&n&&(e=n.getView()),e instanceof ft?t={viewState:e.getState(),extent:e.calculateExtent()}:t=e,!t.layerStatesArray&&n&&(t.layerStatesArray=n.getLayerGroup().getLayerStatesArray());let r;t.layerStatesArray?r=t.layerStatesArray.find(o=>o.layer===this):r=this.getLayerState();const s=this.getExtent();return Rl(r,t.viewState)&&(!s||pe(s,t.extent))}getAttributions(e){if(!this.isVisible(e))return[];let t;const n=this.getSource();if(n&&(t=n.getAttributions()),!t)return[];const r=e instanceof ft?e.getViewStateAndExtent():e;let s=t(r);return Array.isArray(s)||(s=[s]),s}render(e,t){const n=this.getRenderer();return n.prepareFrame(e)?(this.rendered=!0,n.renderFrame(e,t)):null}unrender(){this.rendered=!1}setMapInternal(e){e||this.unrender(),this.set(ae.MAP,e)}getMapInternal(){return this.get(ae.MAP)}setMap(e){this.mapPrecomposeKey_&&(he(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(he(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=ie(e,Ft.PRECOMPOSE,function(t){const r=t.frameState.layerStatesArray,s=this.getLayerState(!1);H(!r.some(function(o){return o.layer===s.layer}),67),r.push(s)},this),this.mapRenderKey_=ie(this,B.CHANGE,e.render,e),this.changed())}setSource(e){this.set(ae.SOURCE,e)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function Rl(i,e){if(!i.visible)return!1;const t=e.resolution;if(t<i.minResolution||t>=i.maxResolution)return!1;const n=e.zoom;return n>i.minZoom&&n<=i.maxZoom}const Zn=pp;function mp(i,e,t,n,r){Tc(i,e,t||0,n||i.length-1,r||yp)}function Tc(i,e,t,n,r){for(;n>t;){if(n-t>600){var s=n-t+1,o=e-t+1,a=Math.log(s),l=.5*Math.exp(2*a/3),u=.5*Math.sqrt(a*l*(s-l)/s)*(o-s/2<0?-1:1),h=Math.max(t,Math.floor(e-o*l/s+u)),c=Math.min(n,Math.floor(e+(s-o)*l/s+u));Tc(i,e,h,c,r)}var d=i[e],f=t,g=n;for(ar(i,t,e),r(i[n],d)>0&&ar(i,t,n);f<g;){for(ar(i,f,g),f++,g--;r(i[f],d)<0;)f++;for(;r(i[g],d)>0;)g--}r(i[t],d)===0?ar(i,t,g):(g++,ar(i,g,n)),g<=e&&(t=g+1),e<=g&&(n=g-1)}}function ar(i,e,t){var n=i[e];i[e]=i[t],i[t]=n}function yp(i,e){return i<e?-1:i>e?1:0}let Rc=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const n=[];if(!rs(e,t))return n;const r=this.toBBox,s=[];for(;t;){for(let o=0;o<t.children.length;o++){const a=t.children[o],l=t.leaf?r(a):a;rs(e,l)&&(t.leaf?n.push(a):Go(e,l)?this._all(a,n):s.push(a))}t=s.pop()}return n}collides(e){let t=this.data;if(!rs(e,t))return!1;const n=[];for(;t;){for(let r=0;r<t.children.length;r++){const s=t.children[r],o=t.leaf?this.toBBox(s):s;
vendor: 4,941 bytes, line 6
6if(rs(e,o)){if(t.leaf||Go(e,o))return!0;n.push(s)}}t=n.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let n=0;n<e.length;n++)this.insert(e[n]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const n=this.data;this.data=t,t=n}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=In([]),this}remove(e,t){if(!e)return this;let n=this.data;const r=this.toBBox(e),s=[],o=[];let a,l,u;for(;n||s.length;){if(n||(n=s.pop(),l=s[s.length-1],a=o.pop(),u=!0),n.leaf){const h=_p(e,n.children,t);if(h!==-1)return n.children.splice(h,1),s.push(n),this._condense(s),this}!u&&!n.leaf&&Go(n,r)?(s.push(n),o.push(a),a=0,l=n,n=n.children[0]):l?(a++,n=l.children[a],u=!1):n=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const n=[];for(;e;)e.leaf?t.push(...e.children):n.push(...e.children),e=n.pop();return t}_build(e,t,n,r){const s=n-t+1;let o=this._maxEntries,a;if(s<=o)return a=In(e.slice(t,n+1)),vn(a,this.toBBox),a;r||(r=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/Math.pow(o,r-1))),a=In([]),a.leaf=!1,a.height=r;const l=Math.ceil(s/o),u=l*Math.ceil(Math.sqrt(o));Wu(e,t,n,u,this.compareMinX);for(let h=t;h<=n;h+=u){const c=Math.min(h+u-1,n);Wu(e,h,c,l,this.compareMinY);for(let d=h;d<=c;d+=l){const f=Math.min(d+l-1,c);a.children.push(this._build(e,d,f,r-1))}}return vn(a,this.toBBox),a}_chooseSubtree(e,t,n,r){for(;r.push(t),!(t.leaf||r.length-1===n);){let s=1/0,o=1/0,a;for(let l=0;l<t.children.length;l++){const u=t.children[l],h=No(u),c=Ep(e,u)-h;c<o?(o=c,s=h<s?h:s,a=u):c===o&&h<s&&(s=h,a=u)}t=a||t.children[0]}return t}_insert(e,t,n){const r=n?e:this.toBBox(e),s=[],o=this._chooseSubtree(r,this.data,t,s);for(o.children.push(e),cr(o,r);t>=0&&s[t].children.length>this._maxEntries;)this._split(s,t),t--;this._adjustParentBBoxes(r,s,t)}_split(e,t){const n=e[t],r=n.children.length,s=this._minEntries;this._chooseSplitAxis(n,s,r);const o=this._chooseSplitIndex(n,s,r),a=In(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,vn(n,this.toBBox),vn(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this.data=In([e,t]),this.data.height=e.height+1,this.data.leaf=!1,vn(this.data,this.toBBox)}_chooseSplitIndex(e,t,n){let r,s=1/0,o=1/0;for(let a=t;a<=n-t;a++){const l=hr(e,0,a,this.toBBox),u=hr(e,a,n,this.toBBox),h=wp(l,u),c=No(l)+No(u);h<s?(s=h,r=a,o=c<o?c:o):h===s&&c<o&&(o=c,r=a)}return r||n-t}_chooseSplitAxis(e,t,n){const r=e.leaf?this.compareMinX:vp,s=e.leaf?this.compareMinY:xp,o=this._allDistMargin(e,t,n,r),a=this._allDistMargin(e,t,n,s);o<a&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const s=this.toBBox,o=hr(e,0,t,s),a=hr(e,n-t,n,s);let l=ns(o)+ns(a);for(let u=t;u<n-t;u++){const h=e.children[u];cr(o,e.leaf?s(h):h),l+=ns(o)}for(let u=n-t-1;u>=t;u--){const h=e.children[u];cr(a,e.leaf?s(h):h),l+=ns(a)}return l}_adjustParentBBoxes(e,t,n){for(let r=n;r>=0;r--)cr(t[r],e)}_condense(e){for(let t=e.length-1,n;t>=0;t--)e[t].children.length===0?t>0?(n=e[t-1].children,n.splice(n.indexOf(e[t]),1)):this.clear():vn(e[t],this.toBBox)}};function _p(i,e,t){if(!t)return e.indexOf(i);for(let n=0;n<e.length;n++)if(t(i,e[n]))return n;return-1}function vn(i,e){hr(i,0,i.children.length,e,i)}function hr(i,e,t,n,r){r||(r=In(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s=e;s<t;s++){const o=i.children[s];cr(r,i.leaf?n(o):o)}return r}function cr(i,e){return i.minX=Math.min(i.minX,e.minX),i.minY=Math.min(i.minY,e.minY),i.maxX=Math.max(i.maxX,e.maxX),i.maxY=Math.max(i.maxY,e.maxY),i}function vp(i,e){return i.minX-e.minX}function xp(i,e){return i.minY-e.minY}function No(i){return(i.maxX-i.minX)*(i.maxY-i.minY)}function ns(i){return i.maxX-i.minX+(i.maxY-i.minY)}function Ep(i,e){return(Math.max(e.maxX,i.maxX)-Math.min(e.minX,i.minX))*(Math.max(e.maxY,i.maxY)-Math.min(e.minY,i.minY))}function wp(i,e){const t=Math.max(i.minX,e.minX),n=Math.max(i.minY,e.minY),r=Math.min(i.maxX,e.maxX),s=Math.min(i.maxY,e.maxY);return Math.max(0,r-t)*Math.max(0,s-n)}function Go(i,e){return i.minX<=e.minX&&i.minY<=e.minY&&e.maxX<=i.maxX&&e.maxY<=i.maxY}function rs(i,e){return e.minX<=i.maxX&&e.minY<=i.maxY&&e.maxX>=i.minX&&e.maxY>=i.minY}function In(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Wu(i,e,t,n,r){const s=[e,t];for(;s.length;){if(t=s.pop(),e=s.pop(),t-e<=n)continue;const o=e+Math.ceil((t-e)/n/2)*n;mp(i,o,e,t,r),s.push(e,o,o,t)}}class Cp{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}
6expire(){if(this.canExpireCache()){let e=0;for(const t in this.cache_){const n=this.cache_[t];!(e++&3)&&!n.hasListener()&&(delete this.cache_[t],--this.cacheSize_)}}}get(e,t,n){const r=Vu(e,t,n);return r in this.cache_?this.cache_[r]:null}set(e,t,n,r){const s=Vu(e,t,n);this.cache_[s]=r,++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function Vu(i,e,t){const n=t?dc(t):"null";return e+":"+i+":"+n}const Ls=new Cp;class Tp extends Dr{constructor(e,t,n,r){super(),this.extent=e,this.pixelRatio_=n,this.resolution=t,this.state=r}changed(){this.dispatchEvent(B.CHANGE)}getExtent(){return this.extent}getImage(){return W()}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){W()}}const bc=Tp;function Ic(i,e,t){const n=i;let r=!0,s=!1,o=!1;const a=[vs(n,B.LOAD,function(){o=!0,s||e()})];return n.src&&zf?(s=!0,n.decode().then(function(){r&&e()}).catch(function(l){r&&(o?e():t())})):a.push(vs(n,B.ERROR,t)),function(){r=!1,a.forEach(he)}}let lr=null;class Rp extends Dr{constructor(e,t,n,r,s,o){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=r,this.canvas_={},this.color_=o,this.unlisten_=null,this.imageState_=s,this.size_=n,this.src_=t,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===q.LOADED){lr||(lr=we(1,1,void 0,{willReadFrequently:!0})),lr.drawImage(this.image_,0,0);try{lr.getImageData(0,0,1,1),this.tainted_=!1}catch{lr=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(B.CHANGE)}handleImageError_(){this.imageState_=q.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=q.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],t=this.size_[1],n=we(e,t);n.fillRect(0,0,e,t),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===q.IDLE){this.image_||this.initializeImage_(),this.imageState_=q.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=Ic(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==q.LOADED)return;const t=this.image_,n=document.createElement("canvas");n.width=Math.ceil(t.width*e),n.height=Math.ceil(t.height*e);const r=n.getContext("2d");r.scale(e,e),r.drawImage(t,0,0),r.globalCompositeOperation="multiply",r.fillStyle=dc(this.color_),r.fillRect(0,0,n.width/e,n.height/e),r.globalCompositeOperation="destination-in",r.drawImage(t,0,0),this.canvas_[e]=n}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function bp(i,e,t,n,r,s){let o=Ls.get(e,n,s);return o||(o=new Rp(i,e,t,n,r,s),Ls.set(e,n,s,o)),o}function Yu(i,e,t,n){return t!==void 0&&n!==void 0?[t/i,n/e]:t!==void 0?t/i:n!==void 0?n/e:1}class bl extends cc{constructor(e){e=e||{};const t=e.opacity!==void 0?e.opacity:1,n=e.rotation!==void 0?e.rotation:0,r=e.scale!==void 0?e.scale:1,s=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:t,rotation:n,scale:r,displacement:e.displacement!==void 0?e.displacement:[0,0],rotateWithView:s,declutterMode:e.declutterMode}),this.anchor_=e.anchor!==void 0?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=e.anchorOrigin!==void 0?e.anchorOrigin:"top-left",this.anchorXUnits_=e.anchorXUnits!==void 0?e.anchorXUnits:"fraction",this.anchorYUnits_=e.anchorYUnits!==void 0?e.anchorYUnits:"fraction",this.crossOrigin_=e.crossOrigin!==void 0?e.crossOrigin:null;const o=e.img!==void 0?e.img:null;this.imgSize_=e.imgSize;let a=e.src;H(!(a!==void 0&&o),4),H(!o||o&&this.imgSize_,5),(a===void 0||a.length===0)&&o&&(a=o.src||Z(o)),H(a!==void 0&&a.length>0,6),H(!((e.width!==void 0||e.height!==void 0)&&e.scale!==void 0),69);const l=e.src!==void 0?q.IDLE:q.LOADED;if(this.color_=e.color!==void 0?Is(e.color):null,this.iconImage_=bp(o,a,this.imgSize_!==void 0?this.imgSize_:null,this.crossOrigin_,l,this.color_),this.offset_=e.offset!==void 0?e.offset:[0,0],this.offsetOrigin_=e.offsetOrigin!==void 0?e.offsetOrigin:"top-left",this.origin_=null,this.size_=e.size!==void 0?e.size:null,e.width!==void 0||e.height!==void 0){let u,h;if(e.size)[u,h]=e.size;else{const c=this.getImage(1);if(c instanceof HTMLCanvasElement||c.src&&c.complete)u=c.width,h=c.height;else{this.initialOptions_=e;
6const d=()=>{if(this.unlistenImageChange(d),!this.initialOptions_)return;const f=this.iconImage_.getSize();this.setScale(Yu(f[0],f[1],e.width,e.height))};this.listenImageChange(d);return}}u!==void 0&&this.setScale(Yu(u,h,e.width,e.height))}}clone(){let e,t,n;return this.initialOptions_?(t=this.initialOptions_.width,n=this.initialOptions_.height):(e=this.getScale(),e=Array.isArray(e)?e.slice():e),new bl({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:e,width:t,height:n,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let e=this.normalizedAnchor_;if(!e){e=this.anchor_;const r=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!r)return null;e=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(e[0]*=r[0]),this.anchorYUnits_=="fraction"&&(e[1]*=r[1])}if(this.anchorOrigin_!="top-left"){if(!r)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(e[0]=-e[0]+r[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(e[1]=-e[1]+r[1])}this.normalizedAnchor_=e}const t=this.getDisplacement(),n=this.getScaleArray();return[e[0]-t[0]/n[0],e[1]+t[1]/n[1]]}setAnchor(e){this.anchor_=e,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(e){return this.iconImage_.getImage(e)}getPixelRatio(e){return this.iconImage_.getPixelRatio(e)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let e=this.offset_;if(this.offsetOrigin_!="top-left"){const t=this.getSize(),n=this.iconImage_.getSize();if(!t||!n)return null;e=e.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(e[0]=n[0]-t[0]-e[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(e[1]=n[1]-t[1]-e[1])}return this.origin_=e,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const e=this.getScaleArray();if(this.size_)return this.size_[0]*e[0];if(this.iconImage_.getImageState()==q.LOADED)return this.iconImage_.getSize()[0]*e[0]}getHeight(){const e=this.getScaleArray();if(this.size_)return this.size_[1]*e[1];if(this.iconImage_.getImageState()==q.LOADED)return this.iconImage_.getSize()[1]*e[1]}setScale(e){delete this.initialOptions_,super.setScale(e)}listenImageChange(e){this.iconImage_.addEventListener(B.CHANGE,e)}load(){this.iconImage_.load()}unlistenImageChange(e){this.iconImage_.removeEventListener(B.CHANGE,e)}}const As=bl;function Bu(i){return new Xt({fill:br(i,""),stroke:Ir(i,""),text:Ip(i),image:Sp(i)})}function br(i,e){const t=i[e+"fill-color"];if(t)return t==="none"?null:new Xi({color:t})}function Ir(i,e){const t=i[e+"stroke-width"],n=i[e+"stroke-color"];if(!(!t&&!n))return new Ln({width:t,color:n,lineCap:i[e+"stroke-line-cap"],lineJoin:i[e+"stroke-line-join"],lineDash:i[e+"stroke-line-dash"],lineDashOffset:i[e+"stroke-line-dash-offset"],miterLimit:i[e+"stroke-miter-limit"]})}function Ip(i){const e=i["text-value"];return e?new xc({text:e,font:i["text-font"],maxAngle:i["text-max-angle"],offsetX:i["text-offset-x"],offsetY:i["text-offset-y"],overflow:i["text-overflow"],placement:i["text-placement"],repeat:i["text-repeat"],scale:i["text-scale"],rotateWithView:i["text-rotate-with-view"],rotation:i["text-rotation"],textAlign:i["text-align"],justify:i["text-justify"],textBaseline:i["text-baseline"],padding:i["text-padding"],fill:br(i,"text-"),backgroundFill:br(i,"text-background-"),stroke:Ir(i,"text-"),backgroundStroke:Ir(i,"text-background-")}):void 0}function Sp(i){const e=i["icon-src"],t=i["icon-img"];if(e||t)return new As({src:e,img:t,imgSize:i["icon-img-size"],anchor:i["icon-anchor"],anchorOrigin:i["icon-anchor-origin"],anch
6orXUnits:i["icon-anchor-x-units"],anchorYUnits:i["icon-anchor-y-units"],color:i["icon-color"],crossOrigin:i["icon-cross-origin"],offset:i["icon-offset"],displacement:i["icon-displacement"],opacity:i["icon-opacity"],scale:i["icon-scale"],width:i["icon-width"],height:i["icon-height"],rotation:i["icon-rotation"],rotateWithView:i["icon-rotate-with-view"],size:i["icon-size"],declutterMode:i["icon-declutter-mode"]});const n=i["shape-points"];if(n){const s="shape-";return new vc({points:n,fill:br(i,s),stroke:Ir(i,s),radius:i["shape-radius"],radius1:i["shape-radius1"],radius2:i["shape-radius2"],angle:i["shape-angle"],displacement:i["shape-displacement"],rotation:i["shape-rotation"],rotateWithView:i["shape-rotate-with-view"],scale:i["shape-scale"],declutterMode:i["shape-declutter-mode"]})}const r=i["circle-radius"];if(r){const s="circle-";return new vl({radius:r,fill:br(i,s),stroke:Ir(i,s),displacement:i["circle-displacement"],scale:i["circle-scale"],rotation:i["circle-rotation"],rotateWithView:i["circle-rotate-with-view"],declutterMode:i["circle-declutter-mode"]})}}const Zu={RENDER_ORDER:"renderOrder"};class Mp extends Zn{constructor(e){e=e||{};const t=Object.assign({},e);delete t.style,delete t.renderBuffer,delete t.updateWhileAnimating,delete t.updateWhileInteracting,super(t),this.declutter_=e.declutter!==void 0?e.declutter:!1,this.renderBuffer_=e.renderBuffer!==void 0?e.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(e.style),this.updateWhileAnimating_=e.updateWhileAnimating!==void 0?e.updateWhileAnimating:!1,this.updateWhileInteracting_=e.updateWhileInteracting!==void 0?e.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(e){return super.getFeatures(e)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Zu.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(e){e.declutterTree||(e.declutterTree=new Rc(9)),this.getRenderer().renderDeclutter(e)}setRenderOrder(e){this.set(Zu.RENDER_ORDER,e)}setStyle(e){let t;if(e===void 0)t=ep;else if(e===null)t=null;else if(typeof e=="function")t=e;else if(e instanceof Xt)t=e;else if(Array.isArray(e)){const n=e.length,r=new Array(n);for(let s=0;s<n;++s){const o=e[s];o instanceof Xt?r[s]=o:r[s]=Bu(o)}t=r}else t=Bu(e);this.style_=t,this.styleFunction_=e===null?void 0:Qg(this.style_),this.changed()}}const Sc=Mp,jr={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},ss=[jr.FILL],gi=[jr.STROKE],Vi=[jr.BEGIN_PATH],Uu=[jr.CLOSE_PATH],V=jr;class Fp{drawCustom(e,t,n,r){}drawGeometry(e){}setStyle(e){}drawCircle(e,t){}drawFeature(e,t){}drawGeometryCollection(e,t){}drawLineString(e,t){}drawMultiLineString(e,t){}drawMultiPoint(e,t){}drawMultiPolygon(e,t){}drawPoint(e,t){}drawPolygon(e,t){}drawText(e,t){}setFillStrokeStyle(e,t){}setImageStyle(e,t){}setTextStyle(e,t){}}const Mc=Fp;class Pp extends Mc{constructor(e,t,n,r){super(),this.tolerance=e,this.maxExtent=t,this.pixelRatio=r,this.maxLineWidth=0,this.resolution=n,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(e){const t=this.pixelRatio;return t==1?e:e.map(function(n){return n*t})}appendFlatPointCoordinates(e,t){const n=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,s=this.coordinates;let o=s.length;for(let a=0,l=e.length;a<l;a+=t)r[0]=e[a],r[1]=e[a+1],zr(n,r)&&(s[o++]=r[0],s[o++]=r[1]);return o}appendFlatLineCoordinates(e,t,n,r,s,o){const a=this.coordinates;let l=a.length;const u=this.getBufferedMaxExtent();o&&(t+=r);let h=e[t],c=e[t+1];const d=this.tmpCoordinate_;let f=!0,g,p,m;for(g=t+r;g<n;g+=r)d[0]=e[g],d[1]=e[g+1],m=fa(u,d),m!==p?(f&&(a[l++]=h,a[l++]=c,f=!1),a[l++]=d[0],a[l++]=d[1]):m===be.INTERSECTING?(a[l++]=d[0],a[l++]=d[1],f=!1):f=!0,h=d[0],c=d[1],p=m;return(s&&f||g===t+r)&&(a[l++]=h,a[l++]=c),l}
6drawCustomCoordinates_(e,t,n,r,s){for(let o=0,a=n.length;o<a;++o){const l=n[o],u=this.appendFlatLineCoordinates(e,t,l,r,!1,!1);s.push(u),t=l}return t}drawCustom(e,t,n,r){this.beginGeometry(e,t);const s=e.getType(),o=e.getStride(),a=this.coordinates.length;let l,u,h,c,d;switch(s){case"MultiPolygon":l=e.getOrientedFlatCoordinates(),c=[];const f=e.getEndss();d=0;for(let g=0,p=f.length;g<p;++g){const m=[];d=this.drawCustomCoordinates_(l,d,f[g],o,m),c.push(m)}this.instructions.push([V.CUSTOM,a,c,e,n,xa]),this.hitDetectionInstructions.push([V.CUSTOM,a,c,e,r||n,xa]);break;case"Polygon":case"MultiLineString":h=[],l=s=="Polygon"?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),d=this.drawCustomCoordinates_(l,0,e.getEnds(),o,h),this.instructions.push([V.CUSTOM,a,h,e,n,_r]),this.hitDetectionInstructions.push([V.CUSTOM,a,h,e,r||n,_r]);break;case"LineString":case"Circle":l=e.getFlatCoordinates(),u=this.appendFlatLineCoordinates(l,0,l.length,o,!1,!1),this.instructions.push([V.CUSTOM,a,u,e,n,fi]),this.hitDetectionInstructions.push([V.CUSTOM,a,u,e,r||n,fi]);break;case"MultiPoint":l=e.getFlatCoordinates(),u=this.appendFlatPointCoordinates(l,o),u>a&&(this.instructions.push([V.CUSTOM,a,u,e,n,fi]),this.hitDetectionInstructions.push([V.CUSTOM,a,u,e,r||n,fi]));break;case"Point":l=e.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),u=this.coordinates.length,this.instructions.push([V.CUSTOM,a,u,e,n]),this.hitDetectionInstructions.push([V.CUSTOM,a,u,e,r||n]);break}this.endGeometry(t)}beginGeometry(e,t){this.beginGeometryInstruction1_=[V.BEGIN_GEOMETRY,t,0,e],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[V.BEGIN_GEOMETRY,t,0,e],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const e=this.hitDetectionInstructions;e.reverse();let t;const n=e.length;let r,s,o=-1;for(t=0;t<n;++t)r=e[t],s=r[0],s==V.END_GEOMETRY?o=t:s==V.BEGIN_GEOMETRY&&(r[2]=t,Tf(this.hitDetectionInstructions,o,t),o=-1)}setFillStrokeStyle(e,t){const n=this.state;if(e){const r=e.getColor();n.fillStyle=St(r||Ke)}else n.fillStyle=void 0;if(t){const r=t.getColor();n.strokeStyle=St(r||Cr);const s=t.getLineCap();n.lineCap=s!==void 0?s:Ms;const o=t.getLineDash();n.lineDash=o?o.slice():Ut;const a=t.getLineDashOffset();n.lineDashOffset=a||Kt;const l=t.getLineJoin();n.lineJoin=l!==void 0?l:Vn;const u=t.getWidth();n.lineWidth=u!==void 0?u:Rr;const h=t.getMiterLimit();n.miterLimit=h!==void 0?h:wr,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(e){const t=e.fillStyle,n=[V.SET_FILL_STYLE,t];return typeof t!="string"&&n.push(!0),n}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[V.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]}updateFillStyle(e,t){const n=e.fillStyle;(typeof n!="string"||e.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(t.call(this,e)),e.currentFillStyle=n)}updateStrokeStyle(e,t){const n=e.strokeStyle,r=e.lineCap,s=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,l=e.lineWidth,u=e.miterLimit;(e.currentStrokeStyle!=n||e.currentLineCap!=r||s!=e.currentLineDash&&!Ti(e.currentLineDash,s)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=l||e.currentMiterLimit!=u)&&(n!==void 0&&t.call(this,e),e.currentStrokeStyle=n,e.currentLineCap=r,e.currentLineDash=s,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=l,e.currentMiterLimit=u)}endGeometry(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const t=[V.END_GEOMETRY,e];this.instructions.push(t),this.hitDetectionInstructions.push(t)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Wh(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;mi(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Xr=Pp;class Lp extends Xr{constructor(e,t,n,r){super(e,t,n,r),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(e,t){if(!this.image_)return;this.beginGeometry(e,t);const n=e.getFlatCoordinates(),r=e.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([V.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.
6ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([V.DRAW_IMAGE,s,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}drawMultiPoint(e,t){if(!this.image_)return;this.beginGeometry(e,t);const n=e.getFlatCoordinates(),r=e.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([V.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([V.DRAW_IMAGE,s,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(e,t){const n=e.getAnchor(),r=e.getSize(),s=e.getOrigin();this.imagePixelRatio_=e.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=e.getHitDetectionImage(),this.image_=e.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=e.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScaleArray(),this.width_=r[0],this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=t}}const Ap=Lp;class kp extends Xr{constructor(e,t,n,r){super(e,t,n,r)}drawFlatCoordinates_(e,t,n,r){const s=this.coordinates.length,o=this.appendFlatLineCoordinates(e,t,n,r,!1,!1),a=[V.MOVE_TO_LINE_TO,s,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),n}drawLineString(e,t){const n=this.state,r=n.strokeStyle,s=n.lineWidth;if(r===void 0||s===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([V.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Ut,Kt],Vi);const o=e.getFlatCoordinates(),a=e.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push(gi),this.endGeometry(t)}drawMultiLineString(e,t){const n=this.state,r=n.strokeStyle,s=n.lineWidth;if(r===void 0||s===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([V.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Ut,Kt],Vi);const o=e.getEnds(),a=e.getFlatCoordinates(),l=e.getStride();let u=0;for(let h=0,c=o.length;h<c;++h)u=this.drawFlatCoordinates_(a,u,o[h],l);this.hitDetectionInstructions.push(gi),this.endGeometry(t)}finish(){const e=this.state;return e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&this.instructions.push(gi),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(e){e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(gi),e.lastStroke=this.coordinates.length),e.lastStroke=0,super.applyStroke(e),this.instructions.push(Vi)}}const Op=kp;class Dp extends Xr{constructor(e,t,n,r){super(e,t,n,r)}drawFlatCoordinatess_(e,t,n,r){const s=this.state,o=s.fillStyle!==void 0,a=s.strokeStyle!==void 0,l=n.length;this.instructions.push(Vi),this.hitDetectionInstructions.push(Vi);for(let u=0;u<l;++u){const h=n[u],c=this.coordinates.length,d=this.appendFlatLineCoordinates(e,t,h,r,!0,!a),f=[V.MOVE_TO_LINE_TO,c,d];this.instructions.push(f),this.hitDetectionInstructions.push(f),a&&(this.instructions.push(Uu),this.hitDetectionInstructions.push(Uu)),t=h}return o&&(this.instructions.push(ss),this.hitDetectionInstructions.push(ss)),a&&(this.instructions.push(gi),this.hitDetectionInstructions.push(gi)),t}drawCircle(e,t){const n=this.state,r=n.fillStyle,s=n.strokeStyle;if(r===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([V.SET_FILL_STYLE,Ke]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([V.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Ut,Kt]);const o=e.getFlatCoordinates(),a=e.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,a,!1,!1);const u=[V.CIRCLE,l];this.instructions.push(Vi,u),this.hitDetectionInstructions.push(Vi,u),n.fillStyle!==void 0&&(this.instructions.push(ss),this.hitDetectionInstructions.push(ss)),n.strokeStyle!==void 0&&(this.instructions.push(gi),this.hitDetectionInstructions.push(gi)),this.endGeometry(t)}drawPolygon(e,t){const n=this.state,r=n.fillStyle,s=n.strokeStyle;if(r===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([V.SET_FILL_STYLE,Ke]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([V.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Ut,Kt]);const o=e.getEnds(),a=e.getOrientedFlatCoordinates(),l=e.getStride();this.drawFlatCoordinatess_(a,0,o,l),this.endGeometry(t)}drawMultiPolygon(e,t){const n=this.state,r=n.fillStyle,s=n.strokeStyle;if(r===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([V.SET_FILL_STYLE,Ke]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([V.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Ut,Kt]);const o=e.getEndss(),a=e.getOrientedFlatCoordinates(),l=e.getStride();let u=0;for(let h=0,c=o.length;h<c;++h)u=this.drawFlatCoordinatess_(a,u,o[h],l);this.endGeometry(t)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const e=this.tolerance;if(e!==0){const t=this.coordinates;for(let n=0,r=t.length;n<r;++n)t[n]=Gi(t[n],e)}return super.finish()}setFillStrokeStyles_(){const e=this.state;e.fillStyle!==void 0&&this.updateFillStyle(e,this.createFill),e.strokeStyle!==void 0&&this.updateStrokeStyle(e,this.applyStroke)}}const Ku=Dp;function zp(i,e,t,n,r){const s=[];let o=t,a=0,l=e.slice(t,2);for(;a<i&&o+r<n;){const[u,h]=l.slice(-2),c=e[o+r],d=e[o+r+1],f=Math.sqrt((c-u)*(c-u)+(d-h)*(d-h));if(a+=f,a>=i){const g=(i-a+f)/f,p=Je(u,c,g),m=Je(h,d,g);l.push(p,m),s.push(l),l=[p,m],a==i&&(o+=r),a=0}else if(a<i)l.push(e[o+r],e[o+r+1]),o+=r;else{const g=f-a,p=Je(u,c,g/f),m=Je(h,d,g/f);l.push(p,m),s.push(l),l=[p,m],a=0,o+=r}}return a>0&&s.push(l),s}function Np(i,e,t,n,r){let s=t,o=t,a=0,l=0,u=t,h,c,d,f,g,p,m,_,y,x;for(c=t;c<n;c+=r){const v=e[c],E=e[c+1];g!==void 0&&(y=v-g,x=E-p,f=Math.sqrt(y*y+x*x),m!==void 0&&(l+=d,h=Math.acos((m*y+_*x)/(d*f)),h>i&&(l>a&&(a=l,s=u,o=c),l=0,u=c-r)),d=f,m=y,_=x),g=v,p=E}return l+=f,l>a?[u,c]:[s,o]}const ks={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class Gp extends Xr{constructor(e,t,n,r){super(e,t,n,r),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[Ke]={fillStyle:Ke},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const e=super.finish();return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e}drawText(e,t){const n=this.textFillState_,r=this.textStrokeState_,s=this.textState_;if(this.text_===""||!s||!n&&!r)return;const o=this.coordinates;let a=o.length;const l=e.getType();let u=null,h=e.getStride();if(s.placement==="line"&&(l=="LineString"||l=="MultiLineString"||l=="Polygon"||l=="MultiPolygon")){if(!pe(this.getBufferedMaxExtent(),e.getExtent()))return;let c;if(u=e.getFlatCoordinates(),l=="LineString")c=[u.length];else if(l=="MultiLineString")c=e.getEnds();else if(l=="Polygon")c=e.getEnds().slice(0,1);else if(l=="MultiPolygon"){const p=e.getEndss();c=[];for(let m=0,_=p.length;m<_;++m)c.push(p[m][0])}this.beginGeometry(e,t);const d=s.repeat,f=d?void 0:s.textAlign;let g=0;for(let p=0,m=c.length;p<m;++p){let _;d?_=zp(d*this.resolution,u,g,c[p],h):_=[u.slice(g,c[p])];for(let y=0,x=_.length;y<x;++y){const v=_[y];let E=0,R=v.length;if(f==null){const C=Np(s.maxAngle,v,0,v.length,2);E=C[0],R=C[1]}for(let C=E;C<R;C+=h)o.push(v[C],v[C+1]);const T=o.length;g=c[p],this.drawChars_(a,T),a=T}}this.endGeometry(t)}else{let c=s.overflow?null:[];switch(l){case"Point":case"MultiPoint":u=e.getFlatCoordinates();break;case"LineString":u=e.getFlatMidpoint();break;case"Circle":u=e.getCenter();break;case"MultiLineString":u=e.getFlatMidpoints(),h=2;break;case"Polygon":u=e.getFlatInteriorPoint(),s.overflow||c.push(u[2]/this.resolution),h=3;break;case"MultiPolygon":const _=e.getFlatInteriorPoints();u=[];for(let y=0,x=_.length;y<x;y+=3)s.overflow||c.push(_[y+2]/this.resolution),u.push(_[y],_[y+1]);if(u.length===0)return;h=2;break}const d=this.appendFlatPointCoordinates(u,h);if(d===a)return;if(c&&(d-a)/2!==u.length/h){let _=a/2;c=c.filter((y,x)=>{const v=o[(_+x)*2]===u[x*h]&&o[(_+x)*2+1]===u[x*h+1];return v||--_,v})}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&this.updateFillStyle(this.state,this.createFill),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(e,t);let f=s.padding;if(f!=Wi&&(s.scale[0]<0||s.scale[1]<0)){let _=s.padding[0],y=s.padding[1],x=s.padding[2],v=s.padding[3];s.scale[0]<0&&(y=-y,v=-v),s.scale[1]<0&&(_=-_,x=-x),f=[_,y,x,v]}const g=this.pixelRatio;this.instructions.push([V.DRAW_IMAGE,a,d,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,f==Wi?Wi:f.map(function(_){return _*g}),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,c]);const p=1/g,m=this.state.fillStyle;s.backgroundFill&&(this.state.fillStyle=Ke,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([V.DRAW_IMAGE,a,d,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[p,p],NaN,void 0,this.declutterImageWithText_,f,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?Ke:this.fillKey_,this.textOffsetX_,this.textOffsetY_,c]),s.backgroundFill&&(this.state.fillStyle=m,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(t)}}saveTextStates_(){const e=this.textStrokeState_,t=this.textState_,n=this.textFillState_,r=this.strokeKey_;e&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:t.font,textAlign:t.textAlign||Tr,justify:t.justify,textBaseline:t.textBaseline||Fs,scale:t.scale});const o=this.fillKey_;n&&(o in this.fillStates||(this.fillStates[o]={fillStyle:n.fillStyle}))}drawChars_(e,t){const n=this.textStrokeState_,r=this.textState_,s=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,u=ks[r.textBaseline],h=this.textOffsetY_*l,c=this.text_,d=n?n.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([V.DRAW_CHARS,e,t,u,r.overflow,a,r.maxAngle,l,h,s,d*l,c,o,1]),this.hitDetectionInstructions.push([V.DRAW_CHARS,e,t,u,r.overflow,a&&Ke,r.maxAngle,1,h,s,d,c,o,1/l])}setTextStyle(e,t){let n,r,s;if(!e)this.text_="";
6else{const o=e.getFill();o?(r=this.textFillState_,r||(r={},this.textFillState_=r),r.fillStyle=St(o.getColor()||Ke)):(r=null,this.textFillState_=r);const a=e.getStroke();if(!a)s=null,this.textStrokeState_=s;else{s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const g=a.getLineDash(),p=a.getLineDashOffset(),m=a.getWidth(),_=a.getMiterLimit();s.lineCap=a.getLineCap()||Ms,s.lineDash=g?g.slice():Ut,s.lineDashOffset=p===void 0?Kt:p,s.lineJoin=a.getLineJoin()||Vn,s.lineWidth=m===void 0?Rr:m,s.miterLimit=_===void 0?wr:_,s.strokeStyle=St(a.getColor()||Cr)}n=this.textState_;const l=e.getFont()||mc;yc(l);const u=e.getScaleArray();n.overflow=e.getOverflow(),n.font=l,n.maxAngle=e.getMaxAngle(),n.placement=e.getPlacement(),n.textAlign=e.getTextAlign(),n.repeat=e.getRepeat(),n.justify=e.getJustify(),n.textBaseline=e.getTextBaseline()||Fs,n.backgroundFill=e.getBackgroundFill(),n.backgroundStroke=e.getBackgroundStroke(),n.padding=e.getPadding()||Wi,n.scale=u===void 0?[1,1]:u;const h=e.getOffsetX(),c=e.getOffsetY(),d=e.getRotateWithView(),f=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=h===void 0?0:h,this.textOffsetY_=c===void 0?0:c,this.textRotateWithView_=d===void 0?!1:d,this.textRotation_=f===void 0?0:f,this.strokeKey_=s?(typeof s.strokeStyle=="string"?s.strokeStyle:Z(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.repeat||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=r?typeof r.fillStyle=="string"?r.fillStyle:"|"+Z(r.fillStyle):""}this.declutterImageWithText_=t}}const jp={Circle:Ku,Default:Xr,Image:Ap,LineString:Op,Polygon:Ku,Text:Gp};class Xp{constructor(e,t,n,r){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=r,this.resolution_=n,this.buildersByZIndex_={}}finish(){const e={};for(const t in this.buildersByZIndex_){e[t]=e[t]||{};const n=this.buildersByZIndex_[t];for(const r in n){const s=n[r].finish();e[t][r]=s}}return e}getBuilder(e,t){const n=e!==void 0?e.toString():"0";let r=this.buildersByZIndex_[n];r===void 0&&(r={},this.buildersByZIndex_[n]=r);let s=r[t];if(s===void 0){const o=jp[t];s=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[t]=s}return s}}const Os=Xp;class Wp extends zh{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.declutterExecutorGroup=null}getFeatures(e){return W()}getData(e){return null}prepareFrame(e){return W()}renderFrame(e,t){return W()}loadedTileCallback(e,t,n){e[t]||(e[t]={}),e[t][n.tileCoord.toString()]=n}createLoadedTileFinder(e,t,n){return(r,s)=>{const o=this.loadedTileCallback.bind(this,n,r);return e.forEachLoadedTile(t,r,s,o)}}forEachFeatureAtCoordinate(e,t,n,r,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(e){const t=e.target;(t.getState()===q.LOADED||t.getState()===q.ERROR)&&this.renderIfReadyAndVisible()}loadImage(e){let t=e.getState();return t!=q.LOADED&&t!=q.ERROR&&e.addEventListener(B.CHANGE,this.boundHandleImageChange_),t==q.IDLE&&(e.load(),t=e.getState()),t==q.LOADED}renderIfReadyAndVisible(){const e=this.getLayer();e&&e.getVisible()&&e.getSourceState()==="ready"&&e.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const Vp=Wp;class Yp extends mt{constructor(e,t,n,r){super(e),this.inversePixelTransform=t,this.frameState=n,this.context=r}}const Fc=Yp,qu=[];let Sn=null;function Bp(){Sn=we(1,1,void 0,{willReadFrequently:!0})}class Zp extends Vp{constructor(e){super(e),this.container=null,this.renderedResolution,this.tempTransform=He(),this.pixelTransform=He(),this.inversePixelTransform=He(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(e,t,n){Sn||Bp(),Sn.clearRect(0,0,1,1);let r;try{Sn.drawImage(e,t,n,1,1,0,0,1,1),r=Sn.getImageData(0,0,1,1).data}catch{return Sn=null,null}return r}getBackground(e){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(e.viewState.resolution)),n||void 0}useContainer(e,t,n){const r=this.getLayer().getClassName();let s,o;
6if(e&&e.className===r&&(!n||e&&e.style.backgroundColor&&Ti(Is(e.style.backgroundColor),Is(n)))){const a=e.firstElementChild;a instanceof HTMLCanvasElement&&(o=a.getContext("2d"))}if(o&&o.canvas.style.transform===t?(this.container=e,this.context=o,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=r;let a=s.style;a.position="absolute",a.width="100%",a.height="100%",o=we();const l=o.canvas;s.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=s,this.context=o}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(e,t,n){const r=ei(n),s=ro(n),o=no(n),a=io(n);me(t.coordinateToPixelTransform,r),me(t.coordinateToPixelTransform,s),me(t.coordinateToPixelTransform,o),me(t.coordinateToPixelTransform,a);const l=this.inversePixelTransform;me(l,r),me(l,s),me(l,o),me(l,a),e.save(),e.beginPath(),e.moveTo(Math.round(r[0]),Math.round(r[1])
6),e.lineTo(Math.round(s[0]),Math.round(s[1])),e.lineTo(Math.round(o[0]),Math.round(o[1])),e.lineTo(Math.round(a[0]),Math.round(a[1])),e.clip()}dispatchRenderEvent_(e,t,n){const r=this.getLayer();if(r.hasListener(e)){const s=new Fc(e,this.inversePixelTransform,n,t);r.dispatchEvent(s)}}preRender(e,t){this.frameState=t,this.dispatchRenderEvent_(Ft.PRERENDER,e,t)}postRender(e,t){this.dispatchRenderEvent_(Ft.POSTRENDER,e,t)}getRenderTransform(e,t,n,r,s,o,a){const l=s/2,u=o/2,h=r/t,c=-h,d=-e[0]+a,f=-e[1];return pt(this.tempTransform,l,u,h,c,-n,d,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const Il=Zp;function Up(i,e,t,n,r,s,o,a,l,u,h,c){let d=i[e],f=i[e+1],g=0,p=0,m=0,_=0;function y(){g=d,p=f,e+=n,d=i[e],f=i[e+1],_+=m,m=Math.sqrt((d-g)*(d-g)+(f-p)*(f-p))}do y();while(e<t-n&&_+m<s);let x=m===0?0:(s-_)/m;const v=Je(g,d,x),E=Je(p,f,x),R=e-n,T=_,C=s+a*l(u,r,h);for(;e<t-n&&_+m<C;)y();x=m===0?0:(C-_)/m;const I=Je(g,d,x),P=Je(p,f,x);let b;if(c){const z=[v,E,I,P];ec(z,0,4,2,c,z,z),b=z[0]>z[2]}else b=v>I;const G=Math.PI,j=[],J=R+n===e;e=R,m=0,_=T,d=i[e],f=i[e+1];let A;if(J){y(),A=Math.atan2(f-p,d-g),b&&(A+=A>0?-G:G);const z=(I+v)/2,S=(P+E)/2;return j[0]=[z,S,(C-s)/2,A,r],j}r=r.replace(/\n/g," ");for(let z=0,S=r.length;z<S;){y();let N=Math.atan2(f-p,d-g);if(b&&(N+=N>0?-G:G),A!==void 0){let M=N-A;if(M+=M>G?-2*G:M<-G?2*G:0,Math.abs(M)>o)return null}A=N;const te=z;let Y=0;for(;z<S;++z){const M=b?S-z-1:z,L=a*l(u,r[M],h);if(e+n<t&&_+m<s+Y+L/2)break;Y+=L}if(z===te)continue;const ue=b?r.substring(S-te,S-z):r.substring(te,z);x=m===0?0:(s+Y/2-_)/m;const w=Je(g,d,x),ne=Je(p,f,x);j.push([w,ne,Y/2,N,ue]),s+=Y}return j}const xn=at(),si=[],Dt=[],zt=[],oi=[];function Hu(i){return i[3].declutterBox}const Ju=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function jo(i,e){return e==="start"?e=Ju.test(i)?"right":"left":e==="end"&&(e=Ju.test(i)?"left":"right"),ks[e]}function Kp(i,e,t){return t>0&&i.push(`
7`,""),i.push(e,""),i}class qp{constructor(e,t,n,r){this.overlaps=n,this.pixelRatio=t,this.resolution=e,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=He(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={}}createLabel(e,t,n,r){const s=e+t+n+r;if(this.labels_[s])return this.labels_[s];const o=r?this.strokeStates[r]:null,a=n?this.fillStates[n]:null,l=this.textStates[t],u=this.pixelRatio,h=[l.scale[0]*u,l.scale[1]*u],c=Array.isArray(e),d=l.justify?ks[l.justify]:jo(Array.isArray(e)?e[0]:e,l.textAlign||Tr),f=r&&o.lineWidth?o.lineWidth:0,g=c?e:e.split(`
8`).reduce(Kp,[]),{width:p,height:m,widths:_,heights:y,lineWidths:x}=Hg(l,g),v=p+f,E=[],R=(v+2)*h[0],T=(m+f)*h[1],C={width:R<0?Math.floor(R):Math.ceil(R),height:T<0?Math.floor(T):Math.ceil(T),contextInstructions:E};(h[0]!=1||h[1]!=1)&&E.push("scale",h),r&&(E.push("strokeStyle",o.strokeStyle),E.push("lineWidth",f),E.push("lineCap",o.lineCap),E.push("lineJoin",o.lineJoin),E.push("miterLimit",o.miterLimit),E.push("setLineDash",[o.lineDash]),E.push("lineDashOffset",o.lineDashOffset)),n&&E.push("fillStyle",a.fillStyle),E.push("textBaseline","middle"),E.push("textAlign","center");const I=.5-d;let P=d*v+I*f;const b=[],G=[];let j=0,J=0,A=0,z=0,S;for(let N=0,te=g.length;N<te;N+=2){const Y=g[N];if(Y===`
9`){J+=j,j=0,P=d*v+I*f,++z;continue}const ue=g[N+1]||l.font;ue!==S&&(r&&b.push("font",ue),n&&G.push("font",ue),S=ue),j=Math.max(j,y[A]);const w=[Y,P+I*_[A]+d*(_[A]-x[z]),.5*(f+j)+J];P+=_[A],r&&b.push("strokeText",w),n&&G.push("fillText",w),++A}return Array.prototype.push.apply(E,b),Array.prototype.push.apply(E,G),this.labels_[s]=C,C}replayTextBackground_(e,t,n,r,s,o,a){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,n),e.lineTo.apply(e,r),e.lineTo.apply(e,s),e.lineTo.apply(e,t),o&&(this.alignFill_=o[2],this.fill_(e)),a&&(this.setStrokeStyle_(e,a),e.stroke())}calculateImageOrLabelDimensions_(e,t,n,r,s,o,a,l,u,h,c,d,f,g,p,m){a*=d[0],l*=d[1];let _=n-a,y=r-l;const x=s+u>e?e-u:s,v=o+h>t?t-h:o,E=g[3]+x*d[0]+g[1],R=g[0]+v*d[1]+g[2],T=_-g[3],C=y-g[0];(p||c!==0)&&(si[0]=T,oi[0]=T,si[1]=C,Dt[1]=C,Dt[0]=T+E,zt[0]=Dt[0],zt[1]=C+R,oi[1]=zt[1]);let I;return c!==0?(I=pt(He(),n,r,1,1,c,-n,-r),me(I,si),me(I,Dt),me(I,zt),me(I,oi),Jt(Math.min(si[0],Dt[0],zt[0],oi[0]),Math.min(si[1],Dt[1],zt[1],oi[1]),Math.max(si[0],Dt[0],zt[0],oi[0]),Math.max(si[1],Dt[1],zt[1],oi[1]),xn)):Jt(Math.min(T,T+E),Math.min(C,C+R),Math.max(T,T+E),Math.max(C,C+R),xn),f&&(_=Math.round(_),y=Math.round(y)),{drawImageX:_,drawImageY:y,drawImageW:x,drawImageH:v,originX:u,originY:h,declutterBox:{minX:xn[0],minY:xn[1],maxX:xn[2],maxY:xn[3],value:m},canvasTransform:I,scale:d}}replayImageOrLabel_(e,t,n,r,s,o,a){const l=!!(o||a),u=r.declutterBox,h=e.canvas,c=a?a[2]*r.scale[0]/2:0;return u.minX-c<=h.width/t&&u.maxX+c>=0&&u.minY-c<=h.height/t&&u.maxY+c>
9=0&&(l&&this.replayTextBackground_(e,si,Dt,zt,oi,o,a),Jg(e,r.canvasTransform,s,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0}fill_(e){if(this.alignFill_){const t=me(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;e.save(),e.translate(t[0]%n,t[1]%n),e.rotate(this.viewRotation_)}e.fill(),this.alignFill_&&e.restore()}setStrokeStyle_(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.lineDashOffset=t[7],e.setLineDash(t[6])}drawLabelWithPointPlacement_(e,t,n,r){const s=this.textStates[t],o=this.createLabel(e,t,r,n),a=this.strokeStates[n],l=this.pixelRatio,u=jo(Array.isArray(e)?e[0]:e,s.textAlign||Tr),h=ks[s.textBaseline||Fs],c=a&&a.lineWidth?a.lineWidth:0,d=o.width/l-2*s.scale[0],f=u*d+2*(.5-u)*c,g=h*o.height/l+2*(.5-h)*c;return{label:o,anchorX:f,anchorY:g}}execute_(e,t,n,r,s,o,a,l){let u;this.pixelCoordinates_&&Ti(n,this.renderedTransform_)?u=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),u=yi(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),Nf(this.renderedTransform_,n));let h=0;const c=r.length;let d=0,f,g,p,m,_,y,x,v,E,R,T,C,I=0,P=0,b=null,G=null;const j=this.coordinateCache_,J=this.viewRotation_,A=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,z={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:J},S=this.instructions!=r||this.overlaps?0:200;let N,te,Y,ue;for(;h<c;){const w=r[h];switch(w[0]){case V.BEGIN_GEOMETRY:N=w[1],ue=w[3],N.getGeometry()?a!==void 0&&!pe(a,ue.getExtent())?h=w[2]+1:++h:h=w[2];break;case V.BEGIN_PATH:I>S&&(this.fill_(e),I=0),P>S&&(e.stroke(),P=0),!I&&!P&&(e.beginPath(),m=NaN,_=NaN),++h;break;case V.CIRCLE:d=w[1];const M=u[d],L=u[d+1],re=u[d+2],_e=u[d+3],ce=re-M,Se=_e-L,O=Math.sqrt(ce*ce+Se*Se);e.moveTo(M+O,L),e.arc(M,L,O,0,2*Math.PI,!0),++h;break;case V.CLOSE_PATH:e.closePath(),++h;break;case V.CUSTOM:d=w[1],f=w[2];const bi=w[3],tt=w[4],it=w.length==6?w[5]:void 0;z.geometry=bi,z.feature=N,h in j||(j[h]=[]);const lt=j[h];it?it(u,d,f,2,lt):(lt[0]=u[d],lt[1]=u[d+1],lt.length=2),tt(lt,z),++h;break;case V.DRAW_IMAGE:d=w[1],f=w[2],v=w[3],g=w[4],p=w[5];let Me=w[6];const Ce=w[7],At=w[8],Ne=w[9],Xe=w[10];let D=w[11];const _t=w[12];let ve=w[13];const Oe=w[14],We=w[15];if(!v&&w.length>=20){E=w[19],R=w[20],T=w[21],C=w[22];const Te=this.drawLabelWithPointPlacement_(E,R,T,C);v=Te.label,w[3]=v;const rt=w[23];g=(Te.anchorX-rt)*this.pixelRatio,w[4]=g;const xe=w[24];p=(Te.anchorY-xe)*this.pixelRatio,w[5]=p,Me=v.height,w[6]=Me,ve=v.width,w[13]=ve}let Ve;w.length>25&&(Ve=w[25]);let Ge,vt,nt;w.length>17?(Ge=w[16],vt=w[17],nt=w[18]):(Ge=Wi,vt=!1,nt=!1),Xe&&A?D+=J:!Xe&&!A&&(D-=J);let xt=0;for(;d<f;d+=2){if(Ve&&Ve[xt++]<ve/this.pixelRatio)continue;const Te=this.calculateImageOrLabelDimensions_(v.width,v.height,u[d],u[d+1],ve,Me,g,p,At,Ne,D,_t,s,Ge,vt||nt,N),rt=[e,t,v,Te,Ce,vt?b:null,nt?G:null];if(l){if(Oe==="none")continue;if(Oe==="obstacle"){l.insert(Te.declutterBox);continue}else{let xe,ut;if(We){const Pe=f-d;if(!We[Pe]){We[Pe]=rt;continue}if(xe=We[Pe],delete We[Pe],ut=Hu(xe),l.collides(ut))continue}if(l.collides(Te.declutterBox))continue;xe&&(l.insert(ut),this.replayImageOrLabel_.apply(this,xe)),l.insert(Te.declutterBox)}}this.replayImageOrLabel_.apply(this,rt)}++h;break;case V.DRAW_CHARS:const kt=w[1],Q=w[2],gn=w[3],Ii=w[4];C=w[5];const Fe=w[6],pn=w[7],Si=w[8];T=w[9];const Mi=w[10];E=w[11],R=w[12];const Et=[w[13],w[13]],Fi=this.textStates[R],Ye=Fi.font,wt=[Fi.scale[0]*pn,Fi.scale[1]*pn];let Pi;Ye in this.widths_?Pi=this.widths_[Ye]:(Pi={},this.widths_[Ye]=Pi);const Ot=hc(u,kt,Q,2),Br=Math.abs(wt[0])*zu(Ye,E,Pi);if(Ii||Br<=Ot){const Te=this.textStates[R].textAlign,rt=(Ot-Br)*jo(E,Te),xe=Up(u,kt,Q,2,E,rt,Fe,Math.abs(wt[0]),zu,Ye,Pi,A?0:this.viewRotation_);e:if(xe){const ut=[];let Pe,ti,ii,Re,Be;if(T)for(Pe=0,ti=xe.length;Pe<ti;++Pe){Be=xe[Pe],ii=Be[4],Re=this.createLabel(ii,R,"",T),g=Be[2]+(wt[0]<0?-Mi:Mi),p=gn*Re.height+(.5-gn)*2*Mi*wt[1]/wt[0]-Si;const ht=this.calculateImageOrLabelDimensions_(Re.width,Re.height,Be[0],Be[1],Re.width,Re.height,g,p,0,0,Be[3],Et,!1,Wi,!1,N);if(l&&l.collides(ht.declutterBox))break e;ut.push([e,t,Re,ht,1,null,null])}if(C)for(Pe=0,ti=xe.length;Pe<ti;++Pe){Be=xe[Pe],ii=Be[4],Re=this.createLabel(ii,R,C,""),g=Be[2],p=gn*
9Re.height-Si;const ht=this.calculateImageOrLabelDimensions_(Re.width,Re.height,Be[0],Be[1],Re.width,Re.height,g,p,0,0,Be[3],Et,!1,Wi,!1,N);if(l&&l.collides(ht.declutterBox))break e;ut.push([e,t,Re,ht,1,null,null])}l&&l.load(ut.map(Hu));for(let ht=0,xo=ut.length;ht<xo;++ht)this.replayImageOrLabel_.apply(this,ut[ht])}}++h;break;case V.END_GEOMETRY:if(o!==void 0){N=w[1];const Te=o(N,ue);if(Te)return Te}++h;break;case V.FILL:S?I++:this.fill_(e),++h;break;case V.MOVE_TO_LINE_TO:for(d=w[1],f=w[2],te=u[d],Y=u[d+1],y=te+.5|0,x=Y+.5|0,(y!==m||x!==_)&&(e.moveTo(te,Y),m=y,_=x),d+=2;d<f;d+=2)te=u[d],Y=u[d+1],y=te+.5|0,x=Y+.5|0,(d==f-2||y!==m||x!==_)&&(e.lineTo(te,Y),m=y,_=x);++h;break;case V.SET_FILL_STYLE:b=w,this.alignFill_=w[2],I&&(this.fill_(e),I=0,P&&(e.stroke(),P=0)),e.fillStyle=w[1],++h;break;case V.SET_STROKE_STYLE:G=w,P&&(e.stroke(),P=0),this.setStrokeStyle_(e,w),++h;break;case V.STROKE:S?P++:e.stroke(),++h;break;default:++h;break}}I&&this.fill_(e),P&&e.stroke()}execute(e,t,n,r,s,o){this.viewRotation_=r,this.execute_(e,t,n,this.instructions,s,void 0,void 0,o)}executeHitDetection(e,t,n,r,s){return this.viewRotation_=n,this.execute_(e,1,t,this.hitDetectionInstructions,!0,r,s)}}const Hp=qp,Xo=["Polygon","Circle","LineString","Image","Text","Default"];class Jp{constructor(e,t,n,r,s,o){this.maxExtent_=e,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=t,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=He(),this.createExecutors_(s)}clip(e,t){const n=this.getClipCoords(t);e.beginPath(),e.moveTo(n[0],n[1]),e.lineTo(n[2],n[3]),e.lineTo(n[4],n[5]),e.lineTo(n[6],n[7]),e.clip()}createExecutors_(e){for(const t in e){let n=this.executorsByZIndex_[t];n===void 0&&(n={},this.executorsByZIndex_[t]=n);const r=e[t];for(const s in r){const o=r[s];n[s]=new Hp(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}}hasExecutors(e){for(const t in this.executorsByZIndex_){const n=this.executorsByZIndex_[t];for(let r=0,s=e.length;r<s;++r)if(e[r]in n)return!0}return!1}forEachFeatureAtCoordinate(e,t,n,r,s,o){r=Math.round(r);const a=r*2+1,l=pt(this.hitDetectionTransform_,r+.5,r+.5,1/t,-1/t,-n,-e[0],-e[1]),u=!this.hitDetectionContext_;u&&(this.hitDetectionContext_=we(a,a,void 0,{willReadFrequently:!0}));const h=this.hitDetectionContext_;h.canvas.width!==a||h.canvas.height!==a?(h.canvas.width=a,h.canvas.height=a):u||h.clearRect(0,0,a,a);let c;this.renderBuffer_!==void 0&&(c=at(),dr(c,e),mi(c,t*(this.renderBuffer_+r),c));const d=$p(r);let f;function g(E,R){const T=h.getImageData(0,0,a,a).data;for(let C=0,I=d.length;C<I;C++)if(T[d[C]]>0){if(!o||f!=="Image"&&f!=="Text"||o.includes(E)){const P=(d[C]-3)/4,b=r-P%a,G=r-(P/a|0),j=s(E,R,b*b+G*G);if(j)return j}h.clearRect(0,0,a,a);break}}const p=Object.keys(this.executorsByZIndex_).map(Number);p.sort(Zi);let m,_,y,x,v;for(m=p.length-1;m>=0;--m){const E=p[m].toString();for(y=this.executorsByZIndex_[E],_=Xo.length-1;_>=0;--_)if(f=Xo[_],x=y[f],x!==void 0&&(v=x.executeHitDetection(h,l,n,g,c),v))return v}}getClipCoords(e){const t=this.maxExtent_;if(!t)return null;const n=t[0],r=t[1],s=t[2],o=t[3],a=[n,r,n,o,s,o,s,r];return yi(a,0,8,2,e,a),a}isEmpty(){return Ui(this.executorsByZIndex_)}execute(e,t,n,r,s,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(Zi),this.maxExtent_&&(e.save(),this.clip(e,n)),o=o||Xo;let u,h,c,d,f,g;for(a&&l.reverse(),u=0,h=l.length;u<h;++u){const p=l[u].toString();for(f=this.executorsByZIndex_[p],c=0,d=o.length;c<d;++c){const m=o[c];g=f[m],g!==void 0&&g.execute(e,t,n,r,s,a)}}this.maxExtent_&&e.restore()}}const Wo={};function $p(i){if(Wo[i]!==void 0)return Wo[i];const e=i*2+1,t=i*i,n=new Array(t+1);for(let s=0;s<=i;++s)for(let o=0;o<=i;++o){const a=s*s+o*o;if(a>t)break;let l=n[a];l||(l=[],n[a]=l),l.push(((i+s)*e+(i+o))*4+3),s>0&&l.push(((i-s)*e+(i+o))*4+3),o>0&&(l.push(((i+s)*e+(i-o))*4+3),s>0&&l.push(((i-s)*e+(i-o))*4+3))}const r=[];for(let s=0,o=n.length;s<o;++s)n[s]&&r.push(...n[s]);return Wo[i]=r,r}const Ds=Jp;class Qp extends Mc{constructor(e,t,n,r,s,o,a){super(),this.context_=e,this.pixelRatio_=t,this.extent_=n,this.transform_=r,this.transformRotation_=r?$a(Math.atan2(r[1],r[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=o,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=He()}drawImages_(e,t,n,r){if(!this.image_)return;const s=yi(e,t,n,r,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;this.imageOpacity_!=1&&(o.globalAlpha=l*this.imageOpacity_);let u=this.imageRotation_;this.transformRotation_===0&&(u-=this.viewRotation_),this.imageRotateWithView_&&(u+=this.viewRotation_);for(let h=0,c=s.length;h<c;h+=2){const d=s[h]-this.imageAnchorX_,f=s[h+1]-this.imageAnchorY_;if(u!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const g=d+this.imageAnchorX_,p=f+this.imageAnchorY_;pt(a,g,p,1,1,u,-g,-p),o.setTransform.apply(o,a),o.translate(g,p),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,d,f,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(o.globalAlpha=l)}drawText_(e,t,n,r){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=yi(e,t,n,r,this.transform_,this.pixelCoordinates_),o=this.context_;let a=this.textRotation_;for(this.transformRotation_===0&&(a-=this.viewRotation_),this.textRotateWithView_&&(a+=this.viewRotation_);t<n;t+=r){const l=s[t]+this.textOffsetX_,u=s[t+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(o.translate(l-this.textOffsetX_,u-this.textOffsetY_),o.rotate(a),o.translate(this.textOffsetX_,this.textOffsetY_),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0
9),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&o.strokeText(this.text_,l,u),this.textFillState_&&o.fillText(this.text_,l,u))}}moveToLineTo_(e,t,n,r,s){const o=this.context_,a=yi(e,t,n,r,this.transform_,this.pixelCoordinates_);o.moveTo(a[0],a[1]);let l=a.length;s&&(l-=2);for(let u=2;u<l;u+=2)o.lineTo(a[u],a[u+1]);return s&&o.closePath(),n}drawRings_(e,t,n,r){for(let s=0,o=n.length;s<o;++s)t=this.moveToLineTo_(e,t,n[s],r,!0);return t}drawCircle(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!pe(this.extent_,e.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=Eg(e,this.transform_,this.pixelCoordinates_),n=t[2]-t[0],r=t[3]-t[1],s=Math.sqrt(n*n+r*r),o=this.context_;o.beginPath(),o.arc(t[0],t[1],s,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}this.text_!==""&&this.drawText_(e.getCenter(),0,2,2)}}setStyle(e){this.setFillStrokeStyle(e.getFill(),e.getStroke()),this.setImageStyle(e.getImage()),this.setTextStyle(e.getText())}setTransform(e){this.transform_=e}drawGeometry(e){switch(e.getType()){case"Point":this.drawPoint(e);break;case"LineString":this.drawLineString(e);break;case"Polygon":this.drawPolygon(e);break;case"MultiPoint":this.drawMultiPoint(e);break;case"MultiLineString":this.drawMultiLineString(e);break;case"MultiPolygon":this.drawMultiPolygon(e);break;case"GeometryCollection":this.drawGeometryCollection(e);break;case"Circle":this.drawCircle(e);break}}drawFeature(e,t){const n=t.getGeometryFunction()(e);n&&(this.setStyle(t),this.drawGeometry(n))}drawGeometryCollection(e){const t=e.getGeometriesArray();for(let n=0,r=t.length;n<r;++n)this.drawGeometry(t[n])}drawPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getFlatCoordinates(),n=e.getStride();this.image_&&this.drawImages_(t,0,t.length,n),this.text_!==""&&this.drawText_(t,0,t.length,n)}drawMultiPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getFlatCoordinates(),n=e.getStride();this.image_&&this.drawImages_(t,0,t.length,n),this.text_!==""&&this.drawText_(t,0,t.length,n)}drawLineString(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!pe(this.extent_,e.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const t=this.context_,n=e.getFlatCoordinates();t.beginPath(),this.moveToLineTo_(n,0,n.length,e.getStride(),!1),t.stroke()}if(this.text_!==""){const t=e.getFlatMidpoint();this.drawText_(t,0,2,2)}}}drawMultiLineString(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getExtent();if(pe(this.extent_,t)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const n=this.context_,r=e.getFlatCoordinates();let s=0;const o=e.getEnds(),a=e.getStride();n.beginPath();for(let l=0,u=o.length;l<u;++l)s=this.moveToLineTo_(r,s,o[l],a,!1);n.stroke()}if(this.text_!==""){const n=e.getFlatMidpoints();this.drawText_(n,0,n.length,2)}}}drawPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!pe(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=this.context_;t.beginPath(),this.drawRings_(e.getOrientedFlatCoordinates(),0,e.getEnds(),e.getStride()),this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(this.text_!==""){const t=e.getFlatInteriorPoint();this.drawText_(t,0,2,2)}}}drawMultiPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!pe(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=this.context_,n=e.getOrientedFlatCoordinates();let r=0;const s=e.getEndss(),o=e.getStride();t.beginPath();for(let a=0,l=s.length;a<l;++a){const u=s[a];r=this.drawRings_(n,r,u,o)}this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(this.text_!==""){const t=e.getFlatInteriorPoints();this.drawText_(t,0,t.length,2)}}}setContextFillState_(e){const t=this.context_,n=this.contextFillState_;n?n.fillStyle!=e.fillStyle&&(n.fillStyle=e.fillStyle,t.fillStyle=e.fillStyle):(t.fillStyle=e.fillStyle,this.contextFillState_={fillStyle:e.fillStyle})}setContextStrokeState_(e){const t=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=e.lineCap&&(n.lineCap=e.lineCap,t.lineCap=e.lineCap),Ti(n.lineDash,e.lineDash)||t.setLineDash(n.lineDash=e.lineDash),n.lineDashOffset!=e.lineDashOffset&&(n.lineDashOffset=e.lineDashOffset,t.lineDashOffset=e.lineDashOffset),n.lineJoin!=e.lineJoin&&(n.lineJoin=e.lineJoin,t.lineJoin=e.lineJoin),n.lineWidth!=e.lineWidth&&(n.lineWidth=e.lineWidth,t.lineWidth=e.lineWidth),n.miterLimit!=e.miter
9Limit&&(n.miterLimit=e.miterLimit,t.miterLimit=e.miterLimit),n.strokeStyle!=e.strokeStyle&&(n.strokeStyle=e.strokeStyle,t.strokeStyle=e.strokeStyle)):(t.lineCap=e.lineCap,t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.miterLimit=e.miterLimit,t.strokeStyle=e.strokeStyle,this.contextStrokeState_={lineCap:e.lineCap,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,lineJoin:e.lineJoin,lineWidth:e.lineWidth,miterLimit:e.miterLimit,strokeStyle:e.strokeStyle})}setContextTextState_(e){const t=this.context_,n=this.contextTextState_,r=e.textAlign?e.textAlign:Tr;n?(n.font!=e.font&&(n.font=e.font,t.font=e.font),n.textAlign!=r&&(n.textAlign=r,t.textAlign=r),n.textBaseline!=e.textBaseline&&(n.textBaseline=e.textBaseline,t.textBaseline=e.textBaseline)):(t.font=e.font,t.textAlign=r,t.textBaseline=e.textBaseline,this.contextTextState_={font:e.font,textAlign:r,textBaseline:e.textBaseline})}setFillStrokeStyle(e,t){if(!e)this.fillState_=null;else{const n=e.getColor();this.fillState_={fillStyle:St(n||Ke)}}if(!t)this.strokeState_=null;else{const n=t.getColor(),r=t.getLineCap(),s=t.getLineDash(),o=t.getLineDashOffset(),a=t.getLineJoin(),l=t.getWidth(),u=t.getMiterLimit(),h=s||Ut;this.strokeState_={lineCap:r!==void 0?r:Ms,lineDash:this.pixelRatio_===1?h:h.map(c=>c*this.pixelRatio_),lineDashOffset:(o||Kt)*this.pixelRatio_,lineJoin:a!==void 0?a:Vn,lineWidth:(l!==void 0?l:Rr)*this.pixelRatio_,miter
9Limit:u!==void 0?u:wr,strokeStyle:St(n||Cr)}}}setImageStyle(e){let t;if(!e||!(t=e.getSize())){this.image_=null;return}const n=e.getPixelRatio(this.pixelRatio_),r=e.getAnchor(),s=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=r[0]*n,this.imageAnchorY_=r[1]*n,this.imageHeight_=t[1]*n,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();const o=e.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/n,o[1]*this.pixelRatio_/n],this.imageWidth_=t[0]*n}setTextStyle(e){if(!e)this.text_="";else{const t=e.getFill();if(!t)this.textFillState_=null;else{const f=t.getColor();this.textFillState_={fillStyle:St(f||Ke)}}const n=e.getStroke();if(!n)this.textStrokeState_=null;else{const f=n.getColor(),g=n.getLineCap(),p=n.getLineDash(),m=n.getLineDashOffset(),_=n.getLineJoin(),y=n.getWidth(),x=n.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:Ms,lineDash:p||Ut,lineDashOffset:m||Kt,lineJoin:_!==void 0?_:Vn,lineWidth:y!==void 0?y:Rr,miterLimit:x!==void 0?x:wr,strokeStyle:St(f||Cr)}}const r=e.getFont(),s=e.getOffsetX(),o=e.getOffsetY(),a=e.getRotateWithView(),l=e.getRotation(),u=e.getScaleArray(),h=e.getText(),c=e.getTextAlign(),d=e.getTextBaseline();this.textState_={font:r!==void 0?r:mc,textAlign:c!==void 0?c:Tr,textBaseline:d!==void 0?d:Fs},this.text_=h!==void 0?Array.isArray(h)?h.reduce((f,g,p)=>f+=p%2?" ":g,""):h:"",this.textOffsetX_=s!==void 0?this.pixelRatio_*s:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*u[0],this.pixelRatio_*u[1]]}}}const em=Qp,$e=.5;function Pc(i,e,t,n,r,s,o){const a=i[0]*$e,l=i[1]*$e,u=we(a,l);u.imageSmoothingEnabled=!1;const h=u.canvas,c=new em(u,$e,r,null,o),d=t.length,f=Math.floor((256*256*256-1)/d),g={};for(let m=1;m<=d;++m){const _=t[m-1],y=_.getStyleFunction()||n;if(!y)continue;let x=y(_,s);if(!x)continue;Array.isArray(x)||(x=[x]);const E=(m*f).toString(16).padStart(7,"#00000");for(let R=0,T=x.length;R<T;++R){const C=x[R],I=C.getGeometryFunction()(_);if(!I||!pe(r,I.getExtent()))continue;const P=C.clone(),b=P.getFill();b&&b.setColor(E);const G=P.getStroke();G&&(G.setColor(E),G.setLineDash(null)),P.setText(void 0);const j=C.getImage();if(j){const S=j.getImageSize();if(!S)continue;const N=we(S[0],S[1],void 0,{alpha:!1}),te=N.canvas;N.fillStyle=E,N.fillRect(0,0,te.width,te.height),P.setImage(new As({img:te,imgSize:S,anchor:j.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:j.getOrigin(),opacity:1,size:j.getSize(),scale:j.getScale(),rotation:j.getRotation(),rotateWithView:j.getRotateWithView()}))}const J=P.getZIndex()||0;let A=g[J];A||(A={},g[J]=A,A.Polygon=[],A.Circle=[],A.LineString=[],A.Point=[]);const z=I.getType();if(z==="GeometryCollection"){const S=I.getGeometriesArrayRecursive();for(let N=0,te=S.length;N<te;++N){const Y=S[N];A[Y.getType().replace("Multi","")].push(Y,P)}}else A[z.replace("Multi","")].push(I,P)}}const p=Object.keys(g).map(Number).sort(Zi);for(let m=0,_=p.length;m<_;++m){const y=g[p[m]];for(const x in y){const v=y[x];for(let E=0,R=v.length;E<R;E+=2){c.setStyle(v[E+1]);for(let T=0,C=e.length;T<C;++T)c.setTransform(e[T]),c.drawGeometry(v[E])}}}return u.getImageData(0,0,h.width,h.height)}function Lc(i,e,t){const n=[];if(t){const r=Math.floor(Math.round(i[0])*$e),s=Math.floor(Math.round(i[1])*$e),o=(ye(r,0,t.width-1)+ye(s,0,t.height-1)*t.width)*4,a=t.data[o],l=t.data[o+1],h=t.data[o+2]+256*(l+256*a),c=Math.floor((256*256*256-1)/e.length);h&&h%c===0&&n.push(e[h/c-1])}return n}const tm=.5,Ac={Point:um,LineString:om,Polygon:cm,MultiPoint:hm,MultiLineString:am,MultiPolygon:lm,GeometryCollection:sm,Circle:nm};function im(i,e){return parseInt(Z(i),10)-parseInt(Z(e),10)}function kc(i,e){const t=Ra(i,e);return t*t}function Ra(i,e){return tm*i/e}function nm(i,e,t,n,r){const s=t.getFill(),o=t.getStroke();if(s||o){const l=i.getBuilder(t.getZIndex(),"Circle");l.setFillStrokeStyle(s,o),l.drawCircle(e,n)}const a=t.getText();if(a&&a.getText()){const l=(r||i).getBuilder(t.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,n)}}function zs(i,e,t,n,r,s,o){let a=!1;const l=t.getImage();if(l){const u=l.getImageState();
9u==q.LOADED||u==q.ERROR?l.unlistenImageChange(r):(u==q.IDLE&&l.load(),l.listenImageChange(r),a=!0)}return rm(i,e,t,n,s,o),a}function rm(i,e,t,n,r,s){const o=t.getGeometryFunction()(e);if(!o)return;const a=o.simplifyTransformed(n,r);if(t.getRenderer())Oc(i,a,t,e);else{const u=Ac[a.getType()];u(i,a,t,e,s)}}function Oc(i,e,t,n){if(e.getType()=="GeometryCollection"){const s=e.getGeometries();for(let o=0,a=s.length;o<a;++o)Oc(i,s[o],t,n);return}i.getBuilder(t.getZIndex(),"Default").drawCustom(e,n,t.getRenderer(),t.getHitDetectionRenderer())}function sm(i,e,t,n,r){const s=e.getGeometriesArray();let o,a;for(o=0,a=s.length;o<a;++o){const l=Ac[s[o].getType()];l(i,s[o],t,n,r)}}function om(i,e,t,n,r){const s=t.getStroke();if(s){const a=i.getBuilder(t.getZIndex(),"LineString");a.setFillStrokeStyle(null,s),a.drawLineString(e,n)}const o=t.getText();if(o&&o.getText()){const a=(r||i).getBuilder(t.getZIndex(),"Text");a.setTextStyle(o),a.drawText(e,n)}}function am(i,e,t,n,r){const s=t.getStroke();if(s){const a=i.getBuilder(t.getZIndex(),"LineString");a.setFillStrokeStyle(null,s),a.drawMultiLineString(e,n)}const o=t.getText();if(o&&o.getText()){const a=(r||i).getBuilder(t.getZIndex(),"Text");a.setTextStyle(o),a.drawText(e,n)}}function lm(i,e,t,n,r){const s=t.getFill(),o=t.getStroke();if(o||s){const l=i.getBuilder(t.getZIndex(),"Polygon");l.setFillStrokeStyle(s,o),l.drawMultiPolygon(e,n)}const a=t.getText();if(a&&a.getText()){const l=(r||i).getBuilder(t.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,n)}}function um(i,e,t,n,r){const s=t.getImage(),o=t.getText();let a;if(s){if(s.getImageState()!=q.LOADED)return;let l=i;if(r){const h=s.getDeclutterMode();if(h!=="none")if(l=r,h==="obstacle"){const c=i.getBuilder(t.getZIndex(),"Image");c.setImageStyle(s,a),c.drawPoint(e,n)}else o&&o.getText()&&(a={})}const u=l.getBuilder(t.getZIndex(),"Image");u.setImageStyle(s,a),u.drawPoint(e,n)}if(o&&o.getText()){let l=i;r&&(l=r);const u=l.getBuilder(t.getZIndex(),"Text");u.setTextStyle(o,a),u.drawText(e,n)}}function hm(i,e,t,n,r){const s=t.getImage(),o=t.getText();let a;if(s){if(s.getImageState()!=q.LOADED)return;let l=i;if(r){const h=s.getDeclutterMode();if(h!=="none")if(l=r,h==="obstacle"){const c=i.getBuilder(t.getZIndex(),"Image");c.setImageStyle(s,a),c.drawMultiPoint(e,n)}else o&&o.getText()&&(a={})}const u=l.getBuilder(t.getZIndex(),"Image");u.setImageStyle(s,a),u.drawMultiPoint(e,n)}if(o&&o.getText()){let l=i;r&&(l=r);const u=l.getBuilder(t.getZIndex(),"Text");u.setTextStyle(o,a),u.drawText(e,n)}}function cm(i,e,t,n,r){const s=t.getFill(),o=t.getStroke();if(s||o){const l=i.getBuilder(t.getZIndex(),"Polygon");l.setFillStrokeStyle(s,o),l.drawPolygon(e,n)}const a=t.getText();if(a&&a.getText()){const l=(r||i).getBuilder(t.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,n)}}class dm extends Il{constructor(e){super(e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=at(),this.wrappedRenderedExtent_=at(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(e,t,n){const r=t.extent,s=t.viewState,o=s.center,a=s.resolution,l=s.projection,u=s.rotation,h=l.getExtent(),c=this.getLayer().getSource(),d=t.pixelRatio,f=t.viewHints,g=!(f[de.ANIMATING]||f[de.INTERACTING]),p=this.compositionContext_,m=Math.round(t.size[0]*d),_=Math.round(t.size[1]*d),y=c.getWrapX()&&l.canWrapX(),x=y?oe(h):null,v=y?Math.ceil((r[2]-h[2])/x)+1:1;let E=y?Math.floor((r[0]-h[0])/x):0;do{const R=this.getRenderTransform(o,a,u,d,m,_,E*x);e.execute(p,1,R,u,g,void 0,n)}while(++E<v)}setupCompositionContext_(){if(this.opacity_!==1){const e=we(this.context.canvas.width,this.context.canvas.height,qu);this.compositionContext_=e}else this.compositionContext_=this.context}releaseCompositionContext_(){if(this.opacity_!==1){const e=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=e,Gr(this.compositionContext_),qu.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(e){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,e,e.declutterTree),this.releaseCompositionContext_())}renderFrame(e,t){const n=e.pixelRatio,r=e.layerStatesArray[e.layerIndex];Gf(this.pixelTransform,1/n,1/n),to(this.inversePixelTransform,this.pixelTransform);const s=Ka(this.pixelTransform);
9this.useContainer(t,s,this.getBackground(e));const o=this.context,a=o.canvas,l=this.replayGroup_,u=this.declutterExecutorGroup;let h=l&&!l.isEmpty()||u&&!u.isEmpty();if(!h&&!(this.getLayer().hasListener(Ft.PRERENDER)||this.getLayer().hasListener(Ft.POSTRENDER)))return null;const c=Math.round(e.size[0]*n),d=Math.round(e.size[1]*n);a.width!=c||a.height!=d?(a.width=c,a.height=d,a.style.transform!==s&&(a.style.transform=s)):this.containerReused||o.clearRect(0,0,c,d),this.preRender(o,e);const f=e.viewState;f.projection,this.opacity_=r.opacity,this.setupCompositionContext_();let g=!1;if(h&&r.extent&&this.clipping){const p=Yt(r.extent);h=pe(p,e.extent),g=h&&!Vt(p,e.extent),g&&this.clipUnrotated(this.compositionContext_,e,p)}return h&&this.renderWorlds(l,e),g&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(o,e),this.renderedRotation_!==f.rotation&&(this.renderedRotation_=f.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(e){return new Promise(t=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=[this.context.canvas.width,this.context.canvas.height];me(this.pixelTransform,n);const r=this.renderedCenter_,s=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,u=this.getLayer(),h=[],c=n[0]*$e,d=n[1]*$e;h.push(this.getRenderTransform(r,s,o,$e,c,d,0).slice());const f=u.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!Vt(g,l)){let p=l[0];const m=oe(g);let _=0,y;for(;p<g[0];)--_,y=m*_,h.push(this.getRenderTransform(r,s,o,$e,c,d,y).slice()),p+=m;for(_=0,p=l[2];p>g[2];)++_,y=m*_,h.push(this.getRenderTransform(r,s,o,$e,c,d,y).slice()),p-=m}this.hitDetectionImageData_=Pc(n,h,this.renderedFeatures_,u.getStyleFunction(),l,s,o)}t(Lc(e,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(e,t,n,r,s){if(!this.replayGroup_)return;const o=t.viewState.resolution,a=t.viewState.rotation,l=this.getLayer(),u={},h=function(f,g,p){const m=Z(f),_=u[m];if(_){if(_!==!0&&p<_.distanceSq){if(p===0)return u[m]=!0,s.splice(s.lastIndexOf(_),1),r(f,l,g);_.geometry=g,_.distanceSq=p}}else{if(p===0)return u[m]=!0,r(f,l,g);s.push(u[m]={feature:f,layer:l,geometry:g,distanceSq:p,callback:r})}};let c;const d=[this.replayGroup_];return this.declutterExecutorGroup&&d.push(this.declutterExecutorGroup),d.some(f=>c=f.forEachFeatureAtCoordinate(e,o,a,n,h,f===this.declutterExecutorGroup&&t.declutterTree?t.declutterTree.all().map(g=>g.value):null)),c}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}prepareFrame(e){const t=this.getLayer(),n=t.getSource();if(!n)return!1;const r=e.viewHints[de.ANIMATING],s=e.viewHints[de.INTERACTING],o=t.getUpdateWhileAnimating(),a=t.getUpdateWhileInteracting();if(this.ready&&!o&&r||!a&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=e.extent,u=e.viewState,h=u.projection,c=u.resolution,d=e.pixelRatio,f=t.getRevision(),g=t.getRenderBuffer();let p=t.getRenderOrder();p===void 0&&(p=im);const m=u.center.slice(),_=mi(l,g*c),y=_.slice(),x=[_.slice()],v=h.getExtent();if(n.getWrapX()&&h.canWrapX()&&!Vt(v,e.extent)){const A=oe(v),z=Math.max(oe(_)/2,A);_[0]=v[0]-z,_[2]=v[2]+z,el(m,h);const S=Uh(x[0],h);S[0]<v[0]&&S[2]<v[2]?x.push([S[0]+A,S[1],S[2]+A,S[3]]):S[0]>v[0]&&S[2]>v[2]&&x.push([S[0]-A,S[1],S[2]-A,S[3]])}if(this.ready&&this.renderedResolution_==c&&this.renderedRevision_==f&&this.renderedRenderOrder_==p&&Vt(this.wrappedRenderedExtent_,_))return Ti(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const E=new Os(Ra(c,d),_,c,d);let R;this.getLayer().getDeclutter()&&(R=new Os(Ra(c,d),_,c,d));let T;for(let A=0,z=x.length;A<z;++A)n.loadFeatures(x[A],c,h);const C=kc(c,d);let I=!0;const P=A=>{let z;const S=A.getStyleFunction()||t.getStyleFunction();if(S&&(z=S(A,c)),z){const N=this.renderFeature(A,C,z,E,T,R);I=I&&!N}},b=Qh(_),G=n.getFeaturesInExtent(b);p&&G.sort(p);for(let A=0,z=G.length;A<z;++A)P(G[A]);this.renderedFeatures_=G,this.ready=I;const j=E.finish(),J=new Ds(_,c,d,n.getOverlaps(),j,t.getRenderBuffer());return R&&(this.declutterExecutorGroup=new Ds(_,c,d,n.getOverlaps(),R.finish(),t.getRenderBuffer())),this.renderedResolution_=c,this.renderedRevision_=f,this.renderedRenderOrder_=p,this.renderedExtent_=y,this.wrappedRenderedExtent_=_,this.renderedCenter_=m,this.renderedProjection_=h,this.replayGroup_=J,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(e,t,n,r,s,o){if(!n)return!1;let a=!1;if(Array.isArray(n))for(let l=0,u=n.length;l<u;++l)a=zs(r,e,n[l],t,this.boundHandleStyleImageChange_,s,o)||a;else a=zs(r,e,n,t,this.boundHandleStyleImageChange_,s,o);return a}}const fm=dm;class gm extends Sc{constructor(e){super(e)}createRenderer(){return new fm(this)}}const ho=gm;class pm{constructor(e){this.rbush_=new Rc(e),this.items_={}}insert(e,t){const n={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(n),this.items_[Z(t)]=n}load(e,t){const n=new Array(t.length);for(let r=0,s=t.length;r<s;r++){const o=e[r],a=t[r],l={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:a};n[r]=l,this.items_[Z(a)]=l}this.rbush_.load(n)}remove(e){const t=Z(e),n=this.items_[t];return delete this.items_[t],this.rbush_.remove(n)!==null}update(e,t){const n=this.items_[Z(t)],r=[n.minX,n.minY,n.maxX,n.maxY];$t(r,e)||(this.remove(t),this.insert(e,t))}getAll(){return this.rbush_.all().map(function(t){return t.value})}getInExtent(e){const t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]};return this.rbush_.search(t).map(function(r){return r.value})}forEach(e){return this.forEach_(this.getAll(),e)}forEachInExtent(e,t){return this.forEach_(this.getInExtent(e),t)}forEach_(e,t){let n;for(let r=0,s=e.length;r<s;r++)if(n=t(e[r]),n)return n;return n}isEmpty(){return Ui(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(e){const t=this.rbush_.toJSON();return Jt(t.minX,t.minY,t.maxX,t.maxY,e)}concat(e){this.rbush_.load(e.rbush_.all());for(const t in e.items_)this.items_[t]=e.items_[t]}}const $u=pm;class mm extends yt{constructor(e){super(),this.projection=le(e.projection),this.attributions_=Qu(e.attributions),this.attributionsCollapsible_=e.attributionsCollapsible!==void 0?e.attributionsCollapsible:!0,this.loading=!1,this.state_=e.state!==void 0?e.state:"ready",this.wrapX_=e.wrapX!==void 0?e.wrapX:!1,this.interpolate_=!!e.interpolate,this.viewResolver=null,this.viewRejector=null;const t=this;this.viewPromise_=new Promise(function(n,r){t.viewResolver=n,t.viewRejector=r})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(e){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(e){this.attributions_=Qu(e),this.changed()}setState(e){this.state_=e,this.changed()}}function Qu(i){return i?Array.isArray(i)?function(e){return i}:typeof i=="function"?i:function(e){return[i]}:null}const Un=mm,dt={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVE
9FEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function ym(i,e){return[[-1/0,-1/0,1/0,1/0]]}function _m(i,e){return[i]}let vm=!1;function Dc(i,e,t,n,r,s,o){const a=new XMLHttpRequest;a.open("GET",typeof i=="function"?i(t,n,r):i,!0),e.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=vm,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const u=e.getType();let h;u=="json"||u=="text"?h=a.responseText:u=="xml"?(h=a.responseXML,h||(h=new DOMParser().parseFromString(a.responseText,"application/xml"))):u=="arraybuffer"&&(h=a.response),h?s(e.readFeatures(h,{extent:t,featureProjection:r}),e.readProjection(h)):o()}else o()},a.onerror=o,a.send()}function eh(i,e){return function(t,n,r,s,o){const a=this;Dc(i,e,t,n,r,function(l,u){a.addFeatures(l),s!==void 0&&s(l)},o||Wn)}}class ai extends mt{constructor(e,t,n){super(e),this.feature=t,this.features=n}}class xm extends Un{constructor(e){e=e||{},super({attributions:e.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:e.wrapX!==void 0?e.wrapX:!0}),this.on,this.once,this.un,this.loader_=Wn,this.format_=e.format,this.overlaps_=e.overlaps===void 0?!0:e.overlaps,this.url_=e.url,e.loader!==void 0?this.loader_=e.loader:this.url_!==void 0&&(H(this.format_,7),this.loader_=eh(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:ym;const t=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=t?new $u:null,this.loadedExtentsRtree_=new $u,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,r;Array.isArray(e.features)?r=e.features:e.features&&(n=e.features,r=n.getArray()),!t&&n===void 0&&(n=new It(r)),r!==void 0&&this.addFeaturesInternal(r),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const t=Z(e);if(!this.addToIndex_(t,e)){this.featuresCollection_&&this.featuresCollection_.remove(e);return}this.setupChangeEvents_(t,e);const n=e.getGeometry();if(n){const r=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,e)}else this.nullGeometryFeatures_[t]=e;this.dispatchEvent(new ai(dt.ADDFEATURE,e))}setupChangeEvents_(e,t){this.featureChangeKeys_[e]=[ie(t,B.CHANGE,this.handleFeatureChange_,this),ie(t,Xn.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(e,t){let n=!0;const r=t.getId();return r!==void 0&&(r.toString()in this.idIndex_?n=!1:this.idIndex_[r.toString()]=t),n&&(H(!(e in this.uidIndex_),30),this.uidIndex_[e]=t),n}addFeatures(e){this.addFeaturesInternal(e),this.changed()}addFeaturesInternal(e){const t=[],n=[],r=[];for(let s=0,o=e.length;s<o;s++){const a=e[s],l=Z(a);this.addToIndex_(l,a)&&n.push(a)}for(let s=0,o=n.length;s<o;s++){const a=n[s],l=Z(a);this.setupChangeEvents_(l,a);const u=a.getGeometry();if(u){const h=u.getExtent();t.push(h),r.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(t,r),this.hasListener(dt.ADDFEATURE))for(let s=0,o=n.length;s<o;s++)this.dispatchEvent(new ai(dt.ADDFEATURE,n[s]))}bindFeaturesCollection_(e){let t=!1;this.addEventListener(dt.ADDFEATURE,function(n){t||(t=!0,e.push(n.feature),t=!1)}),this.addEventListener(dt.REMOVEFEATURE,function(n){t||(t=!0,e.remove(n.feature),t=!1)}),e.addEventListener(Ue.ADD,n=>{t||(t=!0,this.addFeature(n.element),t=!1)}),e.addEventListener(Ue.REMOVE,n=>{t||(t=!0,this.removeFeature(n.element),t=!1)}),this.featuresCollection_=e}clear(e){if(e){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(he);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=r=>{this.removeFeatureInternal(r)};this.featuresRtree_.forEach(n);for(const r in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const t=new ai(dt.CLEAR);this.dispatchEvent(t),this.changed()}forEachFeature(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureAtCoordinateDirect(e,t){const n=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(n,function(r){if(r.getGeometry().intersectsCoordinate(e))return t(r)})}forEachFeatureInExtent(e,t){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureIntersectingExtent(e,t){return this.forEachFeatureInExtent(e,function(n){if(n.getGeometry().intersectsExtent(e)){const s=t(n);if(s)return s}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),Ui(this.nullGeometryFeatures_)||Mt(e,Object.values(this.nullGeometryFeatures_))),e}getFeaturesAtCoordinate(e){const t=[];return this.forEachFeatureAtCoordinateDirect(e,function(n){t.push(n)}),t}getFeaturesInExtent(e,t){if(this.featuresRtree_){if(!(t&&t.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);const r=Kf(e,t);return[].concat(...r.map(s=>this.featuresRtree_.getInExtent(s)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,t){const n=e[0],r=e[1];let s=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return t=t||yr,this.featuresRtree_.forEachInExtent(l,function(u){if(t(u)){const h=u.getGeometry(),c=a;if(a=h.closestPointXY(n,r,o,a),a<c){s=u;const d=Math.sqrt(a);l[0]=n-d,l[1]=r-d,l[2]=n+d,l[3]=r+d}}}),s}getExtent(e){return this.featuresRtree_.getExtent(e)}getFeatureById(e){const t=this.idIndex_[e.toString()];return t!==void 0?t:null}getFeatureByUid(e){const t=this.uidIndex_[e];return t!==void 0?t:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(e){const t=e.target,n=Z(t),r=t.getGeometry();if(!r)n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(t),this.nullGeometryFeatures_[n]=t);else{const o=r.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(o,t)):this.featuresRtree_&&this.featuresRtree_.update(o,t)}const s=t.getId();if(s!==void 0){const o=s.toString();this.idIndex_[o]!==t&&(this.removeFromIdIndex_(t),this.idIndex_[o]=t)}else this.removeFromIdIndex_(t),this.uidIndex_[n]=t;this.changed(),this.dispatchEvent(new ai(dt.CHANGEFEATURE,t))}hasFeature(e){const t=e.getId();return t!==void 0?t in this.idIndex_:Z(e)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&Ui(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}
9loadFeatures(e,t,n){const r=this.loadedExtentsRtree_,s=this.strategy_(e,t,n);for(let o=0,a=s.length;o<a;++o){const l=s[o];r.forEachInExtent(l,function(h){return Vt(h.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new ai(dt.FEATURESLOADSTART)),this.loader_.call(this,l,t,n,h=>{--this.loadingExtentsCount_,this.dispatchEvent(new ai(dt.FEATURESLOADEND,void 0,h))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new ai(dt.FEATURESLOADERROR))}),r.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(e){const t=this.loadedExtentsRtree_;let n;t.forEachInExtent(e,function(r){if($t(r.extent,e))return n=r,!0}),n&&t.remove(n)}removeFeature(e){if(!e)return;const t=Z(e);t in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[t]:this.featuresRtree_&&this.featuresRtree_.remove(e),this.removeFeatureInternal(e)&&this.changed()}removeFeatureInternal(e){const t=Z(e),n=this.featureChangeKeys_[t];if(!n)return;n.forEach(he),delete this.featureChangeKeys_[t];const r=e.getId();return r!==void 0&&delete this.idIndex_[r.toString()],delete this.uidIndex_[t],this.dispatchEvent(new ai(dt.REMOVEFEATURE,e)),e}removeFromIdIndex_(e){let t=!1;for(const n in this.idIndex_)if(this.idIndex_[n]===e){delete this.idIndex_[n],t=!0;break}return t}setLoader(e){this.loader_=e}setUrl(e){H(this.format_,7),this.url_=e,this.setLoader(eh(e,this.format_))}}const fr=xm;class Em extends bc{constructor(e,t,n,r,s){const o=s!==void 0?q.IDLE:q.LOADED;super(e,t,n,o),this.loader_=s!==void 0?s:null,this.canvas_=r,this.error_=null}getError(){return this.error_}handleLoad_(e){e?(this.error_=e,this.state=q.ERROR):this.state=q.LOADED,this.changed()}load(){this.state==q.IDLE&&(this.state=q.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))}getImage(){return this.canvas_}}const wm=Em,k={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};let Cm=class extends Dr{constructor(e,t,n){super(),n=n||{},this.tileCoord=e,this.state=t,this.interimTile=null,this.key="",this.transition_=n.transition===void 0?250:n.transition,this.transitionStarts_={},this.interpolate=!!n.interpolate}changed(){this.dispatchEvent(B.CHANGE)}release(){this.state===k.ERROR&&this.setState(k.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let e=this.interimTile;do{if(e.getState()==k.LOADED)return this.transition_=0,e;e=e.interimTile}while(e);return this}refreshInterimChain(){if(!this.interimTile)return;let e=this.interimTile,t=this;do{if(e.getState()==k.LOADED){e.interimTile=null;break}else e.getState()==k.LOADING?t=e:e.getState()==k.IDLE?t.interimTile=e.interimTile:t=e;e=t.interimTile}while(e)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(e){if(this.state!==k.ERROR&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()}load(){W()}getAlpha(e,t){if(!this.transition_)return 1;let n=this.transitionStarts_[e];if(!n)n=t,this.transitionStarts_[e]=n;else if(n===-1)return 1;const r=t-n+1e3/60;return r>=this.transition_?1:Cc(r/this.transition_)}inTransition(e){return this.transition_?this.transitionStarts_[e]!==-1:!1}endTransition(e){this.transition_&&(this.transitionStarts_[e]=-1)}};const co=Cm;class Tm extends co{constructor(e,t,n,r,s,o){super(e,t,o),this.crossOrigin_=r,this.src_=n,this.key=n,this.image_=new Image,r!==null&&(this.image_.crossOrigin=r),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(e){this.image_=e,this.state=k.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=k.ERROR,this.unlistenImage_(),this.image_=Rm(),this.changed()}handleImageLoad_(){const e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=k.LOADED:this.state=k.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==k.ERROR&&(this.state=k.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==k.IDLE&&(this.state=k.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Ic(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Rm(){const i=we(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}const zc=Tm;class bm{constructor(e,t,n){this.decay_=e,this.minVelocity_=t,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(e,t){this.points_.push(e,t,Date.now())}end(){if(this.points_.length<6)return!1;const e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]<e)return!1;let n=t-3;for(;n>0&&this.points_[n+2]>e;)n-=3;const r=this.points_[t+2]-this.points_[n+2];if(r<1e3/60)return!1;const s=this.points_[t]-this.points_[n],o=this.points_[t+1]-this.points_[n+1];return this.angle_=Math.atan2(o,s),this.initialVelocity_=Math.sqrt(s*s+o*o)/r,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const Im=bm;class Sm extends Hs{constructor(e){super(),this.map_=e}dispatchRenderEvent(e,t){W()}calculateMatrices2D(e){const t=e.viewState,n=e.coordinateToPixelTransform,r=e.pixelToCoordinateTransform;pt(n,e.size[0]/2,e.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]),to(r,n)}forEachFeatureAtCoordinate(e,t,n,r,s,o,a,l){let u;const h=t.viewState;function c(v,E,R,T){return s.call(o,E,v?R:null,T)}const d=h.projection,f=el(e.slice(),d),g=[[0,0]];if(d.canWrapX()&&r){const v=d.getExtent(),E=oe(v);g.push([-E,0],[E,0])}const p=t.layerStatesArray,m=p.length,_=[],y=[];for(let v=0;v<g.length;v++)for(let E=m-1;E>=0;--E){const R=p[E],T=R.layer;if(T.hasRenderer()&&Rl(R,h)&&a.call(l,T)){const C=T.getRenderer(),I=T.getSource();if(C&&I){const P=I.getWrapX()?f:e,b=c.bind(null,R.managed);y[0]=P[0]+g[v][0],y[1]=P[1]+g[v][1],u=C.forEachFeatureAtCoordinate(y,t,n,b,_)}if(u)return u}}if(_.length===0)return;const x=1/_.length;return _.forEach((v,E)=>v.distanceSq+=E*x),_.sort((v,E)=>v.distanceSq-E.distanceSq),_.some(v=>u=v.callback(v.feature,v.layer,v.geometry)),u}
9hasFeatureAtCoordinate(e,t,n,r,s,o){return this.forEachFeatureAtCoordinate(e,t,n,r,yr,this,s,o)!==void 0}getMap(){return this.map_}renderFrame(e){W()}flushDeclutterItems(e){}scheduleExpireIconCache(e){Ls.canExpireCache()&&e.postRenderFunctions.push(Mm)}}function Mm(i,e){Ls.expire()}const Fm=Sm;class Pm extends Fm{constructor(e){super(e),this.fontChangeListenerKey_=ie(Tt,Xn.PROPERTYCHANGE,e.redrawText.bind(e)),this.element_=document.createElement("div");const t=this.element_.style;t.position="absolute",t.width="100%",t.height="100%",t.zIndex="0",this.element_.className=lo+" ol-layers";const n=e.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0,this.declutterLayers_=[]}dispatchRenderEvent(e,t){const n=this.getMap();if(n.hasListener(e)){const r=new Fc(e,void 0,t);n.dispatchEvent(r)}}disposeInternal(){he(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(e){if(!e){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(e),this.dispatchRenderEvent(Ft.PRECOMPOSE,e);const t=e.layerStatesArray.sort(function(o,a){return o.zIndex-a.zIndex}),n=e.viewState;this.children_.length=0;const r=this.declutterLayers_;r.length=0;let s=null;for(let o=0,a=t.length;o<a;++o){const l=t[o];e.layerIndex=o;const u=l.layer,h=u.getSourceState();if(!Rl(l,n)||h!="ready"&&h!="undefined"){u.unrender();continue}const c=u.render(e,s);c&&(c!==s&&(this.children_.push(c),s=c),"getDeclutter"in u&&r.push(u))}this.flushDeclutterItems(e),Zg(this.element_,this.children_),this.dispatchRenderEvent(Ft.POSTCOMPOSE,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}flushDeclutterItems(e){const t=this.declutterLayers_;for(let n=t.length-1;n>=0;--n)t[n].renderDeclutter(e);t.length=0}}const Lm=Pm;class ci extends mt{constructor(e,t){super(e),this.layer=t}}const Vo={LAYERS:"layers"};class Sl extends Ec{constructor(e){e=e||{};const t=Object.assign({},e);delete t.layers;let n=e.layers;super(t),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Vo.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new It(n.slice(),{unique:!0}):H(typeof n.getArray=="function",43):n=new It(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(he),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(ie(e,Ue.ADD,this.handleLayersAdd_,this),ie(e,Ue.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(he);Or(this.listenerKeys_);const t=e.getArray();for(let n=0,r=t.length;n<r;n++){const s=t[n];this.registerLayerListeners_(s),this.dispatchEvent(new ci("addlayer",s))}this.changed()}registerLayerListeners_(e){const t=[ie(e,Xn.PROPERTYCHANGE,this.handleLayerChange_,this),ie(e,B.CHANGE,this.handleLayerChange_,this)];e instanceof Sl&&t.push(ie(e,"addlayer",this.handleLayerGroupAdd_,this),ie(e,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[Z(e)]=t}handleLayerGroupAdd_(e){this.dispatchEvent(new ci("addlayer",e.layer))}handleLayerGroupRemove_(e){this.dispatchEvent(new ci("removelayer",e.layer))}handleLayersAdd_(e){const t=e.element;this.registerLayerListeners_(t),this.dispatchEvent(new ci("addlayer",t)),this.changed()}handleLayersRemove_(e){const t=e.element,n=Z(t);this.listenerKeys_[n].forEach(he),delete this.listenerKeys_[n],this.dispatchEvent(new ci("removelayer",t)),this.changed()}getLayers(){return this.get(Vo.LAYERS)}setLayers(e){const t=this.getLayers();if(t){const n=t.getArray();for(let r=0,s=n.length;r<s;++r)this.dispatchEvent(new ci("removelayer",n[r]))}this.set(Vo.LAYERS,e)}getLayersArray(e){return e=e!==void 0?e:[],this.getLayers().forEach(function(t){t.getLayersArray(e)}),e}getLayerStatesArray(e){const t=e!==void 0?e:[],n=t.length;this.getLayers().forEach(function(o){o.getLayerStatesArray(t)});const r=this.getLayerState();let s=r.zIndex;!e&&r.zIndex===void 0&&(s=0);for(let o=n,a=t.length;o<a;o++){const l=t[o];l.opacity*=r.opacity,l.visible=l.visible&&r.visible,l.maxResolution=Math.min(l.maxResolution,r.maxResolution),l.minResolution=Math.max(l.minResolution,r.minResolution),l.minZoom=Math.max(l.minZoom,r.minZoom),l.maxZoom=Math.min(l.maxZoom,r.maxZoom),r.extent!==void 0&&(l.extent!==void 0?l.extent=Zt(l.extent,r.extent):l.extent=r.extent),l.zIndex===void 0&&(l.zIndex=s)}return t}getSourceState(){return"ready"}}const fo=Sl;class Am extends mt{constructor(e,t,n){super(e),this.map=t,this.frameState=n!==void 0?n:null}}const Mn=Am;class km extends Mn{constructor(e,t,n,r,s,o){super(e,t,s),this.originalEvent=n,this.pixel_=null,this.coordinate_=null,this.dragging=r!==void 0?r:!1,this.activePointers=o}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(e){this.pixel_=e}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(e){this.coordinate_=e}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const ui=km,ge={SINGLECLICK:"singleclick",CLICK:B.CLICK,DBLCLICK:B.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},ba={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class Om extends Dr{constructor(e,t){super(e),this.map_=e,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=t===void 0?1:t,this.down_=null;const n=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=n,this.pointerdownListenerKey_=ie(n,ba.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=ie(n,ba.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(B.TOUCHMOVE,this.boundHandleTouchMove_,jh?{passive:!1}:!1)}emulateClick_(e){let t=new ui(ge.CLICK,this.map_,e);this.dispatchEvent(t),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,t=new ui(ge.DBLCLICK,this.map_,e),this.dispatchEvent(t)):this.clickTimeoutId_=setTimeout(()=>{this.clickTimeoutId_=void 0;const n=new ui(ge.SINGLECLICK,this.map_,e);this.dispatchEvent(n)},250)}updateActivePointers_(e){const t=e,n=t.pointerId;if(t.type==ge.POINTERUP||t.type==ge.POINTERCANCEL){delete this.trackedTouches_[n];for(const r in this.trackedTouches_)if(this.trackedTouches_[r].target!==t.target){delete this.trackedTouches_[r];break}}else(t.type==ge.POINTERDOWN||t.type==ge.POINTERMOVE)&&(this.trackedTouches_[n]=t);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const t=new ui(ge.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(t),this.emulateClicks_&&!t.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(he),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(e){return e.button===0}handlePointerDown_(e){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(e);const t=new ui(ge.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);
9if(this.dispatchEvent(t),this.down_=new PointerEvent(e.type,e),Object.defineProperty(this.down_,"target",{writable:!1,value:e.target}),this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(ie(n,ge.POINTERMOVE,this.handlePointerMove_,this),ie(n,ge.POINTERUP,this.handlePointerUp_,this),ie(this.element_,ge.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(ie(this.element_.getRootNode(),ge.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const t=new ui(ge.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(t)}}relayMoveEvent_(e){this.originalPointerMoveEvent_=e;const t=!!(this.down_&&this.isMoving_(e));this.dispatchEvent(new ui(ge.POINTERMOVE,this.map_,e,t))}handleTouchMove_(e){const t=this.originalPointerMoveEvent_;(!t||t.defaultPrevented)&&(typeof e.cancelable!="boolean"||e.cancelable===!0)&&e.preventDefault()}isMoving_(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(he(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(B.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(he(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(he),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const Dm=Om,jt={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},ze={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Ns=1/0;class zm{constructor(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Or(this.queuedElements_)}dequeue(){const e=this.elements_,t=this.priorities_,n=e[0];e.length==1?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));const r=this.keyFunction_(n);return delete this.queuedElements_[r],n}enqueue(e){H(!(this.keyFunction_(e)in this.queuedElements_),31);const t=this.priorityFunction_(e);return t!=Ns?(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(e){return e*2+1}getRightChildIndex_(e){return e*2+2}getParentIndex_(e){return e-1>>1}heapify_(){let e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)}isEmpty(){return this.elements_.length===0}isKeyQueued(e){return e in this.queuedElements_}isQueued(e){return this.isKeyQueued(this.keyFunction_(e))}siftUp_(e){const t=this.elements_,n=this.priorities_,r=t.length,s=t[e],o=n[e],a=e;for(;e<r>>1;){const l=this.getLeftChildIndex_(e),u=this.getRightChildIndex_(e),h=u<r&&n[u]<n[l]?u:l;t[e]=t[h],n[e]=n[h],e=h}t[e]=s,n[e]=o,this.siftDown_(a,e)}siftDown_(e,t){const n=this.elements_,r=this.priorities_,s=n[t],o=r[t];for(;t>e;){const a=this.getParentIndex_(t);if(r[a]>o)n[t]=n[a],r[t]=r[a],t=a;else break}n[t]=s,r[t]=o}reprioritize(){const e=this.priorityFunction_,t=this.elements_,n=this.priorities_;let r=0;const s=t.length;let o,a,l;for(a=0;a<s;++a)o=t[a],l=e(o),l==Ns?delete this.queuedElements_[this.keyFunction_(o)]:(n[r]=l,t[r++]=o);t.length=r,n.length=r,this.heapify_()}}const Nm=zm;class Gm extends Nm{constructor(e,t){super(function(n){return e.apply(null,n)},function(n){return n[0].getKey()}),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=t,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(e){const t=super.enqueue(e);return t&&e[0].addEventListener(B.CHANGE,this.boundHandleTileChange_),t}getTilesLoading(){return this.tilesLoading_}handleTileChange(e){const t=e.target,n=t.getState();if(n===k.LOADED||n===k.ERROR||n===k.EMPTY){n!==k.ERROR&&t.removeEventListener(B.CHANGE,this.boundHandleTileChange_);const r=t.getKey();r in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[r],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(e,t){let n=0,r,s,o;for(;this.tilesLoading_<e&&n<t&&this.getCount()>0;)s=this.dequeue()[0],o=s.getKey(),r=s.getState(),r===k.IDLE&&!(o in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[o]=!0,++this.tilesLoading_,++n,s.load())}}const Nc=Gm;function jm(i,e,t,n,r){if(!i||!(t in i.wantedTiles)||!i.wantedTiles[t][e.getKey()])return Ns;const s=i.viewState.center,o=n[0]-s[0],a=n[1]-s[1];return 65536*Math.log(r)+Math.sqrt(o*o+a*a)/r}class Xm extends yt{constructor(e){super();const t=e.element;t&&!e.target&&!t.style.pointerEvents&&(t.style.pointerEvents="auto"),this.element=t||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}disposeInternal(){Ss(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(e){this.map_&&Ss(this.element);for(let t=0,n=this.listenerKeys.length;t<n;++t)he(this.listenerKeys[t]);this.listenerKeys.length=0,this.map_=e,e&&((this.target_?this.target_:e.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==Wn&&this.listenerKeys.push(ie(e,jt.POSTRENDER,this.render,this)),e.render())}render(e){}setTarget(e){this.target_=typeof e=="string"?document.getElementById(e):e}}const Ml=Xm;class Wm extends Ml{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=e.collapsed!==void 0?e.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=e.collapsible!==void 0,this.collapsible_=e.collapsible!==void 0?e.collapsible:!0,this.collapsible_||(this.collapsed_=!1);const t=e.className!==void 0?e.className:"ol-attribution",n=e.tipLabel!==void 0?e.tipLabel:"Attributions",r=e.expandClassName!==void 0?e.expandClassName:t+"-expand",s=e.collapseLabel!==void 0?e.collapseLabel:"›",o=e.collapseClassName!==void 0?e.collapseClassName:t+"-collapse";typeof s=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s,this.collapseLabel_.className=o):this.collapseLabel_=s;const a=e.label!==void 0?e.label:"i";
9typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a,this.label_.className=r):this.label_=a;const l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=n,this.toggleButton_.appendChild(l),this.toggleButton_.addEventListener(B.CLICK,this.handleClick_.bind(this),!1);const u=t+" "+lo+" "+ml+(this.collapsed_&&this.collapsible_?" "+Ou:"")+(this.collapsible_?"":" ol-uncollapsible"),h=this.element;h.className=u,h.appendChild(this.toggleButton_),h.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(e){const t=Array.from(new Set(this.getMap().getAllLayers().flatMap(r=>r.getAttributions(e)))),n=!this.getMap().getAllLayers().some(r=>r.getSource()&&r.getSource().getAttributionsCollapsible()===!1);return this.overrideCollapsible_||this.setCollapsible(n),t}updateElement_(e){if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const t=this.collectSourceAttributions_(e),n=t.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!Ti(t,this.renderedAttributions_)){gc(this.ulElement_);for(let r=0,s=t.length;r<s;++r){const o=document.createElement("li");o.innerHTML=t[r],this.ulElement_.appendChild(o)}this.renderedAttributions_=t}}handleClick_(e){e.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(Ou),this.collapsed_?ku(this.collapseLabel_,this.label_):ku(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(e){this.userCollapsed_=e,!(!this.collapsible_||this.collapsed_===e)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(e){this.updateElement_(e.frameState)}}const Vm=Wm;class Ym extends Ml{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target});const t=e.className!==void 0?e.className:"ol-rotate",n=e.label!==void 0?e.label:"⇧",r=e.compassClassName!==void 0?e.compassClassName:"ol-compass";this.label_=null,typeof n=="string"?(this.label_=document.createElement("span"),this.label_.className=r,this.label_.textContent=n):(this.label_=n,this.label_.classList.add(r));const s=e.tipLabel?e.tipLabel:"Reset rotation",o=document.createElement("button");o.className=t+"-reset",o.setAttribute("type","button"),o.title=s,o.appendChild(this.label_),o.addEventListener(B.CLICK,this.handleClick_.bind(this),!1);const a=t+" "+lo+" "+ml,l=this.element;l.className=a,l.appendChild(o),this.callResetNorth_=e.resetNorth?e.resetNorth:void 0,this.duration_=e.duration!==void 0?e.duration:250,this.autoHide_=e.autoHide!==void 0?e.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(ts)}handleClick_(e){e.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const n=t.getRotation();n!==void 0&&(this.duration_>0&&n%(2*Math.PI)!==0?t.animate({rotation:0,duration:this.duration_,easing:Bn}):t.setRotation(0))}render(e){const t=e.frameState;if(!t)return;const n=t.viewState.rotation;if(n!=this.rotation_){const r="rotate("+n+"rad)";if(this.autoHide_){const s=this.element.classList.contains(ts);!s&&n===0?this.element.classList.add(ts):s&&n!==0&&this.element.classList.remove(ts)}this.label_.style.transform=r}this.rotation_=n}}const Bm=Ym;class Zm extends Ml{constructor(e){e=e||{},super({element:document.createElement("div"),target:e.target});const t=e.className!==void 0?e.className:"ol-zoom",n=e.delta!==void 0?e.delta:1,r=e.zoomInClassName!==void 0?e.zoomInClassName:t+"-in",s=e.zoomOutClassName!==void 0?e.zoomOutClassName:t+"-out",o=e.zoomInLabel!==void 0?e.zoomInLabel:"+",a=e.zoomOutLabel!==void 0?e.zoomOutLabel:"–",l=e.zoomInTipLabel!==void 0?e.zoomInTipLabel:"Zoom in",u=e.zoomOutTipLabel!==void 0?e.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=r,h.setAttribute("type","button"),h.title=l,h.appendChild(typeof o=="str
9ing"?document.createTextNode(o):o),h.addEventListener(B.CLICK,this.handleClick_.bind(this,n),!1);const c=document.createElement("button");c.className=s,c.setAttribute("type","button"),c.title=u,c.appendChild(typeof a=="string"?document.createTextNode(a):a),c.addEventListener(B.CLICK,this.handleClick_.bind(this,-n),!1);const d=t+" "+lo+" "+ml,f=this.element;f.className=d,f.appendChild(h),f.appendChild(c),this.duration_=e.duration!==void 0?e.duration:250}handleClick_(e,t){t.preventDefault(),this.zoomByDelta_(e)}zoomByDelta_(e){const n=this.getMap().getView();if(!n)return;const r=n.getZoom();if(r!==void 0){const s=n.getConstrainedZoom(r+e);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:s,duration:this.duration_,easing:Bn})):n.setZoom(s)}}}const Um=Zm;function Km(i){i=i||{};const e=new It;return(i.zoom!==void 0?i.zoom:!0)&&e.push(new Um(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&e.push(new Bm(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&e.push(new Vm(i.attributionOptions)),e}const th={ACTIVE:"active"};class qm extends yt{constructor(e){super(),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(th.ACTIVE)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(th.ACTIVE,e)}setMap(e){this.map_=e}}function Hm(i,e,t){const n=i.getCenterInternal();if(n){const r=[n[0]+e[0],n[1]+e[1]];i.animateInternal({duration:t!==void 0?t:250,easing:up,center:i.getConstrainedCenter(r)})}}function Fl(i,e,t,n){const r=i.getZoom();if(r===void 0)return;const s=i.getConstrainedZoom(r+e),o=i.getResolutionForZoom(s);i.getAnimating()&&i.cancelAnimations(),i.animate({resolution:o,anchor:t,duration:n!==void 0?n:250,easing:Bn})}const Wr=qm;class Jm extends Wr{constructor(e){super(),e=e||{},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:250}handleEvent(e){let t=!1;if(e.type==ge.DBLCLICK){const n=e.originalEvent,r=e.map,s=e.coordinate,o=n.shiftKey?-this.delta_:this.delta_,a=r.getView();Fl(a,o,s,this.duration_),n.preventDefault(),t=!0}return!t}}const $m=Jm;class Qm extends Wr{constructor(e){e=e||{},super(e),e.handleDownEvent&&(this.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(this.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(this.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(this.handleUpEvent=e.handleUpEvent),e.stopDown&&(this.stopDown=e.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(e){return!1}handleDragEvent(e){}handleEvent(e){if(!e.originalEvent)return!0;let t=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==ge.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==ge.POINTERUP){const n=this.handleUpEvent(e);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(e.type==ge.POINTERDOWN){const n=this.handleDownEvent(e);this.handlingDownUpSequence=n,t=this.stopDown(n)}else e.type==ge.POINTERMOVE&&this.handleMoveEvent(e);return!t}handleMoveEvent(e){}handleUpEvent(e){return!1}stopDown(e){return e}updateTrackedPointers_(e){e.activePointers&&(this.targetPointers=e.activePointers)}}function Pl(i){const e=i.length;let t=0,n=0;for(let r=0;r<e;r++)t+=i[r].clientX,n+=i[r].clientY;return{clientX:t/e,clientY:n/e}}const Vr=Qm;function Ia(i){const e=arguments;return function(t){let n=!0;for(let r=0,s=e.length;r<s&&(n=n&&e[r](t),!!n);++r);return n}}const ey=function(i){const e=i.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ty=function(i){const e=i.map.getTargetElement(),t=i.map.getOwnerDocument().activeElement;return e.contains(t)},Gc=function(i){return i.map.getTargetElement().hasAttribute("tabindex")?ty(i):!0},iy=yr,jc=function(i){const e=i.originalEvent;return e.button==0&&!(Df&&Nh&&e.ctrlKey)},Xc=function(i){const e=i.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},ny=function(i){const e=i.originalEvent;return Nh?e.metaKey:e.ctrlKey},ry=function(i){const e=i.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Wc=function(i){const e=i.originalEvent,t=e.target.tagName;return t!=="INPUT"&&t!=="SELECT"&&t!=="TEXTAREA"&&!e.target.isContentEditable},Yo=function(i){const e=i.originalEvent;return H(e!==void 0,56),e.pointerType=="mouse"},sy=function(i){const e=i.originalEvent;return H(e!==void 0,56),e.isPrimary&&e.button===0};class oy extends Vr{constructor(e){super({stopDown:$s}),e=e||{},this.kinetic_=e.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const t=e.condition?e.condition:Ia(Xc,sy);this.condition_=e.onFocusOnly?Ia(Gc,t):t,this.noKinetic_=!1}handleDragEvent(e){const t=e.map;this.panning_||(this.panning_=!0,t.getView().beginInteraction());const n=this.targetPointers,r=t.getEventPixel(Pl(n));if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){const s=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],a=e.map.getView();lg(s,a.getResolution()),Qa(s,a.getRotation()),a.adjustCenterInternal(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=n.length,e.originalEvent.preventDefault()}handleUpEvent(e){const t=e.map,n=t.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const r=this.kinetic_.getDistance(),s=this.kinetic_.getAngle(),o=n.getCenterInternal(),a=t.getPixelFromCo
9ordinateInternal(o),l=t.getCoordinateFromPixelInternal([a[0]-r*Math.cos(s),a[1]-r*Math.sin(s)]);n.animateInternal({center:n.getConstrainedCenter(l),duration:500,easing:Bn})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(e){if(this.targetPointers.length>0&&this.condition_(e)){const n=e.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}const ay=oy;class ly extends Vr{constructor(e){e=e||{},super({stopDown:$s}),this.condition_=e.condition?e.condition:ey,this.lastAngle_=void 0,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){if(!Yo(e))return;const t=e.map,n=t.getView();if(n.getConstraints().rotation===Tl)return;const r=t.getSize(),s=e.pixel,o=Math.atan2(r[1]/2-s[1],s[0]-r[0]/2);if(this.lastAngle_!==void 0){const a=o-this.lastAngle_;n.adjustRotationInternal(-a)}this.lastAngle_=o}handleUpEvent(e){return Yo(e)?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){return Yo(e)&&jc(e)&&this.condition_(e)?(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const uy=ly;class hy extends Hs{constructor(e){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const e=this.startPixel_,t=this.endPixel_,n="px",r=this.element_.style;r.left=Math.min(e[0],t[0])+n,r.top=Math.min(e[1],t[1])+n,r.width=Math.abs(t[0]-e[0])+n,r.height=Math.abs(t[1]-e[1])+n}setMap(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(e,t){this.startPixel_=e,this.endPixel_=t,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const e=this.startPixel_,t=this.endPixel_,r=[e,[e[0],t[1]],t,[t[0],e[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new Er([r])}getGeometry(){return this.geometry_}}const cy=hy,os={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Bo extends mt{constructor(e,t,n){super(e),this.coordinate=t,this.mapBrowserEvent=n}}class dy extends Vr{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.box_=new cy(e.className||"ol-dragbox"),this.minArea_=e.minArea!==void 0?e.minArea:64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition?e.condition:jc,this.boxEndCondition_=e.boxEndCondition?e.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(e,t,n){const r=n[0]-t[0],s=n[1]-t[1];return r*r+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(e){this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new Bo(os.BOXDRAG,e.coordinate,e))}handleUpEvent(e){this.box_.setMap(null);const t=this.boxEndCondition_(e,this.startPixel_,e.pixel);return t&&this.onBoxEnd(e),this.dispatchEvent(new Bo(t?os.BOXEND:os.BOXCANCEL,e.coordinate,e)),!1}handleDownEvent(e){return this.condition_(e)?(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Bo(os.BOXSTART,e.coordinate,e)),!0):!1}onBoxEnd(e){}}const fy=dy;class gy extends fy{constructor(e){e=e||{};const t=e.condition?e.condition:ry;super({condition:t,className:e.className||"ol-dragzoom",minArea:e.minArea}),this.duration_=e.duration!==void 0?e.duration:200,this.out_=e.out!==void 0?e.out:!1}onBoxEnd(e){const n=this.getMap().getView();let r=this.getGeometry();if(this.out_){const s=n.rotatedExtentForGeometry(r),o=n.getResolutionForExtentInternal(s),a=n.getResolution()/o;r=r.clone(),r.scale(a*a)}n.fitInternal(r,{duration:this.duration_,easing:Bn})}}const py=gy,Oi={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class my extends Wr{constructor(e){super(),e=e||{},this.defaultCondition_=function(t){return Xc(t)&&Wc(t)},this.condition_=e.condition!==void 0?e.condition:this.defaultCondition_,this.duration_=e.duration!==void 0?e.duration:100,this.pixelDelta_=e.pixelDelta!==void 0?e.pixelDelta:128}handleEvent(e){let t=!1;if(e.type==B.KEYDOWN){const n=e.originalEvent,r=n.key;if(this.condition_(e)&&(r==Oi.DOWN||r==Oi.LEFT||r==Oi.RIGHT||r==Oi.UP)){const o=e.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,u=0;r==Oi.DOWN?u=-a:r==Oi.LEFT?l=-a:r==Oi.RIGHT?l=a:u=a;const h=[l,u];Qa(h,o.getRotation()),Hm(o,h,this.duration_),n.preventDefault(),t=!0}}return!t}}const yy=my;class _y extends Wr{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:function(t){return!ny(t)&&Wc(t)},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:100}handleEvent(e){let t=!1;if(e.type==B.KEYDOWN||e.type==B.KEYPRESS){const n=e.originalEvent,r=n.key;if(this.condition_(e)&&(r==="+"||r==="-")){const s=e.map,o=r==="+"?this.delta_:-this.delta_,a=s.getView();Fl(a,o,void 0,this.duration_),n.preventDefault(),t=!0}}return!t}}const vy=_y;class xy extends Wr{constructor(e){e=e||{},super(e),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=e.maxDelta!==void 0?e.maxDelta:1,this.duration_=e.duration!==void 0?e.duration:250,this.timeout_=e.timeout!==void 0?e.timeout:80,this.useAnchor_=e.useAnchor!==void 0?e.useAnchor:!0,this.constrainResolution_=e.constrainResolution!==void 0?e.constrainResolution:!1;const t=e.condition?e.condition:iy;this.condition_=e.onFocusOnly?Ia(Gc,t):t,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const e=this.getMap();if(!e)return;e.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(e){if(!this.condition_(e)||e.type!==B.WHEEL)return!0;const n=e.map,r=e.originalEvent;
9r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.coordinate);let s;if(e.type==B.WHEEL&&(s=r.deltaY,kf&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=Gh),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),s===0)return!1;this.lastDelta_=s;const o=Date.now();this.startTime_===void 0&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const a=n.getView();if(this.mode_==="trackpad"&&!(a.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=s;const l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),l),!1}handleWheelZoom_(e){const t=e.getView();t.getAnimating()&&t.cancelAnimations();let n=-ye(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(t.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),Fl(t,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(e){this.useAnchor_=e,e||(this.lastAnchor_=null)}}const Ey=xy;class wy extends Vr{constructor(e){e=e||{};const t=e;t.stopDown||(t.stopDown=$s),super(t),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=e.threshold!==void 0?e.threshold:.3,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){let t=0;const n=this.targetPointers[0],r=this.targetPointers[1],s=Math.atan2(r.clientY-n.clientY,r.clientX-n.clientX);if(this.lastAngle_!==void 0){const l=s-this.lastAngle_;this.rotationDelta_+=l,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),t=l}this.lastAngle_=s;const o=e.map,a=o.getView();a.getConstraints().rotation!==Tl&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(Pl(this.targetPointers))),this.rotating_&&(o.render(),a.adjustRotationInternal(t,this.anchor_)))}handleUpEvent(e){return this.targetPointers.length<2?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}const Cy=wy;class Ty extends Vr{constructor(e){e=e||{};const t=e;t.stopDown||(t.stopDown=$s),super(t),this.anchor_=null,this.duration_=e.duration!==void 0?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(e){let t=1;const n=this.targetPointers[0],r=this.targetPointers[1],s=n.clientX-r.clientX,o=n.clientY-r.clientY,a=Math.sqrt(s*s+o*o);this.lastDistance_!==void 0&&(t=this.lastDistance_/a),this.lastDistance_=a;const l=e.map,u=l.getView();t!=1&&(this.lastScaleDelta_=t),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel(Pl(this.targetPointers))),l.render(),u.adjustResolutionInternal(t,this.anchor_)}handleUpEvent(e){if(this.targetPointers.length<2){const n=e.map.getView(),r=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,r),!1}return!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}const Ry=Ty;function Vc(i){i=i||{};const e=new It,t=new Im(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&e.push(new uy),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&e.push(new $m({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&e.push(new ay({onFocusOnly:i.onFocusOnly,kinetic:t})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&e.push(new Cy),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&e.push(new Ry({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(e.push(new yy),e.push(new vy({delta:i.zoomDelta,duration:i.zoomDuration}))),(i.mouseWheelZoom!==void 0?i.mouseWheelZoom:!0)&&e.push(new Ey({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(i.shiftDragZoom!==void 0?i.shiftDragZoom:!0)&&e.push(new py({duration:i.zoomDuration})),e}function Yc(i){if(i instanceof Zn){i.setMapInternal(null);return}
9i instanceof fo&&i.getLayers().forEach(Yc)}function Bc(i,e){if(i instanceof Zn){i.setMapInternal(e);return}if(i instanceof fo){const t=i.getLayers().getArray();for(let n=0,r=t.length;n<r;++n)Bc(t[n],e)}}class by extends yt{constructor(e){super(),e=e||{},this.on,this.once,this.un;const t=Iy(e);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=e.maxTilesLoading!==void 0?e.maxTilesLoading:16,this.pixelRatio_=e.pixelRatio!==void 0?e.pixelRatio:Gh,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=He(),this.pixelToCoordinateTransform_=He(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=e.moveTolerance,this.keyboardEventTarget_=t.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver(()=>this.updateSize()),this.controls=t.controls||Km(),this.interactions=t.interactions||Vc({onFocusOnly:!0}),this.overlays_=t.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Nc(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(ze.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(ze.VIEW,this.handleViewChanged_),this.addChangeListener(ze.SIZE,this.handleSizeChanged_),this.addChangeListener(ze.TARGET,this.handleTargetChanged_),this.setProperties(t.values);const n=this;e.view&&!(e.view instanceof ft)&&e.view.then(function(r){n.setView(new ft(r))}),this.controls.addEventListener(Ue.ADD,r=>{r.element.setMap(this)}),this.controls.addEventListener(Ue.REMOVE,r=>{r.element.setMap(null)}),this.interactions.addEventListener(Ue.ADD,r=>{r.element.setMap(this)}),this.interactions.addEventListener(Ue.REMOVE,r=>{r.element.setMap(null)}),this.overlays_.addEventListener(Ue.ADD,r=>{this.addOverlayInternal_(r.element)}),this.overlays_.addEventListener(Ue.REMOVE,r=>{const s=r.element.getId();s!==void 0&&delete this.overlayIdIndex_[s.toString()],r.element.setMap(null)}),this.controls.forEach(r=>{r.setMap(this)}),this.interactions.forEach(r=>{r.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(e){this.getControls().push(e)}addInteraction(e){this.getInteractions().push(e)}addLayer(e){this.getLayerGroup().getLayers().push(e)}handleLayerAdd_(e){Bc(e.layer,this)}addOverlay(e){this.getOverlays().push(e)}addOverlayInternal_(e){const t=e.getId();t!==void 0&&(this.overlayIdIndex_[t.toString()]=e),e.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(e,t,n){if(!this.frameState_||!this.renderer_)return;const r=this.getCoordinateFromPixelInternal(e);n=n!==void 0?n:{};const s=n.hitTolerance!==void 0?n.hitTolerance:0,o=n.layerFilter!==void 0?n.layerFilter:yr,a=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,s,a,t,null,o,null)}getFeaturesAtPixel(e,t){const n=[];return this.forEachFeatureAtPixel(e,function(r){n.push(r)},t),n}getAllLayers(){const e=[];
9function t(n){n.forEach(function(r){r instanceof fo?t(r.getLayers()):e.push(r)})}return t(this.getLayers()),e}hasFeatureAtPixel(e,t){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(e);t=t!==void 0?t:{};const r=t.layerFilter!==void 0?t.layerFilter:yr,s=t.hitTolerance!==void 0?t.hitTolerance:0,o=t.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,s,o,r,null)}getEventCoordinate(e){return this.getCoordinateFromPixel(this.getEventPixel(e))}getEventCoordinateInternal(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))}getEventPixel(e){const n=this.viewport_.getBoundingClientRect(),r=this.getSize(),s=n.width/r[0],o=n.height/r[1],a="changedTouches"in e?e.changedTouches[0]:e;return[(a.clientX-n.left)/s,(a.clientY-n.top)/o]}getTarget(){return this.get(ze.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return va(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const t=this.frameState_;return t?me(t.pixelToCoordinateTransform,e.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(e){const t=this.overlayIdIndex_[e.toString()];return t!==void 0?t:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(ze.LAYERGROUP)}setLayers(e){const t=this.getLayerGroup();if(e instanceof It){t.setLayers(e);return}const n=t.getLayers();n.clear(),n.extend(e)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const e=this.getLayerGroup().getLayerStatesArray();for(let t=0,n=e.length;t<n;++t){const r=e[t];if(!r.visible)continue;const s=r.layer.getRenderer();if(s&&!s.ready)return!0;const o=r.layer.getSource();if(o&&o.loading)return!0}return!1}getPixelFromCoordinate(e){const t=Gt(e,this.getView().getProjection());return this.getPixelFromCoordinateInternal(t)}getPixelFromCoordinateInternal(e){const t=this.frameState_;return t?me(t.coordinateToPixelTransform,e.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(ze.SIZE)}getView(){return this.get(ze.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const e=this.getTargetElement();return e?e.ownerDocument:document}getTilePriority(e,t,n,r){return jm(this.frameState_,e,t,n,r)}handleBrowserEvent(e,t){t=t||e.type;const n=new ui(t,this,e);this.handleMapBrowserEvent(n)}handleMapBrowserEvent(e){if(!this.frameState_)return;const t=e.originalEvent,n=t.type;if(n===ba.POINTERDOWN||n===B.WHEEL||n===B.KEYDOWN){const r=this.getOwnerDocument(),s=this.viewport_.getRootNode?this.viewport_.getRootNode():r,o=t.target;if(this.overlayContainerStopEvent_.contains(o)||!(s===r?r.documentElement:s).contains(o))return}if(e.frameState=this.frameState_,this.dispatchEvent(e)!==!1){const r=this.getInteractions().getArray().slice();for(let s=r.length-1;s>=0;s--){const o=r[s];if(o.getMap()!==this||!o.getActive()||!this.getTargetElement())continue;if(!o.handleEvent(e)||e.propagationStopped)break}}}handlePostRender(){const e=this.frameState_,t=this.tileQueue_;if(!t.isEmpty()){let r=this.maxTilesLoading_,s=r;if(e){const o=e.viewHints;if(o[de.ANIMATING]||o[de.INTERACTING]){const a=Date.now()-e.time>8;r=a?0:8,s=a?0:2}}t.getTilesLoading()<r&&(t.reprioritize(),t.loadMoreTiles(r,s))}e&&this.renderer_&&!e.animate&&(this.renderComplete_===!0?(this.hasListener(Ft.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(Ft.RENDERCOMPLETE,e),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Mn(jt.LOADEND,this,e)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Mn(jt.LOADSTART,this,e))));const n=this.postRenderFunctions_;for(let r=0,s=n.length;r<s;++r)n[r](this,e);n.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let n=0,r=this.targetChangeHandlerKeys_.length;n<r;++n)he(this.targetChangeHandlerKeys_[n]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(B.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(B.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,Ss(this.viewport_)}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const n=this.targetElement_.getRootNode();n instanceof ShadowRoot&&this.resizeObserver_.unobserve(n.host),this.setSize(void 0)}const e=this.getTarget(),t=typeof e=="string"?document.getElementById(e):e;if(this.targetElement_=t,!t)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{t.appendChild(this.viewport_),this.renderer_||(this.renderer_=new Lm(this)),this.mapBrowserEventHandler_=new Dm(this,this.moveTolerance_);for(const s in ge)this.mapBrowserEventHandler_.addEventListener(ge[s],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(B.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(B.WHEEL,this.boundHandleBrowserEvent_,jh?{passive:!1}:!1);const n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.targetChangeHandlerKeys_=[ie(n,B.KEYDOWN,this.handleBrowserEvent,this),ie(n,B.KEYPRESS,this.handleBrowserEvent,this)];const r=t.getRootNode();r instanceof ShadowRoot&&this.resizeObserver_.observe(r.host),this.resizeObserver_.observe(t)}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(he(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(he(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const e=this.getView();e&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=ie(e,Xn.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=ie(e,B.CHANGE,this.handleViewPropertyChanged_,this),e.resolve
9Constraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(he),this.layerGroupPropertyListenerKeys_=null);const e=this.getLayerGroup();e&&(this.handleLayerAdd_(new ci("addlayer",e)),this.layerGroupPropertyListenerKeys_=[ie(e,Xn.PROPERTYCHANGE,this.render,this),ie(e,B.CHANGE,this.render,this),ie(e,"addlayer",this.handleLayerAdd_,this),ie(e,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const e=this.getLayerGroup().getLayerStatesArray();for(let t=0,n=e.length;t<n;++t){const r=e[t].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}flushDeclutterItems(){const e=this.frameState_;e&&this.renderer_.flushDeclutterItems(e)}removeControl(e){return this.getControls().remove(e)}removeInteraction(e){return this.getInteractions().remove(e)}removeLayer(e){return this.getLayerGroup().getLayers().remove(e)}handleLayerRemove_(e){Yc(e.layer)}removeOverlay(e){return this.getOverlays().remove(e)}renderFrame_(e){const t=this.getSize(),n=this.getView(),r=this.frameState_;let s=null;if(t!==void 0&&Lu(t)&&n&&n.isDef()){const o=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:pa(a.center,a.resolution,a.rotation,t),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:t,tileQueue:this.tileQueue_,time:e,usedTiles:{},viewState:a,viewHints:o,wantedTiles:{},mapId:Z(this),renderTargets:{}},a.nextCenter&&a.nextResolution){const l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;s.nextExtent=pa(a.nextCenter,a.nextResolution,l,t)}}this.frameState_=s,this.renderer_.renderFrame(s),s&&(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),r&&(!this.previousExtent_||!dn(this.previousExtent_)&&!$t(s.extent,this.previousExtent_))&&(this.dispatchEvent(new Mn(jt.MOVESTART,this,r)),this.previousExtent_=Yn(this.previousExtent_)),this.previousExtent_&&!s.viewHints[de.ANIMATING]&&!s.viewHints[de.INTERACTING]&&!$t(s.extent,this.previousExtent_)&&(this.dispatchEvent(new Mn(jt.MOVEEND,this,s)),Wh(s.extent,this.previousExtent_))),this.dispatchEvent(new Mn(jt.POSTRENDER,this,s)),this.renderComplete_=this.hasListener(jt.LOADSTART)||this.hasListener(jt.LOADEND)||this.hasListener(Ft.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(e){const t=this.getLayerGroup();t&&this.handleLayerRemove_(new ci("removelayer",t)),this.set(ze.LAYERGROUP,e)}setSize(e){this.set(ze.SIZE,e)}setTarget(e){this.set(ze.TARGET,e)}setView(e){if(!e||e instanceof ft){this.set(ze.VIEW,e);return}this.set(ze.VIEW,new ft);const t=this;e.then(function(n){t.setView(new ft(n))})}updateSize(){const e=this.getTargetElement();let t;if(e){const r=getComputedStyle(e),s=e.offsetWidth-parseFloat(r.borderLeftWidth)-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight)-parseFloat(r.borderRightWidth),o=e.offsetHeight-parseFloat(r.borderTopWidth)-parseFloat(r.paddingTop)-parseFloat(r.paddingBottom)-parseFloat(r.borderBottomWidth);!isNaN(s)&&!isNaN(o)&&(t=[s,o],!Lu(t)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&qh("No map visible because the map container's width or height are 0."))}const n=this.getSize();t&&(!n||!Ti(t,n))&&(this.setSize(t),this.updateViewportSize_())}updateViewportSize_(){const e=this.getView();if(e){let t;const n=getComputedStyle(this.viewport_);n.width&&n.height&&(t=[parseInt(n.width,10),parseInt(n.height,10)]),e.setViewportSize(t)}
9}}function Iy(i){let e=null;i.keyboardEventTarget!==void 0&&(e=typeof i.keyboardEventTarget=="string"?document.getElementById(i.keyboardEventTarget):i.keyboardEventTarget);const t={},n=i.layers&&typeof i.layers.getLayers=="function"?i.layers:new fo({layers:i.layers});t[ze.LAYERGROUP]=n,t[ze.TARGET]=i.target,t[ze.VIEW]=i.view instanceof ft?i.view:new ft;let r;i.controls!==void 0&&(Array.isArray(i.controls)?r=new It(i.controls.slice()):(H(typeof i.controls.getArray=="function",47),r=i.controls));let s;i.interactions!==void 0&&(Array.isArray(i.interactions)?s=new It(i.interactions.slice()):(H(typeof i.interactions.getArray=="function",48),s=i.interactions));let o;return i.overlays!==void 0?Array.isArray(i.overlays)?o=new It(i.overlays.slice()):(H(typeof i.overlays.getArray=="function",49),o=i.overlays):o=new It,{controls:r,interactions:s,keyboardEventTarget:e,overlays:o,values:t}}const Ll=by,De={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class Sy extends yt{constructor(e){super(),this.on,this.once,this.un,this.options=e,this.id=e.id,this.insertFirst=e.insertFirst!==void 0?e.insertFirst:!0,this.stopEvent=e.stopEvent!==void 0?e.stopEvent:!0,this.element=document.createElement("div"),this.element.className=e.className!==void 0?e.className:"ol-overlay-container "+Ug,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=e.autoPan===!0?{}:e.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(De.ELEMENT,this.handleElementChanged),this.addChangeListener(De.MAP,this.handleMapChanged),this.addChangeListener(De.OFFSET,this.handleOffsetChanged),this.addChangeListener(De.POSITION,this.handlePositionChanged),this.addChangeListener(De.POSITIONING,this.handlePositioningChanged),e.element!==void 0&&this.setElement(e.element),this.setOffset(e.offset!==void 0?e.offset:[0,0]),this.setPositioning(e.positioning||"top-left"),e.position!==void 0&&this.setPosition(e.position)}getElement(){return this.get(De.ELEMENT)}getId(){return this.id}getMap(){return this.get(De.MAP)||null}getOffset(){return this.get(De.OFFSET)}getPosition(){return this.get(De.POSITION)}getPositioning(){return this.get(De.POSITIONING)}handleElementChanged(){gc(this.element);const e=this.getElement();e&&this.element.appendChild(e)}handleMapChanged(){this.mapPostrenderListenerKey&&(Ss(this.element),he(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const e=this.getMap();if(e){this.mapPostrenderListenerKey=ie(e,jt.POSTRENDER,this.render,this),this.updatePixelPosition();const t=this.stopEvent?e.getOverlayContainerStopEvent():e.getOverlayContainer();this.insertFirst?t.insertBefore(this.element,t.childNodes[0]||null):t.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(e){this.set(De.ELEMENT,e)}setMap(e){this.set(De.MAP,e)}setOffset(e){this.set(De.OFFSET,e)}setPosition(e){this.set(De.POSITION,e)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(e){const t=this.getMap();if(!t||!t.getTargetElement()||!this.get(De.POSITION))return;const n=this.getRect(t.getTargetElement(),t.getSize()),r=this.getElement(),s=this.getRect(r,[Yg(r),Bg(r)]);e=e||{};const o=e.margin===void 0?20:e.margin;if(!Vt(n,s)){const a=s[0]-n[0],l=n[2]-s[2],u=s[1]-n[1],h=n[3]-s[3],c=[0,0];if(a<0?c[0]=a-o:l<0&&(c[0]=Math.abs(l)+o),u<0?c[1]=u-o:h<0&&(c[1]=Math.abs(h)+o),c[0]!==0||c[1]!==0){const d=t.getView().getCenterInternal(),f=t.getPixelFromCoordinateInternal(d);if(!f)return;const g=[f[0]+c[0],f[1]+c[1]],p=e.animation||{};t.getView().animateInternal({center:t.getCoordinateFromPixelInternal(g),duration:p.duration,easing:p.easing})}}}getRect(e,t){const n=e.getBoundingClientRect(),r=n.left+window.pageXOffset,s=n.top+window.pageYOffset;return[r,s,r+t[0],s+t[1]]}setPositioning(e){this.set(De.POSITIONING,e)}setVisible(e){this.rendered.visible!==e&&(this.element.style.display=e?"":"none",this.rendered.visible=e)}updatePixelPosition(){const e=this.getMap(),t=this.getPosition();if(!e||!e.isRendered()||!t){this.setVisible(!1);return}
9const n=e.getPixelFromCoordinate(t),r=e.getSize();this.updateRenderedPosition(n,r)}updateRenderedPosition(e,t){const n=this.element.style,r=this.getOffset(),s=this.getPositioning();this.setVisible(!0);const o=Math.round(e[0]+r[0])+"px",a=Math.round(e[1]+r[1])+"px";let l="0%",u="0%";s=="bottom-right"||s=="center-right"||s=="top-right"?l="-100%":(s=="bottom-center"||s=="center-center"||s=="top-center")&&(l="-50%"),s=="bottom-left"||s=="bottom-center"||s=="bottom-right"?u="-100%":(s=="center-left"||s=="center-center"||s=="center-right")&&(u="-50%");const h=`translate(${l}, ${u}) translate(${o}, ${a})`;this.rendered.transform_!=h&&(this.rendered.transform_=h,n.transform=h)}getOptions(){return this.options}}const Zc=Sy;class My{constructor(e){this.highWaterMark=e!==void 0?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(e){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(e){return this.entries_.hasOwnProperty(e)}forEach(e){let t=this.oldest_;for(;t;)e(t.value_,t.key_,this),t=t.newer}get(e,t){const n=this.entries_[e];return H(n!==void 0,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_}remove(e){const t=this.entries_[e];return H(t!==void 0,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_}getCount(){return this.count_}getKeys(){const e=new Array(this.count_);let t=0,n;for(n=this.newest_;n;n=n.older)e[t++]=n.key_;return e}getValues(){const e=new Array(this.count_);let t=0,n;for(n=this.newest_;n;n=n.older)e[t++]=n.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(e){if(this.containsKey(e))return this.entries_[e].value_}pop(){const e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}replace(e,t){this.get(e),this.entries_[e].value_=t}set(e,t){H(!(e in this.entries_),16);const n={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[e]=n,++this.count_}setSize(e){this.highWaterMark=e}}const Fy=My;function ih(i,e,t,n){return n!==void 0?(n[0]=i,n[1]=e,n[2]=t,n):[i,e,t]}function Kn(i,e,t){return i+"/"+e+"/"+t}function Uc(i){return Kn(i[0],i[1],i[2])}function Py(i){const[e,t,n]=i.substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number);return Kn(e,t,n)}function Kc(i){return i.split("/").map(Number)}function Ly(i){return(i[1]<<i[0])+i[2]}function Ay(i,e){const t=i[0],n=i[1],r=i[2];if(e.getMinZoom()>t||t>e.getMaxZoom())return!1;const s=e.getFullTileRange(t);return s?s.containsXY(n,r):!0}class ky extends Fy{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(e){for(;this.canExpireCache()&&!(this.peekLast().getKey()in e);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const e=this.peekFirstKey(),n=Kc(e)[0];this.forEach(r=>{r.tileCoord[0]!==n&&(this.remove(Uc(r.tileCoord)),r.release())})}}const Al=ky;class qc{constructor(e,t,n,r){this.minX=e,this.maxX=t,this.minY=n,this.maxY=r}contains(e){return this.containsXY(e[1],e[2])}containsTileRange(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY}containsXY(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY}equals(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY}extend(e){e.minX<this.minX&&(this.minX=e.minX),e.maxX>this.maxX&&(this.maxX=e.maxX),e.minY<this.minY&&(this.minY=e.minY),e.maxY>this.maxY&&(this.maxY=e.maxY)}
9getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY}}function En(i,e,t,n,r){return r!==void 0?(r.minX=i,r.maxX=e,r.minY=t,r.maxY=n,r):new qc(i,e,t,n)}const Hc=qc,nh=[];class Oy extends co{constructor(e,t,n,r){super(e,t,{transition:0}),this.context_={},this.executorGroups={},this.declutterExecutorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=r.bind(void 0,this),this.wrappedTileCoord=n}getContext(e){const t=Z(e);return t in this.context_||(this.context_[t]=we(1,1,nh)),this.context_[t]}hasContext(e){return Z(e)in this.context_}getImage(e){return this.hasContext(e)?this.getContext(e).canvas:null}getReplayState(e){const t=Z(e);return t in this.replayState_||(this.replayState_[t]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[t]}load(){this.getSourceTiles()}release(){for(const e in this.context_){const t=this.context_[e];Gr(t),nh.push(t.canvas),delete this.context_[e]}super.release()}}const Dy=Oy;let zy=class extends co{constructor(e,t,n,r,s,o){super(e,t,o),this.extent=null,this.format_=r,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=s,this.url_=n,this.key=n}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==k.IDLE&&(this.setState(k.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(e,t){this.setFeatures(e)}onError(){this.setState(k.ERROR)}setFeatures(e){this.features_=e,this.setState(k.LOADED)}setLoader(e){this.loader_=e}};const Ny=zy;class Gs extends tc{constructor(e){super(),this.geometries_=e||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(he),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(this.geometries_)for(let e=0,t=this.geometries_.length;e<t;++e)this.changeEventsKeys_.push(ie(this.geometries_[e],B.CHANGE,this.changed,this))}clone(){const e=new Gs(null);return e.setGeometries(this.geometries_),e.applyProperties(this),e}closestPointXY(e,t,n,r){if(r<cn(this.getExtent(),e,t))return r;const s=this.geometries_;for(let o=0,a=s.length;o<a;++o)r=s[o].closestPointXY(e,t,n,r);return r}containsXY(e,t){const n=this.geometries_;for(let r=0,s=n.length;r<s;++r)if(n[r].containsXY(e,t))return!0;return!1}computeExtent(e){Yn(e);const t=this.geometries_;for(let n=0,r=t.length;n<r;++n)Yh(e,t[n].getExtent());return e}getGeometries(){return rh(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let e=[];const t=this.geometries_;for(let n=0,r=t.length;n<r;++n)t[n].getType()===this.getType()?e=e.concat(t[n].getGeometriesArrayRecursive()):e.push(t[n]);return e}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=[],n=this.geometries_;let r=!1;for(let s=0,o=n.length;s<o;++s){const a=n[s],l=a.getSimplifiedGeometry(e);t.push(l),l!==a&&(r=!0)}if(r){const s=new Gs(null);return s.setGeometriesArray(t),s}return this.simplifiedGeometryMaxMinSquaredTolerance=e,this}getType(){return"GeometryCollection"}intersectsExtent(e){const t=this.geometries_;for(let n=0,r=t.length;n<r;++n)if(t[n].intersectsExtent(e))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(e,t){const n=this.geometries_;for(let r=0,s=n.length;r<s;++r)n[r].rotate(e,t);this.changed()}scale(e,t,n){n||(n=Lt(this.getExtent()));const r=this.geometries_;for(let s=0,o=r.length;s<o;++s)r[s].scale(e,t,n);this.changed()}setGeometries(e){this.setGeometriesArray(rh(e))}setGeometriesArray(e){this.unlistenGeometriesChange_(),this.geometries_=e,this.listenGeometriesChange_(),this.changed()}applyTransform(e){const t=this.geometries_;for(let n=0,r=t.length;n<r;++n)t[n].applyTransform(e);this.changed()}translate(e,t){const n=this.geometries_;for(let r=0,s=n.length;r<s;++r)n[r].translate(e,t);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function rh(i){const e=[];for(let t=0,n=i.length;t<n;++t)e.push(i[t].clone());return e}const Gy=Gs;
9class js extends fn{constructor(e,t,n){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(e[0]))this.setCoordinates(e,t);else if(t!==void 0&&n)this.setFlatCoordinates(t,e),this.ends_=n;else{let r=this.getLayout();const s=e,o=[],a=[];for(let l=0,u=s.length;l<u;++l){const h=s[l];l===0&&(r=h.getLayout()),Mt(o,h.getFlatCoordinates()),a.push(o.length)}this.setFlatCoordinates(r,o),this.ends_=a}}appendLineString(e){this.flatCoordinates?Mt(this.flatCoordinates,e.getFlatCoordinates().slice()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new js(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,n,r){return r<cn(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rl(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ol(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,n,r))}getCoordinateAtM(e,t,n){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(t=t!==void 0?t:!1,n=n!==void 0?n:!1,zg(this.flatCoordinates,0,this.ends_,this.stride,e,t,n))}getCoordinates(){return _r(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(e){return e<0||this.ends_.length<=e?null:new bs(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLineStrings(){const e=this.flatCoordinates,t=this.ends_,n=this.layout,r=[];let s=0;for(let o=0,a=t.length;o<a;++o){const l=t[o],u=new bs(e.slice(s,l),n);r.push(u),s=l}return r}getFlatMidpoints(){const e=[],t=this.flatCoordinates;let n=0;const r=this.ends_,s=this.stride;for(let o=0,a=r.length;o<a;++o){const l=r[o],u=Ts(t,n,l,s,.5);Mt(e,u),n=l}return e}getSimplifiedGeometryInternal(e){const t=[],n=[];return t.length=bg(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,n),new js(t,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(e){return Lg(this.flatCoordinates,0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=al(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Jc=js;class kl extends fn{constructor(e,t){super(),t&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendPoint(e){this.flatCoordinates?Mt(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()}clone(){const e=new kl(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,n,r){if(r<cn(this.getExtent(),e,t))return r;const s=this.flatCoordinates,o=this.stride;for(let a=0,l=s.length;a<l;a+=o){const u=Yi(e,t,s[a],s[a+1]);if(u<r){r=u;for(let h=0;h<o;++h)n[h]=s[a+h];n.length=o}}return r}getCoordinates(){return fi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(e){const t=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return e<0||t<=e?null:new vr(this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride),this.layout)}getPoints(){const e=this.flatCoordinates,t=this.layout,n=this.stride,r=[];for(let s=0,o=e.length;s<o;s+=n){const a=new vr(e.slice(s,s+n),t);r.push(a)}return r}getType(){return"MultiPoint"}intersectsExtent(e){const t=this.flatCoordinates,n=this.stride;for(let r=0,s=t.length;r<s;r+=n){const o=t[r],a=t[r+1];if(qa(e,o,a))return!0}return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=oo(this.flatCoordinates,0,e,this.stride),this.changed()}}const Ol=kl;function $c(i,e,t,n){const r=[];let s=at();for(let o=0,a=t.length;o<a;++o){const l=t[o];s=Ha(i,e,l[0],n),r.push((s[0]+s[2])/2,(s[1]+s[3])/2),e=l[l.length-1]}return r}class Xs extends fn{constructor(e,t,n){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!n&&!Array.isArray(e[0])){let r=this.getLayout();const s=e,o=[],a=[];for(let l=0,u=s.length;l<u;++l){const h=s[l];l===0&&(r=h.getLayout());const c=o.length,d=h.getEnds();for(let f=0,g=d.length;f<g;++f)d[f]+=c;Mt(o,h.getFlatCoordinates()),a.push(d)}t=r,e=o,n=a}t!==void 0&&n?(this.setFlatCoordinates(t,e),this.endss_=n):this.setCoordinates(e,t)}appendPolygon(e){let t;if(!this.flatCoordinates)this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();else{const n=this.flatCoordinates.length;Mt(this.flatCoordinates,e.getFlatCoordinates()),t=e.getEnds().slice();for(let r=0,s=t.length;r<s;++r)t[r]+=n}this.endss_.push(t),this.changed()}clone(){const e=this.endss_.length,t=new Array(e);for(let r=0;r<e;++r)t[r]=this.endss_[r].slice();const n=new Xs(this.flatCoordinates.slice(),this.layout,t);return n.applyProperties(this),n}closestPointXY(e,t,n,r){return r<cn(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(wg(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Cg(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,t,n,r))}containsXY(e,t){return Pg(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)}getArea(){return Mg(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(e){let t;return e!==void 0?(t=this.getOrientedFlatCoordinates().slice(),Fu(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,xa(t,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const e=$c(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=sc(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Ol(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;Og(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=Fu(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],n=[];return t.length=Sg(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,n),new Xs(t,"XY",n)}getPolygon(e){if(e<0||this.endss_.length<=e)return null;let t;if(e===0)t=0;else{const s=this.endss_[e-1];t=s[s.length-1]}const n=this.endss_[e].slice(),r=n[n.length-1];if(t!==0)for(let s=0,o=n.length;s<o;++s)n[s]-=t;return new Er(this.flatCoordinates.slice(t,r),this.layout,n)}getPolygons(){const e=this.layout,t=this.flatCoordinates,n=this.endss_,r=[];let s=0;for(let o=0,a=n.length;o<a;++o){const l=n[o].slice(),u=l[l.length-1];if(s!==0)for(let c=0,d=l.length;c<d;++c)l[c]-=s;const h=new Er(t.slice(s,u),e,l);r.push(h),s=u}return r}getType(){return"MultiPolygon"}intersectsExtent(e){return Ag(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=Rg(this.flatCoordinates,0,e,this.stride,this.endss_);if(n.length===0)this.flatCoordinates.length=0;else{const r=n[n.length-1];this.flatCoordinates.length=r.length===0?0:r[r.length-1]}this.changed()}}const Qc=Xs;class ed{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(e,t){if(t){let n=t.dataProjection?le(t.dataProjection):this.readProjection(e);t.extent&&n&&n.getUnits()==="tile-pixels"&&(n=le(n),n.setWorldExtent(t.extent)),t={dataProjection:n,featureProjection:t.featureProjection}}return this.adaptOptions(t)}
9adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},e)}getType(){return W()}readFeature(e,t){return W()}readFeatures(e,t){return W()}readGeometry(e,t){return W()}readProjection(e){return W()}writeFeature(e,t){return W()}writeFeatures(e,t){return W()}writeGeometry(e,t){return W()}}function Dl(i,e,t){const n=t?le(t.featureProjection):null,r=t?le(t.dataProjection):null;let s;if(n&&r&&!Rt(n,r)?s=(e?i.clone():i).transform(e?n:r,e?r:n):s=i,e&&t&&t.decimals!==void 0){const o=Math.pow(10,t.decimals),a=function(l){for(let u=0,h=l.length;u<h;++u)l[u]=Math.round(l[u]*o)/o;return l};s===i&&(s=i.clone()),s.applyTransform(a)}return s}class jy extends ed{constructor(){super()}getType(){return"json"}readFeature(e,t){return this.readFeatureFromObject(as(e),this.getReadOptions(e,t))}readFeatures(e,t){return this.readFeaturesFromObject(as(e),this.getReadOptions(e,t))}readFeatureFromObject(e,t){return W()}readFeaturesFromObject(e,t){return W()}readGeometry(e,t){return this.readGeometryFromObject(as(e),this.getReadOptions(e,t))}readGeometryFromObject(e,t){return W()}readProjection(e){return this.readProjectionFromObject(as(e))}readProjectionFromObject(e){return W()}writeFeature(e,t){return JSON.stringify(this.writeFeatureObject(e,t))}writeFeatureObject(e,t){return W()}writeFeatures(e,t){return JSON.stringify(this.writeFeaturesObject(e,t))}writeFeaturesObject(e,t){return W()}writeGeometry(e,t){return JSON.stringify(this.writeGeometryObject(e,t))}writeGeometryObject(e,t){return W()}}function as(i){if(typeof i=="string"){const e=JSON.parse(i);return e||null}return i!==null?i:null}const Xy=jy;class Wy extends Xy{constructor(e){e=e||{},super(),this.dataProjection=le(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=le(e.featureProjection)),this.geometryName_=e.geometryName,this.extractGeometryName_=e.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(e,t){let n=null;e.type==="Feature"?n=e:n={type:"Feature",geometry:e,properties:null};const r=Sa(n.geometry,t),s=new Af;return this.geometryName_?s.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&s.setGeometryName(n.geometry_name),s.setGeometry(r),"id"in n&&s.setId(n.id),n.properties&&s.setProperties(n.properties,!0),s}readFeaturesFromObject(e,t){const n=e;let r=null;if(n.type==="FeatureCollection"){const s=e;r=[];const o=s.features;for(let a=0,l=o.length;a<l;++a)r.push(this.readFeatureFromObject(o[a],t))}else r=[this.readFeatureFromObject(e,t)];return r}readGeometryFromObject(e,t){return Sa(e,t)}readProjectionFromObject(e){const t=e.crs;let n;return t?t.type=="name"?n=le(t.properties.name):t.type==="EPSG"?n=le("EPSG:"+t.properties.code):H(!1,36):n=this.dataProjection,n}writeFeatureObject(e,t){t=this.adaptOptions(t);const n={type:"Feature",geometry:null,properties:null},r=e.getId();if(r!==void 0&&(n.id=r),!e.hasProperties())return n;const s=e.getProperties(),o=e.getGeometry();return o&&(n.geometry=Ma(o,t),delete s[e.getGeometryName()]),Ui(s)||(n.properties=s),n}writeFeaturesObject(e,t){t=this.adaptOptions(t);const n=[];for(let r=0,s=e.length;r<s;++r)n.push(this.writeFeatureObject(e[r],t));return{type:"FeatureCollection",features:n}}writeGeometryObject(e,t){return Ma(e,this.adaptOptions(t))}}function Sa(i,e){if(!i)return null;let t;switch(i.type){case"Point":{t=Yy(i);break}case"LineString":{t=By(i);break}case"Polygon":{t=qy(i);break}case"MultiPoint":{t=Uy(i);break}case"MultiLineString":{t=Zy(i);break}case"MultiPolygon":{t=Ky(i);break}case"GeometryCollection":{t=Vy(i);break}default:throw new Error("Unsupported GeoJSON type: "+i.type)}return Dl(t,!1,e)}function Vy(i,e){const t=i.geometries.map(function(n){return Sa(n,e)});return new Gy(t)}function Yy(i){return new vr(i.coordinates)}function By(i){return new bs(i.coordinates)}function Zy(i){return new Jc(i.coordinates)}function Uy(i){return new Ol(i.coordinates)}function Ky(i){return new Qc(i.coordinates)}function qy(i){return new Er(i.coordinates)}function Ma(i,e){i=Dl(i,!0,e);const t=i.getType();let n;switch(t){case"Point":{n=t_(i);break}case"LineString":{n=Jy(i);break}case"Polygon":{n=i_(i,e);break}case"MultiPoint":{n=Qy(i);break}case"MultiLineString":{n=$y(i);break}case"MultiPolygon":{n=e_(i,e);break}case"GeometryCollection":{n=Hy(i,e);break}
vendor: 4,146 bytes, line 9
9case"Circle":{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+t)}return n}function Hy(i,e){return e=Object.assign({},e),delete e.featureProjection,{type:"GeometryCollection",geometries:i.getGeometriesArray().map(function(n){return Ma(n,e)})}}function Jy(i,e){return{type:"LineString",coordinates:i.getCoordinates()}}function $y(i,e){return{type:"MultiLineString",coordinates:i.getCoordinates()}}function Qy(i,e){return{type:"MultiPoint",coordinates:i.getCoordinates()}}function e_(i,e){let t;return e&&(t=e.rightHanded),{type:"MultiPolygon",coordinates:i.getCoordinates(t)}}function t_(i,e){return{type:"Point",coordinates:i.getCoordinates()}}function i_(i,e){let t;return e&&(t=e.rightHanded),{type:"Polygon",coordinates:i.getCoordinates(t)}}const Fa=Wy;function n_(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var zl={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */zl.read=function(i,e,t,n,r){var s,o,a=r*8-n-1,l=(1<<a)-1,u=l>>1,h=-7,c=t?r-1:0,d=t?-1:1,f=i[e+c];for(c+=d,s=f&(1<<-h)-1,f>>=-h,h+=a;h>0;s=s*256+i[e+c],c+=d,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=n;h>0;o=o*256+i[e+c],c+=d,h-=8);if(s===0)s=1-u;else{if(s===l)return o?NaN:(f?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-u}return(f?-1:1)*o*Math.pow(2,s-n)};zl.write=function(i,e,t,n,r,s){var o,a,l,u=s*8-r-1,h=(1<<u)-1,c=h>>1,d=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,g=n?1:-1,p=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+c>=1?e+=d/l:e+=d*Math.pow(2,1-c),e*l>=2&&(o++,l/=2),o+c>=h?(a=0,o=h):o+c>=1?(a=(e*l-1)*Math.pow(2,r),o=o+c):(a=e*Math.pow(2,c-1)*Math.pow(2,r),o=0));r>=8;i[t+f]=a&255,f+=g,a/=256,r-=8);for(o=o<<r|a,u+=r;u>0;i[t+f]=o&255,f+=g,o/=256,u-=8);i[t+f-g]|=p*128};var r_=se,ls=zl;function se(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}se.Varint=0;se.Fixed64=1;se.Bytes=2;se.Fixed32=5;var Pa=65536*65536,sh=1/Pa,s_=12,td=typeof TextDecoder>"u"?null:new TextDecoder("utf8");se.prototype={destroy:function(){this.buf=null},readFields:function(i,e,t){for(t=t||this.length;this.pos<t;){var n=this.readVarint(),r=n>>3,s=this.pos;this.type=n&7,i(r,e,this),this.pos===s&&this.skip(n)}return e},readMessage:function(i,e){return this.readFields(i,e,this.readVarint()+this.pos)},readFixed32:function(){var i=us(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=ah(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=us(this.buf,this.pos)+us(this.buf,this.pos+4)*Pa;return this.pos+=8,i},readSFixed64:function(){var i=us(this.buf,this.pos)+ah(this.buf,this.pos+4)*Pa;return this.pos+=8,i},readFloat:function(){var i=ls.read(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=ls.read(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var e=this.buf,t,n;return n=e[this.pos++],t=n&127,n<128||(n=e[this.pos++],t|=(n&127)<<7,n<128)||(n=e[this.pos++],t|=(n&127)<<14,n<128)||(n=e[this.pos++],t|=(n&127)<<21,n<128)?t:(n=e[this.pos],t|=(n&15)<<28,o_(t,i,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var i=this.readVarint();return i%2===1?(i+1)/-2:i/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var i=this.readVarint()+this.pos,e=this.pos;return this.pos=i,i-e>=s_&&td?x_(this.buf,e,i):v_(this.buf,e,i)},readBytes:function(){var i=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,i);return this.pos=i,e},readPackedVarint:function(i,e){if(this.type!==se.Bytes)return i.push(this.readVarint(e));var t=Nt(this);for(i=i||[];this.pos<t;)i.push(this.readVarint(e));return i},readPackedSVarint:function(i){if(this.type!==se.Bytes)return i.push(this.readSVarint());var e=Nt(this);for(i=i||[];this.pos<e;)i.push(this.readSVarint());return i},readPackedBoolean:function(i){if(this.type!==se.Bytes)return i.push(this.readBoolean());var e=Nt(this);for(i=i||[];this.pos<e;)i.push(this.readBoolean());return i}
vendor: 6,399 bytes, line 9
9,readPackedFloat:function(i){if(this.type!==se.Bytes)return i.push(this.readFloat());var e=Nt(this);for(i=i||[];this.pos<e;)i.push(this.readFloat());return i},readPackedDouble:function(i){if(this.type!==se.Bytes)return i.push(this.readDouble());var e=Nt(this);for(i=i||[];this.pos<e;)i.push(this.readDouble());return i},readPackedFixed32:function(i){if(this.type!==se.Bytes)return i.push(this.readFixed32());var e=Nt(this);for(i=i||[];this.pos<e;)i.push(this.readFixed32());return i},readPackedSFixed32:function(i){if(this.type!==se.Bytes)return i.push(this.readSFixed32());var e=Nt(this);for(i=i||[];this.pos<e;)i.push(this.readSFixed32());return i},readPackedFixed64:function(i){if(this.type!==se.Bytes)return i.push(this.readFixed64());var e=Nt(this);for(i=i||[];this.pos<e;)i.push(this.readFixed64());return i},readPackedSFixed64:function(i){if(this.type!==se.Bytes)return i.push(this.readSFixed64());var e=Nt(this);for(i=i||[];this.pos<e;)i.push(this.readSFixed64());return i},skip:function(i){var e=i&7;if(e===se.Varint)for(;this.buf[this.pos++]>127;);else if(e===se.Bytes)this.pos=this.readVarint()+this.pos;else if(e===se.Fixed32)this.pos+=4;else if(e===se.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+e)},writeTag:function(i,e){this.writeVarint(i<<3|e)},realloc:function(i){for(var e=this.length||16;e<this.pos+i;)e*=2;if(e!==this.length){var t=new Uint8Array(e);t.set(this.buf),this.buf=t,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(i){this.realloc(4),Cn(this.buf,i,this.pos),this.pos+=4},writeSFixed32:function(i){this.realloc(4),Cn(this.buf,i,this.pos),this.pos+=4},writeFixed64:function(i){this.realloc(8),Cn(this.buf,i&-1,this.pos),Cn(this.buf,Math.floor(i*sh),this.pos+4),this.pos+=8},writeSFixed64:function(i){this.realloc(8),Cn(this.buf,i&-1,this.pos),Cn(this.buf,Math.floor(i*sh),this.pos+4),this.pos+=8},writeVarint:function(i){if(i=+i||0,i>268435455||i<0){a_(i,this);return}this.realloc(4),this.buf[this.pos++]=i&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=(i>>>=7)&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=(i>>>=7)&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=i>>>7&127)))},writeSVarint:function(i){this.writeVarint(i<0?-i*2-1:i*2)},writeBoolean:function(i){this.writeVarint(!!i)},writeString:function(i){i=String(i),this.realloc(i.length*4),this.pos++;var e=this.pos;this.pos=E_(this.buf,i,this.pos);var t=this.pos-e;t>=128&&oh(e,t,this),this.pos=e-1,this.writeVarint(t),this.pos+=t},writeFloat:function(i){this.realloc(4),ls.write(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),ls.write(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var e=i.length;this.writeVarint(e),this.realloc(e);for(var t=0;t<e;t++)this.buf[this.pos++]=i[t]},writeRawMessage:function(i,e){this.pos++;var t=this.pos;i(e,this);var n=this.pos-t;n>=128&&oh(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeMessage:function(i,e,t){this.writeTag(i,se.Bytes),this.writeRawMessage(e,t)},writePackedVarint:function(i,e){e.length&&this.writeMessage(i,h_,e)},writePackedSVarint:function(i,e){e.length&&this.writeMessage(i,c_,e)},writePackedBoolean:function(i,e){e.length&&this.writeMessage(i,g_,e)},writePackedFloat:function(i,e){e.length&&this.writeMessage(i,d_,e)},writePackedDouble:function(i,e){e.length&&this.writeMessage(i,f_,e)},writePackedFixed32:function(i,e){e.length&&this.writeMessage(i,p_,e)},writePackedSFixed32:function(i,e){e.length&&this.writeMessage(i,m_,e)},writePackedFixed64:function(i,e){e.length&&this.writeMessage(i,y_,e)},writePackedSFixed64:function(i,e){e.length&&this.writeMessage(i,__,e)},writeBytesField:function(i,e){this.writeTag(i,se.Bytes),this.writeBytes(e)},writeFixed32Field:function(i,e){this.writeTag(i,se.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(i,e){this.writeTag(i,se.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(i,e){this.writeTag(i,se.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(i,e){this.writeTag(i,se.Fixed64),this.writeSFixed64(e)},writeVarintField:function(i,e){this.writeTag(i,se.Varint),this.writeVarint(e)},writeSVarintField:function(i,e){this.writeTag(i,se.Varint),this.writeSVarint(e)},writeStringField:function(i,e){this.writeTag(i,se.Bytes),this.writeString(e)},writeFloatField:function(i,e){this.writeTag(i,se.Fixed32),this.writeFloat(e)},writeDoubleField:function(i,e){this.writeTag(i,se.Fixed64),this.writeDouble(e)},writeBooleanField:function(i,e){this.writeVarintField(i,!!e)}};function o_(i,e,t){var n=t.buf,r,s;if(s=n[t.pos++],r=(s&112)>>4,s<128||(s=n[t.pos++],r|=(s&127)<<3,s<128)||(s=n[t.pos++],r|=(s&127)<<10,s<128)||(s=n[t.pos++],r|=(s&127)<<17,s<128)||(s=n[t.pos++],r|=(s&127)<<24,s<128)||(s=n[t.pos++],r|=(s&1)<<31,s<128))return wn(i,r,e);throw new Error("Expected varint not more than 10 bytes")}function Nt(i){return i.type===se.Bytes?i.readVarint()+i.pos:i.pos+1}function wn(i,e,t){return t?e*4294967296+(i>>>0):(e>>>0)*4294967296+(i>>>0)}function a_(i,e){var t,n;if(i>=0?(t=i%4294967296|0,n=i/4294967296|0):(t=~(-i%4294967296),n=~(-i/4294967296),t^4294967295?t=t+1|0:(t=0,n=n+1|0)),i>=18446744073709552e3||i<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),l_(t,n,e),u_(n,e)}function l_(i,e,t){t.buf[t.pos++]=i&127|128,i>>>=7,t.buf[t.pos++]=i&127|128,i>>>=7,t.buf[t.pos++]=i&127|128,i>>>=7,t.buf[t.pos++]=i&127|128,i>>>=7,t.buf[t.pos]=i&127}function u_(i,e){var t=(i&7)<<4;e.buf[e.pos++]|=t|((i>>>=3)?128:0),i&&(e.buf[e.pos++]=i&127|((i>>>=7)?128:0),i&&(e.buf[e.pos++]=i&127|((i>>>=7)?128:0),i&&(e.buf[e.pos++]=i&127|((i>>>=7)?128:0),i&&(e.buf[e.pos++]=i&127|((i>>>=7)?128:0),i&&(e.buf[e.pos++]=i&127)))))}function oh(i,e,t){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));t.realloc(n);for(var r=t.pos-1;r>=i;r--)t.buf[r+n]=t.buf[r]}function h_(i,e){for(var t=0;t<i.length;t++)e.writeVarint(i[t])}function c_(i,e){for(var t=0;t<i.length;t++)e.writeSVarint(i[t])}function d_(i,e){for(var t=0;t<i.length;t++)e.writeFloat(i[t])}function f_(i,e){for(var t=0;t<i.length;t++)e.writeDouble(i[t])}function g_(i,e){for(var t=0;t<i.length;t++)e.writeBoolean(i[t])}function p_(i,e){for(var t=0;t<i.length;t++)e.writeFixed32(i[t])}function m_(i,e){for(var t=0;t<i.length;t++)e.writeSFixed32(i[t])}function y_(i,e){for(var t=0;t<i.length;
9t++)e.writeFixed64(i[t])}function __(i,e){for(var t=0;t<i.length;t++)e.writeSFixed64(i[t])}function us(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16)+i[e+3]*16777216}function Cn(i,e,t){i[t]=e,i[t+1]=e>>>8,i[t+2]=e>>>16,i[t+3]=e>>>24}function ah(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16)+(i[e+3]<<24)}function v_(i,e,t){for(var n="",r=e;r<t;){var s=i[r],o=null,a=s>239?4:s>223?3:s>191?2:1;if(r+a>t)break;var l,u,h;a===1?s<128&&(o=s):a===2?(l=i[r+1],(l&192)===128&&(o=(s&31)<<6|l&63,o<=127&&(o=null))):a===3?(l=i[r+1],u=i[r+2],(l&192)===128&&(u&192)===128&&(o=(s&15)<<12|(l&63)<<6|u&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):a===4&&(l=i[r+1],u=i[r+2],h=i[r+3],(l&192)===128&&(u&192)===128&&(h&192)===128&&(o=(s&15)<<18|(l&63)<<12|(u&63)<<6|h&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,a=1):o>65535&&(o-=65536,n+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),n+=String.fromCharCode(o),r+=a}return n}function x_(i,e,t){return td.decode(i.subarray(e,t))}function E_(i,e,t){for(var n=0,r,s;n<e.length;n++){if(r=e.charCodeAt(n),r>55295&&r<57344)if(s)if(r<56320){i[t++]=239,i[t++]=191,i[t++]=189,s=r;continue}else r=s-55296<<10|r-56320|65536,s=null;else{r>56319||n+1===e.length?(i[t++]=239,i[t++]=191,i[t++]=189):s=r;continue}else s&&(i[t++]=239,i[t++]=191,i[t++]=189,s=null);r<128?i[t++]=r:(r<2048?i[t++]=r>>6|192:(r<65536?i[t++]=r>>12|224:(i[t++]=r>>18|240,i[t++]=r>>12&63|128),i[t++]=r>>6&63|128),i[t++]=r&63|128)}return t}const w_=n_(r_),lh=He();class Sr{constructor(e,t,n,r,s){this.styleFunction,this.extent_,this.id_=s,this.type_=e,this.flatCoordinates_=t,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=r}get(e){return this.properties_[e]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?Vh(this.flatCoordinates_):Ha(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const e=Lt(this.getExtent());this.flatInteriorPoints_=cl(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const e=$c(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=sc(this.flatCoordinates_,0,this.ends_,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=Ts(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const e=this.flatCoordinates_;let t=0;const n=this.ends_;for(let r=0,s=n.length;r<s;++r){const o=n[r],a=Ts(e,t,o,2,.5);Mt(this.flatMidpoints_,a),t=o}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(e){return this}simplifyTransformed(e,t){return this}getProperties(){return this.properties_}getStride(){return 2}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(e){e=le(e);const t=e.getExtent(),n=e.getWorldExtent();if(t&&n){const r=ke(n)/ke(t);pt(lh,n[0],n[3],r,-r,0,0,0),yi(this.flatCoordinates_,0,this.flatCoordinates_.length,2,lh,this.flatCoordinates_)}}getEnds(){return this.ends_}}Sr.prototype.getEndss=Sr.prototype.getEnds;Sr.prototype.getFlatCoordinates=Sr.prototype.getOrientedFlatCoordinates;const La=Sr;class C_ extends ed{constructor(e){super(),e=e||{},this.dataProjection=new Ja({code:"",units:"tile-pixels"}),this.featureClass_=e.featureClass?e.featureClass:La,this.geometryName_=e.geometryName,this.layerName_=e.layerName?e.layerName:"layer",this.layers_=e.layers?e.layers:null,this.idProperty_=e.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(e,t,n,r){e.pos=t.geometry;const s=e.readVarint()+e.pos;let o=1,a=0,l=0,u=0,h=0,c=0;for(;e.pos<s;){if(!a){const d=e.readVarint();o=d&7,a=d>>3}a--,o===1||o===2?(l+=e.readSVarint(),u+=e.readSVarint(),o===1&&h>c&&(r.push(h),c=h),n.push(l,u),h+=2):o===7?h>c&&(n.push(n[c],n[c+1]),h+=2):H(!1,59)}h>c&&(r.push(h),c=h)}createFeature_(e,t,n){const r=t.type;if(r===0)return null;let s;const o=t.properties;let a;this.idProperty_?(a=o[this.idProperty_],delete o[this.idProperty_]):a=t.id,o[this.layerName_]=t.layer.name;const l=[],u=[];this.readRawGeometry_(e,t,l,u);const h=S_(r,u.length);if(this.featureClass_===La)s=new this.featureClass_(h,l,u,o,a),s.transform(n.dataProjection);else{let c;if(h=="Polygon"){const g=Dg(l,u);c=g.length>1?new Qc(l,"XY",g):new Er(l,"XY",u)}else c=h==="Point"?new vr(l,"XY"):h==="LineString"?new bs(l,"XY"):h==="MultiPoint"?new Ol(l,"XY"):h==="MultiLineString"?new Jc(l,"XY",u):null;const d=this.featureClass_;s=new d,this.geometryName_&&s.setGeometryName(this.geometryName_);const f=Dl(c,!1,n);s.setGeometry(f),a!==void 0&&s.setId(a),s.setProperties(o,!0)}return s}getType(){return"arraybuffer"}readFeatures(e,t){const n=this.layers_;t=this.adaptOptions(t);const r=le(t.dataProjection);r.setWorldExtent(t.extent),t.dataProjection=r;const s=new w_(e),o=s.readFields(T_,{}),a=[];for(const l in o){if(n&&!n.includes(l))continue;const u=o[l],h=u?[0,0,u.extent,u.extent]:null;r.setExtent(h);for(let c=0,d=u.length;c<d;++c){const f=I_(s,u,c),g=this.createFeature_(s,f,t);g!==null&&a.push(g)}}return a}readProjection(e){return this.dataProjection}setLayers(e){this.layers_=e}}function T_(i,e,t){if(i===3){const n={keys:[],values:[],features:[]},r=t.readVarint()+t.pos;t.readFields(R_,n,r),n.length=n.features.length,n.length&&(e[n.name]=n)}}function R_(i,e,t){if(i===15)e.version=t.readVarint();else if(i===1)e.name=t.readString();else if(i===5)e.extent=t.readVarint();else if(i===2)e.features.push(t.pos);else if(i===3)e.keys.push(t.readString());else if(i===4){let n=null;const r=t.readVarint()+t.pos;for(;t.pos<r;)i=t.readVarint()>>3,n=i===1?t.readString():i===2?t.readFloat():i===3?t.readDouble():i===4?t.readVarint64():i===5?t.readVarint():i===6?t.readSVarint():i===7?t.readBoolean():null;e.values.push(n)}}function b_(i,e,t){if(i==1)e.id=t.readVarint();else if(i==2){const n=t.readVarint()+t.pos;for(;t.pos<n;){const r=e.layer.keys[t.readVarint()],s=e.layer.values[t.readVarint()];e.properties[r]=s}}else i==3?e.type=t.readVarint():i==4&&(e.geometry=t.pos)}function I_(i,e,t){i.pos=e.features[t];const n=i.readVarint()+i.pos,r={layer:e,type:0,properties:{}};return i.readFields(b_,r,n),r}function S_(i,e){let t;return i===1?t=e===1?"Point":"MultiPoint":i===2?t=e===1?"LineString":"MultiLineString":i===3&&(t="Polygon"),t}const M_=C_;function F_(i,e){const t=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,s=/\{-y\}/g;return function(o,a,l){if(o)return i.replace(t,o[0].toString()).replace(n,o[1].toString()).replace(r,o[2].toString()).replace(s,function(){const u=o[0],h=e.getFullTileRange(u);return H(h,55),(h.getHeight()-o[2]-1).toString()})}}function id(i,e){const t=i.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=F_(i[r],e);return P_(n)}function P_(i){return i.length===1?i[0]:function(e,t,n){if(!e)return;const r=Ly(e),s=On(r,i.length);
9return i[s](e,t,n)}}function nd(i){const e=[];let t=/\{([a-z])-([a-z])\}/.exec(i);if(t){const n=t[1].charCodeAt(0),r=t[2].charCodeAt(0);let s;for(s=n;s<=r;++s)e.push(i.replace(t[0],String.fromCharCode(s)));return e}if(t=/\{(\d+)-(\d+)\}/.exec(i),t){const n=parseInt(t[2],10);for(let r=parseInt(t[1],10);r<=n;r++)e.push(i.replace(t[0],r.toString()));return e}return e.push(i),e}class L_ extends Zn{constructor(e){e=e||{},super(e)}}const A_=L_;class k_ extends Il{constructor(e){super(e),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(e){const t=e.layerStatesArray[e.layerIndex],n=e.pixelRatio,r=e.viewState,s=r.resolution,o=this.getLayer().getSource(),a=e.viewHints;let l=e.extent;if(t.extent!==void 0&&(l=Zt(l,Yt(t.extent,r.projection))),!a[de.ANIMATING]&&!a[de.INTERACTING]&&!dn(l))if(o){const u=r.projection,h=o.getImage(l,s,n,u);h&&(this.loadImage(h)?this.image_=h:h.getState()===q.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(e){const t=this.frameState;if(!t)return null;const n=this.getLayer(),r=me(t.pixelToCoordinateTransform,e.slice()),s=n.getExtent();if(s&&!zr(s,r))return null;const o=this.image_.getExtent(),a=this.getImage(),l=oe(o),u=Math.floor(a.width*((r[0]-o[0])/l));if(u<0||u>=a.width)return null;const h=ke(o),c=Math.floor(a.height*((o[3]-r[1])/h));return c<0||c>=a.height?null:this.getImageData(a,u,c)}renderFrame(e,t){const n=this.image_,r=n.getExtent(),s=n.getResolution(),o=n.getPixelRatio(),a=e.layerStatesArray[e.layerIndex],l=e.pixelRatio,u=e.viewState,h=u.center,c=u.resolution,d=l*s/(c*o),f=e.extent,g=u.resolution,p=u.rotation,m=Math.round(oe(f)/g*l),_=Math.round(ke(f)/g*l);pt(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/l,1/l,p,-m/2,-_/2),to(this.inversePixelTransform,this.pixelTransform);const y=Ka(this.pixelTransform);this.useContainer(t,y,this.getBackground(e));const x=this.context,v=x.canvas;v.width!=m||v.height!=_?(v.width=m,v.height=_):this.containerReused||x.clearRect(0,0,m,_);let E=!1,R=!0;if(a.extent){const b=Yt(a.extent,u.projection);R=pe(b,e.extent),E=R&&!Vt(b,e.extent),E&&this.clipUnrotated(x,e,b)}const T=this.getImage(),C=pt(this.tempTransform,m/2,_/2,d,d,0,o*(r[0]-h[0])/s,o*(h[1]-r[3])/s);this.renderedResolution=s*l/o;const I=T.width*C[0],P=T.height*C[3];if(this.getLayer().getSource().getInterpolate()||(x.imageSmoothingEnabled=!1),this.preRender(x,e),R&&I>=.5&&P>=.5){const b=C[4],G=C[5],j=a.opacity;let J;j!==1&&(J=x.globalAlpha,x.globalAlpha=j),x.drawImage(T,0,0,+T.width,+T.height,b,G,I,P),j!==1&&(x.globalAlpha=J)}return this.postRender(x,e),E&&x.restore(),x.imageSmoothingEnabled=!0,y!==v.style.transform&&(v.style.transform=y),this.container}}const O_=k_;class D_ extends A_{constructor(e){super(e)}createRenderer(){return new O_(this)}getData(e){return super.getData(e)}}const rd=D_,sd=.5,z_=10,uh=.25;class N_{constructor(e,t,n,r,s,o){this.sourceProj_=e,this.targetProj_=t;let a={};const l=ws(this.targetProj_,this.sourceProj_);this.transformInv_=function(y){const x=y[0]+"/"+y[1];return a[x]||(a[x]=l(y)),a[x]},this.maxSourceExtent_=r,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&oe(r)>=oe(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?oe(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?oe(this.targetProj_.getExtent()):null;const u=ei(n),h=ro(n),c=no(n),d=io(n),f=this.transformInv_(u),g=this.transformInv_(h),p=this.transformInv_(c),m=this.transformInv_(d),_=z_+(o?Math.max(0,Math.ceil(Math.log2(ga(n)/(o*o*256*256)))):0);if(this.addQuad_(u,h,c,d,f,g,p,m,_),this.wrapsXInSource_){let y=1/0;this.triangles_.forEach(function(x,v,E){y=Math.min(y,x.source[0][0],x.source[1][0],x.source[2][0])}),this.triangles_.forEach(x=>{if(Math.max(x.source[0][0],x.source[1][0],x.source[2][0])-y>this.sourceWorldWidth_/2){const v=[[x.source[0][0],x.source[0][1]],[x.source[1][0],x.source[1][1]],[x.source[2][0],x.source[2][1]]];v[0][0]-y>this.sourceWorldWidth_/2&&(v[0][0]-=this.sourceWorldWidth_),v[1][0]-y>this.sourceWorldWidth_/2&&(v[1][0]-=this.sourceWorldWidth_),v[2][0]-y>this.sourceWorldWidth_/2&&(v[2][0]-=this.sourceWorldWidth_);const E=Math.min(v[0][0],v[1][0],v[2][0]);Math.max(v[0][0],v[1][0],v[2][0])-E<this.sourceWorldWidth_/2&&(x.source=v)}})}a={}}addTriangle_(e,t,n,r,s,o){this.triangles_.push({source:[r,s,o],target:[e,t,n]})}addQuad_(e,t,n,r,s,o,a,l,u){const h=da([s,o,a,l]),c=this.sourceWorldWidth_?oe(h)/this.sourceWorldWidth_:null,d=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&c>.5&&c<1;let g=!1;if(u>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const m=da([e,t,n,r]);g=oe(m)/this.targetWorldWidth_>uh||g}!f&&this.sourceProj_.isGlobal()&&c&&(g=c>uh||g)}if(!g&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3])&&!pe(h,this.maxSourceExtent_))return;let p=0;if(!g&&(!isFinite(s[0])||!isFinite(s[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(u>0)g=!0;else if(p=(!isFinite(s[0])||!isFinite(s[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),p!=1&&p!=2&&p!=4&&p!=8)return}if(u>0){if(!g){const m=[(e[0]+n[0])/2,(e[1]+n[1])/2],_=this.transformInv_(m);let y;f?y=(On(s[0],d)+On(a[0],d))/2-On(_[0],d):y=(s[0]+a[0])/2-_[0];const x=(s[1]+a[1])/2-_[1];g=y*y+x*x>this.errorThresholdSquared_}if(g){if(Math.abs(e[0]-n[0])<=Math.abs(e[1]-n[1])){const m=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(m),y=[(r[0]+e[0])/2,(r[1]+e[1])/2],x=this.transformInv_(y);this.addQuad_(e,t,m,y,s,o,_,x,u-1),this.addQuad_(y,m,n,r,x,_,a,l,u-1)}else{const m=[(e[0]+t[0])/2,(e[1]+t[1])/2],_=this.transformInv_(m),y=[(n[0]+r[0])/2,(n[1]+r[1])/2],x=this.transformInv_(y);this.addQuad_(e,m,y,r,s,_,x,l,u-1),this.addQuad_(m,t,n,y,_,o,a,x,u-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}p&11||this.addTriangle_(e,n,r,s,a,l),p&14||this.addTriangle_(e,n,t,s,a,o),p&&(p&13||this.addTriangle_(t,r,e,o,l,s),p&7||this.addTriangle_(t,r,n,o,l,a))}calculateSourceExtent(){const e=at();return this.triangles_.forEach(function(t,n,r){const s=t.source;dr(e,s[0]),dr(e,s[1]),dr(e,s[2])}),e}getTriangles(){return this.triangles_}}const od=N_;let Zo;const Dn=[];function hh(i,e,t,n,r){i.beginPath(),i.moveTo(0,0),i.lineTo(e,t),i.lineTo(n,r),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(e,n)+1,Math.max(t,r)),i.restore(
9)}function Uo(i,e){return Math.abs(i[e*4]-210)>2||Math.abs(i[e*4+3]-.75*255)>2}function G_(){if(Zo===void 0){const i=we(6,6,Dn);i.globalCompositeOperation="lighter",i.fillStyle="rgba(210, 0, 0, 0.75)",hh(i,4,5,4,0),hh(i,4,5,0,5);const e=i.getImageData(0,0,3,3).data;Zo=Uo(e,0)||Uo(e,4)||Uo(e,8),Gr(i),Dn.push(i.canvas)}return Zo}function Aa(i,e,t,n){const r=$h(t,e,i);let s=Tu(e,n,t);const o=e.getMetersPerUnit();o!==void 0&&(s*=o);const a=i.getMetersPerUnit();a!==void 0&&(s/=a);const l=i.getExtent();if(!l||zr(l,r)){const u=Tu(i,s,r)/s;isFinite(u)&&u>0&&(s/=u)}return s}function j_(i,e,t,n){const r=Lt(t);let s=Aa(i,e,r,n);return(!isFinite(s)||s<=0)&&Zh(t,function(o){return s=Aa(i,e,o,n),isFinite(s)&&s>0}),s}function ad(i,e,t,n,r,s,o,a,l,u,h,c){const d=we(Math.round(t*i),Math.round(t*e),Dn);if(c||(d.imageSmoothingEnabled=!1),l.length===0)return d.canvas;d.scale(t,t);function f(v){return Math.round(v*t)/t}d.globalCompositeOperation="lighter";const g=at();l.forEach(function(v,E,R){Yh(g,v.extent)});const p=oe(g),m=ke(g),_=we(Math.round(t*p/n),Math.round(t*m/n),Dn);c||(_.imageSmoothingEnabled=!1);const y=t/n;l.forEach(function(v,E,R){const T=v.extent[0]-g[0],C=-(v.extent[3]-g[3]),I=oe(v.extent),P=ke(v.extent);v.image.width>0&&v.image.height>0&&_.drawImage(v.image,u,u,v.image.width-2*u,v.image.height-2*u,T*y,C*y,I*y,P*y)});const x=ei(o);
9return a.getTriangles().forEach(function(v,E,R){const T=v.source,C=v.target;let I=T[0][0],P=T[0][1],b=T[1][0],G=T[1][1],j=T[2][0],J=T[2][1];const A=f((C[0][0]-x[0])/s),z=f(-(C[0][1]-x[1])/s),S=f((C[1][0]-x[0])/s),N=f(-(C[1][1]-x[1])/s),te=f((C[2][0]-x[0])/s),Y=f(-(C[2][1]-x[1])/s),ue=I,w=P;I=0,P=0,b-=ue,G-=w,j-=ue,J-=w;const ne=[[b,G,0,0,S-A],[j,J,0,0,te-A],[0,0,b,G,N-z],[0,0,j,J,Y-z]],M=og(ne);if(M){if(d.save(),d.beginPath(),G_()||!c){d.moveTo(S,N);const L=4,re=A-S,_e=z-N;for(let ce=0;ce<L;ce++)d.lineTo(S+f((ce+1)*re/L),N+f(ce*_e/(L-1))),ce!=L-1&&d.lineTo(S+f((ce+1)*re/L),N+f((ce+1)*_e/(L-1)));d.lineTo(te,Y)}else d.moveTo(S,N),d.lineTo(A,z),d.lineTo(te,Y);d.clip(),d.transform(M[0],M[2],M[1],M[3],A,z),d.translate(g[0]-ue,g[3]-w),d.scale(n/t,-n/t),d.drawImage(_.canvas,0,0),d.restore()}}),Gr(_),Dn.push(_.canvas),h&&(d.save(),d.globalCompositeOperation="source-over",d.strokeStyle="black",d.lineWidth=1,a.getTriangles().forEach(function(v,E,R){const T=v.target,C=(T[0][0]-x[0])/s,I=-(T[0][1]-x[1])/s,P=(T[1][0]-x[0])/s,b=-(T[1][1]-x[1])/s,G=(T[2][0]-x[0])/s,j=-(T[2][1]-x[1])/s;d.beginPath(),d.moveTo(P,b),d.lineTo(C,I),d.lineTo(G,j),d.closePath(),d.stroke()}),d.restore()),d.canvas}class X_ extends bc{constructor(e,t,n,r,s,o,a){let l=e.getExtent();l&&e.canWrapX()&&(l=l.slice(),l[0]=-1/0,l[2]=1/0);let u=t.getExtent();u&&t.canWrapX()&&(u=u.slice(),u[0]=-1/0,u[2]=1/0);const h=u?Zt(n,u):n,c=Lt(h),d=Aa(e,t,c,r),f=sd,g=new od(e,t,h,l,d*f,r),p=g.calculateSourceExtent(),m=dn(p)?null:o(p,d,s),_=m?q.IDLE:q.EMPTY,y=m?m.getPixelRatio():1;super(n,r,y,_),this.targetProj_=t,this.maxSourceExtent_=l,this.triangulation_=g,this.targetResolution_=r,this.targetExtent_=n,this.sourceImage_=m,this.sourcePixelRatio_=y,this.interpolate_=a,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==q.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const e=this.sourceImage_.getState();if(e==q.LOADED){const t=oe(this.targetExtent_)/this.targetResolution_,n=ke(this.targetExtent_)/this.targetResolution_;this.canvas_=ad(t,n,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=e,this.changed()}load(){if(this.state==q.IDLE){this.state=q.LOADING,this.changed();const e=this.sourceImage_.getState();e==q.LOADED||e==q.ERROR?this.reproject_():(this.sourceListenerKey_=ie(this.sourceImage_,B.CHANGE,function(t){const n=this.sourceImage_.getState();(n==q.LOADED||n==q.ERROR)&&(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}}unlistenSource_(){he(this.sourceListenerKey_),this.sourceListenerKey_=null}}const W_=X_,Ko={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"};class V_ extends mt{constructor(e,t){super(e),this.image=t}}class Y_ extends Un{constructor(e){super({attributions:e.attributions,projection:e.projection,state:e.state,interpolate:e.interpolate!==void 0?e.interpolate:!0}),this.on,this.once,this.un,this.resolutions_=e.resolutions!==void 0?e.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0}getResolutions(){return this.resolutions_}setResolutions(e){this.resolutions_=e}findNearestResolution(e){const t=this.getResolutions();if(t){const n=Js(t,e,0);e=t[n]}return e}getImage(e,t,n,r){const s=this.getProjection();if(!s||!r||Rt(s,r))return s&&(r=s),this.getImageInternal(e,t,n,r);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Rt(this.reprojectedImage_.getProjection(),r)&&this.reprojectedImage_.getResolution()==t&&$t(this.reprojectedImage_.getExtent(),e))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new W_(s,r,e,t,n,(o,a,l)=>this.getImageInternal(o,a,l,s),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(e,t,n,r){return W()}handleImageChange(e){const t=e.target;let n;switch(t.getState()){case q.LOADING:this.loading=!0,n=Ko.IMAGELOADSTART;break;case q.LOADED:this.loading=!1,n=Ko.IMAGELOADEND;break;case q.ERROR:this.loading=!1,n=Ko.IMAGELOADERROR;break;default:return}this.hasListener(n)&&this.dispatchEvent(new V_(n,t))}}const ld=Y_,pi={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class B_ extends Zn{constructor(e){e=e||{};const t=Object.assign({},e);delete t.preload,delete t.useInterimTilesOnError,super(t),this.on,this.once,this.un,this.setPreload(e.preload!==void 0?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0)}getPreload(){return this.get(pi.PRELOAD)}setPreload(e){this.set(pi.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(pi.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(pi.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}const Z_=B_;class U_ extends co{constructor(e,t,n,r,s,o,a,l,u,h,c,d){super(s,k.IDLE,{interpolate:!!d}),this.renderEdges_=c!==void 0?c:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=t,this.targetTileGrid_=r,this.wrappedTileCoord_=o||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const f=r.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let p=this.sourceTileGrid_.getExtent();const m=g?Zt(f,g):f;if(ga(m)===0){this.state=k.EMPTY;return}const _=e.getExtent();_&&(p?p=Zt(p,_):p=_);const y=r.getResolution(this.wrappedTileCoord_[0]),x=j_(e,n,m,y);if(!isFinite(x)||x<=0){this.state=k.EMPTY;return}const v=h!==void 0?h:sd;if(this.triangulation_=new od(e,n,m,p,x*v,y),this.triangulation_.getTr
9iangles().length===0){this.state=k.EMPTY;return}this.sourceZ_=t.getZForResolution(x);let E=this.triangulation_.calculateSourceExtent();if(p&&(e.canWrapX()?(E[1]=ye(E[1],p[1],p[3]),E[3]=ye(E[3],p[1],p[3])):E=Zt(E,p)),!ga(E))this.state=k.EMPTY;else{const R=t.getTileRangeForExtentAndZ(E,this.sourceZ_);for(let T=R.minX;T<=R.maxX;T++)for(let C=R.minY;C<=R.maxY;C++){const I=u(this.sourceZ_,T,C,a);I&&this.sourceTiles_.push(I)}this.sourceTiles_.length===0&&(this.state=k.EMPTY)}}getImage(){return this.canvas_}reproject_(){const e=[];if(this.sourceTiles_.forEach(t=>{t&&t.getState()==k.LOADED&&e.push({extent:this.sourceTileGrid_.getTileCoordExtent(t.tileCoord),image:t.getImage()})}),this.sourceTiles_.length=0,e.length===0)this.state=k.ERROR;else{const t=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(t),r=typeof n=="number"?n:n[0],s=typeof n=="number"?n:n[1],o=this.targetTileGrid_.getResolution(t),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=ad(r,s,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=k.LOADED}this.changed()}load(){if(this.state==k.IDLE){this.state=k.LOADING,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(t=>{const n=t.getState();if(n==k.IDLE||n==k.LOADING){e++;const r=ie(t,B.CHANGE,function(s){const o=t.getState();(o==k.LOADED||o==k.ERROR||o==k.EMPTY)&&(he(r),e--,e===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(r)}}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(t,n,r){t.getState()==k.IDLE&&t.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(he),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Gr(this.canvas_.getContext("2d")),Dn.push(this.canvas_),this.canvas_=null),super.release()}}const ka=U_;class K_ extends Il{constructor(e){super(e),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=at(),this.tmpTileRange_=new Hc(0,0,0,0)}isDrawableTile(e){const t=this.getLayer(),n=e.getState(),r=t.getUseInterimTilesOnError();return n==k.LOADED||n==k.EMPTY||n==k.ERROR&&!r}getTile(e,t,n,r){const s=r.pixelRatio,o=r.viewState.projection,a=this.getLayer();let u=a.getSource().getTile(e,t,n,s,o);return u.getState()==k.ERROR&&a.getUseInterimTilesOnError()&&a.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(u)||(u=u.getInterimTile()),u}getData(e){const t=this.frameState;if(!t)return null;const n=this.getLayer(),r=me(t.pixelToCoordinateTransform,e.slice()),s=n.getExtent();if(s&&!zr(s,r))return null;const o=t.pixelRatio,a=t.viewState.projection,l=t.viewState,u=n.getRenderSource(),h=u.getTileGridForProjection(l.projection),c=u.getTilePixelRatio(t.pixelRatio);for(let d=h.getZForResolution(l.resolution);d>=h.getMinZoom();--d){const f=h.getTileCoordForCoordAndZ(r,d),g=u.getTile(d,f[1],f[2],o,a);if(!(g instanceof zc||g instanceof ka)||g instanceof ka&&g.getState()===k.EMPTY)return null;if(g.getState()!==k.LOADED)continue;const p=h.getOrigin(d),m=qe(h.getTileSize(d)),_=h.getResolution(d),y=Math.floor(c*((r[0]-p[0])/_-f[1]*m[0])),x=Math.floor(c*((p[1]-r[1])/_-f[2]*m[1])),v=Math.round(c*u.getGutterForProjection(l.projection));return this.getImageData(g.getImage(),y+v,x+v)}return null}loadedTileCallback(e,t,n){return this.isDrawableTile(n)?super.loadedTileCallback(e,t,n):!1}prepareFrame(e){return!!this.getLayer().getSource()}renderFrame(e,t){const n=e.layerStatesArray[e.layerIndex],r=e.viewState,s=r.projection,o=r.resolution,a=r.center,l=r.rotation,u=e.pixelRatio,h=this.getLayer(),c=h.getSource(),d=c.getRevision(),f=c.getTileGridForProjection(s),g=f.getZForResolution(o,c.zDirection),p=f.getResolution(g);let m=e.extent;const _=e.viewState.resolution,y=c.getTilePixelRatio(u),x=Math.round(oe(m)/_*u),v=Math.round(ke(m)/_*u),E=n.extent&&Yt(n.extent);E&&(m=Zt(m,Yt(n.extent)));const R=p*x/2/y,T=p*v/2/y,C=[a[0]-R,a[1]-T,a[0]+R,a[1]+T],I=f.getTileRangeForExtentAndZ(m,g),P={};P[g]={};const b=this.createLoadedTileFinder(c,s,P),G=this.tmpExtent,j=this.tmpTileRange_;this.newTiles_=!1;
9const J=l?ma(r.center,_,l,e.size):void 0;for(let ne=I.minX;ne<=I.maxX;++ne)for(let M=I.minY;M<=I.maxY;++M){if(l&&!f.tileCoordIntersectsViewport([g,ne,M],J))continue;const L=this.getTile(g,ne,M,e);if(this.isDrawableTile(L)){const ce=Z(this);if(L.getState()==k.LOADED){P[g][L.tileCoord.toString()]=L;let Se=L.inTransition(ce);Se&&n.opacity!==1&&(L.endTransition(ce),Se=!1),!this.newTiles_&&(Se||!this.renderedTiles.includes(L))&&(this.newTiles_=!0)}if(L.getAlpha(ce,e.time)===1)continue}const re=f.getTileCoordChildTileRange(L.tileCoord,j,G);let _e=!1;re&&(_e=b(g+1,re)),_e||f.forEachTileCoordParentTileRange(L.tileCoord,b,j,G)}const A=p/o*u/y;pt(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/u,1/u,l,-x/2,-v/2);const z=Ka(this.pixelTransform);this.useContainer(t,z,this.getBackground(e));const S=this.context,N=S.canvas;to(this.inversePixelTransform,this.pixelTransform),pt(this.tempTransform,x/2,v/2,A,A,0,-x/2,-v/2),N.width!=x||N.height!=v?(N.width=x,N.height=v):this.containerReused||S.clearRect(0,0,x,v),E&&this.clipUnrotated(S,e,E),c.getInterpolate()||(S.imageSmoothingEnabled=!1),this.preRender(S,e),this.renderedTiles.length=0;let te=Object.keys(P).map(Number);te.sort(Zi);let Y,ue,w;n.opacity===1&&(!this.containerReused||c.getOpaque(e.viewState.projection))?te=te.reverse():(Y=[],ue=[]);for(let ne=te.length-1;ne>=0;--ne){const M=te[ne],L=c.getTilePixelSize(M,u,s),_e=f.getResolution(M)/p,ce=L[0]*_e*A,Se=L[1]*_e*A,O=f.getTileCoordForCoordAndZ(ei(C),M),bi=f.getTileCoordExtent(O),tt=me(this.tempTransform,[y*(bi[0]-C[0])/p,y*(C[3]-bi[3])/p]),it=y*c.getGutterForProjection(s),lt=P[M];for(const Me in lt){const Ce=lt[Me],At=Ce.tileCoord,Ne=O[1]-At[1],Xe=Math.round(tt[0]-(Ne-1)*ce),D=O[2]-At[2],_t=Math.round(tt[1]-(D-1)*Se),ve=Math.round(tt[0]-Ne*ce),Oe=Math.round(tt[1]-D*Se),We=Xe-ve,Ve=_t-Oe,Ge=g===M,vt=Ge&&Ce.getAlpha(Z(this),e.time)!==1;let nt=!1;if(!vt)if(Y){w=[ve,Oe,ve+We,Oe,ve+We,Oe+Ve,ve,Oe+Ve];for(let xt=0,kt=Y.length;xt<kt;++xt)if(g!==M&&M<ue[xt]){const Q=Y[xt];pe([ve,Oe,ve+We,Oe+Ve],[Q[0],Q[3],Q[4],Q[7]])&&(nt||(S.save(),nt=!0),S.beginPath(),S.moveTo(w[0],w[1]),S.lineTo(w[2],w[3]),S.lineTo(w[4],w[5]),S.lineTo(w[6],w[7]),S.moveTo(Q[6],Q[7]),S.lineTo(Q[4],Q[5
9]),S.lineTo(Q[2],Q[3]),S.lineTo(Q[0],Q[1]),S.clip())}Y.push(w),ue.push(M)}else S.clearRect(ve,Oe,We,Ve);this.drawTileImage(Ce,e,ve,Oe,We,Ve,it,Ge),Y&&!vt?(nt&&S.restore(),this.renderedTiles.unshift(Ce)):this.renderedTiles.push(Ce),this.updateUsedTiles(e.usedTiles,c,Ce)}}return this.renderedRevision=d,this.renderedResolution=p,this.extentChanged=!this.renderedExtent_||!$t(this.renderedExtent_,C),this.renderedExtent_=C,this.renderedPixelRatio=u,this.renderedProjection=s,this.manageTilePyramid(e,c,f,u,s,m,g,h.getPreload()),this.scheduleExpireCache(e,c),this.postRender(S,e),n.extent&&S.restore(),S.imageSmoothingEnabled=!0,z!==N.style.transform&&(N.style.transform=z),this.container}drawTileImage(e,t,n,r,s,o,a,l){const u=this.getTileImage(e);if(!u)return;const h=Z(this),c=t.layerStatesArray[t.layerIndex],d=c.opacity*(l?e.getAlpha(h,t.time):1),f=d!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=d),this.context.drawImage(u,a,a,u.width-2*a,u.height-2*a,n,r,s,o),f&&this.context.restore(),d!==c.opacity?t.animate=!0:l&&e.endTransition(h)}getImage(){const e=this.context;return e?e.canvas:null}getTileImage(e){return e.getImage()}scheduleExpireCache(e,t){if(t.canExpireCache()){const n=(function(r,s,o){const a=Z(r);a in o.usedTiles&&r.expireCache(o.viewState.projection,o.usedTiles[a])}).bind(null,t);e.postRenderFunctions.push(n)}}updateUsedTiles(e,t,n){const r=Z(t);r in e||(e[r]={}),e[r][n.getKey()]=!0}manageTilePyramid(e,t,n,r,s,o,a,l,u){const h=Z(t);h in e.wantedTiles||(e.wantedTiles[h]={});const c=e.wantedTiles[h],d=e.tileQueue,f=n.getMinZoom(),g=e.viewState.rotation,p=g?ma(e.viewState.center,e.viewState.resolution,g,e.size):void 0;let m=0,_,y,x,v,E,R;for(R=f;R<=a;++R)for(y=n.getTileRangeForExtentAndZ(o,R,y),x=n.getResolution(R),v=y.minX;v<=y.maxX;++v)for(E=y.minY;E<=y.maxY;++E)g&&!n.tileCoordIntersectsViewport([R,v,E],p)||(a-R<=l?(++m,_=t.getTile(R,v,E,r,s),_.getState()==k.IDLE&&(c[_.getKey()]=!0,d.isKeyQueued(_.getKey())||d.enqueue([_,h,n.getTileCoordCenter(_.tileCoord),x])),u!==void 0&&u(_)):t.useTile(R,v,E,s));t.updateCacheSize(m,s)}}const ud=K_;class q_ extends Z_{constructor(e){super(e)}createRenderer(){return new ud(this)}}const hd=q_,Tn=[0,0,0],li=5;class H_{constructor(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,H(Rf(this.resolutions_,function(r,s){return s-r},!0),17);let t;if(!e.origins){for(let r=0,s=this.resolutions_.length-1;r<s;++r)if(!t)t=this.resolutions_[r]/this.resolutions_[r+1];else if(this.resolutions_[r]/this.resolutions_[r+1]!==t){t=void 0;break}}this.zoomFactor_=t,this.maxZoom=this.resolutions_.length-1,this.origin_=e.origin!==void 0?e.origin:null,this.origins_=null,e.origins!==void 0&&(this.origins_=e.origins,H(this.origins_.length==this.resolutions_.length,20));const n=e.extent;n!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=ei(n)),H(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,e.tileSizes!==void 0&&(this.tileSizes_=e.tileSizes,H(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=e.tileSize!==void 0?e.tileSize:this.tileSizes_?null:El,H(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=n!==void 0?n:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],e.sizes!==void 0?this.fullTileRanges_=e.sizes.map(function(r,s){const o=new Hc(Math.min(0,r[0]),Math.max(r[0]-1,-1),Math.min(0,r[1]),Math.max(r[1]-1,-1));if(n){const a=this.getTileRangeForExtentAndZ(n,s);o.minX=Math.max(a.minX,o.minX),o.maxX=Math.min(a.maxX,o.maxX),o.minY=Math.max(a.minY,o.minY),o.maxY=Math.min(a.maxY,o.maxY)}return o},this):n&&this.calculateTileRanges_(n)}forEachTileCoord(e,t,n){const r=this.getTileRangeForExtentAndZ(e,t);for(let s=r.minX,o=r.maxX;s<=o;++s)for(let a=r.minY,l=r.maxY;a<=l;++a)n([t,s,a])}forEachTileCoordParentTileRange(e,t,n,r){let s,o,a,l=null,u=e[0]-1;for(this.zoomFactor_===2?(o=e[1],a=e[2]):l=this.getTileCoordExtent(e,r);u>=this.minZoom;){if(this.zoomFactor_===2?(o=Math.floor(o/2),a=Math.floor(a/2),s=En(o,o,a,a,n)):s=this.getTileRangeForExtentAndZ(l,u,n),t(u,s))return!0;--u}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(e){return this.origin_?this.origin_:this.origins_[e]}getResolution(e){return this.resolutions_[e]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(e,t,n){if(e[0]<this.maxZoom){if(this.zoomFactor_===2){const s=e[1]*2,o=e[2]*2;return En(s,s+1,o,o+1,t)}const r=this.getTileCoordExtent(e,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(r,e[0]+1,t)}return null}
9getTileRangeForTileCoordAndZ(e,t,n){if(t>this.maxZoom||t<this.minZoom)return null;const r=e[0],s=e[1],o=e[2];if(t===r)return En(s,o,s,o,n);if(this.zoomFactor_){const l=Math.pow(this.zoomFactor_,t-r),u=Math.floor(s*l),h=Math.floor(o*l);if(t<r)return En(u,u,h,h,n);const c=Math.floor(l*(s+1))-1,d=Math.floor(l*(o+1))-1;return En(u,c,h,d,n)}const a=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,t,n)}getTileRangeForExtentAndZ(e,t,n){this.getTileCoordForXYAndZ_(e[0],e[3],t,!1,Tn);const r=Tn[1],s=Tn[2];this.getTileCoordForXYAndZ_(e[2],e[1],t,!0,Tn);const o=Tn[1],a=Tn[2];return En(r,o,s,a,n)}getTileCoordCenter(e){const t=this.getOrigin(e[0]),n=this.getResolution(e[0]),r=qe(this.getTileSize(e[0]),this.tmpSize_);return[t[0]+(e[1]+.5)*r[0]*n,t[1]-(e[2]+.5)*r[1]*n]}getTileCoordExtent(e,t){const n=this.getOrigin(e[0]),r=this.getResolution(e[0]),s=qe(this.getTileSize(e[0]),this.tmpSize_),o=n[0]+e[1]*s[0]*r,a=n[1]-(e[2]+1)*s[1]*r,l=o+s[0]*r,u=a+s[1]*r;return Jt(o,a,l,u,t)}getTileCoordForCoordAndResolution(e,t,n){return this.getTileCoordForXYAndResolution_(e[0],e[1],t,!1,n)}getTileCoordForXYAndResolution_(e,t,n,r,s){const o=this.getZForResolution(n),a=n/this.getResolution(o),l=this.getOrigin(o),u=qe(this.getTileSize(o),this.tmpSize_);let h=a*(e-l[0])/n/u[0],c=a*(l[1]-t)/n/u[1];return r?(h=es(h,li)-1,c=es(c,li)-1):(h=Qr(h,li),c=Qr(c,li)),ih(o,h,c,s)}getTileCoordForXYAndZ_(e,t,n,r,s){const o=this.getOrigin(n),a=this.getResolution(n),l=qe(this.getTileSize(n),this.tmpSize_);let u=(e-o[0])/a/l[0],h=(o[1]-t)/a/l[1];return r?(u=es(u,li)-1,h=es(h,li)-1):(u=Qr(u,li),h=Qr(h,li)),ih(n,u,h,s)}getTileCoordForCoordAndZ(e,t,n){return this.getTileCoordForXYAndZ_(e[0],e[1],t,!1,n)}getTileCoordResolution(e){return this.resolutions_[e[0]]}getTileSize(e){return this.tileSize_?this.tileSize_:this.tileSizes_[e]}getFullTileRange(e){return this.fullTileRanges_?this.fullTileRanges_[e]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,e):null}getZForResolution(e,t){const n=Js(this.resolutions_,e,t||0);return ye(n,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(e,t){return ac(t,0,t.length,2,this.getTileCoordExtent(e))}calculateTileRanges_(e){const t=this.resolutions_.length,n=new Array(t);for(let r=this.minZoom;r<t;++r)n[r]=this.getTileRangeForExtentAndZ(e,r);this.fullTileRanges_=n}}const go=H_;function cd(i){let e=i.getDefaultTileGrid();return e||(e=Q_(i),i.setDefaultTileGrid(e)),e}function J_(i,e,t){const n=e[0],r=i.getTileCoordCenter(e),s=po(t);if(!zr(s,r)){const o=oe(s),a=Math.ceil((s[0]-r[0])/o);return r[0]+=o*a,i.getTileCoordForCoordAndZ(r,n)}return e}function $_(i,e,t,n){n=n!==void 0?n:"top-left";const r=dd(i,e,t);return new go({extent:i,origin:Yf(i,n),resolutions:r,tileSize:t})}function Nl(i){const e=i||{},t=e.extent||le("EPSG:3857").getExtent(),n={extent:t,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:dd(t,e.maxZoom,e.tileSize,e.maxResolution)};return new go(n)}function dd(i,e,t,n){e=e!==void 0?e:wc,t=qe(t!==void 0?t:El);const r=ke(i),s=oe(i);n=n>0?n:Math.max(s/t[0],r/t[1]);const o=e+1,a=new Array(o);for(let l=0;l<o;++l)a[l]=n/Math.pow(2,l);return a}function Q_(i,e,t,n){const r=po(i);return $_(r,e,t,n)}function po(i){i=le(i);let e=i.getExtent();if(!e){const t=180*Ci.degrees/i.getMetersPerUnit();e=Jt(-t,-t,t,t)}return e}class e0 extends Un{constructor(e){super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate}),this.on,this.once,this.un,this.opaque_=e.opaque!==void 0?e.opaque:!1,this.tilePixelRatio_=e.tilePixelRatio!==void 0?e.tilePixelRatio:1,this.tileGrid=e.tileGrid!==void 0?e.tileGrid:null;const t=[256,256];this.tileGrid&&qe(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),t),this.tileCache=new Al(e.cacheSize||0),this.tmpSize=[0,0],this.key_=e.key||"",this.tileOptions={transition:e.transition,interpolate:e.interpolate},this.zDirection=e.zDirection?e.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(e,t){const n=this.getTileCacheForProjection(e);n&&n.expireCache(t)}forEachLoadedTile(e,t,n,r){const s=this.getTileCacheForProjection(e);if(!s)return!1;let o=!0,a,l,u;for(let h=n.minX;h<=n.maxX;++h)for(let c=n.minY;c<=n.maxY;
9++c)l=Kn(t,h,c),u=!1,s.containsKey(l)&&(a=s.get(l),u=a.getState()===k.LOADED,u&&(u=r(a)!==!1)),u||(o=!1);return o}getGutterForProjection(e){return 0}getKey(){return this.key_}setKey(e){this.key_!==e&&(this.key_=e,this.changed())}getOpaque(e){return this.opaque_}getResolutions(e){const t=e?this.getTileGridForProjection(e):this.tileGrid;return t?t.getResolutions():null}getTile(e,t,n,r,s){return W()}getTileGrid(){return this.tileGrid}getTileGridForProjection(e){return this.tileGrid?this.tileGrid:cd(e)}getTileCacheForProjection(e){const t=this.getProjection();return H(t===null||Rt(t,e),68),this.tileCache}getTilePixelRatio(e){return this.tilePixelRatio_}getTilePixelSize(e,t,n){const r=this.getTileGridForProjection(n),s=this.getTilePixelRatio(t),o=qe(r.getTileSize(e),this.tmpSize);return s==1?o:Ng(o,s,this.tmpSize)}getTileCoordForTileUrlFunction(e,t){t=t!==void 0?t:this.getProjection();const n=this.getTileGridForProjection(t);return this.getWrapX()&&t.isGlobal()&&(e=J_(n,e,t)),Ay(e,n)?e:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(e,t){const n=this.getTileCacheForProjection(t);e>n.highWaterMark&&(n.highWaterMark=e)}useTile(e,t,n,r){}}class t0 extends mt{constructor(e,t){super(e),this.tile=t}}const fd=e0;let gd=!0;try{new ImageData(10,10)}catch{gd=!1}let qo;function i0(i,e,t){if(gd)return new ImageData(i,e,t);qo||(qo=document.createElement("canvas").getContext("2d"));const n=qo.createImageData(e,t);return n.data.set(i),n}function pd(i){let e=!0;try{new ImageData(10,10)}catch{e=!1}function t(n,r,s){return e?new ImageData(n,r,s):{data:n,width:r,height:s}}return function(n){const r=n.buffers,s=n.meta,o=n.imageOps,a=n.width,l=n.height,u=r.length,h=r[0].byteLength;if(o){const g=new Array(u);for(let m=0;m<u;++m)g[m]=t(new Uint8ClampedArray(r[m]),a,l);return i(g,s).data.buffer}const c=new Uint8ClampedArray(h),d=new Array(u),f=new Array(u);for(let g=0;g<u;++g)d[g]=new Uint8ClampedArray(r[g]),f[g]=[0,0,0,0];for(let g=0;g<h;g+=4){for(let m=0;m<u;++m){const _=d[m];f[m][0]=_[g],f[m][1]=_[g+1],f[m][2]=_[g+2],f[m][3]=_[g+3]}const p=i(f,s);c[g]=p[0],c[g+1]=p[1],c[g+2]=p[2],c[g+3]=p[3]}return c.buffer}}function n0(i,e){const n=Object.keys(i.lib||{}).map(function(s){return"const "+s+" = "+i.lib[s].toString()+";"}).concat(["const __minion__ = ("+pd.toString()+")(",i.operation.toString(),");",'self.addEventListener("message", function(event) {',"  const buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),r=new Worker(typeof Blob>"u"?"data:text/javascript;base64,"+Buffer.from(n.join(`
10`),"binary").toString("base64"):URL.createObjectURL(new Blob(n,{type:"text/javascript"})));return r.addEventListener("message",e),r}function r0(i,e){const t=pd(i.operation);let n=!1;return{postMessage:function(r){setTimeout(function(){n||e({data:{buffer:t(r),meta:r.meta}})},0)},terminate:function(){n=!0}}}class s0 extends Hs{constructor(e){super(),this._imageOps=!!e.imageOps;let t;e.threads===0?t=0:this._imageOps?t=1:t=e.threads||1;const n=new Array(t);if(t)for(let r=0;r<t;++r)n[r]=n0(e,this._onWorkerMessage.bind(this,r));else n[0]=r0(e,this._onWorkerMessage.bind(this,0));this._workers=n,this._queue=[],this._maxQueueLength=e.queue||1/0,this._running=0,this._dataLookup={},this._job=null}process(e,t,n){this._enqueue({inputs:e,meta:t,callback:n}),this._dispatch()}_enqueue(e){for(this._queue.push(e);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)}_dispatch(){if(this._running||this._queue.length===0)return;const e=this._queue.shift();this._job=e;const t=e.inputs[0].width,n=e.inputs[0].height,r=e.inputs.map(function(l){return l.data.buffer}),s=this._workers.length;if(this._running=s,s===1){this._workers[0].postMessage({buffers:r,meta:e.meta,imageOps:this._imageOps,width:t,height:n},r);return}const o=e.inputs[0].data.length,a=4*Math.ceil(o/4/s);for(let l=0;l<s;++l){const u=l*a,h=[];for(let c=0,d=r.length;c<d;++c)h.push(r[c].slice(u,u+a));this._workers[l].postMessage({buffers:h,meta:e.meta,imageOps:this._imageOps,width:t,height:n},h)}}_onWorkerMessage(e,t){this.disposed||(this._dataLookup[e]=t.data,--this._running,this._running===0&&this._resolveJob())}_resolveJob(){const e=this._job,t=this._workers.length;let n,r;if(t===1)n=new Uint8ClampedArray(this._dataLookup[0].buffer),r=this._dataLookup[0].meta;else{const s=e.inputs[0].data.length;n=new Uint8ClampedArray(s),r=new Array(t);const o=4*Math.ceil(s/4/t);for(let a=0;a<t;
10++a){const l=this._dataLookup[a].buffer,u=a*o;n.set(new Uint8ClampedArray(l),u),r[a]=this._dataLookup[a].meta}}this._job=null,this._dataLookup={},e.callback(null,i0(n,e.inputs[0].width,e.inputs[0].height),r),this._dispatch()}disposeInternal(){for(let e=0;e<this._workers.length;++e)this._workers[e].terminate();this._workers.length=0}}const ch={BEFOREOPERATIONS:"beforeoperations",AFTEROPERATIONS:"afteroperations"};class dh extends mt{constructor(e,t,n){super(e),this.extent=t.extent,this.resolution=t.viewState.resolution/t.pixelRatio,this.data=n}}class md extends ld{constructor(e){super({projection:null}),this.on,this.once,this.un,this.processor_=null,this.operationType_=e.operationType!==void 0?e.operationType:"pixel",this.threads_=e.threads!==void 0?e.threads:1,this.layers_=l0(e.sources);const t=this.changed.bind(this);for(let n=0,r=this.layers_.length;n<r;++n)this.layers_[n].addEventListener(B.CHANGE,t);this.useResolutions_=e.resolutions!==null,this.tileQueue_=new Nc(function(){return 1},this.processSources_.bind(this)),this.requestedFrameState_,this.renderedImageCanvas_=null,this.renderedRevision_,this.frameState_={animate:!1,coordinateToPixelTransform:He(),declutterTree:null,extent:null,index:0,layerIndex:0,layerStatesArray:a0(this.layers_),pixelRatio:1,pixelToCoordinateTransform:He(),postRenderFunctions:[],size:[0,0],tileQueue:this.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},mapId:Z(this),renderTargets:{}},this.setAttributions(function(n){const r=[];for(let s=0,o=e.sources.length;s<o;++s){const a=e.sources[s],l=a instanceof Un?a:a.getSource();if(!l)continue;const u=l.getAttributions();if(typeof u=="function"){const h=u(n);
10r.push.apply(r,h)}}return r.length!==0?r:null}),e.operation!==void 0&&this.setOperation(e.operation,e.lib)}setOperation(e,t){this.processor_&&this.processor_.dispose(),this.processor_=new s0({operation:e,imageOps:this.operationType_==="image",queue:1,lib:t,threads:this.threads_}),this.changed()}updateFrameState_(e,t,n){const r=Object.assign({},this.frameState_);r.viewState=Object.assign({},r.viewState);const s=Lt(e);r.size[0]=Math.ceil(oe(e)/t),r.size[1]=Math.ceil(ke(e)/t),r.extent=[s[0]-r.size[0]*t/2,s[1]-r.size[1]*t/2,s[0]+r.size[0]*t/2,s[1]+r.size[1]*t/2],r.time=Date.now();const o=r.viewState;return o.center=s,o.projection=n,o.resolution=t,r}allSourcesReady_(){let e=!0,t;for(let n=0,r=this.layers_.length;n<r;++n)if(t=this.layers_[n].getSource(),!t||t.getState()!=="ready"){e=!1;break}return e}getImage(e,t,n,r){if(!this.allSourcesReady_())return null;this.tileQueue_.loadMoreTiles(16,16),t=this.findNearestResolution(t);const s=this.updateFrameState_(e,t,r);if(this.requestedFrameState_=s,this.renderedImageCanvas_){const o=this.renderedImageCanvas_.getResolution(),a=this.renderedImageCanvas_.getExtent();(t!==o||!$t(s.extent,a))&&(this.renderedImageCanvas_=null)}return(!this.renderedImageCanvas_||this.getRevision()!==this.renderedRevision_)&&this.processSources_(),s.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_}processSources_(){const e=this.requestedFrameState_,t=this.layers_.length,n=new Array(t);for(let s=0;s<t;++s){e.layerIndex=s,e.renderTargets={};const o=o0(this.layers_[s],e);if(o)n[s]=o;else return}const r={};this.dispatchEvent(new dh(ch.BEFOREOPERATIONS,e,r)),this.processor_.process(n,r,this.onWorkerComplete_.bind(this,e))}onWorkerComplete_(e,t,n,r){if(t||!n)return;const s=e.extent,o=e.viewState.resolution;if(o!==this.requestedFrameState_.viewState.resolution||!$t(s,this.requestedFrameState_.extent))return;let a;if(this.renderedImageCanvas_)a=this.renderedImageCanvas_.getImage().getContext("2d");else{const l=Math.round(oe(s)/o),u=Math.round(ke(s)/o);a=we(l,u),this.renderedImageCanvas_=new wm(s,o,1,a.canvas)}a.putImageData(n,0,0),e.animate?requestAnimationFrame(this.changed.bind(this)):this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new dh(ch.AFTEROPERATIONS,e,r))}getResolutions(e){if(!this.useResolutions_)return null;let t=super.getResolutions();if(!t)for(let n=0,r=this.layers_.length;n<r&&(t=this.layers_[n].getSource().getResolutions(e),!t);++n);return t}disposeInternal(){this.processor_&&this.processor_.dispose(),super.disposeInternal()}}md.prototype.dispose;let Di=null;function o0(i,e){const t=i.getRenderer();if(!t)throw new Error("Unsupported layer type: "+i);if(!t.prepareFrame(e))return null;const n=e.size[0],r=e.size[1];if(n===0||r===0)return null;const s=t.renderFrame(e,null);let o;if(s instanceof HTMLCanvasElement)o=s;else{if(s&&(o=s.firstElementChild),!(o instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+o);if(o.width===n&&o.height===r)return o.getContext("2d").getImageData(0,0,n,r)}if(!Di)Di=we(n,r,void 0,{willReadFrequently:!0});else{const a=Di.canvas;a.width!==n||a.height!==r?Di=we(n,r,void 0,{willReadFrequently:!0}):Di.clearRect(0,0,n,r)}return Di.drawImage(o,0,0,n,r),Di.getImageData(0,0,n,r)}function a0(i){return i.map(function(e){return e.getLayerState()})}function l0(i){const e=i.length,t=new Array(e);for(let n=0;n<e;++n)t[n]=u0(i[n]);return t}function u0(i){let e;return i instanceof Un?i instanceof fd?e=new hd({source:i}):i instanceof ld&&(e=new rd({source:i})):e=i,e}const h0=md,Ho={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class Gl extends fd{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===Gl.prototype.tileUrlFunction,this.tileLoadFunction=e.tileLoadFunction,e.tileUrlFunction&&(this.tileUrlFunction=e.tileUrlFunction),this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(e){const t=e.target,n=Z(t),r=t.getState();let s;r==k.LOADING?(this.tileLoadingKeys_[n]=!0,s=Ho.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],s=r==k.ERROR?Ho.TILELOADERROR:r==k.LOADED?Ho.TILELOADEND:void 0),s!=null&&this.dispatchEvent(new t0(s,t))}setTileLoadFunction(e){this.tileCache.clear(),this.tileLoadFunction=e,this.changed()}setTileUrlFunction(e,t){this.tileUrlFunction=e,this.tileCache.pruneExceptNewestZ(),typeof t<"u"?this.setKey(t):this.changed()}setUrl(e){const t=nd(e);this.urls=t,this.setUrls(t)}setUrls(e){this.urls=e;const t=e.join(`
11`);this.generateTileUrlFunction_?this.setTileUrlFunction(id(e,this.tileGrid),t):this.setKey(t)}tileUrlFunction(e,t,n){}useTile(e,t,n){const r=Kn(e,t,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)}}const yd=Gl;class c0 extends yd{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:d0,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate!==void 0?e.interpolate:!0,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin!==void 0?e.crossOrigin:null,this.tileClass=e.tileClass!==void 0?e.tileClass:zc,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1}expireCache(e,t){const n=this.getTileCacheForProjection(e);this.tileCache.expireCache(this.tileCache==n?t:{});for(const r in this.tileCacheForProjection){const s=this.tileCacheForProjection[r];s.expireCache(s==n?t:{})}}getGutterForProjection(e){return this.getProjection()&&e&&!Rt(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=":disable-interpolation"),e}getOpaque(e){return this.getProjection()&&e&&!Rt(this.getProjection(),e)?!1:super.getOpaque(e)}getTileGridForProjection(e){const t=this.getProjection();
11if(this.tileGrid&&(!t||Rt(t,e)))return this.tileGrid;const n=Z(e);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=cd(e)),this.tileGridForProjection[n]}getTileCacheForProjection(e){const t=this.getProjection();if(!t||Rt(t,e))return this.tileCache;const n=Z(e);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Al(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]}createTile_(e,t,n,r,s,o){const a=[e,t,n],l=this.getTileCoordForTileUrlFunction(a,s),u=l?this.tileUrlFunction(l,r,s):void 0,h=new this.tileClass(a,u!==void 0?k.IDLE:k.EMPTY,u!==void 0?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=o,h.addEventListener(B.CHANGE,this.handleTileChange.bind(this)),h}getTile(e,t,n,r,s){const o=this.getProjection();if(!o||!s||Rt(o,s))return this.getTileInternal(e,t,n,r,o||s);const a=this.getTileCacheForProjection(s),l=[e,t,n];let u;const h=Uc(l);a.containsKey(h)&&(u=a.get(h));const c=this.getKey();if(u&&u.key==c)return u;const d=this.getTileGridForProjection(o),f=this.getTileGridForProjection(s),g=this.getTileCoordForTileUrlFunction(l,s),p=new ka(o,d,s,f,l,g,this.getTilePixelRatio(r),this.getGutter(),(m,_,y,x)=>this.getTileInternal(m,_,y,x,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return p.key=c,u?(p.interimTile=u,p.refreshInterimChain(),a.replace(h,p)):a.set(h,p),p}getTileInternal(e,t,n,r,s){let o=null;const a=Kn(e,t,n),l=this.getKey();if(!this.tileCache.containsKey(a))o=this.createTile_(e,t,n,r,s,l),this.tileCache.set(a,o);else if(o=this.tileCache.get(a),o.key!=l){const u=o;o=this.createTile_(e,t,n,r,s,l),u.getState()==k.IDLE?o.interimTile=u.interimTile:o.interimTile=u,o.refreshInterimChain(),this.tileCache.replace(a,o)}return o}setRenderReprojectionEdges(e){if(this.renderReprojectionEdges_!=e){this.renderReprojectionEdges_=e;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(e,t){const n=le(e);if(n){const r=Z(n);r in this.tileGridForProjection||(this.tileGridForProjection[r]=t)}}clear(){super.clear();for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear()}}function d0(i,e){i.getImage().src=e}const f0=c0;function g0(i,e,t,n){const r=document.createElement("script"),s="olc_"+Z(e);function o(){delete window[s],r.parentNode.removeChild(r)}r.async=!0,r.src=i+(i.includes("?")?"&":"?")+(n||"callback")+"="+s;const a=setTimeout(function(){o(),t&&t()},1e4);window[s]=function(l){clearTimeout(a),o(),e(l)},document.head.appendChild(r)}class p0 extends f0{constructor(e){if(super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:le("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:"loading",tileLoadFunction:e.tileLoadFunction,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,zDirection:e.zDirection}),this.tileJSON_=null,this.tileSize_=e.tileSize,e.url)if(e.jsonp)g0(e.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",e.url),t.send()}else e.tileJSON?this.handleTileJSONResponse(e.tileJSON):H(!1,51)}onXHRLoad_(e){const t=e.target;if(!t.status||t.status>=200&&t.status<300){let n;try{n=JSON.parse(t.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(n)}else this.handleTileJSONError()}onXHRError_(e){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(e){const t=le("EPSG:4326"),n=this.getProjection();let r;if(e.bounds!==void 0){const u=so(t,n);r=Uf(e.bounds,u)}const s=po(n),o=e.minzoom||0,a=e.maxzoom||22,l=Nl({extent:s,maxZoom:a,minZoom:o,tileSize:this.tileSize_});if(this.tileGrid=l,this.tileUrlFunction=id(e.tiles,l),e.attribution&&!this.getAttributions()){const u=r!==void 0?r:s;this.setAttributions(function(h){return pe(u,h.extent)?[e.attribution]:null})}this.tileJSON_=e,this.setState("ready")}handleTileJSONError(){this.setState("error")}}const _d=p0,m0={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},y0={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class _0 extends ud{constructor(e){super(e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=He()}prepareTile(e,t,n){let r;const s=e.getState();return(s===k.LOADED||s===k.ERROR)&&(this.updateExecutorGroup_(e,t,n),this.tileImageNeedsRender_(e)&&(r=!0)),r}getTile(e,t,n,r){const s=r.pixelRatio,o=r.viewState,a=o.resolution,l=o.projection,u=this.getLayer(),h=u.getSource().getTile(e,t,n,s,l),c=r.viewHints,d=!(c[de.ANIMATING]||c[de.INTERACTING]);return(d||!h.wantedResolution)&&(h.wantedResolution=a),this.prepareTile(h,s,l)&&(d||Date.now()-r.time<8)&&u.getRenderMode()!=="vector"&&this.renderTileImage_(h,r),super.getTile(e,t,n,r)}isDrawableTile(e){const t=this.getLayer();return super.isDrawableTile(e)&&(t.getRenderMode()==="vector"?Z(t)in e.executorGroups:e.hasContext(t))}getTileImage(e){return e.getImage(this.getLayer())}prepareFrame(e){const t=this.getLayer().getRevision();return this.renderedLayerRevision_!==t&&(this.renderedLayerRevision_=t,this.renderedTiles.length=0),super.prepareFrame(e)}updateExecutorGroup_(e,t,n){const r=this.getLayer(),s=r.getRevision(),o=r.getRenderOrder()||null,a=e.wantedResolution,l=e.getReplayState(r);if(!l.dirty&&l.renderedResolution===a&&l.renderedRevision==s&&l.renderedRenderOrder==o)return;const u=r.getSource(),h=r.getDeclutter(),c=u.getTileGrid(),f=u.getTileGridForProjection(n).getTileCoordExtent(e.wrappedTileCoord),g=u.getSourceTiles(t,n,e),p=Z(r);delete e.hitDetectionImageData[p],e.executorGroups[p]=[],h&&(e.declutterExecutorGroups[p]=[]),l.dirty=!1;for(let m=0,_=g.length;m<_;++m){const y=g[m];if(y.getState()!=k.LOADED)continue;const x=y.tileCoord,v=c.getTileCoordExtent(x),E=Zt(f,v),R=mi(E,r.getRenderBuffer()*
11a,this.tmpExtent),T=$t(v,E)?null:R,C=new Os(0,R,a,t),I=h?new Os(0,E,a,t):void 0,P=kc(a,t),b=function(z){let S;const N=z.getStyleFunction()||r.getStyleFunction();if(N&&(S=N(z,a)),S){const te=this.renderFeature(z,P,S,C,I);l.dirty=l.dirty||te}},G=y.getFeatures();o&&o!==l.renderedRenderOrder&&G.sort(o);for(let z=0,S=G.length;z<S;++z){const N=G[z];(!T||pe(T,N.getGeometry().getExtent()))&&b.call(this,N)}const j=C.finish(),J=r.getRenderMode()!=="vector"&&h&&g.length===1?null:E,A=new Ds(J,a,t,u.getOverlaps(),j,r.getRenderBuffer());if(e.executorGroups[p].push(A),I){const z=new Ds(null,a,t,u.getOverlaps(),I.finish(),r.getRenderBuffer());e.declutterExecutorGroups[p].push(z)}}l.renderedRevision=s,l.renderedRenderOrder=o,l.renderedResolution=a}forEachFeatureAtCoordinate(e,t,n,r,s){const o=t.viewState.resolution,a=t.viewState.rotation;n=n??0;const l=this.getLayer(),h=l.getSource().getTileGridForProjection(t.viewState.projection),c=da([e]);mi(c,o*n,c);const d={},f=function(m,_,y){let x=m.getId();x===void 0&&(x=Z(m));const v=d[x];if(v){if(v!==!0&&y<v.distanceSq){if(y===0)return d[x]=!0,s.splice(s.lastIndexOf(v),1),r(m,l,_);v.geometry=_,v.distanceSq=y}}else{if(y===0)return d[x]=!0,r(m,l,_);s.push(d[x]={feature:m,layer:l,geometry:_,distanceSq:y,callback:r})}},g=this.renderedTiles;let p;for(let m=0,_=g.length;!p&&m<_;++m){const y=g[m],x=h.getTileCoordExtent(y.wrappedTileCoord);if(!pe(x,c))continue;const v=Z(l),E=[y.executorGroups[v]],R=y.declutterExecutorGroups[v];R&&E.push(R),E.some(T=>{const C=T===R?t.declutterTree.all().map(I=>I.value):null;for(let I=0,P=T.length;I<P;++I)if(p=T[I].forEachFeatureAtCoordinate(e,o,a,n,f,C),p)return!0})}return p}getFeatures(e){return new Promise((t,n)=>{const r=this.getLayer(),s=Z(r),o=r.getSource(),a=this.renderedProjection,l=a.getExtent(),u=this.renderedResolution,h=o.getTileGridForProjection(a),c=me(this.renderedPixelToCoordinateTransform_,e.slice()),d=h.getTileCoordForCoordAndResolution(c,u);let f;for(let x=0,v=this.renderedTiles.length;x<v;++x)if(d.toString()===this.renderedTiles[x].tileCoord.toString()){if(f=this.renderedTiles[x],f.getState()===k.LOADED){const E=h.getTileCoordExtent(f.tileCoord);o.getWrapX()&&a.canWrapX()&&!Vt(l,E)&&el(c,a);break}f=void 0}if(!f||f.loadingSourceTiles>0){t([]);return}const g=h.getTileCoordExtent(f.wrappedTileCoord),p=ei(g),m=[(c[0]-p[0])/u,(p[1]-c[1])/u],_=f.getSourceTiles().reduce(function(x,v){return x.concat(v.getFeatures())},[]);let y=f.hitDetectionImageData[s];if(!y){const x=qe(h.getTileSize(h.getZForResolution(u,o.zDirection))),v=this.renderedRotation_,E=[this.getRenderTransform(h.getTileCoordCenter(f.wrappedTileCoord),u,0,$e,x[0]*$e,x[1]*$e,0)];y=Pc(x,E,_,r.getStyleFunction(),h.getTileCoordExtent(f.wrappedTileCoord),f.getReplayState(r).renderedResolution,v),f.hitDetectionImageData[s]=y}t(Lc(m,_,y))})}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.renderedLayerRevision_!==void 0&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}renderDeclutter(e){const t=this.context,n=t.globalAlpha;t.globalAlpha=this.getLayer().getOpacity();const r=e.viewHints,s=!(r[de.ANIMATING]||r[de.INTERACTING]),o=this.renderedTiles;for(let a=0,l=o.length;a<l;++a){const u=o[a],h=u.declutterExecutorGroups[Z(this.getLayer())];if(h)for(let c=h.length-1;c>=0;--c)h[c].execute(this.context,1,this.getTileRenderTransform(u,e),e.viewState.rotation,s,void 0,e.declutterTree)}t.globalAlpha=n}getTileRenderTransform(e,t){const n=t.pixelRatio,r=t.viewState,s=r.center,o=r.resolution,a=r.rotation,l=t.size,u=Math.round(l[0]*n),h=Math.round(l[1]*n),d=this.getLayer().getSource().getTileGridForProjection(t.viewState.projection),f=e.tileCoord,g=d.getTileCoordExtent(e.wrappedTileCoord),p=d.getTileCoordExtent(f,this.tmpExtent)[0]-g[0];return Ua(ko(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(s,o,a,n,u,h,p))}postRender(e,t){const n=t.viewHints,r=!(n[de.ANIMATING]||n[de.INTERACTING]);this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice(),this.renderedRotation_=t.viewState.rotation;const s=this.getLayer(),o=s.getRenderMode(),a=e.globalAlpha;e.globalAlpha=s.getOpacity();const l=y0[o],u=t.viewState,h=u.rotation,c=s.getSource(),f=c.getTileGridForProjection(u.projection).getZForResolution(u.resolution,c.zDirection),g=this.renderedTiles,p=[],m=[];let _=!0;for(let y=g.length-1;y>=0;--y){const x=g[y];_=_&&!x.getReplayState(s).dirty;
11const v=x.executorGroups[Z(s)].filter(I=>I.hasExecutors(l));if(v.length===0)continue;const E=this.getTileRenderTransform(x,t),R=x.tileCoord[0];let T=!1;const C=v[0].getClipCoords(E);if(C){for(let I=0,P=p.length;I<P;++I)if(f!==R&&R<m[I]){const b=p[I];pe([C[0],C[3],C[4],C[7]],[b[0],b[3],b[4],b[7]])&&(T||(e.save(),T=!0),e.beginPath(),e.moveTo(C[0],C[1]),e.lineTo(C[2],C[3]),e.lineTo(C[4],C[5]),e.lineTo(C[6],C[7]),e.moveTo(b[6],b[7]),e.lineTo(b[4],b[5]),e.lineTo(b[2],b[3]),e.lineTo(b[0],b[1]),e.clip())}p.push(C),m.push(R)}for(let I=0,P=v.length;I<P;++I)v[I].execute(e,1,E,h,r,l);T&&e.restore()}e.globalAlpha=a,this.ready=_,super.postRender(e,t)}renderFeature(e,t,n,r,s){if(!n)return!1;let o=!1;if(Array.isArray(n))for(let a=0,l=n.length;a<l;++a)o=zs(r,e,n[a],t,this.boundHandleStyleImageChange_,void 0,s)||o;else o=zs(r,e,n,t,this.boundHandleStyleImageChange_,void 0,s);return o}tileImageNeedsRender_(e){const t=this.getLayer();if(t.getRenderMode()==="vector")return!1;const n=e.getReplayState(t),r=t.getRevision(),s=e.wantedResolution;return n.renderedTileResolution!==s||n.renderedTileRevision!==r}renderTileImage_(e,t){const n=this.getLayer(),r=e.getReplayState(n),s=n.getRevision(),o=e.executorGroups[Z(n)];r.renderedTileRevision=s;const a=e.wrappedTileCoord,l=a[0],u=n.getSource();let h=t.pixelRatio;const d=t.viewState.projection,f=u.getTileGridForProjection(d),g=f.getResolution(e.tileCoord[0]),p=t.pixelRatio/e.wantedResolution*g,m=f.getResolution(l),_=e.getContext(n);h=Math.round(Math.max(h,p/h));const y=u.getTilePixelSize(l,h,d);_.canvas.width=y[0],_.canvas.height=y[1];const x=h/p;if(x!==1){const T=_u(this.tmpTransform_);ko(T,x,x),_.setTransform.apply(_,T)}const v=f.getTileCoordExtent(a,this.tmpExtent),E=p/m,R=_u(this.tmpTransform_);ko(R,E,-E),jf(R,-v[0],-v[3]);for(let T=0,C=o.length;T<C;++T)o[T].execute(_,x,R,0,!0,m0[n.getRenderMode()]);r.renderedTileResolution=e.wantedResolution}}const v0=_0;class x0 extends Sc{constructor(e){e=e||{};const t=Object.assign({},e);delete t.preload,delete t.useInterimTilesOnError,super(t),this.on,this.once,this.un;const n=e.renderMode||"hybrid";H(n=="hybrid"||n=="vector",28),this.renderMode_=n,this.setPreload(e.preload?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0),this.getBackground,this.setBackground}createRenderer(){return new v0(this)}getFeatures(e){return super.getFeatures(e)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(pi.PRELOAD)}getUseInterimTilesOnError(){return this.get(pi.USE_INTERIM_TILES_ON_ERROR)}setPreload(e){this.set(pi.PRELOAD,e)}setUseInterimTilesOnError(e){this.set(pi.USE_INTERIM_TILES_ON_ERROR,e)}}const gr=x0;class E0 extends yd{constructor(e){const t=e.projection||"EPSG:3857",n=e.extent||po(t),r=e.tileGrid||Nl({extent:n,maxResolution:e.maxResolution,maxZoom:e.maxZoom!==void 0?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,interpolate:!0,opaque:!1,projection:t,state:e.state,tileGrid:r,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:xd,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX===void 0?!0:e.wrapX,transition:e.transition,zDirection:e.zDirection===void 0?1:e.zDirection}),this.format_=e.format?e.format:null,this.sourceTileCache=new Al(this.tileCache.highWaterMark),this.overlaps_=e.overlaps==null?!0:e.overlaps,this.tileClass=e.tileClass?e.tileClass:Ny,this.tileGrids_={}}getFeaturesInExtent(e){const t=[],n=this.tileCache;if(n.getCount()===0)return t;const r=Kc(n.peekFirstKey())[0],s=this.tileGrid;return n.forEach(function(o){if(o.tileCoord[0]!==r||o.getState()!==k.LOADED)return;const a=o.getSourceTiles();for(let l=0,u=a.length;l<u;++l){const h=a[l],c=h.tileCoord;if(pe(e,s.getTileCoordExtent(c))){const d=h.getFeatures();if(d)for(let f=0,g=d.length;f<g;++f){const p=d[f],m=p.getGeometry();pe(e,m.getExtent())&&t.push(p)}}}}),t}getOverlaps(){return this.overlaps_}clear(){this.tileCache.clear(),this.sourceTileCache.clear()}expireCache(e,t){const n=this.getTileCacheForProjection(e),r=Object.keys(t).reduce((s,o)=>{const a=Py(o),l=n.peek(a);if(l){const u=l.sourceTiles;for(let h=0,c=u.length;h<c;++h)s[u[h].getKey()]=!0}return s},{});super.expireCache(e,t),this.sourceTileCache.expireCache(r)}
11getSourceTiles(e,t,n){if(n.getState()===k.IDLE){n.setState(k.LOADING);const r=n.wrappedTileCoord,s=this.getTileGridForProjection(t),o=s.getTileCoordExtent(r),a=r[0],l=s.getResolution(a);mi(o,-l,o);const u=this.tileGrid,h=u.getExtent();h&&Zt(o,h,o);const c=u.getZForResolution(l,this.zDirection);u.forEachTileCoord(o,c,d=>{const f=this.tileUrlFunction(d,e,t),g=this.sourceTileCache.containsKey(f)?this.sourceTileCache.get(f):new this.tileClass(d,f?k.IDLE:k.EMPTY,f,this.format_,this.tileLoadFunction);n.sourceTiles.push(g);const p=g.getState();if(p<k.LOADED){const m=_=>{this.handleTileChange(_);const y=g.getState();if(y===k.LOADED||y===k.ERROR){const x=g.getKey();x in n.errorTileKeys?g.getState()===k.LOADED&&delete n.errorTileKeys[x]:n.loadingSourceTiles--,y===k.ERROR?n.errorTileKeys[x]=!0:g.removeEventListener(B.CHANGE,m),n.loadingSourceTiles===0&&n.setState(Ui(n.errorTileKeys)?k.LOADED:k.ERROR)}};g.addEventListener(B.CHANGE,m),n.loadingSourceTiles++}p===k.IDLE&&(g.extent=u.getTileCoordExtent(d),g.projection=t,g.resolution=u.getResolution(d[0]),this.sourceTileCache.set(f,g),g.load())}),n.loadingSourceTiles||n.setState(n.sourceTiles.some(d=>d.getState()===k.ERROR)?k.ERROR:k.LOADED)}return n.sourceTiles}getTile(e,t,n,r,s){const o=Kn(e,t,n),a=this.getKey();let l;if(this.tileCache.containsKey(o)&&(l=this.tileCache.get(o),l.key===a))return l;const u=[e,t,n];let h=this.getTileCoordForTileUrlFunction(u,s);const c=this.getTileGrid().getExtent(),d=this.getTileGridForProjection(s);if(h&&c){const p=d.getTileCoordExtent(h);mi(p,-d.getResolution(e),p),pe(c,p)||(h=null)}let f=!0;if(h!==null){const p=this.tileGrid,m=d.getResolution(e),_=p.getZForResolution(m,1),y=d.getTileCoordExtent(h);mi(y,-m,y),p.forEachTileCoord(y,_,x=>{f=f&&!this.tileUrlFunction(x,r,s)})}const g=new Dy(u,f?k.EMPTY:k.IDLE,h,this.getSourceTiles.bind(this,r,s));return g.key=a,l?(g.interimTile=l,g.refreshInterimChain(),this.tileCache.replace(o,g)):this.tileCache.set(o,g),g}getTileGridForProjection(e){const t=e.getCode();let n=this.tileGrids_[t];if(!n){const r=this.tileGrid,s=r.getResolutions().slice(),o=s.map(function(u,h){return r.getOrigin(h)}),a=s.map(function(u,h){return r.getTileSize(h)}),l=wc+1;for(let u=s.length;u<l;++u)s.push(s[u-1]/2),o.push(o[u-1]),a.push(a[u-1]);n=new go({extent:r.getExtent(),origins:o,resolutions:s,tileSizes:a}),this.tileGrids_[t]=n}return n}getTilePixelRatio(e){return e}getTilePixelSize(e,t,n){const r=this.getTileGridForProjection(n),s=qe(r.getTileSize(e),this.tmpSize);return[Math.round(s[0]*t),Math.round(s[1]*t)]}updateCacheSize(e,t){super.updateCacheSize(e*2,t),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(t).highWaterMark}}const vd=E0;function xd(i,e){i.setLoader(function(t,n,r){Dc(e,i.getFormat(),t,n,r,i.onLoad.bind(i),i.onError.bind(i))})}function Ed(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var w0={},wd,fh={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function pr(i){return i=Math.round(i),i<0?0:i>255?255:i}function gh(i){return i<0?0:i>1?1:i}function Jo(i){return i[i.length-1]==="%"?pr(parseFloat(i)/100*255):pr(parseInt(i))}function hs(i){return i[i.length-1]==="%"?gh(parseFloat(i)/100):gh(parseFloat(i))}function $o(i,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?i+(e-i)*t*6:t*2<1?e:t*3<2?i+(e-i)*(2/3-t)*6:i}function C0(i){var e=i.replace(/ /g,"").toLowerCase();if(e in fh)return fh[e].slice();if(e[0]==="#"){if(e.length===4){var t=parseInt(e.substr(1),16);return t>=0&&t<=4095?[(t&3840)>>4|(t&3840)>>8,t&240|(t&240)>>4,t&15|(t&15)<<4,1]:null}else if(e.length===7){var t=parseInt(e.substr(1),16);return t>=0&&t<=16777215?[(t&16711680)>>16,(t&65280)>>8,t&255,1]:null}return null}var n=e.indexOf("("),r=e.indexOf(")");if(n!==-1&&r+1===e.length){var s=e.substr(0,n),o=e.substr(n+1,r-(n+1)).split(","),a=1;switch(s){case"rgba":if(o.length!==4)return null;a=hs(o.pop());case"rgb":return o.length!==3?null:[Jo(o[0]),Jo(o[1]),Jo(o[2]),a];case"hsla":if(o.length!==4)return null;a=hs(o.pop());case"hsl":if(o.length!==3)return null;var l=(parseFloat(o[0])%360+360)%360/360,u=hs(o[1]),h=hs(o[2]),c=h<=.5?h*(u+1):h+u-h*u,d=h*2-c;return[pr($o(d,c,l+1/3)*255),pr($o(d,c,l)*255),pr($o(d,c,l-1/3)*255),a];default:return null}}return null}try{wd=w0.parseCSSColor=C0}catch{}var Ie=function(e,t,n,r){r===void 0&&(r=1),this.r=e,this.g=t,this.b=n,this.a=r};Ie.parse=function(e){if(e){if(e instanceof Ie)return e;if(typeof e=="string"){var t=wd(e);if(t)return new Ie(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}};Ie.prototype.toString=function(){var e=this.toArray(),t=e[0],n=e[1],r=e[2],s=e[3];return"rgba("+Math.round(t)+","+Math.round(n)+","+Math.round(r)+","+s+")"};Ie.prototype.toArray=function(){var e=this,t=e.r,n=e.g,r=e.b,s=e.a;return s===0?[0,0,0,0]:[t*255/s,n*255/s,r*255/s,s]};Ie.prototype.toArray01=function(){var e=this,t=e.r,n=e.g,r=e.b,s=e.a;return s===0?[0,0,0,0]:[t/s,n/s,r/s,s]};Ie.prototype.toArray01PremultipliedAlpha=function(){var e=this,t=e.r,n=e.g,r=e.b,s=e.a;return[t,n,r,s]};Ie.black=new Ie(0,0,0,1);Ie.white=new Ie(1,1,1,1);Ie.transparent=new Ie(0,0,0,0);Ie.red=new Ie(1,0,0,1);Ie.blue=new Ie(0,0,1,1);var et=Ie;function Mr(i){return typeof i=="object"?["literal",i]:i}function T0(i,e){var t=i.stops;if(!t)return R0(i,e);var n=t&&typeof t[0][0]=="object",r=n||i.property!==void 0,s=n||!r;return t=t.map(function(o){return!r&&e.tokens&&typeof o[1]=="string"?[o[0],M0(o[1])]:[o[0],Mr(o[1])]}),n?b0(i,e,t):s?S0(i,e,t):Oa(i,e,t)}function R0(i,e){var t=["get",i.property];if(i.default===void 0)return e.type==="string"?["string",t]:t;if(e.type==="enum")return["match",t,Object.keys(e.values),t,i.default];var n=[e.type==="color"?"to-color":e.type,t,Mr(i.default)];return e.type==="array"&&n.splice(1,0,e.value,e.length||null),n}function jl(i){switch(i.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function b0(i,e,t){for(var n={},r={},s=[],o=0;o<t.length;o++){var a=t[o],l=a[0].zoom;n[l]===void 0&&(n[l]={zoom:l,type:i.type,property:i.property,default:i.default},r[l]=[],s.push(l)),r[l].push([a[0].value,a[1]])}var u=Wl({},e);if(u==="exponential"){for(var h=[jl(i),["linear"],["zoom"]],c=0,d=s;c<d.length;c+=1){var f=d[c],g=Oa(n[f],e,r[f]);
vendor: 12,994 bytes, line 11
11zn(h,f,g,!1)}return h}else{for(var p=["step",["zoom"]],m=0,_=s;m<_.length;m+=1){var y=_[m],x=Oa(n[y],e,r[y]);zn(p,y,x,!0)}return Xl(p),p}}function I0(i,e){if(i!==void 0)return i;if(e!==void 0)return e}function ph(i,e){var t=Mr(I0(i.default,e.default));return t===void 0&&e.type==="resolvedImage"?"":t}function Oa(i,e,t){var n=Wl(i,e),r=["get",i.property];if(n==="categorical"&&typeof t[0][0]=="boolean"){for(var s=["case"],o=0,a=t;o<a.length;o+=1){var l=a[o];s.push(["==",r,l[0]],l[1])}return s.push(ph(i,e)),s}else if(n==="categorical"){for(var u=["match",r],h=0,c=t;h<c.length;h+=1){var d=c[h];zn(u,d[0],d[1],!1)}return u.push(ph(i,e)),u}else if(n==="interval"){for(var f=["step",["number",r]],g=0,p=t;g<p.length;g+=1){var m=p[g];zn(f,m[0],m[1],!0)}return Xl(f),i.default===void 0?f:["case",["==",["typeof",r],"number"],f,Mr(i.default)]}else if(n==="exponential"){for(var _=i.base!==void 0?i.base:1,y=[jl(i),_===1?["linear"]:["exponential",_],["number",r]],x=0,v=t;x<v.length;x+=1){var E=v[x];zn(y,E[0],E[1],!1)}return i.default===void 0?y:["case",["==",["typeof",r],"number"],y,Mr(i.default)]}else throw new Error("Unknown property function type "+n)}function S0(i,e,t,n){n===void 0&&(n=["zoom"]);var r=Wl(i,e),s,o=!1;if(r==="interval")s=["step",n],o=!0;else if(r==="exponential"){var a=i.base!==void 0?i.base:1;s=[jl(i),a===1?["linear"]:["exponential",a],n]}else throw new Error('Unknown zoom function type "'+r+'"');for(var l=0,u=t;l<u.length;l+=1){var h=u[l];zn(s,h[0],h[1],o)}return Xl(s),s}function Xl(i){i[0]==="step"&&i.length===3&&(i.push(0),i.push(i[3]))}function zn(i,e,t,n){i.length>3&&e===i[i.length-2]||(n&&i.length===2||i.push(e),i.push(t))}function Wl(i,e){return i.type?i.type:e.expression.interpolated?"exponential":"interval"}function M0(i){for(var e=["concat"],t=/{([^{}]+)}/g,n=0,r=t.exec(i);r!==null;r=t.exec(i)){var s=i.slice(n,t.lastIndex-r[0].length);n=t.lastIndex,s.length>0&&e.push(s),e.push(["get",r[1]])}if(e.length===1)return i;if(n<i.length)e.push(i.slice(n));else if(e.length===2)return["to-string",e[1]];return e}var F0=function(i){function e(t,n){i.call(this,n),this.message=n,this.key=t}return i&&(e.__proto__=i),e.prototype=Object.create(i&&i.prototype),e.prototype.constructor=e,e}(Error),bt=F0,Fr=function(e,t){t===void 0&&(t=[]),this.parent=e,this.bindings={};for(var n=0,r=t;n<r.length;n+=1){var s=r[n],o=s[0],a=s[1];this.bindings[o]=a}};Fr.prototype.concat=function(e){return new Fr(this,e)};Fr.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")};Fr.prototype.has=function(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1};var P0=Fr,mo={kind:"null"},F={kind:"number"},ee={kind:"string"},U={kind:"boolean"},qt={kind:"color"},Nn={kind:"object"},K={kind:"value"},L0={kind:"error"},yo={kind:"collator"},_o={kind:"formatted"},Yr={kind:"resolvedImage"};function ot(i,e){return{kind:"array",itemType:i,N:e}}function fe(i){if(i.kind==="array"){var e=fe(i.itemType);return typeof i.N=="number"?"array<"+e+", "+i.N+">":i.itemType.kind==="value"?"array":"array<"+e+">"}else return i.kind}var A0=[mo,F,ee,U,qt,_o,Nn,ot(K),Yr];function Pr(i,e){if(e.kind==="error")return null;if(i.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!Pr(i.itemType,e.itemType))&&(typeof i.N!="number"||i.N===e.N))return null}else{if(i.kind===e.kind)return null;if(i.kind==="value")for(var t=0,n=A0;t<n.length;t+=1){var r=n[t];if(!Pr(r,e))return null}}return"Expected "+fe(i)+" but found "+fe(e)+" instead."}function Vl(i,e){return e.some(function(t){return t.kind===i.kind})}function Lr(i,e){return e.some(function(t){return t==="null"?i===null:t==="array"?Array.isArray(i):t==="object"?i&&!Array.isArray(i)&&typeof i=="object":t===typeof i})}var Yl=function(e,t,n){e?this.sensitivity=t?"variant":"case":this.sensitivity=t?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Yl.prototype.compare=function(e,t){return this.collator.compare(e,t)};Yl.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Bl=Yl,Da=function(e,t,n,r,s){this.text=e.normalize?e.normalize():e,this.image=t,this.scale=n,this.fontStack=r,this.textColor=s},Ht=function(e){this.sections=e};Ht.fromString=function(e){return new Ht([new Da(e,null,null,null,null)])};Ht.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(e){return e.text.length!==0||e.image&&e.image.name.length!==0})};Ht.factory=function(e){return e instanceof Ht?e:Ht.fromString(e)};Ht.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(e){return e.text}).join("")};Ht.prototype.serialize=function(){for(var e=["format"],t=0,n=this.sections;t<n.length;t+=1){var r=n[t];if(r.image){e.push(["image",r.image.name]);continue}e.push(r.text);var s={};r.fontStack&&(s["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(s["font-scale"]=r.scale),r.textColor&&(s["text-color"]=["rgba"].concat(r.textColor.toArray())),e.push(s)}return e};var qn=Ht,Ar=function(e){this.name=e.name,this.available=e.available};Ar.prototype.toString=function(){return this.name};Ar.fromString=function(e){return e?new Ar({name:e,available:!1}):null};Ar.prototype.serialize=function(){return["image",this.name]};var Hn=Ar;function Cd(i,e,t,n){if(!(typeof i=="number"&&i>=0&&i<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255)){var r=typeof n=="number"?[i,e,t,n]:[i,e,t];return"Invalid rgba value ["+r.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof n>"u"||typeof n=="number"&&n>=0&&n<=1?null:"Invalid rgba value ["+[i,e,t,n].join(", ")+"]: 'a' must be between 0 and 1."}function Ws(i){if(i===null)return!0;if(typeof i=="string")return!0;if(typeof i=="boolean")return!0;if(typeof i=="number")return!0;if(i instanceof et)return!0;if(i instanceof Bl)return!0;if(i instanceof qn)return!0;if(i instanceof Hn)return!0;if(Array.isArray(i)){for(var e=0,t=i;e<t.length;e+=1){var n=t[e];if(!Ws(n))return!1}return!0}else if(typeof i=="object"){for(var r in i)if(!Ws(i[r]))return!1;return!0}else return!1}function Ee(i){if(i===null)return mo;if(typeof i=="string")return ee;if(typeof i=="boolean")return U;if(typeof i=="number")return F;if(i instanceof et)return qt;if(i instanceof Bl)return yo;if(i instanceof qn)return _o;if(i instanceof Hn)return Yr;if(Array.isArray(i)){for(var e=i.length,t,n=0,r=i;n<r.length;n+=1){var s=r[n],o=Ee(s);if(!t)t=o;else{if(t===o)continue;t=K;break}}return ot(t||K,e)}else return Nn}function mr(i){var e=typeof i;return i===null?"":e==="string"||e==="number"||e==="boolean"?String(i):i instanceof et||i instanceof qn||i instanceof Hn?i.toString():JSON.stringify(i)}var Ki=function(e,t){this.type=e,this.value=t};Ki.parse=function(e,t){if(e.length!==2)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!Ws(e[1]))return t.error("invalid value");var n=e[1],r=Ee(n),s=t.expectedType;return r.kind==="array"&&r.N===0&&s&&s.kind==="array"&&(typeof s.N!="number"||s.N===0)&&(r=s),new Ki(r,n)};Ki.prototype.evaluate=function(){return this.value};Ki.prototype.eachChild=function(){};Ki.prototype.outputDefined=function(){return!0};Ki.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof et?["rgba"].concat(this.value.toArray()):this.value instanceof qn?this.value.serialize():this.value};var Vs=Ki,Td=function(e){this.name="ExpressionEvaluationError",this.message=e};Td.prototype.toJSON=function(){return this.message};var Ae=Td,Qo={string:ee,number:F,boolean:U,object:Nn},qi=function(e,t){this.type=e,this.args=t};qi.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n=1,r,s=e[0];if(s==="array"){var o;if(e.length>2){var a=e[1];if(typeof a!="string"||!(a in Qo)||a==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=Qo[a],n++}else o=K;var l;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);l=e[2],n++}r=ot(o,l)}else r=Qo[s];for(var u=[];n<e.length;n++){var h=t.parse(e[n],n,K);if(!h)return null;u.push(h)}return new qi(r,u)};qi.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var n=this.args[t].evaluate(e),r=Pr(this.type,Ee(n));if(r){if(t===this.args.length-1)throw new Ae("Expected value to be of type "+fe(this.type)+", but found "+fe(Ee(n))+" instead.")}else return n}return null};qi.prototype.eachChild=function(e){this.args.forEach(e)};qi.prototype.outputDefined=function(){return this.args.every(function(e){return e.outputDefined()})};qi.prototype.serialize=function(){var e=this.type,t=[e.kind];if(e.kind==="array"){var n=e.itemType;if(n.kind==="string"||n.kind==="number"||n.kind==="boolean"){t.push(n.kind);var r=e.N;(typeof r=="number"||this.args.length>1)&&t.push(r)}}return t.concat(this.args.map(function(s){return s.serialize()}))};var Wt=qi,Hi=function(e){this.type=_o,this.sections=e};Hi.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n=e[1];if(!Array.isArray(n)&&typeof n=="object")return t.error("First argument must be an image or text section.");for(var r=[],s=!1,o=1;o<=e.length-1;++o){var a=e[o];if(s&&typeof a=="object"&&!Array.isArray(a)){s=!1;var l=null;if(a["font-scale"]&&(l=t.parse(a["font-scale"],1,F),!l))return null;var u=null;if(a["text-font"]&&(u=t.parse(a["text-font"],1,ot(ee)),!u))return null;var h=null;if(a["text-color"]&&(h=t.parse(a["text-color"],1,qt),!h))return null;var c=r[r.length-1];c.scale=l,c.font=u,c.textColor=h}else{var d=t.parse(e[o],1,K);if(!d)return null;var f=d.type.kind;if(f!=="string"&&f!=="value"&&f!=="null"&&f!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");s=!0,r.push({content:d,scale:null,font:null,textColor:null})}}return new Hi(r)};Hi.prototype.evaluate=function(e){var t=function(n){var r=n.content.evaluate(e);return Ee(r)===Yr?new Da("",r,null,null,null):new Da(mr(r),null,n.scale?n.scale.evaluate(e):null,n.font?n.font.evaluate(e).join(","):null,n.textColor?n.textColor.evaluate(e):null)};return new qn(this.sections.map(t))};Hi.prototype.eachChild=function(e){for(var t=0,n=this.sections;t<n.length;t+=1){var r=n[t];e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor)}};Hi.prototype.outputDefined=function(){return!1};Hi.prototype.serialize=function(){for(var e=["format"],t=0,n=this.sections;t<n.length;t+=1){var r=n[t];e.push(r.content.serialize());var s={};r.scale&&(s["font-scale"]=r.scale.serialize()),r.font&&(s["text-font"]=r.font.serialize()),r.textColor&&(s["text-color"]=r.textColor.serialize()),e.push(s)}return e};var Rd=Hi,Ji=function(e){this.type=Yr,this.input=e};Ji.parse=function(e,t){if(e.length!==2)return t.error("Expected two arguments.");var n=t.parse(e[1],1,ee);return n?new Ji(n):t.error("No image name provided.")};Ji.prototype.evaluate=function(e){var t=this.input.evaluate(e),n=Hn.fromString(t);return n&&e.availableImages&&(n.available=e.availableImages.indexOf(t)>-1),n};Ji.prototype.eachChild=function(e){e(this.input)};Ji.prototype.outputDefined=function(){return!1};Ji.prototype.serialize=function(){return["image",this.input.serialize()]};var bd=Ji,k0={"to-boolean":U,"to-color":qt,"to-number":F,"to-string":ee},$i=function(e,t){this.type=e,this.args=t};$i.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n=e[0];if((n==="to-boolean"||n==="to-string")&&e.length!==2)return t.error("Expected one argument.");for(var r=k0[n],s=[],o=1;o<e.length;o++){var a=t.parse(e[o],o,K);if(!a)return null;s.push(a)}return new $i(r,s)};$i.prototype.evaluate=function(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){for(var t,n,r=0,s=this.args;r<s.length;r+=1){var o=s[r];if(t=o.evaluate(e),n=null,t instanceof et)return t;if(typeof t=="string"){var a=e.parseColor(t);if(a)return a}else if(Array.isArray(t)&&(t.length<3||t.length>4?n="Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":n=Cd(t[0],t[1],t[2],t[3]),!n))return new et(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Ae(n||"Could not parse color from value '"+(typeof t=="string"?t:String(JSON.stringify(t)))+"'")}else if(this.type.kind==="number"){for(var l=null,u=0,h=this.args;u<h.length;u+=1){var c=h[u];if(l=c.evaluate(e),l===null)return 0;var d=Number(l);if(!isNaN(d))return d}throw new Ae("Could not convert "+JSON.stringify(l)+" to number.")}else return this.type.kind==="formatted"?qn.fromString(mr(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?Hn.fromString(mr(this.args[0].evaluate(e))):mr(this.args[0].evaluate(e))};
11$i.prototype.eachChild=function(e){this.args.forEach(e)};$i.prototype.outputDefined=function(){return this.args.every(function(e){return e.outputDefined()})};$i.prototype.serialize=function(){if(this.type.kind==="formatted")return new Rd([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new bd(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild(function(t){e.push(t.serialize())}),e};var An=$i,O0=["Unknown","Point","LineString","Polygon"],Ri=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null};Ri.prototype.id=function(){return this.feature&&this.feature.id!==void 0?this.feature.id:null};Ri.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?O0[this.feature.type]:this.feature.type:null};Ri.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null};Ri.prototype.canonicalID=function(){return this.canonical};Ri.prototype.properties=function(){return this.feature&&this.feature.properties||{}};Ri.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var e=this.featureDistanceData.center,t=this.featureDistanceData.scale,n=this.featureTileCoord,r=n.x,s=n.y,o=r*t-e[0],a=s*t-e[1],l=this.featureDistanceData.bearing[0],u=this.featureDistanceData.bearing[1],h=l*o+u*a;return h}return 0};Ri.prototype.parseColor=function(e){var t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=et.parse(e)),t};var Id=Ri,gt=function(e,t,n,r){this.name=e,this.type=t,this._evaluate=n,this.args=r};gt.prototype.evaluate=function(e){return this._evaluate(e,this.args)};gt.prototype.eachChild=function(e){this.args.forEach(e)};gt.prototype.outputDefined=function(){return!1};gt.prototype.serialize=function(){return[this.name].concat(this.args.map(function(e){return e.serialize()}))};gt.parse=function(e,t){var n,r=e[0],s=gt.definitions[r];if(!s)return t.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(s)?s[0]:s.type,a=Array.isArray(s)?[[s[1],s[2]]]:s.overloads,l=a.filter(function(j){var J=j[0];return!Array.isArray(J)||J.length===e.length-1}),u=null,h=0,c=l;h<c.length;
vendor: 29,721 bytes, line 11
11h+=1){var d=c[h],f=d[0],g=d[1];u=new Ad(t.registry,t.path,null,t.scope);for(var p=[],m=!1,_=1;_<e.length;_++){var y=e[_],x=Array.isArray(f)?f[_-1]:f.type,v=u.parse(y,1+p.length,x);if(!v){m=!0;break}p.push(v)}if(!m){if(Array.isArray(f)&&f.length!==p.length){u.error("Expected "+f.length+" arguments, but found "+p.length+" instead.");continue}for(var E=0;E<p.length;E++){var R=Array.isArray(f)?f[E]:f.type,T=p[E];u.concat(E+1).checkSubtype(R,T.type)}if(u.errors.length===0)return new gt(r,o,g,p)}}if(l.length===1)(n=t.errors).push.apply(n,u.errors);else{for(var C=l.length?l:a,I=C.map(function(j){var J=j[0];return D0(J)}).join(" | "),P=[],b=1;b<e.length;b++){var G=t.parse(e[b],1+P.length);if(!G)return null;P.push(fe(G.type))}t.error("Expected arguments of type "+I+", but found ("+P.join(", ")+") instead.")}return null};gt.register=function(e,t){gt.definitions=t;for(var n in t)e[n]=gt};function D0(i){return Array.isArray(i)?"("+i.map(fe).join(", ")+")":"("+fe(i.type)+"...)"}var Jn=gt,Qi=function(e,t,n){this.type=yo,this.locale=n,this.caseSensitive=e,this.diacriticSensitive=t};Qi.parse=function(e,t){if(e.length!==2)return t.error("Expected one argument.");var n=e[1];if(typeof n!="object"||Array.isArray(n))return t.error("Collator options argument must be an object.");var r=t.parse(n["case-sensitive"]===void 0?!1:n["case-sensitive"],1,U);if(!r)return null;var s=t.parse(n["diacritic-sensitive"]===void 0?!1:n["diacritic-sensitive"],1,U);if(!s)return null;var o=null;return n.locale&&(o=t.parse(n.locale,1,ee),!o)?null:new Qi(r,s,o)};Qi.prototype.evaluate=function(e){return new Bl(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)};Qi.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)};Qi.prototype.outputDefined=function(){return!1};Qi.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var Sd=Qi,_i=8192;function Zl(i,e){i[0]=Math.min(i[0],e[0]),i[1]=Math.min(i[1],e[1]),i[2]=Math.max(i[2],e[0]),i[3]=Math.max(i[3],e[1])}function z0(i){return(180+i)/360}function N0(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function Ys(i,e){return!(i[0]<=e[0]||i[2]>=e[2]||i[1]<=e[1]||i[3]>=e[3])}function G0(i,e){var t=z0(i[0]),n=N0(i[1]),r=Math.pow(2,e.z);return[Math.round(t*r*_i),Math.round(n*r*_i)]}function j0(i,e,t){var n=i[0]-e[0],r=i[1]-e[1],s=i[0]-t[0],o=i[1]-t[1];return n*o-s*r===0&&n*s<=0&&r*o<=0}function X0(i,e,t){return e[1]>i[1]!=t[1]>i[1]&&i[0]<(t[0]-e[0])*(i[1]-e[1])/(t[1]-e[1])+e[0]}function Ul(i,e){for(var t=!1,n=0,r=e.length;n<r;n++)for(var s=e[n],o=0,a=s.length;o<a-1;o++){if(j0(i,s[o],s[o+1]))return!1;X0(i,s[o],s[o+1])&&(t=!t)}return t}function W0(i,e){for(var t=0;t<e.length;t++)if(Ul(i,e[t]))return!0;return!1}function V0(i,e){return i[0]*e[1]-i[1]*e[0]}function mh(i,e,t,n){var r=i[0]-t[0],s=i[1]-t[1],o=e[0]-t[0],a=e[1]-t[1],l=n[0]-t[0],u=n[1]-t[1],h=r*u-l*s,c=o*u-l*a;return h>0&&c<0||h<0&&c>0}function Y0(i,e,t,n){var r=[e[0]-i[0],e[1]-i[1]],s=[n[0]-t[0],n[1]-t[1]];return V0(s,r)===0?!1:!!(mh(i,e,t,n)&&mh(t,n,i,e))}function B0(i,e,t){for(var n=0,r=t;n<r.length;n+=1)for(var s=r[n],o=0;o<s.length-1;++o)if(Y0(i,e,s[o],s[o+1]))return!0;return!1}function Md(i,e){for(var t=0;t<i.length;++t)if(!Ul(i[t],e))return!1;for(var n=0;n<i.length-1;++n)if(B0(i[n],i[n+1],e))return!1;return!0}function Z0(i,e){for(var t=0;t<e.length;t++)if(Md(i,e[t]))return!0;return!1}function Kl(i,e,t){for(var n=[],r=0;r<i.length;r++){for(var s=[],o=0;o<i[r].length;o++){var a=G0(i[r][o],t);Zl(e,a),s.push(a)}n.push(s)}return n}function Fd(i,e,t){for(var n=[],r=0;r<i.length;r++){var s=Kl(i[r],e,t);n.push(s)}return n}function Pd(i,e,t,n){if(i[0]<t[0]||i[0]>t[2]){var r=n*.5,s=i[0]-t[0]>r?-n:t[0]-i[0]>r?n:0;s===0&&(s=i[0]-t[2]>r?-n:t[2]-i[0]>r?n:0),i[0]+=s}Zl(e,i)}function U0(i){i[0]=i[1]=1/0,i[2]=i[3]=-1/0}function yh(i,e,t,n){var r=Math.pow(2,n.z)*_i,s=[n.x*_i,n.y*_i],o=[];if(!i)return o;for(var a=0,l=i;a<l.length;a+=1)for(var u=l[a],h=0,c=u;h<c.length;h+=1){var d=c[h],f=[d.x+s[0],d.y+s[1]];Pd(f,e,t,r),o.push(f)}return o}function _h(i,e,t,n){var r=Math.pow(2,n.z)*_i,s=[n.x*_i,n.y*_i],o=[];if(!i)return o;for(var a=0,l=i;a<l.length;a+=1){for(var u=l[a],h=[],c=0,d=u;c<d.length;c+=1){var f=d[c],g=[f.x+s[0],f.y+s[1]];Zl(e,g),h.push(g)}o.push(h)}if(e[2]-e[0]<=r/2){U0(e);for(var p=0,m=o;p<m.length;p+=1)for(var _=m[p],y=0,x=_;y<x.length;y+=1){var v=x[y];Pd(v,e,t,r)}}return o}function K0(i,e){var t=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=i.canonicalID();if(!r)return!1;if(e.type==="Polygon"){var s=Kl(e.coordinates,n,r),o=yh(i.geometry(),t,n,r);if(!Ys(t,n))return!1;for(var a=0,l=o;a<l.length;a+=1){var u=l[a];if(!Ul(u,s))return!1}}if(e.type==="MultiPolygon"){var h=Fd(e.coordinates,n,r),c=yh(i.geometry(),t,n,r);if(!Ys(t,n))return!1;for(var d=0,f=c;d<f.length;d+=1){var g=f[d];if(!W0(g,h))return!1}}return!0}function q0(i,e){var t=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=i.canonicalID();if(!r)return!1;if(e.type==="Polygon"){var s=Kl(e.coordinates,n,r),o=_h(i.geometry(),t,n,r);if(!Ys(t,n))return!1;for(var a=0,l=o;a<l.length;a+=1){var u=l[a];if(!Md(u,s))return!1}}if(e.type==="MultiPolygon"){var h=Fd(e.coordinates,n,r),c=_h(i.geometry(),t,n,r);if(!Ys(t,n))return!1;for(var d=0,f=c;d<f.length;d+=1){var g=f[d];if(!Z0(g,h))return!1}}return!0}var Bt=function(e,t){this.type=U,this.geojson=e,this.geometries=t};Bt.parse=function(e,t){if(e.length!==2)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(Ws(e[1])){var n=e[1];if(n.type==="FeatureCollection")for(var r=0;r<n.features.length;++r){var s=n.features[r].geometry.type;if(s==="Polygon"||s==="MultiPolygon")return new Bt(n,n.features[r].geometry)}else if(n.type==="Feature"){var o=n.geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new Bt(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new Bt(n,n)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")};Bt.prototype.evaluate=function(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return K0(e,this.geometries);if(e.geometryType()==="LineString")return q0(e,this.geometries)}return!1};Bt.prototype.eachChild=function(){};Bt.prototype.outputDefined=function(){return!0};Bt.prototype.serialize=function(){return["within",this.geojson]};var ql=Bt;function vo(i){if(i instanceof Jn){if(i.name==="get"&&i.args.length===1)return!1;if(i.name==="feature-state")return!1;if(i.name==="has"&&i.args.length===1)return!1;if(i.name==="properties"||i.name==="geometry-type"||i.name==="id")return!1;if(/^filter-/.test(i.name))return!1}if(i instanceof ql)return!1;var e=!0;return i.eachChild(function(t){e&&!vo(t)&&(e=!1)}),e}function Hl(i){if(i instanceof Jn&&i.name==="feature-state")return!1;var e=!0;return i.eachChild(function(t){e&&!Hl(t)&&(e=!1)}),e}function Jl(i,e){if(i instanceof Jn&&e.indexOf(i.name)>=0)return!1;var t=!0;return i.eachChild(function(n){t&&!Jl(n,e)&&(t=!1)}),t}var en=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};en.parse=function(e,t){if(e.length!==2||typeof e[1]!="string")return t.error("'var' expression requires exactly one string literal argument.");var n=e[1];return t.scope.has(n)?new en(n,t.scope.get(n)):t.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)};en.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)};en.prototype.eachChild=function(){};en.prototype.outputDefined=function(){return!1};en.prototype.serialize=function(){return["var",this.name]};var Ld=en,tn=function(e,t,n,r,s){t===void 0&&(t=[]),r===void 0&&(r=new P0),s===void 0&&(s=[]),this.registry=e,this.path=t,this.key=t.map(function(o){return"["+o+"]"}).join(""),this.scope=r,this.errors=s,this.expectedType=n};tn.prototype.parse=function(e,t,n,r,s){return s===void 0&&(s={}),t?this.concat(t,n,r)._parse(e,s):this._parse(e,s)};tn.prototype._parse=function(e,t){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);function n(h,c,d){return d==="assert"?new Wt(c,[h]):d==="coerce"?new An(c,[h]):h}if(Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=e[0];if(typeof r!="string")return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var s=this.registry[r];if(s){var o=s.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,l=o.type;if((a.kind==="string"||a.kind==="number"||a.kind==="boolean"||a.kind==="object"||a.kind==="array")&&l.kind==="value")o=n(o,a,t.typeAnnotation||"assert");else if((a.kind==="color"||a.kind==="formatted"||a.kind==="resolvedImage")&&(l.kind==="value"||l.kind==="string"))o=n(o,a,t.typeAnnotation||"coerce");else if(this.checkSubtype(a,l))return null}if(!(o instanceof Vs)&&o.type.kind!=="resolvedImage"&&za(o)){var u=new Id;try{o=new Vs(o.type,o.evaluate(u))}catch(h){return this.error(h.message),null}}return o}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):typeof e=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")};tn.prototype.concat=function(e,t,n){var r=typeof e=="number"?this.path.concat(e):this.path,s=n?this.scope.concat(n):this.scope;return new tn(this.registry,r,t||null,s,this.errors)};tn.prototype.error=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];var r=""+this.key+t.map(function(s){return"["+s+"]"}).join("");this.errors.push(new bt(r,e))};tn.prototype.checkSubtype=function(e,t){var n=Pr(e,t);return n&&this.error(n),n};var Ad=tn;function za(i){if(i instanceof Ld)return za(i.boundExpression);if(i instanceof Jn&&i.name==="error")return!1;if(i instanceof Sd)return!1;if(i instanceof ql)return!1;var e=i instanceof An||i instanceof Wt,t=!0;return i.eachChild(function(n){e?t=t&&za(n):t=t&&n instanceof Vs}),t?vo(i)&&Jl(i,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function kd(i,e){for(var t=i.length-1,n=0,r=t,s=0,o,a;n<=r;)if(s=Math.floor((n+r)/2),o=i[s],a=i[s+1],o<=e){if(s===t||e<a)return s;n=s+1}else if(o>e)r=s-1;else throw new Ae("Input is not a number.");return 0}var nn=function(e,t,n){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var r=0,s=n;r<s.length;r+=1){var o=s[r],a=o[0],l=o[1];this.labels.push(a),this.outputs.push(l)}};nn.parse=function(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.");var n=t.parse(e[1],1,F);if(!n)return null;var r=[],s=null;t.expectedType&&t.expectedType.kind!=="value"&&(s=t.expectedType);for(var o=1;o<e.length;o+=2){var a=o===1?-1/0:e[o],l=e[o+1],u=o,h=o+1;if(typeof a!="number")return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',u);if(r.length&&r[r.length-1][0]>=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var c=t.parse(l,h,s);if(!c)return null;s=s||c.type,r.push([a,c])}return new nn(s,n,r)};nn.prototype.evaluate=function(e){var t=this.labels,n=this.outputs;if(t.length===1)return n[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);var s=t.length;if(r>=t[s-1])return n[s-1].evaluate(e);var o=kd(t,r);return n[o].evaluate(e)};nn.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t<n.length;t+=1){var r=n[t];e(r)}};nn.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})};nn.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var Od=nn,H0=$n;function $n(i,e,t,n){this.cx=3*i,this.bx=3*(t-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=n,this.p2x=t,this.p2y=n}$n.prototype.sampleCurveX=function(i){return((this.ax*i+this.bx)*i+this.cx)*i};$n.prototype.sampleCurveY=function(i){return((this.ay*i+this.by)*i+this.cy)*i};$n.prototype.sampleCurveDerivativeX=function(i){return(3*this.ax*i+2*this.bx)*i+this.cx};$n.prototype.solveCurveX=function(i,e){typeof e>"u"&&(e=1e-6);var t,n,r,s,o;for(r=i,o=0;o<8;o++){if(s=this.sampleCurveX(r)-i,Math.abs(s)<e)return r;var a=this.sampleCurveDerivativeX(r);if(Math.abs(a)<1e-6)break;r=r-s/a}if(t=0,n=1,r=i,r<t)return t;if(r>n)return n;for(;t<n;){if(s=this.sampleCurveX(r),Math.abs(s-i)<e)return r;i>s?t=r:n=r,r=(n-t)*.5+t}return r};$n.prototype.solve=function(i,e){return this.sampleCurveY(this.solveCurveX(i,e))};var J0=Ed(H0);function Qe(i,e,t){return i*(1-t)+e*t}function $0(i,e,t){return new et(Qe(i.r,e.r,t),Qe(i.g,e.g,t),Qe(i.b,e.b,t),Qe(i.a,e.a,t))}function Q0(i,e,t){return i.map(function(n,r){return Qe(n,e[r],t)})}var ev=Object.freeze({__proto__:null,number:Qe,color:$0,array:Q0}),Dd=.95047,zd=1,Nd=1.08883,Gd=4/29,Gn=6/29,jd=3*Gn*Gn,tv=Gn*Gn*Gn,iv=Math.PI/180,nv=180/Math.PI;function ea(i){return i>tv?Math.pow(i,1/3):i/jd+Gd}function ta(i){return i>Gn?i*i*i:jd*(i-Gd)}function ia(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function na(i){return i/=255,i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Xd(i){var e=na(i.r),t=na(i.g),n=na(i.b),r=ea((.4124564*e+.3575761*t+.1804375*n)/Dd),s=ea((.2126729*e+.7151522*t+.072175*n)/zd),o=ea((.0193339*e+.119192*t+.9503041*n)/Nd);return{l:116*s-16,a:500*(r-s),b:200*(s-o),alpha:i.a}}function Wd(i){var e=(i.l+16)/116,t=isNaN(i.a)?e:e+i.a/500,n=isNaN(i.b)?e:e-i.b/200;return e=zd*ta(e),t=Dd*ta(t),n=Nd*ta(n),new et(ia(3.2404542*t-1.5371385*e-.4985314*n),ia(-.969266*t+1.8760108*e+.041556*n),ia(.0556434*t-.2040259*e+1.0572252*n),i.alpha)}function rv(i,e,t){return{l:Qe(i.l,e.l,t),a:Qe(i.a,e.a,t),b:Qe(i.b,e.b,t),alpha:Qe(i.alpha,e.alpha,t)}}function sv(i){var e=Xd(i),t=e.l,n=e.a,r=e.b,s=Math.atan2(r,n)*nv;return{h:s<0?s+360:s,c:Math.sqrt(n*n+r*r),l:t,alpha:i.a}}function ov(i){var e=i.h*iv,t=i.c,n=i.l;return Wd({l:n,a:Math.cos(e)*t,b:Math.sin(e)*t,alpha:i.alpha})}function av(i,e,t){var n=e-i;return i+t*(n>180||n<-180?n-360*Math.round(n/360):n)}function lv(i,e,t){return{h:av(i.h,e.h,t),c:Qe(i.c,e.c,t),l:Qe(i.l,e.l,t),alpha:Qe(i.alpha,e.alpha,t)}}var cs={forward:Xd,reverse:Wd,interpolate:rv},ds={forward:sv,reverse:ov,interpolate:lv},Qt=function(e,t,n,r,s){this.type=e,this.operator=t,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var o=0,a=s;o<a.length;o+=1){var l=a[o],u=l[0],h=l[1];this.labels.push(u),this.outputs.push(h)}};Qt.interpolationFactor=function(e,t,n,r){var s=0;if(e.name==="exponential")s=ra(t,e.base,n,r);else if(e.name==="linear")s=ra(t,1,n,r);else if(e.name==="cubic-bezier"){var o=e.controlPoints,a=new J0(o[0],o[1],o[2],o[3]);s=a.solve(ra(t,1,n,r))}return s};Qt.parse=function(e,t){var n=e[0],r=e[1],s=e[2],o=e.slice(3);if(!Array.isArray(r)||r.length===0)return t.error("Expected an interpolation type expression.",1);if(r[0]==="linear")r={name:"linear"};else if(r[0]==="exponential"){var a=r[1];if(typeof a!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:a}}else if(r[0]==="cubic-bezier"){var l=r.slice(1);if(l.length!==4||l.some(function(_){return typeof _!="number"||_<0||_>1}))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:l}}else return t.error("Unknown interpolation type "+String(r[0]),1,0);if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(s=t.parse(s,2,F),!s)return null;var u=[],h=null;n==="interpolate-hcl"||n==="interpolate-lab"?h=qt:t.expectedType&&t.expectedType.kind!=="value"&&(h=t.expectedType);for(var c=0;c<o.length;c+=2){var d=o[c],f=o[c+1],g=c+3,p=c+4;if(typeof d!="number")return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',g);if(u.length&&u[u.length-1][0]>=d)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',g);var m=t.parse(f,p,h);if(!m)return null;h=h||m.type,u.push([d,m])}return h.kind!=="number"&&h.kind!=="color"&&!(h.kind==="array"&&h.itemType.kind==="number"&&typeof h.N=="number")?t.error("Type "+fe(h)+" is not interpolatable."):new Qt(h,n,r,s,u)};Qt.prototype.evaluate=function(e){var t=this.labels,n=this.outputs;if(t.length===1)return n[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);var s=t.length;if(r>=t[s-1])return n[s-1].evaluate(e);var o=kd(t,r),a=t[o],l=t[o+1],u=Qt.interpolationFactor(this.interpolation,r,a,l),h=n[o].evaluate(e),c=n[o+1].evaluate(e);return this.operator==="interpolate"?ev[this.type.kind.toLowerCase()](h,c,u):this.operator==="interpolate-hcl"?ds.reverse(ds.interpolate(ds.forward(h),ds.forward(c),u)):cs.reverse(cs.interpolate(cs.forward(h),cs.forward(c),u))};Qt.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t<n.length;t+=1){var r=n[t];e(r)}};Qt.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})};Qt.prototype.serialize=function(){var e;this.interpolation.name==="linear"?e=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?e=["linear"]:e=["exponential",this.interpolation.base]:e=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],n=0;n<this.labels.length;n++)t.push(this.labels[n],this.outputs[n].serialize());return t};function ra(i,e,t,n){var r=n-t,s=i-t;return r===0?0:e===1?s/r:(Math.pow(e,s)-1)/(Math.pow(e,r)-1)}var Bi=Qt,vi=function(e,t){this.type=e,this.args=t};vi.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var n=null,r=t.expectedType;r&&r.kind!=="value"&&(n=r);for(var s=[],o=0,a=e.slice(1);o<a.length;o+=1){var l=a[o],u=t.parse(l,1+s.length,n,void 0,{typeAnnotation:"omit"});if(!u)return null;n=n||u.type,s.push(u)}var h=r&&s.some(function(c){return Pr(r,c.type)});return h?new vi(K,s):new vi(n,s)};vi.prototype.evaluate=function(e){for(var t=null,n=0,r,s=0,o=this.args;s<o.length;s+=1){var a=o[s];if(n++,t=a.evaluate(e),t&&t instanceof Hn&&!t.available&&(r||(r=t),t=null,n===this.args.length))return r;if(t!==null)break}return t};vi.prototype.eachChild=function(e){this.args.forEach(e)};vi.prototype.outputDefined=function(){return this.args.every(function(e){return e.outputDefined()})};vi.prototype.serialize=function(){var e=["coalesce"];return this.eachChild(function(t){e.push(t.serialize())}),e};var Vd=vi,rn=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};rn.prototype.evaluate=function(e){return this.result.evaluate(e)};rn.prototype.eachChild=function(e){for(var t=0,n=this.bindings;t<n.length;t+=1){var r=n[t];e(r[1])}e(this.result)};rn.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var n=[],r=1;r<e.length-1;r+=2){var s=e[r];if(typeof s!="string")return t.error("Expected string, but found "+typeof s+" instead.",r);if(/[^a-zA-Z0-9_]/.test(s))return t.error("Variable names must contain only alphanumeric characters or '_'.",r);var o=t.parse(e[r+1],r+1);if(!o)return null;n.push([s,o])}var a=t.parse(e[e.length-1],e.length-1,t.expectedType,n);return a?new rn(n,a):null};rn.prototype.outputDefined=function(){return this.result.outputDefined()};rn.prototype.serialize=function(){for(var e=["let"],t=0,n=this.bindings;t<n.length;t+=1){var r=n[t],s=r[0],o=r[1];e.push(s,o.serialize())}return e.push(this.result.serialize()),e};var Yd=rn,sn=function(e,t,n){this.type=e,this.index=t,this.input=n};sn.parse=function(e,t){if(e.length!==3)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,F),r=t.parse(e[2],2,ot(t.expectedType||K));if(!n||!r)return null;var s=r.type;return new sn(s.itemType,n,r)};sn.prototype.evaluate=function(e){var t=this.index.evaluate(e),n=this.input.evaluate(e);if(t<0)throw new Ae("Array index out of bounds: "+t+" < 0.");if(t>=n.length)throw new Ae("Array index out of bounds: "+t+" > "+(n.length-1)+".");if(t!==Math.floor(t))throw new Ae("Array index must be an integer, but found "+t+" instead.");return n[t]};sn.prototype.eachChild=function(e){e(this.index),e(this.input)};sn.prototype.outputDefined=function(){return!1};sn.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var uv=sn,on=function(e,t){this.type=U,this.needle=e,this.haystack=t};on.parse=function(e,t){if(e.length!==3)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,K),r=t.parse(e[2],2,K);return!n||!r?null:Vl(n.type,[U,ee,F,mo,K])?new on(n,r):t.error("Expected first argument to be of type boolean, string, number or null, but found "+fe(n.type)+" instead")};on.prototype.evaluate=function(e){var t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(n==null)return!1;if(!Lr(t,["boolean","string","number","null"]))throw new Ae("Expected first argument to be of type boolean, string, number or null, but found "+fe(Ee(t))+" instead.");if(!Lr(n,["string","array"]))throw new Ae("Expected second argument to be of type array or string, but found "+fe(Ee(n))+" instead.");return n.indexOf(t)>=0};on.prototype.eachChild=function(e){e(this.needle),e(this.haystack)};on.prototype.outputDefined=function(){return!0};on.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var hv=on,xi=function(e,t,n){this.type=F,this.needle=e,this.haystack=t,this.fromIndex=n};xi.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,K),r=t.parse(e[2],2,K);if(!n||!r)return null;if(!Vl(n.type,[U,ee,F,mo,K]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+fe(n.type)+" instead");if(e.length===4){var s=t.parse(e[3],3,F);return s?new xi(n,r,s):null}else return new xi(n,r)};xi.prototype.evaluate=function(e){var t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!Lr(t,["boolean","string","number","null"]))throw new Ae("Expected first argument to be of type boolean, string, number or null, but found "+fe(Ee(t))+" instead.");if(!Lr(n,["string","array"]))throw new Ae("Expected second argument to be of type array or string, but found "+fe(Ee(n))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(e);return n.indexOf(t,r)}return n.indexOf(t)};xi.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)};xi.prototype.outputDefined=function(){return!1};xi.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var cv=xi,an=function(e,t,n,r,s,o){this.inputType=e,this.type=t,this.input=n,this.cases=r,this.outputs=s,this.otherwise=o};an.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!==1)return t.error("Expected an even number of arguments.");var n,r;t.expectedType&&t.expectedType.kind!=="value"&&(r=t.expectedType);for(var s={},o=[],a=2;a<e.length-1;a+=2){var l=e[a],u=e[a+1];Array.isArray(l)||(l=[l]);var h=t.concat(a);if(l.length===0)return h.error("Expected at least one branch label.");for(var c=0,d=l;c<d.length;c+=1){var f=d[c];if(typeof f!="number"&&typeof f!="string")return h.error("Branch labels must be numbers or strings.");if(typeof f=="number"&&Math.abs(f)>Number.MAX_SAFE_INTEGER)return h.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof f=="number"&&Math.floor(f)!==f)return h.error("Numeric branch labels must be integer values.");if(!n)n=Ee(f);else if(h.checkSubtype(n,Ee(f)))return null;if(typeof s[String(f)]<"u")return h.error("Branch labels must be unique.");s[String(f)]=o.length}var g=t.parse(u,a,r);if(!g)return null;r=r||g.type,o.push(g)}var p=t.parse(e[1],1,K);if(!p)return null;var m=t.parse(e[e.length-1],e.length-1,r);return!m||p.type.kind!=="value"&&t.concat(1).checkSubtype(n,p.type)?null:new an(n,r,p,s,o,m)};an.prototype.evaluate=function(e){var t=this.input.evaluate(e),n=Ee(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise;return n.evaluate(e)};an.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)};an.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})&&this.otherwise.outputDefined()};an.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],n=Object.keys(this.cases).sort(),r=[],s={},o=0,a=n;o<a.length;o+=1){var l=a[o],u=s[this.cases[l]];u===void 0?(s[this.cases[l]]=r.length,r.push([this.cases[l],[l]])):r[u][1].push(l)}for(var h=function(p){return e.inputType.kind==="number"?Number(p):p},c=0,d=r;c<d.length;c+=1){var f=d[c],u=f[0],g=f[1];g.length===1?t.push(h(g[0])):t.push(g.map(h)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var dv=an,ln=function(e,t,n){this.type=e,this.branches=t,this.otherwise=n};ln.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!==0)return t.error("Expected an odd number of arguments.");var n;t.expectedType&&t.expectedType.kind!=="value"&&(n=t.expectedType);for(var r=[],s=1;s<e.length-1;s+=2){var o=t.parse(e[s],s,U);if(!o)return null;var a=t.parse(e[s+1],s+1,n);if(!a)return null;r.push([o,a]),n=n||a.type}var l=t.parse(e[e.length-1],e.length-1,n);return l?new ln(n,r,l):null};ln.prototype.evaluate=function(e){for(var t=0,n=this.branches;t<n.length;t+=1){var r=n[t],s=r[0],o=r[1];if(s.evaluate(e))return o.evaluate(e)}return this.otherwise.evaluate(e)};ln.prototype.eachChild=function(e){for(var t=0,n=this.branches;t<n.length;t+=1){var r=n[t],s=r[0],o=r[1];e(s),e(o)}e(this.otherwise)};ln.prototype.outputDefined=function(){return this.branches.every(function(e){e[0];var t=e[1];return t.outputDefined()})&&this.otherwise.outputDefined()};ln.prototype.serialize=function(){var e=["case"];return this.eachChild(function(t){e.push(t.serialize())}),e};var fv=ln,Ei=function(e,t,n,r){this.type=e,this.input=t,this.beginIndex=n,this.endIndex=r};Ei.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,K),r=t.parse(e[2],2,F);if(!n||!r)return null;if(!Vl(n.type,[ot(K),ee,K]))return t.error("Expected first argument to be of type array or string, but found "+fe(n.type)+" instead");if(e.length===4){var s=t.parse(e[3],3,F);return s?new Ei(n.type,n,r,s):null}else return new Ei(n.type,n,r)};Ei.prototype.evaluate=function(e){var t=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!Lr(t,["string","array"]))throw new Ae("Expected first argument to be of type array or string, but found "+fe(Ee(t))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(e);return t.slice(n,r)}return t.slice(n)};Ei.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)};Ei.prototype.outputDefined=function(){return!1};Ei.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var gv=Ei;function vh(i,e){return i==="=="||i==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function pv(i,e,t){return e===t}function mv(i,e,t){return e!==t}function yv(i,e,t){return e<t}function _v(i,e,t){return e>t}function vv(i,e,t){return e<=t}function xv(i,e,t){return e>=t}function Bd(i,e,t,n){return n.compare(e,t)===0}function Ev(i,e,t,n){return!Bd(i,e,t,n)}function wv(i,e,t,n){return n.compare(e,t)<0}function Cv(i,e,t,n){return n.compare(e,t)>0}function Tv(i,e,t,n){return n.compare(e,t)<=0}function Rv(i,e,t,n){return n.compare(e,t)>=0}function Qn(i,e,t){var n=i!=="=="&&i!=="!=";return function(){function r(s,o,a){this.type=U,this.lhs=s,this.rhs=o,this.collator=a,this.hasUntypedArgument=s.type.kind==="value"||o.type.kind==="value"}return r.parse=function(o,a){if(o.length!==3&&o.length!==4)return a.error("Expected two or three arguments.");var l=o[0],u=a.parse(o[1],1,K);if(!u)return null;if(!vh(l,u.type))return a.concat(1).error('"'+l+`" comparisons are not supported for type '`+fe(u.type)+"'.");var h=a.parse(o[2],2,K);if(!h)return null;if(!vh(l,h.type))return a.concat(2).error('"'+l+`" comparisons are not supported for type '`+fe(h.type)+"'.");
11if(u.type.kind!==h.type.kind&&u.type.kind!=="value"&&h.type.kind!=="value")return a.error("Cannot compare types '"+fe(u.type)+"' and '"+fe(h.type)+"'.");n&&(u.type.kind==="value"&&h.type.kind!=="value"?u=new Wt(h.type,[u]):u.type.kind!=="value"&&h.type.kind==="value"&&(h=new Wt(u.type,[h])));var c=null;if(o.length===4){if(u.type.kind!=="string"&&h.type.kind!=="string"&&u.type.kind!=="value"&&h.type.kind!=="value")return a.error("Cannot use collator to compare non-string types.");if(c=a.parse(o[3],3,yo),!c)return null}return new r(u,h,c)},r.prototype.evaluate=function(o){var a=this.lhs.evaluate(o),l=this.rhs.evaluate(o);if(n&&this.hasUntypedArgument){var u=Ee(a),h=Ee(l);if(u.kind!==h.kind||!(u.kind==="string"||u.kind==="number"))throw new Ae('Expected arguments for "'+i+'" to be (string, string) or (number, number), but found ('+u.kind+", "+h.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var c=Ee(a),d=Ee(l);if(c.kind!=="string"||d.kind!=="string")return e(o,a,l)}return this.collator?t(o,a,l,this.collator.evaluate(o)):e(o,a,l)},r.prototype.eachChild=function(o){o(this.lhs),o(this.rhs),this.collator&&o(this.collator)},r.prototype.outputDefined=function(){return!0},r.prototype.serialize=function(){var o=[i];return this.eachChild(function(a){o.push(a.serialize())}),o},r}()}var bv=Qn("==",pv,Bd),Iv=Qn("!=",mv,Ev),Sv=Qn("<",yv,wv),Mv=Qn(">",_v,Cv),Fv=Qn("<=",vv,Tv),Pv=Qn(">=",xv,Rv),un=function(e,t,n,r,s,o){this.type=ee,this.number=e,this.locale=t,this.currency=n,this.unit=r,this.minFractionDigits=s,this.maxFractionDigits=o};un.parse=function(e,t){if(e.length!==3)return t.error("Expected two arguments.");var n=t.parse(e[1],1,F);if(!n)return null;var r=e[2];if(typeof r!="object"||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");var s=null;if(r.locale&&(s=t.parse(r.locale,1,ee),!s))return null;var o=null;if(r.currency&&(o=t.parse(r.currency,1,ee),!o))return null;var a=null;if(r.unit&&(a=t.parse(r.unit,1,ee),!a))return null;var l=null;if(r["min-fraction-digits"]&&(l=t.parse(r["min-fraction-digits"],1,F),!l))return null;var u=null;return r["max-fraction-digits"]&&(u=t.parse(r["max-fraction-digits"],1,F),!u)?null:new un(n,s,o,a,l,u)};un.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency&&"currency"||this.unit&&"unit"||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.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))};un.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)};un.prototype.outputDefined=function(){return!1};un.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Lv=un,hn=function(e){this.type=F,this.input=e};hn.parse=function(e,t){if(e.length!==2)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?t.error("Expected argument of type string or array, but found "+fe(n.type)+" instead."):new hn(n):null};hn.prototype.evaluate=function(e){var t=this.input.evaluate(e);if(typeof t=="string")return t.length;if(Array.isArray(t))return t.length;throw new Ae("Expected value to be of type string or array, but found "+fe(Ee(t))+" instead.")};hn.prototype.eachChild=function(e){e(this.input)};hn.prototype.outputDefined=function(){return!1};hn.prototype.serialize=function(){var e=["length"];return this.eachChild(function(t){e.push(t.serialize())}),e};var Av=hn,Zd={"==":bv,"!=":Iv,">":Mv,"<":Sv,">=":Pv,"<=":Fv,array:Wt,at:uv,boolean:Wt,case:fv,coalesce:Vd,collator:Sd,format:Rd,image:bd,in:hv,"index-of":cv,interpolate:Bi,"interpolate-hcl":Bi,"interpolate-lab":Bi,length:Av,let:Yd,literal:Vs,match:dv,number:Wt,"number-format":Lv,object:Wt,slice
vendor: 16,038 bytes, line 11
11:gv,step:Od,string:Wt,"to-boolean":An,"to-color":An,"to-number":An,"to-string":An,var:Ld,within:ql};function xh(i,e){var t=e[0],n=e[1],r=e[2],s=e[3];t=t.evaluate(i),n=n.evaluate(i),r=r.evaluate(i);var o=s?s.evaluate(i):1,a=Cd(t,n,r,o);if(a)throw new Ae(a);return new et(t/255*o,n/255*o,r/255*o,o)}function Eh(i,e){return i in e}function sa(i,e){var t=e[i];return typeof t>"u"?null:t}function kv(i,e,t,n){for(;t<=n;){var r=t+n>>1;if(e[r]===i)return!0;e[r]>i?n=r-1:t=r+1}return!1}function zi(i){return{type:i}}Jn.register(Zd,{error:[L0,[ee],function(i,e){var t=e[0];throw new Ae(t.evaluate(i))}],typeof:[ee,[K],function(i,e){var t=e[0];return fe(Ee(t.evaluate(i)))}],"to-rgba":[ot(F,4),[qt],function(i,e){var t=e[0];return t.evaluate(i).toArray()}],rgb:[qt,[F,F,F],xh],rgba:[qt,[F,F,F,F],xh],has:{type:U,overloads:[[[ee],function(i,e){var t=e[0];return Eh(t.evaluate(i),i.properties())}],[[ee,Nn],function(i,e){var t=e[0],n=e[1];return Eh(t.evaluate(i),n.evaluate(i))}]]},get:{type:K,overloads:[[[ee],function(i,e){var t=e[0];return sa(t.evaluate(i),i.properties())}],[[ee,Nn],function(i,e){var t=e[0],n=e[1];return sa(t.evaluate(i),n.evaluate(i))}]]},"feature-state":[K,[ee],function(i,e){var t=e[0];return sa(t.evaluate(i),i.featureState||{})}],properties:[Nn,[],function(i){return i.properties()}],"geometry-type":[ee,[],function(i){return i.geometryType()}],id:[K,[],function(i){return i.id()}],zoom:[F,[],function(i){return i.globals.zoom}],pitch:[F,[],function(i){return i.globals.pitch||0}],"distance-from-center":[F,[],function(i){return i.distanceFromCenter()}],"heatmap-density":[F,[],function(i){return i.globals.heatmapDensity||0}],"line-progress":[F,[],function(i){return i.globals.lineProgress||0}],"sky-radial-progress":[F,[],function(i){return i.globals.skyRadialProgress||0}],accumulated:[K,[],function(i){return i.globals.accumulated===void 0?null:i.globals.accumulated}],"+":[F,zi(F),function(i,e){for(var t=0,n=0,r=e;n<r.length;n+=1){var s=r[n];t+=s.evaluate(i)}return t}],"*":[F,zi(F),function(i,e){for(var t=1,n=0,r=e;n<r.length;n+=1){var s=r[n];t*=s.evaluate(i)}return t}],"-":{type:F,overloads:[[[F,F],function(i,e){var t=e[0],n=e[1];return t.evaluate(i)-n.evaluate(i)}],[[F],function(i,e){var t=e[0];return-t.evaluate(i)}]]},"/":[F,[F,F],function(i,e){var t=e[0],n=e[1];return t.evaluate(i)/n.evaluate(i)}],"%":[F,[F,F],function(i,e){var t=e[0],n=e[1];return t.evaluate(i)%n.evaluate(i)}],ln2:[F,[],function(){return Math.LN2}],pi:[F,[],function(){return Math.PI}],e:[F,[],function(){return Math.E}],"^":[F,[F,F],function(i,e){var t=e[0],n=e[1];return Math.pow(t.evaluate(i),n.evaluate(i))}],sqrt:[F,[F],function(i,e){var t=e[0];return Math.sqrt(t.evaluate(i))}],log10:[F,[F],function(i,e){var t=e[0];return Math.log(t.evaluate(i))/Math.LN10}],ln:[F,[F],function(i,e){var t=e[0];return Math.log(t.evaluate(i))}],log2:[F,[F],function(i,e){var t=e[0];return Math.log(t.evaluate(i))/Math.LN2}],sin:[F,[F],function(i,e){var t=e[0];return Math.sin(t.evaluate(i))}],cos:[F,[F],function(i,e){var t=e[0];return Math.cos(t.evaluate(i))}],tan:[F,[F],function(i,e){var t=e[0];return Math.tan(t.evaluate(i))}],asin:[F,[F],function(i,e){var t=e[0];return Math.asin(t.evaluate(i))}],acos:[F,[F],function(i,e){var t=e[0];return Math.acos(t.evaluate(i))}],atan:[F,[F],function(i,e){var t=e[0];return Math.atan(t.evaluate(i))}],min:[F,zi(F),function(i,e){return Math.min.apply(Math,e.map(function(t){return t.evaluate(i)}))}],max:[F,zi(F),function(i,e){return Math.max.apply(Math,e.map(function(t){return t.evaluate(i)}))}],abs:[F,[F],function(i,e){var t=e[0];return Math.abs(t.evaluate(i))}],round:[F,[F],function(i,e){var t=e[0],n=t.evaluate(i);return n<0?-Math.round(-n):Math.round(n)}],floor:[F,[F],function(i,e){var t=e[0];return Math.floor(t.evaluate(i))}],ceil:[F,[F],function(i,e){var t=e[0];return Math.ceil(t.evaluate(i))}],"filter-==":[U,[ee,K],function(i,e){var t=e[0],n=e[1];return i.properties()[t.value]===n.value}],"filter-id-==":[U,[K],function(i,e){var t=e[0];return i.id()===t.value}],"filter-type-==":[U,[ee],function(i,e){var t=e[0];return i.geometryType()===t.value}],"filter-<":[U,[ee,K],function(i,e){var t=e[0],n=e[1],r=i.properties()[t.value],s=n.value;return typeof r==typeof s&&r<s}],"filter-id-<":[U,[K],function(i,e){var t=e[0],n=i.id(),r=t.value;return typeof n==typeof r&&n<r}],"filter->":[U,[ee,K],function(i,e){var t=e[0],n=e[1],r=i.properties()[t.value],s=n.value;return typeof r==typeof s&&r>s}],"filter-id->":[U,[K],function(i,e){var t=e[0],n=i.id(),r=t.value;return typeof n==typeof r&&n>r}],"filter-<=":[U,[ee,K],function(i,e){var t=e[0],n=e[1],r=i.properties()[t.value],s=n.value;return typeof r==typeof s&&r<=s}],"filter-id-<=":[U,[K],function(i,e){var t=e[0],n=i.id(),r=t.value;return typeof n==typeof r&&n<=r}],"filter->=":[U,[ee,K],function(i,e){var t=e[0],n=e[1],r=i.properties()[t.value],s=n.value;return typeof r==typeof s&&r>=s}],"filter-id->=":[U,[K],function(i,e){var t=e[0],n=i.id(),r=t.value;return typeof n==typeof r&&n>=r}],"filter-has":[U,[K],function(i,e){var t=e[0];return t.value in i.properties()}],"filter-has-id":[U,[],function(i){return i.id()!==null&&i.id()!==void 0}],"filter-type-in":[U,[ot(ee)],function(i,e){var t=e[0];return t.value.indexOf(i.geometryType())>=0}],"filter-id-in":[U,[ot(K)],function(i,e){var t=e[0];return t.value.indexOf(i.id())>=0}],"filter-in-small":[U,[ee,ot(K)],function(i,e){var t=e[0],n=e[1];return n.value.indexOf(i.properties()[t.value])>=0}],"filter-in-large":[U,[ee,ot(K)],function(i,e){var t=e[0],n=e[1];return kv(i.properties()[t.value],n.value,0,n.value.length-1)}],all:{type:U,overloads:[[[U,U],function(i,e){var t=e[0],n=e[1];return t.evaluate(i)&&n.evaluate(i)}],[zi(U),function(i,e){for(var t=0,n=e;t<n.length;t+=1){var r=n[t];if(!r.evaluate(i))return!1}return!0}]]},any:{type:U,overloads:[[[U,U],function(i,e){var t=e[0],n=e[1];return t.evaluate(i)||n.evaluate(i)}],[zi(U),function(i,e){for(var t=0,n=e;t<n.length;t+=1){var r=n[t];if(r.evaluate(i))return!0}return!1}]]},"!":[U,[U],function(i,e){var t=e[0];return!t.evaluate(i)}],"is-supported-script":[U,[ee],function(i,e){var t=e[0],n=i.globals&&i.globals.isSupportedScript;return n?n(t.evaluate(i)):!0}],upcase:[ee,[ee],function(i,e){var t=e[0];return t.evaluate(i).toUpperCase()}],downcase:[ee,[ee],function(i,e){var t=e[0];return t.evaluate(i).toLowerCase()}],concat:[ee,zi(K),function(i,e){return e.map(function(t){return mr(t.evaluate(i))}).join("")}],"resolved-locale":[ee,[yo],function(i,e){var t=e[0];return t.evaluate(i).resolvedLocale()}]});var Ud=Zd;function Na(i){return{result:"success",value:i}}function Fn(i){return{result:"error",value:i}}function Ov(i){return i["property-type"]==="data-driven"}function Dv(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function zv(i){return!!i.expression&&i.expression.interpolated}function Kd(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}var $l=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new Id,this._defaultValue=t?Xv(t):null,this._enumValues=t&&t.type==="enum"?t.values:null};$l.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,s,o,a,l){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=n,this._evaluator.canonical=r||null,this._evaluator.availableImages=s||null,this._evaluator.formattedSection=o,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)};$l.prototype.evaluate=function(e,t,n,r,s,o,a,l){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r||null,this._evaluator.availableImages=s||null,this._evaluator.formattedSection=o||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null;try{var u=this.expression.evaluate(this._evaluator);if(u==null||typeof u=="number"&&u!==u)return this._defaultValue;if(this._enumValues&&!(u in this._enumValues))throw new Ae("Expected value to be one of "+Object.keys(this._enumValues).map(function(h){return JSON.stringify(h)}).join(", ")+", but found "+JSON.stringify(u)+" instead.");return u}catch(h){return this._warningHistory[h.message]||(this._warningHistory[h.message]=!0,typeof console<"u"&&console.warn(h.message)),this._defaultValue}};function Nv(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Ud}function Ga(i,e){var t=new Ad(Ud,[],e?jv(e):void 0),n=t.parse(i,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return n?Na(new $l(n,e)):Fn(t.errors)}var Bs=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!Hl(t.expression)};Bs.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,s,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,s,o)};Bs.prototype.evaluate=function(e,t,n,r,s,o){return this._styleExpression.evaluate(e,t,n,r,s,o)};var kr=function(e,t,n,r){this.kind=e,this.zoomStops=n,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!Hl(t.expression),this.interpolationType=r};kr.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,s,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,s,o)};kr.prototype.evaluate=function(e,t,n,r,s,o){return this._styleExpression.evaluate(e,t,n,r,s,o)};kr.prototype.interpolationFactor=function(e,t,n){return this.interpolationType?Bi.interpolationFactor(this.interpolationType,e,t,n):0};function Gv(i,e){if(i=Ga(i,e),i.result==="error")return i;var t=i.value.expression,n=vo(t);if(!n&&!Ov(e))return Fn([new bt("","data expressions not supported")]);var r=Jl(t,["zoom","pitch","distance-from-center"]);if(!r&&!Dv(e))return Fn([new bt("","zoom expressions not supported")]);var s=ys(t);if(!s&&!r)return Fn([new bt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(s instanceof bt)return Fn([s]);if(s instanceof Bi&&!zv(e))return Fn([new bt("",'"interpolate" expressions cannot be used with this property')]);if(!s)return Na(n?new Bs("constant",i.value):new Bs("source",i.value));var o=s instanceof Bi?s.interpolation:void 0;return Na(n?new kr("camera",i.value,s.labels,o):new kr("composite",i.value,s.labels,o))}function ys(i){var e=null;if(i instanceof Yd)e=ys(i.result);else if(i instanceof Vd)for(var t=0,n=i.args;t<n.length;t+=1){var r=n[t];if(e=ys(r),e)break}else(i instanceof Od||i instanceof Bi)&&i.input instanceof Jn&&i.input.name==="zoom"&&(e=i);return e instanceof bt||i.eachChild(function(s){var o=ys(s);o instanceof bt?e=o:!e&&o?e=new bt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&o&&e!==o&&(e=new bt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function jv(i){var e={color:qt,string:ee,number:F,enum:ee,boolean:U,formatted:_o,resolvedImage:Yr};return i.type==="array"?ot(e[i.value]||K,i.length):e[i.type]}function Xv(i){return i.type==="color"&&(Kd(i.default)||Array.isArray(i.default))?new et(0,0,0,0):i.type==="color"?et.parse(i.default)||null:i.default===void 0?null:i.default}function Wv(i){return i instanceof Number||i instanceof String||i instanceof Boolean?i.valueOf():i}function ja(i){if(Array.isArray(i))return i.map(ja);if(i instanceof Object&&!(i instanceof Number||i instanceof String||i instanceof Boolean)){var e={};for(var t in i)e[t]=ja(i[t]);return e}return Wv(i)}var qd={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},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:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{},sky:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{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"},"fill-extrusion-edge-radius":{type:"number",private:!0,default:0,minimum:0,maximum:1
vendor: 16,723 bytes, line 11
11,"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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"],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:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"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:{},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",{"symbol-placement":["point"]}],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","feature"]},"property-type":"data-driven"},"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-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"],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"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,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},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},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}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],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:!
vendor: 15,020 bytes, line 11
111,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"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:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"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"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant",type:"number",private:!0,default:0,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant",type:"number",private:!0,default:3,minimum:0,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["fill-extrusion-edge-radius"]}},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:!1,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-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"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function Hd(i){if(i===!0||i===!1)return!0;
vendor: 4,070 bytes, lines 11-17
11if(!Array.isArray(i)||i.length===0)return!1;switch(i[0]){case"has":return i.length>=2&&i[1]!=="$id"&&i[1]!=="$type";case"in":return i.length>=3&&(typeof i[1]!="string"||Array.isArray(i[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return i.length!==3||Array.isArray(i[1])||Array.isArray(i[2]);case"any":case"all":for(var e=0,t=i.slice(1);e<t.length;e+=1){var n=t[e];if(!Hd(n)&&typeof n!="boolean")return!1}return!0;default:return!0}}function Vv(i,e){if(e===void 0&&(e="fill"),i==null)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};Hd(i)||(i=Zs(i));var t=i,n=!0;try{n=Yv(t)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
12This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
13and paste the contents of this message in the report.
14Thank you!
15Filter Expression:
16`+JSON.stringify(t,null,2)+`
17        `)}var r=qd["filter_"+e],s=Ga(n,r),o=null;if(s.result==="error")throw new Error(s.value.map(function(c){return c.key+": "+c.message}).join(", "));o=function(c,d,f){return s.value.evaluate(c,d,{},f)};var a=null,l=null;if(n!==t){var u=Ga(t,r);if(u.result==="error")throw new Error(u.value.map(function(c){return c.key+": "+c.message}).join(", "));a=function(c,d,f,g,p){return u.value.evaluate(c,d,{},f,void 0,void 0,g,p)},l=!vo(u.value.expression)}o=o;var h=Qd(n);return{filter:o,dynamicFilter:a||void 0,needGeometry:h,needFeature:!!l}}function Yv(i){if(!jn(i))return i;var e=ja(i);return $d(e),e=Jd(e),e}function Jd(i){if(!Array.isArray(i))return i;var e=Uv(i);return e===!0?e:e.map(function(t){return Jd(t)})}function $d(i){var e=!1,t=[];if(i[0]==="case"){for(var n=1;n<i.length-1;n+=2)e=e||jn(i[n]),t.push(i[n+1]);t.push(i[i.length-1])}else if(i[0]==="match"){e=e||jn(i[1]);for(var r=2;r<i.length-1;r+=2)t.push(i[r+1]);t.push(i[i.length-1])}else if(i[0]==="step"){e=e||jn(i[1]);for(var s=1;s<i.length-1;s+=2)t.push(i[s+1])}e&&(i.length=0,i.push.apply(i,["any"].concat(t)));for(var o=1;o<i.length;o++)$d(i[o])}function jn(i){if(!Array.isArray(i))return!1;if(Bv(i[0]))return!0;for(var e=1;e<i.length;e++){var t=i[e];if(jn(t))return!0}return!1}function Bv(i){return i==="pitch"||i==="distance-from-center"}var Zv=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function Uv(i){if(Zv.has(i[0]))for(var e=1;e<i.length;e++){var t=i[e];if(jn(t))return!0}return i}function Kv(i,e){return i<e?-1:i>e?1:0}function Qd(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(var e=1;e<i.length;e++)if(Qd(i[e]))return!0;return!1}function Zs(i){if(!i)return!0;var e=i[0];if(i.length<=1)return e!=="any";var t=e==="=="?oa(i[1],i[2],"=="):e==="!="?fs(oa(i[1],i[2],"==")):e==="<"||e===">"||e==="<="||e===">="?oa(i[1],i[2],e):e==="any"?qv(i.slice(1)):e==="all"?["all"].concat(i.slice(1).map(Zs)):e==="none"?["all"].concat(i.slice(1).map(Zs).map(fs)):e==="in"?wh(i[1],i.slice(2)):e==="!in"?fs(wh(i[1],i.slice(2))):e==="has"?Ch(i[1]):e==="!has"?fs(Ch(i[1])):e==="within"?i:!0;return t}function oa(i,e,t){switch(i){case"$type":return["filter-type-"+t,e];case"$id":return["filter-id-"+t,e];default:return["filter-"+t,i,e]}}function qv(i){return["any"].concat(i.map(Zs))}function wh(i,e){if(e.length===0)return!1;switch(i){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?["filter-in-large",i,["literal",e.sort(Kv)]]:["filter-in-small",i,["literal",e]]}}function Ch(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function fs(i){return["!",i]}var Hv=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Jv(i,e){var t={};for(var n in i)n!=="ref"&&(t[n]=i[n]);return Hv.forEach(function(r){r in e&&(t[r]=e[r])}),t}function ef(i){i=i.slice();for(var e=Object.create(null),t=0;t<i.length;t++)e[i[t].id]=i[t];for(var n=0;n<i.length;
17n++)"ref"in i[n]&&(i[n]=Jv(i[n],e[i[n].ref]));return i}var Th={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},ur=" ",Rh=/(italic|oblique)$/i,bh={},$v=function(i,e,t){var n=bh[i];if(!n){Array.isArray(i)||(i=[i]);for(var r=400,s="normal",o=[],a,l,u=0,h=i.length;u<h;++u){var c=i[u],d=c.split(" "),f=d[d.length-1].toLowerCase();f=="normal"||f=="italic"||f=="oblique"?(s=l?s:f,d.pop(),f=d[d.length-1].toLowerCase()):Rh.test(f)&&(f=f.replace(Rh,""),s=l?s:d[d.length-1].replace(f,""));for(var g in Th){var p=d.length>1?d[d.length-2].toLowerCase():"";if(f==g||f==g.replace("-","")||p+"-"+f==g){r=a?r:Th[g],d.pop(),p&&g.startsWith(p)&&d.pop();break}}!a&&typeof f=="number"&&(r=f);var m=d.join(ur).replace("Klokantech Noto Sans","Noto Sans");m.indexOf(ur)!==-1&&(m='"'+m+'"'),o.push(m)}n=bh[i]=[s,r,o]}return n[0]+ur+n[1]+ur+e+"px"+(t?"/"+t:"")+ur+n[2]},Xa=Ed($v);function Qv(i,e){var t=i[0],n=t.width,r=t.height,s=t.data,o=new Uint8ClampedArray(s.length),a=e.resolution*2,l=n-1,u=r-1,h=[0,0,0,0],c=2*Math.PI,d=Math.PI/2,f=Math.PI*e.sunEl/180,g=Math.PI*e.sunAz/180,p=Math.cos(f),m=Math.sin(f),_=e.highlightColor,y=e.shadowColor,x=e.accentColor,v=e.encoding,E,R,T,C,I,P,b,G,j,J,A,z,S,N,te,Y,ue,w,ne,M,L,re;function _e(ce,Se){if(Se===void 0&&(Se="mapbox"),Se==="mapbox")return(ce[0]*256*256+ce[1]*256+ce[2])*.1-1e4;if(Se==="terrarium")return ce[0]*256+ce[1]+ce[2]/256-32768}for(R=0;R<=u;++R)for(I=R===0?0:R-1,P=R===u?u:R+1,E=0;E<=l;++E)T=E===0?0:E-1,C=E===l?l:E+1,b=(R*n+T)*4,h[0]=s[b],h[1]=s[b+1],h[2]=s[b+2],h[3]=s[b+3],G=e.vert*_e(h,v),b=(R*n+C)*4,h[0]=s[b],h[1]=s[b+1],h[2]=s[b+2],h[3]=s[b+3],j=e.vert*_e(h,v),J=(j-G)/a,b=(I*n+E)*4,h[0]=s[b],h[1]=s[b+1],h[2]=s[b+2],h[3]=s[b+3],G=e.vert*_e(h,v),b=(P*n+E)*4,h[0]=s[b],h[1]=s[b+1],h[2]=s[b+2],h[3]=s[b+3],j=e.vert*_e(h,v),A=(j-G)/a,S=Math.atan2(A,-J),S<0?S=d-S:S>d?S=c-S+d:S=d-S,z=Math.atan(Math.sqrt(J*J+A*A)),re=m*Math.cos(z)+p*Math.sin(z)*Math.cos(g-S),N=Math.cos(z),te=255*re,ne=Math.min(Math.max(2*e.sunEl,0),1),M=1.875-e.opacity*1.75,L=e.opacity!==.5?d*((Math.pow(M,z)-1)/(Math.pow(M,d)-1)):z,ue={r:(1-N)*x.r*ne*255,g:(1-N)*x.g*ne*255,b:(1-N)*x.b*ne*255,a:(1-N)*x.a*ne*255},Y=Math.abs(((S+g)/Math.PI+.5)%2-1),w={r:(_.r*(1-Y)+y.r*Y)*te,g:(_.g*(1-Y)+y.g*Y)*te,b:(_.b*(1-Y)+y.b*Y)*te,a:(_.a*(1-Y)+y.a*Y)*te},b=(R*n+E)*4,o[b]=ue.r*(1-Y)+w.r,o[b+1]=ue.g*(1-Y)+w.g,o[b+2]=ue.b*(1-Y)+w.b,o[b+3]=s[b+3]*e.opacity*ne*Math.sin(L);return new ImageData(o,n,r)}var tf="https://api.mapbox.com";function Ql(i){var e="mapbox://";return i.indexOf(e)!==0?"":i.slice(e.length)}function ex(i,e,t){var n=Ql(i);if(!n)return decodeURI(new URL(i,t).href);var r="sprites/";if(n.indexOf(r)!==0)throw new Error("unexpected sprites url: "+i);var s=n.slice(r.length);return tf+"/styles/v1/"+s+"/sprite?access_token="+e}function Us(i,e){var t=Ql(i);if(!t)return decodeURI(new URL(i,location.href).href);var n="styles/";if(t.indexOf(n)!==0)throw new Error("unexpected style url: "+i);var r=t.slice(n.length);return tf+"/styles/v1/"+r+"?&access_token="+e}function _s(i,e,t,n){var r=new URL(i,n),s=Ql(i);if(!s)return e&&r.searchParams.set(t,e),decodeURI(r.href);if(s==="mapbox.satellite"){var o=window.devicePixelRatio>=1.5?"@2x":"";return"https://api.mapbox.com/v4/"+s+"/{z}/{x}/{y}"+o+".webp?access_token="+e}return"https://{a-d}.tiles.mapbox.com/v4/"+s+"/{z}/{x}/{y}.vector.pbf?access_token="+e}function tx(i,e){return e===void 0&&(e=512),i.getExtent()?Nl({extent:i.getExtent(),tileSize:e,maxZoom:22}).getResolutions():Pt}function nf(i,e){if(!e.accessToken){e=Object.assign({},e);var t=new URL(i).searchParams;t.forEach(function(n,r){e.accessToken=n,e.accessTokenParam=r})}return e}function ix(i,e,t,n,r){t===void 0&&(t=""),n===void 0&&(n={}),r===void 0&&(r=void 0);var s,o,a,l,u=!0;return typeof t!="string"&&!Array.isArray(t)?(a=t,l=a.source||a.layers,n=a):l=t,typeof n=="string"?(s=n,a={}):(s=n.styleUrl,a=n),a.updateSource===!1&&(u=!1),r||(r=a.resolutions),!s&&typeof e=="string"&&!e.trim().startsWith("{")&&(s=e),s&&(s=s.startsWith("data:")?location.href:Us(s,a.accessToken),a=nf(s,a)),new Promise(function(h,c){df(e,a).then(function(d){if(d.version!=8)return c(new Error("glStyle version 8 required."));if(!(i instanceof ho||i instanceof gr))return c(new Error("Can only apply to VectorLayer or VectorTileLayer"));var f=i instanceof gr?"vector":"geojson";if(l?Array.isArray(l)?o=d.layers.find(function(T){return T.id===l[0]}).source:o=l:(o=Object.keys(d.sources).find(function(T){return d.sources[T].type===f}),l=o),!o)return c(new Error("No "+f+" source found in the glStyle."));function g(){if(!u)return Promise.resolve();if(i instanceof gr)return of(d.sources[o],s,a).then(function(P){var b=i.getSource();if(b?P!==b&&(b.setTileUrlFunction(P.getTileUrlFunction()),typeof b.setUrls=="function"&&typeof P.getUrls=="function"&&b.setUrls(P.getUrls()),b.format_||(b.format_=P.format_),b.getAttributions()||b.setAttributions(P.getAttributions()),b.getTileLoadFunction()===xd&&b.setTileLoadFunction(P.getTileLoadFunction()),Rt(b.getProjection(),P.getProjection())&&(b.tileGrid=P.getTileGrid())):i.setSource(P),!isFinite(i.getMaxResolution())&&!isFinite(i.getMinZoom())){var G=i.getSource().getTileGrid();
17i.setMaxResolution(G.getResolution(G.getMinZoom()))}});var T=d.sources[o],C=i.getSource();(!C||C.get("mapbox-source")!==T)&&(C=uf(T,s,a));var I=i.getSource();return I?C!==I&&(I.getAttributions()||I.setAttributions(C.getAttributions()),I.format_||(I.format_=C.getFormat()),I.url_=C.getUrl()):i.setSource(C),Promise.resolve()}var p,m,_,y;function x(){if(!y&&(!d.sprite||m)){if(a.projection&&!r){var T=le(a.projection),C=T.getUnits();C!=="m"&&(r=Pt.map(function(I){return I/Ci[C]}))}y=Fx(i,d,l,r,m,_,wx,a.getImage),i.getStyle()?g().then(h).catch(c):c(new Error("Nothing to show for source ["+o+"]"))}else y?(i.setStyle(y),g().then(h).catch(c)):c(new Error("Something went wrong trying to apply style."))}if(d.sprite){var v=new URL(ex(d.sprite,a.accessToken,s||location.href));p=window.devicePixelRatio>=1.5?.5:1;var E=p==.5?"@2x":"",R=v.origin+v.pathname+E+".json"+v.search;new Promise(function(T,C){Ks("Sprite",R,a).then(T).catch(function(I){R=v.origin+v.pathname+".json"+v.search,Ks("Sprite",R,a).then(T).catch(C)})}).then(function(T){if(T===void 0&&c(new Error("No sprites found.")),m=T,_=v.origin+v.pathname+E+".png"+v.search,a.transformRequest){var C=a.transformRequest(_,"SpriteImage");C instanceof Request&&(_=encodeURI(C.url))}x()}).catch(function(T){c(new Error("Sprites cannot be loaded: "+R+": "+T.message))})}else x()}).catch(c)})}var di={};function rf(i,e){var t;return i.some(function(n){if(n.id==e)return t=n.source,!0}),t}function nx(i,e){var t=i.bounds;if(t){var n=je([t[0],t[1]],e),r=je([t[2],t[3]],e);return[n[0],n[1],r[0],r[1]]}return le(e).getExtent()}function sf(i,e,t){var n=new _d({tileJSON:e,tileSize:i.tileSize||e.tileSize||512}),r=n.getTileJSON(),s=n.getTileGrid(),o=le(t.projection||"EPSG:3857"),a=nx(r,o),l=o.getExtent(),u=r.minzoom||0,h=r.maxzoom||22,c={attributions:n.getAttributions(),projection:o,tileGrid:new go({origin:l?ei(l):s.getOrigin(0),extent:a||s.getExtent(),minZoom:u,resolutions:tx(o,e.tileSize).slice(0,h+1),tileSize:s.getTileSize(0)})};return Array.isArray(r.tiles)?c.urls=r.tiles:c.url=r.tiles,c}function rx(i,e,t,n){var r={id:i.id,type:i.type},s=i.layout||{},o=i.paint||{};r.paint=o;var a=tu(e,t.resolutions||Pt),l,u;return o["background-color"]!==void 0&&(l=X(r,"paint","background-color",a,di,n)),o["background-opacity"]!==void 0&&(u=X(r,"paint","background-opacity",a,di,n)),s.visibility=="none"?void 0:hi(l,u)}function sx(i,e,t){var n=document.createElement("div");return n.className="ol-mapbox-style-background",n.style.position="absolute",n.style.width="100%",n.style.height="100%",new Zn({source:new Un({}),render:function(s){var o=rx(i,s.viewState.resolution,e,t);return n.style.backgroundColor=o,n}})}function of(i,e,t){return new Promise(function(n,r){ff(i,e,t).then(function(s){var o=sf(i,s,t);o.format=new M_,n(new vd(o))}).catch(r)})}function ox(i,e,t){var n=new gr({declutter:!0,visible:!1});return of(i,e,t).then(function(r){r.set("mapbox-source",i),n.setSource(r)}).catch(function(r){n.setSource(void 0)}),n}function af(i){var e=i?i.getCode():"EPSG:3857";return"{bbox-"+e.toLowerCase().replace(/[^a-z0-9]/g,"-")+"}"}function lf(i,e,t){var n=new hd;return ff(i,e,t).then(function(r){var s=new _d({interpolate:t.interpolate===void 0?!0:t.interpolate,transition:0,crossOrigin:"anonymous",tileJSON:r});s.tileGrid=sf(i,r,t).tileGrid,t.projection&&(s.projection=le(t.projection));var o=s.getTileUrlFunction();s.setTileUrlFunction(function(a,l,u){var h=af(u),c=o(a,l,u);if(c.indexOf(h)!=-1){var d=s.getTileGrid().getTileCoordExtent(a);c=c.replace(h,d.toString())}return c}),s.set("mapbox-source",i),n.setSource(s)}).catch(function(r){n.setSource(void 0)}),n}function ax(i,e,t){var n=lf(i,e,t),r=new rd({source:new h0({operationType:"image",operation:Qv,sources:[n]})});return r}function uf(i,e,t){var n=t.projection?new Fa({dataProjection:t.projection}):new Fa,r=i.data,s={};if(typeof r=="string"){var o=_s(r,t.accessToken,t.accessTokenParam||"access_token",e||location.href);if(t.transformRequest){var a=t.transformRequest(o,"GeoJSON");a instanceof Request&&(o=decodeURI(a.url))}if(/\{bbox-[0-9a-z-]+\}/.test(o)){var l=function(c,d,f){var g=af(f);return o.replace(g,""+c.join(","))},u=new fr({attributions:i.attribution,format:n,url:l,strategy:_m});return u.set("mapbox-source",i),u}return new fr({attributions:i.attribution,format:n,url:o})}s.features=n.readFeatures(r,{featureProjection:"EPSG:3857"});var h=new fr(Object.assign({attributions:i.attribution,format:n},s));return h.set("mapbox-source",i),h}function lx(i,e,t){return new ho({declutter:!0,source:uf(i,e,t),visible:!1})}function ux(i,e,t){var n=null;return function(r){i.paint&&"raster-opacity"in i.paint&&r.frameState.viewState.zoom!==n&&(n=r.frameState.viewState.zoom,delete t[i.id],hx(i,e,n,t))}}function hx(i,e,t,n){var r=X(i,"paint","raster-opacity",t,di,n);e.setOpacity(r)}function cx(i,e){function t(){var n=e.get("mapbox-style");if(n){var r=ef(n.layers),s=i.get("mapbox-layers"),o=r.filter(function(a){return s.includes(a.id)}).some(function(a){return!a.layout||!a.layout.visibility||a.layout.visibility==="visible"});i.get("visible")!==o&&i.setVisible(o)}}i.on("change",t),t()}function dx(i,e,t,n){var r=hf(i),s=i.layers,o=t.type,a=t.source||rf(s,t.ref),l=i.sources[a],u;if(o=="background")u=sx(t,n,r);else if(l.type=="vector")u=ox(l,e,n);else if(l.type=="raster")u=lf(l,e,n),u.setVisible(t.layout?t.layout.visibility!=="none":!0),u.on("prerender",ux(t,u,r));else if(l.type=="geojson")u=lx(l,e,n);else if(l.type=="raster-dem"&&t.type=="hillshade"){var h=ax(l,e,n);u=h,h.getSource().on("beforeoperations",function(d){var f=d.data;f.resolution=d.resolution;var g=tu(d.resolution,n.resolutions||Pt);f.encoding=l.encoding,f.vert=5*X(t,"paint","hillshade-exaggeration",g,di,r),f.sunAz=X(t,"paint","hillshade-illumination-direction",g,di,r),f.sunEl=35,f.opacity=.3,f.highlightColor=X(t,"paint","hillshade-highlight-color",g,di,r),f.shadowColor=X(t,"paint","hillshade-shadow-color",g,di,r),f.accentColor=X(t,"paint","hillshade-accent-color",g,di,r)}),u.setVisible(t.layout?t.layout.visibility!=="none":!0)}var c=a;return u&&u.set("mapbox-source",c),u}function Ih(i,e,t,n){var r=[],s=null;if(e instanceof Ll){if(s=e.getView(),!s.isDef()&&!s.getRotation()&&
17!s.getResolutions()){var o=n.projection?le(n.projection):s.getProjection();s=new ft(Object.assign(s.getProperties(),{maxResolution:Pt[0]/Ci[o.getUnits()],projection:n.projection||s.getProjection()})),e.setView(s)}"center"in i&&!s.getCenter()&&s.setCenter(je(i.center,s.getProjection())),"zoom"in i&&s.getZoom()===void 0&&s.setResolution(Pt[0]/Ci[s.getProjection().getUnits()]/Math.pow(2,i.zoom)),(!s.getCenter()||s.getZoom()===void 0)&&s.fit(s.getProjection().getExtent(),{nearest:!0,size:e.getSize()})}e.set("mapbox-style",i),e.set("mapbox-metadata",{styleUrl:t,options:n});for(var a=i.layers,l=[],u,h,c,d=0,f=a.length;d<f;++d){var g=a[d],p=g.type;if(p=="heatmap")throw new Error(p+" layers are not supported");c=g.source||rf(a,g.ref),(!c||c!=h)&&(l.length&&(r.push(Sh(u,l,i,t,e,n)),l=[]),u=dx(i,t,g,n),u instanceof ho||u instanceof gr||(l=[]),h=u.get("mapbox-source")),l.push(g.id)}return r.push(Sh(u,l,i,t,e,n)),Promise.all(r)}function fx(i,e,t){t===void 0&&(t={});var n,r;if(typeof i=="string"||i instanceof HTMLElement?r=new Ll({target:i}):r=i,typeof e=="string"){var s=e.startsWith("data:")?location.href:Us(e,t.accessToken);t=nf(s,t),n=new Promise(function(o,a){df(e,t).then(function(l){Ih(l,r,s,t).then(function(){o(r)}).catch(a)}).catch(function(l){a(new Error("Could not load "+e+": "+l.message))})})}else n=new Promise(function(o,a){Ih(e,r,!t.styleUrl||t.styleUrl.startsWith("data:")?location.href:Us(t.styleUrl,t.accessToken),t).then(function(){o(r)}).catch(a)});return n}function Sh(i,e,t,n,r,s){s===void 0&&(s={});for(var o=24,a=0,l=t.layers,u=0,h=l.length;u<h;++u){var c=l[u];e.indexOf(c.id)!==-1&&(o=Math.min("minzoom"in c?c.minzoom:0,o),a=Math.max("maxzoom"in c?c.maxzoom:24,a))}return new Promise(function(d,f){var g=function(){var m=i.getSource();if(!m||m.getState()==="error"){f(new Error("Error accessing data for source "+i.get("mapbox-source")));return}if("getTileGrid"in m){var _=m.getTileGrid();
17if(_){var y=_.getMinZoom();(o>0||y>0)&&i.setMaxResolution(Math.min(Pt[o],_.getResolution(y))+1e-9),a<24&&i.setMinResolution(Pt[a]+1e-9)}}else o>0&&i.setMaxResolution(Pt[o]+1e-9);m instanceof fr||m instanceof vd?ix(i,t,e,Object.assign({styleUrl:n},s)).then(function(){cx(i,r),d()}).catch(f):d()};i.set("mapbox-layers",e);var p=r.getLayers();p.getArray().indexOf(i)===-1&&p.push(i),i.getSource()?g():i.once("change:source",g)})}var Mh={},Fh={},gx=0;function eu(i){return i.id||(i.id=gx++),i.id}function px(i,e){return eu(i)+"."+Z(e)}function hf(i){var e=Mh[i.id];return e||(e={},Mh[eu(i)]=e),e}function mx(i){var e=Fh[i.id];return e||(e={},Fh[eu(i)]=e),e}function aa(i){return i*Math.PI/180}var Pt=function(){for(var i=[],e=78271.51696402048;i.length<=24;e/=2)i.push(e);return i}();function cf(i,e){if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof OffscreenCanvas<"u")return new OffscreenCanvas(i,e);var t=document.createElement("canvas");return t.width=i,t.height=e,t}function tu(i,e){for(var t=0,n=e.length;t<n;++t){var r=e[t];if(r<i&&t+1<n){var s=e[t]/e[t+1];return t+Math.log(e[t]/i)/Math.log(s)}}return n-1}var Rn={};function Ks(i,e,t,n){if(t===void 0&&(t={}),e in Rn)return n&&(n.request=Rn[e][0]),Rn[e][1];var r=t.transformRequest?t.transformRequest(e,i)||new Request(e):new Request(e);r.headers.get("Accept")||r.headers.set("Accept","application/json"),n&&(n.request=r);var s=fetch(r).then(function(o){return delete Rn[e],o.ok?o.json():Promise.reject(new Error("Error fetching source "+e))}).catch(function(o){return delete Rn[e],Promise.reject(new Error("Error fetching source "+e))});return Rn[e]=[r,s],s}function df(i,e){if(typeof i=="string")if(i.trim().startsWith("{"))try{var t=JSON.parse(i);return Promise.resolve(t)}catch(n){return Promise.reject(n)}else return i=Us(i,e.accessToken),Ks("Style",i,e);else return Promise.resolve(i)}function Ph(i,e){if(e.transformRequest){var t=e.transformRequest(i,"Tiles");if(t instanceof Request)return decodeURI(t.url)}return i}var Lh={};function ff(i,e,t){t===void 0&&(t={});var n=[e,JSON.stringify(i)].toString(),r=Lh[n];if(!r||t.transformRequest){var s=i.url;if(s&&!i.tiles){var o=_s(s,t.accessToken,t.accessTokenParam||"access_token",e||location.href);if(s.startsWith("mapbox://"))r=Promise.resolve(Object.assign({},i,{url:void 0,tiles:nd(o)}));else{var a={};r=Ks("Source",o,t,a).then(function(l){return l.tiles=l.tiles.map(function(u){return l.scheme==="tms"&&(u=u.replace("{y}","{-y}")),Ph(_s(u,t.accessToken,t.accessTokenParam||"access_token",a.request.url),t)}),Promise.resolve(l)})}}else i=Object.assign({},i,{tiles:i.tiles.map(function(l){return i.scheme==="tms"&&(l=l.replace("{y}","{-y}")),Ph(_s(l,t.accessToken,t.accessTokenParam||"access_token",e||location.href),t)})}),r=Promise.resolve(Object.assign({},i));Lh[n]=r}return r}function Ah(i,e,t,n){var r=document.createElement("canvas"),s=[2*t*e.pixelRatio+e.width,2*t*e.pixelRatio+e.height];r.width=s[0],r.height=s[1];var o=r.getContext("2d");o.drawImage(i,e.x,e.y,e.width,e.height,t*e.pixelRatio,t*e.pixelRatio,e.width,e.height);var a=o.getImageData(0,0,s[0],s[1]);o.globalCompositeOperation="destination-over",o.fillStyle="rgba("+n.r*255+","+n.g*255+","+n.b*255+","+n.a+")";for(var l=a.data,u=0,h=a.width;u<h;++u)for(var c=0,d=a.height;c<d;++c){var f=(c*h+u)*4,g=l[f+3];g>0&&o.arc(u,c,t*e.pixelRatio,0,2*Math.PI)}return o.fill(),r}function yx(i,e,t){var n=Math.max(0,Math.min(1,(t-i)/(e-i)));return n*n*(3-2*n)}function kh(i,e,t){var n=document.createElement("canvas");n.width=e.width,n.height=e.height;var r=n.getContext("2d");r.drawImage(i,e.x,e.y,e.width,e.height,0,0,e.width,e.height);for(var s=r.getImageData(0,0,e.width,e.height),o=s.data,a=0,l=s.width;a<l;++a)for(var u=0,h=s.height;u<h;++u){var c=(u*l+a)*4,d=o[c+3]/255,f=.75,g=.1,p=yx(f-g,f+g,d);p>0?(o[c+0]=Math.round(255*t.r*p),o[c+1]=Math.round(255*t.g*p),o[c+2]=Math.round(255*t.b*p),o[c+3]=Math.round(255*p)):o[c+3]=0}return r.putImageData(s,0,0),n}var _x=Array(256).join(" ");function Wa(i,e){if(e>=.05){for(var t="",n=i.split(`
18`),r=_x.slice(0,Math.round(e/.1)),s=0,o=n.length;s<o;++s)s>0&&(t+=`
19`),t+=n[s].split("").join(r);return t}return i}var la;function gf(){return la||(la=cf(1,1).getContext("2d")),la}function Ni(i,e){return gf().measureText(i).width+(i.length-1)*e}var Oh={};function Va(i,e,t,n){if(i.indexOf(`
20`)!==-1){for(var r=i.split(`
21`),s=[],o=0,a=r.length;o<a;++o)s.push(Va(r[o],e,t,n));return s.join(`
22`)}var l=t+","+e+","+i+","+n,u=Oh[l];if(!u){var h=i.split(" ");if(h.length>1){var c=gf();c.font=e;for(var d=c.measureText("M").width,f=d*t,g="",p=[],m=0,_=h.length;m<_;++m){var y=h[m],x=g+(g?" ":"")+y;Ni(x,n)<=f?g=x:(g&&p.push(g),g=y)}g&&p.push(g);for(var v=0,E=p.length;v<E&&E>1;++v){var R=p[v];if(Ni(R,n)<f*.35){var T=v>0?Ni(p[v-1],n):1/0,C=v<E-1?Ni(p[v+1],n):1/0;p.splice(v,1),E-=1,T<C?(p[v-1]+=" "+R,v-=1):p[v]=R+" "+p[v]}}for(var I=0,P=p.length-1;I<P;++I){var b=p[I],G=p[I+1];if(Ni(b,n)>f*.7&&Ni(G,n)<f*.6){var j=b.split(" "),J=j.pop();Ni(J,n)<f*.2&&(p[I]=j.join(" "),p[I+1]=J+" "+G),P-=1}}u=p.join(`
23`)}else u=i;
23u=Wa(u,n),Oh[l]=u}return u}var vx=/font-family: ?([^;]*);/,xx=/("|')/g,gs;function Ex(i){if(!gs){gs={};for(var e=document.styleSheets,t=0,n=e.length;t<n;++t){var r=e[t];try{var s=r.rules||r.cssRules;if(s)for(var o=0,a=s.length;o<a;++o){var l=s[o];if(l.type==5){var u=l.cssText.match(vx);gs[u[1].replace(xx,"")]=!0}}}catch{}}}return i in gs}var ua={};function wx(i,e){e===void 0&&(e="https://cdn.jsdelivr.net/npm/@fontsource/{font-family}/{fontweight}{-fontstyle}.css");var t=i.toString();if(t in ua)return ua[t];for(var n=[],r=0,s=i.length;r<s;++r){i[r]=i[r].replace("Arial Unicode MS","Arial");var o=i[r],a=Xa(o,1);yc(a);var l=a.split(" ");n.push([l.slice(3).join(" ").replace(/"/g,""),l[1],l[0]])}for(var u=0,h=n.length;u<h;++u){var c=n[u],d=c[0];if(!Ex(d)&&Tt.get(c[2]+`
24`+c[1]+` 
25`+d)!==100){var f=e.replace("{font-family}",d.replace(/ /g,"-").toLowerCase()).replace("{Font+Family}",d.replace(/ /g,"+")).replace("{fontweight}",c[1]).replace("{-fontstyle}",c[2].replace("normal","").replace(/(.+)/,"-$1")).replace("{fontstyle}",c[2]);if(!document.querySelector('link[href="'+f+'"]')){var g=document.createElement("link");g.href=f,g.rel="stylesheet",document.head.appendChild(g)}}}return ua[t]=i,i}var Cx={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},Tx={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},Rx=function(i,e){var t=Gv(i,e);if(t.result==="error")throw new Error(t.value.map(function(n){return n.key+": "+n.message}).join(", "));return t.value},Ya={},qs={zoom:0},ps,ha;function X(i,e,t,n,r,s,o){var a=i.id;s||(s={},console.warn("No functionCache provided to getValue()")),s[a]||(s[a]={});var l=s[a];if(!l[t]){var u=(i[e]||Ya)[t],h=qd[e+"_"+i.type][t];u===void 0&&(u=h.default);var c=Nv(u);if(!c&&Kd(u)&&(u=T0(u,h),c=!0),c){var d=Rx(u,h);l[t]=d.evaluate.bind(d)}else h.type=="color"&&(u=et.parse(u)),l[t]=function(){return u}}return qs.zoom=n,l[t](qs,r,o)}function bx(i,e,t,n){var r=X(i,"layout","icon-allow-overlap",e,t,n);if(!r)return"declutter";var s=X(i,"layout","icon-ignore-placement",e,t,n);return s?"none":"obstacle"}function Ix(i,e,t,n,r){return r||console.warn("No filterCache provided to evaluateFilter()"),i in r||(r[i]=Vv(e).filter),qs.zoom=n,r[i](qs,t)}function hi(i,e){if(i){if(i.a===0||e===0)return;var t=i.a;return e=e===void 0?1:e,t===0?"transparent":"rgba("+Math.round(i.r*255/t)+","+Math.round(i.g*255/t)+","+Math.round(i.b*255/t)+","+t*e+")"}return i}var Sx=/\{[^{}}]*\}/g;function ca(i,e){return i.replace(Sx,function(t){return e[t.slice(1,-1)]||""})}var Mx={};function Fx(i,e,t,n,r,s,o,a){if(n===void 0&&(n=Pt),r===void 0&&(r=void 0),s===void 0&&(s=void 0),o===void 0&&(o=void 0),a===void 0&&(a=void 0),typeof e=="string"&&(e=JSON.parse(e)),e.version!=8)throw new Error("glStyle version 8 required.");Mx[px(e,i)]=Array.from(arguments);var l,u,h;if(s){if(typeof Image<"u"){var c=new Image;c.crossOrigin="anonymous",c.onload=function(){l=c,u=[c.width,c.height],i.changed(),c.onload=null},c.src=s}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){var d=self;d.postMessage({action:"loadImage",src:s}),d.addEventListener("message",function(N){N.data.action==="imageLoaded"&&N.data.src===s&&(l=N.data.image,u=[l.width,l.height])})}}
25for(var f=ef(e.layers),g={},p=[],m={},_={},y=hf(e),x=mx(e),v,E=0,R=f.length;E<R;++E){var T=f[E],C=T.id;if(typeof t=="string"&&T.source==t||t.indexOf(C)!==-1){var I=T["source-layer"];if(v){if(T.source!==v)throw new Error('Layer "'+C+'" does not use source "'+v)}else{v=T.source;var P=e.sources[v];if(!P)throw new Error('Source "'+v+'" is not defined');var b=P.type;if(b!=="vector"&&b!=="geojson")throw new Error('Source "'+v+'" is not of type "vector" or "geojson", but "'+b+'"')}var G=g[I];G||(G=[],g[I]=G),G.push({layer:T,index:E}),p.push(C)}}var j=new Ln,J=new Xi,A=[],z=function(S,N,te){var Y=S.getProperties(),ue=g[Y.layer];if(ue){var w=n.indexOf(N);w==-1&&(w=tu(N,n));for(var ne=Cx[S.getGeometry().getType()],M={id:S.getId(),properties:Y,type:ne},L=i.get("mapbox-featurestate")[S.getId()],re=-1,_e=0,ce=ue.length;_e<ce;++_e){var Se=ue[_e],O=Se.layer,bi=O.id;if(!(te!==void 0&&te!==bi)){var tt=O.layout||Ya,it=O.paint||Ya;if(!(tt.visibility==="none"||"minzoom"in O&&w<O.minzoom||"maxzoom"in O&&w>=O.maxzoom)){var lt=O.filter;if(!lt||Ix(bi,lt,M,w,x)){var Me=void 0,Ce=void 0,At=void 0,Ne=void 0,Xe=void 0,D=void 0,_t=Se.index;if(ne==3&&(O.type=="fill"||O.type=="fill-extrusion"))if(Ce=X(O,"paint",O.type+"-opacity",w,M,y,L),O.type+"-pattern"in it){var ve=X(O,"paint",O.type+"-pattern",w,M,y,L);if(ve){var Oe=typeof ve=="string"?ca(ve,Y):ve.toString();if(l&&r&&r[Oe]){++re,D=A[re],(!D||!D.getFill()||D.getStroke()||D.getText())&&(D=new Xt({fill:new Xi}),A[re]=D),At=D.getFill(),D.setZIndex(_t);var We=Oe+"."+Ce,Ve=_[We];if(!Ve){var Ge=r[Oe],vt=cf(Ge.width,Ge.height),nt=vt.getContext("2d");nt.globalAlpha=Ce,nt.drawImage(l,Ge.x,Ge.y,Ge.width,Ge.height,0,0,Ge.width,Ge.height),Ve=nt.createPattern(vt,"repeat"),_[We]=Ve}At.setColor(Ve)}}}else Me=hi(X(O,"paint",O.type+"-color",w,M,y,L),Ce),O.type+"-outline-color"in it&&(Xe=hi(X(O,"paint",O.type+"-outline-color",w,M,y,L),Ce)),Xe||(Xe=Me),(Me||Xe)&&(++re,D=A[re],(!D||Me&&!D.getFill()||!Me&&D.getFill()||Xe&&!D.getStroke()||!Xe&&D.getStroke()||D.getText())&&(D=new Xt({fill:Me?new Xi:void 0,stroke:Xe?new Ln:void 0}),A[re]=D),Me&&(At=D.getFill(),At.setColor(Me)),Xe&&(Ne=D.getStroke(),Ne.setColor(Xe),Ne.setWidth(.5)),D.setZIndex(_t));if(ne!=1&&O.type=="line"){Me=!("line-pattern"in it)&&"line-color"in it?hi(X(O,"paint","line-color",w,M,y,L),X(O,"paint","line-opacity",w,M,y,L)):void 0;var xt=X(O,"paint","line-width",w,M,y,L);Me&&xt>0&&(++re,D=A[re],(!D||!D.getStroke()||D.getFill()||D.getText())&&(D=new Xt({stroke:new Ln}),A[re]=D),Ne=D.getStroke(),Ne.setLineCap(X(O,"layout","line-cap",w,M,y,L)),Ne.setLineJoin(X(O,"layout","line-join",w,M,y,L)),Ne.setMiterLimit(X(O,"layout","line-miter-limit",w,M,y,L)),Ne.setColor(Me),Ne.setWidth(xt),Ne.setLineDash(it["line-dasharray"]?X(O,"paint","line-dasharray",w,M,y,L).map(function(Ze){return Ze*xt}):null),D.setZIndex(_t))}var kt=!1,Q=null,gn=0,Ii=void 0,Fe=void 0,pn=void 0;if((ne==1||ne==2)&&"icon-image"in tt){var Si=X(O,"layout","icon-image",w,M,y,L);if(Si){Ii=typeof Si=="string"?ca(Si,Y):Si.toString();var Mi=void 0,Et=a?a(i,Ii):void 0;if(l&&r&&r[Ii]||Et){var Fi=X(O,"layout","icon-rotation-alignment",w,M,y,L);if(ne==2){var Ye=S.getGeometry();if(Ye.getFlatMidpoint||Ye.getFlatMidpoints){var wt=Ye.getExtent(),Pi=Math.sqrt(Math.max(Math.pow((wt[2]-wt[0])/N,2),Math.pow((wt[3]-wt[1])/N,2)));if(Pi>150){var Ot=Ye.getType()==="MultiLineString"?Ye.getFlatMidpoints():Ye.getFlatMidpoint();ha||(ps=[NaN,NaN],ha=new La("Point",ps,[],{},null)),Mi=ha,ps[0]=Ot[0],ps[1]=Ot[1];var Br=X(O,"layout","symbol-placement",w,M,y,L);if(Br==="line"&&Fi==="map")for(var Te=Ye.getStride(),rt=Ye.getFlatCoordinates(),xe=0,ut=rt.length-Te;xe<ut;xe+=Te){var Pe=rt[xe],ti=rt[xe+1],ii=rt[xe+Te],Re=rt[xe+Te+1],Be=Math.min(Pe,ii),ht=Math.min(ti,Re),xo=Math.max(Pe,ii),pf=Math.max(ti,Re);if(Ot[0]>=Be&&Ot[0]<=xo&&Ot[1]>=ht&&Ot[1]<=pf){gn=Math.atan2(ti-Re,ii-Pe);break}}}}}if(ne!==2||Mi){var iu=X(O,"layout","icon-size",w,M,y,L),Ct=it["icon-color"]!==void 0?X(O,"paint","icon-color",w,M,y,L):null;if(!Ct||Ct.a!==0){var Eo=X(O,"paint","icon-halo-color",w,M,y,L),Zr=X(O,"paint","icon-halo-width",w,M,y,L),wo=Ii+"."+iu+"."+Zr+"."+Eo;if(Ct!==null&&(wo+="."+Ct),Fe=m[wo],!Fe){var nu=bx(O,w,M,y),Ur=void 0;"icon-offset"in tt&&(Ur=X(O,"layout","icon-offset",w,M,y,L).slice(0),Ur[1]*=-1);var Co=Ct?[Ct.r*255,Ct.g*255,Ct.b*255,Ct.a]:void 0;if(Et){var Kr={color:Co,rotateWithView:Fi==="map",displacement:Ur,declutterMode:nu};typeof Et=="string"?Kr.src=Et:(Kr.img=Et,Kr.imgSize=[Et.width,Et.height]),Fe=new As(Kr)}else{var st=r[Ii],Li=void 0,To=void 0,ru=void 0,su=void 0;Zr?(st.sdf?(Li=Ah(kh(l,st,Ct),{x:0,y:0,width:st.width,height:st.height,pixelRatio:st.pixelRatio},Zr,Eo),Co=void 0):Li=Ah(l,st,Zr,Eo),To=[Li.width,Li.height]):(st.sdf?(h||(h=kh(l,{x:0,y:0,width:u[0],height:u[1]},{r:1,g:1,b:1,a:1})),Li=h):Li=l,To=u,ru=[st.width,st.height],su=[st.x,st.y]),Fe=new As({color:Co,img:Li,imgSize:To,size:ru,offset:su,rotateWithView:Fi==="map",scale:iu/st.pixelRatio,displacement:Ur,declutterMode:nu})}m[wo]=Fe}}Fe&&(++re,D=A[re],(!D||!D.getImage()||D.getFill()||D.getStroke())&&(D=new Xt,A[re]=D),D.setGeometry(Mi),Fe.setRotation(gn+aa(X(O,"layout","icon-rotate",w,M,y,L)
vendor: 2,406 bytes, lines 25-29
25)),Fe.setOpacity(X(O,"paint","icon-opacity",w,M,y,L)),Fe.setAnchor(Tx[X(O,"layout","icon-anchor",w,M,y,L)]),D.setImage(Fe),Q=D.getText(),D.setText(void 0),D.setZIndex(_t),kt=!0,pn=!1)}else pn=!0}}}if(ne==1&&O.type==="circle"){++re,D=A[re],(!D||!D.getImage()||D.getFill()||D.getStroke())&&(D=new Xt,A[re]=D);var ou="circle-radius"in it?X(O,"paint","circle-radius",w,M,y,L):5,Ro=hi(X(O,"paint","circle-stroke-color",w,M,y,L),X(O,"paint","circle-stroke-opacity",w,M,y,L)),bo=hi(X(O,"paint","circle-color",w,M,y,L),X(O,"paint","circle-opacity",w,M,y,L)),Io=X(O,"paint","circle-stroke-width",w,M,y,L),au=ou+"."+Ro+"."+bo+"."+Io;Fe=m[au],Fe||(Fe=new vl({radius:ou,stroke:Ro&&Io>0?new Ln({width:Io,color:Ro}):void 0,fill:bo?new Xi({color:bo}):void 0,declutterMode:"none"}),m[au]=Fe),D.setImage(Fe),Q=D.getText(),D.setText(void 0),D.setGeometry(void 0),D.setZIndex(_t),kt=!0}var Le=void 0,er=void 0,tr=void 0,ni=void 0,ir=void 0,So=void 0;if("text-field"in tt){ni=Math.round(X(O,"layout","text-size",w,M,y,L));var Mo=X(O,"layout","text-font",w,M,y,L);tr=X(O,"layout","text-line-height",w,M,y,L),er=Xa(o?o(Mo,e.metadata?e.metadata["ol:webfonts"]:void 0):Mo,ni,tr),er.includes("sans-serif")||(er+=",sans-serif"),ir=X(O,"layout","text-letter-spacing",w,M,y,L),So=X(O,"layout","text-max-width",w,M,y,L);var mn=X(O,"layout","text-field",w,M,y,L);typeof mn=="object"&&mn.sections?mn.sections.length===1?Le=mn.toString():Le=mn.sections.reduce(function(Ze,ri,Ox){var pu=ri.fontStack?ri.fontStack.split(","):Mo,Ao=Xa(o?o(pu):pu,ni*(ri.scale||1),tr),yn=ri.text;if(yn===`
26`)return Ze.push(`
27`,""),Ze;if(ne==2){Ze.push(Wa(yn,ir),Ao);return}yn=Va(yn,Ao,So,ir).split(`
28`);for(var Hr=0,_f=yn.length;Hr<_f;++Hr)Hr>0&&Ze.push(`
29`,""),Ze.push(yn[Hr],Ao);return Ze},[]):Le=ca(mn,Y).trim(),Ce=X(O,"paint","text-opacity",w,M,y,L)}if(Le&&Ce&&!pn){kt||(++re,D=A[re],(!D||!D.getText()||D.getFill()||D.getStroke())&&(D=new Xt,A[re]=D),D.setImage(void 0),D.setGeometry(void 0)),D.getText()||D.setText(Q||new xc({padding:[2,2,2,2]})),Q=D.getText();var lu=tt["text-transform"];lu=="uppercase"?Le=Array.isArray(Le)?Le.map(function(Ze,ri){return ri%2?Ze:Ze.toUpperCase()}):Le.toUpperCase():lu=="lowercase"&&(Le=Array.isArray(Le)?Le.map(function(Ze,ri){return ri%2?Ze:Ze.toLowerCase()}):Le.toLowerCase());var uu=Array.isArray(Le)?Le:ne==2?Wa(Le,ir):Va(Le,er,So,ir);Q.setText(uu),Q.setFont(er),Q.setRotation(aa(X(O,"layout","text-rotate",w,M,y,L)
29));var qr=X(O,"layout","text-anchor",w,M,y,L),nr=kt||ne==1?"point":X(O,"layout","symbol-placement",w,M,y,L),rr=void 0;if(nr==="line-center"?(Q.setPlacement("line"),rr="center"):Q.setPlacement(nr),nr==="line"&&typeof Q.setRepeat=="function"){var mf=X(O,"layout","symbol-spacing",w,M,y,L);Q.setRepeat(mf*2)}Q.setOverflow(nr==="point");var Ai=X(O,"paint","text-halo-width",w,M,y,L),hu=X(O,"layout","text-offset",w,M,y,L),cu=X(O,"paint","text-translate",w,M,y,L),Fo=0,Po=0;if(nr=="point"){rr="center",qr.indexOf("left")!==-1?(rr="left",Po=Ai):qr.indexOf("right")!==-1&&(rr="right",Po=-Ai);var yf=X(O,"layout","text-rotation-alignment",w,M,y,L);Q.setRotateWithView(yf=="map")}else Q.setMaxAngle(aa(X(O,"layout","text-max-angle",w,M,y,L))*Le.length/uu.length),Q.setRotateWithView(!1);Q.setTextAlign(rr);var Lo="middle";qr.indexOf("bottom")==0?(Lo="bottom",Fo=-Ai-.5*(tr-1)*ni):qr.indexOf("top")==0&&(Lo="top",Fo=Ai+.5*(tr-1)*ni),Q.setTextBaseline(Lo);var du=X(O,"layout","text-justify",w,M,y,L);Q.setJustify(du==="auto"?void 0:du),Q.setOffsetX(hu[0]*ni+Po+cu[0]),Q.setOffsetY(hu[1]*ni+Fo+cu[1]),J.setColor(hi(X(O,"paint","text-color",w,M,y,L),Ce)),Q.setFill(J);var fu=hi(X(O,"paint","text-halo-color",w,M,y,L),Ce);if(fu){j.setColor(fu),Ai*=2;var gu=.5*ni;j.setWidth(Ai<=gu?Ai:gu),Q.setStroke(j)}else Q.setStroke(void 0);var sr=X(O,"layout","text-padding",w,M,y,L),or=Q.getPadding();sr!==or[0]&&(or[0]=sr,or[1]=sr,or[2]=sr,or[3]=sr),D.setZIndex(_t)}}}}}if(re>-1)return A.length=re+1,A}};return i.setStyle(z),i.set("mapbox-source",v),i.set("mapbox-layers",p),i.set("mapbox-featurestate",i.get("mapbox-featurestate")||{}),z}window.features=[];
29window.initOpenLayers=function(i=!1){var e=$("#openMap").closest(".map--srprs").length,t=$(".map").hasClass("map--business"),n=$(".map").hasClass("map--wedding"),r=$(".map").hasClass("map--restaurants"),s=$(".map").hasClass("map--nopartner"),o=$(".map").hasClass("map--foreignhotels"),a=$(".map__openmap--restaurantwebsite").length>0;let l="/data/static/fletcher-assets/js/mapstyling/styling.json?t=1790151163",u=!0,h=!0,c=!0,d=!0,f=!1,g=6,p=17,m=6,_=je([8.685674,50.591608]),y=!0;if(e===1&&(u=!1,h=!1,c=!1,d=!1,f=!1,g=6,p=17,y=!1),(t||n||s||e||r)&&!o&&(m=8,_=je([5.25448,52.2076568])),$(".eventMap").length>0&&typeof window.mapMarkers<"u"&&typeof window.mapMarkers.highlight)l="/data/static/fletcher-assets/js/mapstyling/styling-highlight.json?t=1790151163",typeof window.mapMarkers.highlight.long<"u"&&typeof window.mapMarkers.highlight.lat<"u"&&(_=je([window.mapMarkers.highlight.long,window.mapMarkers.highlight.lat]),m=14);else if($(".map__openmap--contact").length>0&&typeof window.mapMarkers<"u"&&typeof window.mapMarkers.highlight)l="/data/static/fletcher-assets/js/mapstyling/styling-highlight.json?t=1790151163",typeof window.mapMarkers.highlight.long<"u"&&typeof window.mapMarkers.highlight.lat<"u"&&(_=je([window.mapMarkers.highlight.long,window.mapMarkers.highlight.lat]),m=16);else if(a){l=$(".map-marker").data("styling");var x=$(".map-marker").data("long"),v=$(".map-marker").data("lat");typeof x<"u"&&typeof v<"u"&&(_=je([x,v]),m=13,d=!1,f=!1,g=7,p=17)}y===!0&&$("#openMap").addClass("map--interactions"),window.map=new Ll({target:"openMap",view:new ft({constrainResolution:!0,center:_,zoom:m,minZoom:g,maxZoom:p,stopEvent:!1}),controls:[],interactions:Vc({doubleClickZoom:u,dragAndDrop:!1,dragPan:h,keyboardPan:c,keyboardZoom:d,mouseWheelZoom:f,pointer:!1,select:!1})});var E=fx(window.map,l);if(e==1){var R="/data/static/fletcher-assets/js/mapstyling/regions.json?t=1790151163",T=new fr({url:R,format:new Fa});let I={"stroke-width":2,"stroke-color":"#F87C00","stroke-offset":0};var C=new ho({id:"regions",source:T,style:I});E.then(function(P){P.addLayer(C),P.updateSize()})}a?Lx(window.map):Ax(window.map,E),kx(),Px()};function Px(){let i=null;const t=new URLSearchParams(window.location.search).get("zoom"),n=$("#openMap").data("zoom-country");if(t?i=t:n&&(i=n),i){const o="zoom-in-"+i,a=document.getElementById(o);a&&a.click()}else if($(".map").length>0&&typeof $(".map").data("center")!==void 0){var r=$(".map").data("center");if(typeof r=="object"&&r!==null){var s=je([r.longitude,r.latitude]);window.map.getView().setCenter(s),window.map.getView().setZoom(10)}}}function Lx(i){var e=document.createElement("div"),t=$(".map-marker").data("icon"),n=$(".map-marker").data("long"),r=$(".map-marker").data("lat");e.innerHTML='<img id="ol-restaurant" src="'+t+'" class="ol__marker" />';var s=new Zc({position:je([n,r]),positioning:"bottom-center",element:e,stopEvent:!1,id:"restaurant"});i.addOverlay(s)}function Ax(i,e){window.mapMarkers&&($.each(window.mapMarkers,function(t,n){if(!(typeof n.id>"u")){var r=n.lat,s=n.long;typeof n["alt-lat"]<"u"&&n["alt-lat"]!=null&&(r=n["alt-lat"]),typeof n["alt-long"]<"u"&&n["alt-long"]!=null&&(s=n["alt-long"]);var o=document.createElement("div");o.innerHTML='<img id="ol-'+n.id+'" src="'+n.marker+'" class="ol__marker" />';var a=new Zc({position:je([s,r]),positioning:"center-center",element:o,stopEvent:!1,id:n.id});i.addOverlay(a),window.features.push(a),jQuery(".map").css("background-image","none"),jQuery("#ol-"+n.id).on("mouseover",function(l){var u=l.target,h=jQuery(u).offset(),c=jQuery("#openMap").offset(),d=h.top-c.top+22,f=h.left-c.left+10,g={x:f,y:d};markerEvent(n,i,g)}),e.then(function(l){if(n.active){var u=jQuery("#ol-"+n.id).offset(),h=jQuery("#openMap").offset(),c=u.top-h.top+22,d=u.left-h.left+10,f={x:d,y:c};markerEvent(n,l,f)}})}}),$(document).on("click","#closeInfobox",function(){$(".map__infobox").fadeOut()}),i.on("movestart",function(){$(".map__infobox").fadeOut()}))}function kx(){$("#zoom-in").length>0&&$("#zoom-in").on("click",function(){const i=window.map.getView(),e=i.getZoom();i.setZoom(e+1)}),$("#zoom-out").length>0&&$("#zoom-out").on("click",function(){const i=window.map.getView(),e=i.getZoom();i.setZoom(e-1)}),$("#zoom-in-default").length>0&&$("#zoom-in-default").on("click",function(){const i=window.map.getView();let e=je([8.685674,50.591608]);i.setZoom(6),i.setCenter(e)}),$("#zoom-in-nl").length>0&&$("#zoom-in-nl").on("click",function(){const i=window.map.getView();let e=je([5.25448,52.2076568]);i.setZoom(7.5),i.setCenter(e)}),$("#zoom-in-de").length>0&&$("#zoom-in-de").on("click",function(){const i=window.map.getView();let e=je([10.4515,51.1657]);i.setZoom(6.2),i.setCenter(e)}),$("#zoom-in-be").length>0&&$("#zoom-in-be").on("click",function(){const i=window.map.getView();let e=je([4.4699,50.5039]);i.setZoom(7.5),i.setCenter(e)})}

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.