@opensystemslab/map 0.6.3 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,60 +1,60 @@
1
- (function(N,Gi){typeof exports=="object"&&typeof module<"u"?Gi(exports):typeof define=="function"&&define.amd?define(["exports"],Gi):(N=typeof globalThis<"u"?globalThis:N||self,Gi(N.ComponentLib={}))})(this,function(N){"use strict";const Gi=window,ul=Gi.ShadowRoot&&(Gi.ShadyCSS===void 0||Gi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dl=Symbol(),wd=new WeakMap;let Md=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==dl)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(ul&&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 Ss=i=>new Md(typeof i=="string"?i:i+"",void 0,dl),Rp=(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,dl)},Ap=(i,t)=>{ul?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=ul?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return Ss(e)})(i):i;var cl;const Ts=window,Ed=Ts.trustedTypes,Pp=Ed?Ed.emptyScript:"",Sd=Ts.reactiveElementPolyfillSupport,fl={toAttribute(i,t){switch(t){case Boolean:i=i?Pp: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:fl,reflect:!1,hasChanged:Td};let fo=class 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 Ap(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:fl).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:fl;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){}};fo.finalized=!0,fo.elementProperties=new Map,fo.elementStyles=[],fo.shadowRootOptions={mode:"open"},Sd==null||Sd({ReactiveElement:fo}),((cl=Ts.reactiveElementVersions)!==null&&cl!==void 0?cl:Ts.reactiveElementVersions=[]).push("1.4.1");var ml;const Is=window,go=Is.trustedTypes,Id=go?go.createPolicy("lit-html",{createHTML:i=>i}):void 0,ji=`lit$${(Math.random()+"").slice(9)}$`,zd="?"+ji,Lp=`<${zd}>`,mo=document,ur=(i="")=>mo.createComment(i),dr=i=>i===null||typeof i!="object"&&typeof i!="function",Rd=Array.isArray,Dp=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,An=RegExp(`>|[
1
+ (function(N,ji){typeof exports=="object"&&typeof module<"u"?ji(exports):typeof define=="function"&&define.amd?define(["exports"],ji):(N=typeof globalThis<"u"?globalThis:N||self,ji(N.ComponentLib={}))})(this,function(N){"use strict";const ji=window,dl=ji.ShadowRoot&&(ji.ShadyCSS===void 0||ji.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,cl=Symbol(),Md=new WeakMap;let Cd=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==cl)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(dl&&t===void 0){const n=e!==void 0&&e.length===1;n&&(t=Md.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Md.set(e,t))}return t}toString(){return this.cssText}};const Ss=i=>new Cd(typeof i=="string"?i:i+"",void 0,cl),Ap=(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 Cd(e,i,cl)},Pp=(i,t)=>{dl?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const n=document.createElement("style"),o=ji.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=e.cssText,i.appendChild(n)})},Ed=dl?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return Ss(e)})(i):i;var fl;const Ts=window,Sd=Ts.trustedTypes,Lp=Sd?Sd.emptyScript:"",Td=Ts.reactiveElementPolyfillSupport,gl={toAttribute(i,t){switch(t){case Boolean:i=i?Lp: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}},Id=(i,t)=>t!==i&&(t==t||i==i),ml={attribute:!0,type:String,converter:gl,reflect:!1,hasChanged:Id};let co=class 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=ml){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)||ml}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(Ed(o))}else t!==void 0&&e.push(Ed(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 Pp(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=ml){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:gl).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:gl;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||Id)(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){}};co.finalized=!0,co.elementProperties=new Map,co.elementStyles=[],co.shadowRootOptions={mode:"open"},Td==null||Td({ReactiveElement:co}),((fl=Ts.reactiveElementVersions)!==null&&fl!==void 0?fl:Ts.reactiveElementVersions=[]).push("1.4.1");var pl;const Is=window,fo=Is.trustedTypes,zd=fo?fo.createPolicy("lit-html",{createHTML:i=>i}):void 0,Bi=`lit$${(Math.random()+"").slice(9)}$`,Rd="?"+Bi,Dp=`<${Rd}>`,go=document,ur=(i="")=>go.createComment(i),dr=i=>i===null||typeof i!="object"&&typeof i!="function",Ad=Array.isArray,Op=i=>Ad(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",cr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Pd=/-->/g,Ld=/>/g,An=RegExp(`>|[
2
2
  \f\r](?:([^\\s"'>=/]+)([
3
3
  \f\r]*=[
4
4
  \f\r]*(?:[^
5
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ld=/'/g,Dd=/"/g,Od=/^(?:script|style|textarea|title)$/i,Op=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),Bi=Op(1),po=Symbol.for("lit-noChange"),ne=Symbol.for("lit-nothing"),Fd=new WeakMap,Fp=(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 gr(t.insertBefore(ur(),a),a,void 0,e??{})}return s._$AI(i),s},vo=mo.createTreeWalker(mo,129,null,!1),Np=(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,f=0;for(;f<h.length&&(s.lastIndex=f,d=s.exec(h),d!==null);)f=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=An):d[3]!==void 0&&(s=An):s===An?d[0]===">"?(s=o??cr,c=-1):d[1]===void 0?c=-2:(c=s.lastIndex-d[2].length,u=d[1],s=d[3]===void 0?An:d[3]==='"'?Dd:Ld):s===Dd||s===Ld?s=An:s===Ad||s===Pd?s=cr:(s=An,o=void 0);const g=s===An&&i[l+1].startsWith("/>")?" ":"";r+=s===cr?h+Lp:c>=0?(n.push(u),h.slice(0,c)+"$lit$"+h.slice(c)+ji+g):h+ji+(c===-2?(n.push(void 0),l):g)}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 fr{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]=Np(t,e);if(this.el=fr.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 f=u[s++];if(d.push(c),f!==void 0){const g=o.getAttribute(f.toLowerCase()+"$lit$").split(ji),m=/([.?@])?(.*)/.exec(f);l.push({type:1,index:r,name:m[2],strings:g,ctor:m[1]==="."?jp:m[1]==="?"?Up:m[1]==="@"?Wp:zs})}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=go?go.emptyScript:"";for(let f=0;f<c;f++)o.append(d[f],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 Gp{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 gr(s,s.nextSibling,this,t):h.type===1?u=new h.ctor(s,h.name,h.strings,this,t):h.type===6&&(u=new Vp(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 gr{constructor(t,e,n,o){var r;this.type=2,this._$AH=ne,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===ne||t==null||t===""?(this._$AH!==ne&&this._$AR(),this._$AH=ne):t!==this._$AH&&t!==po&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.k(t):Dp(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!==ne&&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=fr.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 Gp(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 fr(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 gr(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 zs{constructor(t,e,n,o,r){this.type=1,this._$AH=ne,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=ne}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===ne?t=ne:t!==ne&&(t+=(h??"")+r[l+1]),this._$AH[l]=h}s&&!o&&this.P(t)}P(t){t===ne?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class jp extends zs{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===ne?void 0:t}}const Bp=go?go.emptyScript:"";class Up extends zs{constructor(){super(...arguments),this.type=4}P(t){t&&t!==ne?this.element.setAttribute(this.name,Bp):this.element.removeAttribute(this.name)}}let Wp=class extends zs{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:ne)===po)return;const o=this._$AH,r=t===ne&&o!==ne||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==ne&&(o===ne||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 Vp{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=Is.litHtmlPolyfillSupport;Nd==null||Nd(fr,gr),((ml=Is.litHtmlVersions)!==null&&ml!==void 0?ml:Is.litHtmlVersions=[]).push("2.3.1");var pl,vl;class Pn extends fo{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=Fp(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}}Pn.finalized=!0,Pn._$litElement$=!0,(pl=globalThis.litElementHydrateSupport)===null||pl===void 0||pl.call(globalThis,{LitElement:Pn});const Gd=globalThis.litElementPolyfillSupport;Gd==null||Gd({LitElement:Pn}),((vl=globalThis.litElementVersions)!==null&&vl!==void 0?vl:globalThis.litElementVersions=[]).push("3.2.2");const _l=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);const Xp=(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 Z(i){return(t,e)=>e!==void 0?((n,o,r)=>{o.constructor.createProperty(r,n)})(i,t,e):Xp(i,t)}function Ui(i){return Z({...i,state:!0})}var yl;((yl=window.HTMLSlotElement)===null||yl===void 0?void 0:yl.prototype.assignedElements)!=null;class Yp{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Je=Yp,yo={PROPERTYCHANGE:"propertychange"};class qp{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const xl=qp;function $p(i,t,e){let n,o;e=e||Ln;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 Ln(i,t){return i>t?1:i<t?-1:0}function bl(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 Zp(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 Wi(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 Kp(i,t,e){const n=t||Ln;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 On(){}function Hp(i){let t=!1,e,n,o;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==o||!Wi(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 Fn(i){let t;for(t in i)return!1;return!t}class Qp extends xl{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 Je(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,On);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]=On,++this.pendingRemovals_[t]):(n.splice(o,1),n.length===0&&delete this.listeners_[t]))}}}const Rs=Qp,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 mt(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 As(i,t,e,n){return mt(i,t,e,n,!0)}function Ft(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),mr(i))}class Ps extends Rs{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]=mt(this,t[r],e);return o}else return mt(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]=As(this,t[r],e)}else n=As(this,t,e);return e.ol_key=n,n}unInternal(t,e){const n=e.ol_key;if(n)Jp(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)}}Ps.prototype.on,Ps.prototype.once,Ps.prototype.un;function Jp(i){if(Array.isArray(i))for(let t=0,e=i.length;t<e;++t)Ft(i[t]);else Ft(i)}const jd=Ps;function et(){throw new Error("Unimplemented abstract method.")}let t0=0;function K(i){return i.ol_uid||(i.ol_uid=String(++t0))}const e0="7.0.0";class Bd extends Je{constructor(t,e,n){super(t),this.key=e,this.oldValue=n}}class i0 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=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],Fn(this.values_)&&(this.values_=null),e||this.notify(t,n)}}}const hi=i0,Vi={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Xi=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",n0=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 o0=Xi.includes("webkit")&&!Xi.includes("edge"),r0=Xi.includes("macintosh"),Ud=typeof devicePixelRatio<"u"?devicePixelRatio:1,kl=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,s0=typeof Image<"u"&&Image.prototype.decode,Wd=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():kl?o=new OffscreenCanvas(i||300,t||300):o=document.createElement("canvas"),i&&(o.width=i),t&&(o.height=t),o.getContext("2d",n)}function wl(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}function Vd(i,t){const e=t.parentNode;e&&e.replaceChild(i,t)}function Ml(i){return i&&i.parentNode?i.parentNode.removeChild(i):null}function a0(i){for(;i.lastChild;)i.removeChild(i.lastChild)}function l0(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 h0 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(){Ml(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&Ml(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!==On&&this.listenerKeys.push(mt(t,Vi.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}}const bo=h0,Ls="ol-hidden",pr="ol-unselectable",Cl="ol-control",Xd="ol-collapsed",u0=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"),Yd=["style","variant","weight","size","lineHeight","family"],qd=function(i){const t=i.match(u0);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,o=Yd.length;n<o;++n){const r=t[n+1];r!==void 0&&(e[Yd[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 d0 extends Error{constructor(t){const n="Assertion failed. See https://openlayers.org/en/"+("v"+e0.split("-")[0])+"/doc/errors/#"+t+" for details.";super(n),this.code=t,this.name="AssertionError",this.message=n}}const $d=d0;function gt(i,t){if(!i)throw new $d(t)}function qt(i,t,e){return Math.min(Math.max(i,t),e)}function c0(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 Nn(i,t,e,n)}function Nn(i,t,e,n){const o=e-i,r=n-t;return o*o+r*r}function f0(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 Gn(i){return i*Math.PI/180}function Yi(i,t){const e=i%t;return e*t<0?e+t:e}function ki(i,t,e){return i+e*(t-i)}function Zd(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function Ds(i,t){return Math.floor(Zd(i,t))}function Os(i,t){return Math.ceil(Zd(i,t))}class g0 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=qt(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 Kd=g0,qi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class m0 extends Kd{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_=mt(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_=mt(t,qi.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_=mt(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 El(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=m0;class p0 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:"›",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+" "+Cl+(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(!El(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,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(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),!Wi(e,this.renderedAttributions_)){a0(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_?Vd(this.collapseLabel_,this.label_):Vd(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 v0=p0,ge={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Sl={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},Ns=class{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_}},vr=6378137,wo=Math.PI*vr,_0=[-wo,-wo,wo,wo],y0=[-180,-85,180,85],Gs=vr*Math.log(Math.tan(Math.PI/2));class Mo extends Ns{constructor(t){super({code:t,units:"m",extent:_0,global:!0,worldExtent:y0,getPointResolution:function(e,n){return e/Math.cosh(n[1]/vr)}})}}const Hd=[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 x0(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>Gs?r=Gs:r<-Gs&&(r=-Gs),t[o+1]=r}return t}function b0(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 k0=6378137,Qd=[-180,-90,180,90],w0=Math.PI*k0/180;class jn extends Ns{constructor(t,e){super({code:t,units:"degrees",extent:Qd,axisOrientation:e,global:!0,metersPerUnit:w0,worldExtent:Qd})}}const Jd=[new jn("CRS:84"),new jn("EPSG:4326","neu"),new jn("urn:ogc:def:crs:OGC:1.3:CRS84"),new jn("urn:ogc:def:crs:OGC:2:84"),new jn("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new jn("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new jn("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Tl={};function M0(i){return Tl[i]||Tl[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function C0(i,t){Tl[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 oe={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function xe(i){const t=je();for(let e=0,n=i.length;e<n;++e)xr(t,i[e]);return t}function E0(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 Bn(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 js(i,t){return Il(i,t[0],t[1])}function Un(i,t){return i[0]<=t[0]&&t[2]<=i[2]&&i[1]<=t[1]&&t[3]<=i[3]}function Il(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],o=i[2],r=i[3],s=t[0],a=t[1];let l=oe.UNKNOWN;return s<e?l=l|oe.LEFT:s>o&&(l=l|oe.RIGHT),a<n?l=l|oe.BELOW:a>r&&(l=l|oe.ABOVE),l===oe.UNKNOWN&&(l=oe.INTERSECTING),l}function je(){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 Rl(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)S0(i,t[e],t[e+1]);return i}function S0(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 Al(i,t){let e;return e=t(Bs(i)),e||(e=t(Us(i)),e)||(e=t(Ws(i)),e)||(e=t(Zi(i)),e)?e:!1}function Pl(i){let t=0;return Ol(i)||(t=Nt(i)*Ye(i)),t}function Bs(i){return[i[0],i[1]]}function Us(i){return[i[2],i[1]]}function $i(i){return[(i[0]+i[2])/2,(i[1]+i[3])/2]}function T0(i,t){let e;return t==="bottom-left"?e=Bs(i):t==="bottom-right"?e=Us(i):t==="top-left"?e=Zi(i):t==="top-right"?e=Ws(i):gt(!1,13),e}function Ll(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],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 Ye(i){return i[3]-i[1]}function Wn(i,t,e){const n=e||je();return Zt(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 Zi(i){return[i[0],i[3]]}function Ws(i){return[i[2],i[3]]}function Nt(i){return i[2]-i[0]}function Zt(i,t){return i[0]<=t[2]&&i[2]>=t[0]&&i[1]<=t[3]&&i[3]>=t[1]}function Ol(i){return i[2]<i[0]||i[3]<i[1]}function I0(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i}function z0(i,t,e){let n=!1;const o=zl(i,t),r=zl(i,e);if(o===oe.INTERSECTING||r===oe.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;!!(r&oe.ABOVE)&&!(o&oe.ABOVE)&&(m=c-(f-h)/g,n=m>=s&&m<=l),!n&&!!(r&oe.RIGHT)&&!(o&oe.RIGHT)&&(p=f-(c-l)*g,n=p>=a&&p<=h),!n&&!!(r&oe.BELOW)&&!(o&oe.BELOW)&&(m=c-(f-a)/g,n=m>=s&&m<=l),!n&&!!(r&oe.LEFT)&&!(o&oe.LEFT)&&(p=f-(c-s)*g,n=p>=a&&p<=h)}return n}function R0(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 E0(r,s,e)}function oc(i,t){const e=t.getExtent(),n=$i(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 A0(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 P0(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function L0(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 Fl(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 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 Nl(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 D0(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 O0(i,t){return wi(i,Fl(i,t))}function Gl(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=Gn(i[1]),o=Gn(t[1]),r=(o-n)/2,s=Gn(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 Vs(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+=Gn(a-o)*(2+Math.sin(Gn(r))+Math.sin(Gn(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(Vs(s[0],e)),l=1,h=s.length;l<h;++l)r-=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],r+=Math.abs(Vs(a[0],e)),u=1,d=a.length;u<d;++u)r-=Math.abs(Vs(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 jl=!0;function F0(i){jl=!(i===void 0?!0:i)}function Bl(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){C0(i.getCode(),i),Eo(i,i,Bl)}function N0(i){i.forEach(dc)}function Gt(i){return typeof i=="string"?M0(i):i||null}function Xs(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=Vl(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 Ul(i){N0(i),i.forEach(function(t){i.forEach(function(e){t!==e&&Eo(t,e,Bl)})})}function G0(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 j0(i,t,e,n){const o=Gt(i),r=Gt(t);Eo(o,r,cc(e)),Eo(r,o,cc(n))}function B0(i,t){const e=Ys(i,t!==void 0?t:"EPSG:3857","EPSG:4326"),n=e[0];return(n<-180||n>180)&&(e[0]=Yi(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)===Bl)&&e}function Vl(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 Vl(e,n)}function Ys(i,t,e){return br(t,e)(i,void 0,i.length)}function U0(i,t,e,n){const o=br(t,e);return R0(i,o,void 0,n)}function To(i,t){return i}function Wt(i,t){return jl&&!ei(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(jl=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function Xl(i,t){return i}function Ki(i,t){return i}function fc(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]=qt(n[0],s[0],s[2]),n[1]=qt(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 W0(){Ul(Hd),Ul(Jd),G0(Jd,Hd,x0,b0)}W0();const re={ADD:"add",REMOVE:"remove"},gc={LENGTH:"length"};class qs extends Je{constructor(t,e,n){super(t),this.element=e,this.index=n}}class V0 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(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 qs(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,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 qs(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 o=this.array_[t];this.array_[t]=e,this.dispatchEvent(new qs(re.REMOVE,o,t)),this.dispatchEvent(new qs(re.ADD,e,t))}updateLength_(){this.set(gc.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 $d(58)}}const qe=V0,mc=new Array(6);function $e(){return[1,0,0,1,0,0]}function pc(i){return $s(i,1,0,0,1,0,0)}function Yl(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],f=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*f+s,i[5]=n*c+r*f+a,i}function $s(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 X0(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 Qt(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 ql(i,t,e){return Yl(i,$s(mc,t,0,0,e,0,0))}function Y0(i,t,e){return $s(i,t,0,0,e,0,0)}function q0(i,t,e){return Yl(i,$s(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 $l(i,t){const e=$0(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 $0(i){return i[0]*i[3]-i[1]*i[2]}let vc;function _c(i){const t="matrix("+i.join(", ")+")";if(kl)return t;const e=vc||(vc=document.createElement("div"));return e.style.transform=t,e.style.transform}const Z0=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,K0=/^([a-z]*)$|^hsla?\(.*\)$/i;function Zl(i){return typeof i=="string"?i:xc(i)}function H0(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 Q0=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=J0(n),t[n]=o,++e}return o}}();function kr(i){return Array.isArray(i)?i:Q0(i)}function J0(i){let t,e,n,o,r;if(K0.exec(i)&&(i=H0(i)),Z0.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]=qt(i[0]+.5|0,0,255),i[1]=qt(i[1]+.5|0,0,255),i[2]=qt(i[2]+.5|0,0,255),i[3]=qt(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 tv{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?Zl(e):"null";return t+":"+i+":"+n}const Zs=new tv;class ev extends xl{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]),$l(o,n)}forEachFeatureAtCoordinate(t,e,n,o,r,s,a,l){let h;const u=e.viewState;function d(x,k,w,C){return r.call(s,k,x?w:null,C)}const c=u.projection,f=Gl(t.slice(),c),g=[[0,0]];if(c.canWrapX()&&o){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],C=w.layer;if(C.hasRenderer()&&El(w,u)&&a.call(l,C)){const M=C.getRenderer(),S=C.getSource();if(M&&S){const z=S.getWrapX()?f:t,P=d.bind(null,w.managed);v[0]=z[0]+g[x][0],v[1]=z[1]+g[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){Zs.canExpireCache()&&t.postRenderFunctions.push(iv)}}function iv(i,t){Zs.expire()}const nv=ev;class ov extends Je{constructor(t,e,n,o){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=o}}const kc=ov,wc="10px sans-serif",Ci="#000",Ks="round",wr=[],Mr=0,Io="round",Cr=10,Er="#000",Sr="center",Hs="middle",Xn=[0,0,0,0],Tr=1,Ei=new hi;let zo=null,Kl;const Hl={},rv=function(){const t="32px ",e=["monospace","serif"],n=e.length,o="wmytzilWMYTZIL@#/&?$%10";let r,s;function a(h,u,d){let c=!0;for(let f=0;f<n;++f){const g=e[f];if(s=Qs(h+" "+u+" "+t+g,o),d!=g){const m=Qs(h+" "+u+" "+t+d+","+g,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 f=u[d];Ei.get(f)<100&&(a.apply(this,f.split(`
6
- `))?(mr(Hl),zo=null,Kl=void 0,Ei.set(f,100)):(Ei.set(f,Ei.get(f)+1,!0),h=!1))}h&&(clearInterval(r),r=void 0)}return function(h){const u=qd(h);if(!u)return;const d=u.families;for(let c=0,f=d.length;c<f;++c){const g=d[c],m=u.style+`
5
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Dd=/'/g,Od=/"/g,Fd=/^(?:script|style|textarea|title)$/i,Fp=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),Ui=Fp(1),mo=Symbol.for("lit-noChange"),ne=Symbol.for("lit-nothing"),Nd=new WeakMap,Np=(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 gr(t.insertBefore(ur(),a),a,void 0,e??{})}return s._$AI(i),s},po=go.createTreeWalker(go,129,null,!1),Gp=(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,f=0;for(;f<h.length&&(s.lastIndex=f,d=s.exec(h),d!==null);)f=s.lastIndex,s===cr?d[1]==="!--"?s=Pd:d[1]!==void 0?s=Ld:d[2]!==void 0?(Fd.test(d[2])&&(o=RegExp("</"+d[2],"g")),s=An):d[3]!==void 0&&(s=An):s===An?d[0]===">"?(s=o??cr,c=-1):d[1]===void 0?c=-2:(c=s.lastIndex-d[2].length,u=d[1],s=d[3]===void 0?An:d[3]==='"'?Od:Dd):s===Od||s===Dd?s=An:s===Pd||s===Ld?s=cr:(s=An,o=void 0);const g=s===An&&i[l+1].startsWith("/>")?" ":"";r+=s===cr?h+Dp:c>=0?(n.push(u),h.slice(0,c)+"$lit$"+h.slice(c)+Bi+g):h+Bi+(c===-2?(n.push(void 0),l):g)}const a=r+(i[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[zd!==void 0?zd.createHTML(a):a,n]};class fr{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]=Gp(t,e);if(this.el=fr.createElement(h,n),po.currentNode=this.el.content,e===2){const d=this.el.content,c=d.firstChild;c.remove(),d.append(...c.childNodes)}for(;(o=po.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(Bi)){const f=u[s++];if(d.push(c),f!==void 0){const g=o.getAttribute(f.toLowerCase()+"$lit$").split(Bi),m=/([.?@])?(.*)/.exec(f);l.push({type:1,index:r,name:m[2],strings:g,ctor:m[1]==="."?Bp:m[1]==="?"?Wp:m[1]==="@"?Vp:zs})}else l.push({type:6,index:r})}for(const c of d)o.removeAttribute(c)}if(Fd.test(o.tagName)){const d=o.textContent.split(Bi),c=d.length-1;if(c>0){o.textContent=fo?fo.emptyScript:"";for(let f=0;f<c;f++)o.append(d[f],ur()),po.nextNode(),l.push({type:2,index:++r});o.append(d[c],ur())}}}else if(o.nodeType===8)if(o.data===Rd)l.push({type:2,index:r});else{let d=-1;for(;(d=o.data.indexOf(Bi,d+1))!==-1;)l.push({type:7,index:r}),d+=Bi.length-1}r++}}static createElement(t,e){const n=go.createElement("template");return n.innerHTML=t,n}}function vo(i,t,e=i,n){var o,r,s,a;if(t===mo)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=vo(i,l._$AS(i,t.values),l,n)),t}class jp{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:go).importNode(n,!0);po.currentNode=r;let s=po.nextNode(),a=0,l=0,h=o[0];for(;h!==void 0;){if(a===h.index){let u;h.type===2?u=new gr(s,s.nextSibling,this,t):h.type===1?u=new h.ctor(s,h.name,h.strings,this,t):h.type===6&&(u=new Xp(s,this,t)),this.v.push(u),h=o[++l]}a!==(h==null?void 0:h.index)&&(s=po.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 gr{constructor(t,e,n,o){var r;this.type=2,this._$AH=ne,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=vo(this,t,e),dr(t)?t===ne||t==null||t===""?(this._$AH!==ne&&this._$AR(),this._$AH=ne):t!==this._$AH&&t!==mo&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.k(t):Op(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!==ne&&dr(this._$AH)?this._$AA.nextSibling.data=t:this.k(go.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=fr.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 jp(r,this),a=s.p(this.options);s.m(n),this.k(a),this._$AH=s}}_$AC(t){let e=Nd.get(t.strings);return e===void 0&&Nd.set(t.strings,e=new fr(t)),e}O(t){Ad(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 gr(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 zs{constructor(t,e,n,o,r){this.type=1,this._$AH=ne,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=ne}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=vo(this,t,e,0),s=!dr(t)||t!==this._$AH&&t!==mo,s&&(this._$AH=t);else{const a=t;let l,h;for(t=r[0],l=0;l<r.length-1;l++)h=vo(this,a[n+l],e,l),h===mo&&(h=this._$AH[l]),s||(s=!dr(h)||h!==this._$AH[l]),h===ne?t=ne:t!==ne&&(t+=(h??"")+r[l+1]),this._$AH[l]=h}s&&!o&&this.P(t)}P(t){t===ne?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Bp extends zs{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===ne?void 0:t}}const Up=fo?fo.emptyScript:"";class Wp extends zs{constructor(){super(...arguments),this.type=4}P(t){t&&t!==ne?this.element.setAttribute(this.name,Up):this.element.removeAttribute(this.name)}}let Vp=class extends zs{constructor(t,e,n,o,r){super(t,e,n,o,r),this.type=5}_$AI(t,e=this){var n;if((t=(n=vo(this,t,e,0))!==null&&n!==void 0?n:ne)===mo)return;const o=this._$AH,r=t===ne&&o!==ne||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==ne&&(o===ne||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 Xp{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){vo(this,t)}}const Gd=Is.litHtmlPolyfillSupport;Gd==null||Gd(fr,gr),((pl=Is.litHtmlVersions)!==null&&pl!==void 0?pl:Is.litHtmlVersions=[]).push("2.3.1");var vl,_l;class Pn extends co{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=Np(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 mo}}Pn.finalized=!0,Pn._$litElement$=!0,(vl=globalThis.litElementHydrateSupport)===null||vl===void 0||vl.call(globalThis,{LitElement:Pn});const jd=globalThis.litElementPolyfillSupport;jd==null||jd({LitElement:Pn}),((_l=globalThis.litElementVersions)!==null&&_l!==void 0?_l:globalThis.litElementVersions=[]).push("3.2.2");const yl=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);const Yp=(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 Z(i){return(t,e)=>e!==void 0?((n,o,r)=>{o.constructor.createProperty(r,n)})(i,t,e):Yp(i,t)}function Wi(i){return Z({...i,state:!0})}var xl;((xl=window.HTMLSlotElement)===null||xl===void 0?void 0:xl.prototype.assignedElements)!=null;class qp{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Je=qp,_o={PROPERTYCHANGE:"propertychange"};class $p{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const bl=$p;function Zp(i,t,e){let n,o;e=e||Ln;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 Ln(i,t){return i>t?1:i<t?-1:0}function kl(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 Kp(i,t,e){for(;t<e;){const n=i[t];i[t]=i[e],i[e]=n,++t,--e}}function hi(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 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 Hp(i,t,e){const n=t||Ln;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 yo(){return!1}function On(){}function Qp(i){let t=!1,e,n,o;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==o||!Vi(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 Fn(i){let t;for(t in i)return!1;return!t}class Jp extends bl{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 Je(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,On);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]=On,++this.pendingRemovals_[t]):(n.splice(o,1),n.length===0&&delete this.listeners_[t]))}}}const Rs=Jp,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 mt(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 As(i,t,e,n){return mt(i,t,e,n,!0)}function Ft(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),mr(i))}class Ps extends Rs{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]=mt(this,t[r],e);return o}else return mt(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]=As(this,t[r],e)}else n=As(this,t,e);return e.ol_key=n,n}unInternal(t,e){const n=e.ol_key;if(n)t0(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)}}Ps.prototype.on,Ps.prototype.once,Ps.prototype.un;function t0(i){if(Array.isArray(i))for(let t=0,e=i.length;t<e;++t)Ft(i[t]);else Ft(i)}const Bd=Ps;function et(){throw new Error("Unimplemented abstract method.")}let e0=0;function K(i){return i.ol_uid||(i.ol_uid=String(++e0))}const i0="7.0.0";class Ud extends Je{constructor(t,e,n){super(t),this.key=e,this.oldValue=n}}class n0 extends Bd{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 Ud(n,t,e)),n=_o.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new Ud(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],Fn(this.values_)&&(this.values_=null),e||this.notify(t,n)}}}const ui=n0,Xi={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Yi=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",o0=Yi.includes("firefox");Yi.includes("safari")&&!Yi.includes("chrom")&&(Yi.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Yi));const r0=Yi.includes("webkit")&&!Yi.includes("edge"),s0=Yi.includes("macintosh"),Wd=typeof devicePixelRatio<"u"?devicePixelRatio:1,wl=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,a0=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 Ae(i,t,e,n){let o;return e&&e.length?o=e.shift():wl?o=new OffscreenCanvas(i||300,t||300):o=document.createElement("canvas"),i&&(o.width=i),t&&(o.height=t),o.getContext("2d",n)}function Ml(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}function Xd(i,t){const e=t.parentNode;e&&e.replaceChild(i,t)}function Cl(i){return i&&i.parentNode?i.parentNode.removeChild(i):null}function l0(i){for(;i.lastChild;)i.removeChild(i.lastChild)}function h0(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 u0 extends ui{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(){Cl(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&Cl(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!==On&&this.listenerKeys.push(mt(t,Xi.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}}const xo=u0,Ls="ol-hidden",pr="ol-unselectable",El="ol-control",Yd="ol-collapsed",d0=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"),qd=["style","variant","weight","size","lineHeight","family"],$d=function(i){const t=i.match(d0);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,o=qd.length;n<o;++n){const r=t[n+1];r!==void 0&&(e[qd[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 c0 extends Error{constructor(t){const n="Assertion failed. See https://openlayers.org/en/"+("v"+i0.split("-")[0])+"/doc/errors/#"+t+" for details.";super(n),this.code=t,this.name="AssertionError",this.message=n}}const Zd=c0;function gt(i,t){if(!i)throw new Zd(t)}function qt(i,t,e){return Math.min(Math.max(i,t),e)}function f0(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 Nn(i,t,e,n)}function Nn(i,t,e,n){const o=e-i,r=n-t;return o*o+r*r}function g0(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 Gn(i){return i*Math.PI/180}function qi(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 Os(i,t){return Math.ceil(Kd(i,t))}class m0 extends ui{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=qt(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=m0,$i={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class p0 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_=mt(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_=mt(t,$i.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_=mt(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 Sl(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=p0;class v0 extends xo{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:"›",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+" "+El+(this.collapsed_&&this.collapsible_?" "+Yd:"")+(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(!Sl(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,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(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),!Vi(e,this.renderedAttributions_)){l0(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(Yd),this.collapsed_?Xd(this.collapseLabel_,this.label_):Xd(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 _0=v0,ge={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Tl={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},bo={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937},Ns=class{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_||bo[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_}},vr=6378137,ko=Math.PI*vr,y0=[-ko,-ko,ko,ko],x0=[-180,-85,180,85],Gs=vr*Math.log(Math.tan(Math.PI/2));class wo extends Ns{constructor(t){super({code:t,units:"m",extent:y0,global:!0,worldExtent:x0,getPointResolution:function(e,n){return e/Math.cosh(n[1]/vr)}})}}const Qd=[new wo("EPSG:3857"),new wo("EPSG:102100"),new wo("EPSG:102113"),new wo("EPSG:900913"),new wo("http://www.opengis.net/def/crs/EPSG/0/3857"),new wo("http://www.opengis.net/gml/srs/epsg.xml#3857")];function b0(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]=ko*i[o]/180;let r=vr*Math.log(Math.tan(Math.PI*(+i[o+1]+90)/360));r>Gs?r=Gs:r<-Gs&&(r=-Gs),t[o+1]=r}return t}function k0(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]/ko,t[o+1]=360*Math.atan(Math.exp(i[o+1]/vr))/Math.PI-90;return t}const w0=6378137,Jd=[-180,-90,180,90],M0=Math.PI*w0/180;class jn extends Ns{constructor(t,e){super({code:t,units:"degrees",extent:Jd,axisOrientation:e,global:!0,metersPerUnit:M0,worldExtent:Jd})}}const tc=[new jn("CRS:84"),new jn("EPSG:4326","neu"),new jn("urn:ogc:def:crs:OGC:1.3:CRS84"),new jn("urn:ogc:def:crs:OGC:2:84"),new jn("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new jn("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new jn("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Il={};function C0(i){return Il[i]||Il[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function E0(i,t){Il[i]=t}let Mo={};function Co(i,t,e){const n=i.getCode(),o=t.getCode();n in Mo||(Mo[n]={}),Mo[n][o]=e}function ec(i,t){let e;return i in Mo&&t in Mo[i]&&(e=Mo[i][t]),e}const oe={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function xe(i){const t=je();for(let e=0,n=i.length;e<n;++e)xr(t,i[e]);return t}function S0(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 di(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 ic(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i.slice()}function Bn(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 js(i,t){return zl(i,t[0],t[1])}function Un(i,t){return i[0]<=t[0]&&t[2]<=i[2]&&i[1]<=t[1]&&t[3]<=i[3]}function zl(i,t,e){return i[0]<=t&&t<=i[2]&&i[1]<=e&&e<=i[3]}function Rl(i,t){const e=i[0],n=i[1],o=i[2],r=i[3],s=t[0],a=t[1];let l=oe.UNKNOWN;return s<e?l=l|oe.LEFT:s>o&&(l=l|oe.RIGHT),a<n?l=l|oe.BELOW:a>r&&(l=l|oe.ABOVE),l===oe.UNKNOWN&&(l=oe.INTERSECTING),l}function je(){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 Al(i,t,e,n,o){const r=_r(o);return oc(r,i,t,e,n)}function Eo(i,t){return i[0]==t[0]&&i[2]==t[2]&&i[1]==t[1]&&i[3]==t[3]}function nc(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 oc(i,t,e,n,o){for(;e<n;e+=o)T0(i,t[e],t[e+1]);return i}function T0(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 Pl(i,t){let e;return e=t(Bs(i)),e||(e=t(Us(i)),e)||(e=t(Ws(i)),e)||(e=t(Ki(i)),e)?e:!1}function Ll(i){let t=0;return Fl(i)||(t=Nt(i)*Ye(i)),t}function Bs(i){return[i[0],i[1]]}function Us(i){return[i[2],i[1]]}function Zi(i){return[(i[0]+i[2])/2,(i[1]+i[3])/2]}function I0(i,t){let e;return t==="bottom-left"?e=Bs(i):t==="bottom-right"?e=Us(i):t==="top-left"?e=Ki(i):t==="top-right"?e=Ws(i):gt(!1,13),e}function Dl(i,t,e,n,o){const[r,s,a,l,h,u,d,c]=Ol(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 Ol(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],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 Ye(i){return i[3]-i[1]}function Wn(i,t,e){const n=e||je();return Zt(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 Ki(i){return[i[0],i[3]]}function Ws(i){return[i[2],i[3]]}function Nt(i){return i[2]-i[0]}function Zt(i,t){return i[0]<=t[2]&&i[2]>=t[0]&&i[1]<=t[3]&&i[3]>=t[1]}function Fl(i){return i[2]<i[0]||i[3]<i[1]}function z0(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i}function R0(i,t,e){let n=!1;const o=Rl(i,t),r=Rl(i,e);if(o===oe.INTERSECTING||r===oe.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;!!(r&oe.ABOVE)&&!(o&oe.ABOVE)&&(m=c-(f-h)/g,n=m>=s&&m<=l),!n&&!!(r&oe.RIGHT)&&!(o&oe.RIGHT)&&(p=f-(c-l)*g,n=p>=a&&p<=h),!n&&!!(r&oe.BELOW)&&!(o&oe.BELOW)&&(m=c-(f-a)/g,n=m>=s&&m<=l),!n&&!!(r&oe.LEFT)&&!(o&oe.LEFT)&&(p=f-(c-s)*g,n=p>=a&&p<=h)}return n}function A0(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 S0(r,s,e)}function rc(i,t){const e=t.getExtent(),n=Zi(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 P0(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 L0(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function D0(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 Nl(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 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 Gl(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 O0(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 sc(i,t){return Math.sqrt(wi(i,t))}function F0(i,t){return wi(i,Nl(i,t))}function jl(i,t){if(t.canWrapX()){const e=Nt(t.getExtent()),n=ac(i,t,e);n&&(i[0]-=n*e)}return i}function ac(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 lc=63710088e-1;function hc(i,t,e){e=e||lc;const n=Gn(i[1]),o=Gn(t[1]),r=(o-n)/2,s=Gn(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 Vs(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+=Gn(a-o)*(2+Math.sin(Gn(r))+Math.sin(Gn(l))),o=a,r=l}return e*t*t/2}function uc(i,t){t=t||{};const e=t.radius||lc,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(Vs(s[0],e)),l=1,h=s.length;l<h;++l)r-=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],r+=Math.abs(Vs(a[0],e)),u=1,d=a.length;u<d;++u)r-=Math.abs(Vs(a[u],e));break}case"GeometryCollection":{const c=i.getGeometries();for(l=0,h=c.length;l<h;++l)r+=uc(c[l],t);break}default:throw new Error("Unsupported geometry type: "+o)}return r}let Bl=!0;function N0(i){Bl=!(i===void 0?!0:i)}function Ul(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 dc(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 cc(i){E0(i.getCode(),i),Co(i,i,Ul)}function G0(i){i.forEach(cc)}function Gt(i){return typeof i=="string"?C0(i):i||null}function Xs(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/bo[n])}}else{const s=i.getUnits();if(s=="degrees"&&!n||n=="degrees")o=t;else{const a=Xl(i,Gt("EPSG:4326"));if(a===dc&&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=hc(h.slice(0,2),h.slice(2,4)),d=hc(h.slice(4,6),h.slice(6,8));o=(u+d)/2}const l=n?bo[n]:i.getMetersPerUnit();l!==void 0&&(o/=l)}}return o}function Wl(i){G0(i),i.forEach(function(t){i.forEach(function(e){t!==e&&Co(t,e,Ul)})})}function j0(i,t,e,n){i.forEach(function(o){t.forEach(function(r){Co(o,r,e),Co(r,o,n)})})}function Vl(i,t){return i?typeof i=="string"?Gt(i):i:Gt(t)}function fc(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 B0(i,t,e,n){const o=Gt(i),r=Gt(t);Co(o,r,fc(e)),Co(r,o,fc(n))}function U0(i,t){const e=Ys(i,t!==void 0?t:"EPSG:3857","EPSG:4326"),n=e[0];return(n<-180||n>180)&&(e[0]=qi(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()||Xl(i,t)===Ul)&&e}function Xl(i,t){const e=i.getCode(),n=t.getCode();let o=ec(e,n);return o||(o=dc),o}function br(i,t){const e=Gt(i),n=Gt(t);return Xl(e,n)}function Ys(i,t,e){return br(t,e)(i,void 0,i.length)}function W0(i,t,e,n){const o=br(t,e);return A0(i,o,void 0,n)}function So(i,t){return i}function Wt(i,t){return Bl&&!ei(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(Bl=!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=ac(n,i,a),r&&(n[0]=n[0]-r*a),n[0]=qt(n[0],s[0],s[2]),n[1]=qt(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 V0(){Wl(Qd),Wl(tc),j0(tc,Qd,b0,k0)}V0();const re={ADD:"add",REMOVE:"remove"},mc={LENGTH:"length"};class qs extends Je{constructor(t,e,n){super(t),this.element=e,this.index=n}}class X0 extends ui{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(mc.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 qs(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,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 qs(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 o=this.array_[t];this.array_[t]=e,this.dispatchEvent(new qs(re.REMOVE,o,t)),this.dispatchEvent(new qs(re.ADD,e,t))}updateLength_(){this.set(mc.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 Zd(58)}}const qe=X0,pc=new Array(6);function $e(){return[1,0,0,1,0,0]}function vc(i){return $s(i,1,0,0,1,0,0)}function ql(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],f=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*f+s,i[5]=n*c+r*f+a,i}function $s(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 Y0(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 Qt(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 ql(i,$s(pc,t,0,0,e,0,0))}function q0(i,t,e){return $s(i,t,0,0,e,0,0)}function $0(i,t,e){return ql(i,$s(pc,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 Zl(i,t){const e=Z0(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 Z0(i){return i[0]*i[3]-i[1]*i[2]}let _c;function yc(i){const t="matrix("+i.join(", ")+")";if(wl)return t;const e=_c||(_c=document.createElement("div"));return e.style.transform=t,e.style.transform}const K0=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,H0=/^([a-z]*)$|^hsla?\(.*\)$/i;function Kl(i){return typeof i=="string"?i:bc(i)}function Q0(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 J0=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=tv(n),t[n]=o,++e}return o}}();function kr(i){return Array.isArray(i)?i:J0(i)}function tv(i){let t,e,n,o,r;if(H0.exec(i)&&(i=Q0(i)),K0.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),xc(r)):i.startsWith("rgb(")?(r=i.slice(4,-1).split(",").map(Number),r.push(1),xc(r)):gt(!1,14);return r}function xc(i){return i[0]=qt(i[0]+.5|0,0,255),i[1]=qt(i[1]+.5|0,0,255),i[2]=qt(i[2]+.5|0,0,255),i[3]=qt(i[3],0,1),i}function bc(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 ev{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=kc(t,e,n);return o in this.cache_?this.cache_[o]:null}set(t,e,n,o){const r=kc(t,e,n);this.cache_[r]=o,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function kc(i,t,e){const n=e?Kl(e):"null";return t+":"+i+":"+n}const Zs=new ev;class iv extends bl{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]),Zl(o,n)}forEachFeatureAtCoordinate(t,e,n,o,r,s,a,l){let h;const u=e.viewState;function d(x,k,w,C){return r.call(s,k,x?w:null,C)}const c=u.projection,f=jl(t.slice(),c),g=[[0,0]];if(c.canWrapX()&&o){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],C=w.layer;if(C.hasRenderer()&&Sl(w,u)&&a.call(l,C)){const M=C.getRenderer(),S=C.getSource();if(M&&S){const z=S.getWrapX()?f:t,P=d.bind(null,w.managed);v[0]=z[0]+g[x][0],v[1]=z[1]+g[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){Zs.canExpireCache()&&t.postRenderFunctions.push(nv)}}function nv(i,t){Zs.expire()}const ov=iv;class rv extends Je{constructor(t,e,n,o){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=o}}const wc=rv,Mc="10px sans-serif",Ci="#000",Ks="round",wr=[],Mr=0,To="round",Cr=10,Er="#000",Sr="center",Hs="middle",Xn=[0,0,0,0],Tr=1,Ei=new ui;let Io=null,Hl;const Ql={},sv=function(){const t="32px ",e=["monospace","serif"],n=e.length,o="wmytzilWMYTZIL@#/&?$%10";let r,s;function a(h,u,d){let c=!0;for(let f=0;f<n;++f){const g=e[f];if(s=Qs(h+" "+u+" "+t+g,o),d!=g){const m=Qs(h+" "+u+" "+t+d+","+g,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 f=u[d];Ei.get(f)<100&&(a.apply(this,f.split(`
6
+ `))?(mr(Ql),Io=null,Hl=void 0,Ei.set(f,100)):(Ei.set(f,Ei.get(f)+1,!0),h=!1))}h&&(clearInterval(r),r=void 0)}return function(h){const u=$d(h);if(!u)return;const d=u.families;for(let c=0,f=d.length;c<f;++c){const g=d[c],m=u.style+`
7
7
  `+u.weight+`
8
- `+g;Ei.get(m)===void 0&&(Ei.set(m,100,!0),a(u.style,u.weight,g)||(Ei.set(m,0,!0),r===void 0&&(r=setInterval(l,32))))}}}(),sv=function(){let i;return function(t){let e=Hl[t];if(e==null){if(kl){const n=qd(t),o=Mc(t,"Žg");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!=Kl&&(zo.font=i,Kl=zo.font),zo.measureText(t)}function Qs(i,t){return Mc(i,t).width}function Cc(i,t,e){if(t in e)return e[t];const n=t.split(`
9
- `).reduce((o,r)=>Math.max(o,Qs(i,r)),0);return e[t]=n,n}function av(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===`
10
- `||h===u){r=Math.max(r,s),o.push(s),s=0,a+=l;continue}const c=t[h+1]||i.font,f=Qs(c,d);e.push(f),s+=f;const g=sv(c);n.push(g),l=Math.max(l,g)}return{width:r,height:a,widths:e,heights:n,lineWidths:o}}function lv(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]),hv(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 hv(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 uv extends nv{constructor(t){super(t),this.fontChangeListenerKey_=mt(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(qi.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(!El(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);l0(this.element_,this.children_),this.dispatchRenderEvent(qi.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}}const dv=uv;class Hi extends Je{constructor(t,e){super(t),this.layer=e}}const Ql={LAYERS:"layers"};class Jl extends Kd{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(Ql.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new qe(n.slice(),{unique:!0}):gt(typeof n.getArray=="function",43):n=new qe(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(mt(t,re.ADD,this.handleLayersAdd_,this),mt(t,re.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 Hi("addlayer",r))}this.changed()}registerLayerListeners_(t){const e=[mt(t,yo.PROPERTYCHANGE,this.handleLayerChange_,this),mt(t,tt.CHANGE,this.handleLayerChange_,this)];t instanceof Jl&&e.push(mt(t,"addlayer",this.handleLayerGroupAdd_,this),mt(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(Ft),delete this.listenerKeys_[n],this.dispatchEvent(new Hi("removelayer",e)),this.changed()}getLayers(){return this.get(Ql.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 Hi("removelayer",n[o]))}this.set(Ql.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 cv extends Je{constructor(t,e,n){super(t),this.map=e,this.frameState=n!==void 0?n:null}}const Ro=cv;class fv 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=fv,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 gv extends Rs{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_=mt(n,Sl.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=mt(n,Sl.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_,Wd?{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"?On:o}if(this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(mt(n,Mt.POINTERMOVE,this.handlePointerMove_,this),mt(n,Mt.POINTERUP,this.handlePointerUp_,this),mt(this.element_,Mt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(mt(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 mv=gv,ta=1/0;class pv{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!=ta?(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==ta?delete this.queuedElements_[this.keyFunction_(s)]:(n[o]=l,e[o++]=s);e.length=o,n.length=o,this.heapify_()}}const vv=pv,G={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class _v extends vv{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===G.LOADED||n===G.ERROR||n===G.EMPTY){n!==G.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===G.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++n,r.load())}}const yv=_v;function xv(i,t,e,n,o){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return ta;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 $t={ANIMATING:0,INTERACTING:1},ii={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Ec=42,th=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,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=qt(n[0],c,f),_=qt(n[1],g,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]-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 bv(i){return i}function eh(i,t,e,n){const o=Nt(t)/e[0],r=Ye(t)/e[1];return n?Math.min(i,Math.max(o,r)):Math.min(i,Math.min(o,r))}function ih(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),qt(n,e/2,t*2)}function kv(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?eh(l,e,s,n):l;if(a)return t?ih(o,u,h):qt(o,h,u);const d=Math.min(u,o),c=Math.floor(bl(i,d,r));return i[c]>u&&c<i.length-1?i[c+1]:i[c]}else return}}function wv(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?eh(t,o,l,r):t;if(h)return n?ih(s,u,e):qt(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 qt(_,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?eh(i,n,a,o):i;return!e||!l?qt(r,t,h):ih(r,h,t)}else return}}function nh(i){if(i!==void 0)return 0}function Ic(i){if(i!==void 0)return i}function Mv(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 Cv(i){return i=i||Gn(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 Ev(i){return 3*i*i-2*i*i*i}function Sv(i){return i}function Qi(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 oh(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 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 Tv(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,f=i[d+1]-h;a[u++]=l+o*c,a[u++]=h+r*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,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=$e();class Iv extends hi{constructor(){super(),this.extent_=je(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Hp(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 I0(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=Ye(h)/Ye(l);return Mi(Ac,h[0],h[3],u,-u,0,0,0),Qi(r,0,r.length,a,Ac,s),br(n,e)(r,s,a)}:br(n,e);return this.applyTransform(o),this}}const Pc=Iv;class zv extends Pc{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return Rl(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=ea(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){et()}setLayout(t,e,n){let o;if(t)o=ea(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=Rv(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();oh(n,0,n.length,o,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=$i(this.getExtent()));const o=this.getFlatCoordinates();if(o){const r=this.getStride();Tv(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 Rv(i){let t;return i==2?t="XY":i==3?t="XYZ":i==4&&(t="XYZM"),t}function ea(i){let t;return i=="XY"?t=2:i=="XYZ"||i=="XYM"?t=3:i=="XYZM"&&(t=4),t}function Av(i,t,e){const n=i.getFlatCoordinates();if(n){const o=i.getStride();return Qi(n,0,n.length,o,t,e)}else return null}const Ji=zv;function Lc(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 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,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=Nn(r,s,a,l);h>o&&(o=h),r=a,s=l}return o}function sh(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}return o}function Pv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];o=sh(i,t,a,n,o),t=a[a.length-1]}return o}function ah(i,t,e,n,o,r,s,a,l,h,u){if(t==e)return h;let d,c;if(o===0)if(c=Nn(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(Lc(i,f-n,f,n,s,a,u),c=Nn(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))/o|0,1);if(r&&(Lc(i,e-n,t,n,s,a,u),c=Nn(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 lh(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 f=e[d];h=ah(i,t,f,n,o,r,s,a,l,h,u),t=f}return h}function Lv(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 f=e[d];h=lh(i,t,f,n,o,r,s,a,l,h,u),t=f[f.length-1]}return h}function Dc(i,t,e,n){for(let o=0,r=e.length;o<r;++o)i[t++]=e[o];return t}function ia(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 hh(i,t,e,n,o){o=o||[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=ia(i,t,e[s],n);o[r++]=l,t=l}return o.length=r,o}function Dv(i,t,e,n,o){o=o||[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=hh(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 uh(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 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=c0(y,x,g,m,p,_);k>f&&(u=v,f=k)}f>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 Ov(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=uh(i,t,u,n,o,r,s),a.push(s),t=u}return s}function Yn(i,t){return t*Math.round(i/t)}function Fv(i,t,e,n,o,r,s){if(t==e)return s;let a=Yn(i[t],o),l=Yn(i[t+1],o);t+=n,r[s++]=a,r[s++]=l;let h,u;do if(h=Yn(i[t],o),u=Yn(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=Yn(i[t],o),c=Yn(i[t+1],o);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}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=Fv(i,t,u,n,o,r,s),a.push(s),t=u}return s}function Nv(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 dh(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 Gv(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 na extends Ji{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 na(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,n,o){return o<Bn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(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=uh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new na(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ia(this.flatCoordinates,0,t,this.stride),this.changed()}}const Gc=na;let jc=class extends Ji{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new jc(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){const r=this.flatCoordinates,s=Nn(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 Il(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Dc(this.flatCoordinates,0,t,this.stride),this.changed()}};const ni=jc;function jv(i,t,e,n,o){return!Al(o,function(s){return!qn(i,t,e,n,s[0],s[1])})}function qn(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||!qn(i,t,e[0],n,o,r))return!1;for(let s=1,a=e.length;s<a;++s)if(qn(i,e[s-1],e[s],n,o,r))return!1;return!0}function Bv(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 fh(i,t,e,n,o,r,s){let a,l,h,u,d,c,f;const g=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],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(Ln),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=o[r]),s?(s.push(p,g,_),s):[p,g,_]}function Bc(i,t,e,n,o){let r=[];for(let s=0,a=e.length;s<a;++s){const l=e[s];r=fh(i,t,l,n,o,2*s,r),t=l[l.length-1]}return r}function Uc(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 oa(i,t,e,n,o){const r=nc(je(),i,t,e,n);return Zt(o,r)?Un(o,r)||r[0]>=o[0]&&r[2]<=o[2]||r[1]>=o[1]&&r[3]<=o[3]?!0:Uc(i,t,e,n,function(s,a){return z0(o,s,a)}):!1}function Uv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){if(oa(i,t,e[r],n,o))return!0;t=e[r]}return!1}function Wc(i,t,e,n,o){return!!(oa(i,t,e,n,o)||qn(i,t,e,n,o[0],o[1])||qn(i,t,e,n,o[0],o[3])||qn(i,t,e,n,o[2],o[1])||qn(i,t,e,n,o[2],o[3]))}function Vc(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(jv(i,e[r-1],e[r],n,o)&&!oa(i,e[r-1],e[r],n,o))return!1;return!0}function Wv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];if(Vc(i,t,a,n,o))return!0;t=a[a.length-1]}return!1}function Vv(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 gh(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 Xc(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=gh(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 Xv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];if(!Xc(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=gh(i,t,a,n);(r===0?o&&l||!o&&!l:o&&!l||!o&&l)&&Vv(i,t,a,n),t=a}return t}function Yc(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(!gh(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 Ji{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<Bn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(sh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),lh(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=$i(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_,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;Xc(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 Vc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=hh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const $n=Po;function qc(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 qv(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 $v(h,r,i.getRadius(),e),h}function $v(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+Yi(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 Zv 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&&F0(),t.center&&(t.center=Wt(t.center,this.projection_)),t.extent&&(t.extent=Ki(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=Hv(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=Kv(t),r=n.constraint,s=Qv(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=Wt(o.center,this.getProjection())),o.anchor&&(o=Object.assign({},o),o.anchor=Wt(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&&ra(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||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=Yi(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;d.targetRotation=l+c,l=d.targetRotation}Jv(d)?d.complete=!0:r+=d.duration,h.push(d)}this.animations_.push(h),this.setHint($t.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[$t.ANIMATING]>0}getInteracting(){return this.hints_[$t.INTERACTING]>0}cancelAnimations(){this.setHint($t.ANIMATING,-this.hints_[$t.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e<n;++e){const o=this.animations_[e];if(o[0].callback&&ra(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],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?Yi(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(r){this.animations_[n]=null,this.setHint($t.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const s=o[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 o=this.getCenterInternal();return o!==void 0&&(n=[o[0]-e[0],o[1]-e[1]],Nl(n,t-this.getRotation()),P0(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 Xl(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),Ll(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(Ki(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=Nt(t)/e[0],o=Ye(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=bl(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=qt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,qt(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(!Ol(t),25);const o=Ki(t,this.getProjection());n=qc(o)}else if(t.getType()==="Circle"){const o=Ki(t.getExtent(),this.getProjection());n=qc(o),n.rotate(this.getRotation(),$i(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 f=r[d]*n-r[d+1]*o,g=r[d]*o+r[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 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=$i(a);c[0]+=(o[1]-o[3])/2*l,c[1]+=(o[0]-o[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:On;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(Wt(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&&Wt(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=Wt(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&&Wt(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($t.INTERACTING,1)}endInteraction(t,e,n){n=n&&Wt(n,this.getProjection()),this.endInteractionInternal(t,e,n)}endInteractionInternal(t,e,n){this.setHint($t.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 Kv(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 bv}function Hv(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"),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=kv(p,u,!g&&m,d):t=Tc(e,n,u,!g&&m,d)}else{const _=(f?Math.max(Nt(f),Ye(f)):360*ko.degrees/c.getMetersPerUnit())/th/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=wv(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 Qv(i){if(i.enableRotation!==void 0?i.enableRotation:!0){const e=i.constrainRotation;return e===void 0||e===!0?Cv():e===!1?Ic:typeof e=="number"?Mv(e):Ic}else return nh}function Jv(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=Zv;class t_ 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:"⇧",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+" "+Cl,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(Ls)}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(Ls);!r&&n===0?this.element.classList.add(Ls):r&&n!==0&&this.element.classList.remove(Ls)}this.label_.style.transform=o}this.rotation_=n}}const e_=t_;class i_ 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:"–",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+" "+Cl,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 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 n_=i_;function $c(i){i=i||{};const t=new qe;return(i.zoom!==void 0?i.zoom:!0)&&t.push(new n_(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&t.push(new e_(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&t.push(new v0(i.attributionOptions)),t}const _h={ACTIVE:"active"};class o_ 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 r_(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:Sv,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=o_;class s_ 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 a_=s_;class l_ 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=l_;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 h_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},u_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},d_=function(i){const t=i.map.getTargetElement(),e=i.map.getOwnerDocument().activeElement;return t.contains(e)},Zc=function(i){return i.map.getTargetElement().hasAttribute("tabindex")?d_(i):!0},kh=Dn,Kc=function(i){const t=i.originalEvent;return t.button==0&&!(o0&&r0&&t.ctrlKey)},c_=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},Qc=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 f_ 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(Zc,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();D0(o,s.getResolution()),Nl(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 g_=f_;class m_ extends nn{constructor(t){t=t||{},super({stopDown:xo}),this.condition_=t.condition?t.condition:u_,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===nh)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)&&Kc(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const p_=m_;class v_ extends xl{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 $n([o])}getGeometry(){return this.geometry_}}const __=v_,sa={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Ch extends Je{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class y_ extends nn{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new __(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 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(sa.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?sa.BOXEND:sa.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(sa.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}}const x_=y_;class b_ extends x_{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 k_=b_,Zn={LEFT:37,UP:38,RIGHT:39,DOWN:40};class w_ extends zr{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return wh(e)&&Qc(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==Zn.DOWN||o==Zn.LEFT||o==Zn.RIGHT||o==Zn.UP)){const s=t.map.getView(),a=s.getResolution()*this.pixelDelta_;let l=0,h=0;o==Zn.DOWN?h=-a:o==Zn.LEFT?l=-a:o==Zn.RIGHT?l=a:h=a;const u=[l,h];Nl(u,s.getRotation()),r_(s,u,this.duration_),n.preventDefault(),e=!0}}return!e}}const M_=w_;class C_ extends zr{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:Qc,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 E_=C_;class S_{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 T_=S_;class I_ 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(Zc,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,n0&&o.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=Ud),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=-qt(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 z_=I_;class R_ 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===nh)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 A_=R_;class P_ 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 L_=P_;function tf(i){i=i||{};const t=new qe,e=new T_(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new p_),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new a_({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&t.push(new g_({onFocusOnly:i.onFocusOnly,kinetic:e})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&t.push(new A_),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new L_({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new M_),t.push(new E_({delta:i.zoomDelta,duration:i.zoomDuration}))),(i.mouseWheelZoom!==void 0?i.mouseWheelZoom:!0)&&t.push(new z_({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(i.shiftDragZoom!==void 0?i.shiftDragZoom:!0)&&t.push(new k_({duration:i.zoomDuration})),t}function ef(i){return i[0]>0&&i[1]>0}function D_(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 nf(i){if(i instanceof Fs){i.setMapInternal(null);return}i instanceof Js&&i.getLayers().forEach(nf)}function of(i,t){if(i instanceof Fs){i.setMapInternal(t);return}if(i instanceof Js){const e=i.getLayers().getArray();for(let n=0,o=e.length;n<o;++n)of(e[n],t)}}let O_=class extends hi{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=F_(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_=$e(),this.pixelToCoordinateTransform_=$e(),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||$c(),this.interactions=e.interactions||tf({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new yv(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(re.ADD,function(o){o.element.setMap(this)}.bind(this)),this.controls.addEventListener(re.REMOVE,function(o){o.element.setMap(null)}.bind(this)),this.interactions.addEventListener(re.ADD,function(o){o.element.setMap(this)}.bind(this)),this.interactions.addEventListener(re.REMOVE,function(o){o.element.setMap(null)}.bind(this)),this.overlays_.addEventListener(re.ADD,function(o){this.addOverlayInternal_(o.element)}.bind(this)),this.overlays_.addEventListener(re.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){of(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?Qt(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 qe){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=Wt(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?Qt(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 xv(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===Sl.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[$t.ANIMATING]||s[$t.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(qi.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(qi.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Ro(Vi.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Ro(Vi.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,Ml(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 dv(this)),this.mapBrowserEventHandler_=new mv(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_,Wd?{passive:!1}:!1);const e=this.getOwnerDocument().defaultView,n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.targetChangeHandlerKeys_=[mt(n,tt.KEYDOWN,this.handleBrowserEvent,this),mt(n,tt.KEYPRESS,this.handleBrowserEvent,this),mt(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_=mt(t,yo.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=mt(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 Hi("addlayer",t)),this.layerGroupPropertyListenerKeys_=[mt(t,yo.PROPERTYCHANGE,this.render,this),mt(t,tt.CHANGE,this.render,this),mt(t,"addlayer",this.handleLayerAdd_,this),mt(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){nf(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&&ef(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:Ll(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;r.nextExtent=Ll(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_||!Ol(this.previousExtent_)&&!So(r.extent,this.previousExtent_))&&(this.dispatchEvent(new Ro(Vi.MOVESTART,this,o)),this.previousExtent_=_r(this.previousExtent_)),this.previousExtent_&&!r.viewHints[$t.ANIMATING]&&!r.viewHints[$t.INTERACTING]&&!So(r.extent,this.previousExtent_)&&(this.dispatchEvent(new Ro(Vi.MOVEEND,this,r)),ec(r.extent,this.previousExtent_))),this.dispatchEvent(new Ro(Vi.POSTRENDER,this,r)),this.renderComplete_=this.hasListener(Vi.LOADSTART)||this.hasListener(Vi.LOADEND)||this.hasListener(qi.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(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],!ef(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 F_(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 qe(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 qe(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 qe(i.overlays.slice()):(gt(typeof i.overlays.getArray=="function",49),s=i.overlays):s=new qe,{controls:o,interactions:r,keyboardEventTarget:t,overlays:s,values:e}}const N_=O_,Eh="units",G_=[1,2,5],Rr=25.4/.28;class j_ 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=Xs(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="″",s*=3600):h<y?(u="′",s*=60):u="°"}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="μm",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,f,g,m,p,_;for(;;){g=Math.floor(d/3);const y=Math.pow(10,g);if(c=G_[(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 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=Xs(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 B_=j_;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_=mt(t,tt.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?U_(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 U_(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 rf{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&&!Vn(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 W_ extends rf{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(aa(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(aa(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return et()}readFeaturesFromObject(t,e){return et()}readGeometry(t,e){return this.readGeometryFromObject(aa(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return et()}readProjection(t){return this.readProjectionFromObject(aa(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 aa(i){if(typeof i=="string"){const t=JSON.parse(i);return t||null}else return i!==null?i:null}const V_=W_;function la(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 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=o*c,m=$p(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,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 X_(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 sf(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 ha extends Ji{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,o){return o<Bn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,o))}forEachSegment(t){return Uc(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 la(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return sf(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=uh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ha(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return oa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ia(this.flatCoordinates,0,t,this.stride),this.changed()}}const Kn=ha;class ua extends Ji{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 ua(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,o){return o<Bn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(sh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),lh(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,X_(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 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,o=[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=e[s],h=new Kn(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=la(e,n,l,r,.5);li(t,h),n=l}return t}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Ov(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,n),new ua(e,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(t){return Uv(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=hh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const zh=ua;class Rh extends Ji{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<Bn(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=Nn(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(Il(t,s,a))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ia(this.flatCoordinates,0,t,this.stride),this.changed()}}const Ar=Rh;function af(i,t,e,n){const o=[];let r=je();for(let s=0,a=e.length;s<a;++s){const l=e[s];r=Rl(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 da extends Ji{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 f=0,g=c.length;f<g;++f)c[f]+=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 da(this.flatCoordinates.slice(),this.layout,e);return n.applyProperties(this),n}closestPointXY(t,e,n,o){return o<Bn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Pv(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Lv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,n,o))}containsXY(t,e){return Bv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return Gv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Yc(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,dh(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=af(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Bc(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;Xv(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Yc(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Nv(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 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 $n(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 $n(e.slice(r,h),t,l);o.push(u),r=h}return o}getType(){return"MultiPolygon"}intersectsExtent(t){return Wv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=Dv(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=da;class ca 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(mt(this.geometries_[t],tt.CHANGE,this.changed,this))}clone(){const t=new ca(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,n,o){if(o<Bn(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 lf(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 ca(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=$i(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(lf(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 lf(i){const t=[];for(let e=0,n=i.length;e<n;++e)t.push(i[e].clone());return t}const Y_=ca;class q_ extends V_{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=Lh(s,e),delete r[t.getGeometryName()]),Fn(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 Lh(t,this.adaptOptions(e))}}function Ph(i,t){if(!i)return null;let e;switch(i.type){case"Point":{e=Z_(i);break}case"LineString":{e=K_(i);break}case"Polygon":{e=t1(i);break}case"MultiPoint":{e=Q_(i);break}case"MultiLineString":{e=H_(i);break}case"MultiPolygon":{e=J_(i);break}case"GeometryCollection":{e=$_(i);break}default:throw new Error("Unsupported GeoJSON type: "+i.type)}return Th(e,!1,t)}function $_(i,t){const e=i.geometries.map(function(n){return Ph(n,t)});return new Y_(e)}function Z_(i){return new ni(i.coordinates)}function K_(i){return new Kn(i.coordinates)}function H_(i){return new zh(i.coordinates)}function Q_(i){return new Ar(i.coordinates)}function J_(i){return new Ah(i.coordinates)}function t1(i){return new $n(i.coordinates)}function Lh(i,t){i=Th(i,!0,t);const e=i.getType();let n;switch(e){case"Point":{n=s1(i);break}case"LineString":{n=i1(i);break}case"Polygon":{n=a1(i,t);break}case"MultiPoint":{n=o1(i);break}case"MultiLineString":{n=n1(i);break}case"MultiPolygon":{n=r1(i,t);break}case"GeometryCollection":{n=e1(i,t);break}case"Circle":{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return n}function e1(i,t){return t=Object.assign({},t),delete t.featureProjection,{type:"GeometryCollection",geometries:i.getGeometriesArray().map(function(n){return Lh(n,t)})}}function i1(i,t){return{type:"LineString",coordinates:i.getCoordinates()}}function n1(i,t){return{type:"MultiLineString",coordinates:i.getCoordinates()}}function o1(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 s1(i,t){return{type:"Point",coordinates:i.getCoordinates()}}function a1(i,t){let e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:i.getCoordinates(e)}}const Hn=q_;class Dh{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new Dh({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const se=Dh,Jt={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 hf=Oh;function uf(i,t,e){const n=i;let o=!0,r=!1,s=!1;const a=[As(n,tt.LOAD,function(){s=!0,r||t()})];return n.src&&s0?(r=!0,n.decode().then(function(){o&&t()}).catch(function(l){o&&(s?t():e())})):a.push(As(n,tt.ERROR,e)),function(){o=!1,a.forEach(Ft)}}let Pr=null;class l1 extends Rs{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_===Jt.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_=Jt.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Jt.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_===Jt.IDLE){this.image_||this.initializeImage_(),this.imageState_=Jt.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=uf(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Jt.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=Zl(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 h1(i,t,e,n,o,r){let s=Zs.get(t,n,r);return s||(s=new l1(i,t,e,n,o,r),Zs.set(t,n,r,s)),s}class Fh extends hf{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||K(s)),gt(a!==void 0&&a.length>0,6);const l=t.src!==void 0?Jt.IDLE:Jt.LOADED;this.color_=t.color!==void 0?kr(t.color):null,this.iconImage_=h1(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 fa=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 hf{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 Jt.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 f=e/2/c,g=e/2*(u/d),p=Math.sqrt((o+f)*(o+f)+g*g)-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 on=jh;class rn{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=cf,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_=cf,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function u1(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 d1(i,t){if(!Bh){const e=new se({color:"rgba(255,255,255,0.4)"}),n=new ke({color:"#3399CC",width:1.25});Bh=[new rn({image:new on({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Bh}function df(){const i={},t=[255,255,255,1],e=[0,153,255,1],n=3;return i.Polygon=[new rn({fill:new se({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 on({radius:n*2,fill:new se({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 cf(i){return i.getGeometry()}const te=rn,c1="#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 se({color:c1}),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 ff=Uh;function f1(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Wh={};Wh.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,f=i[t+d];for(d+=c,r=f&(1<<-u)-1,f>>=-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:(f?-1:1)*(1/0);s=s+Math.pow(2,n),r=r-h}return(f?-1:1)*s*Math.pow(2,r-n)},Wh.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,f=n?0:r-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,o),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;i[e+f]=a&255,f+=g,a/=256,o-=8);for(s=s<<o|a,h+=o;h>0;i[e+f]=s&255,f+=g,s/=256,h-=8);i[e+f-g]|=m*128};var g1=Tt,ma=Wh;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 Vh=(1<<16)*(1<<16),gf=1/Vh,m1=12,mf=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=pa(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=vf(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=pa(this.buf,this.pos)+pa(this.buf,this.pos+4)*Vh;return this.pos+=8,i},readSFixed64:function(){var i=pa(this.buf,this.pos)+vf(this.buf,this.pos+4)*Vh;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,p1(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>=m1&&mf?z1(this.buf,t,i):I1(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),Do(this.buf,i,this.pos),this.pos+=4},writeSFixed32:function(i){this.realloc(4),Do(this.buf,i,this.pos),this.pos+=4},writeFixed64:function(i){this.realloc(8),Do(this.buf,i&-1,this.pos),Do(this.buf,Math.floor(i*gf),this.pos+4),this.pos+=8},writeSFixed64:function(i){this.realloc(8),Do(this.buf,i&-1,this.pos),Do(this.buf,Math.floor(i*gf),this.pos+4),this.pos+=8},writeVarint:function(i){if(i=+i||0,i>268435455||i<0){v1(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=R1(this.buf,i,this.pos);var e=this.pos-t;e>=128&&pf(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&&pf(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,x1,t)},writePackedSVarint:function(i,t){t.length&&this.writeMessage(i,b1,t)},writePackedBoolean:function(i,t){t.length&&this.writeMessage(i,M1,t)},writePackedFloat:function(i,t){t.length&&this.writeMessage(i,k1,t)},writePackedDouble:function(i,t){t.length&&this.writeMessage(i,w1,t)},writePackedFixed32:function(i,t){t.length&&this.writeMessage(i,C1,t)},writePackedSFixed32:function(i,t){t.length&&this.writeMessage(i,E1,t)},writePackedFixed64:function(i,t){t.length&&this.writeMessage(i,S1,t)},writePackedSFixed64:function(i,t){t.length&&this.writeMessage(i,T1,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 p1(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 Lo(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 Lo(i,t,e){return e?t*4294967296+(i>>>0):(t>>>0)*4294967296+(i>>>0)}function v1(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),_1(e,n,t),y1(n,t)}function _1(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 y1(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 pf(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 x1(i,t){for(var e=0;e<i.length;e++)t.writeVarint(i[e])}function b1(i,t){for(var e=0;e<i.length;e++)t.writeSVarint(i[e])}function k1(i,t){for(var e=0;e<i.length;e++)t.writeFloat(i[e])}function w1(i,t){for(var e=0;e<i.length;e++)t.writeDouble(i[e])}function M1(i,t){for(var e=0;e<i.length;e++)t.writeBoolean(i[e])}function C1(i,t){for(var e=0;e<i.length;e++)t.writeFixed32(i[e])}function E1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed32(i[e])}function S1(i,t){for(var e=0;e<i.length;e++)t.writeFixed64(i[e])}function T1(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 Do(i,t,e){i[e]=t,i[e+1]=t>>>8,i[e+2]=t>>>16,i[e+3]=t>>>24}function vf(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+(i[t+3]<<24)}function I1(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 z1(i,t,e){return mf.decode(i.subarray(t,e))}function R1(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 va extends Ji{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 va(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(Zt(t,e)){const n=this.getCenter();return t[0]<=n[0]&&t[2]>=n[0]||t[1]<=n[1]&&t[3]>=n[1]?!0:Al(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=Dc(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(oh(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()}}va.prototype.transform;const A1=va,_f=$e();class Lr{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_):Rl(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=$i(this.getExtent());this.flatInteriorPoints_=fh(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=af(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=Bc(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 o=0,r=n.length;o<r;++o){const s=n[o],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 o=Ye(n)/Ye(e);Mi(_f,n[0],n[3],o,-o,0,0,0),Qi(this.flatCoordinates_,0,this.flatCoordinates_.length,2,_f,this.flatCoordinates_)}}getEnds(){return this.ends_}}Lr.prototype.getEndss=Lr.prototype.getEnds,Lr.prototype.getFlatCoordinates=Lr.prototype.getOrientedFlatCoordinates;const Xh=Lr;class P1 extends rf{constructor(t){super(),t=t||{},this.dataProjection=new Ns({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=N1(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 g=Yv(l,h);d=g.length>1?new Ah(l,"XY",g):new $n(l,"XY",h)}else d=u==="Point"?new ni(l,"XY"):u==="LineString"?new Kn(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 f=Th(d,!1,n);r.setGeometry(f),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 g1(t),s=r.readFields(L1,{}),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 f=F1(r,h,d),g=this.createFeature_(r,f,e);g!==null&&a.push(g)}}return a}readProjection(t){return this.dataProjection}setLayers(t){this.layers_=t}}function L1(i,t,e){if(i===3){const n={keys:[],values:[],features:[]},o=e.readVarint()+e.pos;e.readFields(D1,n,o),n.length=n.features.length,n.length&&(t[n.name]=n)}}function D1(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 O1(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 F1(i,t,e){i.pos=t.features[e];const n=i.readVarint()+i.pos,o={layer:t,type:0,properties:{}};return i.readFields(O1,o,n),o}function N1(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 G1=P1;function j1(i,t,e,n,o){yf(i,t,e||0,n||i.length-1,o||B1)}function yf(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));yf(i,t,u,d,o)}var c=i[t],f=e,g=n;for(Dr(i,e,t),o(i[n],c)>0&&Dr(i,e,n);f<g;){for(Dr(i,f,g),f++,g--;o(i[f],c)<0;)f++;for(;o(i[g],c)>0;)g--}o(i[e],c)===0?Dr(i,e,g):(g++,Dr(i,g,n)),g<=t&&(e=g+1),t<=g&&(n=g-1)}}function Dr(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function B1(i,t){return i<t?-1:i>t?1:0}let xf=class{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(!ya(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;ya(t,l)&&(e.leaf?n.push(a):qh(t,l)?this._all(a,n):r.push(a))}e=r.pop()}return n}collides(t){let e=this.data;if(!ya(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(ya(t,s)){if(e.leaf||qh(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=U1(t,n.children,e);if(u!==-1)return n.children.splice(u,1),r.push(n),this._condense(r),this}!h&&!n.leaf&&qh(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));bf(t,e,n,h,this.compareMinX);for(let u=e;u<=n;u+=h){const d=Math.min(u+h-1,n);bf(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,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=Yh(h),d=X1(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=Yh(l)+Yh(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:W1,r=t.leaf?this.compareMinY:V1,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=_a(s)+_a(a);for(let h=e;h<n-e;h++){const u=t.children[h];Fr(s,t.leaf?r(u):u),l+=_a(s)}for(let h=n-e-1;h>=e;h--){const u=t.children[h];Fr(a,t.leaf?r(u):u),l+=_a(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 U1(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 W1(i,t){return i.minX-t.minX}function V1(i,t){return i.minY-t.minY}function Yh(i){return(i.maxX-i.minX)*(i.maxY-i.minY)}function _a(i){return i.maxX-i.minX+(i.maxY-i.minY)}function X1(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 qh(i,t){return i.minX<=t.minX&&i.minY<=t.minY&&t.maxX<=i.maxX&&t.maxY<=i.maxY}function ya(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 bf(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;j1(i,s,t,e,o),r.push(t,s,s,e)}}function kf(i){return new te({fill:Nr(i,""),stroke:Gr(i,""),text:q1(i),image:$1(i)})}function Nr(i,t){const e=i[t+"fill-color"];if(!!e)return new se({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 q1(i){const t=i["text-value"];return t?new ff({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 $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 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 on({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 wf={RENDER_ORDER:"renderOrder"};class Z1 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(wf.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 xf(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(wf.RENDER_ORDER,t)}setStyle(t){let e;if(t===void 0)e=d1;else if(t===null)e=null;else if(typeof t=="function")e=t;else if(t instanceof te)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 te?o[r]=s:o[r]=kf(s)}e=o}else e=kf(t);this.style_=e,this.styleFunction_=t===null?void 0:u1(this.style_),this.changed()}}const Mf=Z1,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},xa=[jr.FILL],sn=[jr.STROKE],Qn=[jr.BEGIN_PATH],Cf=[jr.CLOSE_PATH],J=jr;class K1{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 Ef=K1;class H1 extends Ef{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],js(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 f=!0,g,m,p;for(g=e+o;g<n;g+=o)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===oe.INTERSECTING?(a[l++]=c[0],a[l++]=c[1],f=!1):f=!0,u=c[0],d=c[1],m=p;return(r&&f||g===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 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([J.CUSTOM,a,d,t,n,dh]),this.hitDetectionInstructions.push([J.CUSTOM,a,d,t,o||n,dh]);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([J.CUSTOM,a,u,t,n,Ir]),this.hitDetectionInstructions.push([J.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([J.CUSTOM,a,h,t,n,tn]),this.hitDetectionInstructions.push([J.CUSTOM,a,h,t,o||n,tn]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,s),h>a&&(this.instructions.push([J.CUSTOM,a,h,t,n,tn]),this.hitDetectionInstructions.push([J.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([J.CUSTOM,a,h,t,n]),this.hitDetectionInstructions.push([J.CUSTOM,a,h,t,o||n]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[J.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[J.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==J.END_GEOMETRY?s=e:r==J.BEGIN_GEOMETRY&&(o[2]=e,Zp(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:Ks;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=[J.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(!0),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[J.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&&!Wi(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=[J.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=H1;class Q1 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([J.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([J.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([J.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([J.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 J1=Q1;class ty 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=[J.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([J.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,wr,Mr],Qn);const s=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(s,0,s.length,a),this.hitDetectionInstructions.push(sn),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([J.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],Qn);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(sn),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(sn),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(sn),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(Qn)}}const ey=ty;class iy 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(Qn),this.hitDetectionInstructions.push(Qn);for(let h=0;h<l;++h){const u=n[h],d=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,u,o,!0,!a),f=[J.MOVE_TO_LINE_TO,d,c];this.instructions.push(f),this.hitDetectionInstructions.push(f),a&&(this.instructions.push(Cf),this.hitDetectionInstructions.push(Cf)),e=u}return s&&(this.instructions.push(xa),this.hitDetectionInstructions.push(xa)),a&&(this.instructions.push(sn),this.hitDetectionInstructions.push(sn)),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([J.SET_FILL_STYLE,Ci]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([J.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=[J.CIRCLE,l];this.instructions.push(Qn,h),this.hitDetectionInstructions.push(Qn,h),n.fillStyle!==void 0&&(this.instructions.push(xa),this.hitDetectionInstructions.push(xa)),n.strokeStyle!==void 0&&(this.instructions.push(sn),this.hitDetectionInstructions.push(sn)),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([J.SET_FILL_STYLE,Ci]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([J.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([J.SET_FILL_STYLE,Ci]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([J.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]=Yn(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 Sf=iy;function ny(i,t,e,n,o){let r=e,s=e,a=0,l=0,h=e,u,d,c,f,g,m,p,_,v,y;for(d=e;d<n;d+=o){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,r=h,s=d),l=0,h=d-o)),c=f,p=v,_=y),g=x,m=k}return l+=f,l>a?[h,d]:[r,s]}const Ur={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class oy 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(!Zt(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 f=0,g;for(let m=0,p=d.length;m<p;++m){if(c==null){const v=ny(r.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=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 f=r.padding;if(f!=Xn&&(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),f=[p,_,v,y]}const g=this.pixelRatio;this.instructions.push([J.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,f==Xn?Xn:f.map(function(p){return p*g}),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/g;this.hitDetectionInstructions.push([J.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,void 0,this.declutterImageWithText_,f,!!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=Ur[o.textBaseline],u=this.textOffsetY_*l,d=this.text_,c=n?n.lineWidth*Math.abs(o.scale[0])/2:0;this.instructions.push([J.DRAW_CHARS,t,e,h,o.overflow,a,o.maxAngle,l,u,r,c*l,d,s,1]),this.hitDetectionInstructions.push([J.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 g=a.getLineDash(),m=a.getLineDashOffset(),p=a.getWidth(),_=a.getMiterLimit();r.lineCap=a.getLineCap()||Ks,r.lineDash=g?g.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;rv(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()||Xn,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_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:K(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:"|"+K(o.fillStyle):""}this.declutterImageWithText_=e}}const ry={Circle:Sf,Default:Br,Image:J1,LineString:ey,Polygon:Sf,Text:oy};class sy{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=ry[e];r=new s(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),o[e]=r}return r}}const ba=sy;class ay 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()===Jt.LOADED&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Jt.LOADED&&e!=Jt.ERROR&&t.addEventListener(tt.CHANGE,this.boundHandleImageChange_),e==Jt.IDLE&&(t.load(),e=t.getState()),e==Jt.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const ly=ay,Tf=[];let No=null;function hy(){const i=document.createElement("canvas");i.width=1,i.height=1,No=i.getContext("2d")}class uy extends ly{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=$e(),this.pixelTransform=$e(),this.inversePixelTransform=$e(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){No||hy(),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&&Wi(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=Zi(n),r=Ws(n),s=Us(n),a=Bs(n);Qt(e.coordinateToPixelTransform,o),Qt(e.coordinateToPixelTransform,r),Qt(e.coordinateToPixelTransform,s),Qt(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;Qt(l,o),Qt(l,r),Qt(l,s),Qt(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_(qi.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(qi.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,f=-t[1];return Mi(this.tempTransform,l,h,u,d,-n,c,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const If=uy;function dy(i,t,e,n,o,r,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<r);let y=p===0?0:(r-_)/p;const x=ki(g,c,y),k=ki(m,f,y),w=t-n,C=_,M=r+a*l(h,o,u);for(;t<e-n&&_+p<M;)v();y=p===0?0:(M-_)/p;const S=ki(g,c,y),z=ki(m,f,y);let P;if(d){const W=[x,k,S,z];oh(W,0,4,2,d,W,W),P=W[0]>W[2]}else P=x>S;const j=Math.PI,A=[],at=w+n===t;t=w,p=0,_=C,c=i[t],f=i[t+1];let B;if(at){v(),B=Math.atan2(f-m,c-g),P&&(B+=B>0?-j:j);const W=(S+x)/2,F=(z+k)/2;return A[0]=[W,F,(M-r)/2,B,o],A}o=o.replace(/\n/g," ");for(let W=0,F=o.length;W<F;){v();let q=Math.atan2(f-m,c-g);if(P&&(q+=q>0?-j:j),B!==void 0){let b=q-B;if(b+=b>j?-2*j:b<-j?2*j:0,Math.abs(b)>s)return null}B=q;const L=W;let H=0;for(;W<F;++W){const b=P?F-W-1:W,T=a*l(h,o[b],u);if(t+n<e&&_+p<r+H+T/2)break;H+=T}if(W===L)continue;const V=P?o.substring(F-L,F-W):o.substring(L,W);y=p===0?0:(r+H/2-_)/p;const I=ki(g,c,y),rt=ki(m,f,y);A.push([I,rt,H/2,q,V]),r+=H}return A}const Go=je(),an=[],zi=[],Ri=[],ln=[];function zf(i){return i[3].declutterBox}const cy=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 Rf(i,t){return(t==="start"||t==="end")&&!cy.test(i)&&(t=t==="start"?"left":"right"),Ur[t]}function fy(i,t,e){return e>0&&i.push(`
11
- `,""),i.push(t,""),i}class gy{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_=$e(),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?Ur[l.justify]:Rf(Array.isArray(t)?t[0]:t,l.textAlign||Sr),f=o&&s.lineWidth?s.lineWidth:0,g=d?t:t.split(`
12
- `).reduce(fy,[]),{width:m,height:p,widths:_,heights:v,lineWidths:y}=av(l,g),x=m+f,k=[],w=(x+2)*u[0],C=(p+f)*u[1],M={width:w<0?Math.floor(w):Math.ceil(w),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:k};(u[0]!=1||u[1]!=1)&&k.push("scale",u),o&&(k.push("strokeStyle",s.strokeStyle),k.push("lineWidth",f),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*f;const P=[],j=[];let A=0,at=0,B=0,W=0,F;for(let q=0,L=g.length;q<L;q+=2){const H=g[q];if(H===`
13
- `){at+=A,A=0,z=c*x+S*f,++W;continue}const V=g[q+1]||l.font;V!==F&&(o&&P.push("font",V),n&&j.push("font",V),F=V),A=Math.max(A,v[B]);const I=[H,z+S*_[B]+c*(_[B]-y[W]),.5*(f+A)+at];z+=_[B],o&&P.push("strokeText",I),n&&j.push("fillText",I),++B}return Array.prototype.push.apply(k,P),Array.prototype.push.apply(k,j),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,f,g,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=g[3]+y*c[0]+g[1],w=g[0]+x*c[1]+g[2],C=_-g[3],M=v-g[0];(m||d!==0)&&(an[0]=C,ln[0]=C,an[1]=M,zi[1]=M,zi[0]=C+k,Ri[0]=zi[0],Ri[1]=M+w,ln[1]=Ri[1]);let S;return d!==0?(S=Mi($e(),n,o,1,1,d,-n,-o),Qt(S,an),Qt(S,zi),Qt(S,Ri),Qt(S,ln),ti(Math.min(an[0],zi[0],Ri[0],ln[0]),Math.min(an[1],zi[1],Ri[1],ln[1]),Math.max(an[0],zi[0],Ri[0],ln[0]),Math.max(an[1],zi[1],Ri[1],ln[1]),Go)):ti(Math.min(C,C+k),Math.min(M,M+w),Math.max(C,C+k),Math.max(M,M+w),Go),f&&(_=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,an,zi,Ri,ln,s,a),lv(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=Qt(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=Rf(Array.isArray(t)?t[0]:t,r.textAlign||Sr),u=Ur[r.textBaseline||Hs],d=a&&a.lineWidth?a.lineWidth:0,c=s.width/l-2*r.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,o,r,s,a,l){let h;this.pixelCoordinates_&&Wi(n,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=Qi(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),X0(this.renderedTransform_,n));let u=0;const d=o.length;let c=0,f,g,m,p,_,v,y,x,k,w,C,M,S=0,z=0,P=null,j=null;const A=this.coordinateCache_,at=this.viewRotation_,B=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,W={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:at},F=this.instructions!=o||this.overlaps?0:200;let q,L,H,V;for(;u<d;){const I=o[u];switch(I[0]){case J.BEGIN_GEOMETRY:q=I[1],V=I[3],q.getGeometry()?a!==void 0&&!Zt(a,V.getExtent())?u=I[2]+1:++u:u=I[2];break;case J.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 J.CIRCLE:c=I[1];const b=h[c],T=h[c+1],$=h[c+2],E=h[c+3],Q=$-b,Y=E-T,_t=Math.sqrt(Q*Q+Y*Y);t.moveTo(b+_t,T),t.arc(b,T,_t,0,2*Math.PI,!0),++u;break;case J.CLOSE_PATH:t.closePath(),++u;break;case J.CUSTOM:c=I[1],f=I[2];const Et=I[3],yt=I[4],Ct=I.length==6?I[5]:void 0;W.geometry=Et,W.feature=q,u in A||(A[u]=[]);const Dt=A[u];Ct?Ct(h,c,f,2,Dt):(Dt[0]=h[c],Dt[1]=h[c+1],Dt.length=2),yt(Dt,W),++u;break;case J.DRAW_IMAGE:c=I[1],f=I[2],x=I[3],g=I[4],m=I[5];let Lt=I[6];const jt=I[7],O=I[8],dt=I[9],vt=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],C=I[21],M=I[22];const ce=this.drawLabelWithPointPlacement_(k,w,C,M);x=ce.label,I[3]=x;const bi=I[23];g=(ce.anchorX-bi)*this.pixelRatio,I[4]=g;const _e=I[24];m=(ce.anchorY-_e)*this.pixelRatio,I[5]=m,Lt=x.height,I[6]=Lt,st=x.width,I[13]=st}let It;I.length>25&&(It=I[25]);let Bt,bt,ct;I.length>17?(Bt=I[16],bt=I[17],ct=I[18]):(Bt=Xn,bt=!1,ct=!1),vt&&B?kt+=at:!vt&&!B&&(kt-=at);let Ot=0;for(;c<f;c+=2){if(It&&It[Ot++]<st/this.pixelRatio)continue;const ce=this.calculateImageOrLabelDimensions_(x.width,x.height,h[c],h[c+1],st,Lt,g,m,O,dt,kt,xt,r,Bt,bt||ct,q),bi=[t,e,x,ce,jt,bt?P:null,ct?j:null];if(l){if(nt==="none")continue;if(nt==="obstacle"){l.insert(ce.declutterBox);continue}else{let _e,Xe;if(wt){const ze=f-c;if(!wt[ze]){wt[ze]=bi;continue}if(_e=wt[ze],delete wt[ze],Xe=zf(_e),l.collides(Xe))continue}if(l.collides(ce.declutterBox))continue;_e&&(l.insert(Xe),this.replayImageOrLabel_.apply(this,_e)),l.insert(ce.declutterBox)}}this.replayImageOrLabel_.apply(this,bi)}++u;break;case J.DRAW_CHARS:const St=I[1],ft=I[2],de=I[3],We=I[4];M=I[5];const Yt=I[6],Ie=I[7],Ut=I[8];C=I[9];const Ht=I[10];k=I[11],w=I[12];const In=[I[13],I[13]],he=this.textStates[w],Ve=he.font,ve=[he.scale[0]*Ie,he.scale[1]*Ie];let Ne;Ve in this.widths_?Ne=this.widths_[Ve]:(Ne={},this.widths_[Ve]=Ne);const Ni=sf(h,St,ft,2),al=Math.abs(ve[0])*Cc(Ve,k,Ne);if(We||al<=Ni){const ce=this.textStates[w].textAlign,bi=(Ni-al)*Ur[ce],_e=dy(h,St,ft,2,k,bi,Yt,Math.abs(ve[0]),Cc,Ve,Ne,B?0:this.viewRotation_);t:if(_e){const Xe=[];let ze,sr,ar,ye,Re;if(C)for(ze=0,sr=_e.length;ze<sr;++ze){Re=_e[ze],ar=Re[4],ye=this.createLabel(ar,w,"",C),g=Re[2]+(ve[0]<0?-Ht:Ht),m=de*ye.height+(.5-de)*2*Ht*ve[1]/ve[0]-Ut;const ie=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Re[0],Re[1],ye.width,ye.height,g,m,0,0,Re[3],In,!1,Xn,!1,q);if(l&&l.collides(ie.declutterBox))break t;Xe.push([t,e,ye,ie,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,""),g=Re[2],m=de*ye.height-Ut;const ie=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Re[0],Re[1],ye.width,ye.height,g,m,0,0,Re[3],In,!1,Xn,!1,q);if(l&&l.collides(ie.declutterBox))break t;Xe.push([t,e,ye,ie,1,null,null])}l&&l.load(Xe.map(zf));for(let ie=0,xs=Xe.length;ie<xs;++ie)this.replayImageOrLabel_.apply(this,Xe[ie])}}++u;break;case J.END_GEOMETRY:if(s!==void 0){q=I[1];const ce=s(q,V);if(ce)return ce}++u;break;case J.FILL:F?S++:this.fill_(t),++u;break;case J.MOVE_TO_LINE_TO:for(c=I[1],f=I[2],L=h[c],H=h[c+1],v=L+.5|0,y=H+.5|0,(v!==p||y!==_)&&(t.moveTo(L,H),p=v,_=y),c+=2;c<f;c+=2)L=h[c],H=h[c+1],v=L+.5|0,y=H+.5|0,(c==f-2||v!==p||y!==_)&&(t.lineTo(L,H),p=v,_=y);++u;break;case J.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 J.SET_STROKE_STYLE:j=I,z&&(t.stroke(),z=0),this.setStrokeStyle_(t,I),++u;break;case J.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 my=gy,$h=["Polygon","Circle","LineString","Image","Text","Default"];class py{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_=$e(),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 my(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=je(),xr(d,t),ui(d,e*(this.renderBuffer_+o),d));const c=vy(o);let f;function g(k,w){const C=u.getImageData(0,0,a,a).data;for(let M=0,S=c.length;M<S;M++)if(C[c[M]]>0){if(!s||f!=="Image"&&f!=="Text"||s.includes(k)){const z=(c[M]-3)/4,P=o-z%a,j=o-(z/a|0),A=r(k,w,P*P+j*j);if(A)return A}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(Ln);let p,_,v,y,x;for(p=m.length-1;p>=0;--p){const k=m[p].toString();for(v=this.executorsByZIndex_[k],_=$h.length-1;_>=0;--_)if(f=$h[_],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],o=e[1],r=e[2],s=e[3],a=[n,o,n,s,r,s,r,o];return Qi(a,0,8,2,t,a),a}isEmpty(){return Fn(this.executorsByZIndex_)}execute(t,e,n,o,r,s,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(Ln),this.maxExtent_&&(t.save(),this.clip(t,n)),s=s||$h;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,o,r,a)}}this.maxExtent_&&t.restore()}}const Zh={};function vy(i){if(Zh[i]!==void 0)return Zh[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 Zh[i]=o,o}const ka=py;class _y extends Ef{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_=$e()}drawImages_(t,e,n,o){if(!this.image_)return;const r=Qi(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_,f=r[u+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const g=c+this.imageAnchorX_,m=f+this.imageAnchorY_;Mi(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,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=Qi(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=Qi(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(!!Zt(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Av(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||!Zt(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_)),!!Zt(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(!!Zt(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_)),!!Zt(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_)),!!Zt(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),Wi(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:Ks,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 f=e.getColor();this.textFillState_={fillStyle:di(f||Ci)}}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||wr,lineDashOffset:p||Mr,lineJoin:_!==void 0?_:Io,lineWidth:v!==void 0?v:Tr,miterLimit:y!==void 0?y:Cr,strokeStyle:di(f||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((f,g,m)=>f+=m%2?" ":g,""):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 yy=_y,Be=.5;function Af(i,t,e,n,o,r,s){const a=i[0]*Be,l=i[1]*Be,h=Ae(a,l);h.imageSmoothingEnabled=!1;const u=h.canvas,d=new yy(h,Be,o,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(_,r);if(!y)continue;Array.isArray(y)||(y=[y]);const k="#"+("000000"+(p*f).toString(16)).slice(-6);for(let w=0,C=y.length;w<C;++w){const M=y[w],S=M.getGeometryFunction()(_);if(!S||!Zt(o,S.getExtent()))continue;const z=M.clone(),P=z.getFill();P&&P.setColor(k);const j=z.getStroke();j&&(j.setColor(k),j.setLineDash(null)),z.setText(void 0);const A=M.getImage();if(A&&A.getOpacity()!==0){const W=A.getImageSize();if(!W)continue;const F=Ae(W[0],W[1],void 0,{alpha:!1}),q=F.canvas;F.fillStyle=k,F.fillRect(0,0,q.width,q.height),z.setImage(new fa({img:q,imgSize:W,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=g[at];B||(B={},g[at]=B,B.Polygon=[],B.Circle=[],B.LineString=[],B.Point=[]),B[S.getType().replace("Multi","")].push(S,z)}}const m=Object.keys(g).map(Number).sort(Ln);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 C=0,M=t.length;C<M;++C)d.setTransform(t[C]),d.drawGeometry(x[k])}}}return h.getImageData(0,0,u.width,u.height)}function Pf(i,t,e){const n=[];if(e){const o=Math.floor(Math.round(i[0])*Be),r=Math.floor(Math.round(i[1])*Be),s=(qt(o,0,e.width-1)+qt(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 xy=.5,Lf={Point:Ty,LineString:Cy,Polygon:zy,MultiPoint:Iy,MultiLineString:Ey,MultiPolygon:Sy,GeometryCollection:My,Circle:ky};function by(i,t){return parseInt(K(i),10)-parseInt(K(t),10)}function Df(i,t){const e=Kh(i,t);return e*e}function Kh(i,t){return xy*i/t}function ky(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 wa(i,t,e,n,o,r,s){let a=!1;const l=e.getImage();if(l){const h=l.getImageState();h==Jt.LOADED||h==Jt.ERROR?l.unlistenImageChange(o):(h==Jt.IDLE&&l.load(),l.listenImageChange(o),a=!0)}return wy(i,t,e,n,r,s),a}function wy(i,t,e,n,o,r){const s=e.getGeometryFunction()(t);if(!s)return;const a=s.simplifyTransformed(n,o);if(e.getRenderer())Of(i,a,e,t);else{const h=Lf[a.getType()];h(i,a,e,t,r)}}function Of(i,t,e,n){if(t.getType()=="GeometryCollection"){const r=t.getGeometries();for(let s=0,a=r.length;s<a;++s)Of(i,r[s],e,n);return}i.getBuilder(e.getZIndex(),"Default").drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function My(i,t,e,n,o){const r=t.getGeometriesArray();let s,a;for(s=0,a=r.length;s<a;++s){const l=Lf[r[s].getType()];l(i,r[s],e,n,o)}}function Cy(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 Ey(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 Sy(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 Ty(i,t,e,n,o){const r=e.getImage(),s=e.getText();let a;if(r){if(r.getImageState()!=Jt.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 Iy(i,t,e,n,o){const r=e.getImage(),s=e.getText();let a;if(r){if(r.getImageState()!=Jt.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 zy(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 Ry extends If{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_=je(),this.wrappedRenderedExtent_=je(),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,f=e.viewHints,g=!(f[$t.ANIMATING]||f[$t.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,g,void 0,n)}while(++k<x)}setupCompositionContext_(){if(this.opacity_!==1){const t=Ae(this.context.canvas.width,this.context.canvas.height,Tf);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,wl(this.compositionContext_),Tf.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),$l(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 f=!1,g=!0;if(o.extent&&this.clipping){const m=Ki(o.extent);g=Zt(m,t.extent),f=g&&!Un(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];Qt(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]*Be,c=n[1]*Be;u.push(this.getRenderTransform(o,r,s,Be,d,c,0).slice());const f=h.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!Un(g,l)){let m=l[0];const p=Nt(g);let _=0,v;for(;m<g[0];)--_,v=p*_,u.push(this.getRenderTransform(o,r,s,Be,d,c,v).slice()),m+=p;for(_=0,m=l[2];m>g[2];)++_,v=p*_,u.push(this.getRenderTransform(o,r,s,Be,d,c,v).slice()),m-=p}this.hitDetectionImageData_=Af(n,u,this.renderedFeatures_,h.getStyleFunction(),l,r,s)}e(Pf(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(f,g,m){const p=K(f),_=h[p];if(_){if(_!==!0&&m<_.distanceSq){if(m===0)return h[p]=!0,r.splice(r.lastIndexOf(_),1),o(f,l,g);_.geometry=g,_.distanceSq=m}}else{if(m===0)return h[p]=!0,o(f,l,g);r.push(h[p]={feature:f,layer:l,geometry:g,distanceSq:m,callback:o})}};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 o=t.viewHints[$t.ANIMATING],r=t.viewHints[$t.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,f=e.getRevision(),g=e.getRenderBuffer();let m=e.getRenderOrder();m===void 0&&(m=by);const p=h.center.slice(),_=ui(l,g*d),v=_.slice(),y=[_.slice()],x=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!Un(x,t.extent)){const B=Nt(x),W=Math.max(Nt(_)/2,B);_[0]=x[0]-W,_[2]=x[2]+W,Gl(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_==f&&this.renderedRenderOrder_==m&&Un(this.wrappedRenderedExtent_,_))return Wi(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const k=new ba(Kh(d,c),_,d,c);let w;this.getLayer().getDeclutter()&&(w=new ba(Kh(d,c),_,d,c));let C;for(let B=0,W=y.length;B<W;++B)n.loadFeatures(y[B],d,u);const M=Df(d,c);let S=!0;const z=function(B){let W;const F=B.getStyleFunction()||e.getStyleFunction();if(F&&(W=F(B,d)),W){const q=this.renderFeature(B,M,W,k,C,w);S=S&&!q}}.bind(this),P=Xl(_),j=n.getFeaturesInExtent(P);m&&j.sort(m);for(let B=0,W=j.length;B<W;++B)z(j[B]);this.renderedFeatures_=j,this.ready=S;const A=k.finish(),at=new ka(_,d,c,n.getOverlaps(),A,e.getRenderBuffer());return w&&(this.declutterExecutorGroup=new ka(_,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,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=wa(o,t,n[l],e,this.boundHandleStyleImageChange_,r,s)||a;else a=wa(o,t,n,e,this.boundHandleStyleImageChange_,r,s);return a}}const Ay=Ry;class Py extends Mf{constructor(t){super(t)}createRenderer(){return new Ay(this)}}const Jn=Py;class Ly{constructor(t){this.rbush_=new xf(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 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_[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)],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 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 Ma=Ly;class Dy 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,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_=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 Nf=Dy,we={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Oy(i,t){return[[-1/0,-1/0,1/0,1/0]]}let Fy=!1;function Gf(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=Fy,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 jf(i,t){return function(e,n,o,r,s){const a=this;Gf(i,t,e,n,o,function(l,h){a.addFeatures(l),r!==void 0&&r(l)},s||On)}}class hn extends Je{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Ny extends Nf{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_=On,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_=jf(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Oy;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Ma:null,this.loadedExtentsRtree_=new Ma,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 qe(o)),o!==void 0&&this.addFeaturesInternal(o),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 o=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(o,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new hn(we.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[mt(e,tt.CHANGE,this.handleFeatureChange_,this),mt(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=K(a);this.addToIndex_(l,a)&&n.push(a)}for(let r=0,s=n.length;r<s;r++){const a=n[r],l=K(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 hn(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(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(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 hn(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(),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 o=A0(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=K(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 hn(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 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 Un(u.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new hn(we.FEATURESLOADSTART)),this.loader_.call(this,l,e,n,function(u){--this.loadingExtentsCount_,this.dispatchEvent(new hn(we.FEATURESLOADEND,void 0,u))}.bind(this),function(){--this.loadingExtentsCount_,this.dispatchEvent(new hn(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=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(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 hn(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(jf(t,this.format_))}}const un=Ny,Ca=class extends Rs{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===G.ERROR&&this.setState(G.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(t.getState()==G.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()==G.LOADED){t.interimTile=null;break}else t.getState()==G.LOADING?e=t:t.getState()==G.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!==G.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)}};class Gy extends Ca{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=G.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=G.ERROR,this.unlistenImage_(),this.image_=jy(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=G.LOADED:this.state=G.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==G.ERROR&&(this.state=G.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==G.IDLE&&(this.state=G.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=uf(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function jy(){const i=Ae(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}const Bf=Gy;class By{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 Uy=By;function Uf(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 Wf(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 Vf(i){return i.split("/").map(Number)}function Vy(i){return(i[1]<<i[0])+i[2]}function Xy(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 Yy extends Uy{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(o){o.tileCoord[0]!==n&&(this.remove(Wf(o.tileCoord)),o.release())}.bind(this))}}const Hh=Yy;class Xf{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 Xf(i,t,e,n)}const Yf=Xf,qf=[];class qy extends Ca{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=K(t);return e in this.context_||(this.context_[e]=Ae(1,1,qf)),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];wl(e),qf.push(e.canvas),delete this.context_[t]}super.release()}}const $y=qy,Zy=class extends Ca{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==G.IDLE&&(this.setState(G.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(G.ERROR)}setFeatures(t){this.features_=t,this.setState(G.LOADED)}setLoader(t){this.loader_=t}},Ea={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class Sa extends Je{constructor(t,e){super(t),this.feature=e}}class Ky 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_=Qy(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 A1([NaN,NaN]),h=Wt(r[0]),u=wi(h,Wt(r[r.length-1]));return l.setCenterAndRadius(h,Math.sqrt(u),this.geometryLayout_),l};else{let r;o==="Point"?r=ni:o==="LineString"?r=Kn:o==="Polygon"&&(r=$n),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 Jn({source:new un({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: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],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=ea(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 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 Sa(Ea.DRAWSTART,this.sketchFeature_))}modifyDrawing_(t){const e=this.getMap(),n=this.sketchFeature_.getGeometry(),o=e.getView().getProjection(),r=ea(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 Sa(Ea.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 Sa(Ea.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 Sa(Ea.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=df();return function(t,e){return i[t.getGeometry().getType()]}}function Qy(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 Jy=Ky,$f=0,Wr=1,Zf=[0,0,0,0],Uo=[],Qh={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class Jh extends Je{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 h_(n)&&c_(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 Ma,this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new Jn({source:new un({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 qe(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 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 qe;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 Jh(Qh.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),f={feature:t,geometry:e,depth:[a,o],index:u,segment:c};this.rBush_.insert(xe(c),f)}}}}writeCircleGeometry_(t,e){const n=e.getCenter(),o={feature:t,geometry:e,index:$f,segment:[n,n]},r={feature:t,geometry:e,index:Wr,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 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===$f)this.changingFeature_=!0,u.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,t.map.getView().getProjection();let m=rc(Wt(u.getCenter()),Wt(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 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===Wr){const m=Hf(e,d);ei(m,r)&&!l[f][0]&&(this.dragSegments_.push([d,0]),l[f][0]=d);continue}if(ei(c[0],r)&&!l[f][0]){this.dragSegments_.push([d,0]),l[f][0]=d;continue}if(ei(c[1],r)&&!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)&&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 Jh(Qh.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 Kf(o,l)-Kf(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=Ki(yr(o,Zf)),h=e.getView().getResolution()*this.pixelTolerance_,u=Xl(ui(l,h,Zf));s=this.rBush_.getInExtent(u)}if(s&&s.length>0){const l=s.sort(r)[0],h=l.segment;let u=Hf(o,l);const d=e.getPixelFromCoordinate(u);let c=rc(t,d);if(a||c<=this.pixelTolerance_){const f={};if(f[K(h)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-o[0],this.delta_[1]=u[1]-o[1]),l.geometry.getType()==="Circle"&&l.index===Wr)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,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 Jh(Qh.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,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,r=a.getCoordinates(),o=r,n=!1,a.getType()){case"MultiLineString":r[f.depth[0]].length>2&&(r[f.depth[0]].splice(h,1),n=!0);break;case"LineString":r.length>2&&(r.splice(h,1),n=!0);break;case"MultiPolygon":o=o[f.depth[1]];case"Polygon":o=o[f.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: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,o){this.rBush_.forEachInExtent(t.getExtent(),function(r){r.geometry===t&&(n===void 0||r.depth===void 0||Wi(r.depth,n))&&r.index>e&&(r.index+=o)})}}function ex(i,t){return i.index-t.index}function Kf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"){let r=n;if(t.index===Wr){const s=wi(r.getCenter(),Wt(i)),a=Math.sqrt(s)-r.getRadius();return a*a}}const o=Wt(i);return Uo[0]=Wt(t.segment[0]),Uo[1]=Wt(t.segment[1]),O0(o,Uo)}function Hf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"&&t.index===Wr)return To(n.getClosestPoint(Wt(i)));const o=Wt(i);return Uo[0]=Wt(t.segment[0]),Uo[1]=Wt(t.segment[1]),To(Fl(o,Uo))}function ix(){const i=df();return function(t,e){return i.Point}}const nx=tx;function Qf(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 Ma,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),o=t.getGeometry();if(o){const r=this.GEOMETRY_SEGMENTERS_[o.getType()];if(r){this.indexedFeaturesExtents_[n]=o.getExtent(je());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]=mt(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=Qf(t);this.addFeature(e)}handleFeatureRemove_(t){const e=Qf(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,o=K(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(mt(this.features_,re.ADD,this.handleFeatureAdd_,this),mt(this.features_,re.REMOVE,this.handleFeatureRemove_,this)):this.source_&&n.push(mt(this.source_,we.ADDFEATURE,this.handleFeatureAdd_,this),mt(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=Wt(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=Wt(_),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=To(L0(h,v))}else{const[v,y]=_.segment;y&&(tu[0]=Wt(v),tu[1]=Wt(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 r=qv(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,Jf=.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=Zi(n),u=Ws(n),d=Us(n),c=Bs(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,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_,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,o]);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])&&!Zt(u,this.maxSourceExtent_))return;let m=0;if(!g&&(!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)g=!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(!g){const p=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(p);let v;f?v=(Yi(r[0],c)+Yi(a[0],c))/2-Yi(_[0],c):v=(r[0]+a[0])/2-_[0];const y=(r[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=[(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(f){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=je();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 tg=[];function eg(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)",eg(i,4,5,4,0),eg(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 ig(i,t,e,n){const o=Ys(e,t,i);let r=Xs(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||js(l,o)){const h=Xs(i,r,o)/r;isFinite(h)&&h>0&&(r/=h)}return r}function dx(i,t,e,n){const o=$i(e);let r=ig(i,t,o,n);return(!isFinite(r)||r<=0)&&Al(e,function(s){return r=ig(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),tg);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=je();l.forEach(function(x,k,w){ic(g,x.extent)});const m=Nt(g),p=Ye(g),_=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 C=x.extent[0]-g[0],M=-(x.extent[3]-g[3]),S=Nt(x.extent),z=Ye(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,C*v,M*v,S*v,z*v)});const y=Zi(s);return a.getTriangles().forEach(function(x,k,w){const C=x.source,M=x.target;let S=C[0][0],z=C[0][1],P=C[1][0],j=C[1][1],A=C[2][0],at=C[2][1];const B=f((M[0][0]-y[0])/r),W=f(-(M[0][1]-y[1])/r),F=f((M[1][0]-y[0])/r),q=f(-(M[1][1]-y[1])/r),L=f((M[2][0]-y[0])/r),H=f(-(M[2][1]-y[1])/r),V=S,I=z;S=0,z=0,P-=V,j-=I,A-=V,at-=I;const rt=[[P,j,0,0,F-B],[A,at,0,0,L-B],[0,0,P,j,q-W],[0,0,A,at,H-W]],b=f0(rt);if(!!b){if(c.save(),c.beginPath(),ux()||!d){c.moveTo(F,q);const T=4,$=B-F,E=W-q;for(let Q=0;Q<T;Q++)c.lineTo(F+f((Q+1)*$/T),q+f(Q*E/(T-1))),Q!=T-1&&c.lineTo(F+f((Q+1)*$/T),q+f((Q+1)*E/(T-1)));c.lineTo(L,H)}else c.moveTo(F,q),c.lineTo(B,W),c.lineTo(L,H);c.clip(),c.transform(b[0],b[2],b[1],b[3],B,W),c.translate(g[0]-V,g[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 C=x.target,M=(C[0][0]-y[0])/r,S=-(C[0][1]-y[1])/r,z=(C[1][0]-y[0])/r,P=-(C[1][1]-y[1])/r,j=(C[2][0]-y[0])/r,A=-(C[2][1]-y[1])/r;c.beginPath(),c.moveTo(z,P),c.lineTo(M,S),c.lineTo(j,A),c.closePath(),c.stroke()}),c.restore()),c.canvas}class fx extends Ca{constructor(t,e,n,o,r,s,a,l,h,u,d,c){super(r,G.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 f=o.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const p=g?Wn(f,g):f;if(Pl(p)===0){this.state=G.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=G.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=G.EMPTY;return}this.sourceZ_=e.getZForResolution(y);let k=this.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(k[1]=qt(k[1],m[1],m[3]),k[3]=qt(k[3],m[1],m[3])):k=Wn(k,m)),!Pl(k))this.state=G.EMPTY;else{const w=e.getTileRangeForExtentAndZ(k,this.sourceZ_);for(let C=w.minX;C<=w.maxX;C++)for(let M=w.minY;M<=w.maxY;M++){const S=h(this.sourceZ_,C,M,a);S&&this.sourceTiles_.push(S)}this.sourceTiles_.length===0&&(this.state=G.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(function(e,n,o){e&&e.getState()==G.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=G.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=G.LOADED}this.changed()}load(){if(this.state==G.IDLE){this.state=G.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,o){const r=e.getState();if(r==G.IDLE||r==G.LOADING){t++;const s=mt(e,tt.CHANGE,function(a){const l=e.getState();(l==G.LOADED||l==G.ERROR||l==G.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()==G.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Ft),this.sourcesListenerKeys_=null}release(){this.canvas_&&(wl(this.canvas_.getContext("2d")),tg.push(this.canvas_),this.canvas_=null),super.release()}}const ng=fx;class gx extends If{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=je(),this.tmpTileRange_=new Yf(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),o=e.getUseInterimTilesOnError();return n==G.LOADED||n==G.EMPTY||n==G.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()==G.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=Qt(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!js(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 f=u.getTileCoordForCoordAndZ(o,c),g=h.getTile(c,f[1],f[2],s,a);if(!(g instanceof Bf||g instanceof ng))return null;if(g.getState()!==G.LOADED)continue;const m=u.getOrigin(c),p=be(u.getTileSize(c)),_=u.getResolution(c),v=Math.floor(d*((o[0]-m[0])/_-f[1]*p[0])),y=Math.floor(d*((m[1]-o[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],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(),f=d.getTileGridForProjection(r),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(Ye(p)/_*h),k=n.extent&&Ki(n.extent);k&&(p=Wn(p,Ki(n.extent)));const w=m*y/2/v,C=m*x/2/v,M=[a[0]-w,a[1]-C,a[0]+w,a[1]+C],S=f.getTileRangeForExtentAndZ(p,g),z={};z[g]={};const P=this.createLoadedTileFinder(d,r,z),j=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&&!f.tileCoordIntersectsViewport([g,rt,b],at))continue;const T=this.getTile(g,rt,b,t);if(this.isDrawableTile(T)){const Q=K(this);if(T.getState()==G.LOADED){z[g][T.tileCoord.toString()]=T;let Y=T.inTransition(Q);Y&&n.opacity!==1&&(T.endTransition(Q),Y=!1),!this.newTiles_&&(Y||!this.renderedTiles.includes(T))&&(this.newTiles_=!0)}if(T.getAlpha(Q,t.time)===1)continue}const $=f.getTileCoordChildTileRange(T.tileCoord,A,j);let E=!1;$&&(E=P(g+1,$)),E||f.forEachTileCoordParentTileRange(T.tileCoord,P,A,j)}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 W=_c(this.pixelTransform);this.useContainer(e,W,this.getBackground(t));const F=this.context,q=F.canvas;$l(this.inversePixelTransform,this.pixelTransform),Mi(this.tempTransform,y/2,x/2,B,B,0,-y/2,-x/2),q.width!=y||q.height!=x?(q.width=y,q.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 L=Object.keys(z).map(Number);L.sort(Ln);let H,V,I;n.opacity===1&&(!this.containerReused||d.getOpaque(t.viewState.projection))?L=L.reverse():(H=[],V=[]);for(let rt=L.length-1;rt>=0;--rt){const b=L[rt],T=d.getTilePixelSize(b,h,r),E=f.getResolution(b)/m,Q=T[0]*E*B,Y=T[1]*E*B,_t=f.getTileCoordForCoordAndZ(Zi(M),b),Et=f.getTileCoordExtent(_t),yt=Qt(this.tempTransform,[v*(Et[0]-M[0])/m,v*(M[3]-Et[3])/m]),Ct=v*d.getGutterForProjection(r),Dt=z[b];for(const Lt in Dt){const jt=Dt[Lt],O=jt.tileCoord,dt=_t[1]-O[1],vt=Math.round(yt[0]-(dt-1)*Q),kt=_t[2]-O[2],xt=Math.round(yt[1]-(kt-1)*Y),st=Math.round(yt[0]-dt*Q),nt=Math.round(yt[1]-kt*Y),wt=vt-st,It=xt-nt,Bt=g===b,bt=Bt&&jt.getAlpha(K(this),t.time)!==1;let ct=!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(g!==b&&b<V[Ot]){const ft=H[Ot];Zt([st,nt,st+wt,nt+It],[ft[0],ft[3],ft[4],ft[7]])&&(ct||(F.save(),ct=!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(ft[6],ft[7]),F.lineTo(ft[4],ft[5]),F.lineTo(ft[2],ft[3]),F.lineTo(ft[0],ft[1]),F.clip())}H.push(I),V.push(b)}else F.clearRect(st,nt,wt,It);this.drawTileImage(jt,t,st,nt,wt,It,Ct,Bt),H&&!bt?(ct&&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,f,h,r,p,g,u.getPreload()),this.scheduleExpireCache(t,d),this.postRender(F,t),n.extent&&F.restore(),F.imageSmoothingEnabled=!0,W!==q.style.transform&&(q.style.transform=W),this.container}drawTileImage(t,e,n,o,r,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,o,r,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(o,r,s){const a=K(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=K(e);o in t||(t[o]={}),t[o][n.getKey()]=!0}manageTilePyramid(t,e,n,o,r,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,o,r),_.getState()==G.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 og=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 og{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=$e()}prepareTile(t,e,n){let o;const r=t.getState();return(r===G.LOADED||r===G.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[$t.ANIMATING]||d[$t.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"?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 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(),f=h.getTileGridForProjection(n).getTileCoordExtent(t.wrappedTileCoord),g=h.getSourceTiles(e,n,t),m=K(o);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()!=G.LOADED)continue;const y=v.tileCoord,x=d.getTileCoordExtent(y),k=Wn(f,x),w=ui(k,o.getRenderBuffer()*a,this.tmpExtent),C=So(x,k)?null:w,M=new ba(0,w,a,e),S=u?new ba(0,k,a,e):void 0,z=Df(a,e),P=function(W){let F;const q=W.getStyleFunction()||o.getStyleFunction();if(q&&(F=q(W,a)),F){const L=this.renderFeature(W,z,F,M,S);l.dirty=l.dirty||L}},j=v.getFeatures();s&&s!==l.renderedRenderOrder&&j.sort(s);for(let W=0,F=j.length;W<F;++W){const q=j[W];(!C||Zt(C,q.getGeometry().getExtent()))&&P.call(this,q)}const A=M.finish(),at=o.getRenderMode()!=="vector"&&u&&g.length===1?null:k,B=new ka(at,a,e,h.getOverlaps(),A,o.getRenderBuffer());if(t.executorGroups[m].push(B),S){const W=new ka(null,a,e,h.getOverlaps(),S.finish(),o.getRenderBuffer());t.declutterExecutorGroups[m].push(W)}}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??0;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,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})}},g=this.renderedTiles;let m;for(let p=0,_=g.length;!m&&p<_;++p){const v=g[p],y=u.getTileCoordExtent(v.wrappedTileCoord);if(!Zt(y,d))continue;const x=K(l),k=[v.executorGroups[x]],w=v.declutterExecutorGroups[x];w&&k.push(w),k.some(C=>{const M=C===w?e.declutterTree.all().map(S=>S.value):null;for(let S=0,z=C.length;S<z;++S)if(m=C[S].forEachFeatureAtCoordinate(t,s,a,n,f,M),m)return!0})}return m}getFeatures(t){return new Promise(function(e,n){const o=this.getLayer(),r=K(o),s=o.getSource(),a=this.renderedProjection,l=a.getExtent(),h=this.renderedResolution,u=s.getTileGridForProjection(a),d=Qt(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()===G.LOADED){const k=u.getTileCoordExtent(f.tileCoord);s.getWrapX()&&a.canWrapX()&&!Un(l,k)&&Gl(d,a);break}f=void 0}if(!f||f.loadingSourceTiles>0){e([]);return}const g=u.getTileCoordExtent(f.wrappedTileCoord),m=Zi(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[r];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,Be,y[0]*Be,y[1]*Be,0)];v=Af(y,k,_,o.getStyleFunction(),u.getTileCoordExtent(f.wrappedTileCoord),f.getReplayState(o).renderedResolution,x),f.hitDetectionImageData[r]=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 o=t.viewHints,r=!(o[$t.ANIMATING]||o[$t.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,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),f=t.tileCoord,g=c.getTileCoordExtent(t.wrappedTileCoord),m=c.getTileCoordExtent(f,this.tmpExtent)[0]-g[0];return Yl(ql(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[$t.ANIMATING]||n[$t.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(),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(r).dirty;const x=y.executorGroups[K(r)].filter(S=>S.hasExecutors(l));if(x.length===0)continue;const k=this.getTileRenderTransform(y,e),w=y.tileCoord[0];let C=!1;const M=x[0].getClipCoords(k);if(M){for(let S=0,z=m.length;S<z;++S)if(f!==w&&w<p[S]){const P=m[S];Zt([M[0],M[3],M[4],M[7]],[P[0],P[3],P[4],P[7]])&&(C||(t.save(),C=!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);C&&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=wa(o,t,n[a],e,this.boundHandleStyleImageChange_,void 0,r)||s;else s=wa(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[K(n)];o.renderedTileRevision=r;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 C=pc(this.tmpTransform_);ql(C,y,y),_.setTransform.apply(_,C)}const x=f.getTileCoordExtent(a,this.tmpExtent),k=m/p,w=pc(this.tmpTransform_);ql(w,k,-k),q0(w,-x[0],-x[3]);for(let C=0,M=s.length;C<M;++C)s[C].execute(_,y,w,0,!0,mx[n.getRenderMode()]);o.renderedTileResolution=t.wantedResolution}}const _x=vx,dn={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class yx extends Mf{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(dn.PRELOAD)}getUseInterimTilesOnError(){return this.get(dn.USE_INTERIM_TILES_ON_ERROR)}setPreload(t){this.set(dn.PRELOAD,t)}setUseInterimTilesOnError(t){this.set(dn.USE_INTERIM_TILES_ON_ERROR,t)}}const xx=yx,bx=[0,0,0],cn=5;class kx{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,gt(Kp(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_=Zi(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:th,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 Yf(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=Os(u,cn)-1,d=Os(d,cn)-1):(u=Ds(u,cn),d=Ds(d,cn)),Uf(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=Os(h,cn)-1,u=Os(u,cn)-1):(h=Ds(h,cn),u=Ds(u,cn)),Uf(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=bl(this.resolutions_,t,e||0);return qt(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 rg(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=Ta(e);if(js(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=ag(i,t,e);return new nu({extent:i,origin:T0(i,n),resolutions:o,tileSize:e})}function sg(i){const t=i||{},e=t.extent||Gt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:ag(e,t.maxZoom,t.tileSize,t.maxResolution)};return new nu(n)}function ag(i,t,e,n){t=t!==void 0?t:Ec,e=be(e!==void 0?e:th);const o=Ye(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=Ta(i);return Mx(o,t,e,n)}function Ta(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 Nf{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,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()===G.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:rg(t)}getTileCacheForProjection(t){const e=this.getProjection();return gt(e===null||Vn(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:D_(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)),Xy(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 Je{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=Vy(t),r=Yi(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=K(e),o=e.getState();let r;o==G.LOADING?(this.tileLoadingKeys_[n]=!0,r=ou.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],r=o==G.ERROR?ou.TILELOADERROR:o==G.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(`
14
- `);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 lg=ru;class Px extends lg{constructor(t){const e=t.projection||"EPSG:3857",n=t.extent||Ta(e),o=t.tileGrid||sg({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:Dx,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:Zy,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],n=this.tileCache;if(n.getCount()===0)return e;const o=Vf(n.peekFirstKey())[0],r=this.tileGrid;return n.forEach(function(s){if(s.tileCoord[0]!==o||s.getState()!==G.LOADED)return;const a=s.getSourceTiles();for(let l=0,h=a.length;l<h;++l){const u=a[l],d=u.tileCoord;if(Zt(t,r.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();Zt(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()===G.IDLE){n.setState(G.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 f=this.tileUrlFunction(c,t,e),g=this.sourceTileCache.containsKey(f)?this.sourceTileCache.get(f):new this.tileClass(c,f?G.IDLE:G.EMPTY,f,this.format_,this.tileLoadFunction);n.sourceTiles.push(g);const m=g.getState();if(m<G.LOADED){const p=_=>{this.handleTileChange(_);const v=g.getState();if(v===G.LOADED||v===G.ERROR){const y=g.getKey();y in n.errorTileKeys?g.getState()===G.LOADED&&delete n.errorTileKeys[y]:n.loadingSourceTiles--,v===G.ERROR?n.errorTileKeys[y]=!0:g.removeEventListener(tt.CHANGE,p),n.loadingSourceTiles===0&&n.setState(Fn(n.errorTileKeys)?G.LOADED:G.ERROR)}};g.addEventListener(tt.CHANGE,p),n.loadingSourceTiles++}m===G.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()===G.ERROR)?G.ERROR:G.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),Zt(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,o,r)}.bind(this))}const g=new $y(h,f?G.EMPTY:G.IDLE,u,this.getSourceTiles.bind(this,o,r));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 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 Lx=Px;function Dx(i,t){i.setLoader(function(e,n,o){Gf(t,i.getFormat(),e,n,o,i.onLoad.bind(i),i.onError.bind(i))})}class Ox extends lg{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:Bf,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&&!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,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?G.IDLE:G.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||Vn(s,r))return this.getTileInternal(t,e,n,o,s||r);{const a=this.getTileCacheForProjection(r),l=[t,e,n];let h;const u=Wf(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(r),g=this.getTileCoordForTileUrlFunction(l,r),m=new ng(s,c,r,f,l,g,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()==G.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=K(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 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(dn.PRELOAD)}setPreload(t){this.set(dn.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(dn.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(dn.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 og(this)}}const hg=Bx;var Ux={},ug,dg={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 Vr(i){return i=Math.round(i),i<0?0:i>255?255:i}function cg(i){return i<0?0:i>1?1:i}function su(i){return i[i.length-1]==="%"?Vr(parseFloat(i)/100*255):Vr(parseInt(i))}function Ia(i){return i[i.length-1]==="%"?cg(parseFloat(i)/100):cg(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 Wx(i){var t=i.replace(/ /g,"").toLowerCase();if(t in dg)return dg[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=Ia(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=Ia(s.pop());case"hsl":if(s.length!==3)return null;var l=(parseFloat(s[0])%360+360)%360/360,h=Ia(s[1]),u=Ia(s[2]),d=u<=.5?u*(h+1):u+h-u*h,c=u*2-d;return[Vr(au(c,d,l+1/3)*255),Vr(au(c,d,l)*255),Vr(au(c,d,l-1/3)*255),a];default:return null}}return null}try{ug=Ux.parseCSSColor=Wx}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=ug(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 Vx(i,t){var e=i.stops;if(!e)return Xx(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],Zx(s[1])]:[s[0],Xr(s[1])]}),n?Yx(i,t,e):r?$x(i,t,e):hu(i,t,e)}function Xx(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 Yx(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 f=c[d],g=hu(n[f],t,o[f]);Wo(u,f,g,!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]);Wo(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 fg(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(fg(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];Wo(h,c[0],c[1],!1)}return h.push(fg(i,t)),h}else if(n==="interval"){for(var f=["step",["number",o]],g=0,m=e;g<m.length;g+=1){var p=m[g];Wo(f,p[0],p[1],!0)}return uu(f),i.default===void 0?f:["case",["==",["typeof",o],"number"],f,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];Wo(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];Wo(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 Wo(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,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),Yr=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}};Yr.prototype.concat=function(t){return new Yr(this,t)},Yr.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.")},Yr.prototype.has=function(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1};var za={kind:"null"},D={kind:"number"},pt={kind:"string"},lt={kind:"boolean"},Ai={kind:"color"},Vo={kind:"object"},ht={kind:"value"},Kx={kind:"error"},Ra={kind:"collator"},Aa={kind:"formatted"},qr={kind:"resolvedImage"};function Ze(i,t){return{kind:"array",itemType:i,N:t}}function Vt(i){if(i.kind==="array"){var t=Vt(i.itemType);return typeof i.N=="number"?"array<"+t+", "+i.N+">":i.itemType.kind==="value"?"array":"array<"+t+">"}else return i.kind}var Hx=[za,D,pt,lt,Ai,Aa,Vo,Ze(ht),qr];function $r(i,t){if(t.kind==="error")return null;if(i.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!$r(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=Hx;e<n.length;e+=1){var o=n[e];if(!$r(o,t))return null}}return"Expected "+Vt(i)+" but found "+Vt(t)+" instead."}function cu(i,t){return t.some(function(e){return e.kind===i.kind})}function Zr(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 Kr=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"})};Kr.prototype.compare=function(t,e){return this.collator.compare(t,e)},Kr.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var fu=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 fu(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 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 gg(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 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 zt)return!0;if(i instanceof Kr)return!0;if(i instanceof Pe)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 o in i)if(!Pa(i[o]))return!1;return!0}else return!1}function ee(i){if(i===null)return za;if(typeof i=="string")return pt;if(typeof i=="boolean")return lt;if(typeof i=="number")return D;if(i instanceof zt)return Ai;if(i instanceof Kr)return Ra;if(i instanceof Pe)return Aa;if(i instanceof fi)return qr;if(Array.isArray(i)){for(var t=i.length,e,n=0,o=i;n<o.length;n+=1){var r=o[n],s=ee(r);if(!e)e=s;else{if(e===s)continue;e=ht;break}}return Ze(e||ht,t)}else return Vo}function Hr(i){var t=typeof i;return i===null?"":t==="string"||t==="number"||t==="boolean"?String(i):i instanceof zt||i instanceof Pe||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],o=ee(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 gi(o,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 zt?["rgba"].concat(this.value.toArray()):this.value instanceof Pe?this.value.serialize():this.value};var ae=function(t){this.name="ExpressionEvaluationError",this.message=t};ae.prototype.toJSON=function(){return this.message};var gu={string:pt,number:D,boolean:lt,object:Vo},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 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++}o=Ze(s,l)}else o=gu[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=$r(this.type,ee(n));if(o){if(e===this.args.length-1)throw new ae("Expected value to be of type "+Vt(this.type)+", but found "+Vt(ee(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 fn=function(t){this.type=Aa,this.sections=t};fn.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,D),!l))return null;var h=null;if(a["text-font"]&&(h=e.parse(a["text-font"],1,Ze(pt)),!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 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'.");r=!0,o.push({content:c,scale:null,font:null,textColor:null})}}return new fn(o)},fn.prototype.evaluate=function(t){var e=function(n){var o=n.content.evaluate(t);return ee(o)===qr?new fu("",o,null,null,null):new fu(Hr(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))},fn.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)}},fn.prototype.outputDefined=function(){return!1},fn.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=qr,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,pt);return n?new gn(n):e.error("No image name provided.")},gn.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},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":D,"to-string":pt},Ke=function(t,e){this.type=t,this.args=e};Ke.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 Ke(o,r)},Ke.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=gg(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 ae(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 ae("Could not convert "+JSON.stringify(l)+" to number.")}else return this.type.kind==="formatted"?Pe.fromString(Hr(this.args[0].evaluate(t))):this.type.kind==="resolvedImage"?fi.fromString(Hr(this.args[0].evaluate(t))):Hr(this.args[0].evaluate(t))},Ke.prototype.eachChild=function(t){this.args.forEach(t)},Ke.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Ke.prototype.serialize=function(){if(this.type.kind==="formatted")return new fn([{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 Jx=["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"?Jx[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],f=c[0],g=c[1];h=new _n(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,C=m[k];h.concat(k+1).checkSubtype(w,C.type)}if(h.errors.length===0)return new me(o,s,g,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 tb(at)}).join(" | "),z=[],P=1;P<t.length;P++){var j=e.parse(t[P],1+z.length);if(!j)return null;z.push(Vt(j.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 tb(i){return Array.isArray(i)?"("+i.map(Vt).join(", ")+")":"("+Vt(i.type)+"...)"}var mn=function(t,e,n){this.type=Ra,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};mn.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,pt),!s)?null:new mn(o,r,s)},mn.prototype.evaluate=function(t){return new Kr(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},mn.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},mn.prototype.outputDefined=function(){return!1},mn.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 pn=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 eb(i){return(180+i)/360}function ib(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function La(i,t){return!(i[0]<=t[0]||i[2]>=t[2]||i[1]<=t[1]||i[3]>=t[3])}function nb(i,t){var e=eb(i[0]),n=ib(i[1]),o=Math.pow(2,t.z);return[Math.round(e*o*pn),Math.round(n*o*pn)]}function ob(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 rb(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(ob(i,r[s],r[s+1]))return!1;rb(i,r[s],r[s+1])&&(e=!e)}return e}function sb(i,t){for(var e=0;e<t.length;e++)if(pu(i,t[e]))return!0;return!1}function ab(i,t){return i[0]*t[1]-i[1]*t[0]}function mg(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 lb(i,t,e,n){var o=[t[0]-i[0],t[1]-i[1]],r=[n[0]-e[0],n[1]-e[1]];return ab(r,o)===0?!1:!!(mg(i,t,e,n)&&mg(e,n,i,t))}function hb(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(lb(i,t,r[s],r[s+1]))return!0;return!1}function pg(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(hb(i[n],i[n+1],t))return!1;return!0}function ub(i,t){for(var e=0;e<t.length;e++)if(pg(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=nb(i[o][s],e);mu(t,a),r.push(a)}n.push(r)}return n}function vg(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 _g(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 db(i){i[0]=i[1]=1/0,i[2]=i[3]=-1/0}function yg(i,t,e,n){var o=Math.pow(2,n.z)*pn,r=[n.x*pn,n.y*pn],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+r[0],c.y+r[1]];_g(f,t,e,o),s.push(f)}return s}function xg(i,t,e,n){var o=Math.pow(2,n.z)*pn,r=[n.x*pn,n.y*pn],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+r[0],f.y+r[1]];mu(t,g),u.push(g)}s.push(u)}if(t[2]-t[0]<=o/2){db(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];_g(x,t,e,o)}}return s}function cb(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=yg(i.geometry(),e,n,o);if(!La(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=vg(t.coordinates,n,o),d=yg(i.geometry(),e,n,o);if(!La(e,n))return!1;for(var c=0,f=d;c<f.length;c+=1){var g=f[c];if(!sb(g,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=xg(i.geometry(),e,n,o);if(!La(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!pg(h,r))return!1}}if(t.type==="MultiPolygon"){var u=vg(t.coordinates,n,o),d=xg(i.geometry(),e,n,o);if(!La(e,n))return!1;for(var c=0,f=d;c<f.length;c+=1){var g=f[c];if(!ub(g,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(Pa(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 cb(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 vn=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};vn.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 vn(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)},vn.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},vn.prototype.eachChild=function(){},vn.prototype.outputDefined=function(){return!1},vn.prototype.serialize=function(){return["var",this.name]};var _n=function(t,e,n,o,r){e===void 0&&(e=[]),o===void 0&&(o=new Yr),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};_n.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)},_n.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 Ke(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 gi)&&s.type.kind!=="resolvedImage"&&xu(s)){var h=new Pi;try{s=new gi(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.")},_n.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 _n(this.registry,o,e||null,r,this.errors)},_n.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))},_n.prototype.checkSubtype=function(t,e){var n=$r(t,e);return n&&this.error(n),n};function xu(i){if(i instanceof vn)return xu(i.boundExpression);if(i instanceof me&&i.name==="error")return!1;if(i instanceof mn)return!1;if(i instanceof oi)return!1;var t=i instanceof Ke||i instanceof Me,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 bg(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 ae("Input is not a number.");return 0}var yn=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)}};yn.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,D);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 yn(r,n,o)},yn.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=bg(e,o);return n[s].evaluate(t)},yn.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)}},yn.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},yn.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 gb=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 Ue(i,t,e){return i*(1-e)+t*e}function mb(i,t,e){return new zt(Ue(i.r,t.r,e),Ue(i.g,t.g,e),Ue(i.b,t.b,e),Ue(i.a,t.a,e))}function pb(i,t,e){return i.map(function(n,o){return Ue(n,t[o],e)})}var vb=Object.freeze({__proto__:null,number:Ue,color:mb,array:pb}),kg=.95047,wg=1,Mg=1.08883,Cg=4/29,Yo=6/29,Eg=3*Yo*Yo,_b=Yo*Yo*Yo,yb=Math.PI/180,xb=180/Math.PI;function bu(i){return i>_b?Math.pow(i,1/3):i/Eg+Cg}function ku(i){return i>Yo?i*i*i:Eg*(i-Cg)}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 Sg(i){var t=Mu(i.r),e=Mu(i.g),n=Mu(i.b),o=bu((.4124564*t+.3575761*e+.1804375*n)/kg),r=bu((.2126729*t+.7151522*e+.072175*n)/wg),s=bu((.0193339*t+.119192*e+.9503041*n)/Mg);return{l:116*r-16,a:500*(o-r),b:200*(r-s),alpha:i.a}}function Tg(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=wg*ku(t),e=kg*ku(e),n=Mg*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 bb(i,t,e){return{l:Ue(i.l,t.l,e),a:Ue(i.a,t.a,e),b:Ue(i.b,t.b,e),alpha:Ue(i.alpha,t.alpha,e)}}function kb(i){var t=Sg(i),e=t.l,n=t.a,o=t.b,r=Math.atan2(o,n)*xb;return{h:r<0?r+360:r,c:Math.sqrt(n*n+o*o),l:e,alpha:i.a}}function wb(i){var t=i.h*yb,e=i.c,n=i.l;return Tg({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:Ue(i.c,t.c,e),l:Ue(i.l,t.l,e),alpha:Ue(i.alpha,t.alpha,e)}}var Oa={forward:Sg,reverse:Tg,interpolate:bb},Fa={forward:kb,reverse:wb,interpolate:Cb},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 gb(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,D),!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],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 "+Vt(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=bg(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"?vb[this.type.kind.toLowerCase()](u,d,h):this.operator==="interpolate-hcl"?Fa.reverse(Fa.interpolate(Fa.forward(u),Fa.forward(d),h)):Oa.reverse(Oa.interpolate(Oa.forward(u),Oa.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 Li=function(t,e){this.type=t,this.args=e};Li.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 $r(o,d.type)});return u?new Li(ht,r):new Li(n,r)},Li.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 fi&&!e.available&&(o||(o=e),e=null,n===this.args.length))return o;if(e!==null)break}return e},Li.prototype.eachChild=function(t){this.args.forEach(t)},Li.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Li.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var xn=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};xn.prototype.evaluate=function(t){return this.result.evaluate(t)},xn.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)},xn.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 xn(n,a):null},xn.prototype.outputDefined=function(){return this.result.outputDefined()},xn.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,D),o=e.parse(t[2],2,Ze(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 ae("Array index out of bounds: "+e+" < 0.");if(e>=n.length)throw new ae("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new ae("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,pt,D,za,ht])?new eo(n,o):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Vt(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(!Zr(e,["boolean","string","number","null"]))throw new ae("Expected first argument to be of type boolean, string, number or null, but found "+Vt(ee(e))+" instead.");if(!Zr(n,["string","array"]))throw new ae("Expected second argument to be of type array or string, but found "+Vt(ee(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 bn=function(t,e,n){this.type=D,this.needle=t,this.haystack=e,this.fromIndex=n};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,ht);if(!n||!o)return null;if(!cu(n.type,[lt,pt,D,za,ht]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Vt(n.type)+" instead");if(t.length===4){var r=e.parse(t[3],3,D);return r?new bn(n,o,r):null}else return new bn(n,o)},bn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!Zr(e,["boolean","string","number","null"]))throw new ae("Expected first argument to be of type boolean, string, number or null, but found "+Vt(ee(e))+" instead.");if(!Zr(n,["string","array"]))throw new ae("Expected second argument to be of type array or string, but found "+Vt(ee(n))+" instead.");if(this.fromIndex){var o=this.fromIndex.evaluate(t);return n.indexOf(e,o)}return n.indexOf(e)},bn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},bn.prototype.outputDefined=function(){return!1},bn.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 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=ee(f);else if(u.checkSubtype(n,ee(f)))return null;if(typeof r[String(f)]<"u")return u.error("Branch labels must be unique.");r[String(f)]=s.length}var g=e.parse(h,a,o);if(!g)return null;o=o||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,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=ee(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 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 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 kn=function(t,e,n,o){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=o};kn.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,D);if(!n||!o)return null;if(!cu(n.type,[Ze(ht),pt,ht]))return e.error("Expected first argument to be of type array or string, but found "+Vt(n.type)+" instead");if(t.length===4){var r=e.parse(t[3],3,D);return r?new kn(n.type,n,o,r):null}else return new kn(n.type,n,o)},kn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!Zr(e,["string","array"]))throw new ae("Expected first argument to be of type array or string, but found "+Vt(ee(e))+" instead.");if(this.endIndex){var o=this.endIndex.evaluate(t);return e.slice(n,o)}return e.slice(n)},kn.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},kn.prototype.outputDefined=function(){return!1},kn.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 Ig(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 Eb(i,t,e){return t===e}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 zg(i,t,e,n){return n.compare(t,e)===0}function Ab(i,t,e,n){return!zg(i,t,e,n)}function Pb(i,t,e,n){return n.compare(t,e)<0}function Lb(i,t,e,n){return n.compare(t,e)>0}function Db(i,t,e,n){return n.compare(t,e)<=0}function Ob(i,t,e,n){return n.compare(t,e)>=0}function qo(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(!Ig(l,h.type))return a.concat(1).error('"'+l+`" comparisons are not supported for type '`+Vt(h.type)+"'.");var u=a.parse(s[2],2,ht);if(!u)return null;if(!Ig(l,u.type))return a.concat(2).error('"'+l+`" comparisons are not supported for type '`+Vt(u.type)+"'.");if(h.type.kind!==u.type.kind&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot compare types '"+Vt(h.type)+"' and '"+Vt(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,Ra),!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=ee(a),u=ee(l);if(h.kind!==u.kind||!(h.kind==="string"||h.kind==="number"))throw new ae('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=ee(a),c=ee(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 Fb=qo("==",Eb,zg),Nb=qo("!=",Sb,Ab),Gb=qo("<",Tb,Pb),jb=qo(">",Ib,Lb),Bb=qo("<=",zb,Db),Ub=qo(">=",Rb,Ob),oo=function(t,e,n,o,r){this.type=pt,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,D);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,pt),!r))return null;var s=null;if(o.currency&&(s=e.parse(o.currency,1,pt),!s))return null;var a=null;if(o["min-fraction-digits"]&&(a=e.parse(o["min-fraction-digits"],1,D),!a))return null;var l=null;return o["max-fraction-digits"]&&(l=e.parse(o["max-fraction-digits"],1,D),!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=D,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 "+Vt(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 ae("Expected value to be of type string or array, but found "+Vt(ee(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={"==":Fb,"!=":Nb,">":jb,"<":Gb,">=":Ub,"<=":Bb,array:Me,at:to,boolean:Me,case:no,coalesce:Li,collator:mn,format:fn,image:gn,in:eo,"index-of":bn,interpolate:Ce,"interpolate-hcl":Ce,"interpolate-lab":Ce,length:ro,let:xn,literal:gi,match:io,number:Me,"number-format":oo,object:Me,slice:kn,step:yn,string:Me,"to-boolean":Ke,"to-color":Ke,"to-number":Ke,"to-string":Ke,var:vn,within:oi};function Rg(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=gg(e,n,o,s);if(a)throw new ae(a);return new zt(e/255*s,n/255*s,o/255*s,s)}function Ag(i,t){return i in t}function Su(i,t){var e=t[i];return typeof e>"u"?null:e}function Wb(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,[pt],function(i,t){var e=t[0];throw new ae(e.evaluate(i))}],typeof:[pt,[ht],function(i,t){var e=t[0];return Vt(ee(e.evaluate(i)))}],"to-rgba":[Ze(D,4),[Ai],function(i,t){var e=t[0];return e.evaluate(i).toArray()}],rgb:[Ai,[D,D,D],Rg],rgba:[Ai,[D,D,D,D],Rg],has:{type:lt,overloads:[[[pt],function(i,t){var e=t[0];return Ag(e.evaluate(i),i.properties())}],[[pt,Vo],function(i,t){var e=t[0],n=t[1];return Ag(e.evaluate(i),n.evaluate(i))}]]},get:{type:ht,overloads:[[[pt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.properties())}],[[pt,Vo],function(i,t){var e=t[0],n=t[1];return Su(e.evaluate(i),n.evaluate(i))}]]},"feature-state":[ht,[pt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.featureState||{})}],properties:[Vo,[],function(i){return i.properties()}],"geometry-type":[pt,[],function(i){return i.geometryType()}],id:[ht,[],function(i){return i.id()}],zoom:[D,[],function(i){return i.globals.zoom}],pitch:[D,[],function(i){return i.globals.pitch||0}],"distance-from-center":[D,[],function(i){return i.distanceFromCenter()}],"heatmap-density":[D,[],function(i){return i.globals.heatmapDensity||0}],"line-progress":[D,[],function(i){return i.globals.lineProgress||0}],"sky-radial-progress":[D,[],function(i){return i.globals.skyRadialProgress||0}],accumulated:[ht,[],function(i){return i.globals.accumulated===void 0?null:i.globals.accumulated}],"+":[D,so(D),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}],"*":[D,so(D),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:D,overloads:[[[D,D],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)-n.evaluate(i)}],[[D],function(i,t){var e=t[0];return-e.evaluate(i)}]]},"/":[D,[D,D],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)/n.evaluate(i)}],"%":[D,[D,D],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)%n.evaluate(i)}],ln2:[D,[],function(){return Math.LN2}],pi:[D,[],function(){return Math.PI}],e:[D,[],function(){return Math.E}],"^":[D,[D,D],function(i,t){var e=t[0],n=t[1];return Math.pow(e.evaluate(i),n.evaluate(i))}],sqrt:[D,[D],function(i,t){var e=t[0];return Math.sqrt(e.evaluate(i))}],log10:[D,[D],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN10}],ln:[D,[D],function(i,t){var e=t[0];return Math.log(e.evaluate(i))}],log2:[D,[D],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN2}],sin:[D,[D],function(i,t){var e=t[0];return Math.sin(e.evaluate(i))}],cos:[D,[D],function(i,t){var e=t[0];return Math.cos(e.evaluate(i))}],tan:[D,[D],function(i,t){var e=t[0];return Math.tan(e.evaluate(i))}],asin:[D,[D],function(i,t){var e=t[0];return Math.asin(e.evaluate(i))}],acos:[D,[D],function(i,t){var e=t[0];return Math.acos(e.evaluate(i))}],atan:[D,[D],function(i,t){var e=t[0];return Math.atan(e.evaluate(i))}],min:[D,so(D),function(i,t){return Math.min.apply(Math,t.map(function(e){return e.evaluate(i)}))}],max:[D,so(D),function(i,t){return Math.max.apply(Math,t.map(function(e){return e.evaluate(i)}))}],abs:[D,[D],function(i,t){var e=t[0];return Math.abs(e.evaluate(i))}],round:[D,[D],function(i,t){var e=t[0],n=e.evaluate(i);return n<0?-Math.round(-n):Math.round(n)}],floor:[D,[D],function(i,t){var e=t[0];return Math.floor(e.evaluate(i))}],ceil:[D,[D],function(i,t){var e=t[0];return Math.ceil(e.evaluate(i))}],"filter-==":[lt,[pt,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,[pt],function(i,t){var e=t[0];return i.geometryType()===e.value}],"filter-<":[lt,[pt,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,[pt,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,[pt,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,[pt,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,[Ze(pt)],function(i,t){var e=t[0];return e.value.indexOf(i.geometryType())>=0}],"filter-id-in":[lt,[Ze(ht)],function(i,t){var e=t[0];return e.value.indexOf(i.id())>=0}],"filter-in-small":[lt,[pt,Ze(ht)],function(i,t){var e=t[0],n=t[1];return n.value.indexOf(i.properties()[e.value])>=0}],"filter-in-large":[lt,[pt,Ze(ht)],function(i,t){var e=t[0],n=t[1];return Wb(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,[pt],function(i,t){var e=t[0],n=i.globals&&i.globals.isSupportedScript;return n?n(e.evaluate(i)):!0}],upcase:[pt,[pt],function(i,t){var e=t[0];return e.evaluate(i).toUpperCase()}],downcase:[pt,[pt],function(i,t){var e=t[0];return e.evaluate(i).toLowerCase()}],concat:[pt,so(ht),function(i,t){return t.map(function(e){return Hr(e.evaluate(i))}).join("")}],"resolved-locale":[pt,[Ra],function(i,t){var e=t[0];return e.evaluate(i).resolvedLocale()}]});function Tu(i){return{result:"success",value:i}}function $o(i){return{result:"error",value:i}}function Vb(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function Xb(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function Yb(i){return!!i.expression&&i.expression.interpolated}function Pg(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 ae("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 _n(Eu,[],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 Iu(n,t)):$o(e.errors)}var Na=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!_u(e.expression)};Na.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,o,r,s)},Na.prototype.evaluate=function(t,e,n,o,r,s){return this._styleExpression.evaluate(t,e,n,o,r,s)};var Qr=function(t,e,n,o){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!_u(e.expression),this.interpolationType=o};Qr.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,o,r,s)},Qr.prototype.evaluate=function(t,e,n,o,r,s){return this._styleExpression.evaluate(t,e,n,o,r,s)},Qr.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&&!Vb(t))return $o([new ci("","data expressions not supported")]);var o=yu(e,["zoom","pitch","distance-from-center"]);if(!o&&!Xb(t))return $o([new ci("","zoom expressions not supported")]);var r=Ga(e);if(!r&&!o)return $o([new ci("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(r instanceof ci)return $o([r]);if(r instanceof Ce&&!Yb(t))return $o([new ci("",'"interpolate" expressions cannot be used with this property')]);if(!r)return Tu(n?new Na("constant",i.value):new Na("source",i.value));var s=r instanceof Ce?r.interpolation:void 0;return Tu(n?new Qr("camera",i.value,r.labels,s):new Qr("composite",i.value,r.labels,s))}function Ga(i){var t=null;if(i instanceof xn)t=Ga(i.result);else if(i instanceof Li)for(var e=0,n=i.args;e<n.length;e+=1){var o=n[e];if(t=Ga(o),t)break}else(i instanceof yn||i instanceof Ce)&&i.input instanceof me&&i.input.name==="zoom"&&(t=i);return t instanceof ci||i.eachChild(function(r){var s=Ga(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 Zb(i){var t={color:Ai,string:pt,number:D,enum:pt,boolean:lt,formatted:Aa,resolvedImage:qr};return i.type==="array"?Ze(t[i.value]||ht,i.length):t[i.type]}function Kb(i){return i.type==="color"&&(Pg(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 Hb(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 Hb(i)}var Lg={$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 Dg(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(!Dg(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};Dg(i)||(i=ja(i));var e=i,n=!0;try{n=Jb(e)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
8
+ `+g;Ei.get(m)===void 0&&(Ei.set(m,100,!0),a(u.style,u.weight,g)||(Ei.set(m,0,!0),r===void 0&&(r=setInterval(l,32))))}}}(),av=function(){let i;return function(t){let e=Ql[t];if(e==null){if(wl){const n=$d(t),o=Cc(t,"Žg");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);Ql[t]=e}return e}}();function Cc(i,t){return Io||(Io=Ae(1,1)),i!=Hl&&(Io.font=i,Hl=Io.font),Io.measureText(t)}function Qs(i,t){return Cc(i,t).width}function Ec(i,t,e){if(t in e)return e[t];const n=t.split(`
9
+ `).reduce((o,r)=>Math.max(o,Qs(i,r)),0);return e[t]=n,n}function lv(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===`
10
+ `||h===u){r=Math.max(r,s),o.push(s),s=0,a+=l;continue}const c=t[h+1]||i.font,f=Qs(c,d);e.push(f),s+=f;const g=av(c);n.push(g),l=Math.max(l,g)}return{width:r,height:a,widths:e,heights:n,lineWidths:o}}function hv(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]),uv(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 uv(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 dv extends ov{constructor(t){super(t),this.fontChangeListenerKey_=mt(Ei,_o.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 wc(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($i.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(!Sl(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);h0(this.element_,this.children_),this.dispatchRenderEvent($i.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}}const cv=dv;class Qi extends Je{constructor(t,e){super(t),this.layer=e}}const Jl={LAYERS:"layers"};class th 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(Jl.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new qe(n.slice(),{unique:!0}):gt(typeof n.getArray=="function",43):n=new qe(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(mt(t,re.ADD,this.handleLayersAdd_,this),mt(t,re.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 Qi("addlayer",r))}this.changed()}registerLayerListeners_(t){const e=[mt(t,_o.PROPERTYCHANGE,this.handleLayerChange_,this),mt(t,tt.CHANGE,this.handleLayerChange_,this)];t instanceof th&&e.push(mt(t,"addlayer",this.handleLayerGroupAdd_,this),mt(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[K(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Qi("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Qi("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Qi("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,n=K(e);this.listenerKeys_[n].forEach(Ft),delete this.listenerKeys_[n],this.dispatchEvent(new Qi("removelayer",e)),this.changed()}getLayers(){return this.get(Jl.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 Qi("removelayer",n[o]))}this.set(Jl.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=th;class fv extends Je{constructor(t,e,n){super(t),this.map=e,this.frameState=n!==void 0?n:null}}const zo=fv;class gv extends zo{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=gv,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 mv extends Rs{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_=mt(n,Tl.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=mt(n,Tl.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(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"?On:o}if(this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(mt(n,Mt.POINTERMOVE,this.handlePointerMove_,this),mt(n,Mt.POINTERUP,this.handlePointerUp_,this),mt(this.element_,Mt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(mt(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 pv=mv,ta=1/0;class vv{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!=ta?(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==ta?delete this.queuedElements_[this.keyFunction_(s)]:(n[o]=l,e[o++]=s);e.length=o,n.length=o,this.heapify_()}}const _v=vv,G={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class yv extends _v{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===G.LOADED||n===G.ERROR||n===G.EMPTY){n!==G.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===G.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++n,r.load())}}const xv=yv;function bv(i,t,e,n,o){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return ta;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 $t={ANIMATING:0,INTERACTING:1},ii={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Sc=42,eh=256;function Tc(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,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=qt(n[0],c,f),_=qt(n[1],g,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]-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 kv(i){return i}function ih(i,t,e,n){const o=Nt(t)/e[0],r=Ye(t)/e[1];return n?Math.min(i,Math.max(o,r)):Math.min(i,Math.min(o,r))}function nh(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),qt(n,e/2,t*2)}function wv(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?ih(l,e,s,n):l;if(a)return t?nh(o,u,h):qt(o,h,u);const d=Math.min(u,o),c=Math.floor(kl(i,d,r));return i[c]>u&&c<i.length-1?i[c+1]:i[c]}else return}}function Mv(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?ih(t,o,l,r):t;if(h)return n?nh(s,u,e):qt(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 qt(_,e,u)}else return}}function Ic(i,t,e,n,o){return e=e!==void 0?e:!0,function(r,s,a,l){if(r!==void 0){const h=n?ih(i,n,a,o):i;return!e||!l?qt(r,t,h):nh(r,h,t)}else return}}function oh(i){if(i!==void 0)return 0}function zc(i){if(i!==void 0)return i}function Cv(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 Ev(i){return i=i||Gn(5),function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=i?0:t}}function Rc(i){return Math.pow(i,3)}function Ro(i){return 1-Rc(1-i)}function Sv(i){return 3*i*i-2*i*i*i}function Tv(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 rh(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 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 Iv(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,f=i[d+1]-h;a[u++]=l+o*c,a[u++]=h+r*f;for(let g=d+2;g<d+n;++g)a[u++]=i[g]}return a&&a.length!=u&&(a.length=u),a}function Ac(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 Pc=$e();class zv extends ui{constructor(){super(),this.extent_=je(),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 z0(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=Ye(h)/Ye(l);return Mi(Pc,h[0],h[3],u,-u,0,0,0),Ji(r,0,r.length,a,Pc,s),br(n,e)(r,s,a)}:br(n,e);return this.applyTransform(o),this}}const Lc=zv;class Rv extends Lc{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return Al(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=ea(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){et()}setLayout(t,e,n){let o;if(t)o=ea(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=Av(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();rh(n,0,n.length,o,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=Zi(this.getExtent()));const o=this.getFlatCoordinates();if(o){const r=this.getStride();Iv(o,0,o.length,r,t,e,n,o),this.changed()}}translate(t,e){const n=this.getFlatCoordinates();if(n){const o=this.getStride();Ac(n,0,n.length,o,t,e,n),this.changed()}}}function Av(i){let t;return i==2?t="XY":i==3?t="XYZ":i==4&&(t="XYZM"),t}function ea(i){let t;return i=="XY"?t=2:i=="XYZ"||i=="XYM"?t=3:i=="XYZM"&&(t=4),t}function Pv(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 tn=Rv;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 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 sh(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=Nn(r,s,a,l);h>o&&(o=h),r=a,s=l}return o}function ah(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];o=sh(i,t,a,n,o),t=a}return o}function Lv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];o=ah(i,t,a,n,o),t=a[a.length-1]}return o}function lh(i,t,e,n,o,r,s,a,l,h,u){if(t==e)return h;let d,c;if(o===0)if(c=Nn(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=Nn(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))/o|0,1);if(r&&(Dc(i,e-n,t,n,s,a,u),c=Nn(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 hh(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 f=e[d];h=lh(i,t,f,n,o,r,s,a,l,h,u),t=f}return h}function Dv(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 f=e[d];h=hh(i,t,f,n,o,r,s,a,l,h,u),t=f[f.length-1]}return h}function Oc(i,t,e,n){for(let o=0,r=e.length;o<r;++o)i[t++]=e[o];return t}function ia(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 uh(i,t,e,n,o){o=o||[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=ia(i,t,e[s],n);o[r++]=l,t=l}return o.length=r,o}function Ov(i,t,e,n,o){o=o||[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=uh(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 dh(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 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=f0(y,x,g,m,p,_);k>f&&(u=v,f=k)}f>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 Fv(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=dh(i,t,u,n,o,r,s),a.push(s),t=u}return s}function Yn(i,t){return t*Math.round(i/t)}function Nv(i,t,e,n,o,r,s){if(t==e)return s;let a=Yn(i[t],o),l=Yn(i[t+1],o);t+=n,r[s++]=a,r[s++]=l;let h,u;do if(h=Yn(i[t],o),u=Yn(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=Yn(i[t],o),c=Yn(i[t+1],o);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}r[s++]=h,r[s++]=u,a=h,l=u,h=d,u=c}return r[s++]=h,r[s++]=u,s}function Fc(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=Nv(i,t,u,n,o,r,s),a.push(s),t=u}return s}function Gv(i,t,e,n,o,r,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l],d=[];s=Fc(i,t,u,n,o,r,s,d),a.push(d),t=u[u.length-1]}return s}function en(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++]=en(i,t,l,n,o[r]),t=l}return o.length=r,o}function ch(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 Nc(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 Gc(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}return o}function jv(i,t,e,n){let o=0;for(let r=0,s=e.length;r<s;++r){const a=e[r];o+=Gc(i,t,a,n),t=a[a.length-1]}return o}class na extends tn{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 na(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,n,o){return o<Bn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),lh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,o))}getArea(){return Nc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return en(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=dh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new na(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ia(this.flatCoordinates,0,t,this.stride),this.changed()}}const jc=na;let Bc=class extends tn{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new Bc(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){const r=this.flatCoordinates,s=Nn(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 zl(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Oc(this.flatCoordinates,0,t,this.stride),this.changed()}};const ni=Bc;function Bv(i,t,e,n,o){return!Pl(o,function(s){return!qn(i,t,e,n,s[0],s[1])})}function qn(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 fh(i,t,e,n,o,r){if(e.length===0||!qn(i,t,e[0],n,o,r))return!1;for(let s=1,a=e.length;s<a;++s)if(qn(i,e[s-1],e[s],n,o,r))return!1;return!0}function Uv(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(fh(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,f;const g=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],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(Ln),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,fh(i,t,e,n,h,g)&&(p=h,_=v)),u=d}return isNaN(p)&&(p=o[r]),s?(s.push(p,g,_),s):[p,g,_]}function Uc(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 Wc(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 oa(i,t,e,n,o){const r=oc(je(),i,t,e,n);return Zt(o,r)?Un(o,r)||r[0]>=o[0]&&r[2]<=o[2]||r[1]>=o[1]&&r[3]<=o[3]?!0:Wc(i,t,e,n,function(s,a){return R0(o,s,a)}):!1}function Wv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){if(oa(i,t,e[r],n,o))return!0;t=e[r]}return!1}function Vc(i,t,e,n,o){return!!(oa(i,t,e,n,o)||qn(i,t,e,n,o[0],o[1])||qn(i,t,e,n,o[0],o[3])||qn(i,t,e,n,o[2],o[1])||qn(i,t,e,n,o[2],o[3]))}function Xc(i,t,e,n,o){if(!Vc(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(Bv(i,e[r-1],e[r],n,o)&&!oa(i,e[r-1],e[r],n,o))return!1;return!0}function Vv(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r){const a=e[r];if(Xc(i,t,a,n,o))return!0;t=a[a.length-1]}return!1}function Xv(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 mh(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=mh(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 Yv(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 ph(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=mh(i,t,a,n);(r===0?o&&l||!o&&!l:o&&!l||!o&&l)&&Xv(i,t,a,n),t=a}return t}function qc(i,t,e,n,o){for(let r=0,s=e.length;r<s;++r)t=ph(i,t,e[r],n,o);return t}function qv(i,t){const e=[];let n=0,o=0;for(let r=0,s=t.length;r<s;++r){const a=t[r];if(!mh(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 Ao extends tn{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?hi(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Ao(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,o){return o<Bn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ah(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),hh(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,o))}containsXY(t,e){return fh(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Gc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),ph(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=Zi(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 jc(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 jc(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=ph(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 Ao(e,"XY",n)}getType(){return"Polygon"}intersectsExtent(t){return Xc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=uh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const $n=Ao;function $c(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 Ao(r,"XY",[r.length])}function $v(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 Ao(a,o,l);return Zv(h,r,i.getRadius(),e),h}function Zv(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+qi(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 vh=0;class Kv extends ui{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Vl(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&&N0(),t.center&&(t.center=Wt(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=Qv(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=Hv(t),r=n.constraint,s=Jv(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=Wt(o.center,this.getProjection())),o.anchor&&(o=Object.assign({},o),o.anchor=Wt(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&&ra(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||Sv,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=qi(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;d.targetRotation=l+c,l=d.targetRotation}t_(d)?d.complete=!0:r+=d.duration,h.push(d)}this.animations_.push(h),this.setHint($t.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[$t.ANIMATING]>0}getInteracting(){return this.hints_[$t.INTERACTING]>0}cancelAnimations(){this.setHint($t.ANIMATING,-this.hints_[$t.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e<n;++e){const o=this.animations_[e];if(o[0].callback&&ra(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],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?qi(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(r){this.animations_[n]=null,this.setHint($t.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const s=o[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 o=this.getCenterInternal();return o!==void 0&&(n=[o[0]-e[0],o[1]-e[1]],Gl(n,t-this.getRotation()),L0(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&&So(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),Dl(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=Ye(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=_h(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=kl(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=qt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,qt(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(!Fl(t),25);const o=Hi(t,this.getProjection());n=$c(o)}else if(t.getType()==="Circle"){const o=Hi(t.getExtent(),this.getProjection());n=$c(o),n.rotate(this.getRotation(),Zi(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 f=r[d]*n-r[d+1]*o,g=r[d]*o+r[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 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=Zi(a);c[0]+=(o[1]-o[3])/2*l,c[1]+=(o[0]-o[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:On;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(Wt(t,this.getProjection()),e,n)}centerOnInternal(t,e,n){this.setCenterInternal(_h(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=_h(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=So(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&&Wt(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=Wt(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&&Wt(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:Ro,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint($t.INTERACTING,1)}endInteraction(t,e,n){n=n&&Wt(n,this.getProjection()),this.endInteractionInternal(t,e,n)}endInteractionInternal(t,e,n){this.setHint($t.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 Hv(i){if(i.extent!==void 0){const e=i.smoothExtentConstraint!==void 0?i.smoothExtentConstraint:!0;return Tc(i.extent,i.constrainOnlyCenter,e)}const t=Vl(i.projection,"EPSG:3857");if(i.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,Tc(e,!1,!1)}return kv}function Qv(i){let t,e,n,s=i.minZoom!==void 0?i.minZoom:vh,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=Vl(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=wv(p,u,!g&&m,d):t=Ic(e,n,u,!g&&m,d)}else{const _=(f?Math.max(Nt(f),Ye(f)):360*bo.degrees/c.getMetersPerUnit())/eh/Math.pow(2,vh),v=_/Math.pow(2,28-vh);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=Mv(l,e,n,u,!g&&m,d):t=Ic(e,n,u,!g&&m,d)}return{constraint:t,maxResolution:e,minResolution:n,minZoom:s,zoomFactor:l}}function Jv(i){if(i.enableRotation!==void 0?i.enableRotation:!0){const e=i.constrainRotation;return e===void 0||e===!0?Ev():e===!1?zc:typeof e=="number"?Cv(e):zc}else return oh}function t_(i){return!(i.sourceCenter&&i.targetCenter&&!ei(i.sourceCenter,i.targetCenter)||i.sourceResolution!==i.targetResolution||i.sourceRotation!==i.targetRotation)}function _h(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 nn=Kv;class e_ extends xo{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:"⇧",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+" "+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(Ls)}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:Ro}):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(Ls);!r&&n===0?this.element.classList.add(Ls):r&&n!==0&&this.element.classList.remove(Ls)}this.label_.style.transform=o}this.rotation_=n}}const i_=e_;class n_ extends xo{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:"–",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+" "+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 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:Ro})):n.setZoom(r)}}}const o_=n_;function Zc(i){i=i||{};const t=new qe;return(i.zoom!==void 0?i.zoom:!0)&&t.push(new o_(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&t.push(new i_(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&t.push(new _0(i.attributionOptions)),t}const yh={ACTIVE:"active"};class r_ extends ui{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(yh.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(yh.ACTIVE,t)}setMap(t){this.map_=t}}function s_(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:Tv,center:i.getConstrainedCenter(o)})}}function xh(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:Ro})}const zr=r_;class a_ 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();xh(a,s,r,this.duration_),n.preventDefault(),e=!0}return!e}}const l_=a_;class h_ 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 bh(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 on=h_;function kh(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 u_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},d_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},c_=function(i){const t=i.map.getTargetElement(),e=i.map.getOwnerDocument().activeElement;return t.contains(e)},Kc=function(i){return i.map.getTargetElement().hasAttribute("tabindex")?c_(i):!0},wh=Dn,Hc=function(i){const t=i.originalEvent;return t.button==0&&!(r0&&s0&&t.ctrlKey)},f_=function(i){return i.type==Mt.SINGLECLICK},Mh=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},Qc=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},Jc=function(i){const t=i.originalEvent,e=t.target.tagName;return e!=="INPUT"&&e!=="SELECT"&&e!=="TEXTAREA"&&!t.target.isContentEditable},Ch=function(i){const t=i.originalEvent;return gt(t!==void 0,56),t.pointerType=="mouse"},tf=function(i){const t=i.originalEvent;return gt(t!==void 0,56),t.isPrimary&&t.button===0};class g_ extends on{constructor(t){super({stopDown:yo}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:kh(Mh,tf);this.condition_=t.onFocusOnly?kh(Kc,e):e,this.noKinetic_=!1}handleDragEvent(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());const e=this.targetPointers,n=bh(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();O0(o,s.getResolution()),Gl(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:Ro})}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 m_=g_;class p_ extends on{constructor(t){t=t||{},super({stopDown:yo}),this.condition_=t.condition?t.condition:d_,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!Ch(t))return;const e=t.map,n=e.getView();if(n.getConstraints().rotation===oh)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 Ch(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return Ch(t)&&Hc(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const v_=p_;class __ extends bl{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 $n([o])}getGeometry(){return this.geometry_}}const y_=__,sa={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Eh extends Je{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class x_ extends on{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new y_(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:Hc,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 Eh(sa.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 Eh(e?sa.BOXEND:sa.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 Eh(sa.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}}const b_=x_;class k_ extends b_{constructor(t){t=t||{};const e=t.condition?t.condition:Qc;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:Ro})}}const w_=k_,Zn={LEFT:37,UP:38,RIGHT:39,DOWN:40};class M_ extends zr{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return Mh(e)&&Jc(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==Zn.DOWN||o==Zn.LEFT||o==Zn.RIGHT||o==Zn.UP)){const s=t.map.getView(),a=s.getResolution()*this.pixelDelta_;let l=0,h=0;o==Zn.DOWN?h=-a:o==Zn.LEFT?l=-a:o==Zn.RIGHT?l=a:h=a;const u=[l,h];Gl(u,s.getRotation()),s_(s,u,this.duration_),n.preventDefault(),e=!0}}return!e}}const C_=M_;class E_ extends zr{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:Jc,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();xh(a,s,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}const S_=E_;class T_{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 I_=T_;class z_ 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:wh;this.condition_=t.onFocusOnly?kh(Kc,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,o0&&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=-qt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),xh(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 R_=z_;class A_ extends on{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=yo),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===oh)return;const l=s.getViewport().getBoundingClientRect(),h=bh(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 P_=A_;class L_ extends on{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=yo),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=bh(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 D_=L_;function ef(i){i=i||{};const t=new qe,e=new I_(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new v_),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new l_({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&t.push(new m_({onFocusOnly:i.onFocusOnly,kinetic:e})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&t.push(new P_),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new D_({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new C_),t.push(new S_({delta:i.zoomDelta,duration:i.zoomDuration}))),(i.mouseWheelZoom!==void 0?i.mouseWheelZoom:!0)&&t.push(new R_({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(i.shiftDragZoom!==void 0?i.shiftDragZoom:!0)&&t.push(new w_({duration:i.zoomDuration})),t}function nf(i){return i[0]>0&&i[1]>0}function O_(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 of(i){if(i instanceof Fs){i.setMapInternal(null);return}i instanceof Js&&i.getLayers().forEach(of)}function rf(i,t){if(i instanceof Fs){i.setMapInternal(t);return}if(i instanceof Js){const e=i.getLayers().getArray();for(let n=0,o=e.length;n<o;++n)rf(e[n],t)}}let F_=class extends ui{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=N_(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_=$e(),this.pixelToCoordinateTransform_=$e(),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||Zc(),this.interactions=e.interactions||ef({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new xv(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 nn)&&t.view.then(function(o){n.setView(new nn(o))}),this.controls.addEventListener(re.ADD,function(o){o.element.setMap(this)}.bind(this)),this.controls.addEventListener(re.REMOVE,function(o){o.element.setMap(null)}.bind(this)),this.interactions.addEventListener(re.ADD,function(o){o.element.setMap(this)}.bind(this)),this.interactions.addEventListener(re.REMOVE,function(o){o.element.setMap(null)}.bind(this)),this.overlays_.addEventListener(re.ADD,function(o){this.addOverlayInternal_(o.element)}.bind(this)),this.overlays_.addEventListener(re.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){rf(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 So(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Qt(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 qe){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=Wt(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?Qt(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 bv(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===Tl.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[$t.ANIMATING]||s[$t.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($i.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent($i.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new zo(Xi.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new zo(Xi.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,Cl(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 cv(this)),this.mapBrowserEventHandler_=new pv(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_,Vd?{passive:!1}:!1);const e=this.getOwnerDocument().defaultView,n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.targetChangeHandlerKeys_=[mt(n,tt.KEYDOWN,this.handleBrowserEvent,this),mt(n,tt.KEYPRESS,this.handleBrowserEvent,this),mt(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_=mt(t,_o.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=mt(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 Qi("addlayer",t)),this.layerGroupPropertyListenerKeys_=[mt(t,_o.PROPERTYCHANGE,this.render,this),mt(t,tt.CHANGE,this.render,this),mt(t,"addlayer",this.handleLayerAdd_,this),mt(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){of(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&&nf(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:Dl(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;r.nextExtent=Dl(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_||!Fl(this.previousExtent_)&&!Eo(r.extent,this.previousExtent_))&&(this.dispatchEvent(new zo(Xi.MOVESTART,this,o)),this.previousExtent_=_r(this.previousExtent_)),this.previousExtent_&&!r.viewHints[$t.ANIMATING]&&!r.viewHints[$t.INTERACTING]&&!Eo(r.extent,this.previousExtent_)&&(this.dispatchEvent(new zo(Xi.MOVEEND,this,r)),ic(r.extent,this.previousExtent_))),this.dispatchEvent(new zo(Xi.POSTRENDER,this,r)),this.renderComplete_=this.hasListener(Xi.LOADSTART)||this.hasListener(Xi.LOADEND)||this.hasListener($i.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 Qi("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 nn){this.set(ge.VIEW,t);return}this.set(ge.VIEW,new nn);const e=this;t.then(function(n){e.setView(new nn(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],!nf(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 N_(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 nn?i.view:new nn;let o;i.controls!==void 0&&(Array.isArray(i.controls)?o=new qe(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 qe(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 qe(i.overlays.slice()):(gt(typeof i.overlays.getArray=="function",49),s=i.overlays):s=new qe,{controls:o,interactions:r,keyboardEventTarget:t,overlays:s,values:e}}const G_=F_,Sh="units",j_=[1,2,5],Rr=25.4/.28;class B_ extends xo{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(Sh,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(Sh)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(Sh,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=Xs(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=bo.degrees;h*=y,h<y/60?(u="″",s*=3600):h<y?(u="′",s*=60):u="°"}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="μm",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,f,g,m,p,_;for(;;){g=Math.floor(d/3);const y=Math.pow(10,g);if(c=j_[(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 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=Xs(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 U_=B_;class Th extends ui{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 Th(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_=mt(t,tt.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?W_(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 W_(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=Th;class sf{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 Ih(i,t,e){const n=e?Gt(e.featureProjection):null,o=e?Gt(e.dataProjection):null;let r;if(n&&o&&!Vn(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 V_ extends sf{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(aa(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(aa(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return et()}readFeaturesFromObject(t,e){return et()}readGeometry(t,e){return this.readGeometryFromObject(aa(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return et()}readProjection(t){return this.readProjectionFromObject(aa(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 aa(i){if(typeof i=="string"){const t=JSON.parse(i);return t||null}else return i!==null?i:null}const X_=V_;function la(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 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=o*c,m=Zp(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,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 zh(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 Y_(i,t,e,n,o,r,s){if(s)return zh(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 zh(i,t,u,n,o,!1);t=u}}return null}function af(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 ha extends tn{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?hi(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,o){return o<Bn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),lh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,o))}forEachSegment(t){return Wc(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,zh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return en(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 af(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=dh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ha(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return oa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ia(this.flatCoordinates,0,t,this.stride),this.changed()}}const Kn=ha;class ua extends tn{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()),hi(s,u.getFlatCoordinates()),a.push(s.length)}this.setFlatCoordinates(o,s),this.ends_=a}}appendLineString(t){this.flatCoordinates?hi(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,o){return o<Bn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ah(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),hh(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,Y_(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 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,o=[];let r=0;for(let s=0,a=e.length;s<a;++s){const l=e[s],h=new Kn(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=la(e,n,l,r,.5);hi(t,h),n=l}return t}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Fv(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,n),new ua(e,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(t){return Wv(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=uh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Rh=ua;class Ah extends tn{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){this.flatCoordinates?hi(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()}clone(){const t=new Ah(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,o){if(o<Bn(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=Nn(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 en(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(zl(t,s,a))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ia(this.flatCoordinates,0,t,this.stride),this.changed()}}const Ar=Ah;function lf(i,t,e,n){const o=[];let r=je();for(let s=0,a=e.length;s<a;++s){const l=e[s];r=Al(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 da extends tn{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 f=0,g=c.length;f<g;++f)c[f]+=d;hi(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;hi(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 da(this.flatCoordinates.slice(),this.layout,e);return n.applyProperties(this),n}closestPointXY(t,e,n,o){return o<Bn(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Lv(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Dv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,n,o))}containsXY(t,e){return Uv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return jv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),qc(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,ch(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=lf(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Uc(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;Yv(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=qc(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Gv(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 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 $n(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 $n(e.slice(r,h),t,l);o.push(u),r=h}return o}getType(){return"MultiPolygon"}intersectsExtent(t){return Vv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=Ov(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 Ph=da;class ca extends Lc{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(mt(this.geometries_[t],tt.CHANGE,this.changed,this))}clone(){const t=new ca(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,n,o){if(o<Bn(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)nc(t,e[n].getExtent());return t}getGeometries(){return hf(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 ca(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=Zi(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(hf(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 hf(i){const t=[];for(let e=0,n=i.length;e<n;++e)t.push(i[e].clone());return t}const q_=ca;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 o=Lh(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 Lh(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()]),Fn(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 Lh(i,t){if(!i)return null;let e;switch(i.type){case"Point":{e=K_(i);break}case"LineString":{e=H_(i);break}case"Polygon":{e=e1(i);break}case"MultiPoint":{e=J_(i);break}case"MultiLineString":{e=Q_(i);break}case"MultiPolygon":{e=t1(i);break}case"GeometryCollection":{e=Z_(i);break}default:throw new Error("Unsupported GeoJSON type: "+i.type)}return Ih(e,!1,t)}function Z_(i,t){const e=i.geometries.map(function(n){return Lh(n,t)});return new q_(e)}function K_(i){return new ni(i.coordinates)}function H_(i){return new Kn(i.coordinates)}function Q_(i){return new Rh(i.coordinates)}function J_(i){return new Ar(i.coordinates)}function t1(i){return new Ph(i.coordinates)}function e1(i){return new $n(i.coordinates)}function Dh(i,t){i=Ih(i,!0,t);const e=i.getType();let n;switch(e){case"Point":{n=a1(i);break}case"LineString":{n=n1(i);break}case"Polygon":{n=l1(i,t);break}case"MultiPoint":{n=r1(i);break}case"MultiLineString":{n=o1(i);break}case"MultiPolygon":{n=s1(i,t);break}case"GeometryCollection":{n=i1(i,t);break}case"Circle":{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return n}function i1(i,t){return t=Object.assign({},t),delete t.featureProjection,{type:"GeometryCollection",geometries:i.getGeometriesArray().map(function(n){return Dh(n,t)})}}function n1(i,t){return{type:"LineString",coordinates:i.getCoordinates()}}function o1(i,t){return{type:"MultiLineString",coordinates:i.getCoordinates()}}function r1(i,t){return{type:"MultiPoint",coordinates:i.getCoordinates()}}function s1(i,t){let e;return t&&(e=t.rightHanded),{type:"MultiPolygon",coordinates:i.getCoordinates(e)}}function a1(i,t){return{type:"Point",coordinates:i.getCoordinates()}}function l1(i,t){let e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:i.getCoordinates(e)}}const Po=$_;class Oh{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new Oh({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const se=Oh,Jt={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 uf=Fh;function df(i,t,e){const n=i;let o=!0,r=!1,s=!1;const a=[As(n,tt.LOAD,function(){s=!0,r||t()})];return n.src&&a0?(r=!0,n.decode().then(function(){o&&t()}).catch(function(l){o&&(s?t():e())})):a.push(As(n,tt.ERROR,e)),function(){o=!1,a.forEach(Ft)}}let Pr=null;class h1 extends Rs{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_===Jt.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_=Jt.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Jt.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_===Jt.IDLE){this.image_||this.initializeImage_(),this.imageState_=Jt.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=df(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Jt.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=Kl(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 u1(i,t,e,n,o,r){let s=Zs.get(t,n,r);return s||(s=new h1(i,t,e,n,o,r),Zs.set(t,n,r,s)),s}class Nh extends uf{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||K(s)),gt(a!==void 0&&a.length>0,6);const l=t.src!==void 0?Jt.IDLE:Jt.LOADED;this.color_=t.color!==void 0?kr(t.color):null,this.iconImage_=u1(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 Nh({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 fa=Nh;class Gh{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 Gh({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=Gh;function ci(i){return Array.isArray(i)?bc(i):i}class jh extends uf{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 jh({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 Jt.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 f=e/2/c,g=e/2*(u/d),p=Math.sqrt((o+f)*(o+f)+g*g)-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=To,e=0,n=null,o=0,r,s=0;this.stroke_&&(r=this.stroke_.getColor(),r===null&&(r=Er),r=ci(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=To),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=ci(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=jh;class Bh 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 Bh({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 rn=Bh;class sn{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=ff,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 sn({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_=ff,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function d1(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 Uh=null;function c1(i,t){if(!Uh){const e=new se({color:"rgba(255,255,255,0.4)"}),n=new ke({color:"#3399CC",width:1.25});Uh=[new sn({image:new rn({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Uh}function cf(){const i={},t=[255,255,255,1],e=[0,153,255,1],n=3;return i.Polygon=[new sn({fill:new se({color:[255,255,255,.5]})})],i.MultiPolygon=i.Polygon,i.LineString=[new sn({stroke:new ke({color:t,width:n+2})}),new sn({stroke:new ke({color:e,width:n})})],i.MultiLineString=i.LineString,i.Circle=i.Polygon.concat(i.LineString),i.Point=[new sn({image:new rn({radius:n*2,fill:new se({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 ff(i){return i.getGeometry()}const te=sn,f1="#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 se({color:f1}),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 gf=Wh;function g1(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Vh={};Vh.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,f=i[t+d];for(d+=c,r=f&(1<<-u)-1,f>>=-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:(f?-1:1)*(1/0);s=s+Math.pow(2,n),r=r-h}return(f?-1:1)*s*Math.pow(2,r-n)},Vh.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,f=n?0:r-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,o),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;i[e+f]=a&255,f+=g,a/=256,o-=8);for(s=s<<o|a,h+=o;h>0;i[e+f]=s&255,f+=g,s/=256,h-=8);i[e+f-g]|=m*128};var m1=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 Xh=(1<<16)*(1<<16),mf=1/Xh,p1=12,pf=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=pa(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=_f(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=pa(this.buf,this.pos)+pa(this.buf,this.pos+4)*Xh;return this.pos+=8,i},readSFixed64:function(){var i=pa(this.buf,this.pos)+_f(this.buf,this.pos+4)*Xh;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,v1(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>=p1&&pf?R1(this.buf,t,i):z1(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),Do(this.buf,i,this.pos),this.pos+=4},writeSFixed32:function(i){this.realloc(4),Do(this.buf,i,this.pos),this.pos+=4},writeFixed64:function(i){this.realloc(8),Do(this.buf,i&-1,this.pos),Do(this.buf,Math.floor(i*mf),this.pos+4),this.pos+=8},writeSFixed64:function(i){this.realloc(8),Do(this.buf,i&-1,this.pos),Do(this.buf,Math.floor(i*mf),this.pos+4),this.pos+=8},writeVarint:function(i){if(i=+i||0,i>268435455||i<0){_1(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=A1(this.buf,i,this.pos);var e=this.pos-t;e>=128&&vf(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&&vf(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,b1,t)},writePackedSVarint:function(i,t){t.length&&this.writeMessage(i,k1,t)},writePackedBoolean:function(i,t){t.length&&this.writeMessage(i,C1,t)},writePackedFloat:function(i,t){t.length&&this.writeMessage(i,w1,t)},writePackedDouble:function(i,t){t.length&&this.writeMessage(i,M1,t)},writePackedFixed32:function(i,t){t.length&&this.writeMessage(i,E1,t)},writePackedSFixed32:function(i,t){t.length&&this.writeMessage(i,S1,t)},writePackedFixed64:function(i,t){t.length&&this.writeMessage(i,T1,t)},writePackedSFixed64:function(i,t){t.length&&this.writeMessage(i,I1,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 v1(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 Lo(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 Lo(i,t,e){return e?t*4294967296+(i>>>0):(t>>>0)*4294967296+(i>>>0)}function _1(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),y1(e,n,t),x1(n,t)}function y1(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 x1(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 vf(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 b1(i,t){for(var e=0;e<i.length;e++)t.writeVarint(i[e])}function k1(i,t){for(var e=0;e<i.length;e++)t.writeSVarint(i[e])}function w1(i,t){for(var e=0;e<i.length;e++)t.writeFloat(i[e])}function M1(i,t){for(var e=0;e<i.length;e++)t.writeDouble(i[e])}function C1(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 S1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed32(i[e])}function T1(i,t){for(var e=0;e<i.length;e++)t.writeFixed64(i[e])}function I1(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 Do(i,t,e){i[e]=t,i[e+1]=t>>>8,i[e+2]=t>>>16,i[e+3]=t>>>24}function _f(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+(i[t+3]<<24)}function z1(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 R1(i,t,e){return pf.decode(i.subarray(t,e))}function A1(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 va extends tn{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 va(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(Zt(t,e)){const n=this.getCenter();return t[0]<=n[0]&&t[2]>=n[0]||t[1]<=n[1]&&t[3]>=n[1]?!0:Pl(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=Oc(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(rh(n,0,n.length,o,t,e,n)),this.changed()}translate(t,e){const n=this.getCenter(),o=this.getStride();this.setCenter(Ac(n,0,n.length,o,t,e,n)),this.changed()}}va.prototype.transform;const P1=va,yf=$e();class Lr{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_):Al(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=Zi(this.getExtent());this.flatInteriorPoints_=gh(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=lf(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=Uc(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 o=0,r=n.length;o<r;++o){const s=n[o],a=la(t,e,s,2,.5);hi(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=Ye(n)/Ye(e);Mi(yf,n[0],n[3],o,-o,0,0,0),Ji(this.flatCoordinates_,0,this.flatCoordinates_.length,2,yf,this.flatCoordinates_)}}getEnds(){return this.ends_}}Lr.prototype.getEndss=Lr.prototype.getEnds,Lr.prototype.getFlatCoordinates=Lr.prototype.getOrientedFlatCoordinates;const Yh=Lr;class L1 extends sf{constructor(t){super(),t=t||{},this.dataProjection=new Ns({code:"",units:"tile-pixels"}),this.featureClass_=t.featureClass?t.featureClass:Yh,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=G1(o,h.length);if(this.featureClass_===Yh)r=new this.featureClass_(u,l,h,s,a),r.transform(n.dataProjection);else{let d;if(u=="Polygon"){const g=qv(l,h);d=g.length>1?new Ph(l,"XY",g):new $n(l,"XY",h)}else d=u==="Point"?new ni(l,"XY"):u==="LineString"?new Kn(l,"XY"):u==="MultiPoint"?new Ar(l,"XY"):u==="MultiLineString"?new Rh(l,"XY",h):null;const c=this.featureClass_;r=new c,this.geometryName_&&r.setGeometryName(this.geometryName_);const f=Ih(d,!1,n);r.setGeometry(f),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 m1(t),s=r.readFields(D1,{}),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 f=N1(r,h,d),g=this.createFeature_(r,f,e);g!==null&&a.push(g)}}return a}readProjection(t){return this.dataProjection}setLayers(t){this.layers_=t}}function D1(i,t,e){if(i===3){const n={keys:[],values:[],features:[]},o=e.readVarint()+e.pos;e.readFields(O1,n,o),n.length=n.features.length,n.length&&(t[n.name]=n)}}function O1(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 F1(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 N1(i,t,e){i.pos=t.features[e];const n=i.readVarint()+i.pos,o={layer:t,type:0,properties:{}};return i.readFields(F1,o,n),o}function G1(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 j1=L1;function B1(i,t,e,n,o){xf(i,t,e||0,n||i.length-1,o||U1)}function xf(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));xf(i,t,u,d,o)}var c=i[t],f=e,g=n;for(Dr(i,e,t),o(i[n],c)>0&&Dr(i,e,n);f<g;){for(Dr(i,f,g),f++,g--;o(i[f],c)<0;)f++;for(;o(i[g],c)>0;)g--}o(i[e],c)===0?Dr(i,e,g):(g++,Dr(i,g,n)),g<=t&&(e=g+1),t<=g&&(n=g-1)}}function Dr(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function U1(i,t){return i<t?-1:i>t?1:0}let bf=class{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(!ya(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;ya(t,l)&&(e.leaf?n.push(a):$h(t,l)?this._all(a,n):r.push(a))}e=r.pop()}return n}collides(t){let e=this.data;if(!ya(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(ya(t,s)){if(e.leaf||$h(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=W1(t,n.children,e);if(u!==-1)return n.children.splice(u,1),r.push(n),this._condense(r),this}!h&&!n.leaf&&$h(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));kf(t,e,n,h,this.compareMinX);for(let u=e;u<=n;u+=h){const d=Math.min(u+h-1,n);kf(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,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=qh(h),d=Y1(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=q1(l,h),d=qh(l)+qh(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:V1,r=t.leaf?this.compareMinY:X1,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=_a(s)+_a(a);for(let h=e;h<n-e;h++){const u=t.children[h];Fr(s,t.leaf?r(u):u),l+=_a(s)}for(let h=n-e-1;h>=e;h--){const u=t.children[h];Fr(a,t.leaf?r(u):u),l+=_a(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 W1(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 V1(i,t){return i.minX-t.minX}function X1(i,t){return i.minY-t.minY}function qh(i){return(i.maxX-i.minX)*(i.maxY-i.minY)}function _a(i){return i.maxX-i.minX+(i.maxY-i.minY)}function Y1(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),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 $h(i,t){return i.minX<=t.minX&&i.minY<=t.minY&&t.maxX<=i.maxX&&t.maxY<=i.maxY}function ya(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 kf(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;B1(i,s,t,e,o),r.push(t,s,s,e)}}function wf(i){return new te({fill:Nr(i,""),stroke:Gr(i,""),text:$1(i),image:Z1(i)})}function Nr(i,t){const e=i[t+"fill-color"];if(!!e)return new se({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 $1(i){const t=i["text-value"];return t?new gf({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 Z1(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 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 rn({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 Mf={RENDER_ORDER:"renderOrder"};class K1 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(Mf.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 bf(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(Mf.RENDER_ORDER,t)}setStyle(t){let e;if(t===void 0)e=c1;else if(t===null)e=null;else if(typeof t=="function")e=t;else if(t instanceof te)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 te?o[r]=s:o[r]=wf(s)}e=o}else e=wf(t);this.style_=e,this.styleFunction_=t===null?void 0:d1(this.style_),this.changed()}}const Cf=K1,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},xa=[jr.FILL],an=[jr.STROKE],Hn=[jr.BEGIN_PATH],Ef=[jr.CLOSE_PATH],J=jr;class H1{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 Sf=H1;class Q1 extends Sf{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],js(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 f=!0,g,m,p;for(g=e+o;g<n;g+=o)c[0]=t[g],c[1]=t[g+1],p=Rl(h,c),p!==m?(f&&(a[l++]=u,a[l++]=d,f=!1),a[l++]=c[0],a[l++]=c[1]):p===oe.INTERSECTING?(a[l++]=c[0],a[l++]=c[1],f=!1):f=!0,u=c[0],d=c[1],m=p;return(r&&f||g===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 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([J.CUSTOM,a,d,t,n,ch]),this.hitDetectionInstructions.push([J.CUSTOM,a,d,t,o||n,ch]);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([J.CUSTOM,a,u,t,n,Ir]),this.hitDetectionInstructions.push([J.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([J.CUSTOM,a,h,t,n,en]),this.hitDetectionInstructions.push([J.CUSTOM,a,h,t,o||n,en]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,s),h>a&&(this.instructions.push([J.CUSTOM,a,h,t,n,en]),this.hitDetectionInstructions.push([J.CUSTOM,a,h,t,o||n,en]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([J.CUSTOM,a,h,t,n]),this.hitDetectionInstructions.push([J.CUSTOM,a,h,t,o||n]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[J.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[J.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==J.END_GEOMETRY?s=e:r==J.BEGIN_GEOMETRY&&(o[2]=e,Kp(this.hitDetectionInstructions,s,e),s=-1)}setFillStrokeStyle(t,e){const n=this.state;if(t){const o=t.getColor();n.fillStyle=ci(o||Ci)}else n.fillStyle=void 0;if(e){const o=e.getColor();n.strokeStyle=ci(o||Er);const r=e.getLineCap();n.lineCap=r!==void 0?r:Ks;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:To;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=[J.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(!0),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[J.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&&!Vi(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=[J.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=ic(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;di(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Br=Q1;class J1 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([J.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([J.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([J.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([J.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 ty=J1;class ey 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=[J.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([J.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,wr,Mr],Hn);const s=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(s,0,s.length,a),this.hitDetectionInstructions.push(an),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([J.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],Hn);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(an),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(an),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(an),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(Hn)}}const iy=ey;class ny 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(Hn),this.hitDetectionInstructions.push(Hn);for(let h=0;h<l;++h){const u=n[h],d=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,u,o,!0,!a),f=[J.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(xa),this.hitDetectionInstructions.push(xa)),a&&(this.instructions.push(an),this.hitDetectionInstructions.push(an)),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([J.SET_FILL_STYLE,Ci]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([J.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=[J.CIRCLE,l];this.instructions.push(Hn,h),this.hitDetectionInstructions.push(Hn,h),n.fillStyle!==void 0&&(this.instructions.push(xa),this.hitDetectionInstructions.push(xa)),n.strokeStyle!==void 0&&(this.instructions.push(an),this.hitDetectionInstructions.push(an)),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([J.SET_FILL_STYLE,Ci]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([J.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([J.SET_FILL_STYLE,Ci]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([J.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]=Yn(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 Tf=ny;function oy(i,t,e,n,o){let r=e,s=e,a=0,l=0,h=e,u,d,c,f,g,m,p,_,v,y;for(d=e;d<n;d+=o){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,r=h,s=d),l=0,h=d-o)),c=f,p=v,_=y),g=x,m=k}return l+=f,l>a?[h,d]:[r,s]}const Ur={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class ry 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(!Zt(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 f=0,g;for(let m=0,p=d.length;m<p;++m){if(c==null){const v=oy(r.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=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 f=r.padding;if(f!=Xn&&(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),f=[p,_,v,y]}const g=this.pixelRatio;this.instructions.push([J.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,f==Xn?Xn:f.map(function(p){return p*g}),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/g;this.hitDetectionInstructions.push([J.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,void 0,this.declutterImageWithText_,f,!!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=Ur[o.textBaseline],u=this.textOffsetY_*l,d=this.text_,c=n?n.lineWidth*Math.abs(o.scale[0])/2:0;this.instructions.push([J.DRAW_CHARS,t,e,h,o.overflow,a,o.maxAngle,l,u,r,c*l,d,s,1]),this.hitDetectionInstructions.push([J.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=ci(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 g=a.getLineDash(),m=a.getLineDashOffset(),p=a.getWidth(),_=a.getMiterLimit();r.lineCap=a.getLineCap()||Ks,r.lineDash=g?g.slice():wr,r.lineDashOffset=m===void 0?Mr:m,r.lineJoin=a.getLineJoin()||To,r.lineWidth=p===void 0?Tr:p,r.miterLimit=_===void 0?Cr:_,r.strokeStyle=ci(a.getColor()||Er)}n=this.textState_;const l=t.getFont()||Mc;sv(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()||Xn,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_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:K(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:"|"+K(o.fillStyle):""}this.declutterImageWithText_=e}}const sy={Circle:Tf,Default:Br,Image:ty,LineString:iy,Polygon:Tf,Text:ry};class ay{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=sy[e];r=new s(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),o[e]=r}return r}}const ba=ay;class ly extends Bd{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()===Jt.LOADED&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Jt.LOADED&&e!=Jt.ERROR&&t.addEventListener(tt.CHANGE,this.boundHandleImageChange_),e==Jt.IDLE&&(t.load(),e=t.getState()),e==Jt.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const hy=ly,If=[];let No=null;function uy(){const i=document.createElement("canvas");i.width=1,i.height=1,No=i.getContext("2d")}class dy extends hy{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=$e(),this.pixelTransform=$e(),this.inversePixelTransform=$e(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){No||uy(),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&&Vi(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=Ki(n),r=Ws(n),s=Us(n),a=Bs(n);Qt(e.coordinateToPixelTransform,o),Qt(e.coordinateToPixelTransform,r),Qt(e.coordinateToPixelTransform,s),Qt(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;Qt(l,o),Qt(l,r),Qt(l,s),Qt(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 wc(t,this.inversePixelTransform,n,e);o.dispatchEvent(r)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_($i.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_($i.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,f=-t[1];return Mi(this.tempTransform,l,h,u,d,-n,c,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const zf=dy;function cy(i,t,e,n,o,r,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<r);let y=p===0?0:(r-_)/p;const x=ki(g,c,y),k=ki(m,f,y),w=t-n,C=_,M=r+a*l(h,o,u);for(;t<e-n&&_+p<M;)v();y=p===0?0:(M-_)/p;const S=ki(g,c,y),z=ki(m,f,y);let P;if(d){const W=[x,k,S,z];rh(W,0,4,2,d,W,W),P=W[0]>W[2]}else P=x>S;const j=Math.PI,A=[],at=w+n===t;t=w,p=0,_=C,c=i[t],f=i[t+1];let B;if(at){v(),B=Math.atan2(f-m,c-g),P&&(B+=B>0?-j:j);const W=(S+x)/2,F=(z+k)/2;return A[0]=[W,F,(M-r)/2,B,o],A}o=o.replace(/\n/g," ");for(let W=0,F=o.length;W<F;){v();let q=Math.atan2(f-m,c-g);if(P&&(q+=q>0?-j:j),B!==void 0){let b=q-B;if(b+=b>j?-2*j:b<-j?2*j:0,Math.abs(b)>s)return null}B=q;const L=W;let H=0;for(;W<F;++W){const b=P?F-W-1:W,T=a*l(h,o[b],u);if(t+n<e&&_+p<r+H+T/2)break;H+=T}if(W===L)continue;const V=P?o.substring(F-L,F-W):o.substring(L,W);y=p===0?0:(r+H/2-_)/p;const I=ki(g,c,y),rt=ki(m,f,y);A.push([I,rt,H/2,q,V]),r+=H}return A}const Go=je(),ln=[],zi=[],Ri=[],hn=[];function Rf(i){return i[3].declutterBox}const fy=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 Af(i,t){return(t==="start"||t==="end")&&!fy.test(i)&&(t=t==="start"?"left":"right"),Ur[t]}function gy(i,t,e){return e>0&&i.push(`
11
+ `,""),i.push(t,""),i}class my{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_=$e(),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?Ur[l.justify]:Af(Array.isArray(t)?t[0]:t,l.textAlign||Sr),f=o&&s.lineWidth?s.lineWidth:0,g=d?t:t.split(`
12
+ `).reduce(gy,[]),{width:m,height:p,widths:_,heights:v,lineWidths:y}=lv(l,g),x=m+f,k=[],w=(x+2)*u[0],C=(p+f)*u[1],M={width:w<0?Math.floor(w):Math.ceil(w),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:k};(u[0]!=1||u[1]!=1)&&k.push("scale",u),o&&(k.push("strokeStyle",s.strokeStyle),k.push("lineWidth",f),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*f;const P=[],j=[];let A=0,at=0,B=0,W=0,F;for(let q=0,L=g.length;q<L;q+=2){const H=g[q];if(H===`
13
+ `){at+=A,A=0,z=c*x+S*f,++W;continue}const V=g[q+1]||l.font;V!==F&&(o&&P.push("font",V),n&&j.push("font",V),F=V),A=Math.max(A,v[B]);const I=[H,z+S*_[B]+c*(_[B]-y[W]),.5*(f+A)+at];z+=_[B],o&&P.push("strokeText",I),n&&j.push("fillText",I),++B}return Array.prototype.push.apply(k,P),Array.prototype.push.apply(k,j),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,f,g,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=g[3]+y*c[0]+g[1],w=g[0]+x*c[1]+g[2],C=_-g[3],M=v-g[0];(m||d!==0)&&(ln[0]=C,hn[0]=C,ln[1]=M,zi[1]=M,zi[0]=C+k,Ri[0]=zi[0],Ri[1]=M+w,hn[1]=Ri[1]);let S;return d!==0?(S=Mi($e(),n,o,1,1,d,-n,-o),Qt(S,ln),Qt(S,zi),Qt(S,Ri),Qt(S,hn),ti(Math.min(ln[0],zi[0],Ri[0],hn[0]),Math.min(ln[1],zi[1],Ri[1],hn[1]),Math.max(ln[0],zi[0],Ri[0],hn[0]),Math.max(ln[1],zi[1],Ri[1],hn[1]),Go)):ti(Math.min(C,C+k),Math.min(M,M+w),Math.max(C,C+k),Math.max(M,M+w),Go),f&&(_=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,ln,zi,Ri,hn,s,a),hv(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=Qt(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=Af(Array.isArray(t)?t[0]:t,r.textAlign||Sr),u=Ur[r.textBaseline||Hs],d=a&&a.lineWidth?a.lineWidth:0,c=s.width/l-2*r.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,o,r,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_),Y0(this.renderedTransform_,n));let u=0;const d=o.length;let c=0,f,g,m,p,_,v,y,x,k,w,C,M,S=0,z=0,P=null,j=null;const A=this.coordinateCache_,at=this.viewRotation_,B=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,W={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:at},F=this.instructions!=o||this.overlaps?0:200;let q,L,H,V;for(;u<d;){const I=o[u];switch(I[0]){case J.BEGIN_GEOMETRY:q=I[1],V=I[3],q.getGeometry()?a!==void 0&&!Zt(a,V.getExtent())?u=I[2]+1:++u:u=I[2];break;case J.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 J.CIRCLE:c=I[1];const b=h[c],T=h[c+1],$=h[c+2],E=h[c+3],Q=$-b,Y=E-T,_t=Math.sqrt(Q*Q+Y*Y);t.moveTo(b+_t,T),t.arc(b,T,_t,0,2*Math.PI,!0),++u;break;case J.CLOSE_PATH:t.closePath(),++u;break;case J.CUSTOM:c=I[1],f=I[2];const Et=I[3],yt=I[4],Ct=I.length==6?I[5]:void 0;W.geometry=Et,W.feature=q,u in A||(A[u]=[]);const Dt=A[u];Ct?Ct(h,c,f,2,Dt):(Dt[0]=h[c],Dt[1]=h[c+1],Dt.length=2),yt(Dt,W),++u;break;case J.DRAW_IMAGE:c=I[1],f=I[2],x=I[3],g=I[4],m=I[5];let Lt=I[6];const jt=I[7],O=I[8],dt=I[9],vt=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],C=I[21],M=I[22];const ce=this.drawLabelWithPointPlacement_(k,w,C,M);x=ce.label,I[3]=x;const bi=I[23];g=(ce.anchorX-bi)*this.pixelRatio,I[4]=g;const _e=I[24];m=(ce.anchorY-_e)*this.pixelRatio,I[5]=m,Lt=x.height,I[6]=Lt,st=x.width,I[13]=st}let It;I.length>25&&(It=I[25]);let Bt,bt,ct;I.length>17?(Bt=I[16],bt=I[17],ct=I[18]):(Bt=Xn,bt=!1,ct=!1),vt&&B?kt+=at:!vt&&!B&&(kt-=at);let Ot=0;for(;c<f;c+=2){if(It&&It[Ot++]<st/this.pixelRatio)continue;const ce=this.calculateImageOrLabelDimensions_(x.width,x.height,h[c],h[c+1],st,Lt,g,m,O,dt,kt,xt,r,Bt,bt||ct,q),bi=[t,e,x,ce,jt,bt?P:null,ct?j:null];if(l){if(nt==="none")continue;if(nt==="obstacle"){l.insert(ce.declutterBox);continue}else{let _e,Xe;if(wt){const ze=f-c;if(!wt[ze]){wt[ze]=bi;continue}if(_e=wt[ze],delete wt[ze],Xe=Rf(_e),l.collides(Xe))continue}if(l.collides(ce.declutterBox))continue;_e&&(l.insert(Xe),this.replayImageOrLabel_.apply(this,_e)),l.insert(ce.declutterBox)}}this.replayImageOrLabel_.apply(this,bi)}++u;break;case J.DRAW_CHARS:const St=I[1],ft=I[2],de=I[3],We=I[4];M=I[5];const Yt=I[6],Ie=I[7],Ut=I[8];C=I[9];const Ht=I[10];k=I[11],w=I[12];const In=[I[13],I[13]],he=this.textStates[w],Ve=he.font,ve=[he.scale[0]*Ie,he.scale[1]*Ie];let Ne;Ve in this.widths_?Ne=this.widths_[Ve]:(Ne={},this.widths_[Ve]=Ne);const Gi=af(h,St,ft,2),ll=Math.abs(ve[0])*Ec(Ve,k,Ne);if(We||ll<=Gi){const ce=this.textStates[w].textAlign,bi=(Gi-ll)*Ur[ce],_e=cy(h,St,ft,2,k,bi,Yt,Math.abs(ve[0]),Ec,Ve,Ne,B?0:this.viewRotation_);t:if(_e){const Xe=[];let ze,sr,ar,ye,Re;if(C)for(ze=0,sr=_e.length;ze<sr;++ze){Re=_e[ze],ar=Re[4],ye=this.createLabel(ar,w,"",C),g=Re[2]+(ve[0]<0?-Ht:Ht),m=de*ye.height+(.5-de)*2*Ht*ve[1]/ve[0]-Ut;const ie=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Re[0],Re[1],ye.width,ye.height,g,m,0,0,Re[3],In,!1,Xn,!1,q);if(l&&l.collides(ie.declutterBox))break t;Xe.push([t,e,ye,ie,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,""),g=Re[2],m=de*ye.height-Ut;const ie=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Re[0],Re[1],ye.width,ye.height,g,m,0,0,Re[3],In,!1,Xn,!1,q);if(l&&l.collides(ie.declutterBox))break t;Xe.push([t,e,ye,ie,1,null,null])}l&&l.load(Xe.map(Rf));for(let ie=0,xs=Xe.length;ie<xs;++ie)this.replayImageOrLabel_.apply(this,Xe[ie])}}++u;break;case J.END_GEOMETRY:if(s!==void 0){q=I[1];const ce=s(q,V);if(ce)return ce}++u;break;case J.FILL:F?S++:this.fill_(t),++u;break;case J.MOVE_TO_LINE_TO:for(c=I[1],f=I[2],L=h[c],H=h[c+1],v=L+.5|0,y=H+.5|0,(v!==p||y!==_)&&(t.moveTo(L,H),p=v,_=y),c+=2;c<f;c+=2)L=h[c],H=h[c+1],v=L+.5|0,y=H+.5|0,(c==f-2||v!==p||y!==_)&&(t.lineTo(L,H),p=v,_=y);++u;break;case J.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 J.SET_STROKE_STYLE:j=I,z&&(t.stroke(),z=0),this.setStrokeStyle_(t,I),++u;break;case J.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 py=my,Zh=["Polygon","Circle","LineString","Image","Text","Default"];class vy{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_=$e(),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 py(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=je(),xr(d,t),di(d,e*(this.renderBuffer_+o),d));const c=_y(o);let f;function g(k,w){const C=u.getImageData(0,0,a,a).data;for(let M=0,S=c.length;M<S;M++)if(C[c[M]]>0){if(!s||f!=="Image"&&f!=="Text"||s.includes(k)){const z=(c[M]-3)/4,P=o-z%a,j=o-(z/a|0),A=r(k,w,P*P+j*j);if(A)return A}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(Ln);let p,_,v,y,x;for(p=m.length-1;p>=0;--p){const k=m[p].toString();for(v=this.executorsByZIndex_[k],_=Zh.length-1;_>=0;--_)if(f=Zh[_],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],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 Fn(this.executorsByZIndex_)}execute(t,e,n,o,r,s,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(Ln),this.maxExtent_&&(t.save(),this.clip(t,n)),s=s||Zh;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,o,r,a)}}this.maxExtent_&&t.restore()}}const Kh={};function _y(i){if(Kh[i]!==void 0)return Kh[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 Kh[i]=o,o}const ka=vy;class yy extends Sf{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_=$e()}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_,f=r[u+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const g=c+this.imageAnchorX_,m=f+this.imageAnchorY_;Mi(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,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(!!Zt(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Pv(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||!Zt(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_)),!!Zt(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(!!Zt(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_)),!!Zt(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_)),!!Zt(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),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_,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:ci(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:Ks,lineDash:this.pixelRatio_===1?u:u.map(d=>d*this.pixelRatio_),lineDashOffset:(s||Mr)*this.pixelRatio_,lineJoin:a!==void 0?a:To,lineWidth:(l!==void 0?l:Tr)*this.pixelRatio_,miterLimit:h!==void 0?h:Cr,strokeStyle:ci(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 f=e.getColor();this.textFillState_={fillStyle:ci(f||Ci)}}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||wr,lineDashOffset:p||Mr,lineJoin:_!==void 0?_:To,lineWidth:v!==void 0?v:Tr,miterLimit:y!==void 0?y:Cr,strokeStyle:ci(f||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:Mc,textAlign:d!==void 0?d:Sr,textBaseline:c!==void 0?c:Hs},this.text_=u!==void 0?Array.isArray(u)?u.reduce((f,g,m)=>f+=m%2?" ":g,""):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 xy=yy,Be=.5;function Pf(i,t,e,n,o,r,s){const a=i[0]*Be,l=i[1]*Be,h=Ae(a,l);h.imageSmoothingEnabled=!1;const u=h.canvas,d=new xy(h,Be,o,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(_,r);if(!y)continue;Array.isArray(y)||(y=[y]);const k="#"+("000000"+(p*f).toString(16)).slice(-6);for(let w=0,C=y.length;w<C;++w){const M=y[w],S=M.getGeometryFunction()(_);if(!S||!Zt(o,S.getExtent()))continue;const z=M.clone(),P=z.getFill();P&&P.setColor(k);const j=z.getStroke();j&&(j.setColor(k),j.setLineDash(null)),z.setText(void 0);const A=M.getImage();if(A&&A.getOpacity()!==0){const W=A.getImageSize();if(!W)continue;const F=Ae(W[0],W[1],void 0,{alpha:!1}),q=F.canvas;F.fillStyle=k,F.fillRect(0,0,q.width,q.height),z.setImage(new fa({img:q,imgSize:W,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=g[at];B||(B={},g[at]=B,B.Polygon=[],B.Circle=[],B.LineString=[],B.Point=[]),B[S.getType().replace("Multi","")].push(S,z)}}const m=Object.keys(g).map(Number).sort(Ln);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 C=0,M=t.length;C<M;++C)d.setTransform(t[C]),d.drawGeometry(x[k])}}}return h.getImageData(0,0,u.width,u.height)}function Lf(i,t,e){const n=[];if(e){const o=Math.floor(Math.round(i[0])*Be),r=Math.floor(Math.round(i[1])*Be),s=(qt(o,0,e.width-1)+qt(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 by=.5,Df={Point:Iy,LineString:Ey,Polygon:Ry,MultiPoint:zy,MultiLineString:Sy,MultiPolygon:Ty,GeometryCollection:Cy,Circle:wy};function ky(i,t){return parseInt(K(i),10)-parseInt(K(t),10)}function Of(i,t){const e=Hh(i,t);return e*e}function Hh(i,t){return by*i/t}function wy(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 wa(i,t,e,n,o,r,s){let a=!1;const l=e.getImage();if(l){const h=l.getImageState();h==Jt.LOADED||h==Jt.ERROR?l.unlistenImageChange(o):(h==Jt.IDLE&&l.load(),l.listenImageChange(o),a=!0)}return My(i,t,e,n,r,s),a}function My(i,t,e,n,o,r){const s=e.getGeometryFunction()(t);if(!s)return;const a=s.simplifyTransformed(n,o);if(e.getRenderer())Ff(i,a,e,t);else{const h=Df[a.getType()];h(i,a,e,t,r)}}function Ff(i,t,e,n){if(t.getType()=="GeometryCollection"){const r=t.getGeometries();for(let s=0,a=r.length;s<a;++s)Ff(i,r[s],e,n);return}i.getBuilder(e.getZIndex(),"Default").drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function Cy(i,t,e,n,o){const r=t.getGeometriesArray();let s,a;for(s=0,a=r.length;s<a;++s){const l=Df[r[s].getType()];l(i,r[s],e,n,o)}}function Ey(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 Sy(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 Ty(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 Iy(i,t,e,n,o){const r=e.getImage(),s=e.getText();let a;if(r){if(r.getImageState()!=Jt.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 zy(i,t,e,n,o){const r=e.getImage(),s=e.getText();let a;if(r){if(r.getImageState()!=Jt.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 Ry(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 Ay extends zf{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_=je(),this.wrappedRenderedExtent_=je(),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,f=e.viewHints,g=!(f[$t.ANIMATING]||f[$t.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,g,void 0,n)}while(++k<x)}setupCompositionContext_(){if(this.opacity_!==1){const t=Ae(this.context.canvas.width,this.context.canvas.height,If);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,Ml(this.compositionContext_),If.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];q0(this.pixelTransform,1/n,1/n),Zl(this.inversePixelTransform,this.pixelTransform);const r=yc(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 f=!1,g=!0;if(o.extent&&this.clipping){const m=Hi(o.extent);g=Zt(m,t.extent),f=g&&!Un(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];Qt(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]*Be,c=n[1]*Be;u.push(this.getRenderTransform(o,r,s,Be,d,c,0).slice());const f=h.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!Un(g,l)){let m=l[0];const p=Nt(g);let _=0,v;for(;m<g[0];)--_,v=p*_,u.push(this.getRenderTransform(o,r,s,Be,d,c,v).slice()),m+=p;for(_=0,m=l[2];m>g[2];)++_,v=p*_,u.push(this.getRenderTransform(o,r,s,Be,d,c,v).slice()),m-=p}this.hitDetectionImageData_=Pf(n,u,this.renderedFeatures_,h.getStyleFunction(),l,r,s)}e(Lf(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(f,g,m){const p=K(f),_=h[p];if(_){if(_!==!0&&m<_.distanceSq){if(m===0)return h[p]=!0,r.splice(r.lastIndexOf(_),1),o(f,l,g);_.geometry=g,_.distanceSq=m}}else{if(m===0)return h[p]=!0,o(f,l,g);r.push(h[p]={feature:f,layer:l,geometry:g,distanceSq:m,callback:o})}};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 o=t.viewHints[$t.ANIMATING],r=t.viewHints[$t.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,f=e.getRevision(),g=e.getRenderBuffer();let m=e.getRenderOrder();m===void 0&&(m=ky);const p=h.center.slice(),_=di(l,g*d),v=_.slice(),y=[_.slice()],x=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!Un(x,t.extent)){const B=Nt(x),W=Math.max(Nt(_)/2,B);_[0]=x[0]-W,_[2]=x[2]+W,jl(p,u);const F=rc(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_==f&&this.renderedRenderOrder_==m&&Un(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 ba(Hh(d,c),_,d,c);let w;this.getLayer().getDeclutter()&&(w=new ba(Hh(d,c),_,d,c));let C;for(let B=0,W=y.length;B<W;++B)n.loadFeatures(y[B],d,u);const M=Of(d,c);let S=!0;const z=function(B){let W;const F=B.getStyleFunction()||e.getStyleFunction();if(F&&(W=F(B,d)),W){const q=this.renderFeature(B,M,W,k,C,w);S=S&&!q}}.bind(this),P=Yl(_),j=n.getFeaturesInExtent(P);m&&j.sort(m);for(let B=0,W=j.length;B<W;++B)z(j[B]);this.renderedFeatures_=j,this.ready=S;const A=k.finish(),at=new ka(_,d,c,n.getOverlaps(),A,e.getRenderBuffer());return w&&(this.declutterExecutorGroup=new ka(_,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,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=wa(o,t,n[l],e,this.boundHandleStyleImageChange_,r,s)||a;else a=wa(o,t,n,e,this.boundHandleStyleImageChange_,r,s);return a}}const Py=Ay;class Ly extends Cf{constructor(t){super(t)}createRenderer(){return new Py(this)}}const Qn=Ly;class Dy{constructor(t){this.rbush_=new bf(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 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_[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)],o=[n.minX,n.minY,n.maxX,n.maxY];Eo(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 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 Ma=Dy;class Oy extends ui{constructor(t){super(),this.projection=Gt(t.projection),this.attributions_=Nf(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_=Nf(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Nf(i){return i?Array.isArray(i)?function(t){return i}:typeof i=="function"?i:function(t){return[i]}:null}const Gf=Oy,we={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Fy(i,t){return[[-1/0,-1/0,1/0,1/0]]}let Ny=!1;function jf(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=Ny,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 Bf(i,t){return function(e,n,o,r,s){const a=this;jf(i,t,e,n,o,function(l,h){a.addFeatures(l),r!==void 0&&r(l)},s||On)}}class un extends Je{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Gy extends Gf{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_=On,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_=Bf(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Fy;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Ma:null,this.loadedExtentsRtree_=new Ma,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 qe(o)),o!==void 0&&this.addFeaturesInternal(o),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 o=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(o,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new un(we.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[mt(e,tt.CHANGE,this.handleFeatureChange_,this),mt(e,_o.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=K(a);this.addToIndex_(l,a)&&n.push(a)}for(let r=0,s=n.length;r<s;r++){const a=n[r],l=K(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 un(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(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(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 un(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(),Fn(this.nullGeometryFeatures_)||hi(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=P0(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=K(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 un(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 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 Un(u.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new un(we.FEATURESLOADSTART)),this.loader_.call(this,l,e,n,function(u){--this.loadingExtentsCount_,this.dispatchEvent(new un(we.FEATURESLOADEND,void 0,u))}.bind(this),function(){--this.loadingExtentsCount_,this.dispatchEvent(new un(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(Eo(o.extent,t))return n=o,!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(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 un(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(Bf(t,this.format_))}}const Ai=Gy,Ca=class extends Rs{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===G.ERROR&&this.setState(G.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(t.getState()==G.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()==G.LOADED){t.interimTile=null;break}else t.getState()==G.LOADING?e=t:t.getState()==G.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!==G.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:Rc(o/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}};class jy extends Ca{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=G.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=G.ERROR,this.unlistenImage_(),this.image_=By(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=G.LOADED:this.state=G.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==G.ERROR&&(this.state=G.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==G.IDLE&&(this.state=G.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=df(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function By(){const i=Ae(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}const Uf=jy;class Uy{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 Wy=Uy;function Wf(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 Vf(i){return jo(i[0],i[1],i[2])}function Vy(i){const[t,e,n]=i.substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number);return jo(t,e,n)}function Xf(i){return i.split("/").map(Number)}function Xy(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 qy extends Wy{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=Xf(t)[0];this.forEach(function(o){o.tileCoord[0]!==n&&(this.remove(Vf(o.tileCoord)),o.release())}.bind(this))}}const Qh=qy;class Yf{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 Yf(i,t,e,n)}const qf=Yf,$f=[];class $y extends Ca{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=K(t);return e in this.context_||(this.context_[e]=Ae(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];Ml(e),$f.push(e.canvas),delete this.context_[t]}super.release()}}const Zy=$y,Ky=class extends Ca{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==G.IDLE&&(this.setState(G.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(G.ERROR)}setFeatures(t){this.features_=t,this.setState(G.LOADED)}setLoader(t){this.loader_=t}},Ea={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class Sa extends Je{constructor(t,e){super(t),this.feature=e}}class Hy extends on{constructor(t){const e=t;e.stopDown||(e.stopDown=yo),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 P1([NaN,NaN]),h=Wt(r[0]),u=wi(h,Wt(r[r.length-1]));return l.setCenterAndRadius(h,Math.sqrt(u),this.geometryLayout_),l};else{let r;o==="Point"?r=ni:o==="LineString"?r=Kn:o==="Polygon"&&(r=$n),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 Ai({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:Qy(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:Mh,this.freehandCondition_,t.freehand?this.freehandCondition_=wh:this.freehandCondition_=t.freehandCondition?t.freehandCondition:Qc,this.addChangeListener(yh.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],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=ea(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 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 Sa(Ea.DRAWSTART,this.sketchFeature_))}modifyDrawing_(t){const e=this.getMap(),n=this.sketchFeature_.getGeometry(),o=e.getView().getProjection(),r=ea(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 Rh([e])):this.type_==="MultiPolygon"&&t.setGeometry(new Ph([e])),this.dispatchEvent(new Sa(Ea.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 Sa(Ea.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 Sa(Ea.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 Qy(){const i=cf();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 tx=Hy,Zf=0,Wr=1,Kf=[0,0,0,0],Uo=[],Jh={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class tu extends Je{constructor(t,e,n){super(t),this.features=e,this.mapBrowserEvent=n}}class ex extends on{constructor(t){super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:tf,this.defaultDeleteCondition_=function(n){return u_(n)&&f_(n)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:wh,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new Ma,this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new Qn({source:new Ai({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:nx(),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 qe(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 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 qe;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 tu(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),f={feature:t,geometry:e,depth:[a,o],index:u,segment:c};this.rBush_.insert(xe(c),f)}}}}writeCircleGeometry_(t,e){const n=e.getCenter(),o={feature:t,geometry:e,index:Zf,segment:[n,n]},r={feature:t,geometry:e,index:Wr,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 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===Zf)this.changingFeature_=!0,u.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,t.map.getView().getProjection();let m=sc(Wt(u.getCenter()),Wt(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(ix);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===Wr){const m=Qf(e,d);ei(m,r)&&!l[f][0]&&(this.dragSegments_.push([d,0]),l[f][0]=d);continue}if(ei(c[0],r)&&!l[f][0]){this.dragSegments_.push([d,0]),l[f][0]=d;continue}if(ei(c[1],r)&&!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)&&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 tu(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 Hf(o,l)-Hf(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,Kf)),h=e.getView().getResolution()*this.pixelTolerance_,u=Yl(di(l,h,Kf));s=this.rBush_.getInExtent(u)}if(s&&s.length>0){const l=s.sort(r)[0],h=l.segment;let u=Qf(o,l);const d=e.getPixelFromCoordinate(u);let c=sc(t,d);if(a||c<=this.pixelTolerance_){const f={};if(f[K(h)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-o[0],this.delta_[1]=u[1]-o[1]),l.geometry.getType()==="Circle"&&l.index===Wr)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,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 tu(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,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,r=a.getCoordinates(),o=r,n=!1,a.getType()){case"MultiLineString":r[f.depth[0]].length>2&&(r[f.depth[0]].splice(h,1),n=!0);break;case"LineString":r.length>2&&(r.splice(h,1),n=!0);break;case"MultiPolygon":o=o[f.depth[1]];case"Polygon":o=o[f.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: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,o){this.rBush_.forEachInExtent(t.getExtent(),function(r){r.geometry===t&&(n===void 0||r.depth===void 0||Vi(r.depth,n))&&r.index>e&&(r.index+=o)})}}function ix(i,t){return i.index-t.index}function Hf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"){let r=n;if(t.index===Wr){const s=wi(r.getCenter(),Wt(i)),a=Math.sqrt(s)-r.getRadius();return a*a}}const o=Wt(i);return Uo[0]=Wt(t.segment[0]),Uo[1]=Wt(t.segment[1]),F0(o,Uo)}function Qf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"&&t.index===Wr)return So(n.getClosestPoint(Wt(i)));const o=Wt(i);return Uo[0]=Wt(t.segment[0]),Uo[1]=Wt(t.segment[1]),So(Nl(o,Uo))}function nx(){const i=cf();return function(t,e){return i.Point}}const ox=ex;function Jf(i){if(i.feature)return i.feature;if(i.element)return i.element}const eu=[];class rx extends on{constructor(t){t=t||{};const e=t;e.handleDownEvent||(e.handleDownEvent=Dn),e.stopDown||(e.stopDown=yo),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 Ma,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),o=t.getGeometry();if(o){const r=this.GEOMETRY_SEGMENTERS_[o.getType()];if(r){this.indexedFeaturesExtents_[n]=o.getExtent(je());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]=mt(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=Jf(t);this.addFeature(e)}handleFeatureRemove_(t){const e=Jf(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,o=K(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(mt(this.features_,re.ADD,this.handleFeatureAdd_,this),mt(this.features_,re.REMOVE,this.handleFeatureRemove_,this)):this.source_&&n.push(mt(this.source_,we.ADDFEATURE,this.handleFeatureAdd_,this),mt(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=Wt(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=Wt(_),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=So(D0(h,v))}else{const[v,y]=_.segment;y&&(eu[0]=Wt(v),eu[1]=Wt(y),p=Nl(h,eu))}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 r=$v(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 sx=rx,ax=.5,lx=10,tg=.25;class hx{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=Ki(n),u=Ws(n),d=Us(n),c=Bs(n),f=this.transformInv_(h),g=this.transformInv_(u),m=this.transformInv_(d),p=this.transformInv_(c),_=lx+(s?Math.max(0,Math.ceil(Math.log2(Ll(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,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_,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,o]);g=Nt(p)/this.targetWorldWidth_>tg||g}!f&&this.sourceProj_.isGlobal()&&d&&(g=d>tg||g)}if(!g&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!Zt(u,this.maxSourceExtent_))return;let m=0;if(!g&&(!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)g=!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(!g){const p=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(p);let v;f?v=(qi(r[0],c)+qi(a[0],c))/2-qi(_[0],c):v=(r[0]+a[0])/2-_[0];const y=(r[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=[(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(f){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=je();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 ux=hx;let iu;const eg=[];function ig(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 nu(i,t){return Math.abs(i[t*4]-210)>2||Math.abs(i[t*4+3]-.75*255)>2}function dx(){if(iu===void 0){const i=document.createElement("canvas").getContext("2d");i.globalCompositeOperation="lighter",i.fillStyle="rgba(210, 0, 0, 0.75)",ig(i,4,5,4,0),ig(i,4,5,0,5);const t=i.getImageData(0,0,3,3).data;iu=nu(t,0)||nu(t,4)||nu(t,8)}return iu}function ng(i,t,e,n){const o=Ys(e,t,i);let r=Xs(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||js(l,o)){const h=Xs(i,r,o)/r;isFinite(h)&&h>0&&(r/=h)}return r}function cx(i,t,e,n){const o=Zi(e);let r=ng(i,t,o,n);return(!isFinite(r)||r<=0)&&Pl(e,function(s){return r=ng(i,t,s,n),isFinite(r)&&r>0}),r}function fx(i,t,e,n,o,r,s,a,l,h,u,d){const c=Ae(Math.round(e*i),Math.round(e*t),eg);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=je();l.forEach(function(x,k,w){nc(g,x.extent)});const m=Nt(g),p=Ye(g),_=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 C=x.extent[0]-g[0],M=-(x.extent[3]-g[3]),S=Nt(x.extent),z=Ye(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,C*v,M*v,S*v,z*v)});const y=Ki(s);return a.getTriangles().forEach(function(x,k,w){const C=x.source,M=x.target;let S=C[0][0],z=C[0][1],P=C[1][0],j=C[1][1],A=C[2][0],at=C[2][1];const B=f((M[0][0]-y[0])/r),W=f(-(M[0][1]-y[1])/r),F=f((M[1][0]-y[0])/r),q=f(-(M[1][1]-y[1])/r),L=f((M[2][0]-y[0])/r),H=f(-(M[2][1]-y[1])/r),V=S,I=z;S=0,z=0,P-=V,j-=I,A-=V,at-=I;const rt=[[P,j,0,0,F-B],[A,at,0,0,L-B],[0,0,P,j,q-W],[0,0,A,at,H-W]],b=g0(rt);if(!!b){if(c.save(),c.beginPath(),dx()||!d){c.moveTo(F,q);const T=4,$=B-F,E=W-q;for(let Q=0;Q<T;Q++)c.lineTo(F+f((Q+1)*$/T),q+f(Q*E/(T-1))),Q!=T-1&&c.lineTo(F+f((Q+1)*$/T),q+f((Q+1)*E/(T-1)));c.lineTo(L,H)}else c.moveTo(F,q),c.lineTo(B,W),c.lineTo(L,H);c.clip(),c.transform(b[0],b[2],b[1],b[3],B,W),c.translate(g[0]-V,g[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 C=x.target,M=(C[0][0]-y[0])/r,S=-(C[0][1]-y[1])/r,z=(C[1][0]-y[0])/r,P=-(C[1][1]-y[1])/r,j=(C[2][0]-y[0])/r,A=-(C[2][1]-y[1])/r;c.beginPath(),c.moveTo(z,P),c.lineTo(M,S),c.lineTo(j,A),c.closePath(),c.stroke()}),c.restore()),c.canvas}class gx extends Ca{constructor(t,e,n,o,r,s,a,l,h,u,d,c){super(r,G.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 f=o.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const p=g?Wn(f,g):f;if(Ll(p)===0){this.state=G.EMPTY;return}const _=t.getExtent();_&&(m?m=Wn(m,_):m=_);const v=o.getResolution(this.wrappedTileCoord_[0]),y=cx(t,n,p,v);if(!isFinite(y)||y<=0){this.state=G.EMPTY;return}const x=u!==void 0?u:ax;if(this.triangulation_=new ux(t,n,p,m,y*x,v),this.triangulation_.getTriangles().length===0){this.state=G.EMPTY;return}this.sourceZ_=e.getZForResolution(y);let k=this.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(k[1]=qt(k[1],m[1],m[3]),k[3]=qt(k[3],m[1],m[3])):k=Wn(k,m)),!Ll(k))this.state=G.EMPTY;else{const w=e.getTileRangeForExtentAndZ(k,this.sourceZ_);for(let C=w.minX;C<=w.maxX;C++)for(let M=w.minY;M<=w.maxY;M++){const S=h(this.sourceZ_,C,M,a);S&&this.sourceTiles_.push(S)}this.sourceTiles_.length===0&&(this.state=G.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(function(e,n,o){e&&e.getState()==G.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=G.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_=fx(o,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),s,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=G.LOADED}this.changed()}load(){if(this.state==G.IDLE){this.state=G.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,o){const r=e.getState();if(r==G.IDLE||r==G.LOADING){t++;const s=mt(e,tt.CHANGE,function(a){const l=e.getState();(l==G.LOADED||l==G.ERROR||l==G.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()==G.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Ft),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Ml(this.canvas_.getContext("2d")),eg.push(this.canvas_),this.canvas_=null),super.release()}}const og=gx;class mx extends zf{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=je(),this.tmpTileRange_=new qf(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),o=e.getUseInterimTilesOnError();return n==G.LOADED||n==G.EMPTY||n==G.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()==G.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=Qt(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!js(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 f=u.getTileCoordForCoordAndZ(o,c),g=h.getTile(c,f[1],f[2],s,a);if(!(g instanceof Uf||g instanceof og))return null;if(g.getState()!==G.LOADED)continue;const m=u.getOrigin(c),p=be(u.getTileSize(c)),_=u.getResolution(c),v=Math.floor(d*((o[0]-m[0])/_-f[1]*p[0])),y=Math.floor(d*((m[1]-o[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],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(),f=d.getTileGridForProjection(r),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(Ye(p)/_*h),k=n.extent&&Hi(n.extent);k&&(p=Wn(p,Hi(n.extent)));const w=m*y/2/v,C=m*x/2/v,M=[a[0]-w,a[1]-C,a[0]+w,a[1]+C],S=f.getTileRangeForExtentAndZ(p,g),z={};z[g]={};const P=this.createLoadedTileFinder(d,r,z),j=this.tmpExtent,A=this.tmpTileRange_;this.newTiles_=!1;const at=l?Ol(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&&!f.tileCoordIntersectsViewport([g,rt,b],at))continue;const T=this.getTile(g,rt,b,t);if(this.isDrawableTile(T)){const Q=K(this);if(T.getState()==G.LOADED){z[g][T.tileCoord.toString()]=T;let Y=T.inTransition(Q);Y&&n.opacity!==1&&(T.endTransition(Q),Y=!1),!this.newTiles_&&(Y||!this.renderedTiles.includes(T))&&(this.newTiles_=!0)}if(T.getAlpha(Q,t.time)===1)continue}const $=f.getTileCoordChildTileRange(T.tileCoord,A,j);let E=!1;$&&(E=P(g+1,$)),E||f.forEachTileCoordParentTileRange(T.tileCoord,P,A,j)}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 W=yc(this.pixelTransform);this.useContainer(e,W,this.getBackground(t));const F=this.context,q=F.canvas;Zl(this.inversePixelTransform,this.pixelTransform),Mi(this.tempTransform,y/2,x/2,B,B,0,-y/2,-x/2),q.width!=y||q.height!=x?(q.width=y,q.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 L=Object.keys(z).map(Number);L.sort(Ln);let H,V,I;n.opacity===1&&(!this.containerReused||d.getOpaque(t.viewState.projection))?L=L.reverse():(H=[],V=[]);for(let rt=L.length-1;rt>=0;--rt){const b=L[rt],T=d.getTilePixelSize(b,h,r),E=f.getResolution(b)/m,Q=T[0]*E*B,Y=T[1]*E*B,_t=f.getTileCoordForCoordAndZ(Ki(M),b),Et=f.getTileCoordExtent(_t),yt=Qt(this.tempTransform,[v*(Et[0]-M[0])/m,v*(M[3]-Et[3])/m]),Ct=v*d.getGutterForProjection(r),Dt=z[b];for(const Lt in Dt){const jt=Dt[Lt],O=jt.tileCoord,dt=_t[1]-O[1],vt=Math.round(yt[0]-(dt-1)*Q),kt=_t[2]-O[2],xt=Math.round(yt[1]-(kt-1)*Y),st=Math.round(yt[0]-dt*Q),nt=Math.round(yt[1]-kt*Y),wt=vt-st,It=xt-nt,Bt=g===b,bt=Bt&&jt.getAlpha(K(this),t.time)!==1;let ct=!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(g!==b&&b<V[Ot]){const ft=H[Ot];Zt([st,nt,st+wt,nt+It],[ft[0],ft[3],ft[4],ft[7]])&&(ct||(F.save(),ct=!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(ft[6],ft[7]),F.lineTo(ft[4],ft[5]),F.lineTo(ft[2],ft[3]),F.lineTo(ft[0],ft[1]),F.clip())}H.push(I),V.push(b)}else F.clearRect(st,nt,wt,It);this.drawTileImage(jt,t,st,nt,wt,It,Ct,Bt),H&&!bt?(ct&&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_||!Eo(this.renderedExtent_,M),this.renderedExtent_=M,this.renderedPixelRatio=h,this.renderedProjection=r,this.manageTilePyramid(t,d,f,h,r,p,g,u.getPreload()),this.scheduleExpireCache(t,d),this.postRender(F,t),n.extent&&F.restore(),F.imageSmoothingEnabled=!0,W!==q.style.transform&&(q.style.transform=W),this.container}drawTileImage(t,e,n,o,r,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,o,r,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(o,r,s){const a=K(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=K(e);o in t||(t[o]={}),t[o][n.getKey()]=!0}manageTilePyramid(t,e,n,o,r,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?Ol(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,o,r),_.getState()==G.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 rg=mx,px={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},vx={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class _x extends rg{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=$e()}prepareTile(t,e,n){let o;const r=t.getState();return(r===G.LOADED||r===G.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[$t.ANIMATING]||d[$t.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"?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 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(),f=h.getTileGridForProjection(n).getTileCoordExtent(t.wrappedTileCoord),g=h.getSourceTiles(e,n,t),m=K(o);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()!=G.LOADED)continue;const y=v.tileCoord,x=d.getTileCoordExtent(y),k=Wn(f,x),w=di(k,o.getRenderBuffer()*a,this.tmpExtent),C=Eo(x,k)?null:w,M=new ba(0,w,a,e),S=u?new ba(0,k,a,e):void 0,z=Of(a,e),P=function(W){let F;const q=W.getStyleFunction()||o.getStyleFunction();if(q&&(F=q(W,a)),F){const L=this.renderFeature(W,z,F,M,S);l.dirty=l.dirty||L}},j=v.getFeatures();s&&s!==l.renderedRenderOrder&&j.sort(s);for(let W=0,F=j.length;W<F;++W){const q=j[W];(!C||Zt(C,q.getGeometry().getExtent()))&&P.call(this,q)}const A=M.finish(),at=o.getRenderMode()!=="vector"&&u&&g.length===1?null:k,B=new ka(at,a,e,h.getOverlaps(),A,o.getRenderBuffer());if(t.executorGroups[m].push(B),S){const W=new ka(null,a,e,h.getOverlaps(),S.finish(),o.getRenderBuffer());t.declutterExecutorGroups[m].push(W)}}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??0;const l=this.getLayer(),u=l.getSource().getTileGridForProjection(e.viewState.projection),d=xe([t]);di(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,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})}},g=this.renderedTiles;let m;for(let p=0,_=g.length;!m&&p<_;++p){const v=g[p],y=u.getTileCoordExtent(v.wrappedTileCoord);if(!Zt(y,d))continue;const x=K(l),k=[v.executorGroups[x]],w=v.declutterExecutorGroups[x];w&&k.push(w),k.some(C=>{const M=C===w?e.declutterTree.all().map(S=>S.value):null;for(let S=0,z=C.length;S<z;++S)if(m=C[S].forEachFeatureAtCoordinate(t,s,a,n,f,M),m)return!0})}return m}getFeatures(t){return new Promise(function(e,n){const o=this.getLayer(),r=K(o),s=o.getSource(),a=this.renderedProjection,l=a.getExtent(),h=this.renderedResolution,u=s.getTileGridForProjection(a),d=Qt(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()===G.LOADED){const k=u.getTileCoordExtent(f.tileCoord);s.getWrapX()&&a.canWrapX()&&!Un(l,k)&&jl(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[r];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,Be,y[0]*Be,y[1]*Be,0)];v=Pf(y,k,_,o.getStyleFunction(),u.getTileCoordExtent(f.wrappedTileCoord),f.getReplayState(o).renderedResolution,x),f.hitDetectionImageData[r]=v}e(Lf(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[$t.ANIMATING]||o[$t.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,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),f=t.tileCoord,g=c.getTileCoordExtent(t.wrappedTileCoord),m=c.getTileCoordExtent(f,this.tmpExtent)[0]-g[0];return ql($l(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[$t.ANIMATING]||n[$t.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=vx[s],h=e.viewState,u=h.rotation,d=r.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(r).dirty;const x=y.executorGroups[K(r)].filter(S=>S.hasExecutors(l));if(x.length===0)continue;const k=this.getTileRenderTransform(y,e),w=y.tileCoord[0];let C=!1;const M=x[0].getClipCoords(k);if(M){for(let S=0,z=m.length;S<z;++S)if(f!==w&&w<p[S]){const P=m[S];Zt([M[0],M[3],M[4],M[7]],[P[0],P[3],P[4],P[7]])&&(C||(t.save(),C=!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);C&&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=wa(o,t,n[a],e,this.boundHandleStyleImageChange_,void 0,r)||s;else s=wa(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[K(n)];o.renderedTileRevision=r;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 C=vc(this.tmpTransform_);$l(C,y,y),_.setTransform.apply(_,C)}const x=f.getTileCoordExtent(a,this.tmpExtent),k=m/p,w=vc(this.tmpTransform_);$l(w,k,-k),$0(w,-x[0],-x[3]);for(let C=0,M=s.length;C<M;++C)s[C].execute(_,y,w,0,!0,px[n.getRenderMode()]);o.renderedTileResolution=t.wantedResolution}}const yx=_x,dn={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class xx extends Cf{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 yx(this)}getFeatures(t){return super.getFeatures(t)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(dn.PRELOAD)}getUseInterimTilesOnError(){return this.get(dn.USE_INTERIM_TILES_ON_ERROR)}setPreload(t){this.set(dn.PRELOAD,t)}setUseInterimTilesOnError(t){this.set(dn.USE_INTERIM_TILES_ON_ERROR,t)}}const bx=xx,kx=[0,0,0],cn=5;class wx{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,gt(Hp(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_=Ki(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:eh,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 qf(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=kx;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=Os(u,cn)-1,d=Os(d,cn)-1):(u=Ds(u,cn),d=Ds(d,cn)),Wf(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=Os(h,cn)-1,u=Os(u,cn)-1):(h=Ds(h,cn),u=Ds(u,cn)),Wf(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=kl(this.resolutions_,t,e||0);return qt(n,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return Vc(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 ou=wx,ru={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};function sg(i){let t=i.getDefaultTileGrid();return t||(t=Ex(i),i.setDefaultTileGrid(t)),t}function Mx(i,t,e){const n=t[0],o=i.getTileCoordCenter(t),r=Ta(e);if(js(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 Cx(i,t,e,n){n=n!==void 0?n:"top-left";const o=lg(i,t,e);return new ou({extent:i,origin:I0(i,n),resolutions:o,tileSize:e})}function ag(i){const t=i||{},e=t.extent||Gt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:lg(e,t.maxZoom,t.tileSize,t.maxResolution)};return new ou(n)}function lg(i,t,e,n){t=t!==void 0?t:Sc,e=be(e!==void 0?e:eh);const o=Ye(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 Ex(i,t,e,n){const o=Ta(i);return Cx(o,t,e,n)}function Ta(i){i=Gt(i);let t=i.getExtent();if(!t){const e=180*bo.degrees/i.getMetersPerUnit();t=ti(-e,-e,e,e)}return t}class Sx extends Gf{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 Qh(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()===G.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:sg(t)}getTileCacheForProjection(t){const e=this.getProjection();return gt(e===null||Vn(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:O_(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=Mx(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 Tx extends Je{constructor(t,e){super(t),this.tile=e}}const Ix=Sx;function zx(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 Rx(i,t){const e=i.length,n=new Array(e);for(let o=0;o<e;++o)n[o]=zx(i[o],t);return Ax(n)}function Ax(i){return i.length===1?i[0]:function(t,e,n){if(t){const o=Xy(t),r=qi(o,i.length);return i[r](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),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 su extends Ix{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===su.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),o=e.getState();let r;o==G.LOADING?(this.tileLoadingKeys_[n]=!0,r=ru.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],r=o==G.ERROR?ru.TILELOADERROR:o==G.LOADED?ru.TILELOADEND:void 0),r!=null&&this.dispatchEvent(new Tx(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=Px(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join(`
14
+ `);this.generateTileUrlFunction_?this.setTileUrlFunction(Rx(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 hg=su;class Lx extends hg{constructor(t){const e=t.projection||"EPSG:3857",n=t.extent||Ta(e),o=t.tileGrid||ag({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:Ox,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 Qh(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 o=Xf(n.peekFirstKey())[0],r=this.tileGrid;return n.forEach(function(s){if(s.tileCoord[0]!==o||s.getState()!==G.LOADED)return;const a=s.getSourceTiles();for(let l=0,h=a.length;l<h;++l){const u=a[l],d=u.tileCoord;if(Zt(t,r.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();Zt(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=Vy(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()===G.IDLE){n.setState(G.LOADING);const o=n.wrappedTileCoord,r=this.getTileGridForProjection(e),s=r.getTileCoordExtent(o),a=o[0],l=r.getResolution(a);di(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 f=this.tileUrlFunction(c,t,e),g=this.sourceTileCache.containsKey(f)?this.sourceTileCache.get(f):new this.tileClass(c,f?G.IDLE:G.EMPTY,f,this.format_,this.tileLoadFunction);n.sourceTiles.push(g);const m=g.getState();if(m<G.LOADED){const p=_=>{this.handleTileChange(_);const v=g.getState();if(v===G.LOADED||v===G.ERROR){const y=g.getKey();y in n.errorTileKeys?g.getState()===G.LOADED&&delete n.errorTileKeys[y]:n.loadingSourceTiles--,v===G.ERROR?n.errorTileKeys[y]=!0:g.removeEventListener(tt.CHANGE,p),n.loadingSourceTiles===0&&n.setState(Fn(n.errorTileKeys)?G.LOADED:G.ERROR)}};g.addEventListener(tt.CHANGE,p),n.loadingSourceTiles++}m===G.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()===G.ERROR)?G.ERROR:G.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);di(m,-c.getResolution(t),m),Zt(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);di(v,-p,v),m.forEachTileCoord(v,_,function(y){f=f&&!this.tileUrlFunction(y,o,r)}.bind(this))}const g=new Zy(h,f?G.EMPTY:G.IDLE,u,this.getSourceTiles.bind(this,o,r));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 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=Sc+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 ou({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=Lx;function Ox(i,t){i.setLoader(function(e,n,o){jf(t,i.getFormat(),e,n,o,i.onLoad.bind(i),i.onError.bind(i))})}class Fx extends hg{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:Nx,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:Uf,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&&!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]=sg(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 Qh(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?G.IDLE:G.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||Vn(s,r))return this.getTileInternal(t,e,n,o,s||r);{const a=this.getTileCacheForProjection(r),l=[t,e,n];let h;const u=Vf(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(r),g=this.getTileCoordForTileUrlFunction(l,r),m=new og(s,c,r,f,l,g,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()==G.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=K(n);o in this.tileGridForProjection||(this.tileGridForProjection[o]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function Nx(i,t){i.getImage().src=t}const Gx=Fx;class jx 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(dn.PRELOAD)}setPreload(t){this.set(dn.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(dn.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(dn.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const Bx=jx;class Ux extends Bx{constructor(t){super(t)}createRenderer(){return new rg(this)}}const ug=Ux;var Wx={},dg,cg={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 Vr(i){return i=Math.round(i),i<0?0:i>255?255:i}function fg(i){return i<0?0:i>1?1:i}function au(i){return i[i.length-1]==="%"?Vr(parseFloat(i)/100*255):Vr(parseInt(i))}function Ia(i){return i[i.length-1]==="%"?fg(parseFloat(i)/100):fg(parseFloat(i))}function lu(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 Vx(i){var t=i.replace(/ /g,"").toLowerCase();if(t in cg)return cg[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=Ia(s.pop());case"rgb":return s.length!==3?null:[au(s[0]),au(s[1]),au(s[2]),a];case"hsla":if(s.length!==4)return null;a=Ia(s.pop());case"hsl":if(s.length!==3)return null;var l=(parseFloat(s[0])%360+360)%360/360,h=Ia(s[1]),u=Ia(s[2]),d=u<=.5?u*(h+1):u+h-u*h,c=u*2-d;return[Vr(lu(c,d,l+1/3)*255),Vr(lu(c,d,l)*255),Vr(lu(c,d,l-1/3)*255),a];default:return null}}return null}try{dg=Wx.parseCSSColor=Vx}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=dg(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 Yx(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],Kx(s[1])]:[s[0],Xr(s[1])]}),n?qx(i,t,e):r?Zx(i,t,e):uu(i,t,e)}function Yx(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 hu(i){switch(i.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function qx(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=cu({},t);if(h==="exponential"){for(var u=[hu(i),["linear"],["zoom"]],d=0,c=r;d<c.length;d+=1){var f=c[d],g=uu(n[f],t,o[f]);Wo(u,f,g,!1)}return u}else{for(var m=["step",["zoom"]],p=0,_=r;p<_.length;p+=1){var v=_[p],y=uu(n[v],t,o[v]);Wo(m,v,y,!0)}return du(m),m}}function $x(i,t){if(i!==void 0)return i;if(t!==void 0)return t}function gg(i,t){var e=Xr($x(i.default,t.default));return e===void 0&&t.type==="resolvedImage"?"":e}function uu(i,t,e){var n=cu(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(gg(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];Wo(h,c[0],c[1],!1)}return h.push(gg(i,t)),h}else if(n==="interval"){for(var f=["step",["number",o]],g=0,m=e;g<m.length;g+=1){var p=m[g];Wo(f,p[0],p[1],!0)}return du(f),i.default===void 0?f:["case",["==",["typeof",o],"number"],f,Xr(i.default)]}else if(n==="exponential"){for(var _=i.base!==void 0?i.base:1,v=[hu(i),_===1?["linear"]:["exponential",_],["number",o]],y=0,x=e;y<x.length;y+=1){var k=x[y];Wo(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 Zx(i,t,e,n){n===void 0&&(n=["zoom"]);var o=cu(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=[hu(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];Wo(r,u[0],u[1],s)}return du(r),r}function du(i){i[0]==="step"&&i.length===3&&(i.push(0),i.push(i[3]))}function Wo(i,t,e,n){i.length>3&&t===i[i.length-2]||(n&&i.length===2||i.push(t),i.push(e))}function cu(i,t){return i.type?i.type:t.expression.interpolated?"exponential":"interval"}function Kx(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 fi=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),Yr=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}};Yr.prototype.concat=function(t){return new Yr(this,t)},Yr.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.")},Yr.prototype.has=function(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1};var za={kind:"null"},D={kind:"number"},pt={kind:"string"},lt={kind:"boolean"},Pi={kind:"color"},Vo={kind:"object"},ht={kind:"value"},Hx={kind:"error"},Ra={kind:"collator"},Aa={kind:"formatted"},qr={kind:"resolvedImage"};function Ze(i,t){return{kind:"array",itemType:i,N:t}}function Vt(i){if(i.kind==="array"){var t=Vt(i.itemType);return typeof i.N=="number"?"array<"+t+", "+i.N+">":i.itemType.kind==="value"?"array":"array<"+t+">"}else return i.kind}var Qx=[za,D,pt,lt,Pi,Aa,Vo,Ze(ht),qr];function $r(i,t){if(t.kind==="error")return null;if(i.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!$r(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=Qx;e<n.length;e+=1){var o=n[e];if(!$r(o,t))return null}}return"Expected "+Vt(i)+" but found "+Vt(t)+" instead."}function fu(i,t){return t.some(function(e){return e.kind===i.kind})}function Zr(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 Kr=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"})};Kr.prototype.compare=function(t,e){return this.collator.compare(t,e)},Kr.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 mg(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 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 zt)return!0;if(i instanceof Kr)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(!Pa(n))return!1}return!0}else if(typeof i=="object"){for(var o in i)if(!Pa(i[o]))return!1;return!0}else return!1}function ee(i){if(i===null)return za;if(typeof i=="string")return pt;if(typeof i=="boolean")return lt;if(typeof i=="number")return D;if(i instanceof zt)return Pi;if(i instanceof Kr)return Ra;if(i instanceof Pe)return Aa;if(i instanceof gi)return qr;if(Array.isArray(i)){for(var t=i.length,e,n=0,o=i;n<o.length;n+=1){var r=o[n],s=ee(r);if(!e)e=s;else{if(e===s)continue;e=ht;break}}return Ze(e||ht,t)}else return Vo}function Hr(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 mi=function(t,e){this.type=t,this.value=e};mi.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],o=ee(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 mi(o,n)},mi.prototype.evaluate=function(){return this.value},mi.prototype.eachChild=function(){},mi.prototype.outputDefined=function(){return!0},mi.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 ae=function(t){this.name="ExpressionEvaluationError",this.message=t};ae.prototype.toJSON=function(){return this.message};var mu={string:pt,number:D,boolean:lt,object:Vo},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 mu)||a==="object")return e.error('The item type argument of "array" must be one of string, number, boolean',1);s=mu[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=Ze(s,l)}else o=mu[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=$r(this.type,ee(n));if(o){if(e===this.args.length-1)throw new ae("Expected value to be of type "+Vt(this.type)+", but found "+Vt(ee(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 fn=function(t){this.type=Aa,this.sections=t};fn.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,D),!l))return null;var h=null;if(a["text-font"]&&(h=e.parse(a["text-font"],1,Ze(pt)),!h))return null;var u=null;if(a["text-color"]&&(u=e.parse(a["text-color"],1,Pi),!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 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'.");r=!0,o.push({content:c,scale:null,font:null,textColor:null})}}return new fn(o)},fn.prototype.evaluate=function(t){var e=function(n){var o=n.content.evaluate(t);return ee(o)===qr?new gu("",o,null,null,null):new gu(Hr(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))},fn.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)}},fn.prototype.outputDefined=function(){return!1},fn.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=qr,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,pt);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 Jx={"to-boolean":lt,"to-color":Pi,"to-number":D,"to-string":pt},Ke=function(t,e){this.type=t,this.args=e};Ke.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=Jx[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 Ke(o,r)},Ke.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=mg(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 ae(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 ae("Could not convert "+JSON.stringify(l)+" to number.")}else return this.type.kind==="formatted"?Pe.fromString(Hr(this.args[0].evaluate(t))):this.type.kind==="resolvedImage"?gi.fromString(Hr(this.args[0].evaluate(t))):Hr(this.args[0].evaluate(t))},Ke.prototype.eachChild=function(t){this.args.forEach(t)},Ke.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Ke.prototype.serialize=function(){if(this.type.kind==="formatted")return new fn([{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"],Li=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};Li.prototype.id=function(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null},Li.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?tb[this.feature.type]:this.feature.type:null},Li.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Li.prototype.canonicalID=function(){return this.canonical},Li.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Li.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},Li.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],f=c[0],g=c[1];h=new _n(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,C=m[k];h.concat(k+1).checkSubtype(w,C.type)}if(h.errors.length===0)return new me(o,s,g,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 j=e.parse(t[P],1+z.length);if(!j)return null;z.push(Vt(j.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(Vt).join(", ")+")":"("+Vt(i.type)+"...)"}var mn=function(t,e,n){this.type=Ra,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};mn.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,pt),!s)?null:new mn(o,r,s)},mn.prototype.evaluate=function(t){return new Kr(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},mn.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},mn.prototype.outputDefined=function(){return!1},mn.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 pn=8192;function pu(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 La(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*pn),Math.round(n*o*pn)]}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 vu(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(vu(i,t[e]))return!0;return!1}function lb(i,t){return i[0]*t[1]-i[1]*t[0]}function pg(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:!!(pg(i,t,e,n)&&pg(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 vg(i,t){for(var e=0;e<i.length;++e)if(!vu(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(vg(i,t[e]))return!0;return!1}function _u(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);pu(t,a),r.push(a)}n.push(r)}return n}function _g(i,t,e){for(var n=[],o=0;o<i.length;o++){var r=_u(i[o],t,e);n.push(r)}return n}function yg(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}pu(t,i)}function cb(i){i[0]=i[1]=1/0,i[2]=i[3]=-1/0}function xg(i,t,e,n){var o=Math.pow(2,n.z)*pn,r=[n.x*pn,n.y*pn],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+r[0],c.y+r[1]];yg(f,t,e,o),s.push(f)}return s}function bg(i,t,e,n){var o=Math.pow(2,n.z)*pn,r=[n.x*pn,n.y*pn],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+r[0],f.y+r[1]];pu(t,g),u.push(g)}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];yg(x,t,e,o)}}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],o=i.canonicalID();if(!o)return!1;if(t.type==="Polygon"){var r=_u(t.coordinates,n,o),s=xg(i.geometry(),e,n,o);if(!La(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!vu(h,r))return!1}}if(t.type==="MultiPolygon"){var u=_g(t.coordinates,n,o),d=xg(i.geometry(),e,n,o);if(!La(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],o=i.canonicalID();if(!o)return!1;if(t.type==="Polygon"){var r=_u(t.coordinates,n,o),s=bg(i.geometry(),e,n,o);if(!La(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!vg(h,r))return!1}}if(t.type==="MultiPolygon"){var u=_g(t.coordinates,n,o),d=bg(i.geometry(),e,n,o);if(!La(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 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(Pa(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 fb(t,this.geometries);if(t.geometryType()==="LineString")return gb(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 yu(i){if(i instanceof me&&i.name==="feature-state")return!1;var t=!0;return i.eachChild(function(e){t&&!yu(e)&&(t=!1)}),t}function xu(i,t){if(i instanceof me&&t.indexOf(i.name)>=0)return!1;var e=!0;return i.eachChild(function(n){e&&!xu(n,t)&&(e=!1)}),e}var vn=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};vn.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 vn(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)},vn.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},vn.prototype.eachChild=function(){},vn.prototype.outputDefined=function(){return!1},vn.prototype.serialize=function(){return["var",this.name]};var _n=function(t,e,n,o,r){e===void 0&&(e=[]),o===void 0&&(o=new Yr),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};_n.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)},_n.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 Ke(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 mi)&&s.type.kind!=="resolvedImage"&&bu(s)){var h=new Li;try{s=new mi(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.")},_n.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 _n(this.registry,o,e||null,r,this.errors)},_n.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 fi(o,t))},_n.prototype.checkSubtype=function(t,e){var n=$r(t,e);return n&&this.error(n),n};function bu(i){if(i instanceof vn)return bu(i.boundExpression);if(i instanceof me&&i.name==="error")return!1;if(i instanceof mn)return!1;if(i instanceof oi)return!1;var t=i instanceof Ke||i instanceof Me,e=!0;return i.eachChild(function(n){t?e=e&&bu(n):e=e&&n instanceof mi}),e?Da(i)&&xu(i,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function kg(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 ae("Input is not a number.");return 0}var yn=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)}};yn.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,D);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 yn(r,n,o)},yn.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=kg(e,o);return n[s].evaluate(t)},yn.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)}},yn.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},yn.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 Ue(i,t,e){return i*(1-e)+t*e}function pb(i,t,e){return new zt(Ue(i.r,t.r,e),Ue(i.g,t.g,e),Ue(i.b,t.b,e),Ue(i.a,t.a,e))}function vb(i,t,e){return i.map(function(n,o){return Ue(n,t[o],e)})}var _b=Object.freeze({__proto__:null,number:Ue,color:pb,array:vb}),wg=.95047,Mg=1,Cg=1.08883,Eg=4/29,Yo=6/29,Sg=3*Yo*Yo,yb=Yo*Yo*Yo,xb=Math.PI/180,bb=180/Math.PI;function ku(i){return i>yb?Math.pow(i,1/3):i/Sg+Eg}function wu(i){return i>Yo?i*i*i:Sg*(i-Eg)}function Mu(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function Cu(i){return i/=255,i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Tg(i){var t=Cu(i.r),e=Cu(i.g),n=Cu(i.b),o=ku((.4124564*t+.3575761*e+.1804375*n)/wg),r=ku((.2126729*t+.7151522*e+.072175*n)/Mg),s=ku((.0193339*t+.119192*e+.9503041*n)/Cg);return{l:116*r-16,a:500*(o-r),b:200*(r-s),alpha:i.a}}function Ig(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=Mg*wu(t),e=wg*wu(e),n=Cg*wu(n),new zt(Mu(3.2404542*e-1.5371385*t-.4985314*n),Mu(-.969266*e+1.8760108*t+.041556*n),Mu(.0556434*e-.2040259*t+1.0572252*n),i.alpha)}function kb(i,t,e){return{l:Ue(i.l,t.l,e),a:Ue(i.a,t.a,e),b:Ue(i.b,t.b,e),alpha:Ue(i.alpha,t.alpha,e)}}function wb(i){var t=Tg(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 Ig({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:Ue(i.c,t.c,e),l:Ue(i.l,t.l,e),alpha:Ue(i.alpha,t.alpha,e)}}var Oa={forward:Tg,reverse:Ig,interpolate:kb},Fa={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=Eu(e,t.base,n,o);else if(t.name==="linear")r=Eu(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(Eu(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,D),!r)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 "+Vt(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=kg(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"?Fa.reverse(Fa.interpolate(Fa.forward(u),Fa.forward(d),h)):Oa.reverse(Oa.interpolate(Oa.forward(u),Oa.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 Eu(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 $r(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 xn=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};xn.prototype.evaluate=function(t){return this.result.evaluate(t)},xn.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)},xn.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 xn(n,a):null},xn.prototype.outputDefined=function(){return this.result.outputDefined()},xn.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 Jn=function(t,e,n){this.type=t,this.index=e,this.input=n};Jn.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,D),o=e.parse(t[2],2,Ze(e.expectedType||ht));if(!n||!o)return null;var r=o.type;return new Jn(r.itemType,n,o)},Jn.prototype.evaluate=function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new ae("Array index out of bounds: "+e+" < 0.");if(e>=n.length)throw new ae("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new ae("Array index must be an integer, but found "+e+" instead.");return n[e]},Jn.prototype.eachChild=function(t){t(this.index),t(this.input)},Jn.prototype.outputDefined=function(){return!1},Jn.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var to=function(t,e){this.type=lt,this.needle=t,this.haystack=e};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,ht),o=e.parse(t[2],2,ht);return!n||!o?null:fu(n.type,[lt,pt,D,za,ht])?new to(n,o):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Vt(n.type)+" instead")},to.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(n==null)return!1;if(!Zr(e,["boolean","string","number","null"]))throw new ae("Expected first argument to be of type boolean, string, number or null, but found "+Vt(ee(e))+" instead.");if(!Zr(n,["string","array"]))throw new ae("Expected second argument to be of type array or string, but found "+Vt(ee(n))+" instead.");return n.indexOf(e)>=0},to.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},to.prototype.outputDefined=function(){return!0},to.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var bn=function(t,e,n){this.type=D,this.needle=t,this.haystack=e,this.fromIndex=n};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,ht);if(!n||!o)return null;if(!fu(n.type,[lt,pt,D,za,ht]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Vt(n.type)+" instead");if(t.length===4){var r=e.parse(t[3],3,D);return r?new bn(n,o,r):null}else return new bn(n,o)},bn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!Zr(e,["boolean","string","number","null"]))throw new ae("Expected first argument to be of type boolean, string, number or null, but found "+Vt(ee(e))+" instead.");if(!Zr(n,["string","array"]))throw new ae("Expected second argument to be of type array or string, but found "+Vt(ee(n))+" instead.");if(this.fromIndex){var o=this.fromIndex.evaluate(t);return n.indexOf(e,o)}return n.indexOf(e)},bn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},bn.prototype.outputDefined=function(){return!1},bn.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 eo=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};eo.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 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=ee(f);else if(u.checkSubtype(n,ee(f)))return null;if(typeof r[String(f)]<"u")return u.error("Branch labels must be unique.");r[String(f)]=s.length}var g=e.parse(h,a,o);if(!g)return null;o=o||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,o);return!p||m.type.kind!=="value"&&e.concat(1).checkSubtype(n,m.type)?null:new eo(n,o,m,r,s,p)},eo.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=ee(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise;return n.evaluate(t)},eo.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},eo.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},eo.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 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 io=function(t,e,n){this.type=t,this.branches=e,this.otherwise=n};io.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 io(n,o,l):null},io.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)},io.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)},io.prototype.outputDefined=function(){return this.branches.every(function(t){t[0];var e=t[1];return e.outputDefined()})&&this.otherwise.outputDefined()},io.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var kn=function(t,e,n,o){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=o};kn.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,D);if(!n||!o)return null;if(!fu(n.type,[Ze(ht),pt,ht]))return e.error("Expected first argument to be of type array or string, but found "+Vt(n.type)+" instead");if(t.length===4){var r=e.parse(t[3],3,D);return r?new kn(n.type,n,o,r):null}else return new kn(n.type,n,o)},kn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!Zr(e,["string","array"]))throw new ae("Expected first argument to be of type array or string, but found "+Vt(ee(e))+" instead.");if(this.endIndex){var o=this.endIndex.evaluate(t);return e.slice(n,o)}return e.slice(n)},kn.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},kn.prototype.outputDefined=function(){return!1},kn.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 zg(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 Rg(i,t,e,n){return n.compare(t,e)===0}function Pb(i,t,e,n){return!Rg(i,t,e,n)}function Lb(i,t,e,n){return n.compare(t,e)<0}function Db(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 qo(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(!zg(l,h.type))return a.concat(1).error('"'+l+`" comparisons are not supported for type '`+Vt(h.type)+"'.");var u=a.parse(s[2],2,ht);if(!u)return null;if(!zg(l,u.type))return a.concat(2).error('"'+l+`" comparisons are not supported for type '`+Vt(u.type)+"'.");if(h.type.kind!==u.type.kind&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot compare types '"+Vt(h.type)+"' and '"+Vt(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,Ra),!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=ee(a),u=ee(l);if(h.kind!==u.kind||!(h.kind==="string"||h.kind==="number"))throw new ae('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=ee(a),c=ee(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=qo("==",Sb,Rg),Gb=qo("!=",Tb,Pb),jb=qo("<",Ib,Lb),Bb=qo(">",zb,Db),Ub=qo("<=",Rb,Ob),Wb=qo(">=",Ab,Fb),no=function(t,e,n,o,r){this.type=pt,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=o,this.maxFractionDigits=r};no.parse=function(t,e){if(t.length!==3)return e.error("Expected two arguments.");var n=e.parse(t[1],1,D);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,pt),!r))return null;var s=null;if(o.currency&&(s=e.parse(o.currency,1,pt),!s))return null;var a=null;if(o["min-fraction-digits"]&&(a=e.parse(o["min-fraction-digits"],1,D),!a))return null;var l=null;return o["max-fraction-digits"]&&(l=e.parse(o["max-fraction-digits"],1,D),!l)?null:new no(n,r,s,a,l)},no.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))},no.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)},no.prototype.outputDefined=function(){return!1},no.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 oo=function(t){this.type=D,this.input=t};oo.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 "+Vt(n.type)+" instead."):new oo(n):null},oo.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 ae("Expected value to be of type string or array, but found "+Vt(ee(e))+" instead.")},oo.prototype.eachChild=function(t){t(this.input)},oo.prototype.outputDefined=function(){return!1},oo.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Su={"==":Nb,"!=":Gb,">":Bb,"<":jb,">=":Wb,"<=":Ub,array:Me,at:Jn,boolean:Me,case:io,coalesce:Di,collator:mn,format:fn,image:gn,in:to,"index-of":bn,interpolate:Ce,"interpolate-hcl":Ce,"interpolate-lab":Ce,length:oo,let:xn,literal:mi,match:eo,number:Me,"number-format":no,object:Me,slice:kn,step:yn,string:Me,"to-boolean":Ke,"to-color":Ke,"to-number":Ke,"to-string":Ke,var:vn,within:oi};function Ag(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=mg(e,n,o,s);if(a)throw new ae(a);return new zt(e/255*s,n/255*s,o/255*s,s)}function Pg(i,t){return i in t}function Tu(i,t){var e=t[i];return typeof e>"u"?null:e}function Vb(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 ro(i){return{type:i}}me.register(Su,{error:[Hx,[pt],function(i,t){var e=t[0];throw new ae(e.evaluate(i))}],typeof:[pt,[ht],function(i,t){var e=t[0];return Vt(ee(e.evaluate(i)))}],"to-rgba":[Ze(D,4),[Pi],function(i,t){var e=t[0];return e.evaluate(i).toArray()}],rgb:[Pi,[D,D,D],Ag],rgba:[Pi,[D,D,D,D],Ag],has:{type:lt,overloads:[[[pt],function(i,t){var e=t[0];return Pg(e.evaluate(i),i.properties())}],[[pt,Vo],function(i,t){var e=t[0],n=t[1];return Pg(e.evaluate(i),n.evaluate(i))}]]},get:{type:ht,overloads:[[[pt],function(i,t){var e=t[0];return Tu(e.evaluate(i),i.properties())}],[[pt,Vo],function(i,t){var e=t[0],n=t[1];return Tu(e.evaluate(i),n.evaluate(i))}]]},"feature-state":[ht,[pt],function(i,t){var e=t[0];return Tu(e.evaluate(i),i.featureState||{})}],properties:[Vo,[],function(i){return i.properties()}],"geometry-type":[pt,[],function(i){return i.geometryType()}],id:[ht,[],function(i){return i.id()}],zoom:[D,[],function(i){return i.globals.zoom}],pitch:[D,[],function(i){return i.globals.pitch||0}],"distance-from-center":[D,[],function(i){return i.distanceFromCenter()}],"heatmap-density":[D,[],function(i){return i.globals.heatmapDensity||0}],"line-progress":[D,[],function(i){return i.globals.lineProgress||0}],"sky-radial-progress":[D,[],function(i){return i.globals.skyRadialProgress||0}],accumulated:[ht,[],function(i){return i.globals.accumulated===void 0?null:i.globals.accumulated}],"+":[D,ro(D),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}],"*":[D,ro(D),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:D,overloads:[[[D,D],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)-n.evaluate(i)}],[[D],function(i,t){var e=t[0];return-e.evaluate(i)}]]},"/":[D,[D,D],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)/n.evaluate(i)}],"%":[D,[D,D],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)%n.evaluate(i)}],ln2:[D,[],function(){return Math.LN2}],pi:[D,[],function(){return Math.PI}],e:[D,[],function(){return Math.E}],"^":[D,[D,D],function(i,t){var e=t[0],n=t[1];return Math.pow(e.evaluate(i),n.evaluate(i))}],sqrt:[D,[D],function(i,t){var e=t[0];return Math.sqrt(e.evaluate(i))}],log10:[D,[D],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN10}],ln:[D,[D],function(i,t){var e=t[0];return Math.log(e.evaluate(i))}],log2:[D,[D],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN2}],sin:[D,[D],function(i,t){var e=t[0];return Math.sin(e.evaluate(i))}],cos:[D,[D],function(i,t){var e=t[0];return Math.cos(e.evaluate(i))}],tan:[D,[D],function(i,t){var e=t[0];return Math.tan(e.evaluate(i))}],asin:[D,[D],function(i,t){var e=t[0];return Math.asin(e.evaluate(i))}],acos:[D,[D],function(i,t){var e=t[0];return Math.acos(e.evaluate(i))}],atan:[D,[D],function(i,t){var e=t[0];return Math.atan(e.evaluate(i))}],min:[D,ro(D),function(i,t){return Math.min.apply(Math,t.map(function(e){return e.evaluate(i)}))}],max:[D,ro(D),function(i,t){return Math.max.apply(Math,t.map(function(e){return e.evaluate(i)}))}],abs:[D,[D],function(i,t){var e=t[0];return Math.abs(e.evaluate(i))}],round:[D,[D],function(i,t){var e=t[0],n=e.evaluate(i);return n<0?-Math.round(-n):Math.round(n)}],floor:[D,[D],function(i,t){var e=t[0];return Math.floor(e.evaluate(i))}],ceil:[D,[D],function(i,t){var e=t[0];return Math.ceil(e.evaluate(i))}],"filter-==":[lt,[pt,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,[pt],function(i,t){var e=t[0];return i.geometryType()===e.value}],"filter-<":[lt,[pt,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,[pt,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,[pt,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,[pt,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,[Ze(pt)],function(i,t){var e=t[0];return e.value.indexOf(i.geometryType())>=0}],"filter-id-in":[lt,[Ze(ht)],function(i,t){var e=t[0];return e.value.indexOf(i.id())>=0}],"filter-in-small":[lt,[pt,Ze(ht)],function(i,t){var e=t[0],n=t[1];return n.value.indexOf(i.properties()[e.value])>=0}],"filter-in-large":[lt,[pt,Ze(ht)],function(i,t){var e=t[0],n=t[1];return Vb(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)}],[ro(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)}],[ro(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,[pt],function(i,t){var e=t[0],n=i.globals&&i.globals.isSupportedScript;return n?n(e.evaluate(i)):!0}],upcase:[pt,[pt],function(i,t){var e=t[0];return e.evaluate(i).toUpperCase()}],downcase:[pt,[pt],function(i,t){var e=t[0];return e.evaluate(i).toLowerCase()}],concat:[pt,ro(ht),function(i,t){return t.map(function(e){return Hr(e.evaluate(i))}).join("")}],"resolved-locale":[pt,[Ra],function(i,t){var e=t[0];return e.evaluate(i).resolvedLocale()}]});function Iu(i){return{result:"success",value:i}}function $o(i){return{result:"error",value:i}}function Xb(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function Yb(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function qb(i){return!!i.expression&&i.expression.interpolated}function Lg(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}var zu=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new Li,this._defaultValue=e?Hb(e):null,this._enumValues=e&&e.type==="enum"?e.values:null};zu.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)},zu.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 ae("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 $b(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Su}function Ru(i,t){var e=new _n(Su,[],t?Kb(t):void 0),n=e.parse(i,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return n?Iu(new zu(n,t)):$o(e.errors)}var Na=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!yu(e.expression)};Na.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,o,r,s)},Na.prototype.evaluate=function(t,e,n,o,r,s){return this._styleExpression.evaluate(t,e,n,o,r,s)};var Qr=function(t,e,n,o){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!yu(e.expression),this.interpolationType=o};Qr.prototype.evaluateWithoutErrorHandling=function(t,e,n,o,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,o,r,s)},Qr.prototype.evaluate=function(t,e,n,o,r,s){return this._styleExpression.evaluate(t,e,n,o,r,s)},Qr.prototype.interpolationFactor=function(t,e,n){return this.interpolationType?Ce.interpolationFactor(this.interpolationType,t,e,n):0};function Zb(i,t){if(i=Ru(i,t),i.result==="error")return i;var e=i.value.expression,n=Da(e);if(!n&&!Xb(t))return $o([new fi("","data expressions not supported")]);var o=xu(e,["zoom","pitch","distance-from-center"]);if(!o&&!Yb(t))return $o([new fi("","zoom expressions not supported")]);var r=Ga(e);if(!r&&!o)return $o([new fi("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(r instanceof fi)return $o([r]);if(r instanceof Ce&&!qb(t))return $o([new fi("",'"interpolate" expressions cannot be used with this property')]);if(!r)return Iu(n?new Na("constant",i.value):new Na("source",i.value));var s=r instanceof Ce?r.interpolation:void 0;return Iu(n?new Qr("camera",i.value,r.labels,s):new Qr("composite",i.value,r.labels,s))}function Ga(i){var t=null;if(i instanceof xn)t=Ga(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=Ga(o),t)break}else(i instanceof yn||i instanceof Ce)&&i.input instanceof me&&i.input.name==="zoom"&&(t=i);return t instanceof fi||i.eachChild(function(r){var s=Ga(r);s instanceof fi?t=s:!t&&s?t=new fi("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&s&&t!==s&&(t=new fi("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Kb(i){var t={color:Pi,string:pt,number:D,enum:pt,boolean:lt,formatted:Aa,resolvedImage:qr};return i.type==="array"?Ze(t[i.value]||ht,i.length):t[i.type]}function Hb(i){return i.type==="color"&&(Lg(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 Qb(i){return i instanceof Number||i instanceof String||i instanceof Boolean?i.valueOf():i}function Au(i){if(Array.isArray(i))return i.map(Au);if(i instanceof Object&&!(i instanceof Number||i instanceof String||i instanceof Boolean)){var t={};for(var e in i)t[e]=Au(i[e]);return t}return Qb(i)}var Dg={$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 Og(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(!Og(n)&&typeof n!="boolean")return!1}return!0;default:return!0}}function Jb(i,t){if(t===void 0&&(t="fill"),i==null)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};Og(i)||(i=ja(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.
15
15
  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
16
16
  and paste the contents of this message in the report.
17
17
  Thank you!
18
18
  Filter Expression:
19
19
  `+JSON.stringify(e,null,2)+`
20
- `)}var o=Lg["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,f){return r.value.evaluate(d,c,{},f)};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,f,g,m){return h.value.evaluate(d,c,{},f,void 0,void 0,g,m)},l=!Da(h.value.expression)}s=s;var u=Ng(n);return{filter:s,dynamicFilter:a||void 0,needGeometry:u,needFeature:!!l}}function Jb(i){if(!Zo(i))return i;var t=Ru(i);return Fg(t),t=Og(t),t}function Og(i){if(!Array.isArray(i))return i;var t=ik(i);return t===!0?t:t.map(function(e){return Og(e)})}function Fg(i){var t=!1,e=[];if(i[0]==="case"){for(var n=1;n<i.length-1;n+=2)t=t||Zo(i[n]),e.push(i[n+1]);e.push(i[i.length-1])}else if(i[0]==="match"){t=t||Zo(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||Zo(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++)Fg(i[s])}function Zo(i){if(!Array.isArray(i))return!1;if(tk(i[0]))return!0;for(var t=1;t<i.length;t++){var e=i[t];if(Zo(e))return!0}return!1}function tk(i){return i==="pitch"||i==="distance-from-center"}var ek=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function ik(i){if(ek.has(i[0]))for(var t=1;t<i.length;t++){var e=i[t];if(Zo(e))return!0}return i}function nk(i,t){return i<t?-1:i>t?1:0}function Ng(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(var t=1;t<i.length;t++)if(Ng(i[t]))return!0;return!1}function ja(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==="!="?Ba(Au(i[1],i[2],"==")):t==="<"||t===">"||t==="<="||t===">="?Au(i[1],i[2],t):t==="any"?ok(i.slice(1)):t==="all"?["all"].concat(i.slice(1).map(ja)):t==="none"?["all"].concat(i.slice(1).map(ja).map(Ba)):t==="in"?Gg(i[1],i.slice(2)):t==="!in"?Ba(Gg(i[1],i.slice(2))):t==="has"?jg(i[1]):t==="!has"?Ba(jg(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 ok(i){return["any"].concat(i.map(ja))}function Gg(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(nk)]]:["filter-in-small",i,["literal",t]]}}function jg(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function Ba(i){return["!",i]}var rk=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function sk(i,t){var e={};for(var n in i)n!=="ref"&&(e[n]=i[n]);return rk.forEach(function(o){o in t&&(e[o]=t[o])}),e}function ak(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]=sk(i[n],t[i[n].ref]));return i}var Bg={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},Jr=" ",Ug=/(italic|oblique)$/i,Wg={},Vg=function(i,t,e){var n=Wg[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(" "),f=c[c.length-1].toLowerCase();f=="normal"||f=="italic"||f=="oblique"?(r=l?r:f,c.pop(),f=c[c.length-1].toLowerCase()):Ug.test(f)&&(f=f.replace(Ug,""),r=l?r:c[c.length-1].replace(f,""));for(var g in Bg){var m=c.length>1?c[c.length-2].toLowerCase():"";if(f==g||f==g.replace("-","")||m+"-"+f==g){o=a?o:Bg[g],c.pop(),m&&g.startsWith(m)&&c.pop();break}}!a&&typeof f=="number"&&(o=f);var p=c.join(Jr).replace("Klokantech Noto Sans","Noto Sans");p.indexOf(Jr)!==-1&&(p='"'+p+'"'),s.push(p)}n=Wg[i]=[r,o,s]}return n[0]+Jr+n[1]+Jr+t+"px"+(e?"/"+e:"")+Jr+n[2]};function Pu(i){return i*Math.PI/180}var lk=function(){for(var i=[],t=78271.51696402048;i.length<=24;t/=2)i.push(t);return i}();function Xg(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 hk(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 uk=Array(256).join(" ");function Lu(i,t){if(t>=.05){for(var e="",n=i.split(`
21
- `),o=uk.slice(0,Math.round(t/.1)),r=0,s=n.length;r<s;++r)r>0&&(e+=`
22
- `),e+=n[r].split("").join(o);return e}return i}var Du;function Yg(){return Du||(Du=Xg(1,1).getContext("2d")),Du}function ao(i,t){return Yg().measureText(i).width+(i.length-1)*t}var qg={};function Ou(i,t,e,n){if(i.indexOf(`
20
+ `)}var o=Dg["filter_"+t],r=Ru(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,f){return r.value.evaluate(d,c,{},f)};var a=null,l=null;if(n!==e){var h=Ru(e,o);if(h.result==="error")throw new Error(h.value.map(function(d){return d.key+": "+d.message}).join(", "));a=function(d,c,f,g,m){return h.value.evaluate(d,c,{},f,void 0,void 0,g,m)},l=!Da(h.value.expression)}s=s;var u=Gg(n);return{filter:s,dynamicFilter:a||void 0,needGeometry:u,needFeature:!!l}}function tk(i){if(!Zo(i))return i;var t=Au(i);return Ng(t),t=Fg(t),t}function Fg(i){if(!Array.isArray(i))return i;var t=nk(i);return t===!0?t:t.map(function(e){return Fg(e)})}function Ng(i){var t=!1,e=[];if(i[0]==="case"){for(var n=1;n<i.length-1;n+=2)t=t||Zo(i[n]),e.push(i[n+1]);e.push(i[i.length-1])}else if(i[0]==="match"){t=t||Zo(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||Zo(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++)Ng(i[s])}function Zo(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(Zo(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(Zo(e))return!0}return i}function ok(i,t){return i<t?-1:i>t?1:0}function Gg(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(var t=1;t<i.length;t++)if(Gg(i[t]))return!0;return!1}function ja(i){if(!i)return!0;var t=i[0];if(i.length<=1)return t!=="any";var e=t==="=="?Pu(i[1],i[2],"=="):t==="!="?Ba(Pu(i[1],i[2],"==")):t==="<"||t===">"||t==="<="||t===">="?Pu(i[1],i[2],t):t==="any"?rk(i.slice(1)):t==="all"?["all"].concat(i.slice(1).map(ja)):t==="none"?["all"].concat(i.slice(1).map(ja).map(Ba)):t==="in"?jg(i[1],i.slice(2)):t==="!in"?Ba(jg(i[1],i.slice(2))):t==="has"?Bg(i[1]):t==="!has"?Ba(Bg(i[1])):t==="within"?i:!0;return e}function Pu(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(ja))}function jg(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 Bg(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function Ba(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 Ug={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},Jr=" ",Wg=/(italic|oblique)$/i,Vg={},Xg=function(i,t,e){var n=Vg[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(" "),f=c[c.length-1].toLowerCase();f=="normal"||f=="italic"||f=="oblique"?(r=l?r:f,c.pop(),f=c[c.length-1].toLowerCase()):Wg.test(f)&&(f=f.replace(Wg,""),r=l?r:c[c.length-1].replace(f,""));for(var g in Ug){var m=c.length>1?c[c.length-2].toLowerCase():"";if(f==g||f==g.replace("-","")||m+"-"+f==g){o=a?o:Ug[g],c.pop(),m&&g.startsWith(m)&&c.pop();break}}!a&&typeof f=="number"&&(o=f);var p=c.join(Jr).replace("Klokantech Noto Sans","Noto Sans");p.indexOf(Jr)!==-1&&(p='"'+p+'"'),s.push(p)}n=Vg[i]=[r,o,s]}return n[0]+Jr+n[1]+Jr+t+"px"+(e?"/"+e:"")+Jr+n[2]};function Lu(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 Yg(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(" ");function Du(i,t){if(t>=.05){for(var e="",n=i.split(`
21
+ `),o=dk.slice(0,Math.round(t/.1)),r=0,s=n.length;r<s;++r)r>0&&(e+=`
22
+ `),e+=n[r].split("").join(o);return e}return i}var Ou;function qg(){return Ou||(Ou=Yg(1,1).getContext("2d")),Ou}function so(i,t){return qg().measureText(i).width+(i.length-1)*t}var $g={};function Fu(i,t,e,n){if(i.indexOf(`
23
23
  `)!==-1){for(var o=i.split(`
24
- `),r=[],s=0,a=o.length;s<a;++s)r.push(Ou(o[s],t,e,n));return r.join(`
25
- `)}var l=e+","+t+","+i+","+n,h=qg[l];if(!h){var u=i.split(" ");if(u.length>1){var d=Yg();d.font=t;for(var c=d.measureText("M").width,f=c*e,g="",m=[],p=0,_=u.length;p<_;++p){var v=u[p],y=g+(g?" ":"")+v;ao(y,n)<=f?g=y:(g&&m.push(g),g=v)}g&&m.push(g);for(var x=0,k=m.length;x<k&&k>1;++x){var w=m[x];if(ao(w,n)<f*.35){var C=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,C<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],j=m[S+1];if(ao(P,n)>f*.7&&ao(j,n)<f*.6){var A=P.split(" "),at=A.pop();ao(at,n)<f*.2&&(m[S]=A.join(" "),m[S+1]=at+" "+j),z-=1}}h=m.join(`
26
- `)}else h=i;h=Lu(h,n),qg[l]=h}return h}var dk={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},ck={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={},Ua={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=Lg[t+"_"+i.type][e];h===void 0&&(h=u.default);var d=qb(h);if(!d&&Pg(h)&&(h=Vx(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 Ua.zoom=n,l[e](Ua,o,s)}function gk(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 mk(i,t,e,n,o){return o||console.warn("No filterCache provided to evaluateFilter()"),i in o||(o[i]=Qb(t).filter),Ua.zoom=n,o[i](Ua,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 pk=/\{[^{}}]*\}/g;function Gu(i,t){return i.replace(pk,function(e){return t[e.slice(1,-1)]||""})}function vk(i,t,e,n,o,r,s){if(n===void 0&&(n=lk),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(W){W.data.action==="imageLoaded"&&W.data.src===r&&(a=W.data.image,l=[a.width,a.height])})}}for(var d=ak(t.layers),c={},f=[],g={},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 C=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[C];z||(z=[],c[C]=z),z.push({layer:k,index:y}),f.push(w)}}var P=new ke,j=new se,A=[],at=function(B,W){var F=B.getProperties(),q=c[F.layer];if(!!q){var L=n.indexOf(W);L==-1&&(L=hk(W,n));for(var H=dk[B.getGeometry().getType()],V={properties:F,type:H},I=i.get("mapbox-featurestate")[B.getId()],rt=-1,b=0,T=q.length;b<T;++b){var $=q[b],E=$.layer,Q=E.id,Y=E.layout||Fu,_t=E.paint||Fu;if(!(Y.visibility==="none"||"minzoom"in E&&L<E.minzoom||"maxzoom"in E&&L>=E.maxzoom)){var Et=E.filter;if(!Et||mk(Q,Et,V,L,_)){var yt=void 0,Ct=void 0,Dt=void 0,Lt=void 0,jt=void 0,O=void 0,dt=$.index;if(H==3&&(E.type=="fill"||E.type=="fill-extrusion"))if(Ct=it(E,"paint",E.type+"-opacity",L,V,p,I),E.type+"-pattern"in _t){var vt=it(E,"paint",E.type+"-pattern",L,V,p,I);if(vt){var kt=typeof vt=="string"?Gu(vt,F):vt.toString();if(a&&o&&o[kt]){++rt,O=A[rt],(!O||!O.getFill()||O.getStroke()||O.getText())&&(O=new te({fill:new se}),A[rt]=O),Dt=O.getFill(),O.setZIndex(dt);var xt=kt+"."+Ct,st=m[xt];if(!st){var nt=o[kt],wt=Xg(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}Dt.setColor(st)}}}else yt=lo(it(E,"paint",E.type+"-color",L,V,p,I),Ct),E.type+"-outline-color"in _t&&(jt=lo(it(E,"paint",E.type+"-outline-color",L,V,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 te({fill:yt?new se:void 0,stroke:jt?new ke:void 0}),A[rt]=O),yt&&(Dt=O.getFill(),Dt.setColor(yt)),jt&&(Lt=O.getStroke(),Lt.setColor(jt),Lt.setWidth(.5)),O.setZIndex(dt));if(H!=1&&E.type=="line"){yt=!("line-pattern"in _t)&&"line-color"in _t?lo(it(E,"paint","line-color",L,V,p,I),it(E,"paint","line-opacity",L,V,p,I)):void 0;var Bt=it(E,"paint","line-width",L,V,p,I);yt&&Bt>0&&(++rt,O=A[rt],(!O||!O.getStroke()||O.getFill()||O.getText())&&(O=new te({stroke:new ke}),A[rt]=O),Lt=O.getStroke(),Lt.setLineCap(it(E,"layout","line-cap",L,V,p,I)),Lt.setLineJoin(it(E,"layout","line-join",L,V,p,I)),Lt.setMiterLimit(it(E,"layout","line-miter-limit",L,V,p,I)),Lt.setColor(yt),Lt.setWidth(Bt),Lt.setLineDash(_t["line-dasharray"]?it(E,"paint","line-dasharray",L,V,p,I).map(function(Ge){return Ge*Bt}):null),O.setZIndex(dt))}var bt=!1,ct=null,Ot=0,St=void 0,ft=void 0,de=void 0;if((H==1||H==2)&&"icon-image"in Y){var We=it(E,"layout","icon-image",L,V,p,I);if(We){St=typeof We=="string"?Gu(We,F):We.toString();var Yt=void 0;if(a&&o&&o[St]){var Ie=it(E,"layout","icon-rotation-alignment",L,V,p,I);if(H==2){var Ut=B.getGeometry();if(Ut.getFlatMidpoint||Ut.getFlatMidpoints){var Ht=Ut.getExtent(),In=Math.sqrt(Math.max(Math.pow((Ht[2]-Ht[0])/W,2),Math.pow((Ht[3]-Ht[1])/W,2)));if(In>150){var he=Ut.getType()==="MultiLineString"?Ut.getFlatMidpoints():Ut.getFlatMidpoint();Nu||(Wa=[NaN,NaN],Nu=new Xh("Point",Wa,[],{},null)),Yt=Nu,Wa[0]=he[0],Wa[1]=he[1];var Ve=it(E,"layout","symbol-placement",L,V,p,I);if(Ve==="line"&&Ie==="map")for(var ve=Ut.getStride(),Ne=Ut.getFlatCoordinates(),Ni=0,al=Ne.length-ve;Ni<al;Ni+=ve){var ce=Ne[Ni],bi=Ne[Ni+1],_e=Ne[Ni+ve],Xe=Ne[Ni+ve+1],ze=Math.min(ce,_e),sr=Math.min(bi,Xe),ar=Math.max(ce,_e),ye=Math.max(bi,Xe);if(he[0]>=ze&&he[0]<=ar&&he[1]>=sr&&he[1]<=ye){Ot=Math.atan2(bi-Xe,_e-ce);break}}}}}if(H!==2||Yt){var Re=it(E,"layout","icon-size",L,V,p,I),ie=_t["icon-color"]!==void 0?it(E,"paint","icon-color",L,V,p,I):null;if(!ie||ie.a!==0){var xs=St+"."+Re;if(ie!==null&&(xs+="."+ie),ft=g[xs],!ft){var bs=o[St],bE=gk(E,L,V,p),dd=void 0;"icon-offset"in Y&&(dd=it(E,"layout","icon-offset",L,V,p,I),dd[1]*=-1),ft=new fa({color:ie?[ie.r*255,ie.g*255,ie.b*255,ie.a]:void 0,img:a,imgSize:l,size:[bs.width,bs.height],offset:[bs.x,bs.y],rotateWithView:Ie==="map",scale:Re/bs.pixelRatio,displacement:dd,declutterMode:bE}),g[xs]=ft}}ft&&(++rt,O=A[rt],(!O||!O.getImage()||O.getFill()||O.getStroke())&&(O=new te,A[rt]=O),O.setGeometry(Yt),ft.setRotation(Ot+Pu(it(E,"layout","icon-rotate",L,V,p,I))),ft.setOpacity(it(E,"paint","icon-opacity",L,V,p,I)),ft.setAnchor(ck[it(E,"layout","icon-anchor",L,V,p,I)]),O.setImage(ft),ct=O.getText(),O.setText(void 0),O.setZIndex(dt),bt=!0,de=!1)}else de=!0}}}if(H==1&&E.type==="circle"){++rt,O=A[rt],(!O||!O.getImage()||O.getFill()||O.getStroke())&&(O=new te,A[rt]=O);var bp="circle-radius"in _t?it(E,"paint","circle-radius",L,V,p,I):5,cd=lo(it(E,"paint","circle-stroke-color",L,V,p,I),it(E,"paint","circle-stroke-opacity",L,V,p,I)),fd=lo(it(E,"paint","circle-color",L,V,p,I),it(E,"paint","circle-opacity",L,V,p,I)),gd=it(E,"paint","circle-stroke-width",L,V,p,I),kp=bp+"."+cd+"."+fd+"."+gd;ft=g[kp],ft||(ft=new on({radius:bp,stroke:cd&&gd>0?new ke({width:gd,color:cd}):void 0,fill:fd?new se({color:fd}):void 0,declutterMode:"none"}),g[kp]=ft),O.setImage(ft),ct=O.getText(),O.setText(void 0),O.setGeometry(void 0),O.setZIndex(dt),bt=!0}var fe=void 0,ks=void 0,ws=void 0,zn=void 0,Ms=void 0,md=void 0;if("text-field"in Y){zn=Math.round(it(E,"layout","text-size",L,V,p,I));var pd=it(E,"layout","text-font",L,V,p,I);ws=it(E,"layout","text-line-height",L,V,p,I),ks=Vg(s?s(pd):pd,zn,ws),ks.includes("sans-serif")||(ks+=",sans-serif"),Ms=it(E,"layout","text-letter-spacing",L,V,p,I),md=it(E,"layout","text-max-width",L,V,p,I);var lr=it(E,"layout","text-field",L,V,p,I);typeof lr=="object"&&lr.sections?lr.sections.length===1?fe=lr.toString():fe=lr.sections.reduce(function(Ge,Rn,zE){var zp=Rn.fontStack?Rn.fontStack.split(","):pd,kd=Vg(s?s(zp):zp,zn*(Rn.scale||1),ws),hr=Rn.text;if(hr===`
24
+ `),r=[],s=0,a=o.length;s<a;++s)r.push(Fu(o[s],t,e,n));return r.join(`
25
+ `)}var l=e+","+t+","+i+","+n,h=$g[l];if(!h){var u=i.split(" ");if(u.length>1){var d=qg();d.font=t;for(var c=d.measureText("M").width,f=c*e,g="",m=[],p=0,_=u.length;p<_;++p){var v=u[p],y=g+(g?" ":"")+v;so(y,n)<=f?g=y:(g&&m.push(g),g=v)}g&&m.push(g);for(var x=0,k=m.length;x<k&&k>1;++x){var w=m[x];if(so(w,n)<f*.35){var C=x>0?so(m[x-1],n):1/0,M=x<k-1?so(m[x+1],n):1/0;m.splice(x,1),k-=1,C<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],j=m[S+1];if(so(P,n)>f*.7&&so(j,n)<f*.6){var A=P.split(" "),at=A.pop();so(at,n)<f*.2&&(m[S]=A.join(" "),m[S+1]=at+" "+j),z-=1}}h=m.join(`
26
+ `)}else h=i;h=Du(h,n),$g[l]=h}return h}var ck={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},fk={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]},gk=function(i,t){var e=Zb(i,t);if(e.result==="error")throw new Error(e.value.map(function(n){return n.key+": "+n.message}).join(", "));return e.value},Nu={},Ua={zoom:0},Wa,Gu;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]||Nu)[e],u=Dg[t+"_"+i.type][e];h===void 0&&(h=u.default);var d=$b(h);if(!d&&Lg(h)&&(h=Xx(h,u),d=!0),d){var c=gk(h,u);l[e]=c.evaluate.bind(c)}else u.type=="color"&&(h=zt.parse(h)),l[e]=function(){return h}}return Ua.zoom=n,l[e](Ua,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]=Jb(t).filter),Ua.zoom=n,o[i](Ua,e)}function ao(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 ju(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(W){W.data.action==="imageLoaded"&&W.data.src===r&&(a=W.data.image,l=[a.width,a.height])})}}for(var d=lk(t.layers),c={},f=[],g={},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 C=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[C];z||(z=[],c[C]=z),z.push({layer:k,index:y}),f.push(w)}}var P=new ke,j=new se,A=[],at=function(B,W){var F=B.getProperties(),q=c[F.layer];if(!!q){var L=n.indexOf(W);L==-1&&(L=uk(W,n));for(var H=ck[B.getGeometry().getType()],V={properties:F,type:H},I=i.get("mapbox-featurestate")[B.getId()],rt=-1,b=0,T=q.length;b<T;++b){var $=q[b],E=$.layer,Q=E.id,Y=E.layout||Nu,_t=E.paint||Nu;if(!(Y.visibility==="none"||"minzoom"in E&&L<E.minzoom||"maxzoom"in E&&L>=E.maxzoom)){var Et=E.filter;if(!Et||pk(Q,Et,V,L,_)){var yt=void 0,Ct=void 0,Dt=void 0,Lt=void 0,jt=void 0,O=void 0,dt=$.index;if(H==3&&(E.type=="fill"||E.type=="fill-extrusion"))if(Ct=it(E,"paint",E.type+"-opacity",L,V,p,I),E.type+"-pattern"in _t){var vt=it(E,"paint",E.type+"-pattern",L,V,p,I);if(vt){var kt=typeof vt=="string"?ju(vt,F):vt.toString();if(a&&o&&o[kt]){++rt,O=A[rt],(!O||!O.getFill()||O.getStroke()||O.getText())&&(O=new te({fill:new se}),A[rt]=O),Dt=O.getFill(),O.setZIndex(dt);var xt=kt+"."+Ct,st=m[xt];if(!st){var nt=o[kt],wt=Yg(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}Dt.setColor(st)}}}else yt=ao(it(E,"paint",E.type+"-color",L,V,p,I),Ct),E.type+"-outline-color"in _t&&(jt=ao(it(E,"paint",E.type+"-outline-color",L,V,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 te({fill:yt?new se:void 0,stroke:jt?new ke:void 0}),A[rt]=O),yt&&(Dt=O.getFill(),Dt.setColor(yt)),jt&&(Lt=O.getStroke(),Lt.setColor(jt),Lt.setWidth(.5)),O.setZIndex(dt));if(H!=1&&E.type=="line"){yt=!("line-pattern"in _t)&&"line-color"in _t?ao(it(E,"paint","line-color",L,V,p,I),it(E,"paint","line-opacity",L,V,p,I)):void 0;var Bt=it(E,"paint","line-width",L,V,p,I);yt&&Bt>0&&(++rt,O=A[rt],(!O||!O.getStroke()||O.getFill()||O.getText())&&(O=new te({stroke:new ke}),A[rt]=O),Lt=O.getStroke(),Lt.setLineCap(it(E,"layout","line-cap",L,V,p,I)),Lt.setLineJoin(it(E,"layout","line-join",L,V,p,I)),Lt.setMiterLimit(it(E,"layout","line-miter-limit",L,V,p,I)),Lt.setColor(yt),Lt.setWidth(Bt),Lt.setLineDash(_t["line-dasharray"]?it(E,"paint","line-dasharray",L,V,p,I).map(function(Ge){return Ge*Bt}):null),O.setZIndex(dt))}var bt=!1,ct=null,Ot=0,St=void 0,ft=void 0,de=void 0;if((H==1||H==2)&&"icon-image"in Y){var We=it(E,"layout","icon-image",L,V,p,I);if(We){St=typeof We=="string"?ju(We,F):We.toString();var Yt=void 0;if(a&&o&&o[St]){var Ie=it(E,"layout","icon-rotation-alignment",L,V,p,I);if(H==2){var Ut=B.getGeometry();if(Ut.getFlatMidpoint||Ut.getFlatMidpoints){var Ht=Ut.getExtent(),In=Math.sqrt(Math.max(Math.pow((Ht[2]-Ht[0])/W,2),Math.pow((Ht[3]-Ht[1])/W,2)));if(In>150){var he=Ut.getType()==="MultiLineString"?Ut.getFlatMidpoints():Ut.getFlatMidpoint();Gu||(Wa=[NaN,NaN],Gu=new Yh("Point",Wa,[],{},null)),Yt=Gu,Wa[0]=he[0],Wa[1]=he[1];var Ve=it(E,"layout","symbol-placement",L,V,p,I);if(Ve==="line"&&Ie==="map")for(var ve=Ut.getStride(),Ne=Ut.getFlatCoordinates(),Gi=0,ll=Ne.length-ve;Gi<ll;Gi+=ve){var ce=Ne[Gi],bi=Ne[Gi+1],_e=Ne[Gi+ve],Xe=Ne[Gi+ve+1],ze=Math.min(ce,_e),sr=Math.min(bi,Xe),ar=Math.max(ce,_e),ye=Math.max(bi,Xe);if(he[0]>=ze&&he[0]<=ar&&he[1]>=sr&&he[1]<=ye){Ot=Math.atan2(bi-Xe,_e-ce);break}}}}}if(H!==2||Yt){var Re=it(E,"layout","icon-size",L,V,p,I),ie=_t["icon-color"]!==void 0?it(E,"paint","icon-color",L,V,p,I):null;if(!ie||ie.a!==0){var xs=St+"."+Re;if(ie!==null&&(xs+="."+ie),ft=g[xs],!ft){var bs=o[St],kE=mk(E,L,V,p),cd=void 0;"icon-offset"in Y&&(cd=it(E,"layout","icon-offset",L,V,p,I),cd[1]*=-1),ft=new fa({color:ie?[ie.r*255,ie.g*255,ie.b*255,ie.a]:void 0,img:a,imgSize:l,size:[bs.width,bs.height],offset:[bs.x,bs.y],rotateWithView:Ie==="map",scale:Re/bs.pixelRatio,displacement:cd,declutterMode:kE}),g[xs]=ft}}ft&&(++rt,O=A[rt],(!O||!O.getImage()||O.getFill()||O.getStroke())&&(O=new te,A[rt]=O),O.setGeometry(Yt),ft.setRotation(Ot+Lu(it(E,"layout","icon-rotate",L,V,p,I))),ft.setOpacity(it(E,"paint","icon-opacity",L,V,p,I)),ft.setAnchor(fk[it(E,"layout","icon-anchor",L,V,p,I)]),O.setImage(ft),ct=O.getText(),O.setText(void 0),O.setZIndex(dt),bt=!0,de=!1)}else de=!0}}}if(H==1&&E.type==="circle"){++rt,O=A[rt],(!O||!O.getImage()||O.getFill()||O.getStroke())&&(O=new te,A[rt]=O);var kp="circle-radius"in _t?it(E,"paint","circle-radius",L,V,p,I):5,fd=ao(it(E,"paint","circle-stroke-color",L,V,p,I),it(E,"paint","circle-stroke-opacity",L,V,p,I)),gd=ao(it(E,"paint","circle-color",L,V,p,I),it(E,"paint","circle-opacity",L,V,p,I)),md=it(E,"paint","circle-stroke-width",L,V,p,I),wp=kp+"."+fd+"."+gd+"."+md;ft=g[wp],ft||(ft=new rn({radius:kp,stroke:fd&&md>0?new ke({width:md,color:fd}):void 0,fill:gd?new se({color:gd}):void 0,declutterMode:"none"}),g[wp]=ft),O.setImage(ft),ct=O.getText(),O.setText(void 0),O.setGeometry(void 0),O.setZIndex(dt),bt=!0}var fe=void 0,ks=void 0,ws=void 0,zn=void 0,Ms=void 0,pd=void 0;if("text-field"in Y){zn=Math.round(it(E,"layout","text-size",L,V,p,I));var vd=it(E,"layout","text-font",L,V,p,I);ws=it(E,"layout","text-line-height",L,V,p,I),ks=Xg(s?s(vd):vd,zn,ws),ks.includes("sans-serif")||(ks+=",sans-serif"),Ms=it(E,"layout","text-letter-spacing",L,V,p,I),pd=it(E,"layout","text-max-width",L,V,p,I);var lr=it(E,"layout","text-field",L,V,p,I);typeof lr=="object"&&lr.sections?lr.sections.length===1?fe=lr.toString():fe=lr.sections.reduce(function(Ge,Rn,RE){var Rp=Rn.fontStack?Rn.fontStack.split(","):vd,wd=Xg(s?s(Rp):Rp,zn*(Rn.scale||1),ws),hr=Rn.text;if(hr===`
27
27
  `)return Ge.push(`
28
- `,""),Ge;if(H==2){Ge.push(Lu(hr,Ms),kd);return}hr=Ou(hr,kd,md,Ms).split(`
29
- `);for(var hl=0,wE=hr.length;hl<wE;++hl)hl>0&&Ge.push(`
30
- `,""),Ge.push(hr[hl],kd);return Ge},[]):fe=Gu(lr,F).trim(),Ct=it(E,"paint","text-opacity",L,V,p,I)}if(fe&&Ct&&!de){bt||(++rt,O=A[rt],(!O||!O.getText()||O.getFill()||O.getStroke())&&(O=new te,A[rt]=O),O.setImage(void 0),O.setGeometry(void 0)),O.getText()||O.setText(ct||new ff({padding:[2,2,2,2]})),ct=O.getText();var wp=Y["text-transform"];wp=="uppercase"?fe=Array.isArray(fe)?fe.map(function(Ge,Rn){return Rn%2?Ge:Ge.toUpperCase()}):fe.toUpperCase():wp=="lowercase"&&(fe=Array.isArray(fe)?fe.map(function(Ge,Rn){return Rn%2?Ge:Ge.toLowerCase()}):fe.toLowerCase());var Mp=Array.isArray(fe)?fe:H==2?Lu(fe,Ms):Ou(fe,ks,md,Ms);ct.setText(Mp),ct.setFont(ks),ct.setRotation(Pu(it(E,"layout","text-rotate",L,V,p,I)));var ll=it(E,"layout","text-anchor",L,V,p,I),vd=bt||H==1?"point":it(E,"layout","symbol-placement",L,V,p,I);ct.setPlacement(vd),ct.setOverflow(vd==="point");var co=it(E,"paint","text-halo-width",L,V,p,I),Cp=it(E,"layout","text-offset",L,V,p,I),Ep=it(E,"paint","text-translate",L,V,p,I),_d=0,yd=0;if(vd=="point"){var xd="center";ll.indexOf("left")!==-1?(xd="left",yd=co):ll.indexOf("right")!==-1&&(xd="right",yd=-co),ct.setTextAlign(xd);var kE=it(E,"layout","text-rotation-alignment",L,V,p,I);ct.setRotateWithView(kE=="map")}else ct.setMaxAngle(Pu(it(E,"layout","text-max-angle",L,V,p,I))*fe.length/Mp.length),ct.setTextAlign(),ct.setRotateWithView(!1);var bd="middle";ll.indexOf("bottom")==0?(bd="bottom",_d=-co-.5*(ws-1)*zn):ll.indexOf("top")==0&&(bd="top",_d=co+.5*(ws-1)*zn),ct.setTextBaseline(bd);var Sp=it(E,"layout","text-justify",L,V,p,I);ct.setJustify(Sp==="auto"?void 0:Sp),ct.setOffsetX(Cp[0]*zn+yd+Ep[0]),ct.setOffsetY(Cp[1]*zn+_d+Ep[1]),j.setColor(lo(it(E,"paint","text-color",L,V,p,I),Ct)),ct.setFill(j);var Tp=lo(it(E,"paint","text-halo-color",L,V,p,I),Ct);if(Tp){P.setColor(Tp),co*=2;var Ip=.5*zn;P.setWidth(co<=Ip?co:Ip),ct.setStroke(P)}else ct.setStroke(void 0);var Cs=it(E,"layout","text-padding",L,V,p,I),Es=ct.getPadding();Cs!==Es[0]&&(Es[0]=Cs,Es[1]=Cs,Es[2]=Cs,Es[3]=Cs),O.setZIndex(dt)}}}}if(rt>-1)return A.length=rt+1,A}};return i.setStyle(at),i.set("mapbox-source",v),i.set("mapbox-layers",f),i.set("mapbox-featurestate",{}),at}new Hn;class _k extends Nx{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:sg({extent:Ta(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=_k,Zg='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class yk extends $g{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Zg];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 xk=yk;function Kg(i,t=[]){return(...e)=>(n=>n.length>=i.length?i(...n):Kg(i,n))([...t,...e])}const bk=Array.isArray;function kk(i,t,e){if(!bk(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 wk=Kg(kk);function Mk(i){return typeof i=="string"?i[i.length-1]||"":i[i.length-1]}function Hg(i,t){return arguments.length===1?e=>Hg(i,e):i*t}wk(Hg,1);function Qg(i,t){if(arguments.length===1)return o=>Qg(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 TE=Rp``,Ck="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iYSIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCA0MCA1MCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmMsLmQsLmV7ZmlsbDpub25lO30uZHtzdHJva2Utd2lkdGg6MnB4O30uZCwuZXtzdHJva2U6IzAwMDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9LmZ7Y2xpcC1wYXRoOnVybCgjYik7fS5ne2ZpbGwtcnVsZTpldmVub2RkO308L3N0eWxlPgogICAgPGNsaXBQYXRoIGlkPSJiIj4KICAgICAgPHJlY3QgY2xhc3M9ImMiIHg9IjMuNTEiIHk9IjMuNDgiIHdpZHRoPSIzMi42OCIgaGVpZ2h0PSIzMi42OCIvPgogICAgPC9jbGlwUGF0aD4KICA8L2RlZnM+CiAgPGcgY2xhc3M9ImYiPgogICAgPHBhdGggY2xhc3M9ImciIGQ9Ik0xNy4yNiwzLjQ4djYuNTRoMS4yM1Y1Ljc2bDIuNjQsNC4yNmgxLjMyVjMuNDhoLTEuMjNWNy44NWwtMi42OC00LjM3aC0xLjI4WiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJlIiBjeD0iMTkuOTYiIGN5PSIzMS40IiByPSIxNS4wNyIvPgogIDxsaW5lIGNsYXNzPSJkIiB4MT0iMTkuOTYiIHkxPSIxNi4zMyIgeDI9IjE5Ljk2IiB5Mj0iMzEuMjYiLz4KPC9zdmc+",Ek="data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmNscy0xe2ZpbGw6bm9uZTt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPnRyYXNoLWNhbjwvdGl0bGU+CiAgPHJlY3QgZmlsbD0id2hpdGUiIHg9IjEyIiB5PSIxMiIgd2lkdGg9IjIiIGhlaWdodD0iMTIiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iMTgiIHk9IjEyIiB3aWR0aD0iMiIgaGVpZ2h0PSIxMiIvPgogIDxwYXRoIGZpbGw9IndoaXRlIiBkPSJNNCw2VjhINlYyOGEyLDIsMCwwLDAsMiwySDI0YTIsMiwwLDAsMCwyLTJWOGgyVjZaTTgsMjhWOEgyNFYyOFoiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iMTIiIHk9IjIiIHdpZHRoPSI4IiBoZWlnaHQ9IjIiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgaWQ9Il9UcmFuc3BhcmVudF9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtUcmFuc3BhcmVudCBSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTEiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIvPgo8L3N2Zz4=";function Sk(i){return new B_({units:"metric",bar:i,steps:4,text:!1,minWidth:140})}function Tk(){const i=document.createElement("img");i.src=Ck,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 Ik(i,t){const e=document.createElement("button");if(e.title="Reset map view",t==="unicode")e.innerHTML="↻";else{const o=document.createElement("img");o.className="reset-icon",o.src=Ek,e.appendChild(o)}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 Va=new un({features:[],wrapX:!1}),zk=new Jn({source:Va,properties:{name:"pointsLayer"},style:new te({image:new on({radius:3,fill:new se({color:"grey"})})})});function Rk(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 Qg(2,e).forEach((s,a)=>{Va.addFeature(new Ti({geometry:new ni(s),i:a}))})}const Jg=new ga({stroke:new ke({color:"red",width:2}),points:4,radius1:15,radius2:1}),tm=new on({radius:6,fill:new se({color:"#ff0000"})}),em={color:"#ff0000",width:3},Ak=new ke(em),Pk=new ke({...em,lineDash:[2,8]}),im=new se({color:"rgba(255, 0, 0, 0.1)"}),Lk=new te({image:new ga({fill:new se({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 $n){const e=t.getCoordinates()[0];return new Ar(e)}else return}}),Dk=[new te({fill:im,stroke:Ak}),Lk];function Ok(i){return new te({stroke:Pk,fill:im,image:i==="crosshair"?Jg:tm})}function Fk(i){return new te({image:new on({radius:9,fill:new se({color:i})})})}function Nk(i){return new te({fill:new se({color:i})})}const Di=new un;function Gk(i,t){return new Jn({source:Di,style:i==="Polygon"?Dk:Fk(t)})}function jk(i,t,e){return new Jy({source:Di,type:i,style:i==="Polygon"?Ok(t):Nk(e)})}const nm=new rx({source:Va,pixelTolerance:15});function Bk(i){return new nx({source:Di,style:new te({image:i==="crosshair"?Jg:tm})})}const Uk="data:image/svg+xml;base64,77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICB3aWR0aD0iMTAwIgogICBoZWlnaHQ9IjEwMCIKICAgaWQ9InN2ZzQ0NjAiCiAgIHNvZGlwb2RpOmRvY25hbWU9InVFQTE3LXBvaS1hbHQuc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjAgKDQwMzVhNGZiNDksIDIwMjAtMDUtMDEpIj4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgcGFnZWNvbG9yPSIjZmZmZmZmIgogICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgIGJvcmRlcm9wYWNpdHk9IjEiCiAgICAgb2JqZWN0dG9sZXJhbmNlPSIxMCIKICAgICBncmlkdG9sZXJhbmNlPSIxMCIKICAgICBndWlkZXRvbGVyYW5jZT0iMTAiCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAiCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE5MjAiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iMTAxNyIKICAgICBpZD0ibmFtZWR2aWV3MTEiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlua3NjYXBlOnpvb209IjIuODU2NzExNCIKICAgICBpbmtzY2FwZTpjeD0iLTMxLjM3NjY1NyIKICAgICBpbmtzY2FwZTpjeT0iNTkuNTAwMTg0IgogICAgIGlua3NjYXBlOndpbmRvdy14PSItOCIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTgiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmc0NDYwIgogICAgIGlua3NjYXBlOmRvY3VtZW50LXJvdGF0aW9uPSIwIiAvPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM0NDYyIiAvPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQ0NjUiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgICAgPGRjOnRpdGxlIC8+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxwYXRoCiAgICAgZD0ibSA0Ny43ODE2MTQsNTUuMzU5OTU4IGMgNS41MTMyOSwwLjYzNDc4IDEwLjY4NzA5LC0xLjA0ODYzNCAxNC42Mzg1MjIsLTQuNzYzMDQ1IDQuMDEyMzI3LC0zLjc3MTIxNyA1LjgxNzEzMSwtNy45MTQzODggNS44MTcxMzEsLTEzLjM1NDE1OCAwLC01LjUwNzMzNyAtMS44MjMwNTIsLTkuNjMyODM1IC01Ljk1NTI1OSwtMTMuNDc4MTA4IC0xLjgyNjIzNiwtMS42OTkwMzkgLTQuMjI3MDUzLC0zLjA5NDUzNSAtNi44NDQyOTcsLTMuOTc3OTU0IC0yLjE0MDA0OCwtMC43MjI0OTUgLTYuODgyNywtMC45MDI0MDYgLTkuNDI2OTUyLC0wLjM1NzcyNiAtMi44MzI2MDQsMC42MDYyMzggLTYuMjAzMDg3LDIuMzY0OTE2IC04LjMzNTI5Miw0LjM0ODkxNCAtMy45OTAwNDgsMy43MTI0ODcgLTUuOTAxNzkxLDguMDc1MDE3IC01LjkwMTc5MSwxMy40NjUwNjQgMCwzLjIzMTM2IDAuNDcyMSw1LjI1NTEyNSAxLjkxNTU2Miw4LjIwNjI2IDEuMDUwMDgsMi4xNDY2OCAxLjQ0Mzg4NiwyLjY4MjA5NSAzLjQwNTkxNiw0LjYzMzEzNSAxLjcwODA1LDEuNjk4NTc0IDIuNjQ1MDQ0LDIuNDI1MDQxIDQuMDc0MjkxLDMuMTU4MzQgMi4zNTQ1NjMsMS4yMDgxMDIgNC40MDUwNzEsMS44NjUyNyA2LjYxMjE2OSwyLjExOTQ2OCB6IG0gMS4wMzYwNzYsNDQuMjEzNTUgYyAtMC4zODc4NjUsLTAuMjM1NDQgLTIuMTI2MjU2LC0xLjkyNTMxIC0zLjg2NDQzNywtMy43NTU1MyBDIDMxLjYzOTM2Niw4MS43OTg1NTggMjIuMzQ1MjM3LDY4LjE2MTE3MyAxNy4zMDAyMzEsNTUuMjQxMTQ3IDE1Ljc4MjI5NCw1MS4zNTQxNDEgMTUuMjE5ODAzLDQ5LjM5MTE1NiAxNC42MjU0ODYsNDUuOTExMjg0IDEyLjgwMjQzNiwzNS4yNDAxMyAxNC45ODU3NjksMjQuODE3MzIxIDIwLjg5Njg5NiwxNS45NTExNjUgMjMuMTQ3MjgsMTIuNTc2MzAyIDI3LjcxMjU0OCw4LjAwMDcxMzQgMzAuOTcxNjM0LDUuODUzNDQyNCBjIDExLjg5MTY0NCwtNy44MzUyNTcgMjYuMjIwMTcxLC03LjgwMjY1NyAzOC4xNjY1NSwwLjA4Njg4IDMuMTAwMzc3LDIuMDQ3MzU2IDcuNzEwODQsNi43MDE4NDI2IDkuOTA1NjMxLDkuOTk5Nzk0NiA0LjAxODQ4MSw2LjAzODg2NSA2LjE2MDAxNCwxMi4yMzcyNTkgNi44MTA1NywxOS43MTQ0NzIgMC41MzEwNyw2LjEwMjYyMyAtMC4zODMyMDgsMTIuMDYwMTU5IC0yLjg2Mjc0NSwxOC42OTQyMDQgLTQuODI1NjE1LDEyLjkwMjU2NiAtMTMuNTk3NTY3LDI1Ljc4MDgxNSAtMjguNzA1NDMyLDQyLjE0NDE0NSAtMy4zNzI4MTUsMy42NTI5OTIgLTMuOTcxMTYyLDMuOTkwMzYyIC01LjQ2ODUxOCwzLjA4MDYyIHoiCiAgICAgc3R5bGU9ImZpbGw6cmdiKDAsIDAsIDApO3N0cm9rZS13aWR0aDo0LjU1MzciCiAgICAgaWQ9InBhdGg0MTM1IgogICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiIC8+Cjwvc3ZnPgo=";var wn=function(){function i(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return i}();function Wk(i,t){return i>t?1:i<t?-1:0}function Mn(i,t,e){for(var n=new wn(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 wn(i,t);if(e===null)return o.left=o.right=null,o;e=Mn(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 om(i,t,e){var n=null,o=null;if(t){t=Mn(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 Vk(i,t,e){return t===null?i:(i===null||(t=Mn(i.key,t,e),t.left=i),t)}function Bu(i,t,e,n,o){if(i){n(""+t+(e?"└── ":"├── ")+o(i)+`
31
- `);var r=t+(e?" ":"│ ");i.left&&Bu(i.left,r,!1,n,o),i.right&&Bu(i.right,r,!0,n,o)}}var Uu=function(){function i(t){t===void 0&&(t=Wk),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 wn(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var o=this._comparator,r=Mn(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=Mn(t,e,n);var r=n(t,e.key);return r===0?(e.left===null?o=e.right:(o=Mn(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=Mn(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=Mn(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=Wu(t,e,0,o),this._size=o;else{var s=qk(this.toList(),Xk(t,e),r);o=this._size+o,this._root=Vu({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=om(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=Vk(s,a,o)},i.prototype.split=function(t){return om(t,this._root,this._comparator)},i}();function Wu(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 wn(s,a);return l.left=Wu(i,t,e,r),l.right=Wu(i,t,r+1,n),l}return null}function Xk(i,t){for(var e=new wn(null,null),n=e,o=0;o<i.length;o++)n=n.next=new wn(i[o],t[o]);return n.next=null,e.next}function Yk(i){for(var t=i,e=[],n=!1,o=new wn(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 Vu(i,t,e){var n=e-t;if(n>0){var o=t+Math.floor(n/2),r=Vu(i,t,o),s=i.head;return s.left=r,i.head=i.head.next,s.right=Vu(i,o+1,e),s}return null}function qk(i,t,e){for(var n=new wn(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 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 Ee(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},Yu=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}}},Cn=Number.EPSILON;Cn===void 0&&(Cn=Math.pow(2,-52));var $k=Cn*Cn,qu=function(t,e){if(-Cn<t&&t<Cn&&-Cn<e&&e<Cn)return 0;var n=t-e;return n*n<$k*t*e?0:t<e?-1:1},Zk=function(){function i(){He(this,i),this.reset()}return Ee(i,[{key:"reset",value:function(){this.xRounder=new sm,this.yRounder=new sm}},{key:"round",value:function(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]),i}(),sm=function(){function i(){He(this,i),this.tree=new Uu,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&&qu(n.key,o.key)===0)return this.tree.remove(e),o.key;var r=this.tree.next(n);return r!==null&&qu(n.key,r.key)===0?(this.tree.remove(e),r.key):e}}]),i}(),es=new Zk,is=function(t,e){return t.x*e.y-t.y*e.x},am=function(t,e){return t.x*e.x+t.y*e.y},lm=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 qu(s,0)},Xa=function(t){return Math.sqrt(am(t,t))},Kk=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)/Xa(r)/Xa(o)},Hk=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 am(r,o)/Xa(r)/Xa(o)},hm=function(t,e,n){return e.y===0?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},um=function(t,e,n){return e.x===0?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},Qk=function(t,e,n,o){if(e.x===0)return um(n,o,t.x);if(o.x===0)return um(t,e,n.x);if(e.y===0)return hm(n,o,t.y);if(o.y===0)return hm(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,f=(h+u)/2,g=(d+c)/2;return{x:f,y:g}},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:Ya.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 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:Kk(n.point,e.point,l.point),cosine:Hk(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,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}(),Jk=0,Ya=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 f=n.comparePoint(e.rightSE.point);return f!==0?f:-1}if(o>r){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-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){He(this,i),this.id=++Jk,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=Yu(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,f=ts(o,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=Qk(s,this.vector(),l,e.vector());return g===null||!ts(r,g)?null:es.round(g.x,g.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=[],f=0,g=n.length;f<g;f++)if(o[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;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}(),dm=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 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(Ya.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(Ya.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}(),tw=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 dm(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 dm(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}(),cm=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,o=t.length;n<o;n++){var r=new tw(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}(),ew=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 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 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;lm(s,e,a)!==0&&(n.push(s),e=s)}if(n.length===1)return null;var l=n[0],h=n[1];lm(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,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}(),fm=function(){function i(t){He(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}(),iw=function(){function i(t){He(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 fm(s));else{var a=s.enclosingRing();a.poly||n.push(new fm(a)),a.poly.addInterior(s)}}return n}}]),i}(),nw=function(){function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ya.compare;He(this,i),this.queue=t,this.tree=new Uu(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),f=0,g=c.length;f<g;f++)o.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++)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),C=0,M=w.length;C<M;C++)o.push(w[C])}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,j=z.length;P<j;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,ow=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,rw=function(){function i(){He(this,i)}return Ee(i,[{key:"run",value:function(e,n,o){ri.type=e,es.reset();for(var r=[new cm(n,!0)],s=0,a=o.length;s<a;s++)r.push(new cm(o[s],!1));if(ri.numMultiPolys=r.length,ri.type==="difference")for(var l=r[0],h=1;h<r.length;)Yu(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],f=u+1,g=r.length;f<g;f++)if(Yu(c.bbox,r[f].bbox)===null)return[]}for(var m=new Uu(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 nw(m),w=m.size,C=m.pop();C;){var M=C.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>ow)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,j=z.length;P<j;P++){var A=z[P];A.consumedBy===void 0&&m.insert(A)}w=m.size,C=m.pop()}es.reset();var at=ew.factory(k.segments),B=new iw(at);return B.getGeom()}}]),i}(),ri=new rw,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("union",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("intersection",t,n)},lw=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)},hw=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)},uw={union:sw,intersection:aw,xor:lw,difference:hw};function mm(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 dw(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 mm(a,t,e)}function cw(i,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:i};return mm(n,t,e)}function pm(i){return i.type==="Feature"?i.geometry:i}function fw(i,t,e){e===void 0&&(e={});var n=pm(i),o=pm(t),r=uw.union(n.coordinates,o.coordinates);return r.length===0?null:r.length===1?dw(r[0],e.properties):cw(r,e.properties)}const gw="https://api.os.uk",vm={xyz:"/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png",vectorTile:"/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf",vectorTileStyle:"/maps/vector/v1/vts/resources/styles",places:"/search/places/v1/postcode",features:"/features/v1/wfs"};function _m(i,t,e={}){const n=new URL(t,i);return n.search=new URLSearchParams(e).toString(),decodeURI(n.href)}function mw({service:i,apiKey:t,params:e}){return _m(gw,vm[i],{...e,key:t})}function pw({service:i,proxyEndpoint:t,params:e}){let{origin:n,pathname:o}=new URL(t);return o=o.replace(/\/$/,""),_m(n,o+vm[i],e)}function ns({service:i,apiKey:t,proxyEndpoint:e,params:n}){if(e)return pw({service:i,proxyEndpoint:e,params:n});if(t)return mw({service:i,apiKey:t,params:n});throw Error(`Unable to generate URL for OS ${i} API. Either an API key or proxy endpoint must be supplied`)}function $u(i,t){const e=hc(i),n=Math.round(e*100)/100,o=n/1e4;let r;return t==="m2"?r=n+" m²":t==="ha"&&(r=o+" ha"),r}function os(i,t,e){const n=t.getExtent();return i.getView().fit(ui(n,e))}function qa(i,t){const[e,n,o]=Array.from(kr(i));return Zl([e,n,o,t])}const Ko=new un,pi=new un;function vw(i,t,e){return new Jn({source:pi,style:new te({stroke:e?void 0:new ke({width:3,color:i}),fill:new se({color:t?qa(i,.2):qa(i,0)})})})}function ym(i,t,e,n){const r={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:`
28
+ `,""),Ge;if(H==2){Ge.push(Du(hr,Ms),wd);return}hr=Fu(hr,wd,pd,Ms).split(`
29
+ `);for(var ul=0,ME=hr.length;ul<ME;++ul)ul>0&&Ge.push(`
30
+ `,""),Ge.push(hr[ul],wd);return Ge},[]):fe=ju(lr,F).trim(),Ct=it(E,"paint","text-opacity",L,V,p,I)}if(fe&&Ct&&!de){bt||(++rt,O=A[rt],(!O||!O.getText()||O.getFill()||O.getStroke())&&(O=new te,A[rt]=O),O.setImage(void 0),O.setGeometry(void 0)),O.getText()||O.setText(ct||new gf({padding:[2,2,2,2]})),ct=O.getText();var Mp=Y["text-transform"];Mp=="uppercase"?fe=Array.isArray(fe)?fe.map(function(Ge,Rn){return Rn%2?Ge:Ge.toUpperCase()}):fe.toUpperCase():Mp=="lowercase"&&(fe=Array.isArray(fe)?fe.map(function(Ge,Rn){return Rn%2?Ge:Ge.toLowerCase()}):fe.toLowerCase());var Cp=Array.isArray(fe)?fe:H==2?Du(fe,Ms):Fu(fe,ks,pd,Ms);ct.setText(Cp),ct.setFont(ks),ct.setRotation(Lu(it(E,"layout","text-rotate",L,V,p,I)));var hl=it(E,"layout","text-anchor",L,V,p,I),_d=bt||H==1?"point":it(E,"layout","symbol-placement",L,V,p,I);ct.setPlacement(_d),ct.setOverflow(_d==="point");var uo=it(E,"paint","text-halo-width",L,V,p,I),Ep=it(E,"layout","text-offset",L,V,p,I),Sp=it(E,"paint","text-translate",L,V,p,I),yd=0,xd=0;if(_d=="point"){var bd="center";hl.indexOf("left")!==-1?(bd="left",xd=uo):hl.indexOf("right")!==-1&&(bd="right",xd=-uo),ct.setTextAlign(bd);var wE=it(E,"layout","text-rotation-alignment",L,V,p,I);ct.setRotateWithView(wE=="map")}else ct.setMaxAngle(Lu(it(E,"layout","text-max-angle",L,V,p,I))*fe.length/Cp.length),ct.setTextAlign(),ct.setRotateWithView(!1);var kd="middle";hl.indexOf("bottom")==0?(kd="bottom",yd=-uo-.5*(ws-1)*zn):hl.indexOf("top")==0&&(kd="top",yd=uo+.5*(ws-1)*zn),ct.setTextBaseline(kd);var Tp=it(E,"layout","text-justify",L,V,p,I);ct.setJustify(Tp==="auto"?void 0:Tp),ct.setOffsetX(Ep[0]*zn+xd+Sp[0]),ct.setOffsetY(Ep[1]*zn+yd+Sp[1]),j.setColor(ao(it(E,"paint","text-color",L,V,p,I),Ct)),ct.setFill(j);var Ip=ao(it(E,"paint","text-halo-color",L,V,p,I),Ct);if(Ip){P.setColor(Ip),uo*=2;var zp=.5*zn;P.setWidth(uo<=zp?uo:zp),ct.setStroke(P)}else ct.setStroke(void 0);var Cs=it(E,"layout","text-padding",L,V,p,I),Es=ct.getPadding();Cs!==Es[0]&&(Es[0]=Cs,Es[1]=Cs,Es[2]=Cs,Es[3]=Cs),O.setZIndex(dt)}}}}if(rt>-1)return A.length=rt+1,A}};return i.setStyle(at),i.set("mapbox-source",v),i.set("mapbox-layers",f),i.set("mapbox-featurestate",{}),at}new Po;class yk extends Gx{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:ag({extent:Ta(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 Zg=yk,Kg='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class xk extends Zg{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Kg];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 Hg(i,t=[]){return(...e)=>(n=>n.length>=i.length?i(...n):Hg(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=Hg(wk);function Ck(i){return typeof i=="string"?i[i.length-1]||"":i[i.length-1]}function Qg(i,t){return arguments.length===1?e=>Qg(i,e):i*t}Mk(Qg,1);function Jg(i,t){if(arguments.length===1)return o=>Jg(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 IE=Ap``,Ek="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iYSIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCA0MCA1MCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmMsLmQsLmV7ZmlsbDpub25lO30uZHtzdHJva2Utd2lkdGg6MnB4O30uZCwuZXtzdHJva2U6IzAwMDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9LmZ7Y2xpcC1wYXRoOnVybCgjYik7fS5ne2ZpbGwtcnVsZTpldmVub2RkO308L3N0eWxlPgogICAgPGNsaXBQYXRoIGlkPSJiIj4KICAgICAgPHJlY3QgY2xhc3M9ImMiIHg9IjMuNTEiIHk9IjMuNDgiIHdpZHRoPSIzMi42OCIgaGVpZ2h0PSIzMi42OCIvPgogICAgPC9jbGlwUGF0aD4KICA8L2RlZnM+CiAgPGcgY2xhc3M9ImYiPgogICAgPHBhdGggY2xhc3M9ImciIGQ9Ik0xNy4yNiwzLjQ4djYuNTRoMS4yM1Y1Ljc2bDIuNjQsNC4yNmgxLjMyVjMuNDhoLTEuMjNWNy44NWwtMi42OC00LjM3aC0xLjI4WiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJlIiBjeD0iMTkuOTYiIGN5PSIzMS40IiByPSIxNS4wNyIvPgogIDxsaW5lIGNsYXNzPSJkIiB4MT0iMTkuOTYiIHkxPSIxNi4zMyIgeDI9IjE5Ljk2IiB5Mj0iMzEuMjYiLz4KPC9zdmc+",Sk="data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmNscy0xe2ZpbGw6bm9uZTt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPnRyYXNoLWNhbjwvdGl0bGU+CiAgPHJlY3QgZmlsbD0id2hpdGUiIHg9IjEyIiB5PSIxMiIgd2lkdGg9IjIiIGhlaWdodD0iMTIiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iMTgiIHk9IjEyIiB3aWR0aD0iMiIgaGVpZ2h0PSIxMiIvPgogIDxwYXRoIGZpbGw9IndoaXRlIiBkPSJNNCw2VjhINlYyOGEyLDIsMCwwLDAsMiwySDI0YTIsMiwwLDAsMCwyLTJWOGgyVjZaTTgsMjhWOEgyNFYyOFoiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iMTIiIHk9IjIiIHdpZHRoPSI4IiBoZWlnaHQ9IjIiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgaWQ9Il9UcmFuc3BhcmVudF9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtUcmFuc3BhcmVudCBSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTEiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIvPgo8L3N2Zz4=";function Tk(i){return new U_({units:"metric",bar:i,steps:4,text:i,minWidth:140})}function Ik(){const i=document.createElement("img");i.src=Ek,i.title="North";const t=document.createElement("div");return t.className="north-arrow-control ol-unselectable ol-control",t.appendChild(i),new xo({element:t})}function zk(i,t){const e=document.createElement("button");if(e.title="Reset map view",t==="unicode")e.innerHTML="↻";else{const o=document.createElement("img");o.className="reset-icon",o.src=Sk,e.appendChild(o)}e.addEventListener("click",i,!1);const n=document.createElement("div");return n.className="reset-control ol-unselectable ol-control",n.appendChild(e),new xo({element:n})}const Va=new Ai({features:[],wrapX:!1}),Rk=new Qn({source:Va,properties:{name:"pointsLayer"},style:new te({image:new rn({radius:3,fill:new se({color:"grey"})})})});function Ak(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 Jg(2,e).forEach((s,a)=>{Va.addFeature(new Ti({geometry:new ni(s),i:a}))})}const tm=new ga({stroke:new ke({color:"red",width:2}),points:4,radius1:15,radius2:1}),em=new rn({radius:6,fill:new se({color:"#ff0000"})}),im={color:"#ff0000",width:3},Pk=new ke(im),Lk=new ke({...im,lineDash:[2,8]}),nm=new se({color:"rgba(255, 0, 0, 0.1)"}),Dk=new te({image:new ga({fill:new se({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 $n){const e=t.getCoordinates()[0];return new Ar(e)}else return}}),Ok=[new te({fill:nm,stroke:Pk}),Dk];function Fk(i){return new te({stroke:Lk,fill:nm,image:i==="crosshair"?tm:em})}function Nk(i){return new te({image:new rn({radius:9,fill:new se({color:i})})})}function Gk(i){return new te({fill:new se({color:i})})}const Oi=new Ai;function jk(i,t){return new Qn({source:Oi,style:i==="Polygon"?Ok:Nk(t)})}function Bk(i,t,e){return new tx({source:Oi,type:i,style:i==="Polygon"?Fk(t):Gk(e)})}const om=new sx({source:Va,pixelTolerance:15});function Uk(i){return new ox({source:Oi,style:new te({image:i==="crosshair"?tm:em})})}const Wk="data:image/svg+xml;base64,77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICB3aWR0aD0iMTAwIgogICBoZWlnaHQ9IjEwMCIKICAgaWQ9InN2ZzQ0NjAiCiAgIHNvZGlwb2RpOmRvY25hbWU9InVFQTE3LXBvaS1hbHQuc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjAgKDQwMzVhNGZiNDksIDIwMjAtMDUtMDEpIj4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgcGFnZWNvbG9yPSIjZmZmZmZmIgogICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgIGJvcmRlcm9wYWNpdHk9IjEiCiAgICAgb2JqZWN0dG9sZXJhbmNlPSIxMCIKICAgICBncmlkdG9sZXJhbmNlPSIxMCIKICAgICBndWlkZXRvbGVyYW5jZT0iMTAiCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAiCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE5MjAiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iMTAxNyIKICAgICBpZD0ibmFtZWR2aWV3MTEiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlua3NjYXBlOnpvb209IjIuODU2NzExNCIKICAgICBpbmtzY2FwZTpjeD0iLTMxLjM3NjY1NyIKICAgICBpbmtzY2FwZTpjeT0iNTkuNTAwMTg0IgogICAgIGlua3NjYXBlOndpbmRvdy14PSItOCIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTgiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmc0NDYwIgogICAgIGlua3NjYXBlOmRvY3VtZW50LXJvdGF0aW9uPSIwIiAvPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM0NDYyIiAvPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQ0NjUiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgICAgPGRjOnRpdGxlIC8+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxwYXRoCiAgICAgZD0ibSA0Ny43ODE2MTQsNTUuMzU5OTU4IGMgNS41MTMyOSwwLjYzNDc4IDEwLjY4NzA5LC0xLjA0ODYzNCAxNC42Mzg1MjIsLTQuNzYzMDQ1IDQuMDEyMzI3LC0zLjc3MTIxNyA1LjgxNzEzMSwtNy45MTQzODggNS44MTcxMzEsLTEzLjM1NDE1OCAwLC01LjUwNzMzNyAtMS44MjMwNTIsLTkuNjMyODM1IC01Ljk1NTI1OSwtMTMuNDc4MTA4IC0xLjgyNjIzNiwtMS42OTkwMzkgLTQuMjI3MDUzLC0zLjA5NDUzNSAtNi44NDQyOTcsLTMuOTc3OTU0IC0yLjE0MDA0OCwtMC43MjI0OTUgLTYuODgyNywtMC45MDI0MDYgLTkuNDI2OTUyLC0wLjM1NzcyNiAtMi44MzI2MDQsMC42MDYyMzggLTYuMjAzMDg3LDIuMzY0OTE2IC04LjMzNTI5Miw0LjM0ODkxNCAtMy45OTAwNDgsMy43MTI0ODcgLTUuOTAxNzkxLDguMDc1MDE3IC01LjkwMTc5MSwxMy40NjUwNjQgMCwzLjIzMTM2IDAuNDcyMSw1LjI1NTEyNSAxLjkxNTU2Miw4LjIwNjI2IDEuMDUwMDgsMi4xNDY2OCAxLjQ0Mzg4NiwyLjY4MjA5NSAzLjQwNTkxNiw0LjYzMzEzNSAxLjcwODA1LDEuNjk4NTc0IDIuNjQ1MDQ0LDIuNDI1MDQxIDQuMDc0MjkxLDMuMTU4MzQgMi4zNTQ1NjMsMS4yMDgxMDIgNC40MDUwNzEsMS44NjUyNyA2LjYxMjE2OSwyLjExOTQ2OCB6IG0gMS4wMzYwNzYsNDQuMjEzNTUgYyAtMC4zODc4NjUsLTAuMjM1NDQgLTIuMTI2MjU2LC0xLjkyNTMxIC0zLjg2NDQzNywtMy43NTU1MyBDIDMxLjYzOTM2Niw4MS43OTg1NTggMjIuMzQ1MjM3LDY4LjE2MTE3MyAxNy4zMDAyMzEsNTUuMjQxMTQ3IDE1Ljc4MjI5NCw1MS4zNTQxNDEgMTUuMjE5ODAzLDQ5LjM5MTE1NiAxNC42MjU0ODYsNDUuOTExMjg0IDEyLjgwMjQzNiwzNS4yNDAxMyAxNC45ODU3NjksMjQuODE3MzIxIDIwLjg5Njg5NiwxNS45NTExNjUgMjMuMTQ3MjgsMTIuNTc2MzAyIDI3LjcxMjU0OCw4LjAwMDcxMzQgMzAuOTcxNjM0LDUuODUzNDQyNCBjIDExLjg5MTY0NCwtNy44MzUyNTcgMjYuMjIwMTcxLC03LjgwMjY1NyAzOC4xNjY1NSwwLjA4Njg4IDMuMTAwMzc3LDIuMDQ3MzU2IDcuNzEwODQsNi43MDE4NDI2IDkuOTA1NjMxLDkuOTk5Nzk0NiA0LjAxODQ4MSw2LjAzODg2NSA2LjE2MDAxNCwxMi4yMzcyNTkgNi44MTA1NywxOS43MTQ0NzIgMC41MzEwNyw2LjEwMjYyMyAtMC4zODMyMDgsMTIuMDYwMTU5IC0yLjg2Mjc0NSwxOC42OTQyMDQgLTQuODI1NjE1LDEyLjkwMjU2NiAtMTMuNTk3NTY3LDI1Ljc4MDgxNSAtMjguNzA1NDMyLDQyLjE0NDE0NSAtMy4zNzI4MTUsMy42NTI5OTIgLTMuOTcxMTYyLDMuOTkwMzYyIC01LjQ2ODUxOCwzLjA4MDYyIHoiCiAgICAgc3R5bGU9ImZpbGw6cmdiKDAsIDAsIDApO3N0cm9rZS13aWR0aDo0LjU1MzciCiAgICAgaWQ9InBhdGg0MTM1IgogICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiIC8+Cjwvc3ZnPgo=";var wn=function(){function i(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return i}();function Vk(i,t){return i>t?1:i<t?-1:0}function Mn(i,t,e){for(var n=new wn(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 Bu(i,t,e,n){var o=new wn(i,t);if(e===null)return o.left=o.right=null,o;e=Mn(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 rm(i,t,e){var n=null,o=null;if(t){t=Mn(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 Xk(i,t,e){return t===null?i:(i===null||(t=Mn(i.key,t,e),t.left=i),t)}function Uu(i,t,e,n,o){if(i){n(""+t+(e?"└── ":"├── ")+o(i)+`
31
+ `);var r=t+(e?" ":"│ ");i.left&&Uu(i.left,r,!1,n,o),i.right&&Uu(i.right,r,!0,n,o)}}var Wu=function(){function i(t){t===void 0&&(t=Vk),this._root=null,this._size=0,this._comparator=t}return i.prototype.insert=function(t,e){return this._size++,this._root=Bu(t,e,this._root,this._comparator)},i.prototype.add=function(t,e){var n=new wn(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var o=this._comparator,r=Mn(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=Mn(t,e,n);var r=n(t,e.key);return r===0?(e.left===null?o=e.right:(o=Mn(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=Mn(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=Mn(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 qk(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&&Yu(t,e,0,o-1,r),this._root===null)this._root=Vu(t,e,0,o),this._size=o;else{var s=$k(this.toList(),Yk(t,e),r);o=this._size+o,this._root=Xu({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 Uu(this._root,"",!0,function(n){return e.push(n)},t),e.join("")},i.prototype.update=function(t,e,n){var o=this._comparator,r=rm(t,this._root,o),s=r.left,a=r.right;o(t,e)<0?a=Bu(e,n,a,o):s=Bu(e,n,s,o),this._root=Xk(s,a,o)},i.prototype.split=function(t){return rm(t,this._root,this._comparator)},i}();function Vu(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 wn(s,a);return l.left=Vu(i,t,e,r),l.right=Vu(i,t,r+1,n),l}return null}function Yk(i,t){for(var e=new wn(null,null),n=e,o=0;o<i.length;o++)n=n.next=new wn(i[o],t[o]);return n.next=null,e.next}function qk(i){for(var t=i,e=[],n=!1,o=new wn(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 Xu(i,t,e){var n=e-t;if(n>0){var o=t+Math.floor(n/2),r=Xu(i,t,o),s=i.head;return s.left=r,i.head=i.head.next,s.right=Xu(i,o+1,e),s}return null}function $k(i,t,e){for(var n=new wn(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 Yu(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}Yu(i,t,e,a,o),Yu(i,t,a+1,n,o)}}function He(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function sm(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&&sm(i.prototype,t),e&&sm(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},qu=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}}},Cn=Number.EPSILON;Cn===void 0&&(Cn=Math.pow(2,-52));var Zk=Cn*Cn,$u=function(t,e){if(-Cn<t&&t<Cn&&-Cn<e&&e<Cn)return 0;var n=t-e;return n*n<Zk*t*e?0:t<e?-1:1},Kk=function(){function i(){He(this,i),this.reset()}return Ee(i,[{key:"reset",value:function(){this.xRounder=new am,this.yRounder=new am}},{key:"round",value:function(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]),i}(),am=function(){function i(){He(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&&$u(n.key,o.key)===0)return this.tree.remove(e),o.key;var r=this.tree.next(n);return r!==null&&$u(n.key,r.key)===0?(this.tree.remove(e),r.key):e}}]),i}(),es=new Kk,is=function(t,e){return t.x*e.y-t.y*e.x},lm=function(t,e){return t.x*e.x+t.y*e.y},hm=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 $u(s,0)},Xa=function(t){return Math.sqrt(lm(t,t))},Hk=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)/Xa(r)/Xa(o)},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 lm(r,o)/Xa(r)/Xa(o)},um=function(t,e,n){return e.y===0?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},dm=function(t,e,n){return e.x===0?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},Jk=function(t,e,n,o){if(e.x===0)return dm(n,o,t.x);if(o.x===0)return dm(t,e,n.x);if(e.y===0)return um(n,o,t.y);if(o.y===0)return um(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,f=(h+u)/2,g=(d+c)/2;return{x:f,y:g}},pi=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:Ya.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 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:Hk(n.point,e.point,l.point),cosine:Qk(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,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}(),tw=0,Ya=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 f=n.comparePoint(e.rightSE.point);return f!==0?f:-1}if(o>r){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-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){He(this,i),this.id=++tw,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=qu(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,f=ts(o,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=Jk(s,this.vector(),l,e.vector());return g===null||!ts(r,g)?null:es.round(g.x,g.y)}},{key:"split",value:function(e){var n=[],o=e.events!==void 0,r=new pi(e,!0),s=new pi(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 pi.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),pi.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=[],f=0,g=n.length;f<g;f++)if(o[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;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=pi.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 pi(r,!0),u=new pi(s,!1);return new i(h,u,[o],[a])}}]),i}(),cm=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 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(Ya.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(Ya.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}(),ew=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 cm(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 cm(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}(),fm=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,o=t.length;n<o;n++){var r=new ew(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}(),iw=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 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 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;hm(s,e,a)!==0&&(n.push(s),e=s)}if(n.length===1)return null;var l=n[0],h=n[1];hm(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,o=this.events.length;n<o;n++){var r=this.events[n];pi.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}(),gm=function(){function i(t){He(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}(),nw=function(){function i(t){He(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 gm(s));else{var a=s.enclosingRing();a.poly||n.push(new gm(a)),a.poly.addInterior(s)}}return n}}]),i}(),ow=function(){function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ya.compare;He(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),f=0,g=c.length;f<g;f++)o.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++)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=pi.comparePoints(u,m);x=k<=0?u:m}this.queue.remove(n.rightSE),o.push(n.rightSE);for(var w=n.split(x),C=0,M=w.length;C<M;C++)o.push(w[C])}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,j=z.length;P<j;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}(),mm=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,rw=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,sw=function(){function i(){He(this,i)}return Ee(i,[{key:"run",value:function(e,n,o){ri.type=e,es.reset();for(var r=[new fm(n,!0)],s=0,a=o.length;s<a;s++)r.push(new fm(o[s],!1));if(ri.numMultiPolys=r.length,ri.type==="difference")for(var l=r[0],h=1;h<r.length;)qu(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],f=u+1,g=r.length;f<g;f++)if(qu(c.bbox,r[f].bbox)===null)return[]}for(var m=new Wu(pi.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>mm)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 ow(m),w=m.size,C=m.pop();C;){var M=C.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>mm)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(k.segments.length>rw)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,j=z.length;P<j;P++){var A=z[P];A.consumedBy===void 0&&m.insert(A)}w=m.size,C=m.pop()}es.reset();var at=iw.factory(k.segments),B=new nw(at);return B.getGeom()}}]),i}(),ri=new sw,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("union",t,n)},lw=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)},hw=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)},uw=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)},dw={union:aw,intersection:lw,xor:hw,difference:uw};function pm(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 cw(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 pm(a,t,e)}function fw(i,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:i};return pm(n,t,e)}function vm(i){return i.type==="Feature"?i.geometry:i}function gw(i,t,e){e===void 0&&(e={});var n=vm(i),o=vm(t),r=dw.union(n.coordinates,o.coordinates);return r.length===0?null:r.length===1?cw(r[0],e.properties):fw(r,e.properties)}const mw="https://api.os.uk",_m={xyz:"/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png",vectorTile:"/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf",vectorTileStyle:"/maps/vector/v1/vts/resources/styles",places:"/search/places/v1/postcode",features:"/features/v1/wfs"};function ym(i,t,e={}){const n=new URL(t,i);return n.search=new URLSearchParams(e).toString(),decodeURI(n.href)}function pw({service:i,apiKey:t,params:e}){return ym(mw,_m[i],{...e,key:t})}function vw({service:i,proxyEndpoint:t,params:e}){let{origin:n,pathname:o}=new URL(t);return o=o.replace(/\/$/,""),ym(n,o+_m[i],e)}function ns({service:i,apiKey:t,proxyEndpoint:e,params:n}){if(e)return vw({service:i,proxyEndpoint:e,params:n});if(t)return pw({service:i,apiKey:t,params:n});throw Error(`Unable to generate URL for OS ${i} API. Either an API key or proxy endpoint must be supplied`)}function Zu(i,t){const e=uc(i),n=Math.round(e*100)/100,o=n/1e4;let r;return t==="m2"?r=n+" m²":t==="ha"&&(r=o+" ha"),r}function os(i,t,e){const n=t.getExtent();return i.getView().fit(di(n,e))}function qa(i,t){const[e,n,o]=Array.from(kr(i));return Kl([e,n,o,t])}function $a(i,t){return new Po().writeFeaturesObject(i instanceof Ai?i.getFeatures():i,{featureProjection:t})}const Ko=new Ai,si=new Ai;function _w(i,t,e){return new Qn({source:si,style:new te({stroke:e?void 0:new ke({width:3,color:i}),fill:new se({color:t?qa(i,.2):qa(i,0)})})})}function xm(i,t,e,n){const r={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:`
32
32
  <ogc:Filter>
33
33
  <ogc:Contains>
34
34
  <ogc:PropertyName>SHAPE</ogc:PropertyName>
35
35
  <gml:Point srsName="urn:ogc:def:crs:EPSG::4326">
36
- <gml:coordinates>${B0(i).reverse().join(",")}</gml:coordinates>
36
+ <gml:coordinates>${U0(i).reverse().join(",")}</gml:coordinates>
37
37
  </gml:Point>
38
38
  </ogc:Contains>
39
39
  </ogc:Filter>
40
- `,count:"1"},s=ns({service:"features",apiKey:t,proxyEndpoint:e,params:r});fetch(s).then(a=>a.json()).then(a=>{if(!a.features.length)return;const l=a.features[0].properties,h=["TOID","DescriptiveGroup"];Object.keys(l).forEach(c=>h.includes(c)||delete l[c]);const u=new Hn,d=u.readFeatures(a,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});n?d.forEach(c=>{const f=c.getProperties().TOID,g=Ko.getFeatureById(f);g?Ko.removeFeature(g):(c.setId(f),Ko.addFeature(c))}):(Ko.clear(),d.forEach(c=>{const f=c.getProperties().TOID;c.setId(f),Ko.addFeature(c)})),pi.clear(),pi.addFeature(u.readFeature(Ko.getFeatures().reduce((c,f)=>{const g=u.writeFeatureObject(f).geometry;return c?fw(c,g):g},null)))}).catch(a=>console.log(a))}function _w(i,t,e){const o=Boolean(i||t)?yw(i,t,e):xw();return o.set("name","rasterBaseMap"),o}function yw(i,t,e){const n=ns({service:"xyz",apiKey:i,proxyEndpoint:t});return new hg({source:new $g({url:n,attributions:[e],attributionsCollapsible:!1,maxZoom:20})})}function xw(){return new hg({source:new xk({attributions:[Zg]})})}function bw(i,t,e){if(!Boolean(i||t))return;const o=ns({service:"vectorTile",apiKey:i,proxyEndpoint:t,params:{srs:"3857"}}),r=new xx({declutter:!0,properties:{name:"vectorBaseMap"},source:new Lx({format:new G1,url:o,attributions:[e],attributionsCollapsible:!1})}),s=ns({service:"vectorTileStyle",apiKey:i,proxyEndpoint:t,params:{srs:"3857"}});return fetch(s).then(a=>a.json()).then(a=>vk(r,a,"esri")).catch(a=>console.log(a)),r}function kw(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 Ns({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])Ul([s,l]);else{const h=i(r,a);j0(s,l,fc(s,l,h.forward),fc(l,s,h.inverse))}}}}function ww(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,$a=3,Mw=4,Zu=5,xm=6378137,Cw=6356752314e-3,bm=.0066943799901413165,rs=484813681109536e-20,R=Math.PI/2,Ew=.16666666666666666,Sw=.04722222222222222,Tw=.022156084656084655,U=1e-10,ue=.017453292519943295,vi=57.29577951308232,Rt=Math.PI/4,ss=Math.PI*2,Kt=3.14159265359,Le={};Le.greenwich=0,Le.lisbon=-9.131906111111,Le.paris=2.337229166667,Le.bogota=-74.080916666667,Le.madrid=-3.687938888889,Le.rome=12.452333333333,Le.bern=7.439583333333,Le.jakarta=106.807719444444,Le.ferro=-17.666666666667,Le.brussels=4.367975,Le.stockholm=18.058277777778,Le.athens=23.7163375,Le.oslo=10.722916666667;const Iw={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var km=/[\s_\-\/\(\)]/g;function En(i,t){if(i[t])return i[t];for(var e=Object.keys(i),n=t.toLowerCase().replace(km,""),o=-1,r,s;++o<e.length;)if(r=e[o],s=r.toLowerCase().replace(km,""),s===n)return i[r]}function Ku(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*ue},lat_1:function(a){t.lat1=a*ue},lat_2:function(a){t.lat2=a*ue},lat_ts:function(a){t.lat_ts=a*ue},lon_0:function(a){t.long0=a*ue},lon_1:function(a){t.long1=a*ue},lon_2:function(a){t.long2=a*ue},alpha:function(a){t.alpha=parseFloat(a)*ue},gamma:function(a){t.rectified_grid_angle=parseFloat(a)},lonc:function(a){t.longc=a*ue},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=En(Iw,a);l&&(t.to_meter=l.to_meter)},from_greenwich:function(a){t.from_greenwich=a*ue},pm:function(a){var l=En(Le,a);t.from_greenwich=(l||parseFloat(a))*ue},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 as=1,wm=2,Mm=3,Za=4,Cm=5,Hu=-1,zw=/\s/,Rw=/[A-Za-z]/,Aw=/[A-Za-z84_]/,Ka=/[,\]]/,Em=/[\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=as}Oi.prototype.readCharicter=function(){var i=this.text[this.place++];if(this.state!==Za)for(;zw.test(i);){if(this.place>=this.text.length)return;i=this.text[this.place++]}switch(this.state){case as:return this.neutral(i);case wm:return this.keyword(i);case Za:return this.quoted(i);case Cm:return this.afterquote(i);case Mm:return this.number(i);case Hu:return}},Oi.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=Za;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)},Oi.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=as;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=as,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Hu);return}},Oi.prototype.number=function(i){if(Em.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)},Oi.prototype.quoted=function(i){if(i==='"'){this.state=Cm;return}this.word+=i},Oi.prototype.keyword=function(i){if(Aw.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=as;return}if(Ka.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(Rw.test(i)){this.word=i,this.state=wm;return}if(i==='"'){this.word="",this.state=Za;return}if(Em.test(i)){this.word=i,this.state=Mm;return}if(Ka.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===Hu)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Pw(i){var t=new Oi(i);return t.output()}function Sm(i,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:i,o=e.reduce(function(r,s){return Ho(s,r),r},n);t&&(i[t]=o)}function Ho(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]={},Ho(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&&Ho(i[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:i[0],a:i[1],rf:i[2]},i.length===4&&Ho(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]],Sm(t,e,i);return;default:for(n=-1;++n<i.length;)if(!Array.isArray(i[n]))return Ho(i,t[e]);return Sm(t,e,i)}}var Lw=.017453292519943295;function Dw(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*Lw}function Ow(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 Dw(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 Tm(i){var t=Pw(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var o={};return Ho(t,o),Ow(o),o}function Se(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?Se[i]=Ku(arguments[1]):Se[i]=Tm(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}}ww(Se);function Fw(i){return typeof i=="string"}function Nw(i){return i in Se}var Gw=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function jw(i){return Gw.some(function(t){return i.indexOf(t)>-1})}var Bw=["3857","900913","3785","102113"];function Uw(i){var t=En(i,"authority");if(!!t){var e=En(t,"epsg");return e&&Bw.indexOf(e)>-1}}function Ww(i){var t=En(i,"extension");if(!!t)return En(t,"proj4")}function Vw(i){return i[0]==="+"}function Xw(i){if(Fw(i)){if(Nw(i))return Se[i];if(jw(i)){var t=Tm(i);if(Uw(t))return Se["EPSG:3857"];var e=Ww(t);return e?Ku(e):t}if(Vw(i))return Ku(i)}else return i}function Im(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 ls(i){return i<0?-1:1}function X(i){return Math.abs(i)<=Kt?i:i-ls(i)*ss}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 hs(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 qw(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)<=U)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 $w(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=hs(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 Zw=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const Kw={init:Yw,forward:qw,inverse:$w,names:Zw};function Hw(){}function zm(i){return i}var Qw=["longlat","identity"],Jw=[Kw,{init:Hw,forward:zm,inverse:zm,names:Qw}],Ha={},Qa=[];function Rm(i,t){var e=Qa.length;return i.names?(Qa[e]=i,i.names.forEach(function(n){Ha[n.toLowerCase()]=e}),this):(console.log(t),!0)}function t2(i){if(!i)return!1;var t=i.toLowerCase();if(typeof Ha[t]<"u"&&Qa[Ha[t]])return Qa[Ha[t]]}function e2(){Jw.forEach(Rm)}const i2={start:e2,add:Rm,get:t2};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 n2=ot.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};ot.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function o2(i,t,e,n){var o=i*i,r=t*t,s=(o-r)/o,a=0;n?(i*=1-s*(Ew+s*(Sw+s*Tw)),o=i*i,s=0):a=Math.sqrt(s);var l=(o-r)/r;return{es:s,e:a,ep2:l}}function r2(i,t,e,n,o){if(!i){var r=En(ot,n);r||(r=n2),i=r.a,t=r.b,e=r.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)<U)&&(o=!0,t=i),{a:i,b:t,rf:e,sphere:o}}var le={};le.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},le.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},le.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},le.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},le.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},le.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},le.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},le.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},le.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},le.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},le.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},le.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},le.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},le.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},le.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},le.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},le.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function s2(i,t,e,n,o,r,s){var a={};return i===void 0||i==="none"?a.datum_type=Zu:a.datum_type=Mw,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]*=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=$a,a.grids=s),a.a=e,a.b=n,a.es=o,a.ep2=r,a}var Am={};function a2(i,t){var e=new DataView(t),n=u2(e),o=d2(e,n);o.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var r=c2(e,o,n),s={header:o,subgrids:r};return Am[i]=s,s}function l2(i){if(i===void 0)return null;var t=i.split(",");return t.map(h2)}function h2(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:Am[i]||null,isNull:!1}}function Qo(i){return i/3600*Math.PI/180}function u2(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 d2(i,t){return{nFields:i.getInt32(8,t),nSubgridFields:i.getInt32(24,t),nSubgrids:i.getInt32(40,t),shiftType:Qu(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 Qu(i,t,e){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(t,e)))}function c2(i,t,e){for(var n=176,o=[],r=0;r<t.nSubgrids;r++){var s=g2(i,n,e),a=m2(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:[Qo(s.lowerLongitude),Qo(s.lowerLatitude)],del:[Qo(s.longitudeInterval),Qo(s.latitudeInterval)],lim:[l,h],count:s.gridNodeCount,cvs:f2(a)})}return o}function f2(i){return i.map(function(t){return[Qo(t.longitudeShift),Qo(t.latitudeShift)]})}function g2(i,t,e){return{name:Qu(i,t+8,t+16).trim(),parent:Qu(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 m2(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=Xw(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=En(le,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=r2(e.a,e.b,e.rf,e.ellps,e.sphere),s=o2(r.a,r.b,r.rf,e.R_A),a=l2(e.nadgrids),l=e.datum||s2(e.datumCode,e.datum_params,r.a,r.b,s.es,s.ep2,a);Im(this,e),Im(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=i2,yi.projections.start();function p2(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 Pm(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 Lm(i,t,e,n){var o=1e-12,r=o*o,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,C,M,S;if(a=Math.sqrt(x*x+k*k),l=Math.sqrt(x*x+k*k+w*w),a/e<o){if(C=0,l/e<o)return M=R,S=-n,{x:i.x,y:i.y,z:i.z}}else C=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>r&&y<s);return M=Math.atan(_/Math.abs(p)),{x:C,y:M,z:S}}function v2(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 _2(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 y2(i,t,e){if(p2(i,t)||i.datum_type===Zu||t.datum_type===Zu)return e;var n=i.a,o=i.es;if(i.datum_type===$a){var r=Dm(i,!1,e);if(r!==0)return;n=xm,o=bm}var s=t.a,a=t.b,l=t.es;if(t.datum_type===$a&&(s=xm,a=Cw,l=bm),o===l&&n===s&&!Ja(i.datum_type)&&!Ja(t.datum_type))return e;if(e=Pm(e,o,n),Ja(i.datum_type)&&(e=v2(e,i.datum_type,i.datum_params)),Ja(t.datum_type)&&(e=_2(e,t.datum_type,t.datum_params)),e=Lm(e,l,s,a),t.datum_type===$a){var h=Dm(t,!0,e);if(h!==0)return}return e}function Dm(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,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)&&(o=x2(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 x2(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=Om(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=Om(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 Om(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),f=(1-o.x)*(1-o.y),g=(1-o.x)*o.y;return r.x=f*a.x+c*l.x+g*u.x+d*h.x,r.y=f*a.y+c*l.y+g*u.y+d*h.y,r}function Fm(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 Nm(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 b2(i){Gm(i.x),Gm(i.y)}function Gm(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 k2(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 tl(i,t,e,n){var o;if(Array.isArray(e)&&(e=Nm(e)),b2(e),i.datum&&t.datum&&k2(i,t)&&(o=new yi("WGS84"),e=tl(i,o,e,n),i=o),n&&i.axis!=="enu"&&(e=Fm(i,!1,e)),i.projName==="longlat")e={x:e.x*ue,y:e.y*ue,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=y2(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"?Fm(t,!0,e):e}var jm=yi("WGS84");function Ju(i,t,e,n){var o,r,s;return Array.isArray(e)?(o=tl(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=tl(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 Bm(i){return i instanceof yi?i:i.oProj?i.oProj:yi(i)}function De(i,t,e){i=Bm(i);var n=!1,o;return typeof t>"u"?(t=i,i=jm,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=jm,n=!0),t=Bm(t),e?Ju(i,t,e):(o={forward:function(r,s){return Ju(i,t,r,s)},inverse:function(r,s){return Ju(t,i,r,s)}},n&&(o.oProj=t),o)}var Um=6,Wm="AJSAJS",Vm="AFAFAF",Jo=65,Oe=73,Qe=79,us=86,ds=90;const w2={forward:Xm,inverse:M2,toPoint:Ym};function Xm(i,t){return t=t||5,S2(C2({lat:i[1],lon:i[0]}),t)}function M2(i){var t=ed(Zm(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Ym(i){var t=ed(Zm(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 C2(i){var t=i.lat,e=i.lon,n=6378137,o=.00669438,r=.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=o/(1-o),l=n/Math.sqrt(1-o*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-o/4-3*o*o/64-5*o*o*o/256)*f-(3*o/8+3*o*o/32+45*o*o*o/1024)*Math.sin(2*f)+(15*o*o/256+45*o*o*o/1024)*Math.sin(4*f)-35*o*o*o/3072*Math.sin(6*f));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(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:E2(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,f,g,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),f=s*(1-a)/Math.pow(1-a*Math.sin(v)*Math.sin(v),1.5),g=y/(u*r);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 C;if(i.accuracy){var M=ed({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});C={top:M.lat,right:M.lon,bottom:k,left:w}}else C={lat:k,lon:w};return C}function E2(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 S2(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+T2(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function T2(i,t,e){var n=$m(e),o=Math.floor(i/1e5),r=Math.floor(t/1e5)%20;return I2(o,r,n)}function $m(i){var t=i%Um;return t===0&&(t=Um),t}function I2(i,t,e){var n=e-1,o=Wm.charCodeAt(n),r=Vm.charCodeAt(n),s=o+i-1,a=r+t,l=!1;s>ds&&(s=s-ds+Jo-1,l=!0),(s===Oe||o<Oe&&s>Oe||(s>Oe||o<Oe)&&l)&&s++,(s===Qe||o<Qe&&s>Qe||(s>Qe||o<Qe)&&l)&&(s++,s===Oe&&s++),s>ds&&(s=s-ds+Jo-1),a>us?(a=a-us+Jo-1,l=!0):l=!1,(a===Oe||r<Oe&&a>Oe||(a>Oe||r<Oe)&&l)&&a++,(a===Qe||r<Qe&&a>Qe||(a>Qe||r<Qe)&&l)&&(a++,a===Oe&&a++),a>us&&(a=a-us+Jo-1);var h=String.fromCharCode(s)+String.fromCharCode(a);return h}function Zm(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=$m(s),h=z2(e.charAt(0),l),u=R2(e.charAt(1),l);u<A2(a);)u+=2e6;var d=t-r;if(d%2!==0)throw`MGRSPoint has to have an even number
40
+ `,count:"1"},s=ns({service:"features",apiKey:t,proxyEndpoint:e,params:r});fetch(s).then(a=>a.json()).then(a=>{if(!a.features.length)return;const l=a.features[0].properties,h=["TOID","DescriptiveGroup"];Object.keys(l).forEach(c=>h.includes(c)||delete l[c]);const u=new Po,d=u.readFeatures(a,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});n?d.forEach(c=>{const f=c.getProperties().TOID,g=Ko.getFeatureById(f);g?Ko.removeFeature(g):(c.setId(f),Ko.addFeature(c))}):(Ko.clear(),d.forEach(c=>{const f=c.getProperties().TOID;c.setId(f),Ko.addFeature(c)})),si.clear(),si.addFeature(u.readFeature(Ko.getFeatures().reduce((c,f)=>{const g=u.writeFeatureObject(f).geometry;return c?gw(c,g):g},null)))}).catch(a=>console.log(a))}function yw(i,t,e){const o=Boolean(i||t)?xw(i,t,e):bw();return o.set("name","rasterBaseMap"),o}function xw(i,t,e){const n=ns({service:"xyz",apiKey:i,proxyEndpoint:t});return new ug({source:new Zg({url:n,attributions:[e],attributionsCollapsible:!1,maxZoom:20})})}function bw(){return new ug({source:new bk({attributions:[Kg]})})}function kw(i,t,e){if(!Boolean(i||t))return;const o=ns({service:"vectorTile",apiKey:i,proxyEndpoint:t,params:{srs:"3857"}}),r=new bx({declutter:!0,properties:{name:"vectorBaseMap"},source:new Dx({format:new j1,url:o,attributions:[e],attributionsCollapsible:!1})}),s=ns({service:"vectorTileStyle",apiKey:i,proxyEndpoint:t,params:{srs:"3857"}});return fetch(s).then(a=>a.json()).then(a=>_k(r,a,"esri")).catch(a=>console.log(a)),r}function ww(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"),cc(new Ns({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(!ec(r,a))if(i.defs[r]===i.defs[a])Wl([s,l]);else{const h=i(r,a);B0(s,l,gc(s,l,h.forward),gc(l,s,h.inverse))}}}}function Mw(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 lo=1,ho=2,Za=3,Cw=4,Ku=5,bm=6378137,Ew=6356752314e-3,km=.0066943799901413165,rs=484813681109536e-20,R=Math.PI/2,Sw=.16666666666666666,Tw=.04722222222222222,Iw=.022156084656084655,U=1e-10,ue=.017453292519943295,vi=57.29577951308232,Rt=Math.PI/4,ss=Math.PI*2,Kt=3.14159265359,Le={};Le.greenwich=0,Le.lisbon=-9.131906111111,Le.paris=2.337229166667,Le.bogota=-74.080916666667,Le.madrid=-3.687938888889,Le.rome=12.452333333333,Le.bern=7.439583333333,Le.jakarta=106.807719444444,Le.ferro=-17.666666666667,Le.brussels=4.367975,Le.stockholm=18.058277777778,Le.athens=23.7163375,Le.oslo=10.722916666667;const zw={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var wm=/[\s_\-\/\(\)]/g;function En(i,t){if(i[t])return i[t];for(var e=Object.keys(i),n=t.toLowerCase().replace(wm,""),o=-1,r,s;++o<e.length;)if(r=e[o],s=r.toLowerCase().replace(wm,""),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*ue},lat_1:function(a){t.lat1=a*ue},lat_2:function(a){t.lat2=a*ue},lat_ts:function(a){t.lat_ts=a*ue},lon_0:function(a){t.long0=a*ue},lon_1:function(a){t.long1=a*ue},lon_2:function(a){t.long2=a*ue},alpha:function(a){t.alpha=parseFloat(a)*ue},gamma:function(a){t.rectified_grid_angle=parseFloat(a)},lonc:function(a){t.longc=a*ue},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=En(zw,a);l&&(t.to_meter=l.to_meter)},from_greenwich:function(a){t.from_greenwich=a*ue},pm:function(a){var l=En(Le,a);t.from_greenwich=(l||parseFloat(a))*ue},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 as=1,Mm=2,Cm=3,Ka=4,Em=5,Qu=-1,Rw=/\s/,Aw=/[A-Za-z]/,Pw=/[A-Za-z84_]/,Ha=/[,\]]/,Sm=/[\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=as}Fi.prototype.readCharicter=function(){var i=this.text[this.place++];if(this.state!==Ka)for(;Rw.test(i);){if(this.place>=this.text.length)return;i=this.text[this.place++]}switch(this.state){case as:return this.neutral(i);case Mm:return this.keyword(i);case Ka:return this.quoted(i);case Em:return this.afterquote(i);case Cm:return this.number(i);case Qu:return}},Fi.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=Ka;return}if(Ha.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=as;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=as,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Qu);return}},Fi.prototype.number=function(i){if(Sm.test(i)){this.word+=i;return}if(Ha.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=Em;return}this.word+=i},Fi.prototype.keyword=function(i){if(Pw.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=as;return}if(Ha.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(Aw.test(i)){this.word=i,this.state=Mm;return}if(i==='"'){this.word="",this.state=Ka;return}if(Sm.test(i)){this.word=i,this.state=Cm;return}if(Ha.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===Qu)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Lw(i){var t=new Fi(i);return t.output()}function Tm(i,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:i,o=e.reduce(function(r,s){return Ho(s,r),r},n);t&&(i[t]=o)}function Ho(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]={},Ho(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&&Ho(i[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:i[0],a:i[1],rf:i[2]},i.length===4&&Ho(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]],Tm(t,e,i);return;default:for(n=-1;++n<i.length;)if(!Array.isArray(i[n]))return Ho(i,t[e]);return Tm(t,e,i)}}var Dw=.017453292519943295;function Ow(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 Ni(i){return i*Dw}function Fw(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 Ow(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",Ni],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Ni],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",Ni],["lat0","latitude_of_origin",Ni],["lat0","standard_parallel_1",Ni],["lat1","standard_parallel_1",Ni],["lat2","standard_parallel_2",Ni],["azimuth","Azimuth"],["alpha","azimuth",Ni],["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=Ni(i.lat1>0?90:-90),i.lat_ts=i.lat1)}function Im(i){var t=Lw(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var o={};return Ho(t,o),Fw(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]=Im(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}}Mw(Se);function Nw(i){return typeof i=="string"}function Gw(i){return i in Se}var jw=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Bw(i){return jw.some(function(t){return i.indexOf(t)>-1})}var Uw=["3857","900913","3785","102113"];function Ww(i){var t=En(i,"authority");if(!!t){var e=En(t,"epsg");return e&&Uw.indexOf(e)>-1}}function Vw(i){var t=En(i,"extension");if(!!t)return En(t,"proj4")}function Xw(i){return i[0]==="+"}function Yw(i){if(Nw(i)){if(Gw(i))return Se[i];if(Bw(i)){var t=Im(i);if(Ww(t))return Se["EPSG:3857"];var e=Vw(t);return e?Hu(e):t}if(Xw(i))return Hu(i)}else return i}function zm(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 ls(i){return i<0?-1:1}function X(i){return Math.abs(i)<=Kt?i:i-ls(i)*ss}function ai(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 hs(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 qw(){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 $w(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)<=U)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=ai(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 Zw(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=hs(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 Kw=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const Hw={init:qw,forward:$w,inverse:Zw,names:Kw};function Qw(){}function Rm(i){return i}var Jw=["longlat","identity"],t2=[Hw,{init:Qw,forward:Rm,inverse:Rm,names:Jw}],Qa={},Ja=[];function Am(i,t){var e=Ja.length;return i.names?(Ja[e]=i,i.names.forEach(function(n){Qa[n.toLowerCase()]=e}),this):(console.log(t),!0)}function e2(i){if(!i)return!1;var t=i.toLowerCase();if(typeof Qa[t]<"u"&&Ja[Qa[t]])return Ja[Qa[t]]}function i2(){t2.forEach(Am)}const n2={start:i2,add:Am,get:e2};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 o2=ot.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};ot.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function r2(i,t,e,n){var o=i*i,r=t*t,s=(o-r)/o,a=0;n?(i*=1-s*(Sw+s*(Tw+s*Iw)),o=i*i,s=0):a=Math.sqrt(s);var l=(o-r)/r;return{es:s,e:a,ep2:l}}function s2(i,t,e,n,o){if(!i){var r=En(ot,n);r||(r=o2),i=r.a,t=r.b,e=r.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)<U)&&(o=!0,t=i),{a:i,b:t,rf:e,sphere:o}}var le={};le.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},le.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},le.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},le.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},le.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},le.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},le.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},le.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},le.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},le.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},le.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},le.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},le.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},le.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},le.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},le.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},le.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function a2(i,t,e,n,o,r,s){var a={};return i===void 0||i==="none"?a.datum_type=Ku:a.datum_type=Cw,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=lo),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=ho,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=Za,a.grids=s),a.a=e,a.b=n,a.es=o,a.ep2=r,a}var Pm={};function l2(i,t){var e=new DataView(t),n=d2(e),o=c2(e,n);o.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var r=f2(e,o,n),s={header:o,subgrids:r};return Pm[i]=s,s}function h2(i){if(i===void 0)return null;var t=i.split(",");return t.map(u2)}function u2(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:Pm[i]||null,isNull:!1}}function Qo(i){return i/3600*Math.PI/180}function d2(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 c2(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 f2(i,t,e){for(var n=176,o=[],r=0;r<t.nSubgrids;r++){var s=m2(i,n,e),a=p2(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:[Qo(s.lowerLongitude),Qo(s.lowerLatitude)],del:[Qo(s.longitudeInterval),Qo(s.latitudeInterval)],lim:[l,h],count:s.gridNodeCount,cvs:g2(a)})}return o}function g2(i){return i.map(function(t){return[Qo(t.longitudeShift),Qo(t.latitudeShift)]})}function m2(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 p2(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=Yw(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=En(le,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=s2(e.a,e.b,e.rf,e.ellps,e.sphere),s=r2(r.a,r.b,r.rf,e.R_A),a=h2(e.nadgrids),l=e.datum||a2(e.datumCode,e.datum_params,r.a,r.b,s.es,s.ep2,a);zm(this,e),zm(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=n2,yi.projections.start();function v2(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===lo?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===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_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 Lm(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 Dm(i,t,e,n){var o=1e-12,r=o*o,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,C,M,S;if(a=Math.sqrt(x*x+k*k),l=Math.sqrt(x*x+k*k+w*w),a/e<o){if(C=0,l/e<o)return M=R,S=-n,{x:i.x,y:i.y,z:i.z}}else C=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>r&&y<s);return M=Math.atan(_/Math.abs(p)),{x:C,y:M,z:S}}function _2(i,t,e){if(t===lo)return{x:i.x+e[0],y:i.y+e[1],z:i.z+e[2]};if(t===ho){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 y2(i,t,e){if(t===lo)return{x:i.x-e[0],y:i.y-e[1],z:i.z-e[2]};if(t===ho){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 tl(i){return i===lo||i===ho}function x2(i,t,e){if(v2(i,t)||i.datum_type===Ku||t.datum_type===Ku)return e;var n=i.a,o=i.es;if(i.datum_type===Za){var r=Om(i,!1,e);if(r!==0)return;n=bm,o=km}var s=t.a,a=t.b,l=t.es;if(t.datum_type===Za&&(s=bm,a=Ew,l=km),o===l&&n===s&&!tl(i.datum_type)&&!tl(t.datum_type))return e;if(e=Lm(e,o,n),tl(i.datum_type)&&(e=_2(e,i.datum_type,i.datum_params)),tl(t.datum_type)&&(e=y2(e,t.datum_type,t.datum_params)),e=Dm(e,l,s,a),t.datum_type===Za){var h=Om(t,!0,e);if(h!==0)return}return e}function Om(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,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)&&(o=b2(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 b2(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=Fm(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=Fm(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 Fm(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),f=(1-o.x)*(1-o.y),g=(1-o.x)*o.y;return r.x=f*a.x+c*l.x+g*u.x+d*h.x,r.y=f*a.y+c*l.y+g*u.y+d*h.y,r}function Nm(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 Gm(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 k2(i){jm(i.x),jm(i.y)}function jm(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 w2(i,t){return(i.datum.datum_type===lo||i.datum.datum_type===ho)&&t.datumCode!=="WGS84"||(t.datum.datum_type===lo||t.datum.datum_type===ho)&&i.datumCode!=="WGS84"}function el(i,t,e,n){var o;if(Array.isArray(e)&&(e=Gm(e)),k2(e),i.datum&&t.datum&&w2(i,t)&&(o=new yi("WGS84"),e=el(i,o,e,n),i=o),n&&i.axis!=="enu"&&(e=Nm(i,!1,e)),i.projName==="longlat")e={x:e.x*ue,y:e.y*ue,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=x2(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"?Nm(t,!0,e):e}var Bm=yi("WGS84");function td(i,t,e,n){var o,r,s;return Array.isArray(e)?(o=el(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=el(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 Um(i){return i instanceof yi?i:i.oProj?i.oProj:yi(i)}function De(i,t,e){i=Um(i);var n=!1,o;return typeof t>"u"?(t=i,i=Bm,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=Bm,n=!0),t=Um(t),e?td(i,t,e):(o={forward:function(r,s){return td(i,t,r,s)},inverse:function(r,s){return td(t,i,r,s)}},n&&(o.oProj=t),o)}var Wm=6,Vm="AJSAJS",Xm="AFAFAF",Jo=65,Oe=73,Qe=79,us=86,ds=90;const M2={forward:Ym,inverse:C2,toPoint:qm};function Ym(i,t){return t=t||5,T2(E2({lat:i[1],lon:i[0]}),t)}function C2(i){var t=id(Km(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function qm(i){var t=id(Km(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function ed(i){return i*(Math.PI/180)}function $m(i){return 180*(i/Math.PI)}function E2(i){var t=i.lat,e=i.lon,n=6378137,o=.00669438,r=.9996,s,a,l,h,u,d,c,f=ed(t),g=ed(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=ed(s),a=o/(1-o),l=n/Math.sqrt(1-o*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-o/4-3*o*o/64-5*o*o*o/256)*f-(3*o/8+3*o*o/32+45*o*o*o/1024)*Math.sin(2*f)+(15*o*o/256+45*o*o*o/1024)*Math.sin(4*f)-35*o*o*o/3072*Math.sin(6*f));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(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:S2(t)}}function id(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,f,g,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),f=s*(1-a)/Math.pow(1-a*Math.sin(v)*Math.sin(v),1.5),g=y/(u*r);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=$m(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+$m(w);var C;if(i.accuracy){var M=id({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});C={top:M.lat,right:M.lon,bottom:k,left:w}}else C={lat:k,lon:w};return C}function S2(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 T2(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+I2(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function I2(i,t,e){var n=Zm(e),o=Math.floor(i/1e5),r=Math.floor(t/1e5)%20;return z2(o,r,n)}function Zm(i){var t=i%Wm;return t===0&&(t=Wm),t}function z2(i,t,e){var n=e-1,o=Vm.charCodeAt(n),r=Xm.charCodeAt(n),s=o+i-1,a=r+t,l=!1;s>ds&&(s=s-ds+Jo-1,l=!0),(s===Oe||o<Oe&&s>Oe||(s>Oe||o<Oe)&&l)&&s++,(s===Qe||o<Qe&&s>Qe||(s>Qe||o<Qe)&&l)&&(s++,s===Oe&&s++),s>ds&&(s=s-ds+Jo-1),a>us?(a=a-us+Jo-1,l=!0):l=!1,(a===Oe||r<Oe&&a>Oe||(a>Oe||r<Oe)&&l)&&a++,(a===Qe||r<Qe&&a>Qe||(a>Qe||r<Qe)&&l)&&(a++,a===Oe&&a++),a>us&&(a=a-us+Jo-1);var h=String.fromCharCode(s)+String.fromCharCode(a);return h}function Km(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=Zm(s),h=R2(e.charAt(0),l),u=A2(e.charAt(1),l);u<P2(a);)u+=2e6;var d=t-r;if(d%2!==0)throw`MGRSPoint has to have an even number
41
41
  of digits after the zone letter and two 100km letters - front
42
42
  half for easting meters, second half for
43
- 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(r,r+c),f=parseFloat(p)*m,_=i.substring(r+c),g=parseFloat(_)*m),v=f+h,y=g+u,{easting:v,northing:y,zoneLetter:a,zoneNumber:s,accuracy:m}}function z2(i,t){for(var e=Wm.charCodeAt(t-1),n=1e5,o=!1;e!==i.charCodeAt(0);){if(e++,e===Oe&&e++,e===Qe&&e++,e>ds){if(o)throw"Bad character: "+i;e=Jo,o=!0}n+=1e5}return n}function R2(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=Vm.charCodeAt(t-1),n=0,o=!1;e!==i.charCodeAt(0);){if(e++,e===Oe&&e++,e===Qe&&e++,e>us){if(o)throw"Bad character: "+i;e=Jo,o=!0}n+=1e5}return n}function A2(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(Ym(i))},tr.prototype.toMGRS=function(i){return Xm([this.x,this.y],i)};var P2=1,L2=.25,Km=.046875,Hm=.01953125,Qm=.01068115234375,D2=.75,O2=.46875,F2=.013020833333333334,N2=.007120768229166667,G2=.3645833333333333,j2=.005696614583333333,B2=.3076171875;function Jm(i){var t=[];t[0]=P2-i*(L2+i*(Km+i*(Hm+i*Qm))),t[1]=i*(D2-i*(Km+i*(Hm+i*Qm)));var e=i*i;return t[2]=e*(O2-i*(F2+i*N2)),e*=i,t[3]=e*(G2-i*j2),t[4]=e*i*B2,t}function el(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 U2=20;function tp(i,t,e){for(var n=1/(1-t),o=i,r=U2;r;--r){var s=Math.sin(o),a=1-t*s*s;if(a=(el(o,s,Math.cos(o),e)-i)*(a*Math.sqrt(a))*n,o-=a,Math.abs(a)<U)return o}return o}function W2(){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=Jm(this.es),this.ml0=el(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function V2(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),f=Math.pow(c,2),g=Math.abs(l)>U?Math.tan(e):0,m=Math.pow(g,2),p=Math.pow(m,2);o=1-this.es*Math.pow(a,2),u=u/Math.sqrt(o);var _=el(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*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)<U)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>U)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 X2(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=tp(t,this.es,this.en),Math.abs(e)<R){var d=Math.sin(e),c=Math.cos(e),f=Math.abs(c)>U?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=r*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)))),o=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*ls(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 il={init:W2,forward:V2,inverse:X2,names:Y2};function ep(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 q2(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function $2(i){var t=Math.abs(i);return t=q2(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 Z2(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 K2(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function ip(i,t,e){for(var n=Math.sin(t),o=Math.cos(t),r=ep(e),s=K2(e),a=2*o*s,l=-2*n*r,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=o*r,[a*u-l*f,a*f+l*u]}function H2(){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&&(il.init.apply(this),this.forward=il.forward,this.inverse=il.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+Z2(this.gtu,2*n))}function Q2(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=$2(Math.tan(t));var a=ip(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 J2(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=ip(this.utg,2*e,2*t);e=e+r[0],t=t+r[1],t=Math.atan(ep(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 t5=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"];const nl={init:H2,forward:Q2,inverse:J2,names:t5};function e5(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 i5="etmerc";function n5(){var i=e5(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*ue,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,nl.init.apply(this),this.forward=nl.forward,this.inverse=nl.inverse}var o5=["Universal Transverse Mercator System","utm"];const r5={init:n5,names:o5,dependsOn:i5};function nd(i,t){return Math.pow((1-i)/(1+i),t)}var s5=20;function a5(){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 l5(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 h5(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=s5;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 u5=["gauss"];const od={init:a5,forward:l5,inverse:h5,names:u5};function d5(){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 c5(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 f5(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 g5=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const m5={init:d5,forward:c5,inverse:f5,names:g5};function p5(i,t,e){return t*=e,Math.tan(.5*(R+i))*Math.pow((1-t)/(1+t),.5*e)}function v5(){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)<=U&&(this.k0=.5*(1+ls(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=U&&(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)<=U&&(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 _5(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)<=U&&Math.abs(e+this.lat0)<=U?(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)<=U?(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)<U?(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 y5(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<=U?(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)<U?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)<=U){if(s<=U)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*hs(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<=U?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*hs(this.e,Math.tan(.5*(R+r)));return i.x=t,i.y=e,i}var x5=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];const b5={init:v5,forward:_5,inverse:y5,names:x5,ssfn_:p5};function k5(){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 w5(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 M5(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 C5=["somerc"];const E5={init:k5,forward:w5,inverse:M5,names:C5};var er=1e-7;function S5(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 T5(){var i,t,e,n,o,r,s,a,l,h,u=0,d,c=0,f=0,g=0,m=0,p=0,_=0;this.no_off=S5(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*ue),v||y)c=this.longc;else if(f=this.long1,m=this.lat1,g=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)>U?(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=f-g,i<-Math.pi?g-=ss:i>Math.pi&&(g+=ss),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))/(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 I5(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)>U){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)<U)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 z5(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)<U)l.x=0,l.y=a<0?-R:R;else{if(l.y=this.E/Math.sqrt((1+a)/(1-a)),l.y=hs(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 R5=["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 A5={init:T5,forward:I5,inverse:z5,names:R5};function P5(){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)<U)){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)>U?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 L5(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=U&&(e=ls(e)*(R-2*U));var n=Math.abs(Math.abs(e)-R),o,r;if(n>U)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 D5(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=hs(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 O5=["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 F5={init:P5,forward:L5,inverse:D5,names:O5};function N5(){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 G5(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 j5(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 B5=["Krovak","krovak"];const U5={init:N5,forward:G5,inverse:j5,names:B5};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 cs(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function fs(i){return .375*i*(1+.25*i*(1+.46875*i))}function gs(i){return .05859375*i*i*(1+.75*i)}function ms(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-ls(i)*Math.PI}function ol(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 W5(){this.sphere||(this.e0=cs(this.es),this.e1=fs(this.es),this.e2=gs(this.es),this.e3=ms(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0))}function V5(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 X5(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=ol(s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-R)<=U)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 q5={init:W5,forward:V5,inverse:X5,names:Y5};function Sn(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 $5=1,Z5=2,K5=3,H5=4;function Q5(){var i=Math.abs(this.lat0);if(Math.abs(i-R)<U?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<U?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=Sn(this.e,1),this.mmf=.5/(1-this.es),this.apa=aM(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=Sn(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 J5(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<=U)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)<U)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=Sn(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)<U)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 tM(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)<=U?0:Math.asin(e*c/d),t*=c,e=u*d;break;case this.OBLIQ:o=Math.abs(d)<=U?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<U)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=lM(Math.asin(h),this.apa)}return i.x=X(this.long0+n),i.y=o,i}var eM=.3333333333333333,iM=.17222222222222222,nM=.10257936507936508,oM=.06388888888888888,rM=.0664021164021164,sM=.016415012942191543;function aM(i){var t,e=[];return e[0]=i*eM,t=i*i,e[0]+=t*iM,e[1]=t*oM,t*=i,e[0]+=t*nM,e[1]+=t*rM,e[2]=t*sM,e}function lM(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 hM=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const uM={init:Q5,forward:J5,inverse:tM,names:hM,S_POLE:$5,N_POLE:Z5,EQUIT:K5,OBLIQ:H5};function Tn(i){return Math.abs(i)>1&&(i=i>1?1:-1),Math.asin(i)}function dM(){Math.abs(this.lat1+this.lat2)<U||(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=Sn(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=Sn(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=Sn(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>U?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 cM(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=Sn(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 fM(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 gM(i,t){var e,n,o,r,s,a=Tn(.5*t);if(i<U)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 mM=["Albers_Conic_Equal_Area","Albers","aea"];const pM={init:dM,forward:cM,inverse:fM,names:mM,phi1z:gM};function vM(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function _M(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)<=U?(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 yM(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=Tn(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 xM=["gnom"];const bM={init:vM,forward:_M,inverse:yM,names:xM};function kM(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 wM(){this.sphere||(this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function MM(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=Sn(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 CM(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=kM(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 EM=["cea"];const SM={init:wM,forward:MM,inverse:CM,names:EM};function TM(){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 IM(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 zM(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 RM=["Equirectangular","Equidistant_Cylindrical","eqc"];const AM={init:TM,forward:IM,inverse:zM,names:RM};var np=20;function PM(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=cs(this.es),this.e1=fs(this.es),this.e2=gs(this.es),this.e3=ms(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0)}function LM(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)<=U?(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)<=U)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 DM(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)<=U)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=np;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)<=U){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)<=U)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,f,g,m;for(r=np;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),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)<=U){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 OM=["Polyconic","poly"];const FM={init:PM,forward:LM,inverse:DM,names:OM};function NM(){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 GM(i){var t,e=i.x,n=i.y,o=n-this.lat0,r=e-this.long0,s=o/rs*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,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 jM(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,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 C=k*k+w*w;c=(y*k+x*w)/C,f=(x*k-y*w)/C}var M=c,S=f,z=1,P=0;for(t=1;t<=9;t++)z=z*M,P=P+this.D[t]*z;var j=this.lat0+P*rs*1e5,A=this.long0+S;return i.x=A,i.y=j,i}var BM=["New_Zealand_Map_Grid","nzmg"];const UM={init:NM,forward:GM,inverse:jM,names:BM};function WM(){}function VM(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 XM(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 qM={init:WM,forward:VM,inverse:XM,names:YM};var $M=20;function ZM(){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=Jm(this.es)}function KM(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=$M;s;--s){var a=(this.m*o+Math.sin(o)-r)/(this.m+Math.cos(o));if(o-=a,Math.abs(a)<U)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*el(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 HM(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=Tn((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Tn(Math.sin(t)/this.n)),n=X(n+this.long0),t=nr(t)):(t=tp(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-U<R&&(n=this.long0)),i.x=n,i.y=t,i}var QM=["Sinusoidal","sinu"];const JM={init:ZM,forward:KM,inverse:HM,names:QM};function tC(){}function eC(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)<U)break}o/=2,Math.PI/2-Math.abs(e)<U&&(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 iC(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 nC=["Mollweide","moll"];const oC={init:tC,forward:eC,inverse:iC,names:nC};function rC(){Math.abs(this.lat1+this.lat2)<U||(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=cs(this.es),this.e1=fs(this.es),this.e2=gs(this.es),this.e3=ms(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)<U?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 sC(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 aC(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=ol(s,this.e0,this.e1,this.e2,this.e3),o=X(this.long0+r/this.ns),i.x=o,i.y=n,i}var lC=["Equidistant_Conic","eqdc"];const hC={init:rC,forward:sC,inverse:aC,names:lC};function uC(){this.R=this.a}function dC(i){var t=i.x,e=i.y,n=X(t-this.long0),o,r;Math.abs(e)<=U&&(o=this.x0+this.R*n,r=this.y0);var s=Tn(2*Math.abs(e/Math.PI));(Math.abs(n)<=U||Math.abs(Math.abs(e)-R)<=U)&&(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,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),o=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?r=this.y0+m:r=this.y0-m,i.x=o,i.y=r,i}function cC(i){var t,e,n,o,r,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,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,f=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*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)<U?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 fC=["Van_der_Grinten_I","VanDerGrinten","vandg"];const gC={init:uC,forward:dC,inverse:cC,names:fC};function mC(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function pC(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,f,g,m,p,_,v,y,x,k,w,C,M,S,z,P,j;return this.sphere?Math.abs(this.sin_p12-1)<=U?(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)<=U?(i.x=this.x0+this.a*(R+e)*Math.sin(r),i.y=this.y0+this.a*(R+e)*Math.cos(r),i):(C=this.sin_p12*n+this.cos_p12*o*Math.cos(r),k=Math.acos(C),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=cs(this.es),a=fs(this.es),l=gs(this.es),h=ms(this.es),Math.abs(this.sin_p12-1)<=U?(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)<=U?(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,f=ir(this.a,this.e,this.sin_p12),g=ir(this.a,this.e,n),m=Math.atan((1-this.es)*c+this.es*f*this.sin_p12/(g*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)<=U?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,j=P*M,k=f*M*(1-S*x*(1-x)/6+z/8*y*(1-2*x)+P/120*(x*(4-7*x)-3*_*_*(1-7*x))-j/48*y),i.x=this.x0+k*Math.sin(p),i.y=this.y0+k*Math.cos(p),i))}function vC(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,o,r,s,a,l,h,u,d,c,f,g,m,p,_,v,y,x,k,w,C,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)<=U?s=this.lat0:(s=Tn(o*this.sin_p12+i.y*n*this.cos_p12/t),a=Math.abs(this.lat0)-R,Math.abs(a)<=U?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=cs(this.es),h=fs(this.es),u=gs(this.es),d=ms(this.es),Math.abs(this.sin_p12-1)<=U?(c=this.a*Te(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),f=c-t,s=ol(f/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)<=U?(c=this.a*Te(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),f=t-c,s=ol(f/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),g=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/g,w=k-y*(1+y)*Math.pow(k,3)/6-x*(1+3*y)*Math.pow(k,4)/24,C=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*C*this.sin_p12)*Math.tan(m),M*(1-this.es)),i.x=r,i.y=s,i))}var _C=["Azimuthal_Equidistant","aeqd"];const yC={init:mC,forward:pC,inverse:vC,names:_C};function xC(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function bC(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)<=U)&&(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 kC(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=Tn(t/this.a),n=Math.sin(e),o=Math.cos(e),s=this.long0,Math.abs(t)<=U?(a=this.lat0,i.x=s,i.y=a,i):(a=Tn(o*this.sin_p14+i.y*n*this.cos_p14/t),r=Math.abs(this.lat0)-R,Math.abs(r)<=U?(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 wC=["ortho"];const MC={init:xC,forward:bC,inverse:kC,names:wC};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 CC(){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 EC(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-Kt:n+Kt):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+Kt:-n-Kt);else{var h,u,d,c,f,g,m;this.face===Xt.RIGHT?n=or(n,+R):this.face===Xt.BACK?n=or(n,+Kt):this.face===Xt.LEFT&&(n=or(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?(r=Math.acos(h),o=rl(r,d,u,l)):this.face===Xt.RIGHT?(r=Math.acos(u),o=rl(r,d,-h,l)):this.face===Xt.BACK?(r=Math.acos(-h),o=rl(r,d,-u,l)):this.face===Xt.LEFT?(r=Math.acos(-u),o=rl(r,d,h,l)):(r=o=0,l.value=At.AREA_0)}return a=Math.atan(12/Kt*(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+=Kt:l.value===At.AREA_3&&(a+=1.5*Kt),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 SC(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+Kt:e-Kt):(d.value=At.AREA_3,e+=R),u=Kt/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+Kt:a-Kt: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-Kt:-a+Kt;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===At.AREA_1?(u=f,f=-g,g=u):d.value===At.AREA_2?(f=-f,g=-g):d.value===At.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=or(t.lam,-R):this.face===Xt.BACK?t.lam=or(t.lam,-Kt):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 rl(i,t,e,n){var o;return i<U?(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-Kt:o+Kt):(n.value=At.AREA_3,o+=R)),o}function or(i,t){var e=i+t;return e<-Kt?e+=ss:e>+Kt&&(e-=ss),e}var TC=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const IC={init:CC,forward:EC,inverse:SC,names:TC};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]],ps=[[-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]],op=.8487,rp=1.3523,sp=vi/5,zC=1/sp,rr=18,sl=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},RC=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function AC(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 PC(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function LC(i){var t=X(i.x-this.long0),e=Math.abs(i.y),n=Math.floor(e*sp);n<0?n=0:n>=rr&&(n=rr-1),e=vi*(e-zC*n);var o={x:sl(rd[n],e)*t,y:sl(ps[n],e)};return i.y<0&&(o.y=-o.y),o.x=o.x*this.a*op+this.x0,o.y=o.y*this.a*rp+this.y0,o}function DC(i){var t={x:(i.x-this.x0)/(this.a*op),y:Math.abs(i.y-this.y0)/(this.a*rp)};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(ps[e][0]>t.y)--e;else if(ps[e+1][0]<=t.y)++e;else break;var n=ps[e],o=5*(t.y-n[0])/(ps[e+1][0]-n[0]);o=AC(function(r){return(sl(n,r)-t.y)/RC(n,r)},o,U,100),t.x/=sl(rd[e],o),t.y=(5*e+o)*ue,i.y<0&&(t.y=-t.y)}return t.x=X(t.x+this.long0),t}var OC=["Robinson","robin"];const FC={init:PC,forward:LC,inverse:DC,names:OC};function NC(){this.name="geocent"}function GC(i){var t=Pm(i,this.es,this.a);return t}function jC(i){var t=Lm(i,this.es,this.a,this.b);return t}var BC=["Geocentric","geocentric","geocent","Geocent"];const UC={init:NC,forward:GC,inverse:jC,names:BC};var pe={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},vs={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 WC(){if(Object.keys(vs).forEach(function(e){if(typeof this[e]>"u")this[e]=vs[e].def;else{if(vs[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);vs[e].num&&(this[e]=parseFloat(this[e]))}vs[e].degrees&&(this[e]=this[e]*ue)}.bind(this)),Math.abs(Math.abs(this.lat0)-R)<U?this.mode=this.lat0<0?pe.S_POLE:pe.N_POLE:Math.abs(this.lat0)<U?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 VC(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 XC(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)<U)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 qC={init:WC,forward:VC,inverse:XC,names:YC};function $C(){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 ZC(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 KC(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 HC=["Geostationary Satellite View","Geostationary_Satellite","geos"];const QC={init:$C,forward:ZC,inverse:KC,names:HC};function JC(i){i.Proj.projections.add(il),i.Proj.projections.add(nl),i.Proj.projections.add(r5),i.Proj.projections.add(m5),i.Proj.projections.add(b5),i.Proj.projections.add(E5),i.Proj.projections.add(A5),i.Proj.projections.add(F5),i.Proj.projections.add(U5),i.Proj.projections.add(q5),i.Proj.projections.add(uM),i.Proj.projections.add(pM),i.Proj.projections.add(bM),i.Proj.projections.add(SM),i.Proj.projections.add(AM),i.Proj.projections.add(FM),i.Proj.projections.add(UM),i.Proj.projections.add(qM),i.Proj.projections.add(JM),i.Proj.projections.add(oC),i.Proj.projections.add(hC),i.Proj.projections.add(gC),i.Proj.projections.add(yC),i.Proj.projections.add(MC),i.Proj.projections.add(IC),i.Proj.projections.add(FC),i.Proj.projections.add(UC),i.Proj.projections.add(qC),i.Proj.projections.add(QC)}De.defaultDatum="WGS84",De.Proj=yi,De.WGS84=new De.Proj("WGS84"),De.Point=tr,De.toPoint=Nm,De.defs=Se,De.nadgrid=a2,De.transform=tl,De.mgrs=w2,De.version="__VERSION__",JC(De),De.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"),kw(De);const ap=Gt("EPSG:27700"),tE=`: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}.ol-scale-line{background-color:transparent}.ol-scale-line-inner{border:.2em solid #2c2c2c;border-top:none;color:#2c2c2c;font-size:1em;font-family:inherit}.reset-control{top:114px;left:.5em}.reset-control img{width:30px;height:auto}.north-arrow-control img{width:54px;height:auto}.north-arrow-control{top:.5em;right:.5em;border-radius:0!important;background-color:transparent!important}#area{position:absolute;bottom:0;left:0;z-index:100;background:white}
44
- `;var lp=Object.freeze,hp=Object.defineProperty,eE=Object.getOwnPropertyDescriptor,ut=(i,t,e,n)=>{for(var o=n>1?void 0:n?eE(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&&hp(t,e,o),o},iE=(i,t)=>lp(hp(i,"raw",{value:lp(t||i.slice())})),up;N.MyMap=class extends Pn{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.drawType="Polygon",this.drawPointColor="#2c2c2c",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="#2c2c2c",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=`© Crown copyright and database rights ${new Date().getFullYear()} OS (0)100024857`,this.osProxyEndpoint="",this.hideResetControl=!1,this.resetControlImage="unicode",this.staticMode=!1,this.areaUnit="m2",this.showScale=!1,this.useScaleBarStyle=!1,this.showNorthArrow=!1,this.dispatch=(t,e)=>this.dispatchEvent(new CustomEvent(t,{detail:e}))}firstUpdated(){var y;const t=this.renderRoot.querySelector(`#${this.id}`),e=_w(this.osVectorTilesApiKey,this.osProxyEndpoint,this.osCopyright),n=bw(this.osVectorTilesApiKey,this.osProxyEndpoint,this.osCopyright),o=!this.disableVectorTiles&&Boolean(n),r=this.projection==="EPSG:27700"&&Boolean(ap)?ap:this.projection,s=Ys([this.longitude,this.latitude],r,"EPSG:3857"),a=new N_({target:t,layers:[o?n:e],view:new en({projection:"EPSG:3857",extent:U0([-10.76418,49.528423,1.9134116,61.331151],"EPSG:4326","EPSG:3857"),minZoom:this.minZoom,maxZoom:this.maxZoom,center:s,zoom:this.zoom,enableRotation:!1}),controls:$c({attribution:!0,zoom:!this.staticMode,rotate:!1}),interactions:tf({doubleClickZoom:!this.staticMode,dragPan:!this.staticMode,mouseWheelZoom:!this.staticMode})});this.map=a,window.olMap={}.VITEST?this.map:void 0;const l=jk(this.drawType,this.drawPointer,this.drawPointColor),h=Bk(this.drawPointer);this.showScale&&a.addControl(Sk(this.useScaleBarStyle)),this.showNorthArrow&&a.addControl(Tk());const u=()=>{this.showFeaturesAtPoint?os(a,pi,this.featureBuffer):c.getFeatures().length>0?os(a,c,this.geojsonBuffer):(a.getView().setCenter(s),a.getView().setZoom(this.zoom)),this.drawMode&&(Di.clear(),this.dispatch("geojsonChange",{}),this.drawType==="Polygon"&&this.dispatch("areaChange",`0 ${this.areaUnit==="m2"?"m²":this.areaUnit}`),a.addInteraction(l),a.addInteraction(nm))};this.hideResetControl||a.addControl(Ik(u,this.resetControlImage));const d=(y=this.renderRoot)==null?void 0:y.querySelectorAll(".ol-control button");d==null||d.forEach(x=>x.setAttribute("aria-label",x.getAttribute("title")||"")),a.on("pointerdrag",()=>{a.getViewport().style.cursor="grabbing"}),a.on("pointermove",()=>{a.getViewport().style.cursor="grab"});const c=new un;if(this.geojsonData.type==="FeatureCollection"){let x=new Hn().readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});c.addFeatures(x)}else if(this.geojsonData.type==="Feature"){let x=new Hn().readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});c.addFeature(x)}const f=new Jn({source:c,style:new te({stroke:new ke({color:this.geojsonColor,width:3}),fill:new se({color:this.geojsonFill?qa(this.geojsonColor,.2):qa(this.geojsonColor,0)})})});if(a.addLayer(f),c.getFeatures().length>0){os(a,c,this.geojsonBuffer);const x=c.getFeatures()[0].getGeometry();x&&this.dispatch("geojsonDataArea",$u(x,this.areaUnit))}const g=Gk(this.drawType,this.drawPointColor);if(this.drawMode){Di.clear();const x=Object.keys(this.drawGeojsonData.geometry).length>0;if(x){let k=new Hn().readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});Di.addFeature(k),os(a,Di,this.drawGeojsonDataBuffer)}a.addLayer(g),x||a.addInteraction(l),a.addInteraction(h),a.addInteraction(nm),Di.on("change",()=>{var w;const k=Di.getFeatures();if(k.length>0){const C=(w=Mk(k))==null?void 0:w.getGeometry();this.dispatch("geojsonChange",new Hn().writeFeaturesObject(k,{featureProjection:"EPSG:3857"})),C&&this.drawType==="Polygon"&&this.dispatch("areaChange",$u(C,this.areaUnit)),a.removeInteraction(l)}})}if(this.drawMode&&this.drawType==="Polygon"&&o&&n){a.addLayer(zk),g.setZIndex(1001);const k=()=>{Va.clear();const w=a.getView().getZoom();if(w&&w>=20){const C=a.getView().calculateExtent(a.getSize());Rk(n,C)}};a.on("loadend",k),a.on("moveend",()=>{var C;((C=n.getSource())==null?void 0:C.getState())==="ready"&&setTimeout(k,200)})}if(this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey||this.osProxyEndpoint)){ym(s,this.osFeaturesApiKey,this.osProxyEndpoint,!1),this.clickFeatures&&a.on("singleclick",k=>{ym(k.coordinate,this.osFeaturesApiKey,this.osProxyEndpoint,!0)});const x=vw(this.featureColor,this.featureFill,this.featureBorderNone);a.addLayer(x),pi.on("change",()=>{if(pi.getState()==="ready"&&pi.getFeatures().length>0){os(a,pi,this.featureBuffer),this.dispatch("featuresGeojsonChange",new Hn().writeFeaturesObject(pi.getFeatures(),{featureProjection:"EPSG:3857"}));const k=pi.getFeatures()[0].getGeometry();k&&this.dispatch("featuresAreaChange",$u(k,this.areaUnit))}})}const p=new on({radius:9,fill:new se({color:this.markerColor})}),_=new fa({src:Uk,scale:.5}),v=()=>{switch(this.markerImage){case"circle":return p;case"pin":return _}};if(this.showMarker){const x=new ni(Ys([this.markerLongitude,this.markerLatitude],r,"EPSG:3857")),k=new Jn({source:new un({features:[new Ti(x)]}),style:new te({image:v()})});a.addLayer(k)}setTimeout(()=>{window.dispatchEvent(new Event("resize")),t.style.opacity="1",this.dispatch("ready")},500)}render(){return Bi(up||(up=iE([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
43
+ 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(r,r+c),f=parseFloat(p)*m,_=i.substring(r+c),g=parseFloat(_)*m),v=f+h,y=g+u,{easting:v,northing:y,zoneLetter:a,zoneNumber:s,accuracy:m}}function R2(i,t){for(var e=Vm.charCodeAt(t-1),n=1e5,o=!1;e!==i.charCodeAt(0);){if(e++,e===Oe&&e++,e===Qe&&e++,e>ds){if(o)throw"Bad character: "+i;e=Jo,o=!0}n+=1e5}return n}function A2(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=Xm.charCodeAt(t-1),n=0,o=!1;e!==i.charCodeAt(0);){if(e++,e===Oe&&e++,e===Qe&&e++,e>us){if(o)throw"Bad character: "+i;e=Jo,o=!0}n+=1e5}return n}function P2(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(qm(i))},tr.prototype.toMGRS=function(i){return Ym([this.x,this.y],i)};var L2=1,D2=.25,Hm=.046875,Qm=.01953125,Jm=.01068115234375,O2=.75,F2=.46875,N2=.013020833333333334,G2=.007120768229166667,j2=.3645833333333333,B2=.005696614583333333,U2=.3076171875;function tp(i){var t=[];t[0]=L2-i*(D2+i*(Hm+i*(Qm+i*Jm))),t[1]=i*(O2-i*(Hm+i*(Qm+i*Jm)));var e=i*i;return t[2]=e*(F2-i*(N2+i*G2)),e*=i,t[3]=e*(j2-i*B2),t[4]=e*i*U2,t}function il(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 W2=20;function ep(i,t,e){for(var n=1/(1-t),o=i,r=W2;r;--r){var s=Math.sin(o),a=1-t*s*s;if(a=(il(o,s,Math.cos(o),e)-i)*(a*Math.sqrt(a))*n,o-=a,Math.abs(a)<U)return o}return o}function V2(){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=tp(this.es),this.ml0=il(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function X2(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),f=Math.pow(c,2),g=Math.abs(l)>U?Math.tan(e):0,m=Math.pow(g,2),p=Math.pow(m,2);o=1-this.es*Math.pow(a,2),u=u/Math.sqrt(o);var _=il(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*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)<U)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>U)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 Y2(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=ep(t,this.es,this.en),Math.abs(e)<R){var d=Math.sin(e),c=Math.cos(e),f=Math.abs(c)>U?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=r*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)))),o=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*ls(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 q2=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const nl={init:V2,forward:X2,inverse:Y2,names:q2};function ip(i){var t=Math.exp(i);return t=(t-1/t)/2,t}function li(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 $2(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function Z2(i){var t=Math.abs(i);return t=$2(t*(1+t/(li(1,t)+1))),i<0?-t:t}function nd(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 K2(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 H2(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function np(i,t,e){for(var n=Math.sin(t),o=Math.cos(t),r=ip(e),s=H2(e),a=2*o*s,l=-2*n*r,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=o*r,[a*u-l*f,a*f+l*u]}function Q2(){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&&(nl.init.apply(this),this.forward=nl.forward,this.inverse=nl.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=nd(this.cbg,this.lat0);this.Zb=-this.Qn*(n+K2(this.gtu,2*n))}function J2(i){var t=X(i.x-this.long0),e=i.y;e=nd(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,li(n,o*s)),t=Z2(Math.tan(t));var a=np(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 t5(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=np(this.utg,2*e,2*t);e=e+r[0],t=t+r[1],t=Math.atan(ip(t));var s=Math.sin(e),a=Math.cos(e),l=Math.sin(t),h=Math.cos(t);e=Math.atan2(s*h,li(l,h*a)),t=Math.atan2(l,h*a),n=X(t+this.long0),o=nd(this.cgb,e)}else n=1/0,o=1/0;return i.x=n,i.y=o,i}var e5=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"];const ol={init:Q2,forward:J2,inverse:t5,names:e5};function i5(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 n5="etmerc";function o5(){var i=i5(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*ue,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,ol.init.apply(this),this.forward=ol.forward,this.inverse=ol.inverse}var r5=["Universal Transverse Mercator System","utm"];const s5={init:o5,names:r5,dependsOn:n5};function od(i,t){return Math.pow((1-i)/(1+i),t)}var a5=20;function l5(){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)*od(this.e*i,this.ratexp))}function h5(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)*od(this.e*Math.sin(e),this.ratexp))-R,i.x=this.C*t,i}function u5(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=a5;r>0&&(n=2*Math.atan(o*od(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 d5=["gauss"];const rd={init:l5,forward:h5,inverse:u5,names:d5};function c5(){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 f5(i){var t,e,n,o;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),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 g5(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,rd.inverse.apply(this,[i]),i.x=X(i.x+this.long0),i}var m5=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const p5={init:c5,forward:f5,inverse:g5,names:m5};function v5(i,t,e){return t*=e,Math.tan(.5*(R+i))*Math.pow((1-t)/(1+t),.5*e)}function _5(){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)<=U&&(this.k0=.5*(1+ls(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=U&&(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)<=U&&(this.k0=.5*this.cons*_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/ai(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 y5(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)<=U&&Math.abs(e+this.lat0)<=U?(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)<=U?(h=ai(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)<U?(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 x5(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<=U?(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)<U?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)<=U){if(s<=U)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*hs(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<=U?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*hs(this.e,Math.tan(.5*(R+r)));return i.x=t,i.y=e,i}var b5=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];const k5={init:_5,forward:y5,inverse:x5,names:b5,ssfn_:v5};function w5(){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 M5(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 C5(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 E5=["somerc"];const S5={init:w5,forward:M5,inverse:C5,names:E5};var er=1e-7;function T5(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 I5(){var i,t,e,n,o,r,s,a,l,h,u=0,d,c=0,f=0,g=0,m=0,p=0,_=0;this.no_off=T5(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*ue),v||y)c=this.longc;else if(f=this.long1,m=this.lat1,g=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)>U?(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(ai(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(ai(this.e,m,Math.sin(m)),this.B),s=Math.pow(ai(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=f-g,i<-Math.pi?g-=ss:i>Math.pi&&(g+=ss),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))/(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 z5(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)>U){if(s=this.E/Math.pow(ai(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)<U)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 R5(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)<U)l.x=0,l.y=a<0?-R:R;else{if(l.y=this.E/Math.sqrt((1+a)/(1-a)),l.y=hs(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 A5=["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 P5={init:I5,forward:z5,inverse:R5,names:A5};function L5(){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)<U)){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=ai(this.e,this.lat1,t),r=Math.sin(this.lat2),s=Math.cos(this.lat2),a=_i(this.e,r,s),l=ai(this.e,this.lat2,r),h=ai(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>U?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 D5(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=U&&(e=ls(e)*(R-2*U));var n=Math.abs(Math.abs(e)-R),o,r;if(n>U)o=ai(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 O5(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=hs(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 F5=["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 N5={init:L5,forward:D5,inverse:O5,names:F5};function G5(){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 j5(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 B5(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 U5=["Krovak","krovak"];const W5={init:G5,forward:j5,inverse:B5,names:U5};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 cs(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function fs(i){return .375*i*(1+.25*i*(1+.46875*i))}function gs(i){return .05859375*i*i*(1+.75*i)}function ms(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-ls(i)*Math.PI}function rl(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 V5(){this.sphere||(this.e0=cs(this.es),this.e1=fs(this.es),this.e2=gs(this.es),this.e3=ms(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0))}function X5(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 Y5(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=rl(s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-R)<=U)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 q5=["Cassini","Cassini_Soldner","cass"];const $5={init:V5,forward:X5,inverse:Y5,names:q5};function Sn(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 Z5=1,K5=2,H5=3,Q5=4;function J5(){var i=Math.abs(this.lat0);if(Math.abs(i-R)<U?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<U?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=Sn(this.e,1),this.mmf=.5/(1-this.es),this.apa=lM(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=Sn(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 tM(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<=U)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)<U)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=Sn(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)<U)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 eM(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)<=U?0:Math.asin(e*c/d),t*=c,e=u*d;break;case this.OBLIQ:o=Math.abs(d)<=U?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<U)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=hM(Math.asin(h),this.apa)}return i.x=X(this.long0+n),i.y=o,i}var iM=.3333333333333333,nM=.17222222222222222,oM=.10257936507936508,rM=.06388888888888888,sM=.0664021164021164,aM=.016415012942191543;function lM(i){var t,e=[];return e[0]=i*iM,t=i*i,e[0]+=t*nM,e[1]=t*rM,t*=i,e[0]+=t*oM,e[1]+=t*sM,e[2]=t*aM,e}function hM(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 uM=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const dM={init:J5,forward:tM,inverse:eM,names:uM,S_POLE:Z5,N_POLE:K5,EQUIT:H5,OBLIQ:Q5};function Tn(i){return Math.abs(i)>1&&(i=i>1?1:-1),Math.asin(i)}function cM(){Math.abs(this.lat1+this.lat2)<U||(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=Sn(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=Sn(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=Sn(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>U?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 fM(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=Sn(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 gM(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 mM(i,t){var e,n,o,r,s,a=Tn(.5*t);if(i<U)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 pM=["Albers_Conic_Equal_Area","Albers","aea"];const vM={init:cM,forward:fM,inverse:gM,names:pM,phi1z:mM};function _M(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function yM(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)<=U?(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 xM(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=Tn(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 bM=["gnom"];const kM={init:_M,forward:yM,inverse:xM,names:bM};function wM(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 MM(){this.sphere||(this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function CM(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=Sn(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 EM(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=wM(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 SM=["cea"];const TM={init:MM,forward:CM,inverse:EM,names:SM};function IM(){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 zM(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 RM(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 AM=["Equirectangular","Equidistant_Cylindrical","eqc"];const PM={init:IM,forward:zM,inverse:RM,names:AM};var op=20;function LM(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=cs(this.es),this.e1=fs(this.es),this.e2=gs(this.es),this.e3=ms(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0)}function DM(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)<=U?(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)<=U)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 OM(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)<=U)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=op;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)<=U){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)<=U)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,f,g,m;for(r=op;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),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)<=U){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 FM=["Polyconic","poly"];const NM={init:LM,forward:DM,inverse:OM,names:FM};function GM(){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 jM(i){var t,e=i.x,n=i.y,o=n-this.lat0,r=e-this.long0,s=o/rs*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,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 BM(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,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 C=k*k+w*w;c=(y*k+x*w)/C,f=(x*k-y*w)/C}var M=c,S=f,z=1,P=0;for(t=1;t<=9;t++)z=z*M,P=P+this.D[t]*z;var j=this.lat0+P*rs*1e5,A=this.long0+S;return i.x=A,i.y=j,i}var UM=["New_Zealand_Map_Grid","nzmg"];const WM={init:GM,forward:jM,inverse:BM,names:UM};function VM(){}function XM(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 YM(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 qM=["Miller_Cylindrical","mill"];const $M={init:VM,forward:XM,inverse:YM,names:qM};var ZM=20;function KM(){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=tp(this.es)}function HM(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=ZM;s;--s){var a=(this.m*o+Math.sin(o)-r)/(this.m+Math.cos(o));if(o-=a,Math.abs(a)<U)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*il(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 QM(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=Tn((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Tn(Math.sin(t)/this.n)),n=X(n+this.long0),t=nr(t)):(t=ep(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-U<R&&(n=this.long0)),i.x=n,i.y=t,i}var JM=["Sinusoidal","sinu"];const tC={init:KM,forward:HM,inverse:QM,names:JM};function eC(){}function iC(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)<U)break}o/=2,Math.PI/2-Math.abs(e)<U&&(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 nC(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 oC=["Mollweide","moll"];const rC={init:eC,forward:iC,inverse:nC,names:oC};function sC(){Math.abs(this.lat1+this.lat2)<U||(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=cs(this.es),this.e1=fs(this.es),this.e2=gs(this.es),this.e3=ms(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)<U?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 aC(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 lC(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=rl(s,this.e0,this.e1,this.e2,this.e3),o=X(this.long0+r/this.ns),i.x=o,i.y=n,i}var hC=["Equidistant_Conic","eqdc"];const uC={init:sC,forward:aC,inverse:lC,names:hC};function dC(){this.R=this.a}function cC(i){var t=i.x,e=i.y,n=X(t-this.long0),o,r;Math.abs(e)<=U&&(o=this.x0+this.R*n,r=this.y0);var s=Tn(2*Math.abs(e/Math.PI));(Math.abs(n)<=U||Math.abs(Math.abs(e)-R)<=U)&&(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,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),o=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?r=this.y0+m:r=this.y0-m,i.x=o,i.y=r,i}function fC(i){var t,e,n,o,r,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,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,f=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*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)<U?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 gC=["Van_der_Grinten_I","VanDerGrinten","vandg"];const mC={init:dC,forward:cC,inverse:fC,names:gC};function pC(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function vC(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,f,g,m,p,_,v,y,x,k,w,C,M,S,z,P,j;return this.sphere?Math.abs(this.sin_p12-1)<=U?(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)<=U?(i.x=this.x0+this.a*(R+e)*Math.sin(r),i.y=this.y0+this.a*(R+e)*Math.cos(r),i):(C=this.sin_p12*n+this.cos_p12*o*Math.cos(r),k=Math.acos(C),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=cs(this.es),a=fs(this.es),l=gs(this.es),h=ms(this.es),Math.abs(this.sin_p12-1)<=U?(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)<=U?(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,f=ir(this.a,this.e,this.sin_p12),g=ir(this.a,this.e,n),m=Math.atan((1-this.es)*c+this.es*f*this.sin_p12/(g*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)<=U?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,j=P*M,k=f*M*(1-S*x*(1-x)/6+z/8*y*(1-2*x)+P/120*(x*(4-7*x)-3*_*_*(1-7*x))-j/48*y),i.x=this.x0+k*Math.sin(p),i.y=this.y0+k*Math.cos(p),i))}function _C(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,o,r,s,a,l,h,u,d,c,f,g,m,p,_,v,y,x,k,w,C,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)<=U?s=this.lat0:(s=Tn(o*this.sin_p12+i.y*n*this.cos_p12/t),a=Math.abs(this.lat0)-R,Math.abs(a)<=U?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=cs(this.es),h=fs(this.es),u=gs(this.es),d=ms(this.es),Math.abs(this.sin_p12-1)<=U?(c=this.a*Te(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),f=c-t,s=rl(f/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)<=U?(c=this.a*Te(l,h,u,d,R),t=Math.sqrt(i.x*i.x+i.y*i.y),f=t-c,s=rl(f/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),g=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/g,w=k-y*(1+y)*Math.pow(k,3)/6-x*(1+3*y)*Math.pow(k,4)/24,C=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*C*this.sin_p12)*Math.tan(m),M*(1-this.es)),i.x=r,i.y=s,i))}var yC=["Azimuthal_Equidistant","aeqd"];const xC={init:pC,forward:vC,inverse:_C,names:yC};function bC(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function kC(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)<=U)&&(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 wC(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=Tn(t/this.a),n=Math.sin(e),o=Math.cos(e),s=this.long0,Math.abs(t)<=U?(a=this.lat0,i.x=s,i.y=a,i):(a=Tn(o*this.sin_p14+i.y*n*this.cos_p14/t),r=Math.abs(this.lat0)-R,Math.abs(r)<=U?(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 MC=["ortho"];const CC={init:bC,forward:kC,inverse:wC,names:MC};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 EC(){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 SC(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-Kt:n+Kt):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+Kt:-n-Kt);else{var h,u,d,c,f,g,m;this.face===Xt.RIGHT?n=or(n,+R):this.face===Xt.BACK?n=or(n,+Kt):this.face===Xt.LEFT&&(n=or(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?(r=Math.acos(h),o=sl(r,d,u,l)):this.face===Xt.RIGHT?(r=Math.acos(u),o=sl(r,d,-h,l)):this.face===Xt.BACK?(r=Math.acos(-h),o=sl(r,d,-u,l)):this.face===Xt.LEFT?(r=Math.acos(-u),o=sl(r,d,h,l)):(r=o=0,l.value=At.AREA_0)}return a=Math.atan(12/Kt*(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+=Kt:l.value===At.AREA_3&&(a+=1.5*Kt),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 TC(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+Kt:e-Kt):(d.value=At.AREA_3,e+=R),u=Kt/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+Kt:a-Kt: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-Kt:-a+Kt;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===At.AREA_1?(u=f,f=-g,g=u):d.value===At.AREA_2?(f=-f,g=-g):d.value===At.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=or(t.lam,-R):this.face===Xt.BACK?t.lam=or(t.lam,-Kt):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 sl(i,t,e,n){var o;return i<U?(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-Kt:o+Kt):(n.value=At.AREA_3,o+=R)),o}function or(i,t){var e=i+t;return e<-Kt?e+=ss:e>+Kt&&(e-=ss),e}var IC=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const zC={init:EC,forward:SC,inverse:TC,names:IC};var sd=[[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]],ps=[[-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]],rp=.8487,sp=1.3523,ap=vi/5,RC=1/ap,rr=18,al=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},AC=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function PC(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 LC(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function DC(i){var t=X(i.x-this.long0),e=Math.abs(i.y),n=Math.floor(e*ap);n<0?n=0:n>=rr&&(n=rr-1),e=vi*(e-RC*n);var o={x:al(sd[n],e)*t,y:al(ps[n],e)};return i.y<0&&(o.y=-o.y),o.x=o.x*this.a*rp+this.x0,o.y=o.y*this.a*sp+this.y0,o}function OC(i){var t={x:(i.x-this.x0)/(this.a*rp),y:Math.abs(i.y-this.y0)/(this.a*sp)};if(t.y>=1)t.x/=sd[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(ps[e][0]>t.y)--e;else if(ps[e+1][0]<=t.y)++e;else break;var n=ps[e],o=5*(t.y-n[0])/(ps[e+1][0]-n[0]);o=PC(function(r){return(al(n,r)-t.y)/AC(n,r)},o,U,100),t.x/=al(sd[e],o),t.y=(5*e+o)*ue,i.y<0&&(t.y=-t.y)}return t.x=X(t.x+this.long0),t}var FC=["Robinson","robin"];const NC={init:LC,forward:DC,inverse:OC,names:FC};function GC(){this.name="geocent"}function jC(i){var t=Lm(i,this.es,this.a);return t}function BC(i){var t=Dm(i,this.es,this.a,this.b);return t}var UC=["Geocentric","geocentric","geocent","Geocent"];const WC={init:GC,forward:jC,inverse:BC,names:UC};var pe={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},vs={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 VC(){if(Object.keys(vs).forEach(function(e){if(typeof this[e]>"u")this[e]=vs[e].def;else{if(vs[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);vs[e].num&&(this[e]=parseFloat(this[e]))}vs[e].degrees&&(this[e]=this[e]*ue)}.bind(this)),Math.abs(Math.abs(this.lat0)-R)<U?this.mode=this.lat0<0?pe.S_POLE:pe.N_POLE:Math.abs(this.lat0)<U?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 XC(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 YC(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=li(i.x,i.y);if(Math.abs(r)<U)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 qC=["Tilted_Perspective","tpers"];const $C={init:VC,forward:XC,inverse:YC,names:qC};function ZC(){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 KC(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/li(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/li(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/li(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/li(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/li(r,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function HC(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)*li(1,n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*li(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 QC=["Geostationary Satellite View","Geostationary_Satellite","geos"];const JC={init:ZC,forward:KC,inverse:HC,names:QC};function tE(i){i.Proj.projections.add(nl),i.Proj.projections.add(ol),i.Proj.projections.add(s5),i.Proj.projections.add(p5),i.Proj.projections.add(k5),i.Proj.projections.add(S5),i.Proj.projections.add(P5),i.Proj.projections.add(N5),i.Proj.projections.add(W5),i.Proj.projections.add($5),i.Proj.projections.add(dM),i.Proj.projections.add(vM),i.Proj.projections.add(kM),i.Proj.projections.add(TM),i.Proj.projections.add(PM),i.Proj.projections.add(NM),i.Proj.projections.add(WM),i.Proj.projections.add($M),i.Proj.projections.add(tC),i.Proj.projections.add(rC),i.Proj.projections.add(uC),i.Proj.projections.add(mC),i.Proj.projections.add(xC),i.Proj.projections.add(CC),i.Proj.projections.add(zC),i.Proj.projections.add(NC),i.Proj.projections.add(WC),i.Proj.projections.add($C),i.Proj.projections.add(JC)}De.defaultDatum="WGS84",De.Proj=yi,De.WGS84=new De.Proj("WGS84"),De.Point=tr,De.toPoint=Gm,De.defs=Se,De.nadgrid=l2,De.transform=el,De.mgrs=M2,De.version="__VERSION__",tE(De),De.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"),ww(De);const lp=Gt("EPSG:27700"),eE=`: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}.ol-scale-line{background-color:transparent}.ol-scale-line-inner{border:.2em solid #2c2c2c;border-top:none;color:#2c2c2c;font-size:1em;font-family:inherit}.ol-scale-bar-inner{display:flex}.reset-control{top:114px;left:.5em}.reset-control img{width:30px;height:auto}.north-arrow-control img{width:54px;height:auto}.north-arrow-control{top:.5em;right:.5em;border-radius:0!important;background-color:transparent!important}#area{position:absolute;bottom:0;left:0;z-index:100;background:white}
44
+ `;var hp=Object.freeze,up=Object.defineProperty,iE=Object.getOwnPropertyDescriptor,ut=(i,t,e,n)=>{for(var o=n>1?void 0:n?iE(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},nE=(i,t)=>hp(up(i,"raw",{value:hp(t||i.slice())})),dp;N.MyMap=class extends Pn{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.drawType="Polygon",this.drawPointColor="#2c2c2c",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="#2c2c2c",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=`© Crown copyright and database rights ${new Date().getFullYear()} OS (0)100024857`,this.osProxyEndpoint="",this.hideResetControl=!1,this.resetControlImage="unicode",this.staticMode=!1,this.areaUnit="m2",this.showScale=!1,this.useScaleBarStyle=!1,this.showNorthArrow=!1,this.dispatch=(t,e)=>this.dispatchEvent(new CustomEvent(t,{detail:e}))}firstUpdated(){var y;const t=this.renderRoot.querySelector(`#${this.id}`),e=yw(this.osVectorTilesApiKey,this.osProxyEndpoint,this.osCopyright),n=kw(this.osVectorTilesApiKey,this.osProxyEndpoint,this.osCopyright),o=!this.disableVectorTiles&&Boolean(n),r=this.projection==="EPSG:27700"&&Boolean(lp)?lp:this.projection,s=Ys([this.longitude,this.latitude],r,"EPSG:3857"),a=new G_({target:t,layers:[o?n:e],view:new nn({projection:"EPSG:3857",extent:W0([-10.76418,49.528423,1.9134116,61.331151],"EPSG:4326","EPSG:3857"),minZoom:this.minZoom,maxZoom:this.maxZoom,center:s,zoom:this.zoom,enableRotation:!1}),controls:Zc({attribution:!0,zoom:!this.staticMode,rotate:!1}),interactions:ef({doubleClickZoom:!this.staticMode,dragPan:!this.staticMode,mouseWheelZoom:!this.staticMode})});this.map=a,window.olMap={}.VITEST?this.map:void 0;const l=Bk(this.drawType,this.drawPointer,this.drawPointColor),h=Uk(this.drawPointer);this.showScale&&a.addControl(Tk(this.useScaleBarStyle)),this.showNorthArrow&&a.addControl(Ik());const u=()=>{this.showFeaturesAtPoint?os(a,si,this.featureBuffer):c.getFeatures().length>0?os(a,c,this.geojsonBuffer):(a.getView().setCenter(s),a.getView().setZoom(this.zoom)),this.drawMode&&(Oi.clear(),this.dispatch("geojsonChange",{}),this.drawType==="Polygon"&&this.dispatch("areaChange",`0 ${this.areaUnit==="m2"?"m²":this.areaUnit}`),a.addInteraction(l),a.addInteraction(om))};this.hideResetControl||a.addControl(zk(u,this.resetControlImage));const d=(y=this.renderRoot)==null?void 0:y.querySelectorAll(".ol-control button");d==null||d.forEach(x=>x.setAttribute("aria-label",x.getAttribute("title")||"")),a.on("pointerdrag",()=>{a.getViewport().style.cursor="grabbing"}),a.on("pointermove",()=>{a.getViewport().style.cursor="grab"});const c=new Ai;if(this.geojsonData.type==="FeatureCollection"){let x=new Po().readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});c.addFeatures(x)}else if(this.geojsonData.type==="Feature"){let x=new Po().readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});c.addFeature(x)}const f=new Qn({source:c,style:new te({stroke:new ke({color:this.geojsonColor,width:3}),fill:new se({color:this.geojsonFill?qa(this.geojsonColor,.2):qa(this.geojsonColor,0)})})});if(a.addLayer(f),c.getFeatures().length>0){os(a,c,this.geojsonBuffer);const x=c.getFeatures()[0].getGeometry();x&&this.dispatch("geojsonDataArea",Zu(x,this.areaUnit))}const g=jk(this.drawType,this.drawPointColor);if(this.drawMode){Oi.clear();const x=Object.keys(this.drawGeojsonData.geometry).length>0;if(x){let k=new Po().readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});Oi.addFeature(k),os(a,Oi,this.drawGeojsonDataBuffer)}a.addLayer(g),x||a.addInteraction(l),a.addInteraction(h),a.addInteraction(om),Oi.on("change",()=>{var w;const k=Oi.getFeatures();if(k.length>0){const C=(w=Ck(k))==null?void 0:w.getGeometry();this.dispatch("geojsonChange",{"EPSG:3857":$a(k,"EPSG:3857"),"EPSG:27700":$a(k,"EPSG:27700")}),C&&this.drawType==="Polygon"&&this.dispatch("areaChange",Zu(C,this.areaUnit)),a.removeInteraction(l)}})}if(this.drawMode&&this.drawType==="Polygon"&&o&&n){a.addLayer(Rk),g.setZIndex(1001);const k=()=>{Va.clear();const w=a.getView().getZoom();if(w&&w>=20){const C=a.getView().calculateExtent(a.getSize());Ak(n,C)}};a.on("loadend",k),a.on("moveend",()=>{var C;((C=n.getSource())==null?void 0:C.getState())==="ready"&&setTimeout(k,200)})}if(this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey||this.osProxyEndpoint)){xm(s,this.osFeaturesApiKey,this.osProxyEndpoint,!1),this.clickFeatures&&a.on("singleclick",k=>{xm(k.coordinate,this.osFeaturesApiKey,this.osProxyEndpoint,!0)});const x=_w(this.featureColor,this.featureFill,this.featureBorderNone);a.addLayer(x),si.on("change",()=>{if(si.getState()==="ready"&&si.getFeatures().length>0){os(a,si,this.featureBuffer),this.dispatch("featuresGeojsonChange",{"EPSG:3857":$a(si,"EPSG:3857"),"EPSG:27700":$a(si,"EPSG:27700")});const k=si.getFeatures()[0].getGeometry();k&&this.dispatch("featuresAreaChange",Zu(k,this.areaUnit))}})}const p=new rn({radius:9,fill:new se({color:this.markerColor})}),_=new fa({src:Wk,scale:.5}),v=()=>{switch(this.markerImage){case"circle":return p;case"pin":return _}};if(this.showMarker){const x=new ni(Ys([this.markerLongitude,this.markerLatitude],r,"EPSG:3857")),k=new Qn({source:new Ai({features:[new Ti(x)]}),style:new te({image:v()})});a.addLayer(k)}setTimeout(()=>{window.dispatchEvent(new Event("resize")),t.style.opacity="1",this.dispatch("ready")},500)}render(){return Ui(dp||(dp=nE([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
45
45
  <link rel="stylesheet" href="https://cdn.skypack.dev/ol@^6.6.1/ol.css" />
46
- <div id="`,'" class="map" tabindex="0" />'])),this.id)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.map)==null||t.dispose()}},N.MyMap.styles=Ss(tE),ut([Z({type:String})],N.MyMap.prototype,"id",2),ut([Z({type:Number})],N.MyMap.prototype,"latitude",2),ut([Z({type:Number})],N.MyMap.prototype,"longitude",2),ut([Z({type:String})],N.MyMap.prototype,"projection",2),ut([Z({type:Number})],N.MyMap.prototype,"zoom",2),ut([Z({type:Number})],N.MyMap.prototype,"minZoom",2),ut([Z({type:Number})],N.MyMap.prototype,"maxZoom",2),ut([Z({type:Boolean})],N.MyMap.prototype,"drawMode",2),ut([Z({type:String})],N.MyMap.prototype,"drawType",2),ut([Z({type:String})],N.MyMap.prototype,"drawPointColor",2),ut([Z({type:Object})],N.MyMap.prototype,"drawGeojsonData",2),ut([Z({type:Number})],N.MyMap.prototype,"drawGeojsonDataBuffer",2),ut([Z({type:String})],N.MyMap.prototype,"drawPointer",2),ut([Z({type:Boolean})],N.MyMap.prototype,"showFeaturesAtPoint",2),ut([Z({type:Boolean})],N.MyMap.prototype,"clickFeatures",2),ut([Z({type:String})],N.MyMap.prototype,"featureColor",2),ut([Z({type:Boolean})],N.MyMap.prototype,"featureFill",2),ut([Z({type:Boolean})],N.MyMap.prototype,"featureBorderNone",2),ut([Z({type:Number})],N.MyMap.prototype,"featureBuffer",2),ut([Z({type:Boolean})],N.MyMap.prototype,"showMarker",2),ut([Z({type:String})],N.MyMap.prototype,"markerImage",2),ut([Z({type:Number})],N.MyMap.prototype,"markerLatitude",2),ut([Z({type:Number})],N.MyMap.prototype,"markerLongitude",2),ut([Z({type:String})],N.MyMap.prototype,"markerColor",2),ut([Z({type:Object})],N.MyMap.prototype,"geojsonData",2),ut([Z({type:String})],N.MyMap.prototype,"geojsonColor",2),ut([Z({type:Boolean})],N.MyMap.prototype,"geojsonFill",2),ut([Z({type:Number})],N.MyMap.prototype,"geojsonBuffer",2),ut([Z({type:Boolean})],N.MyMap.prototype,"disableVectorTiles",2),ut([Z({type:String})],N.MyMap.prototype,"osVectorTilesApiKey",2),ut([Z({type:String})],N.MyMap.prototype,"osFeaturesApiKey",2),ut([Z({type:String})],N.MyMap.prototype,"osCopyright",2),ut([Z({type:String})],N.MyMap.prototype,"osProxyEndpoint",2),ut([Z({type:Boolean})],N.MyMap.prototype,"hideResetControl",2),ut([Z({type:String})],N.MyMap.prototype,"resetControlImage",2),ut([Z({type:Boolean})],N.MyMap.prototype,"staticMode",2),ut([Z({type:String})],N.MyMap.prototype,"areaUnit",2),ut([Z({type:Boolean})],N.MyMap.prototype,"showScale",2),ut([Z({type:Boolean})],N.MyMap.prototype,"useScaleBarStyle",2),ut([Z({type:Boolean})],N.MyMap.prototype,"showNorthArrow",2),N.MyMap=ut([_l("my-map")],N.MyMap);var dp={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,f,g){var m,p,_,v,y=c&d.F,x=c&d.G,k=c&d.S,w=c&d.P,C=c&d.B,M=x?r:k?r[f]||(r[f]={}):(r[f]||{})[u],S=x?s:s[f]||(s[f]={}),z=S[u]||(S[u]={});for(m in x&&(g=f),g)_=((p=!y&&M&&M[m]!==void 0)?M:g)[m],v=C&&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 V}),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 $,E,Q,Y,_t=l;for(Y=arguments.length;2<Y--;)a.push(arguments[Y]);for(T&&T.children!=null&&(a.length||a.push(T.children),delete T.children);a.length;)if((E=a.pop())&&E.pop!==void 0)for(Y=E.length;Y--;)a.push(E[Y]);else typeof E=="boolean"&&(E=null),(Q=typeof b!="function")&&(E==null?E="":typeof E=="number"?E=String(E):typeof E!="string"&&(Q=!1)),Q&&$?_t[_t.length-1]+=E:_t===l?_t=[E]:_t.push(E),$=Q;var Et=new r;return Et.nodeName=b,Et.children=_t,Et.attributes=T??void 0,Et.key=T==null?void 0:T.key,s.vnode!==void 0&&s.vnode(Et),Et}function u(b,T){for(var $ in T)b[$]=T[$];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&&L(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 $=b.nodeName.defaultProps;if($!==void 0)for(var E in $)T[E]===void 0&&(T[E]=$[E]);return T}function y(b){var T=b.parentNode;T&&T.removeChild(b)}function x(b,T,$,E,Q){if(T==="className"&&(T="class"),T!=="key")if(T==="ref")$&&$(null),E&&E(b);else if(T!=="class"||Q)if(T==="style"){if(E&&typeof E!="string"&&typeof $!="string"||(b.style.cssText=E||""),E&&typeof E=="object"){if(typeof $!="string")for(var Y in $)Y in E||(b.style[Y]="");for(var Y in E)b.style[Y]=typeof E[Y]=="number"&&f.test(Y)===!1?E[Y]+"px":E[Y]}}else if(T==="dangerouslySetInnerHTML")E&&(b.innerHTML=E.__html||"");else if(T[0]=="o"&&T[1]=="n"){var _t=T!==(T=T.replace(/Capture$/,""));T=T.toLowerCase().substring(2),E?$||b.addEventListener(T,k,_t):b.removeEventListener(T,k,_t),(b._listeners||(b._listeners={}))[T]=E}else if(T!=="list"&&T!=="type"&&!Q&&T in b){try{b[T]=E??""}catch{}E!=null&&E!==!1||T=="spellcheck"||b.removeAttribute(T)}else{var Et=Q&&T!==(T=T.replace(/^xlink:?/,""));E==null||E===!1?Et?b.removeAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase()):b.removeAttribute(T):typeof E!="function"&&(Et?b.setAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase(),E):b.setAttribute(T,E))}else b.className=E||""}function k(b){return this._listeners[b.type](s.event&&s.event(b)||b)}var w=[],C=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,$,E,Q,Y){C++||(M=Q!=null&&Q.ownerSVGElement!==void 0,S=b!=null&&!("__preactattr_"in b));var _t=j(b,T,$,E,Y);return Q&&_t.parentNode!==Q&&Q.appendChild(_t),--C||(S=!1,Y||z()),_t}function j(b,T,$,E,Q){var Y=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||Q)?b.nodeValue!=T&&(b.nodeValue=T):(Y=document.createTextNode(T),b&&(b.parentNode&&b.parentNode.replaceChild(Y,b),A(b,!0))),Y.__preactattr_=!0,Y;var Et=T.nodeName;if(typeof Et=="function")return function(dt,vt,kt,xt){for(var st=dt&&dt._component,nt=st,wt=dt,It=st&&dt._componentConstructor===vt.nodeName,Bt=It,bt=v(vt);st&&!Bt&&(st=st._parentComponent);)Bt=st.constructor===vt.nodeName;return st&&Bt&&(!xt||st._component)?(q(st,bt,3,kt,xt),dt=st.base):(nt&&!It&&(H(nt),dt=wt=null),st=W(vt.nodeName,bt,kt),dt&&!st.nextBase&&(st.nextBase=dt,wt=null),q(st,bt,1,kt,xt),dt=st.base,wt&&dt!==wt&&(wt._component=null,A(wt,!1))),dt}(b,T,$,E);if(M=Et==="svg"||Et!=="foreignObject"&&M,Et=String(Et),(!b||!_(b,Et))&&(Y=function(dt,vt){var kt=vt?document.createElementNS("http://www.w3.org/2000/svg",dt):document.createElement(dt);return kt.normalizedNodeName=dt,kt}(Et,M),b)){for(;b.firstChild;)Y.appendChild(b.firstChild);b.parentNode&&b.parentNode.replaceChild(Y,b),A(b,!0)}var yt=Y.firstChild,Ct=Y.__preactattr_,Dt=T.children;if(Ct==null){Ct=Y.__preactattr_={};for(var Lt=Y.attributes,jt=Lt.length;jt--;)Ct[Lt[jt].name]=Lt[jt].value}return!S&&Dt&&Dt.length===1&&typeof Dt[0]=="string"&&yt!=null&&yt.splitText!==void 0&&yt.nextSibling==null?yt.nodeValue!=Dt[0]&&(yt.nodeValue=Dt[0]):(Dt&&Dt.length||yt!=null)&&function(dt,vt,kt,xt,st){var nt,wt,It,Bt,bt,ct=dt.childNodes,Ot=[],St={},ft=0,de=0,We=ct.length,Yt=0,Ie=vt?vt.length:0;if(We!==0)for(var Ut=0;Ut<We;Ut++){var Ht=ct[Ut],In=Ht.__preactattr_,he=Ie&&In?Ht._component?Ht._component.__key:In.key:null;he!=null?(ft++,St[he]=Ht):(In||(Ht.splitText!==void 0?!st||Ht.nodeValue.trim():st))&&(Ot[Yt++]=Ht)}if(Ie!==0)for(var Ut=0;Ut<Ie;Ut++){Bt=vt[Ut],bt=null;var he=Bt.key;if(he!=null)ft&&St[he]!==void 0&&(bt=St[he],St[he]=void 0,ft--);else if(de<Yt){for(nt=de;nt<Yt;nt++)if(Ot[nt]!==void 0&&(Ve=wt=Ot[nt],Ne=st,typeof(ve=Bt)=="string"||typeof ve=="number"?Ve.splitText!==void 0:typeof ve.nodeName=="string"?!Ve._componentConstructor&&_(Ve,ve.nodeName):Ne||Ve._componentConstructor===ve.nodeName)){bt=wt,Ot[nt]=void 0,nt===Yt-1&&Yt--,nt===de&&de++;break}}bt=j(bt,Bt,kt,xt),It=ct[Ut],bt&&bt!==dt&&bt!==It&&(It==null?dt.appendChild(bt):bt===It.nextSibling?y(It):dt.insertBefore(bt,It))}var Ve,ve,Ne;if(ft)for(var Ut in St)St[Ut]!==void 0&&A(St[Ut],!1);for(;de<=Yt;)(bt=Ot[Yt--])!==void 0&&A(bt,!1)}(Y,Dt,$,E,S||Ct.dangerouslySetInnerHTML!=null),function(dt,vt,kt){var xt;for(xt in kt)vt&&vt[xt]!=null||kt[xt]==null||x(dt,xt,kt[xt],kt[xt]=void 0,M);for(xt in vt)xt==="children"||xt==="innerHTML"||xt in kt&&vt[xt]===(xt==="value"||xt==="checked"?dt[xt]:kt[xt])||x(dt,xt,kt[xt],kt[xt]=vt[xt],M)}(Y,T.attributes,Ct),M=_t,Y}function A(b,T){var $=b._component;$?H($):(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 W(b,T,$){var E,Q=B.length;for(b.prototype&&b.prototype.render?(E=new b(T,$),V.call(E,T,$)):((E=new V(T,$)).constructor=b,E.render=F);Q--;)if(B[Q].constructor===b)return E.nextBase=B[Q].nextBase,B.splice(Q,1),E;return E}function F(b,T,$){return this.constructor(b,$)}function q(b,T,$,E,Q){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||Q?b.componentWillMount&&b.componentWillMount():b.componentWillReceiveProps&&b.componentWillReceiveProps(T,E)),E&&E!==b.context&&(b.prevContext||(b.prevContext=b.context),b.context=E),b.prevProps||(b.prevProps=b.props),b.props=T,b._disable=!1,$!==0&&($!==1&&s.syncComponentUpdates===!1&&b.base?m(b):L(b,1,Q)),b.__ref&&b.__ref(b))}function L(b,T,$,E){if(!b._disable){var Q,Y,_t,Et=b.props,yt=b.state,Ct=b.context,Dt=b.prevProps||Et,Lt=b.prevState||yt,jt=b.prevContext||Ct,O=b.base,dt=b.nextBase,vt=O||dt,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=Dt,b.state=Lt,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){Q=b.render(Et,yt,Ct),b.getChildContext&&(Ct=u(u({},Ct),b.getChildContext())),O&&b.getSnapshotBeforeUpdate&&(st=b.getSnapshotBeforeUpdate(Dt,Lt));var nt,wt,It=Q&&Q.nodeName;if(typeof It=="function"){var Bt=v(Q);(Y=kt)&&Y.constructor===It&&Bt.key==Y.__key?q(Y,Bt,1,Ct,!1):(nt=Y,b._component=Y=W(It,Bt,Ct),Y.nextBase=Y.nextBase||dt,Y._parentComponent=b,q(Y,Bt,0,Ct,!1),L(Y,1,$,!0)),wt=Y.base}else _t=vt,(nt=kt)&&(_t=b._component=null),(vt||T===1)&&(_t&&(_t._component=null),wt=function(ft,de,We,Yt,Ie,Ut){C++||(M=Ie!=null&&Ie.ownerSVGElement!==void 0,S=ft!=null&&!("__preactattr_"in ft));var Ht=j(ft,de,We,Yt,Ut);return Ie&&Ht.parentNode!==Ie&&Ie.appendChild(Ht),--C||(S=!1,Ut||z()),Ht}(_t,Q,Ct,$||!O,vt&&vt.parentNode,!0));if(vt&&wt!==vt&&Y!==kt){var bt=vt.parentNode;bt&&wt!==bt&&(bt.replaceChild(wt,vt),nt||(vt._component=null,A(vt,!1)))}if(nt&&H(nt),(b.base=wt)&&!E){for(var ct=b,Ot=b;Ot=Ot._parentComponent;)(ct=Ot).base=wt;wt._component=ct,wt._componentConstructor=ct.constructor}}for(!O||$?w.unshift(b):xt||(b.componentDidUpdate&&b.componentDidUpdate(Dt,Lt,st),s.afterUpdate&&s.afterUpdate(b));b._renderCallbacks.length;)b._renderCallbacks.pop().call(b);C||E||z()}}function H(b){s.beforeUnmount&&s.beforeUnmount(b);var T=b.base;b._disable=!0,b.componentWillUnmount&&b.componentWillUnmount(),b.base=null;var $=b._component;$?H($):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 V(b,T){this._dirty=!0,this.context=T,this.props=b,this.state=this.state||{},this._renderCallbacks=[]}function I(b,T,$){return P($,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),L(this,2)},render:function(){}});var rt={h,createElement:h,cloneElement:c,Component:V,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,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===r?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 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,f=r(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,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:"© 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,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,C,M=a(y),S=s(M),z=r(x,k,3),P=l(S.length),j=0,A=c?v(y,P):f?v(y,0):void 0;j<P;j++)if((_||j in S)&&(C=z(w=S[j],j,M),u)){if(c)A[j]=C;else if(C)switch(u){case 3:return!0;case 5:return w;case 6:return j;case 2:A.push(w)}else if(m)return!1}return p?-1:g||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,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,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={},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?r(y).concat(p(y)):r(y),k=x.length,w=0;w<k;)_.call(y,v=x[w++])&&(f[v]=y[v]);return f}: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),f=0,g=[];for(d in c)d!=l&&r(c,d)&&g.push(d);for(;u.length>f;)r(c,d=u[f++])&&(~a(g,d)||g.push(d));return g}},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(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,C=k&&v.focused===null;if(w&&C){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,C=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[C])})}},p.handleInputBlur=function(_){var v=this.state,y=v.focused,x=v.menuOpen,k=v.options,w=v.query,C=v.selected;if(y===-1){var M=x&&c(),S=c()?w:this.templateInputValue(k[C]);this.handleComponentBlur({menuOpen:M,query:S})}},p.handleInputChange=function(_){var v=this,y=this.props,x=y.minLength,k=y.source,w=y.showAllValues,C=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(j){var A=0<j.length;v.setState({menuOpen:A,options:j,selected:C&&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,C=!x&&y.length>=w&&0<k.length;C?this.setState(function(M){var S=M.menuOpen;return{focused:-1,menuOpen:C||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(C){v.setState({menuOpen:!0,options:C,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,C=y.minLength,M=y.name,S=y.placeholder,z=y.required,P=y.showAllValues,j=y.tNoResults,A=y.tStatusQueryTooShort,at=y.tStatusNoResults,B=y.tStatusSelectedOption,W=y.tStatusResults,F=y.tAssistiveHint,q=y.dropdownArrow,L=this.state,H=L.focused,V=L.hovered,I=L.menuOpen,rt=L.options,b=L.query,T=L.selected,$=L.ariaHint,E=L.validChoiceMade,Q=this.hasAutoselect(),Y=H===-1,_t=rt.length===0,Et=b.length!==0,yt=b.length>=C,Ct=this.props.showNoOptionsFound&&Y&&_t&&Et&&yt,Dt=x+"__wrapper",Lt=x+"__input",jt=H!==null?" "+Lt+"--focused":"",O=this.props.showAllValues?" "+Lt+"--show-all-values":" "+Lt+"--default",dt=x+"__dropdown-arrow-down",vt=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&&Q?b+It.substr(b.length):"",bt=w+"__assistiveHint",ct=$?{"aria-describedby":bt}:null;return P&&typeof(_=q({className:dt}))=="string"&&(_=(0,r.createElement)("div",{className:x+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:_}})),(0,r.createElement)("div",{className:Dt,onKeyDown:this.handleKeyDown},(0,r.createElement)(s.default,{id:w,length:rt.length,queryLength:b.length,minQueryLength:C,selectedOption:this.templateInputValue(rt[T]),selectedOptionIndex:T,validChoiceMade:E,isInFocus:this.state.focused!==null,tQueryTooShort:A,tNoResults:at,tSelectedOption:B,tResults:W}),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":!!vt&&w+"__option--"+H,"aria-owns":w+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},ct,{autoComplete:"off",className:""+Lt+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 ft=(H===-1?T===St:H===St)&&V===null?" "+nt+"--focused":"",de=St%2?" "+nt+"--odd":"",We=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+ft+de,dangerouslySetInnerHTML:{__html:v.templateSuggestion(Ot)+We},id:w+"__option--"+St,key:St,onBlur:function(Yt){return v.handleOptionBlur(Yt,St)},onClick:function(Yt){return v.handleOptionClick(Yt,St)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(Yt){return v.handleOptionMouseEnter(Yt,St)},ref:function(Yt){v.elementReferences[St]=Yt},role:"option",tabIndex:"-1","aria-posinset":St+1,"aria-setsize":rt.length})}),Ct&&(0,r.createElement)("li",{className:nt+" "+nt+"--no-results"},j())),(0,r.createElement)("span",{id:bt,style:{display:"none"}},F()))},m}(r.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,o){var r=o(9),s=o(53),a=o(28),l=o(26)("IE_PROTO"),h=function(){},u="prototype",d=function(){var c,f=o(15)("iframe"),g=a.length;for(f.style.display="none",o(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]=r(c),g=new h,h[u]=null,g[l]=c):g=d(),f===void 0?g:s(g,f)}},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,f=0;f<c;)r.f(l,u=d[f++],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),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(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 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),r(RegExp.prototype,f,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 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,C=w.bump,M=w.debounced,S=w.silenced,z=g<m,P=f===0,j=p?x(p,f,_):"",A=null;return A=z?v(m):P?y():k(f,j),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&&C?A:""),(0,r.createElement)("div",{id:c+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},S||!M||C?"":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})})(dp);const nE=f1(dp.exports),oE=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@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)}
47
- `;var cp=Object.freeze,fp=Object.defineProperty,rE=Object.getOwnPropertyDescriptor,Fe=(i,t,e,n)=>{for(var o=n>1?void 0:n?rE(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&&fp(t,e,o),o},sE=(i,t)=>cp(fp(i,"raw",{value:cp(t||i.slice())})),gp;N.AddressAutocomplete=class extends Pn{constructor(){super(...arguments),this.id="autocomplete",this.postcode="SE5 0HU",this.label="Select an address",this.initialAddress="",this.osPlacesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.osProxyEndpoint="",this.arrowStyle="default",this.labelStyle="responsive",this._totalAddresses=void 0,this._addressesInPostcode=[],this._options=[],this._selectedAddress=null,this._osError=void 0,this.dispatch=(t,e)=>this.dispatchEvent(new CustomEvent(t,{detail:e}))}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(){nE({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:t=>{this._selectedAddress=this._addressesInPostcode.filter(e=>e.LPI.ADDRESS.split(`, ${e.LPI.ADMINISTRATIVE_AREA}`)[0]===t)[0],this._selectedAddress&&this.dispatch("addressSelection",{address:this._selectedAddress})}})}async _fetchData(t=0,e=[]){if(!Boolean(this.osPlacesApiKey||this.osProxyEndpoint))throw Error("OS Places API key or OS proxy endpoint not found");const o={postcode:this.postcode,dataset:"LPI",maxResults:"100",output_srs:"EPSG:4326",lr:"EN",offset:t.toString()},r=ns({service:"places",apiKey:this.osPlacesApiKey,proxyEndpoint:this.osProxyEndpoint,params:o});await fetch(r).then(s=>s.json()).then(s=>{var l,h,u;(s.error||s.fault)&&(this._osError=((l=s.error)==null?void 0:l.message)||((h=s.fault)==null?void 0:h.faultstring)||"Something went wrong"),this._totalAddresses=(u=s.header)==null?void 0:u.totalresults;const a=e.concat(s.results||[]);if(this._addressesInPostcode=a,this.dispatch("ready",{postcode:this.postcode,status:`fetched ${this._addressesInPostcode.length}/${this._totalAddresses} addresses`}),s.results){s.results.filter(c=>c.LPI.LPI_LOGICAL_STATUS_CODE_DESCRIPTION==="APPROVED").map(c=>{this._options.push(c.LPI.ADDRESS.split(`, ${c.LPI.ADMINISTRATIVE_AREA}`)[0])});const d=new Intl.Collator([],{numeric:!0});this._options.sort((c,f)=>d.compare(c,f))}this._totalAddresses&&this._totalAddresses>this._addressesInPostcode.length&&this._fetchData(this._addressesInPostcode.length,this._addressesInPostcode)}).catch(s=>console.log(s))}_getLabelClasses(){let t="govuk-label";return this.labelStyle==="static"&&(t+=" govuk-label--static"),t}_getErrorMessageContainer(t){const e=t?"govuk-warning-text":"",n=t?Bi` <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
46
+ <div id="`,'" class="map" tabindex="0" />'])),this.id)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.map)==null||t.dispose()}},N.MyMap.styles=Ss(eE),ut([Z({type:String})],N.MyMap.prototype,"id",2),ut([Z({type:Number})],N.MyMap.prototype,"latitude",2),ut([Z({type:Number})],N.MyMap.prototype,"longitude",2),ut([Z({type:String})],N.MyMap.prototype,"projection",2),ut([Z({type:Number})],N.MyMap.prototype,"zoom",2),ut([Z({type:Number})],N.MyMap.prototype,"minZoom",2),ut([Z({type:Number})],N.MyMap.prototype,"maxZoom",2),ut([Z({type:Boolean})],N.MyMap.prototype,"drawMode",2),ut([Z({type:String})],N.MyMap.prototype,"drawType",2),ut([Z({type:String})],N.MyMap.prototype,"drawPointColor",2),ut([Z({type:Object})],N.MyMap.prototype,"drawGeojsonData",2),ut([Z({type:Number})],N.MyMap.prototype,"drawGeojsonDataBuffer",2),ut([Z({type:String})],N.MyMap.prototype,"drawPointer",2),ut([Z({type:Boolean})],N.MyMap.prototype,"showFeaturesAtPoint",2),ut([Z({type:Boolean})],N.MyMap.prototype,"clickFeatures",2),ut([Z({type:String})],N.MyMap.prototype,"featureColor",2),ut([Z({type:Boolean})],N.MyMap.prototype,"featureFill",2),ut([Z({type:Boolean})],N.MyMap.prototype,"featureBorderNone",2),ut([Z({type:Number})],N.MyMap.prototype,"featureBuffer",2),ut([Z({type:Boolean})],N.MyMap.prototype,"showMarker",2),ut([Z({type:String})],N.MyMap.prototype,"markerImage",2),ut([Z({type:Number})],N.MyMap.prototype,"markerLatitude",2),ut([Z({type:Number})],N.MyMap.prototype,"markerLongitude",2),ut([Z({type:String})],N.MyMap.prototype,"markerColor",2),ut([Z({type:Object})],N.MyMap.prototype,"geojsonData",2),ut([Z({type:String})],N.MyMap.prototype,"geojsonColor",2),ut([Z({type:Boolean})],N.MyMap.prototype,"geojsonFill",2),ut([Z({type:Number})],N.MyMap.prototype,"geojsonBuffer",2),ut([Z({type:Boolean})],N.MyMap.prototype,"disableVectorTiles",2),ut([Z({type:String})],N.MyMap.prototype,"osVectorTilesApiKey",2),ut([Z({type:String})],N.MyMap.prototype,"osFeaturesApiKey",2),ut([Z({type:String})],N.MyMap.prototype,"osCopyright",2),ut([Z({type:String})],N.MyMap.prototype,"osProxyEndpoint",2),ut([Z({type:Boolean})],N.MyMap.prototype,"hideResetControl",2),ut([Z({type:String})],N.MyMap.prototype,"resetControlImage",2),ut([Z({type:Boolean})],N.MyMap.prototype,"staticMode",2),ut([Z({type:String})],N.MyMap.prototype,"areaUnit",2),ut([Z({type:Boolean})],N.MyMap.prototype,"showScale",2),ut([Z({type:Boolean})],N.MyMap.prototype,"useScaleBarStyle",2),ut([Z({type:Boolean})],N.MyMap.prototype,"showNorthArrow",2),N.MyMap=ut([yl("my-map")],N.MyMap);var cp={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,f,g){var m,p,_,v,y=c&d.F,x=c&d.G,k=c&d.S,w=c&d.P,C=c&d.B,M=x?r:k?r[f]||(r[f]={}):(r[f]||{})[u],S=x?s:s[f]||(s[f]={}),z=S[u]||(S[u]={});for(m in x&&(g=f),g)_=((p=!y&&M&&M[m]!==void 0)?M:g)[m],v=C&&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 V}),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 $,E,Q,Y,_t=l;for(Y=arguments.length;2<Y--;)a.push(arguments[Y]);for(T&&T.children!=null&&(a.length||a.push(T.children),delete T.children);a.length;)if((E=a.pop())&&E.pop!==void 0)for(Y=E.length;Y--;)a.push(E[Y]);else typeof E=="boolean"&&(E=null),(Q=typeof b!="function")&&(E==null?E="":typeof E=="number"?E=String(E):typeof E!="string"&&(Q=!1)),Q&&$?_t[_t.length-1]+=E:_t===l?_t=[E]:_t.push(E),$=Q;var Et=new r;return Et.nodeName=b,Et.children=_t,Et.attributes=T??void 0,Et.key=T==null?void 0:T.key,s.vnode!==void 0&&s.vnode(Et),Et}function u(b,T){for(var $ in T)b[$]=T[$];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&&L(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 $=b.nodeName.defaultProps;if($!==void 0)for(var E in $)T[E]===void 0&&(T[E]=$[E]);return T}function y(b){var T=b.parentNode;T&&T.removeChild(b)}function x(b,T,$,E,Q){if(T==="className"&&(T="class"),T!=="key")if(T==="ref")$&&$(null),E&&E(b);else if(T!=="class"||Q)if(T==="style"){if(E&&typeof E!="string"&&typeof $!="string"||(b.style.cssText=E||""),E&&typeof E=="object"){if(typeof $!="string")for(var Y in $)Y in E||(b.style[Y]="");for(var Y in E)b.style[Y]=typeof E[Y]=="number"&&f.test(Y)===!1?E[Y]+"px":E[Y]}}else if(T==="dangerouslySetInnerHTML")E&&(b.innerHTML=E.__html||"");else if(T[0]=="o"&&T[1]=="n"){var _t=T!==(T=T.replace(/Capture$/,""));T=T.toLowerCase().substring(2),E?$||b.addEventListener(T,k,_t):b.removeEventListener(T,k,_t),(b._listeners||(b._listeners={}))[T]=E}else if(T!=="list"&&T!=="type"&&!Q&&T in b){try{b[T]=E??""}catch{}E!=null&&E!==!1||T=="spellcheck"||b.removeAttribute(T)}else{var Et=Q&&T!==(T=T.replace(/^xlink:?/,""));E==null||E===!1?Et?b.removeAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase()):b.removeAttribute(T):typeof E!="function"&&(Et?b.setAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase(),E):b.setAttribute(T,E))}else b.className=E||""}function k(b){return this._listeners[b.type](s.event&&s.event(b)||b)}var w=[],C=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,$,E,Q,Y){C++||(M=Q!=null&&Q.ownerSVGElement!==void 0,S=b!=null&&!("__preactattr_"in b));var _t=j(b,T,$,E,Y);return Q&&_t.parentNode!==Q&&Q.appendChild(_t),--C||(S=!1,Y||z()),_t}function j(b,T,$,E,Q){var Y=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||Q)?b.nodeValue!=T&&(b.nodeValue=T):(Y=document.createTextNode(T),b&&(b.parentNode&&b.parentNode.replaceChild(Y,b),A(b,!0))),Y.__preactattr_=!0,Y;var Et=T.nodeName;if(typeof Et=="function")return function(dt,vt,kt,xt){for(var st=dt&&dt._component,nt=st,wt=dt,It=st&&dt._componentConstructor===vt.nodeName,Bt=It,bt=v(vt);st&&!Bt&&(st=st._parentComponent);)Bt=st.constructor===vt.nodeName;return st&&Bt&&(!xt||st._component)?(q(st,bt,3,kt,xt),dt=st.base):(nt&&!It&&(H(nt),dt=wt=null),st=W(vt.nodeName,bt,kt),dt&&!st.nextBase&&(st.nextBase=dt,wt=null),q(st,bt,1,kt,xt),dt=st.base,wt&&dt!==wt&&(wt._component=null,A(wt,!1))),dt}(b,T,$,E);if(M=Et==="svg"||Et!=="foreignObject"&&M,Et=String(Et),(!b||!_(b,Et))&&(Y=function(dt,vt){var kt=vt?document.createElementNS("http://www.w3.org/2000/svg",dt):document.createElement(dt);return kt.normalizedNodeName=dt,kt}(Et,M),b)){for(;b.firstChild;)Y.appendChild(b.firstChild);b.parentNode&&b.parentNode.replaceChild(Y,b),A(b,!0)}var yt=Y.firstChild,Ct=Y.__preactattr_,Dt=T.children;if(Ct==null){Ct=Y.__preactattr_={};for(var Lt=Y.attributes,jt=Lt.length;jt--;)Ct[Lt[jt].name]=Lt[jt].value}return!S&&Dt&&Dt.length===1&&typeof Dt[0]=="string"&&yt!=null&&yt.splitText!==void 0&&yt.nextSibling==null?yt.nodeValue!=Dt[0]&&(yt.nodeValue=Dt[0]):(Dt&&Dt.length||yt!=null)&&function(dt,vt,kt,xt,st){var nt,wt,It,Bt,bt,ct=dt.childNodes,Ot=[],St={},ft=0,de=0,We=ct.length,Yt=0,Ie=vt?vt.length:0;if(We!==0)for(var Ut=0;Ut<We;Ut++){var Ht=ct[Ut],In=Ht.__preactattr_,he=Ie&&In?Ht._component?Ht._component.__key:In.key:null;he!=null?(ft++,St[he]=Ht):(In||(Ht.splitText!==void 0?!st||Ht.nodeValue.trim():st))&&(Ot[Yt++]=Ht)}if(Ie!==0)for(var Ut=0;Ut<Ie;Ut++){Bt=vt[Ut],bt=null;var he=Bt.key;if(he!=null)ft&&St[he]!==void 0&&(bt=St[he],St[he]=void 0,ft--);else if(de<Yt){for(nt=de;nt<Yt;nt++)if(Ot[nt]!==void 0&&(Ve=wt=Ot[nt],Ne=st,typeof(ve=Bt)=="string"||typeof ve=="number"?Ve.splitText!==void 0:typeof ve.nodeName=="string"?!Ve._componentConstructor&&_(Ve,ve.nodeName):Ne||Ve._componentConstructor===ve.nodeName)){bt=wt,Ot[nt]=void 0,nt===Yt-1&&Yt--,nt===de&&de++;break}}bt=j(bt,Bt,kt,xt),It=ct[Ut],bt&&bt!==dt&&bt!==It&&(It==null?dt.appendChild(bt):bt===It.nextSibling?y(It):dt.insertBefore(bt,It))}var Ve,ve,Ne;if(ft)for(var Ut in St)St[Ut]!==void 0&&A(St[Ut],!1);for(;de<=Yt;)(bt=Ot[Yt--])!==void 0&&A(bt,!1)}(Y,Dt,$,E,S||Ct.dangerouslySetInnerHTML!=null),function(dt,vt,kt){var xt;for(xt in kt)vt&&vt[xt]!=null||kt[xt]==null||x(dt,xt,kt[xt],kt[xt]=void 0,M);for(xt in vt)xt==="children"||xt==="innerHTML"||xt in kt&&vt[xt]===(xt==="value"||xt==="checked"?dt[xt]:kt[xt])||x(dt,xt,kt[xt],kt[xt]=vt[xt],M)}(Y,T.attributes,Ct),M=_t,Y}function A(b,T){var $=b._component;$?H($):(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 W(b,T,$){var E,Q=B.length;for(b.prototype&&b.prototype.render?(E=new b(T,$),V.call(E,T,$)):((E=new V(T,$)).constructor=b,E.render=F);Q--;)if(B[Q].constructor===b)return E.nextBase=B[Q].nextBase,B.splice(Q,1),E;return E}function F(b,T,$){return this.constructor(b,$)}function q(b,T,$,E,Q){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||Q?b.componentWillMount&&b.componentWillMount():b.componentWillReceiveProps&&b.componentWillReceiveProps(T,E)),E&&E!==b.context&&(b.prevContext||(b.prevContext=b.context),b.context=E),b.prevProps||(b.prevProps=b.props),b.props=T,b._disable=!1,$!==0&&($!==1&&s.syncComponentUpdates===!1&&b.base?m(b):L(b,1,Q)),b.__ref&&b.__ref(b))}function L(b,T,$,E){if(!b._disable){var Q,Y,_t,Et=b.props,yt=b.state,Ct=b.context,Dt=b.prevProps||Et,Lt=b.prevState||yt,jt=b.prevContext||Ct,O=b.base,dt=b.nextBase,vt=O||dt,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=Dt,b.state=Lt,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){Q=b.render(Et,yt,Ct),b.getChildContext&&(Ct=u(u({},Ct),b.getChildContext())),O&&b.getSnapshotBeforeUpdate&&(st=b.getSnapshotBeforeUpdate(Dt,Lt));var nt,wt,It=Q&&Q.nodeName;if(typeof It=="function"){var Bt=v(Q);(Y=kt)&&Y.constructor===It&&Bt.key==Y.__key?q(Y,Bt,1,Ct,!1):(nt=Y,b._component=Y=W(It,Bt,Ct),Y.nextBase=Y.nextBase||dt,Y._parentComponent=b,q(Y,Bt,0,Ct,!1),L(Y,1,$,!0)),wt=Y.base}else _t=vt,(nt=kt)&&(_t=b._component=null),(vt||T===1)&&(_t&&(_t._component=null),wt=function(ft,de,We,Yt,Ie,Ut){C++||(M=Ie!=null&&Ie.ownerSVGElement!==void 0,S=ft!=null&&!("__preactattr_"in ft));var Ht=j(ft,de,We,Yt,Ut);return Ie&&Ht.parentNode!==Ie&&Ie.appendChild(Ht),--C||(S=!1,Ut||z()),Ht}(_t,Q,Ct,$||!O,vt&&vt.parentNode,!0));if(vt&&wt!==vt&&Y!==kt){var bt=vt.parentNode;bt&&wt!==bt&&(bt.replaceChild(wt,vt),nt||(vt._component=null,A(vt,!1)))}if(nt&&H(nt),(b.base=wt)&&!E){for(var ct=b,Ot=b;Ot=Ot._parentComponent;)(ct=Ot).base=wt;wt._component=ct,wt._componentConstructor=ct.constructor}}for(!O||$?w.unshift(b):xt||(b.componentDidUpdate&&b.componentDidUpdate(Dt,Lt,st),s.afterUpdate&&s.afterUpdate(b));b._renderCallbacks.length;)b._renderCallbacks.pop().call(b);C||E||z()}}function H(b){s.beforeUnmount&&s.beforeUnmount(b);var T=b.base;b._disable=!0,b.componentWillUnmount&&b.componentWillUnmount(),b.base=null;var $=b._component;$?H($):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 V(b,T){this._dirty=!0,this.context=T,this.props=b,this.state=this.state||{},this._renderCallbacks=[]}function I(b,T,$){return P($,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),L(this,2)},render:function(){}});var rt={h,createElement:h,cloneElement:c,Component:V,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,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===r?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 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,f=r(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,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:"© 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,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,C,M=a(y),S=s(M),z=r(x,k,3),P=l(S.length),j=0,A=c?v(y,P):f?v(y,0):void 0;j<P;j++)if((_||j in S)&&(C=z(w=S[j],j,M),u)){if(c)A[j]=C;else if(C)switch(u){case 3:return!0;case 5:return w;case 6:return j;case 2:A.push(w)}else if(m)return!1}return p?-1:g||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,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,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={},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?r(y).concat(p(y)):r(y),k=x.length,w=0;w<k;)_.call(y,v=x[w++])&&(f[v]=y[v]);return f}: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),f=0,g=[];for(d in c)d!=l&&r(c,d)&&g.push(d);for(;u.length>f;)r(c,d=u[f++])&&(~a(g,d)||g.push(d));return g}},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(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,C=k&&v.focused===null;if(w&&C){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,C=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[C])})}},p.handleInputBlur=function(_){var v=this.state,y=v.focused,x=v.menuOpen,k=v.options,w=v.query,C=v.selected;if(y===-1){var M=x&&c(),S=c()?w:this.templateInputValue(k[C]);this.handleComponentBlur({menuOpen:M,query:S})}},p.handleInputChange=function(_){var v=this,y=this.props,x=y.minLength,k=y.source,w=y.showAllValues,C=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(j){var A=0<j.length;v.setState({menuOpen:A,options:j,selected:C&&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,C=!x&&y.length>=w&&0<k.length;C?this.setState(function(M){var S=M.menuOpen;return{focused:-1,menuOpen:C||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(C){v.setState({menuOpen:!0,options:C,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,C=y.minLength,M=y.name,S=y.placeholder,z=y.required,P=y.showAllValues,j=y.tNoResults,A=y.tStatusQueryTooShort,at=y.tStatusNoResults,B=y.tStatusSelectedOption,W=y.tStatusResults,F=y.tAssistiveHint,q=y.dropdownArrow,L=this.state,H=L.focused,V=L.hovered,I=L.menuOpen,rt=L.options,b=L.query,T=L.selected,$=L.ariaHint,E=L.validChoiceMade,Q=this.hasAutoselect(),Y=H===-1,_t=rt.length===0,Et=b.length!==0,yt=b.length>=C,Ct=this.props.showNoOptionsFound&&Y&&_t&&Et&&yt,Dt=x+"__wrapper",Lt=x+"__input",jt=H!==null?" "+Lt+"--focused":"",O=this.props.showAllValues?" "+Lt+"--show-all-values":" "+Lt+"--default",dt=x+"__dropdown-arrow-down",vt=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&&Q?b+It.substr(b.length):"",bt=w+"__assistiveHint",ct=$?{"aria-describedby":bt}:null;return P&&typeof(_=q({className:dt}))=="string"&&(_=(0,r.createElement)("div",{className:x+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:_}})),(0,r.createElement)("div",{className:Dt,onKeyDown:this.handleKeyDown},(0,r.createElement)(s.default,{id:w,length:rt.length,queryLength:b.length,minQueryLength:C,selectedOption:this.templateInputValue(rt[T]),selectedOptionIndex:T,validChoiceMade:E,isInFocus:this.state.focused!==null,tQueryTooShort:A,tNoResults:at,tSelectedOption:B,tResults:W}),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":!!vt&&w+"__option--"+H,"aria-owns":w+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},ct,{autoComplete:"off",className:""+Lt+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 ft=(H===-1?T===St:H===St)&&V===null?" "+nt+"--focused":"",de=St%2?" "+nt+"--odd":"",We=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+ft+de,dangerouslySetInnerHTML:{__html:v.templateSuggestion(Ot)+We},id:w+"__option--"+St,key:St,onBlur:function(Yt){return v.handleOptionBlur(Yt,St)},onClick:function(Yt){return v.handleOptionClick(Yt,St)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(Yt){return v.handleOptionMouseEnter(Yt,St)},ref:function(Yt){v.elementReferences[St]=Yt},role:"option",tabIndex:"-1","aria-posinset":St+1,"aria-setsize":rt.length})}),Ct&&(0,r.createElement)("li",{className:nt+" "+nt+"--no-results"},j())),(0,r.createElement)("span",{id:bt,style:{display:"none"}},F()))},m}(r.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,o){var r=o(9),s=o(53),a=o(28),l=o(26)("IE_PROTO"),h=function(){},u="prototype",d=function(){var c,f=o(15)("iframe"),g=a.length;for(f.style.display="none",o(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]=r(c),g=new h,h[u]=null,g[l]=c):g=d(),f===void 0?g:s(g,f)}},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,f=0;f<c;)r.f(l,u=d[f++],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),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(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 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),r(RegExp.prototype,f,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 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,C=w.bump,M=w.debounced,S=w.silenced,z=g<m,P=f===0,j=p?x(p,f,_):"",A=null;return A=z?v(m):P?y():k(f,j),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&&C?A:""),(0,r.createElement)("div",{id:c+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},S||!M||C?"":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})})(cp);const oE=g1(cp.exports),rE=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@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)}
47
+ `;var fp=Object.freeze,gp=Object.defineProperty,sE=Object.getOwnPropertyDescriptor,Fe=(i,t,e,n)=>{for(var o=n>1?void 0:n?sE(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&&gp(t,e,o),o},aE=(i,t)=>fp(gp(i,"raw",{value:fp(t||i.slice())})),mp;N.AddressAutocomplete=class extends Pn{constructor(){super(...arguments),this.id="autocomplete",this.postcode="SE5 0HU",this.label="Select an address",this.initialAddress="",this.osPlacesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.osProxyEndpoint="",this.arrowStyle="default",this.labelStyle="responsive",this._totalAddresses=void 0,this._addressesInPostcode=[],this._options=[],this._selectedAddress=null,this._osError=void 0,this.dispatch=(t,e)=>this.dispatchEvent(new CustomEvent(t,{detail:e}))}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(){oE({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:t=>{this._selectedAddress=this._addressesInPostcode.filter(e=>e.LPI.ADDRESS.split(`, ${e.LPI.ADMINISTRATIVE_AREA}`)[0]===t)[0],this._selectedAddress&&this.dispatch("addressSelection",{address:this._selectedAddress})}})}async _fetchData(t=0,e=[]){if(!Boolean(this.osPlacesApiKey||this.osProxyEndpoint))throw Error("OS Places API key or OS proxy endpoint not found");const o={postcode:this.postcode,dataset:"LPI",maxResults:"100",output_srs:"EPSG:4326",lr:"EN",offset:t.toString()},r=ns({service:"places",apiKey:this.osPlacesApiKey,proxyEndpoint:this.osProxyEndpoint,params:o});await fetch(r).then(s=>s.json()).then(s=>{var l,h,u;(s.error||s.fault)&&(this._osError=((l=s.error)==null?void 0:l.message)||((h=s.fault)==null?void 0:h.faultstring)||"Something went wrong"),this._totalAddresses=(u=s.header)==null?void 0:u.totalresults;const a=e.concat(s.results||[]);if(this._addressesInPostcode=a,this.dispatch("ready",{postcode:this.postcode,status:`fetched ${this._addressesInPostcode.length}/${this._totalAddresses} addresses`}),s.results){s.results.filter(c=>c.LPI.LPI_LOGICAL_STATUS_CODE_DESCRIPTION==="APPROVED").map(c=>{this._options.push(c.LPI.ADDRESS.split(`, ${c.LPI.ADMINISTRATIVE_AREA}`)[0])});const d=new Intl.Collator([],{numeric:!0});this._options.sort((c,f)=>d.compare(c,f))}this._totalAddresses&&this._totalAddresses>this._addressesInPostcode.length&&this._fetchData(this._addressesInPostcode.length,this._addressesInPostcode)}).catch(s=>console.log(s))}_getLabelClasses(){let t="govuk-label";return this.labelStyle==="static"&&(t+=" govuk-label--static"),t}_getErrorMessageContainer(t){const e=t?"govuk-warning-text":"",n=t?Ui` <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
48
48
  <strong class="govuk-warning-text__text">
49
49
  <span class="govuk-warning-text__assistive">Warning</span>
50
50
  ${t}
51
- </strong>`:null;return Bi`<div
51
+ </strong>`:null;return Ui`<div
52
52
  id="error-message-container"
53
53
  class="${e}"
54
54
  role="status"
55
55
  >
56
56
  ${n}
57
- </div>`}_getAutocomplete(t){return t?null:Bi`
57
+ </div>`}_getAutocomplete(t){return t?null:Ui`
58
58
  <link
59
59
  rel="stylesheet"
60
60
  href="https://cdn.jsdelivr.net/npm/accessible-autocomplete@2.0.4/dist/accessible-autocomplete.min.css"
@@ -63,16 +63,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)
63
63
  ${this.label}
64
64
  </label>
65
65
  <div id="${this.id}-container" spellcheck="false"></div>
66
- `}render(){let t;return!this.osPlacesApiKey&&!this.osProxyEndpoint?t="Missing OS Places API key or proxy endpoint":this._osError?t=this._osError:this._totalAddresses===0&&(t=`No addresses found in postcode ${this.postcode}`),Bi(gp||(gp=sE([`
66
+ `}render(){let t;return!this.osPlacesApiKey&&!this.osProxyEndpoint?t="Missing OS Places API key or proxy endpoint":this._osError?t=this._osError:this._totalAddresses===0&&(t=`No addresses found in postcode ${this.postcode}`),Ui(mp||(mp=aE([`
67
67
  <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
68
68
  `,`
69
69
  `,`
70
- `])),this._getErrorMessageContainer(t),this._getAutocomplete(t))}},N.AddressAutocomplete.styles=Ss(oE),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"id",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"postcode",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"label",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"initialAddress",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"osPlacesApiKey",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"osProxyEndpoint",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"arrowStyle",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"labelStyle",2),Fe([Ui()],N.AddressAutocomplete.prototype,"_totalAddresses",2),Fe([Ui()],N.AddressAutocomplete.prototype,"_addressesInPostcode",2),Fe([Ui()],N.AddressAutocomplete.prototype,"_options",2),Fe([Ui()],N.AddressAutocomplete.prototype,"_selectedAddress",2),Fe([Ui()],N.AddressAutocomplete.prototype,"_osError",2),N.AddressAutocomplete=Fe([_l("address-autocomplete")],N.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)},mp=/^([a-z]{1,2}\d)([a-z])$/i,aE=/[a-z]{2}$/i,pp=/\d[a-z]{2}$/i,lE=/^[a-z]{1,2}\d[a-z\d]?\s*\d[a-z]{2}$/i,hE=/^[a-z]{1,2}/i,uE={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]},dE=/\s+/gi,vp=function(i){return i.replace(dE,"").toUpperCase()},ld=function(i,t){return vp(i).match(t)},_s=function(i){return i.match(lE)!==null},hd=function(i){var t=ys(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e},ys=function(i){return _s(i)?vp(i).replace(pp,""):null},ud=function(i){if(!_s(i))return null;var t=ld(i,pp);return ad(t)},cE=function(i){if(!_s(i))return null;var t=ld(i,hE);return ad(t)},fE=function(i){var t=ys(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e[0]},gE=function(i){if(!_s(i))return null;var t=ld(i,aE);return ad(t)},mE=function(i){var t=ys(i);if(t===null)return null;var e=t.match(mp);return e===null?t:e[1]},pE=function(i){var t=ys(i);if(t===null)return null;var e=t.match(mp);return e===null?null:t},vE=function(i){return _s(i)?{valid:!0,postcode:hd(i),incode:ud(i),outcode:ys(i),area:cE(i),district:mE(i),subDistrict:pE(i),sector:fE(i),unit:gE(i)}:sd({},uE)};const _E=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@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)}
71
- `;var _p=Object.freeze,yp=Object.defineProperty,yE=Object.getOwnPropertyDescriptor,xi=(i,t,e,n)=>{for(var o=n>1?void 0:n?yE(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&&yp(t,e,o),o},xE=(i,t)=>_p(yp(i,"raw",{value:_p(t||i.slice())})),xp;N.PostcodeSearch=class extends Pn{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=(t,e)=>this.dispatchEvent(new CustomEvent(t,{detail:e}))}_onInputChange(t){const e=t.target.value,n=vE(e.trim()).valid;n?(this._sanitizedPostcode=hd(e.trim()),this._postcode=hd(e.trim())||e,this._showPostcodeError=!1):(this._sanitizedPostcode=null,this._postcode=e.toUpperCase()),this.dispatch("postcodeChange",{postcode:this._sanitizedPostcode||e,isValid:n})}_onBlur(){this._sanitizedPostcode||(this._showPostcodeError=!0),this._showError()}_onKeyUp(t){t.key==="Enter"&&!this._sanitizedPostcode&&(this._showPostcodeError=!0),this._showError()}_showError(){var n,o;const t=(n=this.shadowRoot)==null?void 0:n.querySelector(`#${this.errorId}`);t&&(t.style.display="none"),t&&this._showPostcodeError&&(t.style.display="");const e=(o=this.shadowRoot)==null?void 0:o.querySelector(".govuk-form-group");e&&this._showPostcodeError&&e.classList.add("govuk-form-group--error"),e&&!this._showPostcodeError&&e.classList.remove("govuk-form-group--error")}_makeLabel(){return this.onlyQuestionOnPage?Bi`<h1 class="govuk-label-wrapper">
70
+ `])),this._getErrorMessageContainer(t),this._getAutocomplete(t))}},N.AddressAutocomplete.styles=Ss(rE),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"id",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"postcode",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"label",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"initialAddress",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"osPlacesApiKey",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"osProxyEndpoint",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"arrowStyle",2),Fe([Z({type:String})],N.AddressAutocomplete.prototype,"labelStyle",2),Fe([Wi()],N.AddressAutocomplete.prototype,"_totalAddresses",2),Fe([Wi()],N.AddressAutocomplete.prototype,"_addressesInPostcode",2),Fe([Wi()],N.AddressAutocomplete.prototype,"_options",2),Fe([Wi()],N.AddressAutocomplete.prototype,"_selectedAddress",2),Fe([Wi()],N.AddressAutocomplete.prototype,"_osError",2),N.AddressAutocomplete=Fe([yl("address-autocomplete")],N.AddressAutocomplete);var ad=globalThis&&globalThis.__assign||function(){return ad=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},ad.apply(this,arguments)},pp=/^([a-z]{1,2}\d)([a-z])$/i,lE=/[a-z]{2}$/i,vp=/\d[a-z]{2}$/i,hE=/^[a-z]{1,2}\d[a-z\d]?\s*\d[a-z]{2}$/i,uE=/^[a-z]{1,2}/i,dE={valid:!1,postcode:null,incode:null,outcode:null,area:null,district:null,subDistrict:null,sector:null,unit:null},ld=function(i){return i===null?null:i[0]},cE=/\s+/gi,_p=function(i){return i.replace(cE,"").toUpperCase()},hd=function(i,t){return _p(i).match(t)},_s=function(i){return i.match(hE)!==null},ud=function(i){var t=ys(i);if(t===null)return null;var e=dd(i);return e===null?null:t+" "+e},ys=function(i){return _s(i)?_p(i).replace(vp,""):null},dd=function(i){if(!_s(i))return null;var t=hd(i,vp);return ld(t)},fE=function(i){if(!_s(i))return null;var t=hd(i,uE);return ld(t)},gE=function(i){var t=ys(i);if(t===null)return null;var e=dd(i);return e===null?null:t+" "+e[0]},mE=function(i){if(!_s(i))return null;var t=hd(i,lE);return ld(t)},pE=function(i){var t=ys(i);if(t===null)return null;var e=t.match(pp);return e===null?t:e[1]},vE=function(i){var t=ys(i);if(t===null)return null;var e=t.match(pp);return e===null?null:t},_E=function(i){return _s(i)?{valid:!0,postcode:ud(i),incode:dd(i),outcode:ys(i),area:fE(i),district:pE(i),subDistrict:vE(i),sector:gE(i),unit:mE(i)}:ad({},dE)};const yE=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@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)}
71
+ `;var yp=Object.freeze,xp=Object.defineProperty,xE=Object.getOwnPropertyDescriptor,xi=(i,t,e,n)=>{for(var o=n>1?void 0:n?xE(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&&xp(t,e,o),o},bE=(i,t)=>yp(xp(i,"raw",{value:yp(t||i.slice())})),bp;N.PostcodeSearch=class extends Pn{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=(t,e)=>this.dispatchEvent(new CustomEvent(t,{detail:e}))}_onInputChange(t){const e=t.target.value,n=_E(e.trim()).valid;n?(this._sanitizedPostcode=ud(e.trim()),this._postcode=ud(e.trim())||e,this._showPostcodeError=!1):(this._sanitizedPostcode=null,this._postcode=e.toUpperCase()),this.dispatch("postcodeChange",{postcode:this._sanitizedPostcode||e,isValid:n})}_onBlur(){this._sanitizedPostcode||(this._showPostcodeError=!0),this._showError()}_onKeyUp(t){t.key==="Enter"&&!this._sanitizedPostcode&&(this._showPostcodeError=!0),this._showError()}_showError(){var n,o;const t=(n=this.shadowRoot)==null?void 0:n.querySelector(`#${this.errorId}`);t&&(t.style.display="none"),t&&this._showPostcodeError&&(t.style.display="");const e=(o=this.shadowRoot)==null?void 0:o.querySelector(".govuk-form-group");e&&this._showPostcodeError&&e.classList.add("govuk-form-group--error"),e&&!this._showPostcodeError&&e.classList.remove("govuk-form-group--error")}_makeLabel(){return this.onlyQuestionOnPage?Ui`<h1 class="govuk-label-wrapper">
72
72
  <label class="govuk-label govuk-label--l" for=${this.id}>
73
73
  ${this.label}
74
74
  </label>
75
- </h1>`:Bi`<label class="govuk-label" for=${this.id}>${this.label}</label>`}render(){return Bi(xp||(xp=xE([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
75
+ </h1>`:Ui`<label class="govuk-label" for=${this.id}>${this.label}</label>`}render(){return Ui(bp||(bp=bE([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
76
76
  <div class="govuk-form-group">
77
77
  `,`
78
78
  <div id="postcode-hint" class="govuk-hint">`,`</div>
@@ -98,4 +98,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)
98
98
  @keyup=`,`
99
99
  tabindex="0"
100
100
  />
101
- </div>`])),this._makeLabel(),this.hintText,this.errorId,this.errorMessage,this.id,this.errorId,this._postcode,this._onInputChange,this._onBlur,this._onKeyUp)}},N.PostcodeSearch.styles=Ss(_E),xi([Z({type:String})],N.PostcodeSearch.prototype,"id",2),xi([Z({type:String})],N.PostcodeSearch.prototype,"errorId",2),xi([Z({type:String})],N.PostcodeSearch.prototype,"label",2),xi([Z({type:String})],N.PostcodeSearch.prototype,"hintText",2),xi([Z({type:String})],N.PostcodeSearch.prototype,"errorMessage",2),xi([Z({type:Boolean})],N.PostcodeSearch.prototype,"onlyQuestionOnPage",2),xi([Ui()],N.PostcodeSearch.prototype,"_postcode",2),xi([Ui()],N.PostcodeSearch.prototype,"_sanitizedPostcode",2),xi([Ui()],N.PostcodeSearch.prototype,"_showPostcodeError",2),N.PostcodeSearch=xi([_l("postcode-search")],N.PostcodeSearch),Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
101
+ </div>`])),this._makeLabel(),this.hintText,this.errorId,this.errorMessage,this.id,this.errorId,this._postcode,this._onInputChange,this._onBlur,this._onKeyUp)}},N.PostcodeSearch.styles=Ss(yE),xi([Z({type:String})],N.PostcodeSearch.prototype,"id",2),xi([Z({type:String})],N.PostcodeSearch.prototype,"errorId",2),xi([Z({type:String})],N.PostcodeSearch.prototype,"label",2),xi([Z({type:String})],N.PostcodeSearch.prototype,"hintText",2),xi([Z({type:String})],N.PostcodeSearch.prototype,"errorMessage",2),xi([Z({type:Boolean})],N.PostcodeSearch.prototype,"onlyQuestionOnPage",2),xi([Wi()],N.PostcodeSearch.prototype,"_postcode",2),xi([Wi()],N.PostcodeSearch.prototype,"_sanitizedPostcode",2),xi([Wi()],N.PostcodeSearch.prototype,"_showPostcodeError",2),N.PostcodeSearch=xi([yl("postcode-search")],N.PostcodeSearch),Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});