0){s.textContent=sl?sl.emptyScript:"";for(let D=0;D 0){s.textContent=pl?pl.emptyScript:"";for(let D=0;D b[u];r.push({s:e[d],r:m})};for(let d=0;d{let u=`${o}`,p;for(let m=0;mwindow.EJS?{compile(o){const e=new window.EJS({text:o});return i=>e.render(i)}}:!1,Hv=()=>window.Handlebars,Iv=()=>window.Hogan?{compile(o){const e=window.Hogan.compile(o);return i=>e.render(i)}}:!1,Pv=()=>window._?{compile(o){return e=>window._.template(o)(e)}}:!1,zv=()=>!window.Mark||!window.Mark.up?!1:{compile(o){return e=>window.Mark.up(o,e)}},Vv=()=>window.Mustache?{compile(o){return e=>window.Mustache.render(o,e)}}:!1,Uv=()=>window.swig,Wv=()=>window._?{compile(o){return e=>window._.template(o)(e)}}:!1,qv={default:Nv,ejs:Rv,handlebars:Hv,hogan:Iv,lodash:Pv,markup:zv,mustache:Vv,swig:Uv,underscore:Wv},Zv={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""};class Tn{constructor(e="",i=Zv){this.mapping=i,this.icon_prefix=e}getIconClass(e){return this.mapping[e]?this.icon_prefix+this.mapping[e]:this.icon_prefix+e}getIcon(e){const i=this.getIconClass(e);if(!i)return null;const r=document.createElement("i");return r.classList.add(...i.split(" ")),r}}const Gv="glyphicon glyphicon-",Yv={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"};class Jv extends Tn{constructor(){super(Gv,Yv)}}const Qv="icon-",Kv={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"};class Xv extends Tn{constructor(){super(Qv,Kv)}}const ey="fa fa-",ty={collapse:"caret-square-o-down",expand:"caret-square-o-right",delete:"times",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"files-o",clear:"times-circle-o",time:"clock-o",calendar:"calendar",edit_properties:"list"};class iy extends Tn{constructor(){super(ey,ty)}}const ry="fas fa-",ny={collapse:"caret-down",expand:"caret-right",delete:"trash",edit:"pen",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"times-circle",time:"clock",calendar:"calendar",edit_properties:"list"};class sy extends Tn{constructor(){super(ry,ny)}}const oy="ui-icon ui-icon-",ay={collapse:"triangle-1-s",expand:"triangle-1-e",delete:"trash",edit:"pencil",add:"plusthick",subtract:"minusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",moveright:"arrowthick-1-e",movedown:"arrowthick-1-s",moveleft:"arrowthick-1-w",copy:"copy",clear:"circle-close",time:"time",calendar:"calendar",edit_properties:"note"};class ly extends Tn{constructor(){super(oy,ay)}}const dy="oi oi-",hy={collapse:"collapse-down",expand:"expand-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"file",moveup:"arrow-thick-top",moveright:"arrow-thick-right",movedown:"arrow-thick-bottom",moveleft:"arrow-thick-left",copy:"clipboard",clear:"circle-x",time:"clock",calendar:"calendar",edit_properties:"list"};class uy extends Tn{constructor(){super(dy,hy)}}const cy="icon icon-",py={collapse:"arrow-down",expand:"arrow-right",delete:"delete",edit:"edit",add:"plus",subtract:"minus",cancel:"cross",save:"check",moveup:"upward",moveright:"forward",movedown:"downward",moveleft:"back",copy:"copy",clear:"close",time:"time",calendar:"bookmark",edit_properties:"menu"};class my extends Tn{constructor(){super(cy,py)}}const fy="bi bi-",gy={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"dash",cancel:"x-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"clipboard",clear:"x-circle",time:"clock",calendar:"calendar",edit_properties:"list-ul"};class by extends Tn{constructor(){super(fy,gy)}}const vy={bootstrap:by,bootstrap3:Jv,fontawesome3:Xv,fontawesome4:iy,fontawesome5:sy,jqueryui:ly,openiconic:uy,spectre:my},Fc=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find(o=>o in document.documentElement);class Fn{constructor(e,i={disable_theme_rules:!1}){this.jsoneditor=e,Object.keys(i).forEach(r=>{typeof e.options[r]<"u"&&(i[r]=e.options[r])}),this.options=i}getContainer(){return document.createElement("div")}getFloatRightLinkHolder(){const e=document.createElement("div");return e.classList.add("je-float-right-linkholder"),e}getModal(){const e=document.createElement("div");return e.style.display="none",e.classList.add("je-modal"),e}getGridContainer(){return document.createElement("div")}getGridRow(){const e=document.createElement("div");return e.classList.add("row"),e}getGridColumn(){return document.createElement("div")}setGridColumnSize(e,i){}getLink(e){const i=document.createElement("a");return i.setAttribute("href","#"),i.appendChild(document.createTextNode(e)),i}disableHeader(e){e.style.color="#ccc"}disableLabel(e){e.style.color="#ccc"}enableHeader(e){e.style.color=""}enableLabel(e){e.style.color=""}getInfoButton(e){const i=document.createElement("span");i.innerText="ⓘ",i.classList.add("je-infobutton-icon");const r=document.createElement("span");return r.classList.add("je-infobutton-tooltip"),r.innerText=e,i.onmouseover=()=>{r.style.visibility="visible"},i.onmouseleave=()=>{r.style.visibility="hidden"},i.appendChild(r),i}getFormInputLabel(e,i){const r=document.createElement("label");return r.appendChild(document.createTextNode(e)),i&&r.classList.add("required"),r}getLabelLike(e,i){const r=document.createElement("b");return r.appendChild(document.createTextNode(e)),i&&r.classList.add("required"),r}getHeader(e,i){const r=document.createElement("span");return typeof e=="string"?r.textContent=e:r.appendChild(e),r.classList.add("je-header"),r}getCheckbox(){const e=this.getFormInputField("checkbox");return e.classList.add("je-checkbox"),e}getCheckboxLabel(e,i){const r=document.createElement("label");return r.appendChild(document.createTextNode(` ${e}`)),i&&r.classList.add("required"),r}getMultiCheckboxHolder(e,i,r,s){const d=document.createElement("div");return d.classList.add("control-group"),i&&(i.style.display="block",d.appendChild(i),s&&i.appendChild(s)),Object.values(e).forEach(u=>{u.style.display="inline-block",u.style.marginRight="20px",d.appendChild(u)}),r&&d.appendChild(r),d}getFormCheckboxControl(e,i,r){const s=document.createElement("div");return s.appendChild(e),i.style.width="auto",e.insertBefore(i,e.firstChild),r&&s.classList.add("je-checkbox-control--compact"),s}getFormRadio(e){const i=this.getFormInputField("radio");return Object.keys(e).forEach(r=>i.setAttribute(r,e[r])),i.classList.add("je-radio"),i}getFormRadioLabel(e,i){const r=document.createElement("label");return r.appendChild(document.createTextNode(` ${e}`)),i&&r.classList.add("required"),r}getFormRadioControl(e,i,r,s){const d=document.createElement("div");return d.appendChild(e),i.style.width="auto",e.insertBefore(i,e.firstChild),r&&d.classList.add("je-radio-control--compact"),i.tagName.toLowerCase()!=="div"&&s&&e&&i&&(i.setAttribute("id",s),i.setAttribute("aria-labelledby",s),e.setAttribute("for",s)),d}getSelectInput(e,i,r=!1){const s=document.createElement("select");return e&&this.setSelectOptions(s,e,[],r),s}getSwitcher(e){const i=this.getSelectInput(e,!1);return i.classList.add("je-switcher"),i}getSwitcherOptions(e){return e.getElementsByTagName("option")}setSwitcherOptions(e,i,r){this.setSelectOptions(e,i,r)}setSelectOptions(e,i,r=[],s=!1,d=" "){if(e.innerHTML="",s){const u=document.createElement("option");u.setAttribute("value","_placeholder_"),u.textContent=d,u.setAttribute("disabled",""),u.setAttribute("hidden",""),e.appendChild(u)}for(let u=0;u "+A+`s.right+d||o.clientY>r.bottom&&o.clientX>r.left:o.clientY>s.bottom+d||o.clientX>r.right&&o.clientY>r.top}function Bg(o,e,i,r,s,d,u,p){var m=r?o.clientY:o.clientX,b=r?i.height:i.width,w=r?i.top:i.left,v=r?i.bottom:i.right,j=!1;if(!u){if(p&&Zaw+b*d/2:md.freehand_!==void 0).map(d=>d.source_))==null?void 0:i.ol_uid)!=null&&s.includes(o.getSource?(r=o.getSource())==null?void 0:r.ol_uid:void 0)?"draw":o.declutter_!==void 0?"vector":"raster"}function vp(o,e){var i;let r={};for(const s in o){const d=o[s].type;if(d&&d!=="object")r[s]=d==="number"?Number(e[s]):e[s];else if(typeof o[s]=="object"&&(i=o[s])!=null&&i.properties){const u=vp(o[s].properties,e);Object.keys(u).length>0&&(r[s]=u)}}return r}function Zg(o,e){var i,r,s,d,u;if(!e)return null;let p={},m="updateStyleVariables"in o?(i=o.style_)==null?void 0:i.variables:(r=e.style)==null?void 0:r.variables;if((e.type==="style"||e.style)&&m)p=m;else if((d=(s=o.getSource())==null?void 0:s.getTileUrlFunction)!=null&&d.call(s)){const w=new URL(o.getSource().getTileUrlFunction()([0,0,0]));p=Object.fromEntries(w.searchParams.entries())}else return null;const b=vp(((u=e.schema)==null?void 0:u.properties)||e.schema,p);return Object.keys(b).length?b:null}const Gg=(o,e)=>o?.filter(i=>["remove","sort"].filter(r=>e!=null&&e.get("layerControlDisable")?r!=="sort":!0).includes(i)),Yg=(o,e)=>o?.filter(i=>{let r=!0;return["remove","sort"].includes(i)&&(r=!1),i==="info"&&(r=e.get("description")),i==="config"&&(r=e.get("layerConfig")),r}),Jg=(o,e)=>Ht`
-
-`,Qg=o=>Ht`
-
-`,Kg=o=>Ht`
-
-`,yp=o=>{var e;const i=["layerControlHide","layerControlOptional"];return(e=o?.getArray())==null?void 0:e.filter(r=>i.every(s=>!r.get(s)))};/**
- * @license
- * Copyright 2020 Google LLC
- * SPDX-License-Identifier: BSD-3-Clause
- */const xp=Qd(class extends Kd{constructor(o){if(super(o),o.type!==Wn.PROPERTY&&o.type!==Wn.ATTRIBUTE&&o.type!==Wn.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!gf(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[e]){if(e===Ur||e===si)return e;const i=o.element,r=o.name;if(o.type===Wn.PROPERTY){if(e===i[r])return Ur}else if(o.type===Wn.BOOLEAN_ATTRIBUTE){if(!!e===i.hasAttribute(r))return Ur}else if(o.type===Wn.ATTRIBUTE&&i.getAttribute(r)===e+"")return Ur;return Gc(o),e}});/**
- * @license
- * Copyright 2017 Google LLC
- * SPDX-License-Identifier: BSD-3-Clause
- */class Ed extends Kd{constructor(e){if(super(e),this.it=si,e.type!==Wn.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===si||e==null)return this._t=void 0,this.it=e;if(e===Ur)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const i=[e];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}}Ed.directiveName="unsafeHTML",Ed.resultType=1;const Xg=Qd(Ed);/**
- * @license
- * Copyright 2021 Google LLC
- * SPDX-License-Identifier: BSD-3-Clause
- */function*Ja(o,e){if(o!==void 0){let i=0;for(const r of o)yield e(r,i++)}}const e0=(o,e,i)=>{let r=e;return i.layer.getSource().getTileUrlFunction()&&(r||(r=i.layer.getSource().getTileUrlFunction()),i.layer.getSource().setTileUrlFunction((...s)=>mg(r(...s),o)),i.layer.getSource().setKey(new Date)),r};function t0(o,e,i){const r="updateStyleVariables"in e,s="setStyle"in e,d=r?e.style_:i.style;let u=d?.variables;if(u){const p=wp(o);if(d.variables={...u,...p},r)e.updateStyleVariables(p);else if(s){const m=i0(d);e.setStyle(m)}}}const wp=o=>{const e={};for(const i in o)if(typeof o[i]=="object"&&o[i]!==null){const r=wp(o[i]);for(const s in r)e[s]=r?.[s]}else e[i]=o?.[i];return e};function i0(o){let e=o;if("variables"in o){let i=JSON.stringify(o);const{variables:r}=o;for(const s in r)typeof r[s]=="number"?i=i.replaceAll(`["var","${s}"]`,r[s]):i=i.replaceAll(`["var","${s}"]`,`"${r[s]}"`);e=JSON.parse(i)}return e}var Pa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function r0(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var n0="Expected a function",pc=NaN,s0="[object Symbol]",o0=/^\s+|\s+$/g,a0=/^[-+]0x[0-9a-f]+$/i,l0=/^0b[01]+$/i,d0=/^0o[0-7]+$/i,h0=parseInt,u0=typeof Pa=="object"&&Pa&&Pa.Object===Object&&Pa,c0=typeof self=="object"&&self&&self.Object===Object&&self,p0=u0||c0||Function("return this")(),m0=Object.prototype,f0=m0.toString,g0=Math.max,b0=Math.min,bd=function(){return p0.Date.now()};function v0(o,e,i){var r,s,d,u,p,m,b=0,w=!1,v=!1,j=!0;if(typeof o!="function")throw new TypeError(n0);e=mc(e)||0,Dd(i)&&(w=!!i.leading,v="maxWait"in i,d=v?g0(mc(i.maxWait)||0,e):d,j="trailing"in i?!!i.trailing:j);function D(re){var _e=r,ye=s;return r=s=void 0,b=re,u=o.apply(ye,_e),u}function B(re){return b=re,p=setTimeout(me,e),w?D(re):u}function U(re){var _e=re-m,ye=re-b,ue=e-_e;return v?b0(ue,d-ye):ue}function q(re){var _e=re-m,ye=re-b;return m===void 0||_e>=e||_e<0||v&&ye>=d}function me(){var re=bd();if(q(re))return $e(re);p=setTimeout(me,U(re))}function $e(re){return p=void 0,j&&r?D(re):(r=s=void 0,u)}function Fe(){p!==void 0&&clearTimeout(p),b=0,r=m=s=p=void 0}function ie(){return p===void 0?u:$e(bd())}function J(){var re=bd(),_e=q(re);if(r=arguments,s=this,m=re,_e){if(p===void 0)return B(m);if(v)return p=setTimeout(me,e),D(m)}return p===void 0&&(p=setTimeout(me,e)),u}return J.cancel=Fe,J.flush=ie,J}function Dd(o){var e=typeof o;return!!o&&(e=="object"||e=="function")}function y0(o){return!!o&&typeof o=="object"}function x0(o){return typeof o=="symbol"||y0(o)&&f0.call(o)==s0}function mc(o){if(typeof o=="number")return o;if(x0(o))return pc;if(Dd(o)){var e=typeof o.valueOf=="function"?o.valueOf():o;o=Dd(e)?e+"":e}if(typeof o!="string")return o===0?o:+o;o=o.replace(o0,"");var i=l0.test(o);return i||d0.test(o)?h0(o.slice(2),i?2:8):a0.test(o)?pc:+o}var w0=v0;const _p=r0(w0);var Vo,Qa,Ka,Ad,Cp,Ld,Sd;let kp=class extends $r{constructor(){super(),bi(this,Ad),bi(this,Vo,{}),bi(this,Qa,null),bi(this,Ka),bi(this,Ld,""),bi(this,Sd,""),this.layer=null,this.unstyled=!1,this.noShadow=!1,this.layerConfig=null,this.debouncedDataChange=_p(lr(this,Ad,Cp),1e3,{leading:!0})}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){rl(this,Qa,Zg(this.layer,this.layerConfig)),customElements.get("eox-jsonform")||console.error("Please import @eox/jsonform in order to use layerconfig");const e={disable_edit_json:!0,disable_collapse:!0,disable_properties:!0};return Ht`
-
- ${Wr(this.layerConfig,()=>Ht`
-
-
-
-
-
-
-
-
-
-
- ${Wr(this.layers,()=>Ht`
- ${yf(e,i=>i,i=>Ht`
-
- `}}Rd=new WeakMap,Hd=new WeakMap,Pi(Fp,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}});customElements.define("eox-layercontrol-layer-list",Fp);const L0=o=>{const e=o.querySelector("select[name=optional]"),i=e?e.value:null,r=nh(o.layers.getArray(),"layerControlOptional",!0).find(s=>(s.get(o.idProperty)||s.ol_uid)===i);r?.set("layerControlOptional",!1),r?.setVisible(!0),o.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),o.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(s=>s.requestUpdate()),o.requestUpdate()};var Id,Mp;class $p extends $r{constructor(){super(),bi(this,Id),this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=nh(this.layers.getArray(),"layerControlOptional",!0);return Ht`
-
-
-
-
-
-
-
-
- `}}Id=new WeakSet,Mp=function(){L0(this)},Pi($p,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},titleProperty:{attribute:"title-property",type:String},unstyled:{type:Boolean},noShadow:{type:Boolean}});customElements.define("eox-layercontrol-optional-list",$p);const S0=(o,e)=>{e.jsonInput=o.target.value,e.requestUpdate()},fc=o=>{const e=JSON.parse(`{"data":${ip(o.jsonInput)}}`);Array.isArray(e.data)?e.data.forEach(i=>{o.eoxMap.addOrUpdateLayer(i)}):o.eoxMap.addOrUpdateLayer(e.data),o.jsonInput=null,o.requestUpdate()},T0=(o,e)=>{e.urlInput=o.target.value,e.requestUpdate()};async function F0(o){const e=o.urlInput;if(o.wmsCapabilities=null,o.searchLoad=!0,o.requestUpdate(),!e)return!1;if(eh(e)==="XYZ")return{Name:e};try{const i=await ug(e);o.wmsCapabilities=i}catch{}finally{o.searchLoad=!1,o.requestUpdate()}return!1}const M0=(o,e)=>{const{Name:i}=o,r=eh(e.urlInput)||"XYZ",s={type:"Tile",properties:{id:i,title:i},source:{type:r,url:e.urlInput,params:{LAYERS:i}}};e.jsonInput=JSON.stringify(s)},$0=(o,e)=>{e.open=o||null,e.urlInput=null,e.jsonInput=null,e.wmsCapabilities=null,e.requestUpdate()};var on,jp,Op,Pd,Bp,Np,tl,zd,Vd;class Rp extends $r{constructor(){super(),bi(this,on),Pi(this,"urlInput",null),Pi(this,"jsonInput",null),Pi(this,"open",null),Pi(this,"searchLoad",!1),Pi(this,"wmsCapabilities",null),bi(this,zd,`
- .eox-add-layer-main .open {
- position: relative;
- }
- .eox-add-layer-main .close {
- display: none;
- }
- `),bi(this,Vd,`
- .eox-add {
- background: #f0f2f5;
- border-top: 1px solid #0041701a;
- padding: 0.5rem;
- font-size: small;
- }
- .eox-add-layer-col, .eox-add-layer-tab {
- display: flex;
- width: 100%;
- }
- .eox-add-layer-main .close {
- display: none;
- }
- .eox-add-layer-main .open {
- position: relative;
- }
- button.icon.add-icon {
- flex-grow: 1;
- }
- .eox-add-layer-tab li {
- border: 0 !important;
- font-size: smaller;
- padding: 0.2rem 0.7rem;
- background: #f0f2f5;
- border-radius: 4px 4px 0px 0px;
- font-size: 0.8rem;
- font-weight: 500;
- cursor: pointer;
- }
- .eox-add-layer-tab li.active {
- background: #204270;
- color: white;
- font-weight: 700;
- }
- .relative {
- position: relative
- }
- .eox-add-layer-col.justify-end {
- justify-content: end;
- }
- .eox-add ul {
- max-height: 120px;
- overflow: scroll;
- }
- .eox-add ul li {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0.1rem 0.2rem;
- }
- button.icon {
- justify-content: end;
- transition: opacity .2s;
- opacity: .7;
- }
- button.icon:hover {
- opacity: 1;
- }
- button.icon.add-layer-icon::before {
- width: 16px;
- min-width: 16px;
- height: 16px;
- }
- button.icon.add-icon::before {
- width: 18px;
- min-width: 18px;
- height: 18px;
- }
- .add-icon.icon::before {
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath xmlns='http://www.w3.org/2000/svg' d='M17,14H19V17H22V19H19V22H17V19H14V17H17V14M11,16L2,9L11,2L20,9L11,16M11,18.54L12,17.75V18C12,18.71 12.12,19.39 12.35,20L11,21.07L2,14.07L3.62,12.81L11,18.54Z' fill='%23004270'/%3E%3C/svg%3E");
- }
- .add-layer-icon::before {
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eplus-thick%3C/title%3E%3Cpath fill='%23004270' d='M20 14H14V20H10V14H4V10H10V4H14V10H20V14Z' /%3E%3C/svg%3E");
- }
- .json-add-layer {
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eplus-thick%3C/title%3E%3Cpath fill='white' d='M20 14H14V20H10V14H4V10H10V4H14V10H20V14Z' /%3E%3C/svg%3E");
- }
- .search-icon::after {
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Emagnify%3C/title%3E%3Cpath d='M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z' fill='white' /%3E%3C/svg%3E");
- }
- .search-icon::after, .json-add-layer::before {
- width: 14px;
- min-width: 14px;
- height: 14px;
- display:flex
- margin-right: 6px;
- color: white;
- }
- .search-icon, .json-add-layer {
- padding: 4px 6px;
- height: 28px;
- border-radius: 0px 4px 4px 0px;
- box-shadow: none;
- }
- .json-add-layer {
- position: absolute;
- bottom: 16px;
- right: 14px;
- border-radius: 4px;
- height: 24px;
- padding: 4px;
- }
- input.add-url, textarea.add-layer-input {
- box-sizing: border-box !important;
- width: 100%;
- height: 28px;
- padding: 5px 7px !important;
- border: 1px solid #0004 !important;
- font-size: smaller;
- border-radius: 4px 0px 0px 4px;
- }
- textarea.add-layer-input {
- height: 90px;
- resize: none;
- border-radius: 4px;
- }
- .divider {
- margin: 1rem 0px;
- height: 1px;
- border-top: 1.5px solid #00417059;
- text-align: center;
- position: relative;
- }
- .divider span {
- position: relative;
- top: -.6em;
- padding: 0px 0.5rem;
- background: #f0f2f5;
- color: #00417059;
- font-weight: bold;
- display: inline-block;
- }
- `),this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.open?"open":"close",i=this.open==="url",r=this.open==="json",s=!cg(this.urlInput)||this.searchLoad?!0:si;return Ht`
-
-
-
-
-
-
-
- ${this.wmsCapabilities.Capability.Layer.Layer.map(d=>{const u=d.Name;return Ht`
-
`:si}
- `:Ht`
-
-
-
-
-
- `}
-
";const i=document.createElement("img");i.style.maxWidth="100%",i.style.maxHeight="100px",i.src=this.value,this.preview.appendChild(i)}}enable(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),super.enable())}disable(e){e&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),super.disable()}setValue(e){this.value!==e&&(this.schema.readOnly&&this.schema.enum&&!this.schema.enum.includes(e)?this.value=this.schema.enum[0]:this.value=e,this.input.value=this.value,this.refreshPreview(),this.onChange())}destroy(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),super.destroy()}}class Xp extends dr{constructor(e,i){super(e,i),this.active=!1,this.isUiOnly=!0,this.parent&&this.parent.schema&&(Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key)||this.parent.schema.required.push(this.key):this.parent.schema.required=[this.key])}build(){this.options.compact=!0;const e=this.expandCallbacks("button",ct({},{icon:"",validated:!1,align:"left",action:(r,s)=>{window.alert(`No button action defined for "${r.path}"`)}},this.defaults.options.button||{},this.options.button||{})),i=this.translateProperty(e.text||this.schema.title)||this.key;this.input=this.getButton(i,e.icon,i),typeof e.action!="function"?window.alert(`No button action defined for "${this.path}"`):this.input.addEventListener("click",e.action,!1),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["readonly"]),this.control=this.theme.getFormButtonHolder(e.align),this.control.appendChild(this.input),this.container.appendChild(this.control),this.changeHandler=()=>{this.jsoneditor.validate(this.jsoneditor.getValue()).length>0?this.disable():this.enable()},e.validated&&this.jsoneditor.on("change",this.changeHandler)}enable(){this.always_disabled||(this.input.disabled=!1,super.enable())}disable(e){e&&(this.always_disabled=!0),this.input.disabled=!0,super.disable()}getNumColumns(){return 2}activate(){this.active=!1,this.enable()}deactivate(){this.isRequired()||(this.active=!1,this.disable())}destroy(){this.jsoneditor.off("change",this.changeHandler),this.changeHandler=null,super.destroy()}}class Qb extends dr{setValue(e,i){e=!!e;const r=this.getValue()!==e;this.value=e,this.input.checked=this.value,i||(this.is_dirty=!0),this.onChange(r)}register(){super.register(),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}unregister(){super.unregister(),this.input&&this.input.removeAttribute("name")}getNumColumns(){return Math.min(12,Math.max(this.getTitle().length/7,2))}build(){this.parent.options.table_row||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle(),this.isRequired()),this.label.htmlFor=this.formname),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&!this.options.compact&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getCheckbox(),this.input.id=this.formname,this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",e=>{e.preventDefault(),e.stopPropagation(),this.value=e.currentTarget.checked,this.is_dirty=!0,this.onChange(!0)}),this.container.appendChild(this.control)}enable(){this.always_disabled||(this.input.disabled=!1,super.enable())}disable(e){e&&(this.always_disabled=!0),this.input.disabled=!0,super.disable()}destroy(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),super.destroy()}showValidationErrors(e){const i=this.jsoneditor.options.show_errors;if(i==="never"||(i==="change"||i==="interaction")&&!this.is_dirty)return;const s=(u,p)=>(p.path===this.path&&u.push(p.message),u),d=e.reduce(s,[]);this.input.controlgroup=this.control,d.length?this.theme.addInputError(this.input,`${d.join(". ")}.`):this.theme.removeInputError(this.input)}}class ua extends dr{setValue(e,i){let r=this.typecast(e);const s=this.enum_options.length>0&&this.enum_values.includes(r),d=!!this.jsoneditor.options.use_default_values||typeof this.schema.default<"u";if(!this.hasPlaceholderOption&&(!s||i&&!this.isRequired()&&!d)&&(r=this.enum_values[0]),this.value===r)return;const u=this.enum_values.indexOf(r);s&&u!==-1?this.input.value=this.enum_options[u]:this.hasPlaceholderOption?this.input.value="_placeholder_":this.input.value=r,this.value=r,i||(this.is_dirty=!0),this.onChange(),this.change()}register(){super.register(),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}unregister(){super.unregister(),this.input&&this.input.removeAttribute("name")}getNumColumns(){if(!this.enum_options)return 3;let e=this.getTitle().length;for(let i=0;i${r}
`:r=`${r}
`,r}else{if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return e.replace(/&/g,"&").replace(//g,">")}return e}setValue(e){this.value!==e&&(this.value=e,this.refreshValue(),this.onChange())}destroy(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),super.destroy()}}class iv extends dr{register(){super.register(),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}unregister(){super.unregister(),this.input&&this.input.removeAttribute("name")}setValue(e,i,r){if(this.template&&!r||(e===null||typeof e>"u"?e="":typeof e=="object"?e=JSON.stringify(e):typeof e!="string"&&(e=`${e}`),e===this.serialized))return;const s=this.sanitize(e);if(this.input.value===s)return;this.input.value=s;const d=r||this.getValue()!==e;this.refreshValue(),i?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(d)}getNumColumns(){return 2}enable(){super.enable()}disable(){super.disable()}refreshValue(){this.value=this.input.value,typeof this.value!="string"&&(this.value=""),this.serialized=this.value}destroy(){this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),super.destroy()}sanitize(e){return e}onWatchedFieldChange(){let e;this.template&&(e=this.getWatchedFieldValues(),this.setValue(this.template(e),!1,!0)),super.onWatchedFieldChange()}build(){if(this.format=this.schema.format,!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.input_type="hidden",this.input=this.theme.getFormInputField(this.input_type),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.container.appendChild(this.input),this.schema.template){const e=this.expandCallbacks("template",{template:this.schema.template});typeof e.template=="function"?this.template=e.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}}class rv extends Xp{build(){this.options.compact=!1,this.header=this.label=this.theme.getLabelLike(this.getTitle()),this.description=this.theme.getDescription(this.schema.description||""),this.control=this.theme.getFormControl(this.label,this.description,null),this.container.appendChild(this.control)}getTitle(){return this.translateProperty(this.schema.title)}getNumColumns(){return 12}disable(){return!1}enable(){return!1}}class tm extends Or{build(){if(super.build(),typeof this.schema.minimum<"u"){let{minimum:e}=this.schema;typeof this.schema.exclusiveMinimum<"u"&&(e+=1),this.input.setAttribute("min",e)}if(typeof this.schema.maximum<"u"){let{maximum:e}=this.schema;typeof this.schema.exclusiveMaximum<"u"&&(e-=1),this.input.setAttribute("max",e)}if(typeof this.schema.step<"u"){const e=this.schema.step||1;this.input.setAttribute("step",e)}this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"])}getNumColumns(){return 2}getValue(){if(this.dependenciesFulfilled)if(!this.schema.default&&!this.jsoneditor.options.use_default_values&&this.value===""){if(this.shouldBeUnset()){this.input.value="";return}}else return Ib(this.value)?parseFloat(this.value):this.value}}class im extends tm{getNumColumns(){return 2}getValue(){if(this.dependenciesFulfilled)if(!this.schema.default&&!this.jsoneditor.options.use_default_values&&this.value===""){if(this.shouldBeUnset())return}else return zb(this.value)?parseInt(this.value):this.value}}class nv extends Or{preBuild(){if(super.preBuild(),this.schema.options||(this.schema.options={}),!this.schema.options.cleave)switch(this.format){case"ipv6":this.schema.options.cleave={delimiters:[":"],blocks:[4,4,4,4,4,4,4,4],uppercase:!0};break;case"ipv4":this.schema.options.cleave={delimiters:["."],blocks:[3,3,3,3],numericOnly:!0};break}this.options=ct(this.options,this.schema.options||{})}}class sv extends Or{setValue(e,i,r){const s=super.setValue(e,i,r);s!==void 0&&s.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(s.value)}build(){this.options.format="textarea",super.build(),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}afterInputReady(){let e;window.Jodit?(e=this.expandCallbacks("jodit",ct({},{height:300},this.defaults.options.jodit||{},this.options.jodit||{})),this.jodit_instance=new window.Jodit(this.input,e),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.jodit_instance.setReadOnly(!0),this.jodit_instance.events.on("change",()=>{this.value=this.jodit_instance.getEditorValue(),this.is_dirty=!0,this.onChange(!0)}),this.theme.afterInputReady(this.input)):super.afterInputReady()}getNumColumns(){return 6}enable(){!this.always_disabled&&this.jodit_instance&&this.jodit_instance.setReadOnly(!1),super.enable()}disable(e){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),super.disable(e)}destroy(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),super.destroy()}}const ov=o=>{const e=o.split(".");if(e.length!==4)throw new Error("error_ipv4");e.forEach(i=>{if(isNaN(+i)||+i<0||+i>255)throw new Error("error_ipv4")})},av=o=>{if(!o.match("^(?:(?:(?:[a-fA-F0-9]{1,4}:){6}|(?=(?:[a-fA-F0-9]{0,4}:){2,6}(?:[0-9]{1,3}.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){1,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[a-fA-F0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}|(?=(?:[a-fA-F0-9]{0,4}:){0,7}[a-fA-F0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[a-fA-F0-9]{1,4}:){7}:|:(:[a-fA-F0-9]{1,4}){7})$"))throw new Error("error_ipv6")},lv=o=>{if(!o.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")};function dv(o,e,i,r){try{switch(o.format){case"ipv4":ov(e);break;case"ipv6":av(e);break;case"hostname":lv(e);break}return[]}catch(s){return[{path:i,property:"format",message:r(s.message)}]}}class rm{constructor(e,i,r,s){this.jsoneditor=e,this.schema=i||this.jsoneditor.schema,this.options=r||{},this.translate=this.jsoneditor.translate||s.translate,this.translateProperty=this.jsoneditor.translateProperty||s.translateProperty,this.defaults=s,this._validateSubSchema={dependentRequired(d,u,p){const m=[];if(typeof d.dependentRequired<"u"){let b=[];Object.keys(d.dependentRequired).forEach(w=>{typeof u[w]<"u"&&(b=d.dependentRequired[w].filter(v=>!jr(u,v)))}),b.length>0&&m.push({message:"Must have the required properties: "+b.join(", "),path:p})}return m},dependentSchemas(d,u,p){let m=[];return Object.keys(d.dependentSchemas).forEach(b=>{if(typeof u[b]<"u"){const w=d.dependentSchemas[b],v=this._validateSchema(w,u,p);m=[...m,...v]}}),m},contains(d,u,p){const m=[];let b=0;u.forEach(v=>{this._validateSchema(d.contains,v,p).length===0&&b++});const w=b===0;return typeof d.minContains<"u"?b
Type: ${e.type}
Size: ${e.formattedSize}`,s.appendChild(d),s.appendChild(i);const u=document.createElement("div");return u.style.clear="left",s.appendChild(u),s}getProgressBar(){const e=document.createElement("progress");return e.setAttribute("max",100),e.setAttribute("value",0),e}updateProgressBar(e,i){e&&e.setAttribute("value",i)}updateProgressBarUnknown(e){e&&e.removeAttribute("value")}}const yy={".je-form-input-label":"display:block;margin-bottom:3px;font-weight:bold",".je-form-input-description":"display:inline-block;margin:0;font-size:0.8em;font-style:italic",".je-indented-panel":"padding:5px;margin:10px;border-radius:3px;border:1px%20solid%20%23ddd",".je-child-editor-holder":"margin-bottom:8px",".je-header-button-holder":"display:inline-block;margin-left:10px;font-size:0.8em;vertical-align:middle",".je-table":"margin-bottom:5px;border-bottom:1px%20solid%20%23ccc",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};class lm extends Fn{getFormInputLabel(e,i){const r=super.getFormInputLabel(e,i);return r.classList.add("je-form-input-label"),r}getFormInputDescription(e){const i=super.getFormInputDescription(e);return i.classList.add("je-form-input-label"),i}getIndentedPanel(){const e=super.getIndentedPanel();return e.classList.add("je-indented-panel"),e}getTopIndentedPanel(){return this.getIndentedPanel()}getChildEditorHolder(){const e=super.getChildEditorHolder();return e.classList.add("je-child-editor-holder"),e}getHeaderButtonHolder(){const e=this.getButtonHolder();return e.classList.add("je-header-button-holder"),e}getTable(){const e=super.getTable();return e.classList.add("je-table"),e}addInputError(e,i){const r=this.closest(e,".form-control")||e.controlgroup;e.errmsg?e.errmsg.style.display="block":(e.errmsg=document.createElement("div"),e.errmsg.setAttribute("class","errmsg"),e.errmsg.style=e.errmsg.style||{},e.errmsg.style.color="red",r.appendChild(e.errmsg)),e.errmsg.innerHTML="",e.errmsg.appendChild(document.createTextNode(i)),e.errmsg.setAttribute("role","alert")}removeInputError(e){e.style&&(e.style.borderColor=""),e.errmsg&&(e.errmsg.style.display="none")}}lm.rules=yy;const xy={};class dm extends Fn{getSelectInput(e,i){const r=super.getSelectInput(e);return r.classList.add("form-control"),r}setGridColumnSize(e,i,r){e.classList.add(`col-md-${i}`),r&&e.classList.add(`col-md-offset-${r}`)}afterInputReady(e){e.controlgroup||(e.controlgroup=this.closest(e,".form-group"),this.closest(e,".compact")&&(e.controlgroup.style.marginBottom=0))}getTextareaInput(){const e=document.createElement("textarea");return e.classList.add("form-control"),e}getRangeInput(e,i,r,s,d){return super.getRangeInput(e,i,r,s,d)}getFormInputField(e){const i=super.getFormInputField(e);return e!=="checkbox"&&e!=="radio"&&i.classList.add("form-control"),i}getHiddenLabel(e){const i=document.createElement("label");return i.textContent=e,i.classList.add("sr-only"),i}visuallyHidden(e){e&&e.classList.add("sr-only")}getHiddenText(e){const i=document.createElement("span");return i.textContent=e,i.classList.add("sr-only"),i}getFormControl(e,i,r,s,d){const u=document.createElement("div");return e&&(i.type==="checkbox"||i.type==="radio")?(u.classList.add(i.type),s&&e.appendChild(s),e.insertBefore(i,e.firstChild),u.appendChild(e)):(u.classList.add("form-group"),e&&(e.classList.add("control-label"),u.appendChild(e),s&&e.appendChild(s)),u.appendChild(i)),r&&u.appendChild(r),i.tagName.toLowerCase()!=="div"&&i&&e&&d&&(e.setAttribute("for",d),i.setAttribute("id",d)),i.tagName.toLowerCase()!=="div"&&i&&r&&(r.setAttribute("id",d+"-description"),i.setAttribute("aria-describedby",d+"-description")),u}getIndentedPanel(){const e=document.createElement("div");return e.classList.add("well","well-sm"),e.style.paddingBottom=0,e}getInfoButton(e){const i=document.createElement("span");i.classList.add("glyphicon","glyphicon-info-sign","pull-right"),i.style.padding=".25rem",i.style.position="relative",i.style.display="inline-block";const r=document.createElement("span");return r.style["font-family"]="sans-serif",r.style.visibility="hidden",r.style["background-color"]="rgba(50, 50, 50, .75)",r.style.margin="0 .25rem",r.style.color="#FAFAFA",r.style.padding=".5rem 1rem",r.style["border-radius"]=".25rem",r.style.width="25rem",r.style.position="absolute",r.innerText=e,i.onmouseover=()=>{r.style.visibility="visible"},i.onmouseleave=()=>{r.style.visibility="hidden"},i.appendChild(r),i}getFormInputDescription(e){const i=document.createElement("p");return i.classList.add("help-block"),window.DOMPurify?i.innerHTML=window.DOMPurify.sanitize(e):i.textContent=this.cleanText(e),i}getHeader(e,i){const r=document.createElement("span");return r.classList.add("h3"),typeof e=="string"?r.textContent=e:r.appendChild(e),r}getHeaderButtonHolder(){const e=this.getButtonHolder();return e.style.marginLeft="10px",e}getButtonHolder(){const e=document.createElement("span");return e.classList.add("btn-group"),e}getButton(e,i,r){const s=super.getButton(e,i,r);return s.classList.add("btn","btn-default"),s}getTableContainer(){const e=super.getTableContainer();return e.classList.add("table-responsive"),e}getTable(){const e=document.createElement("table");return e.classList.add("table","table-bordered"),e.style.width="auto",e.style.maxWidth="none",e}addInputError(e,i){e.controlgroup&&(e.controlgroup.classList.add("has-error"),e.errmsg?e.errmsg.style.display="":(e.errmsg=document.createElement("p"),e.errmsg.classList.add("help-block","errormsg"),e.controlgroup.appendChild(e.errmsg)),e.errmsg.textContent=i,e.errmsg.setAttribute("role","alert"))}removeInputError(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("has-error"))}getTabHolder(e){const i=typeof e>"u"?"":e,r=document.createElement("div");return r.innerHTML=``,r}getTopTabHolder(e){const i=typeof e>"u"?"":e,r=document.createElement("div");return r.innerHTML=` `,r}getTab(e,i){const r=document.createElement("li");r.setAttribute("role","presentation");const s=document.createElement("a");return s.setAttribute("href",`#${i}`),s.appendChild(e),s.setAttribute("aria-controls",i),s.setAttribute("role","tab"),s.setAttribute("data-toggle","tab"),r.appendChild(s),r}getTopTab(e,i){const r=document.createElement("li");r.setAttribute("role","presentation");const s=document.createElement("a");return s.setAttribute("href",`#${i}`),s.appendChild(e),s.setAttribute("aria-controls",i),s.setAttribute("role","tab"),s.setAttribute("data-toggle","tab"),r.appendChild(s),r}getTabContent(){const e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}getTopTabContent(){const e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}markTabActive(e){e.tab.classList.add("active"),typeof e.rowPane<"u"?e.rowPane.classList.add("active"):e.container.classList.add("active")}markTabInactive(e){e.tab.classList.remove("active"),typeof e.rowPane<"u"?e.rowPane.classList.remove("active"):e.container.classList.remove("active")}getProgressBar(){const e=document.createElement("div");e.classList.add("progress");const i=document.createElement("div");return i.classList.add("progress-bar"),i.setAttribute("role","progressbar"),i.setAttribute("aria-valuenow",0),i.setAttribute("aria-valuemin",0),i.setAttribute("aria-valuenax",100),i.innerHTML="0%",e.appendChild(i),e}updateProgressBar(e,i){if(!e)return;const r=e.firstChild,s=`${i}%`;r.setAttribute("aria-valuenow",i),r.style.width=s,r.innerHTML=s}updateProgressBarUnknown(e){if(!e)return;const i=e.firstChild;e.classList.add("progress","progress-striped","active"),i.removeAttribute("aria-valuenow"),i.style.width="100%",i.innerHTML=""}getInputGroup(e,i){if(!e)return;const r=document.createElement("div");r.classList.add("input-group"),r.appendChild(e);const s=document.createElement("div");s.classList.add("input-group-btn"),r.appendChild(s);for(let d=0;d
`,r}getTab(e,i){const r=document.createElement("a");return r.classList.add("btn","btn-secondary","btn-block"),r.setAttribute("href",`#${i}`),r.appendChild(e),r}getTopTab(e,i){const r=document.createElement("li");r.id=i,r.classList.add("tab-item");const s=document.createElement("a");return s.setAttribute("href",`#${i}`),s.appendChild(e),r.appendChild(s),r}markTabActive(e){e.tab.classList.add("active"),typeof e.rowPane<"u"?e.rowPane.style.display="":e.container.style.display=""}markTabInactive(e){e.tab.classList.remove("active"),typeof e.rowPane<"u"?e.rowPane.style.display="none":e.container.style.display="none"}afterInputReady(e){if(e.localName==="select"){if(e.classList.contains("selectized")){const i=e.nextSibling;i&&(i.classList.remove("form-select"),Array.from(i.querySelectorAll(".form-select")).forEach(r=>{r.classList.remove("form-select")}))}else if(e.classList.contains("select2-hidden-accessible")){const i=e.nextSibling;i&&i.querySelector(".select2-selection--single")&&i.classList.add("form-select")}}e.controlgroup||(e.controlgroup=this.closest(e,".form-group"),this.closest(e,".compact")&&(e.controlgroup.style.marginBottom=0))}addInputError(e,i){e.controlgroup&&(e.controlgroup.classList.add("has-error"),e.errmsg||(e.errmsg=document.createElement("p"),e.errmsg.classList.add("form-input-hint"),e.controlgroup.appendChild(e.errmsg)),e.errmsg.classList.remove("d-hide"),e.errmsg.textContent=i,e.errmsg.setAttribute("role","alert"))}removeInputError(e){e.errmsg&&(e.errmsg.classList.add("d-hide"),e.controlgroup.classList.remove("has-error"))}}mm.rules=Dy;const Ly={".slider":"-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;display:block;border:none;height:1.2rem;width:100%25",".slider:focus":"box-shadow:0%200%200%200%20rgba(87%2C%2085%2C%20217%2C%200.2);outline:none",".slider.tooltip:not([data-tooltip])::after":"content:attr(value)",".slider::-webkit-slider-thumb":"-webkit-appearance:none;background:%23f17405;border-radius:100%25;height:0.6rem;margin-top:-0.25rem;transition:transform%200.2s;width:0.6rem",".slider:active::-webkit-slider-thumb":"transform:scale(1.25);outline:none",".slider::-webkit-slider-runnable-track":"background:%23b2b4b6;border-radius:0.1rem;height:0.1rem;width:100%25","a.tooltips":"position:relative;display:inline","a.tooltips span":"position:absolute;white-space:nowrap;width:auto;padding-left:1rem;padding-right:1rem;color:%23ffffff;background:rgba(56%2C%2056%2C%2056%2C%200.85);height:1.5rem;line-height:1.5rem;text-align:center;visibility:hidden;border-radius:3px","a.tooltips span:after":"content:%22%22;position:absolute;top:50%25;left:100%25;margin-top:-5px;width:0;height:0;border-left:5px%20solid%20rgba(56%2C%2056%2C%2056%2C%200.85);border-top:5px%20solid%20transparent;border-bottom:5px%20solid%20transparent","a:hover.tooltips span":"visibility:visible;opacity:0.9;font-size:0.8rem;right:100%25;top:50%25;margin-top:-12px;margin-right:10px;z-index:999",".json-editor-btntype-properties + div":"font-size:0.8rem;font-weight:normal",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"width:100%25;border-collapse:collapse",".table td":"padding:0rem%200rem","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23e6f4fe","div[data-schemaid='root']":"position:relative;width:inherit;display:inherit;overflow-x:hidden;z-index:10","select[multiple]":"height:auto","select[multiple].from-select":"height:auto",".je-table-zebra:nth-child(even)":"background-color:%23f2f2f2",".je-table-border":"border:0.5px%20solid%20black",".je-table-hdiv":"border-bottom:1px%20solid%20black",".je-border":"border:0.05rem%20solid%20%233182ce",".je-panel":"width:inherit;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"width:100%25;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit;font-weight:bold",".je-desc":"font-size:smaller;margin:0.2rem%200",".container-xl.je-noindent":"padding-left:0;padding-right:0",".json-editor-btntype-add":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%234299e1;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deletelast":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23e53e3e;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deleteall":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23000000;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-save":"float:right;color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-back":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-delete":"color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btntype-move":"color:%23000000;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btn-collapse":"padding:0em%200.8rem;font-size:1.3rem;color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"},Sy={disable_theme_rules:!1,label_bold:!1,object_panel_default:!0,object_indent:!0,object_border:!1,table_border:!1,table_hdiv:!1,table_zebrastyle:!1,input_size:"small",enable_compact:!1};class fm extends Fn{constructor(e){super(e,Sy)}getGridContainer(){const e=document.createElement("div");return e.classList.add("flex","flex-col","w-full"),this.options.object_indent||e.classList.add("je-noindent"),e}getGridRow(){const e=document.createElement("div");return e.classList.add("flex","flex-wrap","w-full"),e}getGridColumn(){const e=document.createElement("div");return e.classList.add("flex","flex-col"),e}setGridColumnSize(e,i,r){i>0&&i<12?e.classList.add(`w-${i}/12`,"px-1"):e.classList.add("w-full","px-1"),r&&(e.style.marginLeft=`${100/12*r}%`)}getIndentedPanel(){const e=document.createElement("div");return this.options.object_panel_default?e.classList.add("w-full","p-1"):e.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&e.classList.add("je-border"),e}getTopIndentedPanel(){const e=document.createElement("div");return this.options.object_panel_default?e.classList.add("w-full","m-2"):e.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&e.classList.add("je-border"),e}getTitle(){return this.translateProperty(this.schema.title)}getSelectInput(e,i){const r=super.getSelectInput(e);return i?r.classList.add("form-multiselect","block","py-0","h-auto","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"):r.classList.add("form-select","block","py-0","h-6","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&r.classList.add("compact"),r}afterInputReady(e){e.controlgroup||(e.controlgroup=this.closest(e,".form-group"),this.closest(e,".compact")&&(e.controlgroup.style.marginBottom=0))}getTextareaInput(){const e=super.getTextareaInput();return e.classList.add("block","w-full","px-1","text-sm","leading-normal","bg-white","text-black","border","border-grey","rounded"),this.options.enable_compact&&e.classList.add("compact"),e.style.height=0,e}getRangeInput(e,i,r){const s=this.getFormInputField("range");return s.classList.add("slider"),this.options.enable_compact&&s.classList.add("compact"),s.setAttribute("oninput",'this.setAttribute("value", this.value)'),s.setAttribute("min",e),s.setAttribute("max",i),s.setAttribute("step",r),s}getRangeControl(e,i){const r=super.getRangeControl(e,i);return r.classList.add("text-center","text-black"),r}getCheckbox(){const e=this.getFormInputField("checkbox");return e.classList.add("form-checkbox","text-red-600"),e}getCheckboxLabel(e,i){const r=super.getCheckboxLabel(e,i);return r.classList.add("inline-flex","items-center"),r}getFormCheckboxControl(e,i,r){return e.insertBefore(i,e.firstChild),r&&e.classList.add("inline-flex flex-row"),e}getMultiCheckboxHolder(e,i,r,s){const d=super.getMultiCheckboxHolder(e,i,r,s);return d.classList.add("inline-flex","flex-col"),d}getFormRadio(e){const i=this.getFormInputField("radio");i.classList.add("form-radio","text-red-600");for(const r in e)i.setAttribute(r,e[r]);return i}getFormRadioLabel(e,i){const r=super.getFormRadioLabel(e,i);return r.classList.add("inline-flex","items-center","mr-2"),r}getFormRadioControl(e,i,r){return e.insertBefore(i,e.firstChild),r&&e.classList.add("form-radio"),e}getRadioHolder(e,i,r,s,d){const u=super.getRadioHolder(i,r,s,d);return e.options.layout==="h"?u.classList.add("inline-flex","flex-row"):u.classList.add("inline-flex","flex-col"),u}getFormInputLabel(e,i){const r=super.getFormInputLabel(e,i);return this.options.label_bold?r.classList.add("font-bold"):r.classList.add("required"),r}getFormInputField(e){const i=super.getFormInputField(e);return["checkbox","radio"].includes(e)||i.classList.add("block","w-full","px-1","text-black","text-sm","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&i.classList.add("compact"),i}getFormInputDescription(e){const i=document.createElement("p");return i.classList.add("block","mt-1","text-xs"),window.DOMPurify?i.innerHTML=window.DOMPurify.sanitize(e):i.textContent=this.cleanText(e),i}getFormControl(e,i,r,s){const d=document.createElement("div");return d.classList.add("form-group","mb-1","w-full"),e&&(e.classList.add("text-xs"),i.type==="checkbox"&&(i.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),e.classList.add("items-center","flex"),e=this.getFormCheckboxControl(e,i,!1,s)),i.type==="radio"&&(i.classList.add("form-radio","text-red-600","mr-1"),e.classList.add("items-center","flex"),e=this.getFormRadioControl(e,i,!1,s)),d.appendChild(e),!["checkbox","radio"].includes(i.type)&&s&&d.appendChild(s)),["checkbox","radio"].includes(i.type)||(this.options.input_size==="small"?i.classList.add("text-xs"):this.options.input_size==="normal"?i.classList.add("text-base"):this.options.input_size==="large"&&i.classList.add("text-xl"),d.appendChild(i)),r&&d.appendChild(r),d}getHeaderButtonHolder(){const e=this.getButtonHolder();return e.classList.add("text-sm"),e}getButtonHolder(){const e=document.createElement("div");return e.classList.add("flex","relative","inline-flex","align-middle"),e}getButton(e,i,r){const s=super.getButton(e,i,r);return s.classList.add("inline-block","align-middle","text-center","text-sm","bg-blue-700","text-white","py-1","pr-1","m-2","shadow","select-none","whitespace-no-wrap","rounded"),s}getInfoButton(e){const i=document.createElement("a");i.classList.add("tooltips","float-right"),i.innerHTML="ⓘ";const r=document.createElement("span");return r.innerHTML=e,i.appendChild(r),i}getTable(){const e=super.getTable();return this.options.table_border?e.classList.add("je-table-border"):e.classList.add("table","border","p-0"),e}getTableRow(){const e=super.getTableRow();return this.options.table_border&&e.classList.add("je-table-border"),this.options.table_zebrastyle&&e.classList.add("je-table-zebra"),e}getTableHeaderCell(e){const i=super.getTableHeaderCell(e);return this.options.table_border?i.classList.add("je-table-border"):this.options.table_hdiv?i.classList.add("je-table-hdiv"):i.classList.add("text-xs","border","p-0","m-0"),i}getTableCell(){const e=super.getTableCell();return this.options.table_border?e.classList.add("je-table-border"):this.options.table_hdiv?e.classList.add("je-table-hdiv"):e.classList.add("border-0","p-0","m-0"),e}addInputError(e,i){e.controlgroup&&(e.controlgroup.classList.add("has-error"),e.controlgroup.classList.add("text-red-600"),e.errmsg?e.errmsg.style.display="":(e.errmsg=document.createElement("p"),e.errmsg.classList.add("block","mt-1","text-xs","text-red"),e.controlgroup.appendChild(e.errmsg)),e.errmsg.textContent=i)}removeInputError(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("text-red-600"),e.controlgroup.classList.remove("has-error"))}getTabHolder(e){const i=document.createElement("div"),r=typeof e>"u"?"":e;return i.innerHTML=`
-`:"'+(I?A:q(A,!0))+`
-`},K.blockquote=function(A){return`"+(I?A:q(A,!0))+`
-`+A+`
-`},K.html=function(A){return A},K.heading=function(A,S,I,L){return this.options.headerIds?"
-`:`
-`},K.list=function(A,S,I){var L=S?"ol":"ul";return"<"+L+(S&&I!==1?' start="'+I+'"':"")+`>
-`+A+""+L+`>
-`},K.listitem=function(A){return"
-
-`+A+`
-`+S+`
-`},K.tablerow=function(A){return`
-`+A+`
-`},K.tablecell=function(A,S){var I=S.header?"th":"td";return(S.align?"<"+I+' align="'+S.align+'">':"<"+I+">")+A+""+I+`>
-`},K.strong=function(A){return""+A+""},K.em=function(A){return""+A+""},K.codespan=function(A){return""+A+"
"},K.br=function(){return this.options.xhtml?"
":"
"},K.del=function(A){return""+A+""},K.link=function(A,S,I){if((A=_e(this.options.sanitize,this.options.baseUrl,A))===null)return I;var L='"+I+""},K.image=function(A,S,I){if((A=_e(this.options.sanitize,this.options.baseUrl,A))===null)return I;var L='":">"},K.text=function(A){return A},be}(),ht=function(){function be(){}var K=be.prototype;return K.strong=function(A){return A},K.em=function(A){return A},K.codespan=function(A){return A},K.del=function(A){return A},K.html=function(A){return A},K.text=function(A){return A},K.link=function(A,S,I){return""+I},K.image=function(A,S,I){return""+I},K.br=function(){return""},be}(),Nt=function(){function be(){this.seen={}}var K=be.prototype;return K.serialize=function(A){return A.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},K.getNextSafeSlug=function(A,S){var I=A,L=0;if(this.seen.hasOwnProperty(I)){L=this.seen[A];do I=A+"-"+ ++L;while(this.seen.hasOwnProperty(I))}return S||(this.seen[A]=L,this.seen[I]=0),I},K.slug=function(A,S){S===void 0&&(S={});var I=this.serialize(A);return this.getNextSafeSlug(I,S.dryrun)},be}(),Mt=function(){function be(A){this.options=A||d.defaults,this.options.renderer=this.options.renderer||new Ne,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ht,this.slugger=new Nt}be.parse=function(A,S){return new be(S).parse(A)},be.parseInline=function(A,S){return new be(S).parseInline(A)};var K=be.prototype;return K.parse=function(A,S){S===void 0&&(S=!0);var I,L,X,Q,he,He,ve,qe,_,F,N,$,se,te,G,ee,ne,we,Re,Ye="",vt=A.length;for(I=0;I"+q(He.message+"",!0)+"
";throw He}try{var he=Qe.lex(be,K);if(K.walkTokens){if(K.async)return Promise.all(ze.walkTokens(he,K.walkTokens)).then(function(){return Mt.parse(he,K)}).catch(Q);ze.walkTokens(he,K.walkTokens)}return Mt.parse(he,K)}catch(He){Q(He)}}ze.options=ze.setOptions=function(be){var K;return Ze(ze.defaults,be),K=ze.defaults,d.defaults=K,ze},ze.getDefaults=b,ze.defaults=d.defaults,ze.use=function(){for(var be=arguments.length,K=new Array(be),A=0;A"+q(S.message+"",!0)+"
";throw S}},ze.Parser=Mt,ze.parser=Mt.parse,ze.Renderer=Ne,ze.TextRenderer=ht,ze.Lexer=Qe,ze.lexer=Qe.lex,ze.Tokenizer=le,ze.Slugger=Nt,ze.parse=ze;var st=ze.options,At=ze.setOptions,Ft=ze.use,$t=ze.walkTokens,It=ze.parseInline,Ti=ze,pi=Mt.parse,ki=Qe.lex;d.Lexer=Qe,d.Parser=Mt,d.Renderer=Ne,d.Slugger=Nt,d.TextRenderer=ht,d.Tokenizer=le,d.getDefaults=b,d.lexer=ki,d.marked=ze,d.options=st,d.parse=Ti,d.parseInline=It,d.parser=pi,d.setOptions=At,d.use=Ft,d.walkTokens=$t,Object.defineProperty(d,"__esModule",{value:!0})})},{}],16:[function(i,r,s){(function(d){(function(){var u;(function(){(u=function(p,m,b,w){w=w||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=w.flags||{},this.memoized={},this.loaded=!1;var v,j,D,B,U,q=this;function me(J,re){var _e=q._readFile(J,null,w.asyncLoad);w.asyncLoad?_e.then(function(ye){re(ye)}):re(_e)}function $e(J){m=J,b&&ie()}function Fe(J){b=J,m&&ie()}function ie(){for(q.rules=q._parseAFF(m),q.compoundRuleCodes={},j=0,B=q.compoundRules.length;j0&&(Ce.continuationClasses=ue),de!=="."&&(Ce.match=$e==="SFX"?new RegExp(de+"$"):new RegExp("^"+de)),re!="0"&&(Ce.remove=$e==="SFX"?new RegExp(re+"$"):re),J.push(Ce)}U[Fe]={type:$e,combineable:ie=="Y",entries:J},v+=b}else if($e==="COMPOUNDRULE"){for(j=v+1,B=v+1+(b=parseInt(me[1],10));j0&&(b[Ke]===null&&(b[Ke]=[]),b[Ke].push(ot))}for(var v=1,j=m.length;vs[2]&&(s[2]=t[2]),t[1]s[3]&&(s[3]=t[3]),s}function Lu(s,t){t[0]s[2]&&(s[2]=t[0]),t[1]s[3]&&(s[3]=t[1])}function rC(s,t,e,i,n){for(;et[0]?i[0]=s[0]:i[0]=t[0],s[1]>t[1]?i[1]=s[1]:i[1]=t[1],s[2]=o&&p<=l),!i&&r&Es.RIGHT&&!(n&Es.RIGHT)&&(m=g-(d-l)*f,i=m>=a&&m<=h),!i&&r&Es.BELOW&&!(n&Es.BELOW)&&(p=d-(g-a)/f,i=p>=o&&p<=l),!i&&r&Es.LEFT&&!(n&Es.LEFT)&&(m=g-(d-o)*f,i=m>=a&&m<=h)}return i}function oC(s,t){const e=t.getExtent(),i=mr(s);if(t.canWrapX()&&(i[0]{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const i=this.simplifiedGeometry_.getFlatCoordinates();let n;switch(this.type_){case"LineString":i.length=_m(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),n=[i.length];break;case"MultiLineString":n=[],i.length=vC(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,n);break;case"Polygon":n=[],i.length=qy(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,n);break}return n&&(this.simplifiedGeometry_=new S1(this.type_,i,n,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}};sn.prototype.getFlatCoordinates=sn.prototype.getOrientedFlatCoordinates;let fx=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=Bi,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let i=e.dataProjection?Bt(e.dataProjection):this.readProjection(t);e.extent&&i&&i.getUnits()==="tile-pixels"&&(i=Bt(i),i.setWorldExtent(e.extent)),e={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},t)}getType(){return Pt()}readFeature(t,e){return Pt()}readFeatures(t,e){return Pt()}readGeometry(t,e){return Pt()}readProjection(t){return Pt()}writeFeature(t,e){return Pt()}writeFeatures(t,e){return Pt()}writeGeometry(t,e){return Pt()}};function xl(s,t,e){const i=e?Bt(e.featureProjection):null,n=e?Bt(e.dataProjection):null;let r=s;if(i&&n&&!$o(i,n)){t&&(r=s.clone());const o=t?i:n,a=t?n:i;o.getUnits()==="tile-pixels"?r.transform(o,a):r.applyTransform(hd(o,a))}if(t&&e&&e.decimals!==void 0){const o=Math.pow(10,e.decimals),a=function(l){for(let h=0,c=l.length;h0&&r.push(l),r}function N$(s,t,e,i,n){let r=e,o=e,a=0,l=0,h=e,c,u,d,g,f,p,m,_,y,v;for(u=e;us&&(l>a&&(a=l,r=h,o=u),l=0,h=u-n)),d=g,m=y,_=v),f=S,p=w}return l+=g,l>a?[h,u]:[r,o]}const up={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};let D$=class extends rg{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[wi]={fillStyle:wi},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){const n=this.textFillState_,r=this.textStrokeState_,o=this.textState_;if(this.text_===""||!o||!n&&!r)return;const a=this.coordinates;let l=a.length;const h=t.getType();let c=null,u=t.getStride();if(o.placement==="line"&&(h=="LineString"||h=="MultiLineString"||h=="Polygon"||h=="MultiPolygon")){if(!Ze(this.maxExtent,t.getExtent()))return;let d;if(c=t.getFlatCoordinates(),h=="LineString")d=[c.length];else if(h=="MultiLineString")d=t.getEnds();else if(h=="Polygon")d=t.getEnds().slice(0,1);else if(h=="MultiPolygon"){const m=t.getEndss();d=[];for(let _=0,y=m.length;_S[0]&&R[2]>S[2]&&v.push([R[0]-E,R[1],R[2]-E,R[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==g&&this.renderedRenderOrder_==p&&this.renderedFrameDeclutter_===!!t.declutter&&ln(this.wrappedRenderedExtent_,_))return ao(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const w=new tR(rR(u,d),_,u,d);let C;for(let E=0,b=v.length;E{let R;const A=E.getStyleFunction()||e.getStyleFunction();if(A&&(R=A(E,u)),R){const $=this.renderFeature(E,M,R,w,C,this.getLayer().getDeclutter(),b);T=T&&!$}},O=pm(_),P=i.getFeaturesInExtent(O);p&&P.sort(p);for(let E=0,b=P.length;Es):null}const fi={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function rG(s,t){return[[-1/0,-1/0,1/0,1/0]]}let oG=!1;function aR(s,t,e,i,n,r,o){const a=new XMLHttpRequest;a.open("GET",typeof s=="function"?s(e,i,n):s,!0),t.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=oG,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const h=t.getType();try{let c;h=="text"||h=="json"?c=a.responseText:h=="xml"?c=a.responseXML||a.responseText:h=="arraybuffer"&&(c=a.response),c?r(t.readFeatures(c,{extent:e,featureProjection:n}),t.readProjection(c)):o()}catch{o()}}else o()},a.onerror=o,a.send()}function fS(s,t){return function(e,i,n,r,o){const a=this;aR(s,t,e,i,n,function(l,h){a.addFeatures(l),r!==void 0&&r(l)},o||Uh)}}let So=class extends Ki{constructor(t,e,i){super(t),this.feature=e,this.features=i}},Rm=class extends Mx{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_=Uh,this.format_=t.format||null,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&&(ie(this.format_,"`format` must be set when `url` is set"),this.loader_=fS(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:rG;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new L1:null,this.loadedExtentsRtree_=new L1,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,n;Array.isArray(t.features)?n=t.features:t.features&&(i=t.features,n=i.getArray()),!e&&i===void 0&&(i=new ni(n)),n!==void 0&&this.addFeaturesInternal(n),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=Lt(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const n=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new So(fi.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof sn||(this.featureChangeKeys_[t]=[zt(e,_t.CHANGE,this.handleFeatureChange_,this),zt(e,Ka.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(e.getId()!==void 0){const n=String(e.getId());if(!(n in this.idIndex_))this.idIndex_[n]=e;else if(e instanceof sn){const r=this.idIndex_[n];r instanceof sn?Array.isArray(r)?r.push(e):this.idIndex_[n]=[r,e]:i=!1}else i=!1}return i&&(ie(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let r=0,o=t.length;re||e>t.getMaxZoom())return!1;const r=t.getFullTileRange(e);return r?r.containsXY(i,n):!0}let xG=class extends eg{constructor(t){t=t||{},super(t)}},vG=class extends Sx{constructor(t){super(t),this.image=null}getImage(){return this.image?this.image.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,r=n.resolution,o=this.getLayer().getSource(),a=t.viewHints;let l=t.extent;if(e.extent!==void 0&&(l=ri(l,hn(e.extent,n.projection))),!a[ke.ANIMATING]&&!a[ke.INTERACTING]&&!xc(l))if(o){const h=n.projection,c=o.getImage(l,r,i,h);c&&(this.loadImage(c)?this.image=c:c.getState()===ct.EMPTY&&(this.image=null))}else this.image=null;return!!this.image}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=ps(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!Ja(r,n))return null;const o=this.image.getExtent(),a=this.image.getImage(),l=Ht(o),h=Math.floor(a.width*((n[0]-o[0])/l));if(h<0||h>=a.width)return null;const c=as(o),u=Math.floor(a.height*((o[3]-n[1])/c));return u<0||u>=a.height?null:this.getImageData(a,h,u)}renderFrame(t,e){const i=this.image,n=i.getExtent(),r=i.getResolution(),[o,a]=Array.isArray(r)?r:[r,r],l=i.getPixelRatio(),h=t.layerStatesArray[t.layerIndex],c=t.pixelRatio,u=t.viewState,d=u.center,g=u.resolution,f=c*o/(g*l),p=c*a/(g*l);this.prepareContainer(t,e);const m=this.context.canvas.width,_=this.context.canvas.height,y=this.getRenderContext(t);let v=!1,S=!0;if(h.extent){const I=hn(h.extent,u.projection);S=Ze(I,t.extent),v=S&&!ln(I,t.extent),v&&this.clipUnrotated(y,t,I)}const w=i.getImage(),C=_r(this.tempTransform,m/2,_/2,f,p,0,l*(n[0]-d[0])/o,l*(d[1]-n[3])/a);this.renderedResolution=a*c/l;const M=w.width*C[0],T=w.height*C[3];if(this.getLayer().getSource().getInterpolate()||(y.imageSmoothingEnabled=!1),this.preRender(y,t),S&&M>=.5&&T>=.5){const I=C[4],O=C[5],P=h.opacity;P!==1&&(y.save(),y.globalAlpha=P),y.drawImage(w,0,0,+w.width,+w.height,I,O,M,T),P!==1&&y.restore()}return this.postRender(this.context,t),v&&y.restore(),y.imageSmoothingEnabled=!0,this.container}},wG=class extends xG{constructor(t){super(t)}createRenderer(){return new vG(this)}getData(t){return super.getData(t)}};const Bo={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};let EG=class extends eg{constructor(t){t=t||{};const e=Object.assign({},t),i=t.cacheSize;delete t.cacheSize,delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.cacheSize_=i,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(Bo.PRELOAD)}setPreload(t){this.set(Bo.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(Bo.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(Bo.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}};function s_(s,t,e,i){return`${s},${lg(t,e,i)}`}function i_(s,t,e){if(!(e in s))return s[e]=new Set([t]),!0;const i=s[e],n=i.has(t);return n||i.add(t),!n}function SG(s,t,e){const i=s[e];return i?i.delete(t):!1}function _S(s,t){const e=s.layerStatesArray[s.layerIndex];e.extent&&(t=ri(t,hn(e.extent,s.viewState.projection)));const i=e.layer.getRenderSource();if(!i.getWrapX()){const n=i.getTileGridForProjection(s.viewState.projection).getExtent();n&&(t=ri(t,n))}return t}let fR=class extends Sx{constructor(t,e){super(t),e=e||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=Zi(),this.tempTileRange_=new Rx(0,0,0,0),this.tempTileCoord_=pp(0,0,0);const i=e.cacheSize!==void 0?e.cacheSize:512;this.tileCache_=new uR(i),this.maxStaleKeys=i*.5}getTileCache(){return this.tileCache_}getOrCreateTile(t,e,i,n){const r=this.tileCache_,o=this.getLayer().getSource(),a=s_(o.getKey(),t,e,i);let l;if(r.containsKey(a))l=r.get(a);else{if(l=o.getTile(t,e,i,n.pixelRatio,n.viewState.projection),!l)return null;r.set(a,l)}return l}getTile(t,e,i,n){return this.getOrCreateTile(t,e,i,n)||null}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=ps(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!Ja(r,n))return null;const o=e.viewState,a=i.getRenderSource(),l=a.getTileGridForProjection(o.projection),h=a.getTilePixelRatio(e.pixelRatio);for(let c=l.getZForResolution(o.resolution);c>=l.getMinZoom();--c){const u=l.getTileCoordForCoordAndZ(n,c),d=this.getTile(c,u[1],u[2],e);if(!d||d.getState()!==J.LOADED)continue;const g=l.getOrigin(c),f=Xs(l.getTileSize(c)),p=l.getResolution(c);let m;if(d instanceof cR)m=d.getImage();else if(d instanceof O1){if(m=fp(d.getData()),!m)continue}else continue;const _=Math.floor(h*((n[0]-g[0])/p-u[1]*f[0])),y=Math.floor(h*((g[1]-n[1])/p-u[2]*f[1])),v=Math.round(h*a.getGutterForProjection(o.projection));return this.getImageData(m,_+v,y+v)}return null}prepareFrame(t){const e=this.getLayer().getSource();if(!e)return!1;const i=this.getLayer().getSource().getRevision();return this.renderedRevision_?this.renderedRevision_!==i&&(this.renderedRevision_=i,this.renderedSourceKey_===e.getKey()&&this.tileCache_.clear()):this.renderedRevision_=i,!0}enqueueTiles(t,e,i,n,r){const o=t.viewState,a=this.getLayer(),l=a.getRenderSource(),h=l.getTileGridForProjection(o.projection),c=Lt(l);c in t.wantedTiles||(t.wantedTiles[c]={});const u=t.wantedTiles[c],d=a.getMapInternal(),g=Math.max(i-r,h.getMinZoom(),h.getZForResolution(Math.min(a.getMaxResolution(),d?d.getView().getResolutionForZoom(Math.max(a.getMinZoom(),0)):h.getResolution(0)),l.zDirection));for(let f=i;f>=g;--f){const p=h.getTileRangeForExtentAndZ(e,f,this.tempTileRange_),m=h.getResolution(f);for(let _=p.minX;_<=p.maxX;++_)for(let y=p.minY;y<=p.maxY;++y){const v=this.getTile(f,_,y,t);if(!v||!i_(n,v,f))continue;const S=v.getKey();if(u[S]=!0,v.getState()===J.IDLE&&!t.tileQueue.isKeyQueued(S)){const w=pp(f,_,y,this.tempTileCoord_);t.tileQueue.enqueue([v,c,h.getTileCoordCenter(w),m])}}}}findStaleTile_(t,e){const i=this.tileCache_,n=t[0],r=t[1],o=t[2],a=this.getStaleKeys();for(let l=0;l0){e([]);return}const f=c.getTileCoordExtent(g.wrappedTileCoord),p=Vn(f),m=[(u[0]-p[0])/h,(p[1]-u[1])/h],_=g.getSourceTiles().reduce(function(v,S){return v.concat(S.getFeatures())},[]);let y=g.hitDetectionImageData[r];if(!y){const v=Xs(c.getTileSize(c.getZForResolution(h,o.zDirection))),S=this.renderedRotation_,w=[this.getRenderTransform(c.getTileCoordCenter(g.wrappedTileCoord),h,0,Wi,v[0]*Wi,v[1]*Wi,0)];y=sR(v,w,_,n.getStyleFunction(),c.getTileCoordExtent(g.wrappedTileCoord),g.getReplayState(n).renderedResolution,S),g.hitDetectionImageData[r]=y}e(iR(m,_,y))})}getFeaturesInExtent(t){const e=[],i=this.getTileCache();if(i.getCount()===0)return e;const n=this.getLayer().getSource().tileGrid,r=n.getZForResolution(this.renderedResolution);return i.forEach(o=>{if(o.tileCoord[0]!==r||o.getState()!==J.LOADED)return;const a=o.getSourceTiles();for(let l=0,h=a.length;l=0;--l)o=t[l],g=o[0],f=Lt(g.feature),g.depth&&(f+="-"+g.depth.join("-")),f in e||(e[f]={}),o[1]===0?(e[f].right=g,e[f].index=g.index):o[1]==1&&(e[f].left=g,e[f].index=g.index+1);for(f in e){switch(d=e[f].right,c=e[f].left,h=e[f].index,u=h-1,c!==void 0?g=c:g=d,u<0&&(u=0),a=g.geometry,r=a.getCoordinates(),n=r,i=!1,a.getType()){case"MultiLineString":r[g.depth[0]].length>2&&(r[g.depth[0]].splice(h,1),i=!0);break;case"LineString":r.length>2&&(r.splice(h,1),i=!0);break;case"MultiPolygon":n=n[g.depth[1]];case"Polygon":n=n[g.depth[0]],n.length>4&&(h==n.length-1&&(h=0),n.splice(h,1),i=!0,h===0&&(n.pop(),n.push(n[0]),u=n.length-1));break}if(i){this.setGeometryCoordinates_(a,r);const p=[];if(c!==void 0&&(this.rBush_.remove(c),p.push(c.segment[0])),d!==void 0&&(this.rBush_.remove(d),p.push(d.segment[1])),c!==void 0&&d!==void 0){const m={depth:g.depth,feature:g.feature,geometry:g.geometry,index:u,segment:p};this.rBush_.insert(_i(m.segment),m)}this.updateSegmentIndices_(a,h,g.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return i}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),function(r){r.geometry===t&&(i===void 0||r.depth===void 0||ao(r.depth,i))&&r.index>e&&(r.index+=n)})}};function a4(s,t){return s.index-t.index}function SS(s,t,e){const i=t.geometry;if(i.getType()==="Circle"){let r=i;if(t.index===ku){const o=Vh(r.getCenter(),Ve(s)),a=Math.sqrt(o)-r.getRadius();return a*a}}const n=Ve(s);return Rh[0]=Ve(t.segment[0]),Rh[1]=Ve(t.segment[1]),h3(n,Rh)}function MS(s,t,e){const i=t.geometry;if(i.getType()==="Circle"&&t.index===ku)return qh(i.getClosestPoint(Ve(s)));const n=Ve(s);return Rh[0]=Ve(t.segment[0]),Rh[1]=Ve(t.segment[1]),qh(aC(n,Rh))}function l4(){const s=QC();return function(t,e){return s.Point}}const nf={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};let rf=class extends Ki{constructor(t,e){super(t),this.feature=e}};function h4(s,t){const e=[];for(let i=0;i3&&(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0)&&(a.datum_type=il,a.datum_params[3]*=$u,a.datum_params[4]*=$u,a.datum_params[5]*=$u,a.datum_params[6]=a.datum_params[6]/1e6+1)),o&&(a.datum_type=Ih,a.grids=o),a.a=e,a.b=i,a.es=n,a.ep2=r,a}var FR={};function e6(s,t){var e=new DataView(t),i=n6(e),n=r6(e,i),r=o6(e,n,i),o={header:n,subgrids:r};return FR[s]=o,o}function s6(s){if(s===void 0)return null;var t=s.split(",");return t.map(i6)}function i6(s){if(s.length===0)return null;var t=s[0]==="@";return t&&(s=s.slice(1)),s==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:s,mandatory:!t,grid:FR[s]||null,isNull:!1}}function ch(s){return s/3600*Math.PI/180}function n6(s){var t=s.getInt32(8,!1);return t===11?!1:(t=s.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function r6(s,t){return{nFields:s.getInt32(8,t),nSubgridFields:s.getInt32(24,t),nSubgrids:s.getInt32(40,t),shiftType:$1(s,56,64).trim(),fromSemiMajorAxis:s.getFloat64(120,t),fromSemiMinorAxis:s.getFloat64(136,t),toSemiMajorAxis:s.getFloat64(152,t),toSemiMinorAxis:s.getFloat64(168,t)}}function $1(s,t,e){return String.fromCharCode.apply(null,new Uint8Array(s.buffer.slice(t,e)))}function o6(s,t,e){for(var i=176,n=[],r=0;r
Q?Math.tan(e):0,f=Math.pow(g,2),p=Math.pow(f,2);n=1-this.es*Math.pow(a,2),h=h/Math.sqrt(n);var m=Lm(e,a,l,this.en);r=this.a*(this.k0*h*(1+c/6*(1-f+u+c/20*(5-18*f+p+14*u-58*f*u+c/42*(61+179*p-p*f-479*f)))))+this.x0,o=this.a*(this.k0*(m-this.ml0+a*i*h/2*(1+c/12*(5-f+9*u+4*d+c/30*(61+p-58*f+270*u-330*f*u+c/56*(1385+543*p-p*f-3111*f))))))+this.y0}else{var _=l*Math.sin(i);if(Math.abs(Math.abs(_)-1)
=1){if(_-1>Q)return 93;o=0}else o=Math.acos(o);e<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return s.x=r,s.y=o,s}function G6(s){var t,e,i,n,r=(s.x-this.x0)*(1/this.a),o=(s.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+o/this.k0,e=XR(t,this.es,this.en),Math.abs(e)
0?t=nt(this.long0+Math.atan2(s.x,-1*s.y)):t=nt(this.long0+Math.atan2(s.x,s.y)):t=nt(this.long0+Math.atan2(s.x*Math.sin(a),o*this.coslat0*Math.cos(a)-s.y*this.sinlat0*Math.sin(a))),s.x=t,s.y=e,s)}else if(Math.abs(this.coslat0)<=Q){if(o<=Q)return e=this.lat0,t=this.long0,s.x=t,s.y=e,s;s.x*=this.con,s.y*=this.con,i=o*this.cons/(2*this.a*this.k0),e=this.con*Sd(this.e,i),t=this.con*nt(this.con*this.long0+Math.atan2(s.x,-1*s.y))}else n=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,o<=Q?r=this.X0:(r=Math.asin(Math.cos(n)*this.sinX0+s.y*Math.sin(n)*this.cosX0/o),t=nt(this.long0+Math.atan2(s.x*Math.sin(n),o*this.cosX0*Math.cos(n)-s.y*this.sinX0*Math.sin(n)))),e=-1*Sd(this.e,Math.tan(.5*(H+r)));return s.x=t,s.y=e,s}var fj=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"];const pj={init:uj,forward:dj,inverse:gj,names:fj,ssfn_:cj};function mj(){var s=this.lat0;this.lambda0=this.long0;var t=Math.sin(s),e=this.a,i=this.rf,n=1/i,r=2*n-Math.pow(n,2),o=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(s),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+s/2)),h=Math.log((1+o*t)/(1-o*t));this.K=a-this.alpha*l+this.alpha*o/2*h}function _j(s){var t=Math.log(Math.tan(Math.PI/4-s.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(s.y))/(1-this.e*Math.sin(s.y))),i=-this.alpha*(t+e)+this.K,n=2*(Math.atan(Math.exp(i))-Math.PI/4),r=this.alpha*(s.x-this.lambda0),o=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(n)+Math.cos(this.b0)*Math.cos(r))),a=Math.asin(Math.cos(this.b0)*Math.sin(n)-Math.sin(this.b0)*Math.cos(n)*Math.cos(r));return s.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,s.x=this.R*o+this.x0,s}function yj(s){for(var t=s.x-this.x0,e=s.y-this.y0,i=t/this.R,n=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(n)+Math.sin(this.b0)*Math.cos(n)*Math.cos(i)),o=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(n))),a=this.lambda0+o/this.alpha,l=0,h=r,c=-1e3,u=0;Math.abs(h-c)>1e-7;){if(++u>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)),c=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return s.x=a,s.y=h,s}var xj=["somerc"];const vj={init:mj,forward:_j,inverse:yj,names:xj};var Zl=1e-7;function wj(s){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof s.PROJECTION=="object"?Object.keys(s.PROJECTION)[0]:s.PROJECTION;return"no_uoff"in s||"no_off"in s||t.indexOf(e)!==-1}function Ej(){var s,t,e,i,n,r,o,a,l,h,c=0,u,d=0,g=0,f=0,p=0,m=0,_=0;this.no_off=wj(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var v=!1;if("rectified_grid_angle"in this&&(v=!0),y&&(_=this.alpha),v&&(c=this.rectified_grid_angle*As),y||v)d=this.longc;else if(g=this.long1,p=this.lat1,f=this.long2,m=this.lat2,Math.abs(p-m)<=Zl||(s=Math.abs(p))<=Zl||Math.abs(s-H)<=Zl||Math.abs(Math.abs(this.lat0)-H)<=Zl||Math.abs(Math.abs(m)-H)<=Zl)throw new Error;var S=1-this.es;t=Math.sqrt(S),Math.abs(this.lat0)>Q?(a=Math.sin(this.lat0),e=Math.cos(this.lat0),s=1-this.es*a*a,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/S),this.A=this.B*this.k0*t/s,i=this.B*t/(e*Math.sqrt(s)),n=i*i-1,n<=0?n=0:(n=Math.sqrt(n),this.lat0<0&&(n=-n)),this.E=n+=i,this.E*=Math.pow(Dn(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=i=n=1),y||v?(y?(u=Math.asin(Math.sin(_)/i),v||(c=_)):(u=c,_=Math.asin(i*Math.sin(u))),this.lam0=d-Math.asin(.5*(n-1/n)*Math.tan(u))/this.B):(r=Math.pow(Dn(this.e,p,Math.sin(p)),this.B),o=Math.pow(Dn(this.e,m,Math.sin(m)),this.B),n=this.E/r,l=(o-r)/(o+r),h=this.E*this.E,h=(h-o*r)/(h+o*r),s=g-f,s<-Math.pi?f-=wd:s>Math.pi&&(f+=wd),this.lam0=nt(.5*(g+f)-Math.atan(h*Math.tan(.5*this.B*(g-f))/l)/this.B),u=Math.atan(2*Math.sin(this.B*nt(g-this.lam0))/(n-1/n)),c=_=Math.asin(i*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),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(i*i-1)/Math.cos(_))),this.lat0<0&&(this.u_0=-this.u_0)),n=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(me-n)),this.v_pole_s=this.ArB*Math.log(Math.tan(me+n))}function Sj(s){var t={},e,i,n,r,o,a,l,h;if(s.x=s.x-this.lam0,Math.abs(Math.abs(s.y)-H)>Q){if(o=this.E/Math.pow(Dn(this.e,s.y,Math.sin(s.y)),this.B),a=1/o,e=.5*(o-a),i=.5*(o+a),r=Math.sin(this.B*s.x),n=(e*this.singam-r*this.cosgam)/i,Math.abs(Math.abs(n)-1)
0?this.v_pole_n:this.v_pole_s,l=this.ArB*s.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 Mj(s){var t,e,i,n,r,o,a,l={};if(s.x=(s.x-this.x0)*(1/this.a),s.y=(s.y-this.y0)*(1/this.a),this.no_rot?(e=s.y,t=s.x):(e=s.x*this.cosrot-s.y*this.sinrot,t=s.y*this.cosrot+s.x*this.sinrot+this.u_0),i=Math.exp(-this.BrA*e),n=.5*(i-1/i),r=.5*(i+1/i),o=Math.sin(this.BrA*t),a=(o*this.cosgam+n*this.singam)/r,Math.abs(Math.abs(a)-1)
Q?this.ns=Math.log(i/a)/Math.log(n/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=i/(this.ns*Math.pow(n,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function Rj(s){var t=s.x,e=s.y;Math.abs(2*Math.abs(e)-Math.PI)<=Q&&(e=hg(e)*(H-2*Q));var i=Math.abs(Math.abs(e)-H),n,r;if(i>Q)n=Dn(this.e,e,Math.sin(e)),r=this.a*this.f0*Math.pow(n,this.ns);else{if(i=e*this.ns,i<=0)return null;r=0}var o=this.ns*nt(t-this.long0);return s.x=this.k0*(r*Math.sin(o))+this.x0,s.y=this.k0*(this.rh-r*Math.cos(o))+this.y0,s}function Ij(s){var t,e,i,n,r,o=(s.x-this.x0)/this.k0,a=this.rh-(s.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(o*o+a*a),e=1):(t=-Math.sqrt(o*o+a*a),e=-1);var l=0;if(t!==0&&(l=Math.atan2(e*o,e*a)),t!==0||this.ns>0){if(e=1/this.ns,i=Math.pow(t/(this.a*this.f0),e),n=Sd(this.e,i),n===-9999)return null}else n=-H;return r=nt(l/this.ns+this.long0),s.x=r,s.y=n,s}var Pj=["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 Aj={init:Tj,forward:Rj,inverse:Ij,names:Pj};function Lj(){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 Oj(s){var t,e,i,n,r,o,a,l=s.x,h=s.y,c=nt(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),i=-c*this.alfa,n=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(i)),r=Math.asin(Math.cos(e)*Math.sin(i)/Math.cos(n)),o=this.n*r,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(n/2+this.s45),this.n),s.y=a*Math.cos(o)/1,s.x=a*Math.sin(o)/1,this.czech||(s.y*=-1,s.x*=-1),s}function Fj(s){var t,e,i,n,r,o,a,l,h=s.x;s.x=s.y,s.y=h,this.czech||(s.y*=-1,s.x*=-1),o=Math.sqrt(s.x*s.x+s.y*s.y),r=Math.atan2(s.y,s.x),n=r/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),e=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(t)),s.x=this.long0-e/this.alfa,a=t,l=0;var c=0;do s.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-s.y)<1e-10&&(l=1),a=s.y,c+=1;while(l===0&&c<15);return c>=15?null:s}var Nj=["Krovak","krovak"];const Dj={init:Lj,forward:Oj,inverse:Fj,names:Nj};function oi(s,t,e,i,n){return s*n-t*Math.sin(2*n)+e*Math.sin(4*n)-i*Math.sin(6*n)}function cg(s){return 1-.25*s*(1+s/16*(3+1.25*s))}function ug(s){return .375*s*(1+.25*s*(1+.46875*s))}function dg(s){return .05859375*s*s*(1+.75*s)}function gg(s){return s*s*s*(35/3072)}function ec(s,t,e){var i=t*e;return s/Math.sqrt(1-i*i)}function Sc(s){return Math.abs(s)
0){var t;switch(this.qp=Ko(this.e,1),this.mmf=.5/(1-this.es),this.apa=e8(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=Ko(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 Yj(s){var t,e,i,n,r,o,a,l,h,c,u=s.x,d=s.y;if(u=nt(u-this.long0),this.sphere){if(r=Math.sin(d),c=Math.cos(d),i=Math.cos(u),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+c*i:1+this.sinph0*r+this.cosph0*c*i,e<=Q)return null;e=Math.sqrt(2/e),t=e*c*Math.sin(u),e*=this.mode===this.EQUIT?r:this.cosph0*r-this.sinph0*c*i}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),Math.abs(d+this.lat0)
=0?(t=(h=Math.sqrt(o))*n,e=i*(this.mode===this.S_POLE?h:-h)):t=e=0;break}}return s.x=this.a*t+this.x0,s.y=this.a*e+this.y0,s}function qj(s){s.x-=this.x0,s.y-=this.y0;var t=s.x/this.a,e=s.y/this.a,i,n,r,o,a,l,h;if(this.sphere){var c=0,u,d=0;if(u=Math.sqrt(t*t+e*e),n=u*.5,n>1)return null;switch(n=2*Math.asin(n),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=Math.sin(n),c=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(u)<=Q?0:Math.asin(e*d/u),t*=d,e=c*u;break;case this.OBLIQ:n=Math.abs(u)<=Q?this.lat0:Math.asin(c*this.sinph0+e*d*this.cosph0/u),t*=d*this.cosph0,e=(c-Math.sin(n)*this.sinph0)*u;break;case this.N_POLE:e=-e,n=H-n;break;case this.S_POLE:n-=H;break}i=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
1&&(s=s>1?1:-1),Math.asin(s)}function r8(){Math.abs(this.lat1+this.lat2)
Q?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 o8(s){var t=s.x,e=s.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var i=Ko(this.e3,this.sin_phi),n=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,r=this.ns0*nt(t-this.long0),o=n*Math.sin(r)+this.x0,a=this.rh-n*Math.cos(r)+this.y0;return s.x=o,s.y=a,s}function a8(s){var t,e,i,n,r,o;return s.x-=this.x0,s.y=this.rh-s.y+this.y0,this.ns0>=0?(t=Math.sqrt(s.x*s.x+s.y*s.y),i=1):(t=-Math.sqrt(s.x*s.x+s.y*s.y),i=-1),n=0,t!==0&&(n=Math.atan2(i*s.x,i*s.y)),i=t*this.ns0/this.a,this.sphere?o=Math.asin((this.c-i*i)/(2*this.ns0)):(e=(this.c-i*i)/this.ns0,o=this.phi1z(this.e3,e)),r=nt(n/this.ns0+this.long0),s.x=r,s.y=o,s}function l8(s,t){var e,i,n,r,o,a=oa(.5*t);if(s
0||Math.abs(o)<=Q?(a=this.x0+this.a*r*e*Math.sin(i)/o,l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*n)/o):(a=this.x0+this.infinity_dist*e*Math.sin(i),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*n)),s.x=a,s.y=l,s}function g8(s){var t,e,i,n,r,o;return s.x=(s.x-this.x0)/this.a,s.y=(s.y-this.y0)/this.a,s.x/=this.k0,s.y/=this.k0,(t=Math.sqrt(s.x*s.x+s.y*s.y))?(n=Math.atan2(t,this.rc),e=Math.sin(n),i=Math.cos(n),o=oa(i*this.sin_p14+s.y*e*this.cos_p14/t),r=Math.atan2(s.x*e,t*this.cos_p14*i-s.y*this.sin_p14*e),r=nt(this.long0+r)):(o=this.phic0,r=0),s.x=r,s.y=o,s}var f8=["gnom"];const p8={init:u8,forward:d8,inverse:g8,names:f8};function m8(s,t){var e=1-(1-s*s)/(2*s)*Math.log((1-s)/(1+s));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*H:H;for(var i=Math.asin(.5*t),n,r,o,a,l=0;l<30;l++)if(r=Math.sin(i),o=Math.cos(i),a=s*r,n=Math.pow(1-a*a,2)/(2*o)*(t/(1-s*s)-r/(1-a*a)+.5/s*Math.log((1-a)/(1+a))),i+=n,Math.abs(n)<=1e-10)return i;return NaN}function _8(){this.sphere||(this.k0=xr(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function y8(s){var t=s.x,e=s.y,i,n,r=nt(t-this.long0);if(this.sphere)i=this.x0+this.a*r*Math.cos(this.lat_ts),n=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var o=Ko(this.e,Math.sin(e));i=this.x0+this.a*this.k0*r,n=this.y0+this.a*o*.5/this.k0}return s.x=i,s.y=n,s}function x8(s){s.x-=this.x0,s.y-=this.y0;var t,e;return this.sphere?(t=nt(this.long0+s.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(s.y/this.a*Math.cos(this.lat_ts))):(e=m8(this.e,2*s.y*this.k0/this.a),t=nt(this.long0+s.x/(this.a*this.k0))),s.x=t,s.y=e,s}var v8=["cea"];const w8={init:_8,forward:y8,inverse:x8,names:v8};function E8(){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 S8(s){var t=s.x,e=s.y,i=nt(t-this.long0),n=Sc(e-this.lat0);return s.x=this.x0+this.a*i*this.rc,s.y=this.y0+this.a*n,s}function M8(s){var t=s.x,e=s.y;return s.x=nt(this.long0+(t-this.x0)/(this.a*this.rc)),s.y=Sc(this.lat0+(e-this.y0)/this.a),s}var b8=["Equirectangular","Equidistant_Cylindrical","eqc"];const C8={init:E8,forward:S8,inverse:M8,names:b8};var US=20;function T8(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=cg(this.es),this.e1=ug(this.es),this.e2=dg(this.es),this.e3=gg(this.es),this.ml0=this.a*oi(this.e0,this.e1,this.e2,this.e3,this.lat0)}function R8(s){var t=s.x,e=s.y,i,n,r,o=nt(t-this.long0);if(r=o*Math.sin(e),this.sphere)Math.abs(e)<=Q?(i=this.a*o,n=-1*this.a*this.lat0):(i=this.a*Math.sin(r)/Math.tan(e),n=this.a*(Sc(e-this.lat0)+(1-Math.cos(r))/Math.tan(e)));else if(Math.abs(e)<=Q)i=this.a*o,n=-1*this.ml0;else{var a=ec(this.a,this.e,Math.sin(e))/Math.tan(e);i=a*Math.sin(r),n=this.a*oi(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(r))}return s.x=i+this.x0,s.y=n+this.y0,s}function I8(s){var t,e,i,n,r,o,a,l,h;if(i=s.x-this.x0,n=s.y-this.y0,this.sphere)if(Math.abs(n+this.a*this.lat0)<=Q)t=nt(i/this.a+this.long0),e=0;else{o=this.lat0+n/this.a,a=i*i/this.a/this.a+o*o,l=o;var c;for(r=US;r;--r)if(c=Math.tan(l),h=-1*(o*(l*c+1)-l-.5*(l*l+a)*c)/((l-o)/c-1),l+=h,Math.abs(h)<=Q){e=l;break}t=nt(this.long0+Math.asin(i*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(n+this.ml0)<=Q)e=0,t=nt(this.long0+i/this.a);else{o=(this.ml0+n)/this.a,a=i*i/this.a/this.a+o*o,l=o;var u,d,g,f,p;for(r=US;r;--r)if(p=this.e*Math.sin(l),u=Math.sqrt(1-p*p)*Math.tan(l),d=this.a*oi(this.e0,this.e1,this.e2,this.e3,l),g=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),f=d/this.a,h=(o*(u*f+1)-f-.5*u*(f*f+a))/(this.es*Math.sin(2*l)*(f*f+a-2*o*f)/(4*u)+(o-f)*(u*g-2/Math.sin(2*l))-g),l-=h,Math.abs(h)<=Q){e=l;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=nt(this.long0+Math.asin(i*u/this.a)/Math.sin(e))}return s.x=t,s.y=e,s}var P8=["Polyconic","poly"];const A8={init:T8,forward:R8,inverse:I8,names:P8};function L8(){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 O8(s){var t,e=s.x,i=s.y,n=i-this.lat0,r=e-this.long0,o=n/$u*1e-5,a=r,l=1,h=0;for(t=1;t<=10;t++)l=l*o,h=h+this.A[t]*l;var c=h,u=a,d=1,g=0,f,p,m=0,_=0;for(t=1;t<=6;t++)f=d*c-g*u,p=g*c+d*u,d=f,g=p,m=m+this.B_re[t]*d-this.B_im[t]*g,_=_+this.B_im[t]*d+this.B_re[t]*g;return s.x=_*this.a+this.x0,s.y=m*this.a+this.y0,s}function F8(s){var t,e=s.x,i=s.y,n=e-this.x0,r=i-this.y0,o=r/this.a,a=n/this.a,l=1,h=0,c,u,d=0,g=0;for(t=1;t<=6;t++)c=l*o-h*a,u=h*o+l*a,l=c,h=u,d=d+this.C_re[t]*l-this.C_im[t]*h,g=g+this.C_im[t]*l+this.C_re[t]*h;for(var f=0;f