@opensystemslab/map 0.5.9 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,73 +1,73 @@
|
|
1
|
-
(function(
|
1
|
+
(function(j,Gi){typeof exports=="object"&&typeof module<"u"?Gi(exports):typeof define=="function"&&define.amd?define(["exports"],Gi):(j=typeof globalThis<"u"?globalThis:j||self,Gi(j.ComponentLib={}))})(this,function(j){"use strict";/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2019 Google LLC
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
5
|
-
*/const Gi=window,hl=Gi.ShadowRoot&&(Gi.ShadyCSS===void 0||Gi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ul=Symbol(),wd=new WeakMap;class
|
5
|
+
*/const Gi=window,hl=Gi.ShadowRoot&&(Gi.ShadyCSS===void 0||Gi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ul=Symbol(),wd=new WeakMap;class Md{constructor(t,e,n){if(this._$cssResult$=!0,n!==ul)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(hl&&t===void 0){const n=e!==void 0&&e.length===1;n&&(t=wd.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&wd.set(e,t))}return t}toString(){return this.cssText}}const Es=i=>new Md(typeof i=="string"?i:i+"",void 0,ul),Tp=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((n,o,r)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+i[r+1],i[0]);return new Md(e,i,ul)},Ip=(i,t)=>{hl?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const n=document.createElement("style"),o=Gi.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=e.cssText,i.appendChild(n)})},Cd=hl?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return Es(e)})(i):i;/**
|
6
6
|
* @license
|
7
7
|
* Copyright 2017 Google LLC
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
9
|
-
*/var dl;const Ss=window,
|
9
|
+
*/var dl;const Ss=window,Ed=Ss.trustedTypes,zp=Ed?Ed.emptyScript:"",Sd=Ss.reactiveElementPolyfillSupport,cl={toAttribute(i,t){switch(t){case Boolean:i=i?zp:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},Td=(i,t)=>t!==i&&(t==t||i==i),gl={attribute:!0,type:String,converter:cl,reflect:!1,hasChanged:Td};class go extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;(e=this.h)!==null&&e!==void 0||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,n)=>{const o=this._$Ep(n,e);o!==void 0&&(this._$Ev.set(o,n),t.push(o))}),t}static createProperty(t,e=gl){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n=typeof t=="symbol"?Symbol():"__"+t,o=this.getPropertyDescriptor(t,n,e);o!==void 0&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||gl}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,n=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const o of n)this.createProperty(o,e[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const o of n)e.unshift(Cd(o))}else t!==void 0&&e.push(Cd(t));return e}static _$Ep(t,e){const n=e.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,n;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)===null||n===void 0||n.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Ip(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var n;return(n=e.hostConnected)===null||n===void 0?void 0:n.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var n;return(n=e.hostDisconnected)===null||n===void 0?void 0:n.call(e)})}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EO(t,e,n=gl){var o;const r=this.constructor._$Ep(t,n);if(r!==void 0&&n.reflect===!0){const s=(((o=n.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?n.converter:cl).toAttribute(e,n.type);this._$El=t,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var n;const o=this.constructor,r=o._$Ev.get(t);if(r!==void 0&&this._$El!==r){const s=o.getPropertyOptions(r),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((n=s.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?s.converter:cl;this._$El=r,this[r]=a.fromAttribute(e,s.type),this._$El=null}}requestUpdate(t,e,n){let o=!0;t!==void 0&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||Td)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),n.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,n))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,r)=>this[r]=o),this._$Ei=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(t=this._$ES)===null||t===void 0||t.forEach(o=>{var r;return(r=o.hostUpdate)===null||r===void 0?void 0:r.call(o)}),this.update(n)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(n=>{var o;return(o=n.hostUpdated)===null||o===void 0?void 0:o.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,n)=>this._$EO(n,this[n],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}go.finalized=!0,go.elementProperties=new Map,go.elementStyles=[],go.shadowRootOptions={mode:"open"},Sd==null||Sd({ReactiveElement:go}),((dl=Ss.reactiveElementVersions)!==null&&dl!==void 0?dl:Ss.reactiveElementVersions=[]).push("1.4.1");/**
|
10
10
|
* @license
|
11
11
|
* Copyright 2017 Google LLC
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
13
|
-
*/var
|
13
|
+
*/var fl;const Ts=window,fo=Ts.trustedTypes,Id=fo?fo.createPolicy("lit-html",{createHTML:i=>i}):void 0,ji=`lit$${(Math.random()+"").slice(9)}$`,zd="?"+ji,Rp=`<${zd}>`,mo=document,ur=(i="")=>mo.createComment(i),dr=i=>i===null||typeof i!="object"&&typeof i!="function",Rd=Array.isArray,Ap=i=>Rd(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",cr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ad=/-->/g,Pd=/>/g,Rn=RegExp(`>|[
|
14
14
|
\f\r](?:([^\\s"'>=/]+)([
|
15
15
|
\f\r]*=[
|
16
16
|
\f\r]*(?:[^
|
17
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Dd=/'/g,Ld=/"/g,
|
17
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Dd=/'/g,Ld=/"/g,Od=/^(?:script|style|textarea|title)$/i,Pp=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),Bi=Pp(1),po=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),Fd=new WeakMap,Dp=(i,t,e)=>{var n,o;const r=(n=e==null?void 0:e.renderBefore)!==null&&n!==void 0?n:t;let s=r._$litPart$;if(s===void 0){const a=(o=e==null?void 0:e.renderBefore)!==null&&o!==void 0?o:null;r._$litPart$=s=new fr(t.insertBefore(ur(),a),a,void 0,e!=null?e:{})}return s._$AI(i),s},vo=mo.createTreeWalker(mo,129,null,!1),Lp=(i,t)=>{const e=i.length-1,n=[];let o,r=t===2?"<svg>":"",s=cr;for(let l=0;l<e;l++){const h=i[l];let u,d,c=-1,g=0;for(;g<h.length&&(s.lastIndex=g,d=s.exec(h),d!==null);)g=s.lastIndex,s===cr?d[1]==="!--"?s=Ad:d[1]!==void 0?s=Pd:d[2]!==void 0?(Od.test(d[2])&&(o=RegExp("</"+d[2],"g")),s=Rn):d[3]!==void 0&&(s=Rn):s===Rn?d[0]===">"?(s=o!=null?o:cr,c=-1):d[1]===void 0?c=-2:(c=s.lastIndex-d[2].length,u=d[1],s=d[3]===void 0?Rn:d[3]==='"'?Ld:Dd):s===Ld||s===Dd?s=Rn:s===Ad||s===Pd?s=cr:(s=Rn,o=void 0);const f=s===Rn&&i[l+1].startsWith("/>")?" ":"";r+=s===cr?h+Rp:c>=0?(n.push(u),h.slice(0,c)+"$lit$"+h.slice(c)+ji+f):h+ji+(c===-2?(n.push(void 0),l):f)}const a=r+(i[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Id!==void 0?Id.createHTML(a):a,n]};class gr{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let r=0,s=0;const a=t.length-1,l=this.parts,[h,u]=Lp(t,e);if(this.el=gr.createElement(h,n),vo.currentNode=this.el.content,e===2){const d=this.el.content,c=d.firstChild;c.remove(),d.append(...c.childNodes)}for(;(o=vo.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes()){const d=[];for(const c of o.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(ji)){const g=u[s++];if(d.push(c),g!==void 0){const f=o.getAttribute(g.toLowerCase()+"$lit$").split(ji),m=/([.?@])?(.*)/.exec(g);l.push({type:1,index:r,name:m[2],strings:f,ctor:m[1]==="."?Fp:m[1]==="?"?Gp:m[1]==="@"?jp:Is})}else l.push({type:6,index:r})}for(const c of d)o.removeAttribute(c)}if(Od.test(o.tagName)){const d=o.textContent.split(ji),c=d.length-1;if(c>0){o.textContent=fo?fo.emptyScript:"";for(let g=0;g<c;g++)o.append(d[g],ur()),vo.nextNode(),l.push({type:2,index:++r});o.append(d[c],ur())}}}else if(o.nodeType===8)if(o.data===zd)l.push({type:2,index:r});else{let d=-1;for(;(d=o.data.indexOf(ji,d+1))!==-1;)l.push({type:7,index:r}),d+=ji.length-1}r++}}static createElement(t,e){const n=mo.createElement("template");return n.innerHTML=t,n}}function _o(i,t,e=i,n){var o,r,s,a;if(t===po)return t;let l=n!==void 0?(o=e._$Cl)===null||o===void 0?void 0:o[n]:e._$Cu;const h=dr(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),h===void 0?l=void 0:(l=new h(i),l._$AT(i,e,n)),n!==void 0?((s=(a=e)._$Cl)!==null&&s!==void 0?s:a._$Cl=[])[n]=l:e._$Cu=l),l!==void 0&&(t=_o(i,l._$AS(i,t.values),l,n)),t}class Op{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:n},parts:o}=this._$AD,r=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:mo).importNode(n,!0);vo.currentNode=r;let s=vo.nextNode(),a=0,l=0,h=o[0];for(;h!==void 0;){if(a===h.index){let u;h.type===2?u=new fr(s,s.nextSibling,this,t):h.type===1?u=new h.ctor(s,h.name,h.strings,this,t):h.type===6&&(u=new Bp(s,this,t)),this.v.push(u),h=o[++l]}a!==(h==null?void 0:h.index)&&(s=vo.nextNode(),a++)}return r}m(t){let e=0;for(const n of this.v)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class fr{constructor(t,e,n,o){var r;this.type=2,this._$AH=ie,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=o,this._$C_=(r=o==null?void 0:o.isConnected)===null||r===void 0||r}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$C_}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=_o(this,t,e),dr(t)?t===ie||t==null||t===""?(this._$AH!==ie&&this._$AR(),this._$AH=ie):t!==this._$AH&&t!==po&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.k(t):Ap(t)?this.O(t):this.$(t)}S(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}$(t){this._$AH!==ie&&dr(this._$AH)?this._$AA.nextSibling.data=t:this.k(mo.createTextNode(t)),this._$AH=t}T(t){var e;const{values:n,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=gr.createElement(o.h,this.options)),o);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.m(n);else{const s=new Op(r,this),a=s.p(this.options);s.m(n),this.k(a),this._$AH=s}}_$AC(t){let e=Fd.get(t.strings);return e===void 0&&Fd.set(t.strings,e=new gr(t)),e}O(t){Rd(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,o=0;for(const r of t)o===e.length?e.push(n=new fr(this.S(ur()),this.S(ur()),this,this.options)):n=e[o],n._$AI(r),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,e);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var e;this._$AM===void 0&&(this._$C_=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class Is{constructor(t,e,n,o,r){this.type=1,this._$AH=ie,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=ie}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,o){const r=this.strings;let s=!1;if(r===void 0)t=_o(this,t,e,0),s=!dr(t)||t!==this._$AH&&t!==po,s&&(this._$AH=t);else{const a=t;let l,h;for(t=r[0],l=0;l<r.length-1;l++)h=_o(this,a[n+l],e,l),h===po&&(h=this._$AH[l]),s||(s=!dr(h)||h!==this._$AH[l]),h===ie?t=ie:t!==ie&&(t+=(h!=null?h:"")+r[l+1]),this._$AH[l]=h}s&&!o&&this.P(t)}P(t){t===ie?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}}class Fp extends Is{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===ie?void 0:t}}const Np=fo?fo.emptyScript:"";class Gp extends Is{constructor(){super(...arguments),this.type=4}P(t){t&&t!==ie?this.element.setAttribute(this.name,Np):this.element.removeAttribute(this.name)}}class jp extends Is{constructor(t,e,n,o,r){super(t,e,n,o,r),this.type=5}_$AI(t,e=this){var n;if((t=(n=_o(this,t,e,0))!==null&&n!==void 0?n:ie)===po)return;const o=this._$AH,r=t===ie&&o!==ie||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==ie&&(o===ie||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;typeof this._$AH=="function"?this._$AH.call((n=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&n!==void 0?n:this.element,t):this._$AH.handleEvent(t)}}class Bp{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){_o(this,t)}}const Nd=Ts.litHtmlPolyfillSupport;Nd==null||Nd(gr,fr),((fl=Ts.litHtmlVersions)!==null&&fl!==void 0?fl:Ts.litHtmlVersions=[]).push("2.3.1");/**
|
18
18
|
* @license
|
19
19
|
* Copyright 2017 Google LLC
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
21
|
-
*/var ml,pl;class
|
21
|
+
*/var ml,pl;class An extends go{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Dp(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return po}}An.finalized=!0,An._$litElement$=!0,(ml=globalThis.litElementHydrateSupport)===null||ml===void 0||ml.call(globalThis,{LitElement:An});const Gd=globalThis.litElementPolyfillSupport;Gd==null||Gd({LitElement:An}),((pl=globalThis.litElementVersions)!==null&&pl!==void 0?pl:globalThis.litElementVersions=[]).push("3.2.2");/**
|
22
22
|
* @license
|
23
23
|
* Copyright 2017 Google LLC
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
25
|
-
*/const vl=i=>t=>typeof t=="function"?((e,n)=>(customElements.define(e,n),n))(i,t):((e,n)=>{const{kind:
|
25
|
+
*/const vl=i=>t=>typeof t=="function"?((e,n)=>(customElements.define(e,n),n))(i,t):((e,n)=>{const{kind:o,elements:r}=n;return{kind:o,elements:r,finisher(s){customElements.define(e,s)}}})(i,t);/**
|
26
26
|
* @license
|
27
27
|
* Copyright 2017 Google LLC
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
29
|
-
*/const
|
29
|
+
*/const Wp=(i,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,i)}};function J(i){return(t,e)=>e!==void 0?((n,o,r)=>{o.constructor.createProperty(r,n)})(i,t,e):Wp(i,t)}/**
|
30
30
|
* @license
|
31
31
|
* Copyright 2017 Google LLC
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
33
|
-
*/function
|
33
|
+
*/function Wi(i){return J({...i,state:!0})}/**
|
34
34
|
* @license
|
35
35
|
* Copyright 2021 Google LLC
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
37
|
-
*/var _l;((_l=window.HTMLSlotElement)===null||_l===void 0?void 0:_l.prototype.assignedElements)!=null;class Vp{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Qe=Vp,_r={PROPERTYCHANGE:"propertychange"};class qp{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const yl=qp;function Xp(i,t,e){let n,r;e=e||An;let o=0,s=i.length,a=!1;for(;o<s;)n=o+(s-o>>1),r=+e(i[n],t),r<0?o=n+1:(s=n,a=!r);return a?o:~o}function An(i,t){return i>t?1:i<t?-1:0}function xl(i,t,e){const n=i.length;if(i[0]<=t)return 0;if(t<=i[n-1])return n-1;{let r;if(e>0){for(r=1;r<n;++r)if(i[r]<t)return r-1}else if(e<0){for(r=1;r<n;++r)if(i[r]<=t)return r}else for(r=1;r<n;++r){if(i[r]==t)return r;if(i[r]<t)return typeof e=="function"?e(t,i[r-1],i[r])>0?r-1:r:i[r-1]-t<t-i[r]?r-1:r}return n-1}}function $p(i,t,e){for(;t<e;){const n=i[t];i[t]=i[e],i[e]=n,++t,--e}}function li(i,t){const e=Array.isArray(t)?t:[t],n=e.length;for(let r=0;r<n;r++)i[i.length]=e[r]}function Vi(i,t){const e=i.length;if(e!==t.length)return!1;for(let n=0;n<e;n++)if(i[n]!==t[n])return!1;return!0}function Wp(i,t,e){const n=t||An;return i.every(function(r,o){if(o===0)return!0;const s=n(i[o-1],r);return!(s>0||e&&s===0)})}function Dn(){return!0}function yr(){return!1}function Ln(){}function Yp(i){let t=!1,e,n,r;return function(){const o=Array.prototype.slice.call(arguments);return(!t||this!==r||!Vi(o,n))&&(t=!0,r=this,n=o,e=i.apply(this,arguments)),e}}function go(i){for(const t in i)delete i[t]}function Fn(i){let t;for(t in i)return!1;return!t}class Kp extends yl{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const n=this.listeners_||(this.listeners_={}),r=n[t]||(n[t]=[]);r.includes(e)||r.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,r=this.listeners_&&this.listeners_[n];if(!r)return;const o=e?new Qe(t):t;o.target||(o.target=this.eventTarget_||this);const s=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});n in s||(s[n]=0,a[n]=0),++s[n];let l;for(let h=0,u=r.length;h<u;++h)if("handleEvent"in r[h]?l=r[h].handleEvent(o):l=r[h].call(this,o),l===!1||o.propagationStopped){l=!1;break}if(--s[n]===0){let h=a[n];for(delete a[n];h--;)this.removeEventListener(n,Ln);delete s[n]}return l}disposeInternal(){this.listeners_&&go(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(t,e){const n=this.listeners_&&this.listeners_[t];if(n){const r=n.indexOf(e);r!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[r]=Ln,++this.pendingRemovals_[t]):(n.splice(r,1),n.length===0&&delete this.listeners_[t]))}}}const Is=Kp,tt={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 gt(i,t,e,n,r){if(n&&n!==i&&(e=e.bind(n)),r){const s=e;e=function(){i.removeEventListener(t,e),s.apply(this,arguments)}}const o={target:i,type:t,listener:e};return i.addEventListener(t,e),o}function Rs(i,t,e,n){return gt(i,t,e,n,!0)}function Ot(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),go(i))}class Ps extends Is{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(tt.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,r=new Array(n);for(let o=0;o<n;++o)r[o]=gt(this,t[o],e);return r}else return gt(this,t,e)}onceInternal(t,e){let n;if(Array.isArray(t)){const r=t.length;n=new Array(r);for(let o=0;o<r;++o)n[o]=Rs(this,t[o],e)}else n=Rs(this,t,e);return e.ol_key=n,n}unInternal(t,e){const n=e.ol_key;if(n)Zp(n);else if(Array.isArray(t))for(let r=0,o=t.length;r<o;++r)this.removeEventListener(t[r],e);else this.removeEventListener(t,e)}}Ps.prototype.on,Ps.prototype.once,Ps.prototype.un;function Zp(i){if(Array.isArray(i))for(let t=0,e=i.length;t<e;++t)Ot(i[t]);else Ot(i)}const jd=Ps;function et(){throw new Error("Unimplemented abstract method.")}let Hp=0;function K(i){return i.ol_uid||(i.ol_uid=String(++Hp))}const Jp="7.0.0";class Bd extends Qe{constructor(t,e,n){super(t),this.key=e,this.oldValue=n}}class Qp extends jd{constructor(t){super(),this.on,this.once,this.un,K(this),this.values_=null,t!==void 0&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}hasProperties(){return!!this.values_}notify(t,e){let n;n=`change:${t}`,this.hasListener(n)&&this.dispatchEvent(new Bd(n,t,e)),n=_r.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new Bd(n,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,n){const r=this.values_||(this.values_={});if(n)r[t]=e;else{const o=r[t];r[t]=e,o!==e&&this.notify(t,o)}}setProperties(t,e){for(const n in t)this.set(n,t[n],e)}applyProperties(t){!t.values_||Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const n=this.values_[t];delete this.values_[t],Fn(this.values_)&&(this.values_=null),e||this.notify(t,n)}}}const hi=Qp,qi={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Xi=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",t0=Xi.includes("firefox");Xi.includes("safari")&&!Xi.includes("chrom")&&(Xi.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Xi));const e0=Xi.includes("webkit")&&!Xi.includes("edge"),i0=Xi.includes("macintosh"),Ud=typeof devicePixelRatio<"u"?devicePixelRatio:1,bl=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,n0=typeof Image<"u"&&Image.prototype.decode,Vd=function(){let i=!1;try{const t=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return i}();function Pe(i,t,e,n){let r;return e&&e.length?r=e.shift():bl?r=new OffscreenCanvas(i||300,t||300):r=document.createElement("canvas"),i&&(r.width=i),t&&(r.height=t),r.getContext("2d",n)}function kl(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}function qd(i,t){const e=t.parentNode;e&&e.replaceChild(i,t)}function wl(i){return i&&i.parentNode?i.parentNode.removeChild(i):null}function r0(i){for(;i.lastChild;)i.removeChild(i.lastChild)}function o0(i,t){const e=i.childNodes;for(let n=0;;++n){const r=e[n],o=t[n];if(!r&&!o)break;if(r!==o){if(!r){i.appendChild(o);continue}if(!o){i.removeChild(r),--n;continue}i.insertBefore(o,r)}}}class s0 extends hi{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){wl(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&wl(this.element);for(let e=0,n=this.listenerKeys.length;e<n;++e)Ot(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==Ln&&this.listenerKeys.push(gt(t,qi.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}}const mo=s0,As="ol-hidden",po="ol-unselectable",El="ol-control",Xd="ol-collapsed",a0=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"),$d=["style","variant","weight","size","lineHeight","family"],Wd=function(i){const t=i.match(a0);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,r=$d.length;n<r;++n){const o=t[n+1];o!==void 0&&(e[$d[n]]=o)}return e.families=e.family.split(/,\s?/),e},At={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 l0 extends Error{constructor(t){const e="v"+Jp.split("-")[0],n="Assertion failed. See https://openlayers.org/en/"+e+"/doc/errors/#"+t+" for details.";super(n),this.code=t,this.name="AssertionError",this.message=n}}const Yd=l0;function ft(i,t){if(!i)throw new Yd(t)}function Wt(i,t,e){return Math.min(Math.max(i,t),e)}function h0(i,t,e,n,r,o){const s=r-e,a=o-n;if(s!==0||a!==0){const l=((i-e)*s+(t-n)*a)/(s*s+a*a);l>1?(e=r,n=o):l>0&&(e+=s*l,n+=a*l)}return On(i,t,e,n)}function On(i,t,e,n){const r=e-i,o=n-t;return r*r+o*o}function u0(i){const t=i.length;for(let n=0;n<t;n++){let r=n,o=Math.abs(i[n][n]);for(let a=n+1;a<t;a++){const l=Math.abs(i[a][n]);l>o&&(o=l,r=a)}if(o===0)return null;const s=i[r];i[r]=i[n],i[n]=s;for(let a=n+1;a<t;a++){const l=-i[a][n]/i[n][n];for(let h=n;h<t+1;h++)n==h?i[a][h]=0:i[a][h]+=l*i[n][h]}}const e=new Array(t);for(let n=t-1;n>=0;n--){e[n]=i[n][t]/i[n][n];for(let r=n-1;r>=0;r--)i[r][t]-=i[r][n]*e[n]}return e}function Nn(i){return i*Math.PI/180}function $i(i,t){const e=i%t;return e*t<0?e+t:e}function ki(i,t,e){return i+e*(t-i)}function Kd(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function Ds(i,t){return Math.floor(Kd(i,t))}function Ls(i,t){return Math.ceil(Kd(i,t))}class d0 extends hi{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[At.OPACITY]=t.opacity!==void 0?t.opacity:1,ft(typeof e[At.OPACITY]=="number",64),e[At.VISIBLE]=t.visible!==void 0?t.visible:!0,e[At.Z_INDEX]=t.zIndex,e[At.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[At.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[At.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[At.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:t===void 0?!0:t},n=this.getZIndex();return e.opacity=Wt(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=n===void 0&&!e.managed?1/0:n,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return et()}getLayerStatesArray(t){return et()}getExtent(){return this.get(At.EXTENT)}getMaxResolution(){return this.get(At.MAX_RESOLUTION)}getMinResolution(){return this.get(At.MIN_RESOLUTION)}getMinZoom(){return this.get(At.MIN_ZOOM)}getMaxZoom(){return this.get(At.MAX_ZOOM)}getOpacity(){return this.get(At.OPACITY)}getSourceState(){return et()}getVisible(){return this.get(At.VISIBLE)}getZIndex(){return this.get(At.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(At.EXTENT,t)}setMaxResolution(t){this.set(At.MAX_RESOLUTION,t)}setMinResolution(t){this.set(At.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(At.MAX_ZOOM,t)}setMinZoom(t){this.set(At.MIN_ZOOM,t)}setOpacity(t){ft(typeof t=="number",64),this.set(At.OPACITY,t)}setVisible(t){this.set(At.VISIBLE,t)}setZIndex(t){this.set(At.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Zd=d0,Wi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class c0 extends Zd{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(At.SOURCE,this.handleSourcePropertyChange_);const n=t.source?t.source:null;this.setSource(n)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(At.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed()}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Ot(this.sourceChangeKey_),this.sourceChangeKey_=null);const t=this.getSource();t&&(this.sourceChangeKey_=gt(t,tt.CHANGE,this.handleSourceChange_,this)),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise(e=>e([]))}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}render(t,e){const n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(At.MAP,t)}getMapInternal(){return this.get(At.MAP)}setMap(t){this.mapPrecomposeKey_&&(Ot(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Ot(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=gt(t,Wi.PRECOMPOSE,function(e){const r=e.frameState.layerStatesArray,o=this.getLayerState(!1);ft(!r.some(function(s){return s.layer===o.layer}),67),r.push(o)},this),this.mapRenderKey_=gt(this,tt.CHANGE,t.render,t),this.changed())}setSource(t){this.set(At.SOURCE,t)}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 Ml(i,t){if(!i.visible)return!1;const e=t.resolution;if(e<i.minResolution||e>=i.maxResolution)return!1;const n=t.zoom;return n>i.minZoom&&n<=i.maxZoom}const Fs=c0;class f0 extends mo{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=t.collapsed!==void 0?t.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=t.collapsible!==void 0,this.collapsible_=t.collapsible!==void 0?t.collapsible:!0,this.collapsible_||(this.collapsed_=!1);const e=t.className!==void 0?t.className:"ol-attribution",n=t.tipLabel!==void 0?t.tipLabel:"Attributions",r=t.expandClassName!==void 0?t.expandClassName:e+"-expand",o=t.collapseLabel!==void 0?t.collapseLabel:"\u203A",s=t.collapseClassName!==void 0?t.collapseClassName:e+"-collapse";typeof o=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o,this.collapseLabel_.className=s):this.collapseLabel_=o;const a=t.label!==void 0?t.label:"i";typeof 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(tt.CLICK,this.handleClick_.bind(this),!1);const h=e+" "+po+" "+El+(this.collapsed_&&this.collapsible_?" "+Xd:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=h,u.appendChild(this.toggleButton_),u.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e={},n=[];let r=!0;const o=t.layerStatesArray;for(let s=0,a=o.length;s<a;++s){const l=o[s];if(!Ml(l,t.viewState))continue;const h=l.layer.getSource();if(!h)continue;const u=h.getAttributions();if(!u)continue;const d=u(t);if(!!d)if(r=r&&h.getAttributionsCollapsible()!==!1,Array.isArray(d))for(let c=0,f=d.length;c<f;++c)d[c]in e||(n.push(d[c]),e[d[c]]=!0);else d in e||(n.push(d),e[d]=!0)}return this.overrideCollapsible_||this.setCollapsible(r),n}updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!Vi(e,this.renderedAttributions_)){r0(this.ulElement_);for(let r=0,o=e.length;r<o;++r){const s=document.createElement("li");s.innerHTML=e[r],this.ulElement_.appendChild(s)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(Xd),this.collapsed_?qd(this.collapseLabel_,this.label_):qd(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,!(!this.collapsible_||this.collapsed_===t)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}}const g0=f0,fe={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Cl={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},xr={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class m0{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||xr[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Os=m0,vo=6378137,br=Math.PI*vo,p0=[-br,-br,br,br],v0=[-180,-85,180,85],Ns=vo*Math.log(Math.tan(Math.PI/2));class kr extends Os{constructor(t){super({code:t,units:"m",extent:p0,global:!0,worldExtent:v0,getPointResolution:function(e,n){return e/Math.cosh(n[1]/vo)}})}}const Hd=[new kr("EPSG:3857"),new kr("EPSG:102100"),new kr("EPSG:102113"),new kr("EPSG:900913"),new kr("http://www.opengis.net/def/crs/EPSG/0/3857"),new kr("http://www.opengis.net/gml/srs/epsg.xml#3857")];function _0(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let r=0;r<n;r+=e){t[r]=br*i[r]/180;let o=vo*Math.log(Math.tan(Math.PI*(+i[r+1]+90)/360));o>Ns?o=Ns:o<-Ns&&(o=-Ns),t[r+1]=o}return t}function y0(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let r=0;r<n;r+=e)t[r]=180*i[r]/br,t[r+1]=360*Math.atan(Math.exp(i[r+1]/vo))/Math.PI-90;return t}const x0=6378137,Jd=[-180,-90,180,90],b0=Math.PI*x0/180;class Gn extends Os{constructor(t,e){super({code:t,units:"degrees",extent:Jd,axisOrientation:e,global:!0,metersPerUnit:b0,worldExtent:Jd})}}const Qd=[new Gn("CRS:84"),new Gn("EPSG:4326","neu"),new Gn("urn:ogc:def:crs:OGC:1.3:CRS84"),new Gn("urn:ogc:def:crs:OGC:2:84"),new Gn("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Gn("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Gn("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Sl={};function k0(i){return Sl[i]||Sl[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function w0(i,t){Sl[i]=t}let wr={};function Er(i,t,e){const n=i.getCode(),r=t.getCode();n in wr||(wr[n]={}),wr[n][r]=e}function tc(i,t){let e;return i in wr&&t in wr[i]&&(e=wr[i][t]),e}const ne={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function xe(i){const t=Ge();for(let e=0,n=i.length;e<n;++e)xo(t,i[e]);return t}function E0(i,t,e){const n=Math.min.apply(null,i),r=Math.min.apply(null,t),o=Math.max.apply(null,i),s=Math.max.apply(null,t);return ti(n,r,o,s,e)}function ui(i,t,e){return e?(e[0]=i[0]-t,e[1]=i[1]-t,e[2]=i[2]+t,e[3]=i[3]+t,e):[i[0]-t,i[1]-t,i[2]+t,i[3]+t]}function ec(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i.slice()}function jn(i,t,e){let n,r;return t<i[0]?n=i[0]-t:i[2]<t?n=t-i[2]:n=0,e<i[1]?r=i[1]-e:i[3]<e?r=e-i[3]:r=0,n*n+r*r}function Gs(i,t){return Tl(i,t[0],t[1])}function Bn(i,t){return i[0]<=t[0]&&t[2]<=i[2]&&i[1]<=t[1]&&t[3]<=i[3]}function Tl(i,t,e){return i[0]<=t&&t<=i[2]&&i[1]<=e&&e<=i[3]}function zl(i,t){const e=i[0],n=i[1],r=i[2],o=i[3],s=t[0],a=t[1];let l=ne.UNKNOWN;return s<e?l=l|ne.LEFT:s>r&&(l=l|ne.RIGHT),a<n?l=l|ne.BELOW:a>o&&(l=l|ne.ABOVE),l===ne.UNKNOWN&&(l=ne.INTERSECTING),l}function Ge(){return[1/0,1/0,-1/0,-1/0]}function ti(i,t,e,n,r){return r?(r[0]=i,r[1]=t,r[2]=e,r[3]=n,r):[i,t,e,n]}function _o(i){return ti(1/0,1/0,-1/0,-1/0,i)}function yo(i,t){const e=i[0],n=i[1];return ti(e,n,e,n,t)}function Il(i,t,e,n,r){const o=_o(r);return nc(o,i,t,e,n)}function Mr(i,t){return i[0]==t[0]&&i[2]==t[2]&&i[1]==t[1]&&i[3]==t[3]}function ic(i,t){return t[0]<i[0]&&(i[0]=t[0]),t[2]>i[2]&&(i[2]=t[2]),t[1]<i[1]&&(i[1]=t[1]),t[3]>i[3]&&(i[3]=t[3]),i}function xo(i,t){t[0]<i[0]&&(i[0]=t[0]),t[0]>i[2]&&(i[2]=t[0]),t[1]<i[1]&&(i[1]=t[1]),t[1]>i[3]&&(i[3]=t[1])}function nc(i,t,e,n,r){for(;e<n;e+=r)M0(i,t[e],t[e+1]);return i}function M0(i,t,e){i[0]=Math.min(i[0],t),i[1]=Math.min(i[1],e),i[2]=Math.max(i[2],t),i[3]=Math.max(i[3],e)}function Rl(i,t){let e;return e=t(js(i)),e||(e=t(Bs(i)),e)||(e=t(Us(i)),e)||(e=t(Ki(i)),e)?e:!1}function Pl(i){let t=0;return Ll(i)||(t=Nt(i)*$e(i)),t}function js(i){return[i[0],i[1]]}function Bs(i){return[i[2],i[1]]}function Yi(i){return[(i[0]+i[2])/2,(i[1]+i[3])/2]}function C0(i,t){let e;return t==="bottom-left"?e=js(i):t==="bottom-right"?e=Bs(i):t==="top-left"?e=Ki(i):t==="top-right"?e=Us(i):ft(!1,13),e}function Al(i,t,e,n,r){const[o,s,a,l,h,u,d,c]=Dl(i,t,e,n);return ti(Math.min(o,a,h,d),Math.min(s,l,u,c),Math.max(o,a,h,d),Math.max(s,l,u,c),r)}function Dl(i,t,e,n){const r=t*n[0]/2,o=t*n[1]/2,s=Math.cos(e),a=Math.sin(e),l=r*s,h=r*a,u=o*s,d=o*a,c=i[0],f=i[1];return[c-l+d,f-h-u,c-l-d,f-h+u,c+l-d,f+h+u,c+l+d,f+h-u,c-l+d,f-h-u]}function $e(i){return i[3]-i[1]}function Un(i,t,e){const n=e||Ge();return Kt(i,t)?(i[0]>t[0]?n[0]=i[0]:n[0]=t[0],i[1]>t[1]?n[1]=i[1]:n[1]=t[1],i[2]<t[2]?n[2]=i[2]:n[2]=t[2],i[3]<t[3]?n[3]=i[3]:n[3]=t[3]):_o(n),n}function Ki(i){return[i[0],i[3]]}function Us(i){return[i[2],i[3]]}function Nt(i){return i[2]-i[0]}function Kt(i,t){return i[0]<=t[2]&&i[2]>=t[0]&&i[1]<=t[3]&&i[3]>=t[1]}function Ll(i){return i[2]<i[0]||i[3]<i[1]}function S0(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i}function T0(i,t,e){let n=!1;const r=zl(i,t),o=zl(i,e);if(r===ne.INTERSECTING||o===ne.INTERSECTING)n=!0;else{const s=i[0],a=i[1],l=i[2],h=i[3],u=t[0],d=t[1],c=e[0],f=e[1],g=(f-d)/(c-u);let m,p;!!(o&ne.ABOVE)&&!(r&ne.ABOVE)&&(m=c-(f-h)/g,n=m>=s&&m<=l),!n&&!!(o&ne.RIGHT)&&!(r&ne.RIGHT)&&(p=f-(c-l)*g,n=p>=a&&p<=h),!n&&!!(o&ne.BELOW)&&!(r&ne.BELOW)&&(m=c-(f-a)/g,n=m>=s&&m<=l),!n&&!!(o&ne.LEFT)&&!(r&ne.LEFT)&&(p=f-(c-s)*g,n=p>=a&&p<=h)}return n}function z0(i,t,e,n){let r=[];if(n>1){const a=i[2]-i[0],l=i[3]-i[1];for(let h=0;h<n;++h)r.push(i[0]+a*h/n,i[1],i[2],i[1]+l*h/n,i[2]-a*h/n,i[3],i[0],i[3]-l*h/n)}else r=[i[0],i[1],i[2],i[1],i[2],i[3],i[0],i[3]];t(r,r,2);const o=[],s=[];for(let a=0,l=r.length;a<l;a+=2)o.push(r[a]),s.push(r[a+1]);return E0(o,s,e)}function rc(i,t){const e=t.getExtent(),n=Yi(i);if(t.canWrapX()&&(n[0]<e[0]||n[0]>=e[2])){const r=Nt(e),s=Math.floor((n[0]-e[0])/r)*r;i[0]-=s,i[2]-=s}return i}function I0(i,t){if(t.canWrapX()){const e=t.getExtent();if(!isFinite(i[0])||!isFinite(i[2]))return[[e[0],i[1],e[2],i[3]]];rc(i,t);const n=Nt(e);if(Nt(i)>n)return[[e[0],i[1],e[2],i[3]]];if(i[0]<e[0])return[[i[0]+n,i[1],e[2],i[3]],[e[0],i[1],i[2],i[3]]];if(i[2]>e[2])return[[i[0],i[1],e[2],i[3]],[e[0],i[1],i[2]-n,i[3]]]}return[i]}function R0(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function P0(i,t){const e=t.getRadius(),n=t.getCenter(),r=n[0],o=n[1],s=i[0],a=i[1];let l=s-r;const h=a-o;l===0&&h===0&&(l=1);const u=Math.sqrt(l*l+h*h),d=r+e*l/u,c=o+e*h/u;return[d,c]}function Fl(i,t){const e=i[0],n=i[1],r=t[0],o=t[1],s=r[0],a=r[1],l=o[0],h=o[1],u=l-s,d=h-a,c=u===0&&d===0?0:(u*(e-s)+d*(n-a))/(u*u+d*d||0);let f,g;return c<=0?(f=s,g=a):c>=1?(f=l,g=h):(f=s+c*u,g=a+c*d),[f,g]}function ei(i,t){let e=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=t[n]){e=!1;break}return e}function Ol(i,t){const e=Math.cos(t),n=Math.sin(t),r=i[0]*e-i[1]*n,o=i[1]*e+i[0]*n;return i[0]=r,i[1]=o,i}function A0(i,t){return i[0]*=t,i[1]*=t,i}function wi(i,t){const e=i[0]-t[0],n=i[1]-t[1];return e*e+n*n}function oc(i,t){return Math.sqrt(wi(i,t))}function D0(i,t){return wi(i,Fl(i,t))}function Nl(i,t){if(t.canWrapX()){const e=Nt(t.getExtent()),n=sc(i,t,e);n&&(i[0]-=n*e)}return i}function sc(i,t,e){const n=t.getExtent();let r=0;return t.canWrapX()&&(i[0]<n[0]||i[0]>n[2])&&(e=e||Nt(n),r=Math.floor((i[0]-n[0])/e)),r}const ac=63710088e-1;function lc(i,t,e){e=e||ac;const n=Nn(i[1]),r=Nn(t[1]),o=(r-n)/2,s=Nn(t[0]-i[0])/2,a=Math.sin(o)*Math.sin(o)+Math.sin(s)*Math.sin(s)*Math.cos(n)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function Vs(i,t){let e=0;const n=i.length;let r=i[n-1][0],o=i[n-1][1];for(let s=0;s<n;s++){const a=i[s][0],l=i[s][1];e+=Nn(a-r)*(2+Math.sin(Nn(o))+Math.sin(Nn(l))),r=a,o=l}return e*t*t/2}function hc(i,t){t=t||{};const e=t.radius||ac,n=t.projection||"EPSG:3857",r=i.getType();r!=="GeometryCollection"&&(i=i.clone().transform(n,"EPSG:4326"));let o=0,s,a,l,h,u,d;switch(r){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(s=i.getCoordinates(),o=Math.abs(Vs(s[0],e)),l=1,h=s.length;l<h;++l)o-=Math.abs(Vs(s[l],e));break}case"MultiPolygon":{for(s=i.getCoordinates(),l=0,h=s.length;l<h;++l)for(a=s[l],o+=Math.abs(Vs(a[0],e)),u=1,d=a.length;u<d;++u)o-=Math.abs(Vs(a[u],e));break}case"GeometryCollection":{const c=i.getGeometries();for(l=0,h=c.length;l<h;++l)o+=hc(c[l],t);break}default:throw new Error("Unsupported geometry type: "+r)}return o}let Gl=!0;function L0(i){Gl=!(i===void 0?!0:i)}function jl(i,t,e){if(t!==void 0){for(let n=0,r=i.length;n<r;++n)t[n]=i[n];t=t}else t=i.slice();return t}function uc(i,t,e){if(t!==void 0&&i!==t){for(let n=0,r=i.length;n<r;++n)t[n]=i[n];i=t}return i}function dc(i){w0(i.getCode(),i),Er(i,i,jl)}function F0(i){i.forEach(dc)}function Gt(i){return typeof i=="string"?k0(i):i||null}function qs(i,t,e,n){i=Gt(i);let r;const o=i.getPointResolutionFunc();if(o){if(r=o(t,e),n&&n!==i.getUnits()){const s=i.getMetersPerUnit();s&&(r=r*s/xr[n])}}else{const s=i.getUnits();if(s=="degrees"&&!n||n=="degrees")r=t;else{const a=Vl(i,Gt("EPSG:4326"));if(a===uc&&s!=="degrees")r=t*i.getMetersPerUnit();else{let h=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];h=a(h,h,2);const u=lc(h.slice(0,2),h.slice(2,4)),d=lc(h.slice(4,6),h.slice(6,8));r=(u+d)/2}const l=n?xr[n]:i.getMetersPerUnit();l!==void 0&&(r/=l)}}return r}function Bl(i){F0(i),i.forEach(function(t){i.forEach(function(e){t!==e&&Er(t,e,jl)})})}function O0(i,t,e,n){i.forEach(function(r){t.forEach(function(o){Er(r,o,e),Er(o,r,n)})})}function Ul(i,t){return i?typeof i=="string"?Gt(i):i:Gt(t)}function cc(i){return function(t,e,n){const r=t.length;n=n!==void 0?n:2,e=e!==void 0?e:new Array(r);for(let o=0;o<r;o+=n){const s=i(t.slice(o,o+n)),a=s.length;for(let l=0,h=n;l<h;++l)e[o+l]=l>=a?t[o+l]:s[l]}return e}}function N0(i,t,e,n){const r=Gt(i),o=Gt(t);Er(r,o,cc(e)),Er(o,r,cc(n))}function G0(i,t){const e=Xs(i,t!==void 0?t:"EPSG:3857","EPSG:4326"),n=e[0];return(n<-180||n>180)&&(e[0]=$i(n+180,360)-180),e}function Vn(i,t){if(i===t)return!0;const e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||Vl(i,t)===jl)&&e}function Vl(i,t){const e=i.getCode(),n=t.getCode();let r=tc(e,n);return r||(r=uc),r}function bo(i,t){const e=Gt(i),n=Gt(t);return Vl(e,n)}function Xs(i,t,e){return bo(t,e)(i,void 0,i.length)}function j0(i,t,e,n){const r=bo(t,e);return z0(i,r,void 0,n)}function Cr(i,t){return i}function Vt(i,t){return Gl&&!ei(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(Gl=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function ql(i,t){return i}function Zi(i,t){return i}function fc(i,t,e){return function(n){let r,o;if(i.canWrapX()){const s=i.getExtent(),a=Nt(s);n=n.slice(0),o=sc(n,i,a),o&&(n[0]=n[0]-o*a),n[0]=Wt(n[0],s[0],s[2]),n[1]=Wt(n[1],s[1],s[3]),r=e(n)}else r=e(n);return o&&t.canWrapX()&&(r[0]+=o*Nt(t.getExtent())),r}}function B0(){Bl(Hd),Bl(Qd),O0(Qd,Hd,_0,y0)}B0();const re={ADD:"add",REMOVE:"remove"},gc={LENGTH:"length"};class $s extends Qe{constructor(t,e,n){super(t),this.element=e,this.index=n}}class U0 extends hi{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],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(t){for(let e=0,n=t.length;e<n;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let n=0,r=e.length;n<r;++n)t(e[n],n,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(gc.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new $s(re.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let n=0,r=e.length;n<r;++n)if(e[n]===t)return this.removeAt(n)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new $s(re.REMOVE,e,t)),e}setAt(t,e){const n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const r=this.array_[t];this.array_[t]=e,this.dispatchEvent(new $s(re.REMOVE,r,t)),this.dispatchEvent(new $s(re.ADD,e,t))}updateLength_(){this.set(gc.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,r=this.array_.length;n<r;++n)if(this.array_[n]===t&&n!==e)throw new Yd(58)}}const We=U0,mc=new Array(6);function Ye(){return[1,0,0,1,0,0]}function pc(i){return Ws(i,1,0,0,1,0,0)}function Xl(i,t){const e=i[0],n=i[1],r=i[2],o=i[3],s=i[4],a=i[5],l=t[0],h=t[1],u=t[2],d=t[3],c=t[4],f=t[5];return i[0]=e*l+r*h,i[1]=n*l+o*h,i[2]=e*u+r*d,i[3]=n*u+o*d,i[4]=e*c+r*f+s,i[5]=n*c+o*f+a,i}function Ws(i,t,e,n,r,o,s){return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i[4]=o,i[5]=s,i}function V0(i,t){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i}function Jt(i,t){const e=t[0],n=t[1];return t[0]=i[0]*e+i[2]*n+i[4],t[1]=i[1]*e+i[3]*n+i[5],t}function $l(i,t,e){return Xl(i,Ws(mc,t,0,0,e,0,0))}function q0(i,t,e){return Ws(i,t,0,0,e,0,0)}function X0(i,t,e){return Xl(i,Ws(mc,1,0,0,1,t,e))}function Ei(i,t,e,n,r,o,s,a){const l=Math.sin(o),h=Math.cos(o);return i[0]=n*h,i[1]=r*l,i[2]=-n*l,i[3]=r*h,i[4]=s*n*h-a*n*l+t,i[5]=s*r*l+a*r*h+e,i}function Wl(i,t){const e=$0(t);ft(e!==0,32);const n=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5];return i[0]=s/e,i[1]=-r/e,i[2]=-o/e,i[3]=n/e,i[4]=(o*l-s*a)/e,i[5]=-(n*l-r*a)/e,i}function $0(i){return i[0]*i[3]-i[1]*i[2]}let vc;function _c(i){const t="matrix("+i.join(", ")+")";if(bl)return t;const e=vc||(vc=document.createElement("div"));return e.style.transform=t,e.style.transform}const W0=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Y0=/^([a-z]*)$|^hsla?\(.*\)$/i;function Yl(i){return typeof i=="string"?i:xc(i)}function K0(i){const t=document.createElement("div");if(t.style.color=i,t.style.color!==""){document.body.appendChild(t);const e=getComputedStyle(t).color;return document.body.removeChild(t),e}else return""}const Z0=function(){const t={};let e=0;return function(n){let r;if(t.hasOwnProperty(n))r=t[n];else{if(e>=1024){let o=0;for(const s in t)(o++&3)===0&&(delete t[s],--e)}r=H0(n),t[n]=r,++e}return r}}();function ko(i){return Array.isArray(i)?i:Z0(i)}function H0(i){let t,e,n,r,o;if(Y0.exec(i)&&(i=K0(i)),W0.exec(i)){const s=i.length-1;let a;s<=4?a=1:a=2;const l=s===4||s===8;t=parseInt(i.substr(1+0*a,a),16),e=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&&(t=(t<<4)+t,e=(e<<4)+e,n=(n<<4)+n,l&&(r=(r<<4)+r)),o=[t,e,n,r/255]}else i.startsWith("rgba(")?(o=i.slice(5,-1).split(",").map(Number),yc(o)):i.startsWith("rgb(")?(o=i.slice(4,-1).split(",").map(Number),o.push(1),yc(o)):ft(!1,14);return o}function yc(i){return i[0]=Wt(i[0]+.5|0,0,255),i[1]=Wt(i[1]+.5|0,0,255),i[2]=Wt(i[2]+.5|0,0,255),i[3]=Wt(i[3],0,1),i}function xc(i){let t=i[0];t!=(t|0)&&(t=t+.5|0);let e=i[1];e!=(e|0)&&(e=e+.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("+t+","+e+","+n+","+r+")"}class J0{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const n=this.cache_[e];(t++&3)===0&&!n.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,n){const r=bc(t,e,n);return r in this.cache_?this.cache_[r]:null}set(t,e,n,r){const o=bc(t,e,n);this.cache_[o]=r,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function bc(i,t,e){const n=e?Yl(e):"null";return t+":"+i+":"+n}const Ys=new J0;class Q0 extends yl{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){et()}calculateMatrices2D(t){const e=t.viewState,n=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;Ei(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Wl(r,n)}forEachFeatureAtCoordinate(t,e,n,r,o,s,a,l){let h;const u=e.viewState;function d(x,k,w,M){return o.call(s,k,x?w:null,M)}const c=u.projection,f=Nl(t.slice(),c),g=[[0,0]];if(c.canWrapX()&&r){const x=c.getExtent(),k=Nt(x);g.push([-k,0],[k,0])}const m=e.layerStatesArray,p=m.length,_=[],v=[];for(let x=0;x<g.length;x++)for(let k=p-1;k>=0;--k){const w=m[k],M=w.layer;if(M.hasRenderer()&&Ml(w,u)&&a.call(l,M)){const E=M.getRenderer(),S=M.getSource();if(E&&S){const I=S.getWrapX()?f:t,A=d.bind(null,w.managed);v[0]=I[0]+g[x][0],v[1]=I[1]+g[x][1],h=E.forEachFeatureAtCoordinate(v,e,n,A,_)}if(h)return h}}if(_.length===0)return;const y=1/_.length;return _.forEach((x,k)=>x.distanceSq+=k*y),_.sort((x,k)=>x.distanceSq-k.distanceSq),_.some(x=>h=x.callback(x.feature,x.layer,x.geometry)),h}hasFeatureAtCoordinate(t,e,n,r,o,s){return this.forEachFeatureAtCoordinate(t,e,n,r,Dn,this,o,s)!==void 0}getMap(){return this.map_}renderFrame(t){et()}scheduleExpireIconCache(t){Ys.canExpireCache()&&t.postRenderFunctions.push(tv)}}function tv(i,t){Ys.expire()}const ev=Q0;class iv extends Qe{constructor(t,e,n,r){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=r}}const kc=iv,wc="10px sans-serif",Mi="#000",Ks="round",wo=[],Eo=0,Sr="round",Mo=10,Co="#000",So="center",Zs="middle",qn=[0,0,0,0],To=1,Ci=new hi;let Tr=null,Kl;const Zl={},nv=function(){const t="32px ",e=["monospace","serif"],n=e.length,r="wmytzilWMYTZIL@#/&?$%10\uF013";let o,s;function a(h,u,d){let c=!0;for(let f=0;f<n;++f){const g=e[f];if(s=Hs(h+" "+u+" "+t+g,r),d!=g){const m=Hs(h+" "+u+" "+t+d+","+g,r);c=c&&m!=s}}return!!c}function l(){let h=!0;const u=Ci.getKeys();for(let d=0,c=u.length;d<c;++d){const f=u[d];Ci.get(f)<100&&(a.apply(this,f.split(`
|
38
|
-
`))?(
|
37
|
+
*/var _l;((_l=window.HTMLSlotElement)===null||_l===void 0?void 0:_l.prototype.assignedElements)!=null;class Zp{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Qe=Zp,yo={PROPERTYCHANGE:"propertychange"};class Yp{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const yl=Yp;function Xp(i,t,e){let n,o;e=e||Pn;let r=0,s=i.length,a=!1;for(;r<s;)n=r+(s-r>>1),o=+e(i[n],t),o<0?r=n+1:(s=n,a=!o);return a?r:~r}function Pn(i,t){return i>t?1:i<t?-1:0}function xl(i,t,e){const n=i.length;if(i[0]<=t)return 0;if(t<=i[n-1])return n-1;{let o;if(e>0){for(o=1;o<n;++o)if(i[o]<t)return o-1}else if(e<0){for(o=1;o<n;++o)if(i[o]<=t)return o}else for(o=1;o<n;++o){if(i[o]==t)return o;if(i[o]<t)return typeof e=="function"?e(t,i[o-1],i[o])>0?o-1:o:i[o-1]-t<t-i[o]?o-1:o}return n-1}}function Up(i,t,e){for(;t<e;){const n=i[t];i[t]=i[e],i[e]=n,++t,--e}}function li(i,t){const e=Array.isArray(t)?t:[t],n=e.length;for(let o=0;o<n;o++)i[i.length]=e[o]}function Zi(i,t){const e=i.length;if(e!==t.length)return!1;for(let n=0;n<e;n++)if(i[n]!==t[n])return!1;return!0}function Vp(i,t,e){const n=t||Pn;return i.every(function(o,r){if(r===0)return!0;const s=n(i[r-1],o);return!(s>0||e&&s===0)})}function Dn(){return!0}function xo(){return!1}function Ln(){}function qp(i){let t=!1,e,n,o;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==o||!Zi(r,n))&&(t=!0,o=this,n=r,e=i.apply(this,arguments)),e}}function mr(i){for(const t in i)delete i[t]}function On(i){let t;for(t in i)return!1;return!t}class $p extends yl{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const n=this.listeners_||(this.listeners_={}),o=n[t]||(n[t]=[]);o.includes(e)||o.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,o=this.listeners_&&this.listeners_[n];if(!o)return;const r=e?new Qe(t):t;r.target||(r.target=this.eventTarget_||this);const s=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});n in s||(s[n]=0,a[n]=0),++s[n];let l;for(let h=0,u=o.length;h<u;++h)if("handleEvent"in o[h]?l=o[h].handleEvent(r):l=o[h].call(this,r),l===!1||r.propagationStopped){l=!1;break}if(--s[n]===0){let h=a[n];for(delete a[n];h--;)this.removeEventListener(n,Ln);delete s[n]}return l}disposeInternal(){this.listeners_&&mr(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(t,e){const n=this.listeners_&&this.listeners_[t];if(n){const o=n.indexOf(e);o!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[o]=Ln,++this.pendingRemovals_[t]):(n.splice(o,1),n.length===0&&delete this.listeners_[t]))}}}const zs=$p,tt={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 ft(i,t,e,n,o){if(n&&n!==i&&(e=e.bind(n)),o){const s=e;e=function(){i.removeEventListener(t,e),s.apply(this,arguments)}}const r={target:i,type:t,listener:e};return i.addEventListener(t,e),r}function Rs(i,t,e,n){return ft(i,t,e,n,!0)}function Ft(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),mr(i))}class As extends zs{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(tt.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,o=new Array(n);for(let r=0;r<n;++r)o[r]=ft(this,t[r],e);return o}else return ft(this,t,e)}onceInternal(t,e){let n;if(Array.isArray(t)){const o=t.length;n=new Array(o);for(let r=0;r<o;++r)n[r]=Rs(this,t[r],e)}else n=Rs(this,t,e);return e.ol_key=n,n}unInternal(t,e){const n=e.ol_key;if(n)Hp(n);else if(Array.isArray(t))for(let o=0,r=t.length;o<r;++o)this.removeEventListener(t[o],e);else this.removeEventListener(t,e)}}As.prototype.on,As.prototype.once,As.prototype.un;function Hp(i){if(Array.isArray(i))for(let t=0,e=i.length;t<e;++t)Ft(i[t]);else Ft(i)}const jd=As;function et(){throw new Error("Unimplemented abstract method.")}let Kp=0;function $(i){return i.ol_uid||(i.ol_uid=String(++Kp))}const Jp="7.0.0";class Bd extends Qe{constructor(t,e,n){super(t),this.key=e,this.oldValue=n}}class Qp extends jd{constructor(t){super(),this.on,this.once,this.un,$(this),this.values_=null,t!==void 0&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}hasProperties(){return!!this.values_}notify(t,e){let n;n=`change:${t}`,this.hasListener(n)&&this.dispatchEvent(new Bd(n,t,e)),n=yo.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new Bd(n,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,n){const o=this.values_||(this.values_={});if(n)o[t]=e;else{const r=o[t];o[t]=e,r!==e&&this.notify(t,r)}}setProperties(t,e){for(const n in t)this.set(n,t[n],e)}applyProperties(t){!t.values_||Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const n=this.values_[t];delete this.values_[t],On(this.values_)&&(this.values_=null),e||this.notify(t,n)}}}const hi=Qp,Yi={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Xi=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",t0=Xi.includes("firefox");Xi.includes("safari")&&!Xi.includes("chrom")&&(Xi.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Xi));const e0=Xi.includes("webkit")&&!Xi.includes("edge"),i0=Xi.includes("macintosh"),Wd=typeof devicePixelRatio<"u"?devicePixelRatio:1,bl=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,n0=typeof Image<"u"&&Image.prototype.decode,Zd=function(){let i=!1;try{const t=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return i}();function Ae(i,t,e,n){let o;return e&&e.length?o=e.shift():bl?o=new OffscreenCanvas(i||300,t||300):o=document.createElement("canvas"),i&&(o.width=i),t&&(o.height=t),o.getContext("2d",n)}function kl(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}function Yd(i,t){const e=t.parentNode;e&&e.replaceChild(i,t)}function wl(i){return i&&i.parentNode?i.parentNode.removeChild(i):null}function o0(i){for(;i.lastChild;)i.removeChild(i.lastChild)}function r0(i,t){const e=i.childNodes;for(let n=0;;++n){const o=e[n],r=t[n];if(!o&&!r)break;if(o!==r){if(!o){i.appendChild(r);continue}if(!r){i.removeChild(o),--n;continue}i.insertBefore(r,o)}}}class s0 extends hi{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){wl(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&wl(this.element);for(let e=0,n=this.listenerKeys.length;e<n;++e)Ft(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==Ln&&this.listenerKeys.push(ft(t,Yi.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}}const bo=s0,Ps="ol-hidden",pr="ol-unselectable",Ml="ol-control",Xd="ol-collapsed",a0=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"),Ud=["style","variant","weight","size","lineHeight","family"],Vd=function(i){const t=i.match(a0);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,o=Ud.length;n<o;++n){const r=t[n+1];r!==void 0&&(e[Ud[n]]=r)}return e.families=e.family.split(/,\s?/),e},Pt={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 l0 extends Error{constructor(t){const e="v"+Jp.split("-")[0],n="Assertion failed. See https://openlayers.org/en/"+e+"/doc/errors/#"+t+" for details.";super(n),this.code=t,this.name="AssertionError",this.message=n}}const qd=l0;function gt(i,t){if(!i)throw new qd(t)}function Vt(i,t,e){return Math.min(Math.max(i,t),e)}function h0(i,t,e,n,o,r){const s=o-e,a=r-n;if(s!==0||a!==0){const l=((i-e)*s+(t-n)*a)/(s*s+a*a);l>1?(e=o,n=r):l>0&&(e+=s*l,n+=a*l)}return Fn(i,t,e,n)}function Fn(i,t,e,n){const o=e-i,r=n-t;return o*o+r*r}function u0(i){const t=i.length;for(let n=0;n<t;n++){let o=n,r=Math.abs(i[n][n]);for(let a=n+1;a<t;a++){const l=Math.abs(i[a][n]);l>r&&(r=l,o=a)}if(r===0)return null;const s=i[o];i[o]=i[n],i[n]=s;for(let a=n+1;a<t;a++){const l=-i[a][n]/i[n][n];for(let h=n;h<t+1;h++)n==h?i[a][h]=0:i[a][h]+=l*i[n][h]}}const e=new Array(t);for(let n=t-1;n>=0;n--){e[n]=i[n][t]/i[n][n];for(let o=n-1;o>=0;o--)i[o][t]-=i[o][n]*e[n]}return e}function Nn(i){return i*Math.PI/180}function Ui(i,t){const e=i%t;return e*t<0?e+t:e}function ki(i,t,e){return i+e*(t-i)}function $d(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function Ds(i,t){return Math.floor($d(i,t))}function Ls(i,t){return Math.ceil($d(i,t))}class d0 extends hi{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[Pt.OPACITY]=t.opacity!==void 0?t.opacity:1,gt(typeof e[Pt.OPACITY]=="number",64),e[Pt.VISIBLE]=t.visible!==void 0?t.visible:!0,e[Pt.Z_INDEX]=t.zIndex,e[Pt.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[Pt.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[Pt.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[Pt.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:t===void 0?!0:t},n=this.getZIndex();return e.opacity=Vt(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=n===void 0&&!e.managed?1/0:n,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return et()}getLayerStatesArray(t){return et()}getExtent(){return this.get(Pt.EXTENT)}getMaxResolution(){return this.get(Pt.MAX_RESOLUTION)}getMinResolution(){return this.get(Pt.MIN_RESOLUTION)}getMinZoom(){return this.get(Pt.MIN_ZOOM)}getMaxZoom(){return this.get(Pt.MAX_ZOOM)}getOpacity(){return this.get(Pt.OPACITY)}getSourceState(){return et()}getVisible(){return this.get(Pt.VISIBLE)}getZIndex(){return this.get(Pt.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(Pt.EXTENT,t)}setMaxResolution(t){this.set(Pt.MAX_RESOLUTION,t)}setMinResolution(t){this.set(Pt.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(Pt.MAX_ZOOM,t)}setMinZoom(t){this.set(Pt.MIN_ZOOM,t)}setOpacity(t){gt(typeof t=="number",64),this.set(Pt.OPACITY,t)}setVisible(t){this.set(Pt.VISIBLE,t)}setZIndex(t){this.set(Pt.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Hd=d0,Vi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class c0 extends Hd{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(Pt.SOURCE,this.handleSourcePropertyChange_);const n=t.source?t.source:null;this.setSource(n)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(Pt.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed()}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Ft(this.sourceChangeKey_),this.sourceChangeKey_=null);const t=this.getSource();t&&(this.sourceChangeKey_=ft(t,tt.CHANGE,this.handleSourceChange_,this)),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise(e=>e([]))}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}render(t,e){const n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(Pt.MAP,t)}getMapInternal(){return this.get(Pt.MAP)}setMap(t){this.mapPrecomposeKey_&&(Ft(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Ft(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=ft(t,Vi.PRECOMPOSE,function(e){const o=e.frameState.layerStatesArray,r=this.getLayerState(!1);gt(!o.some(function(s){return s.layer===r.layer}),67),o.push(r)},this),this.mapRenderKey_=ft(this,tt.CHANGE,t.render,t),this.changed())}setSource(t){this.set(Pt.SOURCE,t)}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 Cl(i,t){if(!i.visible)return!1;const e=t.resolution;if(e<i.minResolution||e>=i.maxResolution)return!1;const n=t.zoom;return n>i.minZoom&&n<=i.maxZoom}const Os=c0;class g0 extends bo{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=t.collapsed!==void 0?t.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=t.collapsible!==void 0,this.collapsible_=t.collapsible!==void 0?t.collapsible:!0,this.collapsible_||(this.collapsed_=!1);const e=t.className!==void 0?t.className:"ol-attribution",n=t.tipLabel!==void 0?t.tipLabel:"Attributions",o=t.expandClassName!==void 0?t.expandClassName:e+"-expand",r=t.collapseLabel!==void 0?t.collapseLabel:"\u203A",s=t.collapseClassName!==void 0?t.collapseClassName:e+"-collapse";typeof r=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=r,this.collapseLabel_.className=s):this.collapseLabel_=r;const a=t.label!==void 0?t.label:"i";typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a,this.label_.className=o):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(tt.CLICK,this.handleClick_.bind(this),!1);const h=e+" "+pr+" "+Ml+(this.collapsed_&&this.collapsible_?" "+Xd:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=h,u.appendChild(this.toggleButton_),u.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e={},n=[];let o=!0;const r=t.layerStatesArray;for(let s=0,a=r.length;s<a;++s){const l=r[s];if(!Cl(l,t.viewState))continue;const h=l.layer.getSource();if(!h)continue;const u=h.getAttributions();if(!u)continue;const d=u(t);if(!!d)if(o=o&&h.getAttributionsCollapsible()!==!1,Array.isArray(d))for(let c=0,g=d.length;c<g;++c)d[c]in e||(n.push(d[c]),e[d[c]]=!0);else d in e||(n.push(d),e[d]=!0)}return this.overrideCollapsible_||this.setCollapsible(o),n}updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!Zi(e,this.renderedAttributions_)){o0(this.ulElement_);for(let o=0,r=e.length;o<r;++o){const s=document.createElement("li");s.innerHTML=e[o],this.ulElement_.appendChild(s)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(Xd),this.collapsed_?Yd(this.collapseLabel_,this.label_):Yd(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,!(!this.collapsible_||this.collapsed_===t)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}}const f0=g0,ge={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},El={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},ko={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class m0{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||ko[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Fs=m0,vr=6378137,wo=Math.PI*vr,p0=[-wo,-wo,wo,wo],v0=[-180,-85,180,85],Ns=vr*Math.log(Math.tan(Math.PI/2));class Mo extends Fs{constructor(t){super({code:t,units:"m",extent:p0,global:!0,worldExtent:v0,getPointResolution:function(e,n){return e/Math.cosh(n[1]/vr)}})}}const Kd=[new Mo("EPSG:3857"),new Mo("EPSG:102100"),new Mo("EPSG:102113"),new Mo("EPSG:900913"),new Mo("http://www.opengis.net/def/crs/EPSG/0/3857"),new Mo("http://www.opengis.net/gml/srs/epsg.xml#3857")];function _0(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let o=0;o<n;o+=e){t[o]=wo*i[o]/180;let r=vr*Math.log(Math.tan(Math.PI*(+i[o+1]+90)/360));r>Ns?r=Ns:r<-Ns&&(r=-Ns),t[o+1]=r}return t}function y0(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let o=0;o<n;o+=e)t[o]=180*i[o]/wo,t[o+1]=360*Math.atan(Math.exp(i[o+1]/vr))/Math.PI-90;return t}const x0=6378137,Jd=[-180,-90,180,90],b0=Math.PI*x0/180;class Gn extends Fs{constructor(t,e){super({code:t,units:"degrees",extent:Jd,axisOrientation:e,global:!0,metersPerUnit:b0,worldExtent:Jd})}}const Qd=[new Gn("CRS:84"),new Gn("EPSG:4326","neu"),new Gn("urn:ogc:def:crs:OGC:1.3:CRS84"),new Gn("urn:ogc:def:crs:OGC:2:84"),new Gn("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Gn("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Gn("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Sl={};function k0(i){return Sl[i]||Sl[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function w0(i,t){Sl[i]=t}let Co={};function Eo(i,t,e){const n=i.getCode(),o=t.getCode();n in Co||(Co[n]={}),Co[n][o]=e}function tc(i,t){let e;return i in Co&&t in Co[i]&&(e=Co[i][t]),e}const ne={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function xe(i){const t=Ge();for(let e=0,n=i.length;e<n;++e)xr(t,i[e]);return t}function M0(i,t,e){const n=Math.min.apply(null,i),o=Math.min.apply(null,t),r=Math.max.apply(null,i),s=Math.max.apply(null,t);return ti(n,o,r,s,e)}function ui(i,t,e){return e?(e[0]=i[0]-t,e[1]=i[1]-t,e[2]=i[2]+t,e[3]=i[3]+t,e):[i[0]-t,i[1]-t,i[2]+t,i[3]+t]}function ec(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i.slice()}function jn(i,t,e){let n,o;return t<i[0]?n=i[0]-t:i[2]<t?n=t-i[2]:n=0,e<i[1]?o=i[1]-e:i[3]<e?o=e-i[3]:o=0,n*n+o*o}function Gs(i,t){return Tl(i,t[0],t[1])}function Bn(i,t){return i[0]<=t[0]&&t[2]<=i[2]&&i[1]<=t[1]&&t[3]<=i[3]}function Tl(i,t,e){return i[0]<=t&&t<=i[2]&&i[1]<=e&&e<=i[3]}function Il(i,t){const e=i[0],n=i[1],o=i[2],r=i[3],s=t[0],a=t[1];let l=ne.UNKNOWN;return s<e?l=l|ne.LEFT:s>o&&(l=l|ne.RIGHT),a<n?l=l|ne.BELOW:a>r&&(l=l|ne.ABOVE),l===ne.UNKNOWN&&(l=ne.INTERSECTING),l}function Ge(){return[1/0,1/0,-1/0,-1/0]}function ti(i,t,e,n,o){return o?(o[0]=i,o[1]=t,o[2]=e,o[3]=n,o):[i,t,e,n]}function _r(i){return ti(1/0,1/0,-1/0,-1/0,i)}function yr(i,t){const e=i[0],n=i[1];return ti(e,n,e,n,t)}function zl(i,t,e,n,o){const r=_r(o);return nc(r,i,t,e,n)}function So(i,t){return i[0]==t[0]&&i[2]==t[2]&&i[1]==t[1]&&i[3]==t[3]}function ic(i,t){return t[0]<i[0]&&(i[0]=t[0]),t[2]>i[2]&&(i[2]=t[2]),t[1]<i[1]&&(i[1]=t[1]),t[3]>i[3]&&(i[3]=t[3]),i}function xr(i,t){t[0]<i[0]&&(i[0]=t[0]),t[0]>i[2]&&(i[2]=t[0]),t[1]<i[1]&&(i[1]=t[1]),t[1]>i[3]&&(i[3]=t[1])}function nc(i,t,e,n,o){for(;e<n;e+=o)C0(i,t[e],t[e+1]);return i}function C0(i,t,e){i[0]=Math.min(i[0],t),i[1]=Math.min(i[1],e),i[2]=Math.max(i[2],t),i[3]=Math.max(i[3],e)}function Rl(i,t){let e;return e=t(js(i)),e||(e=t(Bs(i)),e)||(e=t(Ws(i)),e)||(e=t($i(i)),e)?e:!1}function Al(i){let t=0;return Ll(i)||(t=Nt(i)*Ue(i)),t}function js(i){return[i[0],i[1]]}function Bs(i){return[i[2],i[1]]}function qi(i){return[(i[0]+i[2])/2,(i[1]+i[3])/2]}function E0(i,t){let e;return t==="bottom-left"?e=js(i):t==="bottom-right"?e=Bs(i):t==="top-left"?e=$i(i):t==="top-right"?e=Ws(i):gt(!1,13),e}function Pl(i,t,e,n,o){const[r,s,a,l,h,u,d,c]=Dl(i,t,e,n);return ti(Math.min(r,a,h,d),Math.min(s,l,u,c),Math.max(r,a,h,d),Math.max(s,l,u,c),o)}function Dl(i,t,e,n){const o=t*n[0]/2,r=t*n[1]/2,s=Math.cos(e),a=Math.sin(e),l=o*s,h=o*a,u=r*s,d=r*a,c=i[0],g=i[1];return[c-l+d,g-h-u,c-l-d,g-h+u,c+l-d,g+h+u,c+l+d,g+h-u,c-l+d,g-h-u]}function Ue(i){return i[3]-i[1]}function Wn(i,t,e){const n=e||Ge();return $t(i,t)?(i[0]>t[0]?n[0]=i[0]:n[0]=t[0],i[1]>t[1]?n[1]=i[1]:n[1]=t[1],i[2]<t[2]?n[2]=i[2]:n[2]=t[2],i[3]<t[3]?n[3]=i[3]:n[3]=t[3]):_r(n),n}function $i(i){return[i[0],i[3]]}function Ws(i){return[i[2],i[3]]}function Nt(i){return i[2]-i[0]}function $t(i,t){return i[0]<=t[2]&&i[2]>=t[0]&&i[1]<=t[3]&&i[3]>=t[1]}function Ll(i){return i[2]<i[0]||i[3]<i[1]}function S0(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i}function T0(i,t,e){let n=!1;const o=Il(i,t),r=Il(i,e);if(o===ne.INTERSECTING||r===ne.INTERSECTING)n=!0;else{const s=i[0],a=i[1],l=i[2],h=i[3],u=t[0],d=t[1],c=e[0],g=e[1],f=(g-d)/(c-u);let m,p;!!(r&ne.ABOVE)&&!(o&ne.ABOVE)&&(m=c-(g-h)/f,n=m>=s&&m<=l),!n&&!!(r&ne.RIGHT)&&!(o&ne.RIGHT)&&(p=g-(c-l)*f,n=p>=a&&p<=h),!n&&!!(r&ne.BELOW)&&!(o&ne.BELOW)&&(m=c-(g-a)/f,n=m>=s&&m<=l),!n&&!!(r&ne.LEFT)&&!(o&ne.LEFT)&&(p=g-(c-s)*f,n=p>=a&&p<=h)}return n}function I0(i,t,e,n){let o=[];if(n>1){const a=i[2]-i[0],l=i[3]-i[1];for(let h=0;h<n;++h)o.push(i[0]+a*h/n,i[1],i[2],i[1]+l*h/n,i[2]-a*h/n,i[3],i[0],i[3]-l*h/n)}else o=[i[0],i[1],i[2],i[1],i[2],i[3],i[0],i[3]];t(o,o,2);const r=[],s=[];for(let a=0,l=o.length;a<l;a+=2)r.push(o[a]),s.push(o[a+1]);return M0(r,s,e)}function oc(i,t){const e=t.getExtent(),n=qi(i);if(t.canWrapX()&&(n[0]<e[0]||n[0]>=e[2])){const o=Nt(e),s=Math.floor((n[0]-e[0])/o)*o;i[0]-=s,i[2]-=s}return i}function z0(i,t){if(t.canWrapX()){const e=t.getExtent();if(!isFinite(i[0])||!isFinite(i[2]))return[[e[0],i[1],e[2],i[3]]];oc(i,t);const n=Nt(e);if(Nt(i)>n)return[[e[0],i[1],e[2],i[3]]];if(i[0]<e[0])return[[i[0]+n,i[1],e[2],i[3]],[e[0],i[1],i[2],i[3]]];if(i[2]>e[2])return[[i[0],i[1],e[2],i[3]],[e[0],i[1],i[2]-n,i[3]]]}return[i]}function R0(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function A0(i,t){const e=t.getRadius(),n=t.getCenter(),o=n[0],r=n[1],s=i[0],a=i[1];let l=s-o;const h=a-r;l===0&&h===0&&(l=1);const u=Math.sqrt(l*l+h*h),d=o+e*l/u,c=r+e*h/u;return[d,c]}function Ol(i,t){const e=i[0],n=i[1],o=t[0],r=t[1],s=o[0],a=o[1],l=r[0],h=r[1],u=l-s,d=h-a,c=u===0&&d===0?0:(u*(e-s)+d*(n-a))/(u*u+d*d||0);let g,f;return c<=0?(g=s,f=a):c>=1?(g=l,f=h):(g=s+c*u,f=a+c*d),[g,f]}function ei(i,t){let e=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=t[n]){e=!1;break}return e}function Fl(i,t){const e=Math.cos(t),n=Math.sin(t),o=i[0]*e-i[1]*n,r=i[1]*e+i[0]*n;return i[0]=o,i[1]=r,i}function P0(i,t){return i[0]*=t,i[1]*=t,i}function wi(i,t){const e=i[0]-t[0],n=i[1]-t[1];return e*e+n*n}function rc(i,t){return Math.sqrt(wi(i,t))}function D0(i,t){return wi(i,Ol(i,t))}function Nl(i,t){if(t.canWrapX()){const e=Nt(t.getExtent()),n=sc(i,t,e);n&&(i[0]-=n*e)}return i}function sc(i,t,e){const n=t.getExtent();let o=0;return t.canWrapX()&&(i[0]<n[0]||i[0]>n[2])&&(e=e||Nt(n),o=Math.floor((i[0]-n[0])/e)),o}const ac=63710088e-1;function lc(i,t,e){e=e||ac;const n=Nn(i[1]),o=Nn(t[1]),r=(o-n)/2,s=Nn(t[0]-i[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(s)*Math.sin(s)*Math.cos(n)*Math.cos(o);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function Zs(i,t){let e=0;const n=i.length;let o=i[n-1][0],r=i[n-1][1];for(let s=0;s<n;s++){const a=i[s][0],l=i[s][1];e+=Nn(a-o)*(2+Math.sin(Nn(r))+Math.sin(Nn(l))),o=a,r=l}return e*t*t/2}function hc(i,t){t=t||{};const e=t.radius||ac,n=t.projection||"EPSG:3857",o=i.getType();o!=="GeometryCollection"&&(i=i.clone().transform(n,"EPSG:4326"));let r=0,s,a,l,h,u,d;switch(o){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(s=i.getCoordinates(),r=Math.abs(Zs(s[0],e)),l=1,h=s.length;l<h;++l)r-=Math.abs(Zs(s[l],e));break}case"MultiPolygon":{for(s=i.getCoordinates(),l=0,h=s.length;l<h;++l)for(a=s[l],r+=Math.abs(Zs(a[0],e)),u=1,d=a.length;u<d;++u)r-=Math.abs(Zs(a[u],e));break}case"GeometryCollection":{const c=i.getGeometries();for(l=0,h=c.length;l<h;++l)r+=hc(c[l],t);break}default:throw new Error("Unsupported geometry type: "+o)}return r}let Gl=!0;function L0(i){Gl=!(i===void 0?!0:i)}function jl(i,t,e){if(t!==void 0){for(let n=0,o=i.length;n<o;++n)t[n]=i[n];t=t}else t=i.slice();return t}function uc(i,t,e){if(t!==void 0&&i!==t){for(let n=0,o=i.length;n<o;++n)t[n]=i[n];i=t}return i}function dc(i){w0(i.getCode(),i),Eo(i,i,jl)}function O0(i){i.forEach(dc)}function Gt(i){return typeof i=="string"?k0(i):i||null}function Ys(i,t,e,n){i=Gt(i);let o;const r=i.getPointResolutionFunc();if(r){if(o=r(t,e),n&&n!==i.getUnits()){const s=i.getMetersPerUnit();s&&(o=o*s/ko[n])}}else{const s=i.getUnits();if(s=="degrees"&&!n||n=="degrees")o=t;else{const a=Zl(i,Gt("EPSG:4326"));if(a===uc&&s!=="degrees")o=t*i.getMetersPerUnit();else{let h=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];h=a(h,h,2);const u=lc(h.slice(0,2),h.slice(2,4)),d=lc(h.slice(4,6),h.slice(6,8));o=(u+d)/2}const l=n?ko[n]:i.getMetersPerUnit();l!==void 0&&(o/=l)}}return o}function Bl(i){O0(i),i.forEach(function(t){i.forEach(function(e){t!==e&&Eo(t,e,jl)})})}function F0(i,t,e,n){i.forEach(function(o){t.forEach(function(r){Eo(o,r,e),Eo(r,o,n)})})}function Wl(i,t){return i?typeof i=="string"?Gt(i):i:Gt(t)}function cc(i){return function(t,e,n){const o=t.length;n=n!==void 0?n:2,e=e!==void 0?e:new Array(o);for(let r=0;r<o;r+=n){const s=i(t.slice(r,r+n)),a=s.length;for(let l=0,h=n;l<h;++l)e[r+l]=l>=a?t[r+l]:s[l]}return e}}function N0(i,t,e,n){const o=Gt(i),r=Gt(t);Eo(o,r,cc(e)),Eo(r,o,cc(n))}function G0(i,t){const e=Xs(i,t!==void 0?t:"EPSG:3857","EPSG:4326"),n=e[0];return(n<-180||n>180)&&(e[0]=Ui(n+180,360)-180),e}function Zn(i,t){if(i===t)return!0;const e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||Zl(i,t)===jl)&&e}function Zl(i,t){const e=i.getCode(),n=t.getCode();let o=tc(e,n);return o||(o=uc),o}function br(i,t){const e=Gt(i),n=Gt(t);return Zl(e,n)}function Xs(i,t,e){return br(t,e)(i,void 0,i.length)}function j0(i,t,e,n){const o=br(t,e);return I0(i,o,void 0,n)}function To(i,t){return i}function Zt(i,t){return Gl&&!ei(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(Gl=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function Yl(i,t){return i}function Hi(i,t){return i}function gc(i,t,e){return function(n){let o,r;if(i.canWrapX()){const s=i.getExtent(),a=Nt(s);n=n.slice(0),r=sc(n,i,a),r&&(n[0]=n[0]-r*a),n[0]=Vt(n[0],s[0],s[2]),n[1]=Vt(n[1],s[1],s[3]),o=e(n)}else o=e(n);return r&&t.canWrapX()&&(o[0]+=r*Nt(t.getExtent())),o}}function B0(){Bl(Kd),Bl(Qd),F0(Qd,Kd,_0,y0)}B0();const oe={ADD:"add",REMOVE:"remove"},fc={LENGTH:"length"};class Us extends Qe{constructor(t,e,n){super(t),this.element=e,this.index=n}}class W0 extends hi{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let n=0,o=this.array_.length;n<o;++n)this.assertUnique_(this.array_[n],n);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,n=t.length;e<n;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let n=0,o=e.length;n<o;++n)t(e[n],n,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(fc.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new Us(oe.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let n=0,o=e.length;n<o;++n)if(e[n]===t)return this.removeAt(n)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Us(oe.REMOVE,e,t)),e}setAt(t,e){const n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const o=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Us(oe.REMOVE,o,t)),this.dispatchEvent(new Us(oe.ADD,e,t))}updateLength_(){this.set(fc.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,o=this.array_.length;n<o;++n)if(this.array_[n]===t&&n!==e)throw new qd(58)}}const Ve=W0,mc=new Array(6);function qe(){return[1,0,0,1,0,0]}function pc(i){return Vs(i,1,0,0,1,0,0)}function Xl(i,t){const e=i[0],n=i[1],o=i[2],r=i[3],s=i[4],a=i[5],l=t[0],h=t[1],u=t[2],d=t[3],c=t[4],g=t[5];return i[0]=e*l+o*h,i[1]=n*l+r*h,i[2]=e*u+o*d,i[3]=n*u+r*d,i[4]=e*c+o*g+s,i[5]=n*c+r*g+a,i}function Vs(i,t,e,n,o,r,s){return i[0]=t,i[1]=e,i[2]=n,i[3]=o,i[4]=r,i[5]=s,i}function Z0(i,t){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i}function Jt(i,t){const e=t[0],n=t[1];return t[0]=i[0]*e+i[2]*n+i[4],t[1]=i[1]*e+i[3]*n+i[5],t}function Ul(i,t,e){return Xl(i,Vs(mc,t,0,0,e,0,0))}function Y0(i,t,e){return Vs(i,t,0,0,e,0,0)}function X0(i,t,e){return Xl(i,Vs(mc,1,0,0,1,t,e))}function Mi(i,t,e,n,o,r,s,a){const l=Math.sin(r),h=Math.cos(r);return i[0]=n*h,i[1]=o*l,i[2]=-n*l,i[3]=o*h,i[4]=s*n*h-a*n*l+t,i[5]=s*o*l+a*o*h+e,i}function Vl(i,t){const e=U0(t);gt(e!==0,32);const n=t[0],o=t[1],r=t[2],s=t[3],a=t[4],l=t[5];return i[0]=s/e,i[1]=-o/e,i[2]=-r/e,i[3]=n/e,i[4]=(r*l-s*a)/e,i[5]=-(n*l-o*a)/e,i}function U0(i){return i[0]*i[3]-i[1]*i[2]}let vc;function _c(i){const t="matrix("+i.join(", ")+")";if(bl)return t;const e=vc||(vc=document.createElement("div"));return e.style.transform=t,e.style.transform}const V0=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,q0=/^([a-z]*)$|^hsla?\(.*\)$/i;function ql(i){return typeof i=="string"?i:xc(i)}function $0(i){const t=document.createElement("div");if(t.style.color=i,t.style.color!==""){document.body.appendChild(t);const e=getComputedStyle(t).color;return document.body.removeChild(t),e}else return""}const H0=function(){const t={};let e=0;return function(n){let o;if(t.hasOwnProperty(n))o=t[n];else{if(e>=1024){let r=0;for(const s in t)(r++&3)===0&&(delete t[s],--e)}o=K0(n),t[n]=o,++e}return o}}();function kr(i){return Array.isArray(i)?i:H0(i)}function K0(i){let t,e,n,o,r;if(q0.exec(i)&&(i=$0(i)),V0.exec(i)){const s=i.length-1;let a;s<=4?a=1:a=2;const l=s===4||s===8;t=parseInt(i.substr(1+0*a,a),16),e=parseInt(i.substr(1+1*a,a),16),n=parseInt(i.substr(1+2*a,a),16),l?o=parseInt(i.substr(1+3*a,a),16):o=255,a==1&&(t=(t<<4)+t,e=(e<<4)+e,n=(n<<4)+n,l&&(o=(o<<4)+o)),r=[t,e,n,o/255]}else i.startsWith("rgba(")?(r=i.slice(5,-1).split(",").map(Number),yc(r)):i.startsWith("rgb(")?(r=i.slice(4,-1).split(",").map(Number),r.push(1),yc(r)):gt(!1,14);return r}function yc(i){return i[0]=Vt(i[0]+.5|0,0,255),i[1]=Vt(i[1]+.5|0,0,255),i[2]=Vt(i[2]+.5|0,0,255),i[3]=Vt(i[3],0,1),i}function xc(i){let t=i[0];t!=(t|0)&&(t=t+.5|0);let e=i[1];e!=(e|0)&&(e=e+.5|0);let n=i[2];n!=(n|0)&&(n=n+.5|0);const o=i[3]===void 0?1:Math.round(i[3]*100)/100;return"rgba("+t+","+e+","+n+","+o+")"}class J0{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const n=this.cache_[e];(t++&3)===0&&!n.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,n){const o=bc(t,e,n);return o in this.cache_?this.cache_[o]:null}set(t,e,n,o){const r=bc(t,e,n);this.cache_[r]=o,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function bc(i,t,e){const n=e?ql(e):"null";return t+":"+i+":"+n}const qs=new J0;class Q0 extends yl{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){et()}calculateMatrices2D(t){const e=t.viewState,n=t.coordinateToPixelTransform,o=t.pixelToCoordinateTransform;Mi(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Vl(o,n)}forEachFeatureAtCoordinate(t,e,n,o,r,s,a,l){let h;const u=e.viewState;function d(x,k,w,E){return r.call(s,k,x?w:null,E)}const c=u.projection,g=Nl(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&o){const x=c.getExtent(),k=Nt(x);f.push([-k,0],[k,0])}const m=e.layerStatesArray,p=m.length,_=[],v=[];for(let x=0;x<f.length;x++)for(let k=p-1;k>=0;--k){const w=m[k],E=w.layer;if(E.hasRenderer()&&Cl(w,u)&&a.call(l,E)){const M=E.getRenderer(),S=E.getSource();if(M&&S){const z=S.getWrapX()?g:t,P=d.bind(null,w.managed);v[0]=z[0]+f[x][0],v[1]=z[1]+f[x][1],h=M.forEachFeatureAtCoordinate(v,e,n,P,_)}if(h)return h}}if(_.length===0)return;const y=1/_.length;return _.forEach((x,k)=>x.distanceSq+=k*y),_.sort((x,k)=>x.distanceSq-k.distanceSq),_.some(x=>h=x.callback(x.feature,x.layer,x.geometry)),h}hasFeatureAtCoordinate(t,e,n,o,r,s){return this.forEachFeatureAtCoordinate(t,e,n,o,Dn,this,r,s)!==void 0}getMap(){return this.map_}renderFrame(t){et()}scheduleExpireIconCache(t){qs.canExpireCache()&&t.postRenderFunctions.push(tv)}}function tv(i,t){qs.expire()}const ev=Q0;class iv extends Qe{constructor(t,e,n,o){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=o}}const kc=iv,wc="10px sans-serif",Ci="#000",$s="round",wr=[],Mr=0,Io="round",Cr=10,Er="#000",Sr="center",Hs="middle",Yn=[0,0,0,0],Tr=1,Ei=new hi;let zo=null,$l;const Hl={},nv=function(){const t="32px ",e=["monospace","serif"],n=e.length,o="wmytzilWMYTZIL@#/&?$%10\uF013";let r,s;function a(h,u,d){let c=!0;for(let g=0;g<n;++g){const f=e[g];if(s=Ks(h+" "+u+" "+t+f,o),d!=f){const m=Ks(h+" "+u+" "+t+d+","+f,o);c=c&&m!=s}}return!!c}function l(){let h=!0;const u=Ei.getKeys();for(let d=0,c=u.length;d<c;++d){const g=u[d];Ei.get(g)<100&&(a.apply(this,g.split(`
|
38
|
+
`))?(mr(Hl),zo=null,$l=void 0,Ei.set(g,100)):(Ei.set(g,Ei.get(g)+1,!0),h=!1))}h&&(clearInterval(r),r=void 0)}return function(h){const u=Vd(h);if(!u)return;const d=u.families;for(let c=0,g=d.length;c<g;++c){const f=d[c],m=u.style+`
|
39
39
|
`+u.weight+`
|
40
|
-
`+
|
41
|
-
`).reduce((r
|
42
|
-
`||h===u){o=Math.max(o,s),r.push(s),s=0,a+=l;continue}const c=t[h+1]||i.font,f=Hs(c,d);e.push(f),s+=f;const g=rv(c);n.push(g),l=Math.max(l,g)}return{width:o,height:a,widths:e,heights:n,lineWidths:r}}function sv(i,t,e,n,r,o,s,a,l,h,u){i.save(),e!==1&&(i.globalAlpha*=e),t&&i.setTransform.apply(i,t),n.contextInstructions?(i.translate(l,h),i.scale(u[0],u[1]),av(n,i)):u[0]<0||u[1]<0?(i.translate(l,h),i.scale(u[0],u[1]),i.drawImage(n,r,o,s,a,0,0,s,a)):i.drawImage(n,r,o,s,a,l,h,s*u[0],a*u[1]),i.restore()}function av(i,t){const e=i.contextInstructions;for(let n=0,r=e.length;n<r;n+=2)Array.isArray(e[n+1])?t[e[n]].apply(t,e[n+1]):t[e[n]]=e[n+1]}class lv extends ev{constructor(t){super(t),this.fontChangeListenerKey_=gt(Ci,_r.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=po+" ol-layers";const n=t.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const n=this.getMap();if(n.hasListener(t)){const r=new kc(t,void 0,e);n.dispatchEvent(r)}}disposeInternal(){Ot(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(Wi.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(s,a){return s.zIndex-a.zIndex}),n=t.viewState;this.children_.length=0;const r=[];let o=null;for(let s=0,a=e.length;s<a;++s){const l=e[s];t.layerIndex=s;const h=l.layer,u=h.getSourceState();if(!Ml(l,n)||u!="ready"&&u!="undefined"){h.unrender();continue}const d=h.render(t,o);!d||(d!==o&&(this.children_.push(d),o=d),"getDeclutter"in h&&r.push(h))}for(let s=r.length-1;s>=0;--s)r[s].renderDeclutter(t);o0(this.element_,this.children_),this.dispatchRenderEvent(Wi.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}}const hv=lv;class Hi extends Qe{constructor(t,e){super(t),this.layer=e}}const Hl={LAYERS:"layers"};class Jl extends Zd{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let n=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Hl.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new We(n.slice(),{unique:!0}):ft(typeof n.getArray=="function",43):n=new We(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Ot),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(gt(t,re.ADD,this.handleLayersAdd_,this),gt(t,re.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(Ot);go(this.listenerKeys_);const e=t.getArray();for(let n=0,r=e.length;n<r;n++){const o=e[n];this.registerLayerListeners_(o),this.dispatchEvent(new Hi("addlayer",o))}this.changed()}registerLayerListeners_(t){const e=[gt(t,_r.PROPERTYCHANGE,this.handleLayerChange_,this),gt(t,tt.CHANGE,this.handleLayerChange_,this)];t instanceof Jl&&e.push(gt(t,"addlayer",this.handleLayerGroupAdd_,this),gt(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[K(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Hi("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Hi("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Hi("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,n=K(e);this.listenerKeys_[n].forEach(Ot),delete this.listenerKeys_[n],this.dispatchEvent(new Hi("removelayer",e)),this.changed()}getLayers(){return this.get(Hl.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const n=e.getArray();for(let r=0,o=n.length;r<o;++r)this.dispatchEvent(new Hi("removelayer",n[r]))}this.set(Hl.LAYERS,t)}getLayersArray(t){return t=t!==void 0?t:[],this.getLayers().forEach(function(e){e.getLayersArray(t)}),t}getLayerStatesArray(t){const e=t!==void 0?t:[],n=e.length;this.getLayers().forEach(function(s){s.getLayerStatesArray(e)});const r=this.getLayerState();let o=r.zIndex;!t&&r.zIndex===void 0&&(o=0);for(let s=n,a=e.length;s<a;s++){const l=e[s];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=Un(l.extent,r.extent):l.extent=r.extent),l.zIndex===void 0&&(l.zIndex=o)}return e}getSourceState(){return"ready"}}const Js=Jl;class uv extends Qe{constructor(t,e,n){super(t),this.map=e,this.frameState=n!==void 0?n:null}}const zr=uv;class dv extends zr{constructor(t,e,n,r,o,s){super(t,e,o),this.originalEvent=n,this.pixel_=null,this.coordinate_=null,this.dragging=r!==void 0?r:!1,this.activePointers=s}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const Si=dv,Et={SINGLECLICK:"singleclick",CLICK:tt.CLICK,DBLCLICK:tt.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class cv extends Is{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=e===void 0?1:e,this.down_=null;const n=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=n,this.pointerdownListenerKey_=gt(n,Cl.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=gt(n,Cl.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_,Vd?{passive:!1}:!1)}emulateClick_(t){let e=new Si(Et.CLICK,this.map_,t);this.dispatchEvent(e),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Si(Et.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;const n=new Si(Et.SINGLECLICK,this.map_,t);this.dispatchEvent(n)}.bind(this),250)}updateActivePointers_(t){const e=t,n=e.pointerId;if(e.type==Et.POINTERUP||e.type==Et.POINTERCANCEL){delete this.trackedTouches_[n];for(const r in this.trackedTouches_)if(this.trackedTouches_[r].target!==e.target){delete this.trackedTouches_[r];break}}else(e.type==Et.POINTERDOWN||e.type==Et.POINTERMOVE)&&(this.trackedTouches_[n]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new Si(Et.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Ot),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new Si(Et.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.down_={};for(const n in t){const r=t[n];this.down_[n]=typeof r=="function"?Ln:r}if(this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(gt(n,Et.POINTERMOVE,this.handlePointerMove_,this),gt(n,Et.POINTERUP,this.handlePointerUp_,this),gt(this.element_,Et.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(gt(this.element_.getRootNode(),Et.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new Si(Et.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new Si(Et.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Ot(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Ot(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Ot),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const fv=cv,Qs=1/0;class gv{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,go(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const r=this.keyFunction_(n);return delete this.queuedElements_[r],n}enqueue(t){ft(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);return e!=Qs?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,n=this.priorities_,r=e.length,o=e[t],s=n[t],a=t;for(;t<r>>1;){const l=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),u=h<r&&n[h]<n[l]?h:l;e[t]=e[u],n[t]=n[u],t=u}e[t]=o,n[t]=s,this.siftDown_(a,t)}siftDown_(t,e){const n=this.elements_,r=this.priorities_,o=n[e],s=r[e];for(;e>t;){const a=this.getParentIndex_(e);if(r[a]>s)n[e]=n[a],r[e]=r[a],e=a;else break}n[e]=o,r[e]=s}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let r=0;const o=e.length;let s,a,l;for(a=0;a<o;++a)s=e[a],l=t(s),l==Qs?delete this.queuedElements_[this.keyFunction_(s)]:(n[r]=l,e[r++]=s);e.length=r,n.length=r,this.heapify_()}}const mv=gv,N={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class pv extends mv{constructor(t,e){super(function(n){return t.apply(null,n)},function(n){return n[0].getKey()}),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(tt.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,n=e.getState();if(n===N.LOADED||n===N.ERROR||n===N.EMPTY){n!==N.ERROR&&e.removeEventListener(tt.CHANGE,this.boundHandleTileChange_);const r=e.getKey();r in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[r],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let n=0,r,o,s;for(;this.tilesLoading_<t&&n<e&&this.getCount()>0;)o=this.dequeue()[0],s=o.getKey(),r=o.getState(),r===N.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++n,o.load())}}const vv=pv;function _v(i,t,e,n,r){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return Qs;const o=i.viewState.center,s=n[0]-o[0],a=n[1]-o[1];return 65536*Math.log(r)+Math.sqrt(s*s+a*a)/r}const Yt={ANIMATING:0,INTERACTING:1},ii={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Cc=42,Ql=256;function Sc(i,t,e){return function(n,r,o,s,a){if(!n)return;if(!r&&!t)return n;const l=t?0:o[0]*r,h=t?0:o[1]*r,u=a?a[0]:0,d=a?a[1]:0;let c=i[0]+l/2+u,f=i[2]-l/2+u,g=i[1]+h/2+d,m=i[3]-h/2+d;c>f&&(c=(f+c)/2,f=c),g>m&&(g=(m+g)/2,m=g);let p=Wt(n[0],c,f),_=Wt(n[1],g,m);if(s&&e&&r){const v=30*r;p+=-v*Math.log(1+Math.max(0,c-n[0])/v)+v*Math.log(1+Math.max(0,n[0]-f)/v),_+=-v*Math.log(1+Math.max(0,g-n[1])/v)+v*Math.log(1+Math.max(0,n[1]-m)/v)}return[p,_]}}function yv(i){return i}function th(i,t,e,n){const r=Nt(t)/e[0],o=$e(t)/e[1];return n?Math.min(i,Math.max(r,o)):Math.min(i,Math.min(r,o))}function eh(i,t,e){let n=Math.min(i,t);const r=50;return n*=Math.log(1+r*Math.max(0,i/t-1))/r+1,e&&(n=Math.max(n,e),n/=Math.log(1+r*Math.max(0,e/i-1))/r+1),Wt(n,e/2,t*2)}function xv(i,t,e,n){return t=t!==void 0?t:!0,function(r,o,s,a){if(r!==void 0){const l=i[0],h=i[i.length-1],u=e?th(l,e,s,n):l;if(a)return t?eh(r,u,h):Wt(r,h,u);const d=Math.min(u,r),c=Math.floor(xl(i,d,o));return i[c]>u&&c<i.length-1?i[c+1]:i[c]}else return}}function bv(i,t,e,n,r,o){return n=n!==void 0?n:!0,e=e!==void 0?e:0,function(s,a,l,h){if(s!==void 0){const u=r?th(t,r,l,o):t;if(h)return n?eh(s,u,e):Wt(s,e,u);const d=1e-9,c=Math.ceil(Math.log(t/u)/Math.log(i)-d),f=-a*(.5-d)+.5,g=Math.min(u,s),m=Math.floor(Math.log(t/g)/Math.log(i)+f),p=Math.max(c,m),_=t/Math.pow(i,p);return Wt(_,e,u)}else return}}function Tc(i,t,e,n,r){return e=e!==void 0?e:!0,function(o,s,a,l){if(o!==void 0){const h=n?th(i,n,a,r):i;return!e||!l?Wt(o,t,h):eh(o,h,t)}else return}}function ih(i){if(i!==void 0)return 0}function zc(i){if(i!==void 0)return i}function kv(i){const t=2*Math.PI/i;return function(e,n){if(n)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function wv(i){return i=i||Nn(5),function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=i?0:t}}function Ic(i){return Math.pow(i,3)}function Ir(i){return 1-Ic(1-i)}function Ev(i){return 3*i*i-2*i*i*i}function Mv(i){return i}function Ji(i,t,e,n,r,o){o=o||[];let s=0;for(let a=t;a<e;a+=n){const l=i[a],h=i[a+1];o[s++]=r[0]*l+r[2]*h+r[4],o[s++]=r[1]*l+r[3]*h+r[5]}return o&&o.length!=s&&(o.length=s),o}function nh(i,t,e,n,r,o,s){s=s||[];const a=Math.cos(r),l=Math.sin(r),h=o[0],u=o[1];let d=0;for(let c=t;c<e;c+=n){const f=i[c]-h,g=i[c+1]-u;s[d++]=h+f*a-g*l,s[d++]=u+f*l+g*a;for(let m=c+2;m<c+n;++m)s[d++]=i[m]}return s&&s.length!=d&&(s.length=d),s}function Cv(i,t,e,n,r,o,s,a){a=a||[];const l=s[0],h=s[1];let u=0;for(let d=t;d<e;d+=n){const c=i[d]-l,f=i[d+1]-h;a[u++]=l+r*c,a[u++]=h+o*f;for(let g=d+2;g<d+n;++g)a[u++]=i[g]}return a&&a.length!=u&&(a.length=u),a}function Rc(i,t,e,n,r,o,s){s=s||[];let a=0;for(let l=t;l<e;l+=n){s[a++]=i[l]+r,s[a++]=i[l+1]+o;for(let h=l+2;h<l+n;++h)s[a++]=i[h]}return s&&s.length!=a&&(s.length=a),s}const Pc=Ye();class Sv extends hi{constructor(){super(),this.extent_=Ge(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Yp(function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);const r=this.clone();return r.applyTransform(n),r.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return et()}closestPointXY(t,e,n,r){return et()}containsXY(t,e){const n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return et()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&_o(e),this.extentRevision_=this.getRevision()}return S0(this.extent_,t)}rotate(t,e){et()}scale(t,e,n){et()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return et()}getType(){return et()}applyTransform(t){et()}intersectsExtent(t){return et()}translate(t,e){et()}transform(t,e){const n=Gt(t),r=n.getUnits()=="tile-pixels"?function(o,s,a){const l=n.getExtent(),h=n.getWorldExtent(),u=$e(h)/$e(l);return Ei(Pc,h[0],h[3],u,-u,0,0,0),Ji(o,0,o.length,a,Pc,s),bo(n,e)(o,s,a)}:bo(n,e);return this.applyTransform(r),this}}const Ac=Sv;class Tv extends Ac{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return Il(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return et()}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(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=ta(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){et()}setLayout(t,e,n){let r;if(t)r=ta(t);else{for(let o=0;o<n;++o)if(e.length===0){this.layout="XY",this.stride=2;return}else e=e[0];r=e.length,t=zv(r)}this.layout=t,this.stride=r}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const n=this.getFlatCoordinates();if(n){const r=this.getStride();nh(n,0,n.length,r,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=Yi(this.getExtent()));const r=this.getFlatCoordinates();if(r){const o=this.getStride();Cv(r,0,r.length,o,t,e,n,r),this.changed()}}translate(t,e){const n=this.getFlatCoordinates();if(n){const r=this.getStride();Rc(n,0,n.length,r,t,e,n),this.changed()}}}function zv(i){let t;return i==2?t="XY":i==3?t="XYZ":i==4&&(t="XYZM"),t}function ta(i){let t;return i=="XY"?t=2:i=="XYZ"||i=="XYM"?t=3:i=="XYZM"&&(t=4),t}function Iv(i,t,e){const n=i.getFlatCoordinates();if(n){const r=i.getStride();return Ji(n,0,n.length,r,t,e)}else return null}const Qi=Tv;function Dc(i,t,e,n,r,o,s){const a=i[t],l=i[t+1],h=i[e]-a,u=i[e+1]-l;let d;if(h===0&&u===0)d=t;else{const c=((r-a)*h+(o-l)*u)/(h*h+u*u);if(c>1)d=e;else if(c>0){for(let f=0;f<n;++f)s[f]=ki(i[t+f],i[e+f],c);s.length=n;return}else d=t}for(let c=0;c<n;++c)s[c]=i[d+c];s.length=n}function rh(i,t,e,n,r){let o=i[t],s=i[t+1];for(t+=n;t<e;t+=n){const a=i[t],l=i[t+1],h=On(o,s,a,l);h>r&&(r=h),o=a,s=l}return r}function oh(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];r=rh(i,t,a,n,r),t=a}return r}function Rv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];r=oh(i,t,a,n,r),t=a[a.length-1]}return r}function sh(i,t,e,n,r,o,s,a,l,h,u){if(t==e)return h;let d,c;if(r===0)if(c=On(s,a,i[t],i[t+1]),c<h){for(d=0;d<n;++d)l[d]=i[t+d];return l.length=n,c}else return h;u=u||[NaN,NaN];let f=t+n;for(;f<e;)if(Dc(i,f-n,f,n,s,a,u),c=On(s,a,u[0],u[1]),c<h){for(h=c,d=0;d<n;++d)l[d]=u[d];l.length=n,f+=n}else f+=n*Math.max((Math.sqrt(c)-Math.sqrt(h))/r|0,1);if(o&&(Dc(i,e-n,t,n,s,a,u),c=On(s,a,u[0],u[1]),c<h)){for(h=c,d=0;d<n;++d)l[d]=u[d];l.length=n}return h}function ah(i,t,e,n,r,o,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const f=e[d];h=sh(i,t,f,n,r,o,s,a,l,h,u),t=f}return h}function Pv(i,t,e,n,r,o,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const f=e[d];h=ah(i,t,f,n,r,o,s,a,l,h,u),t=f[f.length-1]}return h}function Lc(i,t,e,n){for(let r=0,o=e.length;r<o;++r)i[t++]=e[r];return t}function ea(i,t,e,n){for(let r=0,o=e.length;r<o;++r){const s=e[r];for(let a=0;a<n;++a)i[t++]=s[a]}return t}function lh(i,t,e,n,r){r=r||[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=ea(i,t,e[s],n);r[o++]=l,t=l}return r.length=o,r}function Av(i,t,e,n,r){r=r||[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=lh(i,t,e[s],n,r[o]);l.length===0&&(l[0]=t),r[o++]=l,t=l[l.length-1]}return r.length=o,r}function hh(i,t,e,n,r,o,s){const a=(e-t)/n;if(a<3){for(;t<e;t+=n)o[s++]=i[t],o[s++]=i[t+1];return s}const l=new Array(a);l[0]=1,l[a-1]=1;const h=[t,e-n];let u=0;for(;h.length>0;){const d=h.pop(),c=h.pop();let f=0;const g=i[c],m=i[c+1],p=i[d],_=i[d+1];for(let v=c+n;v<d;v+=n){const y=i[v],x=i[v+1],k=h0(y,x,g,m,p,_);k>f&&(u=v,f=k)}f>r&&(l[(u-t)/n]=1,c+n<u&&h.push(c,u),u+n<d&&h.push(u,d))}for(let d=0;d<a;++d)l[d]&&(o[s++]=i[t+d*n],o[s++]=i[t+d*n+1]);return s}function Dv(i,t,e,n,r,o,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=hh(i,t,u,n,r,o,s),a.push(s),t=u}return s}function Xn(i,t){return t*Math.round(i/t)}function Lv(i,t,e,n,r,o,s){if(t==e)return s;let a=Xn(i[t],r),l=Xn(i[t+1],r);t+=n,o[s++]=a,o[s++]=l;let h,u;do if(h=Xn(i[t],r),u=Xn(i[t+1],r),t+=n,t==e)return o[s++]=h,o[s++]=u,s;while(h==a&&u==l);for(;t<e;){const d=Xn(i[t],r),c=Xn(i[t+1],r);if(t+=n,d==h&&c==u)continue;const f=h-a,g=u-l,m=d-a,p=c-l;if(f*p==g*m&&(f<0&&m<f||f==m||f>0&&m>f)&&(g<0&&p<g||g==p||g>0&&p>g)){h=d,u=c;continue}o[s++]=h,o[s++]=u,a=h,l=u,h=d,u=c}return o[s++]=h,o[s++]=u,s}function Fc(i,t,e,n,r,o,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=Lv(i,t,u,n,r,o,s),a.push(s),t=u}return s}function Fv(i,t,e,n,r,o,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l],d=[];s=Fc(i,t,u,n,r,o,s,d),a.push(d),t=u[u.length-1]}return s}function tn(i,t,e,n,r){r=r!==void 0?r:[];let o=0;for(let s=t;s<e;s+=n)r[o++]=i.slice(s,s+n);return r.length=o,r}function zo(i,t,e,n,r){r=r!==void 0?r:[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];r[o++]=tn(i,t,l,n,r[o]),t=l}return r.length=o,r}function uh(i,t,e,n,r){r=r!==void 0?r:[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];r[o++]=l.length===1&&l[0]===t?[]:zo(i,t,l,n,r[o]),t=l[l.length-1]}return r.length=o,r}function Oc(i,t,e,n){let r=0,o=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];r+=s*a-o*l,o=a,s=l}return r/2}function Nc(i,t,e,n){let r=0;for(let o=0,s=e.length;o<s;++o){const a=e[o];r+=Oc(i,t,a,n),t=a}return r}function Ov(i,t,e,n){let r=0;for(let o=0,s=e.length;o<s;++o){const a=e[o];r+=Nc(i,t,a,n),t=a[a.length-1]}return r}class ia extends Qi{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new ia(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,r))}getArea(){return Oc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=hh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ia(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ea(this.flatCoordinates,0,t,this.stride),this.changed()}}const Gc=ia;class dh extends Qi{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new dh(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){const o=this.flatCoordinates,s=On(t,e,o[0],o[1]);if(s<r){const a=this.stride;for(let l=0;l<a;++l)n[l]=o[l];return n.length=a,s}else return r}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return yo(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Tl(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Lc(this.flatCoordinates,0,t,this.stride),this.changed()}}const ni=dh;function Nv(i,t,e,n,r){return!Rl(r,function(s){return!$n(i,t,e,n,s[0],s[1])})}function $n(i,t,e,n,r,o){let s=0,a=i[e-n],l=i[e-n+1];for(;t<e;t+=n){const h=i[t],u=i[t+1];l<=o?u>o&&(h-a)*(o-l)-(r-a)*(u-l)>0&&s++:u<=o&&(h-a)*(o-l)-(r-a)*(u-l)<0&&s--,a=h,l=u}return s!==0}function ch(i,t,e,n,r,o){if(e.length===0||!$n(i,t,e[0],n,r,o))return!1;for(let s=1,a=e.length;s<a;++s)if($n(i,e[s-1],e[s],n,r,o))return!1;return!0}function Gv(i,t,e,n,r,o){if(e.length===0)return!1;for(let s=0,a=e.length;s<a;++s){const l=e[s];if(ch(i,t,l,n,r,o))return!0;t=l[l.length-1]}return!1}function fh(i,t,e,n,r,o,s){let a,l,h,u,d,c,f;const g=r[o+1],m=[];for(let v=0,y=e.length;v<y;++v){const x=e[v];for(u=i[x-n],c=i[x-n+1],a=t;a<x;a+=n)d=i[a],f=i[a+1],(g<=c&&f<=g||c<=g&&g<=f)&&(h=(g-c)/(f-c)*(d-u)+u,m.push(h)),u=d,c=f}let p=NaN,_=-1/0;for(m.sort(An),u=m[0],a=1,l=m.length;a<l;++a){d=m[a];const v=Math.abs(d-u);v>_&&(h=(u+d)/2,ch(i,t,e,n,h,g)&&(p=h,_=v)),u=d}return isNaN(p)&&(p=r[o]),s?(s.push(p,g,_),s):[p,g,_]}function jc(i,t,e,n,r){let o=[];for(let s=0,a=e.length;s<a;++s){const l=e[s];o=fh(i,t,l,n,r,2*s,o),t=l[l.length-1]}return o}function Bc(i,t,e,n,r){let o;for(t+=n;t<e;t+=n)if(o=r(i.slice(t-n,t),i.slice(t,t+n)),o)return o;return!1}function na(i,t,e,n,r){const o=nc(Ge(),i,t,e,n);return Kt(r,o)?Bn(r,o)||o[0]>=r[0]&&o[2]<=r[2]||o[1]>=r[1]&&o[3]<=r[3]?!0:Bc(i,t,e,n,function(s,a){return T0(r,s,a)}):!1}function jv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){if(na(i,t,e[o],n,r))return!0;t=e[o]}return!1}function Uc(i,t,e,n,r){return!!(na(i,t,e,n,r)||$n(i,t,e,n,r[0],r[1])||$n(i,t,e,n,r[0],r[3])||$n(i,t,e,n,r[2],r[1])||$n(i,t,e,n,r[2],r[3]))}function Vc(i,t,e,n,r){if(!Uc(i,t,e[0],n,r))return!1;if(e.length===1)return!0;for(let o=1,s=e.length;o<s;++o)if(Nv(i,e[o-1],e[o],n,r)&&!na(i,e[o-1],e[o],n,r))return!1;return!0}function Bv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];if(Vc(i,t,a,n,r))return!0;t=a[a.length-1]}return!1}function Uv(i,t,e,n){for(;t<e-n;){for(let r=0;r<n;++r){const o=i[t+r];i[t+r]=i[e-n+r],i[e-n+r]=o}t+=n,e-=n}}function gh(i,t,e,n){let r=0,o=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];r+=(a-o)*(l+s),o=a,s=l}return r===0?void 0:r>0}function qc(i,t,e,n,r){r=r!==void 0?r:!1;for(let o=0,s=e.length;o<s;++o){const a=e[o],l=gh(i,t,a,n);if(o===0){if(r&&l||!r&&!l)return!1}else if(r&&!l||!r&&l)return!1;t=a}return!0}function Vv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];if(!qc(i,t,a,n,r))return!1;a.length&&(t=a[a.length-1])}return!0}function mh(i,t,e,n,r){r=r!==void 0?r:!1;for(let o=0,s=e.length;o<s;++o){const a=e[o],l=gh(i,t,a,n);(o===0?r&&l||!r&&!l:r&&!l||!r&&l)&&Uv(i,t,a,n),t=a}return t}function Xc(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o)t=mh(i,t,e[o],n,r);return t}function qv(i,t){const e=[];let n=0,r=0;for(let o=0,s=t.length;o<s;++o){const a=t[o];if(!gh(i,n,a,2))e.push(t.slice(r,o+1));else{if(e.length===0)continue;e[e.length-1].push(t[r])}r=o+1,n=a}return e}class Rr extends Qi{constructor(t,e,n){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,e!==void 0&&n?(this.setFlatCoordinates(e,t),this.ends_=n):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Rr(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,r))}containsXY(t,e){return ch(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Nc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),mh(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,zo(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Yi(this.getExtent());this.flatInteriorPoint_=fh(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new ni(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Gc(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,n=this.ends_,r=[];let o=0;for(let s=0,a=n.length;s<a;++s){const l=n[s],h=new Gc(e.slice(o,l),t);r.push(h),o=l}return r}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;qc(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=mh(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Fc(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,n),new Rr(e,"XY",n)}getType(){return"Polygon"}intersectsExtent(t){return Vc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=lh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Wn=Rr;function $c(i){const t=i[0],e=i[1],n=i[2],r=i[3],o=[t,e,t,r,n,r,n,e,t,e];return new Rr(o,"XY",[o.length])}function Xv(i,t,e){t=t||32;const n=i.getStride(),r=i.getLayout(),o=i.getCenter(),s=n*(t+1),a=new Array(s);for(let u=0;u<s;u+=n){a[u]=0,a[u+1]=0;for(let d=2;d<n;d++)a[u+d]=o[d]}const l=[a.length],h=new Rr(a,r,l);return $v(h,o,i.getRadius(),e),h}function $v(i,t,e,n){const r=i.getFlatCoordinates(),o=i.getStride(),s=r.length/o-1,a=n||0;for(let l=0;l<=s;++l){const h=l*o,u=a+$i(l,s)*2*Math.PI/s;r[h]=t[0]+e*Math.cos(u),r[h+1]=t[1]+e*Math.sin(u)}i.changed()}const ph=0;class Wv extends hi{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Ul(t.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,t.projection&&L0(),t.center&&(t.center=Vt(t.center,this.projection_)),t.extent&&(t.extent=Zi(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const a in ii)delete e[a];this.setProperties(e,!0);const n=Kv(t);this.maxResolution_=n.maxResolution,this.minResolution_=n.minResolution,this.zoomFactor_=n.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=n.minZoom;const r=Yv(t),o=n.constraint,s=Zv(t);this.constraints_={center:r,resolution:o,rotation:s},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const n=this.getCenter();if(n){const r=t||[0,0,0,0];e=e||[0,0,0,0];const o=this.getResolution(),s=o/2*(r[3]-e[3]+e[1]-r[1]),a=o/2*(r[0]-e[0]+e[2]-r[2]);this.setCenterInternal([n[0]+s,n[1]-a])}}getUpdatedOptions_(t){const e=this.getProperties();return e.resolution!==void 0?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let n=0;n<e.length;++n){let r=arguments[n];r.center&&(r=Object.assign({},r),r.center=Vt(r.center,this.getProjection())),r.anchor&&(r=Object.assign({},r),r.anchor=Vt(r.anchor,this.getProjection())),e[n]=r}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,n;e>1&&typeof arguments[e-1]=="function"&&(n=arguments[e-1],--e);let r=0;for(;r<e&&!this.isDef();++r){const u=arguments[r];u.center&&this.setCenterInternal(u.center),u.zoom!==void 0?this.setZoom(u.zoom):u.resolution&&this.setResolution(u.resolution),u.rotation!==void 0&&this.setRotation(u.rotation)}if(r===e){n&&ra(n,!0);return}let o=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const h=[];for(;r<e;++r){const u=arguments[r],d={start:o,complete:!1,anchor:u.anchor,duration:u.duration!==void 0?u.duration:1e3,easing:u.easing||Ev,callback:n};if(u.center&&(d.sourceCenter=s,d.targetCenter=u.center.slice(),s=d.targetCenter),u.zoom!==void 0?(d.sourceResolution=a,d.targetResolution=this.getResolutionForZoom(u.zoom),a=d.targetResolution):u.resolution&&(d.sourceResolution=a,d.targetResolution=u.resolution,a=d.targetResolution),u.rotation!==void 0){d.sourceRotation=l;const c=$i(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;d.targetRotation=l+c,l=d.targetRotation}Hv(d)?d.complete=!0:o+=d.duration,h.push(d)}this.animations_.push(h),this.setHint(Yt.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[Yt.ANIMATING]>0}getInteracting(){return this.hints_[Yt.INTERACTING]>0}cancelAnimations(){this.setHint(Yt.ANIMATING,-this.hints_[Yt.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e<n;++e){const r=this.animations_[e];if(r[0].callback&&ra(r[0].callback,!1),!t)for(let o=0,s=r.length;o<s;++o){const a=r[o];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,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 t=Date.now();let e=!1;for(let n=this.animations_.length-1;n>=0;--n){const r=this.animations_[n];let o=!0;for(let s=0,a=r.length;s<a;++s){const l=r[s];if(l.complete)continue;const h=t-l.start;let u=l.duration>0?h/l.duration:1;u>=1?(l.complete=!0,u=1):o=!1;const d=l.easing(u);if(l.sourceCenter){const c=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const p=c+d*(g-c),_=f+d*(m-f);this.targetCenter_=[p,_]}if(l.sourceResolution&&l.targetResolution){const c=d===1?l.targetResolution:l.sourceResolution+d*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(c,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=c,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const c=d===1?$i(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(c,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=c}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(o){this.animations_[n]=null,this.setHint(Yt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const s=r[0].callback;s&&ra(s,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let n;const r=this.getCenterInternal();return r!==void 0&&(n=[r[0]-e[0],r[1]-e[1]],Ol(n,t-this.getRotation()),R0(n,e)),n}calculateCenterZoom(t,e){let n;const r=this.getCenterInternal(),o=this.getResolution();if(r!==void 0&&o!==void 0){const s=e[0]-t*(e[0]-r[0])/o,a=e[1]-t*(e[1]-r[1])/o;n=[s,a]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],r=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(r*Math.cos(t))]}else return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&Cr(t,this.getProjection())}getCenterInternal(){return this.get(ii.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return ql(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();ft(e,1);const n=this.getResolution();ft(n!==void 0,2);const r=this.getRotation();return ft(r!==void 0,3),Al(e,n,r,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(ii.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Zi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=Nt(t)/e[0],r=$e(t)/e[1];return Math.max(n,r)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(e/n)/Math.log(t);return function(o){return e/Math.pow(t,o*r)}}getRotation(){return this.get(ii.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,o=Math.log(n/r)/e;return function(s){return Math.log(n/s)/e/o}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),n=this.getRotation();let r=this.getCenterInternal();const o=this.padding_;if(o){const s=this.getViewportSizeMinusPadding_();r=vh(r,this.getViewportSize_(),[s[0]/2+o[3],s[1]/2+o[0]],e,n)}return{center:r.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,n,r;if(this.resolutions_){const o=xl(this.resolutions_,t,1);e=o,n=this.resolutions_[o],o==this.resolutions_.length-1?r=2:r=n/this.resolutions_[o+1]}else n=this.maxResolution_,r=this.zoomFactor_;return e+Math.log(n/t)/Math.log(r)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=Wt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Wt(t-e,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(ft(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){ft(!Ll(t),25);const r=Zi(t,this.getProjection());n=$c(r)}else if(t.getType()==="Circle"){const r=Zi(t.getExtent(),this.getProjection());n=$c(r),n.rotate(this.getRotation(),Yi(r))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),r=Math.sin(-e),o=t.getFlatCoordinates(),s=t.getStride();let a=1/0,l=1/0,h=-1/0,u=-1/0;for(let d=0,c=o.length;d<c;d+=s){const f=o[d]*n-o[d+1]*r,g=o[d]*r+o[d+1]*n;a=Math.min(a,f),l=Math.min(l,g),h=Math.max(h,f),u=Math.max(u,g)}return[a,l,h,u]}fitInternal(t,e){e=e||{};let n=e.size;n||(n=this.getViewportSizeMinusPadding_());const r=e.padding!==void 0?e.padding:[0,0,0,0],o=e.nearest!==void 0?e.nearest:!1;let s;e.minResolution!==void 0?s=e.minResolution:e.maxZoom!==void 0?s=this.getResolutionForZoom(e.maxZoom):s=0;const a=this.rotatedExtentForGeometry(t);let l=this.getResolutionForExtentInternal(a,[n[0]-r[1]-r[3],n[1]-r[0]-r[2]]);l=isNaN(l)?s:Math.max(l,s),l=this.getConstrainedResolution(l,o?0:1);const h=this.getRotation(),u=Math.sin(h),d=Math.cos(h),c=Yi(a);c[0]+=(r[1]-r[3])/2*l,c[1]+=(r[0]-r[2])/2*l;const f=c[0]*d-c[1]*u,g=c[1]*d+c[0]*u,m=this.getConstrainedCenter([f,g],l),p=e.callback?e.callback:Ln;e.duration!==void 0?this.animateInternal({resolution:l,center:m,duration:e.duration,easing:e.easing},p):(this.targetResolution_=l,this.targetCenter_=m,this.applyTargetState_(!1,!0),ra(p,!0))}centerOn(t,e,n){this.centerOnInternal(Vt(t,this.getProjection()),e,n)}centerOnInternal(t,e,n){this.setCenterInternal(vh(t,e,n,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,n,r){let o;const s=this.padding_;if(s&&t){const a=this.getViewportSizeMinusPadding_(-n),l=vh(t,r,[a[0]/2+s[3],a[1]/2+s[0]],e,n);o=[t[0]-l[0],t[1]-l[1]]}return o}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=Cr(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&Vt(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const n=this.getAnimating()||this.getInteracting(),r=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*t,0,r,n);e&&(this.targetCenter_=this.calculateCenterZoom(o,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=Vt(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const n=this.getAnimating()||this.getInteracting(),r=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(r,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&Vt(t,this.getProjection()))}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const n=this.getAnimating()||this.getInteracting()||e,r=this.constraints_.rotation(this.targetRotation_,n),o=this.getViewportSize_(r),s=this.constraints_.resolution(this.targetResolution_,0,o,n),a=this.constraints_.center(this.targetCenter_,s,o,n,this.calculateCenterShift(this.targetCenter_,s,r,o));this.get(ii.ROTATION)!==r&&this.set(ii.ROTATION,r),this.get(ii.RESOLUTION)!==s&&(this.set(ii.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(ii.CENTER)||!ei(this.get(ii.CENTER),a))&&this.set(ii.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,n){t=t!==void 0?t:200;const r=e||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,r,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(t===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,this.applyTargetState_();return}n=n||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==o||!this.getCenterInternal()||!ei(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:t,easing:Ir,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint(Yt.INTERACTING,1)}endInteraction(t,e,n){n=n&&Vt(n,this.getProjection()),this.endInteractionInternal(t,e,n)}endInteractionInternal(t,e,n){this.setHint(Yt.INTERACTING,-1),this.resolveConstraints(t,e,n)}getConstrainedCenter(t,e){const n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)}getConstrainedZoom(t,e){const n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))}getConstrainedResolution(t,e){e=e||0;const n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,n)}}function ra(i,t){setTimeout(function(){i(t)},0)}function Yv(i){if(i.extent!==void 0){const e=i.smoothExtentConstraint!==void 0?i.smoothExtentConstraint:!0;return Sc(i.extent,i.constrainOnlyCenter,e)}const t=Ul(i.projection,"EPSG:3857");if(i.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,Sc(e,!1,!1)}return yv}function Kv(i){let t,e,n,s=i.minZoom!==void 0?i.minZoom:ph,a=i.maxZoom!==void 0?i.maxZoom:28;const l=i.zoomFactor!==void 0?i.zoomFactor:2,h=i.multiWorld!==void 0?i.multiWorld:!1,u=i.smoothResolutionConstraint!==void 0?i.smoothResolutionConstraint:!0,d=i.showFullExtent!==void 0?i.showFullExtent:!1,c=Ul(i.projection,"EPSG:3857"),f=c.getExtent();let g=i.constrainOnlyCenter,m=i.extent;if(!h&&!m&&c.isGlobal()&&(g=!1,m=f),i.resolutions!==void 0){const p=i.resolutions;e=p[s],n=p[a]!==void 0?p[a]:p[p.length-1],i.constrainResolution?t=xv(p,u,!g&&m,d):t=Tc(e,n,u,!g&&m,d)}else{const _=(f?Math.max(Nt(f),$e(f)):360*xr.degrees/c.getMetersPerUnit())/Ql/Math.pow(2,ph),v=_/Math.pow(2,28-ph);e=i.maxResolution,e!==void 0?s=0:e=_/Math.pow(l,s),n=i.minResolution,n===void 0&&(i.maxZoom!==void 0?i.maxResolution!==void 0?n=e/Math.pow(l,a):n=_/Math.pow(l,a):n=v),a=s+Math.floor(Math.log(e/n)/Math.log(l)),n=e/Math.pow(l,a-s),i.constrainResolution?t=bv(l,e,n,u,!g&&m,d):t=Tc(e,n,u,!g&&m,d)}return{constraint:t,maxResolution:e,minResolution:n,minZoom:s,zoomFactor:l}}function Zv(i){if(i.enableRotation!==void 0?i.enableRotation:!0){const e=i.constrainRotation;return e===void 0||e===!0?wv():e===!1?zc:typeof e=="number"?kv(e):zc}else return ih}function Hv(i){return!(i.sourceCenter&&i.targetCenter&&!ei(i.sourceCenter,i.targetCenter)||i.sourceResolution!==i.targetResolution||i.sourceRotation!==i.targetRotation)}function vh(i,t,e,n,r){const o=Math.cos(-r);let s=Math.sin(-r),a=i[0]*o-i[1]*s,l=i[1]*o+i[0]*s;a+=(t[0]/2-e[0])*n,l+=(e[1]-t[1]/2)*n,s=-s;const h=a*o-l*s,u=l*o+a*s;return[h,u]}const en=Wv;class Jv extends mo{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=t.className!==void 0?t.className:"ol-rotate",n=t.label!==void 0?t.label:"\u21E7",r=t.compassClassName!==void 0?t.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 o=t.tipLabel?t.tipLabel:"Reset rotation",s=document.createElement("button");s.className=e+"-reset",s.setAttribute("type","button"),s.title=o,s.appendChild(this.label_),s.addEventListener(tt.CLICK,this.handleClick_.bind(this),!1);const a=e+" "+po+" "+El,l=this.element;l.className=a,l.appendChild(s),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=t.duration!==void 0?t.duration:250,this.autoHide_=t.autoHide!==void 0?t.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(As)}handleClick_(t){t.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const e=this.getMap().getView();if(!e)return;const n=e.getRotation();n!==void 0&&(this.duration_>0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Ir}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const r="rotate("+n+"rad)";if(this.autoHide_){const o=this.element.classList.contains(As);!o&&n===0?this.element.classList.add(As):o&&n!==0&&this.element.classList.remove(As)}this.label_.style.transform=r}this.rotation_=n}}const Qv=Jv;class t_ extends mo{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",n=t.delta!==void 0?t.delta:1,r=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",o=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",s=t.zoomInLabel!==void 0?t.zoomInLabel:"+",a=t.zoomOutLabel!==void 0?t.zoomOutLabel:"\u2013",l=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",h=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=l,u.appendChild(typeof s=="string"?document.createTextNode(s):s),u.addEventListener(tt.CLICK,this.handleClick_.bind(this,n),!1);const d=document.createElement("button");d.className=o,d.setAttribute("type","button"),d.title=h,d.appendChild(typeof a=="string"?document.createTextNode(a):a),d.addEventListener(tt.CLICK,this.handleClick_.bind(this,-n),!1);const c=e+" "+po+" "+El,f=this.element;f.className=c,f.appendChild(u),f.appendChild(d),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const n=this.getMap().getView();if(!n)return;const r=n.getZoom();if(r!==void 0){const o=n.getConstrainedZoom(r+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:o,duration:this.duration_,easing:Ir})):n.setZoom(o)}}}const e_=t_;function Wc(i){i=i||{};const t=new We;return(i.zoom!==void 0?i.zoom:!0)&&t.push(new e_(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&t.push(new Qv(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&t.push(new g0(i.attributionOptions)),t}const _h={ACTIVE:"active"};class i_ extends hi{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(_h.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(_h.ACTIVE,t)}setMap(t){this.map_=t}}function n_(i,t,e){const n=i.getCenterInternal();if(n){const r=[n[0]+t[0],n[1]+t[1]];i.animateInternal({duration:e!==void 0?e:250,easing:Mv,center:i.getConstrainedCenter(r)})}}function yh(i,t,e,n){const r=i.getZoom();if(r===void 0)return;const o=i.getConstrainedZoom(r+t),s=i.getResolutionForZoom(o);i.getAnimating()&&i.cancelAnimations(),i.animate({resolution:s,anchor:e,duration:n!==void 0?n:250,easing:Ir})}const Io=i_;class r_ extends Io{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==Et.DBLCLICK){const n=t.originalEvent,r=t.map,o=t.coordinate,s=n.shiftKey?-this.delta_:this.delta_,a=r.getView();yh(a,s,o,this.duration_),n.preventDefault(),e=!0}return!e}}const o_=r_;class s_ extends Io{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Et.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==Et.POINTERUP){const n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==Et.POINTERDOWN){const n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==Et.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function xh(i){const t=i.length;let e=0,n=0;for(let r=0;r<t;r++)e+=i[r].clientX,n+=i[r].clientY;return[e/t,n/t]}const nn=s_;function bh(i){const t=arguments;return function(e){let n=!0;for(let r=0,o=t.length;r<o&&(n=n&&t[r](e),!!n);++r);return n}}const a_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},l_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},h_=function(i){const t=i.map.getTargetElement(),e=i.map.getOwnerDocument().activeElement;return t.contains(e)},Yc=function(i){return i.map.getTargetElement().hasAttribute("tabindex")?h_(i):!0},kh=Dn,Kc=function(i){const t=i.originalEvent;return t.button==0&&!(e0&&i0&&t.ctrlKey)},u_=function(i){return i.type==Et.SINGLECLICK},wh=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},Zc=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},Hc=function(i){const t=i.originalEvent,e=t.target.tagName;return e!=="INPUT"&&e!=="SELECT"&&e!=="TEXTAREA"&&!t.target.isContentEditable},Eh=function(i){const t=i.originalEvent;return ft(t!==void 0,56),t.pointerType=="mouse"},Jc=function(i){const t=i.originalEvent;return ft(t!==void 0,56),t.isPrimary&&t.button===0};class d_ extends nn{constructor(t){super({stopDown:yr}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:bh(wh,Jc);this.condition_=t.onFocusOnly?bh(Yc,e):e,this.noKinetic_=!1}handleDragEvent(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());const e=this.targetPointers,n=xh(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const r=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],s=t.map.getView();A0(r,s.getResolution()),Ol(r,s.getRotation()),s.adjustCenterInternal(r)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,n=e.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const r=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),s=n.getCenterInternal(),a=e.getPixelFromCoordinateInternal(s),l=e.getCoordinateFromPixelInternal([a[0]-r*Math.cos(o),a[1]-r*Math.sin(o)]);n.animateInternal({center:n.getConstrainedCenter(l),duration:500,easing:Ir})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}else return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}else return!1}}const c_=d_;class f_ extends nn{constructor(t){t=t||{},super({stopDown:yr}),this.condition_=t.condition?t.condition:l_,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!Eh(t))return;const e=t.map,n=e.getView();if(n.getConstraints().rotation===ih)return;const r=e.getSize(),o=t.pixel,s=Math.atan2(r[1]/2-o[1],o[0]-r[0]/2);if(this.lastAngle_!==void 0){const a=s-this.lastAngle_;n.adjustRotationInternal(-a)}this.lastAngle_=s}handleUpEvent(t){return Eh(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return Eh(t)&&Kc(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const g_=f_;class m_ extends yl{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,n="px",r=this.element_.style;r.left=Math.min(t[0],e[0])+n,r.top=Math.min(t[1],e[1])+n,r.width=Math.abs(e[0]-t[0])+n,r.height=Math.abs(e[1]-t[1])+n}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,r=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new Wn([r])}getGeometry(){return this.geometry_}}const p_=m_,oa={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Mh extends Qe{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class v_ extends nn{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new p_(t.className||"ol-dragbox"),this.minArea_=t.minArea!==void 0?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:Kc,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const r=n[0]-e[0],o=n[1]-e[1];return r*r+o*o>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Mh(oa.BOXDRAG,t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Mh(e?oa.BOXEND:oa.BOXCANCEL,t.coordinate,t)),!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Mh(oa.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}}const __=v_;class y_ extends __{constructor(t){t=t||{};const e=t.condition?t.condition:Zc;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const n=this.getMap().getView();let r=this.getGeometry();if(this.out_){const o=n.rotatedExtentForGeometry(r),s=n.getResolutionForExtentInternal(o),a=n.getResolution()/s;r=r.clone(),r.scale(a*a)}n.fitInternal(r,{duration:this.duration_,easing:Ir})}}const x_=y_,Yn={LEFT:37,UP:38,RIGHT:39,DOWN:40};class b_ extends Io{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return wh(e)&&Hc(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==tt.KEYDOWN){const n=t.originalEvent,r=n.keyCode;if(this.condition_(t)&&(r==Yn.DOWN||r==Yn.LEFT||r==Yn.RIGHT||r==Yn.UP)){const s=t.map.getView(),a=s.getResolution()*this.pixelDelta_;let l=0,h=0;r==Yn.DOWN?h=-a:r==Yn.LEFT?l=-a:r==Yn.RIGHT?l=a:h=a;const u=[l,h];Ol(u,s.getRotation()),n_(s,u,this.duration_),n.preventDefault(),e=!0}}return!e}}const k_=b_;class w_ extends Io{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:Hc,this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==tt.KEYDOWN||t.type==tt.KEYPRESS){const n=t.originalEvent,r=n.charCode;if(this.condition_(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){const o=t.map,s=r=="+".charCodeAt(0)?this.delta_:-this.delta_,a=o.getView();yh(a,s,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}const E_=w_;class M_{constructor(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let n=e-3;for(;n>0&&this.points_[n+2]>t;)n-=3;const r=this.points_[e+2]-this.points_[n+2];if(r<1e3/60)return!1;const o=this.points_[e]-this.points_[n],s=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(s,o),this.initialVelocity_=Math.sqrt(o*o+s*s)/r,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const C_=M_;class S_ extends Io{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:kh;this.condition_=t.onFocusOnly?bh(Yc,e):e,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 t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t)||t.type!==tt.WHEEL)return!0;const n=t.map,r=t.originalEvent;r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let o;if(t.type==tt.WHEEL&&(o=r.deltaY,t0&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(o/=Ud),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(o*=40)),o===0)return!1;this.lastDelta_=o;const s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(o)<4?"trackpad":"wheel");const a=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(-o/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=o;const l=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let n=-Wt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),yh(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}const T_=S_;class z_ extends nn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=yr),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const n=this.targetPointers[0],r=this.targetPointers[1],o=Math.atan2(r.clientY-n.clientY,r.clientX-n.clientX);if(this.lastAngle_!==void 0){const u=o-this.lastAngle_;this.rotationDelta_+=u,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=u}this.lastAngle_=o;const s=t.map,a=s.getView();if(a.getConstraints().rotation===ih)return;const l=s.getViewport().getBoundingClientRect(),h=xh(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(h),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}else return!1}}const I_=z_;class R_ extends nn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=yr),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const n=this.targetPointers[0],r=this.targetPointers[1],o=n.clientX-r.clientX,s=n.clientY-r.clientY,a=Math.sqrt(o*o+s*s);this.lastDistance_!==void 0&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,h=l.getView();e!=1&&(this.lastScaleDelta_=e);const u=l.getViewport().getBoundingClientRect(),d=xh(this.targetPointers);d[0]-=u.left,d[1]-=u.top,this.anchor_=l.getCoordinateFromPixelInternal(d),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const n=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,r),!1}else return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}else return!1}}const P_=R_;function Qc(i){i=i||{};const t=new We,e=new C_(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new g_),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new o_({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&t.push(new c_({onFocusOnly:i.onFocusOnly,kinetic:e})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&t.push(new I_),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new P_({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new k_),t.push(new E_({delta:i.zoomDelta,duration:i.zoomDuration}))),(i.mouseWheelZoom!==void 0?i.mouseWheelZoom:!0)&&t.push(new T_({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(i.shiftDragZoom!==void 0?i.shiftDragZoom:!0)&&t.push(new x_({duration:i.zoomDuration})),t}function tf(i){return i[0]>0&&i[1]>0}function A_(i,t,e){return e===void 0&&(e=[0,0]),e[0]=i[0]*t+.5|0,e[1]=i[1]*t+.5|0,e}function be(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}function ef(i){if(i instanceof Fs){i.setMapInternal(null);return}i instanceof Js&&i.getLayers().forEach(ef)}function nf(i,t){if(i instanceof Fs){i.setMapInternal(t);return}if(i instanceof Js){const e=i.getLayers().getArray();for(let n=0,r=e.length;n<r;++n)nf(e[n],t)}}class D_ extends hi{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=L_(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=t.maxTilesLoading!==void 0?t.maxTilesLoading:16,this.pixelRatio_=t.pixelRatio!==void 0?t.pixelRatio:Ud,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=Ye(),this.pixelToCoordinateTransform_=Ye(),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_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.controls=e.controls||Wc(),this.interactions=e.interactions||Qc({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new vv(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(fe.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(fe.VIEW,this.handleViewChanged_),this.addChangeListener(fe.SIZE,this.handleSizeChanged_),this.addChangeListener(fe.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof en)&&t.view.then(function(r){n.setView(new en(r))}),this.controls.addEventListener(re.ADD,function(r){r.element.setMap(this)}.bind(this)),this.controls.addEventListener(re.REMOVE,function(r){r.element.setMap(null)}.bind(this)),this.interactions.addEventListener(re.ADD,function(r){r.element.setMap(this)}.bind(this)),this.interactions.addEventListener(re.REMOVE,function(r){r.element.setMap(null)}.bind(this)),this.overlays_.addEventListener(re.ADD,function(r){this.addOverlayInternal_(r.element)}.bind(this)),this.overlays_.addEventListener(re.REMOVE,function(r){const o=r.element.getId();o!==void 0&&delete this.overlayIdIndex_[o.toString()],r.element.setMap(null)}.bind(this)),this.controls.forEach(function(r){r.setMap(this)}.bind(this)),this.interactions.forEach(function(r){r.setMap(this)}.bind(this)),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){nf(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,n){if(!this.frameState_||!this.renderer_)return;const r=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const o=n.hitTolerance!==void 0?n.hitTolerance:0,s=n.layerFilter!==void 0?n.layerFilter:Dn,a=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,o,a,e,null,s,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(r){n.push(r)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(r){r instanceof Js?e(r.getLayers()):t.push(r)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const r=e.layerFilter!==void 0?e.layerFilter:Dn,o=e.hitTolerance!==void 0?e.hitTolerance:0,s=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,o,s,r,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-e.left,n.clientY-e.top]}getTarget(){return this.get(fe.TARGET)}getTargetElement(){const t=this.getTarget();return t!==void 0?typeof t=="string"?document.getElementById(t):t:null}getCoordinateFromPixel(t){return Cr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Jt(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(fe.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof We){e.setLayers(t);return}const n=e.getLayers();n.clear(),n.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const r=t[e];if(!r.visible)continue;const o=r.layer.getRenderer();if(o&&!o.ready)return!0;const s=r.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(t){const e=Vt(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?Jt(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(fe.SIZE)}getView(){return this.get(fe.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,n,r){return _v(this.frameState_,t,e,n,r)}handleBrowserEvent(t,e){e=e||t.type;const n=new Si(e,this,t);this.handleMapBrowserEvent(n)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,n=e.type;if(n===Cl.POINTERDOWN||n===tt.WHEEL||n===tt.KEYDOWN){const r=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():r,s=e.target;if(this.overlayContainerStopEvent_.contains(s)||!(o===r?r.documentElement:o).contains(s))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1){const r=this.getInteractions().getArray().slice();for(let o=r.length-1;o>=0;o--){const s=r[o];if(s.getMap()!==this||!s.getActive()||!this.getTargetElement())continue;if(!s.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let r=this.maxTilesLoading_,o=r;if(t){const s=t.viewHints;if(s[Yt.ANIMATING]||s[Yt.INTERACTING]){const a=Date.now()-t.time>8;r=a?0:8,o=a?0:2}}e.getTilesLoading()<r&&(e.reprioritize(),e.loadMoreTiles(r,o))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(Wi.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(Wi.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new zr(qi.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new zr(qi.LOADSTART,this,t))));const n=this.postRenderFunctions_;for(let r=0,o=n.length;r<o;++r)n[r](this,t);n.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let e=0,n=this.targetChangeHandlerKeys_.length;e<n;++e)Ot(this.targetChangeHandlerKeys_[e]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(tt.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(tt.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,wl(this.viewport_)}const t=this.getTargetElement();if(!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 hv(this)),this.mapBrowserEventHandler_=new fv(this,this.moveTolerance_);for(const r in Et)this.mapBrowserEventHandler_.addEventListener(Et[r],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(tt.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(tt.WHEEL,this.boundHandleBrowserEvent_,Vd?{passive:!1}:!1);const e=this.getOwnerDocument().defaultView,n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.targetChangeHandlerKeys_=[gt(n,tt.KEYDOWN,this.handleBrowserEvent,this),gt(n,tt.KEYPRESS,this.handleBrowserEvent,this),gt(e,tt.RESIZE,this.updateSize,this)]}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(Ot(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Ot(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=gt(t,_r.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=gt(t,tt.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Ot),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Hi("addlayer",t)),this.layerGroupPropertyListenerKeys_=[gt(t,_r.PROPERTYCHANGE,this.render,this),gt(t,tt.CHANGE,this.render,this),gt(t,"addlayer",this.handleLayerAdd_,this),gt(t,"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 t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const r=t[e].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){ef(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),n=this.getView(),r=this.frameState_;let o=null;if(e!==void 0&&tf(e)&&n&&n.isDef()){const s=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Al(a.center,a.resolution,a.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{},mapId:K(this),renderTargets:{}},a.nextCenter&&a.nextResolution){const l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;o.nextExtent=Al(a.nextCenter,a.nextResolution,l,e)}}this.frameState_=o,this.renderer_.renderFrame(o),o&&(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),r&&(!this.previousExtent_||!Ll(this.previousExtent_)&&!Mr(o.extent,this.previousExtent_))&&(this.dispatchEvent(new zr(qi.MOVESTART,this,r)),this.previousExtent_=_o(this.previousExtent_)),this.previousExtent_&&!o.viewHints[Yt.ANIMATING]&&!o.viewHints[Yt.INTERACTING]&&!Mr(o.extent,this.previousExtent_)&&(this.dispatchEvent(new zr(qi.MOVEEND,this,o)),ec(o.extent,this.previousExtent_))),this.dispatchEvent(new zr(qi.POSTRENDER,this,o)),this.renderComplete_=this.hasListener(qi.LOADSTART)||this.hasListener(qi.LOADEND)||this.hasListener(Wi.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Hi("removelayer",e)),this.set(fe.LAYERGROUP,t)}setSize(t){this.set(fe.SIZE,t)}setTarget(t){this.set(fe.TARGET,t)}setView(t){if(!t||t instanceof en){this.set(fe.VIEW,t);return}this.set(fe.VIEW,new en);const e=this;t.then(function(n){e.setView(new en(n))})}updateSize(){const t=this.getTargetElement();let e;if(t){const n=getComputedStyle(t),r=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),o=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);!isNaN(r)&&!isNaN(o)&&(e=[r,o],!tf(e)&&!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(e),this.updateViewportSize_()}updateViewportSize_(){const t=this.getView();if(t){let e;const n=getComputedStyle(this.viewport_);n.width&&n.height&&(e=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(e)}}}function L_(i){let t=null;i.keyboardEventTarget!==void 0&&(t=typeof i.keyboardEventTarget=="string"?document.getElementById(i.keyboardEventTarget):i.keyboardEventTarget);const e={},n=i.layers&&typeof i.layers.getLayers=="function"?i.layers:new Js({layers:i.layers});e[fe.LAYERGROUP]=n,e[fe.TARGET]=i.target,e[fe.VIEW]=i.view instanceof en?i.view:new en;let r;i.controls!==void 0&&(Array.isArray(i.controls)?r=new We(i.controls.slice()):(ft(typeof i.controls.getArray=="function",47),r=i.controls));let o;i.interactions!==void 0&&(Array.isArray(i.interactions)?o=new We(i.interactions.slice()):(ft(typeof i.interactions.getArray=="function",48),o=i.interactions));let s;return i.overlays!==void 0?Array.isArray(i.overlays)?s=new We(i.overlays.slice()):(ft(typeof i.overlays.getArray=="function",49),s=i.overlays):s=new We,{controls:r,interactions:o,keyboardEventTarget:t,overlays:s,values:e}}const F_=D_,Ch="units",O_=[1,2,5],Ro=25.4/.28;class N_ extends mo{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const n=t.className!==void 0?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=n+"-inner",this.element.className=n+" "+po,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=t.minWidth!==void 0?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(Ch,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(Ch)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(Ch,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=t.center,n=t.projection,r=this.getUnits(),o=r=="degrees"?"degrees":"m";let s=qs(n,t.resolution,e,o);const a=this.minWidth_*(this.dpi_||Ro)/Ro,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||Ro)/Ro:void 0;let h=a*s,u="";if(r=="degrees"){const y=xr.degrees;h*=y,h<y/60?(u="\u2033",s*=3600):h<y?(u="\u2032",s*=60):u="\xB0"}else r=="imperial"?h<.9144?(u="in",s/=.0254):h<1609.344?(u="ft",s/=.3048):(u="mi",s/=1609.344):r=="nautical"?(s/=1852,u="NM"):r=="metric"?h<.001?(u="\u03BCm",s*=1e6):h<1?(u="mm",s*=1e3):h<1e3?u="m":(u="km",s/=1e3):r=="us"?h<.9144?(u="in",s*=39.37):h<1609.344?(u="ft",s/=.30480061):(u="mi",s/=1609.3472):ft(!1,33);let d=3*Math.floor(Math.log(a*s)/Math.log(10)),c,f,g,m,p,_;for(;;){g=Math.floor(d/3);const y=Math.pow(10,g);if(c=O_[(d%3+3)%3]*y,f=Math.round(c/s),isNaN(f)){this.element.style.display="none",this.renderedVisible_=!1;return}if(l!==void 0&&f>=l){c=m,f=p,g=_;break}else if(f>=a)break;m=c,p=f,_=g,++d}const v=this.scaleBar_?this.createScaleBar(f,c,u):c.toFixed(g<0?-g:0)+" "+u;this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,n){const r=this.getScaleForResolution(),o=r<1?Math.round(1/r).toLocaleString()+" : 1":"1 : "+Math.round(r).toLocaleString(),s=this.scaleBarSteps_,a=t/s,l=[this.createMarker("absolute")];for(let u=0;u<s;++u){const d=u%2===0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";l.push(`<div><div class="ol-scale-singlebar ${d}" style="width: ${a}px;"></div>`+this.createMarker("relative")+(u%2===0||s===2?this.createStepText(u,t,!1,e,n):"")+"</div>")}return l.push(this.createStepText(s,t,!0,e,n)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${t}px;">`+o+"</div>":"")+l.join("")}createMarker(t){return`<div class="ol-scale-step-marker" style="position: ${t}; top: ${t==="absolute"?3:-10}px;"></div>`}createStepText(t,e,n,r,o){const a=(t===0?0:Math.round(r/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+o),l=t===0?-3:e/this.scaleBarSteps_*-1,h=t===0?0:e/this.scaleBarSteps_*2;return`<div class="ol-scale-step-text" style="margin-left: ${l}px;text-align: ${t===0?"left":"center"};min-width: ${h}px;left: ${n?e+"px":"unset"};">`+a+"</div>"}getScaleForResolution(){const t=qs(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||Ro,n=1e3/25.4;return t*n*e}render(t){const e=t.frameState;e?this.viewState_=e.viewState:this.viewState_=null,this.updateElement_()}}const G_=N_;class sa extends Qi{constructor(t,e,n){super(),n!==void 0&&e===void 0?this.setFlatCoordinates(n,t):(e=e||0,this.setCenterAndRadius(t,e,n))}clone(){const t=new sa(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){const o=this.flatCoordinates,s=t-o[0],a=e-o[1],l=s*s+a*a;if(l<r){if(l===0)for(let h=0;h<this.stride;++h)n[h]=o[h];else{const h=this.getRadius()/Math.sqrt(l);n[0]=o[0]+h*s,n[1]=o[1]+h*a;for(let u=2;u<this.stride;++u)n[u]=o[u]}return n.length=this.stride,l}else return r}containsXY(t,e){const n=this.flatCoordinates,r=t-n[0],o=e-n[1];return r*r+o*o<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(t){const e=this.flatCoordinates,n=e[this.stride]-e[0];return ti(e[0]-n,e[1]-n,e[0]+n,e[1]+n,t)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e}getType(){return"Circle"}intersectsExtent(t){const e=this.getExtent();if(Kt(t,e)){const n=this.getCenter();return t[0]<=n[0]&&t[2]>=n[0]||t[1]<=n[1]&&t[3]>=n[1]?!0:Rl(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],r=t.slice();r[e]=r[0]+n;for(let o=1;o<e;++o)r[e+o]=t[o];this.setFlatCoordinates(this.layout,r),this.changed()}setCenterAndRadius(t,e,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]);const r=this.flatCoordinates;let o=Lc(r,0,t,this.stride);r[o++]=r[0]+e;for(let s=1,a=this.stride;s<a;++s)r[o++]=r[s];r.length=o,this.changed()}getCoordinates(){return null}setCoordinates(t,e){}setRadius(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()}rotate(t,e){const n=this.getCenter(),r=this.getStride();this.setCenter(nh(n,0,n.length,r,t,e,n)),this.changed()}translate(t,e){const n=this.getCenter(),r=this.getStride();this.setCenter(Rc(n,0,n.length,r,t,e,n)),this.changed()}}sa.prototype.transform;const j_=sa;class aa extends Ac{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Ot),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(!!this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(gt(this.geometries_[t],tt.CHANGE,this.changed,this))}clone(){const t=new aa(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,n,r){if(r<jn(this.getExtent(),t,e))return r;const o=this.geometries_;for(let s=0,a=o.length;s<a;++s)r=o[s].closestPointXY(t,e,n,r);return r}containsXY(t,e){const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)if(n[r].containsXY(t,e))return!0;return!1}computeExtent(t){_o(t);const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)ic(t,e[n].getExtent());return t}getGeometries(){return rf(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)e[n].getType()===this.getType()?t=t.concat(e[n].getGeometriesArrayRecursive()):t.push(e[n]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],n=this.geometries_;let r=!1;for(let o=0,s=n.length;o<s;++o){const a=n[o],l=a.getSimplifiedGeometry(t);e.push(l),l!==a&&(r=!0)}if(r){const o=new aa(null);return o.setGeometriesArray(e),o}else return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)if(e[n].intersectsExtent(t))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(t,e){const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)n[r].rotate(t,e);this.changed()}scale(t,e,n){n||(n=Yi(this.getExtent()));const r=this.geometries_;for(let o=0,s=r.length;o<s;++o)r[o].scale(t,e,n);this.changed()}setGeometries(t){this.setGeometriesArray(rf(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)e[n].applyTransform(t);this.changed()}translate(t,e){const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)n[r].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function rf(i){const t=[];for(let e=0,n=i.length;e<n;++e)t.push(i[e].clone());return t}const B_=aa;function la(i,t,e,n,r,o,s){let a,l;const h=(e-t)/n;if(h===1)a=t;else if(h===2)a=t,l=r;else if(h!==0){let u=i[t],d=i[t+1],c=0;const f=[0];for(let p=t+n;p<e;p+=n){const _=i[p],v=i[p+1];c+=Math.sqrt((_-u)*(_-u)+(v-d)*(v-d)),f.push(c),u=_,d=v}const g=r*c,m=Xp(f,g);m<0?(l=(g-f[-m-2])/(f[-m-1]-f[-m-2]),a=t+(-m-2)*n):a=t+m*n}s=s>1?s:2,o=o||new Array(s);for(let u=0;u<s;++u)o[u]=a===void 0?NaN:l===void 0?i[a+u]:ki(i[a+u],i[a+n+u],l);return o}function Sh(i,t,e,n,r,o){if(e==t)return null;let s;if(r<i[t+n-1])return o?(s=i.slice(t,t+n),s[n-1]=r,s):null;if(i[e-1]<r)return o?(s=i.slice(e-n,e),s[n-1]=r,s):null;if(r==i[t+n-1])return i.slice(t,t+n);let a=t/n,l=e/n;for(;a<l;){const c=a+l>>1;r<i[(c+1)*n-1]?l=c:a=c+1}const h=i[a*n-1];if(r==h)return i.slice((a-1)*n,(a-1)*n+n);const u=i[(a+1)*n-1],d=(r-h)/(u-h);s=[];for(let c=0;c<n-1;++c)s.push(ki(i[(a-1)*n+c],i[a*n+c],d));return s.push(r),s}function U_(i,t,e,n,r,o,s){if(s)return Sh(i,t,e[e.length-1],n,r,o);let a;if(r<i[n-1])return o?(a=i.slice(0,n),a[n-1]=r,a):null;if(i[i.length-1]<r)return o?(a=i.slice(i.length-n),a[n-1]=r,a):null;for(let l=0,h=e.length;l<h;++l){const u=e[l];if(t!=u){if(r<i[t+n-1])return null;if(r<=i[u-1])return Sh(i,t,u,n,r,!1);t=u}}return null}function of(i,t,e,n){let r=i[t],o=i[t+1],s=0;for(let a=t+n;a<e;a+=n){const l=i[a],h=i[a+1];s+=Math.sqrt((l-r)*(l-r)+(h-o)*(h-o)),r=l,o=h}return s}class ha extends Qi{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){this.flatCoordinates?li(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()}clone(){const t=new ha(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,r))}forEachSegment(t){return Bc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,Sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return la(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return of(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(t){const e=[];return e.length=hh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ha(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return na(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ea(this.flatCoordinates,0,t,this.stride),this.changed()}}const Kn=ha;class ua extends Qi{constructor(t,e,n){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&n)this.setFlatCoordinates(e,t),this.ends_=n;else{let r=this.getLayout();const o=t,s=[],a=[];for(let l=0,h=o.length;l<h;++l){const u=o[l];l===0&&(r=u.getLayout()),li(s,u.getFlatCoordinates()),a.push(s.length)}this.setFlatCoordinates(r,s),this.ends_=a}}appendLineString(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new ua(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,n,r))}getCoordinateAtM(t,e,n){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(e=e!==void 0?e:!1,n=n!==void 0?n:!1,U_(this.flatCoordinates,0,this.ends_,this.stride,t,e,n))}getCoordinates(){return zo(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new Kn(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,n=this.layout,r=[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=e[s],h=new Kn(t.slice(o,l),n);r.push(h),o=l}return r}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let n=0;const r=this.ends_,o=this.stride;for(let s=0,a=r.length;s<a;++s){const l=r[s],h=la(e,n,l,o,.5);li(t,h),n=l}return t}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Dv(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,n),new ua(e,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(t){return jv(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=lh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Th=ua;class zh extends Qi{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()}clone(){const t=new zh(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){if(r<jn(this.getExtent(),t,e))return r;const o=this.flatCoordinates,s=this.stride;for(let a=0,l=o.length;a<l;a+=s){const h=On(t,e,o[a],o[a+1]);if(h<r){r=h;for(let u=0;u<s;++u)n[u]=o[a+u];n.length=s}}return r}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new ni(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,n=this.stride,r=[];for(let o=0,s=t.length;o<s;o+=n){const a=new ni(t.slice(o,o+n),e);r.push(a)}return r}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,n=this.stride;for(let r=0,o=e.length;r<o;r+=n){const s=e[r],a=e[r+1];if(Tl(t,s,a))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ea(this.flatCoordinates,0,t,this.stride),this.changed()}}const Po=zh;function sf(i,t,e,n){const r=[];let o=Ge();for(let s=0,a=e.length;s<a;++s){const l=e[s];o=Il(i,t,l[0],n),r.push((o[0]+o[2])/2,(o[1]+o[3])/2),t=l[l.length-1]}return r}class da extends Qi{constructor(t,e,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(t[0])){let r=this.getLayout();const o=t,s=[],a=[];for(let l=0,h=o.length;l<h;++l){const u=o[l];l===0&&(r=u.getLayout());const d=s.length,c=u.getEnds();for(let f=0,g=c.length;f<g;++f)c[f]+=d;li(s,u.getFlatCoordinates()),a.push(c)}e=r,t=s,n=a}e!==void 0&&n?(this.setFlatCoordinates(e,t),this.endss_=n):this.setCoordinates(t,e)}appendPolygon(t){let e;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();else{const n=this.flatCoordinates.length;li(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let r=0,o=e.length;r<o;++r)e[r]+=n}this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let r=0;r<t;++r)e[r]=this.endss_[r].slice();const n=new da(this.flatCoordinates.slice(),this.layout,e);return n.applyProperties(this),n}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Rv(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Pv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,n,r))}containsXY(t,e){return Gv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return Ov(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Xc(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,uh(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=sf(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=jc(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Po(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Vv(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Xc(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Fv(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,n),new da(e,"XY",n)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(t===0)e=0;else{const o=this.endss_[t-1];e=o[o.length-1]}const n=this.endss_[t].slice(),r=n[n.length-1];if(e!==0)for(let o=0,s=n.length;o<s;++o)n[o]-=e;return new Wn(this.flatCoordinates.slice(e,r),this.layout,n)}getPolygons(){const t=this.layout,e=this.flatCoordinates,n=this.endss_,r=[];let o=0;for(let s=0,a=n.length;s<a;++s){const l=n[s].slice(),h=l[l.length-1];if(o!==0)for(let d=0,c=l.length;d<c;++d)l[d]-=o;const u=new Wn(e.slice(o,h),t,l);r.push(u),o=h}return r}getType(){return"MultiPolygon"}intersectsExtent(t){return Bv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=Av(this.flatCoordinates,0,t,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 Ih=da;class Rh extends hi{constructor(t){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_),t)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Rh(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const n=this.getStyle();return n&&t.setStyle(n),t}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_&&(Ot(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=gt(t,tt.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?V_(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function V_(i){if(typeof i=="function")return i;{let t;return Array.isArray(i)?t=i:(ft(typeof i.getZIndex=="function",41),t=[i]),function(){return t}}}const Ti=Rh;class af{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let n=e.dataProjection?Gt(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()==="tile-pixels"&&(n=Gt(n),n.setWorldExtent(e.extent)),e={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)}getType(){return et()}readFeature(t,e){return et()}readFeatures(t,e){return et()}readGeometry(t,e){return et()}readProjection(t){return et()}writeFeature(t,e){return et()}writeFeatures(t,e){return et()}writeGeometry(t,e){return et()}}function Ph(i,t,e){const n=e?Gt(e.featureProjection):null,r=e?Gt(e.dataProjection):null;let o;if(n&&r&&!Vn(n,r)?o=(t?i.clone():i).transform(t?n:r,t?r:n):o=i,t&&e&&e.decimals!==void 0){const s=Math.pow(10,e.decimals),a=function(l){for(let h=0,u=l.length;h<u;++h)l[h]=Math.round(l[h]*s)/s;return l};o===i&&(o=i.clone()),o.applyTransform(a)}return o}class q_ extends af{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(ca(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(ca(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return et()}readFeaturesFromObject(t,e){return et()}readGeometry(t,e){return this.readGeometryFromObject(ca(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return et()}readProjection(t){return this.readProjectionFromObject(ca(t))}readProjectionFromObject(t){return et()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return et()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return et()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return et()}}function ca(i){if(typeof i=="string"){const t=JSON.parse(i);return t||null}else return i!==null?i:null}const X_=q_;class $_ extends X_{constructor(t){t=t||{},super(),this.dataProjection=Gt(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=Gt(t.featureProjection)),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let n=null;t.type==="Feature"?n=t:n={type:"Feature",geometry:t,properties:null};const r=Ah(n.geometry,e),o=new Ti;return this.geometryName_?o.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&o.setGeometryName(n.geometry_name),o.setGeometry(r),"id"in n&&o.setId(n.id),n.properties&&o.setProperties(n.properties,!0),o}readFeaturesFromObject(t,e){const n=t;let r=null;if(n.type==="FeatureCollection"){const o=t;r=[];const s=o.features;for(let a=0,l=s.length;a<l;++a)r.push(this.readFeatureFromObject(s[a],e))}else r=[this.readFeatureFromObject(t,e)];return r}readGeometryFromObject(t,e){return Ah(t,e)}readProjectionFromObject(t){const e=t.crs;let n;return e?e.type=="name"?n=Gt(e.properties.name):e.type==="EPSG"?n=Gt("EPSG:"+e.properties.code):ft(!1,36):n=this.dataProjection,n}writeFeatureObject(t,e){e=this.adaptOptions(e);const n={type:"Feature",geometry:null,properties:null},r=t.getId();if(r!==void 0&&(n.id=r),!t.hasProperties())return n;const o=t.getProperties(),s=t.getGeometry();return s&&(n.geometry=Dh(s,e),delete o[t.getGeometryName()]),Fn(o)||(n.properties=o),n}writeFeaturesObject(t,e){e=this.adaptOptions(e);const n=[];for(let r=0,o=t.length;r<o;++r)n.push(this.writeFeatureObject(t[r],e));return{type:"FeatureCollection",features:n}}writeGeometryObject(t,e){return Dh(t,this.adaptOptions(e))}}function Ah(i,t){if(!i)return null;let e;switch(i.type){case"Point":{e=Y_(i);break}case"LineString":{e=K_(i);break}case"Polygon":{e=Q_(i);break}case"MultiPoint":{e=H_(i);break}case"MultiLineString":{e=Z_(i);break}case"MultiPolygon":{e=J_(i);break}case"GeometryCollection":{e=W_(i);break}default:throw new Error("Unsupported GeoJSON type: "+i.type)}return Ph(e,!1,t)}function W_(i,t){const e=i.geometries.map(function(n){return Ah(n,t)});return new B_(e)}function Y_(i){return new ni(i.coordinates)}function K_(i){return new Kn(i.coordinates)}function Z_(i){return new Th(i.coordinates)}function H_(i){return new Po(i.coordinates)}function J_(i){return new Ih(i.coordinates)}function Q_(i){return new Wn(i.coordinates)}function Dh(i,t){i=Ph(i,!0,t);const e=i.getType();let n;switch(e){case"Point":{n=o1(i);break}case"LineString":{n=e1(i);break}case"Polygon":{n=s1(i,t);break}case"MultiPoint":{n=n1(i);break}case"MultiLineString":{n=i1(i);break}case"MultiPolygon":{n=r1(i,t);break}case"GeometryCollection":{n=t1(i,t);break}case"Circle":{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return n}function t1(i,t){t=Object.assign({},t),delete t.featureProjection;const e=i.getGeometriesArray().map(function(n){return Dh(n,t)});return{type:"GeometryCollection",geometries:e}}function e1(i,t){return{type:"LineString",coordinates:i.getCoordinates()}}function i1(i,t){return{type:"MultiLineString",coordinates:i.getCoordinates()}}function n1(i,t){return{type:"MultiPoint",coordinates:i.getCoordinates()}}function r1(i,t){let e;return t&&(e=t.rightHanded),{type:"MultiPolygon",coordinates:i.getCoordinates(e)}}function o1(i,t){return{type:"Point",coordinates:i.getCoordinates()}}function s1(i,t){let e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:i.getCoordinates(e)}}const Zn=$_;class Lh{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new Lh({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const ge=Lh,Qt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Fh{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=be(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Fh({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,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 et()}getImage(t){return et()}getHitDetectionImage(){return et()}getPixelRatio(t){return 1}getImageState(){return et()}getImageSize(){return et()}getOrigin(){return et()}getSize(){return et()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=be(t)}listenImageChange(t){et()}load(){et()}unlistenImageChange(t){et()}}const lf=Fh;function hf(i,t,e){const n=i;let r=!0,o=!1,s=!1;const a=[Rs(n,tt.LOAD,function(){s=!0,o||t()})];return n.src&&n0?(o=!0,n.decode().then(function(){r&&t()}).catch(function(l){r&&(s?t():e())})):a.push(Rs(n,tt.ERROR,e)),function(){r=!1,a.forEach(Ot)}}let Ao=null;class a1 extends Is{constructor(t,e,n,r,o,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=r,this.canvas_={},this.color_=s,this.unlisten_=null,this.imageState_=o,this.size_=n,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===Qt.LOADED){Ao||(Ao=Pe(1,1)),Ao.drawImage(this.image_,0,0);try{Ao.getImageData(0,0,1,1),this.tainted_=!1}catch{Ao=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(tt.CHANGE)}handleImageError_(){this.imageState_=Qt.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Qt.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(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],n=Pe(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Qt.IDLE){this.image_||this.initializeImage_(),this.imageState_=Qt.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=hf(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Qt.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const r=n.getContext("2d");r.scale(t,t),r.drawImage(e,0,0),r.globalCompositeOperation="multiply",r.fillStyle=Yl(this.color_),r.fillRect(0,0,n.width/t,n.height/t),r.globalCompositeOperation="destination-in",r.drawImage(e,0,0),this.canvas_[t]=n}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function l1(i,t,e,n,r,o){let s=Ys.get(t,n,o);return s||(s=new a1(i,t,e,n,r,o),Ys.set(t,n,o,s)),s}class Oh extends lf{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,r=t.scale!==void 0?t.scale:1,o=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:r,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:o,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const s=t.img!==void 0?t.img:null;this.imgSize_=t.imgSize;let a=t.src;ft(!(a!==void 0&&s),4),ft(!s||s&&this.imgSize_,5),(a===void 0||a.length===0)&&s&&(a=s.src||K(s)),ft(a!==void 0&&a.length>0,6);const l=t.src!==void 0?Qt.IDLE:Qt.LOADED;this.color_=t.color!==void 0?ko(t.color):null,this.iconImage_=l1(s,a,this.imgSize_!==void 0?this.imgSize_:null,this.crossOrigin_,l,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null}clone(){const t=this.getScale();return new Oh({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:Array.isArray(t)?t.slice():t,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const r=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!r)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=r[0]),this.anchorYUnits_=="fraction"&&(t[1]*=r[1])}if(this.anchorOrigin_!="top-left"){if(!r)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+r[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+r[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}listenImageChange(t){this.iconImage_.addEventListener(tt.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(tt.CHANGE,t)}}const fa=Oh;class Nh{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Nh({color:Array.isArray(t)?t.slice():t||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(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const ke=Nh;function di(i){return Array.isArray(i)?xc(i):i}class Gh extends lf{constructor(t){const e=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:1,rotateWithView:e,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius!==void 0?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new Gh({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(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const n=this.renderOptions_,r=Pe(n.size*t,n.size*t);this.draw_(n,r,t),e=r.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return Qt.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(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let r=this.radius_,o=this.radius2_===void 0?r:this.radius2_;if(r<o){const w=r;r=o,o=w}const s=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/s,l=o*Math.sin(a),h=Math.sqrt(o*o-l*l),u=r-h,d=Math.sqrt(l*l+u*u),c=d/l;if(t==="miter"&&c<=n)return c*e;const f=e/2/c,g=e/2*(u/d),p=Math.sqrt((r+f)*(r+f)+g*g)-r;if(this.radius2_===void 0||t==="bevel")return p*2;const _=r*Math.sin(a),v=Math.sqrt(r*r-_*_),y=o-v,k=Math.sqrt(_*_+y*y)/_;if(k<=n){const w=k*e/2-o-r;return 2*Math.max(p,w)}return p*2}createRenderOptions(){let t=Sr,e=0,n=null,r=0,o,s=0;this.stroke_&&(o=this.stroke_.getColor(),o===null&&(o=Co),o=di(o),s=this.stroke_.getWidth(),s===void 0&&(s=To),n=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Sr),e=this.stroke_.getMiterLimit(),e===void 0&&(e=Mo));const a=this.calculateLineJoinSize_(t,s,e),l=Math.max(this.radius_,this.radius2_||0),h=Math.ceil(2*l+a);return{strokeStyle:o,strokeWidth:s,size:h,lineDash:n,lineDashOffset:r,lineJoin:t,miterLimit:e}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]}draw_(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let r=this.fill_.getColor();r===null&&(r=Mi),e.fillStyle=di(r),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){if(this.fill_){let e=this.fill_.getColor(),n=0;if(typeof e=="string"&&(e=ko(e)),e===null?n=1:Array.isArray(e)&&(n=e.length===4?e[3]:1),n===0){const r=Pe(t.size,t.size);this.hitDetectionCanvas_=r.canvas,this.drawHitDetectionCanvas_(t,r)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(t){let e=this.points_;const n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{const r=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(e*=2);const o=this.angle_-Math.PI/2,s=2*Math.PI/e;for(let a=0;a<e;a++){const l=o+a*s,h=a%2===0?n:r;t.lineTo(h*Math.cos(l),h*Math.sin(l))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=Mi,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}}const ga=Gh;class jh extends ga{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new jh({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const Hn=jh;class rn{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=df,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new rn({geometry:t,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(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=df,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function h1(i){let t;if(typeof i=="function")t=i;else{let e;Array.isArray(i)?e=i:(ft(typeof i.getZIndex=="function",41),e=[i]),t=function(){return e}}return t}let Bh=null;function u1(i,t){if(!Bh){const e=new ge({color:"rgba(255,255,255,0.4)"}),n=new ke({color:"#3399CC",width:1.25});Bh=[new rn({image:new Hn({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Bh}function uf(){const i={},t=[255,255,255,1],e=[0,153,255,1],n=3;return i.Polygon=[new rn({fill:new ge({color:[255,255,255,.5]})})],i.MultiPolygon=i.Polygon,i.LineString=[new rn({stroke:new ke({color:t,width:n+2})}),new rn({stroke:new ke({color:e,width:n})})],i.MultiLineString=i.LineString,i.Circle=i.Polygon.concat(i.LineString),i.Point=[new rn({image:new Hn({radius:n*2,fill:new ge({color:e}),stroke:new ke({color:t,width:n/2})}),zIndex:1/0})],i.MultiPoint=i.Point,i.GeometryCollection=i.Polygon.concat(i.LineString,i.Point),i}function df(i){return i.getGeometry()}const le=rn,d1="#333";class Uh{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=be(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new ge({color:d1}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}clone(){const t=this.getScale();return new Uh({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,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_}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_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=be(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const cf=Uh;function c1(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Vh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Vh.read=function(i,t,e,n,r){var o,s,a=r*8-n-1,l=(1<<a)-1,h=l>>1,u=-7,d=e?r-1:0,c=e?-1:1,f=i[t+d];for(d+=c,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=o*256+i[t+d],d+=c,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=s*256+i[t+d],d+=c,u-=8);if(o===0)o=1-h;else{if(o===l)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-h}return(f?-1:1)*s*Math.pow(2,o-n)},Vh.write=function(i,t,e,n,r,o){var s,a,l,h=o*8-r-1,u=(1<<h)-1,d=u>>1,c=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,g=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?t+=c/l:t+=c*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,r),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;i[e+f]=a&255,f+=g,a/=256,r-=8);for(s=s<<r|a,h+=r;h>0;i[e+f]=s&255,f+=g,s/=256,h-=8);i[e+f-g]|=m*128};var f1=Tt,ma=Vh;function Tt(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}Tt.Varint=0,Tt.Fixed64=1,Tt.Bytes=2,Tt.Fixed32=5;var qh=(1<<16)*(1<<16),ff=1/qh,g1=12,gf=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Tt.prototype={destroy:function(){this.buf=null},readFields:function(i,t,e){for(e=e||this.length;this.pos<e;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=n&7,i(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(i,t){return this.readFields(i,t,this.readVarint()+this.pos)},readFixed32:function(){var i=pa(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=pf(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=pa(this.buf,this.pos)+pa(this.buf,this.pos+4)*qh;return this.pos+=8,i},readSFixed64:function(){var i=pa(this.buf,this.pos)+pf(this.buf,this.pos+4)*qh;return this.pos+=8,i},readFloat:function(){var i=ma.read(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=ma.read(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var t=this.buf,e,n;return n=t[this.pos++],e=n&127,n<128||(n=t[this.pos++],e|=(n&127)<<7,n<128)||(n=t[this.pos++],e|=(n&127)<<14,n<128)||(n=t[this.pos++],e|=(n&127)<<21,n<128)?e:(n=t[this.pos],e|=(n&15)<<28,m1(e,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 Boolean(this.readVarint())},readString:function(){var i=this.readVarint()+this.pos,t=this.pos;return this.pos=i,i-t>=g1&&gf?z1(this.buf,t,i):T1(this.buf,t,i)},readBytes:function(){var i=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,i);return this.pos=i,t},readPackedVarint:function(i,t){if(this.type!==Tt.Bytes)return i.push(this.readVarint(t));var e=zi(this);for(i=i||[];this.pos<e;)i.push(this.readVarint(t));return i},readPackedSVarint:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSVarint());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readSVarint());return i},readPackedBoolean:function(i){if(this.type!==Tt.Bytes)return i.push(this.readBoolean());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readBoolean());return i},readPackedFloat:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFloat());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readFloat());return i},readPackedDouble:function(i){if(this.type!==Tt.Bytes)return i.push(this.readDouble());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readDouble());return i},readPackedFixed32:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFixed32());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readFixed32());return i},readPackedSFixed32:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSFixed32());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed32());return i},readPackedFixed64:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFixed64());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readFixed64());return i},readPackedSFixed64:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSFixed64());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed64());return i},skip:function(i){var t=i&7;if(t===Tt.Varint)for(;this.buf[this.pos++]>127;);else if(t===Tt.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Tt.Fixed32)this.pos+=4;else if(t===Tt.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t)},writeTag:function(i,t){this.writeVarint(i<<3|t)},realloc:function(i){for(var t=this.length||16;t<this.pos+i;)t*=2;if(t!==this.length){var e=new Uint8Array(t);e.set(this.buf),this.buf=e,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(i){this.realloc(4),Ar(this.buf,i,this.pos),this.pos+=4},writeSFixed32:function(i){this.realloc(4),Ar(this.buf,i,this.pos),this.pos+=4},writeFixed64:function(i){this.realloc(8),Ar(this.buf,i&-1,this.pos),Ar(this.buf,Math.floor(i*ff),this.pos+4),this.pos+=8},writeSFixed64:function(i){this.realloc(8),Ar(this.buf,i&-1,this.pos),Ar(this.buf,Math.floor(i*ff),this.pos+4),this.pos+=8},writeVarint:function(i){if(i=+i||0,i>268435455||i<0){p1(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(Boolean(i))},writeString:function(i){i=String(i),this.realloc(i.length*4),this.pos++;var t=this.pos;this.pos=I1(this.buf,i,this.pos);var e=this.pos-t;e>=128&&mf(t,e,this),this.pos=t-1,this.writeVarint(e),this.pos+=e},writeFloat:function(i){this.realloc(4),ma.write(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),ma.write(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var t=i.length;this.writeVarint(t),this.realloc(t);for(var e=0;e<t;e++)this.buf[this.pos++]=i[e]},writeRawMessage:function(i,t){this.pos++;var e=this.pos;i(t,this);var n=this.pos-e;n>=128&&mf(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeMessage:function(i,t,e){this.writeTag(i,Tt.Bytes),this.writeRawMessage(t,e)},writePackedVarint:function(i,t){t.length&&this.writeMessage(i,y1,t)},writePackedSVarint:function(i,t){t.length&&this.writeMessage(i,x1,t)},writePackedBoolean:function(i,t){t.length&&this.writeMessage(i,w1,t)},writePackedFloat:function(i,t){t.length&&this.writeMessage(i,b1,t)},writePackedDouble:function(i,t){t.length&&this.writeMessage(i,k1,t)},writePackedFixed32:function(i,t){t.length&&this.writeMessage(i,E1,t)},writePackedSFixed32:function(i,t){t.length&&this.writeMessage(i,M1,t)},writePackedFixed64:function(i,t){t.length&&this.writeMessage(i,C1,t)},writePackedSFixed64:function(i,t){t.length&&this.writeMessage(i,S1,t)},writeBytesField:function(i,t){this.writeTag(i,Tt.Bytes),this.writeBytes(t)},writeFixed32Field:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeSFixed64(t)},writeVarintField:function(i,t){this.writeTag(i,Tt.Varint),this.writeVarint(t)},writeSVarintField:function(i,t){this.writeTag(i,Tt.Varint),this.writeSVarint(t)},writeStringField:function(i,t){this.writeTag(i,Tt.Bytes),this.writeString(t)},writeFloatField:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeFloat(t)},writeDoubleField:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeDouble(t)},writeBooleanField:function(i,t){this.writeVarintField(i,Boolean(t))}};function m1(i,t,e){var n=e.buf,r,o;if(o=n[e.pos++],r=(o&112)>>4,o<128||(o=n[e.pos++],r|=(o&127)<<3,o<128)||(o=n[e.pos++],r|=(o&127)<<10,o<128)||(o=n[e.pos++],r|=(o&127)<<17,o<128)||(o=n[e.pos++],r|=(o&127)<<24,o<128)||(o=n[e.pos++],r|=(o&1)<<31,o<128))return Pr(i,r,t);throw new Error("Expected varint not more than 10 bytes")}function zi(i){return i.type===Tt.Bytes?i.readVarint()+i.pos:i.pos+1}function Pr(i,t,e){return e?t*4294967296+(i>>>0):(t>>>0)*4294967296+(i>>>0)}function p1(i,t){var e,n;if(i>=0?(e=i%4294967296|0,n=i/4294967296|0):(e=~(-i%4294967296),n=~(-i/4294967296),e^4294967295?e=e+1|0:(e=0,n=n+1|0)),i>=18446744073709552e3||i<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),v1(e,n,t),_1(n,t)}function v1(i,t,e){e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos]=i&127}function _1(i,t){var e=(i&7)<<4;t.buf[t.pos++]|=e|((i>>>=3)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127)))))}function mf(i,t,e){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7));e.realloc(n);for(var r=e.pos-1;r>=i;r--)e.buf[r+n]=e.buf[r]}function y1(i,t){for(var e=0;e<i.length;e++)t.writeVarint(i[e])}function x1(i,t){for(var e=0;e<i.length;e++)t.writeSVarint(i[e])}function b1(i,t){for(var e=0;e<i.length;e++)t.writeFloat(i[e])}function k1(i,t){for(var e=0;e<i.length;e++)t.writeDouble(i[e])}function w1(i,t){for(var e=0;e<i.length;e++)t.writeBoolean(i[e])}function E1(i,t){for(var e=0;e<i.length;e++)t.writeFixed32(i[e])}function M1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed32(i[e])}function C1(i,t){for(var e=0;e<i.length;e++)t.writeFixed64(i[e])}function S1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed64(i[e])}function pa(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+i[t+3]*16777216}function Ar(i,t,e){i[e]=t,i[e+1]=t>>>8,i[e+2]=t>>>16,i[e+3]=t>>>24}function pf(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+(i[t+3]<<24)}function T1(i,t,e){for(var n="",r=t;r<e;){var o=i[r],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r+a>e)break;var l,h,u;a===1?o<128&&(s=o):a===2?(l=i[r+1],(l&192)===128&&(s=(o&31)<<6|l&63,s<=127&&(s=null))):a===3?(l=i[r+1],h=i[r+2],(l&192)===128&&(h&192)===128&&(s=(o&15)<<12|(l&63)<<6|h&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):a===4&&(l=i[r+1],h=i[r+2],u=i[r+3],(l&192)===128&&(h&192)===128&&(u&192)===128&&(s=(o&15)<<18|(l&63)<<12|(h&63)<<6|u&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,a=1):s>65535&&(s-=65536,n+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),n+=String.fromCharCode(s),r+=a}return n}function z1(i,t,e){return gf.decode(i.subarray(t,e))}function I1(i,t,e){for(var n=0,r,o;n<t.length;n++){if(r=t.charCodeAt(n),r>55295&&r<57344)if(o)if(r<56320){i[e++]=239,i[e++]=191,i[e++]=189,o=r;continue}else r=o-55296<<10|r-56320|65536,o=null;else{r>56319||n+1===t.length?(i[e++]=239,i[e++]=191,i[e++]=189):o=r;continue}else o&&(i[e++]=239,i[e++]=191,i[e++]=189,o=null);r<128?i[e++]=r:(r<2048?i[e++]=r>>6|192:(r<65536?i[e++]=r>>12|224:(i[e++]=r>>18|240,i[e++]=r>>12&63|128),i[e++]=r>>6&63|128),i[e++]=r&63|128)}return e}const vf=Ye();class Do{constructor(t,e,n,r,o){this.styleFunction,this.extent_,this.id_=o,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=r}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?yo(this.flatCoordinates_):Il(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=Yi(this.getExtent());this.flatInteriorPoints_=fh(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=sf(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=jc(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=la(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const n=this.ends_;for(let r=0,o=n.length;r<o;++r){const s=n[r],a=la(t,e,s,2,.5);li(this.flatMidpoints_,a),e=s}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getStride(){return 2}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){t=Gt(t);const e=t.getExtent(),n=t.getWorldExtent();if(e&&n){const r=$e(n)/$e(e);Ei(vf,n[0],n[3],r,-r,0,0,0),Ji(this.flatCoordinates_,0,this.flatCoordinates_.length,2,vf,this.flatCoordinates_)}}getEnds(){return this.ends_}}Do.prototype.getEndss=Do.prototype.getEnds,Do.prototype.getFlatCoordinates=Do.prototype.getOrientedFlatCoordinates;const Xh=Do;class R1 extends af{constructor(t){super(),t=t||{},this.dataProjection=new Os({code:"",units:"tile-pixels"}),this.featureClass_=t.featureClass?t.featureClass:Xh,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.idProperty_=t.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(t,e,n,r){t.pos=e.geometry;const o=t.readVarint()+t.pos;let s=1,a=0,l=0,h=0,u=0,d=0;for(;t.pos<o;){if(!a){const c=t.readVarint();s=c&7,a=c>>3}a--,s===1||s===2?(l+=t.readSVarint(),h+=t.readSVarint(),s===1&&u>d&&(r.push(u),d=u),n.push(l,h),u+=2):s===7?u>d&&(n.push(n[d],n[d+1]),u+=2):ft(!1,59)}u>d&&(r.push(u),d=u)}createFeature_(t,e,n){const r=e.type;if(r===0)return null;let o;const s=e.properties;let a;this.idProperty_?(a=s[this.idProperty_],delete s[this.idProperty_]):a=e.id,s[this.layerName_]=e.layer.name;const l=[],h=[];this.readRawGeometry_(t,e,l,h);const u=F1(r,h.length);if(this.featureClass_===Xh)o=new this.featureClass_(u,l,h,s,a),o.transform(n.dataProjection);else{let d;if(u=="Polygon"){const g=qv(l,h);d=g.length>1?new Ih(l,"XY",g):new Wn(l,"XY",h)}else d=u==="Point"?new ni(l,"XY"):u==="LineString"?new Kn(l,"XY"):u==="MultiPoint"?new Po(l,"XY"):u==="MultiLineString"?new Th(l,"XY",h):null;const c=this.featureClass_;o=new c,this.geometryName_&&o.setGeometryName(this.geometryName_);const f=Ph(d,!1,n);o.setGeometry(f),a!==void 0&&o.setId(a),o.setProperties(s,!0)}return o}getType(){return"arraybuffer"}readFeatures(t,e){const n=this.layers_;e=this.adaptOptions(e);const r=Gt(e.dataProjection);r.setWorldExtent(e.extent),e.dataProjection=r;const o=new f1(t),s=o.readFields(P1,{}),a=[];for(const l in s){if(n&&!n.includes(l))continue;const h=s[l],u=h?[0,0,h.extent,h.extent]:null;r.setExtent(u);for(let d=0,c=h.length;d<c;++d){const f=L1(o,h,d),g=this.createFeature_(o,f,e);g!==null&&a.push(g)}}return a}readProjection(t){return this.dataProjection}setLayers(t){this.layers_=t}}function P1(i,t,e){if(i===3){const n={keys:[],values:[],features:[]},r=e.readVarint()+e.pos;e.readFields(A1,n,r),n.length=n.features.length,n.length&&(t[n.name]=n)}}function A1(i,t,e){if(i===15)t.version=e.readVarint();else if(i===1)t.name=e.readString();else if(i===5)t.extent=e.readVarint();else if(i===2)t.features.push(e.pos);else if(i===3)t.keys.push(e.readString());else if(i===4){let n=null;const r=e.readVarint()+e.pos;for(;e.pos<r;)i=e.readVarint()>>3,n=i===1?e.readString():i===2?e.readFloat():i===3?e.readDouble():i===4?e.readVarint64():i===5?e.readVarint():i===6?e.readSVarint():i===7?e.readBoolean():null;t.values.push(n)}}function D1(i,t,e){if(i==1)t.id=e.readVarint();else if(i==2){const n=e.readVarint()+e.pos;for(;e.pos<n;){const r=t.layer.keys[e.readVarint()],o=t.layer.values[e.readVarint()];t.properties[r]=o}}else i==3?t.type=e.readVarint():i==4&&(t.geometry=e.pos)}function L1(i,t,e){i.pos=t.features[e];const n=i.readVarint()+i.pos,r={layer:t,type:0,properties:{}};return i.readFields(D1,r,n),r}function F1(i,t){let e;return i===1?e=t===1?"Point":"MultiPoint":i===2?e=t===1?"LineString":"MultiLineString":i===3&&(e="Polygon"),e}const O1=R1;function N1(i,t,e,n,r){_f(i,t,e||0,n||i.length-1,r||G1)}function _f(i,t,e,n,r){for(;n>e;){if(n-e>600){var o=n-e+1,s=t-e+1,a=Math.log(o),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(o-l)/o)*(s-o/2<0?-1:1),u=Math.max(e,Math.floor(t-s*l/o+h)),d=Math.min(n,Math.floor(t+(o-s)*l/o+h));_f(i,t,u,d,r)}var c=i[t],f=e,g=n;for(Lo(i,e,t),r(i[n],c)>0&&Lo(i,e,n);f<g;){for(Lo(i,f,g),f++,g--;r(i[f],c)<0;)f++;for(;r(i[g],c)>0;)g--}r(i[e],c)===0?Lo(i,e,g):(g++,Lo(i,g,n)),g<=t&&(e=g+1),t<=g&&(n=g-1)}}function Lo(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function G1(i,t){return i<t?-1:i>t?1:0}class yf{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!_a(t,e))return n;const r=this.toBBox,o=[];for(;e;){for(let s=0;s<e.children.length;s++){const a=e.children[s],l=e.leaf?r(a):a;_a(t,l)&&(e.leaf?n.push(a):Wh(t,l)?this._all(a,n):o.push(a))}e=o.pop()}return n}collides(t){let e=this.data;if(!_a(t,e))return!1;const n=[];for(;e;){for(let r=0;r<e.children.length;r++){const o=e.children[r],s=e.leaf?this.toBBox(o):o;if(_a(t,s)){if(e.leaf||Wh(t,s))return!0;n.push(o)}}e=n.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let n=0;n<t.length;n++)this.insert(t[n]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const n=this.data;this.data=e,e=n}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Lr([]),this}remove(t,e){if(!t)return this;let n=this.data;const r=this.toBBox(t),o=[],s=[];let a,l,h;for(;n||o.length;){if(n||(n=o.pop(),l=o[o.length-1],a=s.pop(),h=!0),n.leaf){const u=j1(t,n.children,e);if(u!==-1)return n.children.splice(u,1),o.push(n),this._condense(o),this}!h&&!n.leaf&&Wh(n,r)?(o.push(n),s.push(a),a=0,l=n,n=n.children[0]):l?(a++,n=l.children[a],h=!1):n=null}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const n=[];for(;t;)t.leaf?e.push(...t.children):n.push(...t.children),t=n.pop();return e}_build(t,e,n,r){const o=n-e+1;let s=this._maxEntries,a;if(o<=s)return a=Lr(t.slice(e,n+1)),Dr(a,this.toBBox),a;r||(r=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,r-1))),a=Lr([]),a.leaf=!1,a.height=r;const l=Math.ceil(o/s),h=l*Math.ceil(Math.sqrt(s));xf(t,e,n,h,this.compareMinX);for(let u=e;u<=n;u+=h){const d=Math.min(u+h-1,n);xf(t,u,d,l,this.compareMinY);for(let c=u;c<=d;c+=l){const f=Math.min(c+l-1,d);a.children.push(this._build(t,c,f,r-1))}}return Dr(a,this.toBBox),a}_chooseSubtree(t,e,n,r){for(;r.push(e),!(e.leaf||r.length-1===n);){let o=1/0,s=1/0,a;for(let l=0;l<e.children.length;l++){const h=e.children[l],u=$h(h),d=V1(t,h)-u;d<s?(s=d,o=u<o?u:o,a=h):d===s&&u<o&&(o=u,a=h)}e=a||e.children[0]}return e}_insert(t,e,n){const r=n?t:this.toBBox(t),o=[],s=this._chooseSubtree(r,this.data,e,o);for(s.children.push(t),Oo(s,r);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)}_split(t,e){const n=t[e],r=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,r);const s=this._chooseSplitIndex(n,o,r),a=Lr(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,Dr(n,this.toBBox),Dr(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=Lr([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Dr(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let r,o=1/0,s=1/0;for(let a=e;a<=n-e;a++){const l=Fo(t,0,a,this.toBBox),h=Fo(t,a,n,this.toBBox),u=q1(l,h),d=$h(l)+$h(h);u<o?(o=u,r=a,s=d<s?d:s):u===o&&d<s&&(s=d,r=a)}return r||n-e}_chooseSplitAxis(t,e,n){const r=t.leaf?this.compareMinX:B1,o=t.leaf?this.compareMinY:U1,s=this._allDistMargin(t,e,n,r),a=this._allDistMargin(t,e,n,o);s<a&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const o=this.toBBox,s=Fo(t,0,e,o),a=Fo(t,n-e,n,o);let l=va(s)+va(a);for(let h=e;h<n-e;h++){const u=t.children[h];Oo(s,t.leaf?o(u):u),l+=va(s)}for(let h=n-e-1;h>=e;h--){const u=t.children[h];Oo(a,t.leaf?o(u):u),l+=va(a)}return l}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)Oo(e[r],t)}_condense(t){for(let e=t.length-1,n;e>=0;e--)t[e].children.length===0?e>0?(n=t[e-1].children,n.splice(n.indexOf(t[e]),1)):this.clear():Dr(t[e],this.toBBox)}}function j1(i,t,e){if(!e)return t.indexOf(i);for(let n=0;n<t.length;n++)if(e(i,t[n]))return n;return-1}function Dr(i,t){Fo(i,0,i.children.length,t,i)}function Fo(i,t,e,n,r){r||(r=Lr(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o=t;o<e;o++){const s=i.children[o];Oo(r,i.leaf?n(s):s)}return r}function Oo(i,t){return i.minX=Math.min(i.minX,t.minX),i.minY=Math.min(i.minY,t.minY),i.maxX=Math.max(i.maxX,t.maxX),i.maxY=Math.max(i.maxY,t.maxY),i}function B1(i,t){return i.minX-t.minX}function U1(i,t){return i.minY-t.minY}function $h(i){return(i.maxX-i.minX)*(i.maxY-i.minY)}function va(i){return i.maxX-i.minX+(i.maxY-i.minY)}function V1(i,t){return(Math.max(t.maxX,i.maxX)-Math.min(t.minX,i.minX))*(Math.max(t.maxY,i.maxY)-Math.min(t.minY,i.minY))}function q1(i,t){const e=Math.max(i.minX,t.minX),n=Math.max(i.minY,t.minY),r=Math.min(i.maxX,t.maxX),o=Math.min(i.maxY,t.maxY);return Math.max(0,r-e)*Math.max(0,o-n)}function Wh(i,t){return i.minX<=t.minX&&i.minY<=t.minY&&t.maxX<=i.maxX&&t.maxY<=i.maxY}function _a(i,t){return t.minX<=i.maxX&&t.minY<=i.maxY&&t.maxX>=i.minX&&t.maxY>=i.minY}function Lr(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function xf(i,t,e,n,r){const o=[t,e];for(;o.length;){if(e=o.pop(),t=o.pop(),e-t<=n)continue;const s=t+Math.ceil((e-t)/n/2)*n;N1(i,s,t,e,r),o.push(t,s,s,e)}}function bf(i){return new le({fill:No(i,""),stroke:Go(i,""),text:X1(i),image:$1(i)})}function No(i,t){const e=i[t+"fill-color"];if(!!e)return new ge({color:e})}function Go(i,t){const e=i[t+"stroke-width"],n=i[t+"stroke-color"];if(!(!e&&!n))return new ke({width:e,color:n,lineCap:i[t+"stroke-line-cap"],lineJoin:i[t+"stroke-line-join"],lineDash:i[t+"stroke-line-dash"],lineDashOffset:i[t+"stroke-line-dash-offset"],miterLimit:i[t+"stroke-miter-limit"]})}function X1(i){const t=i["text-value"];return t?new cf({text:t,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"],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:No(i,"text-"),backgroundFill:No(i,"text-background-"),stroke:Go(i,"text-"),backgroundStroke:Go(i,"text-background-")}):void 0}function $1(i){const t=i["icon-src"],e=i["icon-img"];if(t||e)return new fa({src:t,img:e,imgSize:i["icon-img-size"],anchor:i["icon-anchor"],anchorOrigin:i["icon-anchor-origin"],anchorXUnits: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"],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 o="shape-";return new ga({points:n,fill:No(i,o),stroke:Go(i,o),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 o="circle-";return new Hn({radius:r,fill:No(i,o),stroke:Go(i,o),displacement:i["circle-displacement"],scale:i["circle-scale"],rotation:i["circle-rotation"],rotateWithView:i["circle-rotate-with-view"],declutterMode:i["circle-declutter-mode"]})}}const kf={RENDER_ORDER:"renderOrder"};class W1 extends Fs{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter!==void 0?t.declutter:!1,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(kf.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new yf(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(kf.RENDER_ORDER,t)}setStyle(t){let e;if(t===void 0)e=u1;else if(t===null)e=null;else if(typeof t=="function")e=t;else if(t instanceof le)e=t;else if(Array.isArray(t)){const n=t.length,r=new Array(n);for(let o=0;o<n;++o){const s=t[o];s instanceof le?r[o]=s:r[o]=bf(s)}e=r}else e=bf(t);this.style_=e,this.styleFunction_=t===null?void 0:h1(this.style_),this.changed()}}const wf=W1,jo={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},ya=[jo.FILL],on=[jo.STROKE],Jn=[jo.BEGIN_PATH],Ef=[jo.CLOSE_PATH],Q=jo;class Y1{drawCustom(t,e,n,r){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}const Mf=Y1;class K1 extends Mf{constructor(t,e,n,r){super(),this.tolerance=t,this.maxExtent=e,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(t){const e=this.pixelRatio;return e==1?t:t.map(function(n){return n*e})}appendFlatPointCoordinates(t,e){const n=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,o=this.coordinates;let s=o.length;for(let a=0,l=t.length;a<l;a+=e)r[0]=t[a],r[1]=t[a+1],Gs(n,r)&&(o[s++]=r[0],o[s++]=r[1]);return s}appendFlatLineCoordinates(t,e,n,r,o,s){const a=this.coordinates;let l=a.length;const h=this.getBufferedMaxExtent();s&&(e+=r);let u=t[e],d=t[e+1];const c=this.tmpCoordinate_;let f=!0,g,m,p;for(g=e+r;g<n;g+=r)c[0]=t[g],c[1]=t[g+1],p=zl(h,c),p!==m?(f&&(a[l++]=u,a[l++]=d,f=!1),a[l++]=c[0],a[l++]=c[1]):p===ne.INTERSECTING?(a[l++]=c[0],a[l++]=c[1],f=!1):f=!0,u=c[0],d=c[1],m=p;return(o&&f||g===e+r)&&(a[l++]=u,a[l++]=d),l}drawCustomCoordinates_(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){const l=n[s],h=this.appendFlatLineCoordinates(t,e,l,r,!1,!1);o.push(h),e=l}return e}drawCustom(t,e,n,r){this.beginGeometry(t,e);const o=t.getType(),s=t.getStride(),a=this.coordinates.length;let l,h,u,d,c;switch(o){case"MultiPolygon":l=t.getOrientedFlatCoordinates(),d=[];const f=t.getEndss();c=0;for(let g=0,m=f.length;g<m;++g){const p=[];c=this.drawCustomCoordinates_(l,c,f[g],s,p),d.push(p)}this.instructions.push([Q.CUSTOM,a,d,t,n,uh]),this.hitDetectionInstructions.push([Q.CUSTOM,a,d,t,r||n,uh]);break;case"Polygon":case"MultiLineString":u=[],l=o=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),c=this.drawCustomCoordinates_(l,0,t.getEnds(),s,u),this.instructions.push([Q.CUSTOM,a,u,t,n,zo]),this.hitDetectionInstructions.push([Q.CUSTOM,a,u,t,r||n,zo]);break;case"LineString":case"Circle":l=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(l,0,l.length,s,!1,!1),this.instructions.push([Q.CUSTOM,a,h,t,n,tn]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,r||n,tn]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,s),h>a&&(this.instructions.push([Q.CUSTOM,a,h,t,n,tn]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,r||n,tn]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([Q.CUSTOM,a,h,t,n]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,r||n]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[Q.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Q.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let r,o,s=-1;for(e=0;e<n;++e)r=t[e],o=r[0],o==Q.END_GEOMETRY?s=e:o==Q.BEGIN_GEOMETRY&&(r[2]=e,$p(this.hitDetectionInstructions,s,e),s=-1)}setFillStrokeStyle(t,e){const n=this.state;if(t){const r=t.getColor();n.fillStyle=di(r||Mi)}else n.fillStyle=void 0;if(e){const r=e.getColor();n.strokeStyle=di(r||Co);const o=e.getLineCap();n.lineCap=o!==void 0?o:Ks;const s=e.getLineDash();n.lineDash=s?s.slice():wo;const a=e.getLineDashOffset();n.lineDashOffset=a||Eo;const l=e.getLineJoin();n.lineJoin=l!==void 0?l:Sr;const h=e.getWidth();n.lineWidth=h!==void 0?h:To;const u=e.getMiterLimit();n.miterLimit=u!==void 0?u:Mo,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(t){const e=t.fillStyle,n=[Q.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(!0),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Q.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,r=t.lineCap,o=t.lineDash,s=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=r||o!=t.currentLineDash&&!Vi(t.currentLineDash,o)||t.currentLineDashOffset!=s||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=r,t.currentLineDash=o,t.currentLineDashOffset=s,t.currentLineJoin=a,t.currentLineWidth=l,t.currentMiterLimit=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Q.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=ec(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;ui(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Bo=K1;class Z1 extends Bo{constructor(t,e,n,r){super(t,e,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(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),r=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(n,r);this.instructions.push([Q.DRAW_IMAGE,o,s,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([Q.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),r=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(n,r);this.instructions.push([Q.DRAW_IMAGE,o,s,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([Q.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}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(t,e){const n=t.getAnchor(),r=t.getSize(),o=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=o[0],this.originY_=o[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=r[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const H1=Z1;class J1 extends Bo{constructor(t,e,n,r){super(t,e,n,r)}drawFlatCoordinates_(t,e,n,r){const o=this.coordinates.length,s=this.appendFlatLineCoordinates(t,e,n,r,!1,!1),a=[Q.MOVE_TO_LINE_TO,o,s];return this.instructions.push(a),this.hitDetectionInstructions.push(a),n}drawLineString(t,e){const n=this.state,r=n.strokeStyle,o=n.lineWidth;if(r===void 0||o===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,wo,Eo],Jn);const s=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(s,0,s.length,a),this.hitDetectionInstructions.push(on),this.endGeometry(e)}drawMultiLineString(t,e){const n=this.state,r=n.strokeStyle,o=n.lineWidth;if(r===void 0||o===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],Jn);const s=t.getEnds(),a=t.getFlatCoordinates(),l=t.getStride();let h=0;for(let u=0,d=s.length;u<d;++u)h=this.drawFlatCoordinates_(a,h,s[u],l);this.hitDetectionInstructions.push(on),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(on),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(on),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(Jn)}}const Q1=J1;class ty extends Bo{constructor(t,e,n,r){super(t,e,n,r)}drawFlatCoordinatess_(t,e,n,r){const o=this.state,s=o.fillStyle!==void 0,a=o.strokeStyle!==void 0,l=n.length;this.instructions.push(Jn),this.hitDetectionInstructions.push(Jn);for(let h=0;h<l;++h){const u=n[h],d=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,u,r,!0,!a),f=[Q.MOVE_TO_LINE_TO,d,c];this.instructions.push(f),this.hitDetectionInstructions.push(f),a&&(this.instructions.push(Ef),this.hitDetectionInstructions.push(Ef)),e=u}return s&&(this.instructions.push(ya),this.hitDetectionInstructions.push(ya)),a&&(this.instructions.push(on),this.hitDetectionInstructions.push(on)),e}drawCircle(t,e){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(r===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Mi]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getFlatCoordinates(),a=t.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(s,0,s.length,a,!1,!1);const h=[Q.CIRCLE,l];this.instructions.push(Jn,h),this.hitDetectionInstructions.push(Jn,h),n.fillStyle!==void 0&&(this.instructions.push(ya),this.hitDetectionInstructions.push(ya)),n.strokeStyle!==void 0&&(this.instructions.push(on),this.hitDetectionInstructions.push(on)),this.endGeometry(e)}drawPolygon(t,e){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(r===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Mi]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getEnds(),a=t.getOrientedFlatCoordinates(),l=t.getStride();this.drawFlatCoordinatess_(a,0,s,l),this.endGeometry(e)}drawMultiPolygon(t,e){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(r===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Mi]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getEndss(),a=t.getOrientedFlatCoordinates(),l=t.getStride();let h=0;for(let u=0,d=s.length;u<d;++u)h=this.drawFlatCoordinatess_(a,h,s[u],l);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let n=0,r=e.length;n<r;++n)e[n]=Xn(e[n],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}const Cf=ty;function ey(i,t,e,n,r){let o=e,s=e,a=0,l=0,h=e,u,d,c,f,g,m,p,_,v,y;for(d=e;d<n;d+=r){const x=t[d],k=t[d+1];g!==void 0&&(v=x-g,y=k-m,f=Math.sqrt(v*v+y*y),p!==void 0&&(l+=c,u=Math.acos((p*v+_*y)/(c*f)),u>i&&(l>a&&(a=l,o=h,s=d),l=0,h=d-r)),c=f,p=v,_=y),g=x,m=k}return l+=f,l>a?[h,d]:[o,s]}const Uo={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class iy extends Bo{constructor(t,e,n,r){super(t,e,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.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const n=this.textFillState_,r=this.textStrokeState_,o=this.textState_;if(this.text_===""||!o||!n&&!r)return;const s=this.coordinates;let a=s.length;const l=t.getType();let h=null,u=t.getStride();if(o.placement==="line"&&(l=="LineString"||l=="MultiLineString"||l=="Polygon"||l=="MultiPolygon")){if(!Kt(this.getBufferedMaxExtent(),t.getExtent()))return;let d;if(h=t.getFlatCoordinates(),l=="LineString")d=[h.length];else if(l=="MultiLineString")d=t.getEnds();else if(l=="Polygon")d=t.getEnds().slice(0,1);else if(l=="MultiPolygon"){const m=t.getEndss();d=[];for(let p=0,_=m.length;p<_;++p)d.push(m[p][0])}this.beginGeometry(t,e);const c=o.textAlign;let f=0,g;for(let m=0,p=d.length;m<p;++m){if(c==null){const v=ey(o.maxAngle,h,f,d[m],u);f=v[0],g=v[1]}else g=d[m];for(let v=f;v<g;v+=u)s.push(h[v],h[v+1]);const _=s.length;f=d[m],this.drawChars_(a,_),a=_}this.endGeometry(e)}else{let d=o.overflow?null:[];switch(l){case"Point":case"MultiPoint":h=t.getFlatCoordinates();break;case"LineString":h=t.getFlatMidpoint();break;case"Circle":h=t.getCenter();break;case"MultiLineString":h=t.getFlatMidpoints(),u=2;break;case"Polygon":h=t.getFlatInteriorPoint(),o.overflow||d.push(h[2]/this.resolution),u=3;break;case"MultiPolygon":const p=t.getFlatInteriorPoints();h=[];for(let _=0,v=p.length;_<v;_+=3)o.overflow||d.push(p[_+2]/this.resolution),h.push(p[_],p[_+1]);if(h.length===0)return;u=2;break}const c=this.appendFlatPointCoordinates(h,u);if(c===a)return;if(d&&(c-a)/2!==h.length/u){let p=a/2;d=d.filter((_,v)=>{const y=s[(p+v)*2]===h[v*u]&&s[(p+v)*2+1]===h[v*u+1];return y||--p,y})}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let f=o.padding;if(f!=qn&&(o.scale[0]<0||o.scale[1]<0)){let p=o.padding[0],_=o.padding[1],v=o.padding[2],y=o.padding[3];o.scale[0]<0&&(_=-_,y=-y),o.scale[1]<0&&(p=-p,v=-v),f=[p,_,v,y]}const g=this.pixelRatio;this.instructions.push([Q.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,f==qn?qn:f.map(function(p){return p*g}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/g;this.hitDetectionInstructions.push([Q.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,void 0,this.declutterImageWithText_,f,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,r=this.strokeKey_;t&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const o=this.textKey_;o in this.textStates||(this.textStates[o]={font:e.font,textAlign:e.textAlign||So,justify:e.justify,textBaseline:e.textBaseline||Zs,scale:e.scale});const s=this.fillKey_;n&&(s in this.fillStates||(this.fillStates[s]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,r=this.textState_,o=this.strokeKey_,s=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=Uo[r.textBaseline],u=this.textOffsetY_*l,d=this.text_,c=n?n.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([Q.DRAW_CHARS,t,e,h,r.overflow,a,r.maxAngle,l,u,o,c*l,d,s,1]),this.hitDetectionInstructions.push([Q.DRAW_CHARS,t,e,h,r.overflow,a,r.maxAngle,1,u,o,c,d,s,1/l])}setTextStyle(t,e){let n,r,o;if(!t)this.text_="";else{const s=t.getFill();s?(r=this.textFillState_,r||(r={},this.textFillState_=r),r.fillStyle=di(s.getColor()||Mi)):(r=null,this.textFillState_=r);const a=t.getStroke();if(!a)o=null,this.textStrokeState_=o;else{o=this.textStrokeState_,o||(o={},this.textStrokeState_=o);const g=a.getLineDash(),m=a.getLineDashOffset(),p=a.getWidth(),_=a.getMiterLimit();o.lineCap=a.getLineCap()||Ks,o.lineDash=g?g.slice():wo,o.lineDashOffset=m===void 0?Eo:m,o.lineJoin=a.getLineJoin()||Sr,o.lineWidth=p===void 0?To:p,o.miterLimit=_===void 0?Mo:_,o.strokeStyle=di(a.getColor()||Co)}n=this.textState_;const l=t.getFont()||wc;nv(l);const h=t.getScaleArray();n.overflow=t.getOverflow(),n.font=l,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||Zs,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||qn,n.scale=h===void 0?[1,1]:h;const u=t.getOffsetX(),d=t.getOffsetY(),c=t.getRotateWithView(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=u===void 0?0:u,this.textOffsetY_=d===void 0?0:d,this.textRotateWithView_=c===void 0?!1:c,this.textRotation_=f===void 0?0:f,this.strokeKey_=o?(typeof o.strokeStyle=="string"?o.strokeStyle:K(o.strokeStyle))+o.lineCap+o.lineDashOffset+"|"+o.lineWidth+o.lineJoin+o.miterLimit+"["+o.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=r?typeof r.fillStyle=="string"?r.fillStyle:"|"+K(r.fillStyle):""}this.declutterImageWithText_=e}}const ny={Circle:Cf,Default:Bo,Image:H1,LineString:Q1,Polygon:Cf,Text:iy};class ry{constructor(t,e,n,r){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=r,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const r in n){const o=n[r].finish();t[e][r]=o}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let r=this.buildersByZIndex_[n];r===void 0&&(r={},this.buildersByZIndex_[n]=r);let o=r[e];if(o===void 0){const s=ny[e];o=new s(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[e]=o}return o}}const xa=ry;class oy extends jd{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return et()}getData(t){return null}prepareFrame(t){return et()}renderFrame(t,e){return et()}loadedTileCallback(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n}createLoadedTileFinder(t,e,n){return function(r,o){const s=this.loadedTileCallback.bind(this,n,r);return t.forEachLoadedTile(e,r,o,s)}.bind(this)}forEachFeatureAtCoordinate(t,e,n,r,o){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){t.target.getState()===Qt.LOADED&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Qt.LOADED&&e!=Qt.ERROR&&t.addEventListener(tt.CHANGE,this.boundHandleImageChange_),e==Qt.IDLE&&(t.load(),e=t.getState()),e==Qt.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const sy=oy,Sf=[];let Fr=null;function ay(){const i=document.createElement("canvas");i.width=1,i.height=1,Fr=i.getContext("2d")}class ly extends sy{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Ye(),this.pixelTransform=Ye(),this.inversePixelTransform=Ye(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){Fr||ay(),Fr.clearRect(0,0,1,1);let r;try{Fr.drawImage(t,e,n,1,1,0,0,1,1),r=Fr.getImageData(0,0,1,1).data}catch{return Fr=null,null}return r}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const r=this.getLayer().getClassName();let o,s;if(t&&t.className===r&&(!n||t&&t.style.backgroundColor&&Vi(ko(t.style.backgroundColor),ko(n)))){const a=t.firstElementChild;a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}if(s&&s.canvas.style.transform===e?(this.container=t,this.context=s,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){o=document.createElement("div"),o.className=r;let a=o.style;a.position="absolute",a.width="100%",a.height="100%",s=Pe();const l=s.canvas;o.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=o,this.context=s}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const r=Ki(n),o=Us(n),s=Bs(n),a=js(n);Jt(e.coordinateToPixelTransform,r),Jt(e.coordinateToPixelTransform,o),Jt(e.coordinateToPixelTransform,s),Jt(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;Jt(l,r),Jt(l,o),Jt(l,s),Jt(l,a),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()}dispatchRenderEvent_(t,e,n){const r=this.getLayer();if(r.hasListener(t)){const o=new kc(t,this.inversePixelTransform,n,e);r.dispatchEvent(o)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(Wi.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(Wi.POSTRENDER,t,e)}getRenderTransform(t,e,n,r,o,s,a){const l=o/2,h=s/2,u=r/e,d=-u,c=-t[0]+a,f=-t[1];return Ei(this.tempTransform,l,h,u,d,-n,c,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const Tf=ly;function hy(i,t,e,n,r,o,s,a,l,h,u,d){let c=i[t],f=i[t+1],g=0,m=0,p=0,_=0;function v(){g=c,m=f,t+=n,c=i[t],f=i[t+1],_+=p,p=Math.sqrt((c-g)*(c-g)+(f-m)*(f-m))}do v();while(t<e-n&&_+p<o);let y=p===0?0:(o-_)/p;const x=ki(g,c,y),k=ki(m,f,y),w=t-n,M=_,E=o+a*l(h,r,u);for(;t<e-n&&_+p<E;)v();y=p===0?0:(E-_)/p;const S=ki(g,c,y),I=ki(m,f,y);let A;if(d){const U=[x,k,S,I];nh(U,0,4,2,d,U,U),A=U[0]>U[2]}else A=x>S;const G=Math.PI,P=[],at=w+n===t;t=w,p=0,_=M,c=i[t],f=i[t+1];let j;if(at){v(),j=Math.atan2(f-m,c-g),A&&(j+=j>0?-G:G);const U=(S+x)/2,O=(I+k)/2;return P[0]=[U,O,(E-o)/2,j,r],P}r=r.replace(/\n/g," ");for(let U=0,O=r.length;U<O;){v();let W=Math.atan2(f-m,c-g);if(A&&(W+=W>0?-G:G),j!==void 0){let b=W-j;if(b+=b>G?-2*G:b<-G?2*G:0,Math.abs(b)>s)return null}j=W;const D=U;let Z=0;for(;U<O;++U){const b=A?O-U-1:U,T=a*l(h,r[b],u);if(t+n<e&&_+p<o+Z+T/2)break;Z+=T}if(U===D)continue;const V=A?r.substring(O-D,O-U):r.substring(D,U);y=p===0?0:(o+Z/2-_)/p;const z=ki(g,c,y),ot=ki(m,f,y);P.push([z,ot,Z/2,W,V]),o+=Z}return P}const Or=Ge(),sn=[],Ii=[],Ri=[],an=[];function zf(i){return i[3].declutterBox}const uy=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 If(i,t){return(t==="start"||t==="end")&&!uy.test(i)&&(t=t==="start"?"left":"right"),Uo[t]}function dy(i,t,e){return e>0&&i.push(`
|
43
|
-
`,""),i.push(t,""),i}class cy{constructor(t,e,n,
|
44
|
-
`).reduce(dy,[]),{width:m,height:p,widths:_,heights:v,lineWidths:y}=
|
45
|
-
`){at+=P,P=0,I=c*x+S*f,++U;continue}const V=g[W+1]||l.font;V!==O&&(r&&A.push("font",V),n&&G.push("font",V),O=V),P=Math.max(P,v[j]);const z=[Z,I+S*_[j]+c*(_[j]-y[U]),.5*(f+P)+at];I+=_[j],r&&A.push("strokeText",z),n&&G.push("fillText",z),++j}return Array.prototype.push.apply(k,A),Array.prototype.push.apply(k,G),this.labels_[o]=E,E}replayTextBackground_(t,e,n,r,o,s,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,o),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())}calculateImageOrLabelDimensions_(t,e,n,r,o,s,a,l,h,u,d,c,f,g,m,p){a*=c[0],l*=c[1];let _=n-a,v=r-l;const y=o+h>t?t-h:o,x=s+u>e?e-u:s,k=g[3]+y*c[0]+g[1],w=g[0]+x*c[1]+g[2],M=_-g[3],E=v-g[0];(m||d!==0)&&(sn[0]=M,an[0]=M,sn[1]=E,Ii[1]=E,Ii[0]=M+k,Ri[0]=Ii[0],Ri[1]=E+w,an[1]=Ri[1]);let S;return d!==0?(S=Ei(Ye(),n,r,1,1,d,-n,-r),Jt(S,sn),Jt(S,Ii),Jt(S,Ri),Jt(S,an),ti(Math.min(sn[0],Ii[0],Ri[0],an[0]),Math.min(sn[1],Ii[1],Ri[1],an[1]),Math.max(sn[0],Ii[0],Ri[0],an[0]),Math.max(sn[1],Ii[1],Ri[1],an[1]),Or)):ti(Math.min(M,M+k),Math.min(E,E+w),Math.max(M,M+k),Math.max(E,E+w),Or),f&&(_=Math.round(_),v=Math.round(v)),{drawImageX:_,drawImageY:v,drawImageW:y,drawImageH:x,originX:h,originY:u,declutterBox:{minX:Or[0],minY:Or[1],maxX:Or[2],maxY:Or[3],value:p},canvasTransform:S,scale:c}}replayImageOrLabel_(t,e,n,r,o,s,a){const l=!!(s||a),h=r.declutterBox,u=t.canvas,d=a?a[2]*r.scale[0]/2:0;return h.minX-d<=u.width/e&&h.maxX+d>=0&&h.minY-d<=u.height/e&&h.maxY+d>=0&&(l&&this.replayTextBackground_(t,sn,Ii,Ri,an,s,a),sv(t,r.canvasTransform,o,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0}fill_(t){if(this.alignFill_){const e=Jt(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,n,r){const o=this.textStates[e],s=this.createLabel(t,e,r,n),a=this.strokeStates[n],l=this.pixelRatio,h=If(Array.isArray(t)?t[0]:t,o.textAlign||So),u=Uo[o.textBaseline||Zs],d=a&&a.lineWidth?a.lineWidth:0,c=s.width/l-2*o.scale[0],f=h*c+2*(.5-h)*d,g=u*s.height/l+2*(.5-u)*d;return{label:s,anchorX:f,anchorY:g}}execute_(t,e,n,r,o,s,a,l){let h;this.pixelCoordinates_&&Vi(n,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=Ji(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),V0(this.renderedTransform_,n));let u=0;const d=r.length;let c=0,f,g,m,p,_,v,y,x,k,w,M,E,S=0,I=0,A=null,G=null;const P=this.coordinateCache_,at=this.viewRotation_,j=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,U={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:at},O=this.instructions!=r||this.overlaps?0:200;let W,D,Z,V;for(;u<d;){const z=r[u];switch(z[0]){case Q.BEGIN_GEOMETRY:W=z[1],V=z[3],W.getGeometry()?a!==void 0&&!Kt(a,V.getExtent())?u=z[2]+1:++u:u=z[2];break;case Q.BEGIN_PATH:S>O&&(this.fill_(t),S=0),I>O&&(t.stroke(),I=0),!S&&!I&&(t.beginPath(),p=NaN,_=NaN),++u;break;case Q.CIRCLE:c=z[1];const b=h[c],T=h[c+1],Y=h[c+2],C=h[c+3],H=Y-b,$=C-T,vt=Math.sqrt(H*H+$*$);t.moveTo(b+vt,T),t.arc(b,T,vt,0,2*Math.PI,!0),++u;break;case Q.CLOSE_PATH:t.closePath(),++u;break;case Q.CUSTOM:c=z[1],f=z[2];const Ct=z[3],_t=z[4],Mt=z.length==6?z[5]:void 0;U.geometry=Ct,U.feature=W,u in P||(P[u]=[]);const Lt=P[u];Mt?Mt(h,c,f,2,Lt):(Lt[0]=h[c],Lt[1]=h[c+1],Lt.length=2),_t(Lt,U),++u;break;case Q.DRAW_IMAGE:c=z[1],f=z[2],x=z[3],g=z[4],m=z[5];let Dt=z[6];const jt=z[7],F=z[8],ut=z[9],pt=z[10];let kt=z[11];const yt=z[12];let st=z[13];const nt=z[14],wt=z[15];if(!x&&z.length>=20){k=z[19],w=z[20],M=z[21],E=z[22];const de=this.drawLabelWithPointPlacement_(k,w,M,E);x=de.label,z[3]=x;const bi=z[23];g=(de.anchorX-bi)*this.pixelRatio,z[4]=g;const _e=z[24];m=(de.anchorY-_e)*this.pixelRatio,z[5]=m,Dt=x.height,z[6]=Dt,st=x.width,z[13]=st}let zt;z.length>25&&(zt=z[25]);let Bt,xt,dt;z.length>17?(Bt=z[16],xt=z[17],dt=z[18]):(Bt=qn,xt=!1,dt=!1),pt&&j?kt+=at:!pt&&!j&&(kt-=at);let Ft=0;for(;c<f;c+=2){if(zt&&zt[Ft++]<st/this.pixelRatio)continue;const de=this.calculateImageOrLabelDimensions_(x.width,x.height,h[c],h[c+1],st,Dt,g,m,F,ut,kt,yt,o,Bt,xt||dt,W),bi=[t,e,x,de,jt,xt?A:null,dt?G:null];if(l){if(nt==="none")continue;if(nt==="obstacle"){l.insert(de.declutterBox);continue}else{let _e,Xe;if(wt){const Ie=f-c;if(!wt[Ie]){wt[Ie]=bi;continue}if(_e=wt[Ie],delete wt[Ie],Xe=zf(_e),l.collides(Xe))continue}if(l.collides(de.declutterBox))continue;_e&&(l.insert(Xe),this.replayImageOrLabel_.apply(this,_e)),l.insert(de.declutterBox)}}this.replayImageOrLabel_.apply(this,bi)}++u;break;case Q.DRAW_CHARS:const St=z[1],ct=z[2],ue=z[3],Ve=z[4];E=z[5];const $t=z[6],ze=z[7],Ut=z[8];M=z[9];const Ht=z[10];k=z[11],w=z[12];const Tn=[z[13],z[13]],ae=this.textStates[w],qe=ae.font,ve=[ae.scale[0]*ze,ae.scale[1]*ze];let Oe;qe in this.widths_?Oe=this.widths_[qe]:(Oe={},this.widths_[qe]=Oe);const Ni=of(h,St,ct,2),sl=Math.abs(ve[0])*Mc(qe,k,Oe);if(Ve||sl<=Ni){const de=this.textStates[w].textAlign,bi=(Ni-sl)*Uo[de],_e=hy(h,St,ct,2,k,bi,$t,Math.abs(ve[0]),Mc,qe,Oe,j?0:this.viewRotation_);t:if(_e){const Xe=[];let Ie,ro,oo,ye,Re;if(M)for(Ie=0,ro=_e.length;Ie<ro;++Ie){Re=_e[Ie],oo=Re[4],ye=this.createLabel(oo,w,"",M),g=Re[2]+(ve[0]<0?-Ht:Ht),m=ue*ye.height+(.5-ue)*2*Ht*ve[1]/ve[0]-Ut;const ee=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Re[0],Re[1],ye.width,ye.height,g,m,0,0,Re[3],Tn,!1,qn,!1,W);if(l&&l.collides(ee.declutterBox))break t;Xe.push([t,e,ye,ee,1,null,null])}if(E)for(Ie=0,ro=_e.length;Ie<ro;++Ie){Re=_e[Ie],oo=Re[4],ye=this.createLabel(oo,w,E,""),g=Re[2],m=ue*ye.height-Ut;const ee=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Re[0],Re[1],ye.width,ye.height,g,m,0,0,Re[3],Tn,!1,qn,!1,W);if(l&&l.collides(ee.declutterBox))break t;Xe.push([t,e,ye,ee,1,null,null])}l&&l.load(Xe.map(zf));for(let ee=0,ys=Xe.length;ee<ys;++ee)this.replayImageOrLabel_.apply(this,Xe[ee])}}++u;break;case Q.END_GEOMETRY:if(s!==void 0){W=z[1];const de=s(W,V);if(de)return de}++u;break;case Q.FILL:O?S++:this.fill_(t),++u;break;case Q.MOVE_TO_LINE_TO:for(c=z[1],f=z[2],D=h[c],Z=h[c+1],v=D+.5|0,y=Z+.5|0,(v!==p||y!==_)&&(t.moveTo(D,Z),p=v,_=y),c+=2;c<f;c+=2)D=h[c],Z=h[c+1],v=D+.5|0,y=Z+.5|0,(c==f-2||v!==p||y!==_)&&(t.lineTo(D,Z),p=v,_=y);++u;break;case Q.SET_FILL_STYLE:A=z,this.alignFill_=z[2],S&&(this.fill_(t),S=0,I&&(t.stroke(),I=0)),t.fillStyle=z[1],++u;break;case Q.SET_STROKE_STYLE:G=z,I&&(t.stroke(),I=0),this.setStrokeStyle_(t,z),++u;break;case Q.STROKE:O?I++:t.stroke(),++u;break;default:++u;break}}S&&this.fill_(t),I&&t.stroke()}execute(t,e,n,r,o,s){this.viewRotation_=r,this.execute_(t,e,n,this.instructions,o,void 0,void 0,s)}executeHitDetection(t,e,n,r,o){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,r,o)}}const fy=cy,Yh=["Polygon","Circle","LineString","Image","Text","Default"];class gy{constructor(t,e,n,r,o,s){this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Ye(),this.createExecutors_(o)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t){for(const e in t){let n=this.executorsByZIndex_[e];n===void 0&&(n={},this.executorsByZIndex_[e]=n);const r=t[e];for(const o in r){const s=r[o];n[o]=new fy(this.resolution_,this.pixelRatio_,this.overlaps_,s)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let r=0,o=t.length;r<o;++r)if(t[r]in n)return!0}return!1}forEachFeatureAtCoordinate(t,e,n,r,o,s){r=Math.round(r);const a=r*2+1,l=Ei(this.hitDetectionTransform_,r+.5,r+.5,1/e,-1/e,-n,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=Pe(a,a));const u=this.hitDetectionContext_;u.canvas.width!==a||u.canvas.height!==a?(u.canvas.width=a,u.canvas.height=a):h||u.clearRect(0,0,a,a);let d;this.renderBuffer_!==void 0&&(d=Ge(),xo(d,t),ui(d,e*(this.renderBuffer_+r),d));const c=my(r);let f;function g(k,w){const M=u.getImageData(0,0,a,a).data;for(let E=0,S=c.length;E<S;E++)if(M[c[E]]>0){if(!s||f!=="Image"&&f!=="Text"||s.includes(k)){const I=(c[E]-3)/4,A=r-I%a,G=r-(I/a|0),P=o(k,w,A*A+G*G);if(P)return P}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(An);let p,_,v,y,x;for(p=m.length-1;p>=0;--p){const k=m[p].toString();for(v=this.executorsByZIndex_[k],_=Yh.length-1;_>=0;--_)if(f=Yh[_],y=v[f],y!==void 0&&(x=y.executeHitDetection(u,l,n,g,d),x))return x}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],r=e[1],o=e[2],s=e[3],a=[n,r,n,s,o,s,o,r];return Ji(a,0,8,2,t,a),a}isEmpty(){return Fn(this.executorsByZIndex_)}execute(t,e,n,r,o,s,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(An),this.maxExtent_&&(t.save(),this.clip(t,n)),s=s||Yh;let h,u,d,c,f,g;for(a&&l.reverse(),h=0,u=l.length;h<u;++h){const m=l[h].toString();for(f=this.executorsByZIndex_[m],d=0,c=s.length;d<c;++d){const p=s[d];g=f[p],g!==void 0&&g.execute(t,e,n,r,o,a)}}this.maxExtent_&&t.restore()}}const Kh={};function my(i){if(Kh[i]!==void 0)return Kh[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let o=0;o<=i;++o)for(let s=0;s<=i;++s){const a=o*o+s*s;if(a>e)break;let l=n[a];l||(l=[],n[a]=l),l.push(((i+o)*t+(i+s))*4+3),o>0&&l.push(((i-o)*t+(i+s))*4+3),s>0&&(l.push(((i+o)*t+(i-s))*4+3),o>0&&l.push(((i-o)*t+(i-s))*4+3))}const r=[];for(let o=0,s=n.length;o<s;++o)n[o]&&r.push(...n[o]);return Kh[i]=r,r}const ba=gy;class py extends Mf{constructor(t,e,n,r,o,s,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=n,this.transform_=r,this.viewRotation_=o,this.squaredTolerance_=s,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=Ye()}drawImages_(t,e,n,r){if(!this.image_)return;const o=Ji(t,e,n,r,this.transform_,this.pixelCoordinates_),s=this.context_,a=this.tmpLocalTransform_,l=s.globalAlpha;this.imageOpacity_!=1&&(s.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;this.imageRotateWithView_&&(h+=this.viewRotation_);for(let u=0,d=o.length;u<d;u+=2){const c=o[u]-this.imageAnchorX_,f=o[u+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const g=c+this.imageAnchorX_,m=f+this.imageAnchorY_;Ei(a,g,m,1,1,h,-g,-m),s.setTransform.apply(s,a),s.translate(g,m),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.setTransform(1,0,0,1,0,0)}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,f,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(s.globalAlpha=l)}drawText_(t,e,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 o=Ji(t,e,n,r,this.transform_,this.pixelCoordinates_),s=this.context_;let a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<n;e+=r){const l=o[e]+this.textOffsetX_,h=o[e+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(s.translate(l-this.textOffsetX_,h-this.textOffsetY_),s.rotate(a),s.translate(this.textOffsetX_,this.textOffsetY_),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&s.strokeText(this.text_,l,h),this.textFillState_&&s.fillText(this.text_,l,h))}}moveToLineTo_(t,e,n,r,o){const s=this.context_,a=Ji(t,e,n,r,this.transform_,this.pixelCoordinates_);s.moveTo(a[0],a[1]);let l=a.length;o&&(l-=2);for(let h=2;h<l;h+=2)s.lineTo(a[h],a[h+1]);return o&&s.closePath(),n}drawRings_(t,e,n,r){for(let o=0,s=n.length;o<s;++o)e=this.moveToLineTo_(t,e,n[o],r,!0);return e}drawCircle(t){if(!!Kt(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Iv(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],r=e[3]-e[1],o=Math.sqrt(n*n+r*r),s=this.context_;s.beginPath(),s.arc(e[0],e[1],o,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break}}drawFeature(t,e){const n=e.getGeometryFunction()(t);!n||!Kt(this.extent_,n.getExtent())||(this.setStyle(e),this.drawGeometry(n))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let n=0,r=e.length;n<r;++n)this.drawGeometry(e[n])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Kt(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(this.text_!==""){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(!!Kt(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const n=this.context_,r=t.getFlatCoordinates();let o=0;const s=t.getEnds(),a=t.getStride();n.beginPath();for(let l=0,h=s.length;l<h;++l)o=this.moveToLineTo_(r,o,s[l],a,!1);n.stroke()}if(this.text_!==""){const n=t.getFlatMidpoints();this.drawText_(n,0,n.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Kt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Kt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getOrientedFlatCoordinates();let r=0;const o=t.getEndss(),s=t.getStride();e.beginPath();for(let a=0,l=o.length;a<l;++a){const h=o[a];r=this.drawRings_(n,r,h,s)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),Vi(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,n=this.contextTextState_,r=t.textAlign?t.textAlign:So;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=r&&(n.textAlign=r,e.textAlign=r),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=r,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:r,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const n=t.getColor();this.fillState_={fillStyle:di(n||Mi)}}if(!e)this.strokeState_=null;else{const n=e.getColor(),r=e.getLineCap(),o=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),h=e.getMiterLimit(),u=o||wo;this.strokeState_={lineCap:r!==void 0?r:Ks,lineDash:this.pixelRatio_===1?u:u.map(d=>d*this.pixelRatio_),lineDashOffset:(s||Eo)*this.pixelRatio_,lineJoin:a!==void 0?a:Sr,lineWidth:(l!==void 0?l:To)*this.pixelRatio_,miterLimit:h!==void 0?h:Mo,strokeStyle:di(n||Co)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),r=t.getAnchor(),o=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=r[0]*n,this.imageAnchorY_=r[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=o[0],this.imageOriginY_=o[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const s=t.getScaleArray();this.imageScale_=[s[0]*this.pixelRatio_/n,s[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const f=e.getColor();this.textFillState_={fillStyle:di(f||Mi)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const f=n.getColor(),g=n.getLineCap(),m=n.getLineDash(),p=n.getLineDashOffset(),_=n.getLineJoin(),v=n.getWidth(),y=n.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:Ks,lineDash:m||wo,lineDashOffset:p||Eo,lineJoin:_!==void 0?_:Sr,lineWidth:v!==void 0?v:To,miterLimit:y!==void 0?y:Mo,strokeStyle:di(f||Co)}}const r=t.getFont(),o=t.getOffsetX(),s=t.getOffsetY(),a=t.getRotateWithView(),l=t.getRotation(),h=t.getScaleArray(),u=t.getText(),d=t.getTextAlign(),c=t.getTextBaseline();this.textState_={font:r!==void 0?r:wc,textAlign:d!==void 0?d:So,textBaseline:c!==void 0?c:Zs},this.text_=u!==void 0?Array.isArray(u)?u.reduce((f,g,m)=>f+=m%2?" ":g,""):u:"",this.textOffsetX_=o!==void 0?this.pixelRatio_*o:0,this.textOffsetY_=s!==void 0?this.pixelRatio_*s:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}}}const vy=py,je=.5;function Rf(i,t,e,n,r,o,s){const a=i[0]*je,l=i[1]*je,h=Pe(a,l);h.imageSmoothingEnabled=!1;const u=h.canvas,d=new vy(h,je,r,null,s),c=e.length,f=Math.floor((256*256*256-1)/c),g={};for(let p=1;p<=c;++p){const _=e[p-1],v=_.getStyleFunction()||n;if(!n)continue;let y=v(_,o);if(!y)continue;Array.isArray(y)||(y=[y]);const x=p*f,k="#"+("000000"+x.toString(16)).slice(-6);for(let w=0,M=y.length;w<M;++w){const E=y[w],S=E.getGeometryFunction()(_);if(!S||!Kt(r,S.getExtent()))continue;const I=E.clone(),A=I.getFill();A&&A.setColor(k);const G=I.getStroke();G&&(G.setColor(k),G.setLineDash(null)),I.setText(void 0);const P=E.getImage();if(P&&P.getOpacity()!==0){const U=P.getImageSize();if(!U)continue;const O=Pe(U[0],U[1],void 0,{alpha:!1}),W=O.canvas;O.fillStyle=k,O.fillRect(0,0,W.width,W.height),I.setImage(new fa({img:W,imgSize:U,anchor:P.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:P.getOrigin(),opacity:1,size:P.getSize(),scale:P.getScale(),rotation:P.getRotation(),rotateWithView:P.getRotateWithView()}))}const at=I.getZIndex()||0;let j=g[at];j||(j={},g[at]=j,j.Polygon=[],j.Circle=[],j.LineString=[],j.Point=[]),j[S.getType().replace("Multi","")].push(S,I)}}const m=Object.keys(g).map(Number).sort(An);for(let p=0,_=m.length;p<_;++p){const v=g[m[p]];for(const y in v){const x=v[y];for(let k=0,w=x.length;k<w;k+=2){d.setStyle(x[k+1]);for(let M=0,E=t.length;M<E;++M)d.setTransform(t[M]),d.drawGeometry(x[k])}}}return h.getImageData(0,0,u.width,u.height)}function Pf(i,t,e){const n=[];if(e){const r=Math.floor(Math.round(i[0])*je),o=Math.floor(Math.round(i[1])*je),s=(Wt(r,0,e.width-1)+Wt(o,0,e.height-1)*e.width)*4,a=e.data[s],l=e.data[s+1],u=e.data[s+2]+256*(l+256*a),d=Math.floor((256*256*256-1)/t.length);u&&u%d===0&&n.push(t[u/d-1])}return n}const _y=.5,Af={Point:Cy,LineString:wy,Polygon:Ty,MultiPoint:Sy,MultiLineString:Ey,MultiPolygon:My,GeometryCollection:ky,Circle:xy};function yy(i,t){return parseInt(K(i),10)-parseInt(K(t),10)}function Df(i,t){const e=Zh(i,t);return e*e}function Zh(i,t){return _y*i/t}function xy(i,t,e,n,r){const o=e.getFill(),s=e.getStroke();if(o||s){const l=i.getBuilder(e.getZIndex(),"Circle");l.setFillStrokeStyle(o,s),l.drawCircle(t,n)}const a=e.getText();if(a&&a.getText()){const l=(r||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function ka(i,t,e,n,r,o,s){let a=!1;const l=e.getImage();if(l){const h=l.getImageState();h==Qt.LOADED||h==Qt.ERROR?l.unlistenImageChange(r):(h==Qt.IDLE&&l.load(),l.listenImageChange(r),a=!0)}return by(i,t,e,n,o,s),a}function by(i,t,e,n,r,o){const s=e.getGeometryFunction()(t);if(!s)return;const a=s.simplifyTransformed(n,r);if(e.getRenderer())Lf(i,a,e,t);else{const h=Af[a.getType()];h(i,a,e,t,o)}}function Lf(i,t,e,n){if(t.getType()=="GeometryCollection"){const o=t.getGeometries();for(let s=0,a=o.length;s<a;++s)Lf(i,o[s],e,n);return}i.getBuilder(e.getZIndex(),"Default").drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function ky(i,t,e,n,r){const o=t.getGeometriesArray();let s,a;for(s=0,a=o.length;s<a;++s){const l=Af[o[s].getType()];l(i,o[s],e,n,r)}}function wy(i,t,e,n,r){const o=e.getStroke();if(o){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,o),a.drawLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(r||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function Ey(i,t,e,n,r){const o=e.getStroke();if(o){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,o),a.drawMultiLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(r||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function My(i,t,e,n,r){const o=e.getFill(),s=e.getStroke();if(s||o){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(o,s),l.drawMultiPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(r||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function Cy(i,t,e,n,r){const o=e.getImage(),s=e.getText();let a;if(o){if(o.getImageState()!=Qt.LOADED)return;let l=i;if(r){const u=o.getDeclutterMode();if(u!=="none")if(l=r,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(o,a),d.drawPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(o,a),h.drawPoint(t,n)}if(s&&s.getText()){let l=i;r&&(l=r);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function Sy(i,t,e,n,r){const o=e.getImage(),s=e.getText();let a;if(o){if(o.getImageState()!=Qt.LOADED)return;let l=i;if(r){const u=o.getDeclutterMode();if(u!=="none")if(l=r,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(o,a),d.drawMultiPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(o,a),h.drawMultiPoint(t,n)}if(s&&s.getText()){let l=i;r&&(l=r);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function Ty(i,t,e,n,r){const o=e.getFill(),s=e.getStroke();if(o||s){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(o,s),l.drawPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(r||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}class zy extends Tf{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=Ge(),this.wrappedRenderedExtent_=Ge(),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(t,e,n){const r=e.extent,o=e.viewState,s=o.center,a=o.resolution,l=o.projection,h=o.rotation,u=l.getExtent(),d=this.getLayer().getSource(),c=e.pixelRatio,f=e.viewHints,g=!(f[Yt.ANIMATING]||f[Yt.INTERACTING]),m=this.compositionContext_,p=Math.round(e.size[0]*c),_=Math.round(e.size[1]*c),v=d.getWrapX()&&l.canWrapX(),y=v?Nt(u):null,x=v?Math.ceil((r[2]-u[2])/y)+1:1;let k=v?Math.floor((r[0]-u[0])/y):0;do{const w=this.getRenderTransform(s,a,h,c,p,_,k*y);t.execute(m,1,w,h,g,void 0,n)}while(++k<x)}setupCompositionContext_(){if(this.opacity_!==1){const t=Pe(this.context.canvas.width,this.context.canvas.height,Sf);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(this.opacity_!==1){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,kl(this.compositionContext_),Sf.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const n=t.pixelRatio,r=t.layerStatesArray[t.layerIndex];q0(this.pixelTransform,1/n,1/n),Wl(this.inversePixelTransform,this.pixelTransform);const o=_c(this.pixelTransform);this.useContainer(e,o,this.getBackground(t));const s=this.context,a=s.canvas,l=this.replayGroup_,h=this.declutterExecutorGroup;if((!l||l.isEmpty())&&(!h||h.isEmpty()))return null;const u=Math.round(t.size[0]*n),d=Math.round(t.size[1]*n);a.width!=u||a.height!=d?(a.width=u,a.height=d,a.style.transform!==o&&(a.style.transform=o)):this.containerReused||s.clearRect(0,0,u,d),this.preRender(s,t);const c=t.viewState;c.projection,this.opacity_=r.opacity,this.setupCompositionContext_();let f=!1,g=!0;if(r.extent&&this.clipping){const m=Zi(r.extent);g=Kt(m,t.extent),f=g&&!Bn(m,t.extent),f&&this.clipUnrotated(this.compositionContext_,t,m)}return g&&this.renderWorlds(l,t),f&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(s,t),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=[this.context.canvas.width,this.context.canvas.height];Jt(this.pixelTransform,n);const r=this.renderedCenter_,o=this.renderedResolution_,s=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),u=[],d=n[0]*je,c=n[1]*je;u.push(this.getRenderTransform(r,o,s,je,d,c,0).slice());const f=h.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!Bn(g,l)){let m=l[0];const p=Nt(g);let _=0,v;for(;m<g[0];)--_,v=p*_,u.push(this.getRenderTransform(r,o,s,je,d,c,v).slice()),m+=p;for(_=0,m=l[2];m>g[2];)++_,v=p*_,u.push(this.getRenderTransform(r,o,s,je,d,c,v).slice()),m-=p}this.hitDetectionImageData_=Rf(n,u,this.renderedFeatures_,h.getStyleFunction(),l,o,s)}e(Pf(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))}forEachFeatureAtCoordinate(t,e,n,r,o){if(!this.replayGroup_)return;const s=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),h={},u=function(f,g,m){const p=K(f),_=h[p];if(_){if(_!==!0&&m<_.distanceSq){if(m===0)return h[p]=!0,o.splice(o.lastIndexOf(_),1),r(f,l,g);_.geometry=g,_.distanceSq=m}}else{if(m===0)return h[p]=!0,r(f,l,g);o.push(h[p]={feature:f,layer:l,geometry:g,distanceSq:m,callback:r})}};let d;const c=[this.replayGroup_];return this.declutterExecutorGroup&&c.push(this.declutterExecutorGroup),c.some(f=>d=f.forEachFeatureAtCoordinate(t,s,a,n,u,f===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map(g=>g.value):null)),d}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const r=t.viewHints[Yt.ANIMATING],o=t.viewHints[Yt.INTERACTING],s=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!s&&r||!a&&o)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,h=t.viewState,u=h.projection,d=h.resolution,c=t.pixelRatio,f=e.getRevision(),g=e.getRenderBuffer();let m=e.getRenderOrder();m===void 0&&(m=yy);const p=h.center.slice(),_=ui(l,g*d),v=_.slice(),y=[_.slice()],x=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!Bn(x,t.extent)){const j=Nt(x),U=Math.max(Nt(_)/2,j);_[0]=x[0]-U,_[2]=x[2]+U,Nl(p,u);const O=rc(y[0],u);O[0]<x[0]&&O[2]<x[2]?y.push([O[0]+j,O[1],O[2]+j,O[3]]):O[0]>x[0]&&O[2]>x[2]&&y.push([O[0]-j,O[1],O[2]-j,O[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==f&&this.renderedRenderOrder_==m&&Bn(this.wrappedRenderedExtent_,_))return Vi(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const k=new xa(Zh(d,c),_,d,c);let w;this.getLayer().getDeclutter()&&(w=new xa(Zh(d,c),_,d,c));let M;for(let j=0,U=y.length;j<U;++j)n.loadFeatures(y[j],d,u);const E=Df(d,c);let S=!0;const I=function(j){let U;const O=j.getStyleFunction()||e.getStyleFunction();if(O&&(U=O(j,d)),U){const W=this.renderFeature(j,E,U,k,M,w);S=S&&!W}}.bind(this),A=ql(_),G=n.getFeaturesInExtent(A);m&&G.sort(m);for(let j=0,U=G.length;j<U;++j)I(G[j]);this.renderedFeatures_=G,this.ready=S;const P=k.finish(),at=new ba(_,d,c,n.getOverlaps(),P,e.getRenderBuffer());return w&&(this.declutterExecutorGroup=new ba(_,d,c,n.getOverlaps(),w.finish(),e.getRenderBuffer())),this.renderedResolution_=d,this.renderedRevision_=f,this.renderedRenderOrder_=m,this.renderedExtent_=v,this.wrappedRenderedExtent_=_,this.renderedCenter_=p,this.renderedProjection_=u,this.replayGroup_=at,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,n,r,o,s){if(!n)return!1;let a=!1;if(Array.isArray(n))for(let l=0,h=n.length;l<h;++l)a=ka(r,t,n[l],e,this.boundHandleStyleImageChange_,o,s)||a;else a=ka(r,t,n,e,this.boundHandleStyleImageChange_,o,s);return a}}const Iy=zy;class Ry extends wf{constructor(t){super(t)}createRenderer(){return new Iy(this)}}const Qn=Ry;class Py{constructor(t){this.rbush_=new yf(t),this.items_={}}insert(t,e){const n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[K(e)]=n}load(t,e){const n=new Array(e.length);for(let r=0,o=e.length;r<o;r++){const s=t[r],a=e[r],l={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};n[r]=l,this.items_[K(a)]=l}this.rbush_.load(n)}remove(t){const e=K(t),n=this.items_[e];return delete this.items_[e],this.rbush_.remove(n)!==null}update(t,e){const n=this.items_[K(e)],r=[n.minX,n.minY,n.maxX,n.maxY];Mr(r,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(e){return e.value})}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(r){return r.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let n;for(let r=0,o=t.length;r<o;r++)if(n=e(t[r]),n)return n;return n}isEmpty(){return Fn(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return ti(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}const wa=Py;class Ay extends hi{constructor(t){super(),this.projection=Gt(t.projection),this.attributions_=Ff(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(n,r){e.viewResolver=n,e.viewRejector=r})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(){return et()}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Ff(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Ff(i){return i?Array.isArray(i)?function(t){return i}:typeof i=="function"?i:function(t){return[i]}:null}const Of=Ay,we={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Dy(i,t){return[[-1/0,-1/0,1/0,1/0]]}let Ly=!1;function Nf(i,t,e,n,r,o,s){const a=new XMLHttpRequest;a.open("GET",typeof i=="function"?i(e,n,r):i,!0),t.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=Ly,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const h=t.getType();let u;h=="json"||h=="text"?u=a.responseText:h=="xml"?(u=a.responseXML,u||(u=new DOMParser().parseFromString(a.responseText,"application/xml"))):h=="arraybuffer"&&(u=a.response),u?o(t.readFeatures(u,{extent:e,featureProjection:r}),t.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function Gf(i,t){return function(e,n,r,o,s){const a=this;Nf(i,t,e,n,r,function(l,h){a.addFeatures(l),o!==void 0&&o(l)},s||Ln)}}class ln extends Qe{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Fy extends Of{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Ln,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(ft(this.format_,7),this.loader_=Gf(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Dy;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new wa:null,this.loadedExtentsRtree_=new wa,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,r;Array.isArray(t.features)?r=t.features:t.features&&(n=t.features,r=n.getArray()),!e&&n===void 0&&(n=new We(r)),r!==void 0&&this.addFeaturesInternal(r),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=K(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const r=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new ln(we.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[gt(e,tt.CHANGE,this.handleFeatureChange_,this),gt(e,_r.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(t,e){let n=!0;const r=e.getId();return r!==void 0&&(r.toString()in this.idIndex_?n=!1:this.idIndex_[r.toString()]=e),n&&(ft(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],r=[];for(let o=0,s=t.length;o<s;o++){const a=t[o],l=K(a);this.addToIndex_(l,a)&&n.push(a)}for(let o=0,s=n.length;o<s;o++){const a=n[o],l=K(a);this.setupChangeEvents_(l,a);const h=a.getGeometry();if(h){const u=h.getExtent();e.push(u),r.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(e,r),this.hasListener(we.ADDFEATURE))for(let o=0,s=n.length;o<s;o++)this.dispatchEvent(new ln(we.ADDFEATURE,n[o]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(we.ADDFEATURE,function(n){e||(e=!0,t.push(n.feature),e=!1)}),this.addEventListener(we.REMOVEFEATURE,function(n){e||(e=!0,t.remove(n.feature),e=!1)}),t.addEventListener(re.ADD,function(n){e||(e=!0,this.addFeature(n.element),e=!1)}.bind(this)),t.addEventListener(re.REMOVE,function(n){e||(e=!0,this.removeFeature(n.element),e=!1)}.bind(this)),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(Ot);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=function(r){this.removeFeatureInternal(r)}.bind(this);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 e=new ln(we.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(r){if(r.getGeometry().intersectsCoordinate(t))return e(r)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(n){if(n.getGeometry().intersectsExtent(t)){const o=e(n);if(o)return o}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),Fn(this.nullGeometryFeatures_)||li(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const r=I0(t,e);return[].concat(...r.map(o=>this.featuresRtree_.getInExtent(o)))}else return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],r=t[1];let o=null;const s=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||Dn,this.featuresRtree_.forEachInExtent(l,function(h){if(e(h)){const u=h.getGeometry(),d=a;if(a=u.closestPointXY(n,r,s,a),a<d){o=h;const c=Math.sqrt(a);l[0]=n-c,l[1]=r-c,l[2]=n+c,l[3]=r+c}}}),o}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return e!==void 0?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return e!==void 0?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,n=K(e),r=e.getGeometry();if(!r)n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);else{const s=r.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(s,e)):this.featuresRtree_&&this.featuresRtree_.update(s,e)}const o=e.getId();if(o!==void 0){const s=o.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new ln(we.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return e!==void 0?e in this.idIndex_:K(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&Fn(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,n){const r=this.loadedExtentsRtree_,o=this.strategy_(t,e,n);for(let s=0,a=o.length;s<a;++s){const l=o[s];r.forEachInExtent(l,function(u){return Bn(u.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADSTART)),this.loader_.call(this,l,e,n,function(u){--this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADEND,void 0,u))}.bind(this),function(){--this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADERROR))}.bind(this)),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(t){const e=this.loadedExtentsRtree_;let n;e.forEachInExtent(t,function(r){if(Mr(r.extent,t))return n=r,!0}),n&&e.remove(n)}removeFeature(t){if(!t)return;const e=K(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=K(t),n=this.featureChangeKeys_[e];if(!n)return;n.forEach(Ot),delete this.featureChangeKeys_[e];const r=t.getId();return r!==void 0&&delete this.idIndex_[r.toString()],delete this.uidIndex_[e],this.dispatchEvent(new ln(we.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){ft(this.format_,7),this.url_=t,this.setLoader(Gf(t,this.format_))}}const hn=Fy;class Oy extends Is{constructor(t,e,n){super(),n=n||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=n.transition===void 0?250:n.transition,this.transitionStarts_={},this.interpolate=!!n.interpolate}changed(){this.dispatchEvent(tt.CHANGE)}release(){this.state===N.ERROR&&this.setState(N.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(t.getState()==N.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){if(!this.interimTile)return;let t=this.interimTile,e=this;do{if(t.getState()==N.LOADED){t.interimTile=null;break}else t.getState()==N.LOADING?e=t:t.getState()==N.IDLE?e.interimTile=t.interimTile:e=t;t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==N.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){et()}getAlpha(t,e){if(!this.transition_)return 1;let n=this.transitionStarts_[t];if(!n)n=e,this.transitionStarts_[t]=n;else if(n===-1)return 1;const r=e-n+1e3/60;return r>=this.transition_?1:Ic(r/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const Ea=Oy;class Ny extends Ea{constructor(t,e,n,r,o,s){super(t,e,s),this.crossOrigin_=r,this.src_=n,this.key=n,this.image_=new Image,r!==null&&(this.image_.crossOrigin=r),this.unlisten_=null,this.tileLoadFunction_=o}getImage(){return this.image_}setImage(t){this.image_=t,this.state=N.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=N.ERROR,this.unlistenImage_(),this.image_=Gy(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=N.LOADED:this.state=N.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==N.ERROR&&(this.state=N.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==N.IDLE&&(this.state=N.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=hf(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Gy(){const i=Pe(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}const jf=Ny;class jy{constructor(t){this.highWaterMark=t!==void 0?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const n=this.entries_[t];return ft(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(t){const e=this.entries_[t];return ft(e!==void 0,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t}getValues(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){if(!!this.containsKey(t))return this.entries_[t].value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){ft(!(t in this.entries_),16);const n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_}setSize(t){this.highWaterMark=t}}const By=jy;function Bf(i,t,e,n){return n!==void 0?(n[0]=i,n[1]=t,n[2]=e,n):[i,t,e]}function Nr(i,t,e){return i+"/"+t+"/"+e}function Uf(i){return Nr(i[0],i[1],i[2])}function Uy(i){const[t,e,n]=i.substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number);return Nr(t,e,n)}function Vf(i){return i.split("/").map(Number)}function Vy(i){return(i[1]<<i[0])+i[2]}function qy(i,t){const e=i[0],n=i[1],r=i[2];if(t.getMinZoom()>e||e>t.getMaxZoom())return!1;const o=t.getFullTileRange(e);return o?o.containsXY(n,r):!0}class Xy extends By{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const t=this.peekFirstKey(),n=Vf(t)[0];this.forEach(function(r){r.tileCoord[0]!==n&&(this.remove(Uf(r.tileCoord)),r.release())}.bind(this))}}const Hh=Xy;class qf{constructor(t,e,n,r){this.minX=t,this.maxX=e,this.minY=n,this.maxY=r}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function Gr(i,t,e,n,r){return r!==void 0?(r.minX=i,r.maxX=t,r.minY=e,r.maxY=n,r):new qf(i,t,e,n)}const Xf=qf,$f=[];class $y extends Ea{constructor(t,e,n,r){super(t,e,{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(t){const e=K(t);return e in this.context_||(this.context_[e]=Pe(1,1,$f)),this.context_[e]}hasContext(t){return K(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=K(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];kl(e),$f.push(e.canvas),delete this.context_[t]}super.release()}}const Wy=$y;class Yy extends Ea{constructor(t,e,n,r,o,s){super(t,e,s),this.extent=null,this.format_=r,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=o,this.url_=n,this.key=n}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==N.IDLE&&(this.setState(N.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(N.ERROR)}setFeatures(t){this.features_=t,this.setState(N.LOADED)}setLoader(t){this.loader_=t}}const Ky=Yy,Ma={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class Ca extends Qe{constructor(t,e){super(t),this.feature=e}}class Zy extends nn{constructor(t){const e=t;e.stopDown||(e.stopDown=yr),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=Jy(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:Dn,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let n=t.geometryFunction;if(!n){const r=this.mode_;if(r==="Circle")n=function(o,s,a){const l=s||new j_([NaN,NaN]),h=Vt(o[0]),u=wi(h,Vt(o[o.length-1]));return l.setCenterAndRadius(h,Math.sqrt(u),this.geometryLayout_),l};else{let o;r==="Point"?o=ni:r==="LineString"?o=Kn:r==="Polygon"&&(o=Wn),n=function(s,a,l){return a?r==="Polygon"?s[0].length?a.setCoordinates([s[0].concat([s[0][0]])],this.geometryLayout_):a.setCoordinates([],this.geometryLayout_):a.setCoordinates(s,this.geometryLayout_):a=new o(s,this.geometryLayout_),a}}}this.geometryFunction_=n,this.dragVertexDelay_=t.dragVertexDelay!==void 0?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new Qn({source:new hn({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:Hy(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:wh,this.freehandCondition_,t.freehand?this.freehandCondition_=kh:this.freehandCondition_=t.freehandCondition?t.freehandCondition:Zc,this.addChangeListener(_h.ACTIVE,this.updateState_)}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===tt.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(t);let e=t.type===Et.POINTERMOVE,n=!0;return!this.freehand_&&this.lastDragTime_&&t.type===Et.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===Et.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),n=!1):this.freehand_&&t.type===Et.POINTERDOWN?n=!1:e&&this.getPointerCount()<2?(n=t.type===Et.POINTERMOVE,n&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===Et.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===Et.DBLCLICK&&(n=!1),super.handleEvent(t)&&n}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new Si(Et.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}handleUpEvent(t){let e=!0;if(this.getPointerCount()===0)if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){const n=!this.finishCoordinate_;n&&this.startDrawing_(t.coordinate),!n&&this.freehand_?this.finishDrawing():!this.freehand_&&(!n||this.mode_==="Point")&&(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.preventDefault(),e}handlePointerMove_(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){const e=this.downPx_,n=t.pixel,r=e[0]-n[0],o=e[1]-n[1],s=r*r+o*o;if(this.shouldHandle_=this.freehand_?s>this.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t){let e=!1;if(this.sketchFeature_){let n=!1,r=[this.finishCoordinate_];const o=this.mode_;if(o==="Point")e=!0;else if(o==="Circle")e=this.sketchCoords_.length===2;else if(o==="LineString")n=this.sketchCoords_.length>this.minPoints_;else if(o==="Polygon"){const s=this.sketchCoords_;n=s[0].length>this.minPoints_,r=[s[0][0],s[0][s[0].length-2]]}if(n){const s=this.getMap();for(let a=0,l=r.length;a<l;a++){const h=r[a],u=s.getPixelFromCoordinate(h),d=t[0]-u[0],c=t[1]-u[1],f=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(d*d+c*c)<=f,e){this.finishCoordinate_=h;break}}}}return e}createOrUpdateSketchPoint_(t){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new Ti(new ni(t)),this.updateSketchFeatures_())}createOrUpdateCustomSketchLine_(t){this.sketchLine_||(this.sketchLine_=new Ti);const e=t.getLinearRing(0);let n=this.sketchLine_.getGeometry();n?(n.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),n.changed()):(n=new Kn(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(n))}startDrawing_(t){const e=this.getMap().getView().getProjection(),n=ta(this.geometryLayout_);for(;t.length<n;)t.push(0);this.finishCoordinate_=t,this.mode_==="Point"?this.sketchCoords_=t.slice():this.mode_==="Polygon"?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new Ti(new Kn(this.sketchLineCoords_)));const r=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new Ti,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(r),this.updateSketchFeatures_(),this.dispatchEvent(new Ca(Ma.DRAWSTART,this.sketchFeature_))}modifyDrawing_(t){const e=this.getMap(),n=this.sketchFeature_.getGeometry(),r=e.getView().getProjection(),o=ta(this.geometryLayout_);let s,a;for(;t.length<o;)t.push(0);this.mode_==="Point"?a=this.sketchCoords_:this.mode_==="Polygon"?(s=this.sketchCoords_[0],a=s[s.length-1],this.atFinish_(e.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):(s=this.sketchCoords_,a=s[s.length-1]),a[0]=t[0],a[1]=t[1],this.geometryFunction_(this.sketchCoords_,n,r),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(t),n.getType()==="Polygon"&&this.mode_!=="Polygon"?this.createOrUpdateCustomSketchLine_(n):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()}addToDrawing_(t){const e=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection();let r,o;const s=this.mode_;s==="LineString"||s==="Circle"?(this.finishCoordinate_=t.slice(),o=this.sketchCoords_,o.length>=this.maxPoints_&&(this.freehand_?o.pop():r=!0),o.push(t.slice()),this.geometryFunction_(o,e,n)):s==="Polygon"&&(o=this.sketchCoords_[0],o.length>=this.maxPoints_&&(this.freehand_?o.pop():r=!0),o.push(t.slice()),r&&(this.finishCoordinate_=o[0]),this.geometryFunction_(this.sketchCoords_,e,n)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),r&&this.finishDrawing()}removeLastPoint(){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),e=this.getMap().getView().getProjection();let n;const r=this.mode_;if(r==="LineString"||r==="Circle"){if(n=this.sketchCoords_,n.splice(-2,1),n.length>=2){this.finishCoordinate_=n[n.length-2].slice();const o=this.finishCoordinate_.slice();n[n.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(n,t,e),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(r==="Polygon"){n=this.sketchCoords_[0],n.splice(-2,1);const o=this.sketchLine_.getGeometry();if(n.length>=2){const s=n[n.length-2].slice();n[n.length-1]=s,this.createOrUpdateSketchPoint_(s)}o.setCoordinates(n),this.geometryFunction_(this.sketchCoords_,t,e)}n.length===1&&this.abortDrawing(),this.updateSketchFeatures_()}finishDrawing(){const t=this.abortDrawing_();if(!t)return;let e=this.sketchCoords_;const n=t.getGeometry(),r=this.getMap().getView().getProjection();this.mode_==="LineString"?(e.pop(),this.geometryFunction_(e,n,r)):this.mode_==="Polygon"&&(e[0].pop(),this.geometryFunction_(e,n,r),e=n.getCoordinates()),this.type_==="MultiPoint"?t.setGeometry(new Po([e])):this.type_==="MultiLineString"?t.setGeometry(new Th([e])):this.type_==="MultiPolygon"&&t.setGeometry(new Ih([e])),this.dispatchEvent(new Ca(Ma.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new Ca(Ma.DRAWABORT,t))}appendCoordinates(t){const e=this.mode_,n=!this.sketchFeature_;n&&this.startDrawing_(t[0]);let r;if(e==="LineString"||e==="Circle")r=this.sketchCoords_;else if(e==="Polygon")r=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;n&&r.shift(),r.pop();for(let s=0;s<t.length;s++)this.addToDrawing_(t[s]);const o=t[t.length-1];this.addToDrawing_(o),this.modifyDrawing_(o)}extend(t){const n=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=n.getCoordinates();const r=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=r.slice(),this.sketchCoords_.push(r.slice()),this.sketchPoint_=new Ti(new ni(r)),this.updateSketchFeatures_(),this.dispatchEvent(new Ca(Ma.DRAWSTART,this.sketchFeature_))}updateSketchFeatures_(){const t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);const e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)}updateState_(){const t=this.getMap(),e=this.getActive();(!t||!e)&&this.abortDrawing(),this.overlay_.setMap(e?t:null)}}function Hy(){const i=uf();return function(t,e){return i[t.getGeometry().getType()]}}function Jy(i){switch(i){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+i)}}const Qy=Zy,Wf=0,Vo=1,Yf=[0,0,0,0],jr=[],Jh={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class Qh extends Qe{constructor(t,e,n){super(t),this.features=e,this.mapBrowserEvent=n}}class tx extends nn{constructor(t){super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:Jc,this.defaultDeleteCondition_=function(n){return a_(n)&&u_(n)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:kh,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new wa,this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new Qn({source:new hn({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:ix(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null;let e;if(t.features?e=t.features:t.source&&(this.source_=t.source,e=new We(this.source_.getFeatures()),this.source_.addEventListener(we.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(we.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!e)throw new Error("The modify interaction requires features, a source or a layer");t.hitDetection&&(this.hitDetection_=t.hitDetection),this.features_=e,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(re.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(re.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=t.snapToPointer===void 0?!this.hitDetection_:t.snapToPointer}addFeature_(t){const e=t.getGeometry();if(e){const r=this.SEGMENT_WRITERS_[e.getType()];r&&r(t,e)}const n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),t.addEventListener(tt.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new We;const n=this.featuresBeingModified_.getArray();for(let r=0,o=e.length;r<o;++r){const s=e[r];for(let a=0,l=s.length;a<l;++a){const h=s[a].feature;h&&!n.includes(h)&&this.featuresBeingModified_.push(h)}}this.featuresBeingModified_.getLength()===0?this.featuresBeingModified_=null:this.dispatchEvent(new Qh(Jh.MODIFYSTART,this.featuresBeingModified_,t))}}removeFeature_(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&this.features_.getLength()===0&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(tt.CHANGE,this.boundHandleFeatureChange_)}removeFeatureSegmentData_(t){const e=this.rBush_,n=[];e.forEach(function(r){t===r.feature&&n.push(r)});for(let r=n.length-1;r>=0;--r){const o=n[r];for(let s=this.dragSegments_.length-1;s>=0;--s)this.dragSegments_[s][0]===o&&this.dragSegments_.splice(s,1);e.remove(o)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const n=e.getCoordinates(),r={feature:t,geometry:e,segment:[n,n]};this.rBush_.insert(e.getExtent(),r)}writeMultiPointGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r],a={feature:t,geometry:e,depth:[r],index:r,segment:[s,s]};this.rBush_.insert(e.getExtent(),a)}}writeLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length-1;r<o;++r){const s=n.slice(r,r+2),a={feature:t,geometry:e,index:r,segment:s};this.rBush_.insert(xe(s),a)}}writeMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[r],index:a,segment:h};this.rBush_.insert(xe(h),u)}}}writePolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[r],index:a,segment:h};this.rBush_.insert(xe(h),u)}}}writeMultiPolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length;a<l;++a){const h=s[a];for(let u=0,d=h.length-1;u<d;++u){const c=h.slice(u,u+2),f={feature:t,geometry:e,depth:[a,r],index:u,segment:c};this.rBush_.insert(xe(c),f)}}}}writeCircleGeometry_(t,e){const n=e.getCenter(),r={feature:t,geometry:e,index:Wf,segment:[n,n]},o={feature:t,geometry:e,index:Vo,segment:[n,n]},s=[r,o];r.featureSegments=s,o.featureSegments=s,this.rBush_.insert(yo(n),r);let a=e;this.rBush_.insert(a.getExtent(),o)}writeGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let r=0;r<n.length;++r){const o=n[r],s=this.SEGMENT_WRITERS_[o.getType()];s(t,o)}}createOrUpdateVertexFeature_(t,e,n){let r=this.vertexFeature_;return r?r.getGeometry().setCoordinates(t):(r=new Ti(new ni(t)),this.vertexFeature_=r,this.overlay_.getSource().addFeature(r)),r.set("features",e),r.set("geometries",n),r}handleEvent(t){if(!t.originalEvent)return!0;this.lastPointerEvent_=t;let e;return!t.map.getView().getInteracting()&&t.type==Et.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=Et.SINGLECLICK||!this.ignoreNextSingleClick_?e=this.removePoint():e=!0),t.type==Et.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),super.handleEvent(t)&&!e}handleDragEvent(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);const e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],n=[],r=[];for(let o=0,s=this.dragSegments_.length;o<s;++o){const a=this.dragSegments_[o],l=a[0],h=l.feature;n.includes(h)||n.push(h);const u=l.geometry;r.includes(u)||r.push(u);const d=l.depth;let c;const f=l.segment,g=a[1];for(;e.length<u.getStride();)e.push(f[g][e.length]);switch(u.getType()){case"Point":c=e,f[0]=e,f[1]=e;break;case"MultiPoint":c=u.getCoordinates(),c[l.index]=e,f[0]=e,f[1]=e;break;case"LineString":c=u.getCoordinates(),c[l.index+g]=e,f[g]=e;break;case"MultiLineString":c=u.getCoordinates(),c[d[0]][l.index+g]=e,f[g]=e;break;case"Polygon":c=u.getCoordinates(),c[d[0]][l.index+g]=e,f[g]=e;break;case"MultiPolygon":c=u.getCoordinates(),c[d[1]][d[0]][l.index+g]=e,f[g]=e;break;case"Circle":if(f[0]=e,f[1]=e,l.index===Wf)this.changingFeature_=!0,u.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,t.map.getView().getProjection();let m=oc(Vt(u.getCenter()),Vt(e));u.setRadius(m),this.changingFeature_=!1}break}c&&this.setGeometryCoordinates_(u,c)}this.createOrUpdateVertexFeature_(e,n,r)}handleDownEvent(t){if(!this.condition_(t))return!1;const e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;const n=this.vertexFeature_;if(n){t.map.getView().getProjection();const r=[],o=n.getGeometry().getCoordinates(),s=xe([o]),a=this.rBush_.getInExtent(s),l={};a.sort(ex);for(let h=0,u=a.length;h<u;++h){const d=a[h],c=d.segment;let f=K(d.geometry);const g=d.depth;if(g&&(f+="-"+g.join("-")),l[f]||(l[f]=new Array(2)),d.geometry.getType()==="Circle"&&d.index===Vo){const m=Zf(e,d);ei(m,o)&&!l[f][0]&&(this.dragSegments_.push([d,0]),l[f][0]=d);continue}if(ei(c[0],o)&&!l[f][0]){this.dragSegments_.push([d,0]),l[f][0]=d;continue}if(ei(c[1],o)&&!l[f][1]){if(l[f][0]&&l[f][0].index===0){let m=d.geometry.getCoordinates();switch(d.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":m=m[g[1]];case"Polygon":if(d.index!==m[g[0]].length-2)continue;break}}this.dragSegments_.push([d,1]),l[f][1]=d;continue}K(c)in this.vertexSegments_&&!l[f][0]&&!l[f][1]&&this.insertVertexCondition_(t)&&r.push(d)}r.length&&this.willModifyFeatures_(t,[r]);for(let h=r.length-1;h>=0;--h)this.insertVertex_(r[h],o)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const n=this.dragSegments_[e][0],r=n.geometry;if(r.getType()==="Circle"){const o=r.getCenter(),s=n.featureSegments[0],a=n.featureSegments[1];s.segment[0]=o,s.segment[1]=o,a.segment[0]=o,a.segment[1]=o,this.rBush_.update(yo(o),s);let l=r;this.rBush_.update(l.getExtent(),a)}else this.rBush_.update(xe(n.segment),n)}return this.featuresBeingModified_&&(this.dispatchEvent(new Qh(Jh.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,n){const r=n||e.getCoordinateFromPixel(t);e.getView().getProjection();const o=function(l,h){return Kf(r,l)-Kf(r,h)};let s,a;if(this.hitDetection_){const l=typeof this.hitDetection_=="object"?h=>h===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,(h,u,d)=>{if(d=d||h.getGeometry(),d.getType()==="Point"&&this.features_.getArray().includes(h)){a=d;const c=d.getFlatCoordinates().slice(0,2);s=[{feature:h,geometry:d,segment:[c,c]}]}return!0},{layerFilter:l})}if(!s){const l=Zi(yo(r,Yf)),h=e.getView().getResolution()*this.pixelTolerance_,u=ql(ui(l,h,Yf));s=this.rBush_.getInExtent(u)}if(s&&s.length>0){const l=s.sort(o)[0],h=l.segment;let u=Zf(r,l);const d=e.getPixelFromCoordinate(u);let c=oc(t,d);if(a||c<=this.pixelTolerance_){const f={};if(f[K(h)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-r[0],this.delta_[1]=u[1]-r[1]),l.geometry.getType()==="Circle"&&l.index===Vo)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);else{const g=e.getPixelFromCoordinate(h[0]),m=e.getPixelFromCoordinate(h[1]),p=wi(d,g),_=wi(d,m);c=Math.sqrt(Math.min(p,_)),this.snappedToVertex_=c<=this.pixelTolerance_,this.snappedToVertex_&&(u=p>_?h[1]:h[0]),this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);const v={};v[K(l.geometry)]=!0;for(let y=1,x=s.length;y<x;++y){const k=s[y].segment;if(ei(h[0],k[0])&&ei(h[1],k[1])||ei(h[0],k[1])&&ei(h[1],k[0])){const w=K(s[y].geometry);w in v||(v[w]=!0,f[K(k)]=!0)}else break}}this.vertexSegments_=f;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(t,e){const n=t.segment,r=t.feature,o=t.geometry,s=t.depth,a=t.index;let l;for(;e.length<o.getStride();)e.push(0);switch(o.getType()){case"MultiLineString":l=o.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"Polygon":l=o.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"MultiPolygon":l=o.getCoordinates(),l[s[1]][s[0]].splice(a+1,0,e);break;case"LineString":l=o.getCoordinates(),l.splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(o,l);const h=this.rBush_;h.remove(t),this.updateSegmentIndices_(o,a,s,1);const u={segment:[n[0],e],feature:r,geometry:o,depth:s,index:a};h.insert(xe(u.segment),u),this.dragSegments_.push([u,1]);const d={segment:[e,n[1]],feature:r,geometry:o,depth:s,index:a+1};h.insert(xe(d.segment),d),this.dragSegments_.push([d,0]),this.ignoreNextSingleClick_=!0}removePoint(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Et.POINTERDRAG){const t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);const e=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new Qh(Jh.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1}removeVertex_(){const t=this.dragSegments_,e={};let n=!1,r,o,s,a,l,h,u,d,c,f,g;for(l=t.length-1;l>=0;--l)s=t[l],f=s[0],g=K(f.feature),f.depth&&(g+="-"+f.depth.join("-")),g in e||(e[g]={}),s[1]===0?(e[g].right=f,e[g].index=f.index):s[1]==1&&(e[g].left=f,e[g].index=f.index+1);for(g in e){switch(c=e[g].right,u=e[g].left,h=e[g].index,d=h-1,u!==void 0?f=u:f=c,d<0&&(d=0),a=f.geometry,o=a.getCoordinates(),r=o,n=!1,a.getType()){case"MultiLineString":o[f.depth[0]].length>2&&(o[f.depth[0]].splice(h,1),n=!0);break;case"LineString":o.length>2&&(o.splice(h,1),n=!0);break;case"MultiPolygon":r=r[f.depth[1]];case"Polygon":r=r[f.depth[0]],r.length>4&&(h==r.length-1&&(h=0),r.splice(h,1),n=!0,h===0&&(r.pop(),r.push(r[0]),d=r.length-1));break}if(n){this.setGeometryCoordinates_(a,o);const m=[];if(u!==void 0&&(this.rBush_.remove(u),m.push(u.segment[0])),c!==void 0&&(this.rBush_.remove(c),m.push(c.segment[1])),u!==void 0&&c!==void 0){const p={depth:f.depth,feature:f.feature,geometry:f.geometry,index:d,segment:m};this.rBush_.insert(xe(p.segment),p)}this.updateSegmentIndices_(a,h,f.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return n}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,n,r){this.rBush_.forEachInExtent(t.getExtent(),function(o){o.geometry===t&&(n===void 0||o.depth===void 0||Vi(o.depth,n))&&o.index>e&&(o.index+=r)})}}function ex(i,t){return i.index-t.index}function Kf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"){let o=n;if(t.index===Vo){const s=wi(o.getCenter(),Vt(i)),a=Math.sqrt(s)-o.getRadius();return a*a}}const r=Vt(i);return jr[0]=Vt(t.segment[0]),jr[1]=Vt(t.segment[1]),D0(r,jr)}function Zf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"&&t.index===Vo)return Cr(n.getClosestPoint(Vt(i)));const r=Vt(i);return jr[0]=Vt(t.segment[0]),jr[1]=Vt(t.segment[1]),Cr(Fl(r,jr))}function ix(){const i=uf();return function(t,e){return i.Point}}const nx=tx;function Hf(i){if(i.feature)return i.feature;if(i.element)return i.element}const tu=[];class rx extends nn{constructor(t){t=t||{};const e=t;e.handleDownEvent||(e.handleDownEvent=Dn),e.stopDown||(e.stopDown=yr),super(e),this.source_=t.source?t.source:null,this.vertex_=t.vertex!==void 0?t.vertex:!0,this.edge_=t.edge!==void 0?t.edge:!0,this.features_=t.features?t.features:null,this.featuresListenerKeys_=[],this.featureChangeListenerKeys_={},this.indexedFeaturesExtents_={},this.pendingFeatures_={},this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.rBush_=new wa,this.GEOMETRY_SEGMENTERS_={Point:this.segmentPointGeometry_.bind(this),LineString:this.segmentLineStringGeometry_.bind(this),LinearRing:this.segmentLineStringGeometry_.bind(this),Polygon:this.segmentPolygonGeometry_.bind(this),MultiPoint:this.segmentMultiPointGeometry_.bind(this),MultiLineString:this.segmentMultiLineStringGeometry_.bind(this),MultiPolygon:this.segmentMultiPolygonGeometry_.bind(this),GeometryCollection:this.segmentGeometryCollectionGeometry_.bind(this),Circle:this.segmentCircleGeometry_.bind(this)}}addFeature(t,e){e=e!==void 0?e:!0;const n=K(t),r=t.getGeometry();if(r){const o=this.GEOMETRY_SEGMENTERS_[r.getType()];if(o){this.indexedFeaturesExtents_[n]=r.getExtent(Ge());const s=[];if(o(s,r),s.length===1)this.rBush_.insert(xe(s[0]),{feature:t,segment:s[0]});else if(s.length>1){const a=s.map(h=>xe(h)),l=s.map(h=>({feature:t,segment:h}));this.rBush_.load(a,l)}}}e&&(this.featureChangeListenerKeys_[n]=gt(t,tt.CHANGE,this.handleFeatureChange_,this))}forEachFeatureAdd_(t){this.addFeature(t)}forEachFeatureRemove_(t){this.removeFeature(t)}getFeatures_(){let t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t}handleEvent(t){const e=this.snapTo(t.pixel,t.coordinate,t.map);return e&&(t.coordinate=e.vertex.slice(0,2),t.pixel=e.vertexPixel),super.handleEvent(t)}handleFeatureAdd_(t){const e=Hf(t);this.addFeature(e)}handleFeatureRemove_(t){const e=Hf(t);this.removeFeature(e)}handleFeatureChange_(t){const e=t.target;if(this.handlingDownUpSequence){const n=K(e);n in this.pendingFeatures_||(this.pendingFeatures_[n]=e)}else this.updateFeature_(e)}handleUpEvent(t){const e=Object.values(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1}removeFeature(t,e){const n=e!==void 0?e:!0,r=K(t),o=this.indexedFeaturesExtents_[r];if(o){const s=this.rBush_,a=[];s.forEachInExtent(o,function(l){t===l.feature&&a.push(l)});for(let l=a.length-1;l>=0;--l)s.remove(a[l])}n&&(Ot(this.featureChangeListenerKeys_[r]),delete this.featureChangeListenerKeys_[r])}setMap(t){const e=this.getMap(),n=this.featuresListenerKeys_,r=this.getFeatures_();e&&(n.forEach(Ot),n.length=0,r.forEach(this.forEachFeatureRemove_.bind(this))),super.setMap(t),t&&(this.features_?n.push(gt(this.features_,re.ADD,this.handleFeatureAdd_,this),gt(this.features_,re.REMOVE,this.handleFeatureRemove_,this)):this.source_&&n.push(gt(this.source_,we.ADDFEATURE,this.handleFeatureAdd_,this),gt(this.source_,we.REMOVEFEATURE,this.handleFeatureRemove_,this)),r.forEach(this.forEachFeatureAdd_.bind(this)))}snapTo(t,e,n){const r=n.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),o=n.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),s=xe([r,o]),a=this.rBush_.getInExtent(s),l=a.length;if(l===0)return null;n.getView().getProjection();const h=Vt(e);let u,d=1/0;const c=this.pixelTolerance_*this.pixelTolerance_,f=()=>{if(u){const g=n.getPixelFromCoordinate(u);if(wi(t,g)<=c)return{vertex:u,vertexPixel:[Math.round(g[0]),Math.round(g[1])]}}return null};if(this.vertex_){for(let m=0;m<l;++m){const p=a[m];p.feature.getGeometry().getType()!=="Circle"&&p.segment.forEach(_=>{const v=Vt(_),y=wi(h,v);y<d&&(u=_,d=y)})}const g=f();if(g)return g}if(this.edge_){for(let m=0;m<l;++m){let p=null;const _=a[m];if(_.feature.getGeometry().getType()==="Circle"){let v=_.feature.getGeometry();p=Cr(P0(h,v))}else{const[v,y]=_.segment;y&&(tu[0]=Vt(v),tu[1]=Vt(y),p=Fl(h,tu))}if(p){const v=wi(h,p);v<d&&(u=p,d=v)}}const g=f();if(g)return g}return null}updateFeature_(t){this.removeFeature(t,!1),this.addFeature(t,!1)}segmentCircleGeometry_(t,e){this.getMap().getView().getProjection();const o=Xv(e).getCoordinates()[0];for(let s=0,a=o.length-1;s<a;++s)t.push(o.slice(s,s+2))}segmentGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let r=0;r<n.length;++r){const o=this.GEOMETRY_SEGMENTERS_[n[r].getType()];o&&o(t,n[r])}}segmentLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length-1;r<o;++r)t.push(n.slice(r,r+2))}segmentMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a)t.push(s.slice(a,a+2))}}segmentMultiPointGeometry_(t,e){e.getCoordinates().forEach(n=>{t.push([n])})}segmentMultiPolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length;a<l;++a){const h=s[a];for(let u=0,d=h.length-1;u<d;++u)t.push(h.slice(u,u+2))}}}segmentPointGeometry_(t,e){t.push([e.getCoordinates()])}segmentPolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a)t.push(s.slice(a,a+2))}}}const ox=rx,sx=.5,ax=10,Jf=.25;class lx{constructor(t,e,n,r,o,s){this.sourceProj_=t,this.targetProj_=e;let a={};const l=bo(this.targetProj_,this.sourceProj_);this.transformInv_=function(v){const y=v[0]+"/"+v[1];return a[y]||(a[y]=l(v)),a[y]},this.maxSourceExtent_=r,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&Nt(r)==Nt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Nt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Nt(this.targetProj_.getExtent()):null;const h=Ki(n),u=Us(n),d=Bs(n),c=js(n),f=this.transformInv_(h),g=this.transformInv_(u),m=this.transformInv_(d),p=this.transformInv_(c),_=ax+(s?Math.max(0,Math.ceil(Math.log2(Pl(n)/(s*s*256*256)))):0);if(this.addQuad_(h,u,d,c,f,g,m,p,_),this.wrapsXInSource_){let v=1/0;this.triangles_.forEach(function(y,x,k){v=Math.min(v,y.source[0][0],y.source[1][0],y.source[2][0])}),this.triangles_.forEach(function(y){if(Math.max(y.source[0][0],y.source[1][0],y.source[2][0])-v>this.sourceWorldWidth_/2){const x=[[y.source[0][0],y.source[0][1]],[y.source[1][0],y.source[1][1]],[y.source[2][0],y.source[2][1]]];x[0][0]-v>this.sourceWorldWidth_/2&&(x[0][0]-=this.sourceWorldWidth_),x[1][0]-v>this.sourceWorldWidth_/2&&(x[1][0]-=this.sourceWorldWidth_),x[2][0]-v>this.sourceWorldWidth_/2&&(x[2][0]-=this.sourceWorldWidth_);const k=Math.min(x[0][0],x[1][0],x[2][0]);Math.max(x[0][0],x[1][0],x[2][0])-k<this.sourceWorldWidth_/2&&(y.source=x)}}.bind(this))}a={}}addTriangle_(t,e,n,r,o,s){this.triangles_.push({source:[r,o,s],target:[t,e,n]})}addQuad_(t,e,n,r,o,s,a,l,h){const u=xe([o,s,a,l]),d=this.sourceWorldWidth_?Nt(u)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&d>.5&&d<1;let g=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const p=xe([t,e,n,r]);g=Nt(p)/this.targetWorldWidth_>Jf||g}!f&&this.sourceProj_.isGlobal()&&d&&(g=d>Jf||g)}if(!g&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!Kt(u,this.maxSourceExtent_))return;let m=0;if(!g&&(!isFinite(o[0])||!isFinite(o[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(h>0)g=!0;else if(m=(!isFinite(o[0])||!isFinite(o[1])?8:0)+(!isFinite(s[0])||!isFinite(s[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),m!=1&&m!=2&&m!=4&&m!=8)return}if(h>0){if(!g){const p=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(p);let v;f?v=($i(o[0],c)+$i(a[0],c))/2-$i(_[0],c):v=(o[0]+a[0])/2-_[0];const y=(o[1]+a[1])/2-_[1];g=v*v+y*y>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){const p=[(e[0]+n[0])/2,(e[1]+n[1])/2],_=this.transformInv_(p),v=[(r[0]+t[0])/2,(r[1]+t[1])/2],y=this.transformInv_(v);this.addQuad_(t,e,p,v,o,s,_,y,h-1),this.addQuad_(v,p,n,r,y,_,a,l,h-1)}else{const p=[(t[0]+e[0])/2,(t[1]+e[1])/2],_=this.transformInv_(p),v=[(n[0]+r[0])/2,(n[1]+r[1])/2],y=this.transformInv_(v);this.addQuad_(t,p,v,r,o,_,y,l,h-1),this.addQuad_(p,e,n,v,_,s,a,y,h-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}(m&11)==0&&this.addTriangle_(t,n,r,o,a,l),(m&14)==0&&this.addTriangle_(t,n,e,o,a,s),m&&((m&13)==0&&this.addTriangle_(e,r,t,s,l,o),(m&7)==0&&this.addTriangle_(e,r,n,s,l,a))}calculateSourceExtent(){const t=Ge();return this.triangles_.forEach(function(e,n,r){const o=e.source;xo(t,o[0]),xo(t,o[1]),xo(t,o[2])}),t}getTriangles(){return this.triangles_}}const hx=lx;let eu;const Qf=[];function tg(i,t,e,n,r){i.beginPath(),i.moveTo(0,0),i.lineTo(t,e),i.lineTo(n,r),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(t,n)+1,Math.max(e,r)),i.restore()}function iu(i,t){return Math.abs(i[t*4]-210)>2||Math.abs(i[t*4+3]-.75*255)>2}function ux(){if(eu===void 0){const i=document.createElement("canvas").getContext("2d");i.globalCompositeOperation="lighter",i.fillStyle="rgba(210, 0, 0, 0.75)",tg(i,4,5,4,0),tg(i,4,5,0,5);const t=i.getImageData(0,0,3,3).data;eu=iu(t,0)||iu(t,4)||iu(t,8)}return eu}function eg(i,t,e,n){const r=Xs(e,t,i);let o=qs(t,n,e);const s=t.getMetersPerUnit();s!==void 0&&(o*=s);const a=i.getMetersPerUnit();a!==void 0&&(o/=a);const l=i.getExtent();if(!l||Gs(l,r)){const h=qs(i,o,r)/o;isFinite(h)&&h>0&&(o/=h)}return o}function dx(i,t,e,n){const r=Yi(e);let o=eg(i,t,r,n);return(!isFinite(o)||o<=0)&&Rl(e,function(s){return o=eg(i,t,s,n),isFinite(o)&&o>0}),o}function cx(i,t,e,n,r,o,s,a,l,h,u,d){const c=Pe(Math.round(e*i),Math.round(e*t),Qf);if(d||(c.imageSmoothingEnabled=!1),l.length===0)return c.canvas;c.scale(e,e);function f(x){return Math.round(x*e)/e}c.globalCompositeOperation="lighter";const g=Ge();l.forEach(function(x,k,w){ic(g,x.extent)});const m=Nt(g),p=$e(g),_=Pe(Math.round(e*m/n),Math.round(e*p/n));d||(_.imageSmoothingEnabled=!1);const v=e/n;l.forEach(function(x,k,w){const M=x.extent[0]-g[0],E=-(x.extent[3]-g[3]),S=Nt(x.extent),I=$e(x.extent);x.image.width>0&&x.image.height>0&&_.drawImage(x.image,h,h,x.image.width-2*h,x.image.height-2*h,M*v,E*v,S*v,I*v)});const y=Ki(s);return a.getTriangles().forEach(function(x,k,w){const M=x.source,E=x.target;let S=M[0][0],I=M[0][1],A=M[1][0],G=M[1][1],P=M[2][0],at=M[2][1];const j=f((E[0][0]-y[0])/o),U=f(-(E[0][1]-y[1])/o),O=f((E[1][0]-y[0])/o),W=f(-(E[1][1]-y[1])/o),D=f((E[2][0]-y[0])/o),Z=f(-(E[2][1]-y[1])/o),V=S,z=I;S=0,I=0,A-=V,G-=z,P-=V,at-=z;const ot=[[A,G,0,0,O-j],[P,at,0,0,D-j],[0,0,A,G,W-U],[0,0,P,at,Z-U]],b=u0(ot);if(!!b){if(c.save(),c.beginPath(),ux()||!d){c.moveTo(O,W);const T=4,Y=j-O,C=U-W;for(let H=0;H<T;H++)c.lineTo(O+f((H+1)*Y/T),W+f(H*C/(T-1))),H!=T-1&&c.lineTo(O+f((H+1)*Y/T),W+f((H+1)*C/(T-1)));c.lineTo(D,Z)}else c.moveTo(O,W),c.lineTo(j,U),c.lineTo(D,Z);c.clip(),c.transform(b[0],b[2],b[1],b[3],j,U),c.translate(g[0]-V,g[3]-z),c.scale(n/e,-n/e),c.drawImage(_.canvas,0,0),c.restore()}}),u&&(c.save(),c.globalCompositeOperation="source-over",c.strokeStyle="black",c.lineWidth=1,a.getTriangles().forEach(function(x,k,w){const M=x.target,E=(M[0][0]-y[0])/o,S=-(M[0][1]-y[1])/o,I=(M[1][0]-y[0])/o,A=-(M[1][1]-y[1])/o,G=(M[2][0]-y[0])/o,P=-(M[2][1]-y[1])/o;c.beginPath(),c.moveTo(I,A),c.lineTo(E,S),c.lineTo(G,P),c.closePath(),c.stroke()}),c.restore()),c.canvas}class fx extends Ea{constructor(t,e,n,r,o,s,a,l,h,u,d,c){super(o,N.IDLE,{interpolate:!!c}),this.renderEdges_=d!==void 0?d:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=r,this.wrappedTileCoord_=s||o,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const f=r.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const p=g?Un(f,g):f;if(Pl(p)===0){this.state=N.EMPTY;return}const _=t.getExtent();_&&(m?m=Un(m,_):m=_);const v=r.getResolution(this.wrappedTileCoord_[0]),y=dx(t,n,p,v);if(!isFinite(y)||y<=0){this.state=N.EMPTY;return}const x=u!==void 0?u:sx;if(this.triangulation_=new hx(t,n,p,m,y*x,v),this.triangulation_.getTriangles().length===0){this.state=N.EMPTY;return}this.sourceZ_=e.getZForResolution(y);let k=this.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(k[1]=Wt(k[1],m[1],m[3]),k[3]=Wt(k[3],m[1],m[3])):k=Un(k,m)),!Pl(k))this.state=N.EMPTY;else{const w=e.getTileRangeForExtentAndZ(k,this.sourceZ_);for(let M=w.minX;M<=w.maxX;M++)for(let E=w.minY;E<=w.maxY;E++){const S=h(this.sourceZ_,M,E,a);S&&this.sourceTiles_.push(S)}this.sourceTiles_.length===0&&(this.state=N.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(function(e,n,r){e&&e.getState()==N.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=N.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),r=typeof n=="number"?n:n[0],o=typeof n=="number"?n:n[1],s=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=cx(r,o,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),s,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=N.LOADED}this.changed()}load(){if(this.state==N.IDLE){this.state=N.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,r){const o=e.getState();if(o==N.IDLE||o==N.LOADING){t++;const s=gt(e,tt.CHANGE,function(a){const l=e.getState();(l==N.LOADED||l==N.ERROR||l==N.EMPTY)&&(Ot(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}.bind(this)),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(e,n,r){e.getState()==N.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Ot),this.sourcesListenerKeys_=null}release(){this.canvas_&&(kl(this.canvas_.getContext("2d")),Qf.push(this.canvas_),this.canvas_=null),super.release()}}const ig=fx;class gx extends Tf{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=Ge(),this.tmpTileRange_=new Xf(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),r=e.getUseInterimTilesOnError();return n==N.LOADED||n==N.EMPTY||n==N.ERROR&&!r}getTile(t,e,n,r){const o=r.pixelRatio,s=r.viewState.projection,a=this.getLayer();let h=a.getSource().getTile(t,e,n,o,s);return h.getState()==N.ERROR&&a.getUseInterimTilesOnError()&&a.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(h)||(h=h.getInterimTile()),h}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),r=Jt(e.pixelToCoordinateTransform,t.slice()),o=n.getExtent();if(o&&!Gs(o,r))return null;const s=e.pixelRatio,a=e.viewState.projection,l=e.viewState,h=n.getRenderSource(),u=h.getTileGridForProjection(l.projection),d=h.getTilePixelRatio(e.pixelRatio);for(let c=u.getZForResolution(l.resolution);c>=u.getMinZoom();--c){const f=u.getTileCoordForCoordAndZ(r,c),g=h.getTile(c,f[1],f[2],s,a);if(!(g instanceof jf||g instanceof ig))return null;if(g.getState()!==N.LOADED)continue;const m=u.getOrigin(c),p=be(u.getTileSize(c)),_=u.getResolution(c),v=Math.floor(d*((r[0]-m[0])/_-f[1]*p[0])),y=Math.floor(d*((m[1]-r[1])/_-f[2]*p[1])),x=Math.round(d*h.getGutterForProjection(l.projection));return this.getImageData(g.getImage(),v+x,y+x)}return null}loadedTileCallback(t,e,n){return this.isDrawableTile(n)?super.loadedTileCallback(t,e,n):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const n=t.layerStatesArray[t.layerIndex],r=t.viewState,o=r.projection,s=r.resolution,a=r.center,l=r.rotation,h=t.pixelRatio,u=this.getLayer(),d=u.getSource(),c=d.getRevision(),f=d.getTileGridForProjection(o),g=f.getZForResolution(s,d.zDirection),m=f.getResolution(g);let p=t.extent;const _=t.viewState.resolution,v=d.getTilePixelRatio(h),y=Math.round(Nt(p)/_*h),x=Math.round($e(p)/_*h),k=n.extent&&Zi(n.extent);k&&(p=Un(p,Zi(n.extent)));const w=m*y/2/v,M=m*x/2/v,E=[a[0]-w,a[1]-M,a[0]+w,a[1]+M],S=f.getTileRangeForExtentAndZ(p,g),I={};I[g]={};const A=this.createLoadedTileFinder(d,o,I),G=this.tmpExtent,P=this.tmpTileRange_;this.newTiles_=!1;const at=l?Dl(r.center,_,l,t.size):void 0;for(let ot=S.minX;ot<=S.maxX;++ot)for(let b=S.minY;b<=S.maxY;++b){if(l&&!f.tileCoordIntersectsViewport([g,ot,b],at))continue;const T=this.getTile(g,ot,b,t);if(this.isDrawableTile(T)){const H=K(this);if(T.getState()==N.LOADED){I[g][T.tileCoord.toString()]=T;let $=T.inTransition(H);$&&n.opacity!==1&&(T.endTransition(H),$=!1),!this.newTiles_&&($||!this.renderedTiles.includes(T))&&(this.newTiles_=!0)}if(T.getAlpha(H,t.time)===1)continue}const Y=f.getTileCoordChildTileRange(T.tileCoord,P,G);let C=!1;Y&&(C=A(g+1,Y)),C||f.forEachTileCoordParentTileRange(T.tileCoord,A,P,G)}const j=m/s*h/v;Ei(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,l,-y/2,-x/2);const U=_c(this.pixelTransform);this.useContainer(e,U,this.getBackground(t));const O=this.context,W=O.canvas;Wl(this.inversePixelTransform,this.pixelTransform),Ei(this.tempTransform,y/2,x/2,j,j,0,-y/2,-x/2),W.width!=y||W.height!=x?(W.width=y,W.height=x):this.containerReused||O.clearRect(0,0,y,x),k&&this.clipUnrotated(O,t,k),d.getInterpolate()||(O.imageSmoothingEnabled=!1),this.preRender(O,t),this.renderedTiles.length=0;let D=Object.keys(I).map(Number);D.sort(An);let Z,V,z;n.opacity===1&&(!this.containerReused||d.getOpaque(t.viewState.projection))?D=D.reverse():(Z=[],V=[]);for(let ot=D.length-1;ot>=0;--ot){const b=D[ot],T=d.getTilePixelSize(b,h,o),C=f.getResolution(b)/m,H=T[0]*C*j,$=T[1]*C*j,vt=f.getTileCoordForCoordAndZ(Ki(E),b),Ct=f.getTileCoordExtent(vt),_t=Jt(this.tempTransform,[v*(Ct[0]-E[0])/m,v*(E[3]-Ct[3])/m]),Mt=v*d.getGutterForProjection(o),Lt=I[b];for(const Dt in Lt){const jt=Lt[Dt],F=jt.tileCoord,ut=vt[1]-F[1],pt=Math.round(_t[0]-(ut-1)*H),kt=vt[2]-F[2],yt=Math.round(_t[1]-(kt-1)*$),st=Math.round(_t[0]-ut*H),nt=Math.round(_t[1]-kt*$),wt=pt-st,zt=yt-nt,Bt=g===b,xt=Bt&&jt.getAlpha(K(this),t.time)!==1;let dt=!1;if(!xt)if(Z){z=[st,nt,st+wt,nt,st+wt,nt+zt,st,nt+zt];for(let Ft=0,St=Z.length;Ft<St;++Ft)if(g!==b&&b<V[Ft]){const ct=Z[Ft];Kt([st,nt,st+wt,nt+zt],[ct[0],ct[3],ct[4],ct[7]])&&(dt||(O.save(),dt=!0),O.beginPath(),O.moveTo(z[0],z[1]),O.lineTo(z[2],z[3]),O.lineTo(z[4],z[5]),O.lineTo(z[6],z[7]),O.moveTo(ct[6],ct[7]),O.lineTo(ct[4],ct[5]),O.lineTo(ct[2],ct[3]),O.lineTo(ct[0],ct[1]),O.clip())}Z.push(z),V.push(b)}else O.clearRect(st,nt,wt,zt);this.drawTileImage(jt,t,st,nt,wt,zt,Mt,Bt),Z&&!xt?(dt&&O.restore(),this.renderedTiles.unshift(jt)):this.renderedTiles.push(jt),this.updateUsedTiles(t.usedTiles,d,jt)}}return this.renderedRevision=c,this.renderedResolution=m,this.extentChanged=!this.renderedExtent_||!Mr(this.renderedExtent_,E),this.renderedExtent_=E,this.renderedPixelRatio=h,this.renderedProjection=o,this.manageTilePyramid(t,d,f,h,o,p,g,u.getPreload()),this.scheduleExpireCache(t,d),this.postRender(O,t),n.extent&&O.restore(),O.imageSmoothingEnabled=!0,U!==W.style.transform&&(W.style.transform=U),this.container}drawTileImage(t,e,n,r,o,s,a,l){const h=this.getTileImage(t);if(!h)return;const u=K(this),d=e.layerStatesArray[e.layerIndex],c=d.opacity*(l?t.getAlpha(u,e.time):1),f=c!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(h,a,a,h.width-2*a,h.height-2*a,n,r,o,s),f&&this.context.restore(),c!==d.opacity?e.animate=!0:l&&t.endTransition(u)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const n=function(r,o,s){const a=K(r);a in s.usedTiles&&r.expireCache(s.viewState.projection,s.usedTiles[a])}.bind(null,e);t.postRenderFunctions.push(n)}}updateUsedTiles(t,e,n){const r=K(e);r in t||(t[r]={}),t[r][n.getKey()]=!0}manageTilePyramid(t,e,n,r,o,s,a,l,h){const u=K(e);u in t.wantedTiles||(t.wantedTiles[u]={});const d=t.wantedTiles[u],c=t.tileQueue,f=n.getMinZoom(),g=t.viewState.rotation,m=g?Dl(t.viewState.center,t.viewState.resolution,g,t.size):void 0;let p=0,_,v,y,x,k,w;for(w=f;w<=a;++w)for(v=n.getTileRangeForExtentAndZ(s,w,v),y=n.getResolution(w),x=v.minX;x<=v.maxX;++x)for(k=v.minY;k<=v.maxY;++k)g&&!n.tileCoordIntersectsViewport([w,x,k],m)||(a-w<=l?(++p,_=e.getTile(w,x,k,r,o),_.getState()==N.IDLE&&(d[_.getKey()]=!0,c.isKeyQueued(_.getKey())||c.enqueue([_,u,n.getTileCoordCenter(_.tileCoord),y])),h!==void 0&&h(_)):e.useTile(w,x,k,o));e.updateCacheSize(p,o)}}const ng=gx,mx={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},px={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class vx extends ng{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=Ye()}prepareTile(t,e,n){let r;const o=t.getState();return(o===N.LOADED||o===N.ERROR)&&(this.updateExecutorGroup_(t,e,n),this.tileImageNeedsRender_(t)&&(r=!0)),r}getTile(t,e,n,r){const o=r.pixelRatio,s=r.viewState,a=s.resolution,l=s.projection,h=this.getLayer(),u=h.getSource().getTile(t,e,n,o,l),d=r.viewHints,c=!(d[Yt.ANIMATING]||d[Yt.INTERACTING]);return(c||!u.wantedResolution)&&(u.wantedResolution=a),this.prepareTile(u,o,l)&&(c||Date.now()-r.time<8)&&h.getRenderMode()!=="vector"&&this.renderTileImage_(u,r),super.getTile(t,e,n,r)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&(e.getRenderMode()==="vector"?K(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,n){const r=this.getLayer(),o=r.getRevision(),s=r.getRenderOrder()||null,a=t.wantedResolution,l=t.getReplayState(r);if(!l.dirty&&l.renderedResolution===a&&l.renderedRevision==o&&l.renderedRenderOrder==s)return;const h=r.getSource(),u=r.getDeclutter(),d=h.getTileGrid(),f=h.getTileGridForProjection(n).getTileCoordExtent(t.wrappedTileCoord),g=h.getSourceTiles(e,n,t),m=K(r);delete t.hitDetectionImageData[m],t.executorGroups[m]=[],u&&(t.declutterExecutorGroups[m]=[]),l.dirty=!1;for(let p=0,_=g.length;p<_;++p){const v=g[p];if(v.getState()!=N.LOADED)continue;const y=v.tileCoord,x=d.getTileCoordExtent(y),k=Un(f,x),w=ui(k,r.getRenderBuffer()*a,this.tmpExtent),M=Mr(x,k)?null:w,E=new xa(0,w,a,e),S=u?new xa(0,k,a,e):void 0,I=Df(a,e),A=function(U){let O;const W=U.getStyleFunction()||r.getStyleFunction();if(W&&(O=W(U,a)),O){const D=this.renderFeature(U,I,O,E,S);l.dirty=l.dirty||D}},G=v.getFeatures();s&&s!==l.renderedRenderOrder&&G.sort(s);for(let U=0,O=G.length;U<O;++U){const W=G[U];(!M||Kt(M,W.getGeometry().getExtent()))&&A.call(this,W)}const P=E.finish(),at=r.getRenderMode()!=="vector"&&u&&g.length===1?null:k,j=new ba(at,a,e,h.getOverlaps(),P,r.getRenderBuffer());if(t.executorGroups[m].push(j),S){const U=new ba(null,a,e,h.getOverlaps(),S.finish(),r.getRenderBuffer());t.declutterExecutorGroups[m].push(U)}}l.renderedRevision=o,l.renderedRenderOrder=s,l.renderedResolution=a}forEachFeatureAtCoordinate(t,e,n,r,o){const s=e.viewState.resolution,a=e.viewState.rotation;n=n==null?0:n;const l=this.getLayer(),u=l.getSource().getTileGridForProjection(e.viewState.projection),d=xe([t]);ui(d,s*n,d);const c={},f=function(p,_,v){let y=p.getId();y===void 0&&(y=K(p));const x=c[y];if(x){if(x!==!0&&v<x.distanceSq){if(v===0)return c[y]=!0,o.splice(o.lastIndexOf(x),1),r(p,l,_);x.geometry=_,x.distanceSq=v}}else{if(v===0)return c[y]=!0,r(p,l,_);o.push(c[y]={feature:p,layer:l,geometry:_,distanceSq:v,callback:r})}},g=this.renderedTiles;let m;for(let p=0,_=g.length;!m&&p<_;++p){const v=g[p],y=u.getTileCoordExtent(v.wrappedTileCoord);if(!Kt(y,d))continue;const x=K(l),k=[v.executorGroups[x]],w=v.declutterExecutorGroups[x];w&&k.push(w),k.some(M=>{const E=M===w?e.declutterTree.all().map(S=>S.value):null;for(let S=0,I=M.length;S<I;++S)if(m=M[S].forEachFeatureAtCoordinate(t,s,a,n,f,E),m)return!0})}return m}getFeatures(t){return new Promise(function(e,n){const r=this.getLayer(),o=K(r),s=r.getSource(),a=this.renderedProjection,l=a.getExtent(),h=this.renderedResolution,u=s.getTileGridForProjection(a),d=Jt(this.renderedPixelToCoordinateTransform_,t.slice()),c=u.getTileCoordForCoordAndResolution(d,h);let f;for(let y=0,x=this.renderedTiles.length;y<x;++y)if(c.toString()===this.renderedTiles[y].tileCoord.toString()){if(f=this.renderedTiles[y],f.getState()===N.LOADED){const k=u.getTileCoordExtent(f.tileCoord);s.getWrapX()&&a.canWrapX()&&!Bn(l,k)&&Nl(d,a);break}f=void 0}if(!f||f.loadingSourceTiles>0){e([]);return}const g=u.getTileCoordExtent(f.wrappedTileCoord),m=Ki(g),p=[(d[0]-m[0])/h,(m[1]-d[1])/h],_=f.getSourceTiles().reduce(function(y,x){return y.concat(x.getFeatures())},[]);let v=f.hitDetectionImageData[o];if(!v&&!this.animatingOrInteracting_){const y=be(u.getTileSize(u.getZForResolution(h,s.zDirection))),x=this.renderedRotation_,k=[this.getRenderTransform(u.getTileCoordCenter(f.wrappedTileCoord),h,0,je,y[0]*je,y[1]*je,0)];v=Rf(y,k,_,r.getStyleFunction(),u.getTileCoordExtent(f.wrappedTileCoord),f.getReplayState(r).renderedResolution,x),f.hitDetectionImageData[o]=v}e(Pf(p,_,v))}.bind(this))}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.renderedLayerRevision_!==void 0&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t){const e=this.context,n=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();const r=t.viewHints,o=!(r[Yt.ANIMATING]||r[Yt.INTERACTING]),s=this.renderedTiles;for(let a=0,l=s.length;a<l;++a){const h=s[a],u=h.declutterExecutorGroups[K(this.getLayer())];if(u)for(let d=u.length-1;d>=0;--d)u[d].execute(this.context,1,this.getTileRenderTransform(h,t),t.viewState.rotation,o,void 0,t.declutterTree)}e.globalAlpha=n}getTileRenderTransform(t,e){const n=e.pixelRatio,r=e.viewState,o=r.center,s=r.resolution,a=r.rotation,l=e.size,h=Math.round(l[0]*n),u=Math.round(l[1]*n),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),f=t.tileCoord,g=c.getTileCoordExtent(t.wrappedTileCoord),m=c.getTileCoordExtent(f,this.tmpExtent)[0]-g[0];return Xl($l(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(o,s,a,n,h,u,m))}postRender(t,e){const n=e.viewHints,r=!(n[Yt.ANIMATING]||n[Yt.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;const o=this.getLayer(),s=o.getRenderMode(),a=t.globalAlpha;t.globalAlpha=o.getOpacity();const l=px[s],h=e.viewState,u=h.rotation,d=o.getSource(),f=d.getTileGridForProjection(h.projection).getZForResolution(h.resolution,d.zDirection),g=this.renderedTiles,m=[],p=[];let _=!0;for(let v=g.length-1;v>=0;--v){const y=g[v];_=_&&!y.getReplayState(o).dirty;const x=y.executorGroups[K(o)].filter(S=>S.hasExecutors(l));if(x.length===0)continue;const k=this.getTileRenderTransform(y,e),w=y.tileCoord[0];let M=!1;const E=x[0].getClipCoords(k);if(E){for(let S=0,I=m.length;S<I;++S)if(f!==w&&w<p[S]){const A=m[S];Kt([E[0],E[3],E[4],E[7]],[A[0],A[3],A[4],A[7]])&&(M||(t.save(),M=!0),t.beginPath(),t.moveTo(E[0],E[1]),t.lineTo(E[2],E[3]),t.lineTo(E[4],E[5]),t.lineTo(E[6],E[7]),t.moveTo(A[6],A[7]),t.lineTo(A[4],A[5]),t.lineTo(A[2],A[3]),t.lineTo(A[0],A[1]),t.clip())}m.push(E),p.push(w)}for(let S=0,I=x.length;S<I;++S)x[S].execute(t,1,k,u,r,l);M&&t.restore()}t.globalAlpha=a,this.ready=_,super.postRender(t,e)}renderFeature(t,e,n,r,o){if(!n)return!1;let s=!1;if(Array.isArray(n))for(let a=0,l=n.length;a<l;++a)s=ka(r,t,n[a],e,this.boundHandleStyleImageChange_,void 0,o)||s;else s=ka(r,t,n,e,this.boundHandleStyleImageChange_,void 0,o);return s}tileImageNeedsRender_(t){const e=this.getLayer();if(e.getRenderMode()==="vector")return!1;const n=t.getReplayState(e),r=e.getRevision(),o=t.wantedResolution;return n.renderedTileResolution!==o||n.renderedTileRevision!==r}renderTileImage_(t,e){const n=this.getLayer(),r=t.getReplayState(n),o=n.getRevision(),s=t.executorGroups[K(n)];r.renderedTileRevision=o;const a=t.wrappedTileCoord,l=a[0],h=n.getSource();let u=e.pixelRatio;const c=e.viewState.projection,f=h.getTileGridForProjection(c),g=f.getResolution(t.tileCoord[0]),m=e.pixelRatio/t.wantedResolution*g,p=f.getResolution(l),_=t.getContext(n);u=Math.round(Math.max(u,m/u));const v=h.getTilePixelSize(l,u,c);_.canvas.width=v[0],_.canvas.height=v[1];const y=u/m;if(y!==1){const M=pc(this.tmpTransform_);$l(M,y,y),_.setTransform.apply(_,M)}const x=f.getTileCoordExtent(a,this.tmpExtent),k=m/p,w=pc(this.tmpTransform_);$l(w,k,-k),X0(w,-x[0],-x[3]);for(let M=0,E=s.length;M<E;++M)s[M].execute(_,y,w,0,!0,mx[n.getRenderMode()]);r.renderedTileResolution=t.wantedResolution}}const _x=vx,un={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class yx extends wf{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un;const n=t.renderMode||"hybrid";ft(n=="hybrid"||n=="vector",28),this.renderMode_=n,this.setPreload(t.preload?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0),this.getBackground,this.setBackground}createRenderer(){return new _x(this)}getFeatures(t){return super.getFeatures(t)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(un.PRELOAD)}getUseInterimTilesOnError(){return this.get(un.USE_INTERIM_TILES_ON_ERROR)}setPreload(t){this.set(un.PRELOAD,t)}setUseInterimTilesOnError(t){this.set(un.USE_INTERIM_TILES_ON_ERROR,t)}}const xx=yx,bx=[0,0,0],dn=5;class kx{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,ft(Wp(this.resolutions_,function(r,o){return o-r},!0),17);let e;if(!t.origins){for(let r=0,o=this.resolutions_.length-1;r<o;++r)if(!e)e=this.resolutions_[r]/this.resolutions_[r+1];else if(this.resolutions_[r]/this.resolutions_[r+1]!==e){e=void 0;break}}this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=t.origin!==void 0?t.origin:null,this.origins_=null,t.origins!==void 0&&(this.origins_=t.origins,ft(this.origins_.length==this.resolutions_.length,20));const n=t.extent;n!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=Ki(n)),ft(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,t.tileSizes!==void 0&&(this.tileSizes_=t.tileSizes,ft(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=t.tileSize!==void 0?t.tileSize:this.tileSizes_?null:Ql,ft(!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],t.sizes!==void 0?this.fullTileRanges_=t.sizes.map(function(r,o){const s=new Xf(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,o);s.minX=Math.max(a.minX,s.minX),s.maxX=Math.min(a.maxX,s.maxX),s.minY=Math.max(a.minY,s.minY),s.maxY=Math.min(a.maxY,s.maxY)}return s},this):n&&this.calculateTileRanges_(n)}forEachTileCoord(t,e,n){const r=this.getTileRangeForExtentAndZ(t,e);for(let o=r.minX,s=r.maxX;o<=s;++o)for(let a=r.minY,l=r.maxY;a<=l;++a)n([e,o,a])}forEachTileCoordParentTileRange(t,e,n,r){let o,s,a,l=null,h=t[0]-1;for(this.zoomFactor_===2?(s=t[1],a=t[2]):l=this.getTileCoordExtent(t,r);h>=this.minZoom;){if(this.zoomFactor_===2?(s=Math.floor(s/2),a=Math.floor(a/2),o=Gr(s,s,a,a,n)):o=this.getTileRangeForExtentAndZ(l,h,n),e(h,o))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,n){if(t[0]<this.maxZoom){if(this.zoomFactor_===2){const o=t[1]*2,s=t[2]*2;return Gr(o,o+1,s,s+1,e)}const r=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(r,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;const r=t[0],o=t[1],s=t[2];if(e===r)return Gr(o,s,o,s,n);if(this.zoomFactor_){const l=Math.pow(this.zoomFactor_,e-r),h=Math.floor(o*l),u=Math.floor(s*l);if(e<r)return Gr(h,h,u,u,n);const d=Math.floor(l*(o+1))-1,c=Math.floor(l*(s+1))-1;return Gr(h,d,u,c,n)}const a=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e,n)}getTileRangeExtent(t,e,n){const r=this.getOrigin(t),o=this.getResolution(t),s=be(this.getTileSize(t),this.tmpSize_),a=r[0]+e.minX*s[0]*o,l=r[0]+(e.maxX+1)*s[0]*o,h=r[1]+e.minY*s[1]*o,u=r[1]+(e.maxY+1)*s[1]*o;return ti(a,h,l,u,n)}getTileRangeForExtentAndZ(t,e,n){const r=bx;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,r);const o=r[1],s=r[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,r),Gr(o,r[1],s,r[2],n)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=be(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*r[0]*n,e[1]-(t[2]+.5)*r[1]*n]}getTileCoordExtent(t,e){const n=this.getOrigin(t[0]),r=this.getResolution(t[0]),o=be(this.getTileSize(t[0]),this.tmpSize_),s=n[0]+t[1]*o[0]*r,a=n[1]-(t[2]+1)*o[1]*r,l=s+o[0]*r,h=a+o[1]*r;return ti(s,a,l,h,e)}getTileCoordForCoordAndResolution(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)}getTileCoordForXYAndResolution_(t,e,n,r,o){const s=this.getZForResolution(n),a=n/this.getResolution(s),l=this.getOrigin(s),h=be(this.getTileSize(s),this.tmpSize_);let u=a*(t-l[0])/n/h[0],d=a*(l[1]-e)/n/h[1];return r?(u=Ls(u,dn)-1,d=Ls(d,dn)-1):(u=Ds(u,dn),d=Ds(d,dn)),Bf(s,u,d,o)}getTileCoordForXYAndZ_(t,e,n,r,o){const s=this.getOrigin(n),a=this.getResolution(n),l=be(this.getTileSize(n),this.tmpSize_);let h=(t-s[0])/a/l[0],u=(s[1]-e)/a/l[1];return r?(h=Ls(h,dn)-1,u=Ls(u,dn)-1):(h=Ds(h,dn),u=Ds(u,dn)),Bf(n,h,u,o)}getTileCoordForCoordAndZ(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)}getTileCoordResolution(t){return this.resolutions_[t[0]]}getTileSize(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]}getFullTileRange(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null}getZForResolution(t,e){const n=xl(this.resolutions_,t,e||0);return Wt(n,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return Uc(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,n=new Array(e);for(let r=this.minZoom;r<e;++r)n[r]=this.getTileRangeForExtentAndZ(t,r);this.fullTileRanges_=n}}const nu=kx,ru={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};function rg(i){let t=i.getDefaultTileGrid();return t||(t=Mx(i),i.setDefaultTileGrid(t)),t}function wx(i,t,e){const n=t[0],r=i.getTileCoordCenter(t),o=Sa(e);if(Gs(o,r))return t;{const s=Nt(o),a=Math.ceil((o[0]-r[0])/s);return r[0]+=s*a,i.getTileCoordForCoordAndZ(r,n)}}function Ex(i,t,e,n){n=n!==void 0?n:"top-left";const r=sg(i,t,e);return new nu({extent:i,origin:C0(i,n),resolutions:r,tileSize:e})}function og(i){const t=i||{},e=t.extent||Gt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:sg(e,t.maxZoom,t.tileSize,t.maxResolution)};return new nu(n)}function sg(i,t,e,n){t=t!==void 0?t:Cc,e=be(e!==void 0?e:Ql);const r=$e(i),o=Nt(i);n=n>0?n:Math.max(o/e[0],r/e[1]);const s=t+1,a=new Array(s);for(let l=0;l<s;++l)a[l]=n/Math.pow(2,l);return a}function Mx(i,t,e,n){const r=Sa(i);return Ex(r,t,e,n)}function Sa(i){i=Gt(i);let t=i.getExtent();if(!t){const e=180*xr.degrees/i.getMetersPerUnit();t=ti(-e,-e,e,e)}return t}class Cx extends Of{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=t.opaque!==void 0?t.opaque:!1,this.tilePixelRatio_=t.tilePixelRatio!==void 0?t.tilePixelRatio:1,this.tileGrid=t.tileGrid!==void 0?t.tileGrid:null;const e=[256,256];this.tileGrid&&be(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),e),this.tileCache=new Hh(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const n=this.getTileCacheForProjection(t);n&&n.expireCache(e)}forEachLoadedTile(t,e,n,r){const o=this.getTileCacheForProjection(t);if(!o)return!1;let s=!0,a,l,h;for(let u=n.minX;u<=n.maxX;++u)for(let d=n.minY;d<=n.maxY;++d)l=Nr(e,u,d),h=!1,o.containsKey(l)&&(a=o.get(l),h=a.getState()===N.LOADED,h&&(h=r(a)!==!1)),h||(s=!1);return s}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(){return this.tileGrid?this.tileGrid.getResolutions():null}getTile(t,e,n,r,o){return et()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:rg(t)}getTileCacheForProjection(t){const e=this.getProjection();return ft(e===null||Vn(e,t),68),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,n){const r=this.getTileGridForProjection(n),o=this.getTilePixelRatio(e),s=be(r.getTileSize(t),this.tmpSize);return o==1?s:A_(s,o,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=e!==void 0?e:this.getProjection();const n=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=wx(n,t,e)),qy(t,n)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)}useTile(t,e,n,r){}}class Sx extends Qe{constructor(t,e){super(t),this.tile=e}}const Tx=Cx;function zx(i,t){const e=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){if(s)return i.replace(e,s[0].toString()).replace(n,s[1].toString()).replace(r,s[2].toString()).replace(o,function(){const h=s[0],u=t.getFullTileRange(h);return ft(u,55),(u.getHeight()-s[2]-1).toString()})}}function Ix(i,t){const e=i.length,n=new Array(e);for(let r=0;r<e;++r)n[r]=zx(i[r],t);return Rx(n)}function Rx(i){return i.length===1?i[0]:function(t,e,n){if(t){const r=Vy(t),o=$i(r,i.length);return i[o](t,e,n)}else return}}function Px(i){const t=[];let e=/\{([a-z])-([a-z])\}/.exec(i);if(e){const n=e[1].charCodeAt(0),r=e[2].charCodeAt(0);let o;for(o=n;o<=r;++o)t.push(i.replace(e[0],String.fromCharCode(o)));return t}if(e=/\{(\d+)-(\d+)\}/.exec(i),e){const n=parseInt(e[2],10);for(let r=parseInt(e[1],10);r<=n;r++)t.push(i.replace(e[0],r.toString()));return t}return t.push(i),t}class ou extends Tx{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===ou.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.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(t){const e=t.target,n=K(e),r=e.getState();let o;r==N.LOADING?(this.tileLoadingKeys_[n]=!0,o=ru.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],o=r==N.ERROR?ru.TILELOADERROR:r==N.LOADED?ru.TILELOADEND:void 0),o!=null&&this.dispatchEvent(new Sx(o,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),typeof e<"u"?this.setKey(e):this.changed()}setUrl(t){const e=Px(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join(`
|
46
|
-
`);this.generateTileUrlFunction_?this.setTileUrlFunction(Ix(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,n){}useTile(t,e,n){const r=Nr(t,e,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)}}const ag=ou;class Ax extends ag{constructor(t){const e=t.projection||"EPSG:3857",n=t.extent||Sa(e),r=t.tileGrid||og({extent:n,maxResolution:t.maxResolution,maxZoom:t.maxZoom!==void 0?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:r,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Lx,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX===void 0?!0:t.wrapX,transition:t.transition,zDirection:t.zDirection===void 0?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new Hh(this.tileCache.highWaterMark),this.overlaps_=t.overlaps==null?!0:t.overlaps,this.tileClass=t.tileClass?t.tileClass:Ky,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],n=this.tileCache;if(n.getCount()===0)return e;const r=Vf(n.peekFirstKey())[0],o=this.tileGrid;return n.forEach(function(s){if(s.tileCoord[0]!==r||s.getState()!==N.LOADED)return;const a=s.getSourceTiles();for(let l=0,h=a.length;l<h;++l){const u=a[l],d=u.tileCoord;if(Kt(t,o.getTileCoordExtent(d))){const c=u.getFeatures();if(c)for(let f=0,g=c.length;f<g;++f){const m=c[f],p=m.getGeometry();Kt(t,p.getExtent())&&e.push(m)}}}}),e}getOverlaps(){return this.overlaps_}clear(){this.tileCache.clear(),this.sourceTileCache.clear()}expireCache(t,e){const n=this.getTileCacheForProjection(t),r=Object.keys(e).reduce((o,s)=>{const a=Uy(s),l=n.peek(a);if(l){const h=l.sourceTiles;for(let u=0,d=h.length;u<d;++u)o[h[u].getKey()]=!0}return o},{});super.expireCache(t,e),this.sourceTileCache.expireCache(r)}getSourceTiles(t,e,n){if(n.getState()===N.IDLE){n.setState(N.LOADING);const r=n.wrappedTileCoord,o=this.getTileGridForProjection(e),s=o.getTileCoordExtent(r),a=r[0],l=o.getResolution(a);ui(s,-l,s);const h=this.tileGrid,u=h.getExtent();u&&Un(s,u,s);const d=h.getZForResolution(l,this.zDirection);h.forEachTileCoord(s,d,c=>{const f=this.tileUrlFunction(c,t,e),g=this.sourceTileCache.containsKey(f)?this.sourceTileCache.get(f):new this.tileClass(c,f?N.IDLE:N.EMPTY,f,this.format_,this.tileLoadFunction);n.sourceTiles.push(g);const m=g.getState();if(m<N.LOADED){const p=_=>{this.handleTileChange(_);const v=g.getState();if(v===N.LOADED||v===N.ERROR){const y=g.getKey();y in n.errorTileKeys?g.getState()===N.LOADED&&delete n.errorTileKeys[y]:n.loadingSourceTiles--,v===N.ERROR?n.errorTileKeys[y]=!0:g.removeEventListener(tt.CHANGE,p),n.loadingSourceTiles===0&&n.setState(Fn(n.errorTileKeys)?N.LOADED:N.ERROR)}};g.addEventListener(tt.CHANGE,p),n.loadingSourceTiles++}m===N.IDLE&&(g.extent=h.getTileCoordExtent(c),g.projection=e,g.resolution=h.getResolution(c[0]),this.sourceTileCache.set(f,g),g.load())}),n.loadingSourceTiles||n.setState(n.sourceTiles.some(c=>c.getState()===N.ERROR)?N.ERROR:N.LOADED)}return n.sourceTiles}getTile(t,e,n,r,o){const s=Nr(t,e,n),a=this.getKey();let l;if(this.tileCache.containsKey(s)&&(l=this.tileCache.get(s),l.key===a))return l;const h=[t,e,n];let u=this.getTileCoordForTileUrlFunction(h,o);const d=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(o);if(u&&d){const m=c.getTileCoordExtent(u);ui(m,-c.getResolution(t),m),Kt(d,m)||(u=null)}let f=!0;if(u!==null){const m=this.tileGrid,p=c.getResolution(t),_=m.getZForResolution(p,1),v=c.getTileCoordExtent(u);ui(v,-p,v),m.forEachTileCoord(v,_,function(y){f=f&&!this.tileUrlFunction(y,r,o)}.bind(this))}const g=new Wy(h,f?N.EMPTY:N.IDLE,u,this.getSourceTiles.bind(this,r,o));return g.key=a,l?(g.interimTile=l,g.refreshInterimChain(),this.tileCache.replace(s,g)):this.tileCache.set(s,g),g}getTileGridForProjection(t){const e=t.getCode();let n=this.tileGrids_[e];if(!n){const r=this.tileGrid,o=r.getResolutions().slice(),s=o.map(function(h,u){return r.getOrigin(u)}),a=o.map(function(h,u){return r.getTileSize(u)}),l=Cc+1;for(let h=o.length;h<l;++h)o.push(o[h-1]/2),s.push(s[h-1]),a.push(a[h-1]);n=new nu({extent:r.getExtent(),origins:s,resolutions:o,tileSizes:a}),this.tileGrids_[e]=n}return n}getTilePixelRatio(t){return t}getTilePixelSize(t,e,n){const r=this.getTileGridForProjection(n),o=be(r.getTileSize(t),this.tmpSize);return[Math.round(o[0]*e),Math.round(o[1]*e)]}updateCacheSize(t,e){super.updateCacheSize(t*2,e),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(e).highWaterMark}}const Dx=Ax;function Lx(i,t){i.setLoader(function(e,n,r){Nf(t,i.getFormat(),e,n,r,i.onLoad.bind(i),i.onError.bind(i))})}class Fx extends ag{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Ox,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate!==void 0?t.interpolate:!0,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,this.tileClass=t.tileClass!==void 0?t.tileClass:jf,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const n=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==n?e:{});for(const r in this.tileCacheForProjection){const o=this.tileCacheForProjection[r];o.expireCache(o==n?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!Vn(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return this.getProjection()&&t&&!Vn(this.getProjection(),t)?!1:super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||Vn(e,t)))return this.tileGrid;{const n=K(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=rg(t)),this.tileGridForProjection[n]}}getTileCacheForProjection(t){const e=this.getProjection();if(!e||Vn(e,t))return this.tileCache;{const n=K(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Hh(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]}}createTile_(t,e,n,r,o,s){const a=[t,e,n],l=this.getTileCoordForTileUrlFunction(a,o),h=l?this.tileUrlFunction(l,r,o):void 0,u=new this.tileClass(a,h!==void 0?N.IDLE:N.EMPTY,h!==void 0?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=s,u.addEventListener(tt.CHANGE,this.handleTileChange.bind(this)),u}getTile(t,e,n,r,o){const s=this.getProjection();if(!s||!o||Vn(s,o))return this.getTileInternal(t,e,n,r,s||o);{const a=this.getTileCacheForProjection(o),l=[t,e,n];let h;const u=Uf(l);a.containsKey(u)&&(h=a.get(u));const d=this.getKey();if(h&&h.key==d)return h;{const c=this.getTileGridForProjection(s),f=this.getTileGridForProjection(o),g=this.getTileCoordForTileUrlFunction(l,o),m=new ig(s,c,o,f,l,g,this.getTilePixelRatio(r),this.getGutter(),function(p,_,v,y){return this.getTileInternal(p,_,v,y,s)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return m.key=d,h?(m.interimTile=h,m.refreshInterimChain(),a.replace(u,m)):a.set(u,m),m}}}getTileInternal(t,e,n,r,o){let s=null;const a=Nr(t,e,n),l=this.getKey();if(!this.tileCache.containsKey(a))s=this.createTile_(t,e,n,r,o,l),this.tileCache.set(a,s);else if(s=this.tileCache.get(a),s.key!=l){const h=s;s=this.createTile_(t,e,n,r,o,l),h.getState()==N.IDLE?s.interimTile=h.interimTile:s.interimTile=h,s.refreshInterimChain(),this.tileCache.replace(a,s)}return s}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(t,e){const n=Gt(t);if(n){const r=K(n);r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function Ox(i,t){i.getImage().src=t}const Nx=Fx;class Gx extends Fs{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getPreload(){return this.get(un.PRELOAD)}setPreload(t){this.set(un.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(un.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(un.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const jx=Gx;class Bx extends jx{constructor(t){super(t)}createRenderer(){return new ng(this)}}const Ux=Bx;var Vx={},lg,hg={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 qo(i){return i=Math.round(i),i<0?0:i>255?255:i}function ug(i){return i<0?0:i>1?1:i}function su(i){return i[i.length-1]==="%"?qo(parseFloat(i)/100*255):qo(parseInt(i))}function Ta(i){return i[i.length-1]==="%"?ug(parseFloat(i)/100):ug(parseFloat(i))}function au(i,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?i+(t-i)*e*6:e*2<1?t:e*3<2?i+(t-i)*(2/3-e)*6:i}function qx(i){var t=i.replace(/ /g,"").toLowerCase();if(t in hg)return hg[t].slice();if(t[0]==="#"){if(t.length===4){var e=parseInt(t.substr(1),16);return e>=0&&e<=4095?[(e&3840)>>4|(e&3840)>>8,e&240|(e&240)>>4,e&15|(e&15)<<4,1]:null}else if(t.length===7){var e=parseInt(t.substr(1),16);return e>=0&&e<=16777215?[(e&16711680)>>16,(e&65280)>>8,e&255,1]:null}return null}var n=t.indexOf("("),r=t.indexOf(")");if(n!==-1&&r+1===t.length){var o=t.substr(0,n),s=t.substr(n+1,r-(n+1)).split(","),a=1;switch(o){case"rgba":if(s.length!==4)return null;a=Ta(s.pop());case"rgb":return s.length!==3?null:[su(s[0]),su(s[1]),su(s[2]),a];case"hsla":if(s.length!==4)return null;a=Ta(s.pop());case"hsl":if(s.length!==3)return null;var l=(parseFloat(s[0])%360+360)%360/360,h=Ta(s[1]),u=Ta(s[2]),d=u<=.5?u*(h+1):u+h-u*h,c=u*2-d;return[qo(au(c,d,l+1/3)*255),qo(au(c,d,l)*255),qo(au(c,d,l-1/3)*255),a];default:return null}}return null}try{lg=Vx.parseCSSColor=qx}catch{}var It=function(t,e,n,r){r===void 0&&(r=1),this.r=t,this.g=e,this.b=n,this.a=r};It.parse=function(t){if(!!t){if(t instanceof It)return t;if(typeof t=="string"){var e=lg(t);if(!!e)return new It(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},It.prototype.toString=function(){var t=this.toArray(),e=t[0],n=t[1],r=t[2],o=t[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(r)+","+o+")"},It.prototype.toArray=function(){var t=this,e=t.r,n=t.g,r=t.b,o=t.a;return o===0?[0,0,0,0]:[e*255/o,n*255/o,r*255/o,o]},It.prototype.toArray01=function(){var t=this,e=t.r,n=t.g,r=t.b,o=t.a;return o===0?[0,0,0,0]:[e/o,n/o,r/o,o]},It.prototype.toArray01PremultipliedAlpha=function(){var t=this,e=t.r,n=t.g,r=t.b,o=t.a;return[e,n,r,o]},It.black=new It(0,0,0,1),It.white=new It(1,1,1,1),It.transparent=new It(0,0,0,0),It.red=new It(1,0,0,1),It.blue=new It(0,0,1,1);function Xo(i){return typeof i=="object"?["literal",i]:i}function Xx(i,t){var e=i.stops;if(!e)return $x(i,t);var n=e&&typeof e[0][0]=="object",r=n||i.property!==void 0,o=n||!r;return e=e.map(function(s){return!r&&t.tokens&&typeof s[1]=="string"?[s[0],Zx(s[1])]:[s[0],Xo(s[1])]}),n?Wx(i,t,e):o?Kx(i,t,e):hu(i,t,e)}function $x(i,t){var e=["get",i.property];if(i.default===void 0)return t.type==="string"?["string",e]:e;if(t.type==="enum")return["match",e,Object.keys(t.values),e,i.default];var n=[t.type==="color"?"to-color":t.type,e,Xo(i.default)];return t.type==="array"&&n.splice(1,0,t.value,t.length||null),n}function lu(i){switch(i.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Wx(i,t,e){for(var n={},r={},o=[],s=0;s<e.length;s++){var a=e[s],l=a[0].zoom;n[l]===void 0&&(n[l]={zoom:l,type:i.type,property:i.property,default:i.default},r[l]=[],o.push(l)),r[l].push([a[0].value,a[1]])}var h=du({},t);if(h==="exponential"){for(var u=[lu(i),["linear"],["zoom"]],d=0,c=o;d<c.length;d+=1){var f=c[d],g=hu(n[f],t,r[f]);Br(u,f,g,!1)}return u}else{for(var m=["step",["zoom"]],p=0,_=o;p<_.length;p+=1){var v=_[p],y=hu(n[v],t,r[v]);Br(m,v,y,!0)}return uu(m),m}}function Yx(i,t){if(i!==void 0)return i;if(t!==void 0)return t}function dg(i,t){var e=Xo(Yx(i.default,t.default));return e===void 0&&t.type==="resolvedImage"?"":e}function hu(i,t,e){var n=du(i,t),r=["get",i.property];if(n==="categorical"&&typeof e[0][0]=="boolean"){for(var o=["case"],s=0,a=e;s<a.length;s+=1){var l=a[s];o.push(["==",r,l[0]],l[1])}return o.push(dg(i,t)),o}else if(n==="categorical"){for(var h=["match",r],u=0,d=e;u<d.length;u+=1){var c=d[u];Br(h,c[0],c[1],!1)}return h.push(dg(i,t)),h}else if(n==="interval"){for(var f=["step",["number",r]],g=0,m=e;g<m.length;g+=1){var p=m[g];Br(f,p[0],p[1],!0)}return uu(f),i.default===void 0?f:["case",["==",["typeof",r],"number"],f,Xo(i.default)]}else if(n==="exponential"){for(var _=i.base!==void 0?i.base:1,v=[lu(i),_===1?["linear"]:["exponential",_],["number",r]],y=0,x=e;y<x.length;y+=1){var k=x[y];Br(v,k[0],k[1],!1)}return i.default===void 0?v:["case",["==",["typeof",r],"number"],v,Xo(i.default)]}else throw new Error("Unknown property function type "+n)}function Kx(i,t,e,n){n===void 0&&(n=["zoom"]);var r=du(i,t),o,s=!1;if(r==="interval")o=["step",n],s=!0;else if(r==="exponential"){var a=i.base!==void 0?i.base:1;o=[lu(i),a===1?["linear"]:["exponential",a],n]}else throw new Error('Unknown zoom function type "'+r+'"');for(var l=0,h=e;l<h.length;l+=1){var u=h[l];Br(o,u[0],u[1],s)}return uu(o),o}function uu(i){i[0]==="step"&&i.length===3&&(i.push(0),i.push(i[3]))}function Br(i,t,e,n){i.length>3&&t===i[i.length-2]||(n&&i.length===2||i.push(t),i.push(e))}function du(i,t){return i.type?i.type:t.expression.interpolated?"exponential":"interval"}function Zx(i){for(var t=["concat"],e=/{([^{}]+)}/g,n=0,r=e.exec(i);r!==null;r=e.exec(i)){var o=i.slice(n,e.lastIndex-r[0].length);n=e.lastIndex,o.length>0&&t.push(o),t.push(["get",r[1]])}if(t.length===1)return i;if(n<i.length)t.push(i.slice(n));else if(t.length===2)return["to-string",t[1]];return t}var ci=function(i){function t(e,n){i.call(this,n),this.message=n,this.key=e}return i&&(t.__proto__=i),t.prototype=Object.create(i&&i.prototype),t.prototype.constructor=t,t}(Error),$o=function(t,e){e===void 0&&(e=[]),this.parent=t,this.bindings={};for(var n=0,r=e;n<r.length;n+=1){var o=r[n],s=o[0],a=o[1];this.bindings[s]=a}};$o.prototype.concat=function(t){return new $o(this,t)},$o.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},$o.prototype.has=function(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1};var za={kind:"null"},L={kind:"number"},mt={kind:"string"},lt={kind:"boolean"},Pi={kind:"color"},Ur={kind:"object"},ht={kind:"value"},Hx={kind:"error"},Ia={kind:"collator"},Ra={kind:"formatted"},Wo={kind:"resolvedImage"};function Ke(i,t){return{kind:"array",itemType:i,N:t}}function qt(i){if(i.kind==="array"){var t=qt(i.itemType);return typeof i.N=="number"?"array<"+t+", "+i.N+">":i.itemType.kind==="value"?"array":"array<"+t+">"}else return i.kind}var Jx=[za,L,mt,lt,Pi,Ra,Ur,Ke(ht),Wo];function Yo(i,t){if(t.kind==="error")return null;if(i.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Yo(i.itemType,t.itemType))&&(typeof i.N!="number"||i.N===t.N))return null}else{if(i.kind===t.kind)return null;if(i.kind==="value")for(var e=0,n=Jx;e<n.length;e+=1){var r=n[e];if(!Yo(r,t))return null}}return"Expected "+qt(i)+" but found "+qt(t)+" instead."}function cu(i,t){return t.some(function(e){return e.kind===i.kind})}function Ko(i,t){return t.some(function(e){return e==="null"?i===null:e==="array"?Array.isArray(i):e==="object"?i&&!Array.isArray(i)&&typeof i=="object":e===typeof i})}var Zo=function(t,e,n){t?this.sensitivity=e?"variant":"case":this.sensitivity=e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Zo.prototype.compare=function(t,e){return this.collator.compare(t,e)},Zo.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var fu=function(t,e,n,r,o){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=n,this.fontStack=r,this.textColor=o},Ae=function(t){this.sections=t};Ae.fromString=function(t){return new Ae([new fu(t,null,null,null,null)])},Ae.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(t){return t.text.length!==0||t.image&&t.image.name.length!==0})},Ae.factory=function(t){return t instanceof Ae?t:Ae.fromString(t)},Ae.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(t){return t.text}).join("")},Ae.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var r=n[e];if(r.image){t.push(["image",r.image.name]);continue}t.push(r.text);var o={};r.fontStack&&(o["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(o["font-scale"]=r.scale),r.textColor&&(o["text-color"]=["rgba"].concat(r.textColor.toArray())),t.push(o)}return t};var fi=function(t){this.name=t.name,this.available=t.available};fi.prototype.toString=function(){return this.name},fi.fromString=function(t){return t?new fi({name:t,available:!1}):null},fi.prototype.serialize=function(){return["image",this.name]};function cg(i,t,e,n){if(!(typeof i=="number"&&i>=0&&i<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255)){var r=typeof n=="number"?[i,t,e,n]:[i,t,e];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,t,e,n].join(", ")+"]: 'a' must be between 0 and 1."}function Pa(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 It)return!0;if(i instanceof Zo)return!0;if(i instanceof Ae)return!0;if(i instanceof fi)return!0;if(Array.isArray(i)){for(var t=0,e=i;t<e.length;t+=1){var n=e[t];if(!Pa(n))return!1}return!0}else if(typeof i=="object"){for(var r in i)if(!Pa(i[r]))return!1;return!0}else return!1}function te(i){if(i===null)return za;if(typeof i=="string")return mt;if(typeof i=="boolean")return lt;if(typeof i=="number")return L;if(i instanceof It)return Pi;if(i instanceof Zo)return Ia;if(i instanceof Ae)return Ra;if(i instanceof fi)return Wo;if(Array.isArray(i)){for(var t=i.length,e,n=0,r=i;n<r.length;n+=1){var o=r[n],s=te(o);if(!e)e=s;else{if(e===s)continue;e=ht;break}}return Ke(e||ht,t)}else return Ur}function Ho(i){var t=typeof i;return i===null?"":t==="string"||t==="number"||t==="boolean"?String(i):i instanceof It||i instanceof Ae||i instanceof fi?i.toString():JSON.stringify(i)}var gi=function(t,e){this.type=t,this.value=e};gi.parse=function(t,e){if(t.length!==2)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!Pa(t[1]))return e.error("invalid value");var n=t[1],r=te(n),o=e.expectedType;return r.kind==="array"&&r.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(r=o),new gi(r,n)},gi.prototype.evaluate=function(){return this.value},gi.prototype.eachChild=function(){},gi.prototype.outputDefined=function(){return!0},gi.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof It?["rgba"].concat(this.value.toArray()):this.value instanceof Ae?this.value.serialize():this.value};var oe=function(t){this.name="ExpressionEvaluationError",this.message=t};oe.prototype.toJSON=function(){return this.message};var gu={string:mt,number:L,boolean:lt,object:Ur},Ee=function(t,e){this.type=t,this.args=e};Ee.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=1,r,o=t[0];if(o==="array"){var s;if(t.length>2){var a=t[1];if(typeof a!="string"||!(a in gu)||a==="object")return e.error('The item type argument of "array" must be one of string, number, boolean',1);s=gu[a],n++}else s=ht;var l;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);l=t[2],n++}r=Ke(s,l)}else r=gu[o];for(var h=[];n<t.length;n++){var u=e.parse(t[n],n,ht);if(!u)return null;h.push(u)}return new Ee(r,h)},Ee.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t),r=Yo(this.type,te(n));if(r){if(e===this.args.length-1)throw new oe("Expected value to be of type "+qt(this.type)+", but found "+qt(te(n))+" instead.")}else return n}return null},Ee.prototype.eachChild=function(t){this.args.forEach(t)},Ee.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Ee.prototype.serialize=function(){var t=this.type,e=[t.kind];if(t.kind==="array"){var n=t.itemType;if(n.kind==="string"||n.kind==="number"||n.kind==="boolean"){e.push(n.kind);var r=t.N;(typeof r=="number"||this.args.length>1)&&e.push(r)}}return e.concat(this.args.map(function(o){return o.serialize()}))};var cn=function(t){this.type=Ra,this.sections=t};cn.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[1];if(!Array.isArray(n)&&typeof n=="object")return e.error("First argument must be an image or text section.");for(var r=[],o=!1,s=1;s<=t.length-1;++s){var a=t[s];if(o&&typeof a=="object"&&!Array.isArray(a)){o=!1;var l=null;if(a["font-scale"]&&(l=e.parse(a["font-scale"],1,L),!l))return null;var h=null;if(a["text-font"]&&(h=e.parse(a["text-font"],1,Ke(mt)),!h))return null;var u=null;if(a["text-color"]&&(u=e.parse(a["text-color"],1,Pi),!u))return null;var d=r[r.length-1];d.scale=l,d.font=h,d.textColor=u}else{var c=e.parse(t[s],1,ht);if(!c)return null;var f=c.type.kind;if(f!=="string"&&f!=="value"&&f!=="null"&&f!=="resolvedImage")return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,r.push({content:c,scale:null,font:null,textColor:null})}}return new cn(r)},cn.prototype.evaluate=function(t){var e=function(n){var r=n.content.evaluate(t);return te(r)===Wo?new fu("",r,null,null,null):new fu(Ho(r),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null)};return new Ae(this.sections.map(e))},cn.prototype.eachChild=function(t){for(var e=0,n=this.sections;e<n.length;e+=1){var r=n[e];t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor)}},cn.prototype.outputDefined=function(){return!1},cn.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var r=n[e];t.push(r.content.serialize());var o={};r.scale&&(o["font-scale"]=r.scale.serialize()),r.font&&(o["text-font"]=r.font.serialize()),r.textColor&&(o["text-color"]=r.textColor.serialize()),t.push(o)}return t};var fn=function(t){this.type=Wo,this.input=t};fn.parse=function(t,e){if(t.length!==2)return e.error("Expected two arguments.");var n=e.parse(t[1],1,mt);return n?new fn(n):e.error("No image name provided.")},fn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=fi.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n},fn.prototype.eachChild=function(t){t(this.input)},fn.prototype.outputDefined=function(){return!1},fn.prototype.serialize=function(){return["image",this.input.serialize()]};var Qx={"to-boolean":lt,"to-color":Pi,"to-number":L,"to-string":mt},Ze=function(t,e){this.type=t,this.args=e};Ze.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[0];if((n==="to-boolean"||n==="to-string")&&t.length!==2)return e.error("Expected one argument.");for(var r=Qx[n],o=[],s=1;s<t.length;s++){var a=e.parse(t[s],s,ht);if(!a)return null;o.push(a)}return new Ze(r,o)},Ze.prototype.evaluate=function(t){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(t));if(this.type.kind==="color"){for(var e,n,r=0,o=this.args;r<o.length;r+=1){var s=o[r];if(e=s.evaluate(t),n=null,e instanceof It)return e;if(typeof e=="string"){var a=t.parseColor(e);if(a)return a}else if(Array.isArray(e)&&(e.length<3||e.length>4?n="Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":n=cg(e[0],e[1],e[2],e[3]),!n))return new It(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new oe(n||"Could not parse color from value '"+(typeof e=="string"?e:String(JSON.stringify(e)))+"'")}else if(this.type.kind==="number"){for(var l=null,h=0,u=this.args;h<u.length;h+=1){var d=u[h];if(l=d.evaluate(t),l===null)return 0;var c=Number(l);if(!isNaN(c))return c}throw new oe("Could not convert "+JSON.stringify(l)+" to number.")}else return this.type.kind==="formatted"?Ae.fromString(Ho(this.args[0].evaluate(t))):this.type.kind==="resolvedImage"?fi.fromString(Ho(this.args[0].evaluate(t))):Ho(this.args[0].evaluate(t))},Ze.prototype.eachChild=function(t){this.args.forEach(t)},Ze.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Ze.prototype.serialize=function(){if(this.type.kind==="formatted")return new cn([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new fn(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var tb=["Unknown","Point","LineString","Polygon"],Ai=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};Ai.prototype.id=function(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null},Ai.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?tb[this.feature.type]:this.feature.type:null},Ai.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ai.prototype.canonicalID=function(){return this.canonical},Ai.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ai.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var t=this.featureDistanceData.center,e=this.featureDistanceData.scale,n=this.featureTileCoord,r=n.x,o=n.y,s=r*e-t[0],a=o*e-t[1],l=this.featureDistanceData.bearing[0],h=this.featureDistanceData.bearing[1],u=l*s+h*a;return u}return 0},Ai.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=It.parse(t)),e};var me=function(t,e,n,r){this.name=t,this.type=e,this._evaluate=n,this.args=r};me.prototype.evaluate=function(t){return this._evaluate(t,this.args)},me.prototype.eachChild=function(t){this.args.forEach(t)},me.prototype.outputDefined=function(){return!1},me.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},me.parse=function(t,e){var n,r=t[0],o=me.definitions[r];if(!o)return e.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var s=Array.isArray(o)?o[0]:o.type,a=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,l=a.filter(function(P){var at=P[0];return!Array.isArray(at)||at.length===t.length-1}),h=null,u=0,d=l;u<d.length;u+=1){var c=d[u],f=c[0],g=c[1];h=new vn(e.registry,e.path,null,e.scope);for(var m=[],p=!1,_=1;_<t.length;_++){var v=t[_],y=Array.isArray(f)?f[_-1]:f.type,x=h.parse(v,1+m.length,y);if(!x){p=!0;break}m.push(x)}if(!p){if(Array.isArray(f)&&f.length!==m.length){h.error("Expected "+f.length+" arguments, but found "+m.length+" instead.");continue}for(var k=0;k<m.length;k++){var w=Array.isArray(f)?f[k]:f.type,M=m[k];h.concat(k+1).checkSubtype(w,M.type)}if(h.errors.length===0)return new me(r,s,g,m)}}if(l.length===1)(n=e.errors).push.apply(n,h.errors);else{for(var E=l.length?l:a,S=E.map(function(P){var at=P[0];return eb(at)}).join(" | "),I=[],A=1;A<t.length;A++){var G=e.parse(t[A],1+I.length);if(!G)return null;I.push(qt(G.type))}e.error("Expected arguments of type "+S+", but found ("+I.join(", ")+") instead.")}return null},me.register=function(t,e){me.definitions=e;for(var n in e)t[n]=me};function eb(i){return Array.isArray(i)?"("+i.map(qt).join(", ")+")":"("+qt(i.type)+"...)"}var gn=function(t,e,n){this.type=Ia,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};gn.parse=function(t,e){if(t.length!==2)return e.error("Expected one argument.");var n=t[1];if(typeof n!="object"||Array.isArray(n))return e.error("Collator options argument must be an object.");var r=e.parse(n["case-sensitive"]===void 0?!1:n["case-sensitive"],1,lt);if(!r)return null;var o=e.parse(n["diacritic-sensitive"]===void 0?!1:n["diacritic-sensitive"],1,lt);if(!o)return null;var s=null;return n.locale&&(s=e.parse(n.locale,1,mt),!s)?null:new gn(r,o,s)},gn.prototype.evaluate=function(t){return new Zo(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},gn.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},gn.prototype.outputDefined=function(){return!1},gn.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var mn=8192;function mu(i,t){i[0]=Math.min(i[0],t[0]),i[1]=Math.min(i[1],t[1]),i[2]=Math.max(i[2],t[0]),i[3]=Math.max(i[3],t[1])}function ib(i){return(180+i)/360}function nb(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function Aa(i,t){return!(i[0]<=t[0]||i[2]>=t[2]||i[1]<=t[1]||i[3]>=t[3])}function rb(i,t){var e=ib(i[0]),n=nb(i[1]),r=Math.pow(2,t.z);return[Math.round(e*r*mn),Math.round(n*r*mn)]}function ob(i,t,e){var n=i[0]-t[0],r=i[1]-t[1],o=i[0]-e[0],s=i[1]-e[1];return n*s-o*r===0&&n*o<=0&&r*s<=0}function sb(i,t,e){return t[1]>i[1]!=e[1]>i[1]&&i[0]<(e[0]-t[0])*(i[1]-t[1])/(e[1]-t[1])+t[0]}function pu(i,t){for(var e=!1,n=0,r=t.length;n<r;n++)for(var o=t[n],s=0,a=o.length;s<a-1;s++){if(ob(i,o[s],o[s+1]))return!1;sb(i,o[s],o[s+1])&&(e=!e)}return e}function ab(i,t){for(var e=0;e<t.length;e++)if(pu(i,t[e]))return!0;return!1}function lb(i,t){return i[0]*t[1]-i[1]*t[0]}function fg(i,t,e,n){var r=i[0]-e[0],o=i[1]-e[1],s=t[0]-e[0],a=t[1]-e[1],l=n[0]-e[0],h=n[1]-e[1],u=r*h-l*o,d=s*h-l*a;return u>0&&d<0||u<0&&d>0}function hb(i,t,e,n){var r=[t[0]-i[0],t[1]-i[1]],o=[n[0]-e[0],n[1]-e[1]];return lb(o,r)===0?!1:!!(fg(i,t,e,n)&&fg(e,n,i,t))}function ub(i,t,e){for(var n=0,r=e;n<r.length;n+=1)for(var o=r[n],s=0;s<o.length-1;++s)if(hb(i,t,o[s],o[s+1]))return!0;return!1}function gg(i,t){for(var e=0;e<i.length;++e)if(!pu(i[e],t))return!1;for(var n=0;n<i.length-1;++n)if(ub(i[n],i[n+1],t))return!1;return!0}function db(i,t){for(var e=0;e<t.length;e++)if(gg(i,t[e]))return!0;return!1}function vu(i,t,e){for(var n=[],r=0;r<i.length;r++){for(var o=[],s=0;s<i[r].length;s++){var a=rb(i[r][s],e);mu(t,a),o.push(a)}n.push(o)}return n}function mg(i,t,e){for(var n=[],r=0;r<i.length;r++){var o=vu(i[r],t,e);n.push(o)}return n}function pg(i,t,e,n){if(i[0]<e[0]||i[0]>e[2]){var r=n*.5,o=i[0]-e[0]>r?-n:e[0]-i[0]>r?n:0;o===0&&(o=i[0]-e[2]>r?-n:e[2]-i[0]>r?n:0),i[0]+=o}mu(t,i)}function cb(i){i[0]=i[1]=1/0,i[2]=i[3]=-1/0}function vg(i,t,e,n){var r=Math.pow(2,n.z)*mn,o=[n.x*mn,n.y*mn],s=[];if(!i)return s;for(var a=0,l=i;a<l.length;a+=1)for(var h=l[a],u=0,d=h;u<d.length;u+=1){var c=d[u],f=[c.x+o[0],c.y+o[1]];pg(f,t,e,r),s.push(f)}return s}function _g(i,t,e,n){var r=Math.pow(2,n.z)*mn,o=[n.x*mn,n.y*mn],s=[];if(!i)return s;for(var a=0,l=i;a<l.length;a+=1){for(var h=l[a],u=[],d=0,c=h;d<c.length;d+=1){var f=c[d],g=[f.x+o[0],f.y+o[1]];mu(t,g),u.push(g)}s.push(u)}if(t[2]-t[0]<=r/2){cb(t);for(var m=0,p=s;m<p.length;m+=1)for(var _=p[m],v=0,y=_;v<y.length;v+=1){var x=y[v];pg(x,t,e,r)}}return s}function fb(i,t){var e=[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(t.type==="Polygon"){var o=vu(t.coordinates,n,r),s=vg(i.geometry(),e,n,r);if(!Aa(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!pu(h,o))return!1}}if(t.type==="MultiPolygon"){var u=mg(t.coordinates,n,r),d=vg(i.geometry(),e,n,r);if(!Aa(e,n))return!1;for(var c=0,f=d;c<f.length;c+=1){var g=f[c];if(!ab(g,u))return!1}}return!0}function gb(i,t){var e=[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(t.type==="Polygon"){var o=vu(t.coordinates,n,r),s=_g(i.geometry(),e,n,r);if(!Aa(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!gg(h,o))return!1}}if(t.type==="MultiPolygon"){var u=mg(t.coordinates,n,r),d=_g(i.geometry(),e,n,r);if(!Aa(e,n))return!1;for(var c=0,f=d;c<f.length;c+=1){var g=f[c];if(!db(g,u))return!1}}return!0}var ri=function(t,e){this.type=lt,this.geojson=t,this.geometries=e};ri.parse=function(t,e){if(t.length!==2)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(Pa(t[1])){var n=t[1];if(n.type==="FeatureCollection")for(var r=0;r<n.features.length;++r){var o=n.features[r].geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new ri(n,n.features[r].geometry)}else if(n.type==="Feature"){var s=n.geometry.type;if(s==="Polygon"||s==="MultiPolygon")return new ri(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new ri(n,n)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},ri.prototype.evaluate=function(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return fb(t,this.geometries);if(t.geometryType()==="LineString")return gb(t,this.geometries)}return!1},ri.prototype.eachChild=function(){},ri.prototype.outputDefined=function(){return!0},ri.prototype.serialize=function(){return["within",this.geojson]};function Da(i){if(i instanceof me){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 ri)return!1;var t=!0;return i.eachChild(function(e){t&&!Da(e)&&(t=!1)}),t}function _u(i){if(i instanceof me&&i.name==="feature-state")return!1;var t=!0;return i.eachChild(function(e){t&&!_u(e)&&(t=!1)}),t}function yu(i,t){if(i instanceof me&&t.indexOf(i.name)>=0)return!1;var e=!0;return i.eachChild(function(n){e&&!yu(n,t)&&(e=!1)}),e}var pn=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};pn.parse=function(t,e){if(t.length!==2||typeof t[1]!="string")return e.error("'var' expression requires exactly one string literal argument.");var n=t[1];return e.scope.has(n)?new pn(n,e.scope.get(n)):e.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},pn.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},pn.prototype.eachChild=function(){},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){return["var",this.name]};var vn=function(t,e,n,r,o){e===void 0&&(e=[]),r===void 0&&(r=new $o),o===void 0&&(o=[]),this.registry=t,this.path=e,this.key=e.map(function(s){return"["+s+"]"}).join(""),this.scope=r,this.errors=o,this.expectedType=n};vn.prototype.parse=function(t,e,n,r,o){return o===void 0&&(o={}),e?this.concat(e,n,r)._parse(t,o):this._parse(t,o)},vn.prototype._parse=function(t,e){(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number")&&(t=["literal",t]);function n(u,d,c){return c==="assert"?new Ee(d,[u]):c==="coerce"?new Ze(d,[u]):u}if(Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[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 o=this.registry[r];if(o){var s=o.parse(t,this);if(!s)return null;if(this.expectedType){var a=this.expectedType,l=s.type;if((a.kind==="string"||a.kind==="number"||a.kind==="boolean"||a.kind==="object"||a.kind==="array")&&l.kind==="value")s=n(s,a,e.typeAnnotation||"assert");else if((a.kind==="color"||a.kind==="formatted"||a.kind==="resolvedImage")&&(l.kind==="value"||l.kind==="string"))s=n(s,a,e.typeAnnotation||"coerce");else if(this.checkSubtype(a,l))return null}if(!(s instanceof gi)&&s.type.kind!=="resolvedImage"&&xu(s)){var h=new Ai;try{s=new gi(s.type,s.evaluate(h))}catch(u){return this.error(u.message),null}}return s}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof t>"u"?this.error("'undefined' value invalid. Use null instead."):typeof t=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},vn.prototype.concat=function(t,e,n){var r=typeof t=="number"?this.path.concat(t):this.path,o=n?this.scope.concat(n):this.scope;return new vn(this.registry,r,e||null,o,this.errors)},vn.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=""+this.key+e.map(function(o){return"["+o+"]"}).join("");this.errors.push(new ci(r,t))},vn.prototype.checkSubtype=function(t,e){var n=Yo(t,e);return n&&this.error(n),n};function xu(i){if(i instanceof pn)return xu(i.boundExpression);if(i instanceof me&&i.name==="error")return!1;if(i instanceof gn)return!1;if(i instanceof ri)return!1;var t=i instanceof Ze||i instanceof Ee,e=!0;return i.eachChild(function(n){t?e=e&&xu(n):e=e&&n instanceof gi}),e?Da(i)&&yu(i,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function yg(i,t){for(var e=i.length-1,n=0,r=e,o=0,s,a;n<=r;)if(o=Math.floor((n+r)/2),s=i[o],a=i[o+1],s<=t){if(o===e||t<a)return o;n=o+1}else if(s>t)r=o-1;else throw new oe("Input is not a number.");return 0}var _n=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var r=0,o=n;r<o.length;r+=1){var s=o[r],a=s[0],l=s[1];this.labels.push(a),this.outputs.push(l)}};_n.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");var n=e.parse(t[1],1,L);if(!n)return null;var r=[],o=null;e.expectedType&&e.expectedType.kind!=="value"&&(o=e.expectedType);for(var s=1;s<t.length;s+=2){var a=s===1?-1/0:t[s],l=t[s+1],h=s,u=s+1;if(typeof a!="number")return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(r.length&&r[r.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',h);var d=e.parse(l,u,o);if(!d)return null;o=o||d.type,r.push([a,d])}return new _n(o,n,r)},_n.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var o=e.length;if(r>=e[o-1])return n[o-1].evaluate(t);var s=yg(e,r);return n[s].evaluate(t)},_n.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var r=n[e];t(r)}},_n.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},_n.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var mb=Vr;function Vr(i,t,e,n){this.cx=3*i,this.bx=3*(e-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=n,this.p2x=e,this.p2y=n}Vr.prototype.sampleCurveX=function(i){return((this.ax*i+this.bx)*i+this.cx)*i},Vr.prototype.sampleCurveY=function(i){return((this.ay*i+this.by)*i+this.cy)*i},Vr.prototype.sampleCurveDerivativeX=function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},Vr.prototype.solveCurveX=function(i,t){typeof t>"u"&&(t=1e-6);var e,n,r,o,s;for(r=i,s=0;s<8;s++){if(o=this.sampleCurveX(r)-i,Math.abs(o)<t)return r;var a=this.sampleCurveDerivativeX(r);if(Math.abs(a)<1e-6)break;r=r-o/a}if(e=0,n=1,r=i,r<e)return e;if(r>n)return n;for(;e<n;){if(o=this.sampleCurveX(r),Math.abs(o-i)<t)return r;i>o?e=r:n=r,r=(n-e)*.5+e}return r},Vr.prototype.solve=function(i,t){return this.sampleCurveY(this.solveCurveX(i,t))};function Be(i,t,e){return i*(1-e)+t*e}function pb(i,t,e){return new It(Be(i.r,t.r,e),Be(i.g,t.g,e),Be(i.b,t.b,e),Be(i.a,t.a,e))}function vb(i,t,e){return i.map(function(n,r){return Be(n,t[r],e)})}var _b=Object.freeze({__proto__:null,number:Be,color:pb,array:vb}),xg=.95047,bg=1,kg=1.08883,wg=4/29,qr=6/29,Eg=3*qr*qr,yb=qr*qr*qr,xb=Math.PI/180,bb=180/Math.PI;function bu(i){return i>yb?Math.pow(i,1/3):i/Eg+wg}function ku(i){return i>qr?i*i*i:Eg*(i-wg)}function wu(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function Eu(i){return i/=255,i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Mg(i){var t=Eu(i.r),e=Eu(i.g),n=Eu(i.b),r=bu((.4124564*t+.3575761*e+.1804375*n)/xg),o=bu((.2126729*t+.7151522*e+.072175*n)/bg),s=bu((.0193339*t+.119192*e+.9503041*n)/kg);return{l:116*o-16,a:500*(r-o),b:200*(o-s),alpha:i.a}}function Cg(i){var t=(i.l+16)/116,e=isNaN(i.a)?t:t+i.a/500,n=isNaN(i.b)?t:t-i.b/200;return t=bg*ku(t),e=xg*ku(e),n=kg*ku(n),new It(wu(3.2404542*e-1.5371385*t-.4985314*n),wu(-.969266*e+1.8760108*t+.041556*n),wu(.0556434*e-.2040259*t+1.0572252*n),i.alpha)}function kb(i,t,e){return{l:Be(i.l,t.l,e),a:Be(i.a,t.a,e),b:Be(i.b,t.b,e),alpha:Be(i.alpha,t.alpha,e)}}function wb(i){var t=Mg(i),e=t.l,n=t.a,r=t.b,o=Math.atan2(r,n)*bb;return{h:o<0?o+360:o,c:Math.sqrt(n*n+r*r),l:e,alpha:i.a}}function Eb(i){var t=i.h*xb,e=i.c,n=i.l;return Cg({l:n,a:Math.cos(t)*e,b:Math.sin(t)*e,alpha:i.alpha})}function Mb(i,t,e){var n=t-i;return i+e*(n>180||n<-180?n-360*Math.round(n/360):n)}function Cb(i,t,e){return{h:Mb(i.h,t.h,e),c:Be(i.c,t.c,e),l:Be(i.l,t.l,e),alpha:Be(i.alpha,t.alpha,e)}}var La={forward:Mg,reverse:Cg,interpolate:kb},Fa={forward:wb,reverse:Eb,interpolate:Cb},Me=function(t,e,n,r,o){this.type=t,this.operator=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var s=0,a=o;s<a.length;s+=1){var l=a[s],h=l[0],u=l[1];this.labels.push(h),this.outputs.push(u)}};Me.interpolationFactor=function(t,e,n,r){var o=0;if(t.name==="exponential")o=Mu(e,t.base,n,r);else if(t.name==="linear")o=Mu(e,1,n,r);else if(t.name==="cubic-bezier"){var s=t.controlPoints,a=new mb(s[0],s[1],s[2],s[3]);o=a.solve(Mu(e,1,n,r))}return o},Me.parse=function(t,e){var n=t[0],r=t[1],o=t[2],s=t.slice(3);if(!Array.isArray(r)||r.length===0)return e.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 e.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 e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:l}}else return e.error("Unknown interpolation type "+String(r[0]),1,0);if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");if(o=e.parse(o,2,L),!o)return null;var h=[],u=null;n==="interpolate-hcl"||n==="interpolate-lab"?u=Pi:e.expectedType&&e.expectedType.kind!=="value"&&(u=e.expectedType);for(var d=0;d<s.length;d+=2){var c=s[d],f=s[d+1],g=d+3,m=d+4;if(typeof c!="number")return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',g);if(h.length&&h[h.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',g);var p=e.parse(f,m,u);if(!p)return null;u=u||p.type,h.push([c,p])}return u.kind!=="number"&&u.kind!=="color"&&!(u.kind==="array"&&u.itemType.kind==="number"&&typeof u.N=="number")?e.error("Type "+qt(u)+" is not interpolatable."):new Me(u,n,r,o,h)},Me.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var o=e.length;if(r>=e[o-1])return n[o-1].evaluate(t);var s=yg(e,r),a=e[s],l=e[s+1],h=Me.interpolationFactor(this.interpolation,r,a,l),u=n[s].evaluate(t),d=n[s+1].evaluate(t);return this.operator==="interpolate"?_b[this.type.kind.toLowerCase()](u,d,h):this.operator==="interpolate-hcl"?Fa.reverse(Fa.interpolate(Fa.forward(u),Fa.forward(d),h)):La.reverse(La.interpolate(La.forward(u),La.forward(d),h))},Me.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var r=n[e];t(r)}},Me.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},Me.prototype.serialize=function(){var t;this.interpolation.name==="linear"?t=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?t=["linear"]:t=["exponential",this.interpolation.base]:t=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],n=0;n<this.labels.length;n++)e.push(this.labels[n],this.outputs[n].serialize());return e};function Mu(i,t,e,n){var r=n-e,o=i-e;return r===0?0:t===1?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}var Di=function(t,e){this.type=t,this.args=e};Di.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var n=null,r=e.expectedType;r&&r.kind!=="value"&&(n=r);for(var o=[],s=0,a=t.slice(1);s<a.length;s+=1){var l=a[s],h=e.parse(l,1+o.length,n,void 0,{typeAnnotation:"omit"});if(!h)return null;n=n||h.type,o.push(h)}var u=r&&o.some(function(d){return Yo(r,d.type)});return u?new Di(ht,o):new Di(n,o)},Di.prototype.evaluate=function(t){for(var e=null,n=0,r,o=0,s=this.args;o<s.length;o+=1){var a=s[o];if(n++,e=a.evaluate(t),e&&e instanceof fi&&!e.available&&(r||(r=e),e=null,n===this.args.length))return r;if(e!==null)break}return e},Di.prototype.eachChild=function(t){this.args.forEach(t)},Di.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Di.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var yn=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};yn.prototype.evaluate=function(t){return this.result.evaluate(t)},yn.prototype.eachChild=function(t){for(var e=0,n=this.bindings;e<n.length;e+=1){var r=n[e];t(r[1])}t(this.result)},yn.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var n=[],r=1;r<t.length-1;r+=2){var o=t[r];if(typeof o!="string")return e.error("Expected string, but found "+typeof o+" instead.",r);if(/[^a-zA-Z0-9_]/.test(o))return e.error("Variable names must contain only alphanumeric characters or '_'.",r);var s=e.parse(t[r+1],r+1);if(!s)return null;n.push([o,s])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,n);return a?new yn(n,a):null},yn.prototype.outputDefined=function(){return this.result.outputDefined()},yn.prototype.serialize=function(){for(var t=["let"],e=0,n=this.bindings;e<n.length;e+=1){var r=n[e],o=r[0],s=r[1];t.push(o,s.serialize())}return t.push(this.result.serialize()),t};var tr=function(t,e,n){this.type=t,this.index=e,this.input=n};tr.parse=function(t,e){if(t.length!==3)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,L),r=e.parse(t[2],2,Ke(e.expectedType||ht));if(!n||!r)return null;var o=r.type;return new tr(o.itemType,n,r)},tr.prototype.evaluate=function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new oe("Array index out of bounds: "+e+" < 0.");if(e>=n.length)throw new oe("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new oe("Array index must be an integer, but found "+e+" instead.");return n[e]},tr.prototype.eachChild=function(t){t(this.index),t(this.input)},tr.prototype.outputDefined=function(){return!1},tr.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var er=function(t,e){this.type=lt,this.needle=t,this.haystack=e};er.parse=function(t,e){if(t.length!==3)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),r=e.parse(t[2],2,ht);return!n||!r?null:cu(n.type,[lt,mt,L,za,ht])?new er(n,r):e.error("Expected first argument to be of type boolean, string, number or null, but found "+qt(n.type)+" instead")},er.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(n==null)return!1;if(!Ko(e,["boolean","string","number","null"]))throw new oe("Expected first argument to be of type boolean, string, number or null, but found "+qt(te(e))+" instead.");if(!Ko(n,["string","array"]))throw new oe("Expected second argument to be of type array or string, but found "+qt(te(n))+" instead.");return n.indexOf(e)>=0},er.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},er.prototype.outputDefined=function(){return!0},er.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xn=function(t,e,n){this.type=L,this.needle=t,this.haystack=e,this.fromIndex=n};xn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),r=e.parse(t[2],2,ht);if(!n||!r)return null;if(!cu(n.type,[lt,mt,L,za,ht]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+qt(n.type)+" instead");if(t.length===4){var o=e.parse(t[3],3,L);return o?new xn(n,r,o):null}else return new xn(n,r)},xn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!Ko(e,["boolean","string","number","null"]))throw new oe("Expected first argument to be of type boolean, string, number or null, but found "+qt(te(e))+" instead.");if(!Ko(n,["string","array"]))throw new oe("Expected second argument to be of type array or string, but found "+qt(te(n))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(t);return n.indexOf(e,r)}return n.indexOf(e)},xn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},xn.prototype.outputDefined=function(){return!1},xn.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ir=function(t,e,n,r,o,s){this.inputType=t,this.type=e,this.input=n,this.cases=r,this.outputs=o,this.otherwise=s};ir.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!==1)return e.error("Expected an even number of arguments.");var n,r;e.expectedType&&e.expectedType.kind!=="value"&&(r=e.expectedType);for(var o={},s=[],a=2;a<t.length-1;a+=2){var l=t[a],h=t[a+1];Array.isArray(l)||(l=[l]);var u=e.concat(a);if(l.length===0)return u.error("Expected at least one branch label.");for(var d=0,c=l;d<c.length;d+=1){var f=c[d];if(typeof f!="number"&&typeof f!="string")return u.error("Branch labels must be numbers or strings.");if(typeof f=="number"&&Math.abs(f)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof f=="number"&&Math.floor(f)!==f)return u.error("Numeric branch labels must be integer values.");if(!n)n=te(f);else if(u.checkSubtype(n,te(f)))return null;if(typeof o[String(f)]<"u")return u.error("Branch labels must be unique.");o[String(f)]=s.length}var g=e.parse(h,a,r);if(!g)return null;r=r||g.type,s.push(g)}var m=e.parse(t[1],1,ht);if(!m)return null;var p=e.parse(t[t.length-1],t.length-1,r);return!p||m.type.kind!=="value"&&e.concat(1).checkSubtype(n,m.type)?null:new ir(n,r,m,o,s,p)},ir.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=te(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise;return n.evaluate(t)},ir.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},ir.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},ir.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=Object.keys(this.cases).sort(),r=[],o={},s=0,a=n;s<a.length;s+=1){var l=a[s],h=o[this.cases[l]];h===void 0?(o[this.cases[l]]=r.length,r.push([this.cases[l],[l]])):r[h][1].push(l)}for(var u=function(m){return t.inputType.kind==="number"?Number(m):m},d=0,c=r;d<c.length;d+=1){var f=c[d],h=f[0],g=f[1];g.length===1?e.push(u(g[0])):e.push(g.map(u)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var nr=function(t,e,n){this.type=t,this.branches=e,this.otherwise=n};nr.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!==0)return e.error("Expected an odd number of arguments.");var n;e.expectedType&&e.expectedType.kind!=="value"&&(n=e.expectedType);for(var r=[],o=1;o<t.length-1;o+=2){var s=e.parse(t[o],o,lt);if(!s)return null;var a=e.parse(t[o+1],o+1,n);if(!a)return null;r.push([s,a]),n=n||a.type}var l=e.parse(t[t.length-1],t.length-1,n);return l?new nr(n,r,l):null},nr.prototype.evaluate=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var r=n[e],o=r[0],s=r[1];if(o.evaluate(t))return s.evaluate(t)}return this.otherwise.evaluate(t)},nr.prototype.eachChild=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var r=n[e],o=r[0],s=r[1];t(o),t(s)}t(this.otherwise)},nr.prototype.outputDefined=function(){return this.branches.every(function(t){t[0];var e=t[1];return e.outputDefined()})&&this.otherwise.outputDefined()},nr.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var bn=function(t,e,n,r){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=r};bn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),r=e.parse(t[2],2,L);if(!n||!r)return null;if(!cu(n.type,[Ke(ht),mt,ht]))return e.error("Expected first argument to be of type array or string, but found "+qt(n.type)+" instead");if(t.length===4){var o=e.parse(t[3],3,L);return o?new bn(n.type,n,r,o):null}else return new bn(n.type,n,r)},bn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!Ko(e,["string","array"]))throw new oe("Expected first argument to be of type array or string, but found "+qt(te(e))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(t);return e.slice(n,r)}return e.slice(n)},bn.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},bn.prototype.outputDefined=function(){return!1},bn.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Sg(i,t){return i==="=="||i==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function Sb(i,t,e){return t===e}function Tb(i,t,e){return t!==e}function zb(i,t,e){return t<e}function Ib(i,t,e){return t>e}function Rb(i,t,e){return t<=e}function Pb(i,t,e){return t>=e}function Tg(i,t,e,n){return n.compare(t,e)===0}function Ab(i,t,e,n){return!Tg(i,t,e,n)}function Db(i,t,e,n){return n.compare(t,e)<0}function Lb(i,t,e,n){return n.compare(t,e)>0}function Fb(i,t,e,n){return n.compare(t,e)<=0}function Ob(i,t,e,n){return n.compare(t,e)>=0}function Xr(i,t,e){var n=i!=="=="&&i!=="!=";return function(){function r(o,s,a){this.type=lt,this.lhs=o,this.rhs=s,this.collator=a,this.hasUntypedArgument=o.type.kind==="value"||s.type.kind==="value"}return r.parse=function(s,a){if(s.length!==3&&s.length!==4)return a.error("Expected two or three arguments.");var l=s[0],h=a.parse(s[1],1,ht);if(!h)return null;if(!Sg(l,h.type))return a.concat(1).error('"'+l+`" comparisons are not supported for type '`+qt(h.type)+"'.");var u=a.parse(s[2],2,ht);if(!u)return null;if(!Sg(l,u.type))return a.concat(2).error('"'+l+`" comparisons are not supported for type '`+qt(u.type)+"'.");if(h.type.kind!==u.type.kind&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot compare types '"+qt(h.type)+"' and '"+qt(u.type)+"'.");n&&(h.type.kind==="value"&&u.type.kind!=="value"?h=new Ee(u.type,[h]):h.type.kind!=="value"&&u.type.kind==="value"&&(u=new Ee(h.type,[u])));var d=null;if(s.length===4){if(h.type.kind!=="string"&&u.type.kind!=="string"&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot use collator to compare non-string types.");if(d=a.parse(s[3],3,Ia),!d)return null}return new r(h,u,d)},r.prototype.evaluate=function(s){var a=this.lhs.evaluate(s),l=this.rhs.evaluate(s);if(n&&this.hasUntypedArgument){var h=te(a),u=te(l);if(h.kind!==u.kind||!(h.kind==="string"||h.kind==="number"))throw new oe('Expected arguments for "'+i+'" to be (string, string) or (number, number), but found ('+h.kind+", "+u.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var d=te(a),c=te(l);if(d.kind!=="string"||c.kind!=="string")return t(s,a,l)}return this.collator?e(s,a,l,this.collator.evaluate(s)):t(s,a,l)},r.prototype.eachChild=function(s){s(this.lhs),s(this.rhs),this.collator&&s(this.collator)},r.prototype.outputDefined=function(){return!0},r.prototype.serialize=function(){var s=[i];return this.eachChild(function(a){s.push(a.serialize())}),s},r}()}var Nb=Xr("==",Sb,Tg),Gb=Xr("!=",Tb,Ab),jb=Xr("<",zb,Db),Bb=Xr(">",Ib,Lb),Ub=Xr("<=",Rb,Fb),Vb=Xr(">=",Pb,Ob),rr=function(t,e,n,r,o){this.type=mt,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=o};rr.parse=function(t,e){if(t.length!==3)return e.error("Expected two arguments.");var n=e.parse(t[1],1,L);if(!n)return null;var r=t[2];if(typeof r!="object"||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");var o=null;if(r.locale&&(o=e.parse(r.locale,1,mt),!o))return null;var s=null;if(r.currency&&(s=e.parse(r.currency,1,mt),!s))return null;var a=null;if(r["min-fraction-digits"]&&(a=e.parse(r["min-fraction-digits"],1,L),!a))return null;var l=null;return r["max-fraction-digits"]&&(l=e.parse(r["max-fraction-digits"],1,L),!l)?null:new rr(n,o,s,a,l)},rr.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},rr.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},rr.prototype.outputDefined=function(){return!1},rr.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var or=function(t){this.type=L,this.input=t};or.parse=function(t,e){if(t.length!==2)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?e.error("Expected argument of type string or array, but found "+qt(n.type)+" instead."):new or(n):null},or.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(typeof e=="string")return e.length;if(Array.isArray(e))return e.length;throw new oe("Expected value to be of type string or array, but found "+qt(te(e))+" instead.")},or.prototype.eachChild=function(t){t(this.input)},or.prototype.outputDefined=function(){return!1},or.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Cu={"==":Nb,"!=":Gb,">":Bb,"<":jb,">=":Vb,"<=":Ub,array:Ee,at:tr,boolean:Ee,case:nr,coalesce:Di,collator:gn,format:cn,image:fn,in:er,"index-of":xn,interpolate:Me,"interpolate-hcl":Me,"interpolate-lab":Me,length:or,let:yn,literal:gi,match:ir,number:Ee,"number-format":rr,object:Ee,slice:bn,step:_n,string:Ee,"to-boolean":Ze,"to-color":Ze,"to-number":Ze,"to-string":Ze,var:pn,within:ri};function zg(i,t){var e=t[0],n=t[1],r=t[2],o=t[3];e=e.evaluate(i),n=n.evaluate(i),r=r.evaluate(i);var s=o?o.evaluate(i):1,a=cg(e,n,r,s);if(a)throw new oe(a);return new It(e/255*s,n/255*s,r/255*s,s)}function Ig(i,t){return i in t}function Su(i,t){var e=t[i];return typeof e>"u"?null:e}function qb(i,t,e,n){for(;e<=n;){var r=e+n>>1;if(t[r]===i)return!0;t[r]>i?n=r-1:e=r+1}return!1}function sr(i){return{type:i}}me.register(Cu,{error:[Hx,[mt],function(i,t){var e=t[0];throw new oe(e.evaluate(i))}],typeof:[mt,[ht],function(i,t){var e=t[0];return qt(te(e.evaluate(i)))}],"to-rgba":[Ke(L,4),[Pi],function(i,t){var e=t[0];return e.evaluate(i).toArray()}],rgb:[Pi,[L,L,L],zg],rgba:[Pi,[L,L,L,L],zg],has:{type:lt,overloads:[[[mt],function(i,t){var e=t[0];return Ig(e.evaluate(i),i.properties())}],[[mt,Ur],function(i,t){var e=t[0],n=t[1];return Ig(e.evaluate(i),n.evaluate(i))}]]},get:{type:ht,overloads:[[[mt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.properties())}],[[mt,Ur],function(i,t){var e=t[0],n=t[1];return Su(e.evaluate(i),n.evaluate(i))}]]},"feature-state":[ht,[mt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.featureState||{})}],properties:[Ur,[],function(i){return i.properties()}],"geometry-type":[mt,[],function(i){return i.geometryType()}],id:[ht,[],function(i){return i.id()}],zoom:[L,[],function(i){return i.globals.zoom}],pitch:[L,[],function(i){return i.globals.pitch||0}],"distance-from-center":[L,[],function(i){return i.distanceFromCenter()}],"heatmap-density":[L,[],function(i){return i.globals.heatmapDensity||0}],"line-progress":[L,[],function(i){return i.globals.lineProgress||0}],"sky-radial-progress":[L,[],function(i){return i.globals.skyRadialProgress||0}],accumulated:[ht,[],function(i){return i.globals.accumulated===void 0?null:i.globals.accumulated}],"+":[L,sr(L),function(i,t){for(var e=0,n=0,r=t;n<r.length;n+=1){var o=r[n];e+=o.evaluate(i)}return e}],"*":[L,sr(L),function(i,t){for(var e=1,n=0,r=t;n<r.length;n+=1){var o=r[n];e*=o.evaluate(i)}return e}],"-":{type:L,overloads:[[[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)-n.evaluate(i)}],[[L],function(i,t){var e=t[0];return-e.evaluate(i)}]]},"/":[L,[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)/n.evaluate(i)}],"%":[L,[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)%n.evaluate(i)}],ln2:[L,[],function(){return Math.LN2}],pi:[L,[],function(){return Math.PI}],e:[L,[],function(){return Math.E}],"^":[L,[L,L],function(i,t){var e=t[0],n=t[1];return Math.pow(e.evaluate(i),n.evaluate(i))}],sqrt:[L,[L],function(i,t){var e=t[0];return Math.sqrt(e.evaluate(i))}],log10:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN10}],ln:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))}],log2:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN2}],sin:[L,[L],function(i,t){var e=t[0];return Math.sin(e.evaluate(i))}],cos:[L,[L],function(i,t){var e=t[0];return Math.cos(e.evaluate(i))}],tan:[L,[L],function(i,t){var e=t[0];return Math.tan(e.evaluate(i))}],asin:[L,[L],function(i,t){var e=t[0];return Math.asin(e.evaluate(i))}],acos:[L,[L],function(i,t){var e=t[0];return Math.acos(e.evaluate(i))}],atan:[L,[L],function(i,t){var e=t[0];return Math.atan(e.evaluate(i))}],min:[L,sr(L),function(i,t){return Math.min.apply(Math,t.map(function(e){return e.evaluate(i)}))}],max:[L,sr(L),function(i,t){return Math.max.apply(Math,t.map(function(e){return e.evaluate(i)}))}],abs:[L,[L],function(i,t){var e=t[0];return Math.abs(e.evaluate(i))}],round:[L,[L],function(i,t){var e=t[0],n=e.evaluate(i);return n<0?-Math.round(-n):Math.round(n)}],floor:[L,[L],function(i,t){var e=t[0];return Math.floor(e.evaluate(i))}],ceil:[L,[L],function(i,t){var e=t[0];return Math.ceil(e.evaluate(i))}],"filter-==":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1];return i.properties()[e.value]===n.value}],"filter-id-==":[lt,[ht],function(i,t){var e=t[0];return i.id()===e.value}],"filter-type-==":[lt,[mt],function(i,t){var e=t[0];return i.geometryType()===e.value}],"filter-<":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r<o}],"filter-id-<":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n<r}],"filter->":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r>o}],"filter-id->":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n>r}],"filter-<=":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n<=r}],"filter->=":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n>=r}],"filter-has":[lt,[ht],function(i,t){var e=t[0];return e.value in i.properties()}],"filter-has-id":[lt,[],function(i){return i.id()!==null&&i.id()!==void 0}],"filter-type-in":[lt,[Ke(mt)],function(i,t){var e=t[0];return e.value.indexOf(i.geometryType())>=0}],"filter-id-in":[lt,[Ke(ht)],function(i,t){var e=t[0];return e.value.indexOf(i.id())>=0}],"filter-in-small":[lt,[mt,Ke(ht)],function(i,t){var e=t[0],n=t[1];return n.value.indexOf(i.properties()[e.value])>=0}],"filter-in-large":[lt,[mt,Ke(ht)],function(i,t){var e=t[0],n=t[1];return qb(i.properties()[e.value],n.value,0,n.value.length-1)}],all:{type:lt,overloads:[[[lt,lt],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)&&n.evaluate(i)}],[sr(lt),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var r=n[e];if(!r.evaluate(i))return!1}return!0}]]},any:{type:lt,overloads:[[[lt,lt],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)||n.evaluate(i)}],[sr(lt),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var r=n[e];if(r.evaluate(i))return!0}return!1}]]},"!":[lt,[lt],function(i,t){var e=t[0];return!e.evaluate(i)}],"is-supported-script":[lt,[mt],function(i,t){var e=t[0],n=i.globals&&i.globals.isSupportedScript;return n?n(e.evaluate(i)):!0}],upcase:[mt,[mt],function(i,t){var e=t[0];return e.evaluate(i).toUpperCase()}],downcase:[mt,[mt],function(i,t){var e=t[0];return e.evaluate(i).toLowerCase()}],concat:[mt,sr(ht),function(i,t){return t.map(function(e){return Ho(e.evaluate(i))}).join("")}],"resolved-locale":[mt,[Ia],function(i,t){var e=t[0];return e.evaluate(i).resolvedLocale()}]});function Tu(i){return{result:"success",value:i}}function $r(i){return{result:"error",value:i}}function Xb(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function $b(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function Wb(i){return!!i.expression&&i.expression.interpolated}function Rg(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}var zu=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new Ai,this._defaultValue=e?Hb(e):null,this._enumValues=e&&e.type==="enum"?e.values:null};zu.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,o,s,a,l){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=r||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)},zu.prototype.evaluate=function(t,e,n,r,o,s,a,l){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null;try{var h=this.expression.evaluate(this._evaluator);if(h==null||typeof h=="number"&&h!==h)return this._defaultValue;if(this._enumValues&&!(h in this._enumValues))throw new oe("Expected value to be one of "+Object.keys(this._enumValues).map(function(u){return JSON.stringify(u)}).join(", ")+", but found "+JSON.stringify(h)+" instead.");return h}catch(u){return this._warningHistory[u.message]||(this._warningHistory[u.message]=!0,typeof console<"u"&&console.warn(u.message)),this._defaultValue}};function Yb(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Cu}function Iu(i,t){var e=new vn(Cu,[],t?Zb(t):void 0),n=e.parse(i,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return n?Tu(new zu(n,t)):$r(e.errors)}var Oa=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!_u(e.expression)};Oa.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,o,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,o,s)},Oa.prototype.evaluate=function(t,e,n,r,o,s){return this._styleExpression.evaluate(t,e,n,r,o,s)};var Jo=function(t,e,n,r){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!_u(e.expression),this.interpolationType=r};Jo.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,o,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,o,s)},Jo.prototype.evaluate=function(t,e,n,r,o,s){return this._styleExpression.evaluate(t,e,n,r,o,s)},Jo.prototype.interpolationFactor=function(t,e,n){return this.interpolationType?Me.interpolationFactor(this.interpolationType,t,e,n):0};function Kb(i,t){if(i=Iu(i,t),i.result==="error")return i;var e=i.value.expression,n=Da(e);if(!n&&!Xb(t))return $r([new ci("","data expressions not supported")]);var r=yu(e,["zoom","pitch","distance-from-center"]);if(!r&&!$b(t))return $r([new ci("","zoom expressions not supported")]);var o=Na(e);if(!o&&!r)return $r([new ci("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof ci)return $r([o]);if(o instanceof Me&&!Wb(t))return $r([new ci("",'"interpolate" expressions cannot be used with this property')]);if(!o)return Tu(n?new Oa("constant",i.value):new Oa("source",i.value));var s=o instanceof Me?o.interpolation:void 0;return Tu(n?new Jo("camera",i.value,o.labels,s):new Jo("composite",i.value,o.labels,s))}function Na(i){var t=null;if(i instanceof yn)t=Na(i.result);else if(i instanceof Di)for(var e=0,n=i.args;e<n.length;e+=1){var r=n[e];if(t=Na(r),t)break}else(i instanceof _n||i instanceof Me)&&i.input instanceof me&&i.input.name==="zoom"&&(t=i);return t instanceof ci||i.eachChild(function(o){var s=Na(o);s instanceof ci?t=s:!t&&s?t=new ci("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&s&&t!==s&&(t=new ci("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Zb(i){var t={color:Pi,string:mt,number:L,enum:mt,boolean:lt,formatted:Ra,resolvedImage:Wo};return i.type==="array"?Ke(t[i.value]||ht,i.length):t[i.type]}function Hb(i){return i.type==="color"&&(Rg(i.default)||Array.isArray(i.default))?new It(0,0,0,0):i.type==="color"?It.parse(i.default)||null:i.default===void 0?null:i.default}function Jb(i){return i instanceof Number||i instanceof String||i instanceof Boolean?i.valueOf():i}function Ru(i){if(Array.isArray(i))return i.map(Ru);if(i instanceof Object&&!(i instanceof Number||i instanceof String||i instanceof Boolean)){var t={};for(var e in i)t[e]=Ru(i[e]);return t}return Jb(i)}var Pg={$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"}},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:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-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:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},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"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function Ag(i){if(i===!0||i===!1)return!0;if(!Array.isArray(i)||i.length===0)return!1;switch(i[0]){case"has":return i.length>=2&&i[1]!=="$id"&&i[1]!=="$type";case"in":return i.length>=3&&(typeof i[1]!="string"||Array.isArray(i[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return i.length!==3||Array.isArray(i[1])||Array.isArray(i[2]);case"any":case"all":for(var t=0,e=i.slice(1);t<e.length;t+=1){var n=e[t];if(!Ag(n)&&typeof n!="boolean")return!1}return!0;default:return!0}}function Qb(i,t){if(t===void 0&&(t="fill"),i==null)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};Ag(i)||(i=Ga(i));var e=i,n=!0;try{n=tk(e)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
|
40
|
+
`+f;Ei.get(m)===void 0&&(Ei.set(m,100,!0),a(u.style,u.weight,f)||(Ei.set(m,0,!0),r===void 0&&(r=setInterval(l,32))))}}}(),ov=function(){let i;return function(t){let e=Hl[t];if(e==null){if(bl){const n=Vd(t),o=Mc(t,"\u017Dg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(o.actualBoundingBoxAscent+o.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=t,document.body.appendChild(i),e=i.offsetHeight,document.body.removeChild(i);Hl[t]=e}return e}}();function Mc(i,t){return zo||(zo=Ae(1,1)),i!=$l&&(zo.font=i,$l=zo.font),zo.measureText(t)}function Ks(i,t){return Mc(i,t).width}function Cc(i,t,e){if(t in e)return e[t];const n=t.split(`
|
41
|
+
`).reduce((o,r)=>Math.max(o,Ks(i,r)),0);return e[t]=n,n}function rv(i,t){const e=[],n=[],o=[];let r=0,s=0,a=0,l=0;for(let h=0,u=t.length;h<=u;h+=2){const d=t[h];if(d===`
|
42
|
+
`||h===u){r=Math.max(r,s),o.push(s),s=0,a+=l;continue}const c=t[h+1]||i.font,g=Ks(c,d);e.push(g),s+=g;const f=ov(c);n.push(f),l=Math.max(l,f)}return{width:r,height:a,widths:e,heights:n,lineWidths:o}}function sv(i,t,e,n,o,r,s,a,l,h,u){i.save(),e!==1&&(i.globalAlpha*=e),t&&i.setTransform.apply(i,t),n.contextInstructions?(i.translate(l,h),i.scale(u[0],u[1]),av(n,i)):u[0]<0||u[1]<0?(i.translate(l,h),i.scale(u[0],u[1]),i.drawImage(n,o,r,s,a,0,0,s,a)):i.drawImage(n,o,r,s,a,l,h,s*u[0],a*u[1]),i.restore()}function av(i,t){const e=i.contextInstructions;for(let n=0,o=e.length;n<o;n+=2)Array.isArray(e[n+1])?t[e[n]].apply(t,e[n+1]):t[e[n]]=e[n+1]}class lv extends ev{constructor(t){super(t),this.fontChangeListenerKey_=ft(Ei,yo.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=pr+" ol-layers";const n=t.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const n=this.getMap();if(n.hasListener(t)){const o=new kc(t,void 0,e);n.dispatchEvent(o)}}disposeInternal(){Ft(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(Vi.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(s,a){return s.zIndex-a.zIndex}),n=t.viewState;this.children_.length=0;const o=[];let r=null;for(let s=0,a=e.length;s<a;++s){const l=e[s];t.layerIndex=s;const h=l.layer,u=h.getSourceState();if(!Cl(l,n)||u!="ready"&&u!="undefined"){h.unrender();continue}const d=h.render(t,r);!d||(d!==r&&(this.children_.push(d),r=d),"getDeclutter"in h&&o.push(h))}for(let s=o.length-1;s>=0;--s)o[s].renderDeclutter(t);r0(this.element_,this.children_),this.dispatchRenderEvent(Vi.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}}const hv=lv;class Ki extends Qe{constructor(t,e){super(t),this.layer=e}}const Kl={LAYERS:"layers"};class Jl extends Hd{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let n=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Kl.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new Ve(n.slice(),{unique:!0}):gt(typeof n.getArray=="function",43):n=new Ve(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Ft),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(ft(t,oe.ADD,this.handleLayersAdd_,this),ft(t,oe.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(Ft);mr(this.listenerKeys_);const e=t.getArray();for(let n=0,o=e.length;n<o;n++){const r=e[n];this.registerLayerListeners_(r),this.dispatchEvent(new Ki("addlayer",r))}this.changed()}registerLayerListeners_(t){const e=[ft(t,yo.PROPERTYCHANGE,this.handleLayerChange_,this),ft(t,tt.CHANGE,this.handleLayerChange_,this)];t instanceof Jl&&e.push(ft(t,"addlayer",this.handleLayerGroupAdd_,this),ft(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[$(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Ki("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Ki("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Ki("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,n=$(e);this.listenerKeys_[n].forEach(Ft),delete this.listenerKeys_[n],this.dispatchEvent(new Ki("removelayer",e)),this.changed()}getLayers(){return this.get(Kl.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const n=e.getArray();for(let o=0,r=n.length;o<r;++o)this.dispatchEvent(new Ki("removelayer",n[o]))}this.set(Kl.LAYERS,t)}getLayersArray(t){return t=t!==void 0?t:[],this.getLayers().forEach(function(e){e.getLayersArray(t)}),t}getLayerStatesArray(t){const e=t!==void 0?t:[],n=e.length;this.getLayers().forEach(function(s){s.getLayerStatesArray(e)});const o=this.getLayerState();let r=o.zIndex;!t&&o.zIndex===void 0&&(r=0);for(let s=n,a=e.length;s<a;s++){const l=e[s];l.opacity*=o.opacity,l.visible=l.visible&&o.visible,l.maxResolution=Math.min(l.maxResolution,o.maxResolution),l.minResolution=Math.max(l.minResolution,o.minResolution),l.minZoom=Math.max(l.minZoom,o.minZoom),l.maxZoom=Math.min(l.maxZoom,o.maxZoom),o.extent!==void 0&&(l.extent!==void 0?l.extent=Wn(l.extent,o.extent):l.extent=o.extent),l.zIndex===void 0&&(l.zIndex=r)}return e}getSourceState(){return"ready"}}const Js=Jl;class uv extends Qe{constructor(t,e,n){super(t),this.map=e,this.frameState=n!==void 0?n:null}}const Ro=uv;class dv extends Ro{constructor(t,e,n,o,r,s){super(t,e,r),this.originalEvent=n,this.pixel_=null,this.coordinate_=null,this.dragging=o!==void 0?o:!1,this.activePointers=s}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const Si=dv,Mt={SINGLECLICK:"singleclick",CLICK:tt.CLICK,DBLCLICK:tt.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class cv extends zs{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=e===void 0?1:e,this.down_=null;const n=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=n,this.pointerdownListenerKey_=ft(n,El.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=ft(n,El.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_,Zd?{passive:!1}:!1)}emulateClick_(t){let e=new Si(Mt.CLICK,this.map_,t);this.dispatchEvent(e),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Si(Mt.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;const n=new Si(Mt.SINGLECLICK,this.map_,t);this.dispatchEvent(n)}.bind(this),250)}updateActivePointers_(t){const e=t,n=e.pointerId;if(e.type==Mt.POINTERUP||e.type==Mt.POINTERCANCEL){delete this.trackedTouches_[n];for(const o in this.trackedTouches_)if(this.trackedTouches_[o].target!==e.target){delete this.trackedTouches_[o];break}}else(e.type==Mt.POINTERDOWN||e.type==Mt.POINTERMOVE)&&(this.trackedTouches_[n]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new Si(Mt.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Ft),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new Si(Mt.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.down_={};for(const n in t){const o=t[n];this.down_[n]=typeof o=="function"?Ln:o}if(this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(ft(n,Mt.POINTERMOVE,this.handlePointerMove_,this),ft(n,Mt.POINTERUP,this.handlePointerUp_,this),ft(this.element_,Mt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(ft(this.element_.getRootNode(),Mt.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new Si(Mt.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new Si(Mt.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Ft(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Ft(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Ft),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const gv=cv,Qs=1/0;class fv{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,mr(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const o=this.keyFunction_(n);return delete this.queuedElements_[o],n}enqueue(t){gt(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);return e!=Qs?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,n=this.priorities_,o=e.length,r=e[t],s=n[t],a=t;for(;t<o>>1;){const l=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),u=h<o&&n[h]<n[l]?h:l;e[t]=e[u],n[t]=n[u],t=u}e[t]=r,n[t]=s,this.siftDown_(a,t)}siftDown_(t,e){const n=this.elements_,o=this.priorities_,r=n[e],s=o[e];for(;e>t;){const a=this.getParentIndex_(e);if(o[a]>s)n[e]=n[a],o[e]=o[a],e=a;else break}n[e]=r,o[e]=s}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let o=0;const r=e.length;let s,a,l;for(a=0;a<r;++a)s=e[a],l=t(s),l==Qs?delete this.queuedElements_[this.keyFunction_(s)]:(n[o]=l,e[o++]=s);e.length=o,n.length=o,this.heapify_()}}const mv=fv,N={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class pv extends mv{constructor(t,e){super(function(n){return t.apply(null,n)},function(n){return n[0].getKey()}),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(tt.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,n=e.getState();if(n===N.LOADED||n===N.ERROR||n===N.EMPTY){n!==N.ERROR&&e.removeEventListener(tt.CHANGE,this.boundHandleTileChange_);const o=e.getKey();o in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[o],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let n=0,o,r,s;for(;this.tilesLoading_<t&&n<e&&this.getCount()>0;)r=this.dequeue()[0],s=r.getKey(),o=r.getState(),o===N.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++n,r.load())}}const vv=pv;function _v(i,t,e,n,o){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return Qs;const r=i.viewState.center,s=n[0]-r[0],a=n[1]-r[1];return 65536*Math.log(o)+Math.sqrt(s*s+a*a)/o}const qt={ANIMATING:0,INTERACTING:1},ii={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Ec=42,Ql=256;function Sc(i,t,e){return function(n,o,r,s,a){if(!n)return;if(!o&&!t)return n;const l=t?0:r[0]*o,h=t?0:r[1]*o,u=a?a[0]:0,d=a?a[1]:0;let c=i[0]+l/2+u,g=i[2]-l/2+u,f=i[1]+h/2+d,m=i[3]-h/2+d;c>g&&(c=(g+c)/2,g=c),f>m&&(f=(m+f)/2,m=f);let p=Vt(n[0],c,g),_=Vt(n[1],f,m);if(s&&e&&o){const v=30*o;p+=-v*Math.log(1+Math.max(0,c-n[0])/v)+v*Math.log(1+Math.max(0,n[0]-g)/v),_+=-v*Math.log(1+Math.max(0,f-n[1])/v)+v*Math.log(1+Math.max(0,n[1]-m)/v)}return[p,_]}}function yv(i){return i}function th(i,t,e,n){const o=Nt(t)/e[0],r=Ue(t)/e[1];return n?Math.min(i,Math.max(o,r)):Math.min(i,Math.min(o,r))}function eh(i,t,e){let n=Math.min(i,t);const o=50;return n*=Math.log(1+o*Math.max(0,i/t-1))/o+1,e&&(n=Math.max(n,e),n/=Math.log(1+o*Math.max(0,e/i-1))/o+1),Vt(n,e/2,t*2)}function xv(i,t,e,n){return t=t!==void 0?t:!0,function(o,r,s,a){if(o!==void 0){const l=i[0],h=i[i.length-1],u=e?th(l,e,s,n):l;if(a)return t?eh(o,u,h):Vt(o,h,u);const d=Math.min(u,o),c=Math.floor(xl(i,d,r));return i[c]>u&&c<i.length-1?i[c+1]:i[c]}else return}}function bv(i,t,e,n,o,r){return n=n!==void 0?n:!0,e=e!==void 0?e:0,function(s,a,l,h){if(s!==void 0){const u=o?th(t,o,l,r):t;if(h)return n?eh(s,u,e):Vt(s,e,u);const d=1e-9,c=Math.ceil(Math.log(t/u)/Math.log(i)-d),g=-a*(.5-d)+.5,f=Math.min(u,s),m=Math.floor(Math.log(t/f)/Math.log(i)+g),p=Math.max(c,m),_=t/Math.pow(i,p);return Vt(_,e,u)}else return}}function Tc(i,t,e,n,o){return e=e!==void 0?e:!0,function(r,s,a,l){if(r!==void 0){const h=n?th(i,n,a,o):i;return!e||!l?Vt(r,t,h):eh(r,h,t)}else return}}function ih(i){if(i!==void 0)return 0}function Ic(i){if(i!==void 0)return i}function kv(i){const t=2*Math.PI/i;return function(e,n){if(n)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function wv(i){return i=i||Nn(5),function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=i?0:t}}function zc(i){return Math.pow(i,3)}function Ao(i){return 1-zc(1-i)}function Mv(i){return 3*i*i-2*i*i*i}function Cv(i){return i}function Ji(i,t,e,n,o,r){r=r||[];let s=0;for(let a=t;a<e;a+=n){const l=i[a],h=i[a+1];r[s++]=o[0]*l+o[2]*h+o[4],r[s++]=o[1]*l+o[3]*h+o[5]}return r&&r.length!=s&&(r.length=s),r}function nh(i,t,e,n,o,r,s){s=s||[];const a=Math.cos(o),l=Math.sin(o),h=r[0],u=r[1];let d=0;for(let c=t;c<e;c+=n){const g=i[c]-h,f=i[c+1]-u;s[d++]=h+g*a-f*l,s[d++]=u+g*l+f*a;for(let m=c+2;m<c+n;++m)s[d++]=i[m]}return s&&s.length!=d&&(s.length=d),s}function Ev(i,t,e,n,o,r,s,a){a=a||[];const l=s[0],h=s[1];let u=0;for(let d=t;d<e;d+=n){const c=i[d]-l,g=i[d+1]-h;a[u++]=l+o*c,a[u++]=h+r*g;for(let f=d+2;f<d+n;++f)a[u++]=i[f]}return a&&a.length!=u&&(a.length=u),a}function Rc(i,t,e,n,o,r,s){s=s||[];let a=0;for(let l=t;l<e;l+=n){s[a++]=i[l]+o,s[a++]=i[l+1]+r;for(let h=l+2;h<l+n;++h)s[a++]=i[h]}return s&&s.length!=a&&(s.length=a),s}const Ac=qe();class Sv extends hi{constructor(){super(),this.extent_=Ge(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=qp(function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);const o=this.clone();return o.applyTransform(n),o.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return et()}closestPointXY(t,e,n,o){return et()}containsXY(t,e){const n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return et()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&_r(e),this.extentRevision_=this.getRevision()}return S0(this.extent_,t)}rotate(t,e){et()}scale(t,e,n){et()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return et()}getType(){return et()}applyTransform(t){et()}intersectsExtent(t){return et()}translate(t,e){et()}transform(t,e){const n=Gt(t),o=n.getUnits()=="tile-pixels"?function(r,s,a){const l=n.getExtent(),h=n.getWorldExtent(),u=Ue(h)/Ue(l);return Mi(Ac,h[0],h[3],u,-u,0,0,0),Ji(r,0,r.length,a,Ac,s),br(n,e)(r,s,a)}:br(n,e);return this.applyTransform(o),this}}const Pc=Sv;class Tv extends Pc{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return zl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return et()}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(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=ta(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){et()}setLayout(t,e,n){let o;if(t)o=ta(t);else{for(let r=0;r<n;++r)if(e.length===0){this.layout="XY",this.stride=2;return}else e=e[0];o=e.length,t=Iv(o)}this.layout=t,this.stride=o}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const n=this.getFlatCoordinates();if(n){const o=this.getStride();nh(n,0,n.length,o,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=qi(this.getExtent()));const o=this.getFlatCoordinates();if(o){const r=this.getStride();Ev(o,0,o.length,r,t,e,n,o),this.changed()}}translate(t,e){const n=this.getFlatCoordinates();if(n){const o=this.getStride();Rc(n,0,n.length,o,t,e,n),this.changed()}}}function Iv(i){let t;return i==2?t="XY":i==3?t="XYZ":i==4&&(t="XYZM"),t}function ta(i){let t;return i=="XY"?t=2:i=="XYZ"||i=="XYM"?t=3:i=="XYZM"&&(t=4),t}function zv(i,t,e){const n=i.getFlatCoordinates();if(n){const o=i.getStride();return Ji(n,0,n.length,o,t,e)}else return null}const Qi=Tv;function Dc(i,t,e,n,o,r,s){const a=i[t],l=i[t+1],h=i[e]-a,u=i[e+1]-l;let d;if(h===0&&u===0)d=t;else{const c=((o-a)*h+(r-l)*u)/(h*h+u*u);if(c>1)d=e;else if(c>0){for(let g=0;g<n;++g)s[g]=ki(i[t+g],i[e+g],c);s.length=n;return}else d=t}for(let c=0;c<n;++c)s[c]=i[d+c];s.length=n}function oh(i,t,e,n,o){let r=i[t],s=i[t+1];for(t+=n;t<e;t+=n){const a=i[t],l=i[t+1],h=Fn(r,s,a,l);h>o&&(o=h),r=a,s=l}return o}function rh(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];o=oh(i,t,a,n,o),t=a}return o}function Rv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];o=rh(i,t,a,n,o),t=a[a.length-1]}return o}function sh(i,t,e,n,o,r,s,a,l,h,u){if(t==e)return h;let d,c;if(o===0)if(c=Fn(s,a,i[t],i[t+1]),c<h){for(d=0;d<n;++d)l[d]=i[t+d];return l.length=n,c}else return h;u=u||[NaN,NaN];let g=t+n;for(;g<e;)if(Dc(i,g-n,g,n,s,a,u),c=Fn(s,a,u[0],u[1]),c<h){for(h=c,d=0;d<n;++d)l[d]=u[d];l.length=n,g+=n}else g+=n*Math.max((Math.sqrt(c)-Math.sqrt(h))/o|0,1);if(r&&(Dc(i,e-n,t,n,s,a,u),c=Fn(s,a,u[0],u[1]),c<h)){for(h=c,d=0;d<n;++d)l[d]=u[d];l.length=n}return h}function ah(i,t,e,n,o,r,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const g=e[d];h=sh(i,t,g,n,o,r,s,a,l,h,u),t=g}return h}function Av(i,t,e,n,o,r,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const g=e[d];h=ah(i,t,g,n,o,r,s,a,l,h,u),t=g[g.length-1]}return h}function Lc(i,t,e,n){for(let o=0,r=e.length;o<r;++o)i[t++]=e[o];return t}function ea(i,t,e,n){for(let o=0,r=e.length;o<r;++o){const s=e[o];for(let a=0;a<n;++a)i[t++]=s[a]}return t}function lh(i,t,e,n,o){o=o||[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=ea(i,t,e[s],n);o[r++]=l,t=l}return o.length=r,o}function Pv(i,t,e,n,o){o=o||[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=lh(i,t,e[s],n,o[r]);l.length===0&&(l[0]=t),o[r++]=l,t=l[l.length-1]}return o.length=r,o}function hh(i,t,e,n,o,r,s){const a=(e-t)/n;if(a<3){for(;t<e;t+=n)r[s++]=i[t],r[s++]=i[t+1];return s}const l=new Array(a);l[0]=1,l[a-1]=1;const h=[t,e-n];let u=0;for(;h.length>0;){const d=h.pop(),c=h.pop();let g=0;const f=i[c],m=i[c+1],p=i[d],_=i[d+1];for(let v=c+n;v<d;v+=n){const y=i[v],x=i[v+1],k=h0(y,x,f,m,p,_);k>g&&(u=v,g=k)}g>o&&(l[(u-t)/n]=1,c+n<u&&h.push(c,u),u+n<d&&h.push(u,d))}for(let d=0;d<a;++d)l[d]&&(r[s++]=i[t+d*n],r[s++]=i[t+d*n+1]);return s}function Dv(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=hh(i,t,u,n,o,r,s),a.push(s),t=u}return s}function Xn(i,t){return t*Math.round(i/t)}function Lv(i,t,e,n,o,r,s){if(t==e)return s;let a=Xn(i[t],o),l=Xn(i[t+1],o);t+=n,r[s++]=a,r[s++]=l;let h,u;do if(h=Xn(i[t],o),u=Xn(i[t+1],o),t+=n,t==e)return r[s++]=h,r[s++]=u,s;while(h==a&&u==l);for(;t<e;){const d=Xn(i[t],o),c=Xn(i[t+1],o);if(t+=n,d==h&&c==u)continue;const g=h-a,f=u-l,m=d-a,p=c-l;if(g*p==f*m&&(g<0&&m<g||g==m||g>0&&m>g)&&(f<0&&p<f||f==p||f>0&&p>f)){h=d,u=c;continue}r[s++]=h,r[s++]=u,a=h,l=u,h=d,u=c}return r[s++]=h,r[s++]=u,s}function Oc(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=Lv(i,t,u,n,o,r,s),a.push(s),t=u}return s}function Ov(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l],d=[];s=Oc(i,t,u,n,o,r,s,d),a.push(d),t=u[u.length-1]}return s}function tn(i,t,e,n,o){o=o!==void 0?o:[];let r=0;for(let s=t;s<e;s+=n)o[r++]=i.slice(s,s+n);return o.length=r,o}function Ir(i,t,e,n,o){o=o!==void 0?o:[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];o[r++]=tn(i,t,l,n,o[r]),t=l}return o.length=r,o}function uh(i,t,e,n,o){o=o!==void 0?o:[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];o[r++]=l.length===1&&l[0]===t?[]:Ir(i,t,l,n,o[r]),t=l[l.length-1]}return o.length=r,o}function Fc(i,t,e,n){let o=0,r=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];o+=s*a-r*l,r=a,s=l}return o/2}function Nc(i,t,e,n){let o=0;for(let r=0,s=e.length;r<s;++r){const a=e[r];o+=Fc(i,t,a,n),t=a}return o}function Fv(i,t,e,n){let o=0;for(let r=0,s=e.length;r<s;++r){const a=e[r];o+=Nc(i,t,a,n),t=a[a.length-1]}return o}class ia extends Qi{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new ia(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,n,o){return o<jn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,o))}getArea(){return Fc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=hh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ia(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ea(this.flatCoordinates,0,t,this.stride),this.changed()}}const Gc=ia;class dh extends Qi{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new dh(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){const r=this.flatCoordinates,s=Fn(t,e,r[0],r[1]);if(s<o){const a=this.stride;for(let l=0;l<a;++l)n[l]=r[l];return n.length=a,s}else return o}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return yr(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Tl(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Lc(this.flatCoordinates,0,t,this.stride),this.changed()}}const ni=dh;function Nv(i,t,e,n,o){return!Rl(o,function(s){return!Un(i,t,e,n,s[0],s[1])})}function Un(i,t,e,n,o,r){let s=0,a=i[e-n],l=i[e-n+1];for(;t<e;t+=n){const h=i[t],u=i[t+1];l<=r?u>r&&(h-a)*(r-l)-(o-a)*(u-l)>0&&s++:u<=r&&(h-a)*(r-l)-(o-a)*(u-l)<0&&s--,a=h,l=u}return s!==0}function ch(i,t,e,n,o,r){if(e.length===0||!Un(i,t,e[0],n,o,r))return!1;for(let s=1,a=e.length;s<a;++s)if(Un(i,e[s-1],e[s],n,o,r))return!1;return!0}function Gv(i,t,e,n,o,r){if(e.length===0)return!1;for(let s=0,a=e.length;s<a;++s){const l=e[s];if(ch(i,t,l,n,o,r))return!0;t=l[l.length-1]}return!1}function gh(i,t,e,n,o,r,s){let a,l,h,u,d,c,g;const f=o[r+1],m=[];for(let v=0,y=e.length;v<y;++v){const x=e[v];for(u=i[x-n],c=i[x-n+1],a=t;a<x;a+=n)d=i[a],g=i[a+1],(f<=c&&g<=f||c<=f&&f<=g)&&(h=(f-c)/(g-c)*(d-u)+u,m.push(h)),u=d,c=g}let p=NaN,_=-1/0;for(m.sort(Pn),u=m[0],a=1,l=m.length;a<l;++a){d=m[a];const v=Math.abs(d-u);v>_&&(h=(u+d)/2,ch(i,t,e,n,h,f)&&(p=h,_=v)),u=d}return isNaN(p)&&(p=o[r]),s?(s.push(p,f,_),s):[p,f,_]}function jc(i,t,e,n,o){let r=[];for(let s=0,a=e.length;s<a;++s){const l=e[s];r=gh(i,t,l,n,o,2*s,r),t=l[l.length-1]}return r}function Bc(i,t,e,n,o){let r;for(t+=n;t<e;t+=n)if(r=o(i.slice(t-n,t),i.slice(t,t+n)),r)return r;return!1}function na(i,t,e,n,o){const r=nc(Ge(),i,t,e,n);return $t(o,r)?Bn(o,r)||r[0]>=o[0]&&r[2]<=o[2]||r[1]>=o[1]&&r[3]<=o[3]?!0:Bc(i,t,e,n,function(s,a){return T0(o,s,a)}):!1}function jv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){if(na(i,t,e[r],n,o))return!0;t=e[r]}return!1}function Wc(i,t,e,n,o){return!!(na(i,t,e,n,o)||Un(i,t,e,n,o[0],o[1])||Un(i,t,e,n,o[0],o[3])||Un(i,t,e,n,o[2],o[1])||Un(i,t,e,n,o[2],o[3]))}function Zc(i,t,e,n,o){if(!Wc(i,t,e[0],n,o))return!1;if(e.length===1)return!0;for(let r=1,s=e.length;r<s;++r)if(Nv(i,e[r-1],e[r],n,o)&&!na(i,e[r-1],e[r],n,o))return!1;return!0}function Bv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];if(Zc(i,t,a,n,o))return!0;t=a[a.length-1]}return!1}function Wv(i,t,e,n){for(;t<e-n;){for(let o=0;o<n;++o){const r=i[t+o];i[t+o]=i[e-n+o],i[e-n+o]=r}t+=n,e-=n}}function fh(i,t,e,n){let o=0,r=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];o+=(a-r)*(l+s),r=a,s=l}return o===0?void 0:o>0}function Yc(i,t,e,n,o){o=o!==void 0?o:!1;for(let r=0,s=e.length;r<s;++r){const a=e[r],l=fh(i,t,a,n);if(r===0){if(o&&l||!o&&!l)return!1}else if(o&&!l||!o&&l)return!1;t=a}return!0}function Zv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];if(!Yc(i,t,a,n,o))return!1;a.length&&(t=a[a.length-1])}return!0}function mh(i,t,e,n,o){o=o!==void 0?o:!1;for(let r=0,s=e.length;r<s;++r){const a=e[r],l=fh(i,t,a,n);(r===0?o&&l||!o&&!l:o&&!l||!o&&l)&&Wv(i,t,a,n),t=a}return t}function Xc(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r)t=mh(i,t,e[r],n,o);return t}function Yv(i,t){const e=[];let n=0,o=0;for(let r=0,s=t.length;r<s;++r){const a=t[r];if(!fh(i,n,a,2))e.push(t.slice(o,r+1));else{if(e.length===0)continue;e[e.length-1].push(t[o])}o=r+1,n=a}return e}class Po extends Qi{constructor(t,e,n){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,e!==void 0&&n?(this.setFlatCoordinates(e,t),this.ends_=n):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Po(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,o){return o<jn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,o))}containsXY(t,e){return ch(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Nc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),mh(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Ir(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=qi(this.getExtent());this.flatInteriorPoint_=gh(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new ni(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Gc(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,n=this.ends_,o=[];let r=0;for(let s=0,a=n.length;s<a;++s){const l=n[s],h=new Gc(e.slice(r,l),t);o.push(h),r=l}return o}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Yc(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=mh(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Oc(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,n),new Po(e,"XY",n)}getType(){return"Polygon"}intersectsExtent(t){return Zc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=lh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Vn=Po;function Uc(i){const t=i[0],e=i[1],n=i[2],o=i[3],r=[t,e,t,o,n,o,n,e,t,e];return new Po(r,"XY",[r.length])}function Xv(i,t,e){t=t||32;const n=i.getStride(),o=i.getLayout(),r=i.getCenter(),s=n*(t+1),a=new Array(s);for(let u=0;u<s;u+=n){a[u]=0,a[u+1]=0;for(let d=2;d<n;d++)a[u+d]=r[d]}const l=[a.length],h=new Po(a,o,l);return Uv(h,r,i.getRadius(),e),h}function Uv(i,t,e,n){const o=i.getFlatCoordinates(),r=i.getStride(),s=o.length/r-1,a=n||0;for(let l=0;l<=s;++l){const h=l*r,u=a+Ui(l,s)*2*Math.PI/s;o[h]=t[0]+e*Math.cos(u),o[h+1]=t[1]+e*Math.sin(u)}i.changed()}const ph=0;class Vv extends hi{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Wl(t.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,t.projection&&L0(),t.center&&(t.center=Zt(t.center,this.projection_)),t.extent&&(t.extent=Hi(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const a in ii)delete e[a];this.setProperties(e,!0);const n=$v(t);this.maxResolution_=n.maxResolution,this.minResolution_=n.minResolution,this.zoomFactor_=n.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=n.minZoom;const o=qv(t),r=n.constraint,s=Hv(t);this.constraints_={center:o,resolution:r,rotation:s},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const n=this.getCenter();if(n){const o=t||[0,0,0,0];e=e||[0,0,0,0];const r=this.getResolution(),s=r/2*(o[3]-e[3]+e[1]-o[1]),a=r/2*(o[0]-e[0]+e[2]-o[2]);this.setCenterInternal([n[0]+s,n[1]-a])}}getUpdatedOptions_(t){const e=this.getProperties();return e.resolution!==void 0?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let n=0;n<e.length;++n){let o=arguments[n];o.center&&(o=Object.assign({},o),o.center=Zt(o.center,this.getProjection())),o.anchor&&(o=Object.assign({},o),o.anchor=Zt(o.anchor,this.getProjection())),e[n]=o}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,n;e>1&&typeof arguments[e-1]=="function"&&(n=arguments[e-1],--e);let o=0;for(;o<e&&!this.isDef();++o){const u=arguments[o];u.center&&this.setCenterInternal(u.center),u.zoom!==void 0?this.setZoom(u.zoom):u.resolution&&this.setResolution(u.resolution),u.rotation!==void 0&&this.setRotation(u.rotation)}if(o===e){n&&oa(n,!0);return}let r=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const h=[];for(;o<e;++o){const u=arguments[o],d={start:r,complete:!1,anchor:u.anchor,duration:u.duration!==void 0?u.duration:1e3,easing:u.easing||Mv,callback:n};if(u.center&&(d.sourceCenter=s,d.targetCenter=u.center.slice(),s=d.targetCenter),u.zoom!==void 0?(d.sourceResolution=a,d.targetResolution=this.getResolutionForZoom(u.zoom),a=d.targetResolution):u.resolution&&(d.sourceResolution=a,d.targetResolution=u.resolution,a=d.targetResolution),u.rotation!==void 0){d.sourceRotation=l;const c=Ui(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;d.targetRotation=l+c,l=d.targetRotation}Kv(d)?d.complete=!0:r+=d.duration,h.push(d)}this.animations_.push(h),this.setHint(qt.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[qt.ANIMATING]>0}getInteracting(){return this.hints_[qt.INTERACTING]>0}cancelAnimations(){this.setHint(qt.ANIMATING,-this.hints_[qt.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e<n;++e){const o=this.animations_[e];if(o[0].callback&&oa(o[0].callback,!1),!t)for(let r=0,s=o.length;r<s;++r){const a=o[r];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,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 t=Date.now();let e=!1;for(let n=this.animations_.length-1;n>=0;--n){const o=this.animations_[n];let r=!0;for(let s=0,a=o.length;s<a;++s){const l=o[s];if(l.complete)continue;const h=t-l.start;let u=l.duration>0?h/l.duration:1;u>=1?(l.complete=!0,u=1):r=!1;const d=l.easing(u);if(l.sourceCenter){const c=l.sourceCenter[0],g=l.sourceCenter[1],f=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const p=c+d*(f-c),_=g+d*(m-g);this.targetCenter_=[p,_]}if(l.sourceResolution&&l.targetResolution){const c=d===1?l.targetResolution:l.sourceResolution+d*(l.targetResolution-l.sourceResolution);if(l.anchor){const g=this.getViewportSize_(this.getRotation()),f=this.constraints_.resolution(c,0,g,!0);this.targetCenter_=this.calculateCenterZoom(f,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=c,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const c=d===1?Ui(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){const g=this.constraints_.rotation(c,!0);this.targetCenter_=this.calculateCenterRotate(g,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=c}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(r){this.animations_[n]=null,this.setHint(qt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const s=o[0].callback;s&&oa(s,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let n;const o=this.getCenterInternal();return o!==void 0&&(n=[o[0]-e[0],o[1]-e[1]],Fl(n,t-this.getRotation()),R0(n,e)),n}calculateCenterZoom(t,e){let n;const o=this.getCenterInternal(),r=this.getResolution();if(o!==void 0&&r!==void 0){const s=e[0]-t*(e[0]-o[0])/r,a=e[1]-t*(e[1]-o[1])/r;n=[s,a]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],o=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(o*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(o*Math.cos(t))]}else return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&To(t,this.getProjection())}getCenterInternal(){return this.get(ii.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return Yl(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();gt(e,1);const n=this.getResolution();gt(n!==void 0,2);const o=this.getRotation();return gt(o!==void 0,3),Pl(e,n,o,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(ii.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Hi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=Nt(t)/e[0],o=Ue(t)/e[1];return Math.max(n,o)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,o=Math.log(e/n)/Math.log(t);return function(r){return e/Math.pow(t,r*o)}}getRotation(){return this.get(ii.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),o=this.minResolution_,r=Math.log(n/o)/e;return function(s){return Math.log(n/s)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),n=this.getRotation();let o=this.getCenterInternal();const r=this.padding_;if(r){const s=this.getViewportSizeMinusPadding_();o=vh(o,this.getViewportSize_(),[s[0]/2+r[3],s[1]/2+r[0]],e,n)}return{center:o.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,n,o;if(this.resolutions_){const r=xl(this.resolutions_,t,1);e=r,n=this.resolutions_[r],r==this.resolutions_.length-1?o=2:o=n/this.resolutions_[r+1]}else n=this.maxResolution_,o=this.zoomFactor_;return e+Math.log(n/t)/Math.log(o)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=Vt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Vt(t-e,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(gt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){gt(!Ll(t),25);const o=Hi(t,this.getProjection());n=Uc(o)}else if(t.getType()==="Circle"){const o=Hi(t.getExtent(),this.getProjection());n=Uc(o),n.rotate(this.getRotation(),qi(o))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),o=Math.sin(-e),r=t.getFlatCoordinates(),s=t.getStride();let a=1/0,l=1/0,h=-1/0,u=-1/0;for(let d=0,c=r.length;d<c;d+=s){const g=r[d]*n-r[d+1]*o,f=r[d]*o+r[d+1]*n;a=Math.min(a,g),l=Math.min(l,f),h=Math.max(h,g),u=Math.max(u,f)}return[a,l,h,u]}fitInternal(t,e){e=e||{};let n=e.size;n||(n=this.getViewportSizeMinusPadding_());const o=e.padding!==void 0?e.padding:[0,0,0,0],r=e.nearest!==void 0?e.nearest:!1;let s;e.minResolution!==void 0?s=e.minResolution:e.maxZoom!==void 0?s=this.getResolutionForZoom(e.maxZoom):s=0;const a=this.rotatedExtentForGeometry(t);let l=this.getResolutionForExtentInternal(a,[n[0]-o[1]-o[3],n[1]-o[0]-o[2]]);l=isNaN(l)?s:Math.max(l,s),l=this.getConstrainedResolution(l,r?0:1);const h=this.getRotation(),u=Math.sin(h),d=Math.cos(h),c=qi(a);c[0]+=(o[1]-o[3])/2*l,c[1]+=(o[0]-o[2])/2*l;const g=c[0]*d-c[1]*u,f=c[1]*d+c[0]*u,m=this.getConstrainedCenter([g,f],l),p=e.callback?e.callback:Ln;e.duration!==void 0?this.animateInternal({resolution:l,center:m,duration:e.duration,easing:e.easing},p):(this.targetResolution_=l,this.targetCenter_=m,this.applyTargetState_(!1,!0),oa(p,!0))}centerOn(t,e,n){this.centerOnInternal(Zt(t,this.getProjection()),e,n)}centerOnInternal(t,e,n){this.setCenterInternal(vh(t,e,n,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,n,o){let r;const s=this.padding_;if(s&&t){const a=this.getViewportSizeMinusPadding_(-n),l=vh(t,o,[a[0]/2+s[3],a[1]/2+s[0]],e,n);r=[t[0]-l[0],t[1]-l[1]]}return r}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=To(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&Zt(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const n=this.getAnimating()||this.getInteracting(),o=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,o,n);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=Zt(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const n=this.getAnimating()||this.getInteracting(),o=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(o,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&Zt(t,this.getProjection()))}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const n=this.getAnimating()||this.getInteracting()||e,o=this.constraints_.rotation(this.targetRotation_,n),r=this.getViewportSize_(o),s=this.constraints_.resolution(this.targetResolution_,0,r,n),a=this.constraints_.center(this.targetCenter_,s,r,n,this.calculateCenterShift(this.targetCenter_,s,o,r));this.get(ii.ROTATION)!==o&&this.set(ii.ROTATION,o),this.get(ii.RESOLUTION)!==s&&(this.set(ii.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(ii.CENTER)||!ei(this.get(ii.CENTER),a))&&this.set(ii.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,n){t=t!==void 0?t:200;const o=e||0,r=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(r),a=this.constraints_.resolution(this.targetResolution_,o,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,r,s));if(t===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=r,this.targetCenter_=l,this.applyTargetState_();return}n=n||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==r||!this.getCenterInternal()||!ei(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:l,resolution:a,duration:t,easing:Ao,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint(qt.INTERACTING,1)}endInteraction(t,e,n){n=n&&Zt(n,this.getProjection()),this.endInteractionInternal(t,e,n)}endInteractionInternal(t,e,n){this.setHint(qt.INTERACTING,-1),this.resolveConstraints(t,e,n)}getConstrainedCenter(t,e){const n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)}getConstrainedZoom(t,e){const n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))}getConstrainedResolution(t,e){e=e||0;const n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,n)}}function oa(i,t){setTimeout(function(){i(t)},0)}function qv(i){if(i.extent!==void 0){const e=i.smoothExtentConstraint!==void 0?i.smoothExtentConstraint:!0;return Sc(i.extent,i.constrainOnlyCenter,e)}const t=Wl(i.projection,"EPSG:3857");if(i.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,Sc(e,!1,!1)}return yv}function $v(i){let t,e,n,s=i.minZoom!==void 0?i.minZoom:ph,a=i.maxZoom!==void 0?i.maxZoom:28;const l=i.zoomFactor!==void 0?i.zoomFactor:2,h=i.multiWorld!==void 0?i.multiWorld:!1,u=i.smoothResolutionConstraint!==void 0?i.smoothResolutionConstraint:!0,d=i.showFullExtent!==void 0?i.showFullExtent:!1,c=Wl(i.projection,"EPSG:3857"),g=c.getExtent();let f=i.constrainOnlyCenter,m=i.extent;if(!h&&!m&&c.isGlobal()&&(f=!1,m=g),i.resolutions!==void 0){const p=i.resolutions;e=p[s],n=p[a]!==void 0?p[a]:p[p.length-1],i.constrainResolution?t=xv(p,u,!f&&m,d):t=Tc(e,n,u,!f&&m,d)}else{const _=(g?Math.max(Nt(g),Ue(g)):360*ko.degrees/c.getMetersPerUnit())/Ql/Math.pow(2,ph),v=_/Math.pow(2,28-ph);e=i.maxResolution,e!==void 0?s=0:e=_/Math.pow(l,s),n=i.minResolution,n===void 0&&(i.maxZoom!==void 0?i.maxResolution!==void 0?n=e/Math.pow(l,a):n=_/Math.pow(l,a):n=v),a=s+Math.floor(Math.log(e/n)/Math.log(l)),n=e/Math.pow(l,a-s),i.constrainResolution?t=bv(l,e,n,u,!f&&m,d):t=Tc(e,n,u,!f&&m,d)}return{constraint:t,maxResolution:e,minResolution:n,minZoom:s,zoomFactor:l}}function Hv(i){if(i.enableRotation!==void 0?i.enableRotation:!0){const e=i.constrainRotation;return e===void 0||e===!0?wv():e===!1?Ic:typeof e=="number"?kv(e):Ic}else return ih}function Kv(i){return!(i.sourceCenter&&i.targetCenter&&!ei(i.sourceCenter,i.targetCenter)||i.sourceResolution!==i.targetResolution||i.sourceRotation!==i.targetRotation)}function vh(i,t,e,n,o){const r=Math.cos(-o);let s=Math.sin(-o),a=i[0]*r-i[1]*s,l=i[1]*r+i[0]*s;a+=(t[0]/2-e[0])*n,l+=(e[1]-t[1]/2)*n,s=-s;const h=a*r-l*s,u=l*r+a*s;return[h,u]}const en=Vv;class Jv extends bo{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=t.className!==void 0?t.className:"ol-rotate",n=t.label!==void 0?t.label:"\u21E7",o=t.compassClassName!==void 0?t.compassClassName:"ol-compass";this.label_=null,typeof n=="string"?(this.label_=document.createElement("span"),this.label_.className=o,this.label_.textContent=n):(this.label_=n,this.label_.classList.add(o));const r=t.tipLabel?t.tipLabel:"Reset rotation",s=document.createElement("button");s.className=e+"-reset",s.setAttribute("type","button"),s.title=r,s.appendChild(this.label_),s.addEventListener(tt.CLICK,this.handleClick_.bind(this),!1);const a=e+" "+pr+" "+Ml,l=this.element;l.className=a,l.appendChild(s),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=t.duration!==void 0?t.duration:250,this.autoHide_=t.autoHide!==void 0?t.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(Ps)}handleClick_(t){t.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const e=this.getMap().getView();if(!e)return;const n=e.getRotation();n!==void 0&&(this.duration_>0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Ao}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const o="rotate("+n+"rad)";if(this.autoHide_){const r=this.element.classList.contains(Ps);!r&&n===0?this.element.classList.add(Ps):r&&n!==0&&this.element.classList.remove(Ps)}this.label_.style.transform=o}this.rotation_=n}}const Qv=Jv;class t_ extends bo{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",n=t.delta!==void 0?t.delta:1,o=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",r=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",s=t.zoomInLabel!==void 0?t.zoomInLabel:"+",a=t.zoomOutLabel!==void 0?t.zoomOutLabel:"\u2013",l=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",h=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=o,u.setAttribute("type","button"),u.title=l,u.appendChild(typeof s=="string"?document.createTextNode(s):s),u.addEventListener(tt.CLICK,this.handleClick_.bind(this,n),!1);const d=document.createElement("button");d.className=r,d.setAttribute("type","button"),d.title=h,d.appendChild(typeof a=="string"?document.createTextNode(a):a),d.addEventListener(tt.CLICK,this.handleClick_.bind(this,-n),!1);const c=e+" "+pr+" "+Ml,g=this.element;g.className=c,g.appendChild(u),g.appendChild(d),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const n=this.getMap().getView();if(!n)return;const o=n.getZoom();if(o!==void 0){const r=n.getConstrainedZoom(o+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.duration_,easing:Ao})):n.setZoom(r)}}}const e_=t_;function Vc(i){i=i||{};const t=new Ve;return(i.zoom!==void 0?i.zoom:!0)&&t.push(new e_(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&t.push(new Qv(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&t.push(new f0(i.attributionOptions)),t}const _h={ACTIVE:"active"};class i_ extends hi{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(_h.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(_h.ACTIVE,t)}setMap(t){this.map_=t}}function n_(i,t,e){const n=i.getCenterInternal();if(n){const o=[n[0]+t[0],n[1]+t[1]];i.animateInternal({duration:e!==void 0?e:250,easing:Cv,center:i.getConstrainedCenter(o)})}}function yh(i,t,e,n){const o=i.getZoom();if(o===void 0)return;const r=i.getConstrainedZoom(o+t),s=i.getResolutionForZoom(r);i.getAnimating()&&i.cancelAnimations(),i.animate({resolution:s,anchor:e,duration:n!==void 0?n:250,easing:Ao})}const zr=i_;class o_ extends zr{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==Mt.DBLCLICK){const n=t.originalEvent,o=t.map,r=t.coordinate,s=n.shiftKey?-this.delta_:this.delta_,a=o.getView();yh(a,s,r,this.duration_),n.preventDefault(),e=!0}return!e}}const r_=o_;class s_ extends zr{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Mt.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==Mt.POINTERUP){const n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==Mt.POINTERDOWN){const n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==Mt.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function xh(i){const t=i.length;let e=0,n=0;for(let o=0;o<t;o++)e+=i[o].clientX,n+=i[o].clientY;return[e/t,n/t]}const nn=s_;function bh(i){const t=arguments;return function(e){let n=!0;for(let o=0,r=t.length;o<r&&(n=n&&t[o](e),!!n);++o);return n}}const a_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},l_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},h_=function(i){const t=i.map.getTargetElement(),e=i.map.getOwnerDocument().activeElement;return t.contains(e)},qc=function(i){return i.map.getTargetElement().hasAttribute("tabindex")?h_(i):!0},kh=Dn,$c=function(i){const t=i.originalEvent;return t.button==0&&!(e0&&i0&&t.ctrlKey)},u_=function(i){return i.type==Mt.SINGLECLICK},wh=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},Hc=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},Kc=function(i){const t=i.originalEvent,e=t.target.tagName;return e!=="INPUT"&&e!=="SELECT"&&e!=="TEXTAREA"&&!t.target.isContentEditable},Mh=function(i){const t=i.originalEvent;return gt(t!==void 0,56),t.pointerType=="mouse"},Jc=function(i){const t=i.originalEvent;return gt(t!==void 0,56),t.isPrimary&&t.button===0};class d_ extends nn{constructor(t){super({stopDown:xo}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:bh(wh,Jc);this.condition_=t.onFocusOnly?bh(qc,e):e,this.noKinetic_=!1}handleDragEvent(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());const e=this.targetPointers,n=xh(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const o=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],s=t.map.getView();P0(o,s.getResolution()),Fl(o,s.getRotation()),s.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,n=e.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const o=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),s=n.getCenterInternal(),a=e.getPixelFromCoordinateInternal(s),l=e.getCoordinateFromPixelInternal([a[0]-o*Math.cos(r),a[1]-o*Math.sin(r)]);n.animateInternal({center:n.getConstrainedCenter(l),duration:500,easing:Ao})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}else return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}else return!1}}const c_=d_;class g_ extends nn{constructor(t){t=t||{},super({stopDown:xo}),this.condition_=t.condition?t.condition:l_,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!Mh(t))return;const e=t.map,n=e.getView();if(n.getConstraints().rotation===ih)return;const o=e.getSize(),r=t.pixel,s=Math.atan2(o[1]/2-r[1],r[0]-o[0]/2);if(this.lastAngle_!==void 0){const a=s-this.lastAngle_;n.adjustRotationInternal(-a)}this.lastAngle_=s}handleUpEvent(t){return Mh(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return Mh(t)&&$c(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const f_=g_;class m_ extends yl{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,n="px",o=this.element_.style;o.left=Math.min(t[0],e[0])+n,o.top=Math.min(t[1],e[1])+n,o.width=Math.abs(e[0]-t[0])+n,o.height=Math.abs(e[1]-t[1])+n}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,o=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);o[4]=o[0].slice(),this.geometry_?this.geometry_.setCoordinates([o]):this.geometry_=new Vn([o])}getGeometry(){return this.geometry_}}const p_=m_,ra={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Ch extends Qe{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class v_ extends nn{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new p_(t.className||"ol-dragbox"),this.minArea_=t.minArea!==void 0?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:$c,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const o=n[0]-e[0],r=n[1]-e[1];return o*o+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Ch(ra.BOXDRAG,t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Ch(e?ra.BOXEND:ra.BOXCANCEL,t.coordinate,t)),!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Ch(ra.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}}const __=v_;class y_ extends __{constructor(t){t=t||{};const e=t.condition?t.condition:Hc;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const n=this.getMap().getView();let o=this.getGeometry();if(this.out_){const r=n.rotatedExtentForGeometry(o),s=n.getResolutionForExtentInternal(r),a=n.getResolution()/s;o=o.clone(),o.scale(a*a)}n.fitInternal(o,{duration:this.duration_,easing:Ao})}}const x_=y_,qn={LEFT:37,UP:38,RIGHT:39,DOWN:40};class b_ extends zr{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return wh(e)&&Kc(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==tt.KEYDOWN){const n=t.originalEvent,o=n.keyCode;if(this.condition_(t)&&(o==qn.DOWN||o==qn.LEFT||o==qn.RIGHT||o==qn.UP)){const s=t.map.getView(),a=s.getResolution()*this.pixelDelta_;let l=0,h=0;o==qn.DOWN?h=-a:o==qn.LEFT?l=-a:o==qn.RIGHT?l=a:h=a;const u=[l,h];Fl(u,s.getRotation()),n_(s,u,this.duration_),n.preventDefault(),e=!0}}return!e}}const k_=b_;class w_ extends zr{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:Kc,this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==tt.KEYDOWN||t.type==tt.KEYPRESS){const n=t.originalEvent,o=n.charCode;if(this.condition_(t)&&(o=="+".charCodeAt(0)||o=="-".charCodeAt(0))){const r=t.map,s=o=="+".charCodeAt(0)?this.delta_:-this.delta_,a=r.getView();yh(a,s,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}const M_=w_;class C_{constructor(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let n=e-3;for(;n>0&&this.points_[n+2]>t;)n-=3;const o=this.points_[e+2]-this.points_[n+2];if(o<1e3/60)return!1;const r=this.points_[e]-this.points_[n],s=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(s,r),this.initialVelocity_=Math.sqrt(r*r+s*s)/o,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const E_=C_;class S_ extends zr{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:kh;this.condition_=t.onFocusOnly?bh(qc,e):e,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 t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t)||t.type!==tt.WHEEL)return!0;const n=t.map,o=t.originalEvent;o.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let r;if(t.type==tt.WHEEL&&(r=o.deltaY,t0&&o.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=Wd),o.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),r===0)return!1;this.lastDelta_=r;const s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<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(-r/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=r;const l=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let n=-Vt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),yh(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}const T_=S_;class I_ extends nn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=xo),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const n=this.targetPointers[0],o=this.targetPointers[1],r=Math.atan2(o.clientY-n.clientY,o.clientX-n.clientX);if(this.lastAngle_!==void 0){const u=r-this.lastAngle_;this.rotationDelta_+=u,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=u}this.lastAngle_=r;const s=t.map,a=s.getView();if(a.getConstraints().rotation===ih)return;const l=s.getViewport().getBoundingClientRect(),h=xh(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(h),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}else return!1}}const z_=I_;class R_ extends nn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=xo),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const n=this.targetPointers[0],o=this.targetPointers[1],r=n.clientX-o.clientX,s=n.clientY-o.clientY,a=Math.sqrt(r*r+s*s);this.lastDistance_!==void 0&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,h=l.getView();e!=1&&(this.lastScaleDelta_=e);const u=l.getViewport().getBoundingClientRect(),d=xh(this.targetPointers);d[0]-=u.left,d[1]-=u.top,this.anchor_=l.getCoordinateFromPixelInternal(d),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const n=t.map.getView(),o=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,o),!1}else return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}else return!1}}const A_=R_;function Qc(i){i=i||{};const t=new Ve,e=new E_(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new f_),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new r_({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&t.push(new c_({onFocusOnly:i.onFocusOnly,kinetic:e})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&t.push(new z_),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new A_({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new k_),t.push(new M_({delta:i.zoomDelta,duration:i.zoomDuration}))),(i.mouseWheelZoom!==void 0?i.mouseWheelZoom:!0)&&t.push(new T_({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(i.shiftDragZoom!==void 0?i.shiftDragZoom:!0)&&t.push(new x_({duration:i.zoomDuration})),t}function tg(i){return i[0]>0&&i[1]>0}function P_(i,t,e){return e===void 0&&(e=[0,0]),e[0]=i[0]*t+.5|0,e[1]=i[1]*t+.5|0,e}function be(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}function eg(i){if(i instanceof Os){i.setMapInternal(null);return}i instanceof Js&&i.getLayers().forEach(eg)}function ig(i,t){if(i instanceof Os){i.setMapInternal(t);return}if(i instanceof Js){const e=i.getLayers().getArray();for(let n=0,o=e.length;n<o;++n)ig(e[n],t)}}class D_ extends hi{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=L_(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=t.maxTilesLoading!==void 0?t.maxTilesLoading:16,this.pixelRatio_=t.pixelRatio!==void 0?t.pixelRatio:Wd,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=qe(),this.pixelToCoordinateTransform_=qe(),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_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.controls=e.controls||Vc(),this.interactions=e.interactions||Qc({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new vv(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(ge.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(ge.VIEW,this.handleViewChanged_),this.addChangeListener(ge.SIZE,this.handleSizeChanged_),this.addChangeListener(ge.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof en)&&t.view.then(function(o){n.setView(new en(o))}),this.controls.addEventListener(oe.ADD,function(o){o.element.setMap(this)}.bind(this)),this.controls.addEventListener(oe.REMOVE,function(o){o.element.setMap(null)}.bind(this)),this.interactions.addEventListener(oe.ADD,function(o){o.element.setMap(this)}.bind(this)),this.interactions.addEventListener(oe.REMOVE,function(o){o.element.setMap(null)}.bind(this)),this.overlays_.addEventListener(oe.ADD,function(o){this.addOverlayInternal_(o.element)}.bind(this)),this.overlays_.addEventListener(oe.REMOVE,function(o){const r=o.element.getId();r!==void 0&&delete this.overlayIdIndex_[r.toString()],o.element.setMap(null)}.bind(this)),this.controls.forEach(function(o){o.setMap(this)}.bind(this)),this.interactions.forEach(function(o){o.setMap(this)}.bind(this)),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){ig(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,n){if(!this.frameState_||!this.renderer_)return;const o=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const r=n.hitTolerance!==void 0?n.hitTolerance:0,s=n.layerFilter!==void 0?n.layerFilter:Dn,a=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(o,this.frameState_,r,a,e,null,s,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(o){n.push(o)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(o){o instanceof Js?e(o.getLayers()):t.push(o)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const o=e.layerFilter!==void 0?e.layerFilter:Dn,r=e.hitTolerance!==void 0?e.hitTolerance:0,s=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,r,s,o,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-e.left,n.clientY-e.top]}getTarget(){return this.get(ge.TARGET)}getTargetElement(){const t=this.getTarget();return t!==void 0?typeof t=="string"?document.getElementById(t):t:null}getCoordinateFromPixel(t){return To(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Jt(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(ge.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof Ve){e.setLayers(t);return}const n=e.getLayers();n.clear(),n.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const o=t[e];if(!o.visible)continue;const r=o.layer.getRenderer();if(r&&!r.ready)return!0;const s=o.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(t){const e=Zt(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?Jt(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(ge.SIZE)}getView(){return this.get(ge.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,n,o){return _v(this.frameState_,t,e,n,o)}handleBrowserEvent(t,e){e=e||t.type;const n=new Si(e,this,t);this.handleMapBrowserEvent(n)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,n=e.type;if(n===El.POINTERDOWN||n===tt.WHEEL||n===tt.KEYDOWN){const o=this.getOwnerDocument(),r=this.viewport_.getRootNode?this.viewport_.getRootNode():o,s=e.target;if(this.overlayContainerStopEvent_.contains(s)||!(r===o?o.documentElement:r).contains(s))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1){const o=this.getInteractions().getArray().slice();for(let r=o.length-1;r>=0;r--){const s=o[r];if(s.getMap()!==this||!s.getActive()||!this.getTargetElement())continue;if(!s.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let o=this.maxTilesLoading_,r=o;if(t){const s=t.viewHints;if(s[qt.ANIMATING]||s[qt.INTERACTING]){const a=Date.now()-t.time>8;o=a?0:8,r=a?0:2}}e.getTilesLoading()<o&&(e.reprioritize(),e.loadMoreTiles(o,r))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(Vi.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(Vi.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Ro(Yi.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Ro(Yi.LOADSTART,this,t))));const n=this.postRenderFunctions_;for(let o=0,r=n.length;o<r;++o)n[o](this,t);n.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let e=0,n=this.targetChangeHandlerKeys_.length;e<n;++e)Ft(this.targetChangeHandlerKeys_[e]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(tt.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(tt.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,wl(this.viewport_)}const t=this.getTargetElement();if(!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 hv(this)),this.mapBrowserEventHandler_=new gv(this,this.moveTolerance_);for(const o in Mt)this.mapBrowserEventHandler_.addEventListener(Mt[o],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(tt.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(tt.WHEEL,this.boundHandleBrowserEvent_,Zd?{passive:!1}:!1);const e=this.getOwnerDocument().defaultView,n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.targetChangeHandlerKeys_=[ft(n,tt.KEYDOWN,this.handleBrowserEvent,this),ft(n,tt.KEYPRESS,this.handleBrowserEvent,this),ft(e,tt.RESIZE,this.updateSize,this)]}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(Ft(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Ft(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=ft(t,yo.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=ft(t,tt.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Ft),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Ki("addlayer",t)),this.layerGroupPropertyListenerKeys_=[ft(t,yo.PROPERTYCHANGE,this.render,this),ft(t,tt.CHANGE,this.render,this),ft(t,"addlayer",this.handleLayerAdd_,this),ft(t,"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 t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const o=t[e].layer;o.hasRenderer()&&o.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){eg(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),n=this.getView(),o=this.frameState_;let r=null;if(e!==void 0&&tg(e)&&n&&n.isDef()){const s=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();if(r={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Pl(a.center,a.resolution,a.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{},mapId:$(this),renderTargets:{}},a.nextCenter&&a.nextResolution){const l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;r.nextExtent=Pl(a.nextCenter,a.nextResolution,l,e)}}this.frameState_=r,this.renderer_.renderFrame(r),r&&(r.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,r.postRenderFunctions),o&&(!this.previousExtent_||!Ll(this.previousExtent_)&&!So(r.extent,this.previousExtent_))&&(this.dispatchEvent(new Ro(Yi.MOVESTART,this,o)),this.previousExtent_=_r(this.previousExtent_)),this.previousExtent_&&!r.viewHints[qt.ANIMATING]&&!r.viewHints[qt.INTERACTING]&&!So(r.extent,this.previousExtent_)&&(this.dispatchEvent(new Ro(Yi.MOVEEND,this,r)),ec(r.extent,this.previousExtent_))),this.dispatchEvent(new Ro(Yi.POSTRENDER,this,r)),this.renderComplete_=this.hasListener(Yi.LOADSTART)||this.hasListener(Yi.LOADEND)||this.hasListener(Vi.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Ki("removelayer",e)),this.set(ge.LAYERGROUP,t)}setSize(t){this.set(ge.SIZE,t)}setTarget(t){this.set(ge.TARGET,t)}setView(t){if(!t||t instanceof en){this.set(ge.VIEW,t);return}this.set(ge.VIEW,new en);const e=this;t.then(function(n){e.setView(new en(n))})}updateSize(){const t=this.getTargetElement();let e;if(t){const n=getComputedStyle(t),o=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),r=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);!isNaN(o)&&!isNaN(r)&&(e=[o,r],!tg(e)&&!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(e),this.updateViewportSize_()}updateViewportSize_(){const t=this.getView();if(t){let e;const n=getComputedStyle(this.viewport_);n.width&&n.height&&(e=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(e)}}}function L_(i){let t=null;i.keyboardEventTarget!==void 0&&(t=typeof i.keyboardEventTarget=="string"?document.getElementById(i.keyboardEventTarget):i.keyboardEventTarget);const e={},n=i.layers&&typeof i.layers.getLayers=="function"?i.layers:new Js({layers:i.layers});e[ge.LAYERGROUP]=n,e[ge.TARGET]=i.target,e[ge.VIEW]=i.view instanceof en?i.view:new en;let o;i.controls!==void 0&&(Array.isArray(i.controls)?o=new Ve(i.controls.slice()):(gt(typeof i.controls.getArray=="function",47),o=i.controls));let r;i.interactions!==void 0&&(Array.isArray(i.interactions)?r=new Ve(i.interactions.slice()):(gt(typeof i.interactions.getArray=="function",48),r=i.interactions));let s;return i.overlays!==void 0?Array.isArray(i.overlays)?s=new Ve(i.overlays.slice()):(gt(typeof i.overlays.getArray=="function",49),s=i.overlays):s=new Ve,{controls:o,interactions:r,keyboardEventTarget:t,overlays:s,values:e}}const O_=D_,Eh="units",F_=[1,2,5],Rr=25.4/.28;class N_ extends bo{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const n=t.className!==void 0?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=n+"-inner",this.element.className=n+" "+pr,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=t.minWidth!==void 0?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(Eh,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(Eh)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(Eh,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=t.center,n=t.projection,o=this.getUnits(),r=o=="degrees"?"degrees":"m";let s=Ys(n,t.resolution,e,r);const a=this.minWidth_*(this.dpi_||Rr)/Rr,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||Rr)/Rr:void 0;let h=a*s,u="";if(o=="degrees"){const y=ko.degrees;h*=y,h<y/60?(u="\u2033",s*=3600):h<y?(u="\u2032",s*=60):u="\xB0"}else o=="imperial"?h<.9144?(u="in",s/=.0254):h<1609.344?(u="ft",s/=.3048):(u="mi",s/=1609.344):o=="nautical"?(s/=1852,u="NM"):o=="metric"?h<.001?(u="\u03BCm",s*=1e6):h<1?(u="mm",s*=1e3):h<1e3?u="m":(u="km",s/=1e3):o=="us"?h<.9144?(u="in",s*=39.37):h<1609.344?(u="ft",s/=.30480061):(u="mi",s/=1609.3472):gt(!1,33);let d=3*Math.floor(Math.log(a*s)/Math.log(10)),c,g,f,m,p,_;for(;;){f=Math.floor(d/3);const y=Math.pow(10,f);if(c=F_[(d%3+3)%3]*y,g=Math.round(c/s),isNaN(g)){this.element.style.display="none",this.renderedVisible_=!1;return}if(l!==void 0&&g>=l){c=m,g=p,f=_;break}else if(g>=a)break;m=c,p=g,_=f,++d}const v=this.scaleBar_?this.createScaleBar(g,c,u):c.toFixed(f<0?-f:0)+" "+u;this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=g&&(this.innerElement_.style.width=g+"px",this.renderedWidth_=g),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,n){const o=this.getScaleForResolution(),r=o<1?Math.round(1/o).toLocaleString()+" : 1":"1 : "+Math.round(o).toLocaleString(),s=this.scaleBarSteps_,a=t/s,l=[this.createMarker("absolute")];for(let u=0;u<s;++u){const d=u%2===0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";l.push(`<div><div class="ol-scale-singlebar ${d}" style="width: ${a}px;"></div>`+this.createMarker("relative")+(u%2===0||s===2?this.createStepText(u,t,!1,e,n):"")+"</div>")}return l.push(this.createStepText(s,t,!0,e,n)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${t}px;">`+r+"</div>":"")+l.join("")}createMarker(t){return`<div class="ol-scale-step-marker" style="position: ${t}; top: ${t==="absolute"?3:-10}px;"></div>`}createStepText(t,e,n,o,r){const a=(t===0?0:Math.round(o/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+r),l=t===0?-3:e/this.scaleBarSteps_*-1,h=t===0?0:e/this.scaleBarSteps_*2;return`<div class="ol-scale-step-text" style="margin-left: ${l}px;text-align: ${t===0?"left":"center"};min-width: ${h}px;left: ${n?e+"px":"unset"};">`+a+"</div>"}getScaleForResolution(){const t=Ys(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||Rr,n=1e3/25.4;return t*n*e}render(t){const e=t.frameState;e?this.viewState_=e.viewState:this.viewState_=null,this.updateElement_()}}const G_=N_;class Sh extends hi{constructor(t){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_),t)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Sh(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const n=this.getStyle();return n&&t.setStyle(n),t}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_&&(Ft(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=ft(t,tt.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?j_(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function j_(i){if(typeof i=="function")return i;{let t;return Array.isArray(i)?t=i:(gt(typeof i.getZIndex=="function",41),t=[i]),function(){return t}}}const Ti=Sh;class ng{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let n=e.dataProjection?Gt(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()==="tile-pixels"&&(n=Gt(n),n.setWorldExtent(e.extent)),e={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)}getType(){return et()}readFeature(t,e){return et()}readFeatures(t,e){return et()}readGeometry(t,e){return et()}readProjection(t){return et()}writeFeature(t,e){return et()}writeFeatures(t,e){return et()}writeGeometry(t,e){return et()}}function Th(i,t,e){const n=e?Gt(e.featureProjection):null,o=e?Gt(e.dataProjection):null;let r;if(n&&o&&!Zn(n,o)?r=(t?i.clone():i).transform(t?n:o,t?o:n):r=i,t&&e&&e.decimals!==void 0){const s=Math.pow(10,e.decimals),a=function(l){for(let h=0,u=l.length;h<u;++h)l[h]=Math.round(l[h]*s)/s;return l};r===i&&(r=i.clone()),r.applyTransform(a)}return r}class B_ extends ng{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(sa(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(sa(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return et()}readFeaturesFromObject(t,e){return et()}readGeometry(t,e){return this.readGeometryFromObject(sa(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return et()}readProjection(t){return this.readProjectionFromObject(sa(t))}readProjectionFromObject(t){return et()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return et()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return et()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return et()}}function sa(i){if(typeof i=="string"){const t=JSON.parse(i);return t||null}else return i!==null?i:null}const W_=B_;function aa(i,t,e,n,o,r,s){let a,l;const h=(e-t)/n;if(h===1)a=t;else if(h===2)a=t,l=o;else if(h!==0){let u=i[t],d=i[t+1],c=0;const g=[0];for(let p=t+n;p<e;p+=n){const _=i[p],v=i[p+1];c+=Math.sqrt((_-u)*(_-u)+(v-d)*(v-d)),g.push(c),u=_,d=v}const f=o*c,m=Xp(g,f);m<0?(l=(f-g[-m-2])/(g[-m-1]-g[-m-2]),a=t+(-m-2)*n):a=t+m*n}s=s>1?s:2,r=r||new Array(s);for(let u=0;u<s;++u)r[u]=a===void 0?NaN:l===void 0?i[a+u]:ki(i[a+u],i[a+n+u],l);return r}function Ih(i,t,e,n,o,r){if(e==t)return null;let s;if(o<i[t+n-1])return r?(s=i.slice(t,t+n),s[n-1]=o,s):null;if(i[e-1]<o)return r?(s=i.slice(e-n,e),s[n-1]=o,s):null;if(o==i[t+n-1])return i.slice(t,t+n);let a=t/n,l=e/n;for(;a<l;){const c=a+l>>1;o<i[(c+1)*n-1]?l=c:a=c+1}const h=i[a*n-1];if(o==h)return i.slice((a-1)*n,(a-1)*n+n);const u=i[(a+1)*n-1],d=(o-h)/(u-h);s=[];for(let c=0;c<n-1;++c)s.push(ki(i[(a-1)*n+c],i[a*n+c],d));return s.push(o),s}function Z_(i,t,e,n,o,r,s){if(s)return Ih(i,t,e[e.length-1],n,o,r);let a;if(o<i[n-1])return r?(a=i.slice(0,n),a[n-1]=o,a):null;if(i[i.length-1]<o)return r?(a=i.slice(i.length-n),a[n-1]=o,a):null;for(let l=0,h=e.length;l<h;++l){const u=e[l];if(t!=u){if(o<i[t+n-1])return null;if(o<=i[u-1])return Ih(i,t,u,n,o,!1);t=u}}return null}function og(i,t,e,n){let o=i[t],r=i[t+1],s=0;for(let a=t+n;a<e;a+=n){const l=i[a],h=i[a+1];s+=Math.sqrt((l-o)*(l-o)+(h-r)*(h-r)),o=l,r=h}return s}class la extends Qi{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){this.flatCoordinates?li(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()}clone(){const t=new la(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){return o<jn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,o))}forEachSegment(t){return Bc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,Ih(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return aa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return og(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(t){const e=[];return e.length=hh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new la(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return na(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ea(this.flatCoordinates,0,t,this.stride),this.changed()}}const $n=la;class ha extends Qi{constructor(t,e,n){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&n)this.setFlatCoordinates(e,t),this.ends_=n;else{let o=this.getLayout();const r=t,s=[],a=[];for(let l=0,h=r.length;l<h;++l){const u=r[l];l===0&&(o=u.getLayout()),li(s,u.getFlatCoordinates()),a.push(s.length)}this.setFlatCoordinates(o,s),this.ends_=a}}appendLineString(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new ha(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,o){return o<jn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,n,o))}getCoordinateAtM(t,e,n){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(e=e!==void 0?e:!1,n=n!==void 0?n:!1,Z_(this.flatCoordinates,0,this.ends_,this.stride,t,e,n))}getCoordinates(){return Ir(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new $n(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,n=this.layout,o=[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=e[s],h=new $n(t.slice(r,l),n);o.push(h),r=l}return o}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let n=0;const o=this.ends_,r=this.stride;for(let s=0,a=o.length;s<a;++s){const l=o[s],h=aa(e,n,l,r,.5);li(t,h),n=l}return t}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Dv(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,n),new ha(e,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(t){return jv(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=lh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const zh=ha;class Rh extends Qi{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()}clone(){const t=new Rh(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){if(o<jn(this.getExtent(),t,e))return o;const r=this.flatCoordinates,s=this.stride;for(let a=0,l=r.length;a<l;a+=s){const h=Fn(t,e,r[a],r[a+1]);if(h<o){o=h;for(let u=0;u<s;++u)n[u]=r[a+u];n.length=s}}return o}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new ni(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,n=this.stride,o=[];for(let r=0,s=t.length;r<s;r+=n){const a=new ni(t.slice(r,r+n),e);o.push(a)}return o}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,n=this.stride;for(let o=0,r=e.length;o<r;o+=n){const s=e[o],a=e[o+1];if(Tl(t,s,a))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ea(this.flatCoordinates,0,t,this.stride),this.changed()}}const Ar=Rh;function rg(i,t,e,n){const o=[];let r=Ge();for(let s=0,a=e.length;s<a;++s){const l=e[s];r=zl(i,t,l[0],n),o.push((r[0]+r[2])/2,(r[1]+r[3])/2),t=l[l.length-1]}return o}class ua extends Qi{constructor(t,e,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(t[0])){let o=this.getLayout();const r=t,s=[],a=[];for(let l=0,h=r.length;l<h;++l){const u=r[l];l===0&&(o=u.getLayout());const d=s.length,c=u.getEnds();for(let g=0,f=c.length;g<f;++g)c[g]+=d;li(s,u.getFlatCoordinates()),a.push(c)}e=o,t=s,n=a}e!==void 0&&n?(this.setFlatCoordinates(e,t),this.endss_=n):this.setCoordinates(t,e)}appendPolygon(t){let e;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();else{const n=this.flatCoordinates.length;li(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let o=0,r=e.length;o<r;++o)e[o]+=n}this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let o=0;o<t;++o)e[o]=this.endss_[o].slice();const n=new ua(this.flatCoordinates.slice(),this.layout,e);return n.applyProperties(this),n}closestPointXY(t,e,n,o){return o<jn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Rv(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Av(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,n,o))}containsXY(t,e){return Gv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return Fv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Xc(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,uh(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=rg(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=jc(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Ar(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Zv(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Xc(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Ov(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,n),new ua(e,"XY",n)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(t===0)e=0;else{const r=this.endss_[t-1];e=r[r.length-1]}const n=this.endss_[t].slice(),o=n[n.length-1];if(e!==0)for(let r=0,s=n.length;r<s;++r)n[r]-=e;return new Vn(this.flatCoordinates.slice(e,o),this.layout,n)}getPolygons(){const t=this.layout,e=this.flatCoordinates,n=this.endss_,o=[];let r=0;for(let s=0,a=n.length;s<a;++s){const l=n[s].slice(),h=l[l.length-1];if(r!==0)for(let d=0,c=l.length;d<c;++d)l[d]-=r;const u=new Vn(e.slice(r,h),t,l);o.push(u),r=h}return o}getType(){return"MultiPolygon"}intersectsExtent(t){return Bv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=Pv(this.flatCoordinates,0,t,this.stride,this.endss_);if(n.length===0)this.flatCoordinates.length=0;else{const o=n[n.length-1];this.flatCoordinates.length=o.length===0?0:o[o.length-1]}this.changed()}}const Ah=ua;class da extends Pc{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Ft),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(!!this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(ft(this.geometries_[t],tt.CHANGE,this.changed,this))}clone(){const t=new da(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,n,o){if(o<jn(this.getExtent(),t,e))return o;const r=this.geometries_;for(let s=0,a=r.length;s<a;++s)o=r[s].closestPointXY(t,e,n,o);return o}containsXY(t,e){const n=this.geometries_;for(let o=0,r=n.length;o<r;++o)if(n[o].containsXY(t,e))return!0;return!1}computeExtent(t){_r(t);const e=this.geometries_;for(let n=0,o=e.length;n<o;++n)ic(t,e[n].getExtent());return t}getGeometries(){return sg(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let n=0,o=e.length;n<o;++n)e[n].getType()===this.getType()?t=t.concat(e[n].getGeometriesArrayRecursive()):t.push(e[n]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],n=this.geometries_;let o=!1;for(let r=0,s=n.length;r<s;++r){const a=n[r],l=a.getSimplifiedGeometry(t);e.push(l),l!==a&&(o=!0)}if(o){const r=new da(null);return r.setGeometriesArray(e),r}else return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let n=0,o=e.length;n<o;++n)if(e[n].intersectsExtent(t))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(t,e){const n=this.geometries_;for(let o=0,r=n.length;o<r;++o)n[o].rotate(t,e);this.changed()}scale(t,e,n){n||(n=qi(this.getExtent()));const o=this.geometries_;for(let r=0,s=o.length;r<s;++r)o[r].scale(t,e,n);this.changed()}setGeometries(t){this.setGeometriesArray(sg(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let n=0,o=e.length;n<o;++n)e[n].applyTransform(t);this.changed()}translate(t,e){const n=this.geometries_;for(let o=0,r=n.length;o<r;++o)n[o].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function sg(i){const t=[];for(let e=0,n=i.length;e<n;++e)t.push(i[e].clone());return t}const Y_=da;class X_ extends W_{constructor(t){t=t||{},super(),this.dataProjection=Gt(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=Gt(t.featureProjection)),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let n=null;t.type==="Feature"?n=t:n={type:"Feature",geometry:t,properties:null};const o=Ph(n.geometry,e),r=new Ti;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&r.setGeometryName(n.geometry_name),r.setGeometry(o),"id"in n&&r.setId(n.id),n.properties&&r.setProperties(n.properties,!0),r}readFeaturesFromObject(t,e){const n=t;let o=null;if(n.type==="FeatureCollection"){const r=t;o=[];const s=r.features;for(let a=0,l=s.length;a<l;++a)o.push(this.readFeatureFromObject(s[a],e))}else o=[this.readFeatureFromObject(t,e)];return o}readGeometryFromObject(t,e){return Ph(t,e)}readProjectionFromObject(t){const e=t.crs;let n;return e?e.type=="name"?n=Gt(e.properties.name):e.type==="EPSG"?n=Gt("EPSG:"+e.properties.code):gt(!1,36):n=this.dataProjection,n}writeFeatureObject(t,e){e=this.adaptOptions(e);const n={type:"Feature",geometry:null,properties:null},o=t.getId();if(o!==void 0&&(n.id=o),!t.hasProperties())return n;const r=t.getProperties(),s=t.getGeometry();return s&&(n.geometry=Dh(s,e),delete r[t.getGeometryName()]),On(r)||(n.properties=r),n}writeFeaturesObject(t,e){e=this.adaptOptions(e);const n=[];for(let o=0,r=t.length;o<r;++o)n.push(this.writeFeatureObject(t[o],e));return{type:"FeatureCollection",features:n}}writeGeometryObject(t,e){return Dh(t,this.adaptOptions(e))}}function Ph(i,t){if(!i)return null;let e;switch(i.type){case"Point":{e=V_(i);break}case"LineString":{e=q_(i);break}case"Polygon":{e=J_(i);break}case"MultiPoint":{e=H_(i);break}case"MultiLineString":{e=$_(i);break}case"MultiPolygon":{e=K_(i);break}case"GeometryCollection":{e=U_(i);break}default:throw new Error("Unsupported GeoJSON type: "+i.type)}return Th(e,!1,t)}function U_(i,t){const e=i.geometries.map(function(n){return Ph(n,t)});return new Y_(e)}function V_(i){return new ni(i.coordinates)}function q_(i){return new $n(i.coordinates)}function $_(i){return new zh(i.coordinates)}function H_(i){return new Ar(i.coordinates)}function K_(i){return new Ah(i.coordinates)}function J_(i){return new Vn(i.coordinates)}function Dh(i,t){i=Th(i,!0,t);const e=i.getType();let n;switch(e){case"Point":{n=o1(i);break}case"LineString":{n=t1(i);break}case"Polygon":{n=r1(i,t);break}case"MultiPoint":{n=i1(i);break}case"MultiLineString":{n=e1(i);break}case"MultiPolygon":{n=n1(i,t);break}case"GeometryCollection":{n=Q_(i,t);break}case"Circle":{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return n}function Q_(i,t){t=Object.assign({},t),delete t.featureProjection;const e=i.getGeometriesArray().map(function(n){return Dh(n,t)});return{type:"GeometryCollection",geometries:e}}function t1(i,t){return{type:"LineString",coordinates:i.getCoordinates()}}function e1(i,t){return{type:"MultiLineString",coordinates:i.getCoordinates()}}function i1(i,t){return{type:"MultiPoint",coordinates:i.getCoordinates()}}function n1(i,t){let e;return t&&(e=t.rightHanded),{type:"MultiPolygon",coordinates:i.getCoordinates(e)}}function o1(i,t){return{type:"Point",coordinates:i.getCoordinates()}}function r1(i,t){let e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:i.getCoordinates(e)}}const Hn=X_;class Lh{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new Lh({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const fe=Lh,Qt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Oh{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=be(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Oh({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,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 et()}getImage(t){return et()}getHitDetectionImage(){return et()}getPixelRatio(t){return 1}getImageState(){return et()}getImageSize(){return et()}getOrigin(){return et()}getSize(){return et()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=be(t)}listenImageChange(t){et()}load(){et()}unlistenImageChange(t){et()}}const ag=Oh;function lg(i,t,e){const n=i;let o=!0,r=!1,s=!1;const a=[Rs(n,tt.LOAD,function(){s=!0,r||t()})];return n.src&&n0?(r=!0,n.decode().then(function(){o&&t()}).catch(function(l){o&&(s?t():e())})):a.push(Rs(n,tt.ERROR,e)),function(){o=!1,a.forEach(Ft)}}let Pr=null;class s1 extends zs{constructor(t,e,n,o,r,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=o,this.canvas_={},this.color_=s,this.unlisten_=null,this.imageState_=r,this.size_=n,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===Qt.LOADED){Pr||(Pr=Ae(1,1)),Pr.drawImage(this.image_,0,0);try{Pr.getImageData(0,0,1,1),this.tainted_=!1}catch{Pr=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(tt.CHANGE)}handleImageError_(){this.imageState_=Qt.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Qt.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(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],n=Ae(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Qt.IDLE){this.image_||this.initializeImage_(),this.imageState_=Qt.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=lg(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Qt.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const o=n.getContext("2d");o.scale(t,t),o.drawImage(e,0,0),o.globalCompositeOperation="multiply",o.fillStyle=ql(this.color_),o.fillRect(0,0,n.width/t,n.height/t),o.globalCompositeOperation="destination-in",o.drawImage(e,0,0),this.canvas_[t]=n}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function a1(i,t,e,n,o,r){let s=qs.get(t,n,r);return s||(s=new s1(i,t,e,n,o,r),qs.set(t,n,r,s)),s}class Fh extends ag{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,o=t.scale!==void 0?t.scale:1,r=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:o,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const s=t.img!==void 0?t.img:null;this.imgSize_=t.imgSize;let a=t.src;gt(!(a!==void 0&&s),4),gt(!s||s&&this.imgSize_,5),(a===void 0||a.length===0)&&s&&(a=s.src||$(s)),gt(a!==void 0&&a.length>0,6);const l=t.src!==void 0?Qt.IDLE:Qt.LOADED;this.color_=t.color!==void 0?kr(t.color):null,this.iconImage_=a1(s,a,this.imgSize_!==void 0?this.imgSize_:null,this.crossOrigin_,l,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null}clone(){const t=this.getScale();return new Fh({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:Array.isArray(t)?t.slice():t,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const o=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!o)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=o[0]),this.anchorYUnits_=="fraction"&&(t[1]*=o[1])}if(this.anchorOrigin_!="top-left"){if(!o)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+o[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+o[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}listenImageChange(t){this.iconImage_.addEventListener(tt.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(tt.CHANGE,t)}}const ca=Fh;class Nh{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Nh({color:Array.isArray(t)?t.slice():t||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(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const ke=Nh;function di(i){return Array.isArray(i)?xc(i):i}class Gh extends ag{constructor(t){const e=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:1,rotateWithView:e,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius!==void 0?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new Gh({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(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const n=this.renderOptions_,o=Ae(n.size*t,n.size*t);this.draw_(n,o,t),e=o.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return Qt.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(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let o=this.radius_,r=this.radius2_===void 0?o:this.radius2_;if(o<r){const w=o;o=r,r=w}const s=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/s,l=r*Math.sin(a),h=Math.sqrt(r*r-l*l),u=o-h,d=Math.sqrt(l*l+u*u),c=d/l;if(t==="miter"&&c<=n)return c*e;const g=e/2/c,f=e/2*(u/d),p=Math.sqrt((o+g)*(o+g)+f*f)-o;if(this.radius2_===void 0||t==="bevel")return p*2;const _=o*Math.sin(a),v=Math.sqrt(o*o-_*_),y=r-v,k=Math.sqrt(_*_+y*y)/_;if(k<=n){const w=k*e/2-r-o;return 2*Math.max(p,w)}return p*2}createRenderOptions(){let t=Io,e=0,n=null,o=0,r,s=0;this.stroke_&&(r=this.stroke_.getColor(),r===null&&(r=Er),r=di(r),s=this.stroke_.getWidth(),s===void 0&&(s=Tr),n=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Io),e=this.stroke_.getMiterLimit(),e===void 0&&(e=Cr));const a=this.calculateLineJoinSize_(t,s,e),l=Math.max(this.radius_,this.radius2_||0),h=Math.ceil(2*l+a);return{strokeStyle:r,strokeWidth:s,size:h,lineDash:n,lineDashOffset:o,lineJoin:t,miterLimit:e}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]}draw_(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let o=this.fill_.getColor();o===null&&(o=Ci),e.fillStyle=di(o),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){if(this.fill_){let e=this.fill_.getColor(),n=0;if(typeof e=="string"&&(e=kr(e)),e===null?n=1:Array.isArray(e)&&(n=e.length===4?e[3]:1),n===0){const o=Ae(t.size,t.size);this.hitDetectionCanvas_=o.canvas,this.drawHitDetectionCanvas_(t,o)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(t){let e=this.points_;const n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{const o=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(e*=2);const r=this.angle_-Math.PI/2,s=2*Math.PI/e;for(let a=0;a<e;a++){const l=r+a*s,h=a%2===0?n:o;t.lineTo(h*Math.cos(l),h*Math.sin(l))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=Ci,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}}const ga=Gh;class jh extends ga{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new jh({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const Kn=jh;class on{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=ug,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new on({geometry:t,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(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=ug,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function l1(i){let t;if(typeof i=="function")t=i;else{let e;Array.isArray(i)?e=i:(gt(typeof i.getZIndex=="function",41),e=[i]),t=function(){return e}}return t}let Bh=null;function h1(i,t){if(!Bh){const e=new fe({color:"rgba(255,255,255,0.4)"}),n=new ke({color:"#3399CC",width:1.25});Bh=[new on({image:new Kn({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Bh}function hg(){const i={},t=[255,255,255,1],e=[0,153,255,1],n=3;return i.Polygon=[new on({fill:new fe({color:[255,255,255,.5]})})],i.MultiPolygon=i.Polygon,i.LineString=[new on({stroke:new ke({color:t,width:n+2})}),new on({stroke:new ke({color:e,width:n})})],i.MultiLineString=i.LineString,i.Circle=i.Polygon.concat(i.LineString),i.Point=[new on({image:new Kn({radius:n*2,fill:new fe({color:e}),stroke:new ke({color:t,width:n/2})}),zIndex:1/0})],i.MultiPoint=i.Point,i.GeometryCollection=i.Polygon.concat(i.LineString,i.Point),i}function ug(i){return i.getGeometry()}const le=on,u1="#333";class Wh{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=be(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new fe({color:u1}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}clone(){const t=this.getScale();return new Wh({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,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_}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_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=be(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const dg=Wh;function d1(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Zh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Zh.read=function(i,t,e,n,o){var r,s,a=o*8-n-1,l=(1<<a)-1,h=l>>1,u=-7,d=e?o-1:0,c=e?-1:1,g=i[t+d];for(d+=c,r=g&(1<<-u)-1,g>>=-u,u+=a;u>0;r=r*256+i[t+d],d+=c,u-=8);for(s=r&(1<<-u)-1,r>>=-u,u+=n;u>0;s=s*256+i[t+d],d+=c,u-=8);if(r===0)r=1-h;else{if(r===l)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,n),r=r-h}return(g?-1:1)*s*Math.pow(2,r-n)},Zh.write=function(i,t,e,n,o,r){var s,a,l,h=r*8-o-1,u=(1<<h)-1,d=u>>1,c=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:r-1,f=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?t+=c/l:t+=c*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,o),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;i[e+g]=a&255,g+=f,a/=256,o-=8);for(s=s<<o|a,h+=o;h>0;i[e+g]=s&255,g+=f,s/=256,h-=8);i[e+g-f]|=m*128};var c1=Tt,fa=Zh;function Tt(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}Tt.Varint=0,Tt.Fixed64=1,Tt.Bytes=2,Tt.Fixed32=5;var Yh=(1<<16)*(1<<16),cg=1/Yh,g1=12,gg=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Tt.prototype={destroy:function(){this.buf=null},readFields:function(i,t,e){for(e=e||this.length;this.pos<e;){var n=this.readVarint(),o=n>>3,r=this.pos;this.type=n&7,i(o,t,this),this.pos===r&&this.skip(n)}return t},readMessage:function(i,t){return this.readFields(i,t,this.readVarint()+this.pos)},readFixed32:function(){var i=ma(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=mg(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=ma(this.buf,this.pos)+ma(this.buf,this.pos+4)*Yh;return this.pos+=8,i},readSFixed64:function(){var i=ma(this.buf,this.pos)+mg(this.buf,this.pos+4)*Yh;return this.pos+=8,i},readFloat:function(){var i=fa.read(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=fa.read(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var t=this.buf,e,n;return n=t[this.pos++],e=n&127,n<128||(n=t[this.pos++],e|=(n&127)<<7,n<128)||(n=t[this.pos++],e|=(n&127)<<14,n<128)||(n=t[this.pos++],e|=(n&127)<<21,n<128)?e:(n=t[this.pos],e|=(n&15)<<28,f1(e,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 Boolean(this.readVarint())},readString:function(){var i=this.readVarint()+this.pos,t=this.pos;return this.pos=i,i-t>=g1&&gg?T1(this.buf,t,i):S1(this.buf,t,i)},readBytes:function(){var i=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,i);return this.pos=i,t},readPackedVarint:function(i,t){if(this.type!==Tt.Bytes)return i.push(this.readVarint(t));var e=Ii(this);for(i=i||[];this.pos<e;)i.push(this.readVarint(t));return i},readPackedSVarint:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSVarint());var t=Ii(this);for(i=i||[];this.pos<t;)i.push(this.readSVarint());return i},readPackedBoolean:function(i){if(this.type!==Tt.Bytes)return i.push(this.readBoolean());var t=Ii(this);for(i=i||[];this.pos<t;)i.push(this.readBoolean());return i},readPackedFloat:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFloat());var t=Ii(this);for(i=i||[];this.pos<t;)i.push(this.readFloat());return i},readPackedDouble:function(i){if(this.type!==Tt.Bytes)return i.push(this.readDouble());var t=Ii(this);for(i=i||[];this.pos<t;)i.push(this.readDouble());return i},readPackedFixed32:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFixed32());var t=Ii(this);for(i=i||[];this.pos<t;)i.push(this.readFixed32());return i},readPackedSFixed32:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSFixed32());var t=Ii(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed32());return i},readPackedFixed64:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFixed64());var t=Ii(this);for(i=i||[];this.pos<t;)i.push(this.readFixed64());return i},readPackedSFixed64:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSFixed64());var t=Ii(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed64());return i},skip:function(i){var t=i&7;if(t===Tt.Varint)for(;this.buf[this.pos++]>127;);else if(t===Tt.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Tt.Fixed32)this.pos+=4;else if(t===Tt.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t)},writeTag:function(i,t){this.writeVarint(i<<3|t)},realloc:function(i){for(var t=this.length||16;t<this.pos+i;)t*=2;if(t!==this.length){var e=new Uint8Array(t);e.set(this.buf),this.buf=e,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(i){this.realloc(4),Lo(this.buf,i,this.pos),this.pos+=4},writeSFixed32:function(i){this.realloc(4),Lo(this.buf,i,this.pos),this.pos+=4},writeFixed64:function(i){this.realloc(8),Lo(this.buf,i&-1,this.pos),Lo(this.buf,Math.floor(i*cg),this.pos+4),this.pos+=8},writeSFixed64:function(i){this.realloc(8),Lo(this.buf,i&-1,this.pos),Lo(this.buf,Math.floor(i*cg),this.pos+4),this.pos+=8},writeVarint:function(i){if(i=+i||0,i>268435455||i<0){m1(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(Boolean(i))},writeString:function(i){i=String(i),this.realloc(i.length*4),this.pos++;var t=this.pos;this.pos=I1(this.buf,i,this.pos);var e=this.pos-t;e>=128&&fg(t,e,this),this.pos=t-1,this.writeVarint(e),this.pos+=e},writeFloat:function(i){this.realloc(4),fa.write(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),fa.write(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var t=i.length;this.writeVarint(t),this.realloc(t);for(var e=0;e<t;e++)this.buf[this.pos++]=i[e]},writeRawMessage:function(i,t){this.pos++;var e=this.pos;i(t,this);var n=this.pos-e;n>=128&&fg(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeMessage:function(i,t,e){this.writeTag(i,Tt.Bytes),this.writeRawMessage(t,e)},writePackedVarint:function(i,t){t.length&&this.writeMessage(i,_1,t)},writePackedSVarint:function(i,t){t.length&&this.writeMessage(i,y1,t)},writePackedBoolean:function(i,t){t.length&&this.writeMessage(i,k1,t)},writePackedFloat:function(i,t){t.length&&this.writeMessage(i,x1,t)},writePackedDouble:function(i,t){t.length&&this.writeMessage(i,b1,t)},writePackedFixed32:function(i,t){t.length&&this.writeMessage(i,w1,t)},writePackedSFixed32:function(i,t){t.length&&this.writeMessage(i,M1,t)},writePackedFixed64:function(i,t){t.length&&this.writeMessage(i,C1,t)},writePackedSFixed64:function(i,t){t.length&&this.writeMessage(i,E1,t)},writeBytesField:function(i,t){this.writeTag(i,Tt.Bytes),this.writeBytes(t)},writeFixed32Field:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeSFixed64(t)},writeVarintField:function(i,t){this.writeTag(i,Tt.Varint),this.writeVarint(t)},writeSVarintField:function(i,t){this.writeTag(i,Tt.Varint),this.writeSVarint(t)},writeStringField:function(i,t){this.writeTag(i,Tt.Bytes),this.writeString(t)},writeFloatField:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeFloat(t)},writeDoubleField:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeDouble(t)},writeBooleanField:function(i,t){this.writeVarintField(i,Boolean(t))}};function f1(i,t,e){var n=e.buf,o,r;if(r=n[e.pos++],o=(r&112)>>4,r<128||(r=n[e.pos++],o|=(r&127)<<3,r<128)||(r=n[e.pos++],o|=(r&127)<<10,r<128)||(r=n[e.pos++],o|=(r&127)<<17,r<128)||(r=n[e.pos++],o|=(r&127)<<24,r<128)||(r=n[e.pos++],o|=(r&1)<<31,r<128))return Do(i,o,t);throw new Error("Expected varint not more than 10 bytes")}function Ii(i){return i.type===Tt.Bytes?i.readVarint()+i.pos:i.pos+1}function Do(i,t,e){return e?t*4294967296+(i>>>0):(t>>>0)*4294967296+(i>>>0)}function m1(i,t){var e,n;if(i>=0?(e=i%4294967296|0,n=i/4294967296|0):(e=~(-i%4294967296),n=~(-i/4294967296),e^4294967295?e=e+1|0:(e=0,n=n+1|0)),i>=18446744073709552e3||i<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),p1(e,n,t),v1(n,t)}function p1(i,t,e){e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos]=i&127}function v1(i,t){var e=(i&7)<<4;t.buf[t.pos++]|=e|((i>>>=3)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127)))))}function fg(i,t,e){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7));e.realloc(n);for(var o=e.pos-1;o>=i;o--)e.buf[o+n]=e.buf[o]}function _1(i,t){for(var e=0;e<i.length;e++)t.writeVarint(i[e])}function y1(i,t){for(var e=0;e<i.length;e++)t.writeSVarint(i[e])}function x1(i,t){for(var e=0;e<i.length;e++)t.writeFloat(i[e])}function b1(i,t){for(var e=0;e<i.length;e++)t.writeDouble(i[e])}function k1(i,t){for(var e=0;e<i.length;e++)t.writeBoolean(i[e])}function w1(i,t){for(var e=0;e<i.length;e++)t.writeFixed32(i[e])}function M1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed32(i[e])}function C1(i,t){for(var e=0;e<i.length;e++)t.writeFixed64(i[e])}function E1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed64(i[e])}function ma(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+i[t+3]*16777216}function Lo(i,t,e){i[e]=t,i[e+1]=t>>>8,i[e+2]=t>>>16,i[e+3]=t>>>24}function mg(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+(i[t+3]<<24)}function S1(i,t,e){for(var n="",o=t;o<e;){var r=i[o],s=null,a=r>239?4:r>223?3:r>191?2:1;if(o+a>e)break;var l,h,u;a===1?r<128&&(s=r):a===2?(l=i[o+1],(l&192)===128&&(s=(r&31)<<6|l&63,s<=127&&(s=null))):a===3?(l=i[o+1],h=i[o+2],(l&192)===128&&(h&192)===128&&(s=(r&15)<<12|(l&63)<<6|h&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):a===4&&(l=i[o+1],h=i[o+2],u=i[o+3],(l&192)===128&&(h&192)===128&&(u&192)===128&&(s=(r&15)<<18|(l&63)<<12|(h&63)<<6|u&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,a=1):s>65535&&(s-=65536,n+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),n+=String.fromCharCode(s),o+=a}return n}function T1(i,t,e){return gg.decode(i.subarray(t,e))}function I1(i,t,e){for(var n=0,o,r;n<t.length;n++){if(o=t.charCodeAt(n),o>55295&&o<57344)if(r)if(o<56320){i[e++]=239,i[e++]=191,i[e++]=189,r=o;continue}else o=r-55296<<10|o-56320|65536,r=null;else{o>56319||n+1===t.length?(i[e++]=239,i[e++]=191,i[e++]=189):r=o;continue}else r&&(i[e++]=239,i[e++]=191,i[e++]=189,r=null);o<128?i[e++]=o:(o<2048?i[e++]=o>>6|192:(o<65536?i[e++]=o>>12|224:(i[e++]=o>>18|240,i[e++]=o>>12&63|128),i[e++]=o>>6&63|128),i[e++]=o&63|128)}return e}class pa extends Qi{constructor(t,e,n){super(),n!==void 0&&e===void 0?this.setFlatCoordinates(n,t):(e=e||0,this.setCenterAndRadius(t,e,n))}clone(){const t=new pa(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){const r=this.flatCoordinates,s=t-r[0],a=e-r[1],l=s*s+a*a;if(l<o){if(l===0)for(let h=0;h<this.stride;++h)n[h]=r[h];else{const h=this.getRadius()/Math.sqrt(l);n[0]=r[0]+h*s,n[1]=r[1]+h*a;for(let u=2;u<this.stride;++u)n[u]=r[u]}return n.length=this.stride,l}else return o}containsXY(t,e){const n=this.flatCoordinates,o=t-n[0],r=e-n[1];return o*o+r*r<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(t){const e=this.flatCoordinates,n=e[this.stride]-e[0];return ti(e[0]-n,e[1]-n,e[0]+n,e[1]+n,t)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e}getType(){return"Circle"}intersectsExtent(t){const e=this.getExtent();if($t(t,e)){const n=this.getCenter();return t[0]<=n[0]&&t[2]>=n[0]||t[1]<=n[1]&&t[3]>=n[1]?!0:Rl(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],o=t.slice();o[e]=o[0]+n;for(let r=1;r<e;++r)o[e+r]=t[r];this.setFlatCoordinates(this.layout,o),this.changed()}setCenterAndRadius(t,e,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]);const o=this.flatCoordinates;let r=Lc(o,0,t,this.stride);o[r++]=o[0]+e;for(let s=1,a=this.stride;s<a;++s)o[r++]=o[s];o.length=r,this.changed()}getCoordinates(){return null}setCoordinates(t,e){}setRadius(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()}rotate(t,e){const n=this.getCenter(),o=this.getStride();this.setCenter(nh(n,0,n.length,o,t,e,n)),this.changed()}translate(t,e){const n=this.getCenter(),o=this.getStride();this.setCenter(Rc(n,0,n.length,o,t,e,n)),this.changed()}}pa.prototype.transform;const z1=pa,pg=qe();class Dr{constructor(t,e,n,o,r){this.styleFunction,this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=o}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?yr(this.flatCoordinates_):zl(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=qi(this.getExtent());this.flatInteriorPoints_=gh(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=rg(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=jc(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=aa(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const n=this.ends_;for(let o=0,r=n.length;o<r;++o){const s=n[o],a=aa(t,e,s,2,.5);li(this.flatMidpoints_,a),e=s}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getStride(){return 2}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){t=Gt(t);const e=t.getExtent(),n=t.getWorldExtent();if(e&&n){const o=Ue(n)/Ue(e);Mi(pg,n[0],n[3],o,-o,0,0,0),Ji(this.flatCoordinates_,0,this.flatCoordinates_.length,2,pg,this.flatCoordinates_)}}getEnds(){return this.ends_}}Dr.prototype.getEndss=Dr.prototype.getEnds,Dr.prototype.getFlatCoordinates=Dr.prototype.getOrientedFlatCoordinates;const Xh=Dr;class R1 extends ng{constructor(t){super(),t=t||{},this.dataProjection=new Fs({code:"",units:"tile-pixels"}),this.featureClass_=t.featureClass?t.featureClass:Xh,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.idProperty_=t.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(t,e,n,o){t.pos=e.geometry;const r=t.readVarint()+t.pos;let s=1,a=0,l=0,h=0,u=0,d=0;for(;t.pos<r;){if(!a){const c=t.readVarint();s=c&7,a=c>>3}a--,s===1||s===2?(l+=t.readSVarint(),h+=t.readSVarint(),s===1&&u>d&&(o.push(u),d=u),n.push(l,h),u+=2):s===7?u>d&&(n.push(n[d],n[d+1]),u+=2):gt(!1,59)}u>d&&(o.push(u),d=u)}createFeature_(t,e,n){const o=e.type;if(o===0)return null;let r;const s=e.properties;let a;this.idProperty_?(a=s[this.idProperty_],delete s[this.idProperty_]):a=e.id,s[this.layerName_]=e.layer.name;const l=[],h=[];this.readRawGeometry_(t,e,l,h);const u=O1(o,h.length);if(this.featureClass_===Xh)r=new this.featureClass_(u,l,h,s,a),r.transform(n.dataProjection);else{let d;if(u=="Polygon"){const f=Yv(l,h);d=f.length>1?new Ah(l,"XY",f):new Vn(l,"XY",h)}else d=u==="Point"?new ni(l,"XY"):u==="LineString"?new $n(l,"XY"):u==="MultiPoint"?new Ar(l,"XY"):u==="MultiLineString"?new zh(l,"XY",h):null;const c=this.featureClass_;r=new c,this.geometryName_&&r.setGeometryName(this.geometryName_);const g=Th(d,!1,n);r.setGeometry(g),a!==void 0&&r.setId(a),r.setProperties(s,!0)}return r}getType(){return"arraybuffer"}readFeatures(t,e){const n=this.layers_;e=this.adaptOptions(e);const o=Gt(e.dataProjection);o.setWorldExtent(e.extent),e.dataProjection=o;const r=new c1(t),s=r.readFields(A1,{}),a=[];for(const l in s){if(n&&!n.includes(l))continue;const h=s[l],u=h?[0,0,h.extent,h.extent]:null;o.setExtent(u);for(let d=0,c=h.length;d<c;++d){const g=L1(r,h,d),f=this.createFeature_(r,g,e);f!==null&&a.push(f)}}return a}readProjection(t){return this.dataProjection}setLayers(t){this.layers_=t}}function A1(i,t,e){if(i===3){const n={keys:[],values:[],features:[]},o=e.readVarint()+e.pos;e.readFields(P1,n,o),n.length=n.features.length,n.length&&(t[n.name]=n)}}function P1(i,t,e){if(i===15)t.version=e.readVarint();else if(i===1)t.name=e.readString();else if(i===5)t.extent=e.readVarint();else if(i===2)t.features.push(e.pos);else if(i===3)t.keys.push(e.readString());else if(i===4){let n=null;const o=e.readVarint()+e.pos;for(;e.pos<o;)i=e.readVarint()>>3,n=i===1?e.readString():i===2?e.readFloat():i===3?e.readDouble():i===4?e.readVarint64():i===5?e.readVarint():i===6?e.readSVarint():i===7?e.readBoolean():null;t.values.push(n)}}function D1(i,t,e){if(i==1)t.id=e.readVarint();else if(i==2){const n=e.readVarint()+e.pos;for(;e.pos<n;){const o=t.layer.keys[e.readVarint()],r=t.layer.values[e.readVarint()];t.properties[o]=r}}else i==3?t.type=e.readVarint():i==4&&(t.geometry=e.pos)}function L1(i,t,e){i.pos=t.features[e];const n=i.readVarint()+i.pos,o={layer:t,type:0,properties:{}};return i.readFields(D1,o,n),o}function O1(i,t){let e;return i===1?e=t===1?"Point":"MultiPoint":i===2?e=t===1?"LineString":"MultiLineString":i===3&&(e="Polygon"),e}const F1=R1;function N1(i,t,e,n,o){vg(i,t,e||0,n||i.length-1,o||G1)}function vg(i,t,e,n,o){for(;n>e;){if(n-e>600){var r=n-e+1,s=t-e+1,a=Math.log(r),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(r-l)/r)*(s-r/2<0?-1:1),u=Math.max(e,Math.floor(t-s*l/r+h)),d=Math.min(n,Math.floor(t+(r-s)*l/r+h));vg(i,t,u,d,o)}var c=i[t],g=e,f=n;for(Lr(i,e,t),o(i[n],c)>0&&Lr(i,e,n);g<f;){for(Lr(i,g,f),g++,f--;o(i[g],c)<0;)g++;for(;o(i[f],c)>0;)f--}o(i[e],c)===0?Lr(i,e,f):(f++,Lr(i,f,n)),f<=t&&(e=f+1),t<=f&&(n=f-1)}}function Lr(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function G1(i,t){return i<t?-1:i>t?1:0}class _g{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!_a(t,e))return n;const o=this.toBBox,r=[];for(;e;){for(let s=0;s<e.children.length;s++){const a=e.children[s],l=e.leaf?o(a):a;_a(t,l)&&(e.leaf?n.push(a):Vh(t,l)?this._all(a,n):r.push(a))}e=r.pop()}return n}collides(t){let e=this.data;if(!_a(t,e))return!1;const n=[];for(;e;){for(let o=0;o<e.children.length;o++){const r=e.children[o],s=e.leaf?this.toBBox(r):r;if(_a(t,s)){if(e.leaf||Vh(t,s))return!0;n.push(r)}}e=n.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let n=0;n<t.length;n++)this.insert(t[n]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const n=this.data;this.data=e,e=n}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Fo([]),this}remove(t,e){if(!t)return this;let n=this.data;const o=this.toBBox(t),r=[],s=[];let a,l,h;for(;n||r.length;){if(n||(n=r.pop(),l=r[r.length-1],a=s.pop(),h=!0),n.leaf){const u=j1(t,n.children,e);if(u!==-1)return n.children.splice(u,1),r.push(n),this._condense(r),this}!h&&!n.leaf&&Vh(n,o)?(r.push(n),s.push(a),a=0,l=n,n=n.children[0]):l?(a++,n=l.children[a],h=!1):n=null}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const n=[];for(;t;)t.leaf?e.push(...t.children):n.push(...t.children),t=n.pop();return e}_build(t,e,n,o){const r=n-e+1;let s=this._maxEntries,a;if(r<=s)return a=Fo(t.slice(e,n+1)),Oo(a,this.toBBox),a;o||(o=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/Math.pow(s,o-1))),a=Fo([]),a.leaf=!1,a.height=o;const l=Math.ceil(r/s),h=l*Math.ceil(Math.sqrt(s));yg(t,e,n,h,this.compareMinX);for(let u=e;u<=n;u+=h){const d=Math.min(u+h-1,n);yg(t,u,d,l,this.compareMinY);for(let c=u;c<=d;c+=l){const g=Math.min(c+l-1,d);a.children.push(this._build(t,c,g,o-1))}}return Oo(a,this.toBBox),a}_chooseSubtree(t,e,n,o){for(;o.push(e),!(e.leaf||o.length-1===n);){let r=1/0,s=1/0,a;for(let l=0;l<e.children.length;l++){const h=e.children[l],u=Uh(h),d=Z1(t,h)-u;d<s?(s=d,r=u<r?u:r,a=h):d===s&&u<r&&(r=u,a=h)}e=a||e.children[0]}return e}_insert(t,e,n){const o=n?t:this.toBBox(t),r=[],s=this._chooseSubtree(o,this.data,e,r);for(s.children.push(t),Fr(s,o);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(o,r,e)}_split(t,e){const n=t[e],o=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,o);const s=this._chooseSplitIndex(n,r,o),a=Fo(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,Oo(n,this.toBBox),Oo(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=Fo([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Oo(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let o,r=1/0,s=1/0;for(let a=e;a<=n-e;a++){const l=Or(t,0,a,this.toBBox),h=Or(t,a,n,this.toBBox),u=Y1(l,h),d=Uh(l)+Uh(h);u<r?(r=u,o=a,s=d<s?d:s):u===r&&d<s&&(s=d,o=a)}return o||n-e}_chooseSplitAxis(t,e,n){const o=t.leaf?this.compareMinX:B1,r=t.leaf?this.compareMinY:W1,s=this._allDistMargin(t,e,n,o),a=this._allDistMargin(t,e,n,r);s<a&&t.children.sort(o)}_allDistMargin(t,e,n,o){t.children.sort(o);const r=this.toBBox,s=Or(t,0,e,r),a=Or(t,n-e,n,r);let l=va(s)+va(a);for(let h=e;h<n-e;h++){const u=t.children[h];Fr(s,t.leaf?r(u):u),l+=va(s)}for(let h=n-e-1;h>=e;h--){const u=t.children[h];Fr(a,t.leaf?r(u):u),l+=va(a)}return l}_adjustParentBBoxes(t,e,n){for(let o=n;o>=0;o--)Fr(e[o],t)}_condense(t){for(let e=t.length-1,n;e>=0;e--)t[e].children.length===0?e>0?(n=t[e-1].children,n.splice(n.indexOf(t[e]),1)):this.clear():Oo(t[e],this.toBBox)}}function j1(i,t,e){if(!e)return t.indexOf(i);for(let n=0;n<t.length;n++)if(e(i,t[n]))return n;return-1}function Oo(i,t){Or(i,0,i.children.length,t,i)}function Or(i,t,e,n,o){o||(o=Fo(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let r=t;r<e;r++){const s=i.children[r];Fr(o,i.leaf?n(s):s)}return o}function Fr(i,t){return i.minX=Math.min(i.minX,t.minX),i.minY=Math.min(i.minY,t.minY),i.maxX=Math.max(i.maxX,t.maxX),i.maxY=Math.max(i.maxY,t.maxY),i}function B1(i,t){return i.minX-t.minX}function W1(i,t){return i.minY-t.minY}function Uh(i){return(i.maxX-i.minX)*(i.maxY-i.minY)}function va(i){return i.maxX-i.minX+(i.maxY-i.minY)}function Z1(i,t){return(Math.max(t.maxX,i.maxX)-Math.min(t.minX,i.minX))*(Math.max(t.maxY,i.maxY)-Math.min(t.minY,i.minY))}function Y1(i,t){const e=Math.max(i.minX,t.minX),n=Math.max(i.minY,t.minY),o=Math.min(i.maxX,t.maxX),r=Math.min(i.maxY,t.maxY);return Math.max(0,o-e)*Math.max(0,r-n)}function Vh(i,t){return i.minX<=t.minX&&i.minY<=t.minY&&t.maxX<=i.maxX&&t.maxY<=i.maxY}function _a(i,t){return t.minX<=i.maxX&&t.minY<=i.maxY&&t.maxX>=i.minX&&t.maxY>=i.minY}function Fo(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function yg(i,t,e,n,o){const r=[t,e];for(;r.length;){if(e=r.pop(),t=r.pop(),e-t<=n)continue;const s=t+Math.ceil((e-t)/n/2)*n;N1(i,s,t,e,o),r.push(t,s,s,e)}}function xg(i){return new le({fill:Nr(i,""),stroke:Gr(i,""),text:X1(i),image:U1(i)})}function Nr(i,t){const e=i[t+"fill-color"];if(!!e)return new fe({color:e})}function Gr(i,t){const e=i[t+"stroke-width"],n=i[t+"stroke-color"];if(!(!e&&!n))return new ke({width:e,color:n,lineCap:i[t+"stroke-line-cap"],lineJoin:i[t+"stroke-line-join"],lineDash:i[t+"stroke-line-dash"],lineDashOffset:i[t+"stroke-line-dash-offset"],miterLimit:i[t+"stroke-miter-limit"]})}function X1(i){const t=i["text-value"];return t?new dg({text:t,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"],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:Nr(i,"text-"),backgroundFill:Nr(i,"text-background-"),stroke:Gr(i,"text-"),backgroundStroke:Gr(i,"text-background-")}):void 0}function U1(i){const t=i["icon-src"],e=i["icon-img"];if(t||e)return new ca({src:t,img:e,imgSize:i["icon-img-size"],anchor:i["icon-anchor"],anchorOrigin:i["icon-anchor-origin"],anchorXUnits: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"],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 r="shape-";return new ga({points:n,fill:Nr(i,r),stroke:Gr(i,r),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 o=i["circle-radius"];if(o){const r="circle-";return new Kn({radius:o,fill:Nr(i,r),stroke:Gr(i,r),displacement:i["circle-displacement"],scale:i["circle-scale"],rotation:i["circle-rotation"],rotateWithView:i["circle-rotate-with-view"],declutterMode:i["circle-declutter-mode"]})}}const bg={RENDER_ORDER:"renderOrder"};class V1 extends Os{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter!==void 0?t.declutter:!1,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(bg.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new _g(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(bg.RENDER_ORDER,t)}setStyle(t){let e;if(t===void 0)e=h1;else if(t===null)e=null;else if(typeof t=="function")e=t;else if(t instanceof le)e=t;else if(Array.isArray(t)){const n=t.length,o=new Array(n);for(let r=0;r<n;++r){const s=t[r];s instanceof le?o[r]=s:o[r]=xg(s)}e=o}else e=xg(t);this.style_=e,this.styleFunction_=t===null?void 0:l1(this.style_),this.changed()}}const kg=V1,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},ya=[jr.FILL],rn=[jr.STROKE],Jn=[jr.BEGIN_PATH],wg=[jr.CLOSE_PATH],Q=jr;class q1{drawCustom(t,e,n,o){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}const Mg=q1;class $1 extends Mg{constructor(t,e,n,o){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=o,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(t){const e=this.pixelRatio;return e==1?t:t.map(function(n){return n*e})}appendFlatPointCoordinates(t,e){const n=this.getBufferedMaxExtent(),o=this.tmpCoordinate_,r=this.coordinates;let s=r.length;for(let a=0,l=t.length;a<l;a+=e)o[0]=t[a],o[1]=t[a+1],Gs(n,o)&&(r[s++]=o[0],r[s++]=o[1]);return s}appendFlatLineCoordinates(t,e,n,o,r,s){const a=this.coordinates;let l=a.length;const h=this.getBufferedMaxExtent();s&&(e+=o);let u=t[e],d=t[e+1];const c=this.tmpCoordinate_;let g=!0,f,m,p;for(f=e+o;f<n;f+=o)c[0]=t[f],c[1]=t[f+1],p=Il(h,c),p!==m?(g&&(a[l++]=u,a[l++]=d,g=!1),a[l++]=c[0],a[l++]=c[1]):p===ne.INTERSECTING?(a[l++]=c[0],a[l++]=c[1],g=!1):g=!0,u=c[0],d=c[1],m=p;return(r&&g||f===e+o)&&(a[l++]=u,a[l++]=d),l}drawCustomCoordinates_(t,e,n,o,r){for(let s=0,a=n.length;s<a;++s){const l=n[s],h=this.appendFlatLineCoordinates(t,e,l,o,!1,!1);r.push(h),e=l}return e}drawCustom(t,e,n,o){this.beginGeometry(t,e);const r=t.getType(),s=t.getStride(),a=this.coordinates.length;let l,h,u,d,c;switch(r){case"MultiPolygon":l=t.getOrientedFlatCoordinates(),d=[];const g=t.getEndss();c=0;for(let f=0,m=g.length;f<m;++f){const p=[];c=this.drawCustomCoordinates_(l,c,g[f],s,p),d.push(p)}this.instructions.push([Q.CUSTOM,a,d,t,n,uh]),this.hitDetectionInstructions.push([Q.CUSTOM,a,d,t,o||n,uh]);break;case"Polygon":case"MultiLineString":u=[],l=r=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),c=this.drawCustomCoordinates_(l,0,t.getEnds(),s,u),this.instructions.push([Q.CUSTOM,a,u,t,n,Ir]),this.hitDetectionInstructions.push([Q.CUSTOM,a,u,t,o||n,Ir]);break;case"LineString":case"Circle":l=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(l,0,l.length,s,!1,!1),this.instructions.push([Q.CUSTOM,a,h,t,n,tn]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,o||n,tn]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,s),h>a&&(this.instructions.push([Q.CUSTOM,a,h,t,n,tn]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,o||n,tn]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([Q.CUSTOM,a,h,t,n]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,o||n]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[Q.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Q.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let o,r,s=-1;for(e=0;e<n;++e)o=t[e],r=o[0],r==Q.END_GEOMETRY?s=e:r==Q.BEGIN_GEOMETRY&&(o[2]=e,Up(this.hitDetectionInstructions,s,e),s=-1)}setFillStrokeStyle(t,e){const n=this.state;if(t){const o=t.getColor();n.fillStyle=di(o||Ci)}else n.fillStyle=void 0;if(e){const o=e.getColor();n.strokeStyle=di(o||Er);const r=e.getLineCap();n.lineCap=r!==void 0?r:$s;const s=e.getLineDash();n.lineDash=s?s.slice():wr;const a=e.getLineDashOffset();n.lineDashOffset=a||Mr;const l=e.getLineJoin();n.lineJoin=l!==void 0?l:Io;const h=e.getWidth();n.lineWidth=h!==void 0?h:Tr;const u=e.getMiterLimit();n.miterLimit=u!==void 0?u:Cr,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(t){const e=t.fillStyle,n=[Q.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(!0),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Q.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,o=t.lineCap,r=t.lineDash,s=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=o||r!=t.currentLineDash&&!Zi(t.currentLineDash,r)||t.currentLineDashOffset!=s||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=o,t.currentLineDash=r,t.currentLineDashOffset=s,t.currentLineJoin=a,t.currentLineWidth=l,t.currentMiterLimit=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Q.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=ec(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;ui(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Br=$1;class H1 extends Br{constructor(t,e,n,o){super(t,e,n,o),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(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),o=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(n,o);this.instructions.push([Q.DRAW_IMAGE,r,s,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([Q.DRAW_IMAGE,r,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),o=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(n,o);this.instructions.push([Q.DRAW_IMAGE,r,s,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([Q.DRAW_IMAGE,r,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}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(t,e){const n=t.getAnchor(),o=t.getSize(),r=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=o[1],this.opacity_=t.getOpacity(),this.originX_=r[0],this.originY_=r[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=o[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const K1=H1;class J1 extends Br{constructor(t,e,n,o){super(t,e,n,o)}drawFlatCoordinates_(t,e,n,o){const r=this.coordinates.length,s=this.appendFlatLineCoordinates(t,e,n,o,!1,!1),a=[Q.MOVE_TO_LINE_TO,r,s];return this.instructions.push(a),this.hitDetectionInstructions.push(a),n}drawLineString(t,e){const n=this.state,o=n.strokeStyle,r=n.lineWidth;if(o===void 0||r===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,wr,Mr],Jn);const s=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(s,0,s.length,a),this.hitDetectionInstructions.push(rn),this.endGeometry(e)}drawMultiLineString(t,e){const n=this.state,o=n.strokeStyle,r=n.lineWidth;if(o===void 0||r===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],Jn);const s=t.getEnds(),a=t.getFlatCoordinates(),l=t.getStride();let h=0;for(let u=0,d=s.length;u<d;++u)h=this.drawFlatCoordinates_(a,h,s[u],l);this.hitDetectionInstructions.push(rn),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(rn),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(rn),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(Jn)}}const Q1=J1;class ty extends Br{constructor(t,e,n,o){super(t,e,n,o)}drawFlatCoordinatess_(t,e,n,o){const r=this.state,s=r.fillStyle!==void 0,a=r.strokeStyle!==void 0,l=n.length;this.instructions.push(Jn),this.hitDetectionInstructions.push(Jn);for(let h=0;h<l;++h){const u=n[h],d=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,u,o,!0,!a),g=[Q.MOVE_TO_LINE_TO,d,c];this.instructions.push(g),this.hitDetectionInstructions.push(g),a&&(this.instructions.push(wg),this.hitDetectionInstructions.push(wg)),e=u}return s&&(this.instructions.push(ya),this.hitDetectionInstructions.push(ya)),a&&(this.instructions.push(rn),this.hitDetectionInstructions.push(rn)),e}drawCircle(t,e){const n=this.state,o=n.fillStyle,r=n.strokeStyle;if(o===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Ci]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getFlatCoordinates(),a=t.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(s,0,s.length,a,!1,!1);const h=[Q.CIRCLE,l];this.instructions.push(Jn,h),this.hitDetectionInstructions.push(Jn,h),n.fillStyle!==void 0&&(this.instructions.push(ya),this.hitDetectionInstructions.push(ya)),n.strokeStyle!==void 0&&(this.instructions.push(rn),this.hitDetectionInstructions.push(rn)),this.endGeometry(e)}drawPolygon(t,e){const n=this.state,o=n.fillStyle,r=n.strokeStyle;if(o===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Ci]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getEnds(),a=t.getOrientedFlatCoordinates(),l=t.getStride();this.drawFlatCoordinatess_(a,0,s,l),this.endGeometry(e)}drawMultiPolygon(t,e){const n=this.state,o=n.fillStyle,r=n.strokeStyle;if(o===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Ci]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getEndss(),a=t.getOrientedFlatCoordinates(),l=t.getStride();let h=0;for(let u=0,d=s.length;u<d;++u)h=this.drawFlatCoordinatess_(a,h,s[u],l);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let n=0,o=e.length;n<o;++n)e[n]=Xn(e[n],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}const Cg=ty;function ey(i,t,e,n,o){let r=e,s=e,a=0,l=0,h=e,u,d,c,g,f,m,p,_,v,y;for(d=e;d<n;d+=o){const x=t[d],k=t[d+1];f!==void 0&&(v=x-f,y=k-m,g=Math.sqrt(v*v+y*y),p!==void 0&&(l+=c,u=Math.acos((p*v+_*y)/(c*g)),u>i&&(l>a&&(a=l,r=h,s=d),l=0,h=d-o)),c=g,p=v,_=y),f=x,m=k}return l+=g,l>a?[h,d]:[r,s]}const Wr={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class iy extends Br{constructor(t,e,n,o){super(t,e,n,o),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const n=this.textFillState_,o=this.textStrokeState_,r=this.textState_;if(this.text_===""||!r||!n&&!o)return;const s=this.coordinates;let a=s.length;const l=t.getType();let h=null,u=t.getStride();if(r.placement==="line"&&(l=="LineString"||l=="MultiLineString"||l=="Polygon"||l=="MultiPolygon")){if(!$t(this.getBufferedMaxExtent(),t.getExtent()))return;let d;if(h=t.getFlatCoordinates(),l=="LineString")d=[h.length];else if(l=="MultiLineString")d=t.getEnds();else if(l=="Polygon")d=t.getEnds().slice(0,1);else if(l=="MultiPolygon"){const m=t.getEndss();d=[];for(let p=0,_=m.length;p<_;++p)d.push(m[p][0])}this.beginGeometry(t,e);const c=r.textAlign;let g=0,f;for(let m=0,p=d.length;m<p;++m){if(c==null){const v=ey(r.maxAngle,h,g,d[m],u);g=v[0],f=v[1]}else f=d[m];for(let v=g;v<f;v+=u)s.push(h[v],h[v+1]);const _=s.length;g=d[m],this.drawChars_(a,_),a=_}this.endGeometry(e)}else{let d=r.overflow?null:[];switch(l){case"Point":case"MultiPoint":h=t.getFlatCoordinates();break;case"LineString":h=t.getFlatMidpoint();break;case"Circle":h=t.getCenter();break;case"MultiLineString":h=t.getFlatMidpoints(),u=2;break;case"Polygon":h=t.getFlatInteriorPoint(),r.overflow||d.push(h[2]/this.resolution),u=3;break;case"MultiPolygon":const p=t.getFlatInteriorPoints();h=[];for(let _=0,v=p.length;_<v;_+=3)r.overflow||d.push(p[_+2]/this.resolution),h.push(p[_],p[_+1]);if(h.length===0)return;u=2;break}const c=this.appendFlatPointCoordinates(h,u);if(c===a)return;if(d&&(c-a)/2!==h.length/u){let p=a/2;d=d.filter((_,v)=>{const y=s[(p+v)*2]===h[v*u]&&s[(p+v)*2+1]===h[v*u+1];return y||--p,y})}this.saveTextStates_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let g=r.padding;if(g!=Yn&&(r.scale[0]<0||r.scale[1]<0)){let p=r.padding[0],_=r.padding[1],v=r.padding[2],y=r.padding[3];r.scale[0]<0&&(_=-_,y=-y),r.scale[1]<0&&(p=-p,v=-v),g=[p,_,v,y]}const f=this.pixelRatio;this.instructions.push([Q.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,g==Yn?Yn:g.map(function(p){return p*f}),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/f;this.hitDetectionInstructions.push([Q.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,void 0,this.declutterImageWithText_,g,!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,o=this.strokeKey_;t&&(o in this.strokeStates||(this.strokeStates[o]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||Sr,justify:e.justify,textBaseline:e.textBaseline||Hs,scale:e.scale});const s=this.fillKey_;n&&(s in this.fillStates||(this.fillStates[s]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,o=this.textState_,r=this.strokeKey_,s=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=Wr[o.textBaseline],u=this.textOffsetY_*l,d=this.text_,c=n?n.lineWidth*Math.abs(o.scale[0])/2:0;this.instructions.push([Q.DRAW_CHARS,t,e,h,o.overflow,a,o.maxAngle,l,u,r,c*l,d,s,1]),this.hitDetectionInstructions.push([Q.DRAW_CHARS,t,e,h,o.overflow,a,o.maxAngle,1,u,r,c,d,s,1/l])}setTextStyle(t,e){let n,o,r;if(!t)this.text_="";else{const s=t.getFill();s?(o=this.textFillState_,o||(o={},this.textFillState_=o),o.fillStyle=di(s.getColor()||Ci)):(o=null,this.textFillState_=o);const a=t.getStroke();if(!a)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const f=a.getLineDash(),m=a.getLineDashOffset(),p=a.getWidth(),_=a.getMiterLimit();r.lineCap=a.getLineCap()||$s,r.lineDash=f?f.slice():wr,r.lineDashOffset=m===void 0?Mr:m,r.lineJoin=a.getLineJoin()||Io,r.lineWidth=p===void 0?Tr:p,r.miterLimit=_===void 0?Cr:_,r.strokeStyle=di(a.getColor()||Er)}n=this.textState_;const l=t.getFont()||wc;nv(l);const h=t.getScaleArray();n.overflow=t.getOverflow(),n.font=l,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||Hs,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||Yn,n.scale=h===void 0?[1,1]:h;const u=t.getOffsetX(),d=t.getOffsetY(),c=t.getRotateWithView(),g=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=u===void 0?0:u,this.textOffsetY_=d===void 0?0:d,this.textRotateWithView_=c===void 0?!1:c,this.textRotation_=g===void 0?0:g,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:$(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=o?typeof o.fillStyle=="string"?o.fillStyle:"|"+$(o.fillStyle):""}this.declutterImageWithText_=e}}const ny={Circle:Cg,Default:Br,Image:K1,LineString:Q1,Polygon:Cg,Text:iy};class oy{constructor(t,e,n,o){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=o,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const o in n){const r=n[o].finish();t[e][o]=r}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let o=this.buildersByZIndex_[n];o===void 0&&(o={},this.buildersByZIndex_[n]=o);let r=o[e];if(r===void 0){const s=ny[e];r=new s(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),o[e]=r}return r}}const xa=oy;class ry extends jd{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return et()}getData(t){return null}prepareFrame(t){return et()}renderFrame(t,e){return et()}loadedTileCallback(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n}createLoadedTileFinder(t,e,n){return function(o,r){const s=this.loadedTileCallback.bind(this,n,o);return t.forEachLoadedTile(e,o,r,s)}.bind(this)}forEachFeatureAtCoordinate(t,e,n,o,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){t.target.getState()===Qt.LOADED&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Qt.LOADED&&e!=Qt.ERROR&&t.addEventListener(tt.CHANGE,this.boundHandleImageChange_),e==Qt.IDLE&&(t.load(),e=t.getState()),e==Qt.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const sy=ry,Eg=[];let No=null;function ay(){const i=document.createElement("canvas");i.width=1,i.height=1,No=i.getContext("2d")}class ly extends sy{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=qe(),this.pixelTransform=qe(),this.inversePixelTransform=qe(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){No||ay(),No.clearRect(0,0,1,1);let o;try{No.drawImage(t,e,n,1,1,0,0,1,1),o=No.getImageData(0,0,1,1).data}catch{return No=null,null}return o}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const o=this.getLayer().getClassName();let r,s;if(t&&t.className===o&&(!n||t&&t.style.backgroundColor&&Zi(kr(t.style.backgroundColor),kr(n)))){const a=t.firstElementChild;a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}if(s&&s.canvas.style.transform===e?(this.container=t,this.context=s,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){r=document.createElement("div"),r.className=o;let a=r.style;a.position="absolute",a.width="100%",a.height="100%",s=Ae();const l=s.canvas;r.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=r,this.context=s}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const o=$i(n),r=Ws(n),s=Bs(n),a=js(n);Jt(e.coordinateToPixelTransform,o),Jt(e.coordinateToPixelTransform,r),Jt(e.coordinateToPixelTransform,s),Jt(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;Jt(l,o),Jt(l,r),Jt(l,s),Jt(l,a),t.save(),t.beginPath(),t.moveTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()}dispatchRenderEvent_(t,e,n){const o=this.getLayer();if(o.hasListener(t)){const r=new kc(t,this.inversePixelTransform,n,e);o.dispatchEvent(r)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(Vi.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(Vi.POSTRENDER,t,e)}getRenderTransform(t,e,n,o,r,s,a){const l=r/2,h=s/2,u=o/e,d=-u,c=-t[0]+a,g=-t[1];return Mi(this.tempTransform,l,h,u,d,-n,c,g)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const Sg=ly;function hy(i,t,e,n,o,r,s,a,l,h,u,d){let c=i[t],g=i[t+1],f=0,m=0,p=0,_=0;function v(){f=c,m=g,t+=n,c=i[t],g=i[t+1],_+=p,p=Math.sqrt((c-f)*(c-f)+(g-m)*(g-m))}do v();while(t<e-n&&_+p<r);let y=p===0?0:(r-_)/p;const x=ki(f,c,y),k=ki(m,g,y),w=t-n,E=_,M=r+a*l(h,o,u);for(;t<e-n&&_+p<M;)v();y=p===0?0:(M-_)/p;const S=ki(f,c,y),z=ki(m,g,y);let P;if(d){const Z=[x,k,S,z];nh(Z,0,4,2,d,Z,Z),P=Z[0]>Z[2]}else P=x>S;const G=Math.PI,A=[],at=w+n===t;t=w,p=0,_=E,c=i[t],g=i[t+1];let B;if(at){v(),B=Math.atan2(g-m,c-f),P&&(B+=B>0?-G:G);const Z=(S+x)/2,F=(z+k)/2;return A[0]=[Z,F,(M-r)/2,B,o],A}o=o.replace(/\n/g," ");for(let Z=0,F=o.length;Z<F;){v();let V=Math.atan2(g-m,c-f);if(P&&(V+=V>0?-G:G),B!==void 0){let b=V-B;if(b+=b>G?-2*G:b<-G?2*G:0,Math.abs(b)>s)return null}B=V;const D=Z;let H=0;for(;Z<F;++Z){const b=P?F-Z-1:Z,T=a*l(h,o[b],u);if(t+n<e&&_+p<r+H+T/2)break;H+=T}if(Z===D)continue;const Y=P?o.substring(F-D,F-Z):o.substring(D,Z);y=p===0?0:(r+H/2-_)/p;const I=ki(f,c,y),rt=ki(m,g,y);A.push([I,rt,H/2,V,Y]),r+=H}return A}const Go=Ge(),sn=[],zi=[],Ri=[],an=[];function Tg(i){return i[3].declutterBox}const uy=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 Ig(i,t){return(t==="start"||t==="end")&&!uy.test(i)&&(t=t==="start"?"left":"right"),Wr[t]}function dy(i,t,e){return e>0&&i.push(`
|
43
|
+
`,""),i.push(t,""),i}class cy{constructor(t,e,n,o){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=o.instructions,this.coordinates=o.coordinates,this.coordinateCache_={},this.renderedTransform_=qe(),this.hitDetectionInstructions=o.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=o.fillStates||{},this.strokeStates=o.strokeStates||{},this.textStates=o.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,n,o){const r=t+e+n+o;if(this.labels_[r])return this.labels_[r];const s=o?this.strokeStates[o]:null,a=n?this.fillStates[n]:null,l=this.textStates[e],h=this.pixelRatio,u=[l.scale[0]*h,l.scale[1]*h],d=Array.isArray(t),c=l.justify?Wr[l.justify]:Ig(Array.isArray(t)?t[0]:t,l.textAlign||Sr),g=o&&s.lineWidth?s.lineWidth:0,f=d?t:t.split(`
|
44
|
+
`).reduce(dy,[]),{width:m,height:p,widths:_,heights:v,lineWidths:y}=rv(l,f),x=m+g,k=[],w=(x+2)*u[0],E=(p+g)*u[1],M={width:w<0?Math.floor(w):Math.ceil(w),height:E<0?Math.floor(E):Math.ceil(E),contextInstructions:k};(u[0]!=1||u[1]!=1)&&k.push("scale",u),o&&(k.push("strokeStyle",s.strokeStyle),k.push("lineWidth",g),k.push("lineCap",s.lineCap),k.push("lineJoin",s.lineJoin),k.push("miterLimit",s.miterLimit),k.push("setLineDash",[s.lineDash]),k.push("lineDashOffset",s.lineDashOffset)),n&&k.push("fillStyle",a.fillStyle),k.push("textBaseline","middle"),k.push("textAlign","center");const S=.5-c;let z=c*x+S*g;const P=[],G=[];let A=0,at=0,B=0,Z=0,F;for(let V=0,D=f.length;V<D;V+=2){const H=f[V];if(H===`
|
45
|
+
`){at+=A,A=0,z=c*x+S*g,++Z;continue}const Y=f[V+1]||l.font;Y!==F&&(o&&P.push("font",Y),n&&G.push("font",Y),F=Y),A=Math.max(A,v[B]);const I=[H,z+S*_[B]+c*(_[B]-y[Z]),.5*(g+A)+at];z+=_[B],o&&P.push("strokeText",I),n&&G.push("fillText",I),++B}return Array.prototype.push.apply(k,P),Array.prototype.push.apply(k,G),this.labels_[r]=M,M}replayTextBackground_(t,e,n,o,r,s,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,o),t.lineTo.apply(t,r),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())}calculateImageOrLabelDimensions_(t,e,n,o,r,s,a,l,h,u,d,c,g,f,m,p){a*=c[0],l*=c[1];let _=n-a,v=o-l;const y=r+h>t?t-h:r,x=s+u>e?e-u:s,k=f[3]+y*c[0]+f[1],w=f[0]+x*c[1]+f[2],E=_-f[3],M=v-f[0];(m||d!==0)&&(sn[0]=E,an[0]=E,sn[1]=M,zi[1]=M,zi[0]=E+k,Ri[0]=zi[0],Ri[1]=M+w,an[1]=Ri[1]);let S;return d!==0?(S=Mi(qe(),n,o,1,1,d,-n,-o),Jt(S,sn),Jt(S,zi),Jt(S,Ri),Jt(S,an),ti(Math.min(sn[0],zi[0],Ri[0],an[0]),Math.min(sn[1],zi[1],Ri[1],an[1]),Math.max(sn[0],zi[0],Ri[0],an[0]),Math.max(sn[1],zi[1],Ri[1],an[1]),Go)):ti(Math.min(E,E+k),Math.min(M,M+w),Math.max(E,E+k),Math.max(M,M+w),Go),g&&(_=Math.round(_),v=Math.round(v)),{drawImageX:_,drawImageY:v,drawImageW:y,drawImageH:x,originX:h,originY:u,declutterBox:{minX:Go[0],minY:Go[1],maxX:Go[2],maxY:Go[3],value:p},canvasTransform:S,scale:c}}replayImageOrLabel_(t,e,n,o,r,s,a){const l=!!(s||a),h=o.declutterBox,u=t.canvas,d=a?a[2]*o.scale[0]/2:0;return h.minX-d<=u.width/e&&h.maxX+d>=0&&h.minY-d<=u.height/e&&h.maxY+d>=0&&(l&&this.replayTextBackground_(t,sn,zi,Ri,an,s,a),sv(t,o.canvasTransform,r,n,o.originX,o.originY,o.drawImageW,o.drawImageH,o.drawImageX,o.drawImageY,o.scale)),!0}fill_(t){if(this.alignFill_){const e=Jt(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,n,o){const r=this.textStates[e],s=this.createLabel(t,e,o,n),a=this.strokeStates[n],l=this.pixelRatio,h=Ig(Array.isArray(t)?t[0]:t,r.textAlign||Sr),u=Wr[r.textBaseline||Hs],d=a&&a.lineWidth?a.lineWidth:0,c=s.width/l-2*r.scale[0],g=h*c+2*(.5-h)*d,f=u*s.height/l+2*(.5-u)*d;return{label:s,anchorX:g,anchorY:f}}execute_(t,e,n,o,r,s,a,l){let h;this.pixelCoordinates_&&Zi(n,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=Ji(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),Z0(this.renderedTransform_,n));let u=0;const d=o.length;let c=0,g,f,m,p,_,v,y,x,k,w,E,M,S=0,z=0,P=null,G=null;const A=this.coordinateCache_,at=this.viewRotation_,B=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,Z={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:at},F=this.instructions!=o||this.overlaps?0:200;let V,D,H,Y;for(;u<d;){const I=o[u];switch(I[0]){case Q.BEGIN_GEOMETRY:V=I[1],Y=I[3],V.getGeometry()?a!==void 0&&!$t(a,Y.getExtent())?u=I[2]+1:++u:u=I[2];break;case Q.BEGIN_PATH:S>F&&(this.fill_(t),S=0),z>F&&(t.stroke(),z=0),!S&&!z&&(t.beginPath(),p=NaN,_=NaN),++u;break;case Q.CIRCLE:c=I[1];const b=h[c],T=h[c+1],q=h[c+2],C=h[c+3],K=q-b,U=C-T,_t=Math.sqrt(K*K+U*U);t.moveTo(b+_t,T),t.arc(b,T,_t,0,2*Math.PI,!0),++u;break;case Q.CLOSE_PATH:t.closePath(),++u;break;case Q.CUSTOM:c=I[1],g=I[2];const Et=I[3],yt=I[4],Ct=I.length==6?I[5]:void 0;Z.geometry=Et,Z.feature=V,u in A||(A[u]=[]);const Lt=A[u];Ct?Ct(h,c,g,2,Lt):(Lt[0]=h[c],Lt[1]=h[c+1],Lt.length=2),yt(Lt,Z),++u;break;case Q.DRAW_IMAGE:c=I[1],g=I[2],x=I[3],f=I[4],m=I[5];let Dt=I[6];const jt=I[7],O=I[8],ut=I[9],pt=I[10];let kt=I[11];const xt=I[12];let st=I[13];const nt=I[14],wt=I[15];if(!x&&I.length>=20){k=I[19],w=I[20],E=I[21],M=I[22];const de=this.drawLabelWithPointPlacement_(k,w,E,M);x=de.label,I[3]=x;const bi=I[23];f=(de.anchorX-bi)*this.pixelRatio,I[4]=f;const _e=I[24];m=(de.anchorY-_e)*this.pixelRatio,I[5]=m,Dt=x.height,I[6]=Dt,st=x.width,I[13]=st}let It;I.length>25&&(It=I[25]);let Bt,bt,dt;I.length>17?(Bt=I[16],bt=I[17],dt=I[18]):(Bt=Yn,bt=!1,dt=!1),pt&&B?kt+=at:!pt&&!B&&(kt-=at);let Ot=0;for(;c<g;c+=2){if(It&&It[Ot++]<st/this.pixelRatio)continue;const de=this.calculateImageOrLabelDimensions_(x.width,x.height,h[c],h[c+1],st,Dt,f,m,O,ut,kt,xt,r,Bt,bt||dt,V),bi=[t,e,x,de,jt,bt?P:null,dt?G:null];if(l){if(nt==="none")continue;if(nt==="obstacle"){l.insert(de.declutterBox);continue}else{let _e,Xe;if(wt){const ze=g-c;if(!wt[ze]){wt[ze]=bi;continue}if(_e=wt[ze],delete wt[ze],Xe=Tg(_e),l.collides(Xe))continue}if(l.collides(de.declutterBox))continue;_e&&(l.insert(Xe),this.replayImageOrLabel_.apply(this,_e)),l.insert(de.declutterBox)}}this.replayImageOrLabel_.apply(this,bi)}++u;break;case Q.DRAW_CHARS:const St=I[1],ct=I[2],ue=I[3],Ze=I[4];M=I[5];const Ut=I[6],Ie=I[7],Wt=I[8];E=I[9];const Kt=I[10];k=I[11],w=I[12];const Tn=[I[13],I[13]],ae=this.textStates[w],Ye=ae.font,ve=[ae.scale[0]*Ie,ae.scale[1]*Ie];let Fe;Ye in this.widths_?Fe=this.widths_[Ye]:(Fe={},this.widths_[Ye]=Fe);const Ni=og(h,St,ct,2),sl=Math.abs(ve[0])*Cc(Ye,k,Fe);if(Ze||sl<=Ni){const de=this.textStates[w].textAlign,bi=(Ni-sl)*Wr[de],_e=hy(h,St,ct,2,k,bi,Ut,Math.abs(ve[0]),Cc,Ye,Fe,B?0:this.viewRotation_);t:if(_e){const Xe=[];let ze,sr,ar,ye,Re;if(E)for(ze=0,sr=_e.length;ze<sr;++ze){Re=_e[ze],ar=Re[4],ye=this.createLabel(ar,w,"",E),f=Re[2]+(ve[0]<0?-Kt:Kt),m=ue*ye.height+(.5-ue)*2*Kt*ve[1]/ve[0]-Wt;const ee=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Re[0],Re[1],ye.width,ye.height,f,m,0,0,Re[3],Tn,!1,Yn,!1,V);if(l&&l.collides(ee.declutterBox))break t;Xe.push([t,e,ye,ee,1,null,null])}if(M)for(ze=0,sr=_e.length;ze<sr;++ze){Re=_e[ze],ar=Re[4],ye=this.createLabel(ar,w,M,""),f=Re[2],m=ue*ye.height-Wt;const ee=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Re[0],Re[1],ye.width,ye.height,f,m,0,0,Re[3],Tn,!1,Yn,!1,V);if(l&&l.collides(ee.declutterBox))break t;Xe.push([t,e,ye,ee,1,null,null])}l&&l.load(Xe.map(Tg));for(let ee=0,ys=Xe.length;ee<ys;++ee)this.replayImageOrLabel_.apply(this,Xe[ee])}}++u;break;case Q.END_GEOMETRY:if(s!==void 0){V=I[1];const de=s(V,Y);if(de)return de}++u;break;case Q.FILL:F?S++:this.fill_(t),++u;break;case Q.MOVE_TO_LINE_TO:for(c=I[1],g=I[2],D=h[c],H=h[c+1],v=D+.5|0,y=H+.5|0,(v!==p||y!==_)&&(t.moveTo(D,H),p=v,_=y),c+=2;c<g;c+=2)D=h[c],H=h[c+1],v=D+.5|0,y=H+.5|0,(c==g-2||v!==p||y!==_)&&(t.lineTo(D,H),p=v,_=y);++u;break;case Q.SET_FILL_STYLE:P=I,this.alignFill_=I[2],S&&(this.fill_(t),S=0,z&&(t.stroke(),z=0)),t.fillStyle=I[1],++u;break;case Q.SET_STROKE_STYLE:G=I,z&&(t.stroke(),z=0),this.setStrokeStyle_(t,I),++u;break;case Q.STROKE:F?z++:t.stroke(),++u;break;default:++u;break}}S&&this.fill_(t),z&&t.stroke()}execute(t,e,n,o,r,s){this.viewRotation_=o,this.execute_(t,e,n,this.instructions,r,void 0,void 0,s)}executeHitDetection(t,e,n,o,r){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,o,r)}}const gy=cy,qh=["Polygon","Circle","LineString","Image","Text","Default"];class fy{constructor(t,e,n,o,r,s){this.maxExtent_=t,this.overlaps_=o,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=qe(),this.createExecutors_(r)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t){for(const e in t){let n=this.executorsByZIndex_[e];n===void 0&&(n={},this.executorsByZIndex_[e]=n);const o=t[e];for(const r in o){const s=o[r];n[r]=new gy(this.resolution_,this.pixelRatio_,this.overlaps_,s)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let o=0,r=t.length;o<r;++o)if(t[o]in n)return!0}return!1}forEachFeatureAtCoordinate(t,e,n,o,r,s){o=Math.round(o);const a=o*2+1,l=Mi(this.hitDetectionTransform_,o+.5,o+.5,1/e,-1/e,-n,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=Ae(a,a));const u=this.hitDetectionContext_;u.canvas.width!==a||u.canvas.height!==a?(u.canvas.width=a,u.canvas.height=a):h||u.clearRect(0,0,a,a);let d;this.renderBuffer_!==void 0&&(d=Ge(),xr(d,t),ui(d,e*(this.renderBuffer_+o),d));const c=my(o);let g;function f(k,w){const E=u.getImageData(0,0,a,a).data;for(let M=0,S=c.length;M<S;M++)if(E[c[M]]>0){if(!s||g!=="Image"&&g!=="Text"||s.includes(k)){const z=(c[M]-3)/4,P=o-z%a,G=o-(z/a|0),A=r(k,w,P*P+G*G);if(A)return A}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(Pn);let p,_,v,y,x;for(p=m.length-1;p>=0;--p){const k=m[p].toString();for(v=this.executorsByZIndex_[k],_=qh.length-1;_>=0;--_)if(g=qh[_],y=v[g],y!==void 0&&(x=y.executeHitDetection(u,l,n,f,d),x))return x}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],o=e[1],r=e[2],s=e[3],a=[n,o,n,s,r,s,r,o];return Ji(a,0,8,2,t,a),a}isEmpty(){return On(this.executorsByZIndex_)}execute(t,e,n,o,r,s,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(Pn),this.maxExtent_&&(t.save(),this.clip(t,n)),s=s||qh;let h,u,d,c,g,f;for(a&&l.reverse(),h=0,u=l.length;h<u;++h){const m=l[h].toString();for(g=this.executorsByZIndex_[m],d=0,c=s.length;d<c;++d){const p=s[d];f=g[p],f!==void 0&&f.execute(t,e,n,o,r,a)}}this.maxExtent_&&t.restore()}}const $h={};function my(i){if($h[i]!==void 0)return $h[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let r=0;r<=i;++r)for(let s=0;s<=i;++s){const a=r*r+s*s;if(a>e)break;let l=n[a];l||(l=[],n[a]=l),l.push(((i+r)*t+(i+s))*4+3),r>0&&l.push(((i-r)*t+(i+s))*4+3),s>0&&(l.push(((i+r)*t+(i-s))*4+3),r>0&&l.push(((i-r)*t+(i-s))*4+3))}const o=[];for(let r=0,s=n.length;r<s;++r)n[r]&&o.push(...n[r]);return $h[i]=o,o}const ba=fy;class py extends Mg{constructor(t,e,n,o,r,s,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=n,this.transform_=o,this.viewRotation_=r,this.squaredTolerance_=s,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=qe()}drawImages_(t,e,n,o){if(!this.image_)return;const r=Ji(t,e,n,o,this.transform_,this.pixelCoordinates_),s=this.context_,a=this.tmpLocalTransform_,l=s.globalAlpha;this.imageOpacity_!=1&&(s.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;this.imageRotateWithView_&&(h+=this.viewRotation_);for(let u=0,d=r.length;u<d;u+=2){const c=r[u]-this.imageAnchorX_,g=r[u+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const f=c+this.imageAnchorX_,m=g+this.imageAnchorY_;Mi(a,f,m,1,1,h,-f,-m),s.setTransform.apply(s,a),s.translate(f,m),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.setTransform(1,0,0,1,0,0)}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,g,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(s.globalAlpha=l)}drawText_(t,e,n,o){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const r=Ji(t,e,n,o,this.transform_,this.pixelCoordinates_),s=this.context_;let a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<n;e+=o){const l=r[e]+this.textOffsetX_,h=r[e+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(s.translate(l-this.textOffsetX_,h-this.textOffsetY_),s.rotate(a),s.translate(this.textOffsetX_,this.textOffsetY_),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&s.strokeText(this.text_,l,h),this.textFillState_&&s.fillText(this.text_,l,h))}}moveToLineTo_(t,e,n,o,r){const s=this.context_,a=Ji(t,e,n,o,this.transform_,this.pixelCoordinates_);s.moveTo(a[0],a[1]);let l=a.length;r&&(l-=2);for(let h=2;h<l;h+=2)s.lineTo(a[h],a[h+1]);return r&&s.closePath(),n}drawRings_(t,e,n,o){for(let r=0,s=n.length;r<s;++r)e=this.moveToLineTo_(t,e,n[r],o,!0);return e}drawCircle(t){if(!!$t(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=zv(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],o=e[3]-e[1],r=Math.sqrt(n*n+o*o),s=this.context_;s.beginPath(),s.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break}}drawFeature(t,e){const n=e.getGeometryFunction()(t);!n||!$t(this.extent_,n.getExtent())||(this.setStyle(e),this.drawGeometry(n))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let n=0,o=e.length;n<o;++n)this.drawGeometry(e[n])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!$t(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(this.text_!==""){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(!!$t(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const n=this.context_,o=t.getFlatCoordinates();let r=0;const s=t.getEnds(),a=t.getStride();n.beginPath();for(let l=0,h=s.length;l<h;++l)r=this.moveToLineTo_(o,r,s[l],a,!1);n.stroke()}if(this.text_!==""){const n=t.getFlatMidpoints();this.drawText_(n,0,n.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!$t(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!$t(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getOrientedFlatCoordinates();let o=0;const r=t.getEndss(),s=t.getStride();e.beginPath();for(let a=0,l=r.length;a<l;++a){const h=r[a];o=this.drawRings_(n,o,h,s)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),Zi(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,n=this.contextTextState_,o=t.textAlign?t.textAlign:Sr;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=o&&(n.textAlign=o,e.textAlign=o),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=o,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:o,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const n=t.getColor();this.fillState_={fillStyle:di(n||Ci)}}if(!e)this.strokeState_=null;else{const n=e.getColor(),o=e.getLineCap(),r=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),h=e.getMiterLimit(),u=r||wr;this.strokeState_={lineCap:o!==void 0?o:$s,lineDash:this.pixelRatio_===1?u:u.map(d=>d*this.pixelRatio_),lineDashOffset:(s||Mr)*this.pixelRatio_,lineJoin:a!==void 0?a:Io,lineWidth:(l!==void 0?l:Tr)*this.pixelRatio_,miterLimit:h!==void 0?h:Cr,strokeStyle:di(n||Er)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),o=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=o[0]*n,this.imageAnchorY_=o[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const s=t.getScaleArray();this.imageScale_=[s[0]*this.pixelRatio_/n,s[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const g=e.getColor();this.textFillState_={fillStyle:di(g||Ci)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const g=n.getColor(),f=n.getLineCap(),m=n.getLineDash(),p=n.getLineDashOffset(),_=n.getLineJoin(),v=n.getWidth(),y=n.getMiterLimit();this.textStrokeState_={lineCap:f!==void 0?f:$s,lineDash:m||wr,lineDashOffset:p||Mr,lineJoin:_!==void 0?_:Io,lineWidth:v!==void 0?v:Tr,miterLimit:y!==void 0?y:Cr,strokeStyle:di(g||Er)}}const o=t.getFont(),r=t.getOffsetX(),s=t.getOffsetY(),a=t.getRotateWithView(),l=t.getRotation(),h=t.getScaleArray(),u=t.getText(),d=t.getTextAlign(),c=t.getTextBaseline();this.textState_={font:o!==void 0?o:wc,textAlign:d!==void 0?d:Sr,textBaseline:c!==void 0?c:Hs},this.text_=u!==void 0?Array.isArray(u)?u.reduce((g,f,m)=>g+=m%2?" ":f,""):u:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=s!==void 0?this.pixelRatio_*s:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}}}const vy=py,je=.5;function zg(i,t,e,n,o,r,s){const a=i[0]*je,l=i[1]*je,h=Ae(a,l);h.imageSmoothingEnabled=!1;const u=h.canvas,d=new vy(h,je,o,null,s),c=e.length,g=Math.floor((256*256*256-1)/c),f={};for(let p=1;p<=c;++p){const _=e[p-1],v=_.getStyleFunction()||n;if(!n)continue;let y=v(_,r);if(!y)continue;Array.isArray(y)||(y=[y]);const x=p*g,k="#"+("000000"+x.toString(16)).slice(-6);for(let w=0,E=y.length;w<E;++w){const M=y[w],S=M.getGeometryFunction()(_);if(!S||!$t(o,S.getExtent()))continue;const z=M.clone(),P=z.getFill();P&&P.setColor(k);const G=z.getStroke();G&&(G.setColor(k),G.setLineDash(null)),z.setText(void 0);const A=M.getImage();if(A&&A.getOpacity()!==0){const Z=A.getImageSize();if(!Z)continue;const F=Ae(Z[0],Z[1],void 0,{alpha:!1}),V=F.canvas;F.fillStyle=k,F.fillRect(0,0,V.width,V.height),z.setImage(new ca({img:V,imgSize:Z,anchor:A.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:A.getOrigin(),opacity:1,size:A.getSize(),scale:A.getScale(),rotation:A.getRotation(),rotateWithView:A.getRotateWithView()}))}const at=z.getZIndex()||0;let B=f[at];B||(B={},f[at]=B,B.Polygon=[],B.Circle=[],B.LineString=[],B.Point=[]),B[S.getType().replace("Multi","")].push(S,z)}}const m=Object.keys(f).map(Number).sort(Pn);for(let p=0,_=m.length;p<_;++p){const v=f[m[p]];for(const y in v){const x=v[y];for(let k=0,w=x.length;k<w;k+=2){d.setStyle(x[k+1]);for(let E=0,M=t.length;E<M;++E)d.setTransform(t[E]),d.drawGeometry(x[k])}}}return h.getImageData(0,0,u.width,u.height)}function Rg(i,t,e){const n=[];if(e){const o=Math.floor(Math.round(i[0])*je),r=Math.floor(Math.round(i[1])*je),s=(Vt(o,0,e.width-1)+Vt(r,0,e.height-1)*e.width)*4,a=e.data[s],l=e.data[s+1],u=e.data[s+2]+256*(l+256*a),d=Math.floor((256*256*256-1)/t.length);u&&u%d===0&&n.push(t[u/d-1])}return n}const _y=.5,Ag={Point:Ey,LineString:wy,Polygon:Ty,MultiPoint:Sy,MultiLineString:My,MultiPolygon:Cy,GeometryCollection:ky,Circle:xy};function yy(i,t){return parseInt($(i),10)-parseInt($(t),10)}function Pg(i,t){const e=Hh(i,t);return e*e}function Hh(i,t){return _y*i/t}function xy(i,t,e,n,o){const r=e.getFill(),s=e.getStroke();if(r||s){const l=i.getBuilder(e.getZIndex(),"Circle");l.setFillStrokeStyle(r,s),l.drawCircle(t,n)}const a=e.getText();if(a&&a.getText()){const l=(o||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function ka(i,t,e,n,o,r,s){let a=!1;const l=e.getImage();if(l){const h=l.getImageState();h==Qt.LOADED||h==Qt.ERROR?l.unlistenImageChange(o):(h==Qt.IDLE&&l.load(),l.listenImageChange(o),a=!0)}return by(i,t,e,n,r,s),a}function by(i,t,e,n,o,r){const s=e.getGeometryFunction()(t);if(!s)return;const a=s.simplifyTransformed(n,o);if(e.getRenderer())Dg(i,a,e,t);else{const h=Ag[a.getType()];h(i,a,e,t,r)}}function Dg(i,t,e,n){if(t.getType()=="GeometryCollection"){const r=t.getGeometries();for(let s=0,a=r.length;s<a;++s)Dg(i,r[s],e,n);return}i.getBuilder(e.getZIndex(),"Default").drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function ky(i,t,e,n,o){const r=t.getGeometriesArray();let s,a;for(s=0,a=r.length;s<a;++s){const l=Ag[r[s].getType()];l(i,r[s],e,n,o)}}function wy(i,t,e,n,o){const r=e.getStroke();if(r){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,r),a.drawLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(o||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function My(i,t,e,n,o){const r=e.getStroke();if(r){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,r),a.drawMultiLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(o||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function Cy(i,t,e,n,o){const r=e.getFill(),s=e.getStroke();if(s||r){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(r,s),l.drawMultiPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(o||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function Ey(i,t,e,n,o){const r=e.getImage(),s=e.getText();let a;if(r){if(r.getImageState()!=Qt.LOADED)return;let l=i;if(o){const u=r.getDeclutterMode();if(u!=="none")if(l=o,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(r,a),d.drawPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(r,a),h.drawPoint(t,n)}if(s&&s.getText()){let l=i;o&&(l=o);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function Sy(i,t,e,n,o){const r=e.getImage(),s=e.getText();let a;if(r){if(r.getImageState()!=Qt.LOADED)return;let l=i;if(o){const u=r.getDeclutterMode();if(u!=="none")if(l=o,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(r,a),d.drawMultiPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(r,a),h.drawMultiPoint(t,n)}if(s&&s.getText()){let l=i;o&&(l=o);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function Ty(i,t,e,n,o){const r=e.getFill(),s=e.getStroke();if(r||s){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(r,s),l.drawPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(o||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}class Iy extends Sg{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=Ge(),this.wrappedRenderedExtent_=Ge(),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(t,e,n){const o=e.extent,r=e.viewState,s=r.center,a=r.resolution,l=r.projection,h=r.rotation,u=l.getExtent(),d=this.getLayer().getSource(),c=e.pixelRatio,g=e.viewHints,f=!(g[qt.ANIMATING]||g[qt.INTERACTING]),m=this.compositionContext_,p=Math.round(e.size[0]*c),_=Math.round(e.size[1]*c),v=d.getWrapX()&&l.canWrapX(),y=v?Nt(u):null,x=v?Math.ceil((o[2]-u[2])/y)+1:1;let k=v?Math.floor((o[0]-u[0])/y):0;do{const w=this.getRenderTransform(s,a,h,c,p,_,k*y);t.execute(m,1,w,h,f,void 0,n)}while(++k<x)}setupCompositionContext_(){if(this.opacity_!==1){const t=Ae(this.context.canvas.width,this.context.canvas.height,Eg);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(this.opacity_!==1){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,kl(this.compositionContext_),Eg.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const n=t.pixelRatio,o=t.layerStatesArray[t.layerIndex];Y0(this.pixelTransform,1/n,1/n),Vl(this.inversePixelTransform,this.pixelTransform);const r=_c(this.pixelTransform);this.useContainer(e,r,this.getBackground(t));const s=this.context,a=s.canvas,l=this.replayGroup_,h=this.declutterExecutorGroup;if((!l||l.isEmpty())&&(!h||h.isEmpty()))return null;const u=Math.round(t.size[0]*n),d=Math.round(t.size[1]*n);a.width!=u||a.height!=d?(a.width=u,a.height=d,a.style.transform!==r&&(a.style.transform=r)):this.containerReused||s.clearRect(0,0,u,d),this.preRender(s,t);const c=t.viewState;c.projection,this.opacity_=o.opacity,this.setupCompositionContext_();let g=!1,f=!0;if(o.extent&&this.clipping){const m=Hi(o.extent);f=$t(m,t.extent),g=f&&!Bn(m,t.extent),g&&this.clipUnrotated(this.compositionContext_,t,m)}return f&&this.renderWorlds(l,t),g&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(s,t),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=[this.context.canvas.width,this.context.canvas.height];Jt(this.pixelTransform,n);const o=this.renderedCenter_,r=this.renderedResolution_,s=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),u=[],d=n[0]*je,c=n[1]*je;u.push(this.getRenderTransform(o,r,s,je,d,c,0).slice());const g=h.getSource(),f=a.getExtent();if(g.getWrapX()&&a.canWrapX()&&!Bn(f,l)){let m=l[0];const p=Nt(f);let _=0,v;for(;m<f[0];)--_,v=p*_,u.push(this.getRenderTransform(o,r,s,je,d,c,v).slice()),m+=p;for(_=0,m=l[2];m>f[2];)++_,v=p*_,u.push(this.getRenderTransform(o,r,s,je,d,c,v).slice()),m-=p}this.hitDetectionImageData_=zg(n,u,this.renderedFeatures_,h.getStyleFunction(),l,r,s)}e(Rg(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))}forEachFeatureAtCoordinate(t,e,n,o,r){if(!this.replayGroup_)return;const s=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),h={},u=function(g,f,m){const p=$(g),_=h[p];if(_){if(_!==!0&&m<_.distanceSq){if(m===0)return h[p]=!0,r.splice(r.lastIndexOf(_),1),o(g,l,f);_.geometry=f,_.distanceSq=m}}else{if(m===0)return h[p]=!0,o(g,l,f);r.push(h[p]={feature:g,layer:l,geometry:f,distanceSq:m,callback:o})}};let d;const c=[this.replayGroup_];return this.declutterExecutorGroup&&c.push(this.declutterExecutorGroup),c.some(g=>d=g.forEachFeatureAtCoordinate(t,s,a,n,u,g===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map(f=>f.value):null)),d}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const o=t.viewHints[qt.ANIMATING],r=t.viewHints[qt.INTERACTING],s=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!s&&o||!a&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,h=t.viewState,u=h.projection,d=h.resolution,c=t.pixelRatio,g=e.getRevision(),f=e.getRenderBuffer();let m=e.getRenderOrder();m===void 0&&(m=yy);const p=h.center.slice(),_=ui(l,f*d),v=_.slice(),y=[_.slice()],x=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!Bn(x,t.extent)){const B=Nt(x),Z=Math.max(Nt(_)/2,B);_[0]=x[0]-Z,_[2]=x[2]+Z,Nl(p,u);const F=oc(y[0],u);F[0]<x[0]&&F[2]<x[2]?y.push([F[0]+B,F[1],F[2]+B,F[3]]):F[0]>x[0]&&F[2]>x[2]&&y.push([F[0]-B,F[1],F[2]-B,F[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==g&&this.renderedRenderOrder_==m&&Bn(this.wrappedRenderedExtent_,_))return Zi(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const k=new xa(Hh(d,c),_,d,c);let w;this.getLayer().getDeclutter()&&(w=new xa(Hh(d,c),_,d,c));let E;for(let B=0,Z=y.length;B<Z;++B)n.loadFeatures(y[B],d,u);const M=Pg(d,c);let S=!0;const z=function(B){let Z;const F=B.getStyleFunction()||e.getStyleFunction();if(F&&(Z=F(B,d)),Z){const V=this.renderFeature(B,M,Z,k,E,w);S=S&&!V}}.bind(this),P=Yl(_),G=n.getFeaturesInExtent(P);m&&G.sort(m);for(let B=0,Z=G.length;B<Z;++B)z(G[B]);this.renderedFeatures_=G,this.ready=S;const A=k.finish(),at=new ba(_,d,c,n.getOverlaps(),A,e.getRenderBuffer());return w&&(this.declutterExecutorGroup=new ba(_,d,c,n.getOverlaps(),w.finish(),e.getRenderBuffer())),this.renderedResolution_=d,this.renderedRevision_=g,this.renderedRenderOrder_=m,this.renderedExtent_=v,this.wrappedRenderedExtent_=_,this.renderedCenter_=p,this.renderedProjection_=u,this.replayGroup_=at,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,n,o,r,s){if(!n)return!1;let a=!1;if(Array.isArray(n))for(let l=0,h=n.length;l<h;++l)a=ka(o,t,n[l],e,this.boundHandleStyleImageChange_,r,s)||a;else a=ka(o,t,n,e,this.boundHandleStyleImageChange_,r,s);return a}}const zy=Iy;class Ry extends kg{constructor(t){super(t)}createRenderer(){return new zy(this)}}const Qn=Ry;class Ay{constructor(t){this.rbush_=new _g(t),this.items_={}}insert(t,e){const n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[$(e)]=n}load(t,e){const n=new Array(e.length);for(let o=0,r=e.length;o<r;o++){const s=t[o],a=e[o],l={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};n[o]=l,this.items_[$(a)]=l}this.rbush_.load(n)}remove(t){const e=$(t),n=this.items_[e];return delete this.items_[e],this.rbush_.remove(n)!==null}update(t,e){const n=this.items_[$(e)],o=[n.minX,n.minY,n.maxX,n.maxY];So(o,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(e){return e.value})}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(o){return o.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let n;for(let o=0,r=t.length;o<r;o++)if(n=e(t[o]),n)return n;return n}isEmpty(){return On(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return ti(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}const wa=Ay;class Py extends hi{constructor(t){super(),this.projection=Gt(t.projection),this.attributions_=Lg(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(n,o){e.viewResolver=n,e.viewRejector=o})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(){return et()}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Lg(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Lg(i){return i?Array.isArray(i)?function(t){return i}:typeof i=="function"?i:function(t){return[i]}:null}const Og=Py,we={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Dy(i,t){return[[-1/0,-1/0,1/0,1/0]]}let Ly=!1;function Fg(i,t,e,n,o,r,s){const a=new XMLHttpRequest;a.open("GET",typeof i=="function"?i(e,n,o):i,!0),t.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=Ly,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const h=t.getType();let u;h=="json"||h=="text"?u=a.responseText:h=="xml"?(u=a.responseXML,u||(u=new DOMParser().parseFromString(a.responseText,"application/xml"))):h=="arraybuffer"&&(u=a.response),u?r(t.readFeatures(u,{extent:e,featureProjection:o}),t.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function Ng(i,t){return function(e,n,o,r,s){const a=this;Fg(i,t,e,n,o,function(l,h){a.addFeatures(l),r!==void 0&&r(l)},s||Ln)}}class ln extends Qe{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Oy extends Og{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Ln,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(gt(this.format_,7),this.loader_=Ng(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Dy;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new wa:null,this.loadedExtentsRtree_=new wa,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,o;Array.isArray(t.features)?o=t.features:t.features&&(n=t.features,o=n.getArray()),!e&&n===void 0&&(n=new Ve(o)),o!==void 0&&this.addFeaturesInternal(o),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=$(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const o=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(o,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new ln(we.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[ft(e,tt.CHANGE,this.handleFeatureChange_,this),ft(e,yo.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(t,e){let n=!0;const o=e.getId();return o!==void 0&&(o.toString()in this.idIndex_?n=!1:this.idIndex_[o.toString()]=e),n&&(gt(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],o=[];for(let r=0,s=t.length;r<s;r++){const a=t[r],l=$(a);this.addToIndex_(l,a)&&n.push(a)}for(let r=0,s=n.length;r<s;r++){const a=n[r],l=$(a);this.setupChangeEvents_(l,a);const h=a.getGeometry();if(h){const u=h.getExtent();e.push(u),o.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(e,o),this.hasListener(we.ADDFEATURE))for(let r=0,s=n.length;r<s;r++)this.dispatchEvent(new ln(we.ADDFEATURE,n[r]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(we.ADDFEATURE,function(n){e||(e=!0,t.push(n.feature),e=!1)}),this.addEventListener(we.REMOVEFEATURE,function(n){e||(e=!0,t.remove(n.feature),e=!1)}),t.addEventListener(oe.ADD,function(n){e||(e=!0,this.addFeature(n.element),e=!1)}.bind(this)),t.addEventListener(oe.REMOVE,function(n){e||(e=!0,this.removeFeature(n.element),e=!1)}.bind(this)),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(Ft);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=function(o){this.removeFeatureInternal(o)}.bind(this);this.featuresRtree_.forEach(n);for(const o in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[o])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new ln(we.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(o){if(o.getGeometry().intersectsCoordinate(t))return e(o)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(n){if(n.getGeometry().intersectsExtent(t)){const r=e(n);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),On(this.nullGeometryFeatures_)||li(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const o=z0(t,e);return[].concat(...o.map(r=>this.featuresRtree_.getInExtent(r)))}else return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],o=t[1];let r=null;const s=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||Dn,this.featuresRtree_.forEachInExtent(l,function(h){if(e(h)){const u=h.getGeometry(),d=a;if(a=u.closestPointXY(n,o,s,a),a<d){r=h;const c=Math.sqrt(a);l[0]=n-c,l[1]=o-c,l[2]=n+c,l[3]=o+c}}}),r}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return e!==void 0?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return e!==void 0?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,n=$(e),o=e.getGeometry();if(!o)n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);else{const s=o.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(s,e)):this.featuresRtree_&&this.featuresRtree_.update(s,e)}const r=e.getId();if(r!==void 0){const s=r.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new ln(we.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return e!==void 0?e in this.idIndex_:$(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&On(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,n){const o=this.loadedExtentsRtree_,r=this.strategy_(t,e,n);for(let s=0,a=r.length;s<a;++s){const l=r[s];o.forEachInExtent(l,function(u){return Bn(u.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADSTART)),this.loader_.call(this,l,e,n,function(u){--this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADEND,void 0,u))}.bind(this),function(){--this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADERROR))}.bind(this)),o.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(t){const e=this.loadedExtentsRtree_;let n;e.forEachInExtent(t,function(o){if(So(o.extent,t))return n=o,!0}),n&&e.remove(n)}removeFeature(t){if(!t)return;const e=$(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=$(t),n=this.featureChangeKeys_[e];if(!n)return;n.forEach(Ft),delete this.featureChangeKeys_[e];const o=t.getId();return o!==void 0&&delete this.idIndex_[o.toString()],delete this.uidIndex_[e],this.dispatchEvent(new ln(we.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){gt(this.format_,7),this.url_=t,this.setLoader(Ng(t,this.format_))}}const hn=Oy;class Fy extends zs{constructor(t,e,n){super(),n=n||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=n.transition===void 0?250:n.transition,this.transitionStarts_={},this.interpolate=!!n.interpolate}changed(){this.dispatchEvent(tt.CHANGE)}release(){this.state===N.ERROR&&this.setState(N.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(t.getState()==N.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){if(!this.interimTile)return;let t=this.interimTile,e=this;do{if(t.getState()==N.LOADED){t.interimTile=null;break}else t.getState()==N.LOADING?e=t:t.getState()==N.IDLE?e.interimTile=t.interimTile:e=t;t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==N.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){et()}getAlpha(t,e){if(!this.transition_)return 1;let n=this.transitionStarts_[t];if(!n)n=e,this.transitionStarts_[t]=n;else if(n===-1)return 1;const o=e-n+1e3/60;return o>=this.transition_?1:zc(o/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const Ma=Fy;class Ny extends Ma{constructor(t,e,n,o,r,s){super(t,e,s),this.crossOrigin_=o,this.src_=n,this.key=n,this.image_=new Image,o!==null&&(this.image_.crossOrigin=o),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=N.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=N.ERROR,this.unlistenImage_(),this.image_=Gy(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=N.LOADED:this.state=N.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==N.ERROR&&(this.state=N.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==N.IDLE&&(this.state=N.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=lg(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Gy(){const i=Ae(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}const Gg=Ny;class jy{constructor(t){this.highWaterMark=t!==void 0?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const n=this.entries_[t];return gt(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(t){const e=this.entries_[t];return gt(e!==void 0,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t}getValues(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){if(!!this.containsKey(t))return this.entries_[t].value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){gt(!(t in this.entries_),16);const n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_}setSize(t){this.highWaterMark=t}}const By=jy;function jg(i,t,e,n){return n!==void 0?(n[0]=i,n[1]=t,n[2]=e,n):[i,t,e]}function jo(i,t,e){return i+"/"+t+"/"+e}function Bg(i){return jo(i[0],i[1],i[2])}function Wy(i){const[t,e,n]=i.substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number);return jo(t,e,n)}function Wg(i){return i.split("/").map(Number)}function Zy(i){return(i[1]<<i[0])+i[2]}function Yy(i,t){const e=i[0],n=i[1],o=i[2];if(t.getMinZoom()>e||e>t.getMaxZoom())return!1;const r=t.getFullTileRange(e);return r?r.containsXY(n,o):!0}class Xy extends By{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const t=this.peekFirstKey(),n=Wg(t)[0];this.forEach(function(o){o.tileCoord[0]!==n&&(this.remove(Bg(o.tileCoord)),o.release())}.bind(this))}}const Kh=Xy;class Zg{constructor(t,e,n,o){this.minX=t,this.maxX=e,this.minY=n,this.maxY=o}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function Bo(i,t,e,n,o){return o!==void 0?(o.minX=i,o.maxX=t,o.minY=e,o.maxY=n,o):new Zg(i,t,e,n)}const Yg=Zg,Xg=[];class Uy extends Ma{constructor(t,e,n,o){super(t,e,{transition:0}),this.context_={},this.executorGroups={},this.declutterExecutorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=o.bind(void 0,this),this.wrappedTileCoord=n}getContext(t){const e=$(t);return e in this.context_||(this.context_[e]=Ae(1,1,Xg)),this.context_[e]}hasContext(t){return $(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=$(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];kl(e),Xg.push(e.canvas),delete this.context_[t]}super.release()}}const Vy=Uy;class qy extends Ma{constructor(t,e,n,o,r,s){super(t,e,s),this.extent=null,this.format_=o,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=r,this.url_=n,this.key=n}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==N.IDLE&&(this.setState(N.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(N.ERROR)}setFeatures(t){this.features_=t,this.setState(N.LOADED)}setLoader(t){this.loader_=t}}const $y=qy,Ca={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class Ea extends Qe{constructor(t,e){super(t),this.feature=e}}class Hy extends nn{constructor(t){const e=t;e.stopDown||(e.stopDown=xo),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=Jy(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:Dn,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let n=t.geometryFunction;if(!n){const o=this.mode_;if(o==="Circle")n=function(r,s,a){const l=s||new z1([NaN,NaN]),h=Zt(r[0]),u=wi(h,Zt(r[r.length-1]));return l.setCenterAndRadius(h,Math.sqrt(u),this.geometryLayout_),l};else{let r;o==="Point"?r=ni:o==="LineString"?r=$n:o==="Polygon"&&(r=Vn),n=function(s,a,l){return a?o==="Polygon"?s[0].length?a.setCoordinates([s[0].concat([s[0][0]])],this.geometryLayout_):a.setCoordinates([],this.geometryLayout_):a.setCoordinates(s,this.geometryLayout_):a=new r(s,this.geometryLayout_),a}}}this.geometryFunction_=n,this.dragVertexDelay_=t.dragVertexDelay!==void 0?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new Qn({source:new hn({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:Ky(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:wh,this.freehandCondition_,t.freehand?this.freehandCondition_=kh:this.freehandCondition_=t.freehandCondition?t.freehandCondition:Hc,this.addChangeListener(_h.ACTIVE,this.updateState_)}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===tt.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(t);let e=t.type===Mt.POINTERMOVE,n=!0;return!this.freehand_&&this.lastDragTime_&&t.type===Mt.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===Mt.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),n=!1):this.freehand_&&t.type===Mt.POINTERDOWN?n=!1:e&&this.getPointerCount()<2?(n=t.type===Mt.POINTERMOVE,n&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===Mt.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===Mt.DBLCLICK&&(n=!1),super.handleEvent(t)&&n}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new Si(Mt.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}handleUpEvent(t){let e=!0;if(this.getPointerCount()===0)if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){const n=!this.finishCoordinate_;n&&this.startDrawing_(t.coordinate),!n&&this.freehand_?this.finishDrawing():!this.freehand_&&(!n||this.mode_==="Point")&&(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.preventDefault(),e}handlePointerMove_(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){const e=this.downPx_,n=t.pixel,o=e[0]-n[0],r=e[1]-n[1],s=o*o+r*r;if(this.shouldHandle_=this.freehand_?s>this.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t){let e=!1;if(this.sketchFeature_){let n=!1,o=[this.finishCoordinate_];const r=this.mode_;if(r==="Point")e=!0;else if(r==="Circle")e=this.sketchCoords_.length===2;else if(r==="LineString")n=this.sketchCoords_.length>this.minPoints_;else if(r==="Polygon"){const s=this.sketchCoords_;n=s[0].length>this.minPoints_,o=[s[0][0],s[0][s[0].length-2]]}if(n){const s=this.getMap();for(let a=0,l=o.length;a<l;a++){const h=o[a],u=s.getPixelFromCoordinate(h),d=t[0]-u[0],c=t[1]-u[1],g=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(d*d+c*c)<=g,e){this.finishCoordinate_=h;break}}}}return e}createOrUpdateSketchPoint_(t){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new Ti(new ni(t)),this.updateSketchFeatures_())}createOrUpdateCustomSketchLine_(t){this.sketchLine_||(this.sketchLine_=new Ti);const e=t.getLinearRing(0);let n=this.sketchLine_.getGeometry();n?(n.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),n.changed()):(n=new $n(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(n))}startDrawing_(t){const e=this.getMap().getView().getProjection(),n=ta(this.geometryLayout_);for(;t.length<n;)t.push(0);this.finishCoordinate_=t,this.mode_==="Point"?this.sketchCoords_=t.slice():this.mode_==="Polygon"?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new Ti(new $n(this.sketchLineCoords_)));const o=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new Ti,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(o),this.updateSketchFeatures_(),this.dispatchEvent(new Ea(Ca.DRAWSTART,this.sketchFeature_))}modifyDrawing_(t){const e=this.getMap(),n=this.sketchFeature_.getGeometry(),o=e.getView().getProjection(),r=ta(this.geometryLayout_);let s,a;for(;t.length<r;)t.push(0);this.mode_==="Point"?a=this.sketchCoords_:this.mode_==="Polygon"?(s=this.sketchCoords_[0],a=s[s.length-1],this.atFinish_(e.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):(s=this.sketchCoords_,a=s[s.length-1]),a[0]=t[0],a[1]=t[1],this.geometryFunction_(this.sketchCoords_,n,o),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(t),n.getType()==="Polygon"&&this.mode_!=="Polygon"?this.createOrUpdateCustomSketchLine_(n):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()}addToDrawing_(t){const e=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection();let o,r;const s=this.mode_;s==="LineString"||s==="Circle"?(this.finishCoordinate_=t.slice(),r=this.sketchCoords_,r.length>=this.maxPoints_&&(this.freehand_?r.pop():o=!0),r.push(t.slice()),this.geometryFunction_(r,e,n)):s==="Polygon"&&(r=this.sketchCoords_[0],r.length>=this.maxPoints_&&(this.freehand_?r.pop():o=!0),r.push(t.slice()),o&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,e,n)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),o&&this.finishDrawing()}removeLastPoint(){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),e=this.getMap().getView().getProjection();let n;const o=this.mode_;if(o==="LineString"||o==="Circle"){if(n=this.sketchCoords_,n.splice(-2,1),n.length>=2){this.finishCoordinate_=n[n.length-2].slice();const r=this.finishCoordinate_.slice();n[n.length-1]=r,this.createOrUpdateSketchPoint_(r)}this.geometryFunction_(n,t,e),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(o==="Polygon"){n=this.sketchCoords_[0],n.splice(-2,1);const r=this.sketchLine_.getGeometry();if(n.length>=2){const s=n[n.length-2].slice();n[n.length-1]=s,this.createOrUpdateSketchPoint_(s)}r.setCoordinates(n),this.geometryFunction_(this.sketchCoords_,t,e)}n.length===1&&this.abortDrawing(),this.updateSketchFeatures_()}finishDrawing(){const t=this.abortDrawing_();if(!t)return;let e=this.sketchCoords_;const n=t.getGeometry(),o=this.getMap().getView().getProjection();this.mode_==="LineString"?(e.pop(),this.geometryFunction_(e,n,o)):this.mode_==="Polygon"&&(e[0].pop(),this.geometryFunction_(e,n,o),e=n.getCoordinates()),this.type_==="MultiPoint"?t.setGeometry(new Ar([e])):this.type_==="MultiLineString"?t.setGeometry(new zh([e])):this.type_==="MultiPolygon"&&t.setGeometry(new Ah([e])),this.dispatchEvent(new Ea(Ca.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new Ea(Ca.DRAWABORT,t))}appendCoordinates(t){const e=this.mode_,n=!this.sketchFeature_;n&&this.startDrawing_(t[0]);let o;if(e==="LineString"||e==="Circle")o=this.sketchCoords_;else if(e==="Polygon")o=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;n&&o.shift(),o.pop();for(let s=0;s<t.length;s++)this.addToDrawing_(t[s]);const r=t[t.length-1];this.addToDrawing_(r),this.modifyDrawing_(r)}extend(t){const n=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=n.getCoordinates();const o=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=o.slice(),this.sketchCoords_.push(o.slice()),this.sketchPoint_=new Ti(new ni(o)),this.updateSketchFeatures_(),this.dispatchEvent(new Ea(Ca.DRAWSTART,this.sketchFeature_))}updateSketchFeatures_(){const t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);const e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)}updateState_(){const t=this.getMap(),e=this.getActive();(!t||!e)&&this.abortDrawing(),this.overlay_.setMap(e?t:null)}}function Ky(){const i=hg();return function(t,e){return i[t.getGeometry().getType()]}}function Jy(i){switch(i){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+i)}}const Qy=Hy,Ug=0,Zr=1,Vg=[0,0,0,0],Wo=[],Jh={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class Qh extends Qe{constructor(t,e,n){super(t),this.features=e,this.mapBrowserEvent=n}}class tx extends nn{constructor(t){super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:Jc,this.defaultDeleteCondition_=function(n){return a_(n)&&u_(n)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:kh,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new wa,this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new Qn({source:new hn({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:ix(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null;let e;if(t.features?e=t.features:t.source&&(this.source_=t.source,e=new Ve(this.source_.getFeatures()),this.source_.addEventListener(we.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(we.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!e)throw new Error("The modify interaction requires features, a source or a layer");t.hitDetection&&(this.hitDetection_=t.hitDetection),this.features_=e,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(oe.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(oe.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=t.snapToPointer===void 0?!this.hitDetection_:t.snapToPointer}addFeature_(t){const e=t.getGeometry();if(e){const o=this.SEGMENT_WRITERS_[e.getType()];o&&o(t,e)}const n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),t.addEventListener(tt.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new Ve;const n=this.featuresBeingModified_.getArray();for(let o=0,r=e.length;o<r;++o){const s=e[o];for(let a=0,l=s.length;a<l;++a){const h=s[a].feature;h&&!n.includes(h)&&this.featuresBeingModified_.push(h)}}this.featuresBeingModified_.getLength()===0?this.featuresBeingModified_=null:this.dispatchEvent(new Qh(Jh.MODIFYSTART,this.featuresBeingModified_,t))}}removeFeature_(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&this.features_.getLength()===0&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(tt.CHANGE,this.boundHandleFeatureChange_)}removeFeatureSegmentData_(t){const e=this.rBush_,n=[];e.forEach(function(o){t===o.feature&&n.push(o)});for(let o=n.length-1;o>=0;--o){const r=n[o];for(let s=this.dragSegments_.length-1;s>=0;--s)this.dragSegments_[s][0]===r&&this.dragSegments_.splice(s,1);e.remove(r)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const n=e.getCoordinates(),o={feature:t,geometry:e,segment:[n,n]};this.rBush_.insert(e.getExtent(),o)}writeMultiPointGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o],a={feature:t,geometry:e,depth:[o],index:o,segment:[s,s]};this.rBush_.insert(e.getExtent(),a)}}writeLineStringGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length-1;o<r;++o){const s=n.slice(o,o+2),a={feature:t,geometry:e,index:o,segment:s};this.rBush_.insert(xe(s),a)}}writeMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[o],index:a,segment:h};this.rBush_.insert(xe(h),u)}}}writePolygonGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[o],index:a,segment:h};this.rBush_.insert(xe(h),u)}}}writeMultiPolygonGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];for(let a=0,l=s.length;a<l;++a){const h=s[a];for(let u=0,d=h.length-1;u<d;++u){const c=h.slice(u,u+2),g={feature:t,geometry:e,depth:[a,o],index:u,segment:c};this.rBush_.insert(xe(c),g)}}}}writeCircleGeometry_(t,e){const n=e.getCenter(),o={feature:t,geometry:e,index:Ug,segment:[n,n]},r={feature:t,geometry:e,index:Zr,segment:[n,n]},s=[o,r];o.featureSegments=s,r.featureSegments=s,this.rBush_.insert(yr(n),o);let a=e;this.rBush_.insert(a.getExtent(),r)}writeGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let o=0;o<n.length;++o){const r=n[o],s=this.SEGMENT_WRITERS_[r.getType()];s(t,r)}}createOrUpdateVertexFeature_(t,e,n){let o=this.vertexFeature_;return o?o.getGeometry().setCoordinates(t):(o=new Ti(new ni(t)),this.vertexFeature_=o,this.overlay_.getSource().addFeature(o)),o.set("features",e),o.set("geometries",n),o}handleEvent(t){if(!t.originalEvent)return!0;this.lastPointerEvent_=t;let e;return!t.map.getView().getInteracting()&&t.type==Mt.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=Mt.SINGLECLICK||!this.ignoreNextSingleClick_?e=this.removePoint():e=!0),t.type==Mt.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),super.handleEvent(t)&&!e}handleDragEvent(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);const e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],n=[],o=[];for(let r=0,s=this.dragSegments_.length;r<s;++r){const a=this.dragSegments_[r],l=a[0],h=l.feature;n.includes(h)||n.push(h);const u=l.geometry;o.includes(u)||o.push(u);const d=l.depth;let c;const g=l.segment,f=a[1];for(;e.length<u.getStride();)e.push(g[f][e.length]);switch(u.getType()){case"Point":c=e,g[0]=e,g[1]=e;break;case"MultiPoint":c=u.getCoordinates(),c[l.index]=e,g[0]=e,g[1]=e;break;case"LineString":c=u.getCoordinates(),c[l.index+f]=e,g[f]=e;break;case"MultiLineString":c=u.getCoordinates(),c[d[0]][l.index+f]=e,g[f]=e;break;case"Polygon":c=u.getCoordinates(),c[d[0]][l.index+f]=e,g[f]=e;break;case"MultiPolygon":c=u.getCoordinates(),c[d[1]][d[0]][l.index+f]=e,g[f]=e;break;case"Circle":if(g[0]=e,g[1]=e,l.index===Ug)this.changingFeature_=!0,u.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,t.map.getView().getProjection();let m=rc(Zt(u.getCenter()),Zt(e));u.setRadius(m),this.changingFeature_=!1}break}c&&this.setGeometryCoordinates_(u,c)}this.createOrUpdateVertexFeature_(e,n,o)}handleDownEvent(t){if(!this.condition_(t))return!1;const e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;const n=this.vertexFeature_;if(n){t.map.getView().getProjection();const o=[],r=n.getGeometry().getCoordinates(),s=xe([r]),a=this.rBush_.getInExtent(s),l={};a.sort(ex);for(let h=0,u=a.length;h<u;++h){const d=a[h],c=d.segment;let g=$(d.geometry);const f=d.depth;if(f&&(g+="-"+f.join("-")),l[g]||(l[g]=new Array(2)),d.geometry.getType()==="Circle"&&d.index===Zr){const m=$g(e,d);ei(m,r)&&!l[g][0]&&(this.dragSegments_.push([d,0]),l[g][0]=d);continue}if(ei(c[0],r)&&!l[g][0]){this.dragSegments_.push([d,0]),l[g][0]=d;continue}if(ei(c[1],r)&&!l[g][1]){if(l[g][0]&&l[g][0].index===0){let m=d.geometry.getCoordinates();switch(d.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":m=m[f[1]];case"Polygon":if(d.index!==m[f[0]].length-2)continue;break}}this.dragSegments_.push([d,1]),l[g][1]=d;continue}$(c)in this.vertexSegments_&&!l[g][0]&&!l[g][1]&&this.insertVertexCondition_(t)&&o.push(d)}o.length&&this.willModifyFeatures_(t,[o]);for(let h=o.length-1;h>=0;--h)this.insertVertex_(o[h],r)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const n=this.dragSegments_[e][0],o=n.geometry;if(o.getType()==="Circle"){const r=o.getCenter(),s=n.featureSegments[0],a=n.featureSegments[1];s.segment[0]=r,s.segment[1]=r,a.segment[0]=r,a.segment[1]=r,this.rBush_.update(yr(r),s);let l=o;this.rBush_.update(l.getExtent(),a)}else this.rBush_.update(xe(n.segment),n)}return this.featuresBeingModified_&&(this.dispatchEvent(new Qh(Jh.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,n){const o=n||e.getCoordinateFromPixel(t);e.getView().getProjection();const r=function(l,h){return qg(o,l)-qg(o,h)};let s,a;if(this.hitDetection_){const l=typeof this.hitDetection_=="object"?h=>h===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,(h,u,d)=>{if(d=d||h.getGeometry(),d.getType()==="Point"&&this.features_.getArray().includes(h)){a=d;const c=d.getFlatCoordinates().slice(0,2);s=[{feature:h,geometry:d,segment:[c,c]}]}return!0},{layerFilter:l})}if(!s){const l=Hi(yr(o,Vg)),h=e.getView().getResolution()*this.pixelTolerance_,u=Yl(ui(l,h,Vg));s=this.rBush_.getInExtent(u)}if(s&&s.length>0){const l=s.sort(r)[0],h=l.segment;let u=$g(o,l);const d=e.getPixelFromCoordinate(u);let c=rc(t,d);if(a||c<=this.pixelTolerance_){const g={};if(g[$(h)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-o[0],this.delta_[1]=u[1]-o[1]),l.geometry.getType()==="Circle"&&l.index===Zr)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);else{const f=e.getPixelFromCoordinate(h[0]),m=e.getPixelFromCoordinate(h[1]),p=wi(d,f),_=wi(d,m);c=Math.sqrt(Math.min(p,_)),this.snappedToVertex_=c<=this.pixelTolerance_,this.snappedToVertex_&&(u=p>_?h[1]:h[0]),this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);const v={};v[$(l.geometry)]=!0;for(let y=1,x=s.length;y<x;++y){const k=s[y].segment;if(ei(h[0],k[0])&&ei(h[1],k[1])||ei(h[0],k[1])&&ei(h[1],k[0])){const w=$(s[y].geometry);w in v||(v[w]=!0,g[$(k)]=!0)}else break}}this.vertexSegments_=g;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(t,e){const n=t.segment,o=t.feature,r=t.geometry,s=t.depth,a=t.index;let l;for(;e.length<r.getStride();)e.push(0);switch(r.getType()){case"MultiLineString":l=r.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"Polygon":l=r.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"MultiPolygon":l=r.getCoordinates(),l[s[1]][s[0]].splice(a+1,0,e);break;case"LineString":l=r.getCoordinates(),l.splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(r,l);const h=this.rBush_;h.remove(t),this.updateSegmentIndices_(r,a,s,1);const u={segment:[n[0],e],feature:o,geometry:r,depth:s,index:a};h.insert(xe(u.segment),u),this.dragSegments_.push([u,1]);const d={segment:[e,n[1]],feature:o,geometry:r,depth:s,index:a+1};h.insert(xe(d.segment),d),this.dragSegments_.push([d,0]),this.ignoreNextSingleClick_=!0}removePoint(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Mt.POINTERDRAG){const t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);const e=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new Qh(Jh.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1}removeVertex_(){const t=this.dragSegments_,e={};let n=!1,o,r,s,a,l,h,u,d,c,g,f;for(l=t.length-1;l>=0;--l)s=t[l],g=s[0],f=$(g.feature),g.depth&&(f+="-"+g.depth.join("-")),f in e||(e[f]={}),s[1]===0?(e[f].right=g,e[f].index=g.index):s[1]==1&&(e[f].left=g,e[f].index=g.index+1);for(f in e){switch(c=e[f].right,u=e[f].left,h=e[f].index,d=h-1,u!==void 0?g=u:g=c,d<0&&(d=0),a=g.geometry,r=a.getCoordinates(),o=r,n=!1,a.getType()){case"MultiLineString":r[g.depth[0]].length>2&&(r[g.depth[0]].splice(h,1),n=!0);break;case"LineString":r.length>2&&(r.splice(h,1),n=!0);break;case"MultiPolygon":o=o[g.depth[1]];case"Polygon":o=o[g.depth[0]],o.length>4&&(h==o.length-1&&(h=0),o.splice(h,1),n=!0,h===0&&(o.pop(),o.push(o[0]),d=o.length-1));break}if(n){this.setGeometryCoordinates_(a,r);const m=[];if(u!==void 0&&(this.rBush_.remove(u),m.push(u.segment[0])),c!==void 0&&(this.rBush_.remove(c),m.push(c.segment[1])),u!==void 0&&c!==void 0){const p={depth:g.depth,feature:g.feature,geometry:g.geometry,index:d,segment:m};this.rBush_.insert(xe(p.segment),p)}this.updateSegmentIndices_(a,h,g.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return n}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,n,o){this.rBush_.forEachInExtent(t.getExtent(),function(r){r.geometry===t&&(n===void 0||r.depth===void 0||Zi(r.depth,n))&&r.index>e&&(r.index+=o)})}}function ex(i,t){return i.index-t.index}function qg(i,t,e){const n=t.geometry;if(n.getType()==="Circle"){let r=n;if(t.index===Zr){const s=wi(r.getCenter(),Zt(i)),a=Math.sqrt(s)-r.getRadius();return a*a}}const o=Zt(i);return Wo[0]=Zt(t.segment[0]),Wo[1]=Zt(t.segment[1]),D0(o,Wo)}function $g(i,t,e){const n=t.geometry;if(n.getType()==="Circle"&&t.index===Zr)return To(n.getClosestPoint(Zt(i)));const o=Zt(i);return Wo[0]=Zt(t.segment[0]),Wo[1]=Zt(t.segment[1]),To(Ol(o,Wo))}function ix(){const i=hg();return function(t,e){return i.Point}}const nx=tx;function Hg(i){if(i.feature)return i.feature;if(i.element)return i.element}const tu=[];class ox extends nn{constructor(t){t=t||{};const e=t;e.handleDownEvent||(e.handleDownEvent=Dn),e.stopDown||(e.stopDown=xo),super(e),this.source_=t.source?t.source:null,this.vertex_=t.vertex!==void 0?t.vertex:!0,this.edge_=t.edge!==void 0?t.edge:!0,this.features_=t.features?t.features:null,this.featuresListenerKeys_=[],this.featureChangeListenerKeys_={},this.indexedFeaturesExtents_={},this.pendingFeatures_={},this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.rBush_=new wa,this.GEOMETRY_SEGMENTERS_={Point:this.segmentPointGeometry_.bind(this),LineString:this.segmentLineStringGeometry_.bind(this),LinearRing:this.segmentLineStringGeometry_.bind(this),Polygon:this.segmentPolygonGeometry_.bind(this),MultiPoint:this.segmentMultiPointGeometry_.bind(this),MultiLineString:this.segmentMultiLineStringGeometry_.bind(this),MultiPolygon:this.segmentMultiPolygonGeometry_.bind(this),GeometryCollection:this.segmentGeometryCollectionGeometry_.bind(this),Circle:this.segmentCircleGeometry_.bind(this)}}addFeature(t,e){e=e!==void 0?e:!0;const n=$(t),o=t.getGeometry();if(o){const r=this.GEOMETRY_SEGMENTERS_[o.getType()];if(r){this.indexedFeaturesExtents_[n]=o.getExtent(Ge());const s=[];if(r(s,o),s.length===1)this.rBush_.insert(xe(s[0]),{feature:t,segment:s[0]});else if(s.length>1){const a=s.map(h=>xe(h)),l=s.map(h=>({feature:t,segment:h}));this.rBush_.load(a,l)}}}e&&(this.featureChangeListenerKeys_[n]=ft(t,tt.CHANGE,this.handleFeatureChange_,this))}forEachFeatureAdd_(t){this.addFeature(t)}forEachFeatureRemove_(t){this.removeFeature(t)}getFeatures_(){let t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t}handleEvent(t){const e=this.snapTo(t.pixel,t.coordinate,t.map);return e&&(t.coordinate=e.vertex.slice(0,2),t.pixel=e.vertexPixel),super.handleEvent(t)}handleFeatureAdd_(t){const e=Hg(t);this.addFeature(e)}handleFeatureRemove_(t){const e=Hg(t);this.removeFeature(e)}handleFeatureChange_(t){const e=t.target;if(this.handlingDownUpSequence){const n=$(e);n in this.pendingFeatures_||(this.pendingFeatures_[n]=e)}else this.updateFeature_(e)}handleUpEvent(t){const e=Object.values(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1}removeFeature(t,e){const n=e!==void 0?e:!0,o=$(t),r=this.indexedFeaturesExtents_[o];if(r){const s=this.rBush_,a=[];s.forEachInExtent(r,function(l){t===l.feature&&a.push(l)});for(let l=a.length-1;l>=0;--l)s.remove(a[l])}n&&(Ft(this.featureChangeListenerKeys_[o]),delete this.featureChangeListenerKeys_[o])}setMap(t){const e=this.getMap(),n=this.featuresListenerKeys_,o=this.getFeatures_();e&&(n.forEach(Ft),n.length=0,o.forEach(this.forEachFeatureRemove_.bind(this))),super.setMap(t),t&&(this.features_?n.push(ft(this.features_,oe.ADD,this.handleFeatureAdd_,this),ft(this.features_,oe.REMOVE,this.handleFeatureRemove_,this)):this.source_&&n.push(ft(this.source_,we.ADDFEATURE,this.handleFeatureAdd_,this),ft(this.source_,we.REMOVEFEATURE,this.handleFeatureRemove_,this)),o.forEach(this.forEachFeatureAdd_.bind(this)))}snapTo(t,e,n){const o=n.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),r=n.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),s=xe([o,r]),a=this.rBush_.getInExtent(s),l=a.length;if(l===0)return null;n.getView().getProjection();const h=Zt(e);let u,d=1/0;const c=this.pixelTolerance_*this.pixelTolerance_,g=()=>{if(u){const f=n.getPixelFromCoordinate(u);if(wi(t,f)<=c)return{vertex:u,vertexPixel:[Math.round(f[0]),Math.round(f[1])]}}return null};if(this.vertex_){for(let m=0;m<l;++m){const p=a[m];p.feature.getGeometry().getType()!=="Circle"&&p.segment.forEach(_=>{const v=Zt(_),y=wi(h,v);y<d&&(u=_,d=y)})}const f=g();if(f)return f}if(this.edge_){for(let m=0;m<l;++m){let p=null;const _=a[m];if(_.feature.getGeometry().getType()==="Circle"){let v=_.feature.getGeometry();p=To(A0(h,v))}else{const[v,y]=_.segment;y&&(tu[0]=Zt(v),tu[1]=Zt(y),p=Ol(h,tu))}if(p){const v=wi(h,p);v<d&&(u=p,d=v)}}const f=g();if(f)return f}return null}updateFeature_(t){this.removeFeature(t,!1),this.addFeature(t,!1)}segmentCircleGeometry_(t,e){this.getMap().getView().getProjection();const r=Xv(e).getCoordinates()[0];for(let s=0,a=r.length-1;s<a;++s)t.push(r.slice(s,s+2))}segmentGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let o=0;o<n.length;++o){const r=this.GEOMETRY_SEGMENTERS_[n[o].getType()];r&&r(t,n[o])}}segmentLineStringGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length-1;o<r;++o)t.push(n.slice(o,o+2))}segmentMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];for(let a=0,l=s.length-1;a<l;++a)t.push(s.slice(a,a+2))}}segmentMultiPointGeometry_(t,e){e.getCoordinates().forEach(n=>{t.push([n])})}segmentMultiPolygonGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];for(let a=0,l=s.length;a<l;++a){const h=s[a];for(let u=0,d=h.length-1;u<d;++u)t.push(h.slice(u,u+2))}}}segmentPointGeometry_(t,e){t.push([e.getCoordinates()])}segmentPolygonGeometry_(t,e){const n=e.getCoordinates();for(let o=0,r=n.length;o<r;++o){const s=n[o];for(let a=0,l=s.length-1;a<l;++a)t.push(s.slice(a,a+2))}}}const rx=ox,sx=.5,ax=10,Kg=.25;class lx{constructor(t,e,n,o,r,s){this.sourceProj_=t,this.targetProj_=e;let a={};const l=br(this.targetProj_,this.sourceProj_);this.transformInv_=function(v){const y=v[0]+"/"+v[1];return a[y]||(a[y]=l(v)),a[y]},this.maxSourceExtent_=o,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!o&&!!this.sourceProj_.getExtent()&&Nt(o)==Nt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Nt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Nt(this.targetProj_.getExtent()):null;const h=$i(n),u=Ws(n),d=Bs(n),c=js(n),g=this.transformInv_(h),f=this.transformInv_(u),m=this.transformInv_(d),p=this.transformInv_(c),_=ax+(s?Math.max(0,Math.ceil(Math.log2(Al(n)/(s*s*256*256)))):0);if(this.addQuad_(h,u,d,c,g,f,m,p,_),this.wrapsXInSource_){let v=1/0;this.triangles_.forEach(function(y,x,k){v=Math.min(v,y.source[0][0],y.source[1][0],y.source[2][0])}),this.triangles_.forEach(function(y){if(Math.max(y.source[0][0],y.source[1][0],y.source[2][0])-v>this.sourceWorldWidth_/2){const x=[[y.source[0][0],y.source[0][1]],[y.source[1][0],y.source[1][1]],[y.source[2][0],y.source[2][1]]];x[0][0]-v>this.sourceWorldWidth_/2&&(x[0][0]-=this.sourceWorldWidth_),x[1][0]-v>this.sourceWorldWidth_/2&&(x[1][0]-=this.sourceWorldWidth_),x[2][0]-v>this.sourceWorldWidth_/2&&(x[2][0]-=this.sourceWorldWidth_);const k=Math.min(x[0][0],x[1][0],x[2][0]);Math.max(x[0][0],x[1][0],x[2][0])-k<this.sourceWorldWidth_/2&&(y.source=x)}}.bind(this))}a={}}addTriangle_(t,e,n,o,r,s){this.triangles_.push({source:[o,r,s],target:[t,e,n]})}addQuad_(t,e,n,o,r,s,a,l,h){const u=xe([r,s,a,l]),d=this.sourceWorldWidth_?Nt(u)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,g=this.sourceProj_.canWrapX()&&d>.5&&d<1;let f=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const p=xe([t,e,n,o]);f=Nt(p)/this.targetWorldWidth_>Kg||f}!g&&this.sourceProj_.isGlobal()&&d&&(f=d>Kg||f)}if(!f&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!$t(u,this.maxSourceExtent_))return;let m=0;if(!f&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(h>0)f=!0;else if(m=(!isFinite(r[0])||!isFinite(r[1])?8:0)+(!isFinite(s[0])||!isFinite(s[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),m!=1&&m!=2&&m!=4&&m!=8)return}if(h>0){if(!f){const p=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(p);let v;g?v=(Ui(r[0],c)+Ui(a[0],c))/2-Ui(_[0],c):v=(r[0]+a[0])/2-_[0];const y=(r[1]+a[1])/2-_[1];f=v*v+y*y>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){const p=[(e[0]+n[0])/2,(e[1]+n[1])/2],_=this.transformInv_(p),v=[(o[0]+t[0])/2,(o[1]+t[1])/2],y=this.transformInv_(v);this.addQuad_(t,e,p,v,r,s,_,y,h-1),this.addQuad_(v,p,n,o,y,_,a,l,h-1)}else{const p=[(t[0]+e[0])/2,(t[1]+e[1])/2],_=this.transformInv_(p),v=[(n[0]+o[0])/2,(n[1]+o[1])/2],y=this.transformInv_(v);this.addQuad_(t,p,v,o,r,_,y,l,h-1),this.addQuad_(p,e,n,v,_,s,a,y,h-1)}return}}if(g){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}(m&11)==0&&this.addTriangle_(t,n,o,r,a,l),(m&14)==0&&this.addTriangle_(t,n,e,r,a,s),m&&((m&13)==0&&this.addTriangle_(e,o,t,s,l,r),(m&7)==0&&this.addTriangle_(e,o,n,s,l,a))}calculateSourceExtent(){const t=Ge();return this.triangles_.forEach(function(e,n,o){const r=e.source;xr(t,r[0]),xr(t,r[1]),xr(t,r[2])}),t}getTriangles(){return this.triangles_}}const hx=lx;let eu;const Jg=[];function Qg(i,t,e,n,o){i.beginPath(),i.moveTo(0,0),i.lineTo(t,e),i.lineTo(n,o),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(t,n)+1,Math.max(e,o)),i.restore()}function iu(i,t){return Math.abs(i[t*4]-210)>2||Math.abs(i[t*4+3]-.75*255)>2}function ux(){if(eu===void 0){const i=document.createElement("canvas").getContext("2d");i.globalCompositeOperation="lighter",i.fillStyle="rgba(210, 0, 0, 0.75)",Qg(i,4,5,4,0),Qg(i,4,5,0,5);const t=i.getImageData(0,0,3,3).data;eu=iu(t,0)||iu(t,4)||iu(t,8)}return eu}function tf(i,t,e,n){const o=Xs(e,t,i);let r=Ys(t,n,e);const s=t.getMetersPerUnit();s!==void 0&&(r*=s);const a=i.getMetersPerUnit();a!==void 0&&(r/=a);const l=i.getExtent();if(!l||Gs(l,o)){const h=Ys(i,r,o)/r;isFinite(h)&&h>0&&(r/=h)}return r}function dx(i,t,e,n){const o=qi(e);let r=tf(i,t,o,n);return(!isFinite(r)||r<=0)&&Rl(e,function(s){return r=tf(i,t,s,n),isFinite(r)&&r>0}),r}function cx(i,t,e,n,o,r,s,a,l,h,u,d){const c=Ae(Math.round(e*i),Math.round(e*t),Jg);if(d||(c.imageSmoothingEnabled=!1),l.length===0)return c.canvas;c.scale(e,e);function g(x){return Math.round(x*e)/e}c.globalCompositeOperation="lighter";const f=Ge();l.forEach(function(x,k,w){ic(f,x.extent)});const m=Nt(f),p=Ue(f),_=Ae(Math.round(e*m/n),Math.round(e*p/n));d||(_.imageSmoothingEnabled=!1);const v=e/n;l.forEach(function(x,k,w){const E=x.extent[0]-f[0],M=-(x.extent[3]-f[3]),S=Nt(x.extent),z=Ue(x.extent);x.image.width>0&&x.image.height>0&&_.drawImage(x.image,h,h,x.image.width-2*h,x.image.height-2*h,E*v,M*v,S*v,z*v)});const y=$i(s);return a.getTriangles().forEach(function(x,k,w){const E=x.source,M=x.target;let S=E[0][0],z=E[0][1],P=E[1][0],G=E[1][1],A=E[2][0],at=E[2][1];const B=g((M[0][0]-y[0])/r),Z=g(-(M[0][1]-y[1])/r),F=g((M[1][0]-y[0])/r),V=g(-(M[1][1]-y[1])/r),D=g((M[2][0]-y[0])/r),H=g(-(M[2][1]-y[1])/r),Y=S,I=z;S=0,z=0,P-=Y,G-=I,A-=Y,at-=I;const rt=[[P,G,0,0,F-B],[A,at,0,0,D-B],[0,0,P,G,V-Z],[0,0,A,at,H-Z]],b=u0(rt);if(!!b){if(c.save(),c.beginPath(),ux()||!d){c.moveTo(F,V);const T=4,q=B-F,C=Z-V;for(let K=0;K<T;K++)c.lineTo(F+g((K+1)*q/T),V+g(K*C/(T-1))),K!=T-1&&c.lineTo(F+g((K+1)*q/T),V+g((K+1)*C/(T-1)));c.lineTo(D,H)}else c.moveTo(F,V),c.lineTo(B,Z),c.lineTo(D,H);c.clip(),c.transform(b[0],b[2],b[1],b[3],B,Z),c.translate(f[0]-Y,f[3]-I),c.scale(n/e,-n/e),c.drawImage(_.canvas,0,0),c.restore()}}),u&&(c.save(),c.globalCompositeOperation="source-over",c.strokeStyle="black",c.lineWidth=1,a.getTriangles().forEach(function(x,k,w){const E=x.target,M=(E[0][0]-y[0])/r,S=-(E[0][1]-y[1])/r,z=(E[1][0]-y[0])/r,P=-(E[1][1]-y[1])/r,G=(E[2][0]-y[0])/r,A=-(E[2][1]-y[1])/r;c.beginPath(),c.moveTo(z,P),c.lineTo(M,S),c.lineTo(G,A),c.closePath(),c.stroke()}),c.restore()),c.canvas}class gx extends Ma{constructor(t,e,n,o,r,s,a,l,h,u,d,c){super(r,N.IDLE,{interpolate:!!c}),this.renderEdges_=d!==void 0?d:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=o,this.wrappedTileCoord_=s||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const g=o.getTileCoordExtent(this.wrappedTileCoord_),f=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const p=f?Wn(g,f):g;if(Al(p)===0){this.state=N.EMPTY;return}const _=t.getExtent();_&&(m?m=Wn(m,_):m=_);const v=o.getResolution(this.wrappedTileCoord_[0]),y=dx(t,n,p,v);if(!isFinite(y)||y<=0){this.state=N.EMPTY;return}const x=u!==void 0?u:sx;if(this.triangulation_=new hx(t,n,p,m,y*x,v),this.triangulation_.getTriangles().length===0){this.state=N.EMPTY;return}this.sourceZ_=e.getZForResolution(y);let k=this.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(k[1]=Vt(k[1],m[1],m[3]),k[3]=Vt(k[3],m[1],m[3])):k=Wn(k,m)),!Al(k))this.state=N.EMPTY;else{const w=e.getTileRangeForExtentAndZ(k,this.sourceZ_);for(let E=w.minX;E<=w.maxX;E++)for(let M=w.minY;M<=w.maxY;M++){const S=h(this.sourceZ_,E,M,a);S&&this.sourceTiles_.push(S)}this.sourceTiles_.length===0&&(this.state=N.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(function(e,n,o){e&&e.getState()==N.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=N.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),o=typeof n=="number"?n:n[0],r=typeof n=="number"?n:n[1],s=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=cx(o,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),s,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=N.LOADED}this.changed()}load(){if(this.state==N.IDLE){this.state=N.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,o){const r=e.getState();if(r==N.IDLE||r==N.LOADING){t++;const s=ft(e,tt.CHANGE,function(a){const l=e.getState();(l==N.LOADED||l==N.ERROR||l==N.EMPTY)&&(Ft(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}.bind(this)),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(e,n,o){e.getState()==N.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Ft),this.sourcesListenerKeys_=null}release(){this.canvas_&&(kl(this.canvas_.getContext("2d")),Jg.push(this.canvas_),this.canvas_=null),super.release()}}const ef=gx;class fx extends Sg{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=Ge(),this.tmpTileRange_=new Yg(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),o=e.getUseInterimTilesOnError();return n==N.LOADED||n==N.EMPTY||n==N.ERROR&&!o}getTile(t,e,n,o){const r=o.pixelRatio,s=o.viewState.projection,a=this.getLayer();let h=a.getSource().getTile(t,e,n,r,s);return h.getState()==N.ERROR&&a.getUseInterimTilesOnError()&&a.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(h)||(h=h.getInterimTile()),h}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),o=Jt(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!Gs(r,o))return null;const s=e.pixelRatio,a=e.viewState.projection,l=e.viewState,h=n.getRenderSource(),u=h.getTileGridForProjection(l.projection),d=h.getTilePixelRatio(e.pixelRatio);for(let c=u.getZForResolution(l.resolution);c>=u.getMinZoom();--c){const g=u.getTileCoordForCoordAndZ(o,c),f=h.getTile(c,g[1],g[2],s,a);if(!(f instanceof Gg||f instanceof ef))return null;if(f.getState()!==N.LOADED)continue;const m=u.getOrigin(c),p=be(u.getTileSize(c)),_=u.getResolution(c),v=Math.floor(d*((o[0]-m[0])/_-g[1]*p[0])),y=Math.floor(d*((m[1]-o[1])/_-g[2]*p[1])),x=Math.round(d*h.getGutterForProjection(l.projection));return this.getImageData(f.getImage(),v+x,y+x)}return null}loadedTileCallback(t,e,n){return this.isDrawableTile(n)?super.loadedTileCallback(t,e,n):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const n=t.layerStatesArray[t.layerIndex],o=t.viewState,r=o.projection,s=o.resolution,a=o.center,l=o.rotation,h=t.pixelRatio,u=this.getLayer(),d=u.getSource(),c=d.getRevision(),g=d.getTileGridForProjection(r),f=g.getZForResolution(s,d.zDirection),m=g.getResolution(f);let p=t.extent;const _=t.viewState.resolution,v=d.getTilePixelRatio(h),y=Math.round(Nt(p)/_*h),x=Math.round(Ue(p)/_*h),k=n.extent&&Hi(n.extent);k&&(p=Wn(p,Hi(n.extent)));const w=m*y/2/v,E=m*x/2/v,M=[a[0]-w,a[1]-E,a[0]+w,a[1]+E],S=g.getTileRangeForExtentAndZ(p,f),z={};z[f]={};const P=this.createLoadedTileFinder(d,r,z),G=this.tmpExtent,A=this.tmpTileRange_;this.newTiles_=!1;const at=l?Dl(o.center,_,l,t.size):void 0;for(let rt=S.minX;rt<=S.maxX;++rt)for(let b=S.minY;b<=S.maxY;++b){if(l&&!g.tileCoordIntersectsViewport([f,rt,b],at))continue;const T=this.getTile(f,rt,b,t);if(this.isDrawableTile(T)){const K=$(this);if(T.getState()==N.LOADED){z[f][T.tileCoord.toString()]=T;let U=T.inTransition(K);U&&n.opacity!==1&&(T.endTransition(K),U=!1),!this.newTiles_&&(U||!this.renderedTiles.includes(T))&&(this.newTiles_=!0)}if(T.getAlpha(K,t.time)===1)continue}const q=g.getTileCoordChildTileRange(T.tileCoord,A,G);let C=!1;q&&(C=P(f+1,q)),C||g.forEachTileCoordParentTileRange(T.tileCoord,P,A,G)}const B=m/s*h/v;Mi(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,l,-y/2,-x/2);const Z=_c(this.pixelTransform);this.useContainer(e,Z,this.getBackground(t));const F=this.context,V=F.canvas;Vl(this.inversePixelTransform,this.pixelTransform),Mi(this.tempTransform,y/2,x/2,B,B,0,-y/2,-x/2),V.width!=y||V.height!=x?(V.width=y,V.height=x):this.containerReused||F.clearRect(0,0,y,x),k&&this.clipUnrotated(F,t,k),d.getInterpolate()||(F.imageSmoothingEnabled=!1),this.preRender(F,t),this.renderedTiles.length=0;let D=Object.keys(z).map(Number);D.sort(Pn);let H,Y,I;n.opacity===1&&(!this.containerReused||d.getOpaque(t.viewState.projection))?D=D.reverse():(H=[],Y=[]);for(let rt=D.length-1;rt>=0;--rt){const b=D[rt],T=d.getTilePixelSize(b,h,r),C=g.getResolution(b)/m,K=T[0]*C*B,U=T[1]*C*B,_t=g.getTileCoordForCoordAndZ($i(M),b),Et=g.getTileCoordExtent(_t),yt=Jt(this.tempTransform,[v*(Et[0]-M[0])/m,v*(M[3]-Et[3])/m]),Ct=v*d.getGutterForProjection(r),Lt=z[b];for(const Dt in Lt){const jt=Lt[Dt],O=jt.tileCoord,ut=_t[1]-O[1],pt=Math.round(yt[0]-(ut-1)*K),kt=_t[2]-O[2],xt=Math.round(yt[1]-(kt-1)*U),st=Math.round(yt[0]-ut*K),nt=Math.round(yt[1]-kt*U),wt=pt-st,It=xt-nt,Bt=f===b,bt=Bt&&jt.getAlpha($(this),t.time)!==1;let dt=!1;if(!bt)if(H){I=[st,nt,st+wt,nt,st+wt,nt+It,st,nt+It];for(let Ot=0,St=H.length;Ot<St;++Ot)if(f!==b&&b<Y[Ot]){const ct=H[Ot];$t([st,nt,st+wt,nt+It],[ct[0],ct[3],ct[4],ct[7]])&&(dt||(F.save(),dt=!0),F.beginPath(),F.moveTo(I[0],I[1]),F.lineTo(I[2],I[3]),F.lineTo(I[4],I[5]),F.lineTo(I[6],I[7]),F.moveTo(ct[6],ct[7]),F.lineTo(ct[4],ct[5]),F.lineTo(ct[2],ct[3]),F.lineTo(ct[0],ct[1]),F.clip())}H.push(I),Y.push(b)}else F.clearRect(st,nt,wt,It);this.drawTileImage(jt,t,st,nt,wt,It,Ct,Bt),H&&!bt?(dt&&F.restore(),this.renderedTiles.unshift(jt)):this.renderedTiles.push(jt),this.updateUsedTiles(t.usedTiles,d,jt)}}return this.renderedRevision=c,this.renderedResolution=m,this.extentChanged=!this.renderedExtent_||!So(this.renderedExtent_,M),this.renderedExtent_=M,this.renderedPixelRatio=h,this.renderedProjection=r,this.manageTilePyramid(t,d,g,h,r,p,f,u.getPreload()),this.scheduleExpireCache(t,d),this.postRender(F,t),n.extent&&F.restore(),F.imageSmoothingEnabled=!0,Z!==V.style.transform&&(V.style.transform=Z),this.container}drawTileImage(t,e,n,o,r,s,a,l){const h=this.getTileImage(t);if(!h)return;const u=$(this),d=e.layerStatesArray[e.layerIndex],c=d.opacity*(l?t.getAlpha(u,e.time):1),g=c!==this.context.globalAlpha;g&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(h,a,a,h.width-2*a,h.height-2*a,n,o,r,s),g&&this.context.restore(),c!==d.opacity?e.animate=!0:l&&t.endTransition(u)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const n=function(o,r,s){const a=$(o);a in s.usedTiles&&o.expireCache(s.viewState.projection,s.usedTiles[a])}.bind(null,e);t.postRenderFunctions.push(n)}}updateUsedTiles(t,e,n){const o=$(e);o in t||(t[o]={}),t[o][n.getKey()]=!0}manageTilePyramid(t,e,n,o,r,s,a,l,h){const u=$(e);u in t.wantedTiles||(t.wantedTiles[u]={});const d=t.wantedTiles[u],c=t.tileQueue,g=n.getMinZoom(),f=t.viewState.rotation,m=f?Dl(t.viewState.center,t.viewState.resolution,f,t.size):void 0;let p=0,_,v,y,x,k,w;for(w=g;w<=a;++w)for(v=n.getTileRangeForExtentAndZ(s,w,v),y=n.getResolution(w),x=v.minX;x<=v.maxX;++x)for(k=v.minY;k<=v.maxY;++k)f&&!n.tileCoordIntersectsViewport([w,x,k],m)||(a-w<=l?(++p,_=e.getTile(w,x,k,o,r),_.getState()==N.IDLE&&(d[_.getKey()]=!0,c.isKeyQueued(_.getKey())||c.enqueue([_,u,n.getTileCoordCenter(_.tileCoord),y])),h!==void 0&&h(_)):e.useTile(w,x,k,r));e.updateCacheSize(p,r)}}const nf=fx,mx={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},px={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class vx extends nf{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=qe()}prepareTile(t,e,n){let o;const r=t.getState();return(r===N.LOADED||r===N.ERROR)&&(this.updateExecutorGroup_(t,e,n),this.tileImageNeedsRender_(t)&&(o=!0)),o}getTile(t,e,n,o){const r=o.pixelRatio,s=o.viewState,a=s.resolution,l=s.projection,h=this.getLayer(),u=h.getSource().getTile(t,e,n,r,l),d=o.viewHints,c=!(d[qt.ANIMATING]||d[qt.INTERACTING]);return(c||!u.wantedResolution)&&(u.wantedResolution=a),this.prepareTile(u,r,l)&&(c||Date.now()-o.time<8)&&h.getRenderMode()!=="vector"&&this.renderTileImage_(u,o),super.getTile(t,e,n,o)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&(e.getRenderMode()==="vector"?$(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,n){const o=this.getLayer(),r=o.getRevision(),s=o.getRenderOrder()||null,a=t.wantedResolution,l=t.getReplayState(o);if(!l.dirty&&l.renderedResolution===a&&l.renderedRevision==r&&l.renderedRenderOrder==s)return;const h=o.getSource(),u=o.getDeclutter(),d=h.getTileGrid(),g=h.getTileGridForProjection(n).getTileCoordExtent(t.wrappedTileCoord),f=h.getSourceTiles(e,n,t),m=$(o);delete t.hitDetectionImageData[m],t.executorGroups[m]=[],u&&(t.declutterExecutorGroups[m]=[]),l.dirty=!1;for(let p=0,_=f.length;p<_;++p){const v=f[p];if(v.getState()!=N.LOADED)continue;const y=v.tileCoord,x=d.getTileCoordExtent(y),k=Wn(g,x),w=ui(k,o.getRenderBuffer()*a,this.tmpExtent),E=So(x,k)?null:w,M=new xa(0,w,a,e),S=u?new xa(0,k,a,e):void 0,z=Pg(a,e),P=function(Z){let F;const V=Z.getStyleFunction()||o.getStyleFunction();if(V&&(F=V(Z,a)),F){const D=this.renderFeature(Z,z,F,M,S);l.dirty=l.dirty||D}},G=v.getFeatures();s&&s!==l.renderedRenderOrder&&G.sort(s);for(let Z=0,F=G.length;Z<F;++Z){const V=G[Z];(!E||$t(E,V.getGeometry().getExtent()))&&P.call(this,V)}const A=M.finish(),at=o.getRenderMode()!=="vector"&&u&&f.length===1?null:k,B=new ba(at,a,e,h.getOverlaps(),A,o.getRenderBuffer());if(t.executorGroups[m].push(B),S){const Z=new ba(null,a,e,h.getOverlaps(),S.finish(),o.getRenderBuffer());t.declutterExecutorGroups[m].push(Z)}}l.renderedRevision=r,l.renderedRenderOrder=s,l.renderedResolution=a}forEachFeatureAtCoordinate(t,e,n,o,r){const s=e.viewState.resolution,a=e.viewState.rotation;n=n==null?0:n;const l=this.getLayer(),u=l.getSource().getTileGridForProjection(e.viewState.projection),d=xe([t]);ui(d,s*n,d);const c={},g=function(p,_,v){let y=p.getId();y===void 0&&(y=$(p));const x=c[y];if(x){if(x!==!0&&v<x.distanceSq){if(v===0)return c[y]=!0,r.splice(r.lastIndexOf(x),1),o(p,l,_);x.geometry=_,x.distanceSq=v}}else{if(v===0)return c[y]=!0,o(p,l,_);r.push(c[y]={feature:p,layer:l,geometry:_,distanceSq:v,callback:o})}},f=this.renderedTiles;let m;for(let p=0,_=f.length;!m&&p<_;++p){const v=f[p],y=u.getTileCoordExtent(v.wrappedTileCoord);if(!$t(y,d))continue;const x=$(l),k=[v.executorGroups[x]],w=v.declutterExecutorGroups[x];w&&k.push(w),k.some(E=>{const M=E===w?e.declutterTree.all().map(S=>S.value):null;for(let S=0,z=E.length;S<z;++S)if(m=E[S].forEachFeatureAtCoordinate(t,s,a,n,g,M),m)return!0})}return m}getFeatures(t){return new Promise(function(e,n){const o=this.getLayer(),r=$(o),s=o.getSource(),a=this.renderedProjection,l=a.getExtent(),h=this.renderedResolution,u=s.getTileGridForProjection(a),d=Jt(this.renderedPixelToCoordinateTransform_,t.slice()),c=u.getTileCoordForCoordAndResolution(d,h);let g;for(let y=0,x=this.renderedTiles.length;y<x;++y)if(c.toString()===this.renderedTiles[y].tileCoord.toString()){if(g=this.renderedTiles[y],g.getState()===N.LOADED){const k=u.getTileCoordExtent(g.tileCoord);s.getWrapX()&&a.canWrapX()&&!Bn(l,k)&&Nl(d,a);break}g=void 0}if(!g||g.loadingSourceTiles>0){e([]);return}const f=u.getTileCoordExtent(g.wrappedTileCoord),m=$i(f),p=[(d[0]-m[0])/h,(m[1]-d[1])/h],_=g.getSourceTiles().reduce(function(y,x){return y.concat(x.getFeatures())},[]);let v=g.hitDetectionImageData[r];if(!v&&!this.animatingOrInteracting_){const y=be(u.getTileSize(u.getZForResolution(h,s.zDirection))),x=this.renderedRotation_,k=[this.getRenderTransform(u.getTileCoordCenter(g.wrappedTileCoord),h,0,je,y[0]*je,y[1]*je,0)];v=zg(y,k,_,o.getStyleFunction(),u.getTileCoordExtent(g.wrappedTileCoord),g.getReplayState(o).renderedResolution,x),g.hitDetectionImageData[r]=v}e(Rg(p,_,v))}.bind(this))}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.renderedLayerRevision_!==void 0&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t){const e=this.context,n=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();const o=t.viewHints,r=!(o[qt.ANIMATING]||o[qt.INTERACTING]),s=this.renderedTiles;for(let a=0,l=s.length;a<l;++a){const h=s[a],u=h.declutterExecutorGroups[$(this.getLayer())];if(u)for(let d=u.length-1;d>=0;--d)u[d].execute(this.context,1,this.getTileRenderTransform(h,t),t.viewState.rotation,r,void 0,t.declutterTree)}e.globalAlpha=n}getTileRenderTransform(t,e){const n=e.pixelRatio,o=e.viewState,r=o.center,s=o.resolution,a=o.rotation,l=e.size,h=Math.round(l[0]*n),u=Math.round(l[1]*n),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),g=t.tileCoord,f=c.getTileCoordExtent(t.wrappedTileCoord),m=c.getTileCoordExtent(g,this.tmpExtent)[0]-f[0];return Xl(Ul(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(r,s,a,n,h,u,m))}postRender(t,e){const n=e.viewHints,o=!(n[qt.ANIMATING]||n[qt.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;const r=this.getLayer(),s=r.getRenderMode(),a=t.globalAlpha;t.globalAlpha=r.getOpacity();const l=px[s],h=e.viewState,u=h.rotation,d=r.getSource(),g=d.getTileGridForProjection(h.projection).getZForResolution(h.resolution,d.zDirection),f=this.renderedTiles,m=[],p=[];let _=!0;for(let v=f.length-1;v>=0;--v){const y=f[v];_=_&&!y.getReplayState(r).dirty;const x=y.executorGroups[$(r)].filter(S=>S.hasExecutors(l));if(x.length===0)continue;const k=this.getTileRenderTransform(y,e),w=y.tileCoord[0];let E=!1;const M=x[0].getClipCoords(k);if(M){for(let S=0,z=m.length;S<z;++S)if(g!==w&&w<p[S]){const P=m[S];$t([M[0],M[3],M[4],M[7]],[P[0],P[3],P[4],P[7]])&&(E||(t.save(),E=!0),t.beginPath(),t.moveTo(M[0],M[1]),t.lineTo(M[2],M[3]),t.lineTo(M[4],M[5]),t.lineTo(M[6],M[7]),t.moveTo(P[6],P[7]),t.lineTo(P[4],P[5]),t.lineTo(P[2],P[3]),t.lineTo(P[0],P[1]),t.clip())}m.push(M),p.push(w)}for(let S=0,z=x.length;S<z;++S)x[S].execute(t,1,k,u,o,l);E&&t.restore()}t.globalAlpha=a,this.ready=_,super.postRender(t,e)}renderFeature(t,e,n,o,r){if(!n)return!1;let s=!1;if(Array.isArray(n))for(let a=0,l=n.length;a<l;++a)s=ka(o,t,n[a],e,this.boundHandleStyleImageChange_,void 0,r)||s;else s=ka(o,t,n,e,this.boundHandleStyleImageChange_,void 0,r);return s}tileImageNeedsRender_(t){const e=this.getLayer();if(e.getRenderMode()==="vector")return!1;const n=t.getReplayState(e),o=e.getRevision(),r=t.wantedResolution;return n.renderedTileResolution!==r||n.renderedTileRevision!==o}renderTileImage_(t,e){const n=this.getLayer(),o=t.getReplayState(n),r=n.getRevision(),s=t.executorGroups[$(n)];o.renderedTileRevision=r;const a=t.wrappedTileCoord,l=a[0],h=n.getSource();let u=e.pixelRatio;const c=e.viewState.projection,g=h.getTileGridForProjection(c),f=g.getResolution(t.tileCoord[0]),m=e.pixelRatio/t.wantedResolution*f,p=g.getResolution(l),_=t.getContext(n);u=Math.round(Math.max(u,m/u));const v=h.getTilePixelSize(l,u,c);_.canvas.width=v[0],_.canvas.height=v[1];const y=u/m;if(y!==1){const E=pc(this.tmpTransform_);Ul(E,y,y),_.setTransform.apply(_,E)}const x=g.getTileCoordExtent(a,this.tmpExtent),k=m/p,w=pc(this.tmpTransform_);Ul(w,k,-k),X0(w,-x[0],-x[3]);for(let E=0,M=s.length;E<M;++E)s[E].execute(_,y,w,0,!0,mx[n.getRenderMode()]);o.renderedTileResolution=t.wantedResolution}}const _x=vx,un={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class yx extends kg{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un;const n=t.renderMode||"hybrid";gt(n=="hybrid"||n=="vector",28),this.renderMode_=n,this.setPreload(t.preload?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0),this.getBackground,this.setBackground}createRenderer(){return new _x(this)}getFeatures(t){return super.getFeatures(t)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(un.PRELOAD)}getUseInterimTilesOnError(){return this.get(un.USE_INTERIM_TILES_ON_ERROR)}setPreload(t){this.set(un.PRELOAD,t)}setUseInterimTilesOnError(t){this.set(un.USE_INTERIM_TILES_ON_ERROR,t)}}const xx=yx,bx=[0,0,0],dn=5;class kx{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,gt(Vp(this.resolutions_,function(o,r){return r-o},!0),17);let e;if(!t.origins){for(let o=0,r=this.resolutions_.length-1;o<r;++o)if(!e)e=this.resolutions_[o]/this.resolutions_[o+1];else if(this.resolutions_[o]/this.resolutions_[o+1]!==e){e=void 0;break}}this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=t.origin!==void 0?t.origin:null,this.origins_=null,t.origins!==void 0&&(this.origins_=t.origins,gt(this.origins_.length==this.resolutions_.length,20));const n=t.extent;n!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=$i(n)),gt(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,t.tileSizes!==void 0&&(this.tileSizes_=t.tileSizes,gt(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=t.tileSize!==void 0?t.tileSize:this.tileSizes_?null:Ql,gt(!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],t.sizes!==void 0?this.fullTileRanges_=t.sizes.map(function(o,r){const s=new Yg(Math.min(0,o[0]),Math.max(o[0]-1,-1),Math.min(0,o[1]),Math.max(o[1]-1,-1));if(n){const a=this.getTileRangeForExtentAndZ(n,r);s.minX=Math.max(a.minX,s.minX),s.maxX=Math.min(a.maxX,s.maxX),s.minY=Math.max(a.minY,s.minY),s.maxY=Math.min(a.maxY,s.maxY)}return s},this):n&&this.calculateTileRanges_(n)}forEachTileCoord(t,e,n){const o=this.getTileRangeForExtentAndZ(t,e);for(let r=o.minX,s=o.maxX;r<=s;++r)for(let a=o.minY,l=o.maxY;a<=l;++a)n([e,r,a])}forEachTileCoordParentTileRange(t,e,n,o){let r,s,a,l=null,h=t[0]-1;for(this.zoomFactor_===2?(s=t[1],a=t[2]):l=this.getTileCoordExtent(t,o);h>=this.minZoom;){if(this.zoomFactor_===2?(s=Math.floor(s/2),a=Math.floor(a/2),r=Bo(s,s,a,a,n)):r=this.getTileRangeForExtentAndZ(l,h,n),e(h,r))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,n){if(t[0]<this.maxZoom){if(this.zoomFactor_===2){const r=t[1]*2,s=t[2]*2;return Bo(r,r+1,s,s+1,e)}const o=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;const o=t[0],r=t[1],s=t[2];if(e===o)return Bo(r,s,r,s,n);if(this.zoomFactor_){const l=Math.pow(this.zoomFactor_,e-o),h=Math.floor(r*l),u=Math.floor(s*l);if(e<o)return Bo(h,h,u,u,n);const d=Math.floor(l*(r+1))-1,c=Math.floor(l*(s+1))-1;return Bo(h,d,u,c,n)}const a=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e,n)}getTileRangeExtent(t,e,n){const o=this.getOrigin(t),r=this.getResolution(t),s=be(this.getTileSize(t),this.tmpSize_),a=o[0]+e.minX*s[0]*r,l=o[0]+(e.maxX+1)*s[0]*r,h=o[1]+e.minY*s[1]*r,u=o[1]+(e.maxY+1)*s[1]*r;return ti(a,h,l,u,n)}getTileRangeForExtentAndZ(t,e,n){const o=bx;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,o);const r=o[1],s=o[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,o),Bo(r,o[1],s,o[2],n)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),n=this.getResolution(t[0]),o=be(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*o[0]*n,e[1]-(t[2]+.5)*o[1]*n]}getTileCoordExtent(t,e){const n=this.getOrigin(t[0]),o=this.getResolution(t[0]),r=be(this.getTileSize(t[0]),this.tmpSize_),s=n[0]+t[1]*r[0]*o,a=n[1]-(t[2]+1)*r[1]*o,l=s+r[0]*o,h=a+r[1]*o;return ti(s,a,l,h,e)}getTileCoordForCoordAndResolution(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)}getTileCoordForXYAndResolution_(t,e,n,o,r){const s=this.getZForResolution(n),a=n/this.getResolution(s),l=this.getOrigin(s),h=be(this.getTileSize(s),this.tmpSize_);let u=a*(t-l[0])/n/h[0],d=a*(l[1]-e)/n/h[1];return o?(u=Ls(u,dn)-1,d=Ls(d,dn)-1):(u=Ds(u,dn),d=Ds(d,dn)),jg(s,u,d,r)}getTileCoordForXYAndZ_(t,e,n,o,r){const s=this.getOrigin(n),a=this.getResolution(n),l=be(this.getTileSize(n),this.tmpSize_);let h=(t-s[0])/a/l[0],u=(s[1]-e)/a/l[1];return o?(h=Ls(h,dn)-1,u=Ls(u,dn)-1):(h=Ds(h,dn),u=Ds(u,dn)),jg(n,h,u,r)}getTileCoordForCoordAndZ(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)}getTileCoordResolution(t){return this.resolutions_[t[0]]}getTileSize(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]}getFullTileRange(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null}getZForResolution(t,e){const n=xl(this.resolutions_,t,e||0);return Vt(n,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return Wc(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,n=new Array(e);for(let o=this.minZoom;o<e;++o)n[o]=this.getTileRangeForExtentAndZ(t,o);this.fullTileRanges_=n}}const nu=kx,ou={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};function of(i){let t=i.getDefaultTileGrid();return t||(t=Cx(i),i.setDefaultTileGrid(t)),t}function wx(i,t,e){const n=t[0],o=i.getTileCoordCenter(t),r=Sa(e);if(Gs(r,o))return t;{const s=Nt(r),a=Math.ceil((r[0]-o[0])/s);return o[0]+=s*a,i.getTileCoordForCoordAndZ(o,n)}}function Mx(i,t,e,n){n=n!==void 0?n:"top-left";const o=sf(i,t,e);return new nu({extent:i,origin:E0(i,n),resolutions:o,tileSize:e})}function rf(i){const t=i||{},e=t.extent||Gt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:sf(e,t.maxZoom,t.tileSize,t.maxResolution)};return new nu(n)}function sf(i,t,e,n){t=t!==void 0?t:Ec,e=be(e!==void 0?e:Ql);const o=Ue(i),r=Nt(i);n=n>0?n:Math.max(r/e[0],o/e[1]);const s=t+1,a=new Array(s);for(let l=0;l<s;++l)a[l]=n/Math.pow(2,l);return a}function Cx(i,t,e,n){const o=Sa(i);return Mx(o,t,e,n)}function Sa(i){i=Gt(i);let t=i.getExtent();if(!t){const e=180*ko.degrees/i.getMetersPerUnit();t=ti(-e,-e,e,e)}return t}class Ex extends Og{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=t.opaque!==void 0?t.opaque:!1,this.tilePixelRatio_=t.tilePixelRatio!==void 0?t.tilePixelRatio:1,this.tileGrid=t.tileGrid!==void 0?t.tileGrid:null;const e=[256,256];this.tileGrid&&be(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),e),this.tileCache=new Kh(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const n=this.getTileCacheForProjection(t);n&&n.expireCache(e)}forEachLoadedTile(t,e,n,o){const r=this.getTileCacheForProjection(t);if(!r)return!1;let s=!0,a,l,h;for(let u=n.minX;u<=n.maxX;++u)for(let d=n.minY;d<=n.maxY;++d)l=jo(e,u,d),h=!1,r.containsKey(l)&&(a=r.get(l),h=a.getState()===N.LOADED,h&&(h=o(a)!==!1)),h||(s=!1);return s}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(){return this.tileGrid?this.tileGrid.getResolutions():null}getTile(t,e,n,o,r){return et()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:of(t)}getTileCacheForProjection(t){const e=this.getProjection();return gt(e===null||Zn(e,t),68),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,n){const o=this.getTileGridForProjection(n),r=this.getTilePixelRatio(e),s=be(o.getTileSize(t),this.tmpSize);return r==1?s:P_(s,r,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=e!==void 0?e:this.getProjection();const n=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=wx(n,t,e)),Yy(t,n)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)}useTile(t,e,n,o){}}class Sx extends Qe{constructor(t,e){super(t),this.tile=e}}const Tx=Ex;function Ix(i,t){const e=/\{z\}/g,n=/\{x\}/g,o=/\{y\}/g,r=/\{-y\}/g;return function(s,a,l){if(s)return i.replace(e,s[0].toString()).replace(n,s[1].toString()).replace(o,s[2].toString()).replace(r,function(){const h=s[0],u=t.getFullTileRange(h);return gt(u,55),(u.getHeight()-s[2]-1).toString()})}}function zx(i,t){const e=i.length,n=new Array(e);for(let o=0;o<e;++o)n[o]=Ix(i[o],t);return Rx(n)}function Rx(i){return i.length===1?i[0]:function(t,e,n){if(t){const o=Zy(t),r=Ui(o,i.length);return i[r](t,e,n)}else return}}function Ax(i){const t=[];let e=/\{([a-z])-([a-z])\}/.exec(i);if(e){const n=e[1].charCodeAt(0),o=e[2].charCodeAt(0);let r;for(r=n;r<=o;++r)t.push(i.replace(e[0],String.fromCharCode(r)));return t}if(e=/\{(\d+)-(\d+)\}/.exec(i),e){const n=parseInt(e[2],10);for(let o=parseInt(e[1],10);o<=n;o++)t.push(i.replace(e[0],o.toString()));return t}return t.push(i),t}class ru extends Tx{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===ru.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.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(t){const e=t.target,n=$(e),o=e.getState();let r;o==N.LOADING?(this.tileLoadingKeys_[n]=!0,r=ou.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],r=o==N.ERROR?ou.TILELOADERROR:o==N.LOADED?ou.TILELOADEND:void 0),r!=null&&this.dispatchEvent(new Sx(r,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),typeof e<"u"?this.setKey(e):this.changed()}setUrl(t){const e=Ax(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join(`
|
46
|
+
`);this.generateTileUrlFunction_?this.setTileUrlFunction(zx(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,n){}useTile(t,e,n){const o=jo(t,e,n);this.tileCache.containsKey(o)&&this.tileCache.get(o)}}const af=ru;class Px extends af{constructor(t){const e=t.projection||"EPSG:3857",n=t.extent||Sa(e),o=t.tileGrid||rf({extent:n,maxResolution:t.maxResolution,maxZoom:t.maxZoom!==void 0?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:o,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Lx,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX===void 0?!0:t.wrapX,transition:t.transition,zDirection:t.zDirection===void 0?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new Kh(this.tileCache.highWaterMark),this.overlaps_=t.overlaps==null?!0:t.overlaps,this.tileClass=t.tileClass?t.tileClass:$y,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],n=this.tileCache;if(n.getCount()===0)return e;const o=Wg(n.peekFirstKey())[0],r=this.tileGrid;return n.forEach(function(s){if(s.tileCoord[0]!==o||s.getState()!==N.LOADED)return;const a=s.getSourceTiles();for(let l=0,h=a.length;l<h;++l){const u=a[l],d=u.tileCoord;if($t(t,r.getTileCoordExtent(d))){const c=u.getFeatures();if(c)for(let g=0,f=c.length;g<f;++g){const m=c[g],p=m.getGeometry();$t(t,p.getExtent())&&e.push(m)}}}}),e}getOverlaps(){return this.overlaps_}clear(){this.tileCache.clear(),this.sourceTileCache.clear()}expireCache(t,e){const n=this.getTileCacheForProjection(t),o=Object.keys(e).reduce((r,s)=>{const a=Wy(s),l=n.peek(a);if(l){const h=l.sourceTiles;for(let u=0,d=h.length;u<d;++u)r[h[u].getKey()]=!0}return r},{});super.expireCache(t,e),this.sourceTileCache.expireCache(o)}getSourceTiles(t,e,n){if(n.getState()===N.IDLE){n.setState(N.LOADING);const o=n.wrappedTileCoord,r=this.getTileGridForProjection(e),s=r.getTileCoordExtent(o),a=o[0],l=r.getResolution(a);ui(s,-l,s);const h=this.tileGrid,u=h.getExtent();u&&Wn(s,u,s);const d=h.getZForResolution(l,this.zDirection);h.forEachTileCoord(s,d,c=>{const g=this.tileUrlFunction(c,t,e),f=this.sourceTileCache.containsKey(g)?this.sourceTileCache.get(g):new this.tileClass(c,g?N.IDLE:N.EMPTY,g,this.format_,this.tileLoadFunction);n.sourceTiles.push(f);const m=f.getState();if(m<N.LOADED){const p=_=>{this.handleTileChange(_);const v=f.getState();if(v===N.LOADED||v===N.ERROR){const y=f.getKey();y in n.errorTileKeys?f.getState()===N.LOADED&&delete n.errorTileKeys[y]:n.loadingSourceTiles--,v===N.ERROR?n.errorTileKeys[y]=!0:f.removeEventListener(tt.CHANGE,p),n.loadingSourceTiles===0&&n.setState(On(n.errorTileKeys)?N.LOADED:N.ERROR)}};f.addEventListener(tt.CHANGE,p),n.loadingSourceTiles++}m===N.IDLE&&(f.extent=h.getTileCoordExtent(c),f.projection=e,f.resolution=h.getResolution(c[0]),this.sourceTileCache.set(g,f),f.load())}),n.loadingSourceTiles||n.setState(n.sourceTiles.some(c=>c.getState()===N.ERROR)?N.ERROR:N.LOADED)}return n.sourceTiles}getTile(t,e,n,o,r){const s=jo(t,e,n),a=this.getKey();let l;if(this.tileCache.containsKey(s)&&(l=this.tileCache.get(s),l.key===a))return l;const h=[t,e,n];let u=this.getTileCoordForTileUrlFunction(h,r);const d=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(r);if(u&&d){const m=c.getTileCoordExtent(u);ui(m,-c.getResolution(t),m),$t(d,m)||(u=null)}let g=!0;if(u!==null){const m=this.tileGrid,p=c.getResolution(t),_=m.getZForResolution(p,1),v=c.getTileCoordExtent(u);ui(v,-p,v),m.forEachTileCoord(v,_,function(y){g=g&&!this.tileUrlFunction(y,o,r)}.bind(this))}const f=new Vy(h,g?N.EMPTY:N.IDLE,u,this.getSourceTiles.bind(this,o,r));return f.key=a,l?(f.interimTile=l,f.refreshInterimChain(),this.tileCache.replace(s,f)):this.tileCache.set(s,f),f}getTileGridForProjection(t){const e=t.getCode();let n=this.tileGrids_[e];if(!n){const o=this.tileGrid,r=o.getResolutions().slice(),s=r.map(function(h,u){return o.getOrigin(u)}),a=r.map(function(h,u){return o.getTileSize(u)}),l=Ec+1;for(let h=r.length;h<l;++h)r.push(r[h-1]/2),s.push(s[h-1]),a.push(a[h-1]);n=new nu({extent:o.getExtent(),origins:s,resolutions:r,tileSizes:a}),this.tileGrids_[e]=n}return n}getTilePixelRatio(t){return t}getTilePixelSize(t,e,n){const o=this.getTileGridForProjection(n),r=be(o.getTileSize(t),this.tmpSize);return[Math.round(r[0]*e),Math.round(r[1]*e)]}updateCacheSize(t,e){super.updateCacheSize(t*2,e),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(e).highWaterMark}}const Dx=Px;function Lx(i,t){i.setLoader(function(e,n,o){Fg(t,i.getFormat(),e,n,o,i.onLoad.bind(i),i.onError.bind(i))})}class Ox extends af{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Fx,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate!==void 0?t.interpolate:!0,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,this.tileClass=t.tileClass!==void 0?t.tileClass:Gg,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const n=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==n?e:{});for(const o in this.tileCacheForProjection){const r=this.tileCacheForProjection[o];r.expireCache(r==n?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!Zn(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return this.getProjection()&&t&&!Zn(this.getProjection(),t)?!1:super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||Zn(e,t)))return this.tileGrid;{const n=$(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=of(t)),this.tileGridForProjection[n]}}getTileCacheForProjection(t){const e=this.getProjection();if(!e||Zn(e,t))return this.tileCache;{const n=$(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Kh(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]}}createTile_(t,e,n,o,r,s){const a=[t,e,n],l=this.getTileCoordForTileUrlFunction(a,r),h=l?this.tileUrlFunction(l,o,r):void 0,u=new this.tileClass(a,h!==void 0?N.IDLE:N.EMPTY,h!==void 0?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=s,u.addEventListener(tt.CHANGE,this.handleTileChange.bind(this)),u}getTile(t,e,n,o,r){const s=this.getProjection();if(!s||!r||Zn(s,r))return this.getTileInternal(t,e,n,o,s||r);{const a=this.getTileCacheForProjection(r),l=[t,e,n];let h;const u=Bg(l);a.containsKey(u)&&(h=a.get(u));const d=this.getKey();if(h&&h.key==d)return h;{const c=this.getTileGridForProjection(s),g=this.getTileGridForProjection(r),f=this.getTileCoordForTileUrlFunction(l,r),m=new ef(s,c,r,g,l,f,this.getTilePixelRatio(o),this.getGutter(),function(p,_,v,y){return this.getTileInternal(p,_,v,y,s)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return m.key=d,h?(m.interimTile=h,m.refreshInterimChain(),a.replace(u,m)):a.set(u,m),m}}}getTileInternal(t,e,n,o,r){let s=null;const a=jo(t,e,n),l=this.getKey();if(!this.tileCache.containsKey(a))s=this.createTile_(t,e,n,o,r,l),this.tileCache.set(a,s);else if(s=this.tileCache.get(a),s.key!=l){const h=s;s=this.createTile_(t,e,n,o,r,l),h.getState()==N.IDLE?s.interimTile=h.interimTile:s.interimTile=h,s.refreshInterimChain(),this.tileCache.replace(a,s)}return s}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(t,e){const n=Gt(t);if(n){const o=$(n);o in this.tileGridForProjection||(this.tileGridForProjection[o]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function Fx(i,t){i.getImage().src=t}const Nx=Ox;class Gx extends Os{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getPreload(){return this.get(un.PRELOAD)}setPreload(t){this.set(un.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(un.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(un.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const jx=Gx;class Bx extends jx{constructor(t){super(t)}createRenderer(){return new nf(this)}}const Wx=Bx;var Zx={},lf,hf={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 Yr(i){return i=Math.round(i),i<0?0:i>255?255:i}function uf(i){return i<0?0:i>1?1:i}function su(i){return i[i.length-1]==="%"?Yr(parseFloat(i)/100*255):Yr(parseInt(i))}function Ta(i){return i[i.length-1]==="%"?uf(parseFloat(i)/100):uf(parseFloat(i))}function au(i,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?i+(t-i)*e*6:e*2<1?t:e*3<2?i+(t-i)*(2/3-e)*6:i}function Yx(i){var t=i.replace(/ /g,"").toLowerCase();if(t in hf)return hf[t].slice();if(t[0]==="#"){if(t.length===4){var e=parseInt(t.substr(1),16);return e>=0&&e<=4095?[(e&3840)>>4|(e&3840)>>8,e&240|(e&240)>>4,e&15|(e&15)<<4,1]:null}else if(t.length===7){var e=parseInt(t.substr(1),16);return e>=0&&e<=16777215?[(e&16711680)>>16,(e&65280)>>8,e&255,1]:null}return null}var n=t.indexOf("("),o=t.indexOf(")");if(n!==-1&&o+1===t.length){var r=t.substr(0,n),s=t.substr(n+1,o-(n+1)).split(","),a=1;switch(r){case"rgba":if(s.length!==4)return null;a=Ta(s.pop());case"rgb":return s.length!==3?null:[su(s[0]),su(s[1]),su(s[2]),a];case"hsla":if(s.length!==4)return null;a=Ta(s.pop());case"hsl":if(s.length!==3)return null;var l=(parseFloat(s[0])%360+360)%360/360,h=Ta(s[1]),u=Ta(s[2]),d=u<=.5?u*(h+1):u+h-u*h,c=u*2-d;return[Yr(au(c,d,l+1/3)*255),Yr(au(c,d,l)*255),Yr(au(c,d,l-1/3)*255),a];default:return null}}return null}try{lf=Zx.parseCSSColor=Yx}catch{}var zt=function(t,e,n,o){o===void 0&&(o=1),this.r=t,this.g=e,this.b=n,this.a=o};zt.parse=function(t){if(!!t){if(t instanceof zt)return t;if(typeof t=="string"){var e=lf(t);if(!!e)return new zt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},zt.prototype.toString=function(){var t=this.toArray(),e=t[0],n=t[1],o=t[2],r=t[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(o)+","+r+")"},zt.prototype.toArray=function(){var t=this,e=t.r,n=t.g,o=t.b,r=t.a;return r===0?[0,0,0,0]:[e*255/r,n*255/r,o*255/r,r]},zt.prototype.toArray01=function(){var t=this,e=t.r,n=t.g,o=t.b,r=t.a;return r===0?[0,0,0,0]:[e/r,n/r,o/r,r]},zt.prototype.toArray01PremultipliedAlpha=function(){var t=this,e=t.r,n=t.g,o=t.b,r=t.a;return[e,n,o,r]},zt.black=new zt(0,0,0,1),zt.white=new zt(1,1,1,1),zt.transparent=new zt(0,0,0,0),zt.red=new zt(1,0,0,1),zt.blue=new zt(0,0,1,1);function Xr(i){return typeof i=="object"?["literal",i]:i}function Xx(i,t){var e=i.stops;if(!e)return Ux(i,t);var n=e&&typeof e[0][0]=="object",o=n||i.property!==void 0,r=n||!o;return e=e.map(function(s){return!o&&t.tokens&&typeof s[1]=="string"?[s[0],Hx(s[1])]:[s[0],Xr(s[1])]}),n?Vx(i,t,e):r?$x(i,t,e):hu(i,t,e)}function Ux(i,t){var e=["get",i.property];if(i.default===void 0)return t.type==="string"?["string",e]:e;if(t.type==="enum")return["match",e,Object.keys(t.values),e,i.default];var n=[t.type==="color"?"to-color":t.type,e,Xr(i.default)];return t.type==="array"&&n.splice(1,0,t.value,t.length||null),n}function lu(i){switch(i.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Vx(i,t,e){for(var n={},o={},r=[],s=0;s<e.length;s++){var a=e[s],l=a[0].zoom;n[l]===void 0&&(n[l]={zoom:l,type:i.type,property:i.property,default:i.default},o[l]=[],r.push(l)),o[l].push([a[0].value,a[1]])}var h=du({},t);if(h==="exponential"){for(var u=[lu(i),["linear"],["zoom"]],d=0,c=r;d<c.length;d+=1){var g=c[d],f=hu(n[g],t,o[g]);Zo(u,g,f,!1)}return u}else{for(var m=["step",["zoom"]],p=0,_=r;p<_.length;p+=1){var v=_[p],y=hu(n[v],t,o[v]);Zo(m,v,y,!0)}return uu(m),m}}function qx(i,t){if(i!==void 0)return i;if(t!==void 0)return t}function df(i,t){var e=Xr(qx(i.default,t.default));return e===void 0&&t.type==="resolvedImage"?"":e}function hu(i,t,e){var n=du(i,t),o=["get",i.property];if(n==="categorical"&&typeof e[0][0]=="boolean"){for(var r=["case"],s=0,a=e;s<a.length;s+=1){var l=a[s];r.push(["==",o,l[0]],l[1])}return r.push(df(i,t)),r}else if(n==="categorical"){for(var h=["match",o],u=0,d=e;u<d.length;u+=1){var c=d[u];Zo(h,c[0],c[1],!1)}return h.push(df(i,t)),h}else if(n==="interval"){for(var g=["step",["number",o]],f=0,m=e;f<m.length;f+=1){var p=m[f];Zo(g,p[0],p[1],!0)}return uu(g),i.default===void 0?g:["case",["==",["typeof",o],"number"],g,Xr(i.default)]}else if(n==="exponential"){for(var _=i.base!==void 0?i.base:1,v=[lu(i),_===1?["linear"]:["exponential",_],["number",o]],y=0,x=e;y<x.length;y+=1){var k=x[y];Zo(v,k[0],k[1],!1)}return i.default===void 0?v:["case",["==",["typeof",o],"number"],v,Xr(i.default)]}else throw new Error("Unknown property function type "+n)}function $x(i,t,e,n){n===void 0&&(n=["zoom"]);var o=du(i,t),r,s=!1;if(o==="interval")r=["step",n],s=!0;else if(o==="exponential"){var a=i.base!==void 0?i.base:1;r=[lu(i),a===1?["linear"]:["exponential",a],n]}else throw new Error('Unknown zoom function type "'+o+'"');for(var l=0,h=e;l<h.length;l+=1){var u=h[l];Zo(r,u[0],u[1],s)}return uu(r),r}function uu(i){i[0]==="step"&&i.length===3&&(i.push(0),i.push(i[3]))}function Zo(i,t,e,n){i.length>3&&t===i[i.length-2]||(n&&i.length===2||i.push(t),i.push(e))}function du(i,t){return i.type?i.type:t.expression.interpolated?"exponential":"interval"}function Hx(i){for(var t=["concat"],e=/{([^{}]+)}/g,n=0,o=e.exec(i);o!==null;o=e.exec(i)){var r=i.slice(n,e.lastIndex-o[0].length);n=e.lastIndex,r.length>0&&t.push(r),t.push(["get",o[1]])}if(t.length===1)return i;if(n<i.length)t.push(i.slice(n));else if(t.length===2)return["to-string",t[1]];return t}var ci=function(i){function t(e,n){i.call(this,n),this.message=n,this.key=e}return i&&(t.__proto__=i),t.prototype=Object.create(i&&i.prototype),t.prototype.constructor=t,t}(Error),Ur=function(t,e){e===void 0&&(e=[]),this.parent=t,this.bindings={};for(var n=0,o=e;n<o.length;n+=1){var r=o[n],s=r[0],a=r[1];this.bindings[s]=a}};Ur.prototype.concat=function(t){return new Ur(this,t)},Ur.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},Ur.prototype.has=function(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1};var Ia={kind:"null"},L={kind:"number"},mt={kind:"string"},lt={kind:"boolean"},Ai={kind:"color"},Yo={kind:"object"},ht={kind:"value"},Kx={kind:"error"},za={kind:"collator"},Ra={kind:"formatted"},Vr={kind:"resolvedImage"};function $e(i,t){return{kind:"array",itemType:i,N:t}}function Yt(i){if(i.kind==="array"){var t=Yt(i.itemType);return typeof i.N=="number"?"array<"+t+", "+i.N+">":i.itemType.kind==="value"?"array":"array<"+t+">"}else return i.kind}var Jx=[Ia,L,mt,lt,Ai,Ra,Yo,$e(ht),Vr];function qr(i,t){if(t.kind==="error")return null;if(i.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!qr(i.itemType,t.itemType))&&(typeof i.N!="number"||i.N===t.N))return null}else{if(i.kind===t.kind)return null;if(i.kind==="value")for(var e=0,n=Jx;e<n.length;e+=1){var o=n[e];if(!qr(o,t))return null}}return"Expected "+Yt(i)+" but found "+Yt(t)+" instead."}function cu(i,t){return t.some(function(e){return e.kind===i.kind})}function $r(i,t){return t.some(function(e){return e==="null"?i===null:e==="array"?Array.isArray(i):e==="object"?i&&!Array.isArray(i)&&typeof i=="object":e===typeof i})}var Hr=function(t,e,n){t?this.sensitivity=e?"variant":"case":this.sensitivity=e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Hr.prototype.compare=function(t,e){return this.collator.compare(t,e)},Hr.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var gu=function(t,e,n,o,r){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=n,this.fontStack=o,this.textColor=r},Pe=function(t){this.sections=t};Pe.fromString=function(t){return new Pe([new gu(t,null,null,null,null)])},Pe.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(t){return t.text.length!==0||t.image&&t.image.name.length!==0})},Pe.factory=function(t){return t instanceof Pe?t:Pe.fromString(t)},Pe.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(t){return t.text}).join("")},Pe.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var o=n[e];if(o.image){t.push(["image",o.image.name]);continue}t.push(o.text);var r={};o.fontStack&&(r["text-font"]=["literal",o.fontStack.split(",")]),o.scale&&(r["font-scale"]=o.scale),o.textColor&&(r["text-color"]=["rgba"].concat(o.textColor.toArray())),t.push(r)}return t};var gi=function(t){this.name=t.name,this.available=t.available};gi.prototype.toString=function(){return this.name},gi.fromString=function(t){return t?new gi({name:t,available:!1}):null},gi.prototype.serialize=function(){return["image",this.name]};function cf(i,t,e,n){if(!(typeof i=="number"&&i>=0&&i<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255)){var o=typeof n=="number"?[i,t,e,n]:[i,t,e];return"Invalid rgba value ["+o.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,t,e,n].join(", ")+"]: 'a' must be between 0 and 1."}function Aa(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 zt)return!0;if(i instanceof Hr)return!0;if(i instanceof Pe)return!0;if(i instanceof gi)return!0;if(Array.isArray(i)){for(var t=0,e=i;t<e.length;t+=1){var n=e[t];if(!Aa(n))return!1}return!0}else if(typeof i=="object"){for(var o in i)if(!Aa(i[o]))return!1;return!0}else return!1}function te(i){if(i===null)return Ia;if(typeof i=="string")return mt;if(typeof i=="boolean")return lt;if(typeof i=="number")return L;if(i instanceof zt)return Ai;if(i instanceof Hr)return za;if(i instanceof Pe)return Ra;if(i instanceof gi)return Vr;if(Array.isArray(i)){for(var t=i.length,e,n=0,o=i;n<o.length;n+=1){var r=o[n],s=te(r);if(!e)e=s;else{if(e===s)continue;e=ht;break}}return $e(e||ht,t)}else return Yo}function Kr(i){var t=typeof i;return i===null?"":t==="string"||t==="number"||t==="boolean"?String(i):i instanceof zt||i instanceof Pe||i instanceof gi?i.toString():JSON.stringify(i)}var fi=function(t,e){this.type=t,this.value=e};fi.parse=function(t,e){if(t.length!==2)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!Aa(t[1]))return e.error("invalid value");var n=t[1],o=te(n),r=e.expectedType;return o.kind==="array"&&o.N===0&&r&&r.kind==="array"&&(typeof r.N!="number"||r.N===0)&&(o=r),new fi(o,n)},fi.prototype.evaluate=function(){return this.value},fi.prototype.eachChild=function(){},fi.prototype.outputDefined=function(){return!0},fi.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof zt?["rgba"].concat(this.value.toArray()):this.value instanceof Pe?this.value.serialize():this.value};var re=function(t){this.name="ExpressionEvaluationError",this.message=t};re.prototype.toJSON=function(){return this.message};var fu={string:mt,number:L,boolean:lt,object:Yo},Me=function(t,e){this.type=t,this.args=e};Me.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=1,o,r=t[0];if(r==="array"){var s;if(t.length>2){var a=t[1];if(typeof a!="string"||!(a in fu)||a==="object")return e.error('The item type argument of "array" must be one of string, number, boolean',1);s=fu[a],n++}else s=ht;var l;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);l=t[2],n++}o=$e(s,l)}else o=fu[r];for(var h=[];n<t.length;n++){var u=e.parse(t[n],n,ht);if(!u)return null;h.push(u)}return new Me(o,h)},Me.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t),o=qr(this.type,te(n));if(o){if(e===this.args.length-1)throw new re("Expected value to be of type "+Yt(this.type)+", but found "+Yt(te(n))+" instead.")}else return n}return null},Me.prototype.eachChild=function(t){this.args.forEach(t)},Me.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Me.prototype.serialize=function(){var t=this.type,e=[t.kind];if(t.kind==="array"){var n=t.itemType;if(n.kind==="string"||n.kind==="number"||n.kind==="boolean"){e.push(n.kind);var o=t.N;(typeof o=="number"||this.args.length>1)&&e.push(o)}}return e.concat(this.args.map(function(r){return r.serialize()}))};var cn=function(t){this.type=Ra,this.sections=t};cn.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[1];if(!Array.isArray(n)&&typeof n=="object")return e.error("First argument must be an image or text section.");for(var o=[],r=!1,s=1;s<=t.length-1;++s){var a=t[s];if(r&&typeof a=="object"&&!Array.isArray(a)){r=!1;var l=null;if(a["font-scale"]&&(l=e.parse(a["font-scale"],1,L),!l))return null;var h=null;if(a["text-font"]&&(h=e.parse(a["text-font"],1,$e(mt)),!h))return null;var u=null;if(a["text-color"]&&(u=e.parse(a["text-color"],1,Ai),!u))return null;var d=o[o.length-1];d.scale=l,d.font=h,d.textColor=u}else{var c=e.parse(t[s],1,ht);if(!c)return null;var g=c.type.kind;if(g!=="string"&&g!=="value"&&g!=="null"&&g!=="resolvedImage")return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,o.push({content:c,scale:null,font:null,textColor:null})}}return new cn(o)},cn.prototype.evaluate=function(t){var e=function(n){var o=n.content.evaluate(t);return te(o)===Vr?new gu("",o,null,null,null):new gu(Kr(o),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null)};return new Pe(this.sections.map(e))},cn.prototype.eachChild=function(t){for(var e=0,n=this.sections;e<n.length;e+=1){var o=n[e];t(o.content),o.scale&&t(o.scale),o.font&&t(o.font),o.textColor&&t(o.textColor)}},cn.prototype.outputDefined=function(){return!1},cn.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var o=n[e];t.push(o.content.serialize());var r={};o.scale&&(r["font-scale"]=o.scale.serialize()),o.font&&(r["text-font"]=o.font.serialize()),o.textColor&&(r["text-color"]=o.textColor.serialize()),t.push(r)}return t};var gn=function(t){this.type=Vr,this.input=t};gn.parse=function(t,e){if(t.length!==2)return e.error("Expected two arguments.");var n=e.parse(t[1],1,mt);return n?new gn(n):e.error("No image name provided.")},gn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=gi.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n},gn.prototype.eachChild=function(t){t(this.input)},gn.prototype.outputDefined=function(){return!1},gn.prototype.serialize=function(){return["image",this.input.serialize()]};var Qx={"to-boolean":lt,"to-color":Ai,"to-number":L,"to-string":mt},He=function(t,e){this.type=t,this.args=e};He.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[0];if((n==="to-boolean"||n==="to-string")&&t.length!==2)return e.error("Expected one argument.");for(var o=Qx[n],r=[],s=1;s<t.length;s++){var a=e.parse(t[s],s,ht);if(!a)return null;r.push(a)}return new He(o,r)},He.prototype.evaluate=function(t){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(t));if(this.type.kind==="color"){for(var e,n,o=0,r=this.args;o<r.length;o+=1){var s=r[o];if(e=s.evaluate(t),n=null,e instanceof zt)return e;if(typeof e=="string"){var a=t.parseColor(e);if(a)return a}else if(Array.isArray(e)&&(e.length<3||e.length>4?n="Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":n=cf(e[0],e[1],e[2],e[3]),!n))return new zt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new re(n||"Could not parse color from value '"+(typeof e=="string"?e:String(JSON.stringify(e)))+"'")}else if(this.type.kind==="number"){for(var l=null,h=0,u=this.args;h<u.length;h+=1){var d=u[h];if(l=d.evaluate(t),l===null)return 0;var c=Number(l);if(!isNaN(c))return c}throw new re("Could not convert "+JSON.stringify(l)+" to number.")}else return this.type.kind==="formatted"?Pe.fromString(Kr(this.args[0].evaluate(t))):this.type.kind==="resolvedImage"?gi.fromString(Kr(this.args[0].evaluate(t))):Kr(this.args[0].evaluate(t))},He.prototype.eachChild=function(t){this.args.forEach(t)},He.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},He.prototype.serialize=function(){if(this.type.kind==="formatted")return new cn([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new gn(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var tb=["Unknown","Point","LineString","Polygon"],Pi=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};Pi.prototype.id=function(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null},Pi.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?tb[this.feature.type]:this.feature.type:null},Pi.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Pi.prototype.canonicalID=function(){return this.canonical},Pi.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Pi.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var t=this.featureDistanceData.center,e=this.featureDistanceData.scale,n=this.featureTileCoord,o=n.x,r=n.y,s=o*e-t[0],a=r*e-t[1],l=this.featureDistanceData.bearing[0],h=this.featureDistanceData.bearing[1],u=l*s+h*a;return u}return 0},Pi.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=zt.parse(t)),e};var me=function(t,e,n,o){this.name=t,this.type=e,this._evaluate=n,this.args=o};me.prototype.evaluate=function(t){return this._evaluate(t,this.args)},me.prototype.eachChild=function(t){this.args.forEach(t)},me.prototype.outputDefined=function(){return!1},me.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},me.parse=function(t,e){var n,o=t[0],r=me.definitions[o];if(!r)return e.error('Unknown expression "'+o+'". If you wanted a literal array, use ["literal", [...]].',0);for(var s=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,l=a.filter(function(A){var at=A[0];return!Array.isArray(at)||at.length===t.length-1}),h=null,u=0,d=l;u<d.length;u+=1){var c=d[u],g=c[0],f=c[1];h=new vn(e.registry,e.path,null,e.scope);for(var m=[],p=!1,_=1;_<t.length;_++){var v=t[_],y=Array.isArray(g)?g[_-1]:g.type,x=h.parse(v,1+m.length,y);if(!x){p=!0;break}m.push(x)}if(!p){if(Array.isArray(g)&&g.length!==m.length){h.error("Expected "+g.length+" arguments, but found "+m.length+" instead.");continue}for(var k=0;k<m.length;k++){var w=Array.isArray(g)?g[k]:g.type,E=m[k];h.concat(k+1).checkSubtype(w,E.type)}if(h.errors.length===0)return new me(o,s,f,m)}}if(l.length===1)(n=e.errors).push.apply(n,h.errors);else{for(var M=l.length?l:a,S=M.map(function(A){var at=A[0];return eb(at)}).join(" | "),z=[],P=1;P<t.length;P++){var G=e.parse(t[P],1+z.length);if(!G)return null;z.push(Yt(G.type))}e.error("Expected arguments of type "+S+", but found ("+z.join(", ")+") instead.")}return null},me.register=function(t,e){me.definitions=e;for(var n in e)t[n]=me};function eb(i){return Array.isArray(i)?"("+i.map(Yt).join(", ")+")":"("+Yt(i.type)+"...)"}var fn=function(t,e,n){this.type=za,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};fn.parse=function(t,e){if(t.length!==2)return e.error("Expected one argument.");var n=t[1];if(typeof n!="object"||Array.isArray(n))return e.error("Collator options argument must be an object.");var o=e.parse(n["case-sensitive"]===void 0?!1:n["case-sensitive"],1,lt);if(!o)return null;var r=e.parse(n["diacritic-sensitive"]===void 0?!1:n["diacritic-sensitive"],1,lt);if(!r)return null;var s=null;return n.locale&&(s=e.parse(n.locale,1,mt),!s)?null:new fn(o,r,s)},fn.prototype.evaluate=function(t){return new Hr(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},fn.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},fn.prototype.outputDefined=function(){return!1},fn.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var mn=8192;function mu(i,t){i[0]=Math.min(i[0],t[0]),i[1]=Math.min(i[1],t[1]),i[2]=Math.max(i[2],t[0]),i[3]=Math.max(i[3],t[1])}function ib(i){return(180+i)/360}function nb(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function Pa(i,t){return!(i[0]<=t[0]||i[2]>=t[2]||i[1]<=t[1]||i[3]>=t[3])}function ob(i,t){var e=ib(i[0]),n=nb(i[1]),o=Math.pow(2,t.z);return[Math.round(e*o*mn),Math.round(n*o*mn)]}function rb(i,t,e){var n=i[0]-t[0],o=i[1]-t[1],r=i[0]-e[0],s=i[1]-e[1];return n*s-r*o===0&&n*r<=0&&o*s<=0}function sb(i,t,e){return t[1]>i[1]!=e[1]>i[1]&&i[0]<(e[0]-t[0])*(i[1]-t[1])/(e[1]-t[1])+t[0]}function pu(i,t){for(var e=!1,n=0,o=t.length;n<o;n++)for(var r=t[n],s=0,a=r.length;s<a-1;s++){if(rb(i,r[s],r[s+1]))return!1;sb(i,r[s],r[s+1])&&(e=!e)}return e}function ab(i,t){for(var e=0;e<t.length;e++)if(pu(i,t[e]))return!0;return!1}function lb(i,t){return i[0]*t[1]-i[1]*t[0]}function gf(i,t,e,n){var o=i[0]-e[0],r=i[1]-e[1],s=t[0]-e[0],a=t[1]-e[1],l=n[0]-e[0],h=n[1]-e[1],u=o*h-l*r,d=s*h-l*a;return u>0&&d<0||u<0&&d>0}function hb(i,t,e,n){var o=[t[0]-i[0],t[1]-i[1]],r=[n[0]-e[0],n[1]-e[1]];return lb(r,o)===0?!1:!!(gf(i,t,e,n)&&gf(e,n,i,t))}function ub(i,t,e){for(var n=0,o=e;n<o.length;n+=1)for(var r=o[n],s=0;s<r.length-1;++s)if(hb(i,t,r[s],r[s+1]))return!0;return!1}function ff(i,t){for(var e=0;e<i.length;++e)if(!pu(i[e],t))return!1;for(var n=0;n<i.length-1;++n)if(ub(i[n],i[n+1],t))return!1;return!0}function db(i,t){for(var e=0;e<t.length;e++)if(ff(i,t[e]))return!0;return!1}function vu(i,t,e){for(var n=[],o=0;o<i.length;o++){for(var r=[],s=0;s<i[o].length;s++){var a=ob(i[o][s],e);mu(t,a),r.push(a)}n.push(r)}return n}function mf(i,t,e){for(var n=[],o=0;o<i.length;o++){var r=vu(i[o],t,e);n.push(r)}return n}function pf(i,t,e,n){if(i[0]<e[0]||i[0]>e[2]){var o=n*.5,r=i[0]-e[0]>o?-n:e[0]-i[0]>o?n:0;r===0&&(r=i[0]-e[2]>o?-n:e[2]-i[0]>o?n:0),i[0]+=r}mu(t,i)}function cb(i){i[0]=i[1]=1/0,i[2]=i[3]=-1/0}function vf(i,t,e,n){var o=Math.pow(2,n.z)*mn,r=[n.x*mn,n.y*mn],s=[];if(!i)return s;for(var a=0,l=i;a<l.length;a+=1)for(var h=l[a],u=0,d=h;u<d.length;u+=1){var c=d[u],g=[c.x+r[0],c.y+r[1]];pf(g,t,e,o),s.push(g)}return s}function _f(i,t,e,n){var o=Math.pow(2,n.z)*mn,r=[n.x*mn,n.y*mn],s=[];if(!i)return s;for(var a=0,l=i;a<l.length;a+=1){for(var h=l[a],u=[],d=0,c=h;d<c.length;d+=1){var g=c[d],f=[g.x+r[0],g.y+r[1]];mu(t,f),u.push(f)}s.push(u)}if(t[2]-t[0]<=o/2){cb(t);for(var m=0,p=s;m<p.length;m+=1)for(var _=p[m],v=0,y=_;v<y.length;v+=1){var x=y[v];pf(x,t,e,o)}}return s}function gb(i,t){var e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],o=i.canonicalID();if(!o)return!1;if(t.type==="Polygon"){var r=vu(t.coordinates,n,o),s=vf(i.geometry(),e,n,o);if(!Pa(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!pu(h,r))return!1}}if(t.type==="MultiPolygon"){var u=mf(t.coordinates,n,o),d=vf(i.geometry(),e,n,o);if(!Pa(e,n))return!1;for(var c=0,g=d;c<g.length;c+=1){var f=g[c];if(!ab(f,u))return!1}}return!0}function fb(i,t){var e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],o=i.canonicalID();if(!o)return!1;if(t.type==="Polygon"){var r=vu(t.coordinates,n,o),s=_f(i.geometry(),e,n,o);if(!Pa(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!ff(h,r))return!1}}if(t.type==="MultiPolygon"){var u=mf(t.coordinates,n,o),d=_f(i.geometry(),e,n,o);if(!Pa(e,n))return!1;for(var c=0,g=d;c<g.length;c+=1){var f=g[c];if(!db(f,u))return!1}}return!0}var oi=function(t,e){this.type=lt,this.geojson=t,this.geometries=e};oi.parse=function(t,e){if(t.length!==2)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(Aa(t[1])){var n=t[1];if(n.type==="FeatureCollection")for(var o=0;o<n.features.length;++o){var r=n.features[o].geometry.type;if(r==="Polygon"||r==="MultiPolygon")return new oi(n,n.features[o].geometry)}else if(n.type==="Feature"){var s=n.geometry.type;if(s==="Polygon"||s==="MultiPolygon")return new oi(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new oi(n,n)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},oi.prototype.evaluate=function(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return gb(t,this.geometries);if(t.geometryType()==="LineString")return fb(t,this.geometries)}return!1},oi.prototype.eachChild=function(){},oi.prototype.outputDefined=function(){return!0},oi.prototype.serialize=function(){return["within",this.geojson]};function Da(i){if(i instanceof me){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 oi)return!1;var t=!0;return i.eachChild(function(e){t&&!Da(e)&&(t=!1)}),t}function _u(i){if(i instanceof me&&i.name==="feature-state")return!1;var t=!0;return i.eachChild(function(e){t&&!_u(e)&&(t=!1)}),t}function yu(i,t){if(i instanceof me&&t.indexOf(i.name)>=0)return!1;var e=!0;return i.eachChild(function(n){e&&!yu(n,t)&&(e=!1)}),e}var pn=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};pn.parse=function(t,e){if(t.length!==2||typeof t[1]!="string")return e.error("'var' expression requires exactly one string literal argument.");var n=t[1];return e.scope.has(n)?new pn(n,e.scope.get(n)):e.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},pn.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},pn.prototype.eachChild=function(){},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){return["var",this.name]};var vn=function(t,e,n,o,r){e===void 0&&(e=[]),o===void 0&&(o=new Ur),r===void 0&&(r=[]),this.registry=t,this.path=e,this.key=e.map(function(s){return"["+s+"]"}).join(""),this.scope=o,this.errors=r,this.expectedType=n};vn.prototype.parse=function(t,e,n,o,r){return r===void 0&&(r={}),e?this.concat(e,n,o)._parse(t,r):this._parse(t,r)},vn.prototype._parse=function(t,e){(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number")&&(t=["literal",t]);function n(u,d,c){return c==="assert"?new Me(d,[u]):c==="coerce"?new He(d,[u]):u}if(Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var o=t[0];if(typeof o!="string")return this.error("Expression name must be a string, but found "+typeof o+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[o];if(r){var s=r.parse(t,this);if(!s)return null;if(this.expectedType){var a=this.expectedType,l=s.type;if((a.kind==="string"||a.kind==="number"||a.kind==="boolean"||a.kind==="object"||a.kind==="array")&&l.kind==="value")s=n(s,a,e.typeAnnotation||"assert");else if((a.kind==="color"||a.kind==="formatted"||a.kind==="resolvedImage")&&(l.kind==="value"||l.kind==="string"))s=n(s,a,e.typeAnnotation||"coerce");else if(this.checkSubtype(a,l))return null}if(!(s instanceof fi)&&s.type.kind!=="resolvedImage"&&xu(s)){var h=new Pi;try{s=new fi(s.type,s.evaluate(h))}catch(u){return this.error(u.message),null}}return s}return this.error('Unknown expression "'+o+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof t>"u"?this.error("'undefined' value invalid. Use null instead."):typeof t=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},vn.prototype.concat=function(t,e,n){var o=typeof t=="number"?this.path.concat(t):this.path,r=n?this.scope.concat(n):this.scope;return new vn(this.registry,o,e||null,r,this.errors)},vn.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var o=""+this.key+e.map(function(r){return"["+r+"]"}).join("");this.errors.push(new ci(o,t))},vn.prototype.checkSubtype=function(t,e){var n=qr(t,e);return n&&this.error(n),n};function xu(i){if(i instanceof pn)return xu(i.boundExpression);if(i instanceof me&&i.name==="error")return!1;if(i instanceof fn)return!1;if(i instanceof oi)return!1;var t=i instanceof He||i instanceof Me,e=!0;return i.eachChild(function(n){t?e=e&&xu(n):e=e&&n instanceof fi}),e?Da(i)&&yu(i,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function yf(i,t){for(var e=i.length-1,n=0,o=e,r=0,s,a;n<=o;)if(r=Math.floor((n+o)/2),s=i[r],a=i[r+1],s<=t){if(r===e||t<a)return r;n=r+1}else if(s>t)o=r-1;else throw new re("Input is not a number.");return 0}var _n=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var o=0,r=n;o<r.length;o+=1){var s=r[o],a=s[0],l=s[1];this.labels.push(a),this.outputs.push(l)}};_n.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");var n=e.parse(t[1],1,L);if(!n)return null;var o=[],r=null;e.expectedType&&e.expectedType.kind!=="value"&&(r=e.expectedType);for(var s=1;s<t.length;s+=2){var a=s===1?-1/0:t[s],l=t[s+1],h=s,u=s+1;if(typeof a!="number")return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(o.length&&o[o.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',h);var d=e.parse(l,u,r);if(!d)return null;r=r||d.type,o.push([a,d])}return new _n(r,n,o)},_n.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var o=this.input.evaluate(t);if(o<=e[0])return n[0].evaluate(t);var r=e.length;if(o>=e[r-1])return n[r-1].evaluate(t);var s=yf(e,o);return n[s].evaluate(t)},_n.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var o=n[e];t(o)}},_n.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},_n.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var mb=Xo;function Xo(i,t,e,n){this.cx=3*i,this.bx=3*(e-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=n,this.p2x=e,this.p2y=n}Xo.prototype.sampleCurveX=function(i){return((this.ax*i+this.bx)*i+this.cx)*i},Xo.prototype.sampleCurveY=function(i){return((this.ay*i+this.by)*i+this.cy)*i},Xo.prototype.sampleCurveDerivativeX=function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},Xo.prototype.solveCurveX=function(i,t){typeof t>"u"&&(t=1e-6);var e,n,o,r,s;for(o=i,s=0;s<8;s++){if(r=this.sampleCurveX(o)-i,Math.abs(r)<t)return o;var a=this.sampleCurveDerivativeX(o);if(Math.abs(a)<1e-6)break;o=o-r/a}if(e=0,n=1,o=i,o<e)return e;if(o>n)return n;for(;e<n;){if(r=this.sampleCurveX(o),Math.abs(r-i)<t)return o;i>r?e=o:n=o,o=(n-e)*.5+e}return o},Xo.prototype.solve=function(i,t){return this.sampleCurveY(this.solveCurveX(i,t))};function Be(i,t,e){return i*(1-e)+t*e}function pb(i,t,e){return new zt(Be(i.r,t.r,e),Be(i.g,t.g,e),Be(i.b,t.b,e),Be(i.a,t.a,e))}function vb(i,t,e){return i.map(function(n,o){return Be(n,t[o],e)})}var _b=Object.freeze({__proto__:null,number:Be,color:pb,array:vb}),xf=.95047,bf=1,kf=1.08883,wf=4/29,Uo=6/29,Mf=3*Uo*Uo,yb=Uo*Uo*Uo,xb=Math.PI/180,bb=180/Math.PI;function bu(i){return i>yb?Math.pow(i,1/3):i/Mf+wf}function ku(i){return i>Uo?i*i*i:Mf*(i-wf)}function wu(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function Mu(i){return i/=255,i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Cf(i){var t=Mu(i.r),e=Mu(i.g),n=Mu(i.b),o=bu((.4124564*t+.3575761*e+.1804375*n)/xf),r=bu((.2126729*t+.7151522*e+.072175*n)/bf),s=bu((.0193339*t+.119192*e+.9503041*n)/kf);return{l:116*r-16,a:500*(o-r),b:200*(r-s),alpha:i.a}}function Ef(i){var t=(i.l+16)/116,e=isNaN(i.a)?t:t+i.a/500,n=isNaN(i.b)?t:t-i.b/200;return t=bf*ku(t),e=xf*ku(e),n=kf*ku(n),new zt(wu(3.2404542*e-1.5371385*t-.4985314*n),wu(-.969266*e+1.8760108*t+.041556*n),wu(.0556434*e-.2040259*t+1.0572252*n),i.alpha)}function kb(i,t,e){return{l:Be(i.l,t.l,e),a:Be(i.a,t.a,e),b:Be(i.b,t.b,e),alpha:Be(i.alpha,t.alpha,e)}}function wb(i){var t=Cf(i),e=t.l,n=t.a,o=t.b,r=Math.atan2(o,n)*bb;return{h:r<0?r+360:r,c:Math.sqrt(n*n+o*o),l:e,alpha:i.a}}function Mb(i){var t=i.h*xb,e=i.c,n=i.l;return Ef({l:n,a:Math.cos(t)*e,b:Math.sin(t)*e,alpha:i.alpha})}function Cb(i,t,e){var n=t-i;return i+e*(n>180||n<-180?n-360*Math.round(n/360):n)}function Eb(i,t,e){return{h:Cb(i.h,t.h,e),c:Be(i.c,t.c,e),l:Be(i.l,t.l,e),alpha:Be(i.alpha,t.alpha,e)}}var La={forward:Cf,reverse:Ef,interpolate:kb},Oa={forward:wb,reverse:Mb,interpolate:Eb},Ce=function(t,e,n,o,r){this.type=t,this.operator=e,this.interpolation=n,this.input=o,this.labels=[],this.outputs=[];for(var s=0,a=r;s<a.length;s+=1){var l=a[s],h=l[0],u=l[1];this.labels.push(h),this.outputs.push(u)}};Ce.interpolationFactor=function(t,e,n,o){var r=0;if(t.name==="exponential")r=Cu(e,t.base,n,o);else if(t.name==="linear")r=Cu(e,1,n,o);else if(t.name==="cubic-bezier"){var s=t.controlPoints,a=new mb(s[0],s[1],s[2],s[3]);r=a.solve(Cu(e,1,n,o))}return r},Ce.parse=function(t,e){var n=t[0],o=t[1],r=t[2],s=t.slice(3);if(!Array.isArray(o)||o.length===0)return e.error("Expected an interpolation type expression.",1);if(o[0]==="linear")o={name:"linear"};else if(o[0]==="exponential"){var a=o[1];if(typeof a!="number")return e.error("Exponential interpolation requires a numeric base.",1,1);o={name:"exponential",base:a}}else if(o[0]==="cubic-bezier"){var l=o.slice(1);if(l.length!==4||l.some(function(_){return typeof _!="number"||_<0||_>1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);o={name:"cubic-bezier",controlPoints:l}}else return e.error("Unknown interpolation type "+String(o[0]),1,0);if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");if(r=e.parse(r,2,L),!r)return null;var h=[],u=null;n==="interpolate-hcl"||n==="interpolate-lab"?u=Ai:e.expectedType&&e.expectedType.kind!=="value"&&(u=e.expectedType);for(var d=0;d<s.length;d+=2){var c=s[d],g=s[d+1],f=d+3,m=d+4;if(typeof c!="number")return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(h.length&&h[h.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var p=e.parse(g,m,u);if(!p)return null;u=u||p.type,h.push([c,p])}return u.kind!=="number"&&u.kind!=="color"&&!(u.kind==="array"&&u.itemType.kind==="number"&&typeof u.N=="number")?e.error("Type "+Yt(u)+" is not interpolatable."):new Ce(u,n,o,r,h)},Ce.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var o=this.input.evaluate(t);if(o<=e[0])return n[0].evaluate(t);var r=e.length;if(o>=e[r-1])return n[r-1].evaluate(t);var s=yf(e,o),a=e[s],l=e[s+1],h=Ce.interpolationFactor(this.interpolation,o,a,l),u=n[s].evaluate(t),d=n[s+1].evaluate(t);return this.operator==="interpolate"?_b[this.type.kind.toLowerCase()](u,d,h):this.operator==="interpolate-hcl"?Oa.reverse(Oa.interpolate(Oa.forward(u),Oa.forward(d),h)):La.reverse(La.interpolate(La.forward(u),La.forward(d),h))},Ce.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var o=n[e];t(o)}},Ce.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},Ce.prototype.serialize=function(){var t;this.interpolation.name==="linear"?t=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?t=["linear"]:t=["exponential",this.interpolation.base]:t=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],n=0;n<this.labels.length;n++)e.push(this.labels[n],this.outputs[n].serialize());return e};function Cu(i,t,e,n){var o=n-e,r=i-e;return o===0?0:t===1?r/o:(Math.pow(t,r)-1)/(Math.pow(t,o)-1)}var Di=function(t,e){this.type=t,this.args=e};Di.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var n=null,o=e.expectedType;o&&o.kind!=="value"&&(n=o);for(var r=[],s=0,a=t.slice(1);s<a.length;s+=1){var l=a[s],h=e.parse(l,1+r.length,n,void 0,{typeAnnotation:"omit"});if(!h)return null;n=n||h.type,r.push(h)}var u=o&&r.some(function(d){return qr(o,d.type)});return u?new Di(ht,r):new Di(n,r)},Di.prototype.evaluate=function(t){for(var e=null,n=0,o,r=0,s=this.args;r<s.length;r+=1){var a=s[r];if(n++,e=a.evaluate(t),e&&e instanceof gi&&!e.available&&(o||(o=e),e=null,n===this.args.length))return o;if(e!==null)break}return e},Di.prototype.eachChild=function(t){this.args.forEach(t)},Di.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Di.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var yn=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};yn.prototype.evaluate=function(t){return this.result.evaluate(t)},yn.prototype.eachChild=function(t){for(var e=0,n=this.bindings;e<n.length;e+=1){var o=n[e];t(o[1])}t(this.result)},yn.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var n=[],o=1;o<t.length-1;o+=2){var r=t[o];if(typeof r!="string")return e.error("Expected string, but found "+typeof r+" instead.",o);if(/[^a-zA-Z0-9_]/.test(r))return e.error("Variable names must contain only alphanumeric characters or '_'.",o);var s=e.parse(t[o+1],o+1);if(!s)return null;n.push([r,s])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,n);return a?new yn(n,a):null},yn.prototype.outputDefined=function(){return this.result.outputDefined()},yn.prototype.serialize=function(){for(var t=["let"],e=0,n=this.bindings;e<n.length;e+=1){var o=n[e],r=o[0],s=o[1];t.push(r,s.serialize())}return t.push(this.result.serialize()),t};var to=function(t,e,n){this.type=t,this.index=e,this.input=n};to.parse=function(t,e){if(t.length!==3)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,L),o=e.parse(t[2],2,$e(e.expectedType||ht));if(!n||!o)return null;var r=o.type;return new to(r.itemType,n,o)},to.prototype.evaluate=function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new re("Array index out of bounds: "+e+" < 0.");if(e>=n.length)throw new re("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new re("Array index must be an integer, but found "+e+" instead.");return n[e]},to.prototype.eachChild=function(t){t(this.index),t(this.input)},to.prototype.outputDefined=function(){return!1},to.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var eo=function(t,e){this.type=lt,this.needle=t,this.haystack=e};eo.parse=function(t,e){if(t.length!==3)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),o=e.parse(t[2],2,ht);return!n||!o?null:cu(n.type,[lt,mt,L,Ia,ht])?new eo(n,o):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Yt(n.type)+" instead")},eo.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(n==null)return!1;if(!$r(e,["boolean","string","number","null"]))throw new re("Expected first argument to be of type boolean, string, number or null, but found "+Yt(te(e))+" instead.");if(!$r(n,["string","array"]))throw new re("Expected second argument to be of type array or string, but found "+Yt(te(n))+" instead.");return n.indexOf(e)>=0},eo.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},eo.prototype.outputDefined=function(){return!0},eo.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xn=function(t,e,n){this.type=L,this.needle=t,this.haystack=e,this.fromIndex=n};xn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),o=e.parse(t[2],2,ht);if(!n||!o)return null;if(!cu(n.type,[lt,mt,L,Ia,ht]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Yt(n.type)+" instead");if(t.length===4){var r=e.parse(t[3],3,L);return r?new xn(n,o,r):null}else return new xn(n,o)},xn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!$r(e,["boolean","string","number","null"]))throw new re("Expected first argument to be of type boolean, string, number or null, but found "+Yt(te(e))+" instead.");if(!$r(n,["string","array"]))throw new re("Expected second argument to be of type array or string, but found "+Yt(te(n))+" instead.");if(this.fromIndex){var o=this.fromIndex.evaluate(t);return n.indexOf(e,o)}return n.indexOf(e)},xn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},xn.prototype.outputDefined=function(){return!1},xn.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var io=function(t,e,n,o,r,s){this.inputType=t,this.type=e,this.input=n,this.cases=o,this.outputs=r,this.otherwise=s};io.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!==1)return e.error("Expected an even number of arguments.");var n,o;e.expectedType&&e.expectedType.kind!=="value"&&(o=e.expectedType);for(var r={},s=[],a=2;a<t.length-1;a+=2){var l=t[a],h=t[a+1];Array.isArray(l)||(l=[l]);var u=e.concat(a);if(l.length===0)return u.error("Expected at least one branch label.");for(var d=0,c=l;d<c.length;d+=1){var g=c[d];if(typeof g!="number"&&typeof g!="string")return u.error("Branch labels must be numbers or strings.");if(typeof g=="number"&&Math.abs(g)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof g=="number"&&Math.floor(g)!==g)return u.error("Numeric branch labels must be integer values.");if(!n)n=te(g);else if(u.checkSubtype(n,te(g)))return null;if(typeof r[String(g)]<"u")return u.error("Branch labels must be unique.");r[String(g)]=s.length}var f=e.parse(h,a,o);if(!f)return null;o=o||f.type,s.push(f)}var m=e.parse(t[1],1,ht);if(!m)return null;var p=e.parse(t[t.length-1],t.length-1,o);return!p||m.type.kind!=="value"&&e.concat(1).checkSubtype(n,m.type)?null:new io(n,o,m,r,s,p)},io.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=te(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise;return n.evaluate(t)},io.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},io.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},io.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=Object.keys(this.cases).sort(),o=[],r={},s=0,a=n;s<a.length;s+=1){var l=a[s],h=r[this.cases[l]];h===void 0?(r[this.cases[l]]=o.length,o.push([this.cases[l],[l]])):o[h][1].push(l)}for(var u=function(m){return t.inputType.kind==="number"?Number(m):m},d=0,c=o;d<c.length;d+=1){var g=c[d],h=g[0],f=g[1];f.length===1?e.push(u(f[0])):e.push(f.map(u)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var no=function(t,e,n){this.type=t,this.branches=e,this.otherwise=n};no.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!==0)return e.error("Expected an odd number of arguments.");var n;e.expectedType&&e.expectedType.kind!=="value"&&(n=e.expectedType);for(var o=[],r=1;r<t.length-1;r+=2){var s=e.parse(t[r],r,lt);if(!s)return null;var a=e.parse(t[r+1],r+1,n);if(!a)return null;o.push([s,a]),n=n||a.type}var l=e.parse(t[t.length-1],t.length-1,n);return l?new no(n,o,l):null},no.prototype.evaluate=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var o=n[e],r=o[0],s=o[1];if(r.evaluate(t))return s.evaluate(t)}return this.otherwise.evaluate(t)},no.prototype.eachChild=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var o=n[e],r=o[0],s=o[1];t(r),t(s)}t(this.otherwise)},no.prototype.outputDefined=function(){return this.branches.every(function(t){t[0];var e=t[1];return e.outputDefined()})&&this.otherwise.outputDefined()},no.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var bn=function(t,e,n,o){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=o};bn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),o=e.parse(t[2],2,L);if(!n||!o)return null;if(!cu(n.type,[$e(ht),mt,ht]))return e.error("Expected first argument to be of type array or string, but found "+Yt(n.type)+" instead");if(t.length===4){var r=e.parse(t[3],3,L);return r?new bn(n.type,n,o,r):null}else return new bn(n.type,n,o)},bn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!$r(e,["string","array"]))throw new re("Expected first argument to be of type array or string, but found "+Yt(te(e))+" instead.");if(this.endIndex){var o=this.endIndex.evaluate(t);return e.slice(n,o)}return e.slice(n)},bn.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},bn.prototype.outputDefined=function(){return!1},bn.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Sf(i,t){return i==="=="||i==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function Sb(i,t,e){return t===e}function Tb(i,t,e){return t!==e}function Ib(i,t,e){return t<e}function zb(i,t,e){return t>e}function Rb(i,t,e){return t<=e}function Ab(i,t,e){return t>=e}function Tf(i,t,e,n){return n.compare(t,e)===0}function Pb(i,t,e,n){return!Tf(i,t,e,n)}function Db(i,t,e,n){return n.compare(t,e)<0}function Lb(i,t,e,n){return n.compare(t,e)>0}function Ob(i,t,e,n){return n.compare(t,e)<=0}function Fb(i,t,e,n){return n.compare(t,e)>=0}function Vo(i,t,e){var n=i!=="=="&&i!=="!=";return function(){function o(r,s,a){this.type=lt,this.lhs=r,this.rhs=s,this.collator=a,this.hasUntypedArgument=r.type.kind==="value"||s.type.kind==="value"}return o.parse=function(s,a){if(s.length!==3&&s.length!==4)return a.error("Expected two or three arguments.");var l=s[0],h=a.parse(s[1],1,ht);if(!h)return null;if(!Sf(l,h.type))return a.concat(1).error('"'+l+`" comparisons are not supported for type '`+Yt(h.type)+"'.");var u=a.parse(s[2],2,ht);if(!u)return null;if(!Sf(l,u.type))return a.concat(2).error('"'+l+`" comparisons are not supported for type '`+Yt(u.type)+"'.");if(h.type.kind!==u.type.kind&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot compare types '"+Yt(h.type)+"' and '"+Yt(u.type)+"'.");n&&(h.type.kind==="value"&&u.type.kind!=="value"?h=new Me(u.type,[h]):h.type.kind!=="value"&&u.type.kind==="value"&&(u=new Me(h.type,[u])));var d=null;if(s.length===4){if(h.type.kind!=="string"&&u.type.kind!=="string"&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot use collator to compare non-string types.");if(d=a.parse(s[3],3,za),!d)return null}return new o(h,u,d)},o.prototype.evaluate=function(s){var a=this.lhs.evaluate(s),l=this.rhs.evaluate(s);if(n&&this.hasUntypedArgument){var h=te(a),u=te(l);if(h.kind!==u.kind||!(h.kind==="string"||h.kind==="number"))throw new re('Expected arguments for "'+i+'" to be (string, string) or (number, number), but found ('+h.kind+", "+u.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var d=te(a),c=te(l);if(d.kind!=="string"||c.kind!=="string")return t(s,a,l)}return this.collator?e(s,a,l,this.collator.evaluate(s)):t(s,a,l)},o.prototype.eachChild=function(s){s(this.lhs),s(this.rhs),this.collator&&s(this.collator)},o.prototype.outputDefined=function(){return!0},o.prototype.serialize=function(){var s=[i];return this.eachChild(function(a){s.push(a.serialize())}),s},o}()}var Nb=Vo("==",Sb,Tf),Gb=Vo("!=",Tb,Pb),jb=Vo("<",Ib,Db),Bb=Vo(">",zb,Lb),Wb=Vo("<=",Rb,Ob),Zb=Vo(">=",Ab,Fb),oo=function(t,e,n,o,r){this.type=mt,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=o,this.maxFractionDigits=r};oo.parse=function(t,e){if(t.length!==3)return e.error("Expected two arguments.");var n=e.parse(t[1],1,L);if(!n)return null;var o=t[2];if(typeof o!="object"||Array.isArray(o))return e.error("NumberFormat options argument must be an object.");var r=null;if(o.locale&&(r=e.parse(o.locale,1,mt),!r))return null;var s=null;if(o.currency&&(s=e.parse(o.currency,1,mt),!s))return null;var a=null;if(o["min-fraction-digits"]&&(a=e.parse(o["min-fraction-digits"],1,L),!a))return null;var l=null;return o["max-fraction-digits"]&&(l=e.parse(o["max-fraction-digits"],1,L),!l)?null:new oo(n,r,s,a,l)},oo.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},oo.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},oo.prototype.outputDefined=function(){return!1},oo.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var ro=function(t){this.type=L,this.input=t};ro.parse=function(t,e){if(t.length!==2)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?e.error("Expected argument of type string or array, but found "+Yt(n.type)+" instead."):new ro(n):null},ro.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(typeof e=="string")return e.length;if(Array.isArray(e))return e.length;throw new re("Expected value to be of type string or array, but found "+Yt(te(e))+" instead.")},ro.prototype.eachChild=function(t){t(this.input)},ro.prototype.outputDefined=function(){return!1},ro.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Eu={"==":Nb,"!=":Gb,">":Bb,"<":jb,">=":Zb,"<=":Wb,array:Me,at:to,boolean:Me,case:no,coalesce:Di,collator:fn,format:cn,image:gn,in:eo,"index-of":xn,interpolate:Ce,"interpolate-hcl":Ce,"interpolate-lab":Ce,length:ro,let:yn,literal:fi,match:io,number:Me,"number-format":oo,object:Me,slice:bn,step:_n,string:Me,"to-boolean":He,"to-color":He,"to-number":He,"to-string":He,var:pn,within:oi};function If(i,t){var e=t[0],n=t[1],o=t[2],r=t[3];e=e.evaluate(i),n=n.evaluate(i),o=o.evaluate(i);var s=r?r.evaluate(i):1,a=cf(e,n,o,s);if(a)throw new re(a);return new zt(e/255*s,n/255*s,o/255*s,s)}function zf(i,t){return i in t}function Su(i,t){var e=t[i];return typeof e>"u"?null:e}function Yb(i,t,e,n){for(;e<=n;){var o=e+n>>1;if(t[o]===i)return!0;t[o]>i?n=o-1:e=o+1}return!1}function so(i){return{type:i}}me.register(Eu,{error:[Kx,[mt],function(i,t){var e=t[0];throw new re(e.evaluate(i))}],typeof:[mt,[ht],function(i,t){var e=t[0];return Yt(te(e.evaluate(i)))}],"to-rgba":[$e(L,4),[Ai],function(i,t){var e=t[0];return e.evaluate(i).toArray()}],rgb:[Ai,[L,L,L],If],rgba:[Ai,[L,L,L,L],If],has:{type:lt,overloads:[[[mt],function(i,t){var e=t[0];return zf(e.evaluate(i),i.properties())}],[[mt,Yo],function(i,t){var e=t[0],n=t[1];return zf(e.evaluate(i),n.evaluate(i))}]]},get:{type:ht,overloads:[[[mt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.properties())}],[[mt,Yo],function(i,t){var e=t[0],n=t[1];return Su(e.evaluate(i),n.evaluate(i))}]]},"feature-state":[ht,[mt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.featureState||{})}],properties:[Yo,[],function(i){return i.properties()}],"geometry-type":[mt,[],function(i){return i.geometryType()}],id:[ht,[],function(i){return i.id()}],zoom:[L,[],function(i){return i.globals.zoom}],pitch:[L,[],function(i){return i.globals.pitch||0}],"distance-from-center":[L,[],function(i){return i.distanceFromCenter()}],"heatmap-density":[L,[],function(i){return i.globals.heatmapDensity||0}],"line-progress":[L,[],function(i){return i.globals.lineProgress||0}],"sky-radial-progress":[L,[],function(i){return i.globals.skyRadialProgress||0}],accumulated:[ht,[],function(i){return i.globals.accumulated===void 0?null:i.globals.accumulated}],"+":[L,so(L),function(i,t){for(var e=0,n=0,o=t;n<o.length;n+=1){var r=o[n];e+=r.evaluate(i)}return e}],"*":[L,so(L),function(i,t){for(var e=1,n=0,o=t;n<o.length;n+=1){var r=o[n];e*=r.evaluate(i)}return e}],"-":{type:L,overloads:[[[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)-n.evaluate(i)}],[[L],function(i,t){var e=t[0];return-e.evaluate(i)}]]},"/":[L,[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)/n.evaluate(i)}],"%":[L,[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)%n.evaluate(i)}],ln2:[L,[],function(){return Math.LN2}],pi:[L,[],function(){return Math.PI}],e:[L,[],function(){return Math.E}],"^":[L,[L,L],function(i,t){var e=t[0],n=t[1];return Math.pow(e.evaluate(i),n.evaluate(i))}],sqrt:[L,[L],function(i,t){var e=t[0];return Math.sqrt(e.evaluate(i))}],log10:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN10}],ln:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))}],log2:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN2}],sin:[L,[L],function(i,t){var e=t[0];return Math.sin(e.evaluate(i))}],cos:[L,[L],function(i,t){var e=t[0];return Math.cos(e.evaluate(i))}],tan:[L,[L],function(i,t){var e=t[0];return Math.tan(e.evaluate(i))}],asin:[L,[L],function(i,t){var e=t[0];return Math.asin(e.evaluate(i))}],acos:[L,[L],function(i,t){var e=t[0];return Math.acos(e.evaluate(i))}],atan:[L,[L],function(i,t){var e=t[0];return Math.atan(e.evaluate(i))}],min:[L,so(L),function(i,t){return Math.min.apply(Math,t.map(function(e){return e.evaluate(i)}))}],max:[L,so(L),function(i,t){return Math.max.apply(Math,t.map(function(e){return e.evaluate(i)}))}],abs:[L,[L],function(i,t){var e=t[0];return Math.abs(e.evaluate(i))}],round:[L,[L],function(i,t){var e=t[0],n=e.evaluate(i);return n<0?-Math.round(-n):Math.round(n)}],floor:[L,[L],function(i,t){var e=t[0];return Math.floor(e.evaluate(i))}],ceil:[L,[L],function(i,t){var e=t[0];return Math.ceil(e.evaluate(i))}],"filter-==":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1];return i.properties()[e.value]===n.value}],"filter-id-==":[lt,[ht],function(i,t){var e=t[0];return i.id()===e.value}],"filter-type-==":[lt,[mt],function(i,t){var e=t[0];return i.geometryType()===e.value}],"filter-<":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],o=i.properties()[e.value],r=n.value;return typeof o==typeof r&&o<r}],"filter-id-<":[lt,[ht],function(i,t){var e=t[0],n=i.id(),o=e.value;return typeof n==typeof o&&n<o}],"filter->":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],o=i.properties()[e.value],r=n.value;return typeof o==typeof r&&o>r}],"filter-id->":[lt,[ht],function(i,t){var e=t[0],n=i.id(),o=e.value;return typeof n==typeof o&&n>o}],"filter-<=":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],o=i.properties()[e.value],r=n.value;return typeof o==typeof r&&o<=r}],"filter-id-<=":[lt,[ht],function(i,t){var e=t[0],n=i.id(),o=e.value;return typeof n==typeof o&&n<=o}],"filter->=":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],o=i.properties()[e.value],r=n.value;return typeof o==typeof r&&o>=r}],"filter-id->=":[lt,[ht],function(i,t){var e=t[0],n=i.id(),o=e.value;return typeof n==typeof o&&n>=o}],"filter-has":[lt,[ht],function(i,t){var e=t[0];return e.value in i.properties()}],"filter-has-id":[lt,[],function(i){return i.id()!==null&&i.id()!==void 0}],"filter-type-in":[lt,[$e(mt)],function(i,t){var e=t[0];return e.value.indexOf(i.geometryType())>=0}],"filter-id-in":[lt,[$e(ht)],function(i,t){var e=t[0];return e.value.indexOf(i.id())>=0}],"filter-in-small":[lt,[mt,$e(ht)],function(i,t){var e=t[0],n=t[1];return n.value.indexOf(i.properties()[e.value])>=0}],"filter-in-large":[lt,[mt,$e(ht)],function(i,t){var e=t[0],n=t[1];return Yb(i.properties()[e.value],n.value,0,n.value.length-1)}],all:{type:lt,overloads:[[[lt,lt],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)&&n.evaluate(i)}],[so(lt),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var o=n[e];if(!o.evaluate(i))return!1}return!0}]]},any:{type:lt,overloads:[[[lt,lt],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)||n.evaluate(i)}],[so(lt),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var o=n[e];if(o.evaluate(i))return!0}return!1}]]},"!":[lt,[lt],function(i,t){var e=t[0];return!e.evaluate(i)}],"is-supported-script":[lt,[mt],function(i,t){var e=t[0],n=i.globals&&i.globals.isSupportedScript;return n?n(e.evaluate(i)):!0}],upcase:[mt,[mt],function(i,t){var e=t[0];return e.evaluate(i).toUpperCase()}],downcase:[mt,[mt],function(i,t){var e=t[0];return e.evaluate(i).toLowerCase()}],concat:[mt,so(ht),function(i,t){return t.map(function(e){return Kr(e.evaluate(i))}).join("")}],"resolved-locale":[mt,[za],function(i,t){var e=t[0];return e.evaluate(i).resolvedLocale()}]});function Tu(i){return{result:"success",value:i}}function qo(i){return{result:"error",value:i}}function Xb(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function Ub(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function Vb(i){return!!i.expression&&i.expression.interpolated}function Rf(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}var Iu=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new Pi,this._defaultValue=e?Kb(e):null,this._enumValues=e&&e.type==="enum"?e.values:null};Iu.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s,a,l){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=o||null,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)},Iu.prototype.evaluate=function(t,e,n,o,r,s,a,l){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=o||null,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=s||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null;try{var h=this.expression.evaluate(this._evaluator);if(h==null||typeof h=="number"&&h!==h)return this._defaultValue;if(this._enumValues&&!(h in this._enumValues))throw new re("Expected value to be one of "+Object.keys(this._enumValues).map(function(u){return JSON.stringify(u)}).join(", ")+", but found "+JSON.stringify(h)+" instead.");return h}catch(u){return this._warningHistory[u.message]||(this._warningHistory[u.message]=!0,typeof console<"u"&&console.warn(u.message)),this._defaultValue}};function qb(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Eu}function zu(i,t){var e=new vn(Eu,[],t?Hb(t):void 0),n=e.parse(i,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return n?Tu(new Iu(n,t)):qo(e.errors)}var Fa=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!_u(e.expression)};Fa.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,o,r,s)},Fa.prototype.evaluate=function(t,e,n,o,r,s){return this._styleExpression.evaluate(t,e,n,o,r,s)};var Jr=function(t,e,n,o){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!_u(e.expression),this.interpolationType=o};Jr.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,o,r,s)},Jr.prototype.evaluate=function(t,e,n,o,r,s){return this._styleExpression.evaluate(t,e,n,o,r,s)},Jr.prototype.interpolationFactor=function(t,e,n){return this.interpolationType?Ce.interpolationFactor(this.interpolationType,t,e,n):0};function $b(i,t){if(i=zu(i,t),i.result==="error")return i;var e=i.value.expression,n=Da(e);if(!n&&!Xb(t))return qo([new ci("","data expressions not supported")]);var o=yu(e,["zoom","pitch","distance-from-center"]);if(!o&&!Ub(t))return qo([new ci("","zoom expressions not supported")]);var r=Na(e);if(!r&&!o)return qo([new ci("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(r instanceof ci)return qo([r]);if(r instanceof Ce&&!Vb(t))return qo([new ci("",'"interpolate" expressions cannot be used with this property')]);if(!r)return Tu(n?new Fa("constant",i.value):new Fa("source",i.value));var s=r instanceof Ce?r.interpolation:void 0;return Tu(n?new Jr("camera",i.value,r.labels,s):new Jr("composite",i.value,r.labels,s))}function Na(i){var t=null;if(i instanceof yn)t=Na(i.result);else if(i instanceof Di)for(var e=0,n=i.args;e<n.length;e+=1){var o=n[e];if(t=Na(o),t)break}else(i instanceof _n||i instanceof Ce)&&i.input instanceof me&&i.input.name==="zoom"&&(t=i);return t instanceof ci||i.eachChild(function(r){var s=Na(r);s instanceof ci?t=s:!t&&s?t=new ci("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&s&&t!==s&&(t=new ci("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Hb(i){var t={color:Ai,string:mt,number:L,enum:mt,boolean:lt,formatted:Ra,resolvedImage:Vr};return i.type==="array"?$e(t[i.value]||ht,i.length):t[i.type]}function Kb(i){return i.type==="color"&&(Rf(i.default)||Array.isArray(i.default))?new zt(0,0,0,0):i.type==="color"?zt.parse(i.default)||null:i.default===void 0?null:i.default}function Jb(i){return i instanceof Number||i instanceof String||i instanceof Boolean?i.valueOf():i}function Ru(i){if(Array.isArray(i))return i.map(Ru);if(i instanceof Object&&!(i instanceof Number||i instanceof String||i instanceof Boolean)){var t={};for(var e in i)t[e]=Ru(i[e]);return t}return Jb(i)}var Af={$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"}},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:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-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:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},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"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function Pf(i){if(i===!0||i===!1)return!0;if(!Array.isArray(i)||i.length===0)return!1;switch(i[0]){case"has":return i.length>=2&&i[1]!=="$id"&&i[1]!=="$type";case"in":return i.length>=3&&(typeof i[1]!="string"||Array.isArray(i[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return i.length!==3||Array.isArray(i[1])||Array.isArray(i[2]);case"any":case"all":for(var t=0,e=i.slice(1);t<e.length;t+=1){var n=e[t];if(!Pf(n)&&typeof n!="boolean")return!1}return!0;default:return!0}}function Qb(i,t){if(t===void 0&&(t="fill"),i==null)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};Pf(i)||(i=Ga(i));var e=i,n=!0;try{n=tk(e)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
|
47
47
|
This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
|
48
48
|
and paste the contents of this message in the report.
|
49
49
|
Thank you!
|
50
50
|
Filter Expression:
|
51
51
|
`+JSON.stringify(e,null,2)+`
|
52
|
-
`)}var
|
53
|
-
`),
|
54
|
-
`),e+=n[
|
55
|
-
`)!==-1){for(var
|
56
|
-
`),
|
57
|
-
`)}var l=e+","+t+","+i+","+n,h=
|
58
|
-
`)}else h=i;h=Du(h,n),
|
52
|
+
`)}var o=Af["filter_"+t],r=zu(n,o),s=null;if(r.result==="error")throw new Error(r.value.map(function(d){return d.key+": "+d.message}).join(", "));s=function(d,c,g){return r.value.evaluate(d,c,{},g)};var a=null,l=null;if(n!==e){var h=zu(e,o);if(h.result==="error")throw new Error(h.value.map(function(d){return d.key+": "+d.message}).join(", "));a=function(d,c,g,f,m){return h.value.evaluate(d,c,{},g,void 0,void 0,f,m)},l=!Da(h.value.expression)}s=s;var u=Of(n);return{filter:s,dynamicFilter:a||void 0,needGeometry:u,needFeature:!!l}}function tk(i){if(!$o(i))return i;var t=Ru(i);return Lf(t),t=Df(t),t}function Df(i){if(!Array.isArray(i))return i;var t=nk(i);return t===!0?t:t.map(function(e){return Df(e)})}function Lf(i){var t=!1,e=[];if(i[0]==="case"){for(var n=1;n<i.length-1;n+=2)t=t||$o(i[n]),e.push(i[n+1]);e.push(i[i.length-1])}else if(i[0]==="match"){t=t||$o(i[1]);for(var o=2;o<i.length-1;o+=2)e.push(i[o+1]);e.push(i[i.length-1])}else if(i[0]==="step"){t=t||$o(i[1]);for(var r=1;r<i.length-1;r+=2)e.push(i[r+1])}t&&(i.length=0,i.push.apply(i,["any"].concat(e)));for(var s=1;s<i.length;s++)Lf(i[s])}function $o(i){if(!Array.isArray(i))return!1;if(ek(i[0]))return!0;for(var t=1;t<i.length;t++){var e=i[t];if($o(e))return!0}return!1}function ek(i){return i==="pitch"||i==="distance-from-center"}var ik=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function nk(i){if(ik.has(i[0]))for(var t=1;t<i.length;t++){var e=i[t];if($o(e))return!0}return i}function ok(i,t){return i<t?-1:i>t?1:0}function Of(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(var t=1;t<i.length;t++)if(Of(i[t]))return!0;return!1}function Ga(i){if(!i)return!0;var t=i[0];if(i.length<=1)return t!=="any";var e=t==="=="?Au(i[1],i[2],"=="):t==="!="?ja(Au(i[1],i[2],"==")):t==="<"||t===">"||t==="<="||t===">="?Au(i[1],i[2],t):t==="any"?rk(i.slice(1)):t==="all"?["all"].concat(i.slice(1).map(Ga)):t==="none"?["all"].concat(i.slice(1).map(Ga).map(ja)):t==="in"?Ff(i[1],i.slice(2)):t==="!in"?ja(Ff(i[1],i.slice(2))):t==="has"?Nf(i[1]):t==="!has"?ja(Nf(i[1])):t==="within"?i:!0;return e}function Au(i,t,e){switch(i){case"$type":return["filter-type-"+e,t];case"$id":return["filter-id-"+e,t];default:return["filter-"+e,i,t]}}function rk(i){return["any"].concat(i.map(Ga))}function Ff(i,t){if(t.length===0)return!1;switch(i){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(function(e){return typeof e!=typeof t[0]})?["filter-in-large",i,["literal",t.sort(ok)]]:["filter-in-small",i,["literal",t]]}}function Nf(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function ja(i){return["!",i]}var sk=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function ak(i,t){var e={};for(var n in i)n!=="ref"&&(e[n]=i[n]);return sk.forEach(function(o){o in t&&(e[o]=t[o])}),e}function lk(i){i=i.slice();for(var t=Object.create(null),e=0;e<i.length;e++)t[i[e].id]=i[e];for(var n=0;n<i.length;n++)"ref"in i[n]&&(i[n]=ak(i[n],t[i[n].ref]));return i}var Gf={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},Qr=" ",jf=/(italic|oblique)$/i,Bf={},Wf=function(i,t,e){var n=Bf[i];if(!n){Array.isArray(i)||(i=[i]);for(var o=400,r="normal",s=[],a,l,h=0,u=i.length;h<u;++h){var d=i[h],c=d.split(" "),g=c[c.length-1].toLowerCase();g=="normal"||g=="italic"||g=="oblique"?(r=l?r:g,c.pop(),g=c[c.length-1].toLowerCase()):jf.test(g)&&(g=g.replace(jf,""),r=l?r:c[c.length-1].replace(g,""));for(var f in Gf){var m=c.length>1?c[c.length-2].toLowerCase():"";if(g==f||g==f.replace("-","")||m+"-"+g==f){o=a?o:Gf[f],c.pop(),m&&f.startsWith(m)&&c.pop();break}}!a&&typeof g=="number"&&(o=g);var p=c.join(Qr).replace("Klokantech Noto Sans","Noto Sans");p.indexOf(Qr)!==-1&&(p='"'+p+'"'),s.push(p)}n=Bf[i]=[r,o,s]}return n[0]+Qr+n[1]+Qr+t+"px"+(e?"/"+e:"")+Qr+n[2]};function Pu(i){return i*Math.PI/180}var hk=function(){for(var i=[],t=78271.51696402048;i.length<=24;t/=2)i.push(t);return i}();function Zf(i,t){if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof OffscreenCanvas<"u")return new OffscreenCanvas(i,t);var e=document.createElement("canvas");return e.width=i,e.height=t,e}function uk(i,t){for(var e=0,n=t.length;e<n;++e){var o=t[e];if(o<i&&e+1<n){var r=t[e]/t[e+1];return e+Math.log(t[e]/i)/Math.log(r)}}return n-1}var dk=Array(256).join("\u200A");function Du(i,t){if(t>=.05){for(var e="",n=i.split(`
|
53
|
+
`),o=dk.slice(0,Math.round(t/.1)),r=0,s=n.length;r<s;++r)r>0&&(e+=`
|
54
|
+
`),e+=n[r].split("").join(o);return e}return i}var Lu;function Yf(){return Lu||(Lu=Zf(1,1).getContext("2d")),Lu}function ao(i,t){return Yf().measureText(i).width+(i.length-1)*t}var Xf={};function Ou(i,t,e,n){if(i.indexOf(`
|
55
|
+
`)!==-1){for(var o=i.split(`
|
56
|
+
`),r=[],s=0,a=o.length;s<a;++s)r.push(Ou(o[s],t,e,n));return r.join(`
|
57
|
+
`)}var l=e+","+t+","+i+","+n,h=Xf[l];if(!h){var u=i.split(" ");if(u.length>1){var d=Yf();d.font=t;for(var c=d.measureText("M").width,g=c*e,f="",m=[],p=0,_=u.length;p<_;++p){var v=u[p],y=f+(f?" ":"")+v;ao(y,n)<=g?f=y:(f&&m.push(f),f=v)}f&&m.push(f);for(var x=0,k=m.length;x<k&&k>1;++x){var w=m[x];if(ao(w,n)<g*.35){var E=x>0?ao(m[x-1],n):1/0,M=x<k-1?ao(m[x+1],n):1/0;m.splice(x,1),k-=1,E<M?(m[x-1]+=" "+w,x-=1):m[x]=w+" "+m[x]}}for(var S=0,z=m.length-1;S<z;++S){var P=m[S],G=m[S+1];if(ao(P,n)>g*.7&&ao(G,n)<g*.6){var A=P.split(" "),at=A.pop();ao(at,n)<g*.2&&(m[S]=A.join(" "),m[S+1]=at+" "+G),z-=1}}h=m.join(`
|
58
|
+
`)}else h=i;h=Du(h,n),Xf[l]=h}return h}var ck={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},gk={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]},fk=function(i,t){var e=$b(i,t);if(e.result==="error")throw new Error(e.value.map(function(n){return n.key+": "+n.message}).join(", "));return e.value},Fu={},Ba={zoom:0},Wa,Nu;function it(i,t,e,n,o,r,s){var a=i.id;r||(r={},console.warn("No functionCache provided to getValue()")),r[a]||(r[a]={});var l=r[a];if(!l[e]){var h=(i[t]||Fu)[e],u=Af[t+"_"+i.type][e];h===void 0&&(h=u.default);var d=qb(h);if(!d&&Rf(h)&&(h=Xx(h,u),d=!0),d){var c=fk(h,u);l[e]=c.evaluate.bind(c)}else u.type=="color"&&(h=zt.parse(h)),l[e]=function(){return h}}return Ba.zoom=n,l[e](Ba,o,s)}function mk(i,t,e,n){var o=it(i,"layout","icon-allow-overlap",t,e,n);if(!o)return"declutter";var r=it(i,"layout","icon-ignore-placement",t,e,n);return r?"none":"obstacle"}function pk(i,t,e,n,o){return o||console.warn("No filterCache provided to evaluateFilter()"),i in o||(o[i]=Qb(t).filter),Ba.zoom=n,o[i](Ba,e)}function lo(i,t){if(i){if(i.a===0||t===0)return;var e=i.a;return t=t===void 0?1:t,e===0?"transparent":"rgba("+Math.round(i.r*255/e)+","+Math.round(i.g*255/e)+","+Math.round(i.b*255/e)+","+e*t+")"}return i}var vk=/\{[^{}}]*\}/g;function Gu(i,t){return i.replace(vk,function(e){return t[e.slice(1,-1)]||""})}function _k(i,t,e,n,o,r,s){if(n===void 0&&(n=hk),o===void 0&&(o=void 0),r===void 0&&(r=void 0),s===void 0&&(s=void 0),typeof t=="string"&&(t=JSON.parse(t)),t.version!=8)throw new Error("glStyle version 8 required.");var a,l;if(r){if(typeof Image<"u"){var h=new Image;h.crossOrigin="anonymous",h.onload=function(){a=h,l=[h.width,h.height],i.changed(),h.onload=null},h.src=r}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){var u=self;u.postMessage({action:"loadImage",src:r}),u.addEventListener("message",function(Z){Z.data.action==="imageLoaded"&&Z.data.src===r&&(a=Z.data.image,l=[a.width,a.height])})}}for(var d=lk(t.layers),c={},g=[],f={},m={},p={},_={},v,y=0,x=d.length;y<x;++y){var k=d[y],w=k.id;if(typeof e=="string"&&k.source==e||e.indexOf(w)!==-1){var E=k["source-layer"];if(v){if(k.source!==v)throw new Error('Layer "'+w+'" does not use source "'+v)}else{v=k.source;var M=t.sources[v];if(!M)throw new Error('Source "'+v+'" is not defined');var S=M.type;if(S!=="vector"&&S!=="geojson")throw new Error('Source "'+v+'" is not of type "vector" or "geojson", but "'+S+'"')}var z=c[E];z||(z=[],c[E]=z),z.push({layer:k,index:y}),g.push(w)}}var P=new ke,G=new fe,A=[],at=function(B,Z){var F=B.getProperties(),V=c[F.layer];if(!!V){var D=n.indexOf(Z);D==-1&&(D=uk(Z,n));for(var H=ck[B.getGeometry().getType()],Y={properties:F,type:H},I=i.get("mapbox-featurestate")[B.getId()],rt=-1,b=0,T=V.length;b<T;++b){var q=V[b],C=q.layer,K=C.id,U=C.layout||Fu,_t=C.paint||Fu;if(!(U.visibility==="none"||"minzoom"in C&&D<C.minzoom||"maxzoom"in C&&D>=C.maxzoom)){var Et=C.filter;if(!Et||pk(K,Et,Y,D,_)){var yt=void 0,Ct=void 0,Lt=void 0,Dt=void 0,jt=void 0,O=void 0,ut=q.index;if(H==3&&(C.type=="fill"||C.type=="fill-extrusion"))if(Ct=it(C,"paint",C.type+"-opacity",D,Y,p,I),C.type+"-pattern"in _t){var pt=it(C,"paint",C.type+"-pattern",D,Y,p,I);if(pt){var kt=typeof pt=="string"?Gu(pt,F):pt.toString();if(a&&o&&o[kt]){++rt,O=A[rt],(!O||!O.getFill()||O.getStroke()||O.getText())&&(O=new le({fill:new fe}),A[rt]=O),Lt=O.getFill(),O.setZIndex(ut);var xt=kt+"."+Ct,st=m[xt];if(!st){var nt=o[kt],wt=Zf(nt.width,nt.height),It=wt.getContext("2d");It.globalAlpha=Ct,It.drawImage(a,nt.x,nt.y,nt.width,nt.height,0,0,nt.width,nt.height),st=It.createPattern(wt,"repeat"),m[xt]=st}Lt.setColor(st)}}}else yt=lo(it(C,"paint",C.type+"-color",D,Y,p,I),Ct),C.type+"-outline-color"in _t&&(jt=lo(it(C,"paint",C.type+"-outline-color",D,Y,p,I),Ct)),jt||(jt=yt),(yt||jt)&&(++rt,O=A[rt],(!O||yt&&!O.getFill()||!yt&&O.getFill()||jt&&!O.getStroke()||!jt&&O.getStroke()||O.getText())&&(O=new le({fill:yt?new fe:void 0,stroke:jt?new ke:void 0}),A[rt]=O),yt&&(Lt=O.getFill(),Lt.setColor(yt)),jt&&(Dt=O.getStroke(),Dt.setColor(jt),Dt.setWidth(.5)),O.setZIndex(ut));if(H!=1&&C.type=="line"){yt=!("line-pattern"in _t)&&"line-color"in _t?lo(it(C,"paint","line-color",D,Y,p,I),it(C,"paint","line-opacity",D,Y,p,I)):void 0;var Bt=it(C,"paint","line-width",D,Y,p,I);yt&&Bt>0&&(++rt,O=A[rt],(!O||!O.getStroke()||O.getFill()||O.getText())&&(O=new le({stroke:new ke}),A[rt]=O),Dt=O.getStroke(),Dt.setLineCap(it(C,"layout","line-cap",D,Y,p,I)),Dt.setLineJoin(it(C,"layout","line-join",D,Y,p,I)),Dt.setMiterLimit(it(C,"layout","line-miter-limit",D,Y,p,I)),Dt.setColor(yt),Dt.setWidth(Bt),Dt.setLineDash(_t["line-dasharray"]?it(C,"paint","line-dasharray",D,Y,p,I).map(function(Ne){return Ne*Bt}):null),O.setZIndex(ut))}var bt=!1,dt=null,Ot=0,St=void 0,ct=void 0,ue=void 0;if((H==1||H==2)&&"icon-image"in U){var Ze=it(C,"layout","icon-image",D,Y,p,I);if(Ze){St=typeof Ze=="string"?Gu(Ze,F):Ze.toString();var Ut=void 0;if(a&&o&&o[St]){var Ie=it(C,"layout","icon-rotation-alignment",D,Y,p,I);if(H==2){var Wt=B.getGeometry();if(Wt.getFlatMidpoint||Wt.getFlatMidpoints){var Kt=Wt.getExtent(),Tn=Math.sqrt(Math.max(Math.pow((Kt[2]-Kt[0])/Z,2),Math.pow((Kt[3]-Kt[1])/Z,2)));if(Tn>150){var ae=Wt.getType()==="MultiLineString"?Wt.getFlatMidpoints():Wt.getFlatMidpoint();Nu||(Wa=[NaN,NaN],Nu=new Xh("Point",Wa,[],{},null)),Ut=Nu,Wa[0]=ae[0],Wa[1]=ae[1];var Ye=it(C,"layout","symbol-placement",D,Y,p,I);if(Ye==="line"&&Ie==="map")for(var ve=Wt.getStride(),Fe=Wt.getFlatCoordinates(),Ni=0,sl=Fe.length-ve;Ni<sl;Ni+=ve){var de=Fe[Ni],bi=Fe[Ni+1],_e=Fe[Ni+ve],Xe=Fe[Ni+ve+1],ze=Math.min(de,_e),sr=Math.min(bi,Xe),ar=Math.max(de,_e),ye=Math.max(bi,Xe);if(ae[0]>=ze&&ae[0]<=ar&&ae[1]>=sr&&ae[1]<=ye){Ot=Math.atan2(bi-Xe,_e-de);break}}}}}if(H!==2||Ut){var Re=it(C,"layout","icon-size",D,Y,p,I),ee=_t["icon-color"]!==void 0?it(C,"paint","icon-color",D,Y,p,I):null;if(!ee||ee.a!==0){var ys=St+"."+Re;if(ee!==null&&(ys+="."+ee),ct=f[ys],!ct){var xs=o[St],yE=mk(C,D,Y,p),dd=void 0;"icon-offset"in U&&(dd=it(C,"layout","icon-offset",D,Y,p,I),dd[1]*=-1),ct=new ca({color:ee?[ee.r*255,ee.g*255,ee.b*255,ee.a]:void 0,img:a,imgSize:l,size:[xs.width,xs.height],offset:[xs.x,xs.y],rotateWithView:Ie==="map",scale:Re/xs.pixelRatio,displacement:dd,declutterMode:yE}),f[ys]=ct}}ct&&(++rt,O=A[rt],(!O||!O.getImage()||O.getFill()||O.getStroke())&&(O=new le,A[rt]=O),O.setGeometry(Ut),ct.setRotation(Ot+Pu(it(C,"layout","icon-rotate",D,Y,p,I))),ct.setOpacity(it(C,"paint","icon-opacity",D,Y,p,I)),ct.setAnchor(gk[it(C,"layout","icon-anchor",D,Y,p,I)]),O.setImage(ct),dt=O.getText(),O.setText(void 0),O.setZIndex(ut),bt=!0,ue=!1)}else ue=!0}}}if(H==1&&C.type==="circle"){++rt,O=A[rt],(!O||!O.getImage()||O.getFill()||O.getStroke())&&(O=new le,A[rt]=O);var _p="circle-radius"in _t?it(C,"paint","circle-radius",D,Y,p,I):5,cd=lo(it(C,"paint","circle-stroke-color",D,Y,p,I),it(C,"paint","circle-stroke-opacity",D,Y,p,I)),gd=lo(it(C,"paint","circle-color",D,Y,p,I),it(C,"paint","circle-opacity",D,Y,p,I)),fd=it(C,"paint","circle-stroke-width",D,Y,p,I),yp=_p+"."+cd+"."+gd+"."+fd;ct=f[yp],ct||(ct=new Kn({radius:_p,stroke:cd&&fd>0?new ke({width:fd,color:cd}):void 0,fill:gd?new fe({color:gd}):void 0,declutterMode:"none"}),f[yp]=ct),O.setImage(ct),dt=O.getText(),O.setText(void 0),O.setGeometry(void 0),O.setZIndex(ut),bt=!0}var ce=void 0,bs=void 0,ks=void 0,In=void 0,ws=void 0,md=void 0;if("text-field"in U){In=Math.round(it(C,"layout","text-size",D,Y,p,I));var pd=it(C,"layout","text-font",D,Y,p,I);ks=it(C,"layout","text-line-height",D,Y,p,I),bs=Wf(s?s(pd):pd,In,ks),bs.includes("sans-serif")||(bs+=",sans-serif"),ws=it(C,"layout","text-letter-spacing",D,Y,p,I),md=it(C,"layout","text-max-width",D,Y,p,I);var lr=it(C,"layout","text-field",D,Y,p,I);typeof lr=="object"&&lr.sections?lr.sections.length===1?ce=lr.toString():ce=lr.sections.reduce(function(Ne,zn,CE){var Sp=zn.fontStack?zn.fontStack.split(","):pd,kd=Wf(s?s(Sp):Sp,In*(zn.scale||1),ks),hr=zn.text;if(hr===`
|
59
59
|
`)return Ne.push(`
|
60
|
-
`,""),Ne;if(
|
61
|
-
`);for(var ll=0,
|
62
|
-
`,""),Ne.push(ao[ll],kd);return Ne},[]):ce=Gu(so,O).trim(),Mt=it(C,"paint","text-opacity",D,V,p,z)}if(ce&&Mt&&!ue){xt||(++ot,F=P[ot],(!F||!F.getText()||F.getFill()||F.getStroke())&&(F=new le,P[ot]=F),F.setImage(void 0),F.setGeometry(void 0)),F.getText()||F.setText(dt||new cf({padding:[2,2,2,2]})),dt=F.getText();var xp=$["text-transform"];xp=="uppercase"?ce=Array.isArray(ce)?ce.map(function(Ne,In){return In%2?Ne:Ne.toUpperCase()}):ce.toUpperCase():xp=="lowercase"&&(ce=Array.isArray(ce)?ce.map(function(Ne,In){return In%2?Ne:Ne.toLowerCase()}):ce.toLowerCase());var bp=Array.isArray(ce)?ce:Z==2?Du(ce,ws):Fu(ce,bs,md,ws);dt.setText(bp),dt.setFont(bs),dt.setRotation(Au(it(C,"layout","text-rotate",D,V,p,z)));var al=it(C,"layout","text-anchor",D,V,p,z),vd=xt||Z==1?"point":it(C,"layout","symbol-placement",D,V,p,z);dt.setPlacement(vd),dt.setOverflow(vd==="point");var dr=it(C,"paint","text-halo-width",D,V,p,z),kp=it(C,"layout","text-offset",D,V,p,z),wp=it(C,"paint","text-translate",D,V,p,z),_d=0,yd=0;if(vd=="point"){var xd="center";al.indexOf("left")!==-1?(xd="left",yd=dr):al.indexOf("right")!==-1&&(xd="right",yd=-dr),dt.setTextAlign(xd);var gC=it(C,"layout","text-rotation-alignment",D,V,p,z);dt.setRotateWithView(gC=="map")}else dt.setMaxAngle(Au(it(C,"layout","text-max-angle",D,V,p,z))*ce.length/bp.length),dt.setTextAlign(),dt.setRotateWithView(!1);var bd="middle";al.indexOf("bottom")==0?(bd="bottom",_d=-dr-.5*(ks-1)*zn):al.indexOf("top")==0&&(bd="top",_d=dr+.5*(ks-1)*zn),dt.setTextBaseline(bd);var Ep=it(C,"layout","text-justify",D,V,p,z);dt.setJustify(Ep==="auto"?void 0:Ep),dt.setOffsetX(kp[0]*zn+yd+wp[0]),dt.setOffsetY(kp[1]*zn+_d+wp[1]),G.setColor(lr(it(C,"paint","text-color",D,V,p,z),Mt)),dt.setFill(G);var Mp=lr(it(C,"paint","text-halo-color",D,V,p,z),Mt);if(Mp){A.setColor(Mp),dr*=2;var Cp=.5*zn;A.setWidth(dr<=Cp?dr:Cp),dt.setStroke(A)}else dt.setStroke(void 0);var Es=it(C,"layout","text-padding",D,V,p,z),Ms=dt.getPadding();Es!==Ms[0]&&(Ms[0]=Es,Ms[1]=Es,Ms[2]=Es,Ms[3]=Es),F.setZIndex(ut)}}}}if(ot>-1)return P.length=ot+1,P}};return i.setStyle(at),i.set("mapbox-source",v),i.set("mapbox-layers",f),i.set("mapbox-featurestate",{}),at}new Zn;class yk extends Nx{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:og({extent:Sa(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const $g=yk,Wg='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class xk extends $g{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Wg];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",r=t.url!==void 0?t.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:r,wrapX:t.wrapX,zDirection:t.zDirection})}}const bk=xk;function Yg(i,t=[]){return(...e)=>(n=>n.length>=i.length?i(...n):Yg(i,n))([...t,...e])}const kk=Array.isArray;function wk(i,t,e){if(!kk(e))throw new TypeError("reduce: list must be array or iterable");let n=0;const r=e.length;for(;n<r;)t=i(t,e[n],n,e),n++;return t}const Ek=Yg(wk);function Mk(i){return typeof i=="string"?i[i.length-1]||"":i[i.length-1]}function Kg(i,t){return arguments.length===1?e=>Kg(i,e):i*t}Ek(Kg,1);function Zg(i,t){if(arguments.length===1)return r=>Zg(i,r);if(i<1)throw new Error("First argument to splitEvery must be a positive integer");const e=[];let n=0;for(;n<t.length;)e.push(t.slice(n,n+=i));return e}const Va=new hn({features:[],wrapX:!1}),Ck=new Qn({source:Va,properties:{name:"pointsLayer"},style:new le({image:new Hn({radius:3,fill:new ge({color:"grey"})})})});function Sk(i,t){var n,r,o;const e=i&&((o=(r=(n=i.getSource())==null?void 0:n.getFeaturesInExtent(t))==null?void 0:r.filter(s=>{var a;return((a=s.getGeometry())==null?void 0:a.getType())!=="Point"}))==null?void 0:o.flatMap(s=>s.flatCoordinates_));if(e)return Zg(2,e).forEach((s,a)=>{Va.addFeature(new Ti({geometry:new ni(s),i:a}))})}const Hg={color:"#ff0000",width:3},Tk=new ke(Hg),zk=new ke({...Hg,lineDash:[2,8]}),Jg=new ge({color:"rgba(255, 0, 0, 0.1)"}),Qg=new ga({stroke:new ke({color:"red",width:2}),points:4,radius1:15,radius2:1}),tm=new Hn({radius:6,fill:new ge({color:"#ff0000"})}),Ik=new le({image:new ga({fill:new ge({color:"#fff"}),stroke:new ke({color:"#ff0000",width:2}),points:4,radius:5,angle:Math.PI/4}),geometry:function(i){const t=i.getGeometry();if(t instanceof Wn){const e=t.getCoordinates()[0];return new Po(e)}else return}}),Li=new hn,em=new Qn({source:Li,style:[new le({fill:Jg,stroke:Tk}),Ik]});function Rk(i){return new Qy({source:Li,type:"Polygon",style:new le({stroke:zk,fill:Jg,image:i==="crosshair"?Qg:tm})})}const im=new ox({source:Va,pixelTolerance:15});function Pk(i){return new nx({source:Li,style:new le({image:i==="crosshair"?Qg:tm})})}/**
|
60
|
+
`,""),Ne;if(H==2){Ne.push(Du(hr,ws),kd);return}hr=Ou(hr,kd,md,ws).split(`
|
61
|
+
`);for(var ll=0,bE=hr.length;ll<bE;++ll)ll>0&&Ne.push(`
|
62
|
+
`,""),Ne.push(hr[ll],kd);return Ne},[]):ce=Gu(lr,F).trim(),Ct=it(C,"paint","text-opacity",D,Y,p,I)}if(ce&&Ct&&!ue){bt||(++rt,O=A[rt],(!O||!O.getText()||O.getFill()||O.getStroke())&&(O=new le,A[rt]=O),O.setImage(void 0),O.setGeometry(void 0)),O.getText()||O.setText(dt||new dg({padding:[2,2,2,2]})),dt=O.getText();var xp=U["text-transform"];xp=="uppercase"?ce=Array.isArray(ce)?ce.map(function(Ne,zn){return zn%2?Ne:Ne.toUpperCase()}):ce.toUpperCase():xp=="lowercase"&&(ce=Array.isArray(ce)?ce.map(function(Ne,zn){return zn%2?Ne:Ne.toLowerCase()}):ce.toLowerCase());var bp=Array.isArray(ce)?ce:H==2?Du(ce,ws):Ou(ce,bs,md,ws);dt.setText(bp),dt.setFont(bs),dt.setRotation(Pu(it(C,"layout","text-rotate",D,Y,p,I)));var al=it(C,"layout","text-anchor",D,Y,p,I),vd=bt||H==1?"point":it(C,"layout","symbol-placement",D,Y,p,I);dt.setPlacement(vd),dt.setOverflow(vd==="point");var co=it(C,"paint","text-halo-width",D,Y,p,I),kp=it(C,"layout","text-offset",D,Y,p,I),wp=it(C,"paint","text-translate",D,Y,p,I),_d=0,yd=0;if(vd=="point"){var xd="center";al.indexOf("left")!==-1?(xd="left",yd=co):al.indexOf("right")!==-1&&(xd="right",yd=-co),dt.setTextAlign(xd);var xE=it(C,"layout","text-rotation-alignment",D,Y,p,I);dt.setRotateWithView(xE=="map")}else dt.setMaxAngle(Pu(it(C,"layout","text-max-angle",D,Y,p,I))*ce.length/bp.length),dt.setTextAlign(),dt.setRotateWithView(!1);var bd="middle";al.indexOf("bottom")==0?(bd="bottom",_d=-co-.5*(ks-1)*In):al.indexOf("top")==0&&(bd="top",_d=co+.5*(ks-1)*In),dt.setTextBaseline(bd);var Mp=it(C,"layout","text-justify",D,Y,p,I);dt.setJustify(Mp==="auto"?void 0:Mp),dt.setOffsetX(kp[0]*In+yd+wp[0]),dt.setOffsetY(kp[1]*In+_d+wp[1]),G.setColor(lo(it(C,"paint","text-color",D,Y,p,I),Ct)),dt.setFill(G);var Cp=lo(it(C,"paint","text-halo-color",D,Y,p,I),Ct);if(Cp){P.setColor(Cp),co*=2;var Ep=.5*In;P.setWidth(co<=Ep?co:Ep),dt.setStroke(P)}else dt.setStroke(void 0);var Ms=it(C,"layout","text-padding",D,Y,p,I),Cs=dt.getPadding();Ms!==Cs[0]&&(Cs[0]=Ms,Cs[1]=Ms,Cs[2]=Ms,Cs[3]=Ms),O.setZIndex(ut)}}}}if(rt>-1)return A.length=rt+1,A}};return i.setStyle(at),i.set("mapbox-source",v),i.set("mapbox-layers",g),i.set("mapbox-featurestate",{}),at}new Hn;class yk extends Nx{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:rf({extent:Sa(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const Uf=yk,Vf='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class xk extends Uf{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Vf];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",o=t.url!==void 0?t.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:o,wrapX:t.wrapX,zDirection:t.zDirection})}}const bk=xk;function qf(i,t=[]){return(...e)=>(n=>n.length>=i.length?i(...n):qf(i,n))([...t,...e])}const kk=Array.isArray;function wk(i,t,e){if(!kk(e))throw new TypeError("reduce: list must be array or iterable");let n=0;const o=e.length;for(;n<o;)t=i(t,e[n],n,e),n++;return t}const Mk=qf(wk);function Ck(i){return typeof i=="string"?i[i.length-1]||"":i[i.length-1]}function $f(i,t){return arguments.length===1?e=>$f(i,e):i*t}Mk($f,1);function Hf(i,t){if(arguments.length===1)return o=>Hf(i,o);if(i<1)throw new Error("First argument to splitEvery must be a positive integer");const e=[];let n=0;for(;n<t.length;)e.push(t.slice(n,n+=i));return e}const wE=Tp``,Ek="data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmNscy0xe2ZpbGw6bm9uZTt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPmVyYXNlPC90aXRsZT4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iNyIgeT0iMjciIHdpZHRoPSIyMyIgaGVpZ2h0PSIyIiAvPgogIDxwYXRoIGZpbGw9IndoaXRlIiBkPSJNMjcuMzgsMTAuNTEsMTkuNDUsMi41OWEyLDIsMCwwLDAtMi44MywwbC0xNCwxNGEyLDIsMCwwLDAsMCwyLjgzTDcuMTMsMjRoOS41OUwyNy4zOCwxMy4zNEEyLDIsMCwwLDAsMjcuMzgsMTAuNTFaTTE1Ljg5LDIySDhMNCwxOGw2LjMxLTYuMzEsNy45Myw3LjkyWm0zLjc2LTMuNzYtNy45Mi03LjkzTDE4LDQsMjYsMTEuOTNaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDApIi8+CiAgPHJlY3QgZmlsbD0id2hpdGUiIGlkPSJfVHJhbnNwYXJlbnRfUmVjdGFuZ2xlXyIgZGF0YS1uYW1lPSImbHQ7VHJhbnNwYXJlbnQgUmVjdGFuZ2xlJmd0OyIgY2xhc3M9ImNscy0xIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIC8+Cjwvc3ZnPg==",Sk="data:image/svg+xml;base64,77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICB3aWR0aD0iMTAwIgogICBoZWlnaHQ9IjEwMCIKICAgaWQ9InN2ZzQ0NjAiCiAgIHNvZGlwb2RpOmRvY25hbWU9Im5vcnRoLWFycm93LW4uc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjAgKDQwMzVhNGZiNDksIDIwMjAtMDUtMDEpIj4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgcGFnZWNvbG9yPSIjZmZmZmZmIgogICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgIGJvcmRlcm9wYWNpdHk9IjEiCiAgICAgb2JqZWN0dG9sZXJhbmNlPSIxMCIKICAgICBncmlkdG9sZXJhbmNlPSIxMCIKICAgICBndWlkZXRvbGVyYW5jZT0iMTAiCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAiCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE5MjAiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iMTAxNyIKICAgICBpZD0ibmFtZWR2aWV3MTEiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlua3NjYXBlOnpvb209IjIuODI4NDI3MSIKICAgICBpbmtzY2FwZTpjeD0iLTk3LjYyODQ3NSIKICAgICBpbmtzY2FwZTpjeT0iNjQuODk0MjI2IgogICAgIGlua3NjYXBlOndpbmRvdy14PSItOCIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTgiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmc0NDYwIgogICAgIGlua3NjYXBlOmRvY3VtZW50LXJvdGF0aW9uPSIwIiAvPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM0NDYyIiAvPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQ0NjUiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgICAgPGRjOnRpdGxlPjwvZGM6dGl0bGU+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxwYXRoCiAgICAgc29kaXBvZGk6bm9kZXR5cGVzPSJjY2NjY2NjY2NjY2NjY2NjY2N6Y2NjY2MiCiAgICAgZD0ibSA0Mi4wNjY0MDYsMCB2IDIwIGggMy43NTE5NTMgViA2Ljk1NzAzMTIgTCA1My44ODA4NTksMjAgaCA0LjA1MjczNSBWIDAgSCA1NC4xODE2NDEgViAxMy4zNTU0NjkgTCA0NS45OTYwOTQsMCBaIG0gNS41NzAzMTcsMjYuNjg3NTQxIC0yNS43NzE0ODksNjkuOTQ5MTc4IGMgLTAuODIyMDM0LDIuMjM4NzM0IDEuNjU4NjksNC4yNDc4MTEgMy42Nzc3MzUsMi45Nzg1MTUgTCA1MCw4NC4xOTUzMTIgNzQuNDU1MDc4LDk5LjYxNTIzNCBjIDIuMDE5NTI2LDEuMjcyOTg2IDQuNTA0MDY3LC0wLjczODExNiAzLjY3OTY4OCwtMi45Nzg1MTUgbCAtMjUuNzg5MDYzLC03MCBjIC0wLjQ3MzEyMywtMS4wOTU1OSAtMS4yODQwMDUsLTEuNjMxNDUgLTIuMzg0NzUyLC0xLjYzNDgxMyAtMS4xMDA3NDcsLTAuMDAzNCAtMi4wMTY5NzIsMC44NTYxIC0yLjMyNDIyOCwxLjY4NTYzNSB6IE0gNDcuNSw0MS41MTc1NzggdiAzOC4zNDM3NSBMIDI5LjA5OTYwOSw5MS40NjI4OTEgWiIKICAgICBzdHlsZT0iY29sb3I6IzAwMDAwMDtmb250LXN0eWxlOm5vcm1hbDtmb250LXZhcmlhbnQ6bm9ybWFsO2ZvbnQtd2VpZ2h0Om5vcm1hbDtmb250LXN0cmV0Y2g6bm9ybWFsO2ZvbnQtc2l6ZTptZWRpdW07bGluZS1oZWlnaHQ6bm9ybWFsO2ZvbnQtZmFtaWx5OnNhbnMtc2VyaWY7Zm9udC12YXJpYW50LWxpZ2F0dXJlczpub3JtYWw7Zm9udC12YXJpYW50LXBvc2l0aW9uOm5vcm1hbDtmb250LXZhcmlhbnQtY2Fwczpub3JtYWw7Zm9udC12YXJpYW50LW51bWVyaWM6bm9ybWFsO2ZvbnQtdmFyaWFudC1hbHRlcm5hdGVzOm5vcm1hbDtmb250LXZhcmlhbnQtZWFzdC1hc2lhbjpub3JtYWw7Zm9udC1mZWF0dXJlLXNldHRpbmdzOm5vcm1hbDtmb250LXZhcmlhdGlvbi1zZXR0aW5nczpub3JtYWw7dGV4dC1pbmRlbnQ6MDt0ZXh0LWFsaWduOnN0YXJ0O3RleHQtZGVjb3JhdGlvbjpub25lO3RleHQtZGVjb3JhdGlvbi1saW5lOm5vbmU7dGV4dC1kZWNvcmF0aW9uLXN0eWxlOnNvbGlkO3RleHQtZGVjb3JhdGlvbi1jb2xvcjojMDAwMDAwO2xldHRlci1zcGFjaW5nOm5vcm1hbDt3b3JkLXNwYWNpbmc6bm9ybWFsO3RleHQtdHJhbnNmb3JtOm5vbmU7d3JpdGluZy1tb2RlOmxyLXRiO2RpcmVjdGlvbjpsdHI7dGV4dC1vcmllbnRhdGlvbjptaXhlZDtkb21pbmFudC1iYXNlbGluZTphdXRvO2Jhc2VsaW5lLXNoaWZ0OmJhc2VsaW5lO3RleHQtYW5jaG9yOnN0YXJ0O3doaXRlLXNwYWNlOm5vcm1hbDtzaGFwZS1wYWRkaW5nOjA7c2hhcGUtbWFyZ2luOjA7aW5saW5lLXNpemU6MDtjbGlwLXJ1bGU6bm9uemVybztkaXNwbGF5OmlubGluZTtvdmVyZmxvdzp2aXNpYmxlO3Zpc2liaWxpdHk6dmlzaWJsZTtpc29sYXRpb246YXV0bzttaXgtYmxlbmQtbW9kZTpub3JtYWw7Y29sb3ItaW50ZXJwb2xhdGlvbjpzUkdCO2NvbG9yLWludGVycG9sYXRpb24tZmlsdGVyczpsaW5lYXJSR0I7c29saWQtY29sb3I6IzAwMDAwMDtzb2xpZC1vcGFjaXR5OjE7dmVjdG9yLWVmZmVjdDpub25lO2ZpbGw6cmdiKDAsIDAsIDApO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDo1O3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2UtZGFzaG9mZnNldDowO3N0cm9rZS1vcGFjaXR5OjE7Y29sb3ItcmVuZGVyaW5nOmF1dG87aW1hZ2UtcmVuZGVyaW5nOmF1dG87c2hhcGUtcmVuZGVyaW5nOmF1dG87dGV4dC1yZW5kZXJpbmc6YXV0bztlbmFibGUtYmFja2dyb3VuZDphY2N1bXVsYXRlO3N0b3AtY29sb3I6IzAwMDAwMCIKICAgICBpZD0icGF0aDkxMCIgLz4KICA8ZwogICAgIHN0eWxlPSJmb250LXN0eWxlOm5vcm1hbDtmb250LXdlaWdodDpub3JtYWw7Zm9udC1zaXplOjI3Ljk0cHg7bGluZS1oZWlnaHQ6MTAwJTtmb250LWZhbWlseTpzYW5zLXNlcmlmO3RleHQtYWxpZ246ZW5kO2xldHRlci1zcGFjaW5nOjBweDt3b3JkLXNwYWNpbmc6MHB4O3RleHQtYW5jaG9yOmVuZDtmaWxsOnJnYigwLCAwLCAwKTtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS4xMTc2cHg7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46bWl0ZXI7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICBpZD0idGV4dDkwMyIKICAgICBhcmlhLWxhYmVsPSJOIiAvPgo8L3N2Zz4K",Tk="data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmNscy0xe2ZpbGw6bm9uZTt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPnJlc2V0PC90aXRsZT4KICA8cGF0aCBmaWxsPSJ3aGl0ZSIgZD0iTTE4LDI4QTEyLDEyLDAsMSwwLDYsMTZ2Ni4yTDIuNCwxOC42LDEsMjBsNiw2LDYtNi0xLjQtMS40TDgsMjIuMlYxNkg4QTEwLDEwLDAsMSwxLDE4LDI2WiIvPgogIDxyZWN0IGZpbGw9IndoaXRlIiBpZD0iX1RyYW5zcGFyZW50X1JlY3RhbmdsZV8iIGRhdGEtbmFtZT0iJmx0O1RyYW5zcGFyZW50IFJlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtMSIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIi8+Cjwvc3ZnPgo=",Ik="data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmNscy0xe2ZpbGw6bm9uZTt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPnRyYXNoLWNhbjwvdGl0bGU+CiAgPHJlY3QgZmlsbD0id2hpdGUiIHg9IjEyIiB5PSIxMiIgd2lkdGg9IjIiIGhlaWdodD0iMTIiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iMTgiIHk9IjEyIiB3aWR0aD0iMiIgaGVpZ2h0PSIxMiIvPgogIDxwYXRoIGZpbGw9IndoaXRlIiBkPSJNNCw2VjhINlYyOGEyLDIsMCwwLDAsMiwySDI0YTIsMiwwLDAsMCwyLTJWOGgyVjZaTTgsMjhWOEgyNFYyOFoiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iMTIiIHk9IjIiIHdpZHRoPSI4IiBoZWlnaHQ9IjIiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgaWQ9Il9UcmFuc3BhcmVudF9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtUcmFuc3BhcmVudCBSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTEiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIvPgo8L3N2Zz4=";function zk(i){return new G_({units:"metric",bar:i,steps:4,text:!1,minWidth:140})}function Rk(){const i=document.createElement("img");i.src=Sk,i.title="North";const t=document.createElement("div");return t.className="north-arrow-control ol-unselectable ol-control",t.appendChild(i),new bo({element:t})}function Ak(i,t){const e=document.createElement("button");if(e.title="Reset map view",t==="unicode")e.innerHTML="\u21BB";else{const o={reset:Tk,trash:Ik,erase:Ek},r=document.createElement("img");r.className="reset-icon",r.src=o[t],e.appendChild(r)}e.addEventListener("click",i,!1);const n=document.createElement("div");return n.className="reset-control ol-unselectable ol-control",n.appendChild(e),new bo({element:n})}const Za=new hn({features:[],wrapX:!1}),Pk=new Qn({source:Za,properties:{name:"pointsLayer"},style:new le({image:new Kn({radius:3,fill:new fe({color:"grey"})})})});function Dk(i,t){var n,o,r;const e=i&&((r=(o=(n=i.getSource())==null?void 0:n.getFeaturesInExtent(t))==null?void 0:o.filter(s=>{var a;return((a=s.getGeometry())==null?void 0:a.getType())!=="Point"}))==null?void 0:r.flatMap(s=>s.flatCoordinates_));if(e)return Hf(2,e).forEach((s,a)=>{Za.addFeature(new Ti({geometry:new ni(s),i:a}))})}const Kf={color:"#ff0000",width:3},Lk=new ke(Kf),Ok=new ke({...Kf,lineDash:[2,8]}),Jf=new fe({color:"rgba(255, 0, 0, 0.1)"}),Qf=new ga({stroke:new ke({color:"red",width:2}),points:4,radius1:15,radius2:1}),tm=new Kn({radius:6,fill:new fe({color:"#ff0000"})}),Fk=new le({image:new ga({fill:new fe({color:"#fff"}),stroke:new ke({color:"#ff0000",width:2}),points:4,radius:5,angle:Math.PI/4}),geometry:function(i){const t=i.getGeometry();if(t instanceof Vn){const e=t.getCoordinates()[0];return new Ar(e)}else return}}),Li=new hn,em=new Qn({source:Li,style:[new le({fill:Jf,stroke:Lk}),Fk]});function Nk(i){return new Qy({source:Li,type:"Polygon",style:new le({stroke:Ok,fill:Jf,image:i==="crosshair"?Qf:tm})})}const im=new rx({source:Za,pixelTolerance:15});function Gk(i){return new nx({source:Li,style:new le({image:i==="crosshair"?Qf:tm})})}const jk="data:image/svg+xml;base64,77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICB3aWR0aD0iMTAwIgogICBoZWlnaHQ9IjEwMCIKICAgaWQ9InN2ZzQ0NjAiCiAgIHNvZGlwb2RpOmRvY25hbWU9InVFQTE3LXBvaS1hbHQuc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjAgKDQwMzVhNGZiNDksIDIwMjAtMDUtMDEpIj4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgcGFnZWNvbG9yPSIjZmZmZmZmIgogICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgIGJvcmRlcm9wYWNpdHk9IjEiCiAgICAgb2JqZWN0dG9sZXJhbmNlPSIxMCIKICAgICBncmlkdG9sZXJhbmNlPSIxMCIKICAgICBndWlkZXRvbGVyYW5jZT0iMTAiCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAiCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE5MjAiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iMTAxNyIKICAgICBpZD0ibmFtZWR2aWV3MTEiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlua3NjYXBlOnpvb209IjIuODU2NzExNCIKICAgICBpbmtzY2FwZTpjeD0iLTMxLjM3NjY1NyIKICAgICBpbmtzY2FwZTpjeT0iNTkuNTAwMTg0IgogICAgIGlua3NjYXBlOndpbmRvdy14PSItOCIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTgiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmc0NDYwIgogICAgIGlua3NjYXBlOmRvY3VtZW50LXJvdGF0aW9uPSIwIiAvPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM0NDYyIiAvPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQ0NjUiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgICAgPGRjOnRpdGxlIC8+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxwYXRoCiAgICAgZD0ibSA0Ny43ODE2MTQsNTUuMzU5OTU4IGMgNS41MTMyOSwwLjYzNDc4IDEwLjY4NzA5LC0xLjA0ODYzNCAxNC42Mzg1MjIsLTQuNzYzMDQ1IDQuMDEyMzI3LC0zLjc3MTIxNyA1LjgxNzEzMSwtNy45MTQzODggNS44MTcxMzEsLTEzLjM1NDE1OCAwLC01LjUwNzMzNyAtMS44MjMwNTIsLTkuNjMyODM1IC01Ljk1NTI1OSwtMTMuNDc4MTA4IC0xLjgyNjIzNiwtMS42OTkwMzkgLTQuMjI3MDUzLC0zLjA5NDUzNSAtNi44NDQyOTcsLTMuOTc3OTU0IC0yLjE0MDA0OCwtMC43MjI0OTUgLTYuODgyNywtMC45MDI0MDYgLTkuNDI2OTUyLC0wLjM1NzcyNiAtMi44MzI2MDQsMC42MDYyMzggLTYuMjAzMDg3LDIuMzY0OTE2IC04LjMzNTI5Miw0LjM0ODkxNCAtMy45OTAwNDgsMy43MTI0ODcgLTUuOTAxNzkxLDguMDc1MDE3IC01LjkwMTc5MSwxMy40NjUwNjQgMCwzLjIzMTM2IDAuNDcyMSw1LjI1NTEyNSAxLjkxNTU2Miw4LjIwNjI2IDEuMDUwMDgsMi4xNDY2OCAxLjQ0Mzg4NiwyLjY4MjA5NSAzLjQwNTkxNiw0LjYzMzEzNSAxLjcwODA1LDEuNjk4NTc0IDIuNjQ1MDQ0LDIuNDI1MDQxIDQuMDc0MjkxLDMuMTU4MzQgMi4zNTQ1NjMsMS4yMDgxMDIgNC40MDUwNzEsMS44NjUyNyA2LjYxMjE2OSwyLjExOTQ2OCB6IG0gMS4wMzYwNzYsNDQuMjEzNTUgYyAtMC4zODc4NjUsLTAuMjM1NDQgLTIuMTI2MjU2LC0xLjkyNTMxIC0zLjg2NDQzNywtMy43NTU1MyBDIDMxLjYzOTM2Niw4MS43OTg1NTggMjIuMzQ1MjM3LDY4LjE2MTE3MyAxNy4zMDAyMzEsNTUuMjQxMTQ3IDE1Ljc4MjI5NCw1MS4zNTQxNDEgMTUuMjE5ODAzLDQ5LjM5MTE1NiAxNC42MjU0ODYsNDUuOTExMjg0IDEyLjgwMjQzNiwzNS4yNDAxMyAxNC45ODU3NjksMjQuODE3MzIxIDIwLjg5Njg5NiwxNS45NTExNjUgMjMuMTQ3MjgsMTIuNTc2MzAyIDI3LjcxMjU0OCw4LjAwMDcxMzQgMzAuOTcxNjM0LDUuODUzNDQyNCBjIDExLjg5MTY0NCwtNy44MzUyNTcgMjYuMjIwMTcxLC03LjgwMjY1NyAzOC4xNjY1NSwwLjA4Njg4IDMuMTAwMzc3LDIuMDQ3MzU2IDcuNzEwODQsNi43MDE4NDI2IDkuOTA1NjMxLDkuOTk5Nzk0NiA0LjAxODQ4MSw2LjAzODg2NSA2LjE2MDAxNCwxMi4yMzcyNTkgNi44MTA1NywxOS43MTQ0NzIgMC41MzEwNyw2LjEwMjYyMyAtMC4zODMyMDgsMTIuMDYwMTU5IC0yLjg2Mjc0NSwxOC42OTQyMDQgLTQuODI1NjE1LDEyLjkwMjU2NiAtMTMuNTk3NTY3LDI1Ljc4MDgxNSAtMjguNzA1NDMyLDQyLjE0NDE0NSAtMy4zNzI4MTUsMy42NTI5OTIgLTMuOTcxMTYyLDMuOTkwMzYyIC01LjQ2ODUxOCwzLjA4MDYyIHoiCiAgICAgc3R5bGU9ImZpbGw6cmdiKDAsIDAsIDApO3N0cm9rZS13aWR0aDo0LjU1MzciCiAgICAgaWQ9InBhdGg0MTM1IgogICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiIC8+Cjwvc3ZnPgo=";/**
|
63
63
|
* splaytree v3.1.0
|
64
64
|
* Fast Splay tree for Node and browser
|
65
65
|
*
|
66
66
|
* @author Alexander Milevski <info@w8r.name>
|
67
67
|
* @license MIT
|
68
68
|
* @preserve
|
69
|
-
*/var kn=function(){function i(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return i}();function
|
70
|
-
`);var o=t+(e?" ":"\u2502 ");i.left&&Bu(i.left,o,!1,n,r),i.right&&Bu(i.right,o,!0,n,r)}}var Uu=function(){function i(t){t===void 0&&(t=Ak),this._root=null,this._size=0,this._comparator=t}return i.prototype.insert=function(t,e){return this._size++,this._root=ju(t,e,this._root,this._comparator)},i.prototype.add=function(t,e){var n=new kn(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,o=wn(t,this._root,r),s=r(t,o.key);return s===0?this._root=o:(s<0?(n.left=o.left,n.right=o,o.left=null):s>0&&(n.right=o.right,n.left=o,o.right=null),this._size++,this._root=n),this._root},i.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},i.prototype._remove=function(t,e,n){var r;if(e===null)return null;e=wn(t,e,n);var o=n(t,e.key);return o===0?(e.left===null?r=e.right:(r=wn(t,e.left,n),r.right=e.right),this._size--,r):e},i.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=wn(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},i.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(r===0)return e;r<0?e=e.left:e=e.right}return null},i.prototype.find=function(t){return this._root&&(this._root=wn(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},i.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(r===0)return!0;r<0?e=e.left:e=e.right}return!1},i.prototype.forEach=function(t,e){for(var n=this._root,r=[],o=!1;!o;)n!==null?(r.push(n),n=n.left):r.length!==0?(n=r.pop(),t.call(e,n),n=n.right):o=!0;return this},i.prototype.range=function(t,e,n,r){for(var o=[],s=this._comparator,a=this._root,l;o.length!==0||a;)if(a)o.push(a),a=a.left;else{if(a=o.pop(),l=s(a.key,e),l>0)break;if(s(a.key,t)>=0&&n.call(r,a))return this;a=a.right}return this},i.prototype.keys=function(){var t=[];return this.forEach(function(e){var n=e.key;return t.push(n)}),t},i.prototype.values=function(){var t=[];return this.forEach(function(e){var n=e.data;return t.push(n)}),t},i.prototype.min=function(){return this._root?this.minNode(this._root).key:null},i.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},i.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},i.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},i.prototype.at=function(t){for(var e=this._root,n=!1,r=0,o=[];!n;)if(e)o.push(e),e=e.left;else if(o.length>0){if(e=o.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},i.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var o=r(t.key,e.key);if(o===0)break;o<0?(n=e,e=e.left):e=e.right}return n},i.prototype.prev=function(t){var e=this._root,n=null;if(t.left!==null){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var o=r(t.key,e.key);if(o===0)break;o<0?e=e.left:(n=e,e=e.right)}return n},i.prototype.clear=function(){return this._root=null,this._size=0,this},i.prototype.toList=function(){return Fk(this._root)},i.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var r=t.length,o=this._comparator;if(n&&Xu(t,e,0,r-1,o),this._root===null)this._root=Vu(t,e,0,r),this._size=r;else{var s=Ok(this.toList(),Lk(t,e),o);r=this._size+r,this._root=qu({head:s},0,r)}return this},i.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(i.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),i.prototype.toString=function(t){t===void 0&&(t=function(n){return String(n.key)});var e=[];return Bu(this._root,"",!0,function(n){return e.push(n)},t),e.join("")},i.prototype.update=function(t,e,n){var r=this._comparator,o=nm(t,this._root,r),s=o.left,a=o.right;r(t,e)<0?a=ju(e,n,a,r):s=ju(e,n,s,r),this._root=Dk(s,a,r)},i.prototype.split=function(t){return nm(t,this._root,this._comparator)},i}();function Vu(i,t,e,n){var r=n-e;if(r>0){var o=e+Math.floor(r/2),s=i[o],a=t[o],l=new kn(s,a);return l.left=Vu(i,t,e,o),l.right=Vu(i,t,o+1,n),l}return null}function Lk(i,t){for(var e=new kn(null,null),n=e,r=0;r<i.length;r++)n=n.next=new kn(i[r],t[r]);return n.next=null,e.next}function Fk(i){for(var t=i,e=[],n=!1,r=new kn(null,null),o=r;!n;)t?(e.push(t),t=t.left):e.length>0?(t=o=o.next=e.pop(),t=t.right):n=!0;return o.next=null,r.next}function qu(i,t,e){var n=e-t;if(n>0){var r=t+Math.floor(n/2),o=qu(i,t,r),s=i.head;return s.left=o,i.head=i.head.next,s.right=qu(i,r+1,e),s}return null}function Ok(i,t,e){for(var n=new kn(null,null),r=n,o=i,s=t;o!==null&&s!==null;)e(o.key,s.key)<0?(r.next=o,o=o.next):(r.next=s,s=s.next),r=r.next;return o!==null?r.next=o:s!==null&&(r.next=s),n.next}function Xu(i,t,e,n,r){if(!(e>=n)){for(var o=i[e+n>>1],s=e-1,a=n+1;;){do s++;while(r(i[s],o)<0);do a--;while(r(i[a],o)>0);if(s>=a)break;var l=i[s];i[s]=i[a],i[a]=l,l=t[s],t[s]=t[a],t[a]=l}Xu(i,t,e,a,r),Xu(i,t,a+1,n,r)}}function He(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function rm(i,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function Ce(i,t,e){return t&&rm(i.prototype,t),e&&rm(i,e),i}var ts=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},$u=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,r=t.ur.x<e.ur.x?t.ur.x:e.ur.x,o=t.ll.y<e.ll.y?e.ll.y:t.ll.y,s=t.ur.y<e.ur.y?t.ur.y:e.ur.y;return{ll:{x:n,y:o},ur:{x:r,y:s}}},En=Number.EPSILON;En===void 0&&(En=Math.pow(2,-52));var Nk=En*En,Wu=function(t,e){if(-En<t&&t<En&&-En<e&&e<En)return 0;var n=t-e;return n*n<Nk*t*e?0:t<e?-1:1},Gk=function(){function i(){He(this,i),this.reset()}return Ce(i,[{key:"reset",value:function(){this.xRounder=new om,this.yRounder=new om}},{key:"round",value:function(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]),i}(),om=function(){function i(){He(this,i),this.tree=new Uu,this.round(0)}return Ce(i,[{key:"round",value:function(e){var n=this.tree.add(e),r=this.tree.prev(n);if(r!==null&&Wu(n.key,r.key)===0)return this.tree.remove(e),r.key;var o=this.tree.next(n);return o!==null&&Wu(n.key,o.key)===0?(this.tree.remove(e),o.key):e}}]),i}(),es=new Gk,is=function(t,e){return t.x*e.y-t.y*e.x},sm=function(t,e){return t.x*e.x+t.y*e.y},am=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y},s=is(r,o);return Wu(s,0)},qa=function(t){return Math.sqrt(sm(t,t))},jk=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y};return is(o,r)/qa(o)/qa(r)},Bk=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y};return sm(o,r)/qa(o)/qa(r)},lm=function(t,e,n){return e.y===0?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},hm=function(t,e,n){return e.x===0?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},Uk=function(t,e,n,r){if(e.x===0)return hm(n,r,t.x);if(r.x===0)return hm(t,e,n.x);if(e.y===0)return lm(n,r,t.y);if(r.y===0)return lm(t,e,n.y);var o=is(e,r);if(o==0)return null;var s={x:n.x-t.x,y:n.y-t.y},a=is(s,e)/o,l=is(s,r)/o,h=t.x+l*e.x,u=n.x+a*r.x,d=t.y+l*e.y,c=n.y+a*r.y,f=(h+u)/2,g=(d+c)/2;return{x:f,y:g}},mi=function(){Ce(i,null,[{key:"compare",value:function(e,n){var r=i.comparePoints(e.point,n.point);return r!==0?r:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:Xa.compare(e.segment,n.segment))}},{key:"comparePoints",value:function(e,n){return e.x<n.x?-1:e.x>n.x?1:e.y<n.y?-1:e.y>n.y?1:0}}]);function i(t,e){He(this,i),t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}return Ce(i,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var n=e.point.events,r=0,o=n.length;r<o;r++){var s=n[r];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var e=this.point.events.length,n=0;n<e;n++){var r=this.point.events[n];if(r.segment.consumedBy===void 0)for(var o=n+1;o<e;o++){var s=this.point.events[o];s.consumedBy===void 0&&r.otherSE.point.events===s.otherSE.point.events&&r.segment.consume(s.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var e=[],n=0,r=this.point.events.length;n<r;n++){var o=this.point.events[n];o!==this&&!o.segment.ringOut&&o.segment.isInResult()&&e.push(o)}return e}},{key:"getLeftmostComparator",value:function(e){var n=this,r=new Map,o=function(a){var l=a.otherSE;r.set(a,{sine:jk(n.point,e.point,l.point),cosine:Bk(n.point,e.point,l.point)})};return function(s,a){r.has(s)||o(s),r.has(a)||o(a);var l=r.get(s),h=l.sine,u=l.cosine,d=r.get(a),c=d.sine,f=d.cosine;return h>=0&&c>=0?u<f?1:u>f?-1:0:h<0&&c<0?u<f?-1:u>f?1:0:c<h?-1:c>h?1:0}}}]),i}(),Vk=0,Xa=function(){Ce(i,null,[{key:"compare",value:function(e,n){var r=e.leftSE.point.x,o=n.leftSE.point.x,s=e.rightSE.point.x,a=n.rightSE.point.x;if(a<r)return 1;if(s<o)return-1;var l=e.leftSE.point.y,h=n.leftSE.point.y,u=e.rightSE.point.y,d=n.rightSE.point.y;if(r<o){if(h<l&&h<u)return 1;if(h>l&&h>u)return-1;var c=e.comparePoint(n.leftSE.point);if(c<0)return 1;if(c>0)return-1;var f=n.comparePoint(e.rightSE.point);return f!==0?f:-1}if(r>o){if(l<h&&l<d)return-1;if(l>h&&l>d)return 1;var g=n.comparePoint(e.leftSE.point);if(g!==0)return g;var m=e.comparePoint(n.rightSE.point);return m<0?1:m>0?-1:1}if(l<h)return-1;if(l>h)return 1;if(s<a){var p=n.comparePoint(e.rightSE.point);if(p!==0)return p}if(s>a){var _=e.comparePoint(n.rightSE.point);if(_<0)return 1;if(_>0)return-1}if(s!==a){var v=u-l,y=s-r,x=d-h,k=a-o;if(v>y&&x<k)return 1;if(v<y&&x>k)return-1}return s>a?1:s<a||u<d?-1:u>d?1:e.id<n.id?-1:e.id>n.id?1:0}}]);function i(t,e,n,r){He(this,i),this.id=++Vk,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=r}return Ce(i,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<n?e:n},ur:{x:this.rightSE.point.x,y:e>n?e:n}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point,r=this.rightSE.point,o=this.vector();if(n.x===r.x)return e.x===n.x?0:e.x<n.x?1:-1;var s=(e.y-n.y)/o.y,a=n.x+s*o.x;if(e.x===a)return 0;var l=(e.x-n.x)/o.x,h=n.y+l*o.y;return e.y===h?0:e.y<h?-1:1}},{key:"getIntersection",value:function(e){var n=this.bbox(),r=e.bbox(),o=$u(n,r);if(o===null)return null;var s=this.leftSE.point,a=this.rightSE.point,l=e.leftSE.point,h=e.rightSE.point,u=ts(n,l)&&this.comparePoint(l)===0,d=ts(r,s)&&e.comparePoint(s)===0,c=ts(n,h)&&this.comparePoint(h)===0,f=ts(r,a)&&e.comparePoint(a)===0;if(d&&u)return f&&!c?a:!f&&c?h:null;if(d)return c&&s.x===h.x&&s.y===h.y?null:s;if(u)return f&&a.x===l.x&&a.y===l.y?null:l;if(f&&c)return null;if(f)return a;if(c)return h;var g=Uk(s,this.vector(),l,e.vector());return g===null||!ts(o,g)?null:es.round(g.x,g.y)}},{key:"split",value:function(e){var n=[],r=e.events!==void 0,o=new mi(e,!0),s=new mi(e,!1),a=this.rightSE;this.replaceRightSE(s),n.push(s),n.push(o);var l=new i(o,a,this.rings.slice(),this.windings.slice());return mi.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),mi.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(o.checkForConsuming(),s.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var n=0,r=this.windings.length;n<r;n++)this.windings[n]*=-1}},{key:"consume",value:function(e){for(var n=this,r=e;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;var o=i.compare(n,r);if(o!==0){if(o>0){var s=n;n=r,r=s}if(n.prev===r){var a=n;n=r,r=a}for(var l=0,h=r.rings.length;l<h;l++){var u=r.rings[l],d=r.windings[l],c=n.rings.indexOf(u);c===-1?(n.rings.push(u),n.windings.push(d)):n.windings[c]+=d}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}},{key:"afterState",value:function(){if(this._afterState!==void 0)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};for(var n=this._afterState.rings,r=this._afterState.windings,o=this._afterState.multiPolys,s=0,a=this.rings.length;s<a;s++){var l=this.rings[s],h=this.windings[s],u=n.indexOf(l);u===-1?(n.push(l),r.push(h)):r[u]+=h}for(var d=[],c=[],f=0,g=n.length;f<g;f++)if(r[f]!==0){var m=n[f],p=m.poly;if(c.indexOf(p)===-1)if(m.isExterior)d.push(p);else{c.indexOf(p)===-1&&c.push(p);var _=d.indexOf(m.poly);_!==-1&&d.splice(_,1)}}for(var v=0,y=d.length;v<y;v++){var x=d[v].multiPoly;o.indexOf(x)===-1&&o.push(x)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;var e=this.beforeState().multiPolys,n=this.afterState().multiPolys;switch(oi.type){case"union":{var r=e.length===0,o=n.length===0;this._isInResult=r!==o;break}case"intersection":{var s,a;e.length<n.length?(s=e.length,a=n.length):(s=n.length,a=e.length),this._isInResult=a===oi.numMultiPolys&&s<a;break}case"xor":{var l=Math.abs(e.length-n.length);this._isInResult=l%2===1;break}case"difference":{var h=function(d){return d.length===1&&d[0].isSubject};this._isInResult=h(e)!==h(n);break}default:throw new Error("Unrecognized operation type found ".concat(oi.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,n,r){var o,s,a,l=mi.comparePoints(e,n);if(l<0)o=e,s=n,a=1;else if(l>0)o=n,s=e,a=-1;else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var h=new mi(o,!0),u=new mi(s,!1);return new i(h,u,[r],[a])}}]),i}(),um=function(){function i(t,e,n){if(He(this,i),!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var r=es.round(t[0][0],t[0][1]);this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};for(var o=r,s=1,a=t.length;s<a;s++){if(typeof t[s][0]!="number"||typeof t[s][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=es.round(t[s][0],t[s][1]);l.x===o.x&&l.y===o.y||(this.segments.push(Xa.fromRing(o,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),o=l)}(r.x!==o.x||r.y!==o.y)&&this.segments.push(Xa.fromRing(o,r,this))}return Ce(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.segments.length;n<r;n++){var o=this.segments[n];e.push(o.leftSE),e.push(o.rightSE)}return e}}]),i}(),qk=function(){function i(t,e){if(He(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new um(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var n=1,r=t.length;n<r;n++){var o=new um(t[n],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=e}return Ce(i,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,r=this.interiorRings.length;n<r;n++)for(var o=this.interiorRings[n].getSweepEvents(),s=0,a=o.length;s<a;s++)e.push(o[s]);return e}}]),i}(),dm=function(){function i(t,e){if(He(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,r=t.length;n<r;n++){var o=new qk(t[n],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=e}return Ce(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.polys.length;n<r;n++)for(var o=this.polys[n].getSweepEvents(),s=0,a=o.length;s<a;s++)e.push(o[s]);return e}}]),i}(),Xk=function(){Ce(i,null,[{key:"factory",value:function(e){for(var n=[],r=0,o=e.length;r<o;r++){var s=e[r];if(!(!s.isInResult()||s.ringOut)){for(var a=null,l=s.leftSE,h=s.rightSE,u=[l],d=l.point,c=[];a=l,l=h,u.push(l),l.point!==d;)for(;;){var f=l.getAvailableLinkedEvents();if(f.length===0){var g=u[0].point,m=u[u.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(g.x,",")+" ".concat(g.y,"]. Last matching segment found ends at")+" [".concat(m.x,", ").concat(m.y,"]."))}if(f.length===1){h=f[0].otherSE;break}for(var p=null,_=0,v=c.length;_<v;_++)if(c[_].point===l.point){p=_;break}if(p!==null){var y=c.splice(p)[0],x=u.splice(y.index);x.unshift(x[0].otherSE),n.push(new i(x.reverse()));continue}c.push({index:u.length,point:l.point});var k=l.getLeftmostComparator(a);h=f.sort(k)[0].otherSE;break}n.push(new i(u))}}return n}}]);function i(t){He(this,i),this.events=t;for(var e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}return Ce(i,[{key:"getGeom",value:function(){for(var e=this.events[0].point,n=[e],r=1,o=this.events.length-1;r<o;r++){var s=this.events[r].point,a=this.events[r+1].point;am(s,e,a)!==0&&(n.push(s),e=s)}if(n.length===1)return null;var l=n[0],h=n[1];am(l,e,h)===0&&n.shift(),n.push(n[0]);for(var u=this.isExteriorRing()?1:-1,d=this.isExteriorRing()?0:n.length-1,c=this.isExteriorRing()?n.length:-1,f=[],g=d;g!=c;g+=u)f.push([n[g].x,n[g].y]);return f}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===void 0){var e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var e=this.events[0],n=1,r=this.events.length;n<r;n++){var o=this.events[n];mi.compare(e,o)>0&&(e=o)}for(var s=e.segment.prevInResult(),a=s?s.prevInResult():null;;){if(!s)return null;if(!a)return s.ringOut;if(a.ringOut!==s.ringOut)return a.ringOut.enclosingRing()!==s.ringOut?s.ringOut:s.ringOut.enclosingRing();s=a.prevInResult(),a=s?s.prevInResult():null}}}]),i}(),cm=function(){function i(t){He(this,i),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}return Ce(i,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,r=this.interiorRings.length;n<r;n++){var o=this.interiorRings[n].getGeom();o!==null&&e.push(o)}return e}}]),i}(),$k=function(){function i(t){He(this,i),this.rings=t,this.polys=this._composePolys(t)}return Ce(i,[{key:"getGeom",value:function(){for(var e=[],n=0,r=this.polys.length;n<r;n++){var o=this.polys[n].getGeom();o!==null&&e.push(o)}return e}},{key:"_composePolys",value:function(e){for(var n=[],r=0,o=e.length;r<o;r++){var s=e[r];if(!s.poly)if(s.isExteriorRing())n.push(new cm(s));else{var a=s.enclosingRing();a.poly||n.push(new cm(a)),a.poly.addInterior(s)}}return n}}]),i}(),Wk=function(){function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xa.compare;He(this,i),this.queue=t,this.tree=new Uu(e),this.segments=[]}return Ce(i,[{key:"process",value:function(e){var n=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),r;var o=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!o)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var s=o,a=o,l=void 0,h=void 0;l===void 0;)s=this.tree.prev(s),s===null?l=null:s.key.consumedBy===void 0&&(l=s.key);for(;h===void 0;)a=this.tree.next(a),a===null?h=null:a.key.consumedBy===void 0&&(h=a.key);if(e.isLeft){var u=null;if(l){var d=l.getIntersection(n);if(d!==null&&(n.isAnEndpoint(d)||(u=d),!l.isAnEndpoint(d)))for(var c=this._splitSafely(l,d),f=0,g=c.length;f<g;f++)r.push(c[f])}var m=null;if(h){var p=h.getIntersection(n);if(p!==null&&(n.isAnEndpoint(p)||(m=p),!h.isAnEndpoint(p)))for(var _=this._splitSafely(h,p),v=0,y=_.length;v<y;v++)r.push(_[v])}if(u!==null||m!==null){var x=null;if(u===null)x=m;else if(m===null)x=u;else{var k=mi.comparePoints(u,m);x=k<=0?u:m}this.queue.remove(n.rightSE),r.push(n.rightSE);for(var w=n.split(x),M=0,E=w.length;M<E;M++)r.push(w[M])}r.length>0?(this.tree.remove(n),r.push(e)):(this.segments.push(n),n.prev=l)}else{if(l&&h){var S=l.getIntersection(h);if(S!==null){if(!l.isAnEndpoint(S))for(var I=this._splitSafely(l,S),A=0,G=I.length;A<G;A++)r.push(I[A]);if(!h.isAnEndpoint(S))for(var P=this._splitSafely(h,S),at=0,j=P.length;at<j;at++)r.push(P[at])}}this.tree.remove(n)}return r}},{key:"_splitSafely",value:function(e,n){this.tree.remove(e);var r=e.rightSE;this.queue.remove(r);var o=e.split(n);return o.push(r),e.consumedBy===void 0&&this.tree.insert(e),o}}]),i}(),fm=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Yk=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,Kk=function(){function i(){He(this,i)}return Ce(i,[{key:"run",value:function(e,n,r){oi.type=e,es.reset();for(var o=[new dm(n,!0)],s=0,a=r.length;s<a;s++)o.push(new dm(r[s],!1));if(oi.numMultiPolys=o.length,oi.type==="difference")for(var l=o[0],h=1;h<o.length;)$u(o[h].bbox,l.bbox)!==null?h++:o.splice(h,1);if(oi.type==="intersection"){for(var u=0,d=o.length;u<d;u++)for(var c=o[u],f=u+1,g=o.length;f<g;f++)if($u(c.bbox,o[f].bbox)===null)return[]}for(var m=new Uu(mi.compare),p=0,_=o.length;p<_;p++)for(var v=o[p].getSweepEvents(),y=0,x=v.length;y<x;y++)if(m.insert(v[y]),m.size>fm)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var k=new Wk(m),w=m.size,M=m.pop();M;){var E=M.key;if(m.size===w){var S=E.segment;throw new Error("Unable to pop() ".concat(E.isLeft?"left":"right"," SweepEvent ")+"[".concat(E.point.x,", ").concat(E.point.y,"] from segment #").concat(S.id," ")+"[".concat(S.leftSE.point.x,", ").concat(S.leftSE.point.y,"] -> ")+"[".concat(S.rightSE.point.x,", ").concat(S.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(m.size>fm)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(k.segments.length>Yk)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var I=k.process(E),A=0,G=I.length;A<G;A++){var P=I[A];P.consumedBy===void 0&&m.insert(P)}w=m.size,M=m.pop()}es.reset();var at=Xk.factory(k.segments),j=new $k(at);return j.getGeom()}}]),i}(),oi=new Kk,Zk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("union",t,n)},Hk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("intersection",t,n)},Jk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("xor",t,n)},Qk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("difference",t,n)},tw={union:Zk,intersection:Hk,xor:Jk,difference:Qk};function gm(i,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=i,n}function ew(i,t,e){e===void 0&&(e={});for(var n=0,r=i;n<r.length;n++){var o=r[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:i};return gm(a,t,e)}function iw(i,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:i};return gm(n,t,e)}function mm(i){return i.type==="Feature"?i.geometry:i}function nw(i,t,e){e===void 0&&(e={});var n=mm(i),r=mm(t),o=tw.union(n.coordinates,r.coordinates);return o.length===0?null:o.length===1?ew(o[0],e.properties):iw(o,e.properties)}function Yu(i,t){const e=hc(i),n=Math.round(e*100)/100,r=n/1e4;let o;return t==="m2"?o=n+" m\xB2":t==="ha"&&(o=r+" ha"),o}function ns(i,t,e){const n=t.getExtent();return i.getView().fit(ui(n,e))}function $a(i,t){const[e,n,r]=Array.from(ko(i));return Yl([e,n,r,t])}const rw="https://api.os.uk/features/v1/wfs",Yr=new hn,pi=new hn;function ow(i,t,e){return new Qn({source:pi,style:new le({stroke:e?void 0:new ke({width:3,color:i}),fill:new ge({color:t?$a(i,.2):$a(i,0)})})})}function pm(i,t,e){const n=`
|
69
|
+
*/var kn=function(){function i(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return i}();function Bk(i,t){return i>t?1:i<t?-1:0}function wn(i,t,e){for(var n=new kn(null,null),o=n,r=n;;){var s=e(i,t.key);if(s<0){if(t.left===null)break;if(e(i,t.left.key)<0){var a=t.left;if(t.left=a.right,a.right=t,t=a,t.left===null)break}r.left=t,r=t,t=t.left}else if(s>0){if(t.right===null)break;if(e(i,t.right.key)>0){var a=t.right;if(t.right=a.left,a.left=t,t=a,t.right===null)break}o.right=t,o=t,t=t.right}else break}return o.right=t.left,r.left=t.right,t.left=n.right,t.right=n.left,t}function ju(i,t,e,n){var o=new kn(i,t);if(e===null)return o.left=o.right=null,o;e=wn(i,e,n);var r=n(i,e.key);return r<0?(o.left=e.left,o.right=e,e.left=null):r>=0&&(o.right=e.right,o.left=e,e.right=null),o}function nm(i,t,e){var n=null,o=null;if(t){t=wn(i,t,e);var r=e(t.key,i);r===0?(n=t.left,o=t.right):r<0?(o=t.right,t.right=null,n=t):(n=t.left,t.left=null,o=t)}return{left:n,right:o}}function Wk(i,t,e){return t===null?i:(i===null||(t=wn(i.key,t,e),t.left=i),t)}function Bu(i,t,e,n,o){if(i){n(""+t+(e?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+o(i)+`
|
70
|
+
`);var r=t+(e?" ":"\u2502 ");i.left&&Bu(i.left,r,!1,n,o),i.right&&Bu(i.right,r,!0,n,o)}}var Wu=function(){function i(t){t===void 0&&(t=Bk),this._root=null,this._size=0,this._comparator=t}return i.prototype.insert=function(t,e){return this._size++,this._root=ju(t,e,this._root,this._comparator)},i.prototype.add=function(t,e){var n=new kn(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var o=this._comparator,r=wn(t,this._root,o),s=o(t,r.key);return s===0?this._root=r:(s<0?(n.left=r.left,n.right=r,r.left=null):s>0&&(n.right=r.right,n.left=r,r.right=null),this._size++,this._root=n),this._root},i.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},i.prototype._remove=function(t,e,n){var o;if(e===null)return null;e=wn(t,e,n);var r=n(t,e.key);return r===0?(e.left===null?o=e.right:(o=wn(t,e.left,n),o.right=e.right),this._size--,o):e},i.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=wn(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},i.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var o=n(t,e.key);if(o===0)return e;o<0?e=e.left:e=e.right}return null},i.prototype.find=function(t){return this._root&&(this._root=wn(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},i.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var o=n(t,e.key);if(o===0)return!0;o<0?e=e.left:e=e.right}return!1},i.prototype.forEach=function(t,e){for(var n=this._root,o=[],r=!1;!r;)n!==null?(o.push(n),n=n.left):o.length!==0?(n=o.pop(),t.call(e,n),n=n.right):r=!0;return this},i.prototype.range=function(t,e,n,o){for(var r=[],s=this._comparator,a=this._root,l;r.length!==0||a;)if(a)r.push(a),a=a.left;else{if(a=r.pop(),l=s(a.key,e),l>0)break;if(s(a.key,t)>=0&&n.call(o,a))return this;a=a.right}return this},i.prototype.keys=function(){var t=[];return this.forEach(function(e){var n=e.key;return t.push(n)}),t},i.prototype.values=function(){var t=[];return this.forEach(function(e){var n=e.data;return t.push(n)}),t},i.prototype.min=function(){return this._root?this.minNode(this._root).key:null},i.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},i.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},i.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},i.prototype.at=function(t){for(var e=this._root,n=!1,o=0,r=[];!n;)if(e)r.push(e),e=e.left;else if(r.length>0){if(e=r.pop(),o===t)return e;o++,e=e.right}else n=!0;return null},i.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var o=this._comparator;e;){var r=o(t.key,e.key);if(r===0)break;r<0?(n=e,e=e.left):e=e.right}return n},i.prototype.prev=function(t){var e=this._root,n=null;if(t.left!==null){for(n=t.left;n.right;)n=n.right;return n}for(var o=this._comparator;e;){var r=o(t.key,e.key);if(r===0)break;r<0?e=e.left:(n=e,e=e.right)}return n},i.prototype.clear=function(){return this._root=null,this._size=0,this},i.prototype.toList=function(){return Yk(this._root)},i.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var o=t.length,r=this._comparator;if(n&&Xu(t,e,0,o-1,r),this._root===null)this._root=Zu(t,e,0,o),this._size=o;else{var s=Xk(this.toList(),Zk(t,e),r);o=this._size+o,this._root=Yu({head:s},0,o)}return this},i.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(i.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),i.prototype.toString=function(t){t===void 0&&(t=function(n){return String(n.key)});var e=[];return Bu(this._root,"",!0,function(n){return e.push(n)},t),e.join("")},i.prototype.update=function(t,e,n){var o=this._comparator,r=nm(t,this._root,o),s=r.left,a=r.right;o(t,e)<0?a=ju(e,n,a,o):s=ju(e,n,s,o),this._root=Wk(s,a,o)},i.prototype.split=function(t){return nm(t,this._root,this._comparator)},i}();function Zu(i,t,e,n){var o=n-e;if(o>0){var r=e+Math.floor(o/2),s=i[r],a=t[r],l=new kn(s,a);return l.left=Zu(i,t,e,r),l.right=Zu(i,t,r+1,n),l}return null}function Zk(i,t){for(var e=new kn(null,null),n=e,o=0;o<i.length;o++)n=n.next=new kn(i[o],t[o]);return n.next=null,e.next}function Yk(i){for(var t=i,e=[],n=!1,o=new kn(null,null),r=o;!n;)t?(e.push(t),t=t.left):e.length>0?(t=r=r.next=e.pop(),t=t.right):n=!0;return r.next=null,o.next}function Yu(i,t,e){var n=e-t;if(n>0){var o=t+Math.floor(n/2),r=Yu(i,t,o),s=i.head;return s.left=r,i.head=i.head.next,s.right=Yu(i,o+1,e),s}return null}function Xk(i,t,e){for(var n=new kn(null,null),o=n,r=i,s=t;r!==null&&s!==null;)e(r.key,s.key)<0?(o.next=r,r=r.next):(o.next=s,s=s.next),o=o.next;return r!==null?o.next=r:s!==null&&(o.next=s),n.next}function Xu(i,t,e,n,o){if(!(e>=n)){for(var r=i[e+n>>1],s=e-1,a=n+1;;){do s++;while(o(i[s],r)<0);do a--;while(o(i[a],r)>0);if(s>=a)break;var l=i[s];i[s]=i[a],i[a]=l,l=t[s],t[s]=t[a],t[a]=l}Xu(i,t,e,a,o),Xu(i,t,a+1,n,o)}}function Ke(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function om(i,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function Ee(i,t,e){return t&&om(i.prototype,t),e&&om(i,e),i}var ts=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},Uu=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,o=t.ur.x<e.ur.x?t.ur.x:e.ur.x,r=t.ll.y<e.ll.y?e.ll.y:t.ll.y,s=t.ur.y<e.ur.y?t.ur.y:e.ur.y;return{ll:{x:n,y:r},ur:{x:o,y:s}}},Mn=Number.EPSILON;Mn===void 0&&(Mn=Math.pow(2,-52));var Uk=Mn*Mn,Vu=function(t,e){if(-Mn<t&&t<Mn&&-Mn<e&&e<Mn)return 0;var n=t-e;return n*n<Uk*t*e?0:t<e?-1:1},Vk=function(){function i(){Ke(this,i),this.reset()}return Ee(i,[{key:"reset",value:function(){this.xRounder=new rm,this.yRounder=new rm}},{key:"round",value:function(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]),i}(),rm=function(){function i(){Ke(this,i),this.tree=new Wu,this.round(0)}return Ee(i,[{key:"round",value:function(e){var n=this.tree.add(e),o=this.tree.prev(n);if(o!==null&&Vu(n.key,o.key)===0)return this.tree.remove(e),o.key;var r=this.tree.next(n);return r!==null&&Vu(n.key,r.key)===0?(this.tree.remove(e),r.key):e}}]),i}(),es=new Vk,is=function(t,e){return t.x*e.y-t.y*e.x},sm=function(t,e){return t.x*e.x+t.y*e.y},am=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y},s=is(o,r);return Vu(s,0)},Ya=function(t){return Math.sqrt(sm(t,t))},qk=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return is(r,o)/Ya(r)/Ya(o)},$k=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return sm(r,o)/Ya(r)/Ya(o)},lm=function(t,e,n){return e.y===0?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},hm=function(t,e,n){return e.x===0?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},Hk=function(t,e,n,o){if(e.x===0)return hm(n,o,t.x);if(o.x===0)return hm(t,e,n.x);if(e.y===0)return lm(n,o,t.y);if(o.y===0)return lm(t,e,n.y);var r=is(e,o);if(r==0)return null;var s={x:n.x-t.x,y:n.y-t.y},a=is(s,e)/r,l=is(s,o)/r,h=t.x+l*e.x,u=n.x+a*o.x,d=t.y+l*e.y,c=n.y+a*o.y,g=(h+u)/2,f=(d+c)/2;return{x:g,y:f}},mi=function(){Ee(i,null,[{key:"compare",value:function(e,n){var o=i.comparePoints(e.point,n.point);return o!==0?o:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:Xa.compare(e.segment,n.segment))}},{key:"comparePoints",value:function(e,n){return e.x<n.x?-1:e.x>n.x?1:e.y<n.y?-1:e.y>n.y?1:0}}]);function i(t,e){Ke(this,i),t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}return Ee(i,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var n=e.point.events,o=0,r=n.length;o<r;o++){var s=n[o];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var e=this.point.events.length,n=0;n<e;n++){var o=this.point.events[n];if(o.segment.consumedBy===void 0)for(var r=n+1;r<e;r++){var s=this.point.events[r];s.consumedBy===void 0&&o.otherSE.point.events===s.otherSE.point.events&&o.segment.consume(s.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var e=[],n=0,o=this.point.events.length;n<o;n++){var r=this.point.events[n];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&e.push(r)}return e}},{key:"getLeftmostComparator",value:function(e){var n=this,o=new Map,r=function(a){var l=a.otherSE;o.set(a,{sine:qk(n.point,e.point,l.point),cosine:$k(n.point,e.point,l.point)})};return function(s,a){o.has(s)||r(s),o.has(a)||r(a);var l=o.get(s),h=l.sine,u=l.cosine,d=o.get(a),c=d.sine,g=d.cosine;return h>=0&&c>=0?u<g?1:u>g?-1:0:h<0&&c<0?u<g?-1:u>g?1:0:c<h?-1:c>h?1:0}}}]),i}(),Kk=0,Xa=function(){Ee(i,null,[{key:"compare",value:function(e,n){var o=e.leftSE.point.x,r=n.leftSE.point.x,s=e.rightSE.point.x,a=n.rightSE.point.x;if(a<o)return 1;if(s<r)return-1;var l=e.leftSE.point.y,h=n.leftSE.point.y,u=e.rightSE.point.y,d=n.rightSE.point.y;if(o<r){if(h<l&&h<u)return 1;if(h>l&&h>u)return-1;var c=e.comparePoint(n.leftSE.point);if(c<0)return 1;if(c>0)return-1;var g=n.comparePoint(e.rightSE.point);return g!==0?g:-1}if(o>r){if(l<h&&l<d)return-1;if(l>h&&l>d)return 1;var f=n.comparePoint(e.leftSE.point);if(f!==0)return f;var m=e.comparePoint(n.rightSE.point);return m<0?1:m>0?-1:1}if(l<h)return-1;if(l>h)return 1;if(s<a){var p=n.comparePoint(e.rightSE.point);if(p!==0)return p}if(s>a){var _=e.comparePoint(n.rightSE.point);if(_<0)return 1;if(_>0)return-1}if(s!==a){var v=u-l,y=s-o,x=d-h,k=a-r;if(v>y&&x<k)return 1;if(v<y&&x>k)return-1}return s>a?1:s<a||u<d?-1:u>d?1:e.id<n.id?-1:e.id>n.id?1:0}}]);function i(t,e,n,o){Ke(this,i),this.id=++Kk,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=o}return Ee(i,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<n?e:n},ur:{x:this.rightSE.point.x,y:e>n?e:n}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point,o=this.rightSE.point,r=this.vector();if(n.x===o.x)return e.x===n.x?0:e.x<n.x?1:-1;var s=(e.y-n.y)/r.y,a=n.x+s*r.x;if(e.x===a)return 0;var l=(e.x-n.x)/r.x,h=n.y+l*r.y;return e.y===h?0:e.y<h?-1:1}},{key:"getIntersection",value:function(e){var n=this.bbox(),o=e.bbox(),r=Uu(n,o);if(r===null)return null;var s=this.leftSE.point,a=this.rightSE.point,l=e.leftSE.point,h=e.rightSE.point,u=ts(n,l)&&this.comparePoint(l)===0,d=ts(o,s)&&e.comparePoint(s)===0,c=ts(n,h)&&this.comparePoint(h)===0,g=ts(o,a)&&e.comparePoint(a)===0;if(d&&u)return g&&!c?a:!g&&c?h:null;if(d)return c&&s.x===h.x&&s.y===h.y?null:s;if(u)return g&&a.x===l.x&&a.y===l.y?null:l;if(g&&c)return null;if(g)return a;if(c)return h;var f=Hk(s,this.vector(),l,e.vector());return f===null||!ts(r,f)?null:es.round(f.x,f.y)}},{key:"split",value:function(e){var n=[],o=e.events!==void 0,r=new mi(e,!0),s=new mi(e,!1),a=this.rightSE;this.replaceRightSE(s),n.push(s),n.push(r);var l=new i(r,a,this.rings.slice(),this.windings.slice());return mi.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),mi.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),o&&(r.checkForConsuming(),s.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var n=0,o=this.windings.length;n<o;n++)this.windings[n]*=-1}},{key:"consume",value:function(e){for(var n=this,o=e;n.consumedBy;)n=n.consumedBy;for(;o.consumedBy;)o=o.consumedBy;var r=i.compare(n,o);if(r!==0){if(r>0){var s=n;n=o,o=s}if(n.prev===o){var a=n;n=o,o=a}for(var l=0,h=o.rings.length;l<h;l++){var u=o.rings[l],d=o.windings[l],c=n.rings.indexOf(u);c===-1?(n.rings.push(u),n.windings.push(d)):n.windings[c]+=d}o.rings=null,o.windings=null,o.consumedBy=n,o.leftSE.consumedBy=n.leftSE,o.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}},{key:"afterState",value:function(){if(this._afterState!==void 0)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};for(var n=this._afterState.rings,o=this._afterState.windings,r=this._afterState.multiPolys,s=0,a=this.rings.length;s<a;s++){var l=this.rings[s],h=this.windings[s],u=n.indexOf(l);u===-1?(n.push(l),o.push(h)):o[u]+=h}for(var d=[],c=[],g=0,f=n.length;g<f;g++)if(o[g]!==0){var m=n[g],p=m.poly;if(c.indexOf(p)===-1)if(m.isExterior)d.push(p);else{c.indexOf(p)===-1&&c.push(p);var _=d.indexOf(m.poly);_!==-1&&d.splice(_,1)}}for(var v=0,y=d.length;v<y;v++){var x=d[v].multiPoly;r.indexOf(x)===-1&&r.push(x)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;var e=this.beforeState().multiPolys,n=this.afterState().multiPolys;switch(ri.type){case"union":{var o=e.length===0,r=n.length===0;this._isInResult=o!==r;break}case"intersection":{var s,a;e.length<n.length?(s=e.length,a=n.length):(s=n.length,a=e.length),this._isInResult=a===ri.numMultiPolys&&s<a;break}case"xor":{var l=Math.abs(e.length-n.length);this._isInResult=l%2===1;break}case"difference":{var h=function(d){return d.length===1&&d[0].isSubject};this._isInResult=h(e)!==h(n);break}default:throw new Error("Unrecognized operation type found ".concat(ri.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,n,o){var r,s,a,l=mi.comparePoints(e,n);if(l<0)r=e,s=n,a=1;else if(l>0)r=n,s=e,a=-1;else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var h=new mi(r,!0),u=new mi(s,!1);return new i(h,u,[o],[a])}}]),i}(),um=function(){function i(t,e,n){if(Ke(this,i),!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=es.round(t[0][0],t[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var r=o,s=1,a=t.length;s<a;s++){if(typeof t[s][0]!="number"||typeof t[s][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=es.round(t[s][0],t[s][1]);l.x===r.x&&l.y===r.y||(this.segments.push(Xa.fromRing(r,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),r=l)}(o.x!==r.x||o.y!==r.y)&&this.segments.push(Xa.fromRing(r,o,this))}return Ee(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,o=this.segments.length;n<o;n++){var r=this.segments[n];e.push(r.leftSE),e.push(r.rightSE)}return e}}]),i}(),Jk=function(){function i(t,e){if(Ke(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new um(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var n=1,o=t.length;n<o;n++){var r=new um(t[n],this,!1);r.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.interiorRings.push(r)}this.multiPoly=e}return Ee(i,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,o=this.interiorRings.length;n<o;n++)for(var r=this.interiorRings[n].getSweepEvents(),s=0,a=r.length;s<a;s++)e.push(r[s]);return e}}]),i}(),dm=function(){function i(t,e){if(Ke(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,o=t.length;n<o;n++){var r=new Jk(t[n],this);r.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.polys.push(r)}this.isSubject=e}return Ee(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,o=this.polys.length;n<o;n++)for(var r=this.polys[n].getSweepEvents(),s=0,a=r.length;s<a;s++)e.push(r[s]);return e}}]),i}(),Qk=function(){Ee(i,null,[{key:"factory",value:function(e){for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];if(!(!s.isInResult()||s.ringOut)){for(var a=null,l=s.leftSE,h=s.rightSE,u=[l],d=l.point,c=[];a=l,l=h,u.push(l),l.point!==d;)for(;;){var g=l.getAvailableLinkedEvents();if(g.length===0){var f=u[0].point,m=u[u.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(f.x,",")+" ".concat(f.y,"]. Last matching segment found ends at")+" [".concat(m.x,", ").concat(m.y,"]."))}if(g.length===1){h=g[0].otherSE;break}for(var p=null,_=0,v=c.length;_<v;_++)if(c[_].point===l.point){p=_;break}if(p!==null){var y=c.splice(p)[0],x=u.splice(y.index);x.unshift(x[0].otherSE),n.push(new i(x.reverse()));continue}c.push({index:u.length,point:l.point});var k=l.getLeftmostComparator(a);h=g.sort(k)[0].otherSE;break}n.push(new i(u))}}return n}}]);function i(t){Ke(this,i),this.events=t;for(var e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}return Ee(i,[{key:"getGeom",value:function(){for(var e=this.events[0].point,n=[e],o=1,r=this.events.length-1;o<r;o++){var s=this.events[o].point,a=this.events[o+1].point;am(s,e,a)!==0&&(n.push(s),e=s)}if(n.length===1)return null;var l=n[0],h=n[1];am(l,e,h)===0&&n.shift(),n.push(n[0]);for(var u=this.isExteriorRing()?1:-1,d=this.isExteriorRing()?0:n.length-1,c=this.isExteriorRing()?n.length:-1,g=[],f=d;f!=c;f+=u)g.push([n[f].x,n[f].y]);return g}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===void 0){var e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var e=this.events[0],n=1,o=this.events.length;n<o;n++){var r=this.events[n];mi.compare(e,r)>0&&(e=r)}for(var s=e.segment.prevInResult(),a=s?s.prevInResult():null;;){if(!s)return null;if(!a)return s.ringOut;if(a.ringOut!==s.ringOut)return a.ringOut.enclosingRing()!==s.ringOut?s.ringOut:s.ringOut.enclosingRing();s=a.prevInResult(),a=s?s.prevInResult():null}}}]),i}(),cm=function(){function i(t){Ke(this,i),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}return Ee(i,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,o=this.interiorRings.length;n<o;n++){var r=this.interiorRings[n].getGeom();r!==null&&e.push(r)}return e}}]),i}(),tw=function(){function i(t){Ke(this,i),this.rings=t,this.polys=this._composePolys(t)}return Ee(i,[{key:"getGeom",value:function(){for(var e=[],n=0,o=this.polys.length;n<o;n++){var r=this.polys[n].getGeom();r!==null&&e.push(r)}return e}},{key:"_composePolys",value:function(e){for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];if(!s.poly)if(s.isExteriorRing())n.push(new cm(s));else{var a=s.enclosingRing();a.poly||n.push(new cm(a)),a.poly.addInterior(s)}}return n}}]),i}(),ew=function(){function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xa.compare;Ke(this,i),this.queue=t,this.tree=new Wu(e),this.segments=[]}return Ee(i,[{key:"process",value:function(e){var n=e.segment,o=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),o;var r=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!r)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var s=r,a=r,l=void 0,h=void 0;l===void 0;)s=this.tree.prev(s),s===null?l=null:s.key.consumedBy===void 0&&(l=s.key);for(;h===void 0;)a=this.tree.next(a),a===null?h=null:a.key.consumedBy===void 0&&(h=a.key);if(e.isLeft){var u=null;if(l){var d=l.getIntersection(n);if(d!==null&&(n.isAnEndpoint(d)||(u=d),!l.isAnEndpoint(d)))for(var c=this._splitSafely(l,d),g=0,f=c.length;g<f;g++)o.push(c[g])}var m=null;if(h){var p=h.getIntersection(n);if(p!==null&&(n.isAnEndpoint(p)||(m=p),!h.isAnEndpoint(p)))for(var _=this._splitSafely(h,p),v=0,y=_.length;v<y;v++)o.push(_[v])}if(u!==null||m!==null){var x=null;if(u===null)x=m;else if(m===null)x=u;else{var k=mi.comparePoints(u,m);x=k<=0?u:m}this.queue.remove(n.rightSE),o.push(n.rightSE);for(var w=n.split(x),E=0,M=w.length;E<M;E++)o.push(w[E])}o.length>0?(this.tree.remove(n),o.push(e)):(this.segments.push(n),n.prev=l)}else{if(l&&h){var S=l.getIntersection(h);if(S!==null){if(!l.isAnEndpoint(S))for(var z=this._splitSafely(l,S),P=0,G=z.length;P<G;P++)o.push(z[P]);if(!h.isAnEndpoint(S))for(var A=this._splitSafely(h,S),at=0,B=A.length;at<B;at++)o.push(A[at])}}this.tree.remove(n)}return o}},{key:"_splitSafely",value:function(e,n){this.tree.remove(e);var o=e.rightSE;this.queue.remove(o);var r=e.split(n);return r.push(o),e.consumedBy===void 0&&this.tree.insert(e),r}}]),i}(),gm=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,iw=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,nw=function(){function i(){Ke(this,i)}return Ee(i,[{key:"run",value:function(e,n,o){ri.type=e,es.reset();for(var r=[new dm(n,!0)],s=0,a=o.length;s<a;s++)r.push(new dm(o[s],!1));if(ri.numMultiPolys=r.length,ri.type==="difference")for(var l=r[0],h=1;h<r.length;)Uu(r[h].bbox,l.bbox)!==null?h++:r.splice(h,1);if(ri.type==="intersection"){for(var u=0,d=r.length;u<d;u++)for(var c=r[u],g=u+1,f=r.length;g<f;g++)if(Uu(c.bbox,r[g].bbox)===null)return[]}for(var m=new Wu(mi.compare),p=0,_=r.length;p<_;p++)for(var v=r[p].getSweepEvents(),y=0,x=v.length;y<x;y++)if(m.insert(v[y]),m.size>gm)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var k=new ew(m),w=m.size,E=m.pop();E;){var M=E.key;if(m.size===w){var S=M.segment;throw new Error("Unable to pop() ".concat(M.isLeft?"left":"right"," SweepEvent ")+"[".concat(M.point.x,", ").concat(M.point.y,"] from segment #").concat(S.id," ")+"[".concat(S.leftSE.point.x,", ").concat(S.leftSE.point.y,"] -> ")+"[".concat(S.rightSE.point.x,", ").concat(S.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(m.size>gm)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(k.segments.length>iw)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var z=k.process(M),P=0,G=z.length;P<G;P++){var A=z[P];A.consumedBy===void 0&&m.insert(A)}w=m.size,E=m.pop()}es.reset();var at=Qk.factory(k.segments),B=new tw(at);return B.getGeom()}}]),i}(),ri=new nw,ow=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("union",t,n)},rw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("intersection",t,n)},sw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("xor",t,n)},aw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("difference",t,n)},lw={union:ow,intersection:rw,xor:sw,difference:aw};function fm(i,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=i,n}function hw(i,t,e){e===void 0&&(e={});for(var n=0,o=i;n<o.length;n++){var r=o[n];if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<r[r.length-1].length;s++)if(r[r.length-1][s]!==r[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:i};return fm(a,t,e)}function uw(i,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:i};return fm(n,t,e)}function mm(i){return i.type==="Feature"?i.geometry:i}function dw(i,t,e){e===void 0&&(e={});var n=mm(i),o=mm(t),r=lw.union(n.coordinates,o.coordinates);return r.length===0?null:r.length===1?hw(r[0],e.properties):uw(r,e.properties)}function qu(i,t){const e=hc(i),n=Math.round(e*100)/100,o=n/1e4;let r;return t==="m2"?r=n+" m\xB2":t==="ha"&&(r=o+" ha"),r}function ns(i,t,e){const n=t.getExtent();return i.getView().fit(ui(n,e))}function Ua(i,t){const[e,n,o]=Array.from(kr(i));return ql([e,n,o,t])}const cw="https://api.os.uk/features/v1/wfs",Ho=new hn,pi=new hn;function gw(i,t,e){return new Qn({source:pi,style:new le({stroke:e?void 0:new ke({width:3,color:i}),fill:new fe({color:t?Ua(i,.2):Ua(i,0)})})})}function pm(i,t,e){const n=`
|
71
71
|
<ogc:Filter>
|
72
72
|
<ogc:Contains>
|
73
73
|
<ogc:PropertyName>SHAPE</ogc:PropertyName>
|
@@ -76,14 +76,14 @@ Filter Expression:
|
|
76
76
|
</gml:Point>
|
77
77
|
</ogc:Contains>
|
78
78
|
</ogc:Filter>
|
79
|
-
`;fetch(sw({key:t,service:"WFS",request:"GetFeature",version:"2.0.0",typeNames:"Topography_TopographicArea",propertyName:"TOID,DescriptiveGroup,SHAPE",outputFormat:"GEOJSON",srsName:"urn:ogc:def:crs:EPSG::4326",filter:n,count:1})).then(o=>o.json()).then(o=>{if(!o.features.length)return;const s=o.features[0].properties,a=["TOID","DescriptiveGroup"];Object.keys(s).forEach(u=>a.includes(u)||delete s[u]);const l=new Zn,h=l.readFeatures(o,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});e?h.forEach(u=>{const d=u.getProperties().TOID,c=Yr.getFeatureById(d);c?Yr.removeFeature(c):(u.setId(d),Yr.addFeature(u))}):(Yr.clear(),h.forEach(u=>{const d=u.getProperties().TOID;u.setId(d),Yr.addFeature(u)})),pi.clear(),pi.addFeature(l.readFeature(Yr.getFeatures().reduce((u,d)=>{const c=l.writeFeatureObject(d).geometry;return u?nw(u,c):c},null)))}).catch(o=>console.log(o))}function sw(i){const t=Object.keys(i).map(e=>e+"="+encodeURI(i[e])).join("&");return`${rw}?${t}`}const aw="https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key=",lw="https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key=",hw="https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key=";function uw(i,t){return new Ux({source:t?new $g({url:aw+t,attributions:[i],attributionsCollapsible:!1,maxZoom:20}):new bk({attributions:[Wg]})})}function dw(i,t){let e=new xx({declutter:!0,source:new Dx({format:new O1,url:lw+t,attributions:[i],attributionsCollapsible:!1})});return t&&fetch(hw+t).then(n=>n.json()).then(n=>_k(e,n,"esri")).catch(n=>console.log(n)),e}function cw(i){const t=Object.keys(i.defs),e=t.length;let n,r;for(n=0;n<e;++n){const o=t[n];if(!Gt(o)){const s=i.defs(o);let a=s.units;!a&&s.projName==="longlat"&&(a="degrees"),dc(new Os({code:o,axisOrientation:s.axis,metersPerUnit:s.to_meter,units:a}))}}for(n=0;n<e;++n){const o=t[n],s=Gt(o);for(r=0;r<e;++r){const a=t[r],l=Gt(a);if(!tc(o,a))if(i.defs[o]===i.defs[a])Bl([s,l]);else{const h=i(o,a);N0(s,l,fc(s,l,h.forward),fc(l,s,h.inverse))}}}}function fw(i){i("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),i("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),i("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),i.WGS84=i["EPSG:4326"],i["EPSG:3785"]=i["EPSG:3857"],i.GOOGLE=i["EPSG:3857"],i["EPSG:900913"]=i["EPSG:3857"],i["EPSG:102113"]=i["EPSG:3857"]}var hr=1,ur=2,Wa=3,gw=4,Ku=5,vm=6378137,mw=6356752314e-3,_m=.0066943799901413165,rs=484813681109536e-20,R=Math.PI/2,pw=.16666666666666666,vw=.04722222222222222,_w=.022156084656084655,B=1e-10,he=.017453292519943295,vi=57.29577951308232,Rt=Math.PI/4,os=Math.PI*2,Zt=3.14159265359,De={};De.greenwich=0,De.lisbon=-9.131906111111,De.paris=2.337229166667,De.bogota=-74.080916666667,De.madrid=-3.687938888889,De.rome=12.452333333333,De.bern=7.439583333333,De.jakarta=106.807719444444,De.ferro=-17.666666666667,De.brussels=4.367975,De.stockholm=18.058277777778,De.athens=23.7163375,De.oslo=10.722916666667;const yw={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var ym=/[\s_\-\/\(\)]/g;function Mn(i,t){if(i[t])return i[t];for(var e=Object.keys(i),n=t.toLowerCase().replace(ym,""),r=-1,o,s;++r<e.length;)if(o=e[r],s=o.toLowerCase().replace(ym,""),s===n)return i[o]}function Zu(i){var t={},e=i.split("+").map(function(a){return a.trim()}).filter(function(a){return a}).reduce(function(a,l){var h=l.split("=");return h.push(!0),a[h[0].toLowerCase()]=h[1],a},{}),n,r,o,s={proj:"projName",datum:"datumCode",rf:function(a){t.rf=parseFloat(a)},lat_0:function(a){t.lat0=a*he},lat_1:function(a){t.lat1=a*he},lat_2:function(a){t.lat2=a*he},lat_ts:function(a){t.lat_ts=a*he},lon_0:function(a){t.long0=a*he},lon_1:function(a){t.long1=a*he},lon_2:function(a){t.long2=a*he},alpha:function(a){t.alpha=parseFloat(a)*he},gamma:function(a){t.rectified_grid_angle=parseFloat(a)},lonc:function(a){t.longc=a*he},x_0:function(a){t.x0=parseFloat(a)},y_0:function(a){t.y0=parseFloat(a)},k_0:function(a){t.k0=parseFloat(a)},k:function(a){t.k0=parseFloat(a)},a:function(a){t.a=parseFloat(a)},b:function(a){t.b=parseFloat(a)},r_a:function(){t.R_A=!0},zone:function(a){t.zone=parseInt(a,10)},south:function(){t.utmSouth=!0},towgs84:function(a){t.datum_params=a.split(",").map(function(l){return parseFloat(l)})},to_meter:function(a){t.to_meter=parseFloat(a)},units:function(a){t.units=a;var l=Mn(yw,a);l&&(t.to_meter=l.to_meter)},from_greenwich:function(a){t.from_greenwich=a*he},pm:function(a){var l=Mn(De,a);t.from_greenwich=(l||parseFloat(a))*he},nadgrids:function(a){a==="@null"?t.datumCode="none":t.nadgrids=a},axis:function(a){var l="ewnsud";a.length===3&&l.indexOf(a.substr(0,1))!==-1&&l.indexOf(a.substr(1,1))!==-1&&l.indexOf(a.substr(2,1))!==-1&&(t.axis=a)},approx:function(){t.approx=!0}};for(n in e)r=e[n],n in s?(o=s[n],typeof o=="function"?o(r):t[o]=r):t[n]=r;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var ss=1,xm=2,bm=3,Ya=4,km=5,Hu=-1,xw=/\s/,bw=/[A-Za-z]/,kw=/[A-Za-z84_]/,Ka=/[,\]]/,wm=/[\d\.E\-\+]/;function Fi(i){if(typeof i!="string")throw new Error("not a string");this.text=i.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=ss}Fi.prototype.readCharicter=function(){var i=this.text[this.place++];if(this.state!==Ya)for(;xw.test(i);){if(this.place>=this.text.length)return;i=this.text[this.place++]}switch(this.state){case ss:return this.neutral(i);case xm:return this.keyword(i);case Ya:return this.quoted(i);case km:return this.afterquote(i);case bm:return this.number(i);case Hu:return}},Fi.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=Ya;return}if(Ka.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)},Fi.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=ss;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=ss,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Hu);return}},Fi.prototype.number=function(i){if(wm.test(i)){this.word+=i;return}if(Ka.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)},Fi.prototype.quoted=function(i){if(i==='"'){this.state=km;return}this.word+=i},Fi.prototype.keyword=function(i){if(kw.test(i)){this.word+=i;return}if(i==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=ss;return}if(Ka.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)},Fi.prototype.neutral=function(i){if(bw.test(i)){this.word=i,this.state=xm;return}if(i==='"'){this.word="",this.state=Ya;return}if(wm.test(i)){this.word=i,this.state=bm;return}if(Ka.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)},Fi.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Hu)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function ww(i){var t=new Fi(i);return t.output()}function Em(i,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:i,r=e.reduce(function(o,s){return Kr(s,o),o},n);t&&(i[t]=r)}function Kr(i,t){if(!Array.isArray(i)){t[i]=!0;return}var e=i.shift();if(e==="PARAMETER"&&(e=i.shift()),i.length===1){if(Array.isArray(i[0])){t[e]={},Kr(i[0],t[e]);return}t[e]=i[0];return}if(!i.length){t[e]=!0;return}if(e==="TOWGS84"){t[e]=i;return}if(e==="AXIS"){e in t||(t[e]=[]),t[e].push(i);return}Array.isArray(e)||(t[e]={});var n;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[e]={name:i[0].toLowerCase(),convert:i[1]},i.length===3&&Kr(i[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:i[0],a:i[1],rf:i[2]},i.length===4&&Kr(i[3],t[e]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":i[0]=["name",i[0]],Em(t,e,i);return;default:for(n=-1;++n<i.length;)if(!Array.isArray(i[n]))return Kr(i,t[e]);return Em(t,e,i)}}var Ew=.017453292519943295;function Mw(i,t){var e=t[0],n=t[1];!(e in i)&&n in i&&(i[e]=i[n],t.length===3&&(i[e]=t[2](i[e])))}function Oi(i){return i*Ew}function Cw(i){if(i.type==="GEOGCS"?i.projName="longlat":i.type==="LOCAL_CS"?(i.projName="identity",i.local=!0):typeof i.PROJECTION=="object"?i.projName=Object.keys(i.PROJECTION)[0]:i.projName=i.PROJECTION,i.AXIS){for(var t="",e=0,n=i.AXIS.length;e<n;++e){var r=[i.AXIS[e][0].toLowerCase(),i.AXIS[e][1].toLowerCase()];r[0].indexOf("north")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="north"?t+="n":r[0].indexOf("south")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="south"?t+="s":r[0].indexOf("east")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="east"?t+="e":(r[0].indexOf("west")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(i.axis=t)}i.UNIT&&(i.units=i.UNIT.name.toLowerCase(),i.units==="metre"&&(i.units="meter"),i.UNIT.convert&&(i.type==="GEOGCS"?i.DATUM&&i.DATUM.SPHEROID&&(i.to_meter=i.UNIT.convert*i.DATUM.SPHEROID.a):i.to_meter=i.UNIT.convert));var o=i.GEOGCS;i.type==="GEOGCS"&&(o=i),o&&(o.DATUM?i.datumCode=o.DATUM.name.toLowerCase():i.datumCode=o.name.toLowerCase(),i.datumCode.slice(0,2)==="d_"&&(i.datumCode=i.datumCode.slice(2)),(i.datumCode==="new_zealand_geodetic_datum_1949"||i.datumCode==="new_zealand_1949")&&(i.datumCode="nzgd49"),(i.datumCode==="wgs_1984"||i.datumCode==="world_geodetic_system_1984")&&(i.PROJECTION==="Mercator_Auxiliary_Sphere"&&(i.sphere=!0),i.datumCode="wgs84"),i.datumCode.slice(-6)==="_ferro"&&(i.datumCode=i.datumCode.slice(0,-6)),i.datumCode.slice(-8)==="_jakarta"&&(i.datumCode=i.datumCode.slice(0,-8)),~i.datumCode.indexOf("belge")&&(i.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(i.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),i.ellps.toLowerCase().slice(0,13)==="international"&&(i.ellps="intl"),i.a=o.DATUM.SPHEROID.a,i.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(i.datum_params=o.DATUM.TOWGS84),~i.datumCode.indexOf("osgb_1936")&&(i.datumCode="osgb36"),~i.datumCode.indexOf("osni_1952")&&(i.datumCode="osni52"),(~i.datumCode.indexOf("tm65")||~i.datumCode.indexOf("geodetic_datum_of_1965"))&&(i.datumCode="ire65"),i.datumCode==="ch1903+"&&(i.datumCode="ch1903"),~i.datumCode.indexOf("israel")&&(i.datumCode="isr93")),i.b&&!isFinite(i.b)&&(i.b=i.a);function s(h){var u=i.to_meter||1;return h*u}var a=function(h){return Mw(i,h)},l=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Oi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Oi],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",Oi],["lat0","latitude_of_origin",Oi],["lat0","standard_parallel_1",Oi],["lat1","standard_parallel_1",Oi],["lat2","standard_parallel_2",Oi],["azimuth","Azimuth"],["alpha","azimuth",Oi],["srsCode","name"]];l.forEach(a),!i.long0&&i.longc&&(i.projName==="Albers_Conic_Equal_Area"||i.projName==="Lambert_Azimuthal_Equal_Area")&&(i.long0=i.longc),!i.lat_ts&&i.lat1&&(i.projName==="Stereographic_South_Pole"||i.projName==="Polar Stereographic (variant B)")&&(i.lat0=Oi(i.lat1>0?90:-90),i.lat_ts=i.lat1)}function Mm(i){var t=ww(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var r={};return Kr(t,r),Cw(r),r}function Se(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?Se[i]=Zu(arguments[1]):Se[i]=Mm(arguments[1]):Se[i]=e}else if(arguments.length===1){if(Array.isArray(i))return i.map(function(n){Array.isArray(n)?Se.apply(t,n):Se(n)});if(typeof i=="string"){if(i in Se)return Se[i]}else"EPSG"in i?Se["EPSG:"+i.EPSG]=i:"ESRI"in i?Se["ESRI:"+i.ESRI]=i:"IAU2000"in i?Se["IAU2000:"+i.IAU2000]=i:console.log(i);return}}fw(Se);function Sw(i){return typeof i=="string"}function Tw(i){return i in Se}var zw=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Iw(i){return zw.some(function(t){return i.indexOf(t)>-1})}var Rw=["3857","900913","3785","102113"];function Pw(i){var t=Mn(i,"authority");if(!!t){var e=Mn(t,"epsg");return e&&Rw.indexOf(e)>-1}}function Aw(i){var t=Mn(i,"extension");if(!!t)return Mn(t,"proj4")}function Dw(i){return i[0]==="+"}function Lw(i){if(Sw(i)){if(Tw(i))return Se[i];if(Iw(i)){var t=Mm(i);if(Pw(t))return Se["EPSG:3857"];var e=Aw(t);return e?Zu(e):t}if(Dw(i))return Zu(i)}else return i}function Cm(i,t){i=i||{};var e,n;if(!t)return i;for(n in t)e=t[n],e!==void 0&&(i[n]=e);return i}function _i(i,t,e){var n=i*t;return e/Math.sqrt(1-n*n)}function as(i){return i<0?-1:1}function X(i){return Math.abs(i)<=Zt?i:i-as(i)*os}function si(i,t,e){var n=i*e,r=.5*i;return n=Math.pow((1-n)/(1+n),r),Math.tan(.5*(R-t))/n}function ls(i,t){for(var e=.5*i,n,r,o=R-2*Math.atan(t),s=0;s<=15;s++)if(n=i*Math.sin(o),r=R-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-o,o+=r,Math.abs(r)<=1e-10)return o;return-9999}function Fw(){var i=this.b/this.a;this.es=1-i*i,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Ow(i){var t=i.x,e=i.y;if(e*vi>90&&e*vi<-90&&t*vi>180&&t*vi<-180)return null;var n,r;if(Math.abs(Math.abs(e)-R)<=B)return null;if(this.sphere)n=this.x0+this.a*this.k0*X(t-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(Rt+.5*e));else{var o=Math.sin(e),s=si(this.e,e,o);n=this.x0+this.a*this.k0*X(t-this.long0),r=this.y0-this.a*this.k0*Math.log(s)}return i.x=n,i.y=r,i}function Nw(i){var t=i.x-this.x0,e=i.y-this.y0,n,r;if(this.sphere)r=R-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var o=Math.exp(-e/(this.a*this.k0));if(r=ls(this.e,o),r===-9999)return null}return n=X(this.long0+t/(this.a*this.k0)),i.x=n,i.y=r,i}var Gw=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const jw={init:Fw,forward:Ow,inverse:Nw,names:Gw};function Bw(){}function Sm(i){return i}var Uw=["longlat","identity"],Vw=[jw,{init:Bw,forward:Sm,inverse:Sm,names:Uw}],Za={},Ha=[];function Tm(i,t){var e=Ha.length;return i.names?(Ha[e]=i,i.names.forEach(function(n){Za[n.toLowerCase()]=e}),this):(console.log(t),!0)}function qw(i){if(!i)return!1;var t=i.toLowerCase();if(typeof Za[t]<"u"&&Ha[Za[t]])return Ha[Za[t]]}function Xw(){Vw.forEach(Tm)}const $w={start:Xw,add:Tm,get:qw};var rt={};rt.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},rt.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},rt.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},rt.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},rt.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},rt.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},rt.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},rt.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},rt.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},rt.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},rt.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},rt.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},rt.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},rt.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},rt.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},rt.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},rt.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},rt.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},rt.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},rt.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},rt.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},rt.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},rt.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},rt.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},rt.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},rt.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},rt.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},rt.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},rt.hough={a:6378270,rf:297,ellipseName:"Hough"},rt.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},rt.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},rt.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},rt.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},rt.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},rt.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},rt.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},rt.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},rt.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},rt.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},rt.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},rt.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var Ww=rt.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};rt.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function Yw(i,t,e,n){var r=i*i,o=t*t,s=(r-o)/r,a=0;n?(i*=1-s*(pw+s*(vw+s*_w)),r=i*i,s=0):a=Math.sqrt(s);var l=(r-o)/o;return{es:s,e:a,ep2:l}}function Kw(i,t,e,n,r){if(!i){var o=Mn(rt,n);o||(o=Ww),i=o.a,t=o.b,e=o.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)<B)&&(r=!0,t=i),{a:i,b:t,rf:e,sphere:r}}var se={};se.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},se.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},se.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},se.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},se.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},se.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},se.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},se.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},se.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},se.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},se.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},se.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},se.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},se.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},se.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},se.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},se.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function Zw(i,t,e,n,r,o,s){var a={};return i===void 0||i==="none"?a.datum_type=Ku:a.datum_type=gw,t&&(a.datum_params=t.map(parseFloat),(a.datum_params[0]!==0||a.datum_params[1]!==0||a.datum_params[2]!==0)&&(a.datum_type=hr),a.datum_params.length>3&&(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0)&&(a.datum_type=ur,a.datum_params[3]*=rs,a.datum_params[4]*=rs,a.datum_params[5]*=rs,a.datum_params[6]=a.datum_params[6]/1e6+1)),s&&(a.datum_type=Wa,a.grids=s),a.a=e,a.b=n,a.es=r,a.ep2=o,a}var zm={};function Hw(i,t){var e=new DataView(t),n=t2(e),r=e2(e,n);r.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var o=i2(e,r,n),s={header:r,subgrids:o};return zm[i]=s,s}function Jw(i){if(i===void 0)return null;var t=i.split(",");return t.map(Qw)}function Qw(i){if(i.length===0)return null;var t=i[0]==="@";return t&&(i=i.slice(1)),i==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:i,mandatory:!t,grid:zm[i]||null,isNull:!1}}function Zr(i){return i/3600*Math.PI/180}function t2(i){var t=i.getInt32(8,!1);return t===11?!1:(t=i.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function e2(i,t){return{nFields:i.getInt32(8,t),nSubgridFields:i.getInt32(24,t),nSubgrids:i.getInt32(40,t),shiftType:Ju(i,56,56+8).trim(),fromSemiMajorAxis:i.getFloat64(120,t),fromSemiMinorAxis:i.getFloat64(136,t),toSemiMajorAxis:i.getFloat64(152,t),toSemiMinorAxis:i.getFloat64(168,t)}}function Ju(i,t,e){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(t,e)))}function i2(i,t,e){for(var n=176,r=[],o=0;o<t.nSubgrids;o++){var s=r2(i,n,e),a=o2(i,n,s,e),l=Math.round(1+(s.upperLongitude-s.lowerLongitude)/s.longitudeInterval),h=Math.round(1+(s.upperLatitude-s.lowerLatitude)/s.latitudeInterval);r.push({ll:[Zr(s.lowerLongitude),Zr(s.lowerLatitude)],del:[Zr(s.longitudeInterval),Zr(s.latitudeInterval)],lim:[l,h],count:s.gridNodeCount,cvs:n2(a)})}return r}function n2(i){return i.map(function(t){return[Zr(t.longitudeShift),Zr(t.latitudeShift)]})}function r2(i,t,e){return{name:Ju(i,t+8,t+16).trim(),parent:Ju(i,t+24,t+24+8).trim(),lowerLatitude:i.getFloat64(t+72,e),upperLatitude:i.getFloat64(t+88,e),lowerLongitude:i.getFloat64(t+104,e),upperLongitude:i.getFloat64(t+120,e),latitudeInterval:i.getFloat64(t+136,e),longitudeInterval:i.getFloat64(t+152,e),gridNodeCount:i.getInt32(t+168,e)}}function o2(i,t,e,n){for(var r=t+176,o=16,s=[],a=0;a<e.gridNodeCount;a++){var l={latitudeShift:i.getFloat32(r+a*o,n),longitudeShift:i.getFloat32(r+a*o+4,n),latitudeAccuracy:i.getFloat32(r+a*o+8,n),longitudeAccuracy:i.getFloat32(r+a*o+12,n)};s.push(l)}return s}function yi(i,t){if(!(this instanceof yi))return new yi(i);t=t||function(h){if(h)throw h};var e=Lw(i);if(typeof e!="object"){t(i);return}var n=yi.projections.get(e.projName);if(!n){t(i);return}if(e.datumCode&&e.datumCode!=="none"){var r=Mn(se,e.datumCode);r&&(e.datum_params=e.datum_params||(r.towgs84?r.towgs84.split(","):null),e.ellps=r.ellipse,e.datumName=r.datumName?r.datumName:e.datumCode)}e.k0=e.k0||1,e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var o=Kw(e.a,e.b,e.rf,e.ellps,e.sphere),s=Yw(o.a,o.b,o.rf,e.R_A),a=Jw(e.nadgrids),l=e.datum||Zw(e.datumCode,e.datum_params,o.a,o.b,s.es,s.ep2,a);Cm(this,e),Cm(this,n),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=s.es,this.e=s.e,this.ep2=s.ep2,this.datum=l,this.init(),t(null,this)}yi.projections=$w,yi.projections.start();function s2(i,t){return i.datum_type!==t.datum_type||i.a!==t.a||Math.abs(i.es-t.es)>5e-11?!1:i.datum_type===hr?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]:i.datum_type===ur?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]&&i.datum_params[3]===t.datum_params[3]&&i.datum_params[4]===t.datum_params[4]&&i.datum_params[5]===t.datum_params[5]&&i.datum_params[6]===t.datum_params[6]:!0}function Im(i,t,e){var n=i.x,r=i.y,o=i.z?i.z:0,s,a,l,h;if(r<-R&&r>-1.001*R)r=-R;else if(r>R&&r<1.001*R)r=R;else{if(r<-R)return{x:-1/0,y:-1/0,z:i.z};if(r>R)return{x:1/0,y:1/0,z:i.z}}return n>Math.PI&&(n-=2*Math.PI),a=Math.sin(r),h=Math.cos(r),l=a*a,s=e/Math.sqrt(1-t*l),{x:(s+o)*h*Math.cos(n),y:(s+o)*h*Math.sin(n),z:(s*(1-t)+o)*a}}function Rm(i,t,e,n){var r=1e-12,o=r*r,s=30,a,l,h,u,d,c,f,g,m,p,_,v,y,x=i.x,k=i.y,w=i.z?i.z:0,M,E,S;if(a=Math.sqrt(x*x+k*k),l=Math.sqrt(x*x+k*k+w*w),a/e<r){if(M=0,l/e<r)return E=R,S=-n,{x:i.x,y:i.y,z:i.z}}else M=Math.atan2(k,x);h=w/l,u=a/l,d=1/Math.sqrt(1-t*(2-t)*u*u),g=u*(1-t)*d,m=h*d,y=0;do y++,f=e/Math.sqrt(1-t*m*m),S=a*g+w*m-f*(1-t*m*m),c=t*f/(f+S),d=1/Math.sqrt(1-c*(2-c)*u*u),p=u*(1-c)*d,_=h*d,v=_*g-p*m,g=p,m=_;while(v*v>o&&y<s);return E=Math.atan(_/Math.abs(p)),{x:M,y:E,z:S}}function a2(i,t,e){if(t===hr)return{x:i.x+e[0],y:i.y+e[1],z:i.z+e[2]};if(t===ur){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],h=e[6];return{x:h*(i.x-l*i.y+a*i.z)+n,y:h*(l*i.x+i.y-s*i.z)+r,z:h*(-a*i.x+s*i.y+i.z)+o}}}function l2(i,t,e){if(t===hr)return{x:i.x-e[0],y:i.y-e[1],z:i.z-e[2]};if(t===ur){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],h=e[6],u=(i.x-n)/h,d=(i.y-r)/h,c=(i.z-o)/h;return{x:u+l*d-a*c,y:-l*u+d+s*c,z:a*u-s*d+c}}}function Ja(i){return i===hr||i===ur}function h2(i,t,e){if(s2(i,t)||i.datum_type===Ku||t.datum_type===Ku)return e;var n=i.a,r=i.es;if(i.datum_type===Wa){var o=Pm(i,!1,e);if(o!==0)return;n=vm,r=_m}var s=t.a,a=t.b,l=t.es;if(t.datum_type===Wa&&(s=vm,a=mw,l=_m),r===l&&n===s&&!Ja(i.datum_type)&&!Ja(t.datum_type))return e;if(e=Im(e,r,n),Ja(i.datum_type)&&(e=a2(e,i.datum_type,i.datum_params)),Ja(t.datum_type)&&(e=l2(e,t.datum_type,t.datum_params)),e=Rm(e,l,s,a),t.datum_type===Wa){var h=Pm(t,!0,e);if(h!==0)return}return e}function Pm(i,t,e){if(i.grids===null||i.grids.length===0)return console.log("Grid shift grids not found"),-1;for(var n={x:-e.x,y:e.y},r={x:Number.NaN,y:Number.NaN},o=[],s=0;s<i.grids.length;s++){var a=i.grids[s];if(o.push(a.name),a.isNull){r=n;break}if(a.mandatory,a.grid===null){if(a.mandatory)return console.log("Unable to find mandatory grid '"+a.name+"'"),-1;continue}var l=a.grid.subgrids[0],h=(Math.abs(l.del[1])+Math.abs(l.del[0]))/1e4,u=l.ll[0]-h,d=l.ll[1]-h,c=l.ll[0]+(l.lim[0]-1)*l.del[0]+h,f=l.ll[1]+(l.lim[1]-1)*l.del[1]+h;if(!(d>n.y||u>n.x||f<n.y||c<n.x)&&(r=u2(n,t,l),!isNaN(r.x)))break}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*vi+" "+n.y*vi+" tried: '"+o+"'"),-1):(e.x=-r.x,e.y=r.y,0)}function u2(i,t,e){var n={x:Number.NaN,y:Number.NaN};if(isNaN(i.x))return n;var r={x:i.x,y:i.y};r.x-=e.ll[0],r.y-=e.ll[1],r.x=X(r.x-Math.PI)+Math.PI;var o=Am(r,e);if(t){if(isNaN(o.x))return n;o.x=r.x-o.x,o.y=r.y-o.y;var s=9,a=1e-12,l,h;do{if(h=Am(o,e),isNaN(h.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:r.x-(h.x+o.x),y:r.y-(h.y+o.y)},o.x+=l.x,o.y+=l.y}while(s--&&Math.abs(l.x)>a&&Math.abs(l.y)>a);if(s<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=X(o.x+e.ll[0]),n.y=o.y+e.ll[1]}else isNaN(o.x)||(n.x=i.x+o.x,n.y=i.y+o.y);return n}function Am(i,t){var e={x:i.x/t.del[0],y:i.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},r={x:e.x-1*n.x,y:e.y-1*n.y},o={x:Number.NaN,y:Number.NaN},s;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return o;s=n.y*t.lim[0]+n.x;var a={x:t.cvs[s][0],y:t.cvs[s][1]};s++;var l={x:t.cvs[s][0],y:t.cvs[s][1]};s+=t.lim[0];var h={x:t.cvs[s][0],y:t.cvs[s][1]};s--;var u={x:t.cvs[s][0],y:t.cvs[s][1]},d=r.x*r.y,c=r.x*(1-r.y),f=(1-r.x)*(1-r.y),g=(1-r.x)*r.y;return o.x=f*a.x+c*l.x+g*u.x+d*h.x,o.y=f*a.y+c*l.y+g*u.y+d*h.y,o}function Dm(i,t,e){var n=e.x,r=e.y,o=e.z||0,s,a,l,h={};for(l=0;l<3;l++)if(!(t&&l===2&&e.z===void 0))switch(l===0?(s=n,"ew".indexOf(i.axis[l])!==-1?a="x":a="y"):l===1?(s=r,"ns".indexOf(i.axis[l])!==-1?a="y":a="x"):(s=o,a="z"),i.axis[l]){case"e":h[a]=s;break;case"w":h[a]=-s;break;case"n":h[a]=s;break;case"s":h[a]=-s;break;case"u":e[a]!==void 0&&(h.z=s);break;case"d":e[a]!==void 0&&(h.z=-s);break;default:return null}return h}function Lm(i){var t={x:i[0],y:i[1]};return i.length>2&&(t.z=i[2]),i.length>3&&(t.m=i[3]),t}function d2(i){Fm(i.x),Fm(i.y)}function Fm(i){if(typeof Number.isFinite=="function"){if(Number.isFinite(i))return;throw new TypeError("coordinates must be finite numbers")}if(typeof i!="number"||i!==i||!isFinite(i))throw new TypeError("coordinates must be finite numbers")}function c2(i,t){return(i.datum.datum_type===hr||i.datum.datum_type===ur)&&t.datumCode!=="WGS84"||(t.datum.datum_type===hr||t.datum.datum_type===ur)&&i.datumCode!=="WGS84"}function Qa(i,t,e,n){var r;if(Array.isArray(e)&&(e=Lm(e)),d2(e),i.datum&&t.datum&&c2(i,t)&&(r=new yi("WGS84"),e=Qa(i,r,e,n),i=r),n&&i.axis!=="enu"&&(e=Dm(i,!1,e)),i.projName==="longlat")e={x:e.x*he,y:e.y*he,z:e.z||0};else if(i.to_meter&&(e={x:e.x*i.to_meter,y:e.y*i.to_meter,z:e.z||0}),e=i.inverse(e),!e)return;if(i.from_greenwich&&(e.x+=i.from_greenwich),e=h2(i.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*vi,y:e.y*vi,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?Dm(t,!0,e):e}var Om=yi("WGS84");function Qu(i,t,e,n){var r,o,s;return Array.isArray(e)?(r=Qa(i,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof r.z=="number"?[r.x,r.y,r.z].concat(e.splice(3)):[r.x,r.y,e[2]].concat(e.splice(3)):[r.x,r.y].concat(e.splice(2)):[r.x,r.y]):(o=Qa(i,t,e,n),s=Object.keys(e),s.length===2||s.forEach(function(a){if(typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(a==="x"||a==="y"||a==="z")return}else if(a==="x"||a==="y")return;o[a]=e[a]}),o)}function Nm(i){return i instanceof yi?i:i.oProj?i.oProj:yi(i)}function Le(i,t,e){i=Nm(i);var n=!1,r;return typeof t>"u"?(t=i,i=Om,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=Om,n=!0),t=Nm(t),e?Qu(i,t,e):(r={forward:function(o,s){return Qu(i,t,o,s)},inverse:function(o,s){return Qu(t,i,o,s)}},n&&(r.oProj=t),r)}var Gm=6,jm="AJSAJS",Bm="AFAFAF",Hr=65,Fe=73,Je=79,hs=86,us=90;const f2={forward:Um,inverse:g2,toPoint:Vm};function Um(i,t){return t=t||5,v2(m2({lat:i[1],lon:i[0]}),t)}function g2(i){var t=ed($m(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Vm(i){var t=ed($m(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function td(i){return i*(Math.PI/180)}function qm(i){return 180*(i/Math.PI)}function m2(i){var t=i.lat,e=i.lon,n=6378137,r=.00669438,o=.9996,s,a,l,h,u,d,c,f=td(t),g=td(e),m,p;p=Math.floor((e+180)/6)+1,e===180&&(p=60),t>=56&&t<64&&e>=3&&e<12&&(p=32),t>=72&&t<84&&(e>=0&&e<9?p=31:e>=9&&e<21?p=33:e>=21&&e<33?p=35:e>=33&&e<42&&(p=37)),s=(p-1)*6-180+3,m=td(s),a=r/(1-r),l=n/Math.sqrt(1-r*Math.sin(f)*Math.sin(f)),h=Math.tan(f)*Math.tan(f),u=a*Math.cos(f)*Math.cos(f),d=Math.cos(f)*(g-m),c=n*((1-r/4-3*r*r/64-5*r*r*r/256)*f-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*f)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*f)-35*r*r*r/3072*Math.sin(6*f));var _=o*l*(d+(1-h+u)*d*d*d/6+(5-18*h+h*h+72*u-58*a)*d*d*d*d*d/120)+5e5,v=o*(c+l*Math.tan(f)*(d*d/2+(5-h+9*u+4*u*u)*d*d*d*d/24+(61-58*h+h*h+600*u-330*a)*d*d*d*d*d*d/720));return t<0&&(v+=1e7),{northing:Math.round(v),easting:Math.round(_),zoneNumber:p,zoneLetter:p2(t)}}function ed(i){var t=i.northing,e=i.easting,n=i.zoneLetter,r=i.zoneNumber;if(r<0||r>60)return null;var o=.9996,s=6378137,a=.00669438,l,h=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a)),u,d,c,f,g,m,p,_,v,y=e-5e5,x=t;n<"N"&&(x-=1e7),p=(r-1)*6-180+3,l=a/(1-a),m=x/o,_=m/(s*(1-a/4-3*a*a/64-5*a*a*a/256)),v=_+(3*h/2-27*h*h*h/32)*Math.sin(2*_)+(21*h*h/16-55*h*h*h*h/32)*Math.sin(4*_)+151*h*h*h/96*Math.sin(6*_),u=s/Math.sqrt(1-a*Math.sin(v)*Math.sin(v)),d=Math.tan(v)*Math.tan(v),c=l*Math.cos(v)*Math.cos(v),f=s*(1-a)/Math.pow(1-a*Math.sin(v)*Math.sin(v),1.5),g=y/(u*o);var k=v-u*Math.tan(v)/f*(g*g/2-(5+3*d+10*c-4*c*c-9*l)*g*g*g*g/24+(61+90*d+298*c+45*d*d-252*l-3*c*c)*g*g*g*g*g*g/720);k=qm(k);var w=(g-(1+2*d+c)*g*g*g/6+(5-2*c+28*d-3*c*c+8*l+24*d*d)*g*g*g*g*g/120)/Math.cos(v);w=p+qm(w);var M;if(i.accuracy){var E=ed({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});M={top:E.lat,right:E.lon,bottom:k,left:w}}else M={lat:k,lon:w};return M}function p2(i){var t="Z";return 84>=i&&i>=72?t="X":72>i&&i>=64?t="W":64>i&&i>=56?t="V":56>i&&i>=48?t="U":48>i&&i>=40?t="T":40>i&&i>=32?t="S":32>i&&i>=24?t="R":24>i&&i>=16?t="Q":16>i&&i>=8?t="P":8>i&&i>=0?t="N":0>i&&i>=-8?t="M":-8>i&&i>=-16?t="L":-16>i&&i>=-24?t="K":-24>i&&i>=-32?t="J":-32>i&&i>=-40?t="H":-40>i&&i>=-48?t="G":-48>i&&i>=-56?t="F":-56>i&&i>=-64?t="E":-64>i&&i>=-72?t="D":-72>i&&i>=-80&&(t="C"),t}function v2(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+_2(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function _2(i,t,e){var n=Xm(e),r=Math.floor(i/1e5),o=Math.floor(t/1e5)%20;return y2(r,o,n)}function Xm(i){var t=i%Gm;return t===0&&(t=Gm),t}function y2(i,t,e){var n=e-1,r=jm.charCodeAt(n),o=Bm.charCodeAt(n),s=r+i-1,a=o+t,l=!1;s>us&&(s=s-us+Hr-1,l=!0),(s===Fe||r<Fe&&s>Fe||(s>Fe||r<Fe)&&l)&&s++,(s===Je||r<Je&&s>Je||(s>Je||r<Je)&&l)&&(s++,s===Fe&&s++),s>us&&(s=s-us+Hr-1),a>hs?(a=a-hs+Hr-1,l=!0):l=!1,(a===Fe||o<Fe&&a>Fe||(a>Fe||o<Fe)&&l)&&a++,(a===Je||o<Je&&a>Je||(a>Je||o<Je)&&l)&&(a++,a===Fe&&a++),a>hs&&(a=a-hs+Hr-1);var h=String.fromCharCode(s)+String.fromCharCode(a);return h}function $m(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var t=i.length,e=null,n="",r,o=0;!/[A-Z]/.test(r=i.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+i;n+=r,o++}var s=parseInt(n,10);if(o===0||o+3>t)throw"MGRSPoint bad conversion from: "+i;var a=i.charAt(o++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O")throw"MGRSPoint zone letter "+a+" not handled: "+i;e=i.substring(o,o+=2);for(var l=Xm(s),h=x2(e.charAt(0),l),u=b2(e.charAt(1),l);u<k2(a);)u+=2e6;var d=t-o;if(d%2!==0)throw`MGRSPoint has to have an even number
|
79
|
+
`;fetch(fw({key:t,service:"WFS",request:"GetFeature",version:"2.0.0",typeNames:"Topography_TopographicArea",propertyName:"TOID,DescriptiveGroup,SHAPE",outputFormat:"GEOJSON",srsName:"urn:ogc:def:crs:EPSG::4326",filter:n,count:1})).then(r=>r.json()).then(r=>{if(!r.features.length)return;const s=r.features[0].properties,a=["TOID","DescriptiveGroup"];Object.keys(s).forEach(u=>a.includes(u)||delete s[u]);const l=new Hn,h=l.readFeatures(r,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});e?h.forEach(u=>{const d=u.getProperties().TOID,c=Ho.getFeatureById(d);c?Ho.removeFeature(c):(u.setId(d),Ho.addFeature(u))}):(Ho.clear(),h.forEach(u=>{const d=u.getProperties().TOID;u.setId(d),Ho.addFeature(u)})),pi.clear(),pi.addFeature(l.readFeature(Ho.getFeatures().reduce((u,d)=>{const c=l.writeFeatureObject(d).geometry;return u?dw(u,c):c},null)))}).catch(r=>console.log(r))}function fw(i){const t=Object.keys(i).map(e=>e+"="+encodeURI(i[e])).join("&");return`${cw}?${t}`}const mw="https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key=",pw="https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key=",vw="https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key=";function _w(i,t){return new Wx({source:t?new Uf({url:mw+t,attributions:[i],attributionsCollapsible:!1,maxZoom:20}):new bk({attributions:[Vf]})})}function yw(i,t){let e=new xx({declutter:!0,source:new Dx({format:new F1,url:pw+t,attributions:[i],attributionsCollapsible:!1})});return t&&fetch(vw+t).then(n=>n.json()).then(n=>_k(e,n,"esri")).catch(n=>console.log(n)),e}function xw(i){const t=Object.keys(i.defs),e=t.length;let n,o;for(n=0;n<e;++n){const r=t[n];if(!Gt(r)){const s=i.defs(r);let a=s.units;!a&&s.projName==="longlat"&&(a="degrees"),dc(new Fs({code:r,axisOrientation:s.axis,metersPerUnit:s.to_meter,units:a}))}}for(n=0;n<e;++n){const r=t[n],s=Gt(r);for(o=0;o<e;++o){const a=t[o],l=Gt(a);if(!tc(r,a))if(i.defs[r]===i.defs[a])Bl([s,l]);else{const h=i(r,a);N0(s,l,gc(s,l,h.forward),gc(l,s,h.inverse))}}}}function bw(i){i("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),i("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),i("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),i.WGS84=i["EPSG:4326"],i["EPSG:3785"]=i["EPSG:3857"],i.GOOGLE=i["EPSG:3857"],i["EPSG:900913"]=i["EPSG:3857"],i["EPSG:102113"]=i["EPSG:3857"]}var ho=1,uo=2,Va=3,kw=4,$u=5,vm=6378137,ww=6356752314e-3,_m=.0066943799901413165,os=484813681109536e-20,R=Math.PI/2,Mw=.16666666666666666,Cw=.04722222222222222,Ew=.022156084656084655,W=1e-10,he=.017453292519943295,vi=57.29577951308232,Rt=Math.PI/4,rs=Math.PI*2,Ht=3.14159265359,De={};De.greenwich=0,De.lisbon=-9.131906111111,De.paris=2.337229166667,De.bogota=-74.080916666667,De.madrid=-3.687938888889,De.rome=12.452333333333,De.bern=7.439583333333,De.jakarta=106.807719444444,De.ferro=-17.666666666667,De.brussels=4.367975,De.stockholm=18.058277777778,De.athens=23.7163375,De.oslo=10.722916666667;const Sw={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var ym=/[\s_\-\/\(\)]/g;function Cn(i,t){if(i[t])return i[t];for(var e=Object.keys(i),n=t.toLowerCase().replace(ym,""),o=-1,r,s;++o<e.length;)if(r=e[o],s=r.toLowerCase().replace(ym,""),s===n)return i[r]}function Hu(i){var t={},e=i.split("+").map(function(a){return a.trim()}).filter(function(a){return a}).reduce(function(a,l){var h=l.split("=");return h.push(!0),a[h[0].toLowerCase()]=h[1],a},{}),n,o,r,s={proj:"projName",datum:"datumCode",rf:function(a){t.rf=parseFloat(a)},lat_0:function(a){t.lat0=a*he},lat_1:function(a){t.lat1=a*he},lat_2:function(a){t.lat2=a*he},lat_ts:function(a){t.lat_ts=a*he},lon_0:function(a){t.long0=a*he},lon_1:function(a){t.long1=a*he},lon_2:function(a){t.long2=a*he},alpha:function(a){t.alpha=parseFloat(a)*he},gamma:function(a){t.rectified_grid_angle=parseFloat(a)},lonc:function(a){t.longc=a*he},x_0:function(a){t.x0=parseFloat(a)},y_0:function(a){t.y0=parseFloat(a)},k_0:function(a){t.k0=parseFloat(a)},k:function(a){t.k0=parseFloat(a)},a:function(a){t.a=parseFloat(a)},b:function(a){t.b=parseFloat(a)},r_a:function(){t.R_A=!0},zone:function(a){t.zone=parseInt(a,10)},south:function(){t.utmSouth=!0},towgs84:function(a){t.datum_params=a.split(",").map(function(l){return parseFloat(l)})},to_meter:function(a){t.to_meter=parseFloat(a)},units:function(a){t.units=a;var l=Cn(Sw,a);l&&(t.to_meter=l.to_meter)},from_greenwich:function(a){t.from_greenwich=a*he},pm:function(a){var l=Cn(De,a);t.from_greenwich=(l||parseFloat(a))*he},nadgrids:function(a){a==="@null"?t.datumCode="none":t.nadgrids=a},axis:function(a){var l="ewnsud";a.length===3&&l.indexOf(a.substr(0,1))!==-1&&l.indexOf(a.substr(1,1))!==-1&&l.indexOf(a.substr(2,1))!==-1&&(t.axis=a)},approx:function(){t.approx=!0}};for(n in e)o=e[n],n in s?(r=s[n],typeof r=="function"?r(o):t[r]=o):t[n]=o;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var ss=1,xm=2,bm=3,qa=4,km=5,Ku=-1,Tw=/\s/,Iw=/[A-Za-z]/,zw=/[A-Za-z84_]/,$a=/[,\]]/,wm=/[\d\.E\-\+]/;function Oi(i){if(typeof i!="string")throw new Error("not a string");this.text=i.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=ss}Oi.prototype.readCharicter=function(){var i=this.text[this.place++];if(this.state!==qa)for(;Tw.test(i);){if(this.place>=this.text.length)return;i=this.text[this.place++]}switch(this.state){case ss:return this.neutral(i);case xm:return this.keyword(i);case qa:return this.quoted(i);case km:return this.afterquote(i);case bm:return this.number(i);case Ku:return}},Oi.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=qa;return}if($a.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)},Oi.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=ss;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=ss,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Ku);return}},Oi.prototype.number=function(i){if(wm.test(i)){this.word+=i;return}if($a.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)},Oi.prototype.quoted=function(i){if(i==='"'){this.state=km;return}this.word+=i},Oi.prototype.keyword=function(i){if(zw.test(i)){this.word+=i;return}if(i==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=ss;return}if($a.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)},Oi.prototype.neutral=function(i){if(Iw.test(i)){this.word=i,this.state=xm;return}if(i==='"'){this.word="",this.state=qa;return}if(wm.test(i)){this.word=i,this.state=bm;return}if($a.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)},Oi.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Ku)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Rw(i){var t=new Oi(i);return t.output()}function Mm(i,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:i,o=e.reduce(function(r,s){return Ko(s,r),r},n);t&&(i[t]=o)}function Ko(i,t){if(!Array.isArray(i)){t[i]=!0;return}var e=i.shift();if(e==="PARAMETER"&&(e=i.shift()),i.length===1){if(Array.isArray(i[0])){t[e]={},Ko(i[0],t[e]);return}t[e]=i[0];return}if(!i.length){t[e]=!0;return}if(e==="TOWGS84"){t[e]=i;return}if(e==="AXIS"){e in t||(t[e]=[]),t[e].push(i);return}Array.isArray(e)||(t[e]={});var n;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[e]={name:i[0].toLowerCase(),convert:i[1]},i.length===3&&Ko(i[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:i[0],a:i[1],rf:i[2]},i.length===4&&Ko(i[3],t[e]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":i[0]=["name",i[0]],Mm(t,e,i);return;default:for(n=-1;++n<i.length;)if(!Array.isArray(i[n]))return Ko(i,t[e]);return Mm(t,e,i)}}var Aw=.017453292519943295;function Pw(i,t){var e=t[0],n=t[1];!(e in i)&&n in i&&(i[e]=i[n],t.length===3&&(i[e]=t[2](i[e])))}function Fi(i){return i*Aw}function Dw(i){if(i.type==="GEOGCS"?i.projName="longlat":i.type==="LOCAL_CS"?(i.projName="identity",i.local=!0):typeof i.PROJECTION=="object"?i.projName=Object.keys(i.PROJECTION)[0]:i.projName=i.PROJECTION,i.AXIS){for(var t="",e=0,n=i.AXIS.length;e<n;++e){var o=[i.AXIS[e][0].toLowerCase(),i.AXIS[e][1].toLowerCase()];o[0].indexOf("north")!==-1||(o[0]==="y"||o[0]==="lat")&&o[1]==="north"?t+="n":o[0].indexOf("south")!==-1||(o[0]==="y"||o[0]==="lat")&&o[1]==="south"?t+="s":o[0].indexOf("east")!==-1||(o[0]==="x"||o[0]==="lon")&&o[1]==="east"?t+="e":(o[0].indexOf("west")!==-1||(o[0]==="x"||o[0]==="lon")&&o[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(i.axis=t)}i.UNIT&&(i.units=i.UNIT.name.toLowerCase(),i.units==="metre"&&(i.units="meter"),i.UNIT.convert&&(i.type==="GEOGCS"?i.DATUM&&i.DATUM.SPHEROID&&(i.to_meter=i.UNIT.convert*i.DATUM.SPHEROID.a):i.to_meter=i.UNIT.convert));var r=i.GEOGCS;i.type==="GEOGCS"&&(r=i),r&&(r.DATUM?i.datumCode=r.DATUM.name.toLowerCase():i.datumCode=r.name.toLowerCase(),i.datumCode.slice(0,2)==="d_"&&(i.datumCode=i.datumCode.slice(2)),(i.datumCode==="new_zealand_geodetic_datum_1949"||i.datumCode==="new_zealand_1949")&&(i.datumCode="nzgd49"),(i.datumCode==="wgs_1984"||i.datumCode==="world_geodetic_system_1984")&&(i.PROJECTION==="Mercator_Auxiliary_Sphere"&&(i.sphere=!0),i.datumCode="wgs84"),i.datumCode.slice(-6)==="_ferro"&&(i.datumCode=i.datumCode.slice(0,-6)),i.datumCode.slice(-8)==="_jakarta"&&(i.datumCode=i.datumCode.slice(0,-8)),~i.datumCode.indexOf("belge")&&(i.datumCode="rnb72"),r.DATUM&&r.DATUM.SPHEROID&&(i.ellps=r.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),i.ellps.toLowerCase().slice(0,13)==="international"&&(i.ellps="intl"),i.a=r.DATUM.SPHEROID.a,i.rf=parseFloat(r.DATUM.SPHEROID.rf,10)),r.DATUM&&r.DATUM.TOWGS84&&(i.datum_params=r.DATUM.TOWGS84),~i.datumCode.indexOf("osgb_1936")&&(i.datumCode="osgb36"),~i.datumCode.indexOf("osni_1952")&&(i.datumCode="osni52"),(~i.datumCode.indexOf("tm65")||~i.datumCode.indexOf("geodetic_datum_of_1965"))&&(i.datumCode="ire65"),i.datumCode==="ch1903+"&&(i.datumCode="ch1903"),~i.datumCode.indexOf("israel")&&(i.datumCode="isr93")),i.b&&!isFinite(i.b)&&(i.b=i.a);function s(h){var u=i.to_meter||1;return h*u}var a=function(h){return Pw(i,h)},l=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Fi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Fi],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",Fi],["lat0","latitude_of_origin",Fi],["lat0","standard_parallel_1",Fi],["lat1","standard_parallel_1",Fi],["lat2","standard_parallel_2",Fi],["azimuth","Azimuth"],["alpha","azimuth",Fi],["srsCode","name"]];l.forEach(a),!i.long0&&i.longc&&(i.projName==="Albers_Conic_Equal_Area"||i.projName==="Lambert_Azimuthal_Equal_Area")&&(i.long0=i.longc),!i.lat_ts&&i.lat1&&(i.projName==="Stereographic_South_Pole"||i.projName==="Polar Stereographic (variant B)")&&(i.lat0=Fi(i.lat1>0?90:-90),i.lat_ts=i.lat1)}function Cm(i){var t=Rw(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var o={};return Ko(t,o),Dw(o),o}function Se(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?Se[i]=Hu(arguments[1]):Se[i]=Cm(arguments[1]):Se[i]=e}else if(arguments.length===1){if(Array.isArray(i))return i.map(function(n){Array.isArray(n)?Se.apply(t,n):Se(n)});if(typeof i=="string"){if(i in Se)return Se[i]}else"EPSG"in i?Se["EPSG:"+i.EPSG]=i:"ESRI"in i?Se["ESRI:"+i.ESRI]=i:"IAU2000"in i?Se["IAU2000:"+i.IAU2000]=i:console.log(i);return}}bw(Se);function Lw(i){return typeof i=="string"}function Ow(i){return i in Se}var Fw=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Nw(i){return Fw.some(function(t){return i.indexOf(t)>-1})}var Gw=["3857","900913","3785","102113"];function jw(i){var t=Cn(i,"authority");if(!!t){var e=Cn(t,"epsg");return e&&Gw.indexOf(e)>-1}}function Bw(i){var t=Cn(i,"extension");if(!!t)return Cn(t,"proj4")}function Ww(i){return i[0]==="+"}function Zw(i){if(Lw(i)){if(Ow(i))return Se[i];if(Nw(i)){var t=Cm(i);if(jw(t))return Se["EPSG:3857"];var e=Bw(t);return e?Hu(e):t}if(Ww(i))return Hu(i)}else return i}function Em(i,t){i=i||{};var e,n;if(!t)return i;for(n in t)e=t[n],e!==void 0&&(i[n]=e);return i}function _i(i,t,e){var n=i*t;return e/Math.sqrt(1-n*n)}function as(i){return i<0?-1:1}function X(i){return Math.abs(i)<=Ht?i:i-as(i)*rs}function si(i,t,e){var n=i*e,o=.5*i;return n=Math.pow((1-n)/(1+n),o),Math.tan(.5*(R-t))/n}function ls(i,t){for(var e=.5*i,n,o,r=R-2*Math.atan(t),s=0;s<=15;s++)if(n=i*Math.sin(r),o=R-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-r,r+=o,Math.abs(o)<=1e-10)return r;return-9999}function Yw(){var i=this.b/this.a;this.es=1-i*i,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Xw(i){var t=i.x,e=i.y;if(e*vi>90&&e*vi<-90&&t*vi>180&&t*vi<-180)return null;var n,o;if(Math.abs(Math.abs(e)-R)<=W)return null;if(this.sphere)n=this.x0+this.a*this.k0*X(t-this.long0),o=this.y0+this.a*this.k0*Math.log(Math.tan(Rt+.5*e));else{var r=Math.sin(e),s=si(this.e,e,r);n=this.x0+this.a*this.k0*X(t-this.long0),o=this.y0-this.a*this.k0*Math.log(s)}return i.x=n,i.y=o,i}function Uw(i){var t=i.x-this.x0,e=i.y-this.y0,n,o;if(this.sphere)o=R-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var r=Math.exp(-e/(this.a*this.k0));if(o=ls(this.e,r),o===-9999)return null}return n=X(this.long0+t/(this.a*this.k0)),i.x=n,i.y=o,i}var Vw=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const qw={init:Yw,forward:Xw,inverse:Uw,names:Vw};function $w(){}function Sm(i){return i}var Hw=["longlat","identity"],Kw=[qw,{init:$w,forward:Sm,inverse:Sm,names:Hw}],Ha={},Ka=[];function Tm(i,t){var e=Ka.length;return i.names?(Ka[e]=i,i.names.forEach(function(n){Ha[n.toLowerCase()]=e}),this):(console.log(t),!0)}function Jw(i){if(!i)return!1;var t=i.toLowerCase();if(typeof Ha[t]<"u"&&Ka[Ha[t]])return Ka[Ha[t]]}function Qw(){Kw.forEach(Tm)}const t2={start:Qw,add:Tm,get:Jw};var ot={};ot.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},ot.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},ot.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},ot.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},ot.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},ot.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},ot.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},ot.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},ot.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},ot.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},ot.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},ot.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},ot.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},ot.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},ot.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},ot.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},ot.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},ot.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},ot.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},ot.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},ot.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},ot.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},ot.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},ot.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},ot.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},ot.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},ot.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},ot.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},ot.hough={a:6378270,rf:297,ellipseName:"Hough"},ot.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},ot.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},ot.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},ot.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},ot.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},ot.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},ot.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},ot.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},ot.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},ot.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},ot.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},ot.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var e2=ot.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};ot.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function i2(i,t,e,n){var o=i*i,r=t*t,s=(o-r)/o,a=0;n?(i*=1-s*(Mw+s*(Cw+s*Ew)),o=i*i,s=0):a=Math.sqrt(s);var l=(o-r)/r;return{es:s,e:a,ep2:l}}function n2(i,t,e,n,o){if(!i){var r=Cn(ot,n);r||(r=e2),i=r.a,t=r.b,e=r.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)<W)&&(o=!0,t=i),{a:i,b:t,rf:e,sphere:o}}var se={};se.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},se.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},se.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},se.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},se.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},se.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},se.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},se.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},se.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},se.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},se.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},se.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},se.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},se.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},se.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},se.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},se.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function o2(i,t,e,n,o,r,s){var a={};return i===void 0||i==="none"?a.datum_type=$u:a.datum_type=kw,t&&(a.datum_params=t.map(parseFloat),(a.datum_params[0]!==0||a.datum_params[1]!==0||a.datum_params[2]!==0)&&(a.datum_type=ho),a.datum_params.length>3&&(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0)&&(a.datum_type=uo,a.datum_params[3]*=os,a.datum_params[4]*=os,a.datum_params[5]*=os,a.datum_params[6]=a.datum_params[6]/1e6+1)),s&&(a.datum_type=Va,a.grids=s),a.a=e,a.b=n,a.es=o,a.ep2=r,a}var Im={};function r2(i,t){var e=new DataView(t),n=l2(e),o=h2(e,n);o.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var r=u2(e,o,n),s={header:o,subgrids:r};return Im[i]=s,s}function s2(i){if(i===void 0)return null;var t=i.split(",");return t.map(a2)}function a2(i){if(i.length===0)return null;var t=i[0]==="@";return t&&(i=i.slice(1)),i==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:i,mandatory:!t,grid:Im[i]||null,isNull:!1}}function Jo(i){return i/3600*Math.PI/180}function l2(i){var t=i.getInt32(8,!1);return t===11?!1:(t=i.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function h2(i,t){return{nFields:i.getInt32(8,t),nSubgridFields:i.getInt32(24,t),nSubgrids:i.getInt32(40,t),shiftType:Ju(i,56,56+8).trim(),fromSemiMajorAxis:i.getFloat64(120,t),fromSemiMinorAxis:i.getFloat64(136,t),toSemiMajorAxis:i.getFloat64(152,t),toSemiMinorAxis:i.getFloat64(168,t)}}function Ju(i,t,e){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(t,e)))}function u2(i,t,e){for(var n=176,o=[],r=0;r<t.nSubgrids;r++){var s=c2(i,n,e),a=g2(i,n,s,e),l=Math.round(1+(s.upperLongitude-s.lowerLongitude)/s.longitudeInterval),h=Math.round(1+(s.upperLatitude-s.lowerLatitude)/s.latitudeInterval);o.push({ll:[Jo(s.lowerLongitude),Jo(s.lowerLatitude)],del:[Jo(s.longitudeInterval),Jo(s.latitudeInterval)],lim:[l,h],count:s.gridNodeCount,cvs:d2(a)})}return o}function d2(i){return i.map(function(t){return[Jo(t.longitudeShift),Jo(t.latitudeShift)]})}function c2(i,t,e){return{name:Ju(i,t+8,t+16).trim(),parent:Ju(i,t+24,t+24+8).trim(),lowerLatitude:i.getFloat64(t+72,e),upperLatitude:i.getFloat64(t+88,e),lowerLongitude:i.getFloat64(t+104,e),upperLongitude:i.getFloat64(t+120,e),latitudeInterval:i.getFloat64(t+136,e),longitudeInterval:i.getFloat64(t+152,e),gridNodeCount:i.getInt32(t+168,e)}}function g2(i,t,e,n){for(var o=t+176,r=16,s=[],a=0;a<e.gridNodeCount;a++){var l={latitudeShift:i.getFloat32(o+a*r,n),longitudeShift:i.getFloat32(o+a*r+4,n),latitudeAccuracy:i.getFloat32(o+a*r+8,n),longitudeAccuracy:i.getFloat32(o+a*r+12,n)};s.push(l)}return s}function yi(i,t){if(!(this instanceof yi))return new yi(i);t=t||function(h){if(h)throw h};var e=Zw(i);if(typeof e!="object"){t(i);return}var n=yi.projections.get(e.projName);if(!n){t(i);return}if(e.datumCode&&e.datumCode!=="none"){var o=Cn(se,e.datumCode);o&&(e.datum_params=e.datum_params||(o.towgs84?o.towgs84.split(","):null),e.ellps=o.ellipse,e.datumName=o.datumName?o.datumName:e.datumCode)}e.k0=e.k0||1,e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var r=n2(e.a,e.b,e.rf,e.ellps,e.sphere),s=i2(r.a,r.b,r.rf,e.R_A),a=s2(e.nadgrids),l=e.datum||o2(e.datumCode,e.datum_params,r.a,r.b,s.es,s.ep2,a);Em(this,e),Em(this,n),this.a=r.a,this.b=r.b,this.rf=r.rf,this.sphere=r.sphere,this.es=s.es,this.e=s.e,this.ep2=s.ep2,this.datum=l,this.init(),t(null,this)}yi.projections=t2,yi.projections.start();function f2(i,t){return i.datum_type!==t.datum_type||i.a!==t.a||Math.abs(i.es-t.es)>5e-11?!1:i.datum_type===ho?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]:i.datum_type===uo?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]&&i.datum_params[3]===t.datum_params[3]&&i.datum_params[4]===t.datum_params[4]&&i.datum_params[5]===t.datum_params[5]&&i.datum_params[6]===t.datum_params[6]:!0}function zm(i,t,e){var n=i.x,o=i.y,r=i.z?i.z:0,s,a,l,h;if(o<-R&&o>-1.001*R)o=-R;else if(o>R&&o<1.001*R)o=R;else{if(o<-R)return{x:-1/0,y:-1/0,z:i.z};if(o>R)return{x:1/0,y:1/0,z:i.z}}return n>Math.PI&&(n-=2*Math.PI),a=Math.sin(o),h=Math.cos(o),l=a*a,s=e/Math.sqrt(1-t*l),{x:(s+r)*h*Math.cos(n),y:(s+r)*h*Math.sin(n),z:(s*(1-t)+r)*a}}function Rm(i,t,e,n){var o=1e-12,r=o*o,s=30,a,l,h,u,d,c,g,f,m,p,_,v,y,x=i.x,k=i.y,w=i.z?i.z:0,E,M,S;if(a=Math.sqrt(x*x+k*k),l=Math.sqrt(x*x+k*k+w*w),a/e<o){if(E=0,l/e<o)return M=R,S=-n,{x:i.x,y:i.y,z:i.z}}else E=Math.atan2(k,x);h=w/l,u=a/l,d=1/Math.sqrt(1-t*(2-t)*u*u),f=u*(1-t)*d,m=h*d,y=0;do y++,g=e/Math.sqrt(1-t*m*m),S=a*f+w*m-g*(1-t*m*m),c=t*g/(g+S),d=1/Math.sqrt(1-c*(2-c)*u*u),p=u*(1-c)*d,_=h*d,v=_*f-p*m,f=p,m=_;while(v*v>r&&y<s);return M=Math.atan(_/Math.abs(p)),{x:E,y:M,z:S}}function m2(i,t,e){if(t===ho)return{x:i.x+e[0],y:i.y+e[1],z:i.z+e[2]};if(t===uo){var n=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],h=e[6];return{x:h*(i.x-l*i.y+a*i.z)+n,y:h*(l*i.x+i.y-s*i.z)+o,z:h*(-a*i.x+s*i.y+i.z)+r}}}function p2(i,t,e){if(t===ho)return{x:i.x-e[0],y:i.y-e[1],z:i.z-e[2]};if(t===uo){var n=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],h=e[6],u=(i.x-n)/h,d=(i.y-o)/h,c=(i.z-r)/h;return{x:u+l*d-a*c,y:-l*u+d+s*c,z:a*u-s*d+c}}}function Ja(i){return i===ho||i===uo}function v2(i,t,e){if(f2(i,t)||i.datum_type===$u||t.datum_type===$u)return e;var n=i.a,o=i.es;if(i.datum_type===Va){var r=Am(i,!1,e);if(r!==0)return;n=vm,o=_m}var s=t.a,a=t.b,l=t.es;if(t.datum_type===Va&&(s=vm,a=ww,l=_m),o===l&&n===s&&!Ja(i.datum_type)&&!Ja(t.datum_type))return e;if(e=zm(e,o,n),Ja(i.datum_type)&&(e=m2(e,i.datum_type,i.datum_params)),Ja(t.datum_type)&&(e=p2(e,t.datum_type,t.datum_params)),e=Rm(e,l,s,a),t.datum_type===Va){var h=Am(t,!0,e);if(h!==0)return}return e}function Am(i,t,e){if(i.grids===null||i.grids.length===0)return console.log("Grid shift grids not found"),-1;for(var n={x:-e.x,y:e.y},o={x:Number.NaN,y:Number.NaN},r=[],s=0;s<i.grids.length;s++){var a=i.grids[s];if(r.push(a.name),a.isNull){o=n;break}if(a.mandatory,a.grid===null){if(a.mandatory)return console.log("Unable to find mandatory grid '"+a.name+"'"),-1;continue}var l=a.grid.subgrids[0],h=(Math.abs(l.del[1])+Math.abs(l.del[0]))/1e4,u=l.ll[0]-h,d=l.ll[1]-h,c=l.ll[0]+(l.lim[0]-1)*l.del[0]+h,g=l.ll[1]+(l.lim[1]-1)*l.del[1]+h;if(!(d>n.y||u>n.x||g<n.y||c<n.x)&&(o=_2(n,t,l),!isNaN(o.x)))break}return isNaN(o.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*vi+" "+n.y*vi+" tried: '"+r+"'"),-1):(e.x=-o.x,e.y=o.y,0)}function _2(i,t,e){var n={x:Number.NaN,y:Number.NaN};if(isNaN(i.x))return n;var o={x:i.x,y:i.y};o.x-=e.ll[0],o.y-=e.ll[1],o.x=X(o.x-Math.PI)+Math.PI;var r=Pm(o,e);if(t){if(isNaN(r.x))return n;r.x=o.x-r.x,r.y=o.y-r.y;var s=9,a=1e-12,l,h;do{if(h=Pm(r,e),isNaN(h.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:o.x-(h.x+r.x),y:o.y-(h.y+r.y)},r.x+=l.x,r.y+=l.y}while(s--&&Math.abs(l.x)>a&&Math.abs(l.y)>a);if(s<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=X(r.x+e.ll[0]),n.y=r.y+e.ll[1]}else isNaN(r.x)||(n.x=i.x+r.x,n.y=i.y+r.y);return n}function Pm(i,t){var e={x:i.x/t.del[0],y:i.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},o={x:e.x-1*n.x,y:e.y-1*n.y},r={x:Number.NaN,y:Number.NaN},s;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return r;s=n.y*t.lim[0]+n.x;var a={x:t.cvs[s][0],y:t.cvs[s][1]};s++;var l={x:t.cvs[s][0],y:t.cvs[s][1]};s+=t.lim[0];var h={x:t.cvs[s][0],y:t.cvs[s][1]};s--;var u={x:t.cvs[s][0],y:t.cvs[s][1]},d=o.x*o.y,c=o.x*(1-o.y),g=(1-o.x)*(1-o.y),f=(1-o.x)*o.y;return r.x=g*a.x+c*l.x+f*u.x+d*h.x,r.y=g*a.y+c*l.y+f*u.y+d*h.y,r}function Dm(i,t,e){var n=e.x,o=e.y,r=e.z||0,s,a,l,h={};for(l=0;l<3;l++)if(!(t&&l===2&&e.z===void 0))switch(l===0?(s=n,"ew".indexOf(i.axis[l])!==-1?a="x":a="y"):l===1?(s=o,"ns".indexOf(i.axis[l])!==-1?a="y":a="x"):(s=r,a="z"),i.axis[l]){case"e":h[a]=s;break;case"w":h[a]=-s;break;case"n":h[a]=s;break;case"s":h[a]=-s;break;case"u":e[a]!==void 0&&(h.z=s);break;case"d":e[a]!==void 0&&(h.z=-s);break;default:return null}return h}function Lm(i){var t={x:i[0],y:i[1]};return i.length>2&&(t.z=i[2]),i.length>3&&(t.m=i[3]),t}function y2(i){Om(i.x),Om(i.y)}function Om(i){if(typeof Number.isFinite=="function"){if(Number.isFinite(i))return;throw new TypeError("coordinates must be finite numbers")}if(typeof i!="number"||i!==i||!isFinite(i))throw new TypeError("coordinates must be finite numbers")}function x2(i,t){return(i.datum.datum_type===ho||i.datum.datum_type===uo)&&t.datumCode!=="WGS84"||(t.datum.datum_type===ho||t.datum.datum_type===uo)&&i.datumCode!=="WGS84"}function Qa(i,t,e,n){var o;if(Array.isArray(e)&&(e=Lm(e)),y2(e),i.datum&&t.datum&&x2(i,t)&&(o=new yi("WGS84"),e=Qa(i,o,e,n),i=o),n&&i.axis!=="enu"&&(e=Dm(i,!1,e)),i.projName==="longlat")e={x:e.x*he,y:e.y*he,z:e.z||0};else if(i.to_meter&&(e={x:e.x*i.to_meter,y:e.y*i.to_meter,z:e.z||0}),e=i.inverse(e),!e)return;if(i.from_greenwich&&(e.x+=i.from_greenwich),e=v2(i.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*vi,y:e.y*vi,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?Dm(t,!0,e):e}var Fm=yi("WGS84");function Qu(i,t,e,n){var o,r,s;return Array.isArray(e)?(o=Qa(i,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof o.z=="number"?[o.x,o.y,o.z].concat(e.splice(3)):[o.x,o.y,e[2]].concat(e.splice(3)):[o.x,o.y].concat(e.splice(2)):[o.x,o.y]):(r=Qa(i,t,e,n),s=Object.keys(e),s.length===2||s.forEach(function(a){if(typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(a==="x"||a==="y"||a==="z")return}else if(a==="x"||a==="y")return;r[a]=e[a]}),r)}function Nm(i){return i instanceof yi?i:i.oProj?i.oProj:yi(i)}function Le(i,t,e){i=Nm(i);var n=!1,o;return typeof t>"u"?(t=i,i=Fm,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=Fm,n=!0),t=Nm(t),e?Qu(i,t,e):(o={forward:function(r,s){return Qu(i,t,r,s)},inverse:function(r,s){return Qu(t,i,r,s)}},n&&(o.oProj=t),o)}var Gm=6,jm="AJSAJS",Bm="AFAFAF",Qo=65,Oe=73,Je=79,hs=86,us=90;const b2={forward:Wm,inverse:k2,toPoint:Zm};function Wm(i,t){return t=t||5,C2(w2({lat:i[1],lon:i[0]}),t)}function k2(i){var t=ed(Um(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Zm(i){var t=ed(Um(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function td(i){return i*(Math.PI/180)}function Ym(i){return 180*(i/Math.PI)}function w2(i){var t=i.lat,e=i.lon,n=6378137,o=.00669438,r=.9996,s,a,l,h,u,d,c,g=td(t),f=td(e),m,p;p=Math.floor((e+180)/6)+1,e===180&&(p=60),t>=56&&t<64&&e>=3&&e<12&&(p=32),t>=72&&t<84&&(e>=0&&e<9?p=31:e>=9&&e<21?p=33:e>=21&&e<33?p=35:e>=33&&e<42&&(p=37)),s=(p-1)*6-180+3,m=td(s),a=o/(1-o),l=n/Math.sqrt(1-o*Math.sin(g)*Math.sin(g)),h=Math.tan(g)*Math.tan(g),u=a*Math.cos(g)*Math.cos(g),d=Math.cos(g)*(f-m),c=n*((1-o/4-3*o*o/64-5*o*o*o/256)*g-(3*o/8+3*o*o/32+45*o*o*o/1024)*Math.sin(2*g)+(15*o*o/256+45*o*o*o/1024)*Math.sin(4*g)-35*o*o*o/3072*Math.sin(6*g));var _=r*l*(d+(1-h+u)*d*d*d/6+(5-18*h+h*h+72*u-58*a)*d*d*d*d*d/120)+5e5,v=r*(c+l*Math.tan(g)*(d*d/2+(5-h+9*u+4*u*u)*d*d*d*d/24+(61-58*h+h*h+600*u-330*a)*d*d*d*d*d*d/720));return t<0&&(v+=1e7),{northing:Math.round(v),easting:Math.round(_),zoneNumber:p,zoneLetter:M2(t)}}function ed(i){var t=i.northing,e=i.easting,n=i.zoneLetter,o=i.zoneNumber;if(o<0||o>60)return null;var r=.9996,s=6378137,a=.00669438,l,h=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a)),u,d,c,g,f,m,p,_,v,y=e-5e5,x=t;n<"N"&&(x-=1e7),p=(o-1)*6-180+3,l=a/(1-a),m=x/r,_=m/(s*(1-a/4-3*a*a/64-5*a*a*a/256)),v=_+(3*h/2-27*h*h*h/32)*Math.sin(2*_)+(21*h*h/16-55*h*h*h*h/32)*Math.sin(4*_)+151*h*h*h/96*Math.sin(6*_),u=s/Math.sqrt(1-a*Math.sin(v)*Math.sin(v)),d=Math.tan(v)*Math.tan(v),c=l*Math.cos(v)*Math.cos(v),g=s*(1-a)/Math.pow(1-a*Math.sin(v)*Math.sin(v),1.5),f=y/(u*r);var k=v-u*Math.tan(v)/g*(f*f/2-(5+3*d+10*c-4*c*c-9*l)*f*f*f*f/24+(61+90*d+298*c+45*d*d-252*l-3*c*c)*f*f*f*f*f*f/720);k=Ym(k);var w=(f-(1+2*d+c)*f*f*f/6+(5-2*c+28*d-3*c*c+8*l+24*d*d)*f*f*f*f*f/120)/Math.cos(v);w=p+Ym(w);var E;if(i.accuracy){var M=ed({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});E={top:M.lat,right:M.lon,bottom:k,left:w}}else E={lat:k,lon:w};return E}function M2(i){var t="Z";return 84>=i&&i>=72?t="X":72>i&&i>=64?t="W":64>i&&i>=56?t="V":56>i&&i>=48?t="U":48>i&&i>=40?t="T":40>i&&i>=32?t="S":32>i&&i>=24?t="R":24>i&&i>=16?t="Q":16>i&&i>=8?t="P":8>i&&i>=0?t="N":0>i&&i>=-8?t="M":-8>i&&i>=-16?t="L":-16>i&&i>=-24?t="K":-24>i&&i>=-32?t="J":-32>i&&i>=-40?t="H":-40>i&&i>=-48?t="G":-48>i&&i>=-56?t="F":-56>i&&i>=-64?t="E":-64>i&&i>=-72?t="D":-72>i&&i>=-80&&(t="C"),t}function C2(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+E2(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function E2(i,t,e){var n=Xm(e),o=Math.floor(i/1e5),r=Math.floor(t/1e5)%20;return S2(o,r,n)}function Xm(i){var t=i%Gm;return t===0&&(t=Gm),t}function S2(i,t,e){var n=e-1,o=jm.charCodeAt(n),r=Bm.charCodeAt(n),s=o+i-1,a=r+t,l=!1;s>us&&(s=s-us+Qo-1,l=!0),(s===Oe||o<Oe&&s>Oe||(s>Oe||o<Oe)&&l)&&s++,(s===Je||o<Je&&s>Je||(s>Je||o<Je)&&l)&&(s++,s===Oe&&s++),s>us&&(s=s-us+Qo-1),a>hs?(a=a-hs+Qo-1,l=!0):l=!1,(a===Oe||r<Oe&&a>Oe||(a>Oe||r<Oe)&&l)&&a++,(a===Je||r<Je&&a>Je||(a>Je||r<Je)&&l)&&(a++,a===Oe&&a++),a>hs&&(a=a-hs+Qo-1);var h=String.fromCharCode(s)+String.fromCharCode(a);return h}function Um(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var t=i.length,e=null,n="",o,r=0;!/[A-Z]/.test(o=i.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+i;n+=o,r++}var s=parseInt(n,10);if(r===0||r+3>t)throw"MGRSPoint bad conversion from: "+i;var a=i.charAt(r++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O")throw"MGRSPoint zone letter "+a+" not handled: "+i;e=i.substring(r,r+=2);for(var l=Xm(s),h=T2(e.charAt(0),l),u=I2(e.charAt(1),l);u<z2(a);)u+=2e6;var d=t-r;if(d%2!==0)throw`MGRSPoint has to have an even number
|
80
80
|
of digits after the zone letter and two 100km letters - front
|
81
81
|
half for easting meters, second half for
|
82
|
-
northing meters`+i;var c=d/2,f=0,g=0,m,p,_,v,y;return c>0&&(m=1e5/Math.pow(10,c),p=i.substring(o,o+c),f=parseFloat(p)*m,_=i.substring(o+c),g=parseFloat(_)*m),v=f+h,y=g+u,{easting:v,northing:y,zoneLetter:a,zoneNumber:s,accuracy:m}}function x2(i,t){for(var e=jm.charCodeAt(t-1),n=1e5,r=!1;e!==i.charCodeAt(0);){if(e++,e===Fe&&e++,e===Je&&e++,e>us){if(r)throw"Bad character: "+i;e=Hr,r=!0}n+=1e5}return n}function b2(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=Bm.charCodeAt(t-1),n=0,r=!1;e!==i.charCodeAt(0);){if(e++,e===Fe&&e++,e===Je&&e++,e>hs){if(r)throw"Bad character: "+i;e=Hr,r=!0}n+=1e5}return n}function k2(i){var t;switch(i){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+i}function Jr(i,t,e){if(!(this instanceof Jr))return new Jr(i,t,e);if(Array.isArray(i))this.x=i[0],this.y=i[1],this.z=i[2]||0;else if(typeof i=="object")this.x=i.x,this.y=i.y,this.z=i.z||0;else if(typeof i=="string"&&typeof t>"u"){var n=i.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=i,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Jr.fromMGRS=function(i){return new Jr(Vm(i))},Jr.prototype.toMGRS=function(i){return Um([this.x,this.y],i)};var w2=1,E2=.25,Wm=.046875,Ym=.01953125,Km=.01068115234375,M2=.75,C2=.46875,S2=.013020833333333334,T2=.007120768229166667,z2=.3645833333333333,I2=.005696614583333333,R2=.3076171875;function Zm(i){var t=[];t[0]=w2-i*(E2+i*(Wm+i*(Ym+i*Km))),t[1]=i*(M2-i*(Wm+i*(Ym+i*Km)));var e=i*i;return t[2]=e*(C2-i*(S2+i*T2)),e*=i,t[3]=e*(z2-i*I2),t[4]=e*i*R2,t}function tl(i,t,e,n){return e*=t,t*=t,n[0]*i-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var P2=20;function Hm(i,t,e){for(var n=1/(1-t),r=i,o=P2;o;--o){var s=Math.sin(r),a=1-t*s*s;if(a=(tl(r,s,Math.cos(r),e)-i)*(a*Math.sqrt(a))*n,r-=a,Math.abs(a)<B)return r}return r}function A2(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Zm(this.es),this.ml0=tl(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function D2(i){var t=i.x,e=i.y,n=X(t-this.long0),r,o,s,a=Math.sin(e),l=Math.cos(e);if(this.es){var u=l*n,d=Math.pow(u,2),c=this.ep2*Math.pow(l,2),f=Math.pow(c,2),g=Math.abs(l)>B?Math.tan(e):0,m=Math.pow(g,2),p=Math.pow(m,2);r=1-this.es*Math.pow(a,2),u=u/Math.sqrt(r);var _=tl(e,a,l,this.en);o=this.a*(this.k0*u*(1+d/6*(1-m+c+d/20*(5-18*m+p+14*c-58*m*c+d/42*(61+179*p-p*m-479*m)))))+this.x0,s=this.a*(this.k0*(_-this.ml0+a*n*u/2*(1+d/12*(5-m+9*c+4*f+d/30*(61+p-58*m+270*c-330*m*c+d/56*(1385+543*p-p*m-3111*m))))))+this.y0}else{var h=l*Math.sin(n);if(Math.abs(Math.abs(h)-1)<B)return 93;if(o=.5*this.a*this.k0*Math.log((1+h)/(1-h))+this.x0,s=l*Math.cos(n)/Math.sqrt(1-Math.pow(h,2)),h=Math.abs(s),h>=1){if(h-1>B)return 93;s=0}else s=Math.acos(s);e<0&&(s=-s),s=this.a*this.k0*(s-this.lat0)+this.y0}return i.x=o,i.y=s,i}function L2(i){var t,e,n,r,o=(i.x-this.x0)*(1/this.a),s=(i.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+s/this.k0,e=Hm(t,this.es,this.en),Math.abs(e)<R){var d=Math.sin(e),c=Math.cos(e),f=Math.abs(c)>B?Math.tan(e):0,g=this.ep2*Math.pow(c,2),m=Math.pow(g,2),p=Math.pow(f,2),_=Math.pow(p,2);t=1-this.es*Math.pow(d,2);var v=o*Math.sqrt(t)/this.k0,y=Math.pow(v,2);t=t*f,n=e-t*y/(1-this.es)*.5*(1-y/12*(5+3*p-9*g*p+g-4*m-y/30*(61+90*p-252*g*p+45*_+46*g-y/56*(1385+3633*p+4095*_+1574*_*p)))),r=X(this.long0+v*(1-y/6*(1+2*p+g-y/20*(5+28*p+24*_+8*g*p+6*g-y/42*(61+662*p+1320*_+720*_*p))))/c)}else n=R*as(s),r=0;else{var a=Math.exp(o/this.k0),l=.5*(a-1/a),h=this.lat0+s/this.k0,u=Math.cos(h);t=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(l,2))),n=Math.asin(t),s<0&&(n=-n),l===0&&u===0?r=0:r=X(Math.atan2(l,u)+this.long0)}return i.x=r,i.y=n,i}var F2=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const el={init:A2,forward:D2,inverse:L2,names:F2};function Jm(i){var t=Math.exp(i);return t=(t-1/t)/2,t}function ai(i,t){i=Math.abs(i),t=Math.abs(t);var e=Math.max(i,t),n=Math.min(i,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function O2(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function N2(i){var t=Math.abs(i);return t=O2(t*(1+t/(ai(1,t)+1))),i<0?-t:t}function id(i,t){for(var e=2*Math.cos(2*t),n=i.length-1,r=i[n],o=0,s;--n>=0;)s=-o+e*r+i[n],o=r,r=s;return t+s*Math.sin(2*t)}function G2(i,t){for(var e=2*Math.cos(t),n=i.length-1,r=i[n],o=0,s;--n>=0;)s=-o+e*r+i[n],o=r,r=s;return Math.sin(t)*s}function j2(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function Qm(i,t,e){for(var n=Math.sin(t),r=Math.cos(t),o=Jm(e),s=j2(e),a=2*r*s,l=-2*n*o,h=i.length-1,u=i[h],d=0,c=0,f=0,g,m;--h>=0;)g=c,m=d,c=u,d=f,u=-g+a*c-l*d+i[h],f=-m+l*c+a*d;return a=n*s,l=r*o,[a*u-l*f,a*f+l*u]}function B2(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(el.init.apply(this),this.forward=el.forward,this.inverse=el.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var i=this.es/(1+Math.sqrt(1-this.es)),t=i/(2-i),e=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),e=e*t,this.cgb[1]=e*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=e*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),e=e*t,this.cgb[2]=e*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=e*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),e=e*t,this.cgb[3]=e*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=e*(1237/630+t*(-12/5+t*(-24832/14175))),e=e*t,this.cgb[4]=e*(4174/315+t*(-144838/6237)),this.cbg[4]=e*(-734/315+t*(109598/31185)),e=e*t,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(1/4+e*(1/64+e/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=e*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=e*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),e=e*t,this.utg[2]=e*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=e*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),e=e*t,this.utg[3]=e*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=e*(49561/161280+t*(-179/168+t*(6601661/7257600))),e=e*t,this.utg[4]=e*(-4583/161280+t*(108847/3991680)),this.gtu[4]=e*(34729/80640+t*(-3418889/1995840)),e=e*t,this.utg[5]=e*(-20648693/638668800),this.gtu[5]=e*(212378941/319334400);var n=id(this.cbg,this.lat0);this.Zb=-this.Qn*(n+G2(this.gtu,2*n))}function U2(i){var t=X(i.x-this.long0),e=i.y;e=id(this.cbg,e);var n=Math.sin(e),r=Math.cos(e),o=Math.sin(t),s=Math.cos(t);e=Math.atan2(n,s*r),t=Math.atan2(o*r,ai(n,r*s)),t=N2(Math.tan(t));var a=Qm(this.gtu,2*e,2*t);e=e+a[0],t=t+a[1];var l,h;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,h=this.a*(this.Qn*e+this.Zb)+this.y0):(l=1/0,h=1/0),i.x=l,i.y=h,i}function V2(i){var t=(i.x-this.x0)*(1/this.a),e=(i.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,r;if(Math.abs(t)<=2.623395162778){var o=Qm(this.utg,2*e,2*t);e=e+o[0],t=t+o[1],t=Math.atan(Jm(t));var s=Math.sin(e),a=Math.cos(e),l=Math.sin(t),h=Math.cos(t);e=Math.atan2(s*h,ai(l,h*a)),t=Math.atan2(l,h*a),n=X(t+this.long0),r=id(this.cgb,e)}else n=1/0,r=1/0;return i.x=n,i.y=r,i}var q2=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"];const il={init:B2,forward:U2,inverse:V2,names:q2};function X2(i,t){if(i===void 0){if(i=Math.floor((X(t)+Math.PI)*30/Math.PI)+1,i<0)return 0;if(i>60)return 60}return i}var $2="etmerc";function W2(){var i=X2(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*he,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,il.init.apply(this),this.forward=il.forward,this.inverse=il.inverse}var Y2=["Universal Transverse Mercator System","utm"];const K2={init:W2,names:Y2,dependsOn:$2};function nd(i,t){return Math.pow((1-i)/(1+i),t)}var Z2=20;function H2(){var i=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*i*i),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(i/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Rt)/(Math.pow(Math.tan(.5*this.lat0+Rt),this.C)*nd(this.e*i,this.ratexp))}function J2(i){var t=i.x,e=i.y;return i.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+Rt),this.C)*nd(this.e*Math.sin(e),this.ratexp))-R,i.x=this.C*t,i}function Q2(i){for(var t=1e-14,e=i.x/this.C,n=i.y,r=Math.pow(Math.tan(.5*n+Rt)/this.K,1/this.C),o=Z2;o>0&&(n=2*Math.atan(r*nd(this.e*Math.sin(i.y),-.5*this.e))-R,!(Math.abs(n-i.y)<t));--o)i.y=n;return o?(i.x=e,i.y=n,i):null}var t5=["gauss"];const rd={init:H2,forward:J2,inverse:Q2,names:t5};function e5(){rd.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function i5(i){var t,e,n,r;return i.x=X(i.x-this.long0),rd.forward.apply(this,[i]),t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*n),i.x=r*e*Math.sin(i.x),i.y=r*(this.cosc0*t-this.sinc0*e*n),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function n5(i){var t,e,n,r,o;if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,o=Math.sqrt(i.x*i.x+i.y*i.y)){var s=2*Math.atan2(o,this.R2);t=Math.sin(s),e=Math.cos(s),r=Math.asin(e*this.sinc0+i.y*t*this.cosc0/o),n=Math.atan2(i.x*t,o*this.cosc0*e-i.y*this.sinc0*t)}else r=this.phic0,n=0;return i.x=n,i.y=r,rd.inverse.apply(this,[i]),i.x=X(i.x+this.long0),i}var r5=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const o5={init:e5,forward:i5,inverse:n5,names:r5};function s5(i,t,e){return t*=e,Math.tan(.5*(R+i))*Math.pow((1-t)/(1+t),.5*e)}function a5(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&(this.k0=.5*(1+as(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=B&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&(this.k0=.5*this.cons*_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/si(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=_i(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-R,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function l5(i){var t=i.x,e=i.y,n=Math.sin(e),r=Math.cos(e),o,s,a,l,h,u,d=X(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=B&&Math.abs(e+this.lat0)<=B?(i.x=NaN,i.y=NaN,i):this.sphere?(o=2*this.k0/(1+this.sinlat0*n+this.coslat0*r*Math.cos(d)),i.x=this.a*o*r*Math.sin(d)+this.x0,i.y=this.a*o*(this.coslat0*n-this.sinlat0*r*Math.cos(d))+this.y0,i):(s=2*Math.atan(this.ssfn_(e,n,this.e))-R,l=Math.cos(s),a=Math.sin(s),Math.abs(this.coslat0)<=B?(h=si(this.e,e*this.con,this.con*n),u=2*this.a*this.k0*h/this.cons,i.x=this.x0+u*Math.sin(t-this.long0),i.y=this.y0-this.con*u*Math.cos(t-this.long0),i):(Math.abs(this.sinlat0)<B?(o=2*this.a*this.k0/(1+l*Math.cos(d)),i.y=o*a):(o=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*l*Math.cos(d))),i.y=o*(this.cosX0*a-this.sinX0*l*Math.cos(d))+this.y0),i.x=o*l*Math.sin(d)+this.x0,i))}function h5(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,r,o,s=Math.sqrt(i.x*i.x+i.y*i.y);if(this.sphere){var a=2*Math.atan(s/(2*this.a*this.k0));return t=this.long0,e=this.lat0,s<=B?(i.x=t,i.y=e,i):(e=Math.asin(Math.cos(a)*this.sinlat0+i.y*Math.sin(a)*this.coslat0/s),Math.abs(this.coslat0)<B?this.lat0>0?t=X(this.long0+Math.atan2(i.x,-1*i.y)):t=X(this.long0+Math.atan2(i.x,i.y)):t=X(this.long0+Math.atan2(i.x*Math.sin(a),s*this.coslat0*Math.cos(a)-i.y*this.sinlat0*Math.sin(a))),i.x=t,i.y=e,i)}else if(Math.abs(this.coslat0)<=B){if(s<=B)return e=this.lat0,t=this.long0,i.x=t,i.y=e,i;i.x*=this.con,i.y*=this.con,n=s*this.cons/(2*this.a*this.k0),e=this.con*ls(this.e,n),t=this.con*X(this.con*this.long0+Math.atan2(i.x,-1*i.y))}else r=2*Math.atan(s*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,s<=B?o=this.X0:(o=Math.asin(Math.cos(r)*this.sinX0+i.y*Math.sin(r)*this.cosX0/s),t=X(this.long0+Math.atan2(i.x*Math.sin(r),s*this.cosX0*Math.cos(r)-i.y*this.sinX0*Math.sin(r)))),e=-1*ls(this.e,Math.tan(.5*(R+o)));return i.x=t,i.y=e,i}var u5=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];const d5={init:a5,forward:l5,inverse:h5,names:u5,ssfn_:s5};function c5(){var i=this.lat0;this.lambda0=this.long0;var t=Math.sin(i),e=this.a,n=this.rf,r=1/n,o=2*r-Math.pow(r,2),s=this.e=Math.sqrt(o);this.R=this.k0*e*Math.sqrt(1-o)/(1-o*Math.pow(t,2)),this.alpha=Math.sqrt(1+o/(1-o)*Math.pow(Math.cos(i),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+i/2)),h=Math.log((1+s*t)/(1-s*t));this.K=a-this.alpha*l+this.alpha*s/2*h}function f5(i){var t=Math.log(Math.tan(Math.PI/4-i.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(i.y))/(1-this.e*Math.sin(i.y))),n=-this.alpha*(t+e)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(i.x-this.lambda0),s=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(o))),a=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(o));return i.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,i.x=this.R*s+this.x0,i}function g5(i){for(var t=i.x-this.x0,e=i.y-this.y0,n=t/this.R,r=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),s=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),a=this.lambda0+s/this.alpha,l=0,h=o,u=-1e3,d=0;Math.abs(h-u)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),u=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return i.x=a,i.y=h,i}var m5=["somerc"];const p5={init:c5,forward:f5,inverse:g5,names:m5};var Qr=1e-7;function v5(i){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof i.PROJECTION=="object"?Object.keys(i.PROJECTION)[0]:i.PROJECTION;return"no_uoff"in i||"no_off"in i||t.indexOf(e)!==-1}function _5(){var i,t,e,n,r,o,s,a,l,h,u=0,d,c=0,f=0,g=0,m=0,p=0,_=0;this.no_off=v5(this),this.no_rot="no_rot"in this;var v=!1;"alpha"in this&&(v=!0);var y=!1;if("rectified_grid_angle"in this&&(y=!0),v&&(_=this.alpha),y&&(u=this.rectified_grid_angle*he),v||y)c=this.longc;else if(f=this.long1,m=this.lat1,g=this.long2,p=this.lat2,Math.abs(m-p)<=Qr||(i=Math.abs(m))<=Qr||Math.abs(i-R)<=Qr||Math.abs(Math.abs(this.lat0)-R)<=Qr||Math.abs(Math.abs(p)-R)<=Qr)throw new Error;var x=1-this.es;t=Math.sqrt(x),Math.abs(this.lat0)>B?(a=Math.sin(this.lat0),e=Math.cos(this.lat0),i=1-this.es*a*a,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/x),this.A=this.B*this.k0*t/i,n=this.B*t/(e*Math.sqrt(i)),r=n*n-1,r<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=n,this.E*=Math.pow(si(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=r=1),v||y?(v?(d=Math.asin(Math.sin(_)/n),y||(u=_)):(d=u,_=Math.asin(n*Math.sin(d))),this.lam0=c-Math.asin(.5*(r-1/r)*Math.tan(d))/this.B):(o=Math.pow(si(this.e,m,Math.sin(m)),this.B),s=Math.pow(si(this.e,p,Math.sin(p)),this.B),r=this.E/o,l=(s-o)/(s+o),h=this.E*this.E,h=(h-s*o)/(h+s*o),i=f-g,i<-Math.pi?g-=os:i>Math.pi&&(g+=os),this.lam0=X(.5*(f+g)-Math.atan(h*Math.tan(.5*this.B*(f-g))/l)/this.B),d=Math.atan(2*Math.sin(this.B*X(f-this.lam0))/(r-1/r)),u=_=Math.asin(n*Math.sin(d))),this.singam=Math.sin(d),this.cosgam=Math.cos(d),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(_))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(Rt-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(Rt+r))}function y5(i){var t={},e,n,r,o,s,a,l,h;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-R)>B){if(s=this.E/Math.pow(si(this.e,i.y,Math.sin(i.y)),this.B),a=1/s,e=.5*(s-a),n=.5*(s+a),o=Math.sin(this.B*i.x),r=(e*this.singam-o*this.cosgam)/n,Math.abs(Math.abs(r)-1)<B)throw new Error;h=.5*this.ArB*Math.log((1-r)/(1+r)),a=Math.cos(this.B*i.x),Math.abs(a)<Qr?l=this.A*i.x:l=this.ArB*Math.atan2(e*this.cosgam+o*this.singam,a)}else h=i.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*i.y;return this.no_rot?(t.x=l,t.y=h):(l-=this.u_0,t.x=h*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-h*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function x5(i){var t,e,n,r,o,s,a,l={};if(i.x=(i.x-this.x0)*(1/this.a),i.y=(i.y-this.y0)*(1/this.a),this.no_rot?(e=i.y,t=i.x):(e=i.x*this.cosrot-i.y*this.sinrot,t=i.y*this.cosrot+i.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),r=.5*(n-1/n),o=.5*(n+1/n),s=Math.sin(this.BrA*t),a=(s*this.cosgam+r*this.singam)/o,Math.abs(Math.abs(a)-1)<B)l.x=0,l.y=a<0?-R:R;else{if(l.y=this.E/Math.sqrt((1+a)/(1-a)),l.y=ls(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(r*this.cosgam-s*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var b5=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const k5={init:_5,forward:y5,inverse:x5,names:b5};function w5(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<B)){var i=this.b/this.a;this.e=Math.sqrt(1-i*i);var t=Math.sin(this.lat1),e=Math.cos(this.lat1),n=_i(this.e,t,e),r=si(this.e,this.lat1,t),o=Math.sin(this.lat2),s=Math.cos(this.lat2),a=_i(this.e,o,s),l=si(this.e,this.lat2,o),h=si(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>B?this.ns=Math.log(n/a)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function E5(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=B&&(e=as(e)*(R-2*B));var n=Math.abs(Math.abs(e)-R),r,o;if(n>B)r=si(this.e,e,Math.sin(e)),o=this.a*this.f0*Math.pow(r,this.ns);else{if(n=e*this.ns,n<=0)return null;o=0}var s=this.ns*X(t-this.long0);return i.x=this.k0*(o*Math.sin(s))+this.x0,i.y=this.k0*(this.rh-o*Math.cos(s))+this.y0,i}function M5(i){var t,e,n,r,o,s=(i.x-this.x0)/this.k0,a=this.rh-(i.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(s*s+a*a),e=1):(t=-Math.sqrt(s*s+a*a),e=-1);var l=0;if(t!==0&&(l=Math.atan2(e*s,e*a)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),r=ls(this.e,n),r===-9999)return null}else r=-R;return o=X(l/this.ns+this.long0),i.x=o,i.y=r,i}var C5=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const S5={init:w5,forward:E5,inverse:M5,names:C5};function T5(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function z5(i){var t,e,n,r,o,s,a,l=i.x,h=i.y,u=X(l-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),n=-u*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),o=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(r)),s=this.n*o,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),i.y=a*Math.cos(s)/1,i.x=a*Math.sin(s)/1,this.czech||(i.y*=-1,i.x*=-1),i}function I5(i){var t,e,n,r,o,s,a,l,h=i.x;i.x=i.y,i.y=h,this.czech||(i.y*=-1,i.x*=-1),s=Math.sqrt(i.x*i.x+i.y*i.y),o=Math.atan2(i.y,i.x),r=o/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),e=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(t)),i.x=this.long0-e/this.alfa,a=t,l=0;var u=0;do i.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-i.y)<1e-10&&(l=1),a=i.y,u+=1;while(l===0&&u<15);return u>=15?null:i}var R5=["Krovak","krovak"];const P5={init:T5,forward:z5,inverse:I5,names:R5};function Te(i,t,e,n,r){return i*r-t*Math.sin(2*r)+e*Math.sin(4*r)-n*Math.sin(6*r)}function ds(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function cs(i){return .375*i*(1+.25*i*(1+.46875*i))}function fs(i){return .05859375*i*i*(1+.75*i)}function gs(i){return i*i*i*(35/3072)}function to(i,t,e){var n=t*e;return i/Math.sqrt(1-n*n)}function eo(i){return Math.abs(i)<R?i:i-as(i)*Math.PI}function nl(i,t,e,n,r){var o,s;o=i/t;for(var a=0;a<15;a++)if(s=(i-(t*o-e*Math.sin(2*o)+n*Math.sin(4*o)-r*Math.sin(6*o)))/(t-2*e*Math.cos(2*o)+4*n*Math.cos(4*o)-6*r*Math.cos(6*o)),o+=s,Math.abs(s)<=1e-10)return o;return NaN}function A5(){this.sphere||(this.e0=ds(this.es),this.e1=cs(this.es),this.e2=fs(this.es),this.e3=gs(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0))}function D5(i){var t,e,n=i.x,r=i.y;if(n=X(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(n)),e=this.a*(Math.atan2(Math.tan(r),Math.cos(n))-this.lat0);else{var o=Math.sin(r),s=Math.cos(r),a=to(this.a,this.e,o),l=Math.tan(r)*Math.tan(r),h=n*Math.cos(r),u=h*h,d=this.es*s*s/(1-this.es),c=this.a*Te(this.e0,this.e1,this.e2,this.e3,r);t=a*h*(1-u*l*(1/6-(8-l+8*d)*u/120)),e=c-this.ml0+a*o/s*u*(.5+(5-l+6*d)*u/24)}return i.x=t+this.x0,i.y=e+this.y0,i}function L5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,r;if(this.sphere){var o=e+this.lat0;n=Math.asin(Math.sin(o)*Math.cos(t)),r=Math.atan2(Math.tan(t),Math.cos(o))}else{var s=this.ml0/this.a+e,a=nl(s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-R)<=B)return i.x=this.long0,i.y=R,e<0&&(i.y*=-1),i;var l=to(this.a,this.e,Math.sin(a)),h=l*l*l/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(a),2),d=t*this.a/l,c=d*d;n=a-l*Math.tan(a)/h*d*d*(.5-(1+3*u)*d*d/24),r=d*(1-c*(u/3+(1+3*u)*u*c/15))/Math.cos(a)}return i.x=X(r+this.long0),i.y=eo(n),i}var F5=["Cassini","Cassini_Soldner","cass"];const O5={init:A5,forward:D5,inverse:L5,names:F5};function Cn(i,t){var e;return i>1e-7?(e=i*t,(1-i*i)*(t/(1-e*e)-.5/i*Math.log((1-e)/(1+e)))):2*t}var N5=1,G5=2,j5=3,B5=4;function U5(){var i=Math.abs(this.lat0);if(Math.abs(i-R)<B?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<B?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=Cn(this.e,1),this.mmf=.5/(1-this.es),this.apa=H5(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Cn(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function V5(i){var t,e,n,r,o,s,a,l,h,u,d=i.x,c=i.y;if(d=X(d-this.long0),this.sphere){if(o=Math.sin(c),u=Math.cos(c),n=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+u*n:1+this.sinph0*o+this.cosph0*u*n,e<=B)return null;e=Math.sqrt(2/e),t=e*u*Math.sin(d),e*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(c+this.lat0)<B)return null;e=Rt-c*.5,e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)),t=e*Math.sin(d),e*=n}}else{switch(a=0,l=0,h=0,n=Math.cos(d),r=Math.sin(d),o=Math.sin(c),s=Cn(this.e,o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(a=s/this.qp,l=Math.sqrt(1-a*a)),this.mode){case this.OBLIQ:h=1+this.sinb1*a+this.cosb1*l*n;break;case this.EQUIT:h=1+l*n;break;case this.N_POLE:h=R+c,s=this.qp-s;break;case this.S_POLE:h=c-R,s=this.qp+s;break}if(Math.abs(h)<B)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),this.mode===this.OBLIQ?e=this.ymf*h*(this.cosb1*a-this.sinb1*l*n):e=(h=Math.sqrt(2/(1+l*n)))*a*this.ymf,t=this.xmf*h*l*r;break;case this.N_POLE:case this.S_POLE:s>=0?(t=(h=Math.sqrt(s))*r,e=n*(this.mode===this.S_POLE?h:-h)):t=e=0;break}}return i.x=this.a*t+this.x0,i.y=this.a*e+this.y0,i}function q5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,r,o,s,a,l,h;if(this.sphere){var u=0,d,c=0;if(d=Math.sqrt(t*t+e*e),r=d*.5,r>1)return null;switch(r=2*Math.asin(r),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(c=Math.sin(r),u=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(d)<=B?0:Math.asin(e*c/d),t*=c,e=u*d;break;case this.OBLIQ:r=Math.abs(d)<=B?this.lat0:Math.asin(u*this.sinph0+e*c*this.cosph0/d),t*=c*this.cosph0,e=(u-Math.sin(r)*this.sinph0)*d;break;case this.N_POLE:e=-e,r=R-r;break;case this.S_POLE:r-=R;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,l=Math.sqrt(t*t+e*e),l<B)return i.x=this.long0,i.y=this.lat0,i;s=2*Math.asin(.5*l/this.rq),o=Math.cos(s),t*=s=Math.sin(s),this.mode===this.OBLIQ?(h=o*this.sinb1+e*s*this.cosb1/l,a=this.qp*h,e=l*this.cosb1*o-e*this.sinb1*s):(h=e*s/l,a=this.qp*h,e=l*o)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),a=t*t+e*e,!a)return i.x=this.long0,i.y=this.lat0,i;h=1-a/this.qp,this.mode===this.S_POLE&&(h=-h)}n=Math.atan2(t,e),r=J5(Math.asin(h),this.apa)}return i.x=X(this.long0+n),i.y=r,i}var X5=.3333333333333333,$5=.17222222222222222,W5=.10257936507936508,Y5=.06388888888888888,K5=.0664021164021164,Z5=.016415012942191543;function H5(i){var t,e=[];return e[0]=i*X5,t=i*i,e[0]+=t*$5,e[1]=t*Y5,t*=i,e[0]+=t*W5,e[1]+=t*K5,e[2]=t*Z5,e}function J5(i,t){var e=i+i;return i+t[0]*Math.sin(e)+t[1]*Math.sin(e+e)+t[2]*Math.sin(e+e+e)}var Q5=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const tE={init:U5,forward:V5,inverse:q5,names:Q5,S_POLE:N5,N_POLE:G5,EQUIT:j5,OBLIQ:B5};function Sn(i){return Math.abs(i)>1&&(i=i>1?1:-1),Math.asin(i)}function eE(){Math.abs(this.lat1+this.lat2)<B||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=_i(this.e3,this.sin_po,this.cos_po),this.qs1=Cn(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=_i(this.e3,this.sin_po,this.cos_po),this.qs2=Cn(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Cn(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>B?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function iE(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=Cn(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*X(t-this.long0),s=r*Math.sin(o)+this.x0,a=this.rh-r*Math.cos(o)+this.y0;return i.x=s,i.y=a,i}function nE(i){var t,e,n,r,o,s;return i.x-=this.x0,i.y=this.rh-i.y+this.y0,this.ns0>=0?(t=Math.sqrt(i.x*i.x+i.y*i.y),n=1):(t=-Math.sqrt(i.x*i.x+i.y*i.y),n=-1),r=0,t!==0&&(r=Math.atan2(n*i.x,n*i.y)),n=t*this.ns0/this.a,this.sphere?s=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,s=this.phi1z(this.e3,e)),o=X(r/this.ns0+this.long0),i.x=o,i.y=s,i}function rE(i,t){var e,n,r,o,s,a=Sn(.5*t);if(i<B)return a;for(var l=i*i,h=1;h<=25;h++)if(e=Math.sin(a),n=Math.cos(a),r=i*e,o=1-r*r,s=.5*o*o/n*(t/(1-l)-e/o+.5/i*Math.log((1-r)/(1+r))),a=a+s,Math.abs(s)<=1e-7)return a;return null}var oE=["Albers_Conic_Equal_Area","Albers","aea"];const sE={init:eE,forward:iE,inverse:nE,names:oE,phi1z:rE};function aE(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function lE(i){var t,e,n,r,o,s,a,l,h=i.x,u=i.y;return n=X(h-this.long0),t=Math.sin(u),e=Math.cos(u),r=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*r,o=1,s>0||Math.abs(s)<=B?(a=this.x0+this.a*o*e*Math.sin(n)/s,l=this.y0+this.a*o*(this.cos_p14*t-this.sin_p14*e*r)/s):(a=this.x0+this.infinity_dist*e*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*r)),i.x=a,i.y=l,i}function hE(i){var t,e,n,r,o,s;return i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,(t=Math.sqrt(i.x*i.x+i.y*i.y))?(r=Math.atan2(t,this.rc),e=Math.sin(r),n=Math.cos(r),s=Sn(n*this.sin_p14+i.y*e*this.cos_p14/t),o=Math.atan2(i.x*e,t*this.cos_p14*n-i.y*this.sin_p14*e),o=X(this.long0+o)):(s=this.phic0,o=0),i.x=o,i.y=s,i}var uE=["gnom"];const dE={init:aE,forward:lE,inverse:hE,names:uE};function cE(i,t){var e=1-(1-i*i)/(2*i)*Math.log((1-i)/(1+i));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*R:R;for(var n=Math.asin(.5*t),r,o,s,a,l=0;l<30;l++)if(o=Math.sin(n),s=Math.cos(n),a=i*o,r=Math.pow(1-a*a,2)/(2*s)*(t/(1-i*i)-o/(1-a*a)+.5/i*Math.log((1-a)/(1+a))),n+=r,Math.abs(r)<=1e-10)return n;return NaN}function fE(){this.sphere||(this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function gE(i){var t=i.x,e=i.y,n,r,o=X(t-this.long0);if(this.sphere)n=this.x0+this.a*o*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var s=Cn(this.e,Math.sin(e));n=this.x0+this.a*this.k0*o,r=this.y0+this.a*s*.5/this.k0}return i.x=n,i.y=r,i}function mE(i){i.x-=this.x0,i.y-=this.y0;var t,e;return this.sphere?(t=X(this.long0+i.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(i.y/this.a*Math.cos(this.lat_ts))):(e=cE(this.e,2*i.y*this.k0/this.a),t=X(this.long0+i.x/(this.a*this.k0))),i.x=t,i.y=e,i}var pE=["cea"];const vE={init:fE,forward:gE,inverse:mE,names:pE};function _E(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function yE(i){var t=i.x,e=i.y,n=X(t-this.long0),r=eo(e-this.lat0);return i.x=this.x0+this.a*n*this.rc,i.y=this.y0+this.a*r,i}function xE(i){var t=i.x,e=i.y;return i.x=X(this.long0+(t-this.x0)/(this.a*this.rc)),i.y=eo(this.lat0+(e-this.y0)/this.a),i}var bE=["Equirectangular","Equidistant_Cylindrical","eqc"];const kE={init:_E,forward:yE,inverse:xE,names:bE};var tp=20;function wE(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ds(this.es),this.e1=cs(this.es),this.e2=fs(this.es),this.e3=gs(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0)}function EE(i){var t=i.x,e=i.y,n,r,o,s=X(t-this.long0);if(o=s*Math.sin(e),this.sphere)Math.abs(e)<=B?(n=this.a*s,r=-1*this.a*this.lat0):(n=this.a*Math.sin(o)/Math.tan(e),r=this.a*(eo(e-this.lat0)+(1-Math.cos(o))/Math.tan(e)));else if(Math.abs(e)<=B)n=this.a*s,r=-1*this.ml0;else{var a=to(this.a,this.e,Math.sin(e))/Math.tan(e);n=a*Math.sin(o),r=this.a*Te(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(o))}return i.x=n+this.x0,i.y=r+this.y0,i}function ME(i){var t,e,n,r,o,s,a,l,h;if(n=i.x-this.x0,r=i.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=B)t=X(n/this.a+this.long0),e=0;else{s=this.lat0+r/this.a,a=n*n/this.a/this.a+s*s,l=s;var u;for(o=tp;o;--o)if(u=Math.tan(l),h=-1*(s*(l*u+1)-l-.5*(l*l+a)*u)/((l-s)/u-1),l+=h,Math.abs(h)<=B){e=l;break}t=X(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(r+this.ml0)<=B)e=0,t=X(this.long0+n/this.a);else{s=(this.ml0+r)/this.a,a=n*n/this.a/this.a+s*s,l=s;var d,c,f,g,m;for(o=tp;o;--o)if(m=this.e*Math.sin(l),d=Math.sqrt(1-m*m)*Math.tan(l),c=this.a*Te(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),g=c/this.a,h=(s*(d*g+1)-g-.5*d*(g*g+a))/(this.es*Math.sin(2*l)*(g*g+a-2*s*g)/(4*d)+(s-g)*(d*f-2/Math.sin(2*l))-f),l-=h,Math.abs(h)<=B){e=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=X(this.long0+Math.asin(n*d/this.a)/Math.sin(e))}return i.x=t,i.y=e,i}var CE=["Polyconic","poly"];const SE={init:wE,forward:EE,inverse:ME,names:CE};function TE(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function zE(i){var t,e=i.x,n=i.y,r=n-this.lat0,o=e-this.long0,s=r/rs*1e-5,a=o,l=1,h=0;for(t=1;t<=10;t++)l=l*s,h=h+this.A[t]*l;var u=h,d=a,c=1,f=0,g,m,p=0,_=0;for(t=1;t<=6;t++)g=c*u-f*d,m=f*u+c*d,c=g,f=m,p=p+this.B_re[t]*c-this.B_im[t]*f,_=_+this.B_im[t]*c+this.B_re[t]*f;return i.x=_*this.a+this.x0,i.y=p*this.a+this.y0,i}function IE(i){var t,e=i.x,n=i.y,r=e-this.x0,o=n-this.y0,s=o/this.a,a=r/this.a,l=1,h=0,u,d,c=0,f=0;for(t=1;t<=6;t++)u=l*s-h*a,d=h*s+l*a,l=u,h=d,c=c+this.C_re[t]*l-this.C_im[t]*h,f=f+this.C_im[t]*l+this.C_re[t]*h;for(var g=0;g<this.iterations;g++){var m=c,p=f,_,v,y=s,x=a;for(t=2;t<=6;t++)_=m*c-p*f,v=p*c+m*f,m=_,p=v,y=y+(t-1)*(this.B_re[t]*m-this.B_im[t]*p),x=x+(t-1)*(this.B_im[t]*m+this.B_re[t]*p);m=1,p=0;var k=this.B_re[1],w=this.B_im[1];for(t=2;t<=6;t++)_=m*c-p*f,v=p*c+m*f,m=_,p=v,k=k+t*(this.B_re[t]*m-this.B_im[t]*p),w=w+t*(this.B_im[t]*m+this.B_re[t]*p);var M=k*k+w*w;c=(y*k+x*w)/M,f=(x*k-y*w)/M}var E=c,S=f,I=1,A=0;for(t=1;t<=9;t++)I=I*E,A=A+this.D[t]*I;var G=this.lat0+A*rs*1e5,P=this.long0+S;return i.x=P,i.y=G,i}var RE=["New_Zealand_Map_Grid","nzmg"];const PE={init:TE,forward:zE,inverse:IE,names:RE};function AE(){}function DE(i){var t=i.x,e=i.y,n=X(t-this.long0),r=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return i.x=r,i.y=o,i}function LE(i){i.x-=this.x0,i.y-=this.y0;var t=X(this.long0+i.x/this.a),e=2.5*(Math.atan(Math.exp(.8*i.y/this.a))-Math.PI/4);return i.x=t,i.y=e,i}var FE=["Miller_Cylindrical","mill"];const OE={init:AE,forward:DE,inverse:LE,names:FE};var NE=20;function GE(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Zm(this.es)}function jE(i){var t,e,n=i.x,r=i.y;if(n=X(n-this.long0),this.sphere){if(!this.m)r=this.n!==1?Math.asin(this.n*Math.sin(r)):r;else for(var o=this.n*Math.sin(r),s=NE;s;--s){var a=(this.m*r+Math.sin(r)-o)/(this.m+Math.cos(r));if(r-=a,Math.abs(a)<B)break}t=this.a*this.C_x*n*(this.m+Math.cos(r)),e=this.a*this.C_y*r}else{var l=Math.sin(r),h=Math.cos(r);e=this.a*tl(r,l,h,this.en),t=this.a*n*h/Math.sqrt(1-this.es*l*l)}return i.x=t,i.y=e,i}function BE(i){var t,e,n,r;return i.x-=this.x0,n=i.x/this.a,i.y-=this.y0,t=i.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=Sn((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Sn(Math.sin(t)/this.n)),n=X(n+this.long0),t=eo(t)):(t=Hm(i.y/this.a,this.es,this.en),r=Math.abs(t),r<R?(r=Math.sin(t),e=this.long0+i.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),n=X(e)):r-B<R&&(n=this.long0)),i.x=n,i.y=t,i}var UE=["Sinusoidal","sinu"];const VE={init:GE,forward:jE,inverse:BE,names:UE};function qE(){}function XE(i){for(var t=i.x,e=i.y,n=X(t-this.long0),r=e,o=Math.PI*Math.sin(e);;){var s=-(r+Math.sin(r)-o)/(1+Math.cos(r));if(r+=s,Math.abs(s)<B)break}r/=2,Math.PI/2-Math.abs(e)<B&&(n=0);var a=.900316316158*this.a*n*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return i.x=a,i.y=l,i}function $E(i){var t,e;i.x-=this.x0,i.y-=this.y0,e=i.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),t=Math.asin(e);var n=X(this.long0+i.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var r=Math.asin(e);return i.x=n,i.y=r,i}var WE=["Mollweide","moll"];const YE={init:qE,forward:XE,inverse:$E,names:WE};function KE(){Math.abs(this.lat1+this.lat2)<B||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ds(this.es),this.e1=cs(this.es),this.e2=fs(this.es),this.e3=gs(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=_i(this.e,this.sinphi,this.cosphi),this.ml1=Te(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<B?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=_i(this.e,this.sinphi,this.cosphi),this.ml2=Te(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Te(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function ZE(i){var t=i.x,e=i.y,n;if(this.sphere)n=this.a*(this.g-e);else{var r=Te(this.e0,this.e1,this.e2,this.e3,e);n=this.a*(this.g-r)}var o=this.ns*X(t-this.long0),s=this.x0+n*Math.sin(o),a=this.y0+this.rh-n*Math.cos(o);return i.x=s,i.y=a,i}function HE(i){i.x-=this.x0,i.y=this.rh-i.y+this.y0;var t,e,n,r;this.ns>=0?(e=Math.sqrt(i.x*i.x+i.y*i.y),t=1):(e=-Math.sqrt(i.x*i.x+i.y*i.y),t=-1);var o=0;if(e!==0&&(o=Math.atan2(t*i.x,t*i.y)),this.sphere)return r=X(this.long0+o/this.ns),n=eo(this.g-e/this.a),i.x=r,i.y=n,i;var s=this.g-e/this.a;return n=nl(s,this.e0,this.e1,this.e2,this.e3),r=X(this.long0+o/this.ns),i.x=r,i.y=n,i}var JE=["Equidistant_Conic","eqdc"];const QE={init:KE,forward:ZE,inverse:HE,names:JE};function tM(){this.R=this.a}function eM(i){var t=i.x,e=i.y,n=X(t-this.long0),r,o;Math.abs(e)<=B&&(r=this.x0+this.R*n,o=this.y0);var s=Sn(2*Math.abs(e/Math.PI));(Math.abs(n)<=B||Math.abs(Math.abs(e)-R)<=B)&&(r=this.x0,e>=0?o=this.y0+Math.PI*this.R*Math.tan(.5*s):o=this.y0+Math.PI*this.R*-Math.tan(.5*s));var a=.5*Math.abs(Math.PI/n-n/Math.PI),l=a*a,h=Math.sin(s),u=Math.cos(s),d=u/(h+u-1),c=d*d,f=d*(2/h-1),g=f*f,m=Math.PI*this.R*(a*(d-g)+Math.sqrt(l*(d-g)*(d-g)-(g+l)*(c-g)))/(g+l);n<0&&(m=-m),r=this.x0+m;var p=l+d;return m=Math.PI*this.R*(f*p-a*Math.sqrt((g+l)*(l+1)-p*p))/(g+l),e>=0?o=this.y0+m:o=this.y0-m,i.x=r,i.y=o,i}function iM(i){var t,e,n,r,o,s,a,l,h,u,d,c,f;return i.x-=this.x0,i.y-=this.y0,d=Math.PI*this.R,n=i.x/d,r=i.y/d,o=n*n+r*r,s=-Math.abs(r)*(1+o),a=s-2*r*r+n*n,l=-2*s+1+2*r*r+o*o,f=r*r/l+(2*a*a*a/l/l/l-9*s*a/l/l)/27,h=(s-a*a/3/l)/l,u=2*Math.sqrt(-h/3),d=3*f/h/u,Math.abs(d)>1&&(d>=0?d=1:d=-1),c=Math.acos(d)/3,i.y>=0?e=(-u*Math.cos(c+Math.PI/3)-a/3/l)*Math.PI:e=-(-u*Math.cos(c+Math.PI/3)-a/3/l)*Math.PI,Math.abs(n)<B?t=this.long0:t=X(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-r*r)+o*o))/2/n),i.x=t,i.y=e,i}var nM=["Van_der_Grinten_I","VanDerGrinten","vandg"];const rM={init:tM,forward:eM,inverse:iM,names:nM};function oM(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function sM(i){var t=i.x,e=i.y,n=Math.sin(i.y),r=Math.cos(i.y),o=X(t-this.long0),s,a,l,h,u,d,c,f,g,m,p,_,v,y,x,k,w,M,E,S,I,A,G;return this.sphere?Math.abs(this.sin_p12-1)<=B?(i.x=this.x0+this.a*(R-e)*Math.sin(o),i.y=this.y0-this.a*(R-e)*Math.cos(o),i):Math.abs(this.sin_p12+1)<=B?(i.x=this.x0+this.a*(R+e)*Math.sin(o),i.y=this.y0+this.a*(R+e)*Math.cos(o),i):(M=this.sin_p12*n+this.cos_p12*r*Math.cos(o),k=Math.acos(M),w=k?k/Math.sin(k):1,i.x=this.x0+this.a*w*r*Math.sin(o),i.y=this.y0+this.a*w*(this.cos_p12*n-this.sin_p12*r*Math.cos(o)),i):(s=ds(this.es),a=cs(this.es),l=fs(this.es),h=gs(this.es),Math.abs(this.sin_p12-1)<=B?(u=this.a*Te(s,a,l,h,R),d=this.a*Te(s,a,l,h,e),i.x=this.x0+(u-d)*Math.sin(o),i.y=this.y0-(u-d)*Math.cos(o),i):Math.abs(this.sin_p12+1)<=B?(u=this.a*Te(s,a,l,h,R),d=this.a*Te(s,a,l,h,e),i.x=this.x0+(u+d)*Math.sin(o),i.y=this.y0+(u+d)*Math.cos(o),i):(c=n/r,f=to(this.a,this.e,this.sin_p12),g=to(this.a,this.e,n),m=Math.atan((1-this.es)*c+this.es*f*this.sin_p12/(g*r)),p=Math.atan2(Math.sin(o),this.cos_p12*Math.tan(m)-this.sin_p12*Math.cos(o)),p===0?E=Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):Math.abs(Math.abs(p)-Math.PI)<=B?E=-Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):E=Math.asin(Math.sin(o)*Math.cos(m)/Math.sin(p)),_=this.e*this.sin_p12/Math.sqrt(1-this.es),v=this.e*this.cos_p12*Math.cos(p)/Math.sqrt(1-this.es),y=_*v,x=v*v,S=E*E,I=S*E,A=I*E,G=A*E,k=f*E*(1-S*x*(1-x)/6+I/8*y*(1-2*x)+A/120*(x*(4-7*x)-3*_*_*(1-7*x))-G/48*y),i.x=this.x0+k*Math.sin(p),i.y=this.y0+k*Math.cos(p),i))}function aM(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,r,o,s,a,l,h,u,d,c,f,g,m,p,_,v,y,x,k,w,M,E;return this.sphere?(t=Math.sqrt(i.x*i.x+i.y*i.y),t>2*R*this.a?void 0:(e=t/this.a,n=Math.sin(e),r=Math.cos(e),o=this.long0,Math.abs(t)<=B?s=this.lat0:(s=Sn(r*this.sin_p12+i.y*n*this.cos_p12/t),a=Math.abs(this.lat0)-R,Math.abs(a)<=B?this.lat0>=0?o=X(this.long0+Math.atan2(i.x,-i.y)):o=X(this.long0-Math.atan2(-i.x,i.y)):o=X(this.long0+Math.atan2(i.x*n,t*this.cos_p12*r-i.y*this.sin_p12*n))),i.x=o,i.y=s,i)):(l=ds(this.es),h=cs(this.es),u=fs(this.es),d=gs(this.es),Math.abs(this.sin_p12-1)<=B?(c=this.a*Te(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),f=c-t,s=nl(f/this.a,l,h,u,d),o=X(this.long0+Math.atan2(i.x,-1*i.y)),i.x=o,i.y=s,i):Math.abs(this.sin_p12+1)<=B?(c=this.a*Te(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),f=t-c,s=nl(f/this.a,l,h,u,d),o=X(this.long0+Math.atan2(i.x,i.y)),i.x=o,i.y=s,i):(t=Math.sqrt(i.x*i.x+i.y*i.y),p=Math.atan2(i.x,i.y),g=to(this.a,this.e,this.sin_p12),_=Math.cos(p),v=this.e*this.cos_p12*_,y=-v*v/(1-this.es),x=3*this.es*(1-y)*this.sin_p12*this.cos_p12*_/(1-this.es),k=t/g,w=k-y*(1+y)*Math.pow(k,3)/6-x*(1+3*y)*Math.pow(k,4)/24,M=1-y*w*w/2-k*w*w*w/6,m=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*_),o=X(this.long0+Math.asin(Math.sin(p)*Math.sin(w)/Math.cos(m))),E=Math.sin(m),s=Math.atan2((E-this.es*M*this.sin_p12)*Math.tan(m),E*(1-this.es)),i.x=o,i.y=s,i))}var lM=["Azimuthal_Equidistant","aeqd"];const hM={init:oM,forward:sM,inverse:aM,names:lM};function uM(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function dM(i){var t,e,n,r,o,s,a,l,h=i.x,u=i.y;return n=X(h-this.long0),t=Math.sin(u),e=Math.cos(u),r=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*r,o=1,(s>0||Math.abs(s)<=B)&&(a=this.a*o*e*Math.sin(n),l=this.y0+this.a*o*(this.cos_p14*t-this.sin_p14*e*r)),i.x=a,i.y=l,i}function cM(i){var t,e,n,r,o,s,a;return i.x-=this.x0,i.y-=this.y0,t=Math.sqrt(i.x*i.x+i.y*i.y),e=Sn(t/this.a),n=Math.sin(e),r=Math.cos(e),s=this.long0,Math.abs(t)<=B?(a=this.lat0,i.x=s,i.y=a,i):(a=Sn(r*this.sin_p14+i.y*n*this.cos_p14/t),o=Math.abs(this.lat0)-R,Math.abs(o)<=B?(this.lat0>=0?s=X(this.long0+Math.atan2(i.x,-i.y)):s=X(this.long0-Math.atan2(-i.x,i.y)),i.x=s,i.y=a,i):(s=X(this.long0+Math.atan2(i.x*n,t*this.cos_p14*r-i.y*this.sin_p14*n)),i.x=s,i.y=a,i))}var fM=["ortho"];const gM={init:uM,forward:dM,inverse:cM,names:fM};var Xt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Pt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function mM(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=R-Rt/2?this.face=Xt.TOP:this.lat0<=-(R-Rt/2)?this.face=Xt.BOTTOM:Math.abs(this.long0)<=Rt?this.face=Xt.FRONT:Math.abs(this.long0)<=R+Rt?this.face=this.long0>0?Xt.RIGHT:Xt.LEFT:this.face=Xt.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function pM(i){var t={x:0,y:0},e,n,r,o,s,a,l={value:0};if(i.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(i.y)):e=i.y,n=i.x,this.face===Xt.TOP)o=R-e,n>=Rt&&n<=R+Rt?(l.value=Pt.AREA_0,r=n-R):n>R+Rt||n<=-(R+Rt)?(l.value=Pt.AREA_1,r=n>0?n-Zt:n+Zt):n>-(R+Rt)&&n<=-Rt?(l.value=Pt.AREA_2,r=n+R):(l.value=Pt.AREA_3,r=n);else if(this.face===Xt.BOTTOM)o=R+e,n>=Rt&&n<=R+Rt?(l.value=Pt.AREA_0,r=-n+R):n<Rt&&n>=-Rt?(l.value=Pt.AREA_1,r=-n):n<-Rt&&n>=-(R+Rt)?(l.value=Pt.AREA_2,r=-n-R):(l.value=Pt.AREA_3,r=n>0?-n+Zt:-n-Zt);else{var h,u,d,c,f,g,m;this.face===Xt.RIGHT?n=io(n,+R):this.face===Xt.BACK?n=io(n,+Zt):this.face===Xt.LEFT&&(n=io(n,-R)),c=Math.sin(e),f=Math.cos(e),g=Math.sin(n),m=Math.cos(n),h=f*m,u=f*g,d=c,this.face===Xt.FRONT?(o=Math.acos(h),r=rl(o,d,u,l)):this.face===Xt.RIGHT?(o=Math.acos(u),r=rl(o,d,-h,l)):this.face===Xt.BACK?(o=Math.acos(-h),r=rl(o,d,-u,l)):this.face===Xt.LEFT?(o=Math.acos(-u),r=rl(o,d,h,l)):(o=r=0,l.value=Pt.AREA_0)}return a=Math.atan(12/Zt*(r+Math.acos(Math.sin(r)*Math.cos(Rt))-R)),s=Math.sqrt((1-Math.cos(o))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(r))))),l.value===Pt.AREA_1?a+=R:l.value===Pt.AREA_2?a+=Zt:l.value===Pt.AREA_3&&(a+=1.5*Zt),t.x=s*Math.cos(a),t.y=s*Math.sin(a),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,i.x=t.x,i.y=t.y,i}function vM(i){var t={lam:0,phi:0},e,n,r,o,s,a,l,h,u,d={value:0};if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,n=Math.atan(Math.sqrt(i.x*i.x+i.y*i.y)),e=Math.atan2(i.y,i.x),i.x>=0&&i.x>=Math.abs(i.y)?d.value=Pt.AREA_0:i.y>=0&&i.y>=Math.abs(i.x)?(d.value=Pt.AREA_1,e-=R):i.x<0&&-i.x>=Math.abs(i.y)?(d.value=Pt.AREA_2,e=e<0?e+Zt:e-Zt):(d.value=Pt.AREA_3,e+=R),u=Zt/12*Math.tan(e),s=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(s),r=Math.cos(e),o=Math.tan(n),l=1-r*r*o*o*(1-Math.cos(Math.atan(1/Math.cos(a)))),l<-1?l=-1:l>1&&(l=1),this.face===Xt.TOP)h=Math.acos(l),t.phi=R-h,d.value===Pt.AREA_0?t.lam=a+R:d.value===Pt.AREA_1?t.lam=a<0?a+Zt:a-Zt:d.value===Pt.AREA_2?t.lam=a-R:t.lam=a;else if(this.face===Xt.BOTTOM)h=Math.acos(l),t.phi=h-R,d.value===Pt.AREA_0?t.lam=-a+R:d.value===Pt.AREA_1?t.lam=-a:d.value===Pt.AREA_2?t.lam=-a-R:t.lam=a<0?-a-Zt:-a+Zt;else{var c,f,g;c=l,u=c*c,u>=1?g=0:g=Math.sqrt(1-u)*Math.sin(a),u+=g*g,u>=1?f=0:f=Math.sqrt(1-u),d.value===Pt.AREA_1?(u=f,f=-g,g=u):d.value===Pt.AREA_2?(f=-f,g=-g):d.value===Pt.AREA_3&&(u=f,f=g,g=-u),this.face===Xt.RIGHT?(u=c,c=-f,f=u):this.face===Xt.BACK?(c=-c,f=-f):this.face===Xt.LEFT&&(u=c,c=f,f=-u),t.phi=Math.acos(-g)-R,t.lam=Math.atan2(f,c),this.face===Xt.RIGHT?t.lam=io(t.lam,-R):this.face===Xt.BACK?t.lam=io(t.lam,-Zt):this.face===Xt.LEFT&&(t.lam=io(t.lam,+R))}if(this.es!==0){var m,p,_;m=t.phi<0?1:0,p=Math.tan(t.phi),_=this.b/Math.sqrt(p*p+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-_*_)/(this.one_minus_f*_)),m&&(t.phi=-t.phi)}return t.lam+=this.long0,i.x=t.lam,i.y=t.phi,i}function rl(i,t,e,n){var r;return i<B?(n.value=Pt.AREA_0,r=0):(r=Math.atan2(t,e),Math.abs(r)<=Rt?n.value=Pt.AREA_0:r>Rt&&r<=R+Rt?(n.value=Pt.AREA_1,r-=R):r>R+Rt||r<=-(R+Rt)?(n.value=Pt.AREA_2,r=r>=0?r-Zt:r+Zt):(n.value=Pt.AREA_3,r+=R)),r}function io(i,t){var e=i+t;return e<-Zt?e+=os:e>+Zt&&(e-=os),e}var _M=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const yM={init:mM,forward:pM,inverse:vM,names:_M};var od=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],ms=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],ep=.8487,ip=1.3523,np=vi/5,xM=1/np,no=18,ol=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},bM=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function kM(i,t,e,n){for(var r=t;n;--n){var o=i(r);if(r-=o,Math.abs(o)<e)break}return r}function wM(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function EM(i){var t=X(i.x-this.long0),e=Math.abs(i.y),n=Math.floor(e*np);n<0?n=0:n>=no&&(n=no-1),e=vi*(e-xM*n);var r={x:ol(od[n],e)*t,y:ol(ms[n],e)};return i.y<0&&(r.y=-r.y),r.x=r.x*this.a*ep+this.x0,r.y=r.y*this.a*ip+this.y0,r}function MM(i){var t={x:(i.x-this.x0)/(this.a*ep),y:Math.abs(i.y-this.y0)/(this.a*ip)};if(t.y>=1)t.x/=od[no][0],t.y=i.y<0?-R:R;else{var e=Math.floor(t.y*no);for(e<0?e=0:e>=no&&(e=no-1);;)if(ms[e][0]>t.y)--e;else if(ms[e+1][0]<=t.y)++e;else break;var n=ms[e],r=5*(t.y-n[0])/(ms[e+1][0]-n[0]);r=kM(function(o){return(ol(n,o)-t.y)/bM(n,o)},r,B,100),t.x/=ol(od[e],r),t.y=(5*e+r)*he,i.y<0&&(t.y=-t.y)}return t.x=X(t.x+this.long0),t}var CM=["Robinson","robin"];const SM={init:wM,forward:EM,inverse:MM,names:CM};function TM(){this.name="geocent"}function zM(i){var t=Im(i,this.es,this.a);return t}function IM(i){var t=Rm(i,this.es,this.a,this.b);return t}var RM=["Geocentric","geocentric","geocent","Geocent"];const PM={init:TM,forward:zM,inverse:IM,names:RM};var pe={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},ps={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function AM(){if(Object.keys(ps).forEach(function(e){if(typeof this[e]>"u")this[e]=ps[e].def;else{if(ps[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);ps[e].num&&(this[e]=parseFloat(this[e]))}ps[e].degrees&&(this[e]=this[e]*he)}.bind(this)),Math.abs(Math.abs(this.lat0)-R)<B?this.mode=this.lat0<0?pe.S_POLE:pe.N_POLE:Math.abs(this.lat0)<B?this.mode=pe.EQUIT:(this.mode=pe.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var i=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(i),this.sw=Math.sin(i)}function DM(i){i.x-=this.long0;var t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),r,o;switch(this.mode){case pe.OBLIQ:o=this.sinph0*t+this.cosph0*e*n;break;case pe.EQUIT:o=e*n;break;case pe.S_POLE:o=-t;break;case pe.N_POLE:o=t;break}switch(o=this.pn1/(this.p-o),r=o*e*Math.sin(i.x),this.mode){case pe.OBLIQ:o*=this.cosph0*t-this.sinph0*e*n;break;case pe.EQUIT:o*=t;break;case pe.N_POLE:o*=-(e*n);break;case pe.S_POLE:o*=e*n;break}var s,a;return s=o*this.cg+r*this.sg,a=1/(s*this.sw*this.h1+this.cw),r=(r*this.cg-o*this.sg)*this.cw*a,o=s*a,i.x=r*this.a,i.y=o*this.a,i}function LM(i){i.x/=this.a,i.y/=this.a;var t={x:i.x,y:i.y},e,n,r;r=1/(this.pn1-i.y*this.sw),e=this.pn1*i.x*r,n=this.pn1*i.y*this.cw*r,i.x=e*this.cg+n*this.sg,i.y=n*this.cg-e*this.sg;var o=ai(i.x,i.y);if(Math.abs(o)<B)t.x=0,t.y=i.y;else{var s,a;switch(a=1-o*o*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/o+o/this.pn1),s=Math.sqrt(1-a*a),this.mode){case pe.OBLIQ:t.y=Math.asin(s*this.sinph0+i.y*a*this.cosph0/o),i.y=(s-this.sinph0*Math.sin(t.y))*o,i.x*=a*this.cosph0;break;case pe.EQUIT:t.y=Math.asin(i.y*a/o),i.y=s*o,i.x*=a;break;case pe.N_POLE:t.y=Math.asin(s),i.y=-i.y;break;case pe.S_POLE:t.y=-Math.asin(s);break}t.x=Math.atan2(i.x,i.y)}return i.x=t.x+this.long0,i.y=t.y,i}var FM=["Tilted_Perspective","tpers"];const OM={init:AM,forward:DM,inverse:LM,names:FM};function NM(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var i=1-this.es,t=1/i;this.radius_p=Math.sqrt(i),this.radius_p2=i,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function GM(i){var t=i.x,e=i.y,n,r,o,s;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var a=this.radius_p/ai(this.radius_p*Math.cos(e),Math.sin(e));if(r=a*Math.cos(t)*Math.cos(e),o=a*Math.sin(t)*Math.cos(e),s=a*Math.sin(e),(this.radius_g-r)*r-o*o-s*s*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;n=this.radius_g-r,this.flip_axis?(i.x=this.radius_g_1*Math.atan(o/ai(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(o/n),i.y=this.radius_g_1*Math.atan(s/ai(o,n)))}else this.shape==="sphere"&&(n=Math.cos(e),r=Math.cos(t)*n,o=Math.sin(t)*n,s=Math.sin(e),n=this.radius_g-r,this.flip_axis?(i.x=this.radius_g_1*Math.atan(o/ai(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(o/n),i.y=this.radius_g_1*Math.atan(s/ai(o,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function jM(i){var t=-1,e=0,n=0,r,o,s,a;if(i.x=i.x/this.a,i.y=i.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*ai(1,n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*ai(1,e));var l=n/this.radius_p;if(r=e*e+l*l+t*t,o=2*this.radius_g*t,s=o*o-4*r*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-o-Math.sqrt(s))/(2*r),t=this.radius_g+a*t,e*=a,n*=a,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t),i.y=Math.atan(this.radius_p_inv2*Math.tan(i.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*Math.sqrt(1+e*e)),r=e*e+n*n+t*t,o=2*this.radius_g*t,s=o*o-4*r*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-o-Math.sqrt(s))/(2*r),t=this.radius_g+a*t,e*=a,n*=a,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t)}return i.x=i.x+this.long0,i}var BM=["Geostationary Satellite View","Geostationary_Satellite","geos"];const UM={init:NM,forward:GM,inverse:jM,names:BM};function VM(i){i.Proj.projections.add(el),i.Proj.projections.add(il),i.Proj.projections.add(K2),i.Proj.projections.add(o5),i.Proj.projections.add(d5),i.Proj.projections.add(p5),i.Proj.projections.add(k5),i.Proj.projections.add(S5),i.Proj.projections.add(P5),i.Proj.projections.add(O5),i.Proj.projections.add(tE),i.Proj.projections.add(sE),i.Proj.projections.add(dE),i.Proj.projections.add(vE),i.Proj.projections.add(kE),i.Proj.projections.add(SE),i.Proj.projections.add(PE),i.Proj.projections.add(OE),i.Proj.projections.add(VE),i.Proj.projections.add(YE),i.Proj.projections.add(QE),i.Proj.projections.add(rM),i.Proj.projections.add(hM),i.Proj.projections.add(gM),i.Proj.projections.add(yM),i.Proj.projections.add(SM),i.Proj.projections.add(PM),i.Proj.projections.add(OM),i.Proj.projections.add(UM)}Le.defaultDatum="WGS84",Le.Proj=yi,Le.WGS84=new Le.Proj("WGS84"),Le.Point=Jr,Le.toPoint=Lm,Le.defs=Se,Le.nadgrid=Hw,Le.transform=Qa,Le.mgrs=f2,Le.version="__VERSION__",VM(Le),Le.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs"),cw(Le);const rp=Gt("EPSG:27700"),_C=Tp``;function qM(i){return new G_({units:"metric",bar:i,steps:4,text:!0,minWidth:140})}const XM=`:host{display:block;width:650px;height:650px;position:relative}.map{height:100%;opacity:0;transition:opacity .25s;overflow:hidden;border:#000000 solid .15em}.map:focus{outline:#ffdd00 solid .25em}.ol-control button{border-radius:0!important;background-color:#2c2c2c!important;cursor:pointer;min-width:44px;min-height:44px;font-size:1.75rem}.ol-control button:hover{background-color:#2c2c2cd9!important}.reset-control{top:114px;left:.5em}#area{position:absolute;bottom:0;left:0;z-index:100;background:white}
|
83
|
-
|
82
|
+
northing meters`+i;var c=d/2,g=0,f=0,m,p,_,v,y;return c>0&&(m=1e5/Math.pow(10,c),p=i.substring(r,r+c),g=parseFloat(p)*m,_=i.substring(r+c),f=parseFloat(_)*m),v=g+h,y=f+u,{easting:v,northing:y,zoneLetter:a,zoneNumber:s,accuracy:m}}function T2(i,t){for(var e=jm.charCodeAt(t-1),n=1e5,o=!1;e!==i.charCodeAt(0);){if(e++,e===Oe&&e++,e===Je&&e++,e>us){if(o)throw"Bad character: "+i;e=Qo,o=!0}n+=1e5}return n}function I2(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=Bm.charCodeAt(t-1),n=0,o=!1;e!==i.charCodeAt(0);){if(e++,e===Oe&&e++,e===Je&&e++,e>hs){if(o)throw"Bad character: "+i;e=Qo,o=!0}n+=1e5}return n}function z2(i){var t;switch(i){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+i}function tr(i,t,e){if(!(this instanceof tr))return new tr(i,t,e);if(Array.isArray(i))this.x=i[0],this.y=i[1],this.z=i[2]||0;else if(typeof i=="object")this.x=i.x,this.y=i.y,this.z=i.z||0;else if(typeof i=="string"&&typeof t>"u"){var n=i.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=i,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}tr.fromMGRS=function(i){return new tr(Zm(i))},tr.prototype.toMGRS=function(i){return Wm([this.x,this.y],i)};var R2=1,A2=.25,Vm=.046875,qm=.01953125,$m=.01068115234375,P2=.75,D2=.46875,L2=.013020833333333334,O2=.007120768229166667,F2=.3645833333333333,N2=.005696614583333333,G2=.3076171875;function Hm(i){var t=[];t[0]=R2-i*(A2+i*(Vm+i*(qm+i*$m))),t[1]=i*(P2-i*(Vm+i*(qm+i*$m)));var e=i*i;return t[2]=e*(D2-i*(L2+i*O2)),e*=i,t[3]=e*(F2-i*N2),t[4]=e*i*G2,t}function tl(i,t,e,n){return e*=t,t*=t,n[0]*i-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var j2=20;function Km(i,t,e){for(var n=1/(1-t),o=i,r=j2;r;--r){var s=Math.sin(o),a=1-t*s*s;if(a=(tl(o,s,Math.cos(o),e)-i)*(a*Math.sqrt(a))*n,o-=a,Math.abs(a)<W)return o}return o}function B2(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Hm(this.es),this.ml0=tl(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function W2(i){var t=i.x,e=i.y,n=X(t-this.long0),o,r,s,a=Math.sin(e),l=Math.cos(e);if(this.es){var u=l*n,d=Math.pow(u,2),c=this.ep2*Math.pow(l,2),g=Math.pow(c,2),f=Math.abs(l)>W?Math.tan(e):0,m=Math.pow(f,2),p=Math.pow(m,2);o=1-this.es*Math.pow(a,2),u=u/Math.sqrt(o);var _=tl(e,a,l,this.en);r=this.a*(this.k0*u*(1+d/6*(1-m+c+d/20*(5-18*m+p+14*c-58*m*c+d/42*(61+179*p-p*m-479*m)))))+this.x0,s=this.a*(this.k0*(_-this.ml0+a*n*u/2*(1+d/12*(5-m+9*c+4*g+d/30*(61+p-58*m+270*c-330*m*c+d/56*(1385+543*p-p*m-3111*m))))))+this.y0}else{var h=l*Math.sin(n);if(Math.abs(Math.abs(h)-1)<W)return 93;if(r=.5*this.a*this.k0*Math.log((1+h)/(1-h))+this.x0,s=l*Math.cos(n)/Math.sqrt(1-Math.pow(h,2)),h=Math.abs(s),h>=1){if(h-1>W)return 93;s=0}else s=Math.acos(s);e<0&&(s=-s),s=this.a*this.k0*(s-this.lat0)+this.y0}return i.x=r,i.y=s,i}function Z2(i){var t,e,n,o,r=(i.x-this.x0)*(1/this.a),s=(i.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+s/this.k0,e=Km(t,this.es,this.en),Math.abs(e)<R){var d=Math.sin(e),c=Math.cos(e),g=Math.abs(c)>W?Math.tan(e):0,f=this.ep2*Math.pow(c,2),m=Math.pow(f,2),p=Math.pow(g,2),_=Math.pow(p,2);t=1-this.es*Math.pow(d,2);var v=r*Math.sqrt(t)/this.k0,y=Math.pow(v,2);t=t*g,n=e-t*y/(1-this.es)*.5*(1-y/12*(5+3*p-9*f*p+f-4*m-y/30*(61+90*p-252*f*p+45*_+46*f-y/56*(1385+3633*p+4095*_+1574*_*p)))),o=X(this.long0+v*(1-y/6*(1+2*p+f-y/20*(5+28*p+24*_+8*f*p+6*f-y/42*(61+662*p+1320*_+720*_*p))))/c)}else n=R*as(s),o=0;else{var a=Math.exp(r/this.k0),l=.5*(a-1/a),h=this.lat0+s/this.k0,u=Math.cos(h);t=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(l,2))),n=Math.asin(t),s<0&&(n=-n),l===0&&u===0?o=0:o=X(Math.atan2(l,u)+this.long0)}return i.x=o,i.y=n,i}var Y2=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const el={init:B2,forward:W2,inverse:Z2,names:Y2};function Jm(i){var t=Math.exp(i);return t=(t-1/t)/2,t}function ai(i,t){i=Math.abs(i),t=Math.abs(t);var e=Math.max(i,t),n=Math.min(i,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function X2(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function U2(i){var t=Math.abs(i);return t=X2(t*(1+t/(ai(1,t)+1))),i<0?-t:t}function id(i,t){for(var e=2*Math.cos(2*t),n=i.length-1,o=i[n],r=0,s;--n>=0;)s=-r+e*o+i[n],r=o,o=s;return t+s*Math.sin(2*t)}function V2(i,t){for(var e=2*Math.cos(t),n=i.length-1,o=i[n],r=0,s;--n>=0;)s=-r+e*o+i[n],r=o,o=s;return Math.sin(t)*s}function q2(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function Qm(i,t,e){for(var n=Math.sin(t),o=Math.cos(t),r=Jm(e),s=q2(e),a=2*o*s,l=-2*n*r,h=i.length-1,u=i[h],d=0,c=0,g=0,f,m;--h>=0;)f=c,m=d,c=u,d=g,u=-f+a*c-l*d+i[h],g=-m+l*c+a*d;return a=n*s,l=o*r,[a*u-l*g,a*g+l*u]}function $2(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(el.init.apply(this),this.forward=el.forward,this.inverse=el.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var i=this.es/(1+Math.sqrt(1-this.es)),t=i/(2-i),e=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),e=e*t,this.cgb[1]=e*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=e*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),e=e*t,this.cgb[2]=e*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=e*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),e=e*t,this.cgb[3]=e*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=e*(1237/630+t*(-12/5+t*(-24832/14175))),e=e*t,this.cgb[4]=e*(4174/315+t*(-144838/6237)),this.cbg[4]=e*(-734/315+t*(109598/31185)),e=e*t,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(1/4+e*(1/64+e/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=e*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=e*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),e=e*t,this.utg[2]=e*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=e*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),e=e*t,this.utg[3]=e*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=e*(49561/161280+t*(-179/168+t*(6601661/7257600))),e=e*t,this.utg[4]=e*(-4583/161280+t*(108847/3991680)),this.gtu[4]=e*(34729/80640+t*(-3418889/1995840)),e=e*t,this.utg[5]=e*(-20648693/638668800),this.gtu[5]=e*(212378941/319334400);var n=id(this.cbg,this.lat0);this.Zb=-this.Qn*(n+V2(this.gtu,2*n))}function H2(i){var t=X(i.x-this.long0),e=i.y;e=id(this.cbg,e);var n=Math.sin(e),o=Math.cos(e),r=Math.sin(t),s=Math.cos(t);e=Math.atan2(n,s*o),t=Math.atan2(r*o,ai(n,o*s)),t=U2(Math.tan(t));var a=Qm(this.gtu,2*e,2*t);e=e+a[0],t=t+a[1];var l,h;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,h=this.a*(this.Qn*e+this.Zb)+this.y0):(l=1/0,h=1/0),i.x=l,i.y=h,i}function K2(i){var t=(i.x-this.x0)*(1/this.a),e=(i.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,o;if(Math.abs(t)<=2.623395162778){var r=Qm(this.utg,2*e,2*t);e=e+r[0],t=t+r[1],t=Math.atan(Jm(t));var s=Math.sin(e),a=Math.cos(e),l=Math.sin(t),h=Math.cos(t);e=Math.atan2(s*h,ai(l,h*a)),t=Math.atan2(l,h*a),n=X(t+this.long0),o=id(this.cgb,e)}else n=1/0,o=1/0;return i.x=n,i.y=o,i}var J2=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"];const il={init:$2,forward:H2,inverse:K2,names:J2};function Q2(i,t){if(i===void 0){if(i=Math.floor((X(t)+Math.PI)*30/Math.PI)+1,i<0)return 0;if(i>60)return 60}return i}var t5="etmerc";function e5(){var i=Q2(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*he,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,il.init.apply(this),this.forward=il.forward,this.inverse=il.inverse}var i5=["Universal Transverse Mercator System","utm"];const n5={init:e5,names:i5,dependsOn:t5};function nd(i,t){return Math.pow((1-i)/(1+i),t)}var o5=20;function r5(){var i=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*i*i),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(i/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Rt)/(Math.pow(Math.tan(.5*this.lat0+Rt),this.C)*nd(this.e*i,this.ratexp))}function s5(i){var t=i.x,e=i.y;return i.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+Rt),this.C)*nd(this.e*Math.sin(e),this.ratexp))-R,i.x=this.C*t,i}function a5(i){for(var t=1e-14,e=i.x/this.C,n=i.y,o=Math.pow(Math.tan(.5*n+Rt)/this.K,1/this.C),r=o5;r>0&&(n=2*Math.atan(o*nd(this.e*Math.sin(i.y),-.5*this.e))-R,!(Math.abs(n-i.y)<t));--r)i.y=n;return r?(i.x=e,i.y=n,i):null}var l5=["gauss"];const od={init:r5,forward:s5,inverse:a5,names:l5};function h5(){od.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function u5(i){var t,e,n,o;return i.x=X(i.x-this.long0),od.forward.apply(this,[i]),t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),o=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*n),i.x=o*e*Math.sin(i.x),i.y=o*(this.cosc0*t-this.sinc0*e*n),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function d5(i){var t,e,n,o,r;if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,r=Math.sqrt(i.x*i.x+i.y*i.y)){var s=2*Math.atan2(r,this.R2);t=Math.sin(s),e=Math.cos(s),o=Math.asin(e*this.sinc0+i.y*t*this.cosc0/r),n=Math.atan2(i.x*t,r*this.cosc0*e-i.y*this.sinc0*t)}else o=this.phic0,n=0;return i.x=n,i.y=o,od.inverse.apply(this,[i]),i.x=X(i.x+this.long0),i}var c5=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const g5={init:h5,forward:u5,inverse:d5,names:c5};function f5(i,t,e){return t*=e,Math.tan(.5*(R+i))*Math.pow((1-t)/(1+t),.5*e)}function m5(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=W&&(this.k0=.5*(1+as(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=W&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=W&&(this.k0=.5*this.cons*_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/si(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=_i(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-R,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function p5(i){var t=i.x,e=i.y,n=Math.sin(e),o=Math.cos(e),r,s,a,l,h,u,d=X(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=W&&Math.abs(e+this.lat0)<=W?(i.x=NaN,i.y=NaN,i):this.sphere?(r=2*this.k0/(1+this.sinlat0*n+this.coslat0*o*Math.cos(d)),i.x=this.a*r*o*Math.sin(d)+this.x0,i.y=this.a*r*(this.coslat0*n-this.sinlat0*o*Math.cos(d))+this.y0,i):(s=2*Math.atan(this.ssfn_(e,n,this.e))-R,l=Math.cos(s),a=Math.sin(s),Math.abs(this.coslat0)<=W?(h=si(this.e,e*this.con,this.con*n),u=2*this.a*this.k0*h/this.cons,i.x=this.x0+u*Math.sin(t-this.long0),i.y=this.y0-this.con*u*Math.cos(t-this.long0),i):(Math.abs(this.sinlat0)<W?(r=2*this.a*this.k0/(1+l*Math.cos(d)),i.y=r*a):(r=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*l*Math.cos(d))),i.y=r*(this.cosX0*a-this.sinX0*l*Math.cos(d))+this.y0),i.x=r*l*Math.sin(d)+this.x0,i))}function v5(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,o,r,s=Math.sqrt(i.x*i.x+i.y*i.y);if(this.sphere){var a=2*Math.atan(s/(2*this.a*this.k0));return t=this.long0,e=this.lat0,s<=W?(i.x=t,i.y=e,i):(e=Math.asin(Math.cos(a)*this.sinlat0+i.y*Math.sin(a)*this.coslat0/s),Math.abs(this.coslat0)<W?this.lat0>0?t=X(this.long0+Math.atan2(i.x,-1*i.y)):t=X(this.long0+Math.atan2(i.x,i.y)):t=X(this.long0+Math.atan2(i.x*Math.sin(a),s*this.coslat0*Math.cos(a)-i.y*this.sinlat0*Math.sin(a))),i.x=t,i.y=e,i)}else if(Math.abs(this.coslat0)<=W){if(s<=W)return e=this.lat0,t=this.long0,i.x=t,i.y=e,i;i.x*=this.con,i.y*=this.con,n=s*this.cons/(2*this.a*this.k0),e=this.con*ls(this.e,n),t=this.con*X(this.con*this.long0+Math.atan2(i.x,-1*i.y))}else o=2*Math.atan(s*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,s<=W?r=this.X0:(r=Math.asin(Math.cos(o)*this.sinX0+i.y*Math.sin(o)*this.cosX0/s),t=X(this.long0+Math.atan2(i.x*Math.sin(o),s*this.cosX0*Math.cos(o)-i.y*this.sinX0*Math.sin(o)))),e=-1*ls(this.e,Math.tan(.5*(R+r)));return i.x=t,i.y=e,i}var _5=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];const y5={init:m5,forward:p5,inverse:v5,names:_5,ssfn_:f5};function x5(){var i=this.lat0;this.lambda0=this.long0;var t=Math.sin(i),e=this.a,n=this.rf,o=1/n,r=2*o-Math.pow(o,2),s=this.e=Math.sqrt(r);this.R=this.k0*e*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(i),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+i/2)),h=Math.log((1+s*t)/(1-s*t));this.K=a-this.alpha*l+this.alpha*s/2*h}function b5(i){var t=Math.log(Math.tan(Math.PI/4-i.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(i.y))/(1-this.e*Math.sin(i.y))),n=-this.alpha*(t+e)+this.K,o=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(i.x-this.lambda0),s=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(r))),a=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(r));return i.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,i.x=this.R*s+this.x0,i}function k5(i){for(var t=i.x-this.x0,e=i.y-this.y0,n=t/this.R,o=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(n)),s=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(o))),a=this.lambda0+s/this.alpha,l=0,h=r,u=-1e3,d=0;Math.abs(h-u)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+r/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),u=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return i.x=a,i.y=h,i}var w5=["somerc"];const M5={init:x5,forward:b5,inverse:k5,names:w5};var er=1e-7;function C5(i){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof i.PROJECTION=="object"?Object.keys(i.PROJECTION)[0]:i.PROJECTION;return"no_uoff"in i||"no_off"in i||t.indexOf(e)!==-1}function E5(){var i,t,e,n,o,r,s,a,l,h,u=0,d,c=0,g=0,f=0,m=0,p=0,_=0;this.no_off=C5(this),this.no_rot="no_rot"in this;var v=!1;"alpha"in this&&(v=!0);var y=!1;if("rectified_grid_angle"in this&&(y=!0),v&&(_=this.alpha),y&&(u=this.rectified_grid_angle*he),v||y)c=this.longc;else if(g=this.long1,m=this.lat1,f=this.long2,p=this.lat2,Math.abs(m-p)<=er||(i=Math.abs(m))<=er||Math.abs(i-R)<=er||Math.abs(Math.abs(this.lat0)-R)<=er||Math.abs(Math.abs(p)-R)<=er)throw new Error;var x=1-this.es;t=Math.sqrt(x),Math.abs(this.lat0)>W?(a=Math.sin(this.lat0),e=Math.cos(this.lat0),i=1-this.es*a*a,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/x),this.A=this.B*this.k0*t/i,n=this.B*t/(e*Math.sqrt(i)),o=n*n-1,o<=0?o=0:(o=Math.sqrt(o),this.lat0<0&&(o=-o)),this.E=o+=n,this.E*=Math.pow(si(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=o=1),v||y?(v?(d=Math.asin(Math.sin(_)/n),y||(u=_)):(d=u,_=Math.asin(n*Math.sin(d))),this.lam0=c-Math.asin(.5*(o-1/o)*Math.tan(d))/this.B):(r=Math.pow(si(this.e,m,Math.sin(m)),this.B),s=Math.pow(si(this.e,p,Math.sin(p)),this.B),o=this.E/r,l=(s-r)/(s+r),h=this.E*this.E,h=(h-s*r)/(h+s*r),i=g-f,i<-Math.pi?f-=rs:i>Math.pi&&(f+=rs),this.lam0=X(.5*(g+f)-Math.atan(h*Math.tan(.5*this.B*(g-f))/l)/this.B),d=Math.atan(2*Math.sin(this.B*X(g-this.lam0))/(o-1/o)),u=_=Math.asin(n*Math.sin(d))),this.singam=Math.sin(d),this.cosgam=Math.cos(d),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(_))),this.lat0<0&&(this.u_0=-this.u_0)),o=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(Rt-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(Rt+o))}function S5(i){var t={},e,n,o,r,s,a,l,h;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-R)>W){if(s=this.E/Math.pow(si(this.e,i.y,Math.sin(i.y)),this.B),a=1/s,e=.5*(s-a),n=.5*(s+a),r=Math.sin(this.B*i.x),o=(e*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(o)-1)<W)throw new Error;h=.5*this.ArB*Math.log((1-o)/(1+o)),a=Math.cos(this.B*i.x),Math.abs(a)<er?l=this.A*i.x:l=this.ArB*Math.atan2(e*this.cosgam+r*this.singam,a)}else h=i.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*i.y;return this.no_rot?(t.x=l,t.y=h):(l-=this.u_0,t.x=h*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-h*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function T5(i){var t,e,n,o,r,s,a,l={};if(i.x=(i.x-this.x0)*(1/this.a),i.y=(i.y-this.y0)*(1/this.a),this.no_rot?(e=i.y,t=i.x):(e=i.x*this.cosrot-i.y*this.sinrot,t=i.y*this.cosrot+i.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),o=.5*(n-1/n),r=.5*(n+1/n),s=Math.sin(this.BrA*t),a=(s*this.cosgam+o*this.singam)/r,Math.abs(Math.abs(a)-1)<W)l.x=0,l.y=a<0?-R:R;else{if(l.y=this.E/Math.sqrt((1+a)/(1-a)),l.y=ls(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(o*this.cosgam-s*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var I5=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const z5={init:E5,forward:S5,inverse:T5,names:I5};function R5(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<W)){var i=this.b/this.a;this.e=Math.sqrt(1-i*i);var t=Math.sin(this.lat1),e=Math.cos(this.lat1),n=_i(this.e,t,e),o=si(this.e,this.lat1,t),r=Math.sin(this.lat2),s=Math.cos(this.lat2),a=_i(this.e,r,s),l=si(this.e,this.lat2,r),h=si(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>W?this.ns=Math.log(n/a)/Math.log(o/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function A5(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=W&&(e=as(e)*(R-2*W));var n=Math.abs(Math.abs(e)-R),o,r;if(n>W)o=si(this.e,e,Math.sin(e)),r=this.a*this.f0*Math.pow(o,this.ns);else{if(n=e*this.ns,n<=0)return null;r=0}var s=this.ns*X(t-this.long0);return i.x=this.k0*(r*Math.sin(s))+this.x0,i.y=this.k0*(this.rh-r*Math.cos(s))+this.y0,i}function P5(i){var t,e,n,o,r,s=(i.x-this.x0)/this.k0,a=this.rh-(i.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(s*s+a*a),e=1):(t=-Math.sqrt(s*s+a*a),e=-1);var l=0;if(t!==0&&(l=Math.atan2(e*s,e*a)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),o=ls(this.e,n),o===-9999)return null}else o=-R;return r=X(l/this.ns+this.long0),i.x=r,i.y=o,i}var D5=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const L5={init:R5,forward:A5,inverse:P5,names:D5};function O5(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function F5(i){var t,e,n,o,r,s,a,l=i.x,h=i.y,u=X(l-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),n=-u*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),r=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(o)),s=this.n*r,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),i.y=a*Math.cos(s)/1,i.x=a*Math.sin(s)/1,this.czech||(i.y*=-1,i.x*=-1),i}function N5(i){var t,e,n,o,r,s,a,l,h=i.x;i.x=i.y,i.y=h,this.czech||(i.y*=-1,i.x*=-1),s=Math.sqrt(i.x*i.x+i.y*i.y),r=Math.atan2(i.y,i.x),o=r/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(o)),e=Math.asin(Math.cos(n)*Math.sin(o)/Math.cos(t)),i.x=this.long0-e/this.alfa,a=t,l=0;var u=0;do i.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-i.y)<1e-10&&(l=1),a=i.y,u+=1;while(l===0&&u<15);return u>=15?null:i}var G5=["Krovak","krovak"];const j5={init:O5,forward:F5,inverse:N5,names:G5};function Te(i,t,e,n,o){return i*o-t*Math.sin(2*o)+e*Math.sin(4*o)-n*Math.sin(6*o)}function ds(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function cs(i){return .375*i*(1+.25*i*(1+.46875*i))}function gs(i){return .05859375*i*i*(1+.75*i)}function fs(i){return i*i*i*(35/3072)}function ir(i,t,e){var n=t*e;return i/Math.sqrt(1-n*n)}function nr(i){return Math.abs(i)<R?i:i-as(i)*Math.PI}function nl(i,t,e,n,o){var r,s;r=i/t;for(var a=0;a<15;a++)if(s=(i-(t*r-e*Math.sin(2*r)+n*Math.sin(4*r)-o*Math.sin(6*r)))/(t-2*e*Math.cos(2*r)+4*n*Math.cos(4*r)-6*o*Math.cos(6*r)),r+=s,Math.abs(s)<=1e-10)return r;return NaN}function B5(){this.sphere||(this.e0=ds(this.es),this.e1=cs(this.es),this.e2=gs(this.es),this.e3=fs(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0))}function W5(i){var t,e,n=i.x,o=i.y;if(n=X(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(o)*Math.sin(n)),e=this.a*(Math.atan2(Math.tan(o),Math.cos(n))-this.lat0);else{var r=Math.sin(o),s=Math.cos(o),a=ir(this.a,this.e,r),l=Math.tan(o)*Math.tan(o),h=n*Math.cos(o),u=h*h,d=this.es*s*s/(1-this.es),c=this.a*Te(this.e0,this.e1,this.e2,this.e3,o);t=a*h*(1-u*l*(1/6-(8-l+8*d)*u/120)),e=c-this.ml0+a*r/s*u*(.5+(5-l+6*d)*u/24)}return i.x=t+this.x0,i.y=e+this.y0,i}function Z5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,o;if(this.sphere){var r=e+this.lat0;n=Math.asin(Math.sin(r)*Math.cos(t)),o=Math.atan2(Math.tan(t),Math.cos(r))}else{var s=this.ml0/this.a+e,a=nl(s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-R)<=W)return i.x=this.long0,i.y=R,e<0&&(i.y*=-1),i;var l=ir(this.a,this.e,Math.sin(a)),h=l*l*l/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(a),2),d=t*this.a/l,c=d*d;n=a-l*Math.tan(a)/h*d*d*(.5-(1+3*u)*d*d/24),o=d*(1-c*(u/3+(1+3*u)*u*c/15))/Math.cos(a)}return i.x=X(o+this.long0),i.y=nr(n),i}var Y5=["Cassini","Cassini_Soldner","cass"];const X5={init:B5,forward:W5,inverse:Z5,names:Y5};function En(i,t){var e;return i>1e-7?(e=i*t,(1-i*i)*(t/(1-e*e)-.5/i*Math.log((1-e)/(1+e)))):2*t}var U5=1,V5=2,q5=3,$5=4;function H5(){var i=Math.abs(this.lat0);if(Math.abs(i-R)<W?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<W?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=En(this.e,1),this.mmf=.5/(1-this.es),this.apa=rM(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=En(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function K5(i){var t,e,n,o,r,s,a,l,h,u,d=i.x,c=i.y;if(d=X(d-this.long0),this.sphere){if(r=Math.sin(c),u=Math.cos(c),n=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+u*n:1+this.sinph0*r+this.cosph0*u*n,e<=W)return null;e=Math.sqrt(2/e),t=e*u*Math.sin(d),e*=this.mode===this.EQUIT?r:this.cosph0*r-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(c+this.lat0)<W)return null;e=Rt-c*.5,e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)),t=e*Math.sin(d),e*=n}}else{switch(a=0,l=0,h=0,n=Math.cos(d),o=Math.sin(d),r=Math.sin(c),s=En(this.e,r),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(a=s/this.qp,l=Math.sqrt(1-a*a)),this.mode){case this.OBLIQ:h=1+this.sinb1*a+this.cosb1*l*n;break;case this.EQUIT:h=1+l*n;break;case this.N_POLE:h=R+c,s=this.qp-s;break;case this.S_POLE:h=c-R,s=this.qp+s;break}if(Math.abs(h)<W)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),this.mode===this.OBLIQ?e=this.ymf*h*(this.cosb1*a-this.sinb1*l*n):e=(h=Math.sqrt(2/(1+l*n)))*a*this.ymf,t=this.xmf*h*l*o;break;case this.N_POLE:case this.S_POLE:s>=0?(t=(h=Math.sqrt(s))*o,e=n*(this.mode===this.S_POLE?h:-h)):t=e=0;break}}return i.x=this.a*t+this.x0,i.y=this.a*e+this.y0,i}function J5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,o,r,s,a,l,h;if(this.sphere){var u=0,d,c=0;if(d=Math.sqrt(t*t+e*e),o=d*.5,o>1)return null;switch(o=2*Math.asin(o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(c=Math.sin(o),u=Math.cos(o)),this.mode){case this.EQUIT:o=Math.abs(d)<=W?0:Math.asin(e*c/d),t*=c,e=u*d;break;case this.OBLIQ:o=Math.abs(d)<=W?this.lat0:Math.asin(u*this.sinph0+e*c*this.cosph0/d),t*=c*this.cosph0,e=(u-Math.sin(o)*this.sinph0)*d;break;case this.N_POLE:e=-e,o=R-o;break;case this.S_POLE:o-=R;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,l=Math.sqrt(t*t+e*e),l<W)return i.x=this.long0,i.y=this.lat0,i;s=2*Math.asin(.5*l/this.rq),r=Math.cos(s),t*=s=Math.sin(s),this.mode===this.OBLIQ?(h=r*this.sinb1+e*s*this.cosb1/l,a=this.qp*h,e=l*this.cosb1*r-e*this.sinb1*s):(h=e*s/l,a=this.qp*h,e=l*r)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),a=t*t+e*e,!a)return i.x=this.long0,i.y=this.lat0,i;h=1-a/this.qp,this.mode===this.S_POLE&&(h=-h)}n=Math.atan2(t,e),o=sM(Math.asin(h),this.apa)}return i.x=X(this.long0+n),i.y=o,i}var Q5=.3333333333333333,tM=.17222222222222222,eM=.10257936507936508,iM=.06388888888888888,nM=.0664021164021164,oM=.016415012942191543;function rM(i){var t,e=[];return e[0]=i*Q5,t=i*i,e[0]+=t*tM,e[1]=t*iM,t*=i,e[0]+=t*eM,e[1]+=t*nM,e[2]=t*oM,e}function sM(i,t){var e=i+i;return i+t[0]*Math.sin(e)+t[1]*Math.sin(e+e)+t[2]*Math.sin(e+e+e)}var aM=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const lM={init:H5,forward:K5,inverse:J5,names:aM,S_POLE:U5,N_POLE:V5,EQUIT:q5,OBLIQ:$5};function Sn(i){return Math.abs(i)>1&&(i=i>1?1:-1),Math.asin(i)}function hM(){Math.abs(this.lat1+this.lat2)<W||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=_i(this.e3,this.sin_po,this.cos_po),this.qs1=En(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=_i(this.e3,this.sin_po,this.cos_po),this.qs2=En(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=En(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>W?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function uM(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=En(this.e3,this.sin_phi,this.cos_phi),o=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*X(t-this.long0),s=o*Math.sin(r)+this.x0,a=this.rh-o*Math.cos(r)+this.y0;return i.x=s,i.y=a,i}function dM(i){var t,e,n,o,r,s;return i.x-=this.x0,i.y=this.rh-i.y+this.y0,this.ns0>=0?(t=Math.sqrt(i.x*i.x+i.y*i.y),n=1):(t=-Math.sqrt(i.x*i.x+i.y*i.y),n=-1),o=0,t!==0&&(o=Math.atan2(n*i.x,n*i.y)),n=t*this.ns0/this.a,this.sphere?s=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,s=this.phi1z(this.e3,e)),r=X(o/this.ns0+this.long0),i.x=r,i.y=s,i}function cM(i,t){var e,n,o,r,s,a=Sn(.5*t);if(i<W)return a;for(var l=i*i,h=1;h<=25;h++)if(e=Math.sin(a),n=Math.cos(a),o=i*e,r=1-o*o,s=.5*r*r/n*(t/(1-l)-e/r+.5/i*Math.log((1-o)/(1+o))),a=a+s,Math.abs(s)<=1e-7)return a;return null}var gM=["Albers_Conic_Equal_Area","Albers","aea"];const fM={init:hM,forward:uM,inverse:dM,names:gM,phi1z:cM};function mM(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function pM(i){var t,e,n,o,r,s,a,l,h=i.x,u=i.y;return n=X(h-this.long0),t=Math.sin(u),e=Math.cos(u),o=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*o,r=1,s>0||Math.abs(s)<=W?(a=this.x0+this.a*r*e*Math.sin(n)/s,l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*o)/s):(a=this.x0+this.infinity_dist*e*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*o)),i.x=a,i.y=l,i}function vM(i){var t,e,n,o,r,s;return i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,(t=Math.sqrt(i.x*i.x+i.y*i.y))?(o=Math.atan2(t,this.rc),e=Math.sin(o),n=Math.cos(o),s=Sn(n*this.sin_p14+i.y*e*this.cos_p14/t),r=Math.atan2(i.x*e,t*this.cos_p14*n-i.y*this.sin_p14*e),r=X(this.long0+r)):(s=this.phic0,r=0),i.x=r,i.y=s,i}var _M=["gnom"];const yM={init:mM,forward:pM,inverse:vM,names:_M};function xM(i,t){var e=1-(1-i*i)/(2*i)*Math.log((1-i)/(1+i));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*R:R;for(var n=Math.asin(.5*t),o,r,s,a,l=0;l<30;l++)if(r=Math.sin(n),s=Math.cos(n),a=i*r,o=Math.pow(1-a*a,2)/(2*s)*(t/(1-i*i)-r/(1-a*a)+.5/i*Math.log((1-a)/(1+a))),n+=o,Math.abs(o)<=1e-10)return n;return NaN}function bM(){this.sphere||(this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function kM(i){var t=i.x,e=i.y,n,o,r=X(t-this.long0);if(this.sphere)n=this.x0+this.a*r*Math.cos(this.lat_ts),o=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var s=En(this.e,Math.sin(e));n=this.x0+this.a*this.k0*r,o=this.y0+this.a*s*.5/this.k0}return i.x=n,i.y=o,i}function wM(i){i.x-=this.x0,i.y-=this.y0;var t,e;return this.sphere?(t=X(this.long0+i.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(i.y/this.a*Math.cos(this.lat_ts))):(e=xM(this.e,2*i.y*this.k0/this.a),t=X(this.long0+i.x/(this.a*this.k0))),i.x=t,i.y=e,i}var MM=["cea"];const CM={init:bM,forward:kM,inverse:wM,names:MM};function EM(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function SM(i){var t=i.x,e=i.y,n=X(t-this.long0),o=nr(e-this.lat0);return i.x=this.x0+this.a*n*this.rc,i.y=this.y0+this.a*o,i}function TM(i){var t=i.x,e=i.y;return i.x=X(this.long0+(t-this.x0)/(this.a*this.rc)),i.y=nr(this.lat0+(e-this.y0)/this.a),i}var IM=["Equirectangular","Equidistant_Cylindrical","eqc"];const zM={init:EM,forward:SM,inverse:TM,names:IM};var tp=20;function RM(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ds(this.es),this.e1=cs(this.es),this.e2=gs(this.es),this.e3=fs(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0)}function AM(i){var t=i.x,e=i.y,n,o,r,s=X(t-this.long0);if(r=s*Math.sin(e),this.sphere)Math.abs(e)<=W?(n=this.a*s,o=-1*this.a*this.lat0):(n=this.a*Math.sin(r)/Math.tan(e),o=this.a*(nr(e-this.lat0)+(1-Math.cos(r))/Math.tan(e)));else if(Math.abs(e)<=W)n=this.a*s,o=-1*this.ml0;else{var a=ir(this.a,this.e,Math.sin(e))/Math.tan(e);n=a*Math.sin(r),o=this.a*Te(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(r))}return i.x=n+this.x0,i.y=o+this.y0,i}function PM(i){var t,e,n,o,r,s,a,l,h;if(n=i.x-this.x0,o=i.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=W)t=X(n/this.a+this.long0),e=0;else{s=this.lat0+o/this.a,a=n*n/this.a/this.a+s*s,l=s;var u;for(r=tp;r;--r)if(u=Math.tan(l),h=-1*(s*(l*u+1)-l-.5*(l*l+a)*u)/((l-s)/u-1),l+=h,Math.abs(h)<=W){e=l;break}t=X(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(o+this.ml0)<=W)e=0,t=X(this.long0+n/this.a);else{s=(this.ml0+o)/this.a,a=n*n/this.a/this.a+s*s,l=s;var d,c,g,f,m;for(r=tp;r;--r)if(m=this.e*Math.sin(l),d=Math.sqrt(1-m*m)*Math.tan(l),c=this.a*Te(this.e0,this.e1,this.e2,this.e3,l),g=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),f=c/this.a,h=(s*(d*f+1)-f-.5*d*(f*f+a))/(this.es*Math.sin(2*l)*(f*f+a-2*s*f)/(4*d)+(s-f)*(d*g-2/Math.sin(2*l))-g),l-=h,Math.abs(h)<=W){e=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=X(this.long0+Math.asin(n*d/this.a)/Math.sin(e))}return i.x=t,i.y=e,i}var DM=["Polyconic","poly"];const LM={init:RM,forward:AM,inverse:PM,names:DM};function OM(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function FM(i){var t,e=i.x,n=i.y,o=n-this.lat0,r=e-this.long0,s=o/os*1e-5,a=r,l=1,h=0;for(t=1;t<=10;t++)l=l*s,h=h+this.A[t]*l;var u=h,d=a,c=1,g=0,f,m,p=0,_=0;for(t=1;t<=6;t++)f=c*u-g*d,m=g*u+c*d,c=f,g=m,p=p+this.B_re[t]*c-this.B_im[t]*g,_=_+this.B_im[t]*c+this.B_re[t]*g;return i.x=_*this.a+this.x0,i.y=p*this.a+this.y0,i}function NM(i){var t,e=i.x,n=i.y,o=e-this.x0,r=n-this.y0,s=r/this.a,a=o/this.a,l=1,h=0,u,d,c=0,g=0;for(t=1;t<=6;t++)u=l*s-h*a,d=h*s+l*a,l=u,h=d,c=c+this.C_re[t]*l-this.C_im[t]*h,g=g+this.C_im[t]*l+this.C_re[t]*h;for(var f=0;f<this.iterations;f++){var m=c,p=g,_,v,y=s,x=a;for(t=2;t<=6;t++)_=m*c-p*g,v=p*c+m*g,m=_,p=v,y=y+(t-1)*(this.B_re[t]*m-this.B_im[t]*p),x=x+(t-1)*(this.B_im[t]*m+this.B_re[t]*p);m=1,p=0;var k=this.B_re[1],w=this.B_im[1];for(t=2;t<=6;t++)_=m*c-p*g,v=p*c+m*g,m=_,p=v,k=k+t*(this.B_re[t]*m-this.B_im[t]*p),w=w+t*(this.B_im[t]*m+this.B_re[t]*p);var E=k*k+w*w;c=(y*k+x*w)/E,g=(x*k-y*w)/E}var M=c,S=g,z=1,P=0;for(t=1;t<=9;t++)z=z*M,P=P+this.D[t]*z;var G=this.lat0+P*os*1e5,A=this.long0+S;return i.x=A,i.y=G,i}var GM=["New_Zealand_Map_Grid","nzmg"];const jM={init:OM,forward:FM,inverse:NM,names:GM};function BM(){}function WM(i){var t=i.x,e=i.y,n=X(t-this.long0),o=this.x0+this.a*n,r=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return i.x=o,i.y=r,i}function ZM(i){i.x-=this.x0,i.y-=this.y0;var t=X(this.long0+i.x/this.a),e=2.5*(Math.atan(Math.exp(.8*i.y/this.a))-Math.PI/4);return i.x=t,i.y=e,i}var YM=["Miller_Cylindrical","mill"];const XM={init:BM,forward:WM,inverse:ZM,names:YM};var UM=20;function VM(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Hm(this.es)}function qM(i){var t,e,n=i.x,o=i.y;if(n=X(n-this.long0),this.sphere){if(!this.m)o=this.n!==1?Math.asin(this.n*Math.sin(o)):o;else for(var r=this.n*Math.sin(o),s=UM;s;--s){var a=(this.m*o+Math.sin(o)-r)/(this.m+Math.cos(o));if(o-=a,Math.abs(a)<W)break}t=this.a*this.C_x*n*(this.m+Math.cos(o)),e=this.a*this.C_y*o}else{var l=Math.sin(o),h=Math.cos(o);e=this.a*tl(o,l,h,this.en),t=this.a*n*h/Math.sqrt(1-this.es*l*l)}return i.x=t,i.y=e,i}function $M(i){var t,e,n,o;return i.x-=this.x0,n=i.x/this.a,i.y-=this.y0,t=i.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=Sn((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Sn(Math.sin(t)/this.n)),n=X(n+this.long0),t=nr(t)):(t=Km(i.y/this.a,this.es,this.en),o=Math.abs(t),o<R?(o=Math.sin(t),e=this.long0+i.x*Math.sqrt(1-this.es*o*o)/(this.a*Math.cos(t)),n=X(e)):o-W<R&&(n=this.long0)),i.x=n,i.y=t,i}var HM=["Sinusoidal","sinu"];const KM={init:VM,forward:qM,inverse:$M,names:HM};function JM(){}function QM(i){for(var t=i.x,e=i.y,n=X(t-this.long0),o=e,r=Math.PI*Math.sin(e);;){var s=-(o+Math.sin(o)-r)/(1+Math.cos(o));if(o+=s,Math.abs(s)<W)break}o/=2,Math.PI/2-Math.abs(e)<W&&(n=0);var a=.900316316158*this.a*n*Math.cos(o)+this.x0,l=1.4142135623731*this.a*Math.sin(o)+this.y0;return i.x=a,i.y=l,i}function tC(i){var t,e;i.x-=this.x0,i.y-=this.y0,e=i.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),t=Math.asin(e);var n=X(this.long0+i.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var o=Math.asin(e);return i.x=n,i.y=o,i}var eC=["Mollweide","moll"];const iC={init:JM,forward:QM,inverse:tC,names:eC};function nC(){Math.abs(this.lat1+this.lat2)<W||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ds(this.es),this.e1=cs(this.es),this.e2=gs(this.es),this.e3=fs(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=_i(this.e,this.sinphi,this.cosphi),this.ml1=Te(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<W?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=_i(this.e,this.sinphi,this.cosphi),this.ml2=Te(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Te(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function oC(i){var t=i.x,e=i.y,n;if(this.sphere)n=this.a*(this.g-e);else{var o=Te(this.e0,this.e1,this.e2,this.e3,e);n=this.a*(this.g-o)}var r=this.ns*X(t-this.long0),s=this.x0+n*Math.sin(r),a=this.y0+this.rh-n*Math.cos(r);return i.x=s,i.y=a,i}function rC(i){i.x-=this.x0,i.y=this.rh-i.y+this.y0;var t,e,n,o;this.ns>=0?(e=Math.sqrt(i.x*i.x+i.y*i.y),t=1):(e=-Math.sqrt(i.x*i.x+i.y*i.y),t=-1);var r=0;if(e!==0&&(r=Math.atan2(t*i.x,t*i.y)),this.sphere)return o=X(this.long0+r/this.ns),n=nr(this.g-e/this.a),i.x=o,i.y=n,i;var s=this.g-e/this.a;return n=nl(s,this.e0,this.e1,this.e2,this.e3),o=X(this.long0+r/this.ns),i.x=o,i.y=n,i}var sC=["Equidistant_Conic","eqdc"];const aC={init:nC,forward:oC,inverse:rC,names:sC};function lC(){this.R=this.a}function hC(i){var t=i.x,e=i.y,n=X(t-this.long0),o,r;Math.abs(e)<=W&&(o=this.x0+this.R*n,r=this.y0);var s=Sn(2*Math.abs(e/Math.PI));(Math.abs(n)<=W||Math.abs(Math.abs(e)-R)<=W)&&(o=this.x0,e>=0?r=this.y0+Math.PI*this.R*Math.tan(.5*s):r=this.y0+Math.PI*this.R*-Math.tan(.5*s));var a=.5*Math.abs(Math.PI/n-n/Math.PI),l=a*a,h=Math.sin(s),u=Math.cos(s),d=u/(h+u-1),c=d*d,g=d*(2/h-1),f=g*g,m=Math.PI*this.R*(a*(d-f)+Math.sqrt(l*(d-f)*(d-f)-(f+l)*(c-f)))/(f+l);n<0&&(m=-m),o=this.x0+m;var p=l+d;return m=Math.PI*this.R*(g*p-a*Math.sqrt((f+l)*(l+1)-p*p))/(f+l),e>=0?r=this.y0+m:r=this.y0-m,i.x=o,i.y=r,i}function uC(i){var t,e,n,o,r,s,a,l,h,u,d,c,g;return i.x-=this.x0,i.y-=this.y0,d=Math.PI*this.R,n=i.x/d,o=i.y/d,r=n*n+o*o,s=-Math.abs(o)*(1+r),a=s-2*o*o+n*n,l=-2*s+1+2*o*o+r*r,g=o*o/l+(2*a*a*a/l/l/l-9*s*a/l/l)/27,h=(s-a*a/3/l)/l,u=2*Math.sqrt(-h/3),d=3*g/h/u,Math.abs(d)>1&&(d>=0?d=1:d=-1),c=Math.acos(d)/3,i.y>=0?e=(-u*Math.cos(c+Math.PI/3)-a/3/l)*Math.PI:e=-(-u*Math.cos(c+Math.PI/3)-a/3/l)*Math.PI,Math.abs(n)<W?t=this.long0:t=X(this.long0+Math.PI*(r-1+Math.sqrt(1+2*(n*n-o*o)+r*r))/2/n),i.x=t,i.y=e,i}var dC=["Van_der_Grinten_I","VanDerGrinten","vandg"];const cC={init:lC,forward:hC,inverse:uC,names:dC};function gC(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function fC(i){var t=i.x,e=i.y,n=Math.sin(i.y),o=Math.cos(i.y),r=X(t-this.long0),s,a,l,h,u,d,c,g,f,m,p,_,v,y,x,k,w,E,M,S,z,P,G;return this.sphere?Math.abs(this.sin_p12-1)<=W?(i.x=this.x0+this.a*(R-e)*Math.sin(r),i.y=this.y0-this.a*(R-e)*Math.cos(r),i):Math.abs(this.sin_p12+1)<=W?(i.x=this.x0+this.a*(R+e)*Math.sin(r),i.y=this.y0+this.a*(R+e)*Math.cos(r),i):(E=this.sin_p12*n+this.cos_p12*o*Math.cos(r),k=Math.acos(E),w=k?k/Math.sin(k):1,i.x=this.x0+this.a*w*o*Math.sin(r),i.y=this.y0+this.a*w*(this.cos_p12*n-this.sin_p12*o*Math.cos(r)),i):(s=ds(this.es),a=cs(this.es),l=gs(this.es),h=fs(this.es),Math.abs(this.sin_p12-1)<=W?(u=this.a*Te(s,a,l,h,R),d=this.a*Te(s,a,l,h,e),i.x=this.x0+(u-d)*Math.sin(r),i.y=this.y0-(u-d)*Math.cos(r),i):Math.abs(this.sin_p12+1)<=W?(u=this.a*Te(s,a,l,h,R),d=this.a*Te(s,a,l,h,e),i.x=this.x0+(u+d)*Math.sin(r),i.y=this.y0+(u+d)*Math.cos(r),i):(c=n/o,g=ir(this.a,this.e,this.sin_p12),f=ir(this.a,this.e,n),m=Math.atan((1-this.es)*c+this.es*g*this.sin_p12/(f*o)),p=Math.atan2(Math.sin(r),this.cos_p12*Math.tan(m)-this.sin_p12*Math.cos(r)),p===0?M=Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):Math.abs(Math.abs(p)-Math.PI)<=W?M=-Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):M=Math.asin(Math.sin(r)*Math.cos(m)/Math.sin(p)),_=this.e*this.sin_p12/Math.sqrt(1-this.es),v=this.e*this.cos_p12*Math.cos(p)/Math.sqrt(1-this.es),y=_*v,x=v*v,S=M*M,z=S*M,P=z*M,G=P*M,k=g*M*(1-S*x*(1-x)/6+z/8*y*(1-2*x)+P/120*(x*(4-7*x)-3*_*_*(1-7*x))-G/48*y),i.x=this.x0+k*Math.sin(p),i.y=this.y0+k*Math.cos(p),i))}function mC(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,o,r,s,a,l,h,u,d,c,g,f,m,p,_,v,y,x,k,w,E,M;return this.sphere?(t=Math.sqrt(i.x*i.x+i.y*i.y),t>2*R*this.a?void 0:(e=t/this.a,n=Math.sin(e),o=Math.cos(e),r=this.long0,Math.abs(t)<=W?s=this.lat0:(s=Sn(o*this.sin_p12+i.y*n*this.cos_p12/t),a=Math.abs(this.lat0)-R,Math.abs(a)<=W?this.lat0>=0?r=X(this.long0+Math.atan2(i.x,-i.y)):r=X(this.long0-Math.atan2(-i.x,i.y)):r=X(this.long0+Math.atan2(i.x*n,t*this.cos_p12*o-i.y*this.sin_p12*n))),i.x=r,i.y=s,i)):(l=ds(this.es),h=cs(this.es),u=gs(this.es),d=fs(this.es),Math.abs(this.sin_p12-1)<=W?(c=this.a*Te(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),g=c-t,s=nl(g/this.a,l,h,u,d),r=X(this.long0+Math.atan2(i.x,-1*i.y)),i.x=r,i.y=s,i):Math.abs(this.sin_p12+1)<=W?(c=this.a*Te(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),g=t-c,s=nl(g/this.a,l,h,u,d),r=X(this.long0+Math.atan2(i.x,i.y)),i.x=r,i.y=s,i):(t=Math.sqrt(i.x*i.x+i.y*i.y),p=Math.atan2(i.x,i.y),f=ir(this.a,this.e,this.sin_p12),_=Math.cos(p),v=this.e*this.cos_p12*_,y=-v*v/(1-this.es),x=3*this.es*(1-y)*this.sin_p12*this.cos_p12*_/(1-this.es),k=t/f,w=k-y*(1+y)*Math.pow(k,3)/6-x*(1+3*y)*Math.pow(k,4)/24,E=1-y*w*w/2-k*w*w*w/6,m=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*_),r=X(this.long0+Math.asin(Math.sin(p)*Math.sin(w)/Math.cos(m))),M=Math.sin(m),s=Math.atan2((M-this.es*E*this.sin_p12)*Math.tan(m),M*(1-this.es)),i.x=r,i.y=s,i))}var pC=["Azimuthal_Equidistant","aeqd"];const vC={init:gC,forward:fC,inverse:mC,names:pC};function _C(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function yC(i){var t,e,n,o,r,s,a,l,h=i.x,u=i.y;return n=X(h-this.long0),t=Math.sin(u),e=Math.cos(u),o=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*o,r=1,(s>0||Math.abs(s)<=W)&&(a=this.a*r*e*Math.sin(n),l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*o)),i.x=a,i.y=l,i}function xC(i){var t,e,n,o,r,s,a;return i.x-=this.x0,i.y-=this.y0,t=Math.sqrt(i.x*i.x+i.y*i.y),e=Sn(t/this.a),n=Math.sin(e),o=Math.cos(e),s=this.long0,Math.abs(t)<=W?(a=this.lat0,i.x=s,i.y=a,i):(a=Sn(o*this.sin_p14+i.y*n*this.cos_p14/t),r=Math.abs(this.lat0)-R,Math.abs(r)<=W?(this.lat0>=0?s=X(this.long0+Math.atan2(i.x,-i.y)):s=X(this.long0-Math.atan2(-i.x,i.y)),i.x=s,i.y=a,i):(s=X(this.long0+Math.atan2(i.x*n,t*this.cos_p14*o-i.y*this.sin_p14*n)),i.x=s,i.y=a,i))}var bC=["ortho"];const kC={init:_C,forward:yC,inverse:xC,names:bC};var Xt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},At={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function wC(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=R-Rt/2?this.face=Xt.TOP:this.lat0<=-(R-Rt/2)?this.face=Xt.BOTTOM:Math.abs(this.long0)<=Rt?this.face=Xt.FRONT:Math.abs(this.long0)<=R+Rt?this.face=this.long0>0?Xt.RIGHT:Xt.LEFT:this.face=Xt.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function MC(i){var t={x:0,y:0},e,n,o,r,s,a,l={value:0};if(i.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(i.y)):e=i.y,n=i.x,this.face===Xt.TOP)r=R-e,n>=Rt&&n<=R+Rt?(l.value=At.AREA_0,o=n-R):n>R+Rt||n<=-(R+Rt)?(l.value=At.AREA_1,o=n>0?n-Ht:n+Ht):n>-(R+Rt)&&n<=-Rt?(l.value=At.AREA_2,o=n+R):(l.value=At.AREA_3,o=n);else if(this.face===Xt.BOTTOM)r=R+e,n>=Rt&&n<=R+Rt?(l.value=At.AREA_0,o=-n+R):n<Rt&&n>=-Rt?(l.value=At.AREA_1,o=-n):n<-Rt&&n>=-(R+Rt)?(l.value=At.AREA_2,o=-n-R):(l.value=At.AREA_3,o=n>0?-n+Ht:-n-Ht);else{var h,u,d,c,g,f,m;this.face===Xt.RIGHT?n=or(n,+R):this.face===Xt.BACK?n=or(n,+Ht):this.face===Xt.LEFT&&(n=or(n,-R)),c=Math.sin(e),g=Math.cos(e),f=Math.sin(n),m=Math.cos(n),h=g*m,u=g*f,d=c,this.face===Xt.FRONT?(r=Math.acos(h),o=ol(r,d,u,l)):this.face===Xt.RIGHT?(r=Math.acos(u),o=ol(r,d,-h,l)):this.face===Xt.BACK?(r=Math.acos(-h),o=ol(r,d,-u,l)):this.face===Xt.LEFT?(r=Math.acos(-u),o=ol(r,d,h,l)):(r=o=0,l.value=At.AREA_0)}return a=Math.atan(12/Ht*(o+Math.acos(Math.sin(o)*Math.cos(Rt))-R)),s=Math.sqrt((1-Math.cos(r))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(o))))),l.value===At.AREA_1?a+=R:l.value===At.AREA_2?a+=Ht:l.value===At.AREA_3&&(a+=1.5*Ht),t.x=s*Math.cos(a),t.y=s*Math.sin(a),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,i.x=t.x,i.y=t.y,i}function CC(i){var t={lam:0,phi:0},e,n,o,r,s,a,l,h,u,d={value:0};if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,n=Math.atan(Math.sqrt(i.x*i.x+i.y*i.y)),e=Math.atan2(i.y,i.x),i.x>=0&&i.x>=Math.abs(i.y)?d.value=At.AREA_0:i.y>=0&&i.y>=Math.abs(i.x)?(d.value=At.AREA_1,e-=R):i.x<0&&-i.x>=Math.abs(i.y)?(d.value=At.AREA_2,e=e<0?e+Ht:e-Ht):(d.value=At.AREA_3,e+=R),u=Ht/12*Math.tan(e),s=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(s),o=Math.cos(e),r=Math.tan(n),l=1-o*o*r*r*(1-Math.cos(Math.atan(1/Math.cos(a)))),l<-1?l=-1:l>1&&(l=1),this.face===Xt.TOP)h=Math.acos(l),t.phi=R-h,d.value===At.AREA_0?t.lam=a+R:d.value===At.AREA_1?t.lam=a<0?a+Ht:a-Ht:d.value===At.AREA_2?t.lam=a-R:t.lam=a;else if(this.face===Xt.BOTTOM)h=Math.acos(l),t.phi=h-R,d.value===At.AREA_0?t.lam=-a+R:d.value===At.AREA_1?t.lam=-a:d.value===At.AREA_2?t.lam=-a-R:t.lam=a<0?-a-Ht:-a+Ht;else{var c,g,f;c=l,u=c*c,u>=1?f=0:f=Math.sqrt(1-u)*Math.sin(a),u+=f*f,u>=1?g=0:g=Math.sqrt(1-u),d.value===At.AREA_1?(u=g,g=-f,f=u):d.value===At.AREA_2?(g=-g,f=-f):d.value===At.AREA_3&&(u=g,g=f,f=-u),this.face===Xt.RIGHT?(u=c,c=-g,g=u):this.face===Xt.BACK?(c=-c,g=-g):this.face===Xt.LEFT&&(u=c,c=g,g=-u),t.phi=Math.acos(-f)-R,t.lam=Math.atan2(g,c),this.face===Xt.RIGHT?t.lam=or(t.lam,-R):this.face===Xt.BACK?t.lam=or(t.lam,-Ht):this.face===Xt.LEFT&&(t.lam=or(t.lam,+R))}if(this.es!==0){var m,p,_;m=t.phi<0?1:0,p=Math.tan(t.phi),_=this.b/Math.sqrt(p*p+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-_*_)/(this.one_minus_f*_)),m&&(t.phi=-t.phi)}return t.lam+=this.long0,i.x=t.lam,i.y=t.phi,i}function ol(i,t,e,n){var o;return i<W?(n.value=At.AREA_0,o=0):(o=Math.atan2(t,e),Math.abs(o)<=Rt?n.value=At.AREA_0:o>Rt&&o<=R+Rt?(n.value=At.AREA_1,o-=R):o>R+Rt||o<=-(R+Rt)?(n.value=At.AREA_2,o=o>=0?o-Ht:o+Ht):(n.value=At.AREA_3,o+=R)),o}function or(i,t){var e=i+t;return e<-Ht?e+=rs:e>+Ht&&(e-=rs),e}var EC=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const SC={init:wC,forward:MC,inverse:CC,names:EC};var rd=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],ms=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],ep=.8487,ip=1.3523,np=vi/5,TC=1/np,rr=18,rl=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},IC=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function zC(i,t,e,n){for(var o=t;n;--n){var r=i(o);if(o-=r,Math.abs(r)<e)break}return o}function RC(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function AC(i){var t=X(i.x-this.long0),e=Math.abs(i.y),n=Math.floor(e*np);n<0?n=0:n>=rr&&(n=rr-1),e=vi*(e-TC*n);var o={x:rl(rd[n],e)*t,y:rl(ms[n],e)};return i.y<0&&(o.y=-o.y),o.x=o.x*this.a*ep+this.x0,o.y=o.y*this.a*ip+this.y0,o}function PC(i){var t={x:(i.x-this.x0)/(this.a*ep),y:Math.abs(i.y-this.y0)/(this.a*ip)};if(t.y>=1)t.x/=rd[rr][0],t.y=i.y<0?-R:R;else{var e=Math.floor(t.y*rr);for(e<0?e=0:e>=rr&&(e=rr-1);;)if(ms[e][0]>t.y)--e;else if(ms[e+1][0]<=t.y)++e;else break;var n=ms[e],o=5*(t.y-n[0])/(ms[e+1][0]-n[0]);o=zC(function(r){return(rl(n,r)-t.y)/IC(n,r)},o,W,100),t.x/=rl(rd[e],o),t.y=(5*e+o)*he,i.y<0&&(t.y=-t.y)}return t.x=X(t.x+this.long0),t}var DC=["Robinson","robin"];const LC={init:RC,forward:AC,inverse:PC,names:DC};function OC(){this.name="geocent"}function FC(i){var t=zm(i,this.es,this.a);return t}function NC(i){var t=Rm(i,this.es,this.a,this.b);return t}var GC=["Geocentric","geocentric","geocent","Geocent"];const jC={init:OC,forward:FC,inverse:NC,names:GC};var pe={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},ps={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function BC(){if(Object.keys(ps).forEach(function(e){if(typeof this[e]>"u")this[e]=ps[e].def;else{if(ps[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);ps[e].num&&(this[e]=parseFloat(this[e]))}ps[e].degrees&&(this[e]=this[e]*he)}.bind(this)),Math.abs(Math.abs(this.lat0)-R)<W?this.mode=this.lat0<0?pe.S_POLE:pe.N_POLE:Math.abs(this.lat0)<W?this.mode=pe.EQUIT:(this.mode=pe.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var i=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(i),this.sw=Math.sin(i)}function WC(i){i.x-=this.long0;var t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),o,r;switch(this.mode){case pe.OBLIQ:r=this.sinph0*t+this.cosph0*e*n;break;case pe.EQUIT:r=e*n;break;case pe.S_POLE:r=-t;break;case pe.N_POLE:r=t;break}switch(r=this.pn1/(this.p-r),o=r*e*Math.sin(i.x),this.mode){case pe.OBLIQ:r*=this.cosph0*t-this.sinph0*e*n;break;case pe.EQUIT:r*=t;break;case pe.N_POLE:r*=-(e*n);break;case pe.S_POLE:r*=e*n;break}var s,a;return s=r*this.cg+o*this.sg,a=1/(s*this.sw*this.h1+this.cw),o=(o*this.cg-r*this.sg)*this.cw*a,r=s*a,i.x=o*this.a,i.y=r*this.a,i}function ZC(i){i.x/=this.a,i.y/=this.a;var t={x:i.x,y:i.y},e,n,o;o=1/(this.pn1-i.y*this.sw),e=this.pn1*i.x*o,n=this.pn1*i.y*this.cw*o,i.x=e*this.cg+n*this.sg,i.y=n*this.cg-e*this.sg;var r=ai(i.x,i.y);if(Math.abs(r)<W)t.x=0,t.y=i.y;else{var s,a;switch(a=1-r*r*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/r+r/this.pn1),s=Math.sqrt(1-a*a),this.mode){case pe.OBLIQ:t.y=Math.asin(s*this.sinph0+i.y*a*this.cosph0/r),i.y=(s-this.sinph0*Math.sin(t.y))*r,i.x*=a*this.cosph0;break;case pe.EQUIT:t.y=Math.asin(i.y*a/r),i.y=s*r,i.x*=a;break;case pe.N_POLE:t.y=Math.asin(s),i.y=-i.y;break;case pe.S_POLE:t.y=-Math.asin(s);break}t.x=Math.atan2(i.x,i.y)}return i.x=t.x+this.long0,i.y=t.y,i}var YC=["Tilted_Perspective","tpers"];const XC={init:BC,forward:WC,inverse:ZC,names:YC};function UC(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var i=1-this.es,t=1/i;this.radius_p=Math.sqrt(i),this.radius_p2=i,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function VC(i){var t=i.x,e=i.y,n,o,r,s;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var a=this.radius_p/ai(this.radius_p*Math.cos(e),Math.sin(e));if(o=a*Math.cos(t)*Math.cos(e),r=a*Math.sin(t)*Math.cos(e),s=a*Math.sin(e),(this.radius_g-o)*o-r*r-s*s*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;n=this.radius_g-o,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/ai(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(s/ai(r,n)))}else this.shape==="sphere"&&(n=Math.cos(e),o=Math.cos(t)*n,r=Math.sin(t)*n,s=Math.sin(e),n=this.radius_g-o,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/ai(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(s/ai(r,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function qC(i){var t=-1,e=0,n=0,o,r,s,a;if(i.x=i.x/this.a,i.y=i.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*ai(1,n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*ai(1,e));var l=n/this.radius_p;if(o=e*e+l*l+t*t,r=2*this.radius_g*t,s=r*r-4*o*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-r-Math.sqrt(s))/(2*o),t=this.radius_g+a*t,e*=a,n*=a,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t),i.y=Math.atan(this.radius_p_inv2*Math.tan(i.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*Math.sqrt(1+e*e)),o=e*e+n*n+t*t,r=2*this.radius_g*t,s=r*r-4*o*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-r-Math.sqrt(s))/(2*o),t=this.radius_g+a*t,e*=a,n*=a,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t)}return i.x=i.x+this.long0,i}var $C=["Geostationary Satellite View","Geostationary_Satellite","geos"];const HC={init:UC,forward:VC,inverse:qC,names:$C};function KC(i){i.Proj.projections.add(el),i.Proj.projections.add(il),i.Proj.projections.add(n5),i.Proj.projections.add(g5),i.Proj.projections.add(y5),i.Proj.projections.add(M5),i.Proj.projections.add(z5),i.Proj.projections.add(L5),i.Proj.projections.add(j5),i.Proj.projections.add(X5),i.Proj.projections.add(lM),i.Proj.projections.add(fM),i.Proj.projections.add(yM),i.Proj.projections.add(CM),i.Proj.projections.add(zM),i.Proj.projections.add(LM),i.Proj.projections.add(jM),i.Proj.projections.add(XM),i.Proj.projections.add(KM),i.Proj.projections.add(iC),i.Proj.projections.add(aC),i.Proj.projections.add(cC),i.Proj.projections.add(vC),i.Proj.projections.add(kC),i.Proj.projections.add(SC),i.Proj.projections.add(LC),i.Proj.projections.add(jC),i.Proj.projections.add(XC),i.Proj.projections.add(HC)}Le.defaultDatum="WGS84",Le.Proj=yi,Le.WGS84=new Le.Proj("WGS84"),Le.Point=tr,Le.toPoint=Lm,Le.defs=Se,Le.nadgrid=r2,Le.transform=Qa,Le.mgrs=b2,Le.version="__VERSION__",KC(Le),Le.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs"),xw(Le);const op=Gt("EPSG:27700"),JC=`:host{display:block;width:650px;height:650px;position:relative}.map{height:100%;opacity:0;transition:opacity .25s;overflow:hidden;border:#000000 solid .15em}.map:focus{outline:#ffdd00 solid .25em}.ol-control button{border-radius:0!important;background-color:#2c2c2c!important;cursor:pointer;min-width:44px;min-height:44px;font-size:1.75rem}.ol-control button:hover{background-color:#2c2c2cd9!important}.reset-control{top:114px;left:.5em}.reset-control img{width:30px;height:auto}.north-arrow-control img{width:44px;height:auto}.north-arrow-control{top:.5em;right:.5em;border-radius:0!important;background-color:none!important}#area{position:absolute;bottom:0;left:0;z-index:100;background:white}
|
83
|
+
`;var rp=Object.freeze,sp=Object.defineProperty,QC=Object.getOwnPropertyDescriptor,vt=(i,t,e,n)=>{for(var o=n>1?void 0:n?QC(t,e):t,r=i.length-1,s;r>=0;r--)(s=i[r])&&(o=(n?s(t,e,o):s(o))||o);return n&&o&&sp(t,e,o),o},tE=(i,t)=>rp(sp(i,"raw",{value:rp(t||i.slice())})),ap;j.MyMap=class extends An{constructor(){super(),this.id="map",this.latitude=51.507351,this.longitude=-.127758,this.projection="EPSG:4326",this.zoom=10,this.minZoom=7,this.maxZoom=22,this.drawMode=!1,this.drawGeojsonData={type:"Feature",geometry:{}},this.drawGeojsonDataBuffer=100,this.drawPointer="crosshair",this.showFeaturesAtPoint=!1,this.clickFeatures=!1,this.featureColor="#0000ff",this.featureFill=!1,this.featureBorderNone=!1,this.featureBuffer=40,this.showMarker=!1,this.markerImage="circle",this.markerLatitude=this.latitude,this.markerLongitude=this.longitude,this.markerColor="#000000",this.geojsonData={type:"FeatureCollection",features:[]},this.geojsonColor="#ff0000",this.geojsonFill=!1,this.geojsonBuffer=12,this.disableVectorTiles=!1,this.osVectorTilesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.osFeaturesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.osCopyright=`\xA9 Crown copyright and database rights ${new Date().getFullYear()} OS (0)100024857`,this.hideResetControl=!1,this.resetControlImage="unicode",this.staticMode=!1,this.areaUnit="m2",this.showScale=!1,this.useScaleBarStyle=!1,this.showNorthArrow=!1,this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}firstUpdated(){var p;const i=this.renderRoot.querySelector(`#${this.id}`),t=!this.disableVectorTiles&&Boolean(this.osVectorTilesApiKey),e=_w(this.osCopyright,this.osVectorTilesApiKey),n=yw(this.osCopyright,this.osVectorTilesApiKey),o=this.projection==="EPSG:27700"&&Boolean(op)?op:this.projection,r=Xs([this.longitude,this.latitude],o,"EPSG:3857"),s=new O_({target:i,layers:[t?n:e],view:new en({projection:"EPSG:3857",extent:j0([-10.76418,49.528423,1.9134116,61.331151],"EPSG:4326","EPSG:3857"),minZoom:this.minZoom,maxZoom:this.maxZoom,center:r,zoom:this.zoom,enableRotation:!1}),controls:Vc({attribution:!0,zoom:!this.staticMode,rotate:!1}),interactions:Qc({doubleClickZoom:!this.staticMode,dragPan:!this.staticMode,mouseWheelZoom:!this.staticMode})});this.map=s,window.olMap={VITE_APP_OS_VECTOR_TILES_API_KEY:"a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",VITE_APP_OS_FEATURES_API_KEY:"a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",VITE_APP_OS_PLACES_API_KEY:"a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}.VITEST?this.map:void 0;const a=Nk(this.drawPointer),l=Gk(this.drawPointer);this.showScale&&s.addControl(zk(this.useScaleBarStyle)),this.showNorthArrow&&s.addControl(Rk());const h=()=>{this.showFeaturesAtPoint?ns(s,pi,this.featureBuffer):d.getFeatures().length>0?ns(s,d,this.geojsonBuffer):(s.getView().setCenter(r),s.getView().setZoom(this.zoom)),this.drawMode&&(Li.clear(),this.dispatch("geojsonChange",{}),this.dispatch("areaChange",`0 ${this.areaUnit==="m2"?"m\xB2":this.areaUnit}`),s.addInteraction(a),s.addInteraction(im))};this.hideResetControl||s.addControl(Ak(h,this.resetControlImage));const u=(p=this.renderRoot)==null?void 0:p.querySelectorAll(".ol-control button");u==null||u.forEach(_=>_.setAttribute("aria-label",_.getAttribute("title")||"")),s.on("pointerdrag",()=>{s.getViewport().style.cursor="grabbing"}),s.on("pointermove",()=>{s.getViewport().style.cursor="grab"});const d=new hn;if(this.geojsonData.type==="FeatureCollection"){let _=new Hn().readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});d.addFeatures(_)}else if(this.geojsonData.type==="Feature"){let _=new Hn().readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});d.addFeature(_)}const c=new Qn({source:d,style:new le({stroke:new ke({color:this.geojsonColor,width:3}),fill:new fe({color:this.geojsonFill?Ua(this.geojsonColor,.2):Ua(this.geojsonColor,0)})})});if(s.addLayer(c),d.getFeatures().length>0){ns(s,d,this.geojsonBuffer);const _=d.getFeatures()[0].getGeometry();_&&this.dispatch("geojsonDataArea",qu(_,this.areaUnit))}if(this.drawMode){Li.clear();const _=Object.keys(this.drawGeojsonData.geometry).length>0;if(_){let v=new Hn().readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});Li.addFeature(v),ns(s,Li,this.drawGeojsonDataBuffer)}s.addLayer(em),_||s.addInteraction(a),s.addInteraction(l),s.addInteraction(im),Li.on("change",()=>{var y;const v=Li.getFeatures();if(v.length>0){const x=(y=Ck(v))==null?void 0:y.getGeometry();this.dispatch("geojsonChange",new Hn().writeFeaturesObject(v,{featureProjection:"EPSG:3857"})),x&&this.dispatch("areaChange",qu(x,this.areaUnit)),s.removeInteraction(a)}})}if(this.drawMode&&Boolean(this.osVectorTilesApiKey)&&!this.disableVectorTiles){s.addLayer(Pk),em.setZIndex(1001);const v=()=>{Za.clear();const y=s.getView().getZoom();if(y&&y>=20){const x=s.getView().calculateExtent(s.getSize());Dk(n,x)}};s.on("loadend",v),s.on("moveend",()=>{var x;((x=n.getSource())==null?void 0:x.getState())==="ready"&&setTimeout(v,200)})}if(this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey)){pm(r,this.osFeaturesApiKey,!1),this.clickFeatures&&s.on("singleclick",v=>{pm(v.coordinate,this.osFeaturesApiKey,!0)});const _=gw(this.featureColor,this.featureFill,this.featureBorderNone);s.addLayer(_),pi.on("change",()=>{if(pi.getState()==="ready"&&pi.getFeatures().length>0){ns(s,pi,this.featureBuffer),this.dispatch("featuresGeojsonChange",new Hn().writeFeaturesObject(pi.getFeatures(),{featureProjection:"EPSG:3857"}));const v=pi.getFeatures()[0].getGeometry();v&&this.dispatch("featuresAreaChange",qu(v,this.areaUnit))}})}const g=new Kn({radius:9,fill:new fe({color:this.markerColor})}),f=new ca({src:jk,scale:.5}),m=()=>{switch(this.markerImage){case"circle":return g;case"pin":return f}};if(this.showMarker){const _=new ni(Xs([this.markerLongitude,this.markerLatitude],o,"EPSG:3857")),v=new Qn({source:new hn({features:[new Ti(_)]}),style:new le({image:m()})});s.addLayer(v)}setTimeout(()=>{window.dispatchEvent(new Event("resize")),i.style.opacity="1",this.dispatch("ready")},500)}render(){return Bi(ap||(ap=tE([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
|
84
84
|
<link rel="stylesheet" href="https://cdn.skypack.dev/ol@^6.6.1/ol.css" />
|
85
|
-
<div id="`,'" class="map" tabindex="0" />'])),this.id)}disconnectedCallback(){var i;super.disconnectedCallback(),(i=this.map)==null||i.dispose()}},q.MyMap.styles=Cs(XM),bt([J({type:String})],q.MyMap.prototype,"id",2),bt([J({type:Number})],q.MyMap.prototype,"latitude",2),bt([J({type:Number})],q.MyMap.prototype,"longitude",2),bt([J({type:String})],q.MyMap.prototype,"projection",2),bt([J({type:Number})],q.MyMap.prototype,"zoom",2),bt([J({type:Number})],q.MyMap.prototype,"minZoom",2),bt([J({type:Number})],q.MyMap.prototype,"maxZoom",2),bt([J({type:Boolean})],q.MyMap.prototype,"drawMode",2),bt([J({type:Object})],q.MyMap.prototype,"drawGeojsonData",2),bt([J({type:Number})],q.MyMap.prototype,"drawGeojsonDataBuffer",2),bt([J({type:String})],q.MyMap.prototype,"drawPointer",2),bt([J({type:Boolean})],q.MyMap.prototype,"showFeaturesAtPoint",2),bt([J({type:Boolean})],q.MyMap.prototype,"clickFeatures",2),bt([J({type:String})],q.MyMap.prototype,"featureColor",2),bt([J({type:Boolean})],q.MyMap.prototype,"featureFill",2),bt([J({type:Boolean})],q.MyMap.prototype,"featureBorderNone",2),bt([J({type:Number})],q.MyMap.prototype,"featureBuffer",2),bt([J({type:Boolean})],q.MyMap.prototype,"showMarker",2),bt([J({type:Number})],q.MyMap.prototype,"markerLatitude",2),bt([J({type:Number})],q.MyMap.prototype,"markerLongitude",2),bt([J({type:String})],q.MyMap.prototype,"markerColor",2),bt([J({type:Object})],q.MyMap.prototype,"geojsonData",2),bt([J({type:String})],q.MyMap.prototype,"geojsonColor",2),bt([J({type:Boolean})],q.MyMap.prototype,"geojsonFill",2),bt([J({type:Number})],q.MyMap.prototype,"geojsonBuffer",2),bt([J({type:Boolean})],q.MyMap.prototype,"disableVectorTiles",2),bt([J({type:String})],q.MyMap.prototype,"osVectorTilesApiKey",2),bt([J({type:String})],q.MyMap.prototype,"osFeaturesApiKey",2),bt([J({type:String})],q.MyMap.prototype,"osCopyright",2),bt([J({type:Boolean})],q.MyMap.prototype,"hideResetControl",2),bt([J({type:Boolean})],q.MyMap.prototype,"staticMode",2),bt([J({type:String})],q.MyMap.prototype,"areaUnit",2),bt([J({type:Boolean})],q.MyMap.prototype,"showScale",2),bt([J({type:Boolean})],q.MyMap.prototype,"useScaleBarStyle",2),bt([J({type:String})],q.MyMap.prototype,"markerImage",2),q.MyMap=bt([vl("my-map")],q.MyMap);var lp={exports:{}};(function(i,t){(function(n,r){i.exports=r()})(window,function(){return function(e){var n={};function r(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=e,r.c=n,r.d=function(o,s,a){r.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:a})},r.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},r.t=function(o,s){if(1&s&&(o=r(o)),8&s||4&s&&typeof o=="object"&&o&&o.__esModule)return o;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:o}),2&s&&typeof o!="string")for(var l in o)r.d(a,l,function(h){return o[h]}.bind(null,l));return a},r.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(s,"a",s),s},r.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},r.p="/",r(r.s=37)}([function(e,n,r){var o=r(1),s=r(6),a=r(7),l=r(16),h=r(18),u="prototype",d=function(c,f,g){var m,p,_,v,y=c&d.F,x=c&d.G,k=c&d.S,w=c&d.P,M=c&d.B,E=x?o:k?o[f]||(o[f]={}):(o[f]||{})[u],S=x?s:s[f]||(s[f]={}),I=S[u]||(S[u]={});for(m in x&&(g=f),g)_=((p=!y&&E&&E[m]!==void 0)?E:g)[m],v=M&&p?h(_,o):w&&typeof _=="function"?h(Function.call,_):_,E&&l(E,m,_,c&d.U),S[m]!=_&&a(S,m,v),w&&I[m]!=_&&(I[m]=_)};o.core=s,d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,e.exports=d},function(e,n){var r=e.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=r)},function(e,n){e.exports=function(r){return typeof r=="object"?r!==null:typeof r=="function"}},function(e,n,r){e.exports=!r(4)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(e,n){e.exports=function(r){try{return!!r()}catch{return!0}}},function(e,n,r){r.r(n),r.d(n,"h",function(){return h}),r.d(n,"createElement",function(){return h}),r.d(n,"cloneElement",function(){return c}),r.d(n,"Component",function(){return V}),r.d(n,"render",function(){return z}),r.d(n,"rerender",function(){return p}),r.d(n,"options",function(){return s});var o=function(){},s={},a=[],l=[];function h(b,T){var Y,C,H,$,vt=l;for($=arguments.length;2<$--;)a.push(arguments[$]);for(T&&T.children!=null&&(a.length||a.push(T.children),delete T.children);a.length;)if((C=a.pop())&&C.pop!==void 0)for($=C.length;$--;)a.push(C[$]);else typeof C=="boolean"&&(C=null),(H=typeof b!="function")&&(C==null?C="":typeof C=="number"?C=String(C):typeof C!="string"&&(H=!1)),H&&Y?vt[vt.length-1]+=C:vt===l?vt=[C]:vt.push(C),Y=H;var Ct=new o;return Ct.nodeName=b,Ct.children=vt,Ct.attributes=T==null?void 0:T,Ct.key=T==null?void 0:T.key,s.vnode!==void 0&&s.vnode(Ct),Ct}function u(b,T){for(var Y in T)b[Y]=T[Y];return b}var d=typeof Promise=="function"?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function c(b,T){return h(b.nodeName,u(u({},b.attributes),T),2<arguments.length?[].slice.call(arguments,2):b.children)}var f=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,g=[];function m(b){!b._dirty&&(b._dirty=!0)&&g.push(b)==1&&(s.debounceRendering||d)(p)}function p(){var b,T=g;for(g=[];b=T.pop();)b._dirty&&D(b)}function _(b,T){return b.normalizedNodeName===T||b.nodeName.toLowerCase()===T.toLowerCase()}function v(b){var T=u({},b.attributes);T.children=b.children;var Y=b.nodeName.defaultProps;if(Y!==void 0)for(var C in Y)T[C]===void 0&&(T[C]=Y[C]);return T}function y(b){var T=b.parentNode;T&&T.removeChild(b)}function x(b,T,Y,C,H){if(T==="className"&&(T="class"),T!=="key")if(T==="ref")Y&&Y(null),C&&C(b);else if(T!=="class"||H)if(T==="style"){if(C&&typeof C!="string"&&typeof Y!="string"||(b.style.cssText=C||""),C&&typeof C=="object"){if(typeof Y!="string")for(var $ in Y)$ in C||(b.style[$]="");for(var $ in C)b.style[$]=typeof C[$]=="number"&&f.test($)===!1?C[$]+"px":C[$]}}else if(T==="dangerouslySetInnerHTML")C&&(b.innerHTML=C.__html||"");else if(T[0]=="o"&&T[1]=="n"){var vt=T!==(T=T.replace(/Capture$/,""));T=T.toLowerCase().substring(2),C?Y||b.addEventListener(T,k,vt):b.removeEventListener(T,k,vt),(b._listeners||(b._listeners={}))[T]=C}else if(T!=="list"&&T!=="type"&&!H&&T in b){try{b[T]=C==null?"":C}catch{}C!=null&&C!==!1||T=="spellcheck"||b.removeAttribute(T)}else{var Ct=H&&T!==(T=T.replace(/^xlink:?/,""));C==null||C===!1?Ct?b.removeAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase()):b.removeAttribute(T):typeof C!="function"&&(Ct?b.setAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase(),C):b.setAttribute(T,C))}else b.className=C||""}function k(b){return this._listeners[b.type](s.event&&s.event(b)||b)}var w=[],M=0,E=!1,S=!1;function I(){for(var b;b=w.pop();)s.afterMount&&s.afterMount(b),b.componentDidMount&&b.componentDidMount()}function A(b,T,Y,C,H,$){M++||(E=H!=null&&H.ownerSVGElement!==void 0,S=b!=null&&!("__preactattr_"in b));var vt=G(b,T,Y,C,$);return H&&vt.parentNode!==H&&H.appendChild(vt),--M||(S=!1,$||I()),vt}function G(b,T,Y,C,H){var $=b,vt=E;if(T!=null&&typeof T!="boolean"||(T=""),typeof T=="string"||typeof T=="number")return b&&b.splitText!==void 0&&b.parentNode&&(!b._component||H)?b.nodeValue!=T&&(b.nodeValue=T):($=document.createTextNode(T),b&&(b.parentNode&&b.parentNode.replaceChild($,b),P(b,!0))),$.__preactattr_=!0,$;var Ct=T.nodeName;if(typeof Ct=="function")return function(ut,pt,kt,yt){for(var st=ut&&ut._component,nt=st,wt=ut,zt=st&&ut._componentConstructor===pt.nodeName,Bt=zt,xt=v(pt);st&&!Bt&&(st=st._parentComponent);)Bt=st.constructor===pt.nodeName;return st&&Bt&&(!yt||st._component)?(W(st,xt,3,kt,yt),ut=st.base):(nt&&!zt&&(Z(nt),ut=wt=null),st=U(pt.nodeName,xt,kt),ut&&!st.nextBase&&(st.nextBase=ut,wt=null),W(st,xt,1,kt,yt),ut=st.base,wt&&ut!==wt&&(wt._component=null,P(wt,!1))),ut}(b,T,Y,C);if(E=Ct==="svg"||Ct!=="foreignObject"&&E,Ct=String(Ct),(!b||!_(b,Ct))&&($=function(ut,pt){var kt=pt?document.createElementNS("http://www.w3.org/2000/svg",ut):document.createElement(ut);return kt.normalizedNodeName=ut,kt}(Ct,E),b)){for(;b.firstChild;)$.appendChild(b.firstChild);b.parentNode&&b.parentNode.replaceChild($,b),P(b,!0)}var _t=$.firstChild,Mt=$.__preactattr_,Lt=T.children;if(Mt==null){Mt=$.__preactattr_={};for(var Dt=$.attributes,jt=Dt.length;jt--;)Mt[Dt[jt].name]=Dt[jt].value}return!S&&Lt&&Lt.length===1&&typeof Lt[0]=="string"&&_t!=null&&_t.splitText!==void 0&&_t.nextSibling==null?_t.nodeValue!=Lt[0]&&(_t.nodeValue=Lt[0]):(Lt&&Lt.length||_t!=null)&&function(ut,pt,kt,yt,st){var nt,wt,zt,Bt,xt,dt=ut.childNodes,Ft=[],St={},ct=0,ue=0,Ve=dt.length,$t=0,ze=pt?pt.length:0;if(Ve!==0)for(var Ut=0;Ut<Ve;Ut++){var Ht=dt[Ut],Tn=Ht.__preactattr_,ae=ze&&Tn?Ht._component?Ht._component.__key:Tn.key:null;ae!=null?(ct++,St[ae]=Ht):(Tn||(Ht.splitText!==void 0?!st||Ht.nodeValue.trim():st))&&(Ft[$t++]=Ht)}if(ze!==0)for(var Ut=0;Ut<ze;Ut++){Bt=pt[Ut],xt=null;var ae=Bt.key;if(ae!=null)ct&&St[ae]!==void 0&&(xt=St[ae],St[ae]=void 0,ct--);else if(ue<$t){for(nt=ue;nt<$t;nt++)if(Ft[nt]!==void 0&&(qe=wt=Ft[nt],Oe=st,typeof(ve=Bt)=="string"||typeof ve=="number"?qe.splitText!==void 0:typeof ve.nodeName=="string"?!qe._componentConstructor&&_(qe,ve.nodeName):Oe||qe._componentConstructor===ve.nodeName)){xt=wt,Ft[nt]=void 0,nt===$t-1&&$t--,nt===ue&&ue++;break}}xt=G(xt,Bt,kt,yt),zt=dt[Ut],xt&&xt!==ut&&xt!==zt&&(zt==null?ut.appendChild(xt):xt===zt.nextSibling?y(zt):ut.insertBefore(xt,zt))}var qe,ve,Oe;if(ct)for(var Ut in St)St[Ut]!==void 0&&P(St[Ut],!1);for(;ue<=$t;)(xt=Ft[$t--])!==void 0&&P(xt,!1)}($,Lt,Y,C,S||Mt.dangerouslySetInnerHTML!=null),function(ut,pt,kt){var yt;for(yt in kt)pt&&pt[yt]!=null||kt[yt]==null||x(ut,yt,kt[yt],kt[yt]=void 0,E);for(yt in pt)yt==="children"||yt==="innerHTML"||yt in kt&&pt[yt]===(yt==="value"||yt==="checked"?ut[yt]:kt[yt])||x(ut,yt,kt[yt],kt[yt]=pt[yt],E)}($,T.attributes,Mt),E=vt,$}function P(b,T){var Y=b._component;Y?Z(Y):(b.__preactattr_!=null&&b.__preactattr_.ref&&b.__preactattr_.ref(null),T!==!1&&b.__preactattr_!=null||y(b),at(b))}function at(b){for(b=b.lastChild;b;){var T=b.previousSibling;P(b,!0),b=T}}var j=[];function U(b,T,Y){var C,H=j.length;for(b.prototype&&b.prototype.render?(C=new b(T,Y),V.call(C,T,Y)):((C=new V(T,Y)).constructor=b,C.render=O);H--;)if(j[H].constructor===b)return C.nextBase=j[H].nextBase,j.splice(H,1),C;return C}function O(b,T,Y){return this.constructor(b,Y)}function W(b,T,Y,C,H){b._disable||(b._disable=!0,b.__ref=T.ref,b.__key=T.key,delete T.ref,delete T.key,typeof b.constructor.getDerivedStateFromProps>"u"&&(!b.base||H?b.componentWillMount&&b.componentWillMount():b.componentWillReceiveProps&&b.componentWillReceiveProps(T,C)),C&&C!==b.context&&(b.prevContext||(b.prevContext=b.context),b.context=C),b.prevProps||(b.prevProps=b.props),b.props=T,b._disable=!1,Y!==0&&(Y!==1&&s.syncComponentUpdates===!1&&b.base?m(b):D(b,1,H)),b.__ref&&b.__ref(b))}function D(b,T,Y,C){if(!b._disable){var H,$,vt,Ct=b.props,_t=b.state,Mt=b.context,Lt=b.prevProps||Ct,Dt=b.prevState||_t,jt=b.prevContext||Mt,F=b.base,ut=b.nextBase,pt=F||ut,kt=b._component,yt=!1,st=jt;if(b.constructor.getDerivedStateFromProps&&(_t=u(u({},_t),b.constructor.getDerivedStateFromProps(Ct,_t)),b.state=_t),F&&(b.props=Lt,b.state=Dt,b.context=jt,T!==2&&b.shouldComponentUpdate&&b.shouldComponentUpdate(Ct,_t,Mt)===!1?yt=!0:b.componentWillUpdate&&b.componentWillUpdate(Ct,_t,Mt),b.props=Ct,b.state=_t,b.context=Mt),b.prevProps=b.prevState=b.prevContext=b.nextBase=null,b._dirty=!1,!yt){H=b.render(Ct,_t,Mt),b.getChildContext&&(Mt=u(u({},Mt),b.getChildContext())),F&&b.getSnapshotBeforeUpdate&&(st=b.getSnapshotBeforeUpdate(Lt,Dt));var nt,wt,zt=H&&H.nodeName;if(typeof zt=="function"){var Bt=v(H);($=kt)&&$.constructor===zt&&Bt.key==$.__key?W($,Bt,1,Mt,!1):(nt=$,b._component=$=U(zt,Bt,Mt),$.nextBase=$.nextBase||ut,$._parentComponent=b,W($,Bt,0,Mt,!1),D($,1,Y,!0)),wt=$.base}else vt=pt,(nt=kt)&&(vt=b._component=null),(pt||T===1)&&(vt&&(vt._component=null),wt=function(ct,ue,Ve,$t,ze,Ut){M++||(E=ze!=null&&ze.ownerSVGElement!==void 0,S=ct!=null&&!("__preactattr_"in ct));var Ht=G(ct,ue,Ve,$t,Ut);return ze&&Ht.parentNode!==ze&&ze.appendChild(Ht),--M||(S=!1,Ut||I()),Ht}(vt,H,Mt,Y||!F,pt&&pt.parentNode,!0));if(pt&&wt!==pt&&$!==kt){var xt=pt.parentNode;xt&&wt!==xt&&(xt.replaceChild(wt,pt),nt||(pt._component=null,P(pt,!1)))}if(nt&&Z(nt),(b.base=wt)&&!C){for(var dt=b,Ft=b;Ft=Ft._parentComponent;)(dt=Ft).base=wt;wt._component=dt,wt._componentConstructor=dt.constructor}}for(!F||Y?w.unshift(b):yt||(b.componentDidUpdate&&b.componentDidUpdate(Lt,Dt,st),s.afterUpdate&&s.afterUpdate(b));b._renderCallbacks.length;)b._renderCallbacks.pop().call(b);M||C||I()}}function Z(b){s.beforeUnmount&&s.beforeUnmount(b);var T=b.base;b._disable=!0,b.componentWillUnmount&&b.componentWillUnmount(),b.base=null;var Y=b._component;Y?Z(Y):T&&(T.__preactattr_&&T.__preactattr_.ref&&T.__preactattr_.ref(null),y(b.nextBase=T),j.push(b),at(T)),b.__ref&&b.__ref(null)}function V(b,T){this._dirty=!0,this.context=T,this.props=b,this.state=this.state||{},this._renderCallbacks=[]}function z(b,T,Y){return A(Y,b,{},!1,T,!1)}u(V.prototype,{setState:function(b,T){this.prevState||(this.prevState=this.state),this.state=u(u({},this.state),typeof b=="function"?b(this.state,this.props):b),T&&this._renderCallbacks.push(T),m(this)},forceUpdate:function(b){b&&this._renderCallbacks.push(b),D(this,2)},render:function(){}});var ot={h,createElement:h,cloneElement:c,Component:V,render:z,rerender:p,options:s};n.default=ot},function(e,n){var r=e.exports={version:"2.5.7"};typeof __e=="number"&&(__e=r)},function(e,n,r){var o=r(8),s=r(40);e.exports=r(3)?function(a,l,h){return o.f(a,l,s(1,h))}:function(a,l,h){return a[l]=h,a}},function(e,n,r){var o=r(9),s=r(38),a=r(39),l=Object.defineProperty;n.f=r(3)?Object.defineProperty:function(h,u,d){if(o(h),u=a(u,!0),o(d),s)try{return l(h,u,d)}catch{}if("get"in d||"set"in d)throw TypeError("Accessors not supported!");return"value"in d&&(h[u]=d.value),h}},function(e,n,r){var o=r(2);e.exports=function(s){if(!o(s))throw TypeError(s+" is not an object!");return s}},function(e,n){var r=0,o=Math.random();e.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++r+o).toString(36))}},function(e,n,r){var o=r(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return o(s)=="String"?s.split(""):Object(s)}},function(e,n){e.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}},function(e,n,r){var o=r(4);e.exports=function(s,a){return!!s&&o(function(){a?s.call(null,function(){},1):s.call(null)})}},function(e,n,r){var o=r(0);o(o.S+o.F,"Object",{assign:r(41)})},function(e,n,r){var o=r(2),s=r(1).document,a=o(s)&&o(s.createElement);e.exports=function(l){return a?s.createElement(l):{}}},function(e,n,r){var o=r(1),s=r(7),a=r(17),l=r(10)("src"),h="toString",u=Function[h],d=(""+u).split(h);r(6).inspectSource=function(c){return u.call(c)},(e.exports=function(c,f,g,m){var p=typeof g=="function";p&&(a(g,"name")||s(g,"name",f)),c[f]!==g&&(p&&(a(g,l)||s(g,l,c[f]?""+c[f]:d.join(String(f)))),c===o?c[f]=g:m?c[f]?c[f]=g:s(c,f,g):(delete c[f],s(c,f,g)))})(Function.prototype,h,function(){return typeof this=="function"&&this[l]||u.call(this)})},function(e,n){var r={}.hasOwnProperty;e.exports=function(o,s){return r.call(o,s)}},function(e,n,r){var o=r(19);e.exports=function(s,a,l){if(o(s),a===void 0)return s;switch(l){case 1:return function(h){return s.call(a,h)};case 2:return function(h,u){return s.call(a,h,u)};case 3:return function(h,u,d){return s.call(a,h,u,d)}}return function(){return s.apply(a,arguments)}}},function(e,n){e.exports=function(r){if(typeof r!="function")throw TypeError(r+" is not a function!");return r}},function(e,n,r){var o=r(42),s=r(28);e.exports=Object.keys||function(a){return o(a,s)}},function(e,n,r){var o=r(11),s=r(12);e.exports=function(a){return o(s(a))}},function(e,n){var r={}.toString;e.exports=function(o){return r.call(o).slice(8,-1)}},function(e,n,r){var o=r(21),s=r(24),a=r(43);e.exports=function(l){return function(h,u,d){var c,f=o(h),g=s(f.length),m=a(d,g);if(l&&u!=u){for(;m<g;)if((c=f[m++])!=c)return!0}else for(;m<g;m++)if((l||m in f)&&f[m]===u)return l||m||0;return!l&&-1}}},function(e,n,r){var o=r(25),s=Math.min;e.exports=function(a){return 0<a?s(o(a),9007199254740991):0}},function(e,n){var r=Math.ceil,o=Math.floor;e.exports=function(s){return isNaN(s=+s)?0:(0<s?o:r)(s)}},function(e,n,r){var o=r(27)("keys"),s=r(10);e.exports=function(a){return o[a]||(o[a]=s(a))}},function(e,n,r){var o=r(6),s=r(1),a="__core-js_shared__",l=s[a]||(s[a]={});(e.exports=function(h,u){return l[h]||(l[h]=u!==void 0?u:{})})("versions",[]).push({version:o.version,mode:r(44)?"pure":"global",copyright:"\xA9 2018 Denis Pushkarev (zloirock.ru)"})},function(e,n){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,n,r){var o=r(12);e.exports=function(s){return Object(o(s))}},function(e,n,r){var o=r(8).f,s=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in s||r(3)&&o(s,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch{return""}}})},function(e,n,r){var o=r(0),s=r(32)(1);o(o.P+o.F*!r(13)([].map,!0),"Array",{map:function(a){return s(this,a,arguments[1])}})},function(e,n,r){var o=r(18),s=r(11),a=r(29),l=r(24),h=r(47);e.exports=function(u,d){var c=u==1,f=u==2,g=u==3,m=u==4,p=u==6,_=u==5||p,v=d||h;return function(y,x,k){for(var w,M,E=a(y),S=s(E),I=o(x,k,3),A=l(S.length),G=0,P=c?v(y,A):f?v(y,0):void 0;G<A;G++)if((_||G in S)&&(M=I(w=S[G],G,E),u)){if(c)P[G]=M;else if(M)switch(u){case 3:return!0;case 5:return w;case 6:return G;case 2:P.push(w)}else if(m)return!1}return p?-1:g||m?m:P}}},function(e,n,r){var o=r(22);e.exports=Array.isArray||function(s){return o(s)=="Array"}},function(e,n,r){var o=r(27)("wks"),s=r(10),a=r(1).Symbol,l=typeof a=="function";(e.exports=function(h){return o[h]||(o[h]=l&&a[h]||(l?a:s)("Symbol."+h))}).store=o},function(e,n,r){var o=r(0),s=r(23)(!1),a=[].indexOf,l=!!a&&1/[1].indexOf(1,-0)<0;o(o.P+o.F*(l||!r(13)(a)),"Array",{indexOf:function(h){return l?a.apply(this,arguments)||0:s(this,h,arguments[1])}})},function(e,n,r){var o=r(0);o(o.S,"Object",{create:r(52)})},function(e,n,r){n.__esModule=!0,n.default=void 0,r(14),r(30),r(31),r(35),r(49),r(50);var o=r(5),s=function(d){return d&&d.__esModule?d:{default:d}}(r(51));function a(u){if(!u.element)throw new Error("element is not defined");if(!u.id)throw new Error("id is not defined");if(!u.source)throw new Error("source is not defined");Array.isArray(u.source)&&(u.source=l(u.source)),(0,o.render)((0,o.createElement)(s.default,u),u.element)}var l=function(d){return function(c,f){f(d.filter(function(g){return g.toLowerCase().indexOf(c.toLowerCase())!==-1}))}};a.enhanceSelectElement=function(u){if(!u.selectElement)throw new Error("selectElement is not defined");if(!u.source){var d=[].filter.call(u.selectElement.options,function(g){return g.value||u.preserveNullOptions});u.source=d.map(function(g){return g.textContent||g.innerText})}if(u.onConfirm=u.onConfirm||function(g){var m=[].filter.call(u.selectElement.options,function(p){return(p.textContent||p.innerText)===g})[0];m&&(m.selected=!0)},u.selectElement.value||u.defaultValue===void 0){var c=u.selectElement.options[u.selectElement.options.selectedIndex];u.defaultValue=c.textContent||c.innerText}u.name===void 0&&(u.name=""),u.id===void 0&&(u.selectElement.id===void 0?u.id="":u.id=u.selectElement.id),u.autoselect===void 0&&(u.autoselect=!0);var f=document.createElement("div");u.selectElement.parentNode.insertBefore(f,u.selectElement),a(Object.assign({},u,{element:f})),u.selectElement.style.display="none",u.selectElement.id=u.selectElement.id+"-select"};var h=a;n.default=h},function(e,n,r){e.exports=!r(3)&&!r(4)(function(){return Object.defineProperty(r(15)("div"),"a",{get:function(){return 7}}).a!=7})},function(e,n,r){var o=r(2);e.exports=function(s,a){if(!o(s))return s;var l,h;if(a&&typeof(l=s.toString)=="function"&&!o(h=l.call(s))||typeof(l=s.valueOf)=="function"&&!o(h=l.call(s))||!a&&typeof(l=s.toString)=="function"&&!o(h=l.call(s)))return h;throw TypeError("Can't convert object to primitive value")}},function(e,n){e.exports=function(r,o){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:o}}},function(e,n,r){var o=r(20),s=r(45),a=r(46),l=r(29),h=r(11),u=Object.assign;e.exports=!u||r(4)(function(){var d={},c={},f=Symbol(),g="abcdefghijklmnopqrst";return d[f]=7,g.split("").forEach(function(m){c[m]=m}),u({},d)[f]!=7||Object.keys(u({},c)).join("")!=g})?function(d,c){for(var f=l(d),g=arguments.length,m=1,p=s.f,_=a.f;m<g;)for(var v,y=h(arguments[m++]),x=p?o(y).concat(p(y)):o(y),k=x.length,w=0;w<k;)_.call(y,v=x[w++])&&(f[v]=y[v]);return f}:u},function(e,n,r){var o=r(17),s=r(21),a=r(23)(!1),l=r(26)("IE_PROTO");e.exports=function(h,u){var d,c=s(h),f=0,g=[];for(d in c)d!=l&&o(c,d)&&g.push(d);for(;u.length>f;)o(c,d=u[f++])&&(~a(g,d)||g.push(d));return g}},function(e,n,r){var o=r(25),s=Math.max,a=Math.min;e.exports=function(l,h){return(l=o(l))<0?s(l+h,0):a(l,h)}},function(e,n){e.exports=!1},function(e,n){n.f=Object.getOwnPropertySymbols},function(e,n){n.f={}.propertyIsEnumerable},function(e,n,r){var o=r(48);e.exports=function(s,a){return new(o(s))(a)}},function(e,n,r){var o=r(2),s=r(33),a=r(34)("species");e.exports=function(l){var h;return s(l)&&(typeof(h=l.constructor)!="function"||h!==Array&&!s(h.prototype)||(h=void 0),o(h)&&(h=h[a])===null&&(h=void 0)),h===void 0?Array:h}},function(e,n,r){var o=r(0),s=r(32)(2);o(o.P+o.F*!r(13)([].filter,!0),"Array",{filter:function(a){return s(this,a,arguments[1])}})},function(e,n,r){var o=r(0);o(o.S,"Array",{isArray:r(33)})},function(e,n,r){n.__esModule=!0,n.default=void 0,r(14),r(36),r(30),r(31),r(35),r(55),r(58);var o=r(5),s=l(r(60)),a=l(r(61));function l(g){return g&&g.__esModule?g:{default:g}}function h(){return(h=Object.assign||function(g){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var _ in p)Object.prototype.hasOwnProperty.call(p,_)&&(g[_]=p[_])}return g}).apply(this,arguments)}function u(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}var d={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function c(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var f=function(g){function m(_){var v;return(v=g.call(this,_)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:_.defaultValue?[_.defaultValue]:[],query:_.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(u(u(v))),v.handleKeyDown=v.handleKeyDown.bind(u(u(v))),v.handleUpArrow=v.handleUpArrow.bind(u(u(v))),v.handleDownArrow=v.handleDownArrow.bind(u(u(v))),v.handleEnter=v.handleEnter.bind(u(u(v))),v.handlePrintableKey=v.handlePrintableKey.bind(u(u(v))),v.handleListMouseLeave=v.handleListMouseLeave.bind(u(u(v))),v.handleOptionBlur=v.handleOptionBlur.bind(u(u(v))),v.handleOptionClick=v.handleOptionClick.bind(u(u(v))),v.handleOptionFocus=v.handleOptionFocus.bind(u(u(v))),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(u(u(v))),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(u(u(v))),v.handleInputBlur=v.handleInputBlur.bind(u(u(v))),v.handleInputChange=v.handleInputChange.bind(u(u(v))),v.handleInputFocus=v.handleInputFocus.bind(u(u(v))),v.pollInputElement=v.pollInputElement.bind(u(u(v))),v.getDirectInputChanges=v.getDirectInputChanges.bind(u(u(v))),v}(function(v,y){v.prototype=Object.create(y.prototype),(v.prototype.constructor=v).__proto__=y})(m,g);var p=m.prototype;return p.isQueryAnOption=function(_,v){var y=this;return v.map(function(x){return y.templateInputValue(x).toLowerCase()}).indexOf(_.toLowerCase())!==-1},p.componentDidMount=function(){this.pollInputElement()},p.componentWillUnmount=function(){clearTimeout(this.$pollInput)},p.pollInputElement=function(){var _=this;this.getDirectInputChanges(),this.$pollInput=setTimeout(function(){_.pollInputElement()},100)},p.getDirectInputChanges=function(){var _=this.elementReferences[-1];_&&_.value!==this.state.query&&this.handleInputChange({target:{value:_.value}})},p.componentDidUpdate=function(_,v){var y=this.state.focused,x=y===null,k=v.focused!==y;k&&!x&&this.elementReferences[y].focus();var w=y===-1,M=k&&v.focused===null;if(w&&M){var E=this.elementReferences[y];E.setSelectionRange(0,E.value.length)}},p.hasAutoselect=function(){return!c()&&this.props.autoselect},p.templateInputValue=function(_){var v=this.props.templates&&this.props.templates.inputValue;return v?v(_):_},p.templateSuggestion=function(_){var v=this.props.templates&&this.props.templates.suggestion;return v?v(_):_},p.handleComponentBlur=function(_){var v,y=this.state,x=y.options,k=y.query,w=y.selected;this.props.confirmOnBlur?(v=_.query||k,this.props.onConfirm(x[w])):v=k,this.setState({focused:null,menuOpen:_.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,x)})},p.handleListMouseLeave=function(_){this.setState({hovered:null})},p.handleOptionBlur=function(_,v){var y=this.state,x=y.focused,k=y.menuOpen,w=y.options,M=y.selected,E=_.relatedTarget===null,S=_.relatedTarget===this.elementReferences[-1],I=x!==v&&x!==-1;if(!I&&E||!(I||S)){var A=k&&c();this.handleComponentBlur({menuOpen:A,query:this.templateInputValue(w[M])})}},p.handleInputBlur=function(_){var v=this.state,y=v.focused,x=v.menuOpen,k=v.options,w=v.query,M=v.selected;if(y===-1){var E=x&&c(),S=c()?w:this.templateInputValue(k[M]);this.handleComponentBlur({menuOpen:E,query:S})}},p.handleInputChange=function(_){var v=this,y=this.props,x=y.minLength,k=y.source,w=y.showAllValues,M=this.hasAutoselect(),E=_.target.value,S=E.length===0,I=this.state.query.length!==E.length,A=E.length>=x;this.setState({query:E,ariaHint:S}),w||!S&&I&&A?k(E,function(G){var P=0<G.length;v.setState({menuOpen:P,options:G,selected:M&&P?0:-1,validChoiceMade:!1})}):!S&&A||this.setState({menuOpen:!1,options:[]})},p.handleInputClick=function(_){this.handleInputChange(_)},p.handleInputFocus=function(_){var v=this.state,y=v.query,x=v.validChoiceMade,k=v.options,w=this.props.minLength,M=!x&&y.length>=w&&0<k.length;M?this.setState(function(E){var S=E.menuOpen;return{focused:-1,menuOpen:M||S,selected:-1}}):this.setState({focused:-1})},p.handleOptionFocus=function(_){this.setState({focused:_,hovered:null,selected:_})},p.handleOptionMouseEnter=function(_,v){c()||this.setState({hovered:v})},p.handleOptionClick=function(_,v){var y=this.state.options[v],x=this.templateInputValue(y);this.props.onConfirm(y),this.setState({focused:-1,hovered:null,menuOpen:!1,query:x,selected:-1,validChoiceMade:!0}),this.forceUpdate()},p.handleOptionMouseDown=function(_){_.preventDefault()},p.handleUpArrow=function(_){_.preventDefault();var v=this.state,y=v.menuOpen,x=v.selected;x!==-1&&y&&this.handleOptionFocus(x-1)},p.handleDownArrow=function(_){var v=this;if(_.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)_.preventDefault(),this.props.source("",function(M){v.setState({menuOpen:!0,options:M,selected:0,focused:0,hovered:null})});else if(this.state.menuOpen===!0){var y=this.state,x=y.menuOpen,k=y.options,w=y.selected;w!==k.length-1&&x&&this.handleOptionFocus(w+1)}},p.handleSpace=function(_){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(_.preventDefault(),this.props.source("",function(y){v.setState({menuOpen:!0,options:y})})),this.state.focused!==-1&&(_.preventDefault(),this.handleOptionClick(_,this.state.focused))},p.handleEnter=function(_){this.state.menuOpen&&(_.preventDefault(),0<=this.state.selected&&this.handleOptionClick(_,this.state.selected))},p.handlePrintableKey=function(_){var v=this.elementReferences[-1];_.target===v||v.focus()},p.handleKeyDown=function(_){switch(d[_.keyCode]){case"up":this.handleUpArrow(_);break;case"down":this.handleDownArrow(_);break;case"space":this.handleSpace(_);break;case"enter":this.handleEnter(_);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(function(y){return 47<y&&y<58||y===32||y===8||64<y&&y<91||95<y&&y<112||185<y&&y<193||218<y&&y<223})(_.keyCode)&&this.handlePrintableKey(_)}},p.render=function(){var _,v=this,y=this.props,x=y.cssNamespace,k=y.displayMenu,w=y.id,M=y.minLength,E=y.name,S=y.placeholder,I=y.required,A=y.showAllValues,G=y.tNoResults,P=y.tStatusQueryTooShort,at=y.tStatusNoResults,j=y.tStatusSelectedOption,U=y.tStatusResults,O=y.tAssistiveHint,W=y.dropdownArrow,D=this.state,Z=D.focused,V=D.hovered,z=D.menuOpen,ot=D.options,b=D.query,T=D.selected,Y=D.ariaHint,C=D.validChoiceMade,H=this.hasAutoselect(),$=Z===-1,vt=ot.length===0,Ct=b.length!==0,_t=b.length>=M,Mt=this.props.showNoOptionsFound&&$&&vt&&Ct&&_t,Lt=x+"__wrapper",Dt=x+"__input",jt=Z!==null?" "+Dt+"--focused":"",F=this.props.showAllValues?" "+Dt+"--show-all-values":" "+Dt+"--default",ut=x+"__dropdown-arrow-down",pt=Z!==-1&&Z!==null,kt=x+"__menu",yt=kt+"--"+k,st=kt+"--"+(z||Mt?"visible":"hidden"),nt=x+"__option",wt=x+"__hint",zt=this.templateInputValue(ot[T]),Bt=zt&&zt.toLowerCase().indexOf(b.toLowerCase())===0&&H?b+zt.substr(b.length):"",xt=w+"__assistiveHint",dt=Y?{"aria-describedby":xt}:null;return A&&typeof(_=W({className:ut}))=="string"&&(_=(0,o.createElement)("div",{className:x+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:_}})),(0,o.createElement)("div",{className:Lt,onKeyDown:this.handleKeyDown},(0,o.createElement)(s.default,{id:w,length:ot.length,queryLength:b.length,minQueryLength:M,selectedOption:this.templateInputValue(ot[T]),selectedOptionIndex:T,validChoiceMade:C,isInFocus:this.state.focused!==null,tQueryTooShort:P,tNoResults:at,tSelectedOption:j,tResults:U}),Bt&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:wt,readonly:!0,tabIndex:"-1",value:Bt})),(0,o.createElement)("input",h({"aria-expanded":z?"true":"false","aria-activedescendant":!!pt&&w+"__option--"+Z,"aria-owns":w+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},dt,{autoComplete:"off",className:""+Dt+jt+F,id:w,onClick:function(Ft){return v.handleInputClick(Ft)},onBlur:this.handleInputBlur},function(St){return{onInput:St}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:E,placeholder:S,ref:function(Ft){v.elementReferences[-1]=Ft},type:"text",role:"combobox",required:I,value:b})),_,(0,o.createElement)("ul",{className:kt+" "+yt+" "+st,onMouseLeave:function(Ft){return v.handleListMouseLeave(Ft)},id:w+"__listbox",role:"listbox"},ot.map(function(Ft,St){var ct=(Z===-1?T===St:Z===St)&&V===null?" "+nt+"--focused":"",ue=St%2?" "+nt+"--odd":"",Ve=c()?"<span id="+w+"__option-suffix--"+St+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(St+1)+" of "+ot.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":Z===St?"true":"false",className:""+nt+ct+ue,dangerouslySetInnerHTML:{__html:v.templateSuggestion(Ft)+Ve},id:w+"__option--"+St,key:St,onBlur:function($t){return v.handleOptionBlur($t,St)},onClick:function($t){return v.handleOptionClick($t,St)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function($t){return v.handleOptionMouseEnter($t,St)},ref:function($t){v.elementReferences[St]=$t},role:"option",tabIndex:"-1","aria-posinset":St+1,"aria-setsize":ot.length})}),Mt&&(0,o.createElement)("li",{className:nt+" "+nt+"--no-results"},G())),(0,o.createElement)("span",{id:xt,style:{display:"none"}},O()))},m}(o.Component);(n.default=f).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:a.default}},function(e,n,r){var o=r(9),s=r(53),a=r(28),l=r(26)("IE_PROTO"),h=function(){},u="prototype",d=function(){var c,f=r(15)("iframe"),g=a.length;for(f.style.display="none",r(54).appendChild(f),f.src="javascript:",(c=f.contentWindow.document).open(),c.write("<script>document.F=Object<\/script>"),c.close(),d=c.F;g--;)delete d[u][a[g]];return d()};e.exports=Object.create||function(c,f){var g;return c!==null?(h[u]=o(c),g=new h,h[u]=null,g[l]=c):g=d(),f===void 0?g:s(g,f)}},function(e,n,r){var o=r(8),s=r(9),a=r(20);e.exports=r(3)?Object.defineProperties:function(l,h){s(l);for(var u,d=a(h),c=d.length,f=0;f<c;)o.f(l,u=d[f++],h[u]);return l}},function(e,n,r){var o=r(1).document;e.exports=o&&o.documentElement},function(e,n,r){var o=r(0);o(o.P,"Function",{bind:r(56)})},function(e,n,r){var o=r(19),s=r(2),a=r(57),l=[].slice,h={};e.exports=Function.bind||function(u){var d=o(this),c=l.call(arguments,1),f=function(){var g=c.concat(l.call(arguments));return this instanceof f?function(m,p,_){if(!(p in h)){for(var v=[],y=0;y<p;y++)v[y]="a["+y+"]";h[p]=Function("F,a","return new F("+v.join(",")+")")}return h[p](m,_)}(d,g.length,g):a(d,g,u)};return s(d.prototype)&&(f.prototype=d.prototype),f}},function(e,n){e.exports=function(r,o,s){var a=s===void 0;switch(o.length){case 0:return a?r():r.call(s);case 1:return a?r(o[0]):r.call(s,o[0]);case 2:return a?r(o[0],o[1]):r.call(s,o[0],o[1]);case 3:return a?r(o[0],o[1],o[2]):r.call(s,o[0],o[1],o[2]);case 4:return a?r(o[0],o[1],o[2],o[3]):r.call(s,o[0],o[1],o[2],o[3])}return r.apply(s,o)}},function(e,n,r){r(59)("match",1,function(o,s,a){return[function(l){var h=o(this),u=l==null?void 0:l[s];return u!==void 0?u.call(l,h):new RegExp(l)[s](String(h))},a]})},function(e,n,r){var o=r(7),s=r(16),a=r(4),l=r(12),h=r(34);e.exports=function(u,d,c){var f=h(u),g=c(l,f,""[u]),m=g[0],p=g[1];a(function(){var _={};return _[f]=function(){return 7},""[u](_)!=7})&&(s(String.prototype,u,m),o(RegExp.prototype,f,d==2?function(_,v){return p.call(_,this,v)}:function(_){return p.call(_,this)}))}},function(e,n,r){n.__esModule=!0,n.default=void 0,r(36);var o=r(5),s=function(h,u,d){var c;return function(){var f=this,g=arguments,m=function(){c=null,d||h.apply(f,g)},p=d&&!c;clearTimeout(c),c=setTimeout(m,u),p&&h.apply(f,g)}},a=function(l){function h(){for(var d,c=arguments.length,f=new Array(c),g=0;g<c;g++)f[g]=arguments[g];return(d=l.call.apply(l,[this].concat(f))||this).state={bump:!1,debounced:!1},d}(function(c,f){c.prototype=Object.create(f.prototype),(c.prototype.constructor=c).__proto__=f})(h,l);var u=h.prototype;return u.componentWillMount=function(){var d=this;this.debounceStatusUpdate=s(function(){if(!d.state.debounced){var c=!d.props.isInFocus||d.props.validChoiceMade;d.setState(function(f){return{bump:!f.bump,debounced:!0,silenced:c}})}},1400)},u.componentWillReceiveProps=function(d){d.queryLength,this.setState({debounced:!1})},u.render=function(){var d=this.props,c=d.id,f=d.length,g=d.queryLength,m=d.minQueryLength,p=d.selectedOption,_=d.selectedOptionIndex,v=d.tQueryTooShort,y=d.tNoResults,x=d.tSelectedOption,k=d.tResults,w=this.state,M=w.bump,E=w.debounced,S=w.silenced,I=g<m,A=f===0,G=p?x(p,f,_):"",P=null;return P=I?v(m):A?y():k(f,G),this.debounceStatusUpdate(),(0,o.createElement)("div",{style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:c+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!S&&E&&M?P:""),(0,o.createElement)("div",{id:c+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},S||!E||M?"":P))},h}(o.Component);(n.default=a).defaultProps={tQueryTooShort:function(l){return"Type in "+l+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(l,h,u){return l+" "+(u+1)+" of "+h+" is highlighted"},tResults:function(l,h){return l+" "+(l===1?"result":"results")+" "+(l===1?"is":"are")+" available. "+h}}},function(e,n,r){n.__esModule=!0,n.default=void 0;var o=r(5),s=function(l){var h=l.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:h,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};n.default=s}]).default})})(lp);const KM=c1(lp.exports),ZM=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:GDS Transport;font-style:normal;font-weight:400;src:url(/assets/fonts/light-94a07e06a1-v2.woff2) format("woff2"),url(/assets/fonts/light-f591b13f7d-v2.woff) format("woff");font-display:fallback}@font-face{font-family:GDS Transport;font-style:normal;font-weight:700;src:url(/assets/fonts/bold-b542beb274-v2.woff2) format("woff2"),url(/assets/fonts/bold-affa96571d-v2.woff) format("woff");font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-link:link{color:#1d70b8}.govuk-link:visited{color:#4c2c92}.govuk-link:hover{color:#003078}.govuk-link:active{color:#0b0c0c}.govuk-link:focus{color:#0b0c0c}@media print{[href^="/"].govuk-link:after,[href^="http://"].govuk-link:after,[href^="https://"].govuk-link:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:link,.govuk-link--muted:visited{color:#505a5f}.govuk-link--muted:hover,.govuk-link--muted:active{color:#0b0c0c}.govuk-link--muted:focus{color:#0b0c0c}.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:hover{color:#0b0c0cfc}.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#000}}.govuk-link--inverse:link,.govuk-link--inverse:visited{color:#fff}.govuk-link--inverse:hover,.govuk-link--inverse:active{color:#fffffffc}.govuk-link--inverse:focus{color:#0b0c0c}.govuk-link--no-underline:not(:hover):not(:active){text-decoration:none}.govuk-link--no-visited-state:link,.govuk-link--no-visited-state:visited{color:#1d70b8}.govuk-link--no-visited-state:hover{color:#003078}.govuk-link--no-visited-state:active{color:#0b0c0c}.govuk-link--no-visited-state:focus{color:#0b0c0c}.govuk-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-list{font-size:14pt;line-height:1.15}}@media print{.govuk-list{color:#000}}@media (min-width: 40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:0}@media (min-width: 40.0625em){.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:5px}}.govuk-list--spaced>li{margin-bottom:10px}@media (min-width: 40.0625em){.govuk-list--spaced>li{margin-bottom:15px}}.govuk-heading-xl{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000}}@media print{.govuk-heading-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000}}@media print{.govuk-heading-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width: 40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000}}@media print{.govuk-heading-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000}}@media print{.govuk-heading-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-xl{font-size:27px;font-size:1.6875rem;line-height:1.1111111111}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;color:#505a5f}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-lead,.govuk-body-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:20px}@media print{.govuk-body-lead,.govuk-body-l{color:#000}}@media print{.govuk-body-lead,.govuk-body-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-body-lead,.govuk-body-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000}}@media print{.govuk-body,.govuk-body-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000}}@media print{.govuk-body-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-s{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;font-size:.75rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000}}@media print{.govuk-body-xs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-xs{font-size:14px;font-size:.875rem;line-height:1.4285714286}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-top:50px}}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-section-break--l{margin-top:30px}}@media (min-width: 40.0625em){.govuk-section-break--l{margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-section-break--m{margin-top:20px}}@media (min-width: 40.0625em){.govuk-section-break--m{margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #b1b4b6}.govuk-button-group{margin-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media (min-width: 40.0625em){.govuk-button-group{margin-bottom:15px}}.govuk-button-group .govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;display:inline-block;max-width:100%;margin-top:5px;margin-bottom:20px;text-align:center}@media print{.govuk-button-group .govuk-link{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button-group .govuk-link{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button-group .govuk-link{font-size:14pt;line-height:19px}}.govuk-button-group .govuk-button{margin-bottom:17px}@media (min-width: 40.0625em){.govuk-button-group{margin-right:-15px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.govuk-button-group .govuk-button,.govuk-button-group .govuk-link{margin-right:15px}.govuk-button-group .govuk-link{text-align:left}}.govuk-form-group{margin-bottom:20px}.govuk-form-group:after{content:"";display:block;clear:both}@media (min-width: 40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #d4351c}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-grid-column-one-quarter-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-quarter-from-desktop{width:25%;float:left}}.govuk-grid-column-one-third-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-third-from-desktop{width:33.3333%;float:left}}.govuk-grid-column-one-half-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-half-from-desktop{width:50%;float:left}}.govuk-grid-column-two-thirds-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-two-thirds-from-desktop{width:66.6666%;float:left}}.govuk-grid-column-three-quarters-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-three-quarters-from-desktop{width:75%;float:left}}.govuk-grid-column-full-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-full-from-desktop{width:100%;float:left}}.govuk-main-wrapper{display:block;padding-top:20px;padding-bottom:20px}@media (min-width: 40.0625em){.govuk-main-wrapper{padding-top:40px;padding-bottom:40px}}.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:30px}@media (min-width: 40.0625em){.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:50px}}.govuk-template{background-color:#f3f2f1;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}@media screen{.govuk-template{overflow-y:scroll}}.govuk-template__body{margin:0;background-color:#fff}.govuk-width-container{max-width:960px;margin-right:15px;margin-left:15px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(15px,calc(15px + env(safe-area-inset-right)));margin-left:max(15px,calc(15px + env(safe-area-inset-left)))}}@media (min-width: 40.0625em){.govuk-width-container{margin-right:30px;margin-left:30px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(30px,calc(15px + env(safe-area-inset-right)));margin-left:max(30px,calc(15px + env(safe-area-inset-left)))}}}@media (min-width: 1020px){.govuk-width-container{margin-right:auto;margin-left:auto}@supports (margin: max(0px)){.govuk-width-container{margin-right:auto;margin-left:auto}}}.govuk-accordion{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-accordion{margin-bottom:30px}}.govuk-accordion__section{padding-top:15px}.govuk-accordion__section-heading{margin-top:0;margin-bottom:0;padding-top:15px;padding-bottom:15px}.govuk-accordion__section-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;color:#0b0c0c;display:block;margin-bottom:0;padding-top:15px}@media print{.govuk-accordion__section-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-accordion__section-button{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-accordion__section-button{font-size:18pt;line-height:1.15}}@media print{.govuk-accordion__section-button{color:#000}}.govuk-accordion__section-content>:last-child{margin-bottom:0}.js-enabled .govuk-accordion{border-bottom:1px solid #b1b4b6}.js-enabled .govuk-accordion__section{padding-top:0}.js-enabled .govuk-accordion__section-content{display:none;padding-bottom:30px}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-content{padding-bottom:50px}}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-content{display:block}.js-enabled .govuk-accordion__show-all{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;position:relative;z-index:1;margin-bottom:9px;padding:5px 2px 5px 0;border-width:0;color:#1d70b8;background:none;cursor:pointer;-webkit-appearance:none}@media print{.js-enabled .govuk-accordion__show-all{font-family:sans-serif}}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__show-all{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__show-all{font-size:14pt;line-height:1.15}}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__show-all{margin-bottom:14px}}.js-enabled .govuk-accordion__show-all::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__show-all:hover{color:#0b0c0c;background:#f3f2f1;box-shadow:0 -2px #f3f2f1,0 4px #f3f2f1}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__show-all:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron{background:#0b0c0c}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-heading{padding:0}.js-enabled .govuk-accordion-nav__chevron{box-sizing:border-box;display:inline-block;position:relative;width:1.25rem;height:1.25rem;border:.0625rem solid;border-radius:50%;vertical-align:middle}.js-enabled .govuk-accordion-nav__chevron:after{content:"";box-sizing:border-box;display:block;position:absolute;bottom:.3125rem;left:.375rem;width:.375rem;height:.375rem;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-top:.125rem solid;border-right:.125rem solid}.js-enabled .govuk-accordion-nav__chevron--down{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.js-enabled .govuk-accordion__section-button{width:100%;padding:10px 0 0;border:0;border-top:1px solid #b1b4b6;border-bottom:10px solid transparent;color:#0b0c0c;background:none;text-align:left;cursor:pointer;-webkit-appearance:none}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-button{padding-bottom:10px}}.js-enabled .govuk-accordion__section-button:active{color:#0b0c0c;background:none}.js-enabled .govuk-accordion__section-button:hover{color:#0b0c0c;background:#f3f2f1}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__section-button:focus{outline:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-button::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-button{padding-bottom:20px;border-bottom:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:3px}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:2px}}.js-enabled .govuk-accordion__section-toggle,.js-enabled .govuk-accordion__section-heading-text,.js-enabled .govuk-accordion__section-summary{display:block;margin-bottom:13px}.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-toggle-focus{display:inline}.js-enabled .govuk-accordion__section-toggle{font-size:16px;font-size:1rem;line-height:1.25;font-weight:400;color:#1d70b8}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-toggle{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__section-toggle{font-size:14pt;line-height:1.15}}.js-enabled .govuk-accordion__show-all-text,.js-enabled .govuk-accordion__section-toggle-text{margin-left:5px;vertical-align:middle}@media screen and (forced-colors: active){.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{background-color:transparent}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{background:transparent;background-color:transparent}}@media (hover: none){.js-enabled .govuk-accordion__section-header:hover{border-top-color:#b1b4b6;box-shadow:inset 0 3px #1d70b8}.js-enabled .govuk-accordion__section-header:hover .govuk-accordion__section-button{border-top-color:#b1b4b6}}.govuk-back-link{font-size:14px;font-size:.875rem;line-height:1.1428571429;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px}@media (min-width: 40.0625em){.govuk-back-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2}}@media print{.govuk-back-link{font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:hover{color:#0b0c0cfc}.govuk-back-link:active,.govuk-back-link:focus{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus{color:#000}}.govuk-back-link:before{content:"";display:block;position:absolute;top:0;bottom:0;left:3px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-back-link:focus:before{border-color:#0b0c0c}.govuk-back-link:after{content:"";position:absolute;top:-14px;right:0;bottom:-14px;left:0}.govuk-breadcrumbs{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-breadcrumbs{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2}}@media print{.govuk-breadcrumbs{color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:0;bottom:0;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:hover{color:#0b0c0cfc}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#000}}@media (max-width: 40.0525em){.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item{display:none}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:first-child,.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:last-child{display:inline-block}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:before{top:6px;margin:0}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.govuk-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:0 0 22px;padding:8px 10px 7px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00703c;box-shadow:0 2px #002d18;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button{font-size:14pt;line-height:19px}}@media (min-width: 40.0625em){.govuk-button{margin-bottom:32px}}@media (min-width: 40.0625em){.govuk-button{width:auto}}.govuk-button:link,.govuk-button:visited,.govuk-button:active,.govuk-button:hover{color:#fff;text-decoration:none}.govuk-button::-moz-focus-inner{padding:0;border:0}.govuk-button:hover{background-color:#005a30}.govuk-button:active{top:2px}.govuk-button:focus{border-color:#fd0;outline:3px solid transparent;box-shadow:inset 0 0 0 1px #fd0}.govuk-button:focus:not(:active):not(:hover){border-color:#fd0;color:#0b0c0c;background-color:#fd0;box-shadow:0 2px #0b0c0c}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00703c;cursor:default}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;box-shadow:0 2px #002d18}.govuk-button--secondary{background-color:#f3f2f1;box-shadow:0 2px #929191}.govuk-button--secondary,.govuk-button--secondary:link,.govuk-button--secondary:visited,.govuk-button--secondary:active,.govuk-button--secondary:hover{color:#0b0c0c}.govuk-button--secondary:hover{background-color:#dbdad9}.govuk-button--secondary:hover[disabled]{background-color:#f3f2f1}.govuk-button--warning{background-color:#d4351c;box-shadow:0 2px #55150b}.govuk-button--warning,.govuk-button--warning:link,.govuk-button--warning:visited,.govuk-button--warning:active,.govuk-button--warning:hover{color:#fff}.govuk-button--warning:hover{background-color:#aa2a16}.govuk-button--warning:hover[disabled]{background-color:#d4351c}.govuk-button--start{font-weight:700;font-size:18px;font-size:1.125rem;line-height:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 40.0625em){.govuk-button--start{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}.govuk-button__start-icon{margin-left:5px;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;forced-color-adjust:auto}@media (min-width: 48.0625em){.govuk-button__start-icon{margin-left:10px}}.govuk-error-message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px;clear:both;color:#d4351c}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-message{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{min-width:0;margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}@supports not (caret-color: auto){.govuk-fieldset,x:-moz-any-link{display:table-cell}}.govuk-fieldset__legend{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;box-sizing:border-box;display:table;max-width:100%;margin-bottom:10px;padding:0;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15}}@media print{.govuk-fieldset__legend{color:#000}}.govuk-fieldset__legend--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:15px;color:#505a5f}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-hint{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend+.govuk-hint{margin-top:-5px}.govuk-label{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label{font-size:14pt;line-height:1.15}}@media print{.govuk-label{color:#000}}.govuk-label--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-checkboxes__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__label:after{content:"";box-sizing:border-box;position:absolute;top:11px;left:9px;width:23px;height:12px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__hint{display:block;padding-right:15px;padding-left:15px}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 3px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{outline-color:Highlight}}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-checkboxes__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-checkboxes__divider{color:#000}}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.js-enabled .govuk-checkboxes__conditional--hidden{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-checkboxes--small .govuk-checkboxes__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-checkboxes--small .govuk-checkboxes__item:after{content:"";display:block;clear:both}.govuk-checkboxes--small .govuk-checkboxes__input{left:-10px}.govuk-checkboxes--small .govuk-checkboxes__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-checkboxes--small .govuk-checkboxes__label{padding:11px 15px 10px 1px}}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:8px;width:24px;height:24px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:15px;left:6px;width:12px;height:6.5px;border-width:0 0 3px 3px}.govuk-checkboxes--small .govuk-checkboxes__hint{padding:0;clear:both}.govuk-checkboxes--small .govuk-checkboxes__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:initial}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0}}.govuk-textarea{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:block;width:100%;min-height:40px;margin-bottom:20px;padding:5px;resize:vertical;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-textarea{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}@media (min-width: 40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-textarea--error{border-color:#d4351c}.govuk-textarea--error:focus{border-color:#0b0c0c}.govuk-character-count{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-character-count{margin-bottom:30px}}.govuk-character-count .govuk-form-group,.govuk-character-count .govuk-textarea{margin-bottom:5px}.govuk-character-count__message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400;margin-top:0;margin-bottom:0}@media print{.govuk-character-count__message{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-character-count__message{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-character-count__message--disabled{visibility:hidden}.govuk-cookie-banner{padding-top:20px;border-bottom:10px solid transparent;background-color:#f3f2f1}.govuk-cookie-banner[hidden]{display:none}.govuk-cookie-banner__message{margin-bottom:-10px}.govuk-cookie-banner__message[hidden]{display:none}.govuk-cookie-banner__message:focus{outline:none}.govuk-summary-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin:0 0 20px}@media print{.govuk-summary-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-summary-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-summary-list{font-size:14pt;line-height:1.15}}@media print{.govuk-summary-list{color:#000}}@media (min-width: 40.0625em){.govuk-summary-list{display:table;width:100%;table-layout:fixed;border-collapse:collapse}}@media (min-width: 40.0625em){.govuk-summary-list{margin-bottom:30px}}.govuk-summary-list__row{border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-summary-list__row{margin-bottom:15px}}@media (min-width: 40.0625em){.govuk-summary-list__row{display:table-row}}@media (min-width: 40.0625em){.govuk-summary-list__row--no-actions:after{content:"";display:table-cell;width:20%}}.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{margin:0}@media (min-width: 40.0625em){.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{display:table-cell;padding-top:10px;padding-right:20px;padding-bottom:10px}}.govuk-summary-list__actions{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-summary-list__actions{width:20%;padding-right:0;text-align:right}}.govuk-summary-list__key,.govuk-summary-list__value{word-wrap:break-word;overflow-wrap:break-word}.govuk-summary-list__key{margin-bottom:5px;font-weight:700}@media (min-width: 40.0625em){.govuk-summary-list__key{width:30%}}@media (max-width: 40.0525em){.govuk-summary-list__value{margin-bottom:15px}}.govuk-summary-list__value>p{margin-bottom:10px}.govuk-summary-list__value>:last-child{margin-bottom:0}.govuk-summary-list__actions-list{width:100%;margin:0;padding:0}.govuk-summary-list__actions-list-item{display:inline;margin-right:10px;padding-right:10px}.govuk-summary-list__actions-list-item:not(:last-child){border-right:1px solid #b1b4b6}.govuk-summary-list__actions-list-item:last-child{margin-right:0;padding-right:0;border:0}.govuk-summary-list--no-border .govuk-summary-list__row{border:0}@media (min-width: 40.0625em){.govuk-summary-list--no-border .govuk-summary-list__key,.govuk-summary-list--no-border .govuk-summary-list__value,.govuk-summary-list--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-summary-list__row--no-border{border:0}@media (min-width: 40.0625em){.govuk-summary-list__row--no-border .govuk-summary-list__key,.govuk-summary-list__row--no-border .govuk-summary-list__value,.govuk-summary-list__row--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-input{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;width:100%;height:40px;height:2.5rem;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-input::-webkit-outer-spin-button,.govuk-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border-color:#d4351c}.govuk-input--error:focus{border-color:#0b0c0c}.govuk-input--width-30{max-width:59ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-input--width-5{max-width:10.8ex}.govuk-input--width-4{max-width:9ex}.govuk-input--width-3{max-width:7.2ex}.govuk-input--width-2{max-width:5.4ex}.govuk-input__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.govuk-input__wrapper .govuk-input{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.govuk-input__wrapper .govuk-input:focus{z-index:1}@media (max-width: 19.99em){.govuk-input__wrapper{display:block}.govuk-input__wrapper .govuk-input{max-width:100%}}.govuk-input__prefix,.govuk-input__suffix{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:inline-block;min-width:40px;min-width:2.5rem;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;background-color:#f3f2f1;text-align:center;white-space:nowrap;cursor:default;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media print{.govuk-input__prefix,.govuk-input__suffix{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input__prefix,.govuk-input__suffix{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input__prefix,.govuk-input__suffix{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-input__prefix,.govuk-input__suffix{line-height:1.6}}@media (max-width: 19.99em){.govuk-input__prefix,.govuk-input__suffix{display:block;height:100%;white-space:normal}}@media (max-width: 19.99em){.govuk-input__prefix{border-bottom:0}}@media (min-width: 20em){.govuk-input__prefix{border-right:0}}@media (max-width: 19.99em){.govuk-input__suffix{border-top:0}}@media (min-width: 20em){.govuk-input__suffix{border-left:0}}.govuk-date-input{font-size:0}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{display:inline-block;margin-right:20px;margin-bottom:0}.govuk-date-input__label{display:block}.govuk-date-input__input{margin-bottom:0}.govuk-details{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-details{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-details{font-size:14pt;line-height:1.15}}@media print{.govuk-details{color:#000}}@media (min-width: 40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#1d70b8;cursor:pointer}.govuk-details__summary:hover{color:#003078}.govuk-details__summary:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:focus .govuk-details__summary-text{text-decoration:none}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:-1px;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,100% 50%,0% 100%);clip-path:polygon(0% 0%,100% 50%,0% 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:12.124px 7px 0 7px;border-top-color:inherit}.govuk-details__text{padding-top:15px;padding-bottom:15px;padding-left:20px;border-left:5px solid #b1b4b6}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text>:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:5px solid #d4351c}@media print{.govuk-error-summary{color:#000}}@media (min-width: 40.0625em){.govuk-error-summary{padding:20px}}@media (min-width: 40.0625em){.govuk-error-summary{margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffdd00}.govuk-error-summary__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__title{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__body{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-error-summary__list a{font-family:sans-serif}}.govuk-error-summary__list a:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#d4351c}.govuk-error-summary__list a:hover{color:#942514}.govuk-error-summary__list a:active{color:#d4351c}.govuk-error-summary__list a:focus{color:#0b0c0c}.govuk-file-upload{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;max-width:100%;margin-left:-5px;padding:5px}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-file-upload{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15}}@media print{.govuk-file-upload{color:#000}}.govuk-file-upload::-webkit-file-upload-button{-webkit-appearance:button;color:inherit;font:inherit}.govuk-file-upload:focus{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-file-upload:focus-within{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-footer{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;padding-top:25px;padding-bottom:15px;border-top:1px solid #b1b4b6;color:#0b0c0c;background:#f3f2f1}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-footer{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-footer{padding-top:40px}}@media (min-width: 40.0625em){.govuk-footer{padding-bottom:25px}}.govuk-footer__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-footer__link{font-family:sans-serif}}.govuk-footer__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-footer__link:link,.govuk-footer__link:visited{color:#0b0c0c}@media print{.govuk-footer__link:link,.govuk-footer__link:visited{color:#000}}.govuk-footer__link:hover{color:#0b0c0cfc}.govuk-footer__link:active,.govuk-footer__link:focus{color:#0b0c0c}@media print{.govuk-footer__link:active,.govuk-footer__link:focus{color:#000}}.govuk-footer__section-break{margin:0 0 30px;border:0;border-bottom:1px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}@media (max-width: 40.0525em){.govuk-footer__meta-item--grow{-webkit-flex-basis:320px;-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top;forced-color-adjust:auto}@media (max-width: 48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0%;background-size:125px 102px;text-align:center;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__meta-custom{margin-bottom:20px}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{margin-right:-15px;margin-left:-15px}.govuk-footer__navigation:after{content:"";display:block;clear:both}.govuk-footer__section{display:inline-block;margin-bottom:30px;vertical-align:top}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list .govuk-footer__link:hover{text-decoration-thickness:auto}@media (min-width: 48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;border-bottom:10px solid #ffffff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header__container--full-width{padding:0 15px;border-color:#1d70b8}.govuk-header__container--full-width .govuk-header__menu-button{right:15px}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #1d70b8}.govuk-header__container:after{content:"";display:block;clear:both}.govuk-header__logotype{display:inline-block;margin-right:5px}@media (forced-colors: active){.govuk-header__logotype{forced-color-adjust:none;color:linktext}}.govuk-header__logotype:last-child{margin-right:0}.govuk-header__logotype-crown{position:relative;top:-1px;margin-right:1px;fill:currentColor;vertical-align:top}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:bottom}.govuk-header__product-name{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1;display:inline-table}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__product-name{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1}}.govuk-header__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none}@media print{.govuk-header__link{font-family:sans-serif}}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover,.govuk-header__link:active{color:#fffffffc}.govuk-header__link:focus{color:#0b0c0c}.govuk-header__link:hover{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.1em}.govuk-header__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__link--homepage{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;margin-right:10px;font-size:30px;line-height:1}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{text-decoration:none}.govuk-header__link--homepage:hover,.govuk-header__link--homepage:active{margin-bottom:-3px;border-bottom:3px solid}.govuk-header__link--homepage:focus{margin-bottom:0;border-bottom:0}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__link--service-name{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo,.govuk-header__content{box-sizing:border-box}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width: 40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width: 48.0625em){.govuk-header__logo{width:33.33%;padding-right:15px;float:left;vertical-align:top}}@media (min-width: 48.0625em){.govuk-header__content{width:66.66%;padding-left:15px;float:left}}.govuk-header__menu-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;cursor:pointer}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__menu-button{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{-webkit-text-decoration:solid underline 3px;text-decoration:solid underline 3px;text-underline-offset:.1em}.govuk-header__menu-button:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:8.66px 5px 0 5px;border-top-color:inherit;content:"";margin-left:5px}@media (min-width: 40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0%,0% 100%,100% 100%);clip-path:polygon(50% 0%,0% 100%,100% 100%);border-width:0 5px 8.66px 5px;border-bottom-color:inherit}@media (min-width: 48.0625em){.govuk-header__navigation{margin-bottom:10px}}.govuk-header__navigation-list{margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button{display:block}@media (min-width: 48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation-list{display:none}@media (min-width: 48.0625em){.js-enabled .govuk-header__navigation-list{display:block}}.js-enabled .govuk-header__navigation-list--open{display:block}@media (min-width: 48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width: 48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1.1428571429;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__navigation-item a{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item--active a:focus{color:#0b0c0c}.govuk-header__navigation-item:last-child{margin-right:0;border-bottom:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-inset-text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #b1b4b6}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-inset-text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15}}@media print{.govuk-inset-text{color:#000}}@media (min-width: 40.0625em){.govuk-inset-text{margin-top:30px}}@media (min-width: 40.0625em){.govuk-inset-text{margin-bottom:30px}}.govuk-inset-text>:first-child{margin-top:0}.govuk-inset-text>:only-child,.govuk-inset-text>:last-child{margin-bottom:0}.govuk-notification-banner{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:30px;border:5px solid #1d70b8;background-color:#1d70b8}@media print{.govuk-notification-banner{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-notification-banner{margin-bottom:50px}}.govuk-notification-banner:focus{outline:3px solid #ffdd00}.govuk-notification-banner__header{padding:2px 15px 5px;border-bottom:1px solid transparent}@media (min-width: 40.0625em){.govuk-notification-banner__header{padding:2px 20px 5px}}.govuk-notification-banner__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;margin:0;padding:0;color:#fff}@media print{.govuk-notification-banner__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner__title{font-size:14pt;line-height:1.15}}.govuk-notification-banner__content{color:#0b0c0c;padding:15px;background-color:#fff}@media print{.govuk-notification-banner__content{color:#000}}@media (min-width: 40.0625em){.govuk-notification-banner__content{padding:20px}}.govuk-notification-banner__content>*{box-sizing:border-box;max-width:605px}.govuk-notification-banner__content>:last-child{margin-bottom:0}.govuk-notification-banner__heading{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin:0 0 15px;padding:0}@media print{.govuk-notification-banner__heading{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__heading{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-notification-banner__heading{font-size:18pt;line-height:1.15}}.govuk-notification-banner__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-notification-banner__link{font-family:sans-serif}}.govuk-notification-banner__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-notification-banner__link:link,.govuk-notification-banner__link:visited{color:#1d70b8}.govuk-notification-banner__link:hover{color:#003078}.govuk-notification-banner__link:active{color:#0b0c0c}.govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-notification-banner--success{border-color:#00703c;background-color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:link,.govuk-notification-banner--success .govuk-notification-banner__link:visited{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:hover{color:#004e2a}.govuk-notification-banner--success .govuk-notification-banner__link:active{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-panel{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-panel{padding:10px;overflow-wrap:break-word;word-wrap:break-word}}.govuk-panel--confirmation{color:#fff;background:#00703c}@media print{.govuk-panel--confirmation{border-color:currentColor;color:#000;background:none}}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__title{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__title:last-child{margin-bottom:0}.govuk-panel__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;font-size:1.5rem;line-height:1.0416666667}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__body{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{display:inline-block;outline:2px solid transparent;outline-offset:-2px;color:#fff;background-color:#1d70b8;letter-spacing:1px;text-decoration:none;text-transform:uppercase;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;padding:5px 8px 4px}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}.govuk-tag--grey{color:#383f43;background:#eeefef}.govuk-tag--purple{color:#3d2375;background:#dbd5e9}.govuk-tag--turquoise{color:#10403c;background:#bfe3e0}.govuk-tag--blue{color:#144e81;background:#d2e2f1}.govuk-tag--yellow{color:#594d00;background:#fff7bf}.govuk-tag--orange{color:#6e3619;background:#fcd6c3}.govuk-tag--red{color:#942514;background:#f6d7d2}.govuk-tag--pink{color:#80224d;background:#f7d7e6}.govuk-tag--green{color:#005a30;background:#cce2d8}.govuk-phase-banner{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #b1b4b6}.govuk-phase-banner__content{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;display:table;margin:0}@media print{.govuk-phase-banner__content{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-phase-banner__content{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-phase-banner__content{font-size:14pt;line-height:1.2}}@media print{.govuk-phase-banner__content{color:#000}}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:middle}.govuk-tabs{margin-top:5px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-tabs{margin-top:5px}}@media (min-width: 40.0625em){.govuk-tabs{margin-bottom:30px}}.govuk-tabs__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:10px}@media print{.govuk-tabs__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__title{font-size:14pt;line-height:1.15}}@media print{.govuk-tabs__title{color:#000}}.govuk-tabs__list{margin:0 0 20px;padding:0;list-style:none}@media (min-width: 40.0625em){.govuk-tabs__list{margin-bottom:30px}}.govuk-tabs__list-item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-left:25px}@media print{.govuk-tabs__list-item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__list-item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__list-item{font-size:14pt;line-height:1.15}}.govuk-tabs__list-item:before{color:#0b0c0c;content:"\\2014";margin-left:-25px;padding-right:5px}@media print{.govuk-tabs__list-item:before{color:#000}}.govuk-tabs__tab{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;margin-bottom:10px}@media print{.govuk-tabs__tab{font-family:sans-serif}}.govuk-tabs__tab:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-tabs__tab:link{color:#1d70b8}.govuk-tabs__tab:visited{color:#4c2c92}.govuk-tabs__tab:hover{color:#003078}.govuk-tabs__tab:active{color:#0b0c0c}.govuk-tabs__tab:focus{color:#0b0c0c}.govuk-tabs__panel{margin-bottom:30px}@media (min-width: 40.0625em){.govuk-tabs__panel{margin-bottom:50px}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__list{margin-bottom:0;border-bottom:1px solid #b1b4b6}.js-enabled .govuk-tabs__list:after{content:"";display:block;clear:both}.js-enabled .govuk-tabs__title{display:none}.js-enabled .govuk-tabs__list-item{position:relative;margin-right:5px;margin-bottom:0;margin-left:0;padding:10px 20px;float:left;background-color:#f3f2f1;text-align:center}.js-enabled .govuk-tabs__list-item:before{content:none}.js-enabled .govuk-tabs__list-item--selected{position:relative;margin-top:-5px;margin-bottom:-1px;padding:14px 19px 16px;border:1px solid #b1b4b6;border-bottom:0;background-color:#fff}.js-enabled .govuk-tabs__list-item--selected .govuk-tabs__tab{text-decoration:none}.js-enabled .govuk-tabs__tab{margin-bottom:0}.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:hover{color:#0b0c0cfc}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0;padding:30px 20px;border:1px solid #b1b4b6;border-top:0}}@media (min-width: 40.0625em) and (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel>:last-child{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel--hidden{display:none}}.govuk-radios__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-radios__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__hint{display:block;padding-right:15px;padding-left:15px}.govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 4px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-radios__input:focus+.govuk-radios__label:before{outline-color:Highlight}}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width: 40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-radios__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-radios__divider{color:#000}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.js-enabled .govuk-radios__conditional--hidden{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-radios--small .govuk-radios__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-radios--small .govuk-radios__item:after{content:"";display:block;clear:both}.govuk-radios--small .govuk-radios__input{left:-10px}.govuk-radios--small .govuk-radios__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-radios--small .govuk-radios__label{padding:11px 15px 10px 1px}}.govuk-radios--small .govuk-radios__label:before{top:8px;width:24px;height:24px}.govuk-radios--small .govuk-radios__label:after{top:15px;left:7px;border-width:5px}.govuk-radios--small .govuk-radios__hint{padding:0;clear:both;pointer-events:none}.govuk-radios--small .govuk-radios__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-radios--small .govuk-radios__divider{width:24px;margin-bottom:5px}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:initial}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0}}.govuk-select{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;max-width:100%;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;color:#0b0c0c;background-color:#fff}@media print{.govuk-select{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-select{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-select option:active,.govuk-select option:checked,.govuk-select:focus::-ms-value{color:#fff;background-color:#1d70b8}.govuk-select--error{border-color:#d4351c}.govuk-select--error:focus{border-color:#0b0c0c}.govuk-skip-link{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:hover{color:#0b0c0cfc}.govuk-skip-link:active,.govuk-skip-link:focus{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus{color:#000}}@media (min-width: 40.0625em){.govuk-skip-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}@supports (padding: max(0px)){.govuk-skip-link{padding-right:max(15px,calc(15px + env(safe-area-inset-right)));padding-left:max(15px,calc(15px + env(safe-area-inset-left)))}}.govuk-skip-link:focus{outline:3px solid #ffdd00;outline-offset:0;background-color:#fd0}.govuk-skip-link-focused-element:focus{outline:none}.govuk-table{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table{font-size:14pt;line-height:1.15}}@media print{.govuk-table{color:#000}}@media (min-width: 40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__header,.govuk-table__cell{padding:10px 20px 10px 0;border-bottom:1px solid #b1b4b6;text-align:left;vertical-align:top}.govuk-table__cell--numeric{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-table__cell--numeric{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-table__header--numeric,.govuk-table__cell--numeric{text-align:right}.govuk-table__header:last-child,.govuk-table__cell:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-table__caption--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-table__caption--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-table__caption--xl{font-size:32pt;line-height:1.15}}.govuk-table__caption--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-table__caption--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-table__caption--l{font-size:24pt;line-height:1.05}}.govuk-table__caption--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-table__caption--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-table__caption--m{font-size:18pt;line-height:1.15}}.govuk-table__caption--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-table__caption--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table__caption--s{font-size:14pt;line-height:1.15}}.govuk-warning-text{position:relative;margin-bottom:20px;padding:10px 0}@media (min-width: 40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-warning-text__icon{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;box-sizing:border-box;display:inline-block;position:absolute;left:0;min-width:35px;min-height:35px;margin-top:-7px;border:3px solid #0b0c0c;border-radius:50%;color:#fff;background:#0b0c0c;font-size:30px;line-height:29px;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;forced-color-adjust:none}@media print{.govuk-warning-text__icon{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__icon{margin-top:-5px}}@media screen and (forced-colors: active){.govuk-warning-text__icon{border-color:windowText;color:windowText;background:transparent}}.govuk-warning-text__text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;padding-left:45px}@media print{.govuk-warning-text__text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-warning-text__text{font-size:14pt;line-height:1.15}}@media print{.govuk-warning-text__text{color:#000}}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-visually-hidden-focusable{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important}.govuk-visually-hidden-focusable:active,.govuk-visually-hidden-focusable:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}.govuk-\\!-display-inline{display:inline!important}.govuk-\\!-display-inline-block{display:inline-block!important}.govuk-\\!-display-block{display:block!important}.govuk-\\!-display-none{display:none!important}@media print{.govuk-\\!-display-none-print{display:none!important}}.govuk-\\!-margin-0{margin:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-0{margin:0!important}}.govuk-\\!-margin-top-0{margin-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-0{margin-top:0!important}}.govuk-\\!-margin-right-0{margin-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-0{margin-right:0!important}}.govuk-\\!-margin-bottom-0{margin-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\\!-margin-left-0{margin-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-0{margin-left:0!important}}.govuk-\\!-margin-1{margin:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-1{margin:5px!important}}.govuk-\\!-margin-top-1{margin-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-1{margin-top:5px!important}}.govuk-\\!-margin-right-1{margin-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-1{margin-right:5px!important}}.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\\!-margin-left-1{margin-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-1{margin-left:5px!important}}.govuk-\\!-margin-2{margin:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-2{margin:10px!important}}.govuk-\\!-margin-top-2{margin-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-2{margin-top:10px!important}}.govuk-\\!-margin-right-2{margin-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-2{margin-right:10px!important}}.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\\!-margin-left-2{margin-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-2{margin-left:10px!important}}.govuk-\\!-margin-3{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-3{margin:15px!important}}.govuk-\\!-margin-top-3{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-3{margin-top:15px!important}}.govuk-\\!-margin-right-3{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-3{margin-right:15px!important}}.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\\!-margin-left-3{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-3{margin-left:15px!important}}.govuk-\\!-margin-4{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-4{margin:20px!important}}.govuk-\\!-margin-top-4{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-4{margin-top:20px!important}}.govuk-\\!-margin-right-4{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-4{margin-right:20px!important}}.govuk-\\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\\!-margin-left-4{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-4{margin-left:20px!important}}.govuk-\\!-margin-5{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-5{margin:25px!important}}.govuk-\\!-margin-top-5{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-5{margin-top:25px!important}}.govuk-\\!-margin-right-5{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-5{margin-right:25px!important}}.govuk-\\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\\!-margin-left-5{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-5{margin-left:25px!important}}.govuk-\\!-margin-6{margin:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-6{margin:30px!important}}.govuk-\\!-margin-top-6{margin-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-6{margin-top:30px!important}}.govuk-\\!-margin-right-6{margin-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-6{margin-right:30px!important}}.govuk-\\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\\!-margin-left-6{margin-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-6{margin-left:30px!important}}.govuk-\\!-margin-7{margin:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-7{margin:40px!important}}.govuk-\\!-margin-top-7{margin-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-7{margin-top:40px!important}}.govuk-\\!-margin-right-7{margin-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-7{margin-right:40px!important}}.govuk-\\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\\!-margin-left-7{margin-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-7{margin-left:40px!important}}.govuk-\\!-margin-8{margin:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-8{margin:50px!important}}.govuk-\\!-margin-top-8{margin-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-8{margin-top:50px!important}}.govuk-\\!-margin-right-8{margin-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-8{margin-right:50px!important}}.govuk-\\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\\!-margin-left-8{margin-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-8{margin-left:50px!important}}.govuk-\\!-margin-9{margin:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-9{margin:60px!important}}.govuk-\\!-margin-top-9{margin-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-9{margin-top:60px!important}}.govuk-\\!-margin-right-9{margin-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-9{margin-right:60px!important}}.govuk-\\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\\!-margin-left-9{margin-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-9{margin-left:60px!important}}.govuk-\\!-padding-0{padding:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-0{padding:0!important}}.govuk-\\!-padding-top-0{padding-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-0{padding-top:0!important}}.govuk-\\!-padding-right-0{padding-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-0{padding-right:0!important}}.govuk-\\!-padding-bottom-0{padding-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\\!-padding-left-0{padding-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-0{padding-left:0!important}}.govuk-\\!-padding-1{padding:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-1{padding:5px!important}}.govuk-\\!-padding-top-1{padding-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-1{padding-top:5px!important}}.govuk-\\!-padding-right-1{padding-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-1{padding-right:5px!important}}.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\\!-padding-left-1{padding-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-1{padding-left:5px!important}}.govuk-\\!-padding-2{padding:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-2{padding:10px!important}}.govuk-\\!-padding-top-2{padding-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-2{padding-top:10px!important}}.govuk-\\!-padding-right-2{padding-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-2{padding-right:10px!important}}.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\\!-padding-left-2{padding-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-2{padding-left:10px!important}}.govuk-\\!-padding-3{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-3{padding:15px!important}}.govuk-\\!-padding-top-3{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-3{padding-top:15px!important}}.govuk-\\!-padding-right-3{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-3{padding-right:15px!important}}.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\\!-padding-left-3{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-3{padding-left:15px!important}}.govuk-\\!-padding-4{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-4{padding:20px!important}}.govuk-\\!-padding-top-4{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-4{padding-top:20px!important}}.govuk-\\!-padding-right-4{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-4{padding-right:20px!important}}.govuk-\\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\\!-padding-left-4{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-4{padding-left:20px!important}}.govuk-\\!-padding-5{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-5{padding:25px!important}}.govuk-\\!-padding-top-5{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-5{padding-top:25px!important}}.govuk-\\!-padding-right-5{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-5{padding-right:25px!important}}.govuk-\\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\\!-padding-left-5{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-5{padding-left:25px!important}}.govuk-\\!-padding-6{padding:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-6{padding:30px!important}}.govuk-\\!-padding-top-6{padding-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-6{padding-top:30px!important}}.govuk-\\!-padding-right-6{padding-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-6{padding-right:30px!important}}.govuk-\\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\\!-padding-left-6{padding-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-6{padding-left:30px!important}}.govuk-\\!-padding-7{padding:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-7{padding:40px!important}}.govuk-\\!-padding-top-7{padding-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-7{padding-top:40px!important}}.govuk-\\!-padding-right-7{padding-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-7{padding-right:40px!important}}.govuk-\\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\\!-padding-left-7{padding-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-7{padding-left:40px!important}}.govuk-\\!-padding-8{padding:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-8{padding:50px!important}}.govuk-\\!-padding-top-8{padding-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-8{padding-top:50px!important}}.govuk-\\!-padding-right-8{padding-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-8{padding-right:50px!important}}.govuk-\\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\\!-padding-left-8{padding-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-8{padding-left:50px!important}}.govuk-\\!-padding-9{padding:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-9{padding:60px!important}}.govuk-\\!-padding-top-9{padding-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-9{padding-top:60px!important}}.govuk-\\!-padding-right-9{padding-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-9{padding-right:60px!important}}.govuk-\\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\\!-padding-left-9{padding-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-9{padding-left:60px!important}}.govuk-\\!-text-align-left{text-align:left!important}.govuk-\\!-text-align-centre{text-align:center!important}.govuk-\\!-text-align-right{text-align:right!important}.govuk-\\!-font-size-80{font-size:53px!important;font-size:3.3125rem!important;line-height:1.0377358491!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-80{font-size:80px!important;font-size:5rem!important;line-height:1!important}}@media print{.govuk-\\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\\!-font-size-48{font-size:32px!important;font-size:2rem!important;line-height:1.09375!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-48{font-size:48px!important;font-size:3rem!important;line-height:1.0416666667!important}}@media print{.govuk-\\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\\!-font-size-36{font-size:24px!important;font-size:1.5rem!important;line-height:1.0416666667!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-36{font-size:36px!important;font-size:2.25rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\\!-font-size-27{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-27{font-size:27px!important;font-size:1.6875rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-24{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-24{font-size:24px!important;font-size:1.5rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-19{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-19{font-size:19px!important;font-size:1.1875rem!important;line-height:1.3157894737!important}}@media print{.govuk-\\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\\!-font-size-16{font-size:14px!important;font-size:.875rem!important;line-height:1.1428571429!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-16{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\\!-font-size-14{font-size:12px!important;font-size:.75rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-14{font-size:14px!important;font-size:.875rem!important;line-height:1.4285714286!important}}@media print{.govuk-\\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\\!-font-weight-regular{font-weight:400!important}.govuk-\\!-font-weight-bold{font-weight:700!important}.govuk-\\!-width-full,.govuk-\\!-width-three-quarters{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-three-quarters{width:75%!important}}.govuk-\\!-width-two-thirds{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-two-thirds{width:66.66%!important}}.govuk-\\!-width-one-half{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-half{width:50%!important}}.govuk-\\!-width-one-third{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-third{width:33.33%!important}}.govuk-\\!-width-one-quarter{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-quarter{width:25%!important}}:host .govuk-label{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif)}:host .govuk-label--static{font-size:var(--autocomplete__label__font-size, 19px)}:host .autocomplete__input{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif);font-size:var(--autocomplete__input__font-size, 19px);height:var(--autocomplete__input__height, 35px);padding:var(--autocomplete__input__padding, 5px 34px 5px 5px);z-index:calc(var(--autocomplete__dropdown-arrow-down__z-index, 1) + 1)}:host .autocomplete__dropdown-arrow-down{z-index:var(--autocomplete__dropdown-arrow-down__z-index, 1);top:calc((var(--autocomplete__input__height, 35px) - 17px) / 2)}:host .autocomplete__option{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif);font-size:var(--autocomplete__input__font-size, 19px);padding:var(--autocomplete__option__padding, 5px);border-bottom:var(--autocomplete__option__border-bottom, solid 1px #b1b4b6)}:host .autocomplete__option--focused,:host .autocomplete__option:hover,.autocomplete__option--focused :host .autocomplete__option:hover{border-color:var(--autocomplete__option__hover-border-color, #1d70b8);background-color:var(--autocomplete__option__hover-background-color, #1d70b8)}:host .autocomplete__menu{max-height:var(--autocomplete__menu__max-height, 342px)}
|
86
|
-
`;var hp=Object.freeze,up=Object.defineProperty,
|
85
|
+
<div id="`,'" class="map" tabindex="0" />'])),this.id)}disconnectedCallback(){var i;super.disconnectedCallback(),(i=this.map)==null||i.dispose()}},j.MyMap.styles=Es(JC),vt([J({type:String})],j.MyMap.prototype,"id",2),vt([J({type:Number})],j.MyMap.prototype,"latitude",2),vt([J({type:Number})],j.MyMap.prototype,"longitude",2),vt([J({type:String})],j.MyMap.prototype,"projection",2),vt([J({type:Number})],j.MyMap.prototype,"zoom",2),vt([J({type:Number})],j.MyMap.prototype,"minZoom",2),vt([J({type:Number})],j.MyMap.prototype,"maxZoom",2),vt([J({type:Boolean})],j.MyMap.prototype,"drawMode",2),vt([J({type:Object})],j.MyMap.prototype,"drawGeojsonData",2),vt([J({type:Number})],j.MyMap.prototype,"drawGeojsonDataBuffer",2),vt([J({type:String})],j.MyMap.prototype,"drawPointer",2),vt([J({type:Boolean})],j.MyMap.prototype,"showFeaturesAtPoint",2),vt([J({type:Boolean})],j.MyMap.prototype,"clickFeatures",2),vt([J({type:String})],j.MyMap.prototype,"featureColor",2),vt([J({type:Boolean})],j.MyMap.prototype,"featureFill",2),vt([J({type:Boolean})],j.MyMap.prototype,"featureBorderNone",2),vt([J({type:Number})],j.MyMap.prototype,"featureBuffer",2),vt([J({type:Boolean})],j.MyMap.prototype,"showMarker",2),vt([J({type:String})],j.MyMap.prototype,"markerImage",2),vt([J({type:Number})],j.MyMap.prototype,"markerLatitude",2),vt([J({type:Number})],j.MyMap.prototype,"markerLongitude",2),vt([J({type:String})],j.MyMap.prototype,"markerColor",2),vt([J({type:Object})],j.MyMap.prototype,"geojsonData",2),vt([J({type:String})],j.MyMap.prototype,"geojsonColor",2),vt([J({type:Boolean})],j.MyMap.prototype,"geojsonFill",2),vt([J({type:Number})],j.MyMap.prototype,"geojsonBuffer",2),vt([J({type:Boolean})],j.MyMap.prototype,"disableVectorTiles",2),vt([J({type:String})],j.MyMap.prototype,"osVectorTilesApiKey",2),vt([J({type:String})],j.MyMap.prototype,"osFeaturesApiKey",2),vt([J({type:String})],j.MyMap.prototype,"osCopyright",2),vt([J({type:Boolean})],j.MyMap.prototype,"hideResetControl",2),vt([J({type:String})],j.MyMap.prototype,"resetControlImage",2),vt([J({type:Boolean})],j.MyMap.prototype,"staticMode",2),vt([J({type:String})],j.MyMap.prototype,"areaUnit",2),vt([J({type:Boolean})],j.MyMap.prototype,"showScale",2),vt([J({type:Boolean})],j.MyMap.prototype,"useScaleBarStyle",2),vt([J({type:Boolean})],j.MyMap.prototype,"showNorthArrow",2),j.MyMap=vt([vl("my-map")],j.MyMap);var lp={exports:{}};(function(i,t){(function(n,o){i.exports=o()})(window,function(){return function(e){var n={};function o(r){if(n[r])return n[r].exports;var s=n[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,o),s.l=!0,s.exports}return o.m=e,o.c=n,o.d=function(r,s,a){o.o(r,s)||Object.defineProperty(r,s,{enumerable:!0,get:a})},o.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,s){if(1&s&&(r=o(r)),8&s||4&s&&typeof r=="object"&&r&&r.__esModule)return r;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:r}),2&s&&typeof r!="string")for(var l in r)o.d(a,l,function(h){return r[h]}.bind(null,l));return a},o.n=function(r){var s=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(s,"a",s),s},o.o=function(r,s){return Object.prototype.hasOwnProperty.call(r,s)},o.p="/",o(o.s=37)}([function(e,n,o){var r=o(1),s=o(6),a=o(7),l=o(16),h=o(18),u="prototype",d=function(c,g,f){var m,p,_,v,y=c&d.F,x=c&d.G,k=c&d.S,w=c&d.P,E=c&d.B,M=x?r:k?r[g]||(r[g]={}):(r[g]||{})[u],S=x?s:s[g]||(s[g]={}),z=S[u]||(S[u]={});for(m in x&&(f=g),f)_=((p=!y&&M&&M[m]!==void 0)?M:f)[m],v=E&&p?h(_,r):w&&typeof _=="function"?h(Function.call,_):_,M&&l(M,m,_,c&d.U),S[m]!=_&&a(S,m,v),w&&z[m]!=_&&(z[m]=_)};r.core=s,d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,e.exports=d},function(e,n){var o=e.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=o)},function(e,n){e.exports=function(o){return typeof o=="object"?o!==null:typeof o=="function"}},function(e,n,o){e.exports=!o(4)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(e,n){e.exports=function(o){try{return!!o()}catch{return!0}}},function(e,n,o){o.r(n),o.d(n,"h",function(){return h}),o.d(n,"createElement",function(){return h}),o.d(n,"cloneElement",function(){return c}),o.d(n,"Component",function(){return Y}),o.d(n,"render",function(){return I}),o.d(n,"rerender",function(){return p}),o.d(n,"options",function(){return s});var r=function(){},s={},a=[],l=[];function h(b,T){var q,C,K,U,_t=l;for(U=arguments.length;2<U--;)a.push(arguments[U]);for(T&&T.children!=null&&(a.length||a.push(T.children),delete T.children);a.length;)if((C=a.pop())&&C.pop!==void 0)for(U=C.length;U--;)a.push(C[U]);else typeof C=="boolean"&&(C=null),(K=typeof b!="function")&&(C==null?C="":typeof C=="number"?C=String(C):typeof C!="string"&&(K=!1)),K&&q?_t[_t.length-1]+=C:_t===l?_t=[C]:_t.push(C),q=K;var Et=new r;return Et.nodeName=b,Et.children=_t,Et.attributes=T==null?void 0:T,Et.key=T==null?void 0:T.key,s.vnode!==void 0&&s.vnode(Et),Et}function u(b,T){for(var q in T)b[q]=T[q];return b}var d=typeof Promise=="function"?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function c(b,T){return h(b.nodeName,u(u({},b.attributes),T),2<arguments.length?[].slice.call(arguments,2):b.children)}var g=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,f=[];function m(b){!b._dirty&&(b._dirty=!0)&&f.push(b)==1&&(s.debounceRendering||d)(p)}function p(){var b,T=f;for(f=[];b=T.pop();)b._dirty&&D(b)}function _(b,T){return b.normalizedNodeName===T||b.nodeName.toLowerCase()===T.toLowerCase()}function v(b){var T=u({},b.attributes);T.children=b.children;var q=b.nodeName.defaultProps;if(q!==void 0)for(var C in q)T[C]===void 0&&(T[C]=q[C]);return T}function y(b){var T=b.parentNode;T&&T.removeChild(b)}function x(b,T,q,C,K){if(T==="className"&&(T="class"),T!=="key")if(T==="ref")q&&q(null),C&&C(b);else if(T!=="class"||K)if(T==="style"){if(C&&typeof C!="string"&&typeof q!="string"||(b.style.cssText=C||""),C&&typeof C=="object"){if(typeof q!="string")for(var U in q)U in C||(b.style[U]="");for(var U in C)b.style[U]=typeof C[U]=="number"&&g.test(U)===!1?C[U]+"px":C[U]}}else if(T==="dangerouslySetInnerHTML")C&&(b.innerHTML=C.__html||"");else if(T[0]=="o"&&T[1]=="n"){var _t=T!==(T=T.replace(/Capture$/,""));T=T.toLowerCase().substring(2),C?q||b.addEventListener(T,k,_t):b.removeEventListener(T,k,_t),(b._listeners||(b._listeners={}))[T]=C}else if(T!=="list"&&T!=="type"&&!K&&T in b){try{b[T]=C==null?"":C}catch{}C!=null&&C!==!1||T=="spellcheck"||b.removeAttribute(T)}else{var Et=K&&T!==(T=T.replace(/^xlink:?/,""));C==null||C===!1?Et?b.removeAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase()):b.removeAttribute(T):typeof C!="function"&&(Et?b.setAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase(),C):b.setAttribute(T,C))}else b.className=C||""}function k(b){return this._listeners[b.type](s.event&&s.event(b)||b)}var w=[],E=0,M=!1,S=!1;function z(){for(var b;b=w.pop();)s.afterMount&&s.afterMount(b),b.componentDidMount&&b.componentDidMount()}function P(b,T,q,C,K,U){E++||(M=K!=null&&K.ownerSVGElement!==void 0,S=b!=null&&!("__preactattr_"in b));var _t=G(b,T,q,C,U);return K&&_t.parentNode!==K&&K.appendChild(_t),--E||(S=!1,U||z()),_t}function G(b,T,q,C,K){var U=b,_t=M;if(T!=null&&typeof T!="boolean"||(T=""),typeof T=="string"||typeof T=="number")return b&&b.splitText!==void 0&&b.parentNode&&(!b._component||K)?b.nodeValue!=T&&(b.nodeValue=T):(U=document.createTextNode(T),b&&(b.parentNode&&b.parentNode.replaceChild(U,b),A(b,!0))),U.__preactattr_=!0,U;var Et=T.nodeName;if(typeof Et=="function")return function(ut,pt,kt,xt){for(var st=ut&&ut._component,nt=st,wt=ut,It=st&&ut._componentConstructor===pt.nodeName,Bt=It,bt=v(pt);st&&!Bt&&(st=st._parentComponent);)Bt=st.constructor===pt.nodeName;return st&&Bt&&(!xt||st._component)?(V(st,bt,3,kt,xt),ut=st.base):(nt&&!It&&(H(nt),ut=wt=null),st=Z(pt.nodeName,bt,kt),ut&&!st.nextBase&&(st.nextBase=ut,wt=null),V(st,bt,1,kt,xt),ut=st.base,wt&&ut!==wt&&(wt._component=null,A(wt,!1))),ut}(b,T,q,C);if(M=Et==="svg"||Et!=="foreignObject"&&M,Et=String(Et),(!b||!_(b,Et))&&(U=function(ut,pt){var kt=pt?document.createElementNS("http://www.w3.org/2000/svg",ut):document.createElement(ut);return kt.normalizedNodeName=ut,kt}(Et,M),b)){for(;b.firstChild;)U.appendChild(b.firstChild);b.parentNode&&b.parentNode.replaceChild(U,b),A(b,!0)}var yt=U.firstChild,Ct=U.__preactattr_,Lt=T.children;if(Ct==null){Ct=U.__preactattr_={};for(var Dt=U.attributes,jt=Dt.length;jt--;)Ct[Dt[jt].name]=Dt[jt].value}return!S&&Lt&&Lt.length===1&&typeof Lt[0]=="string"&&yt!=null&&yt.splitText!==void 0&&yt.nextSibling==null?yt.nodeValue!=Lt[0]&&(yt.nodeValue=Lt[0]):(Lt&&Lt.length||yt!=null)&&function(ut,pt,kt,xt,st){var nt,wt,It,Bt,bt,dt=ut.childNodes,Ot=[],St={},ct=0,ue=0,Ze=dt.length,Ut=0,Ie=pt?pt.length:0;if(Ze!==0)for(var Wt=0;Wt<Ze;Wt++){var Kt=dt[Wt],Tn=Kt.__preactattr_,ae=Ie&&Tn?Kt._component?Kt._component.__key:Tn.key:null;ae!=null?(ct++,St[ae]=Kt):(Tn||(Kt.splitText!==void 0?!st||Kt.nodeValue.trim():st))&&(Ot[Ut++]=Kt)}if(Ie!==0)for(var Wt=0;Wt<Ie;Wt++){Bt=pt[Wt],bt=null;var ae=Bt.key;if(ae!=null)ct&&St[ae]!==void 0&&(bt=St[ae],St[ae]=void 0,ct--);else if(ue<Ut){for(nt=ue;nt<Ut;nt++)if(Ot[nt]!==void 0&&(Ye=wt=Ot[nt],Fe=st,typeof(ve=Bt)=="string"||typeof ve=="number"?Ye.splitText!==void 0:typeof ve.nodeName=="string"?!Ye._componentConstructor&&_(Ye,ve.nodeName):Fe||Ye._componentConstructor===ve.nodeName)){bt=wt,Ot[nt]=void 0,nt===Ut-1&&Ut--,nt===ue&&ue++;break}}bt=G(bt,Bt,kt,xt),It=dt[Wt],bt&&bt!==ut&&bt!==It&&(It==null?ut.appendChild(bt):bt===It.nextSibling?y(It):ut.insertBefore(bt,It))}var Ye,ve,Fe;if(ct)for(var Wt in St)St[Wt]!==void 0&&A(St[Wt],!1);for(;ue<=Ut;)(bt=Ot[Ut--])!==void 0&&A(bt,!1)}(U,Lt,q,C,S||Ct.dangerouslySetInnerHTML!=null),function(ut,pt,kt){var xt;for(xt in kt)pt&&pt[xt]!=null||kt[xt]==null||x(ut,xt,kt[xt],kt[xt]=void 0,M);for(xt in pt)xt==="children"||xt==="innerHTML"||xt in kt&&pt[xt]===(xt==="value"||xt==="checked"?ut[xt]:kt[xt])||x(ut,xt,kt[xt],kt[xt]=pt[xt],M)}(U,T.attributes,Ct),M=_t,U}function A(b,T){var q=b._component;q?H(q):(b.__preactattr_!=null&&b.__preactattr_.ref&&b.__preactattr_.ref(null),T!==!1&&b.__preactattr_!=null||y(b),at(b))}function at(b){for(b=b.lastChild;b;){var T=b.previousSibling;A(b,!0),b=T}}var B=[];function Z(b,T,q){var C,K=B.length;for(b.prototype&&b.prototype.render?(C=new b(T,q),Y.call(C,T,q)):((C=new Y(T,q)).constructor=b,C.render=F);K--;)if(B[K].constructor===b)return C.nextBase=B[K].nextBase,B.splice(K,1),C;return C}function F(b,T,q){return this.constructor(b,q)}function V(b,T,q,C,K){b._disable||(b._disable=!0,b.__ref=T.ref,b.__key=T.key,delete T.ref,delete T.key,typeof b.constructor.getDerivedStateFromProps>"u"&&(!b.base||K?b.componentWillMount&&b.componentWillMount():b.componentWillReceiveProps&&b.componentWillReceiveProps(T,C)),C&&C!==b.context&&(b.prevContext||(b.prevContext=b.context),b.context=C),b.prevProps||(b.prevProps=b.props),b.props=T,b._disable=!1,q!==0&&(q!==1&&s.syncComponentUpdates===!1&&b.base?m(b):D(b,1,K)),b.__ref&&b.__ref(b))}function D(b,T,q,C){if(!b._disable){var K,U,_t,Et=b.props,yt=b.state,Ct=b.context,Lt=b.prevProps||Et,Dt=b.prevState||yt,jt=b.prevContext||Ct,O=b.base,ut=b.nextBase,pt=O||ut,kt=b._component,xt=!1,st=jt;if(b.constructor.getDerivedStateFromProps&&(yt=u(u({},yt),b.constructor.getDerivedStateFromProps(Et,yt)),b.state=yt),O&&(b.props=Lt,b.state=Dt,b.context=jt,T!==2&&b.shouldComponentUpdate&&b.shouldComponentUpdate(Et,yt,Ct)===!1?xt=!0:b.componentWillUpdate&&b.componentWillUpdate(Et,yt,Ct),b.props=Et,b.state=yt,b.context=Ct),b.prevProps=b.prevState=b.prevContext=b.nextBase=null,b._dirty=!1,!xt){K=b.render(Et,yt,Ct),b.getChildContext&&(Ct=u(u({},Ct),b.getChildContext())),O&&b.getSnapshotBeforeUpdate&&(st=b.getSnapshotBeforeUpdate(Lt,Dt));var nt,wt,It=K&&K.nodeName;if(typeof It=="function"){var Bt=v(K);(U=kt)&&U.constructor===It&&Bt.key==U.__key?V(U,Bt,1,Ct,!1):(nt=U,b._component=U=Z(It,Bt,Ct),U.nextBase=U.nextBase||ut,U._parentComponent=b,V(U,Bt,0,Ct,!1),D(U,1,q,!0)),wt=U.base}else _t=pt,(nt=kt)&&(_t=b._component=null),(pt||T===1)&&(_t&&(_t._component=null),wt=function(ct,ue,Ze,Ut,Ie,Wt){E++||(M=Ie!=null&&Ie.ownerSVGElement!==void 0,S=ct!=null&&!("__preactattr_"in ct));var Kt=G(ct,ue,Ze,Ut,Wt);return Ie&&Kt.parentNode!==Ie&&Ie.appendChild(Kt),--E||(S=!1,Wt||z()),Kt}(_t,K,Ct,q||!O,pt&&pt.parentNode,!0));if(pt&&wt!==pt&&U!==kt){var bt=pt.parentNode;bt&&wt!==bt&&(bt.replaceChild(wt,pt),nt||(pt._component=null,A(pt,!1)))}if(nt&&H(nt),(b.base=wt)&&!C){for(var dt=b,Ot=b;Ot=Ot._parentComponent;)(dt=Ot).base=wt;wt._component=dt,wt._componentConstructor=dt.constructor}}for(!O||q?w.unshift(b):xt||(b.componentDidUpdate&&b.componentDidUpdate(Lt,Dt,st),s.afterUpdate&&s.afterUpdate(b));b._renderCallbacks.length;)b._renderCallbacks.pop().call(b);E||C||z()}}function H(b){s.beforeUnmount&&s.beforeUnmount(b);var T=b.base;b._disable=!0,b.componentWillUnmount&&b.componentWillUnmount(),b.base=null;var q=b._component;q?H(q):T&&(T.__preactattr_&&T.__preactattr_.ref&&T.__preactattr_.ref(null),y(b.nextBase=T),B.push(b),at(T)),b.__ref&&b.__ref(null)}function Y(b,T){this._dirty=!0,this.context=T,this.props=b,this.state=this.state||{},this._renderCallbacks=[]}function I(b,T,q){return P(q,b,{},!1,T,!1)}u(Y.prototype,{setState:function(b,T){this.prevState||(this.prevState=this.state),this.state=u(u({},this.state),typeof b=="function"?b(this.state,this.props):b),T&&this._renderCallbacks.push(T),m(this)},forceUpdate:function(b){b&&this._renderCallbacks.push(b),D(this,2)},render:function(){}});var rt={h,createElement:h,cloneElement:c,Component:Y,render:I,rerender:p,options:s};n.default=rt},function(e,n){var o=e.exports={version:"2.5.7"};typeof __e=="number"&&(__e=o)},function(e,n,o){var r=o(8),s=o(40);e.exports=o(3)?function(a,l,h){return r.f(a,l,s(1,h))}:function(a,l,h){return a[l]=h,a}},function(e,n,o){var r=o(9),s=o(38),a=o(39),l=Object.defineProperty;n.f=o(3)?Object.defineProperty:function(h,u,d){if(r(h),u=a(u,!0),r(d),s)try{return l(h,u,d)}catch{}if("get"in d||"set"in d)throw TypeError("Accessors not supported!");return"value"in d&&(h[u]=d.value),h}},function(e,n,o){var r=o(2);e.exports=function(s){if(!r(s))throw TypeError(s+" is not an object!");return s}},function(e,n){var o=0,r=Math.random();e.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++o+r).toString(36))}},function(e,n,o){var r=o(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return r(s)=="String"?s.split(""):Object(s)}},function(e,n){e.exports=function(o){if(o==null)throw TypeError("Can't call method on "+o);return o}},function(e,n,o){var r=o(4);e.exports=function(s,a){return!!s&&r(function(){a?s.call(null,function(){},1):s.call(null)})}},function(e,n,o){var r=o(0);r(r.S+r.F,"Object",{assign:o(41)})},function(e,n,o){var r=o(2),s=o(1).document,a=r(s)&&r(s.createElement);e.exports=function(l){return a?s.createElement(l):{}}},function(e,n,o){var r=o(1),s=o(7),a=o(17),l=o(10)("src"),h="toString",u=Function[h],d=(""+u).split(h);o(6).inspectSource=function(c){return u.call(c)},(e.exports=function(c,g,f,m){var p=typeof f=="function";p&&(a(f,"name")||s(f,"name",g)),c[g]!==f&&(p&&(a(f,l)||s(f,l,c[g]?""+c[g]:d.join(String(g)))),c===r?c[g]=f:m?c[g]?c[g]=f:s(c,g,f):(delete c[g],s(c,g,f)))})(Function.prototype,h,function(){return typeof this=="function"&&this[l]||u.call(this)})},function(e,n){var o={}.hasOwnProperty;e.exports=function(r,s){return o.call(r,s)}},function(e,n,o){var r=o(19);e.exports=function(s,a,l){if(r(s),a===void 0)return s;switch(l){case 1:return function(h){return s.call(a,h)};case 2:return function(h,u){return s.call(a,h,u)};case 3:return function(h,u,d){return s.call(a,h,u,d)}}return function(){return s.apply(a,arguments)}}},function(e,n){e.exports=function(o){if(typeof o!="function")throw TypeError(o+" is not a function!");return o}},function(e,n,o){var r=o(42),s=o(28);e.exports=Object.keys||function(a){return r(a,s)}},function(e,n,o){var r=o(11),s=o(12);e.exports=function(a){return r(s(a))}},function(e,n){var o={}.toString;e.exports=function(r){return o.call(r).slice(8,-1)}},function(e,n,o){var r=o(21),s=o(24),a=o(43);e.exports=function(l){return function(h,u,d){var c,g=r(h),f=s(g.length),m=a(d,f);if(l&&u!=u){for(;m<f;)if((c=g[m++])!=c)return!0}else for(;m<f;m++)if((l||m in g)&&g[m]===u)return l||m||0;return!l&&-1}}},function(e,n,o){var r=o(25),s=Math.min;e.exports=function(a){return 0<a?s(r(a),9007199254740991):0}},function(e,n){var o=Math.ceil,r=Math.floor;e.exports=function(s){return isNaN(s=+s)?0:(0<s?r:o)(s)}},function(e,n,o){var r=o(27)("keys"),s=o(10);e.exports=function(a){return r[a]||(r[a]=s(a))}},function(e,n,o){var r=o(6),s=o(1),a="__core-js_shared__",l=s[a]||(s[a]={});(e.exports=function(h,u){return l[h]||(l[h]=u!==void 0?u:{})})("versions",[]).push({version:r.version,mode:o(44)?"pure":"global",copyright:"\xA9 2018 Denis Pushkarev (zloirock.ru)"})},function(e,n){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,n,o){var r=o(12);e.exports=function(s){return Object(r(s))}},function(e,n,o){var r=o(8).f,s=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in s||o(3)&&r(s,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch{return""}}})},function(e,n,o){var r=o(0),s=o(32)(1);r(r.P+r.F*!o(13)([].map,!0),"Array",{map:function(a){return s(this,a,arguments[1])}})},function(e,n,o){var r=o(18),s=o(11),a=o(29),l=o(24),h=o(47);e.exports=function(u,d){var c=u==1,g=u==2,f=u==3,m=u==4,p=u==6,_=u==5||p,v=d||h;return function(y,x,k){for(var w,E,M=a(y),S=s(M),z=r(x,k,3),P=l(S.length),G=0,A=c?v(y,P):g?v(y,0):void 0;G<P;G++)if((_||G in S)&&(E=z(w=S[G],G,M),u)){if(c)A[G]=E;else if(E)switch(u){case 3:return!0;case 5:return w;case 6:return G;case 2:A.push(w)}else if(m)return!1}return p?-1:f||m?m:A}}},function(e,n,o){var r=o(22);e.exports=Array.isArray||function(s){return r(s)=="Array"}},function(e,n,o){var r=o(27)("wks"),s=o(10),a=o(1).Symbol,l=typeof a=="function";(e.exports=function(h){return r[h]||(r[h]=l&&a[h]||(l?a:s)("Symbol."+h))}).store=r},function(e,n,o){var r=o(0),s=o(23)(!1),a=[].indexOf,l=!!a&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(l||!o(13)(a)),"Array",{indexOf:function(h){return l?a.apply(this,arguments)||0:s(this,h,arguments[1])}})},function(e,n,o){var r=o(0);r(r.S,"Object",{create:o(52)})},function(e,n,o){n.__esModule=!0,n.default=void 0,o(14),o(30),o(31),o(35),o(49),o(50);var r=o(5),s=function(d){return d&&d.__esModule?d:{default:d}}(o(51));function a(u){if(!u.element)throw new Error("element is not defined");if(!u.id)throw new Error("id is not defined");if(!u.source)throw new Error("source is not defined");Array.isArray(u.source)&&(u.source=l(u.source)),(0,r.render)((0,r.createElement)(s.default,u),u.element)}var l=function(d){return function(c,g){g(d.filter(function(f){return f.toLowerCase().indexOf(c.toLowerCase())!==-1}))}};a.enhanceSelectElement=function(u){if(!u.selectElement)throw new Error("selectElement is not defined");if(!u.source){var d=[].filter.call(u.selectElement.options,function(f){return f.value||u.preserveNullOptions});u.source=d.map(function(f){return f.textContent||f.innerText})}if(u.onConfirm=u.onConfirm||function(f){var m=[].filter.call(u.selectElement.options,function(p){return(p.textContent||p.innerText)===f})[0];m&&(m.selected=!0)},u.selectElement.value||u.defaultValue===void 0){var c=u.selectElement.options[u.selectElement.options.selectedIndex];u.defaultValue=c.textContent||c.innerText}u.name===void 0&&(u.name=""),u.id===void 0&&(u.selectElement.id===void 0?u.id="":u.id=u.selectElement.id),u.autoselect===void 0&&(u.autoselect=!0);var g=document.createElement("div");u.selectElement.parentNode.insertBefore(g,u.selectElement),a(Object.assign({},u,{element:g})),u.selectElement.style.display="none",u.selectElement.id=u.selectElement.id+"-select"};var h=a;n.default=h},function(e,n,o){e.exports=!o(3)&&!o(4)(function(){return Object.defineProperty(o(15)("div"),"a",{get:function(){return 7}}).a!=7})},function(e,n,o){var r=o(2);e.exports=function(s,a){if(!r(s))return s;var l,h;if(a&&typeof(l=s.toString)=="function"&&!r(h=l.call(s))||typeof(l=s.valueOf)=="function"&&!r(h=l.call(s))||!a&&typeof(l=s.toString)=="function"&&!r(h=l.call(s)))return h;throw TypeError("Can't convert object to primitive value")}},function(e,n){e.exports=function(o,r){return{enumerable:!(1&o),configurable:!(2&o),writable:!(4&o),value:r}}},function(e,n,o){var r=o(20),s=o(45),a=o(46),l=o(29),h=o(11),u=Object.assign;e.exports=!u||o(4)(function(){var d={},c={},g=Symbol(),f="abcdefghijklmnopqrst";return d[g]=7,f.split("").forEach(function(m){c[m]=m}),u({},d)[g]!=7||Object.keys(u({},c)).join("")!=f})?function(d,c){for(var g=l(d),f=arguments.length,m=1,p=s.f,_=a.f;m<f;)for(var v,y=h(arguments[m++]),x=p?r(y).concat(p(y)):r(y),k=x.length,w=0;w<k;)_.call(y,v=x[w++])&&(g[v]=y[v]);return g}:u},function(e,n,o){var r=o(17),s=o(21),a=o(23)(!1),l=o(26)("IE_PROTO");e.exports=function(h,u){var d,c=s(h),g=0,f=[];for(d in c)d!=l&&r(c,d)&&f.push(d);for(;u.length>g;)r(c,d=u[g++])&&(~a(f,d)||f.push(d));return f}},function(e,n,o){var r=o(25),s=Math.max,a=Math.min;e.exports=function(l,h){return(l=r(l))<0?s(l+h,0):a(l,h)}},function(e,n){e.exports=!1},function(e,n){n.f=Object.getOwnPropertySymbols},function(e,n){n.f={}.propertyIsEnumerable},function(e,n,o){var r=o(48);e.exports=function(s,a){return new(r(s))(a)}},function(e,n,o){var r=o(2),s=o(33),a=o(34)("species");e.exports=function(l){var h;return s(l)&&(typeof(h=l.constructor)!="function"||h!==Array&&!s(h.prototype)||(h=void 0),r(h)&&(h=h[a])===null&&(h=void 0)),h===void 0?Array:h}},function(e,n,o){var r=o(0),s=o(32)(2);r(r.P+r.F*!o(13)([].filter,!0),"Array",{filter:function(a){return s(this,a,arguments[1])}})},function(e,n,o){var r=o(0);r(r.S,"Array",{isArray:o(33)})},function(e,n,o){n.__esModule=!0,n.default=void 0,o(14),o(36),o(30),o(31),o(35),o(55),o(58);var r=o(5),s=l(o(60)),a=l(o(61));function l(f){return f&&f.__esModule?f:{default:f}}function h(){return(h=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var _ in p)Object.prototype.hasOwnProperty.call(p,_)&&(f[_]=p[_])}return f}).apply(this,arguments)}function u(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}var d={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function c(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var g=function(f){function m(_){var v;return(v=f.call(this,_)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:_.defaultValue?[_.defaultValue]:[],query:_.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(u(u(v))),v.handleKeyDown=v.handleKeyDown.bind(u(u(v))),v.handleUpArrow=v.handleUpArrow.bind(u(u(v))),v.handleDownArrow=v.handleDownArrow.bind(u(u(v))),v.handleEnter=v.handleEnter.bind(u(u(v))),v.handlePrintableKey=v.handlePrintableKey.bind(u(u(v))),v.handleListMouseLeave=v.handleListMouseLeave.bind(u(u(v))),v.handleOptionBlur=v.handleOptionBlur.bind(u(u(v))),v.handleOptionClick=v.handleOptionClick.bind(u(u(v))),v.handleOptionFocus=v.handleOptionFocus.bind(u(u(v))),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(u(u(v))),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(u(u(v))),v.handleInputBlur=v.handleInputBlur.bind(u(u(v))),v.handleInputChange=v.handleInputChange.bind(u(u(v))),v.handleInputFocus=v.handleInputFocus.bind(u(u(v))),v.pollInputElement=v.pollInputElement.bind(u(u(v))),v.getDirectInputChanges=v.getDirectInputChanges.bind(u(u(v))),v}(function(v,y){v.prototype=Object.create(y.prototype),(v.prototype.constructor=v).__proto__=y})(m,f);var p=m.prototype;return p.isQueryAnOption=function(_,v){var y=this;return v.map(function(x){return y.templateInputValue(x).toLowerCase()}).indexOf(_.toLowerCase())!==-1},p.componentDidMount=function(){this.pollInputElement()},p.componentWillUnmount=function(){clearTimeout(this.$pollInput)},p.pollInputElement=function(){var _=this;this.getDirectInputChanges(),this.$pollInput=setTimeout(function(){_.pollInputElement()},100)},p.getDirectInputChanges=function(){var _=this.elementReferences[-1];_&&_.value!==this.state.query&&this.handleInputChange({target:{value:_.value}})},p.componentDidUpdate=function(_,v){var y=this.state.focused,x=y===null,k=v.focused!==y;k&&!x&&this.elementReferences[y].focus();var w=y===-1,E=k&&v.focused===null;if(w&&E){var M=this.elementReferences[y];M.setSelectionRange(0,M.value.length)}},p.hasAutoselect=function(){return!c()&&this.props.autoselect},p.templateInputValue=function(_){var v=this.props.templates&&this.props.templates.inputValue;return v?v(_):_},p.templateSuggestion=function(_){var v=this.props.templates&&this.props.templates.suggestion;return v?v(_):_},p.handleComponentBlur=function(_){var v,y=this.state,x=y.options,k=y.query,w=y.selected;this.props.confirmOnBlur?(v=_.query||k,this.props.onConfirm(x[w])):v=k,this.setState({focused:null,menuOpen:_.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,x)})},p.handleListMouseLeave=function(_){this.setState({hovered:null})},p.handleOptionBlur=function(_,v){var y=this.state,x=y.focused,k=y.menuOpen,w=y.options,E=y.selected,M=_.relatedTarget===null,S=_.relatedTarget===this.elementReferences[-1],z=x!==v&&x!==-1;if(!z&&M||!(z||S)){var P=k&&c();this.handleComponentBlur({menuOpen:P,query:this.templateInputValue(w[E])})}},p.handleInputBlur=function(_){var v=this.state,y=v.focused,x=v.menuOpen,k=v.options,w=v.query,E=v.selected;if(y===-1){var M=x&&c(),S=c()?w:this.templateInputValue(k[E]);this.handleComponentBlur({menuOpen:M,query:S})}},p.handleInputChange=function(_){var v=this,y=this.props,x=y.minLength,k=y.source,w=y.showAllValues,E=this.hasAutoselect(),M=_.target.value,S=M.length===0,z=this.state.query.length!==M.length,P=M.length>=x;this.setState({query:M,ariaHint:S}),w||!S&&z&&P?k(M,function(G){var A=0<G.length;v.setState({menuOpen:A,options:G,selected:E&&A?0:-1,validChoiceMade:!1})}):!S&&P||this.setState({menuOpen:!1,options:[]})},p.handleInputClick=function(_){this.handleInputChange(_)},p.handleInputFocus=function(_){var v=this.state,y=v.query,x=v.validChoiceMade,k=v.options,w=this.props.minLength,E=!x&&y.length>=w&&0<k.length;E?this.setState(function(M){var S=M.menuOpen;return{focused:-1,menuOpen:E||S,selected:-1}}):this.setState({focused:-1})},p.handleOptionFocus=function(_){this.setState({focused:_,hovered:null,selected:_})},p.handleOptionMouseEnter=function(_,v){c()||this.setState({hovered:v})},p.handleOptionClick=function(_,v){var y=this.state.options[v],x=this.templateInputValue(y);this.props.onConfirm(y),this.setState({focused:-1,hovered:null,menuOpen:!1,query:x,selected:-1,validChoiceMade:!0}),this.forceUpdate()},p.handleOptionMouseDown=function(_){_.preventDefault()},p.handleUpArrow=function(_){_.preventDefault();var v=this.state,y=v.menuOpen,x=v.selected;x!==-1&&y&&this.handleOptionFocus(x-1)},p.handleDownArrow=function(_){var v=this;if(_.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)_.preventDefault(),this.props.source("",function(E){v.setState({menuOpen:!0,options:E,selected:0,focused:0,hovered:null})});else if(this.state.menuOpen===!0){var y=this.state,x=y.menuOpen,k=y.options,w=y.selected;w!==k.length-1&&x&&this.handleOptionFocus(w+1)}},p.handleSpace=function(_){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(_.preventDefault(),this.props.source("",function(y){v.setState({menuOpen:!0,options:y})})),this.state.focused!==-1&&(_.preventDefault(),this.handleOptionClick(_,this.state.focused))},p.handleEnter=function(_){this.state.menuOpen&&(_.preventDefault(),0<=this.state.selected&&this.handleOptionClick(_,this.state.selected))},p.handlePrintableKey=function(_){var v=this.elementReferences[-1];_.target===v||v.focus()},p.handleKeyDown=function(_){switch(d[_.keyCode]){case"up":this.handleUpArrow(_);break;case"down":this.handleDownArrow(_);break;case"space":this.handleSpace(_);break;case"enter":this.handleEnter(_);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(function(y){return 47<y&&y<58||y===32||y===8||64<y&&y<91||95<y&&y<112||185<y&&y<193||218<y&&y<223})(_.keyCode)&&this.handlePrintableKey(_)}},p.render=function(){var _,v=this,y=this.props,x=y.cssNamespace,k=y.displayMenu,w=y.id,E=y.minLength,M=y.name,S=y.placeholder,z=y.required,P=y.showAllValues,G=y.tNoResults,A=y.tStatusQueryTooShort,at=y.tStatusNoResults,B=y.tStatusSelectedOption,Z=y.tStatusResults,F=y.tAssistiveHint,V=y.dropdownArrow,D=this.state,H=D.focused,Y=D.hovered,I=D.menuOpen,rt=D.options,b=D.query,T=D.selected,q=D.ariaHint,C=D.validChoiceMade,K=this.hasAutoselect(),U=H===-1,_t=rt.length===0,Et=b.length!==0,yt=b.length>=E,Ct=this.props.showNoOptionsFound&&U&&_t&&Et&&yt,Lt=x+"__wrapper",Dt=x+"__input",jt=H!==null?" "+Dt+"--focused":"",O=this.props.showAllValues?" "+Dt+"--show-all-values":" "+Dt+"--default",ut=x+"__dropdown-arrow-down",pt=H!==-1&&H!==null,kt=x+"__menu",xt=kt+"--"+k,st=kt+"--"+(I||Ct?"visible":"hidden"),nt=x+"__option",wt=x+"__hint",It=this.templateInputValue(rt[T]),Bt=It&&It.toLowerCase().indexOf(b.toLowerCase())===0&&K?b+It.substr(b.length):"",bt=w+"__assistiveHint",dt=q?{"aria-describedby":bt}:null;return P&&typeof(_=V({className:ut}))=="string"&&(_=(0,r.createElement)("div",{className:x+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:_}})),(0,r.createElement)("div",{className:Lt,onKeyDown:this.handleKeyDown},(0,r.createElement)(s.default,{id:w,length:rt.length,queryLength:b.length,minQueryLength:E,selectedOption:this.templateInputValue(rt[T]),selectedOptionIndex:T,validChoiceMade:C,isInFocus:this.state.focused!==null,tQueryTooShort:A,tNoResults:at,tSelectedOption:B,tResults:Z}),Bt&&(0,r.createElement)("span",null,(0,r.createElement)("input",{className:wt,readonly:!0,tabIndex:"-1",value:Bt})),(0,r.createElement)("input",h({"aria-expanded":I?"true":"false","aria-activedescendant":!!pt&&w+"__option--"+H,"aria-owns":w+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},dt,{autoComplete:"off",className:""+Dt+jt+O,id:w,onClick:function(Ot){return v.handleInputClick(Ot)},onBlur:this.handleInputBlur},function(St){return{onInput:St}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:M,placeholder:S,ref:function(Ot){v.elementReferences[-1]=Ot},type:"text",role:"combobox",required:z,value:b})),_,(0,r.createElement)("ul",{className:kt+" "+xt+" "+st,onMouseLeave:function(Ot){return v.handleListMouseLeave(Ot)},id:w+"__listbox",role:"listbox"},rt.map(function(Ot,St){var ct=(H===-1?T===St:H===St)&&Y===null?" "+nt+"--focused":"",ue=St%2?" "+nt+"--odd":"",Ze=c()?"<span id="+w+"__option-suffix--"+St+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(St+1)+" of "+rt.length+"</span>":"";return(0,r.createElement)("li",{"aria-selected":H===St?"true":"false",className:""+nt+ct+ue,dangerouslySetInnerHTML:{__html:v.templateSuggestion(Ot)+Ze},id:w+"__option--"+St,key:St,onBlur:function(Ut){return v.handleOptionBlur(Ut,St)},onClick:function(Ut){return v.handleOptionClick(Ut,St)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(Ut){return v.handleOptionMouseEnter(Ut,St)},ref:function(Ut){v.elementReferences[St]=Ut},role:"option",tabIndex:"-1","aria-posinset":St+1,"aria-setsize":rt.length})}),Ct&&(0,r.createElement)("li",{className:nt+" "+nt+"--no-results"},G())),(0,r.createElement)("span",{id:bt,style:{display:"none"}},F()))},m}(r.Component);(n.default=g).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:a.default}},function(e,n,o){var r=o(9),s=o(53),a=o(28),l=o(26)("IE_PROTO"),h=function(){},u="prototype",d=function(){var c,g=o(15)("iframe"),f=a.length;for(g.style.display="none",o(54).appendChild(g),g.src="javascript:",(c=g.contentWindow.document).open(),c.write("<script>document.F=Object<\/script>"),c.close(),d=c.F;f--;)delete d[u][a[f]];return d()};e.exports=Object.create||function(c,g){var f;return c!==null?(h[u]=r(c),f=new h,h[u]=null,f[l]=c):f=d(),g===void 0?f:s(f,g)}},function(e,n,o){var r=o(8),s=o(9),a=o(20);e.exports=o(3)?Object.defineProperties:function(l,h){s(l);for(var u,d=a(h),c=d.length,g=0;g<c;)r.f(l,u=d[g++],h[u]);return l}},function(e,n,o){var r=o(1).document;e.exports=r&&r.documentElement},function(e,n,o){var r=o(0);r(r.P,"Function",{bind:o(56)})},function(e,n,o){var r=o(19),s=o(2),a=o(57),l=[].slice,h={};e.exports=Function.bind||function(u){var d=r(this),c=l.call(arguments,1),g=function(){var f=c.concat(l.call(arguments));return this instanceof g?function(m,p,_){if(!(p in h)){for(var v=[],y=0;y<p;y++)v[y]="a["+y+"]";h[p]=Function("F,a","return new F("+v.join(",")+")")}return h[p](m,_)}(d,f.length,f):a(d,f,u)};return s(d.prototype)&&(g.prototype=d.prototype),g}},function(e,n){e.exports=function(o,r,s){var a=s===void 0;switch(r.length){case 0:return a?o():o.call(s);case 1:return a?o(r[0]):o.call(s,r[0]);case 2:return a?o(r[0],r[1]):o.call(s,r[0],r[1]);case 3:return a?o(r[0],r[1],r[2]):o.call(s,r[0],r[1],r[2]);case 4:return a?o(r[0],r[1],r[2],r[3]):o.call(s,r[0],r[1],r[2],r[3])}return o.apply(s,r)}},function(e,n,o){o(59)("match",1,function(r,s,a){return[function(l){var h=r(this),u=l==null?void 0:l[s];return u!==void 0?u.call(l,h):new RegExp(l)[s](String(h))},a]})},function(e,n,o){var r=o(7),s=o(16),a=o(4),l=o(12),h=o(34);e.exports=function(u,d,c){var g=h(u),f=c(l,g,""[u]),m=f[0],p=f[1];a(function(){var _={};return _[g]=function(){return 7},""[u](_)!=7})&&(s(String.prototype,u,m),r(RegExp.prototype,g,d==2?function(_,v){return p.call(_,this,v)}:function(_){return p.call(_,this)}))}},function(e,n,o){n.__esModule=!0,n.default=void 0,o(36);var r=o(5),s=function(h,u,d){var c;return function(){var g=this,f=arguments,m=function(){c=null,d||h.apply(g,f)},p=d&&!c;clearTimeout(c),c=setTimeout(m,u),p&&h.apply(g,f)}},a=function(l){function h(){for(var d,c=arguments.length,g=new Array(c),f=0;f<c;f++)g[f]=arguments[f];return(d=l.call.apply(l,[this].concat(g))||this).state={bump:!1,debounced:!1},d}(function(c,g){c.prototype=Object.create(g.prototype),(c.prototype.constructor=c).__proto__=g})(h,l);var u=h.prototype;return u.componentWillMount=function(){var d=this;this.debounceStatusUpdate=s(function(){if(!d.state.debounced){var c=!d.props.isInFocus||d.props.validChoiceMade;d.setState(function(g){return{bump:!g.bump,debounced:!0,silenced:c}})}},1400)},u.componentWillReceiveProps=function(d){d.queryLength,this.setState({debounced:!1})},u.render=function(){var d=this.props,c=d.id,g=d.length,f=d.queryLength,m=d.minQueryLength,p=d.selectedOption,_=d.selectedOptionIndex,v=d.tQueryTooShort,y=d.tNoResults,x=d.tSelectedOption,k=d.tResults,w=this.state,E=w.bump,M=w.debounced,S=w.silenced,z=f<m,P=g===0,G=p?x(p,g,_):"",A=null;return A=z?v(m):P?y():k(g,G),this.debounceStatusUpdate(),(0,r.createElement)("div",{style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,r.createElement)("div",{id:c+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!S&&M&&E?A:""),(0,r.createElement)("div",{id:c+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},S||!M||E?"":A))},h}(r.Component);(n.default=a).defaultProps={tQueryTooShort:function(l){return"Type in "+l+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(l,h,u){return l+" "+(u+1)+" of "+h+" is highlighted"},tResults:function(l,h){return l+" "+(l===1?"result":"results")+" "+(l===1?"is":"are")+" available. "+h}}},function(e,n,o){n.__esModule=!0,n.default=void 0;var r=o(5),s=function(l){var h=l.className;return(0,r.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:h,focusable:"false"},(0,r.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,r.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};n.default=s}]).default})})(lp);const eE=d1(lp.exports),iE=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:GDS Transport;font-style:normal;font-weight:400;src:url(/assets/fonts/light-94a07e06a1-v2.woff2) format("woff2"),url(/assets/fonts/light-f591b13f7d-v2.woff) format("woff");font-display:fallback}@font-face{font-family:GDS Transport;font-style:normal;font-weight:700;src:url(/assets/fonts/bold-b542beb274-v2.woff2) format("woff2"),url(/assets/fonts/bold-affa96571d-v2.woff) format("woff");font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-link:link{color:#1d70b8}.govuk-link:visited{color:#4c2c92}.govuk-link:hover{color:#003078}.govuk-link:active{color:#0b0c0c}.govuk-link:focus{color:#0b0c0c}@media print{[href^="/"].govuk-link:after,[href^="http://"].govuk-link:after,[href^="https://"].govuk-link:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:link,.govuk-link--muted:visited{color:#505a5f}.govuk-link--muted:hover,.govuk-link--muted:active{color:#0b0c0c}.govuk-link--muted:focus{color:#0b0c0c}.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:hover{color:#0b0c0cfc}.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#000}}.govuk-link--inverse:link,.govuk-link--inverse:visited{color:#fff}.govuk-link--inverse:hover,.govuk-link--inverse:active{color:#fffffffc}.govuk-link--inverse:focus{color:#0b0c0c}.govuk-link--no-underline:not(:hover):not(:active){text-decoration:none}.govuk-link--no-visited-state:link,.govuk-link--no-visited-state:visited{color:#1d70b8}.govuk-link--no-visited-state:hover{color:#003078}.govuk-link--no-visited-state:active{color:#0b0c0c}.govuk-link--no-visited-state:focus{color:#0b0c0c}.govuk-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-list{font-size:14pt;line-height:1.15}}@media print{.govuk-list{color:#000}}@media (min-width: 40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:0}@media (min-width: 40.0625em){.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:5px}}.govuk-list--spaced>li{margin-bottom:10px}@media (min-width: 40.0625em){.govuk-list--spaced>li{margin-bottom:15px}}.govuk-heading-xl{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000}}@media print{.govuk-heading-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000}}@media print{.govuk-heading-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width: 40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000}}@media print{.govuk-heading-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000}}@media print{.govuk-heading-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-xl{font-size:27px;font-size:1.6875rem;line-height:1.1111111111}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;color:#505a5f}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-lead,.govuk-body-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:20px}@media print{.govuk-body-lead,.govuk-body-l{color:#000}}@media print{.govuk-body-lead,.govuk-body-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-body-lead,.govuk-body-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000}}@media print{.govuk-body,.govuk-body-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000}}@media print{.govuk-body-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-s{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;font-size:.75rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000}}@media print{.govuk-body-xs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-xs{font-size:14px;font-size:.875rem;line-height:1.4285714286}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-top:50px}}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-section-break--l{margin-top:30px}}@media (min-width: 40.0625em){.govuk-section-break--l{margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-section-break--m{margin-top:20px}}@media (min-width: 40.0625em){.govuk-section-break--m{margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #b1b4b6}.govuk-button-group{margin-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media (min-width: 40.0625em){.govuk-button-group{margin-bottom:15px}}.govuk-button-group .govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;display:inline-block;max-width:100%;margin-top:5px;margin-bottom:20px;text-align:center}@media print{.govuk-button-group .govuk-link{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button-group .govuk-link{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button-group .govuk-link{font-size:14pt;line-height:19px}}.govuk-button-group .govuk-button{margin-bottom:17px}@media (min-width: 40.0625em){.govuk-button-group{margin-right:-15px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.govuk-button-group .govuk-button,.govuk-button-group .govuk-link{margin-right:15px}.govuk-button-group .govuk-link{text-align:left}}.govuk-form-group{margin-bottom:20px}.govuk-form-group:after{content:"";display:block;clear:both}@media (min-width: 40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #d4351c}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-grid-column-one-quarter-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-quarter-from-desktop{width:25%;float:left}}.govuk-grid-column-one-third-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-third-from-desktop{width:33.3333%;float:left}}.govuk-grid-column-one-half-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-half-from-desktop{width:50%;float:left}}.govuk-grid-column-two-thirds-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-two-thirds-from-desktop{width:66.6666%;float:left}}.govuk-grid-column-three-quarters-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-three-quarters-from-desktop{width:75%;float:left}}.govuk-grid-column-full-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-full-from-desktop{width:100%;float:left}}.govuk-main-wrapper{display:block;padding-top:20px;padding-bottom:20px}@media (min-width: 40.0625em){.govuk-main-wrapper{padding-top:40px;padding-bottom:40px}}.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:30px}@media (min-width: 40.0625em){.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:50px}}.govuk-template{background-color:#f3f2f1;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}@media screen{.govuk-template{overflow-y:scroll}}.govuk-template__body{margin:0;background-color:#fff}.govuk-width-container{max-width:960px;margin-right:15px;margin-left:15px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(15px,calc(15px + env(safe-area-inset-right)));margin-left:max(15px,calc(15px + env(safe-area-inset-left)))}}@media (min-width: 40.0625em){.govuk-width-container{margin-right:30px;margin-left:30px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(30px,calc(15px + env(safe-area-inset-right)));margin-left:max(30px,calc(15px + env(safe-area-inset-left)))}}}@media (min-width: 1020px){.govuk-width-container{margin-right:auto;margin-left:auto}@supports (margin: max(0px)){.govuk-width-container{margin-right:auto;margin-left:auto}}}.govuk-accordion{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-accordion{margin-bottom:30px}}.govuk-accordion__section{padding-top:15px}.govuk-accordion__section-heading{margin-top:0;margin-bottom:0;padding-top:15px;padding-bottom:15px}.govuk-accordion__section-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;color:#0b0c0c;display:block;margin-bottom:0;padding-top:15px}@media print{.govuk-accordion__section-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-accordion__section-button{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-accordion__section-button{font-size:18pt;line-height:1.15}}@media print{.govuk-accordion__section-button{color:#000}}.govuk-accordion__section-content>:last-child{margin-bottom:0}.js-enabled .govuk-accordion{border-bottom:1px solid #b1b4b6}.js-enabled .govuk-accordion__section{padding-top:0}.js-enabled .govuk-accordion__section-content{display:none;padding-bottom:30px}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-content{padding-bottom:50px}}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-content{display:block}.js-enabled .govuk-accordion__show-all{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;position:relative;z-index:1;margin-bottom:9px;padding:5px 2px 5px 0;border-width:0;color:#1d70b8;background:none;cursor:pointer;-webkit-appearance:none}@media print{.js-enabled .govuk-accordion__show-all{font-family:sans-serif}}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__show-all{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__show-all{font-size:14pt;line-height:1.15}}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__show-all{margin-bottom:14px}}.js-enabled .govuk-accordion__show-all::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__show-all:hover{color:#0b0c0c;background:#f3f2f1;box-shadow:0 -2px #f3f2f1,0 4px #f3f2f1}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__show-all:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron{background:#0b0c0c}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-heading{padding:0}.js-enabled .govuk-accordion-nav__chevron{box-sizing:border-box;display:inline-block;position:relative;width:1.25rem;height:1.25rem;border:.0625rem solid;border-radius:50%;vertical-align:middle}.js-enabled .govuk-accordion-nav__chevron:after{content:"";box-sizing:border-box;display:block;position:absolute;bottom:.3125rem;left:.375rem;width:.375rem;height:.375rem;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-top:.125rem solid;border-right:.125rem solid}.js-enabled .govuk-accordion-nav__chevron--down{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.js-enabled .govuk-accordion__section-button{width:100%;padding:10px 0 0;border:0;border-top:1px solid #b1b4b6;border-bottom:10px solid transparent;color:#0b0c0c;background:none;text-align:left;cursor:pointer;-webkit-appearance:none}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-button{padding-bottom:10px}}.js-enabled .govuk-accordion__section-button:active{color:#0b0c0c;background:none}.js-enabled .govuk-accordion__section-button:hover{color:#0b0c0c;background:#f3f2f1}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__section-button:focus{outline:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-button::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-button{padding-bottom:20px;border-bottom:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:3px}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:2px}}.js-enabled .govuk-accordion__section-toggle,.js-enabled .govuk-accordion__section-heading-text,.js-enabled .govuk-accordion__section-summary{display:block;margin-bottom:13px}.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-toggle-focus{display:inline}.js-enabled .govuk-accordion__section-toggle{font-size:16px;font-size:1rem;line-height:1.25;font-weight:400;color:#1d70b8}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-toggle{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__section-toggle{font-size:14pt;line-height:1.15}}.js-enabled .govuk-accordion__show-all-text,.js-enabled .govuk-accordion__section-toggle-text{margin-left:5px;vertical-align:middle}@media screen and (forced-colors: active){.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{background-color:transparent}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{background:transparent;background-color:transparent}}@media (hover: none){.js-enabled .govuk-accordion__section-header:hover{border-top-color:#b1b4b6;box-shadow:inset 0 3px #1d70b8}.js-enabled .govuk-accordion__section-header:hover .govuk-accordion__section-button{border-top-color:#b1b4b6}}.govuk-back-link{font-size:14px;font-size:.875rem;line-height:1.1428571429;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px}@media (min-width: 40.0625em){.govuk-back-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2}}@media print{.govuk-back-link{font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:hover{color:#0b0c0cfc}.govuk-back-link:active,.govuk-back-link:focus{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus{color:#000}}.govuk-back-link:before{content:"";display:block;position:absolute;top:0;bottom:0;left:3px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-back-link:focus:before{border-color:#0b0c0c}.govuk-back-link:after{content:"";position:absolute;top:-14px;right:0;bottom:-14px;left:0}.govuk-breadcrumbs{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-breadcrumbs{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2}}@media print{.govuk-breadcrumbs{color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:0;bottom:0;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:hover{color:#0b0c0cfc}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#000}}@media (max-width: 40.0525em){.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item{display:none}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:first-child,.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:last-child{display:inline-block}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:before{top:6px;margin:0}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.govuk-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:0 0 22px;padding:8px 10px 7px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00703c;box-shadow:0 2px #002d18;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button{font-size:14pt;line-height:19px}}@media (min-width: 40.0625em){.govuk-button{margin-bottom:32px}}@media (min-width: 40.0625em){.govuk-button{width:auto}}.govuk-button:link,.govuk-button:visited,.govuk-button:active,.govuk-button:hover{color:#fff;text-decoration:none}.govuk-button::-moz-focus-inner{padding:0;border:0}.govuk-button:hover{background-color:#005a30}.govuk-button:active{top:2px}.govuk-button:focus{border-color:#fd0;outline:3px solid transparent;box-shadow:inset 0 0 0 1px #fd0}.govuk-button:focus:not(:active):not(:hover){border-color:#fd0;color:#0b0c0c;background-color:#fd0;box-shadow:0 2px #0b0c0c}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00703c;cursor:default}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;box-shadow:0 2px #002d18}.govuk-button--secondary{background-color:#f3f2f1;box-shadow:0 2px #929191}.govuk-button--secondary,.govuk-button--secondary:link,.govuk-button--secondary:visited,.govuk-button--secondary:active,.govuk-button--secondary:hover{color:#0b0c0c}.govuk-button--secondary:hover{background-color:#dbdad9}.govuk-button--secondary:hover[disabled]{background-color:#f3f2f1}.govuk-button--warning{background-color:#d4351c;box-shadow:0 2px #55150b}.govuk-button--warning,.govuk-button--warning:link,.govuk-button--warning:visited,.govuk-button--warning:active,.govuk-button--warning:hover{color:#fff}.govuk-button--warning:hover{background-color:#aa2a16}.govuk-button--warning:hover[disabled]{background-color:#d4351c}.govuk-button--start{font-weight:700;font-size:18px;font-size:1.125rem;line-height:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 40.0625em){.govuk-button--start{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}.govuk-button__start-icon{margin-left:5px;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;forced-color-adjust:auto}@media (min-width: 48.0625em){.govuk-button__start-icon{margin-left:10px}}.govuk-error-message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px;clear:both;color:#d4351c}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-message{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{min-width:0;margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}@supports not (caret-color: auto){.govuk-fieldset,x:-moz-any-link{display:table-cell}}.govuk-fieldset__legend{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;box-sizing:border-box;display:table;max-width:100%;margin-bottom:10px;padding:0;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15}}@media print{.govuk-fieldset__legend{color:#000}}.govuk-fieldset__legend--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:15px;color:#505a5f}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-hint{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend+.govuk-hint{margin-top:-5px}.govuk-label{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label{font-size:14pt;line-height:1.15}}@media print{.govuk-label{color:#000}}.govuk-label--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-checkboxes__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__label:after{content:"";box-sizing:border-box;position:absolute;top:11px;left:9px;width:23px;height:12px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__hint{display:block;padding-right:15px;padding-left:15px}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 3px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{outline-color:Highlight}}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-checkboxes__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-checkboxes__divider{color:#000}}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.js-enabled .govuk-checkboxes__conditional--hidden{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-checkboxes--small .govuk-checkboxes__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-checkboxes--small .govuk-checkboxes__item:after{content:"";display:block;clear:both}.govuk-checkboxes--small .govuk-checkboxes__input{left:-10px}.govuk-checkboxes--small .govuk-checkboxes__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-checkboxes--small .govuk-checkboxes__label{padding:11px 15px 10px 1px}}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:8px;width:24px;height:24px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:15px;left:6px;width:12px;height:6.5px;border-width:0 0 3px 3px}.govuk-checkboxes--small .govuk-checkboxes__hint{padding:0;clear:both}.govuk-checkboxes--small .govuk-checkboxes__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:initial}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0}}.govuk-textarea{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:block;width:100%;min-height:40px;margin-bottom:20px;padding:5px;resize:vertical;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-textarea{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}@media (min-width: 40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-textarea--error{border-color:#d4351c}.govuk-textarea--error:focus{border-color:#0b0c0c}.govuk-character-count{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-character-count{margin-bottom:30px}}.govuk-character-count .govuk-form-group,.govuk-character-count .govuk-textarea{margin-bottom:5px}.govuk-character-count__message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400;margin-top:0;margin-bottom:0}@media print{.govuk-character-count__message{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-character-count__message{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-character-count__message--disabled{visibility:hidden}.govuk-cookie-banner{padding-top:20px;border-bottom:10px solid transparent;background-color:#f3f2f1}.govuk-cookie-banner[hidden]{display:none}.govuk-cookie-banner__message{margin-bottom:-10px}.govuk-cookie-banner__message[hidden]{display:none}.govuk-cookie-banner__message:focus{outline:none}.govuk-summary-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin:0 0 20px}@media print{.govuk-summary-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-summary-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-summary-list{font-size:14pt;line-height:1.15}}@media print{.govuk-summary-list{color:#000}}@media (min-width: 40.0625em){.govuk-summary-list{display:table;width:100%;table-layout:fixed;border-collapse:collapse}}@media (min-width: 40.0625em){.govuk-summary-list{margin-bottom:30px}}.govuk-summary-list__row{border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-summary-list__row{margin-bottom:15px}}@media (min-width: 40.0625em){.govuk-summary-list__row{display:table-row}}@media (min-width: 40.0625em){.govuk-summary-list__row--no-actions:after{content:"";display:table-cell;width:20%}}.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{margin:0}@media (min-width: 40.0625em){.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{display:table-cell;padding-top:10px;padding-right:20px;padding-bottom:10px}}.govuk-summary-list__actions{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-summary-list__actions{width:20%;padding-right:0;text-align:right}}.govuk-summary-list__key,.govuk-summary-list__value{word-wrap:break-word;overflow-wrap:break-word}.govuk-summary-list__key{margin-bottom:5px;font-weight:700}@media (min-width: 40.0625em){.govuk-summary-list__key{width:30%}}@media (max-width: 40.0525em){.govuk-summary-list__value{margin-bottom:15px}}.govuk-summary-list__value>p{margin-bottom:10px}.govuk-summary-list__value>:last-child{margin-bottom:0}.govuk-summary-list__actions-list{width:100%;margin:0;padding:0}.govuk-summary-list__actions-list-item{display:inline;margin-right:10px;padding-right:10px}.govuk-summary-list__actions-list-item:not(:last-child){border-right:1px solid #b1b4b6}.govuk-summary-list__actions-list-item:last-child{margin-right:0;padding-right:0;border:0}.govuk-summary-list--no-border .govuk-summary-list__row{border:0}@media (min-width: 40.0625em){.govuk-summary-list--no-border .govuk-summary-list__key,.govuk-summary-list--no-border .govuk-summary-list__value,.govuk-summary-list--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-summary-list__row--no-border{border:0}@media (min-width: 40.0625em){.govuk-summary-list__row--no-border .govuk-summary-list__key,.govuk-summary-list__row--no-border .govuk-summary-list__value,.govuk-summary-list__row--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-input{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;width:100%;height:40px;height:2.5rem;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-input::-webkit-outer-spin-button,.govuk-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border-color:#d4351c}.govuk-input--error:focus{border-color:#0b0c0c}.govuk-input--width-30{max-width:59ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-input--width-5{max-width:10.8ex}.govuk-input--width-4{max-width:9ex}.govuk-input--width-3{max-width:7.2ex}.govuk-input--width-2{max-width:5.4ex}.govuk-input__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.govuk-input__wrapper .govuk-input{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.govuk-input__wrapper .govuk-input:focus{z-index:1}@media (max-width: 19.99em){.govuk-input__wrapper{display:block}.govuk-input__wrapper .govuk-input{max-width:100%}}.govuk-input__prefix,.govuk-input__suffix{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:inline-block;min-width:40px;min-width:2.5rem;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;background-color:#f3f2f1;text-align:center;white-space:nowrap;cursor:default;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media print{.govuk-input__prefix,.govuk-input__suffix{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input__prefix,.govuk-input__suffix{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input__prefix,.govuk-input__suffix{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-input__prefix,.govuk-input__suffix{line-height:1.6}}@media (max-width: 19.99em){.govuk-input__prefix,.govuk-input__suffix{display:block;height:100%;white-space:normal}}@media (max-width: 19.99em){.govuk-input__prefix{border-bottom:0}}@media (min-width: 20em){.govuk-input__prefix{border-right:0}}@media (max-width: 19.99em){.govuk-input__suffix{border-top:0}}@media (min-width: 20em){.govuk-input__suffix{border-left:0}}.govuk-date-input{font-size:0}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{display:inline-block;margin-right:20px;margin-bottom:0}.govuk-date-input__label{display:block}.govuk-date-input__input{margin-bottom:0}.govuk-details{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-details{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-details{font-size:14pt;line-height:1.15}}@media print{.govuk-details{color:#000}}@media (min-width: 40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#1d70b8;cursor:pointer}.govuk-details__summary:hover{color:#003078}.govuk-details__summary:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:focus .govuk-details__summary-text{text-decoration:none}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:-1px;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,100% 50%,0% 100%);clip-path:polygon(0% 0%,100% 50%,0% 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:12.124px 7px 0 7px;border-top-color:inherit}.govuk-details__text{padding-top:15px;padding-bottom:15px;padding-left:20px;border-left:5px solid #b1b4b6}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text>:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:5px solid #d4351c}@media print{.govuk-error-summary{color:#000}}@media (min-width: 40.0625em){.govuk-error-summary{padding:20px}}@media (min-width: 40.0625em){.govuk-error-summary{margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffdd00}.govuk-error-summary__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__title{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__body{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-error-summary__list a{font-family:sans-serif}}.govuk-error-summary__list a:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#d4351c}.govuk-error-summary__list a:hover{color:#942514}.govuk-error-summary__list a:active{color:#d4351c}.govuk-error-summary__list a:focus{color:#0b0c0c}.govuk-file-upload{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;max-width:100%;margin-left:-5px;padding:5px}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-file-upload{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15}}@media print{.govuk-file-upload{color:#000}}.govuk-file-upload::-webkit-file-upload-button{-webkit-appearance:button;color:inherit;font:inherit}.govuk-file-upload:focus{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-file-upload:focus-within{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-footer{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;padding-top:25px;padding-bottom:15px;border-top:1px solid #b1b4b6;color:#0b0c0c;background:#f3f2f1}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-footer{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-footer{padding-top:40px}}@media (min-width: 40.0625em){.govuk-footer{padding-bottom:25px}}.govuk-footer__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-footer__link{font-family:sans-serif}}.govuk-footer__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-footer__link:link,.govuk-footer__link:visited{color:#0b0c0c}@media print{.govuk-footer__link:link,.govuk-footer__link:visited{color:#000}}.govuk-footer__link:hover{color:#0b0c0cfc}.govuk-footer__link:active,.govuk-footer__link:focus{color:#0b0c0c}@media print{.govuk-footer__link:active,.govuk-footer__link:focus{color:#000}}.govuk-footer__section-break{margin:0 0 30px;border:0;border-bottom:1px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}@media (max-width: 40.0525em){.govuk-footer__meta-item--grow{-webkit-flex-basis:320px;-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top;forced-color-adjust:auto}@media (max-width: 48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0%;background-size:125px 102px;text-align:center;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__meta-custom{margin-bottom:20px}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{margin-right:-15px;margin-left:-15px}.govuk-footer__navigation:after{content:"";display:block;clear:both}.govuk-footer__section{display:inline-block;margin-bottom:30px;vertical-align:top}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list .govuk-footer__link:hover{text-decoration-thickness:auto}@media (min-width: 48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;border-bottom:10px solid #ffffff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header__container--full-width{padding:0 15px;border-color:#1d70b8}.govuk-header__container--full-width .govuk-header__menu-button{right:15px}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #1d70b8}.govuk-header__container:after{content:"";display:block;clear:both}.govuk-header__logotype{display:inline-block;margin-right:5px}@media (forced-colors: active){.govuk-header__logotype{forced-color-adjust:none;color:linktext}}.govuk-header__logotype:last-child{margin-right:0}.govuk-header__logotype-crown{position:relative;top:-1px;margin-right:1px;fill:currentColor;vertical-align:top}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:bottom}.govuk-header__product-name{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1;display:inline-table}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__product-name{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1}}.govuk-header__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none}@media print{.govuk-header__link{font-family:sans-serif}}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover,.govuk-header__link:active{color:#fffffffc}.govuk-header__link:focus{color:#0b0c0c}.govuk-header__link:hover{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.1em}.govuk-header__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__link--homepage{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;margin-right:10px;font-size:30px;line-height:1}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{text-decoration:none}.govuk-header__link--homepage:hover,.govuk-header__link--homepage:active{margin-bottom:-3px;border-bottom:3px solid}.govuk-header__link--homepage:focus{margin-bottom:0;border-bottom:0}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__link--service-name{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo,.govuk-header__content{box-sizing:border-box}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width: 40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width: 48.0625em){.govuk-header__logo{width:33.33%;padding-right:15px;float:left;vertical-align:top}}@media (min-width: 48.0625em){.govuk-header__content{width:66.66%;padding-left:15px;float:left}}.govuk-header__menu-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;cursor:pointer}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__menu-button{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{-webkit-text-decoration:solid underline 3px;text-decoration:solid underline 3px;text-underline-offset:.1em}.govuk-header__menu-button:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:8.66px 5px 0 5px;border-top-color:inherit;content:"";margin-left:5px}@media (min-width: 40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0%,0% 100%,100% 100%);clip-path:polygon(50% 0%,0% 100%,100% 100%);border-width:0 5px 8.66px 5px;border-bottom-color:inherit}@media (min-width: 48.0625em){.govuk-header__navigation{margin-bottom:10px}}.govuk-header__navigation-list{margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button{display:block}@media (min-width: 48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation-list{display:none}@media (min-width: 48.0625em){.js-enabled .govuk-header__navigation-list{display:block}}.js-enabled .govuk-header__navigation-list--open{display:block}@media (min-width: 48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width: 48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1.1428571429;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__navigation-item a{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item--active a:focus{color:#0b0c0c}.govuk-header__navigation-item:last-child{margin-right:0;border-bottom:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-inset-text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #b1b4b6}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-inset-text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15}}@media print{.govuk-inset-text{color:#000}}@media (min-width: 40.0625em){.govuk-inset-text{margin-top:30px}}@media (min-width: 40.0625em){.govuk-inset-text{margin-bottom:30px}}.govuk-inset-text>:first-child{margin-top:0}.govuk-inset-text>:only-child,.govuk-inset-text>:last-child{margin-bottom:0}.govuk-notification-banner{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:30px;border:5px solid #1d70b8;background-color:#1d70b8}@media print{.govuk-notification-banner{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-notification-banner{margin-bottom:50px}}.govuk-notification-banner:focus{outline:3px solid #ffdd00}.govuk-notification-banner__header{padding:2px 15px 5px;border-bottom:1px solid transparent}@media (min-width: 40.0625em){.govuk-notification-banner__header{padding:2px 20px 5px}}.govuk-notification-banner__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;margin:0;padding:0;color:#fff}@media print{.govuk-notification-banner__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner__title{font-size:14pt;line-height:1.15}}.govuk-notification-banner__content{color:#0b0c0c;padding:15px;background-color:#fff}@media print{.govuk-notification-banner__content{color:#000}}@media (min-width: 40.0625em){.govuk-notification-banner__content{padding:20px}}.govuk-notification-banner__content>*{box-sizing:border-box;max-width:605px}.govuk-notification-banner__content>:last-child{margin-bottom:0}.govuk-notification-banner__heading{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin:0 0 15px;padding:0}@media print{.govuk-notification-banner__heading{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__heading{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-notification-banner__heading{font-size:18pt;line-height:1.15}}.govuk-notification-banner__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-notification-banner__link{font-family:sans-serif}}.govuk-notification-banner__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-notification-banner__link:link,.govuk-notification-banner__link:visited{color:#1d70b8}.govuk-notification-banner__link:hover{color:#003078}.govuk-notification-banner__link:active{color:#0b0c0c}.govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-notification-banner--success{border-color:#00703c;background-color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:link,.govuk-notification-banner--success .govuk-notification-banner__link:visited{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:hover{color:#004e2a}.govuk-notification-banner--success .govuk-notification-banner__link:active{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-panel{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-panel{padding:10px;overflow-wrap:break-word;word-wrap:break-word}}.govuk-panel--confirmation{color:#fff;background:#00703c}@media print{.govuk-panel--confirmation{border-color:currentColor;color:#000;background:none}}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__title{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__title:last-child{margin-bottom:0}.govuk-panel__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;font-size:1.5rem;line-height:1.0416666667}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__body{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{display:inline-block;outline:2px solid transparent;outline-offset:-2px;color:#fff;background-color:#1d70b8;letter-spacing:1px;text-decoration:none;text-transform:uppercase;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;padding:5px 8px 4px}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}.govuk-tag--grey{color:#383f43;background:#eeefef}.govuk-tag--purple{color:#3d2375;background:#dbd5e9}.govuk-tag--turquoise{color:#10403c;background:#bfe3e0}.govuk-tag--blue{color:#144e81;background:#d2e2f1}.govuk-tag--yellow{color:#594d00;background:#fff7bf}.govuk-tag--orange{color:#6e3619;background:#fcd6c3}.govuk-tag--red{color:#942514;background:#f6d7d2}.govuk-tag--pink{color:#80224d;background:#f7d7e6}.govuk-tag--green{color:#005a30;background:#cce2d8}.govuk-phase-banner{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #b1b4b6}.govuk-phase-banner__content{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;display:table;margin:0}@media print{.govuk-phase-banner__content{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-phase-banner__content{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-phase-banner__content{font-size:14pt;line-height:1.2}}@media print{.govuk-phase-banner__content{color:#000}}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:middle}.govuk-tabs{margin-top:5px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-tabs{margin-top:5px}}@media (min-width: 40.0625em){.govuk-tabs{margin-bottom:30px}}.govuk-tabs__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:10px}@media print{.govuk-tabs__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__title{font-size:14pt;line-height:1.15}}@media print{.govuk-tabs__title{color:#000}}.govuk-tabs__list{margin:0 0 20px;padding:0;list-style:none}@media (min-width: 40.0625em){.govuk-tabs__list{margin-bottom:30px}}.govuk-tabs__list-item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-left:25px}@media print{.govuk-tabs__list-item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__list-item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__list-item{font-size:14pt;line-height:1.15}}.govuk-tabs__list-item:before{color:#0b0c0c;content:"\\2014";margin-left:-25px;padding-right:5px}@media print{.govuk-tabs__list-item:before{color:#000}}.govuk-tabs__tab{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;margin-bottom:10px}@media print{.govuk-tabs__tab{font-family:sans-serif}}.govuk-tabs__tab:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-tabs__tab:link{color:#1d70b8}.govuk-tabs__tab:visited{color:#4c2c92}.govuk-tabs__tab:hover{color:#003078}.govuk-tabs__tab:active{color:#0b0c0c}.govuk-tabs__tab:focus{color:#0b0c0c}.govuk-tabs__panel{margin-bottom:30px}@media (min-width: 40.0625em){.govuk-tabs__panel{margin-bottom:50px}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__list{margin-bottom:0;border-bottom:1px solid #b1b4b6}.js-enabled .govuk-tabs__list:after{content:"";display:block;clear:both}.js-enabled .govuk-tabs__title{display:none}.js-enabled .govuk-tabs__list-item{position:relative;margin-right:5px;margin-bottom:0;margin-left:0;padding:10px 20px;float:left;background-color:#f3f2f1;text-align:center}.js-enabled .govuk-tabs__list-item:before{content:none}.js-enabled .govuk-tabs__list-item--selected{position:relative;margin-top:-5px;margin-bottom:-1px;padding:14px 19px 16px;border:1px solid #b1b4b6;border-bottom:0;background-color:#fff}.js-enabled .govuk-tabs__list-item--selected .govuk-tabs__tab{text-decoration:none}.js-enabled .govuk-tabs__tab{margin-bottom:0}.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:hover{color:#0b0c0cfc}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0;padding:30px 20px;border:1px solid #b1b4b6;border-top:0}}@media (min-width: 40.0625em) and (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel>:last-child{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel--hidden{display:none}}.govuk-radios__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-radios__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__hint{display:block;padding-right:15px;padding-left:15px}.govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 4px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-radios__input:focus+.govuk-radios__label:before{outline-color:Highlight}}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width: 40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-radios__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-radios__divider{color:#000}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.js-enabled .govuk-radios__conditional--hidden{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-radios--small .govuk-radios__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-radios--small .govuk-radios__item:after{content:"";display:block;clear:both}.govuk-radios--small .govuk-radios__input{left:-10px}.govuk-radios--small .govuk-radios__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-radios--small .govuk-radios__label{padding:11px 15px 10px 1px}}.govuk-radios--small .govuk-radios__label:before{top:8px;width:24px;height:24px}.govuk-radios--small .govuk-radios__label:after{top:15px;left:7px;border-width:5px}.govuk-radios--small .govuk-radios__hint{padding:0;clear:both;pointer-events:none}.govuk-radios--small .govuk-radios__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-radios--small .govuk-radios__divider{width:24px;margin-bottom:5px}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:initial}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0}}.govuk-select{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;max-width:100%;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;color:#0b0c0c;background-color:#fff}@media print{.govuk-select{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-select{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-select option:active,.govuk-select option:checked,.govuk-select:focus::-ms-value{color:#fff;background-color:#1d70b8}.govuk-select--error{border-color:#d4351c}.govuk-select--error:focus{border-color:#0b0c0c}.govuk-skip-link{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:hover{color:#0b0c0cfc}.govuk-skip-link:active,.govuk-skip-link:focus{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus{color:#000}}@media (min-width: 40.0625em){.govuk-skip-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}@supports (padding: max(0px)){.govuk-skip-link{padding-right:max(15px,calc(15px + env(safe-area-inset-right)));padding-left:max(15px,calc(15px + env(safe-area-inset-left)))}}.govuk-skip-link:focus{outline:3px solid #ffdd00;outline-offset:0;background-color:#fd0}.govuk-skip-link-focused-element:focus{outline:none}.govuk-table{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table{font-size:14pt;line-height:1.15}}@media print{.govuk-table{color:#000}}@media (min-width: 40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__header,.govuk-table__cell{padding:10px 20px 10px 0;border-bottom:1px solid #b1b4b6;text-align:left;vertical-align:top}.govuk-table__cell--numeric{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-table__cell--numeric{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-table__header--numeric,.govuk-table__cell--numeric{text-align:right}.govuk-table__header:last-child,.govuk-table__cell:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-table__caption--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-table__caption--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-table__caption--xl{font-size:32pt;line-height:1.15}}.govuk-table__caption--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-table__caption--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-table__caption--l{font-size:24pt;line-height:1.05}}.govuk-table__caption--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-table__caption--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-table__caption--m{font-size:18pt;line-height:1.15}}.govuk-table__caption--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-table__caption--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table__caption--s{font-size:14pt;line-height:1.15}}.govuk-warning-text{position:relative;margin-bottom:20px;padding:10px 0}@media (min-width: 40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-warning-text__icon{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;box-sizing:border-box;display:inline-block;position:absolute;left:0;min-width:35px;min-height:35px;margin-top:-7px;border:3px solid #0b0c0c;border-radius:50%;color:#fff;background:#0b0c0c;font-size:30px;line-height:29px;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;forced-color-adjust:none}@media print{.govuk-warning-text__icon{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__icon{margin-top:-5px}}@media screen and (forced-colors: active){.govuk-warning-text__icon{border-color:windowText;color:windowText;background:transparent}}.govuk-warning-text__text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;padding-left:45px}@media print{.govuk-warning-text__text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-warning-text__text{font-size:14pt;line-height:1.15}}@media print{.govuk-warning-text__text{color:#000}}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-visually-hidden-focusable{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important}.govuk-visually-hidden-focusable:active,.govuk-visually-hidden-focusable:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}.govuk-\\!-display-inline{display:inline!important}.govuk-\\!-display-inline-block{display:inline-block!important}.govuk-\\!-display-block{display:block!important}.govuk-\\!-display-none{display:none!important}@media print{.govuk-\\!-display-none-print{display:none!important}}.govuk-\\!-margin-0{margin:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-0{margin:0!important}}.govuk-\\!-margin-top-0{margin-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-0{margin-top:0!important}}.govuk-\\!-margin-right-0{margin-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-0{margin-right:0!important}}.govuk-\\!-margin-bottom-0{margin-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\\!-margin-left-0{margin-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-0{margin-left:0!important}}.govuk-\\!-margin-1{margin:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-1{margin:5px!important}}.govuk-\\!-margin-top-1{margin-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-1{margin-top:5px!important}}.govuk-\\!-margin-right-1{margin-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-1{margin-right:5px!important}}.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\\!-margin-left-1{margin-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-1{margin-left:5px!important}}.govuk-\\!-margin-2{margin:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-2{margin:10px!important}}.govuk-\\!-margin-top-2{margin-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-2{margin-top:10px!important}}.govuk-\\!-margin-right-2{margin-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-2{margin-right:10px!important}}.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\\!-margin-left-2{margin-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-2{margin-left:10px!important}}.govuk-\\!-margin-3{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-3{margin:15px!important}}.govuk-\\!-margin-top-3{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-3{margin-top:15px!important}}.govuk-\\!-margin-right-3{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-3{margin-right:15px!important}}.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\\!-margin-left-3{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-3{margin-left:15px!important}}.govuk-\\!-margin-4{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-4{margin:20px!important}}.govuk-\\!-margin-top-4{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-4{margin-top:20px!important}}.govuk-\\!-margin-right-4{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-4{margin-right:20px!important}}.govuk-\\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\\!-margin-left-4{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-4{margin-left:20px!important}}.govuk-\\!-margin-5{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-5{margin:25px!important}}.govuk-\\!-margin-top-5{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-5{margin-top:25px!important}}.govuk-\\!-margin-right-5{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-5{margin-right:25px!important}}.govuk-\\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\\!-margin-left-5{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-5{margin-left:25px!important}}.govuk-\\!-margin-6{margin:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-6{margin:30px!important}}.govuk-\\!-margin-top-6{margin-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-6{margin-top:30px!important}}.govuk-\\!-margin-right-6{margin-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-6{margin-right:30px!important}}.govuk-\\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\\!-margin-left-6{margin-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-6{margin-left:30px!important}}.govuk-\\!-margin-7{margin:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-7{margin:40px!important}}.govuk-\\!-margin-top-7{margin-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-7{margin-top:40px!important}}.govuk-\\!-margin-right-7{margin-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-7{margin-right:40px!important}}.govuk-\\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\\!-margin-left-7{margin-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-7{margin-left:40px!important}}.govuk-\\!-margin-8{margin:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-8{margin:50px!important}}.govuk-\\!-margin-top-8{margin-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-8{margin-top:50px!important}}.govuk-\\!-margin-right-8{margin-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-8{margin-right:50px!important}}.govuk-\\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\\!-margin-left-8{margin-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-8{margin-left:50px!important}}.govuk-\\!-margin-9{margin:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-9{margin:60px!important}}.govuk-\\!-margin-top-9{margin-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-9{margin-top:60px!important}}.govuk-\\!-margin-right-9{margin-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-9{margin-right:60px!important}}.govuk-\\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\\!-margin-left-9{margin-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-9{margin-left:60px!important}}.govuk-\\!-padding-0{padding:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-0{padding:0!important}}.govuk-\\!-padding-top-0{padding-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-0{padding-top:0!important}}.govuk-\\!-padding-right-0{padding-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-0{padding-right:0!important}}.govuk-\\!-padding-bottom-0{padding-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\\!-padding-left-0{padding-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-0{padding-left:0!important}}.govuk-\\!-padding-1{padding:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-1{padding:5px!important}}.govuk-\\!-padding-top-1{padding-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-1{padding-top:5px!important}}.govuk-\\!-padding-right-1{padding-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-1{padding-right:5px!important}}.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\\!-padding-left-1{padding-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-1{padding-left:5px!important}}.govuk-\\!-padding-2{padding:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-2{padding:10px!important}}.govuk-\\!-padding-top-2{padding-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-2{padding-top:10px!important}}.govuk-\\!-padding-right-2{padding-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-2{padding-right:10px!important}}.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\\!-padding-left-2{padding-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-2{padding-left:10px!important}}.govuk-\\!-padding-3{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-3{padding:15px!important}}.govuk-\\!-padding-top-3{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-3{padding-top:15px!important}}.govuk-\\!-padding-right-3{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-3{padding-right:15px!important}}.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\\!-padding-left-3{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-3{padding-left:15px!important}}.govuk-\\!-padding-4{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-4{padding:20px!important}}.govuk-\\!-padding-top-4{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-4{padding-top:20px!important}}.govuk-\\!-padding-right-4{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-4{padding-right:20px!important}}.govuk-\\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\\!-padding-left-4{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-4{padding-left:20px!important}}.govuk-\\!-padding-5{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-5{padding:25px!important}}.govuk-\\!-padding-top-5{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-5{padding-top:25px!important}}.govuk-\\!-padding-right-5{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-5{padding-right:25px!important}}.govuk-\\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\\!-padding-left-5{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-5{padding-left:25px!important}}.govuk-\\!-padding-6{padding:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-6{padding:30px!important}}.govuk-\\!-padding-top-6{padding-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-6{padding-top:30px!important}}.govuk-\\!-padding-right-6{padding-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-6{padding-right:30px!important}}.govuk-\\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\\!-padding-left-6{padding-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-6{padding-left:30px!important}}.govuk-\\!-padding-7{padding:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-7{padding:40px!important}}.govuk-\\!-padding-top-7{padding-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-7{padding-top:40px!important}}.govuk-\\!-padding-right-7{padding-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-7{padding-right:40px!important}}.govuk-\\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\\!-padding-left-7{padding-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-7{padding-left:40px!important}}.govuk-\\!-padding-8{padding:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-8{padding:50px!important}}.govuk-\\!-padding-top-8{padding-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-8{padding-top:50px!important}}.govuk-\\!-padding-right-8{padding-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-8{padding-right:50px!important}}.govuk-\\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\\!-padding-left-8{padding-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-8{padding-left:50px!important}}.govuk-\\!-padding-9{padding:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-9{padding:60px!important}}.govuk-\\!-padding-top-9{padding-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-9{padding-top:60px!important}}.govuk-\\!-padding-right-9{padding-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-9{padding-right:60px!important}}.govuk-\\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\\!-padding-left-9{padding-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-9{padding-left:60px!important}}.govuk-\\!-text-align-left{text-align:left!important}.govuk-\\!-text-align-centre{text-align:center!important}.govuk-\\!-text-align-right{text-align:right!important}.govuk-\\!-font-size-80{font-size:53px!important;font-size:3.3125rem!important;line-height:1.0377358491!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-80{font-size:80px!important;font-size:5rem!important;line-height:1!important}}@media print{.govuk-\\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\\!-font-size-48{font-size:32px!important;font-size:2rem!important;line-height:1.09375!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-48{font-size:48px!important;font-size:3rem!important;line-height:1.0416666667!important}}@media print{.govuk-\\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\\!-font-size-36{font-size:24px!important;font-size:1.5rem!important;line-height:1.0416666667!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-36{font-size:36px!important;font-size:2.25rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\\!-font-size-27{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-27{font-size:27px!important;font-size:1.6875rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-24{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-24{font-size:24px!important;font-size:1.5rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-19{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-19{font-size:19px!important;font-size:1.1875rem!important;line-height:1.3157894737!important}}@media print{.govuk-\\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\\!-font-size-16{font-size:14px!important;font-size:.875rem!important;line-height:1.1428571429!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-16{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\\!-font-size-14{font-size:12px!important;font-size:.75rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-14{font-size:14px!important;font-size:.875rem!important;line-height:1.4285714286!important}}@media print{.govuk-\\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\\!-font-weight-regular{font-weight:400!important}.govuk-\\!-font-weight-bold{font-weight:700!important}.govuk-\\!-width-full,.govuk-\\!-width-three-quarters{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-three-quarters{width:75%!important}}.govuk-\\!-width-two-thirds{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-two-thirds{width:66.66%!important}}.govuk-\\!-width-one-half{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-half{width:50%!important}}.govuk-\\!-width-one-third{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-third{width:33.33%!important}}.govuk-\\!-width-one-quarter{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-quarter{width:25%!important}}:host .govuk-label{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif)}:host .govuk-label--static{font-size:var(--autocomplete__label__font-size, 19px)}:host .autocomplete__input{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif);font-size:var(--autocomplete__input__font-size, 19px);height:var(--autocomplete__input__height, 35px);padding:var(--autocomplete__input__padding, 5px 34px 5px 5px);z-index:calc(var(--autocomplete__dropdown-arrow-down__z-index, 1) + 1)}:host .autocomplete__dropdown-arrow-down{z-index:var(--autocomplete__dropdown-arrow-down__z-index, 1);top:calc((var(--autocomplete__input__height, 35px) - 17px) / 2)}:host .autocomplete__option{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif);font-size:var(--autocomplete__input__font-size, 19px);padding:var(--autocomplete__option__padding, 5px);border-bottom:var(--autocomplete__option__border-bottom, solid 1px #b1b4b6)}:host .autocomplete__option--focused,:host .autocomplete__option:hover,.autocomplete__option--focused :host .autocomplete__option:hover{border-color:var(--autocomplete__option__hover-border-color, #1d70b8);background-color:var(--autocomplete__option__hover-background-color, #1d70b8)}:host .autocomplete__menu{max-height:var(--autocomplete__menu__max-height, 342px)}
|
86
|
+
`;var hp=Object.freeze,up=Object.defineProperty,nE=Object.getOwnPropertyDescriptor,We=(i,t,e,n)=>{for(var o=n>1?void 0:n?nE(t,e):t,r=i.length-1,s;r>=0;r--)(s=i[r])&&(o=(n?s(t,e,o):s(o))||o);return n&&o&&up(t,e,o),o},oE=(i,t)=>hp(up(i,"raw",{value:hp(t||i.slice())})),dp;j.AddressAutocomplete=class extends An{constructor(){super(...arguments),this.id="autocomplete",this.postcode="SE5 0HU",this.label="Select an address",this.initialAddress="",this.osPlacesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.arrowStyle="default",this.labelStyle="responsive",this._totalAddresses=void 0,this._addressesInPostcode=[],this._options=[],this._selectedAddress=null,this._osError=void 0,this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}connectedCallback(){super.connectedCallback(),this._fetchData()}disconnectedCallback(){super.disconnectedCallback()}_getLightDropdownArrow(){return'<svg class="autocomplete__dropdown-arrow-down" style="height: 17px;" viewBox="0 0 512 512" ><path d="M256,298.3L256,298.3L256,298.3l174.2-167.2c4.3-4.2,11.4-4.1,15.8,0.2l30.6,29.9c4.4,4.3,4.5,11.3,0.2,15.5L264.1,380.9 c-2.2,2.2-5.2,3.2-8.1,3c-3,0.1-5.9-0.9-8.1-3L35.2,176.7c-4.3-4.2-4.2-11.2,0.2-15.5L66,131.3c4.4-4.3,11.5-4.4,15.8-0.2L256,298.3 z"/></svg>'}firstUpdated(){eE({element:this.renderRoot.querySelector(`#${this.id}-container`),id:this.id,required:!0,source:this._options,defaultValue:this.initialAddress,showAllValues:!0,displayMenu:"overlay",dropdownArrow:this.arrowStyle==="light"?this._getLightDropdownArrow:void 0,tNoResults:()=>"No addresses found",onConfirm:i=>{this._selectedAddress=this._addressesInPostcode.filter(t=>t.LPI.ADDRESS.split(`, ${t.LPI.ADMINISTRATIVE_AREA}`)[0]===i)[0],this._selectedAddress&&this.dispatch("addressSelection",{address:this._selectedAddress})}})}async _fetchData(i=0,t=[]){const e={postcode:this.postcode,dataset:"LPI",maxResults:"100",output_srs:"EPSG:4326",lr:"EN",key:this.osPlacesApiKey},n=`https://api.os.uk/search/places/v1/postcode?${new URLSearchParams(e)}`;await fetch(n+`&offset=${i}`).then(o=>o.json()).then(o=>{var s,a,l;(o.error||o.fault)&&(this._osError=((s=o.error)==null?void 0:s.message)||((a=o.fault)==null?void 0:a.faultstring)||"Something went wrong"),this._totalAddresses=(l=o.header)==null?void 0:l.totalresults;const r=t.concat(o.results||[]);if(this._addressesInPostcode=r,this.dispatch("ready",{postcode:this.postcode,status:`fetched ${this._addressesInPostcode.length}/${this._totalAddresses} addresses`}),o.results){o.results.filter(u=>u.LPI.LPI_LOGICAL_STATUS_CODE_DESCRIPTION==="APPROVED").map(u=>{this._options.push(u.LPI.ADDRESS.split(`, ${u.LPI.ADMINISTRATIVE_AREA}`)[0])});const h=new Intl.Collator([],{numeric:!0});this._options.sort((u,d)=>h.compare(u,d))}this._totalAddresses&&this._totalAddresses>this._addressesInPostcode.length&&this._fetchData(this._addressesInPostcode.length,this._addressesInPostcode)}).catch(o=>console.log(o))}_getLabelClasses(){let i="govuk-label";return this.labelStyle==="static"&&(i+=" govuk-label--static"),i}_getErrorMessageContainer(i){const t=i?"govuk-warning-text":"",e=i?Bi` <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
|
87
87
|
<strong class="govuk-warning-text__text">
|
88
88
|
<span class="govuk-warning-text__assistive">Warning</span>
|
89
89
|
${i}
|
@@ -102,16 +102,16 @@ northing meters`+i;var c=d/2,f=0,g=0,m,p,_,v,y;return c>0&&(m=1e5/Math.pow(10,c)
|
|
102
102
|
${this.label}
|
103
103
|
</label>
|
104
104
|
<div id="${this.id}-container" spellcheck="false"></div>
|
105
|
-
`}render(){let i;return this.osPlacesApiKey?this._osError?i=this._osError:this._totalAddresses===0&&(i=`No addresses found in postcode ${this.postcode}`):i="Missing OS Places API key",Bi(dp||(dp=
|
105
|
+
`}render(){let i;return this.osPlacesApiKey?this._osError?i=this._osError:this._totalAddresses===0&&(i=`No addresses found in postcode ${this.postcode}`):i="Missing OS Places API key",Bi(dp||(dp=oE([`
|
106
106
|
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
|
107
107
|
`,`
|
108
108
|
`,`
|
109
|
-
`])),this._getErrorMessageContainer(i),this._getAutocomplete(i))}},q.AddressAutocomplete.styles=Cs(ZM),Ue([J({type:String})],q.AddressAutocomplete.prototype,"id",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"postcode",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"label",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"initialAddress",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"osPlacesApiKey",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"arrowStyle",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"labelStyle",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_totalAddresses",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_addressesInPostcode",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_options",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_selectedAddress",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_osError",2),q.AddressAutocomplete=Ue([vl("address-autocomplete")],q.AddressAutocomplete);var sd=globalThis&&globalThis.__assign||function(){return sd=Object.assign||function(i){for(var t,e=1,n=arguments.length;e<n;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},sd.apply(this,arguments)},cp=/^([a-z]{1,2}\d)([a-z])$/i,QM=/[a-z]{2}$/i,fp=/\d[a-z]{2}$/i,tC=/^[a-z]{1,2}\d[a-z\d]?\s*\d[a-z]{2}$/i,eC=/^[a-z]{1,2}/i,iC={valid:!1,postcode:null,incode:null,outcode:null,area:null,district:null,subDistrict:null,sector:null,unit:null},ad=function(i){return i===null?null:i[0]},nC=/\s+/gi,gp=function(i){return i.replace(nC,"").toUpperCase()},ld=function(i,t){return gp(i).match(t)},vs=function(i){return i.match(tC)!==null},hd=function(i){var t=_s(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e},_s=function(i){return vs(i)?gp(i).replace(fp,""):null},ud=function(i){if(!vs(i))return null;var t=ld(i,fp);return ad(t)},rC=function(i){if(!vs(i))return null;var t=ld(i,eC);return ad(t)},oC=function(i){var t=_s(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e[0]},sC=function(i){if(!vs(i))return null;var t=ld(i,QM);return ad(t)},aC=function(i){var t=_s(i);if(t===null)return null;var e=t.match(cp);return e===null?t:e[1]},lC=function(i){var t=_s(i);if(t===null)return null;var e=t.match(cp);return e===null?null:t},hC=function(i){return vs(i)?{valid:!0,postcode:hd(i),incode:ud(i),outcode:_s(i),area:rC(i),district:aC(i),subDistrict:lC(i),sector:oC(i),unit:sC(i)}:sd({},iC)};const uC=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:GDS Transport;font-style:normal;font-weight:400;src:url(/assets/fonts/light-94a07e06a1-v2.woff2) format("woff2"),url(/assets/fonts/light-f591b13f7d-v2.woff) format("woff");font-display:fallback}@font-face{font-family:GDS Transport;font-style:normal;font-weight:700;src:url(/assets/fonts/bold-b542beb274-v2.woff2) format("woff2"),url(/assets/fonts/bold-affa96571d-v2.woff) format("woff");font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-link:link{color:#1d70b8}.govuk-link:visited{color:#4c2c92}.govuk-link:hover{color:#003078}.govuk-link:active{color:#0b0c0c}.govuk-link:focus{color:#0b0c0c}@media print{[href^="/"].govuk-link:after,[href^="http://"].govuk-link:after,[href^="https://"].govuk-link:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:link,.govuk-link--muted:visited{color:#505a5f}.govuk-link--muted:hover,.govuk-link--muted:active{color:#0b0c0c}.govuk-link--muted:focus{color:#0b0c0c}.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:hover{color:#0b0c0cfc}.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#000}}.govuk-link--inverse:link,.govuk-link--inverse:visited{color:#fff}.govuk-link--inverse:hover,.govuk-link--inverse:active{color:#fffffffc}.govuk-link--inverse:focus{color:#0b0c0c}.govuk-link--no-underline:not(:hover):not(:active){text-decoration:none}.govuk-link--no-visited-state:link,.govuk-link--no-visited-state:visited{color:#1d70b8}.govuk-link--no-visited-state:hover{color:#003078}.govuk-link--no-visited-state:active{color:#0b0c0c}.govuk-link--no-visited-state:focus{color:#0b0c0c}.govuk-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-list{font-size:14pt;line-height:1.15}}@media print{.govuk-list{color:#000}}@media (min-width: 40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:0}@media (min-width: 40.0625em){.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:5px}}.govuk-list--spaced>li{margin-bottom:10px}@media (min-width: 40.0625em){.govuk-list--spaced>li{margin-bottom:15px}}.govuk-heading-xl{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000}}@media print{.govuk-heading-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000}}@media print{.govuk-heading-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width: 40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000}}@media print{.govuk-heading-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000}}@media print{.govuk-heading-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-xl{font-size:27px;font-size:1.6875rem;line-height:1.1111111111}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;color:#505a5f}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-lead,.govuk-body-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:20px}@media print{.govuk-body-lead,.govuk-body-l{color:#000}}@media print{.govuk-body-lead,.govuk-body-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-body-lead,.govuk-body-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000}}@media print{.govuk-body,.govuk-body-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000}}@media print{.govuk-body-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-s{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;font-size:.75rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000}}@media print{.govuk-body-xs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-xs{font-size:14px;font-size:.875rem;line-height:1.4285714286}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-top:50px}}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-section-break--l{margin-top:30px}}@media (min-width: 40.0625em){.govuk-section-break--l{margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-section-break--m{margin-top:20px}}@media (min-width: 40.0625em){.govuk-section-break--m{margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #b1b4b6}.govuk-button-group{margin-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media (min-width: 40.0625em){.govuk-button-group{margin-bottom:15px}}.govuk-button-group .govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;display:inline-block;max-width:100%;margin-top:5px;margin-bottom:20px;text-align:center}@media print{.govuk-button-group .govuk-link{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button-group .govuk-link{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button-group .govuk-link{font-size:14pt;line-height:19px}}.govuk-button-group .govuk-button{margin-bottom:17px}@media (min-width: 40.0625em){.govuk-button-group{margin-right:-15px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.govuk-button-group .govuk-button,.govuk-button-group .govuk-link{margin-right:15px}.govuk-button-group .govuk-link{text-align:left}}.govuk-form-group{margin-bottom:20px}.govuk-form-group:after{content:"";display:block;clear:both}@media (min-width: 40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #d4351c}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-grid-column-one-quarter-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-quarter-from-desktop{width:25%;float:left}}.govuk-grid-column-one-third-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-third-from-desktop{width:33.3333%;float:left}}.govuk-grid-column-one-half-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-half-from-desktop{width:50%;float:left}}.govuk-grid-column-two-thirds-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-two-thirds-from-desktop{width:66.6666%;float:left}}.govuk-grid-column-three-quarters-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-three-quarters-from-desktop{width:75%;float:left}}.govuk-grid-column-full-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-full-from-desktop{width:100%;float:left}}.govuk-main-wrapper{display:block;padding-top:20px;padding-bottom:20px}@media (min-width: 40.0625em){.govuk-main-wrapper{padding-top:40px;padding-bottom:40px}}.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:30px}@media (min-width: 40.0625em){.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:50px}}.govuk-template{background-color:#f3f2f1;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}@media screen{.govuk-template{overflow-y:scroll}}.govuk-template__body{margin:0;background-color:#fff}.govuk-width-container{max-width:960px;margin-right:15px;margin-left:15px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(15px,calc(15px + env(safe-area-inset-right)));margin-left:max(15px,calc(15px + env(safe-area-inset-left)))}}@media (min-width: 40.0625em){.govuk-width-container{margin-right:30px;margin-left:30px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(30px,calc(15px + env(safe-area-inset-right)));margin-left:max(30px,calc(15px + env(safe-area-inset-left)))}}}@media (min-width: 1020px){.govuk-width-container{margin-right:auto;margin-left:auto}@supports (margin: max(0px)){.govuk-width-container{margin-right:auto;margin-left:auto}}}.govuk-accordion{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-accordion{margin-bottom:30px}}.govuk-accordion__section{padding-top:15px}.govuk-accordion__section-heading{margin-top:0;margin-bottom:0;padding-top:15px;padding-bottom:15px}.govuk-accordion__section-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;color:#0b0c0c;display:block;margin-bottom:0;padding-top:15px}@media print{.govuk-accordion__section-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-accordion__section-button{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-accordion__section-button{font-size:18pt;line-height:1.15}}@media print{.govuk-accordion__section-button{color:#000}}.govuk-accordion__section-content>:last-child{margin-bottom:0}.js-enabled .govuk-accordion{border-bottom:1px solid #b1b4b6}.js-enabled .govuk-accordion__section{padding-top:0}.js-enabled .govuk-accordion__section-content{display:none;padding-bottom:30px}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-content{padding-bottom:50px}}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-content{display:block}.js-enabled .govuk-accordion__show-all{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;position:relative;z-index:1;margin-bottom:9px;padding:5px 2px 5px 0;border-width:0;color:#1d70b8;background:none;cursor:pointer;-webkit-appearance:none}@media print{.js-enabled .govuk-accordion__show-all{font-family:sans-serif}}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__show-all{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__show-all{font-size:14pt;line-height:1.15}}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__show-all{margin-bottom:14px}}.js-enabled .govuk-accordion__show-all::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__show-all:hover{color:#0b0c0c;background:#f3f2f1;box-shadow:0 -2px #f3f2f1,0 4px #f3f2f1}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__show-all:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron{background:#0b0c0c}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-heading{padding:0}.js-enabled .govuk-accordion-nav__chevron{box-sizing:border-box;display:inline-block;position:relative;width:1.25rem;height:1.25rem;border:.0625rem solid;border-radius:50%;vertical-align:middle}.js-enabled .govuk-accordion-nav__chevron:after{content:"";box-sizing:border-box;display:block;position:absolute;bottom:.3125rem;left:.375rem;width:.375rem;height:.375rem;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-top:.125rem solid;border-right:.125rem solid}.js-enabled .govuk-accordion-nav__chevron--down{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.js-enabled .govuk-accordion__section-button{width:100%;padding:10px 0 0;border:0;border-top:1px solid #b1b4b6;border-bottom:10px solid transparent;color:#0b0c0c;background:none;text-align:left;cursor:pointer;-webkit-appearance:none}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-button{padding-bottom:10px}}.js-enabled .govuk-accordion__section-button:active{color:#0b0c0c;background:none}.js-enabled .govuk-accordion__section-button:hover{color:#0b0c0c;background:#f3f2f1}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__section-button:focus{outline:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-button::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-button{padding-bottom:20px;border-bottom:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:3px}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:2px}}.js-enabled .govuk-accordion__section-toggle,.js-enabled .govuk-accordion__section-heading-text,.js-enabled .govuk-accordion__section-summary{display:block;margin-bottom:13px}.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-toggle-focus{display:inline}.js-enabled .govuk-accordion__section-toggle{font-size:16px;font-size:1rem;line-height:1.25;font-weight:400;color:#1d70b8}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-toggle{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__section-toggle{font-size:14pt;line-height:1.15}}.js-enabled .govuk-accordion__show-all-text,.js-enabled .govuk-accordion__section-toggle-text{margin-left:5px;vertical-align:middle}@media screen and (forced-colors: active){.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{background-color:transparent}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{background:transparent;background-color:transparent}}@media (hover: none){.js-enabled .govuk-accordion__section-header:hover{border-top-color:#b1b4b6;box-shadow:inset 0 3px #1d70b8}.js-enabled .govuk-accordion__section-header:hover .govuk-accordion__section-button{border-top-color:#b1b4b6}}.govuk-back-link{font-size:14px;font-size:.875rem;line-height:1.1428571429;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px}@media (min-width: 40.0625em){.govuk-back-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2}}@media print{.govuk-back-link{font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:hover{color:#0b0c0cfc}.govuk-back-link:active,.govuk-back-link:focus{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus{color:#000}}.govuk-back-link:before{content:"";display:block;position:absolute;top:0;bottom:0;left:3px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-back-link:focus:before{border-color:#0b0c0c}.govuk-back-link:after{content:"";position:absolute;top:-14px;right:0;bottom:-14px;left:0}.govuk-breadcrumbs{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-breadcrumbs{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2}}@media print{.govuk-breadcrumbs{color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:0;bottom:0;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:hover{color:#0b0c0cfc}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#000}}@media (max-width: 40.0525em){.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item{display:none}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:first-child,.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:last-child{display:inline-block}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:before{top:6px;margin:0}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.govuk-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:0 0 22px;padding:8px 10px 7px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00703c;box-shadow:0 2px #002d18;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button{font-size:14pt;line-height:19px}}@media (min-width: 40.0625em){.govuk-button{margin-bottom:32px}}@media (min-width: 40.0625em){.govuk-button{width:auto}}.govuk-button:link,.govuk-button:visited,.govuk-button:active,.govuk-button:hover{color:#fff;text-decoration:none}.govuk-button::-moz-focus-inner{padding:0;border:0}.govuk-button:hover{background-color:#005a30}.govuk-button:active{top:2px}.govuk-button:focus{border-color:#fd0;outline:3px solid transparent;box-shadow:inset 0 0 0 1px #fd0}.govuk-button:focus:not(:active):not(:hover){border-color:#fd0;color:#0b0c0c;background-color:#fd0;box-shadow:0 2px #0b0c0c}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00703c;cursor:default}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;box-shadow:0 2px #002d18}.govuk-button--secondary{background-color:#f3f2f1;box-shadow:0 2px #929191}.govuk-button--secondary,.govuk-button--secondary:link,.govuk-button--secondary:visited,.govuk-button--secondary:active,.govuk-button--secondary:hover{color:#0b0c0c}.govuk-button--secondary:hover{background-color:#dbdad9}.govuk-button--secondary:hover[disabled]{background-color:#f3f2f1}.govuk-button--warning{background-color:#d4351c;box-shadow:0 2px #55150b}.govuk-button--warning,.govuk-button--warning:link,.govuk-button--warning:visited,.govuk-button--warning:active,.govuk-button--warning:hover{color:#fff}.govuk-button--warning:hover{background-color:#aa2a16}.govuk-button--warning:hover[disabled]{background-color:#d4351c}.govuk-button--start{font-weight:700;font-size:18px;font-size:1.125rem;line-height:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 40.0625em){.govuk-button--start{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}.govuk-button__start-icon{margin-left:5px;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;forced-color-adjust:auto}@media (min-width: 48.0625em){.govuk-button__start-icon{margin-left:10px}}.govuk-error-message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px;clear:both;color:#d4351c}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-message{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{min-width:0;margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}@supports not (caret-color: auto){.govuk-fieldset,x:-moz-any-link{display:table-cell}}.govuk-fieldset__legend{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;box-sizing:border-box;display:table;max-width:100%;margin-bottom:10px;padding:0;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15}}@media print{.govuk-fieldset__legend{color:#000}}.govuk-fieldset__legend--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:15px;color:#505a5f}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-hint{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend+.govuk-hint{margin-top:-5px}.govuk-label{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label{font-size:14pt;line-height:1.15}}@media print{.govuk-label{color:#000}}.govuk-label--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-checkboxes__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__label:after{content:"";box-sizing:border-box;position:absolute;top:11px;left:9px;width:23px;height:12px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__hint{display:block;padding-right:15px;padding-left:15px}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 3px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{outline-color:Highlight}}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-checkboxes__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-checkboxes__divider{color:#000}}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.js-enabled .govuk-checkboxes__conditional--hidden{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-checkboxes--small .govuk-checkboxes__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-checkboxes--small .govuk-checkboxes__item:after{content:"";display:block;clear:both}.govuk-checkboxes--small .govuk-checkboxes__input{left:-10px}.govuk-checkboxes--small .govuk-checkboxes__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-checkboxes--small .govuk-checkboxes__label{padding:11px 15px 10px 1px}}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:8px;width:24px;height:24px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:15px;left:6px;width:12px;height:6.5px;border-width:0 0 3px 3px}.govuk-checkboxes--small .govuk-checkboxes__hint{padding:0;clear:both}.govuk-checkboxes--small .govuk-checkboxes__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:initial}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0}}.govuk-textarea{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:block;width:100%;min-height:40px;margin-bottom:20px;padding:5px;resize:vertical;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-textarea{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}@media (min-width: 40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-textarea--error{border-color:#d4351c}.govuk-textarea--error:focus{border-color:#0b0c0c}.govuk-character-count{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-character-count{margin-bottom:30px}}.govuk-character-count .govuk-form-group,.govuk-character-count .govuk-textarea{margin-bottom:5px}.govuk-character-count__message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400;margin-top:0;margin-bottom:0}@media print{.govuk-character-count__message{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-character-count__message{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-character-count__message--disabled{visibility:hidden}.govuk-cookie-banner{padding-top:20px;border-bottom:10px solid transparent;background-color:#f3f2f1}.govuk-cookie-banner[hidden]{display:none}.govuk-cookie-banner__message{margin-bottom:-10px}.govuk-cookie-banner__message[hidden]{display:none}.govuk-cookie-banner__message:focus{outline:none}.govuk-summary-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin:0 0 20px}@media print{.govuk-summary-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-summary-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-summary-list{font-size:14pt;line-height:1.15}}@media print{.govuk-summary-list{color:#000}}@media (min-width: 40.0625em){.govuk-summary-list{display:table;width:100%;table-layout:fixed;border-collapse:collapse}}@media (min-width: 40.0625em){.govuk-summary-list{margin-bottom:30px}}.govuk-summary-list__row{border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-summary-list__row{margin-bottom:15px}}@media (min-width: 40.0625em){.govuk-summary-list__row{display:table-row}}@media (min-width: 40.0625em){.govuk-summary-list__row--no-actions:after{content:"";display:table-cell;width:20%}}.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{margin:0}@media (min-width: 40.0625em){.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{display:table-cell;padding-top:10px;padding-right:20px;padding-bottom:10px}}.govuk-summary-list__actions{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-summary-list__actions{width:20%;padding-right:0;text-align:right}}.govuk-summary-list__key,.govuk-summary-list__value{word-wrap:break-word;overflow-wrap:break-word}.govuk-summary-list__key{margin-bottom:5px;font-weight:700}@media (min-width: 40.0625em){.govuk-summary-list__key{width:30%}}@media (max-width: 40.0525em){.govuk-summary-list__value{margin-bottom:15px}}.govuk-summary-list__value>p{margin-bottom:10px}.govuk-summary-list__value>:last-child{margin-bottom:0}.govuk-summary-list__actions-list{width:100%;margin:0;padding:0}.govuk-summary-list__actions-list-item{display:inline;margin-right:10px;padding-right:10px}.govuk-summary-list__actions-list-item:not(:last-child){border-right:1px solid #b1b4b6}.govuk-summary-list__actions-list-item:last-child{margin-right:0;padding-right:0;border:0}.govuk-summary-list--no-border .govuk-summary-list__row{border:0}@media (min-width: 40.0625em){.govuk-summary-list--no-border .govuk-summary-list__key,.govuk-summary-list--no-border .govuk-summary-list__value,.govuk-summary-list--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-summary-list__row--no-border{border:0}@media (min-width: 40.0625em){.govuk-summary-list__row--no-border .govuk-summary-list__key,.govuk-summary-list__row--no-border .govuk-summary-list__value,.govuk-summary-list__row--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-input{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;width:100%;height:40px;height:2.5rem;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-input::-webkit-outer-spin-button,.govuk-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border-color:#d4351c}.govuk-input--error:focus{border-color:#0b0c0c}.govuk-input--width-30{max-width:59ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-input--width-5{max-width:10.8ex}.govuk-input--width-4{max-width:9ex}.govuk-input--width-3{max-width:7.2ex}.govuk-input--width-2{max-width:5.4ex}.govuk-input__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.govuk-input__wrapper .govuk-input{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.govuk-input__wrapper .govuk-input:focus{z-index:1}@media (max-width: 19.99em){.govuk-input__wrapper{display:block}.govuk-input__wrapper .govuk-input{max-width:100%}}.govuk-input__prefix,.govuk-input__suffix{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:inline-block;min-width:40px;min-width:2.5rem;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;background-color:#f3f2f1;text-align:center;white-space:nowrap;cursor:default;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media print{.govuk-input__prefix,.govuk-input__suffix{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input__prefix,.govuk-input__suffix{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input__prefix,.govuk-input__suffix{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-input__prefix,.govuk-input__suffix{line-height:1.6}}@media (max-width: 19.99em){.govuk-input__prefix,.govuk-input__suffix{display:block;height:100%;white-space:normal}}@media (max-width: 19.99em){.govuk-input__prefix{border-bottom:0}}@media (min-width: 20em){.govuk-input__prefix{border-right:0}}@media (max-width: 19.99em){.govuk-input__suffix{border-top:0}}@media (min-width: 20em){.govuk-input__suffix{border-left:0}}.govuk-date-input{font-size:0}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{display:inline-block;margin-right:20px;margin-bottom:0}.govuk-date-input__label{display:block}.govuk-date-input__input{margin-bottom:0}.govuk-details{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-details{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-details{font-size:14pt;line-height:1.15}}@media print{.govuk-details{color:#000}}@media (min-width: 40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#1d70b8;cursor:pointer}.govuk-details__summary:hover{color:#003078}.govuk-details__summary:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:focus .govuk-details__summary-text{text-decoration:none}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:-1px;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,100% 50%,0% 100%);clip-path:polygon(0% 0%,100% 50%,0% 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:12.124px 7px 0 7px;border-top-color:inherit}.govuk-details__text{padding-top:15px;padding-bottom:15px;padding-left:20px;border-left:5px solid #b1b4b6}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text>:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:5px solid #d4351c}@media print{.govuk-error-summary{color:#000}}@media (min-width: 40.0625em){.govuk-error-summary{padding:20px}}@media (min-width: 40.0625em){.govuk-error-summary{margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffdd00}.govuk-error-summary__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__title{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__body{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-error-summary__list a{font-family:sans-serif}}.govuk-error-summary__list a:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#d4351c}.govuk-error-summary__list a:hover{color:#942514}.govuk-error-summary__list a:active{color:#d4351c}.govuk-error-summary__list a:focus{color:#0b0c0c}.govuk-file-upload{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;max-width:100%;margin-left:-5px;padding:5px}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-file-upload{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15}}@media print{.govuk-file-upload{color:#000}}.govuk-file-upload::-webkit-file-upload-button{-webkit-appearance:button;color:inherit;font:inherit}.govuk-file-upload:focus{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-file-upload:focus-within{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-footer{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;padding-top:25px;padding-bottom:15px;border-top:1px solid #b1b4b6;color:#0b0c0c;background:#f3f2f1}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-footer{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-footer{padding-top:40px}}@media (min-width: 40.0625em){.govuk-footer{padding-bottom:25px}}.govuk-footer__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-footer__link{font-family:sans-serif}}.govuk-footer__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-footer__link:link,.govuk-footer__link:visited{color:#0b0c0c}@media print{.govuk-footer__link:link,.govuk-footer__link:visited{color:#000}}.govuk-footer__link:hover{color:#0b0c0cfc}.govuk-footer__link:active,.govuk-footer__link:focus{color:#0b0c0c}@media print{.govuk-footer__link:active,.govuk-footer__link:focus{color:#000}}.govuk-footer__section-break{margin:0 0 30px;border:0;border-bottom:1px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}@media (max-width: 40.0525em){.govuk-footer__meta-item--grow{-webkit-flex-basis:320px;-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top;forced-color-adjust:auto}@media (max-width: 48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0%;background-size:125px 102px;text-align:center;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__meta-custom{margin-bottom:20px}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{margin-right:-15px;margin-left:-15px}.govuk-footer__navigation:after{content:"";display:block;clear:both}.govuk-footer__section{display:inline-block;margin-bottom:30px;vertical-align:top}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list .govuk-footer__link:hover{text-decoration-thickness:auto}@media (min-width: 48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;border-bottom:10px solid #ffffff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header__container--full-width{padding:0 15px;border-color:#1d70b8}.govuk-header__container--full-width .govuk-header__menu-button{right:15px}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #1d70b8}.govuk-header__container:after{content:"";display:block;clear:both}.govuk-header__logotype{display:inline-block;margin-right:5px}@media (forced-colors: active){.govuk-header__logotype{forced-color-adjust:none;color:linktext}}.govuk-header__logotype:last-child{margin-right:0}.govuk-header__logotype-crown{position:relative;top:-1px;margin-right:1px;fill:currentColor;vertical-align:top}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:bottom}.govuk-header__product-name{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1;display:inline-table}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__product-name{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1}}.govuk-header__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none}@media print{.govuk-header__link{font-family:sans-serif}}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover,.govuk-header__link:active{color:#fffffffc}.govuk-header__link:focus{color:#0b0c0c}.govuk-header__link:hover{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.1em}.govuk-header__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__link--homepage{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;margin-right:10px;font-size:30px;line-height:1}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{text-decoration:none}.govuk-header__link--homepage:hover,.govuk-header__link--homepage:active{margin-bottom:-3px;border-bottom:3px solid}.govuk-header__link--homepage:focus{margin-bottom:0;border-bottom:0}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__link--service-name{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo,.govuk-header__content{box-sizing:border-box}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width: 40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width: 48.0625em){.govuk-header__logo{width:33.33%;padding-right:15px;float:left;vertical-align:top}}@media (min-width: 48.0625em){.govuk-header__content{width:66.66%;padding-left:15px;float:left}}.govuk-header__menu-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;cursor:pointer}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__menu-button{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{-webkit-text-decoration:solid underline 3px;text-decoration:solid underline 3px;text-underline-offset:.1em}.govuk-header__menu-button:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:8.66px 5px 0 5px;border-top-color:inherit;content:"";margin-left:5px}@media (min-width: 40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0%,0% 100%,100% 100%);clip-path:polygon(50% 0%,0% 100%,100% 100%);border-width:0 5px 8.66px 5px;border-bottom-color:inherit}@media (min-width: 48.0625em){.govuk-header__navigation{margin-bottom:10px}}.govuk-header__navigation-list{margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button{display:block}@media (min-width: 48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation-list{display:none}@media (min-width: 48.0625em){.js-enabled .govuk-header__navigation-list{display:block}}.js-enabled .govuk-header__navigation-list--open{display:block}@media (min-width: 48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width: 48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1.1428571429;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__navigation-item a{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item--active a:focus{color:#0b0c0c}.govuk-header__navigation-item:last-child{margin-right:0;border-bottom:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-inset-text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #b1b4b6}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-inset-text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15}}@media print{.govuk-inset-text{color:#000}}@media (min-width: 40.0625em){.govuk-inset-text{margin-top:30px}}@media (min-width: 40.0625em){.govuk-inset-text{margin-bottom:30px}}.govuk-inset-text>:first-child{margin-top:0}.govuk-inset-text>:only-child,.govuk-inset-text>:last-child{margin-bottom:0}.govuk-notification-banner{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:30px;border:5px solid #1d70b8;background-color:#1d70b8}@media print{.govuk-notification-banner{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-notification-banner{margin-bottom:50px}}.govuk-notification-banner:focus{outline:3px solid #ffdd00}.govuk-notification-banner__header{padding:2px 15px 5px;border-bottom:1px solid transparent}@media (min-width: 40.0625em){.govuk-notification-banner__header{padding:2px 20px 5px}}.govuk-notification-banner__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;margin:0;padding:0;color:#fff}@media print{.govuk-notification-banner__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner__title{font-size:14pt;line-height:1.15}}.govuk-notification-banner__content{color:#0b0c0c;padding:15px;background-color:#fff}@media print{.govuk-notification-banner__content{color:#000}}@media (min-width: 40.0625em){.govuk-notification-banner__content{padding:20px}}.govuk-notification-banner__content>*{box-sizing:border-box;max-width:605px}.govuk-notification-banner__content>:last-child{margin-bottom:0}.govuk-notification-banner__heading{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin:0 0 15px;padding:0}@media print{.govuk-notification-banner__heading{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__heading{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-notification-banner__heading{font-size:18pt;line-height:1.15}}.govuk-notification-banner__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-notification-banner__link{font-family:sans-serif}}.govuk-notification-banner__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-notification-banner__link:link,.govuk-notification-banner__link:visited{color:#1d70b8}.govuk-notification-banner__link:hover{color:#003078}.govuk-notification-banner__link:active{color:#0b0c0c}.govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-notification-banner--success{border-color:#00703c;background-color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:link,.govuk-notification-banner--success .govuk-notification-banner__link:visited{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:hover{color:#004e2a}.govuk-notification-banner--success .govuk-notification-banner__link:active{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-panel{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-panel{padding:10px;overflow-wrap:break-word;word-wrap:break-word}}.govuk-panel--confirmation{color:#fff;background:#00703c}@media print{.govuk-panel--confirmation{border-color:currentColor;color:#000;background:none}}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__title{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__title:last-child{margin-bottom:0}.govuk-panel__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;font-size:1.5rem;line-height:1.0416666667}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__body{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{display:inline-block;outline:2px solid transparent;outline-offset:-2px;color:#fff;background-color:#1d70b8;letter-spacing:1px;text-decoration:none;text-transform:uppercase;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;padding:5px 8px 4px}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}.govuk-tag--grey{color:#383f43;background:#eeefef}.govuk-tag--purple{color:#3d2375;background:#dbd5e9}.govuk-tag--turquoise{color:#10403c;background:#bfe3e0}.govuk-tag--blue{color:#144e81;background:#d2e2f1}.govuk-tag--yellow{color:#594d00;background:#fff7bf}.govuk-tag--orange{color:#6e3619;background:#fcd6c3}.govuk-tag--red{color:#942514;background:#f6d7d2}.govuk-tag--pink{color:#80224d;background:#f7d7e6}.govuk-tag--green{color:#005a30;background:#cce2d8}.govuk-phase-banner{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #b1b4b6}.govuk-phase-banner__content{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;display:table;margin:0}@media print{.govuk-phase-banner__content{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-phase-banner__content{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-phase-banner__content{font-size:14pt;line-height:1.2}}@media print{.govuk-phase-banner__content{color:#000}}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:middle}.govuk-tabs{margin-top:5px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-tabs{margin-top:5px}}@media (min-width: 40.0625em){.govuk-tabs{margin-bottom:30px}}.govuk-tabs__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:10px}@media print{.govuk-tabs__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__title{font-size:14pt;line-height:1.15}}@media print{.govuk-tabs__title{color:#000}}.govuk-tabs__list{margin:0 0 20px;padding:0;list-style:none}@media (min-width: 40.0625em){.govuk-tabs__list{margin-bottom:30px}}.govuk-tabs__list-item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-left:25px}@media print{.govuk-tabs__list-item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__list-item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__list-item{font-size:14pt;line-height:1.15}}.govuk-tabs__list-item:before{color:#0b0c0c;content:"\\2014";margin-left:-25px;padding-right:5px}@media print{.govuk-tabs__list-item:before{color:#000}}.govuk-tabs__tab{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;margin-bottom:10px}@media print{.govuk-tabs__tab{font-family:sans-serif}}.govuk-tabs__tab:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-tabs__tab:link{color:#1d70b8}.govuk-tabs__tab:visited{color:#4c2c92}.govuk-tabs__tab:hover{color:#003078}.govuk-tabs__tab:active{color:#0b0c0c}.govuk-tabs__tab:focus{color:#0b0c0c}.govuk-tabs__panel{margin-bottom:30px}@media (min-width: 40.0625em){.govuk-tabs__panel{margin-bottom:50px}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__list{margin-bottom:0;border-bottom:1px solid #b1b4b6}.js-enabled .govuk-tabs__list:after{content:"";display:block;clear:both}.js-enabled .govuk-tabs__title{display:none}.js-enabled .govuk-tabs__list-item{position:relative;margin-right:5px;margin-bottom:0;margin-left:0;padding:10px 20px;float:left;background-color:#f3f2f1;text-align:center}.js-enabled .govuk-tabs__list-item:before{content:none}.js-enabled .govuk-tabs__list-item--selected{position:relative;margin-top:-5px;margin-bottom:-1px;padding:14px 19px 16px;border:1px solid #b1b4b6;border-bottom:0;background-color:#fff}.js-enabled .govuk-tabs__list-item--selected .govuk-tabs__tab{text-decoration:none}.js-enabled .govuk-tabs__tab{margin-bottom:0}.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:hover{color:#0b0c0cfc}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0;padding:30px 20px;border:1px solid #b1b4b6;border-top:0}}@media (min-width: 40.0625em) and (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel>:last-child{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel--hidden{display:none}}.govuk-radios__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-radios__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__hint{display:block;padding-right:15px;padding-left:15px}.govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 4px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-radios__input:focus+.govuk-radios__label:before{outline-color:Highlight}}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width: 40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-radios__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-radios__divider{color:#000}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.js-enabled .govuk-radios__conditional--hidden{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-radios--small .govuk-radios__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-radios--small .govuk-radios__item:after{content:"";display:block;clear:both}.govuk-radios--small .govuk-radios__input{left:-10px}.govuk-radios--small .govuk-radios__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-radios--small .govuk-radios__label{padding:11px 15px 10px 1px}}.govuk-radios--small .govuk-radios__label:before{top:8px;width:24px;height:24px}.govuk-radios--small .govuk-radios__label:after{top:15px;left:7px;border-width:5px}.govuk-radios--small .govuk-radios__hint{padding:0;clear:both;pointer-events:none}.govuk-radios--small .govuk-radios__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-radios--small .govuk-radios__divider{width:24px;margin-bottom:5px}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:initial}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0}}.govuk-select{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;max-width:100%;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;color:#0b0c0c;background-color:#fff}@media print{.govuk-select{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-select{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-select option:active,.govuk-select option:checked,.govuk-select:focus::-ms-value{color:#fff;background-color:#1d70b8}.govuk-select--error{border-color:#d4351c}.govuk-select--error:focus{border-color:#0b0c0c}.govuk-skip-link{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:hover{color:#0b0c0cfc}.govuk-skip-link:active,.govuk-skip-link:focus{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus{color:#000}}@media (min-width: 40.0625em){.govuk-skip-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}@supports (padding: max(0px)){.govuk-skip-link{padding-right:max(15px,calc(15px + env(safe-area-inset-right)));padding-left:max(15px,calc(15px + env(safe-area-inset-left)))}}.govuk-skip-link:focus{outline:3px solid #ffdd00;outline-offset:0;background-color:#fd0}.govuk-skip-link-focused-element:focus{outline:none}.govuk-table{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table{font-size:14pt;line-height:1.15}}@media print{.govuk-table{color:#000}}@media (min-width: 40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__header,.govuk-table__cell{padding:10px 20px 10px 0;border-bottom:1px solid #b1b4b6;text-align:left;vertical-align:top}.govuk-table__cell--numeric{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-table__cell--numeric{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-table__header--numeric,.govuk-table__cell--numeric{text-align:right}.govuk-table__header:last-child,.govuk-table__cell:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-table__caption--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-table__caption--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-table__caption--xl{font-size:32pt;line-height:1.15}}.govuk-table__caption--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-table__caption--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-table__caption--l{font-size:24pt;line-height:1.05}}.govuk-table__caption--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-table__caption--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-table__caption--m{font-size:18pt;line-height:1.15}}.govuk-table__caption--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-table__caption--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table__caption--s{font-size:14pt;line-height:1.15}}.govuk-warning-text{position:relative;margin-bottom:20px;padding:10px 0}@media (min-width: 40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-warning-text__icon{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;box-sizing:border-box;display:inline-block;position:absolute;left:0;min-width:35px;min-height:35px;margin-top:-7px;border:3px solid #0b0c0c;border-radius:50%;color:#fff;background:#0b0c0c;font-size:30px;line-height:29px;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;forced-color-adjust:none}@media print{.govuk-warning-text__icon{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__icon{margin-top:-5px}}@media screen and (forced-colors: active){.govuk-warning-text__icon{border-color:windowText;color:windowText;background:transparent}}.govuk-warning-text__text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;padding-left:45px}@media print{.govuk-warning-text__text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-warning-text__text{font-size:14pt;line-height:1.15}}@media print{.govuk-warning-text__text{color:#000}}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-visually-hidden-focusable{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important}.govuk-visually-hidden-focusable:active,.govuk-visually-hidden-focusable:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}.govuk-\\!-display-inline{display:inline!important}.govuk-\\!-display-inline-block{display:inline-block!important}.govuk-\\!-display-block{display:block!important}.govuk-\\!-display-none{display:none!important}@media print{.govuk-\\!-display-none-print{display:none!important}}.govuk-\\!-margin-0{margin:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-0{margin:0!important}}.govuk-\\!-margin-top-0{margin-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-0{margin-top:0!important}}.govuk-\\!-margin-right-0{margin-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-0{margin-right:0!important}}.govuk-\\!-margin-bottom-0{margin-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\\!-margin-left-0{margin-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-0{margin-left:0!important}}.govuk-\\!-margin-1{margin:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-1{margin:5px!important}}.govuk-\\!-margin-top-1{margin-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-1{margin-top:5px!important}}.govuk-\\!-margin-right-1{margin-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-1{margin-right:5px!important}}.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\\!-margin-left-1{margin-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-1{margin-left:5px!important}}.govuk-\\!-margin-2{margin:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-2{margin:10px!important}}.govuk-\\!-margin-top-2{margin-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-2{margin-top:10px!important}}.govuk-\\!-margin-right-2{margin-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-2{margin-right:10px!important}}.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\\!-margin-left-2{margin-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-2{margin-left:10px!important}}.govuk-\\!-margin-3{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-3{margin:15px!important}}.govuk-\\!-margin-top-3{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-3{margin-top:15px!important}}.govuk-\\!-margin-right-3{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-3{margin-right:15px!important}}.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\\!-margin-left-3{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-3{margin-left:15px!important}}.govuk-\\!-margin-4{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-4{margin:20px!important}}.govuk-\\!-margin-top-4{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-4{margin-top:20px!important}}.govuk-\\!-margin-right-4{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-4{margin-right:20px!important}}.govuk-\\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\\!-margin-left-4{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-4{margin-left:20px!important}}.govuk-\\!-margin-5{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-5{margin:25px!important}}.govuk-\\!-margin-top-5{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-5{margin-top:25px!important}}.govuk-\\!-margin-right-5{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-5{margin-right:25px!important}}.govuk-\\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\\!-margin-left-5{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-5{margin-left:25px!important}}.govuk-\\!-margin-6{margin:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-6{margin:30px!important}}.govuk-\\!-margin-top-6{margin-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-6{margin-top:30px!important}}.govuk-\\!-margin-right-6{margin-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-6{margin-right:30px!important}}.govuk-\\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\\!-margin-left-6{margin-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-6{margin-left:30px!important}}.govuk-\\!-margin-7{margin:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-7{margin:40px!important}}.govuk-\\!-margin-top-7{margin-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-7{margin-top:40px!important}}.govuk-\\!-margin-right-7{margin-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-7{margin-right:40px!important}}.govuk-\\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\\!-margin-left-7{margin-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-7{margin-left:40px!important}}.govuk-\\!-margin-8{margin:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-8{margin:50px!important}}.govuk-\\!-margin-top-8{margin-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-8{margin-top:50px!important}}.govuk-\\!-margin-right-8{margin-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-8{margin-right:50px!important}}.govuk-\\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\\!-margin-left-8{margin-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-8{margin-left:50px!important}}.govuk-\\!-margin-9{margin:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-9{margin:60px!important}}.govuk-\\!-margin-top-9{margin-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-9{margin-top:60px!important}}.govuk-\\!-margin-right-9{margin-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-9{margin-right:60px!important}}.govuk-\\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\\!-margin-left-9{margin-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-9{margin-left:60px!important}}.govuk-\\!-padding-0{padding:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-0{padding:0!important}}.govuk-\\!-padding-top-0{padding-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-0{padding-top:0!important}}.govuk-\\!-padding-right-0{padding-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-0{padding-right:0!important}}.govuk-\\!-padding-bottom-0{padding-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\\!-padding-left-0{padding-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-0{padding-left:0!important}}.govuk-\\!-padding-1{padding:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-1{padding:5px!important}}.govuk-\\!-padding-top-1{padding-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-1{padding-top:5px!important}}.govuk-\\!-padding-right-1{padding-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-1{padding-right:5px!important}}.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\\!-padding-left-1{padding-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-1{padding-left:5px!important}}.govuk-\\!-padding-2{padding:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-2{padding:10px!important}}.govuk-\\!-padding-top-2{padding-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-2{padding-top:10px!important}}.govuk-\\!-padding-right-2{padding-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-2{padding-right:10px!important}}.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\\!-padding-left-2{padding-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-2{padding-left:10px!important}}.govuk-\\!-padding-3{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-3{padding:15px!important}}.govuk-\\!-padding-top-3{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-3{padding-top:15px!important}}.govuk-\\!-padding-right-3{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-3{padding-right:15px!important}}.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\\!-padding-left-3{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-3{padding-left:15px!important}}.govuk-\\!-padding-4{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-4{padding:20px!important}}.govuk-\\!-padding-top-4{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-4{padding-top:20px!important}}.govuk-\\!-padding-right-4{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-4{padding-right:20px!important}}.govuk-\\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\\!-padding-left-4{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-4{padding-left:20px!important}}.govuk-\\!-padding-5{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-5{padding:25px!important}}.govuk-\\!-padding-top-5{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-5{padding-top:25px!important}}.govuk-\\!-padding-right-5{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-5{padding-right:25px!important}}.govuk-\\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\\!-padding-left-5{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-5{padding-left:25px!important}}.govuk-\\!-padding-6{padding:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-6{padding:30px!important}}.govuk-\\!-padding-top-6{padding-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-6{padding-top:30px!important}}.govuk-\\!-padding-right-6{padding-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-6{padding-right:30px!important}}.govuk-\\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\\!-padding-left-6{padding-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-6{padding-left:30px!important}}.govuk-\\!-padding-7{padding:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-7{padding:40px!important}}.govuk-\\!-padding-top-7{padding-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-7{padding-top:40px!important}}.govuk-\\!-padding-right-7{padding-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-7{padding-right:40px!important}}.govuk-\\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\\!-padding-left-7{padding-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-7{padding-left:40px!important}}.govuk-\\!-padding-8{padding:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-8{padding:50px!important}}.govuk-\\!-padding-top-8{padding-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-8{padding-top:50px!important}}.govuk-\\!-padding-right-8{padding-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-8{padding-right:50px!important}}.govuk-\\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\\!-padding-left-8{padding-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-8{padding-left:50px!important}}.govuk-\\!-padding-9{padding:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-9{padding:60px!important}}.govuk-\\!-padding-top-9{padding-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-9{padding-top:60px!important}}.govuk-\\!-padding-right-9{padding-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-9{padding-right:60px!important}}.govuk-\\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\\!-padding-left-9{padding-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-9{padding-left:60px!important}}.govuk-\\!-text-align-left{text-align:left!important}.govuk-\\!-text-align-centre{text-align:center!important}.govuk-\\!-text-align-right{text-align:right!important}.govuk-\\!-font-size-80{font-size:53px!important;font-size:3.3125rem!important;line-height:1.0377358491!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-80{font-size:80px!important;font-size:5rem!important;line-height:1!important}}@media print{.govuk-\\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\\!-font-size-48{font-size:32px!important;font-size:2rem!important;line-height:1.09375!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-48{font-size:48px!important;font-size:3rem!important;line-height:1.0416666667!important}}@media print{.govuk-\\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\\!-font-size-36{font-size:24px!important;font-size:1.5rem!important;line-height:1.0416666667!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-36{font-size:36px!important;font-size:2.25rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\\!-font-size-27{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-27{font-size:27px!important;font-size:1.6875rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-24{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-24{font-size:24px!important;font-size:1.5rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-19{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-19{font-size:19px!important;font-size:1.1875rem!important;line-height:1.3157894737!important}}@media print{.govuk-\\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\\!-font-size-16{font-size:14px!important;font-size:.875rem!important;line-height:1.1428571429!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-16{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\\!-font-size-14{font-size:12px!important;font-size:.75rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-14{font-size:14px!important;font-size:.875rem!important;line-height:1.4285714286!important}}@media print{.govuk-\\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\\!-font-weight-regular{font-weight:400!important}.govuk-\\!-font-weight-bold{font-weight:700!important}.govuk-\\!-width-full,.govuk-\\!-width-three-quarters{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-three-quarters{width:75%!important}}.govuk-\\!-width-two-thirds{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-two-thirds{width:66.66%!important}}.govuk-\\!-width-one-half{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-half{width:50%!important}}.govuk-\\!-width-one-third{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-third{width:33.33%!important}}.govuk-\\!-width-one-quarter{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-quarter{width:25%!important}}:host .govuk-label,:host .govuk-hint,:host .govuk-error-message{font-family:var(--postcode__font-family, "GDS Transport", arial, sans-serif);font-size:var(--postcode__font-size, 19px)}:host .govuk-input{font-family:var(--postcode__font-family, "GDS Transport", arial, sans-serif);font-size:var(--postcode__input__font-size, 19px);height:var(--postcode__input__height, 35px);padding:var(--postcode__input__padding, 5px 34px 5px 5px)}
|
110
|
-
`;var mp=Object.freeze,pp=Object.defineProperty,
|
109
|
+
`])),this._getErrorMessageContainer(i),this._getAutocomplete(i))}},j.AddressAutocomplete.styles=Es(iE),We([J({type:String})],j.AddressAutocomplete.prototype,"id",2),We([J({type:String})],j.AddressAutocomplete.prototype,"postcode",2),We([J({type:String})],j.AddressAutocomplete.prototype,"label",2),We([J({type:String})],j.AddressAutocomplete.prototype,"initialAddress",2),We([J({type:String})],j.AddressAutocomplete.prototype,"osPlacesApiKey",2),We([J({type:String})],j.AddressAutocomplete.prototype,"arrowStyle",2),We([J({type:String})],j.AddressAutocomplete.prototype,"labelStyle",2),We([Wi()],j.AddressAutocomplete.prototype,"_totalAddresses",2),We([Wi()],j.AddressAutocomplete.prototype,"_addressesInPostcode",2),We([Wi()],j.AddressAutocomplete.prototype,"_options",2),We([Wi()],j.AddressAutocomplete.prototype,"_selectedAddress",2),We([Wi()],j.AddressAutocomplete.prototype,"_osError",2),j.AddressAutocomplete=We([vl("address-autocomplete")],j.AddressAutocomplete);var sd=globalThis&&globalThis.__assign||function(){return sd=Object.assign||function(i){for(var t,e=1,n=arguments.length;e<n;e++){t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o])}return i},sd.apply(this,arguments)},cp=/^([a-z]{1,2}\d)([a-z])$/i,rE=/[a-z]{2}$/i,gp=/\d[a-z]{2}$/i,sE=/^[a-z]{1,2}\d[a-z\d]?\s*\d[a-z]{2}$/i,aE=/^[a-z]{1,2}/i,lE={valid:!1,postcode:null,incode:null,outcode:null,area:null,district:null,subDistrict:null,sector:null,unit:null},ad=function(i){return i===null?null:i[0]},hE=/\s+/gi,fp=function(i){return i.replace(hE,"").toUpperCase()},ld=function(i,t){return fp(i).match(t)},vs=function(i){return i.match(sE)!==null},hd=function(i){var t=_s(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e},_s=function(i){return vs(i)?fp(i).replace(gp,""):null},ud=function(i){if(!vs(i))return null;var t=ld(i,gp);return ad(t)},uE=function(i){if(!vs(i))return null;var t=ld(i,aE);return ad(t)},dE=function(i){var t=_s(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e[0]},cE=function(i){if(!vs(i))return null;var t=ld(i,rE);return ad(t)},gE=function(i){var t=_s(i);if(t===null)return null;var e=t.match(cp);return e===null?t:e[1]},fE=function(i){var t=_s(i);if(t===null)return null;var e=t.match(cp);return e===null?null:t},mE=function(i){return vs(i)?{valid:!0,postcode:hd(i),incode:ud(i),outcode:_s(i),area:uE(i),district:gE(i),subDistrict:fE(i),sector:dE(i),unit:cE(i)}:sd({},lE)};const pE=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:GDS Transport;font-style:normal;font-weight:400;src:url(/assets/fonts/light-94a07e06a1-v2.woff2) format("woff2"),url(/assets/fonts/light-f591b13f7d-v2.woff) format("woff");font-display:fallback}@font-face{font-family:GDS Transport;font-style:normal;font-weight:700;src:url(/assets/fonts/bold-b542beb274-v2.woff2) format("woff2"),url(/assets/fonts/bold-affa96571d-v2.woff) format("woff");font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-link:link{color:#1d70b8}.govuk-link:visited{color:#4c2c92}.govuk-link:hover{color:#003078}.govuk-link:active{color:#0b0c0c}.govuk-link:focus{color:#0b0c0c}@media print{[href^="/"].govuk-link:after,[href^="http://"].govuk-link:after,[href^="https://"].govuk-link:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:link,.govuk-link--muted:visited{color:#505a5f}.govuk-link--muted:hover,.govuk-link--muted:active{color:#0b0c0c}.govuk-link--muted:focus{color:#0b0c0c}.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:hover{color:#0b0c0cfc}.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#000}}.govuk-link--inverse:link,.govuk-link--inverse:visited{color:#fff}.govuk-link--inverse:hover,.govuk-link--inverse:active{color:#fffffffc}.govuk-link--inverse:focus{color:#0b0c0c}.govuk-link--no-underline:not(:hover):not(:active){text-decoration:none}.govuk-link--no-visited-state:link,.govuk-link--no-visited-state:visited{color:#1d70b8}.govuk-link--no-visited-state:hover{color:#003078}.govuk-link--no-visited-state:active{color:#0b0c0c}.govuk-link--no-visited-state:focus{color:#0b0c0c}.govuk-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-list{font-size:14pt;line-height:1.15}}@media print{.govuk-list{color:#000}}@media (min-width: 40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:0}@media (min-width: 40.0625em){.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:5px}}.govuk-list--spaced>li{margin-bottom:10px}@media (min-width: 40.0625em){.govuk-list--spaced>li{margin-bottom:15px}}.govuk-heading-xl{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000}}@media print{.govuk-heading-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000}}@media print{.govuk-heading-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width: 40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000}}@media print{.govuk-heading-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000}}@media print{.govuk-heading-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-xl{font-size:27px;font-size:1.6875rem;line-height:1.1111111111}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;color:#505a5f}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-lead,.govuk-body-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:20px}@media print{.govuk-body-lead,.govuk-body-l{color:#000}}@media print{.govuk-body-lead,.govuk-body-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-body-lead,.govuk-body-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000}}@media print{.govuk-body,.govuk-body-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000}}@media print{.govuk-body-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-s{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;font-size:.75rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000}}@media print{.govuk-body-xs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-xs{font-size:14px;font-size:.875rem;line-height:1.4285714286}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-top:50px}}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-section-break--l{margin-top:30px}}@media (min-width: 40.0625em){.govuk-section-break--l{margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-section-break--m{margin-top:20px}}@media (min-width: 40.0625em){.govuk-section-break--m{margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #b1b4b6}.govuk-button-group{margin-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media (min-width: 40.0625em){.govuk-button-group{margin-bottom:15px}}.govuk-button-group .govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;display:inline-block;max-width:100%;margin-top:5px;margin-bottom:20px;text-align:center}@media print{.govuk-button-group .govuk-link{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button-group .govuk-link{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button-group .govuk-link{font-size:14pt;line-height:19px}}.govuk-button-group .govuk-button{margin-bottom:17px}@media (min-width: 40.0625em){.govuk-button-group{margin-right:-15px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.govuk-button-group .govuk-button,.govuk-button-group .govuk-link{margin-right:15px}.govuk-button-group .govuk-link{text-align:left}}.govuk-form-group{margin-bottom:20px}.govuk-form-group:after{content:"";display:block;clear:both}@media (min-width: 40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #d4351c}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-grid-column-one-quarter-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-quarter-from-desktop{width:25%;float:left}}.govuk-grid-column-one-third-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-third-from-desktop{width:33.3333%;float:left}}.govuk-grid-column-one-half-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-half-from-desktop{width:50%;float:left}}.govuk-grid-column-two-thirds-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-two-thirds-from-desktop{width:66.6666%;float:left}}.govuk-grid-column-three-quarters-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-three-quarters-from-desktop{width:75%;float:left}}.govuk-grid-column-full-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-full-from-desktop{width:100%;float:left}}.govuk-main-wrapper{display:block;padding-top:20px;padding-bottom:20px}@media (min-width: 40.0625em){.govuk-main-wrapper{padding-top:40px;padding-bottom:40px}}.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:30px}@media (min-width: 40.0625em){.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:50px}}.govuk-template{background-color:#f3f2f1;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}@media screen{.govuk-template{overflow-y:scroll}}.govuk-template__body{margin:0;background-color:#fff}.govuk-width-container{max-width:960px;margin-right:15px;margin-left:15px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(15px,calc(15px + env(safe-area-inset-right)));margin-left:max(15px,calc(15px + env(safe-area-inset-left)))}}@media (min-width: 40.0625em){.govuk-width-container{margin-right:30px;margin-left:30px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(30px,calc(15px + env(safe-area-inset-right)));margin-left:max(30px,calc(15px + env(safe-area-inset-left)))}}}@media (min-width: 1020px){.govuk-width-container{margin-right:auto;margin-left:auto}@supports (margin: max(0px)){.govuk-width-container{margin-right:auto;margin-left:auto}}}.govuk-accordion{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-accordion{margin-bottom:30px}}.govuk-accordion__section{padding-top:15px}.govuk-accordion__section-heading{margin-top:0;margin-bottom:0;padding-top:15px;padding-bottom:15px}.govuk-accordion__section-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;color:#0b0c0c;display:block;margin-bottom:0;padding-top:15px}@media print{.govuk-accordion__section-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-accordion__section-button{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-accordion__section-button{font-size:18pt;line-height:1.15}}@media print{.govuk-accordion__section-button{color:#000}}.govuk-accordion__section-content>:last-child{margin-bottom:0}.js-enabled .govuk-accordion{border-bottom:1px solid #b1b4b6}.js-enabled .govuk-accordion__section{padding-top:0}.js-enabled .govuk-accordion__section-content{display:none;padding-bottom:30px}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-content{padding-bottom:50px}}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-content{display:block}.js-enabled .govuk-accordion__show-all{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;position:relative;z-index:1;margin-bottom:9px;padding:5px 2px 5px 0;border-width:0;color:#1d70b8;background:none;cursor:pointer;-webkit-appearance:none}@media print{.js-enabled .govuk-accordion__show-all{font-family:sans-serif}}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__show-all{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__show-all{font-size:14pt;line-height:1.15}}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__show-all{margin-bottom:14px}}.js-enabled .govuk-accordion__show-all::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__show-all:hover{color:#0b0c0c;background:#f3f2f1;box-shadow:0 -2px #f3f2f1,0 4px #f3f2f1}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__show-all:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron{background:#0b0c0c}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-heading{padding:0}.js-enabled .govuk-accordion-nav__chevron{box-sizing:border-box;display:inline-block;position:relative;width:1.25rem;height:1.25rem;border:.0625rem solid;border-radius:50%;vertical-align:middle}.js-enabled .govuk-accordion-nav__chevron:after{content:"";box-sizing:border-box;display:block;position:absolute;bottom:.3125rem;left:.375rem;width:.375rem;height:.375rem;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-top:.125rem solid;border-right:.125rem solid}.js-enabled .govuk-accordion-nav__chevron--down{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.js-enabled .govuk-accordion__section-button{width:100%;padding:10px 0 0;border:0;border-top:1px solid #b1b4b6;border-bottom:10px solid transparent;color:#0b0c0c;background:none;text-align:left;cursor:pointer;-webkit-appearance:none}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-button{padding-bottom:10px}}.js-enabled .govuk-accordion__section-button:active{color:#0b0c0c;background:none}.js-enabled .govuk-accordion__section-button:hover{color:#0b0c0c;background:#f3f2f1}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__section-button:focus{outline:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-button::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-button{padding-bottom:20px;border-bottom:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:3px}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:2px}}.js-enabled .govuk-accordion__section-toggle,.js-enabled .govuk-accordion__section-heading-text,.js-enabled .govuk-accordion__section-summary{display:block;margin-bottom:13px}.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-toggle-focus{display:inline}.js-enabled .govuk-accordion__section-toggle{font-size:16px;font-size:1rem;line-height:1.25;font-weight:400;color:#1d70b8}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-toggle{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__section-toggle{font-size:14pt;line-height:1.15}}.js-enabled .govuk-accordion__show-all-text,.js-enabled .govuk-accordion__section-toggle-text{margin-left:5px;vertical-align:middle}@media screen and (forced-colors: active){.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{background-color:transparent}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{background:transparent;background-color:transparent}}@media (hover: none){.js-enabled .govuk-accordion__section-header:hover{border-top-color:#b1b4b6;box-shadow:inset 0 3px #1d70b8}.js-enabled .govuk-accordion__section-header:hover .govuk-accordion__section-button{border-top-color:#b1b4b6}}.govuk-back-link{font-size:14px;font-size:.875rem;line-height:1.1428571429;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px}@media (min-width: 40.0625em){.govuk-back-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2}}@media print{.govuk-back-link{font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:hover{color:#0b0c0cfc}.govuk-back-link:active,.govuk-back-link:focus{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus{color:#000}}.govuk-back-link:before{content:"";display:block;position:absolute;top:0;bottom:0;left:3px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-back-link:focus:before{border-color:#0b0c0c}.govuk-back-link:after{content:"";position:absolute;top:-14px;right:0;bottom:-14px;left:0}.govuk-breadcrumbs{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-breadcrumbs{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2}}@media print{.govuk-breadcrumbs{color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:0;bottom:0;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:hover{color:#0b0c0cfc}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#000}}@media (max-width: 40.0525em){.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item{display:none}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:first-child,.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:last-child{display:inline-block}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:before{top:6px;margin:0}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.govuk-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:0 0 22px;padding:8px 10px 7px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00703c;box-shadow:0 2px #002d18;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button{font-size:14pt;line-height:19px}}@media (min-width: 40.0625em){.govuk-button{margin-bottom:32px}}@media (min-width: 40.0625em){.govuk-button{width:auto}}.govuk-button:link,.govuk-button:visited,.govuk-button:active,.govuk-button:hover{color:#fff;text-decoration:none}.govuk-button::-moz-focus-inner{padding:0;border:0}.govuk-button:hover{background-color:#005a30}.govuk-button:active{top:2px}.govuk-button:focus{border-color:#fd0;outline:3px solid transparent;box-shadow:inset 0 0 0 1px #fd0}.govuk-button:focus:not(:active):not(:hover){border-color:#fd0;color:#0b0c0c;background-color:#fd0;box-shadow:0 2px #0b0c0c}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00703c;cursor:default}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;box-shadow:0 2px #002d18}.govuk-button--secondary{background-color:#f3f2f1;box-shadow:0 2px #929191}.govuk-button--secondary,.govuk-button--secondary:link,.govuk-button--secondary:visited,.govuk-button--secondary:active,.govuk-button--secondary:hover{color:#0b0c0c}.govuk-button--secondary:hover{background-color:#dbdad9}.govuk-button--secondary:hover[disabled]{background-color:#f3f2f1}.govuk-button--warning{background-color:#d4351c;box-shadow:0 2px #55150b}.govuk-button--warning,.govuk-button--warning:link,.govuk-button--warning:visited,.govuk-button--warning:active,.govuk-button--warning:hover{color:#fff}.govuk-button--warning:hover{background-color:#aa2a16}.govuk-button--warning:hover[disabled]{background-color:#d4351c}.govuk-button--start{font-weight:700;font-size:18px;font-size:1.125rem;line-height:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 40.0625em){.govuk-button--start{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}.govuk-button__start-icon{margin-left:5px;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;forced-color-adjust:auto}@media (min-width: 48.0625em){.govuk-button__start-icon{margin-left:10px}}.govuk-error-message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px;clear:both;color:#d4351c}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-message{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{min-width:0;margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}@supports not (caret-color: auto){.govuk-fieldset,x:-moz-any-link{display:table-cell}}.govuk-fieldset__legend{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;box-sizing:border-box;display:table;max-width:100%;margin-bottom:10px;padding:0;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15}}@media print{.govuk-fieldset__legend{color:#000}}.govuk-fieldset__legend--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:15px;color:#505a5f}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-hint{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend+.govuk-hint{margin-top:-5px}.govuk-label{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label{font-size:14pt;line-height:1.15}}@media print{.govuk-label{color:#000}}.govuk-label--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-checkboxes__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__label:after{content:"";box-sizing:border-box;position:absolute;top:11px;left:9px;width:23px;height:12px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__hint{display:block;padding-right:15px;padding-left:15px}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 3px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{outline-color:Highlight}}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-checkboxes__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-checkboxes__divider{color:#000}}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.js-enabled .govuk-checkboxes__conditional--hidden{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-checkboxes--small .govuk-checkboxes__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-checkboxes--small .govuk-checkboxes__item:after{content:"";display:block;clear:both}.govuk-checkboxes--small .govuk-checkboxes__input{left:-10px}.govuk-checkboxes--small .govuk-checkboxes__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-checkboxes--small .govuk-checkboxes__label{padding:11px 15px 10px 1px}}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:8px;width:24px;height:24px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:15px;left:6px;width:12px;height:6.5px;border-width:0 0 3px 3px}.govuk-checkboxes--small .govuk-checkboxes__hint{padding:0;clear:both}.govuk-checkboxes--small .govuk-checkboxes__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:initial}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0}}.govuk-textarea{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:block;width:100%;min-height:40px;margin-bottom:20px;padding:5px;resize:vertical;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-textarea{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}@media (min-width: 40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-textarea--error{border-color:#d4351c}.govuk-textarea--error:focus{border-color:#0b0c0c}.govuk-character-count{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-character-count{margin-bottom:30px}}.govuk-character-count .govuk-form-group,.govuk-character-count .govuk-textarea{margin-bottom:5px}.govuk-character-count__message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400;margin-top:0;margin-bottom:0}@media print{.govuk-character-count__message{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-character-count__message{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-character-count__message--disabled{visibility:hidden}.govuk-cookie-banner{padding-top:20px;border-bottom:10px solid transparent;background-color:#f3f2f1}.govuk-cookie-banner[hidden]{display:none}.govuk-cookie-banner__message{margin-bottom:-10px}.govuk-cookie-banner__message[hidden]{display:none}.govuk-cookie-banner__message:focus{outline:none}.govuk-summary-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin:0 0 20px}@media print{.govuk-summary-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-summary-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-summary-list{font-size:14pt;line-height:1.15}}@media print{.govuk-summary-list{color:#000}}@media (min-width: 40.0625em){.govuk-summary-list{display:table;width:100%;table-layout:fixed;border-collapse:collapse}}@media (min-width: 40.0625em){.govuk-summary-list{margin-bottom:30px}}.govuk-summary-list__row{border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-summary-list__row{margin-bottom:15px}}@media (min-width: 40.0625em){.govuk-summary-list__row{display:table-row}}@media (min-width: 40.0625em){.govuk-summary-list__row--no-actions:after{content:"";display:table-cell;width:20%}}.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{margin:0}@media (min-width: 40.0625em){.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{display:table-cell;padding-top:10px;padding-right:20px;padding-bottom:10px}}.govuk-summary-list__actions{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-summary-list__actions{width:20%;padding-right:0;text-align:right}}.govuk-summary-list__key,.govuk-summary-list__value{word-wrap:break-word;overflow-wrap:break-word}.govuk-summary-list__key{margin-bottom:5px;font-weight:700}@media (min-width: 40.0625em){.govuk-summary-list__key{width:30%}}@media (max-width: 40.0525em){.govuk-summary-list__value{margin-bottom:15px}}.govuk-summary-list__value>p{margin-bottom:10px}.govuk-summary-list__value>:last-child{margin-bottom:0}.govuk-summary-list__actions-list{width:100%;margin:0;padding:0}.govuk-summary-list__actions-list-item{display:inline;margin-right:10px;padding-right:10px}.govuk-summary-list__actions-list-item:not(:last-child){border-right:1px solid #b1b4b6}.govuk-summary-list__actions-list-item:last-child{margin-right:0;padding-right:0;border:0}.govuk-summary-list--no-border .govuk-summary-list__row{border:0}@media (min-width: 40.0625em){.govuk-summary-list--no-border .govuk-summary-list__key,.govuk-summary-list--no-border .govuk-summary-list__value,.govuk-summary-list--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-summary-list__row--no-border{border:0}@media (min-width: 40.0625em){.govuk-summary-list__row--no-border .govuk-summary-list__key,.govuk-summary-list__row--no-border .govuk-summary-list__value,.govuk-summary-list__row--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-input{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;width:100%;height:40px;height:2.5rem;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-input::-webkit-outer-spin-button,.govuk-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border-color:#d4351c}.govuk-input--error:focus{border-color:#0b0c0c}.govuk-input--width-30{max-width:59ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-input--width-5{max-width:10.8ex}.govuk-input--width-4{max-width:9ex}.govuk-input--width-3{max-width:7.2ex}.govuk-input--width-2{max-width:5.4ex}.govuk-input__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.govuk-input__wrapper .govuk-input{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.govuk-input__wrapper .govuk-input:focus{z-index:1}@media (max-width: 19.99em){.govuk-input__wrapper{display:block}.govuk-input__wrapper .govuk-input{max-width:100%}}.govuk-input__prefix,.govuk-input__suffix{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:inline-block;min-width:40px;min-width:2.5rem;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;background-color:#f3f2f1;text-align:center;white-space:nowrap;cursor:default;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media print{.govuk-input__prefix,.govuk-input__suffix{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input__prefix,.govuk-input__suffix{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input__prefix,.govuk-input__suffix{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-input__prefix,.govuk-input__suffix{line-height:1.6}}@media (max-width: 19.99em){.govuk-input__prefix,.govuk-input__suffix{display:block;height:100%;white-space:normal}}@media (max-width: 19.99em){.govuk-input__prefix{border-bottom:0}}@media (min-width: 20em){.govuk-input__prefix{border-right:0}}@media (max-width: 19.99em){.govuk-input__suffix{border-top:0}}@media (min-width: 20em){.govuk-input__suffix{border-left:0}}.govuk-date-input{font-size:0}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{display:inline-block;margin-right:20px;margin-bottom:0}.govuk-date-input__label{display:block}.govuk-date-input__input{margin-bottom:0}.govuk-details{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-details{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-details{font-size:14pt;line-height:1.15}}@media print{.govuk-details{color:#000}}@media (min-width: 40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#1d70b8;cursor:pointer}.govuk-details__summary:hover{color:#003078}.govuk-details__summary:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:focus .govuk-details__summary-text{text-decoration:none}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:-1px;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,100% 50%,0% 100%);clip-path:polygon(0% 0%,100% 50%,0% 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:12.124px 7px 0 7px;border-top-color:inherit}.govuk-details__text{padding-top:15px;padding-bottom:15px;padding-left:20px;border-left:5px solid #b1b4b6}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text>:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:5px solid #d4351c}@media print{.govuk-error-summary{color:#000}}@media (min-width: 40.0625em){.govuk-error-summary{padding:20px}}@media (min-width: 40.0625em){.govuk-error-summary{margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffdd00}.govuk-error-summary__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__title{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__body{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-error-summary__list a{font-family:sans-serif}}.govuk-error-summary__list a:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#d4351c}.govuk-error-summary__list a:hover{color:#942514}.govuk-error-summary__list a:active{color:#d4351c}.govuk-error-summary__list a:focus{color:#0b0c0c}.govuk-file-upload{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;max-width:100%;margin-left:-5px;padding:5px}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-file-upload{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15}}@media print{.govuk-file-upload{color:#000}}.govuk-file-upload::-webkit-file-upload-button{-webkit-appearance:button;color:inherit;font:inherit}.govuk-file-upload:focus{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-file-upload:focus-within{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-footer{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;padding-top:25px;padding-bottom:15px;border-top:1px solid #b1b4b6;color:#0b0c0c;background:#f3f2f1}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-footer{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-footer{padding-top:40px}}@media (min-width: 40.0625em){.govuk-footer{padding-bottom:25px}}.govuk-footer__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-footer__link{font-family:sans-serif}}.govuk-footer__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-footer__link:link,.govuk-footer__link:visited{color:#0b0c0c}@media print{.govuk-footer__link:link,.govuk-footer__link:visited{color:#000}}.govuk-footer__link:hover{color:#0b0c0cfc}.govuk-footer__link:active,.govuk-footer__link:focus{color:#0b0c0c}@media print{.govuk-footer__link:active,.govuk-footer__link:focus{color:#000}}.govuk-footer__section-break{margin:0 0 30px;border:0;border-bottom:1px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}@media (max-width: 40.0525em){.govuk-footer__meta-item--grow{-webkit-flex-basis:320px;-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top;forced-color-adjust:auto}@media (max-width: 48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0%;background-size:125px 102px;text-align:center;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__meta-custom{margin-bottom:20px}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{margin-right:-15px;margin-left:-15px}.govuk-footer__navigation:after{content:"";display:block;clear:both}.govuk-footer__section{display:inline-block;margin-bottom:30px;vertical-align:top}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list .govuk-footer__link:hover{text-decoration-thickness:auto}@media (min-width: 48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;border-bottom:10px solid #ffffff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header__container--full-width{padding:0 15px;border-color:#1d70b8}.govuk-header__container--full-width .govuk-header__menu-button{right:15px}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #1d70b8}.govuk-header__container:after{content:"";display:block;clear:both}.govuk-header__logotype{display:inline-block;margin-right:5px}@media (forced-colors: active){.govuk-header__logotype{forced-color-adjust:none;color:linktext}}.govuk-header__logotype:last-child{margin-right:0}.govuk-header__logotype-crown{position:relative;top:-1px;margin-right:1px;fill:currentColor;vertical-align:top}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:bottom}.govuk-header__product-name{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1;display:inline-table}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__product-name{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1}}.govuk-header__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none}@media print{.govuk-header__link{font-family:sans-serif}}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover,.govuk-header__link:active{color:#fffffffc}.govuk-header__link:focus{color:#0b0c0c}.govuk-header__link:hover{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.1em}.govuk-header__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__link--homepage{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;margin-right:10px;font-size:30px;line-height:1}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{text-decoration:none}.govuk-header__link--homepage:hover,.govuk-header__link--homepage:active{margin-bottom:-3px;border-bottom:3px solid}.govuk-header__link--homepage:focus{margin-bottom:0;border-bottom:0}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__link--service-name{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo,.govuk-header__content{box-sizing:border-box}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width: 40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width: 48.0625em){.govuk-header__logo{width:33.33%;padding-right:15px;float:left;vertical-align:top}}@media (min-width: 48.0625em){.govuk-header__content{width:66.66%;padding-left:15px;float:left}}.govuk-header__menu-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;cursor:pointer}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__menu-button{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{-webkit-text-decoration:solid underline 3px;text-decoration:solid underline 3px;text-underline-offset:.1em}.govuk-header__menu-button:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:8.66px 5px 0 5px;border-top-color:inherit;content:"";margin-left:5px}@media (min-width: 40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0%,0% 100%,100% 100%);clip-path:polygon(50% 0%,0% 100%,100% 100%);border-width:0 5px 8.66px 5px;border-bottom-color:inherit}@media (min-width: 48.0625em){.govuk-header__navigation{margin-bottom:10px}}.govuk-header__navigation-list{margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button{display:block}@media (min-width: 48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation-list{display:none}@media (min-width: 48.0625em){.js-enabled .govuk-header__navigation-list{display:block}}.js-enabled .govuk-header__navigation-list--open{display:block}@media (min-width: 48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width: 48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1.1428571429;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__navigation-item a{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item--active a:focus{color:#0b0c0c}.govuk-header__navigation-item:last-child{margin-right:0;border-bottom:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-inset-text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #b1b4b6}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-inset-text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15}}@media print{.govuk-inset-text{color:#000}}@media (min-width: 40.0625em){.govuk-inset-text{margin-top:30px}}@media (min-width: 40.0625em){.govuk-inset-text{margin-bottom:30px}}.govuk-inset-text>:first-child{margin-top:0}.govuk-inset-text>:only-child,.govuk-inset-text>:last-child{margin-bottom:0}.govuk-notification-banner{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:30px;border:5px solid #1d70b8;background-color:#1d70b8}@media print{.govuk-notification-banner{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-notification-banner{margin-bottom:50px}}.govuk-notification-banner:focus{outline:3px solid #ffdd00}.govuk-notification-banner__header{padding:2px 15px 5px;border-bottom:1px solid transparent}@media (min-width: 40.0625em){.govuk-notification-banner__header{padding:2px 20px 5px}}.govuk-notification-banner__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;margin:0;padding:0;color:#fff}@media print{.govuk-notification-banner__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner__title{font-size:14pt;line-height:1.15}}.govuk-notification-banner__content{color:#0b0c0c;padding:15px;background-color:#fff}@media print{.govuk-notification-banner__content{color:#000}}@media (min-width: 40.0625em){.govuk-notification-banner__content{padding:20px}}.govuk-notification-banner__content>*{box-sizing:border-box;max-width:605px}.govuk-notification-banner__content>:last-child{margin-bottom:0}.govuk-notification-banner__heading{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin:0 0 15px;padding:0}@media print{.govuk-notification-banner__heading{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__heading{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-notification-banner__heading{font-size:18pt;line-height:1.15}}.govuk-notification-banner__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-notification-banner__link{font-family:sans-serif}}.govuk-notification-banner__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-notification-banner__link:link,.govuk-notification-banner__link:visited{color:#1d70b8}.govuk-notification-banner__link:hover{color:#003078}.govuk-notification-banner__link:active{color:#0b0c0c}.govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-notification-banner--success{border-color:#00703c;background-color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:link,.govuk-notification-banner--success .govuk-notification-banner__link:visited{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:hover{color:#004e2a}.govuk-notification-banner--success .govuk-notification-banner__link:active{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-panel{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-panel{padding:10px;overflow-wrap:break-word;word-wrap:break-word}}.govuk-panel--confirmation{color:#fff;background:#00703c}@media print{.govuk-panel--confirmation{border-color:currentColor;color:#000;background:none}}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__title{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__title:last-child{margin-bottom:0}.govuk-panel__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;font-size:1.5rem;line-height:1.0416666667}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__body{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{display:inline-block;outline:2px solid transparent;outline-offset:-2px;color:#fff;background-color:#1d70b8;letter-spacing:1px;text-decoration:none;text-transform:uppercase;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;padding:5px 8px 4px}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}.govuk-tag--grey{color:#383f43;background:#eeefef}.govuk-tag--purple{color:#3d2375;background:#dbd5e9}.govuk-tag--turquoise{color:#10403c;background:#bfe3e0}.govuk-tag--blue{color:#144e81;background:#d2e2f1}.govuk-tag--yellow{color:#594d00;background:#fff7bf}.govuk-tag--orange{color:#6e3619;background:#fcd6c3}.govuk-tag--red{color:#942514;background:#f6d7d2}.govuk-tag--pink{color:#80224d;background:#f7d7e6}.govuk-tag--green{color:#005a30;background:#cce2d8}.govuk-phase-banner{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #b1b4b6}.govuk-phase-banner__content{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;display:table;margin:0}@media print{.govuk-phase-banner__content{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-phase-banner__content{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-phase-banner__content{font-size:14pt;line-height:1.2}}@media print{.govuk-phase-banner__content{color:#000}}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:middle}.govuk-tabs{margin-top:5px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-tabs{margin-top:5px}}@media (min-width: 40.0625em){.govuk-tabs{margin-bottom:30px}}.govuk-tabs__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:10px}@media print{.govuk-tabs__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__title{font-size:14pt;line-height:1.15}}@media print{.govuk-tabs__title{color:#000}}.govuk-tabs__list{margin:0 0 20px;padding:0;list-style:none}@media (min-width: 40.0625em){.govuk-tabs__list{margin-bottom:30px}}.govuk-tabs__list-item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-left:25px}@media print{.govuk-tabs__list-item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__list-item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__list-item{font-size:14pt;line-height:1.15}}.govuk-tabs__list-item:before{color:#0b0c0c;content:"\\2014";margin-left:-25px;padding-right:5px}@media print{.govuk-tabs__list-item:before{color:#000}}.govuk-tabs__tab{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;margin-bottom:10px}@media print{.govuk-tabs__tab{font-family:sans-serif}}.govuk-tabs__tab:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-tabs__tab:link{color:#1d70b8}.govuk-tabs__tab:visited{color:#4c2c92}.govuk-tabs__tab:hover{color:#003078}.govuk-tabs__tab:active{color:#0b0c0c}.govuk-tabs__tab:focus{color:#0b0c0c}.govuk-tabs__panel{margin-bottom:30px}@media (min-width: 40.0625em){.govuk-tabs__panel{margin-bottom:50px}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__list{margin-bottom:0;border-bottom:1px solid #b1b4b6}.js-enabled .govuk-tabs__list:after{content:"";display:block;clear:both}.js-enabled .govuk-tabs__title{display:none}.js-enabled .govuk-tabs__list-item{position:relative;margin-right:5px;margin-bottom:0;margin-left:0;padding:10px 20px;float:left;background-color:#f3f2f1;text-align:center}.js-enabled .govuk-tabs__list-item:before{content:none}.js-enabled .govuk-tabs__list-item--selected{position:relative;margin-top:-5px;margin-bottom:-1px;padding:14px 19px 16px;border:1px solid #b1b4b6;border-bottom:0;background-color:#fff}.js-enabled .govuk-tabs__list-item--selected .govuk-tabs__tab{text-decoration:none}.js-enabled .govuk-tabs__tab{margin-bottom:0}.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:hover{color:#0b0c0cfc}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0;padding:30px 20px;border:1px solid #b1b4b6;border-top:0}}@media (min-width: 40.0625em) and (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel>:last-child{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel--hidden{display:none}}.govuk-radios__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-radios__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__hint{display:block;padding-right:15px;padding-left:15px}.govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 4px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-radios__input:focus+.govuk-radios__label:before{outline-color:Highlight}}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width: 40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-radios__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-radios__divider{color:#000}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.js-enabled .govuk-radios__conditional--hidden{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-radios--small .govuk-radios__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-radios--small .govuk-radios__item:after{content:"";display:block;clear:both}.govuk-radios--small .govuk-radios__input{left:-10px}.govuk-radios--small .govuk-radios__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-radios--small .govuk-radios__label{padding:11px 15px 10px 1px}}.govuk-radios--small .govuk-radios__label:before{top:8px;width:24px;height:24px}.govuk-radios--small .govuk-radios__label:after{top:15px;left:7px;border-width:5px}.govuk-radios--small .govuk-radios__hint{padding:0;clear:both;pointer-events:none}.govuk-radios--small .govuk-radios__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-radios--small .govuk-radios__divider{width:24px;margin-bottom:5px}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:initial}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0}}.govuk-select{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;max-width:100%;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;color:#0b0c0c;background-color:#fff}@media print{.govuk-select{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-select{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-select option:active,.govuk-select option:checked,.govuk-select:focus::-ms-value{color:#fff;background-color:#1d70b8}.govuk-select--error{border-color:#d4351c}.govuk-select--error:focus{border-color:#0b0c0c}.govuk-skip-link{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:hover{color:#0b0c0cfc}.govuk-skip-link:active,.govuk-skip-link:focus{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus{color:#000}}@media (min-width: 40.0625em){.govuk-skip-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}@supports (padding: max(0px)){.govuk-skip-link{padding-right:max(15px,calc(15px + env(safe-area-inset-right)));padding-left:max(15px,calc(15px + env(safe-area-inset-left)))}}.govuk-skip-link:focus{outline:3px solid #ffdd00;outline-offset:0;background-color:#fd0}.govuk-skip-link-focused-element:focus{outline:none}.govuk-table{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table{font-size:14pt;line-height:1.15}}@media print{.govuk-table{color:#000}}@media (min-width: 40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__header,.govuk-table__cell{padding:10px 20px 10px 0;border-bottom:1px solid #b1b4b6;text-align:left;vertical-align:top}.govuk-table__cell--numeric{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-table__cell--numeric{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-table__header--numeric,.govuk-table__cell--numeric{text-align:right}.govuk-table__header:last-child,.govuk-table__cell:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-table__caption--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-table__caption--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-table__caption--xl{font-size:32pt;line-height:1.15}}.govuk-table__caption--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-table__caption--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-table__caption--l{font-size:24pt;line-height:1.05}}.govuk-table__caption--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-table__caption--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-table__caption--m{font-size:18pt;line-height:1.15}}.govuk-table__caption--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-table__caption--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table__caption--s{font-size:14pt;line-height:1.15}}.govuk-warning-text{position:relative;margin-bottom:20px;padding:10px 0}@media (min-width: 40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-warning-text__icon{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;box-sizing:border-box;display:inline-block;position:absolute;left:0;min-width:35px;min-height:35px;margin-top:-7px;border:3px solid #0b0c0c;border-radius:50%;color:#fff;background:#0b0c0c;font-size:30px;line-height:29px;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;forced-color-adjust:none}@media print{.govuk-warning-text__icon{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__icon{margin-top:-5px}}@media screen and (forced-colors: active){.govuk-warning-text__icon{border-color:windowText;color:windowText;background:transparent}}.govuk-warning-text__text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;padding-left:45px}@media print{.govuk-warning-text__text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-warning-text__text{font-size:14pt;line-height:1.15}}@media print{.govuk-warning-text__text{color:#000}}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-visually-hidden-focusable{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important}.govuk-visually-hidden-focusable:active,.govuk-visually-hidden-focusable:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}.govuk-\\!-display-inline{display:inline!important}.govuk-\\!-display-inline-block{display:inline-block!important}.govuk-\\!-display-block{display:block!important}.govuk-\\!-display-none{display:none!important}@media print{.govuk-\\!-display-none-print{display:none!important}}.govuk-\\!-margin-0{margin:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-0{margin:0!important}}.govuk-\\!-margin-top-0{margin-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-0{margin-top:0!important}}.govuk-\\!-margin-right-0{margin-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-0{margin-right:0!important}}.govuk-\\!-margin-bottom-0{margin-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\\!-margin-left-0{margin-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-0{margin-left:0!important}}.govuk-\\!-margin-1{margin:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-1{margin:5px!important}}.govuk-\\!-margin-top-1{margin-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-1{margin-top:5px!important}}.govuk-\\!-margin-right-1{margin-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-1{margin-right:5px!important}}.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\\!-margin-left-1{margin-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-1{margin-left:5px!important}}.govuk-\\!-margin-2{margin:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-2{margin:10px!important}}.govuk-\\!-margin-top-2{margin-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-2{margin-top:10px!important}}.govuk-\\!-margin-right-2{margin-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-2{margin-right:10px!important}}.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\\!-margin-left-2{margin-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-2{margin-left:10px!important}}.govuk-\\!-margin-3{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-3{margin:15px!important}}.govuk-\\!-margin-top-3{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-3{margin-top:15px!important}}.govuk-\\!-margin-right-3{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-3{margin-right:15px!important}}.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\\!-margin-left-3{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-3{margin-left:15px!important}}.govuk-\\!-margin-4{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-4{margin:20px!important}}.govuk-\\!-margin-top-4{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-4{margin-top:20px!important}}.govuk-\\!-margin-right-4{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-4{margin-right:20px!important}}.govuk-\\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\\!-margin-left-4{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-4{margin-left:20px!important}}.govuk-\\!-margin-5{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-5{margin:25px!important}}.govuk-\\!-margin-top-5{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-5{margin-top:25px!important}}.govuk-\\!-margin-right-5{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-5{margin-right:25px!important}}.govuk-\\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\\!-margin-left-5{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-5{margin-left:25px!important}}.govuk-\\!-margin-6{margin:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-6{margin:30px!important}}.govuk-\\!-margin-top-6{margin-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-6{margin-top:30px!important}}.govuk-\\!-margin-right-6{margin-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-6{margin-right:30px!important}}.govuk-\\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\\!-margin-left-6{margin-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-6{margin-left:30px!important}}.govuk-\\!-margin-7{margin:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-7{margin:40px!important}}.govuk-\\!-margin-top-7{margin-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-7{margin-top:40px!important}}.govuk-\\!-margin-right-7{margin-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-7{margin-right:40px!important}}.govuk-\\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\\!-margin-left-7{margin-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-7{margin-left:40px!important}}.govuk-\\!-margin-8{margin:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-8{margin:50px!important}}.govuk-\\!-margin-top-8{margin-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-8{margin-top:50px!important}}.govuk-\\!-margin-right-8{margin-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-8{margin-right:50px!important}}.govuk-\\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\\!-margin-left-8{margin-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-8{margin-left:50px!important}}.govuk-\\!-margin-9{margin:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-9{margin:60px!important}}.govuk-\\!-margin-top-9{margin-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-9{margin-top:60px!important}}.govuk-\\!-margin-right-9{margin-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-9{margin-right:60px!important}}.govuk-\\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\\!-margin-left-9{margin-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-9{margin-left:60px!important}}.govuk-\\!-padding-0{padding:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-0{padding:0!important}}.govuk-\\!-padding-top-0{padding-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-0{padding-top:0!important}}.govuk-\\!-padding-right-0{padding-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-0{padding-right:0!important}}.govuk-\\!-padding-bottom-0{padding-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\\!-padding-left-0{padding-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-0{padding-left:0!important}}.govuk-\\!-padding-1{padding:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-1{padding:5px!important}}.govuk-\\!-padding-top-1{padding-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-1{padding-top:5px!important}}.govuk-\\!-padding-right-1{padding-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-1{padding-right:5px!important}}.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\\!-padding-left-1{padding-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-1{padding-left:5px!important}}.govuk-\\!-padding-2{padding:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-2{padding:10px!important}}.govuk-\\!-padding-top-2{padding-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-2{padding-top:10px!important}}.govuk-\\!-padding-right-2{padding-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-2{padding-right:10px!important}}.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\\!-padding-left-2{padding-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-2{padding-left:10px!important}}.govuk-\\!-padding-3{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-3{padding:15px!important}}.govuk-\\!-padding-top-3{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-3{padding-top:15px!important}}.govuk-\\!-padding-right-3{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-3{padding-right:15px!important}}.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\\!-padding-left-3{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-3{padding-left:15px!important}}.govuk-\\!-padding-4{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-4{padding:20px!important}}.govuk-\\!-padding-top-4{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-4{padding-top:20px!important}}.govuk-\\!-padding-right-4{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-4{padding-right:20px!important}}.govuk-\\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\\!-padding-left-4{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-4{padding-left:20px!important}}.govuk-\\!-padding-5{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-5{padding:25px!important}}.govuk-\\!-padding-top-5{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-5{padding-top:25px!important}}.govuk-\\!-padding-right-5{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-5{padding-right:25px!important}}.govuk-\\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\\!-padding-left-5{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-5{padding-left:25px!important}}.govuk-\\!-padding-6{padding:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-6{padding:30px!important}}.govuk-\\!-padding-top-6{padding-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-6{padding-top:30px!important}}.govuk-\\!-padding-right-6{padding-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-6{padding-right:30px!important}}.govuk-\\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\\!-padding-left-6{padding-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-6{padding-left:30px!important}}.govuk-\\!-padding-7{padding:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-7{padding:40px!important}}.govuk-\\!-padding-top-7{padding-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-7{padding-top:40px!important}}.govuk-\\!-padding-right-7{padding-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-7{padding-right:40px!important}}.govuk-\\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\\!-padding-left-7{padding-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-7{padding-left:40px!important}}.govuk-\\!-padding-8{padding:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-8{padding:50px!important}}.govuk-\\!-padding-top-8{padding-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-8{padding-top:50px!important}}.govuk-\\!-padding-right-8{padding-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-8{padding-right:50px!important}}.govuk-\\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\\!-padding-left-8{padding-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-8{padding-left:50px!important}}.govuk-\\!-padding-9{padding:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-9{padding:60px!important}}.govuk-\\!-padding-top-9{padding-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-9{padding-top:60px!important}}.govuk-\\!-padding-right-9{padding-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-9{padding-right:60px!important}}.govuk-\\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\\!-padding-left-9{padding-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-9{padding-left:60px!important}}.govuk-\\!-text-align-left{text-align:left!important}.govuk-\\!-text-align-centre{text-align:center!important}.govuk-\\!-text-align-right{text-align:right!important}.govuk-\\!-font-size-80{font-size:53px!important;font-size:3.3125rem!important;line-height:1.0377358491!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-80{font-size:80px!important;font-size:5rem!important;line-height:1!important}}@media print{.govuk-\\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\\!-font-size-48{font-size:32px!important;font-size:2rem!important;line-height:1.09375!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-48{font-size:48px!important;font-size:3rem!important;line-height:1.0416666667!important}}@media print{.govuk-\\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\\!-font-size-36{font-size:24px!important;font-size:1.5rem!important;line-height:1.0416666667!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-36{font-size:36px!important;font-size:2.25rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\\!-font-size-27{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-27{font-size:27px!important;font-size:1.6875rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-24{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-24{font-size:24px!important;font-size:1.5rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-19{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-19{font-size:19px!important;font-size:1.1875rem!important;line-height:1.3157894737!important}}@media print{.govuk-\\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\\!-font-size-16{font-size:14px!important;font-size:.875rem!important;line-height:1.1428571429!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-16{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\\!-font-size-14{font-size:12px!important;font-size:.75rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-14{font-size:14px!important;font-size:.875rem!important;line-height:1.4285714286!important}}@media print{.govuk-\\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\\!-font-weight-regular{font-weight:400!important}.govuk-\\!-font-weight-bold{font-weight:700!important}.govuk-\\!-width-full,.govuk-\\!-width-three-quarters{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-three-quarters{width:75%!important}}.govuk-\\!-width-two-thirds{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-two-thirds{width:66.66%!important}}.govuk-\\!-width-one-half{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-half{width:50%!important}}.govuk-\\!-width-one-third{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-third{width:33.33%!important}}.govuk-\\!-width-one-quarter{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-quarter{width:25%!important}}:host .govuk-label,:host .govuk-hint,:host .govuk-error-message{font-family:var(--postcode__font-family, "GDS Transport", arial, sans-serif);font-size:var(--postcode__font-size, 19px)}:host .govuk-input{font-family:var(--postcode__font-family, "GDS Transport", arial, sans-serif);font-size:var(--postcode__input__font-size, 19px);height:var(--postcode__input__height, 35px);padding:var(--postcode__input__padding, 5px 34px 5px 5px)}
|
110
|
+
`;var mp=Object.freeze,pp=Object.defineProperty,vE=Object.getOwnPropertyDescriptor,xi=(i,t,e,n)=>{for(var o=n>1?void 0:n?vE(t,e):t,r=i.length-1,s;r>=0;r--)(s=i[r])&&(o=(n?s(t,e,o):s(o))||o);return n&&o&&pp(t,e,o),o},_E=(i,t)=>mp(pp(i,"raw",{value:mp(t||i.slice())})),vp;j.PostcodeSearch=class extends An{constructor(){super(...arguments),this.id="postcode",this.errorId="postcode-error",this.label="Postcode",this.hintText="",this.errorMessage="Enter a valid UK postcode",this.onlyQuestionOnPage=!1,this._postcode="",this._sanitizedPostcode=null,this._showPostcodeError=!1,this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}_onInputChange(i){const t=i.target.value,e=mE(t.trim()).valid;e?(this._sanitizedPostcode=hd(t.trim()),this._postcode=hd(t.trim())||t,this._showPostcodeError=!1):(this._sanitizedPostcode=null,this._postcode=t.toUpperCase()),this.dispatch("postcodeChange",{postcode:this._sanitizedPostcode||t,isValid:e})}_onBlur(){this._sanitizedPostcode||(this._showPostcodeError=!0),this._showError()}_onKeyUp(i){i.key==="Enter"&&!this._sanitizedPostcode&&(this._showPostcodeError=!0),this._showError()}_showError(){var e,n;const i=(e=this.shadowRoot)==null?void 0:e.querySelector(`#${this.errorId}`);i&&(i.style.display="none"),i&&this._showPostcodeError&&(i.style.display="");const t=(n=this.shadowRoot)==null?void 0:n.querySelector(".govuk-form-group");t&&this._showPostcodeError&&t.classList.add("govuk-form-group--error"),t&&!this._showPostcodeError&&t.classList.remove("govuk-form-group--error")}_makeLabel(){return this.onlyQuestionOnPage?Bi`<h1 class="govuk-label-wrapper">
|
111
111
|
<label class="govuk-label govuk-label--l" for=${this.id}>
|
112
112
|
${this.label}
|
113
113
|
</label>
|
114
|
-
</h1>`:Bi`<label class="govuk-label" for=${this.id}>${this.label}</label>`}render(){return Bi(vp||(vp=
|
114
|
+
</h1>`:Bi`<label class="govuk-label" for=${this.id}>${this.label}</label>`}render(){return Bi(vp||(vp=_E([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
|
115
115
|
<div class="govuk-form-group">
|
116
116
|
`,`
|
117
117
|
<div id="postcode-hint" class="govuk-hint">`,`</div>
|
@@ -137,4 +137,4 @@ northing meters`+i;var c=d/2,f=0,g=0,m,p,_,v,y;return c>0&&(m=1e5/Math.pow(10,c)
|
|
137
137
|
@keyup=`,`
|
138
138
|
tabindex="0"
|
139
139
|
/>
|
140
|
-
</div>`])),this._makeLabel(),this.hintText,this.errorId,this.errorMessage,this.id,this.errorId,this._postcode,this._onInputChange,this._onBlur,this._onKeyUp)}},
|
140
|
+
</div>`])),this._makeLabel(),this.hintText,this.errorId,this.errorMessage,this.id,this.errorId,this._postcode,this._onInputChange,this._onBlur,this._onKeyUp)}},j.PostcodeSearch.styles=Es(pE),xi([J({type:String})],j.PostcodeSearch.prototype,"id",2),xi([J({type:String})],j.PostcodeSearch.prototype,"errorId",2),xi([J({type:String})],j.PostcodeSearch.prototype,"label",2),xi([J({type:String})],j.PostcodeSearch.prototype,"hintText",2),xi([J({type:String})],j.PostcodeSearch.prototype,"errorMessage",2),xi([J({type:Boolean})],j.PostcodeSearch.prototype,"onlyQuestionOnPage",2),xi([Wi()],j.PostcodeSearch.prototype,"_postcode",2),xi([Wi()],j.PostcodeSearch.prototype,"_sanitizedPostcode",2),xi([Wi()],j.PostcodeSearch.prototype,"_showPostcodeError",2),j.PostcodeSearch=xi([vl("postcode-search")],j.PostcodeSearch),Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|